[FFmpeg-soc] [soc]: r1441 - aac/aac.c
andoma
subversion at mplayerhq.hu
Sun Nov 11 14:44:45 CET 2007
Author: andoma
Date: Sun Nov 11 14:44:44 2007
New Revision: 1441
Log:
Make the tns-tool work correctly with EIGHT_SHORT_SEQUENCE
Modified:
aac/aac.c
Modified: aac/aac.c
==============================================================================
--- aac/aac.c (original)
+++ aac/aac.c Sun Nov 11 14:44:44 2007
@@ -215,7 +215,7 @@ typedef struct {
int length[8][4];
int direction[8][4];
int order[8][4];
- float *tmp2_map;
+ float *tmp2_map[8];
int coef[8][4][TNS_MAX_ORDER];
} tns_struct;
@@ -1079,7 +1079,7 @@ static void tns_data(AACContext * ac, Ge
assert(coef_res == 3 || coef_res == 4);
coef_compress = get_bits1(gb);
coef_len = coef_res - coef_compress;
- tns->tmp2_map = tns_tmp2_map[(coef_compress << 1) + (coef_res - 3)];
+ tns->tmp2_map[w] = 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);
}
@@ -1598,7 +1598,7 @@ static void tns_filter_tool(AACContext *
// tns_decode_coef
lpc[0] = 1;
for (m = 1; m <= order; m++) {
- lpc[m] = tns->tmp2_map[tns->coef[w][filt][m - 1]];
+ lpc[m] = tns->tmp2_map[w][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++)
@@ -1614,6 +1614,7 @@ static void tns_filter_tool(AACContext *
} else {
inc = 1;
}
+ start += w * 128;
// ar filter
memset(b, 0, sizeof(b));
More information about the FFmpeg-soc
mailing list