[FFmpeg-devel] [Fwd: Summer of code small task patch]

Dylan Yudaken dyudaken
Sun Mar 29 17:19:43 CEST 2009


Michael Niedermayer wrote:
> renaming things should be a seperate patch
> actually a patch should either do functional changes or non functional not
> both
>
>   
I wasnt sure what exactly to do here or if the conversation reached a 
conclusion. I have included a full patch but if you need it split I 
guess I can go and do that - not 100% sure how though.
>> +    double c0  = sqrt(0.125);
>> +
>> +    for (j = 0; j < 8; ++j) {
>> +        coefficients[i * 8 + j] = c0 * cos(i * (j + 0.5) * (M_PI / 8.0));
>> +    }
>> +    for (i = 1; i < 8; ++i) {
>> +        for (j = 0; j < 8; ++j) {
>> +            coefficients[i * 8 + j] = 0.5 * cos((i * (j + 0.5)) * (M_PI / 8.0));
>> +        }
>> +    }
>>     
>
> this can be simplified
>
>   
I simplified it quite a bit. The main problem was M_SQRT2 was undefined 
and it isnt in libavutil/mathematics.h. I added my own #define to the 
top but Im not sure if this is ok. let me know the preferred way to do 
it, or I can add a define to the mathemtics.h file.

otherwise I have implemented the other changes (attached)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dctfullpatch.diff
Type: text/x-patch
Size: 15342 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090329/b24a5b0a/attachment.bin>



More information about the ffmpeg-devel mailing list