[Ffmpeg-devel] [PATCH] Altivec optimizations for snow

Luca Barbato lu_zero
Fri Mar 24 15:15:39 CET 2006


Michael Niedermayer wrote:
> 
> some functions look quite familiar, if they are the same, maybe add
> them to snow.h

Added

> 
>        #if ... 
> also might not be ok for all compilers though i would guess that its
> ok for all which accept altivec ...

rediffing the patches caused that, there is another h264 related patch
from me pending btw.

> 
> and dont forget to add yourself as snow-altivec maintainer into that
> MAINTAINERS file

ok, mind if I add myself as Linux/PowerPC mantainer while I'm at it?

> 
> except these i would say if regression tests pass its ok to apply

the ff_snow_vertical_compose97i_altivec seems to cause

-200844d5ab21358771303f660ea0a390 *./data/out.yuv
-stddev: 32.02 PSNR:18.01 bytes:7602176
+bc8dc6fe1bae64430b16ec1e1e139509 *./data/out.yuv
+stddev: 23.18 PSNR:20.82 bytes:7602176

Even if I use the reference C I used to produce the vector code (so
probably the C code has a bug) I'll check this evening.

If you have time.

    for(i= width-1; i >= 0; i--)
    {
        b4[i] -= (W_DM*(b3[i] + b5[i])+W_DO)>>W_DS;
        b3[i] -= (W_CM*(b2[i] + b4[i])+W_CO)>>W_CS;
        b2[i] += (W_BM*(b1[i] + b3[i])+4*b2[i]+W_BO)>>W_BS;
        b1[i] += (W_AM*(b0[i] + b2[i])+W_AO)>>W_AS;
    }

lu





More information about the ffmpeg-devel mailing list