[FFmpeg-soc] [soc]: r1311 - eac3/eac3dec.c

bwolowiec subversion at mplayerhq.hu
Sun Sep 9 14:02:57 CEST 2007


Author: bwolowiec
Date: Sun Sep  9 14:02:57 2007
New Revision: 1311

Log:
Correct AHT


Modified:
   eac3/eac3dec.c

Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c	(original)
+++ eac3/eac3dec.c	Sun Sep  9 14:02:57 2007
@@ -1146,10 +1146,10 @@ static void get_transform_coeffs_aht_ch(
                     GET_SBITS(pre_chmant, gbc, bits - ((bg==1)?1:0));
                     if(bg==1)
                         //Gk = 2
-                        mant = pre_chmant/((1<<(bits-1))-1);
+                        mant = (float)pre_chmant/((1<<(bits-1))-1);
                     else
                         //Gk = 4
-                        mant = pre_chmant*3.0f/((1<<(bits+1))-2);
+                        mant = (float)pre_chmant*3.0f/((1<<(bits+1))-2);
 
                     g = 0;
                     remap = 1;
@@ -1157,10 +1157,10 @@ static void get_transform_coeffs_aht_ch(
                     // small mantissa
                     if(bg)
                         //Gk = 2 or 4
-                        mant = pre_chmant/((1<<(bits-1))-1);
+                        mant = (float)pre_chmant/((1<<(bits-1))-1);
                     else
                         //Gk = 1
-                        mant = pre_chmant*2.0f/((1<<bits)-1); ///XXX
+                        mant = (float)pre_chmant*2.0f/((1<<bits)-1); ///XXX
 
                     g = bg;
                     remap = (!bg) && (s->chgaqbin[ch][bin]>0);



More information about the FFmpeg-soc mailing list