PPC: swscale: disable altivec functions for unsupported formats
authorMans Rullgard <mans@mansr.com>
Tue, 28 Jun 2011 22:19:36 +0000 (23:19 +0100)
committerMans Rullgard <mans@mansr.com>
Tue, 28 Jun 2011 22:22:31 +0000 (23:22 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libswscale/ppc/swscale_altivec.c

index 14f35b6..396b00c 100644 (file)
@@ -407,7 +407,9 @@ void ff_sws_init_swScale_altivec(SwsContext *c)
         return;
 
     c->hScale       = hScale_altivec_real;
-    if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat)) {
+    if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
+        dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 &&
+        !c->alpPixBuf) {
         c->yuv2yuvX     = yuv2yuvX_altivec_real;
     }