[FFmpeg-soc] [soc]: r3423 - in aac: aac.c aac.h

superdump subversion at mplayerhq.hu
Mon Aug 18 01:47:39 CEST 2008


Author: superdump
Date: Mon Aug 18 01:47:39 2008
New Revision: 3423

Log:
Remove tmp2_map indirection as the values of coef were only indices to it so we
may as well assign the actual values to coef


Modified:
   aac/aac.c
   aac/aac.h

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Mon Aug 18 01:47:39 2008
@@ -736,6 +736,7 @@ static int decode_tns(AACContext * ac, T
             coef_res = get_bits1(gb);
 
         for (filt = 0; filt < tns->n_filt[w]; filt++) {
+            int tmp2_idx;
             tns->length[w][filt] = get_bits(gb, 6 - 2*is8);
 
             if ((tns->order[w][filt] = get_bits(gb, 5 - 2*is8)) > tns_max_order) {
@@ -747,10 +748,10 @@ static int decode_tns(AACContext * ac, T
             tns->direction[w][filt] = get_bits1(gb);
             coef_compress = get_bits1(gb);
             coef_len = coef_res + 3 - coef_compress;
-            tns->tmp2_map[w][filt] = tns_tmp2_map[2*coef_compress + coef_res];
+            tmp2_idx = 2*coef_compress + coef_res;
 
             for (i = 0; i < tns->order[w][filt]; i++)
-                tns->coef[w][filt][i] = get_bits(gb, coef_len);
+                tns->coef[w][filt][i] = tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)];
         }
     }
     return 0;
@@ -1282,7 +1283,7 @@ static void apply_tns(float coef[1024], 
             // tns_decode_coef
             lpc[0] = 1;
             for (m = 1; m <= order; m++) {
-                lpc[m] = tns->tmp2_map[w][filt][tns->coef[w][filt][m - 1]];
+                lpc[m] = tns->coef[w][filt][m - 1];
                 for (i = 1; i < m; i++)
                     b[i] = lpc[i] + lpc[m] * lpc[m-i];
                 for (i = 1; i < m; i++)

Modified: aac/aac.h
==============================================================================
--- aac/aac.h	(original)
+++ aac/aac.h	Mon Aug 18 01:47:39 2008
@@ -189,8 +189,7 @@ typedef struct {
     int length[8][4];
     int direction[8][4];
     int order[8][4];
-    const float *tmp2_map[8][4];
-    int coef[8][4][TNS_MAX_ORDER];
+    float coef[8][4][TNS_MAX_ORDER];
 } TemporalNoiseShaping;
 
 /**



More information about the FFmpeg-soc mailing list