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

Clément Bœsch u at pkh.me
Wed Jun 11 19:18:27 CEST 2014


On Wed, Jun 11, 2014 at 06:10:40PM +0100, Derek Buitenhuis wrote:
> This can help "extreme" resizes, e.g with some 4k stuff.
> 
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
>  configure                     | 10 ++++++++++
>  libswscale/swscale_internal.h |  2 +-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index fa66c4f..4dabbb7 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=N  the max filter size swscale uses [$sws_max_filter_size_default]
>  
>  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
> @@ -2646,6 +2648,8 @@ enable safe_bitstream_reader
>  enable static
>  enable swscale_alpha
>  
> +sws_max_filter_size_default=256
> +

You should probably move that a bit above, around "default parameters"
(~L2590)

>  # Enable hwaccels by default.
>  enable dxva2 vaapi vda vdpau xvmc
>  enable xlib
> @@ -5459,6 +5463,12 @@ test -n "$assert_level" &&
>  test -n "$malloc_prefix" &&
>      echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH
>  
> +if test -n "$sws_max_filter_size"; then
> +    echo "#define SWS_MAX_FILTER_SIZE $sws_max_filter_size" >>$TMPH
> +else
> +    echo "#define SWS_MAX_FILTER_SIZE $sws_max_filter_size_default" >>$TMPH
> +fi

Is the indirection necessary if you "sws_max_filter_size=256" and let the
configure update it?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140611/879df473/attachment.asc>


More information about the ffmpeg-devel mailing list