[FFmpeg-devel] [PATCH] swscale: Allow the max filter size to be set at compile time

Timothy Gu timothygu99 at gmail.com
Wed Jun 11 19:04:48 CEST 2014


On Wed, Jun 11, 2014 at 9:53 AM, Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
> This can help "extreme" resizes, e.g with some 4k stuff.
>
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
>  configure                     | 5 +++++
>  libswscale/swscale_internal.h | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index fa66c4f..de6477f 100755
> --- a/configure
> +++ b/configure
> @@ -314,6 +314,7 @@ Advanced options (experts only):
>                             (faster, but may crash)
>    --enable-memalign-hack   emulate memalign, interferes with memory debuggers
>    --enable-sram            allow use of on-chip SRAM
> +  --sws-max-filter-size    the max filter size swscale uses
>
>  Optimization options (experts only):
>    --disable-asm            disable all assembler optimizations
> @@ -1892,6 +1893,7 @@ CMDLINE_SET="
>      ranlib
>      samples
>      strip
> +    sws_max_filter_size
>      sysinclude
>      sysroot
>      target_exec
> @@ -5459,6 +5461,9 @@ test -n "$assert_level" &&
>  test -n "$malloc_prefix" &&
>      echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH
>
> +test -n "$sws_max_filter_size" &&
> +    echo "#define SWS_MAX_FILTER_SIZE $sws_max_filter_size" >>$TMPH
> +
>  if enabled yasm; then
>      append config_files $TMPASM
>      printf '' >$TMPASM
> diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
> index 42a17e5..8cf4317 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

You need a default value (see Michael's build failure)

Timothy


More information about the ffmpeg-devel mailing list