[FFmpeg-devel] [PATCH, v4] lavc/qsvenc: add VDENC support for H264

Fu, Linjie linjie.fu at intel.com
Thu Nov 29 08:18:49 EET 2018


> -----Original Message-----
> From: Li, Zhong
> Sent: Thursday, November 29, 2018 12:36
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Cc: Fu, Linjie <linjie.fu at intel.com>
> Subject: RE: [FFmpeg-devel] [PATCH,v4] lavc/qsvenc: add VDENC support for
> H264
> 
> > From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On
> Behalf
> > Of Linjie Fu
> > Sent: Wednesday, November 28, 2018 12:45 PM
> > To: ffmpeg-devel at ffmpeg.org
> > Cc: Fu, Linjie <linjie.fu at intel.com>
> > Subject: [FFmpeg-devel] [PATCH,v4] lavc/qsvenc: add VDENC support for
> > H264
> >
> > Add VDENC(lowpower mode) support for QSV H264
> >
> > It's an experimental function(like lowpower in vaapi) with some limitations:
> > - CBR/VBR require HuC which should be explicitly loaded via i915 module
> > parameter(i915.enable_guc=2 for linux kernel version >= 4.16)
> >
> > Use option "-low_power 1" to enable VDENC.
> > Add in dump_video_param() to show the status of VDENC in runtime log.
> >
> > Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> > ---
> > [v2]: modified the commit message and option comments, use
> > AV_OPT_TYPE_BOOL to replace AV_OPT_TYPE_INT.
> > [v3]: enable H264 VDENC separately.
> > [v4]: Add in dump_video_param to show the status of VDENC in runtime
> log.
> >
> >  libavcodec/qsvenc.c      | 11 +++++++++++
> >  libavcodec/qsvenc.h      |  2 ++
> >  libavcodec/qsvenc_h264.c |  3 +++
> >  3 files changed, 16 insertions(+)
> >
> > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index
> > 948751daf4..42804e68af 100644
> > --- a/libavcodec/qsvenc.c
> > +++ b/libavcodec/qsvenc.c
> > @@ -226,6 +226,14 @@ static void dump_video_param(AVCodecContext
> > *avctx, QSVEncContext *q,
> >      av_log(avctx, AV_LOG_VERBOSE, "\n");  #endif
> >
> > +#if QSV_HAVE_VDENC
> > +    av_log(avctx, AV_LOG_VERBOSE, "VDENC: ");
> > +    if (info->LowPower == MFX_CODINGOPTION_ON)
> > +        av_log(avctx, AV_LOG_VERBOSE, "ON\n");
> > +    else
> > +        av_log(avctx, AV_LOG_VERBOSE, "OFF\n"); #endif
> 
> print_threestate() can be used to print libmfx option strings.
> print_threestate(co->RateDistortionOpt) is an example.
> 

Modified and sent a new patch.

Thanks,
- Linjie


More information about the ffmpeg-devel mailing list