From 28c1115a915e4e198bfb6bd39909b2d1327c1454 Mon Sep 17 00:00:00 2001
From: "Ronald S. Bultje" <rsbultje@gmail.com>
Date: Tue, 2 Aug 2011 15:42:35 -0700
Subject: swscale: use 15-bit intermediates for 9/10-bit scaling.

---
 libswscale/ppc/swscale_altivec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'libswscale/ppc')

diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c
index 369e93b85a..f988b534ac 100644
--- a/libswscale/ppc/swscale_altivec.c
+++ b/libswscale/ppc/swscale_altivec.c
@@ -406,7 +406,7 @@ void ff_sws_init_swScale_altivec(SwsContext *c)
     if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC))
         return;
 
-    if (c->scalingBpp == 8) {
+    if (c->srcBpc == 8 && c->dstBpc <= 10) {
         c->hScale       = hScale_altivec_real;
     }
     if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) &&
-- 
cgit v1.2.3