From a4bd4733c0af333f2907f6be276b5094891903a0 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Wed, 11 Jun 2014 17:51:49 +0100 Subject: swscale: Allow the max filter size to be set at compile time This can help "extreme" resizes, e.g with some 4k stuff. Signed-off-by: Derek Buitenhuis --- libswscale/swscale_internal.h | 2 +- libswscale/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libswscale') diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 42a17e551a..8cf431733a 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -39,7 +39,7 @@ #define YUVRGB_TABLE_HEADROOM 128 -#define MAX_FILTER_SIZE 256 +#define MAX_FILTER_SIZE SWS_MAX_FILTER_SIZE #define DITHER1XBPP diff --git a/libswscale/utils.c b/libswscale/utils.c index 92b2ac4f26..7274153453 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -582,7 +582,7 @@ 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", + av_log(NULL, AV_LOG_ERROR, "sws: filterSize %d is too large, try less extreme scaling or set --sws-max-filter-size and recompile\n", FF_CEIL_RSHIFT((filterSize+1) * ((flags & SWS_ACCURATE_RND) ? APCK_SIZE : 16), 4)); goto fail; } -- cgit v1.2.3