[FFmpeg-devel] [RFC] Alpha support

Michael Niedermayer michaelni
Sat Jan 24 16:46:26 CET 2009


On Mon, Jan 19, 2009 at 11:03:08PM +0100, C?dric Schieli wrote:
> Hello,
> 
> 
> Attached patches should address all raised issues, except for the use of the
> ebp register which need more work.
> Duplicated C macros got merged into original ones, duplicated asm macros got
> factorized and endianess is (hopefully) handled correctly.

[...]
> Index: ffmpeg/libswscale/swscale.c
> ===================================================================
> --- ffmpeg.orig/libswscale/swscale.c	2009-01-19 14:17:04.269584856 +0100
> +++ ffmpeg/libswscale/swscale.c	2009-01-19 16:36:02.001650104 +0100
> @@ -554,6 +554,8 @@
>          int Y2 = 1<<18;\
>          int U  = 1<<18;\
>          int V  = 1<<18;\
> +        int A1 = 1<<18;\
> +        int A2 = 1<<18;\
>          type av_unused *r, *b, *g;\
>          const int i2= 2*i;\
>          \
> @@ -567,14 +569,22 @@
>              U += chrSrc[j][i] * chrFilter[j];\
>              V += chrSrc[j][i+VOFW] * chrFilter[j];\
>          }\
> +        if (c->alpPixBuf)\
> +            for (j=0; j<lumFilterSize; j++)\
> +            {\
> +                A1 += alpSrc[j][i2  ] * lumFilter[j];\
> +                A2 += alpSrc[j][i2+1] * lumFilter[j];\
> +            }\
>          Y1>>=19;\
>          Y2>>=19;\
>          U >>=19;\
>          V >>=19;\
> +        A1>>=19;\
> +        A2>>=19;\

all writes to A1/2 should be under the if() and the if should be
0 or 1 after preprocessing so the compiler can remove it
similar for the others, no extra code should be in the final binary
in the innermost loops
where this is unavoidable the loop should be benchmarked with START/STOP_TIMER


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- 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/20090124/620c3f61/attachment.pgp>



More information about the ffmpeg-devel mailing list