[FFmpeg-devel] [PATCH 08/10] lavc/libopenh264enc: add profile high option support

Fu, Linjie linjie.fu at intel.com
Fri Apr 10 17:01:53 EEST 2020


> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Anton Khirnov
> Sent: Friday, April 10, 2020 18:57
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 08/10] lavc/libopenh264enc: add profile
> high option support
> 
> Quoting Linjie Fu (2020-04-06 13:14:51)
> > Add support for PRO_HIGH/PRO_BASELINE in SVC Encoding extention
> mode,
> > which determined by iEntropyCodingModeFlag in ParamTranscode().
> >
> >
> <https://github.com/cisco/openh264/blob/master/codec/encoder/core/inc/
> param_svc.h#L394>
> >
> > Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> > ---
> >  libavcodec/libopenh264enc.c | 32 ++++++++++++++++++++++++++------
> >  1 file changed, 26 insertions(+), 6 deletions(-)
> >
> > diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
> > index f02c5fd..d331cfd 100644
> > --- a/libavcodec/libopenh264enc.c
> > +++ b/libavcodec/libopenh264enc.c
> > @@ -42,7 +42,7 @@ typedef struct SVCContext {
> >      ISVCEncoder *encoder;
> >      int slice_mode;                 // deprecated
> >      int loopfilter;
> > -    char *profile;
> > +    int profile;
> 
> Wouldn't it be better to deprecate the encoder-private option and use
> only the AVCodecContext one?
> 

If I got it correctly, the general "profile" option in libavcodec/options_table.h
needs values of type INT like FF_PROFILE_H264_HIGH = 100;

It also works for encoders with "-profile:v 100" to encode a bitstream with profile
HIGH, however maybe not straight forward enough. And it seems to be one of the
reasons that many encoders have a private option with AV_OPT_TYPE_STRING type.

- Linjie


More information about the ffmpeg-devel mailing list