Mercurial > mplayer.hg
diff postproc/swscale.c @ 12768:931eee818c52
Altivec unscaled YV12 -> packed YUV patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
author | michael |
---|---|
date | Tue, 06 Jul 2004 13:52:56 +0000 |
parents | d2aef091743c |
children | 1d6892e87a2c |
line wrap: on
line diff
--- a/postproc/swscale.c Tue Jul 06 13:46:11 2004 +0000 +++ b/postproc/swscale.c Tue Jul 06 13:52:56 2004 +0000 @@ -1909,6 +1909,18 @@ } } +#ifdef HAVE_ALTIVEC + if ((c->flags & SWS_CPU_CAPS_ALTIVEC) && + ((srcFormat == IMGFMT_YV12 && + (dstFormat == IMGFMT_YUY2 || dstFormat == IMGFMT_UYVY)))) { + // unscaled YV12 -> packed YUV, we want speed + if (dstFormat == IMGFMT_YUY2) + c->swScale= yv12toyuy2_unscaled_altivec; + else + c->swScale= yv12touyvy_unscaled_altivec; + } +#endif + /* simple copy */ if( srcFormat == dstFormat || (isPlanarYUV(srcFormat) && isGray(dstFormat))