diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-29 09:39:43 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-06-29 09:45:52 -0700 |
commit | ef1ee362b36893cd1cc1e9c7de378e9cb239b0e8 (patch) | |
tree | 22cef8fbcaf058673d151ca32ad157c2445d6d95 /libswscale/ppc | |
parent | f68069868bd17a46f2dd80f87b712845f2fcfa56 (diff) | |
download | ffmpeg-ef1ee362b36893cd1cc1e9c7de378e9cb239b0e8.tar.gz |
swscale: implement >8bit scaling support.
This means that precision is retained when scaling between sample
formats with >8 bits per component (48bit RGB, 16bit grayscale,
9/10/16bit YUV).
Diffstat (limited to 'libswscale/ppc')
-rw-r--r-- | libswscale/ppc/swscale_altivec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libswscale/ppc/swscale_altivec.c b/libswscale/ppc/swscale_altivec.c index 396b00ccc6..6fb3de0ee7 100644 --- a/libswscale/ppc/swscale_altivec.c +++ b/libswscale/ppc/swscale_altivec.c @@ -406,7 +406,9 @@ void ff_sws_init_swScale_altivec(SwsContext *c) if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return; - c->hScale = hScale_altivec_real; + if (c->scalingBpp == 8) { + c->hScale = hScale_altivec_real; + } if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) && dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 && !c->alpPixBuf) { |