1261 Commits

Author SHA1 Message Date
Stéphane Cerveau
0b26bebe35 vkdecoder-private: manage existing dpb pool
When the decoder wants to recreate the dpb pool
on resize event for example, an existing dpb pool
might exist, so it should be kept if the caps
are equal or destroy for new caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9614>
2025-08-28 08:35:57 +00:00
Daniel Morin
3eefb6c5db analytics: always add GstTensorMeta
Always add GstTensorMeta to buffer instead of re-using existing GstTensorMeta
when it's already present. The reason for the change is when we have cascaded
inference elements overwriting (tflite) or leaking (ONNX) GstTensorMeta when we
have cascaded inferences. We didn't create and API to append to GstTensorMeta
and I think it's more convenient to have a new GstTensorMeta for each
inferences. It's also more clear that a group of tensor was produced by one
inference but doesn't limit tensordecoders from using tensors produced by
multiple inference. I don't see much value in having all tensors data always
inside one GstTensorMeta since appending would mean re-allocation of the tensors
array anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9564>
2025-08-22 23:10:31 +00:00
Stéphane Cerveau
167e41c343 vulkan: add basic AV1 encode support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8841>
2025-08-21 17:42:47 +00:00
Víctor Manuel Jáquez Leal
fc647552fa vulkan: enable video maintenance2 for inline session parameters
.. 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>
2025-08-21 05:22:19 +00:00
Víctor Manuel Jáquez Leal
8ce2ed05ac vkvideo-private: remove unused guards
Since this file is compiled only if vulkan video support is enabled with the
proper vulkan headers version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9585>
2025-08-21 05:22:19 +00:00
Víctor Manuel Jáquez Leal
1d60643a1a vkdevice: check for features when enabling extensions
Some extensions need to have enabled certain feature in the device. This patch
does that check by adding a new field in the extension list which is a function
that can be mapped to gst_vulkan_physical_device_has_feature_*() functions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9585>
2025-08-21 05:22:18 +00:00
Víctor Manuel Jáquez Leal
caae3b07e1 vkimagesbufferpool: another usage for non-independent profile flag
Fix validation issue VUID-VkImageCreateInfo-flags-08329 on old RADV hardwware.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9591>
2025-08-20 20:11:24 +02:00
Víctor Manuel Jáquez Leal
6d53576194 vkimagebufferpool: don't use independent profile flag for some usage
VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR, among others, needs the video profile
to use.

The patch clears the validation issue  VUID-VkImageCreateInfo-flags-08331

This is a continuation of !9550

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9570>
2025-08-20 06:37:03 +00:00
Víctor Manuel Jáquez Leal
101722d477 vkimagebufferpool: support video profile independent images
With video_maintenance1 extension is possible to create images independent of a
the video profile list, under that image will be processed.

With that extension is possible to share the same image for dynamic transcoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9550>
2025-08-16 15:36:02 +02:00
Víctor Manuel Jáquez Leal
71b787a39f vkdecoder-private: fix mistake from !9531
This was a very silent mistake.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9552>
2025-08-13 19:59:52 +02:00
Víctor Manuel Jáquez Leal
36b8b87b18 vk{decoder,encoder}-private: use API to check device version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9552>
2025-08-13 19:59:52 +02:00
Víctor Manuel Jáquez Leal
9be96a7a88 vkphysicaldevice: silence validation for features
With merge request !9438 the validation layer started to complain with
VUID-VkDeviceCreateInfo-pNext-02829

This patch fixes this ill-usage of Vulkan API, by removing the feature enabling
of sampler ycbcr conversion, since it was promoted since Vulkan 1.1, and in
GStreamer is only used in Vulkan Video operations, which are only enabled in
Vulkan 1.3+.

Also, these features detection and enabling were moved to a function called when
filling the physical device data, in order to check the API version of the
device driver before adding the enabling of the feature.

Finally, the getters were adapted to use the version feature structure if the
device driver version matches.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9544>
2025-08-13 15:24:05 +03:00
Víctor Manuel Jáquez Leal
9f8885c19c vkimagebufferpool: fix regression from !9492
On commit 1a7f0f162726f07f5723e0c1f43f2c6725d07c80 a regression were introduced
by omitting to initialize the profileCount field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9545>
2025-08-12 20:15:49 +02:00
Víctor Manuel Jáquez Leal
f7c1eae481 vkencoder-private: remove duplicated definition
They are already declared in gstvkvideo-private.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9531>
2025-08-12 09:37:08 +00:00
Víctor Manuel Jáquez Leal
8b5c83696b vulkan: remove spurious video extension checking
Since they are expected dependencies. If the specific codec extension is loaded,
that means that dependencies are loaded too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9531>
2025-08-12 09:37:08 +00:00
Qian Hu (胡骞)
9943a6082c waylandsink: add some error handler for event dispatch
if wl client got last_error, wl_display_dispatch_queue_pending
will return -1, may lead to unhandled case, we should quit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9511>
2025-08-11 16:39:19 +00:00
Víctor Manuel Jáquez Leal
a62fa5d66e vkphysicaldevice: detect and dump Vulkan 1.4 properties and features
In order to link videomaintenance1, and others to come, without knowing if
Vulkan 1.4 features are chained in the device properties structure, a static and
inlined function was added in gstvkphysicaldevice-private.h. It was added in a
header file to avoid compiler warnings if it's not used because of old Vulkan
headers.

Also the value dump videomaintenance1 was moved to another function to pack
there all the future features to query which aren't part of a Vulkan release
yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9492>
2025-08-08 11:48:25 +00:00
Víctor Manuel Jáquez Leal
c84982b5c9 vulkan: fine grained access to API
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>
2025-08-08 11:48:25 +00:00
Víctor Manuel Jáquez Leal
92e2c5b29d vkoperation: refactor for fine grained guards and clean ups
Added a static inlined function in gstvkphysicaldevice-private.h for looking up
a specific vulkan structure in a chain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9492>
2025-08-08 11:48:25 +00:00
Víctor Manuel Jáquez Leal
1a7f0f1627 vkimagebufferpool: refactor common code
Both gst_vulkan_image_buffer_pool_set_config() and
gst_vulkan_image_buffer_pool_alloc() functions share the same code to create
Vulkan images for different purposes.

This patch refactor them in a new helper function that creates the images and
stores them in a buffer if it's passed as output parameters, such as the
offsets.

This patch also adds specifics guards for Vulkan's symbols for better grained
API usage, but also for prepare_buffer() the guard is set where the symbol is
used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9492>
2025-08-08 11:48:25 +00:00
Víctor Manuel Jáquez Leal
f3f319a630 vkdevice: fine grained vulkan video extensions detection
The Vulkan Video extensions can be available, according to the specification,
since Vulkan 1.1, but with other extensions dependencies. That's why this patch
adds a field in the extension structure, which represents the extension
dependency that the specified extension requires. And they are specified by
Vulkan Video extensions.

This allow to have a single function to check if the extension can be enabled
both by optional extensions and video extensions.

Regardless that video extension can be loaded since Vulkan 1.1, they are rather
loaded since Vulkan 1.3, when synchronization2 was promoted, so it isn't
checked as video_queue dependency.

Finally, this patch checks for each guard symbol.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9492>
2025-08-08 11:48:24 +00:00
Víctor Manuel Jáquez Leal
80da022590 vulkan: private functions for physical device features
This is a continuation of !9483, but without back-porting.

Instead of checking the driver's API version to figure out if a physical device
feature is available and enabled, or even more, instead of checking for enabled
extensions in the driver, this patch adds private functions in the physical
driver to get the availability and enabling of features such as sampler ycbrc
conversion, synchronization2, timeline semaphore and video maintenance1.

And these new functions are used internally in the GstVulkanOperation object,
and the private object GstVulkanDecoder.

This approach is computationally cheaper, simpler and precise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9492>
2025-08-08 11:48:24 +00:00
Sebastian Dröge
fdeca0767d av1parser: Don't error out on "currently" undefined seq-level indices
They might very well be defined in the future and that shouldn't affect the
parsing in any way. Specifically, ffmpeg with `av1_nvenc` seems to create
`GST_AV1_SEQ_LEVEL_7_3` currently and parsing such streams would fail otherwise.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4589

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9502>
2025-08-07 12:22:22 +00:00
Víctor Manuel Jáquez Leal
573f401e58 vkvideoutils-private: make it private
Since we moved the GstVulkan generic decoder and encoder to private objects in
the library, there was not need to keep vkvideoutils public.

This patch turns it private and reduces the public API surface.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9493>
2025-08-05 19:44:36 +00:00
Philippe Normand
9e38ee7526 webrtc: stats: Set DTLS role and state on transport stats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9485>
2025-08-04 10:22:24 +00:00
Víctor Manuel Jáquez Leal
829de89122 vkphysicaldevice: enable sampler ycbcr, sync2 and timeline semaphore features
For the features VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR,
VkPhysicalDeviceSynchronization2Features and
VkPhisicalDeviceTimelineSemaphoreFeatures

The Vulkan specification states:

  If the `VkPhysicalDeviceXXXFeatures` structure is included in the `pNext`
  chain of the `VkPhysicalDeviceFeatures2` structure passed to
  `vkGetPhysicalDeviceFeatures2`, it is filled in to indicate whether each
  corresponding feature is supported. If the application wishes to use a
  `VkDevice` with any features described by `VkPhysicalDeviceXXXFeatures`,
  it **must** add an instance of the structure, with the desired feature members
  set to `VK_TRUE`, to the `pNext` chain of `VkDeviceCreateInfo` when creating
  the `VkDevice`.

And that was missing in the code.

Strangely, that functionality doesn't have a Valid-Usage ID assigned, so it
isn't caught by the validation layer.

This patch adds the structures in the physical devices to get them and later set
them in the device creation.

In order to link these features, videomaintenance1, and others to come, without
knowing if Vulkan 1.3 features are chained in the device properties structure, a
static and inlined function was added in gstvkphysicaldevice-private.h. It was
added in a header file to avoid compiler warnings if it's not used because of
old Vulkan headers.

Also the value dump videomaintenance1 was moved to another function to pack
there all these queried features.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9483>
2025-08-04 09:31:14 +00:00
Nicolas Dufresne
c5657fde44 waylandsink: Enable 10bit RGB for SHM buffer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9460>
2025-07-31 21:34:35 +00:00
Marc-André Lureau
78f0f61523 meson: d3d12: Add support for MinGW DirectXMath package
This is a similar issue that was found for d3d11:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6495

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9464>
2025-07-31 15:09:34 +00:00
Philippe Normand
e07c720476 h264decoder: Spelling fix in warning debug statement
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9457>
2025-07-29 20:31:21 +01:00
Derek Foreman
a26983d043 wayland: display: Scale whitepoint the same as the primaries
The whitepoint metadata also needs the same scale factor as the
display_primaries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9444>
2025-07-29 04:08:52 +00:00
Derek Foreman
e33f89a4bf wayland: window: Name the color management queue
Wayland debugging is easier if we use queue names.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9446>
2025-07-29 00:12:00 +00:00
Seungha Yang
461e3946d4 d3d12: Add support for dewarping fisheye images
Add d3d12fisheyedewarp element that performs fisheye image dewarping
using D3D12. A UV remap LUT texture is generated via a compute shader,
and the actual remapping is performed in a pixel shader using this LUT

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9441>
2025-07-27 01:22:28 +09:00
Olivier Crête
561e2b28af tensor: Print tensor name in debug name
It makes it easier to understand which one is rejected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9419>
2025-07-21 14:49:42 +00:00
Philippe Normand
990c8b91a9 transcoder: Fix warning/error APIs
The GError pointers were actually not out-parameters. :(

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9407>
2025-07-18 08:02:50 +00:00
Philippe Normand
a03d5bedd3 transcoder: Remove unused priv->bus variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9407>
2025-07-18 08:02:50 +00:00
Philippe Normand
9babc9a9e5 transcoder: signal-adapter: Fix error/warning details access
The field names were missing in the gst_structure_get() calls...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9407>
2025-07-18 08:02:50 +00:00
Olivier Crête
2c3f2747d6 tensormeta: Check dimensions when retrieving tensor
Modify the API to retrieve the tensor meta to check for the dimensions
as well.

Also fix an API mistake, the buffer whose dimensions should be checheck
is the one inside the GstTensor, not another buffer some outside.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9411>
2025-07-17 17:43:32 +00:00
Olivier Crête
5f52eaae83 tensormeta: Don't crash on invalid tensor name
It's a valid case to check for an existing tensor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9411>
2025-07-17 17:43:32 +00:00
Seungha Yang
0d1cd40097 d3d12swapchainsink: Update uv-remap signal to support background color
Allow per viewport background color setting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9393>
2025-07-17 12:55:11 +00:00
Sebastian Dröge
d255ed96f0 tensor: Clarify meaning of the dimensions array in the docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9325>
2025-07-17 11:25:59 +00:00
Olivier Crête
b11ccc5cdf analyticsmeta: Remove incorrect check
The value can be NULL which is the wildcard

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9413>
2025-07-16 18:55:55 -04:00
Julian Bouzas
e44bab9fe9 h266parse: Parse and process SEI registered user data
Similar to h264parse and h265parse, this patch improves the element to parse
the SEI registered user data from NAL units. The core structure of H266 SEI for
ITU-T T.35 is the same as the other parsers, so we can re-use the same logic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9365>
2025-07-15 19:23:39 -04:00
Sebastian Dröge
6ce4637aab analytics: Include new batch meta in the single-include header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9391>
2025-07-14 15:07:37 +03:00
Sebastian Dröge
3a51f42ab0 analytics: Add GstAnalyticsBatchMeta for batches of buffers from one or more streams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9282>
2025-07-13 18:25:26 +02:00
Nicolas Dufresne
8092669a18 wayland: window: Fix next video info leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9353>
2025-07-09 20:07:38 +00:00
Nicolas Dufresne
c803ce7a9c waylandsink: Parse and set the HDR10 metadata
Basically whenever the compositor have support for it, and the caps includes it,
set the mastering display and light content level information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9353>
2025-07-09 20:07:38 +00:00
Nicolas Dufresne
c61b6f76b0 wayland: display: Detect HDR10 metadata feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9353>
2025-07-09 20:07:38 +00:00
Matthew Waters
4ed83e5973 vulkanfullscreenquad: add locks for synchronisation
Now all API can be accessed from any thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9337>
2025-07-08 11:43:13 +00:00
Hanna Weiß
3232e7a948 vulkan: Fix drawing too many triangles in fullscreenquad
was using a index buffer for triangle list but drawn as strip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9338>
2025-07-07 21:56:50 +00:00
Víctor Manuel Jáquez Leal
c09cc64a5e vkencoder-private: free data on error
Co-authored-by: Stéphane Cerveau <scerveau@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7197>
2025-07-03 13:41:19 +02:00