[FFmpeg-soc] [soc]: r3586 - in eac3: checkout.sh eac3dec.c ffmpeg.patch

jbr subversion at mplayerhq.hu
Sun Aug 24 17:50:26 CEST 2008


Author: jbr
Date: Sun Aug 24 17:50:26 2008
New Revision: 3586

Log:
right-shift table data by 8 to simplify GAQ mantissa calculation

Modified:
   eac3/checkout.sh
   eac3/eac3dec.c
   eac3/ffmpeg.patch

Modified: eac3/checkout.sh
==============================================================================
--- eac3/checkout.sh	(original)
+++ eac3/checkout.sh	Sun Aug 24 17:50:26 2008
@@ -1,7 +1,7 @@
 FILES="eac3dec.c ac3dec.c"
 
 echo "checking out ffmpeg svn"
-for i in $FILES Makefile ac3enc.c ac3dec.h avcodec.h utils.c; do
+for i in $FILES Makefile ac3dec.h ac3dec_data.c; do
     rm -f ffmpeg/libavcodec/$i
 done
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk/ ffmpeg -r 14945

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Sun Aug 24 17:50:26 2008
@@ -154,7 +154,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
                         b = 32768 >> log_gain;
                     else
                         b = ff_eac3_gaq_remap_2_4_b[hebap-8][log_gain-1];
-                    mant += (ff_eac3_gaq_remap_2_4_a[hebap-8][log_gain-1] * (mant>>8) + (b>>8)) >> 7;
+                    mant += (ff_eac3_gaq_remap_2_4_a[hebap-8][log_gain-1] * (mant>>8) + b) >> 7;
                 } else {
                     /* small mantissa, no GAQ, or Gk=1 */
                     mant <<= 24 - bits;

Modified: eac3/ffmpeg.patch
==============================================================================
--- eac3/ffmpeg.patch	(original)
+++ eac3/ffmpeg.patch	Sun Aug 24 17:50:26 2008
@@ -41,3 +41,36 @@ Index: libavcodec/Makefile
  OBJS-$(CONFIG_AC3_ENCODER)             += ac3enc.o ac3tab.o ac3.o
  OBJS-$(CONFIG_ALAC_DECODER)            += alac.o
  OBJS-$(CONFIG_ALAC_ENCODER)            += alacenc.o lpc.o
+Index: libavcodec/ac3dec_data.c
+===================================================================
+--- libavcodec/ac3dec_data.c	(revision 14945)
++++ libavcodec/ac3dec_data.c	(working copy)
+@@ -87,18 +87,19 @@
+ /**
+  * Table E3.6, Gk=2 & Gk=4, B
+  * Large mantissa inverse quantization, negative mantissa remapping offsets
++ * Table values from the spec are right-shifted by 8 to simplify calculations.
+  * ff_eac3_gaq_remap_3_4_b[hebap-8][Gk=2,4]
+  */
+ const int16_t ff_eac3_gaq_remap_2_4_b[9][2] = {
+-    {  -5461, -1170},
+-    { -11703, -4915},
+-    { -14199, -6606},
+-    { -15327, -7412},
+-    { -15864, -7805},
+-    { -16126, -7999},
+-    { -16255, -8096},
+-    { -16320, -8144},
+-    { -16352, -8168}
++    { -22,  -5 },
++    { -46, -20 },
++    { -56, -26 },
++    { -60, -29 },
++    { -62, -31 },
++    { -63, -32 },
++    { -64, -32 },
++    { -64, -32 },
++    { -64, -32 },
+ };
+ 
+ static const int16_t vq_hebap1[4][6] = {



More information about the FFmpeg-soc mailing list