mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 23:42:28 +00:00
vkencoder-private: usage structure is provided by caller
As all the profile structure, it's not intended to be filled in gst_vulkan_encoder_start() function, but by the caller. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7974>
This commit is contained in:
parent
a12daaca28
commit
52bd1931b8
2 changed files with 9 additions and 10 deletions
|
@ -661,16 +661,8 @@ gst_vulkan_encoder_start (GstVulkanEncoder * self,
|
||||||
|
|
||||||
priv->profile = *profile;
|
priv->profile = *profile;
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* ensure the chain up of structure */
|
||||||
priv->profile.usage.encode = (VkVideoEncodeUsageInfoKHR) {
|
priv->profile.usage.encode.pNext = &priv->profile.codec;
|
||||||
.pNext = &priv->profile.codec,
|
|
||||||
.sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR,
|
|
||||||
.tuningMode = VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR,
|
|
||||||
.videoContentHints = VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR,
|
|
||||||
.videoUsageHints = VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR,
|
|
||||||
};
|
|
||||||
/* *INDENT-ON* */
|
|
||||||
|
|
||||||
priv->profile.profile.pNext = &priv->profile.usage.encode;
|
priv->profile.profile.pNext = &priv->profile.usage.encode;
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
|
|
|
@ -757,6 +757,13 @@ setup_h265_encoder (uint32_t width, uint32_t height, gint vps_id,
|
||||||
.chromaBitDepth = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR,
|
.chromaBitDepth = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR,
|
||||||
.lumaBitDepth = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR,
|
.lumaBitDepth = VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR,
|
||||||
},
|
},
|
||||||
|
.usage.encode = {
|
||||||
|
.pNext = &profile.codec,
|
||||||
|
.sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR,
|
||||||
|
.videoUsageHints = VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR,
|
||||||
|
.videoContentHints = VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR,
|
||||||
|
.tuningMode = VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR,
|
||||||
|
},
|
||||||
.codec.h265enc = (VkVideoEncodeH265ProfileInfoKHR) {
|
.codec.h265enc = (VkVideoEncodeH265ProfileInfoKHR) {
|
||||||
.sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR,
|
.sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR,
|
||||||
.stdProfileIdc = profile_idc,
|
.stdProfileIdc = profile_idc,
|
||||||
|
|
Loading…
Reference in a new issue