frontends/va: check number of temporal layers supported by encoder
Checks the encoder to determine the number of temporal layers supported, and returns max_num_temporal_layers_minus1, along with setting the corresponding control flag if multiple layers are supported. Signed-off-by: Thong Thai <thong.thai@amd.com> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11850>
This commit is contained in:
@@ -159,6 +159,15 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
|
||||
case VAConfigAttribRateControl:
|
||||
value = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR;
|
||||
break;
|
||||
case VAConfigAttribEncRateControlExt:
|
||||
value = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
PIPE_VIDEO_CAP_MAX_TEMPORAL_LAYERS);
|
||||
if (value > 0) {
|
||||
value -= 1;
|
||||
value |= (1 << 8); /* temporal_layer_bitrate_control_flag */
|
||||
}
|
||||
break;
|
||||
case VAConfigAttribEncPackedHeaders:
|
||||
value = VA_ENC_PACKED_HEADER_NONE;
|
||||
if (u_reduce_video_profile(ProfileToPipe(profile)) == PIPE_VIDEO_FORMAT_MPEG4_AVC ||
|
||||
|
||||
Reference in New Issue
Block a user