[FFmpeg-devel] [PATCH v3 5/9] lavc/libopenh264enc: set slice_mode option to deprecated

Anton Khirnov anton at khirnov.net
Tue Apr 14 14:10:34 EEST 2020


Quoting Linjie Fu (2020-04-11 12:03:35)
> "slice mode" seems to be unnecessary since it could be determined by
> -slices/max_nal_size.
> 
> default:        SM_FIXEDSLCNUM_SLICE mode with cpu-number slices.
> -slices N:      SM_FIXEDSLCNUM_SLICE mode with N slices.
> -max_nal_size:  SM_SIZELIMITED_SLICE mode with limited size slices.
> 
> Add OPENH264_API_SLICE_MODE to remove this option after
> LIBAVCODEC_VERSION_MAJOR = 59.
> 
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> ---
>  libavcodec/libopenh264enc.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
> index e556f03..3a642f0 100644
> --- a/libavcodec/libopenh264enc.c
> +++ b/libavcodec/libopenh264enc.c
> @@ -33,6 +33,10 @@
>  #include "internal.h"
>  #include "libopenh264.h"
>  
> +#ifndef OPENH264_API_SLICE_MODE
> +#define OPENH264_API_SLICE_MODE        (LIBAVCODEC_VERSION_MAJOR < 59)
> +#endif

This should be moved to libavcodec/version.h with an FF_ prefix, so that
it's not overlooked when we bump the version.

Otherwise looks ok

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list