[FFmpeg-devel] MMX optimized functions in yuv2rgb_template.c ignore trailing pixels for non-aligned destination width

Michael Niedermayer michaelni
Mon Apr 27 01:45:53 CEST 2009


On Sat, Apr 18, 2009 at 03:46:37PM +0200, C?dric Schieli wrote:
> > sws_yuv2rgb_mmx_unaligned.patch :
> > use C functions for trailing pixels (per slice)
[...]
> Index: ffmpeg/libswscale/x86/yuv2rgb_template.c
> ===================================================================
> --- ffmpeg.orig/libswscale/x86/yuv2rgb_template.c	2009-04-18 14:51:15.895954010 +0200
> +++ ffmpeg/libswscale/x86/yuv2rgb_template.c	2009-04-18 15:30:48.587923451 +0200
> @@ -173,8 +173,11 @@
>          : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), "r" (py - 2*index), "r" (pa - 2*index) \
>          ); \
>  
> -#define YUV2RGB_TRAIL \
> +#define YUV2RGB_TRAIL(func_name, dst_type, depth) \
>      } \
> +    if (h_size < c->dstW)\
> +        for (y= 0; y<srcSliceH; y+=2 )\
> +            func_name ## _row(c, src, srcStride, srcSliceY, srcSliceH, (dst_type *)(dst[0]+(y+srcSliceY)*dstStride[0]+h_size*depth), (dst_type *)(dst[0]+(y+srcSliceY+1)*dstStride[0]+h_size*depth), h_size, y);\
>      __asm__ volatile (EMMS); \
>      return srcSliceH; \
>  

too much on a single line


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

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- 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/20090427/be975d0c/attachment.pgp>



More information about the ffmpeg-devel mailing list