aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-01-04 23:22:25 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-15 16:00:31 +0100
commitd7a13ff23b5ea698e97f6c432349d3eb8b860e14 (patch)
tree407c414fc217cd53cb7ff022cdec1a90c0df2396
parentb65c06ee5efefe96f1dccf65c68174099ba26d7a (diff)
downloadffmpeg-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.c6
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;