]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3enc_fixed.c
h264dec: Fix mix of lossless and lossy MBs decoding
[ffmpeg] / libavcodec / ac3enc_fixed.c
index 2bb82ef3b67c3842f96da661319616ec01694d03..a4ab5dfde2c16db4d5936f93d9aaae3f7018a383 100644 (file)
 
 #define AC3ENC_TYPE AC3ENC_TYPE_AC3_FIXED
 #include "ac3enc_opts_template.c"
-static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name,
-                                      ac3_options, LIBAVUTIL_VERSION_INT };
-
-#include "ac3enc_template.c"
-
-
-/**
- * Finalize MDCT and free allocated memory.
- *
- * @param s  AC-3 encoder private context
- */
-av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s)
-{
-    ff_mdct_end(&s->mdct);
-}
-
-
-/**
- * Initialize MDCT tables.
- *
- * @param s  AC-3 encoder private context
- * @return   0 on success, negative error code on failure
- */
-av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s)
-{
-    int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0);
-    s->mdct_window = ff_ac3_window;
-    return ret;
-}
 
+static const AVClass ac3enc_class = {
+    .class_name = "Fixed-Point AC-3 Encoder",
+    .item_name  = av_default_item_name,
+    .option     = ac3_options,
+    .version    = LIBAVUTIL_VERSION_INT,
+};
 
 /*
  * Normalize the input samples to use the maximum available precision.
@@ -124,6 +101,34 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
 }
 
 
+#include "ac3enc_template.c"
+
+
+/**
+ * Finalize MDCT and free allocated memory.
+ *
+ * @param s  AC-3 encoder private context
+ */
+av_cold void ff_ac3_fixed_mdct_end(AC3EncodeContext *s)
+{
+    ff_mdct_end(&s->mdct);
+}
+
+
+/**
+ * Initialize MDCT tables.
+ *
+ * @param s  AC-3 encoder private context
+ * @return   0 on success, negative error code on failure
+ */
+av_cold int ff_ac3_fixed_mdct_init(AC3EncodeContext *s)
+{
+    int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0);
+    s->mdct_window = ff_ac3_window;
+    return ret;
+}
+
+
 static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
 {
     AC3EncodeContext *s = avctx->priv_data;