[FFmpeg-soc] [soc]: r3035 - eac3/eac3dec.c
jbr
subversion at mplayerhq.hu
Tue Aug 5 05:33:34 CEST 2008
Author: jbr
Date: Tue Aug 5 05:33:33 2008
New Revision: 3035
Log:
use correct pre_mantissa array dimension order
Modified:
eac3/eac3dec.c
Modified: eac3/eac3dec.c
==============================================================================
--- eac3/eac3dec.c (original)
+++ eac3/eac3dec.c Tue Aug 5 05:33:33 2008
@@ -79,13 +79,13 @@ void ff_eac3_get_transform_coeffs_aht_ch
if (!hebap) {
/* zero-mantissa dithering */
for (blk = 0; blk < 6; blk++) {
- s->pre_mantissa[blk][ch][bin] = (av_random(&s->dith_state) & 0x7FFFFF) - 0x400000;
+ s->pre_mantissa[ch][bin][blk] = (av_random(&s->dith_state) & 0x7FFFFF) - 0x400000;
}
} else if (hebap < 8) {
/* Vector Quantization */
int v = get_bits(gbc, bits);
for (blk = 0; blk < 6; blk++) {
- s->pre_mantissa[blk][ch][bin] = ff_eac3_vq_hebap[hebap][v][blk] << 8;
+ s->pre_mantissa[ch][bin][blk] = ff_eac3_vq_hebap[hebap][v][blk] << 8;
}
} else {
/* Gain Adaptive Quantization */
@@ -117,7 +117,7 @@ void ff_eac3_get_transform_coeffs_aht_ch
mant += ((int64_t)ff_eac3_gaq_remap_1[hebap-8] * mant) >> 15;
}
}
- s->pre_mantissa[blk][ch][bin] = mant;
+ s->pre_mantissa[ch][bin][blk] = mant;
}
}
}
@@ -128,9 +128,9 @@ void ff_eac3_idct_transform_coeffs_ch(AC
int bin, i;
int64_t tmp;
for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
- tmp = s->pre_mantissa[0][ch][bin];
+ tmp = s->pre_mantissa[ch][bin][0];
for (i = 1; i < 6; i++) {
- tmp += ((int64_t)idct_cos_tab[blk][i-1] * (int64_t)s->pre_mantissa[i][ch][bin]) >> 23;
+ tmp += ((int64_t)idct_cos_tab[blk][i-1] * (int64_t)s->pre_mantissa[ch][bin][i]) >> 23;
}
s->fixed_coeffs[ch][bin] = tmp >> s->dexps[ch][bin];
}
More information about the FFmpeg-soc
mailing list