[FFmpeg-devel] [PATCH] avcodec/libx265.c - Add named option to set profile

Bang He hezhanbang at gmail.com
Wed Dec 6 02:28:16 EET 2017


can it list profiles and levels?

On Wed, Dec 6, 2017 at 6:38 AM, Lou Logan <lou at lrcd.com> wrote:

> On Tue, 5 Dec 2017 19:46:09 +0530
> Gyan Doshi <gyandoshi at gmail.com> wrote:
>
> > From 13ad80871978fe7e5837863e0e2f7b7d6b356155 Mon Sep 17 00:00:00 2001
> > From: Gyan Doshi <gyandoshi at gmail.com>
> > Date: Tue, 5 Dec 2017 13:17:53 +0530
> > Subject: [PATCH] avcodec/libx265 - Add named option to set profile
> >
> > Adds call to x265_param_apply_profile after x265_param_parse.
> > Added as private option since HEVC profiles other than
> > Main, Main 10 and MSP in AVCodecContext are consolidated in a single
> > constant.
> > ---
> >  libavcodec/libx265.c | 9 +++++++++
> >  libavcodec/version.h | 2 +-
> >  2 files changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
> > index 4456e300f2..4058deac1c 100644
> > --- a/libavcodec/libx265.c
> > +++ b/libavcodec/libx265.c
> > @@ -45,6 +45,7 @@ typedef struct libx265Context {
> >      int   forced_idr;
> >      char *preset;
> >      char *tune;
> > +    char *profile;
> >      char *x265_opts;
> >  } libx265Context;
> >
> > @@ -220,6 +221,13 @@ static av_cold int libx265_encode_init(AVCodecContext
> *avctx)
> >          }
> >      }
> >
> > +    if (ctx->profile) {
> > +        if (ctx->api->param_apply_profile(ctx->params, ctx->profile) <
> 0) {
> > +            av_log(avctx, AV_LOG_ERROR, "Invalid or incompatible
> profile set : %s.\n", ctx->profile);
>
> Nit: change "set :" to "set:".
>
> Would it be possible to list the profiles with x265_profile_names
> similar to what is done for libx264?
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list