mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-17 23:40:29 +01:00
vulkan/video: Add intra refresh support
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36718>
This commit is contained in:
parent
639b91bb48
commit
c1610da677
2 changed files with 5 additions and 0 deletions
|
|
@ -105,6 +105,8 @@ vk_video_session_init(struct vk_device *device,
|
|||
vid->op == VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR) {
|
||||
const struct VkVideoEncodeUsageInfoKHR *encode_usage_profile =
|
||||
vk_find_struct_const(create_info->pVideoProfile->pNext, VIDEO_ENCODE_USAGE_INFO_KHR);
|
||||
const struct VkVideoEncodeSessionIntraRefreshCreateInfoKHR *intra_refresh =
|
||||
vk_find_struct_const(create_info->pNext, VIDEO_ENCODE_SESSION_INTRA_REFRESH_CREATE_INFO_KHR);
|
||||
if (encode_usage_profile) {
|
||||
vid->enc_usage.video_usage_hints = encode_usage_profile->videoUsageHints;
|
||||
vid->enc_usage.video_content_hints = encode_usage_profile->videoContentHints;
|
||||
|
|
@ -114,6 +116,8 @@ vk_video_session_init(struct vk_device *device,
|
|||
vid->enc_usage.video_content_hints = VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR;
|
||||
vid->enc_usage.tuning_mode = VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR;
|
||||
}
|
||||
if (intra_refresh)
|
||||
vid->intra_refresh_mode = intra_refresh->intraRefreshMode;
|
||||
}
|
||||
|
||||
return VK_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ struct vk_video_session {
|
|||
VkFormat ref_format;
|
||||
uint32_t max_dpb_slots;
|
||||
uint32_t max_active_ref_pics;
|
||||
VkVideoEncodeIntraRefreshModeFlagBitsKHR intra_refresh_mode;
|
||||
|
||||
struct {
|
||||
VkVideoEncodeUsageFlagsKHR video_usage_hints;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue