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

Dylan Yudaken dyudaken
Tue Mar 31 08:52:30 CEST 2009



Michael Niedermayer wrote:
> On Mon, Mar 30, 2009 at 10:52:32PM +0200, Dylan Yudaken wrote:
>   
>> Michael Niedermayer wrote:
>>     
>>>> Also - in the earlier versions of my code the IDCT was wrong. I have 
>>>> fixed it now but it doesnt get the exact values of the previous versions. 
>>>> My version has a lower error^2 but a higher systematic error. I dont have 
>>>> much experience to tell if this trade off is acceptable.
>>>>     
>>>>         
>>> it would be nice if your code would produce the same values as the current
>>> ref in svn
>>>
>>>   
>>>       
>> does so now. it meant I had to take out that whole optimizing thing. most 
>> of the other comments were related to this so they are fixed.
>>     
>
> [...]
>
>   
>> --- a/libavcodec/Makefile
>> +++ b/libavcodec/Makefile
>> @@ -541,4 +541,4 @@ DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
>>  
>>  include $(SUBDIR)../subdir.mak
>>  
>> -$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)fdctref.o $(SUBDIR)aandcttab.o
>> +$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o $(SUBDIR)aandcttab.o
>>     
>
> functional change
>
>
>   
>> diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
>> index 0e27e1c..82e4137 100644
>> --- a/libavcodec/dct-test.c
>> +++ b/libavcodec/dct-test.c
>> @@ -46,9 +46,9 @@
>>  void *fast_memcpy(void *a, const void *b, size_t c){return memcpy(a,b,c);};
>>  
>>  /* reference fdct/idct */
>> -void fdct(DCTELEM *block);
>> -void idct(DCTELEM *block);
>> -void init_fdct(void);
>> +void ff_ref_fdct(DCTELEM *block);
>> +void ff_ref_idct(DCTELEM *block);
>> +void ff_ref_dct_init(void);
>>     
>
> cosmetic change
>
> please split these in 2 patches
>   
Sorry about this. Ive gotten quite confused over the course of all these 
emails as to what the two patches should have. pretty sure this is right
> [...]
>   
>> +    /* out = coefficients*block */
>> +    for (i = 0; i < 64; i+=8) {
>> +        for (j = 0; j < 8; ++j) {
>> +            double tmp = 0;
>> +            for (k = 0; k < 8; ++k) {
>> +                /* cast the block - dont want overruns */
>> +                tmp += coefficients[i + k] * ((int)block[k * 8 + j] * 8);
>> +            }
>> +            out[i + j] = tmp;
>> +        }
>> +    }
>>     
>
> the *8 can be factorized out
>   
I put it on line down (should have been there). It cant go into the 
coefficients matrix because that needs to stay as it is to not cause 
rounding errors in the IDCT.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-function-names-to-be-more-accurate.patch
Type: application/mbox
Size: 6638 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090331/b31fedca/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Create-new-reference-DCT-with-LGPL-licence.patch
Type: application/mbox
Size: 10471 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090331/b31fedca/attachment-0001.bin>



More information about the ffmpeg-devel mailing list