# HG changeset patch # User kostya # Date 1234629459 0 # Node ID 6cdce79a0b9a2de78be46a0732fd4227b0dd5853 # Parent b1f68e0d1a398973a1b80252304e241ef0af62b5 Some AltiVec functions in SwScaler produce different output than their counterparts in pure C, so don't invoke them in bitexact mode. diff -r b1f68e0d1a39 -r 6cdce79a0b9a libswscale/swscale.c --- a/libswscale/swscale.c Sat Feb 14 13:06:52 2009 +0000 +++ b/libswscale/swscale.c Sat Feb 14 16:37:39 2009 +0000 @@ -2396,6 +2396,7 @@ #ifdef COMPILE_ALTIVEC if ((c->flags & SWS_CPU_CAPS_ALTIVEC) && + !(c->flags & SWS_BITEXACT) && srcFormat == PIX_FMT_YUV420P) { // unscaled YV12 -> packed YUV, we want speed if (dstFormat == PIX_FMT_YUYV422) diff -r b1f68e0d1a39 -r 6cdce79a0b9a libswscale/swscale_template.c --- a/libswscale/swscale_template.c Sat Feb 14 13:06:52 2009 +0000 +++ b/libswscale/swscale_template.c Sat Feb 14 16:37:39 2009 +0000 @@ -1136,9 +1136,10 @@ #if HAVE_ALTIVEC /* The following list of supported dstFormat values should match what's found in the body of altivec_yuv2packedX() */ - if (c->dstFormat==PIX_FMT_ABGR || c->dstFormat==PIX_FMT_BGRA || + if (!(c->flags & SWS_BITEXACT) && + (c->dstFormat==PIX_FMT_ABGR || c->dstFormat==PIX_FMT_BGRA || c->dstFormat==PIX_FMT_BGR24 || c->dstFormat==PIX_FMT_RGB24 || - c->dstFormat==PIX_FMT_RGBA || c->dstFormat==PIX_FMT_ARGB) + c->dstFormat==PIX_FMT_RGBA || c->dstFormat==PIX_FMT_ARGB)) altivec_yuv2packedX (c, lumFilter, lumSrc, lumFilterSize, chrFilter, chrSrc, chrFilterSize, dest, dstW, dstY);