[FFmpeg-soc] [soc]: r3330 - aac/aac.c

superdump subversion at mplayerhq.hu
Fri Aug 15 19:12:37 CEST 2008


Author: superdump
Date: Fri Aug 15 19:12:37 2008
New Revision: 3330

Log:
Move '+ 3' from initialisation of coef_res to wherever coef_res is used, as
requested by Michael


Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Fri Aug 15 19:12:37 2008
@@ -733,7 +733,7 @@ static int decode_tns(AACContext * ac, T
         tns->n_filt[w] = get_bits(gb, 2 - is8);
 
         if (tns->n_filt[w])
-            coef_res = get_bits1(gb) + 3;
+            coef_res = get_bits1(gb);
 
         for (filt = 0; filt < tns->n_filt[w]; filt++) {
             tns->length[w][filt] = get_bits(gb, 6 - 2*is8);
@@ -746,8 +746,8 @@ static int decode_tns(AACContext * ac, T
             }
             tns->direction[w][filt] = get_bits1(gb);
             coef_compress = get_bits1(gb);
-            coef_len = coef_res - coef_compress;
-            tns->tmp2_map[w][filt] = tns_tmp2_map[2*coef_compress + coef_res - 3];
+            coef_len = coef_res + 3 - coef_compress;
+            tns->tmp2_map[w][filt] = tns_tmp2_map[2*coef_compress + coef_res];
 
             for (i = 0; i < tns->order[w][filt]; i++)
                 tns->coef[w][filt][i] = get_bits(gb, coef_len);



More information about the FFmpeg-soc mailing list