diff options
author | Romain Dolbeau <dolbeau@irisa.fr> | 2004-07-06 13:52:56 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-07-06 13:52:56 +0000 |
commit | b71cf33c9b9bb500f625a5710c563f4884d1a696 (patch) | |
tree | 2da89d383be51b47788e0f739cf7870d5cc098a1 /postproc/swscale.c | |
parent | 61b3b639e7f2b482719d543a20efde1e6035c6d7 (diff) | |
download | ffmpeg-b71cf33c9b9bb500f625a5710c563f4884d1a696.tar.gz |
Altivec unscaled YV12 -> packed YUV patch by (Romain Dolbeau <dolbeau at irisa dot fr>)
Originally committed as revision 12769 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale.c')
-rw-r--r-- | postproc/swscale.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c index 67a75a93af..891352121c 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -1909,6 +1909,18 @@ SwsContext *sws_getContext(int srcW, int srcH, int origSrcFormat, int dstW, int } } +#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)) |