[FFmpeg-devel] [PATCH] add E-AC-3 support to AC-3 decoder
Justin Ruggles
justinruggles
Sat Jul 12 19:12:41 CEST 2008
Hi,
Michael Niedermayer wrote:
> On Sat, Jun 07, 2008 at 10:30:31AM -0400, Justin Ruggles wrote:
>> + for (i = 1; i < 6; i++) {
>> + tmp += ((int64_t)idct_cos_tab[blk][i-1] * (int64_t)s->pre_mantissa[i][ch][bin]) >> 23;
>> + }
>> + s->fixed_coeffs[ch][bin] = tmp >> s->dexps[ch][bin];
>> + }
>> +}
>
> there are symmetries in the idct, this brute force solution is a little
> umm ...
The only solution I could come up with which takes advantage of some
symmetry is still brute-force for the first 3 blocks, but essentially
just copies the data with a sign flip for odd index values in the second
3 blocks. This increases the speed of the function by 40% and overall
E-AC3 decoding by 7% when AHT is used. Is that adequate?
>> + // initialize ungrouping table for 1.67-bit GAQ gain codes
>> + for(i=0; i<32; i++) {
>> + gaq_ungroup_tab[i][0] = i / 9;
>> + gaq_ungroup_tab[i][1] = (i % 9) / 3;
>> + gaq_ungroup_tab[i][2] = i % 3;
>> + }
>
> i guess theres no way to factorize this and b1_mantissas related code without
> loosing speed?
Only way I can see is to hard-code the table in ac3dec_data.c and reuse
it to init the b1_mantissas table.
-Justin
More information about the ffmpeg-devel
mailing list