aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-15 14:13:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-15 14:13:55 +0100
commit037fc3b054b10aee0f11fdbe835e5dffa8e95b37 (patch)
tree8849af6df884093e80845d06a063e4603a9a5c46 /libswscale/utils.c
parent554e913fd7acc9da02ddac2c5ce9487f7f633c92 (diff)
downloadffmpeg-037fc3b054b10aee0f11fdbe835e5dffa8e95b37.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>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index baf2c591ca..80c789fef8 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1342,8 +1342,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)