[FFmpeg-devel] [PATCH] 1D DCT for dsputil

Vitor Sessak vitor1001
Tue Jan 19 05:49:03 CET 2010


Vitor Sessak wrote:
> Loren Merritt wrote:
>> On Mon, 18 Jan 2010, Vitor Sessak wrote:
>>
>>> + data[i    ] =   COS(s,n,i) * val1 + SIN(s,n,i) * val2;
>>> + data[i + 1] =   SIN(s,n,i) * val1 - COS(s,n,i) * val2;
>>
>> data aliases costab, so the SIN/COS loads will be duplicated.
> 
> Done.
> 
>>> + float tmp1 = data[i        ] * (1./n);
>>> + float tmp2 = data[n - i - 1] * (1./n);
>>> + float sin1 = 0.5/SIN(s,n,2*i+1);
>>
>> division?
> 
> I don't see how it is avoidable, I've tried a LUT and it is slower.

I made a stupid mistake that was getting the benchmarks wrong. Actually 
a LUT is faster. New patch attached.

[...]

> Fixed.
> 
> New version attached with the above changes, indentation nits and added 
> myself to the copyright.

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dct3.diff
Type: text/x-patch
Size: 9867 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100118/c633f224/attachment.bin>



More information about the ffmpeg-devel mailing list