diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-15 14:13:55 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-12-16 02:24:13 +0100 |
commit | bd339d4882851ca0d8ffdcb7f12785e89bf6092e (patch) | |
tree | d6cd4d5efc88c09e0c3131a5768967ea18fe3d14 | |
parent | 9de71b0eb2d214323e87fa6cdba1da434bdde69f (diff) | |
download | ffmpeg-bd339d4882851ca0d8ffdcb7f12785e89bf6092e.tar.gz |
swscale/utils: check chroma width for fast bilinear scaler
Fixes artifacts where fast bilinear was used for downscaling chroma
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 037fc3b054b10aee0f11fdbe835e5dffa8e95b37)
-rw-r--r-- | libswscale/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index c87cbf5848..ee136ac830 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1269,8 +1269,9 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, if (INLINE_MMXEXT(cpu_flags) && c->srcBpc == 8 && c->dstBpc <= 14) { c->canMMXEXTBeUsed = dstW >= srcW && (dstW & 31) == 0 && + c->chrDstW >= c->chrSrcW && (srcW & 15) == 0; - if (!c->canMMXEXTBeUsed && dstW >= srcW && (srcW & 15) == 0 + if (!c->canMMXEXTBeUsed && dstW >= srcW && c->chrDstW >= c->chrSrcW && (srcW & 15) == 0 && (flags & SWS_FAST_BILINEAR)) { if (flags & SWS_PRINT_INFO) |