]> git.sesse.net Git - ffmpeg/commitdiff
ac3enc: Reshuffle some float/fixed-mode ifdefs to avoid a dummy function
authorDiego Biurrun <diego@biurrun.de>
Mon, 4 Jan 2016 10:50:22 +0000 (11:50 +0100)
committerDiego Biurrun <diego@biurrun.de>
Mon, 28 Nov 2016 16:19:30 +0000 (17:19 +0100)
libavcodec/ac3enc_fixed.c
libavcodec/ac3enc_float.c
libavcodec/ac3enc_template.c

index 2bb82ef3b67c3842f96da661319616ec01694d03..c26f9c05d49791776c96f06f9b464fd5d5106c45 100644 (file)
@@ -38,6 +38,8 @@
 static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name,
                                       ac3_options, LIBAVUTIL_VERSION_INT };
 
+static int normalize_samples(AC3EncodeContext *s);
+
 #include "ac3enc_template.c"
 
 
index 968cb2c53371990cdb301df3b1d0637753d2bb89..5bae4bcb3cf5aa10fb39424d7659351865b3f74f 100644 (file)
@@ -82,16 +82,6 @@ av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
 }
 
 
-/*
- * Normalize the input samples.
- * Not needed for the floating-point encoder.
- */
-static int normalize_samples(AC3EncodeContext *s)
-{
-    return 0;
-}
-
-
 /*
  * Scale MDCT coefficients from float to 24-bit fixed-point.
  */
index ec8ec4ef6a316b5dc49c015197b081731818c30a..eefcef5b014f20dc1b148f9c5a9c813ae45bd76b 100644 (file)
@@ -40,8 +40,6 @@
 
 static void scale_coefficients(AC3EncodeContext *s);
 
-static int normalize_samples(AC3EncodeContext *s);
-
 static void clip_coefficients(AudioDSPContext *adsp, CoefType *coef,
                               unsigned int len);
 
@@ -110,10 +108,10 @@ static void apply_mdct(AC3EncodeContext *s)
 #else
             s->ac3dsp.apply_window_int16(s->windowed_samples, input_samples,
                                          s->mdct_window, AC3_WINDOW_SIZE);
-#endif
 
             if (s->fixed_point)
                 block->coeff_shift[ch+1] = normalize_samples(s);
+#endif
 
             s->mdct.mdct_calcw(&s->mdct, block->mdct_coef[ch+1],
                                s->windowed_samples);