diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-04 23:22:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-01-31 00:25:20 +0100 |
commit | 7ea0e525edc11fa87ed7ada15f0188b18f3da4a2 (patch) | |
tree | 3c506025e96c3633c6e4e2ff951832e4fcf57d4d | |
parent | 0affd64b1c217215ee31405c7115833326701e49 (diff) | |
download | ffmpeg-7ea0e525edc11fa87ed7ada15f0188b18f3da4a2.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 64958044ab..09310b4a9f 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1056,6 +1056,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; |