diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-04 23:22:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-04 23:54:11 +0100 |
commit | 1edf129cbc897447a289ca8b045853df5df1bab3 (patch) | |
tree | fe6973175af58a546ff1159b4e2567d62ed9161f | |
parent | 9434ec5f767cfb71c1179f3e118fc38b6d33699e (diff) | |
download | ffmpeg-1edf129cbc897447a289ca8b045853df5df1bab3.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>
-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 e5593af4dd..1875a54772 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1202,6 +1202,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; |