[FFmpeg-devel] [PATCH] add E-AC-3 support to AC-3 decoder
Justin Ruggles
justinruggles
Mon Jul 14 01:46:35 CEST 2008
Michael Niedermayer wrote:
> On Sat, Jul 12, 2008 at 01:12:41PM -0400, Justin Ruggles wrote:
>> 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?
>
> The transformation matrix is:
>
> 1.000000 1.366025 1.224745 1.000000 0.707107 0.366025
> 1.000000 1.000000 0.000000 -1.000000 -1.414214 -1.000000
> 1.000000 0.366025 -1.224745 -1.000000 0.707107 1.366025
> 1.000000 -0.366025 -1.224745 1.000000 0.707107 -1.366025
> 1.000000 -1.000000 -0.000000 1.000000 -1.414214 1.000000
> 1.000000 -1.366025 1.224745 -1.000000 0.707107 -0.366025
>
> after one pass of butterflies thats just
> 1.000000 0.000000 1.224745 0.000000 0.707107 0.000000
> 1.000000 0.000000 -0.000000 0.000000 -1.414214 0.000000
> 1.000000 0.000000 -1.224745 0.000000 0.707107 0.000000
> 0.000000 0.366025 0.000000 -1.000000 0.000000 1.366025
> 0.000000 1.000000 0.000000 -1.000000 0.000000 -1.000000
> 0.000000 1.366025 0.000000 1.000000 0.000000 0.366025
>
> Even a lame brute force implementation of that should be more than 40%
> faster, that is due to the simple and repeated coefficients
This is my first time trying to break down a DCT. I found some basic
info on how to do it and made a flow chart in OpenOffice. This is the
forward transform. Now I need to figure out how to do the inverse. I
just wanted to post this to make sure I'm on the right path to figuring
out a good solution.
http://justin.ruggles.googlepages.com/dct6_diagram.pdf
Thanks,
Justin
More information about the ffmpeg-devel
mailing list