swscale/utils: scale filter_size in warning so that it can be used as max for the...
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Apr 2014 22:54:54 +0000 (00:54 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 8 Apr 2014 22:57:12 +0000 (00:57 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswscale/utils.c

index 20c2d4e..7680dbf 100644 (file)
@@ -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)) {
         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;
         goto fail;
     }
     *outFilterSize = filterSize;