[FFmpeg-devel] [PATCH v3] libavcodec/qsvenc: Enable fixed QP configure in qsv CQP runtime

Chen, Wenbin wenbin.chen at intel.com
Mon Jul 4 11:40:28 EEST 2022


> Quoting Chen, Wenbin (2022-07-04 08:33:49)
> > > Why is this using frame metadata rather than the AVVideoEncParams
> side
> > > data?
> >
> > The usage of AVVideoEncParams relates to the "qp" variable in
> mfxEncodeCtrl which is passed
> > to MFXVideoENCODE_encoderFrameAsync(). This variable in qsv is for per-
> frame QP
> > configuration.
> > There are other parameter changing supports I want to add besides QP, for
> > example, gop_size, max_frame_size, intra_refresh. These parameter
> configurations are not
> > all included in mfxEncodeCtrl, so I choose to use MFXVideoENCODE_Reset()
> to do this. This
> > code changes the encoding parameters which means these changes are
> applied to all
> > the following frames, but AVVideoEncParams is per-frame configuration,
> so I think
> > AVVideoEncParams is not suitable for this.
> 
> AVFrame metadata is also per-frame, so your logic does not make sense to
> me.
> 
> You could also just update the AVCodecContext/private context values
> directly or using AVOptions.

This is a possible way. I will change it. Thanks for your advice.

> 
> --
> Anton Khirnov
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list