diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-27 16:26:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-27 16:29:24 +0200 |
commit | 7de21960292c15e544807f09d1bfc9935a88e5ce (patch) | |
tree | 7c41368ed0a7a1102c8fae639a9c901877f3efff /libswscale/utils.c | |
parent | 95760b33e7a4fb06686922e93e8c6b5730e85d3f (diff) | |
download | ffmpeg-streaming-7de21960292c15e544807f09d1bfc9935a88e5ce.zip ffmpeg-streaming-7de21960292c15e544807f09d1bfc9935a88e5ce.tar.gz |
sws: fix extreem downscaling
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index 81da98d..2fa1c13 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -230,7 +230,7 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, int minFilterSize; int64_t *filter = NULL; int64_t *filter2 = NULL; - const int64_t fone = 1LL << 54; + const int64_t fone = 1LL << (54 - FFMIN(av_log2(srcW/dstW), 8)); int ret = -1; emms_c(); // FIXME should not be required but IS (even for non-MMX versions) @@ -356,7 +356,7 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, (-12 * B - 48 * C) * d + (8 * B + 24 * C) * (1 << 30); } - coeff *= fone >> (30 + 24); + coeff /= (1LL<<54)/fone; } #if 0 else if (flags & SWS_X) { |