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

andoma subversion at mplayerhq.hu
Wed Mar 19 14:25:36 CET 2008


Author: andoma
Date: Wed Mar 19 14:25:36 2008
New Revision: 2022

Log:
The TNS coefficient filter map array must be index by filternumber.



Modified:
   aac/aac.c

Modified: aac/aac.c
==============================================================================
--- aac/aac.c	(original)
+++ aac/aac.c	Wed Mar 19 14:25:36 2008
@@ -204,7 +204,7 @@ typedef struct {
     int length[8][4];
     int direction[8][4];
     int order[8][4];
-    const float *tmp2_map[8];
+    const float *tmp2_map[8][4];
     int coef[8][4][TNS_MAX_ORDER];
 } tns_struct;
 
@@ -1233,7 +1233,7 @@ static void tns_data(AACContext * ac, Ge
                 tns->direction[w][filt] = get_bits1(gb);
                 coef_compress = get_bits1(gb);
                 coef_len = coef_res - coef_compress;
-                tns->tmp2_map[w] = tns_tmp2_map[(coef_compress << 1) + (coef_res - 3)];
+                tns->tmp2_map[w][filt] = tns_tmp2_map[(coef_compress << 1) + (coef_res - 3)];
                 for (i = 0; i < tns->order[w][filt]; i++)
                     tns->coef[w][filt][i] = get_bits(gb, coef_len);
             }
@@ -1746,7 +1746,7 @@ static void tns_filter_tool(AACContext *
             // tns_decode_coef
             lpc[0] = 1;
             for (m = 1; m <= order; m++) {
-                lpc[m] = tns->tmp2_map[w][tns->coef[w][filt][m - 1]];
+                lpc[m] = tns->tmp2_map[w][filt][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++)



More information about the FFmpeg-soc mailing list