[FFmpeg-devel] [PATCH] MPEG-4 Parametric Stereo decoder

Ronald S. Bultje rsbultje
Mon May 24 15:39:05 CEST 2010


Hi,

On Sat, May 22, 2010 at 12:31 PM, Alex Converse <alex.converse at gmail.com> wrote:
> On Fri, May 21, 2010 at 8:45 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> + ? ? ? ? ? ? ? ?HA[iid][icc][0] = c2 * cosf(beta + alpha);
>> + ? ? ? ? ? ? ? ?HA[iid][icc][1] = c1 * cosf(beta - alpha);
>> + ? ? ? ? ? ? ? ?HA[iid][icc][2] = c2 * sinf(beta + alpha);
>> + ? ? ? ? ? ? ? ?HA[iid][icc][3] = c1 * sinf(beta - alpha);
>>
>> Here, values for cosf(x-y) and cosf(x+y) can be calculated once
>> instead of twice. Should save 2 calls to math funcs.
>
> There seems to be a sinf and a cosf call once for each. Using trig
> identities we'd still need sin and cos for both. Either way that's
> still 4 calls? Or do you mean just precompute beta +/- alpha?

Oh yeah I wasn't paying attention, nevermind this one.

I'll see if I can understand the actual code itself in my next look at it. ;-).

Ronald



More information about the ffmpeg-devel mailing list