[FFmpeg-cvslog] swscale/utils: scale filter_size in warning so that it can be used as max for the compile time define

Michael Niedermayer git at videolan.org
Wed Apr 9 02:03:21 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr  9 00:54:54 2014 +0200| [1752b1459d09d822e2765497416c7dd66e6a875b] | committer: Michael Niedermayer

swscale/utils: scale filter_size in warning so that it can be used as max for the compile time define

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1752b1459d09d822e2765497416c7dd66e6a875b
---

 libswscale/utils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 20c2d4e..7680dbf 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -581,7 +581,8 @@ static av_cold int initFilter(int16_t **outFilter, int32_t **filterPos,
         goto fail;
     if (filterSize >= MAX_FILTER_SIZE * 16 /
                       ((flags & SWS_ACCURATE_RND) ? APCK_SIZE : 16)) {
-        av_log(NULL, AV_LOG_ERROR, "sws: filterSize %d is too large, try less extreme scaling or increase MAX_FILTER_SIZE and recompile\n", filterSize);
+        av_log(NULL, AV_LOG_ERROR, "sws: filterSize %d is too large, try less extreme scaling or increase MAX_FILTER_SIZE and recompile\n",
+               FF_CEIL_RSHIFT((filterSize+1) * ((flags & SWS_ACCURATE_RND) ? APCK_SIZE : 16), 4));
         goto fail;
     }
     *outFilterSize = filterSize;



More information about the ffmpeg-cvslog mailing list