Mesa (main): frontends/va: disable packed header support for h264 encoder
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 8 03:41:41 UTC 2021
Module: Mesa
Branch: main
Commit: c5b7fb998fa3638727d3aea5030d1ccb4e78082d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5b7fb998fa3638727d3aea5030d1ccb4e78082d
Author: Thong Thai <thong.thai at amd.com>
Date: Fri Nov 12 18:19:23 2021 -0500
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 at amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>
---
src/gallium/frontends/va/config.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/gallium/frontends/va/config.c b/src/gallium/frontends/va/config.c
index 569f74a7969..9a19632e553 100644
--- a/src/gallium/frontends/va/config.c
+++ b/src/gallium/frontends/va/config.c
@@ -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;
}
More information about the mesa-commit
mailing list