[FFmpeg-devel] [Fwd: Summer of code small task patch]
Michael Niedermayer
michaelni
Sun Mar 29 23:41:14 CEST 2009
On Sun, Mar 29, 2009 at 11:22:24PM +0200, Dylan Yudaken wrote:
> Michael Niedermayer wrote:
>> On Sun, Mar 29, 2009 at 05:19:43PM +0200, Dylan Yudaken wrote:
>>
>>> 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.
>>>
>>
>> for example:
>> first patch you replace the dct but leave the function names
>> second patch you rename the functions
>>
> OK, I have done this (sort of). I attached 3 files.
> to use:
> 1: apply fdctLicenceChange.patch
> 2: apply fdctRename.patch1
> 3: put the attached dctref.c in and remove fdctref.c . I couldnt figure out
> how to generate a patch to do this.
>
> 1 is the straight replacement while 2 & 3 are the renaming.
>>
>>> + for (j = 0; j < 8; ++j) {
>>> + coefficients[j] = 1;
>>> + }
>>> + for (i = 8; i < 64; i+=8) {
>>> + for (j = 0; j < 8; ++j) {
>>> + coefficients[i + j] = M_SQRT2 * cos(i * (j+0.5) * (M_PI /
>>> 64.0));
>>> + }
>>> + }
>>> +
>>>
>>
>> the loops can be merged
>>
> I think its better as is. If it was merged it would need a conditional
> statement to separate the loops, so it would be the same speed but just a
> little less neat.
> If you think otherwise I'll do it.
i dont think it would need a conditional statement and +-1% speed does
not matter for such fast init code
[...]
> Index: libavcodec/fdctref.c
> ===================================================================
> --- libavcodec/fdctref.c (revision 18226)
> +++ libavcodec/fdctref.c (working copy)
> @@ -1,157 +1,128 @@
> -/**
> - * @file libavcodec/fdctref.c
> - * forward discrete cosine transform, double precision.
> - */
> -
> -/* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */
> -
> /*
> - * Disclaimer of Warranty
> + * Reference discrete cosine transform (double-precision)
> + * Copyright (C) 2009 Dylan Yudaken
the patch should remove the old file and add the new file, it should not
be a (unreadable) diff betweem 2 different implementations
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090329/1b40b208/attachment.pgp>
More information about the ffmpeg-devel
mailing list