[FFmpeg-cvslog] Merge commit 'e22c63ac74b2968075be8bf0d2deb1ee63b28976'

James Almer git at videolan.org
Fri Apr 7 06:21:01 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Fri Apr  7 00:04:37 2017 -0300| [c37e8c0b7fd4a68604102eb4c9d9c9f347c57ad2] | committer: James Almer

Merge commit 'e22c63ac74b2968075be8bf0d2deb1ee63b28976'

* commit 'e22c63ac74b2968075be8bf0d2deb1ee63b28976':
  ac3enc: Reshuffle some float/fixed-mode ifdefs to avoid a dummy function

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c37e8c0b7fd4a68604102eb4c9d9c9f347c57ad2
---

 libavcodec/ac3enc_fixed.c    |  2 ++
 libavcodec/ac3enc_float.c    | 10 ----------
 libavcodec/ac3enc_template.c |  4 +---
 3 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index 9d39026..f10c3b5 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -43,6 +43,8 @@ static const AVClass ac3enc_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
+static int normalize_samples(AC3EncodeContext *s);
+
 #include "ac3enc_template.c"
 
 
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index caa210d..79839df 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -87,16 +87,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.
  */
 static void scale_coefficients(AC3EncodeContext *s)
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index 9dec9ae..0b23b96 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -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);
 
@@ -113,10 +111,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);


======================================================================

diff --cc libavcodec/ac3enc_fixed.c
index 9d39026,c26f9c0..f10c3b5
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@@ -35,14 -35,11 +35,16 @@@
  
  #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 };
 +
 +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,
 +};
  
+ static int normalize_samples(AC3EncodeContext *s);
+ 
  #include "ac3enc_template.c"
  
  



More information about the ffmpeg-cvslog mailing list