diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-04 23:22:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-15 16:00:31 +0100 |
commit | d7a13ff23b5ea698e97f6c432349d3eb8b860e14 (patch) | |
tree | 407c414fc217cd53cb7ff022cdec1a90c0df2396 | |
parent | b65c06ee5efefe96f1dccf65c68174099ba26d7a (diff) | |
download | ffmpeg-d7a13ff23b5ea698e97f6c432349d3eb8b860e14.tar.gz |
swscale/utils: Use normal bilinear scaler if fast cannot be used due to tiny dimensions
Fixes Ticket4960
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1edf129cbc897447a289ca8b045853df5df1bab3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libswscale/utils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index cc6402d4c8..66bce60c13 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1071,6 +1071,12 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, srcW, srcH, dstW, dstH); return AVERROR(EINVAL); } + if (flags & SWS_FAST_BILINEAR) { + if (srcW < 8 || dstW < 8) { + flags ^= SWS_FAST_BILINEAR | SWS_BILINEAR; + c->flags = flags; + } + } if (!dstFilter) dstFilter = &dummyFilter; |