frontends/va: disable packed header support for h264 encoder

Packed headers for the H.264 encoder has not been implemented yet, so
don't report packed header support for the H.264 encoder

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/13915>
This commit is contained in:
Thong Thai
2021-11-12 18:19:23 -05:00
committed by Marge Bot
parent 934bc24fe9
commit c5b7fb998f
+6 -4
View File
@@ -170,8 +170,7 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
break;
case VAConfigAttribEncPackedHeaders:
value = VA_ENC_PACKED_HEADER_NONE;
if (u_reduce_video_profile(ProfileToPipe(profile)) == PIPE_VIDEO_FORMAT_MPEG4_AVC ||
u_reduce_video_profile(ProfileToPipe(profile)) == PIPE_VIDEO_FORMAT_HEVC)
if (u_reduce_video_profile(ProfileToPipe(profile)) == PIPE_VIDEO_FORMAT_HEVC)
value |= VA_ENC_PACKED_HEADER_SEQUENCE;
break;
case VAConfigAttribEncMaxRefFrames:
@@ -331,8 +330,11 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
}
}
if (attrib_list[i].type == VAConfigAttribEncPackedHeaders) {
if (attrib_list[i].value > 1 ||
config->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE) {
if ((attrib_list[i].value > 1) ||
(attrib_list[i].value &&
u_reduce_video_profile(ProfileToPipe(profile)) !=
PIPE_VIDEO_FORMAT_HEVC) ||
(config->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE)) {
FREE(config);
return VA_STATUS_ERROR_INVALID_VALUE;
}