mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
vkencoder-private: shuffle down VkVideoBeginCodingInfoKHR initialization
to make it more cohesive Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8007>
This commit is contained in:
parent
fbeb012617
commit
200484a84b
1 changed files with 10 additions and 9 deletions
|
@ -953,14 +953,7 @@ gst_vulkan_encoder_encode (GstVulkanEncoder * self, GstVideoInfo * info,
|
||||||
if (!gst_vulkan_operation_begin (priv->exec, &err))
|
if (!gst_vulkan_operation_begin (priv->exec, &err))
|
||||||
goto bail;
|
goto bail;
|
||||||
|
|
||||||
/* Prepare the encoding scope by flling the VkVideoBeginCodingInfoKHR structure */
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
begin_coding = (VkVideoBeginCodingInfoKHR) {
|
|
||||||
.sType = VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR,
|
|
||||||
.pNext = NULL,
|
|
||||||
.videoSession = priv->session.session->handle,
|
|
||||||
.videoSessionParameters = priv->session_params->handle,
|
|
||||||
};
|
|
||||||
coding_ctrl = (VkVideoCodingControlInfoKHR) {
|
coding_ctrl = (VkVideoCodingControlInfoKHR) {
|
||||||
.sType = VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR,
|
.sType = VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR,
|
||||||
};
|
};
|
||||||
|
@ -1015,8 +1008,16 @@ gst_vulkan_encoder_encode (GstVulkanEncoder * self, GstVideoInfo * info,
|
||||||
ref_slots[nb_refs].slotIndex = -1;
|
ref_slots[nb_refs].slotIndex = -1;
|
||||||
|
|
||||||
/* Setup the begin coding structure using the reference slots */
|
/* Setup the begin coding structure using the reference slots */
|
||||||
begin_coding.referenceSlotCount = nb_refs + 1;
|
/* *INDENT-OFF* */
|
||||||
begin_coding.pReferenceSlots = ref_slots;
|
begin_coding = (VkVideoBeginCodingInfoKHR) {
|
||||||
|
.sType = VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR,
|
||||||
|
.pNext = NULL,
|
||||||
|
.videoSession = priv->session.session->handle,
|
||||||
|
.videoSessionParameters = priv->session_params->handle,
|
||||||
|
.referenceSlotCount = nb_refs + 1,
|
||||||
|
.pReferenceSlots = ref_slots,
|
||||||
|
};
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
cmd_buf = priv->exec->cmd_buf;
|
cmd_buf = priv->exec->cmd_buf;
|
||||||
priv->vk.CmdBeginVideoCoding (cmd_buf->cmd, &begin_coding);
|
priv->vk.CmdBeginVideoCoding (cmd_buf->cmd, &begin_coding);
|
||||||
|
|
Loading…
Reference in a new issue