[FFmpeg-devel] [PATCH 10/10] lavc/libopenh264enc: replace cabac option with coder

Anton Khirnov anton at khirnov.net
Fri Apr 10 13:59:30 EEST 2020


Quoting Linjie Fu (2020-04-06 13:14:53)
> Change the default option to -1 and allow the default cabac to be
> decided by profile.
> 
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> ---
>  libavcodec/libopenh264enc.c | 27 ++++++++++++++++-----------
>  1 file changed, 16 insertions(+), 11 deletions(-)
> 
> diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
> index 70ded55..94faeef 100644
> --- a/libavcodec/libopenh264enc.c
> +++ b/libavcodec/libopenh264enc.c
> @@ -46,7 +46,7 @@ typedef struct SVCContext {
>      int max_nal_size;
>      int skip_frames;
>      int skipped;
> -    int cabac;
> +    int coder;
>  
>      // rate control mode
>      int rc_mode;
> @@ -78,7 +78,12 @@ static const AVOption options[] = {
>  #undef PROFILE
>      { "max_nal_size", "set maximum NAL size in bytes", OFFSET(max_nal_size), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
>      { "allow_skip_frames", "allow skipping frames to hit the target bitrate", OFFSET(skip_frames), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
> -    { "cabac", "Enable cabac", OFFSET(cabac), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE },
> +    { "coder", "Coder type",  OFFSET(coder), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE, "coder" },

I think it's expected that options won't just randomly disappear. So the
old one should be deprecated and kept around for a while.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list