vkencoder-private: There's no need to store the aligned offset of 0

Since it's 0 too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7354>
This commit is contained in:
Víctor Manuel Jáquez Leal 2024-08-12 17:29:18 +02:00 committed by GStreamer Marge Bot
parent bc3317414b
commit 57eb2c700b

View file

@ -74,7 +74,6 @@ struct _GstVulkanEncoderPrivate
} prop; } prop;
guint out_buffer_size_aligned; guint out_buffer_size_aligned;
guint out_buffer_offset_aligned;
gboolean layered_dpb; gboolean layered_dpb;
GstBufferPool *dpb_pool; GstBufferPool *dpb_pool;
GstBuffer *layered_buffer; GstBuffer *layered_buffer;
@ -820,8 +819,6 @@ gst_vulkan_encoder_start (GstVulkanEncoder * self,
priv->out_buffer_size_aligned = GST_ROUND_UP_N (out_buffer_size, priv->out_buffer_size_aligned = GST_ROUND_UP_N (out_buffer_size,
priv->caps.caps.minBitstreamBufferSizeAlignment); priv->caps.caps.minBitstreamBufferSizeAlignment);
priv->out_buffer_offset_aligned = GST_ROUND_UP_N (0,
priv->caps.caps.minBitstreamBufferOffsetAlignment);
priv->started = TRUE; priv->started = TRUE;
@ -1275,7 +1272,7 @@ gst_vulkan_encoder_encode (GstVulkanEncoder * self,
.pNext = pic->codec_pic_info, .pNext = pic->codec_pic_info,
.flags = 0x0, .flags = 0x0,
.dstBuffer = ((GstVulkanBufferMemory *) mem)->buffer, .dstBuffer = ((GstVulkanBufferMemory *) mem)->buffer,
.dstBufferOffset = priv->out_buffer_offset_aligned, .dstBufferOffset = 0,
.dstBufferRange = ((GstVulkanBufferMemory *) mem)->barrier.size, //FIXME is it the correct value ? .dstBufferRange = ((GstVulkanBufferMemory *) mem)->barrier.size, //FIXME is it the correct value ?
.srcPictureResource = (VkVideoPictureResourceInfoKHR) { // SPEC: this should be separate .srcPictureResource = (VkVideoPictureResourceInfoKHR) { // SPEC: this should be separate
.sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR, .sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR,
@ -1349,7 +1346,7 @@ gst_vulkan_encoder_encode (GstVulkanEncoder * self,
GST_INFO_OBJECT (self, "The frame %d has been encoded with size %lu", GST_INFO_OBJECT (self, "The frame %d has been encoded with size %lu",
pic->pic_num, encode_res->data_size + params_size); pic->pic_num, encode_res->data_size + params_size);
gst_buffer_resize (pic->out_buffer, encode_res->offset, gst_buffer_resize (pic->out_buffer, encode_res->offset,
encode_res->data_size + params_size + priv->out_buffer_offset_aligned); encode_res->data_size + params_size);
} else { } else {
GST_ERROR_OBJECT (self, GST_ERROR_OBJECT (self,
"The operation did not complete properly, query status = %d", "The operation did not complete properly, query status = %d",