@@ -971,6 +971,7 @@ static av_cold int vaapi_encode_config_attributes(AVCodecContext *avctx)
{ VAConfigAttribRTFormat },
{ VAConfigAttribRateControl },
{ VAConfigAttribEncMaxRefFrames },
+ { VAConfigAttribEncMaxSlices },
{ VAConfigAttribEncPackedHeaders },
};
@@ -1101,6 +1102,9 @@ static av_cold int vaapi_encode_config_attributes(AVCodecContext *avctx)
}
}
break;
+ case VAConfigAttribEncMaxSlices:
+ ctx->max_slices = attr[i].value;
+ break;
case VAConfigAttribEncPackedHeaders:
if (ctx->va_packed_headers & ~attr[i].value) {
// This isn't fatal, but packed headers are always
@@ -164,6 +164,10 @@ typedef struct VAAPIEncodeContext {
} quality_params;
#endif
+ // Supported max-slices number per frame. (0 means driver cannot
+ // support max mutil-slices query)
+ int max_slices;
+
// Per-sequence parameter structure (VAEncSequenceParameterBuffer*).
void *codec_sequence_params;