summaryrefslogtreecommitdiff
path: root/libswscale/ppc
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-06-05 21:15:44 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2011-06-07 10:03:12 -0400
commitbda9b20fa49975c6b9c39308818e7773eb78b411 (patch)
tree50c579e90fefd6b28ae13c4028983e8fb1c8bcc5 /libswscale/ppc
parentb9478cfefb408ae1d476555b46893005e2d3bf4c (diff)
swscale: un-special-case yuv2yuvX16_c().
Make yuv2yuvX16_c a function pointer for yuv2yuvX(), so that the function pointer becomes bitdepth-independent.
Diffstat (limited to 'libswscale/ppc')
-rw-r--r--libswscale/ppc/swscale_altivec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c
index 7f4dfcd6f1..423297a8f0 100644
--- a/libswscale/ppc/swscale_altivec.c
+++ b/libswscale/ppc/swscale_altivec.c
@@ -403,11 +403,15 @@ static void hScale_altivec_real(int16_t *dst, int dstW,
void ff_sws_init_swScale_altivec(SwsContext *c)
{
+ enum PixelFormat dstFormat = c->dstFormat;
+
if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC))
return;
c->hScale = hScale_altivec_real;
- c->yuv2yuvX = yuv2yuvX_altivec_real;
+ if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat)) {
+ c->yuv2yuvX = yuv2yuvX_altivec_real;
+ }
/* The following list of supported dstFormat values should
* match what's found in the body of ff_yuv2packedX_altivec() */