Commit 1edf129c authored by Michael Niedermayer's avatar Michael Niedermayer

swscale/utils: Use normal bilinear scaler if fast cannot be used due to tiny dimensions

Fixes Ticket4960
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9434ec5f
...@@ -1202,6 +1202,12 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, ...@@ -1202,6 +1202,12 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
srcW, srcH, dstW, dstH); srcW, srcH, dstW, dstH);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
if (flags & SWS_FAST_BILINEAR) {
if (srcW < 8 || dstW < 8) {
flags ^= SWS_FAST_BILINEAR | SWS_BILINEAR;
c->flags = flags;
}
}
if (!dstFilter) if (!dstFilter)
dstFilter = &dummyFilter; dstFilter = &dummyFilter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment