[FFmpeg-devel] [Fwd: Summer of code small task patch]
Michael Niedermayer
michaelni
Tue Mar 31 03:53:02 CEST 2009
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
[...]
> + /* 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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20090331/8e47e365/attachment.pgp>
More information about the ffmpeg-devel
mailing list