.. in decoders.
Inline session parameters allows to not create session parameters handlers for
every new stream parameters (such as SPS and PPS for H.264, for example), but
instead to pass them as a chained structure in the decoding main structure. This
is completely align with GStreamer decoder base classes.
Even that the previous approach is kept, if the devices doesn't support video
maintenance2, it shows a lot of validation errors.
Also it was required to add another parameter when enabling extension to verify
if the extension is linked with a device feature and if it is enabled.
Bump Vulkan API (and driver version for both decoders and encoders) to 1.4.306
Also bumped the ABI_CHECK_TAG because the CI finally catches up with the vulkan
video symbols that are not exposed by a public header (tough they are binary
public).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9585>
This patch is the payment to my technical debt.
The symbol GST_VULKAN_HAVE_VIDEO_EXTENSIONS is defined at compilation-time if
the user requests for the usage of the Vulkan Video extensions. And we used this
symbol for anything related with Vulkan Video. But this is not the smartest
approach.
The rule should be:
- If the code allocates Vulkan Video resources, use
GST_VULKAN_HAVE_VIDEO_EXTENSIONS
- Otherwise, use the Vulkan's guard for the used API
In this way, API version bumps will be easier.
Also, this commit marks the end of GST_VULKAN_HAVE_VIDEO_EXTENSIONS guarded code
for readability.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9492>
H.264 base class oriented for hardware accelerated encoders, such as Vulkan, VA
and others.
1. It can be parametrized for hardware limits, such as lists size, b-frames
supports, etc.
2. It produces a GOP structure map [IDR, R/I/B, ...)
3. It proposes parameters set and other strucures such as bitrate limites.
Subclases can modify those structures.
4. It calls the subclass encode virtual method implementation.
It doesn't handle rate control algorithms or other encoding quality mechanisms.
For a deeper introduction to the class there was a lighting talk in the GstConf
2024: <https://www.youtube.com/watch?v=-fQY54KHH38>
Co-authored-by: He Junyan <junyan.he@intel.com>
Co-authored-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Co-authored-by: Stéphane Cerveau <scerveau@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7197>
We never implemented correctly the selection of memories in a buffer given the
plane.
This patch uses gst_buffer_find_memory() for that. The offset is checked via the
video meta either in the input and output buffers, or the default offset given
the format and size.
This patch also requests the video meta option for the output buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9219>
Merge request !5651 introduced a regression for uploading VulkanBuffer. It can
be verified by
gst-launch-1.0 videotestsrc ! video/x-raw, format=NV12 ! vulkanupload ! \
video/x-raw\(memory:VulkanBuffer\) ! fakesink
Nobody has complained about this regression, so we assume it's a very niche
use-case.
This patch solve the regression by instantiating a different buffer pool
depending on the output cap features, and configuring it accordingly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9218>
- Use frame_num instead of pic_num to set the long_term_pic_num
fixing 10 interlaced tests in fluster test suite: JVT-AVC_V1
- Send the slice offset only once in case of interlaced content.
Fixing 5 interlaced tests in fluster test suite: JVT-AVC_V1.
- The default value for top and bottom field flag should be 0 in the
case of a progressive content.
- Use short and long term refs helper getter method to retrieve the
reference frames according its none existing and interlaced state
- Reorganize the find_next_slot_idx code to be easier to read.
Co-authored-by: Daniel Almeida <daniel.almeida@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7854>
Extended is identical to main but allows FMO/ASO features to be used,
and prevent using CABAC.
Using similar logic to "baseline", assume that if we support main,
we can also do extended.
This fixes the following fluster vectors, which otherwise would fail when trying to link the parsebin pad.
BA3_SVA_C
MR6_BT_B
MR7_BT_B
MR8_BT_B
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7854>
If a downstream buffer pool is offered, vulkanupload checks its allocation
parameters to honor them. Only adds to usage the TRANSFER bits, which are
required to upload buffers.
Also, fail if the buffer pool cannot be configured with the current parameters.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7219>
Instead of dragging the last destination pipeline stage as current barrier
source pipeline stage (which isn't a valid semantic) this patch adds a parameter
to gst_vulkan_operation_add_frame_barrier() to set the source pipeline stage to
define the barrier.
The previous logic brought problems particularly with queue transfers, when the
new queue doesn't support the stage set during a previous operation in a
different queue.
Now the operation API is closer to Vulkan semantics.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7165>
With clang on macOS:
```
error: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long')
...
error: format specifies type 'unsigned long' but the argument has type 'VkImageView' (aka 'unsigned long long')
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
As NVIDIA Amperium. In this case the each output buffer is also a DPB,
but using a different view layer.
Still pending a validation layer issue:
VUID-VkVideoBeginCodingInfoKHR-flags-07244
Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6954>
`StdVideoDecodeH265PictureInfo.flags.IsReference` refers to section 3.132 ITU-T
H.265 specification:
reference picture: A picture that is a short-term reference picture or a
long-term reference picture.
`GstH265Picture.ref` doesn't reflect this, but we need to query the NAL type of
the processed slice.
This patch fixes the validation layer error
`VUID-vkCmdBeginVideoCodingKHR-slotIndex-07239` while using the NVIDIA driver.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6901>
Use of VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT instead of
specific VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR
Fix for VUID-vkCmdPipelineBarrier2-srcStageMask-03849
pDependencyInfo->pImageMemoryBarriers[0].srcStageMask
(VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR) is not compatible with
the queue family properties
(VK_QUEUE_GRAPHICS_BIT|VK_QUEUE_COMPUTE_BIT|VK_QUEUE_TRANSFER_BIT|
VK_QUEUE_SPARSE_BINDING_BIT|VK_QUEUE_PROTECTED_BIT) of this
command buffer. The Vulkan spec states: The srcStageMask member
of any element of the pMemoryBarriers, pBufferMemoryBarriers, or
pImageMemoryBarriers members of pDependencyInfo must only
include pipeline stages valid for the queue family that was
used to create the command pool that commandBuffer was allocated
from (
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/
html/vkspec.html#VUID-vkCmdPipelineBarrier2-srcStageMask-03849)
The frame barrier should use a compatible srcStageMask for all
the queues.
Remove reset_pipeline_stage_mask as it is redundant
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6780>
The h26xdecoder 'stop' method was not called
as the vulkan h26x class rewires the video decoder
'stop' base method to its own one.
It was causing some memory leaks such as dangling parser
and dpb in h26xdecoder base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6782>