[FFmpeg-cvslog] swscale/utils: check chroma width for fast bilinear scaler
Michael Niedermayer
git at videolan.org
Mon Dec 16 02:26:57 CET 2013
ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 15 14:13:55 2013 +0100| [af7cbdf470e4fe9ce5da744b41196dcf15dc4e23] | committer: Carl Eugen Hoyos
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 at gmx.at>
(cherry picked from commit 037fc3b054b10aee0f11fdbe835e5dffa8e95b37)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af7cbdf470e4fe9ce5da744b41196dcf15dc4e23
---
libswscale/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 1c15464..69ae7d8 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1108,8 +1108,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)
More information about the ffmpeg-cvslog
mailing list