@@ -655,6 +655,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
#if QSV_VERSION_ATLEAST(1, 8)
q->extco2.LookAheadDS = q->look_ahead_downsampling;
q->extco2.RepeatPPS = q->repeat_pps ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
+ q->extco2.NumMbPerSlice = q->num_mb_per_slice;
#if FF_API_PRIVATE_OPT
FF_DISABLE_DEPRECATION_WARNINGS
@@ -163,6 +163,7 @@ typedef struct QSVEncContext {
int recovery_point_sei;
int repeat_pps;
+ int num_mb_per_slice;
int a53_cc;
@@ -156,6 +156,7 @@ static const AVOption options[] = {
#endif
{ "repeat_pps", "repeat pps for every frame", OFFSET(qsv.repeat_pps), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
+ { "num_mb_per_slice","Suggested macroblocks numbers of each slice", OFFSET(qsv.num_mb_per_slice), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },
{ NULL },
};
This option specifies suggested macroblocks numbers in each slice. MSDK may adjust it based on platform capability. And slice_number will be ignored if this option set to a non-zero value. Signed-off-by: Zhong Li <zhong.li@intel.com> --- libavcodec/qsvenc.c | 1 + libavcodec/qsvenc.h | 1 + libavcodec/qsvenc_h264.c | 1 + 3 files changed, 3 insertions(+)