2019-04-28 14:35 GMT+02:00, Zhong Li <zhong...@intel.com>: > Currenntly there is no any function of CO3 appled to mpeg2, > and enabling for mpeg2 it will cause regression with some old > libmfx libaries (see tiket #7839), so disable CO3 for mpeg2. > > Also add runtime version check for CO3. > > Signed-off-by: Zhong Li <zhong...@intel.com> > --- > libavcodec/qsvenc.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c > index a03ab69590..e0886aeedb 100644 > --- a/libavcodec/qsvenc.c > +++ b/libavcodec/qsvenc.c > @@ -750,15 +750,18 @@ FF_ENABLE_DEPRECATION_WARNINGS > } > #endif > } > + > + if (avctx->codec_id != AV_CODEC_ID_MPEG2VIDEO && > QSV_RUNTIME_VERSION_ATLEAST(q->ver, 1, 11)) { > #if QSV_HAVE_CO3 > - q->extco3.Header.BufferId = MFX_EXTBUFF_CODING_OPTION3; > - q->extco3.Header.BufferSz = sizeof(q->extco3); > + q->extco3.Header.BufferId = MFX_EXTBUFF_CODING_OPTION3; > + q->extco3.Header.BufferSz = sizeof(q->extco3); > #if QSV_HAVE_GPB > - if (avctx->codec_id == AV_CODEC_ID_HEVC) > - q->extco3.GPB = q->gpb ? MFX_CODINGOPTION_ON : > MFX_CODINGOPTION_OFF; > + if (avctx->codec_id == AV_CODEC_ID_HEVC) > + q->extco3.GPB = q->gpb ? MFX_CODINGOPTION_ON : > MFX_CODINGOPTION_OFF; > #endif > - q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer > *)&q->extco3; > + q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer > *)&q->extco3; > #endif > + }
Please separate the cosmetic from the function change(s) to make the patch more readable. Thank you, Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".