[FFmpeg-cvslog] aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient

Justin Ruggles git at videolan.org
Thu Apr 28 04:28:30 CEST 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Apr 26 15:30:19 2011 -0400| [6271794041abbf79098b6c01b27f1539b3a4af5e] | committer: Justin Ruggles

aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
table values from the spec.

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

 libavcodec/aacdec.c    |    2 +-
 libavcodec/aacdectab.h |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index bcc277c..cbaecf9 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -593,7 +593,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
 
     ff_mdct_init(&ac->mdct,       11, 1, 1.0);
     ff_mdct_init(&ac->mdct_small,  8, 1, 1.0);
-    ff_mdct_init(&ac->mdct_ltp,   11, 0, 1.0);
+    ff_mdct_init(&ac->mdct_ltp,   11, 0, 2.0);
     // window initialization
     ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
     ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
diff --git a/libavcodec/aacdectab.h b/libavcodec/aacdectab.h
index 64c2a1c..23a7868 100644
--- a/libavcodec/aacdectab.h
+++ b/libavcodec/aacdectab.h
@@ -36,11 +36,11 @@
 #include <stdint.h>
 
 /* @name ltp_coef
- * Table of the LTP coefficient (multiplied by 2)
+ * Table of the LTP coefficients
  */
 static const float ltp_coef[8] = {
-     1.141658,    1.393232,    1.626008,    1.822608,
-     1.969800,    2.135788,    2.2389202,   2.739066,
+    0.570829, 0.696616, 0.813004, 0.911304,
+    0.984900, 1.067894, 1.194601, 1.369533,
 };
 
 /* @name tns_tmp2_map



More information about the ffmpeg-cvslog mailing list