4865 Commits

Author SHA1 Message Date
acu
6422c7f343 added comments 2025-09-01 16:44:40 +02:00
052ce3ca15 delete Debug 2025-09-01 16:44:40 +02:00
acu
840e5b4dd1 opencl gpu acceleration tested - successful 2025-09-01 16:44:40 +02:00
0f0ddbb776 changed variable types in remap function in gstcameraundistort.cpp to support gpu acceleration - It still needs to be tested on the ACU! 2025-09-01 16:44:40 +02:00
Elias Rosendahl
75652a481a Add Execution Provider OpenVINO 2025-09-01 16:44:39 +02:00
Santosh Mahto
5186341c28 gstanalytics : Add tensor decoder element for yolo detection models
Existing tensor decoder has been bifurcated into two seperate gst
element as:

`yoloodv5tensordecoder`: decodes tensors output(masks) from detection-only
models e.g yolov8s.onnx

`yolsegv8tensordecoder`: decoder tensors output(masks and logits) from
segementation models e.g FastSAM or yolov8s-seg
2025-09-01 16:37:15 +02:00
Daniel Morin
96ac4c9a43 tensordecoders: rename element
- yolotensordecoder replaced with yolov8segtensordecoder
2025-09-01 16:36:41 +02:00
Daniel Morin
8f08bafa5d tensordecoders: address MR comments 2025-09-01 16:36:41 +02:00
Daniel Morin
3f3cfc0c91 tensordecoders: Remove object locking in properties accessors 2025-09-01 16:36:41 +02:00
Daniel Morin
a194dcc293 tensordecoders: add property label-file to exemple 2025-09-01 16:36:41 +02:00
Daniel Morin
64e0805126 tensordecoder: Improve class retrieval
- Optimize the way to retrieve class with maximum confidence. Avoir multiple
  pass.
- Add support for label files
2025-09-01 16:36:41 +02:00
Santosh Mahto
07920e7122 gst-analytics : Adapt and Rename fastsamtensordecoder to yolo based.
YOLOv8 model have same tensor output format as FastSAM, so for better
generalization rename fastsamtensordecoder to yolotensordecoder. This
also requires code adaptation to support Yolo based model.
2025-09-01 16:36:41 +02:00
Olivier Crête
f967d58093 fastsamtensordecoder: Set mask resolution based on model output 2025-09-01 16:34:56 +02:00
Daniel Morin
7aa0319af6 fastsamtensordecoder: Add FastSAM tensor decoder
Co-authored-by: Vineet Suryan <vineet.suryan@collabora.com>

# Conflicts:
#	subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json
#	subprojects/gst-plugins-bad/gst/tensordecoders/gsttensordecoders.c
#	subprojects/gst-plugins-bad/gst/tensordecoders/meson.build
2025-09-01 16:34:56 +02:00
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
Víctor Manuel Jáquez Leal
5e995b2b21 vulkanh26xdec: fix discont state handling
It fixes a couple tests in fluster for H.265 decoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9610>
2025-08-27 11:32:32 +00:00
Stéphane Cerveau
90dc0f1313 vulkan: tests: remove/update ci comments
Since previous commit, the CI can now run vulkan
tests. Remove or update the comments related to CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9416>
2025-08-27 10:50:57 +00:00
Stéphane Cerveau
b2eeb6d6d3 ci: enable vulkan tests in validate
As CI now supports llvm 18 and mesa 24.1 which
allow to use properly lavapipe in the CI, the vulkan
ci tests have been removed from the validate blacklist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9416>
2025-08-27 10:50:56 +00:00
Vivian LEE
5801dd0593 x265: Fix duplicate SEI at startup IDR frame problem
x265 encoder_headers return headers with SEI after encoding the frame,
while the output frame also contains SEI so two identical header
blocks appeared.
Cache the headers at init, leaving only a single copy in the stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9604>
2025-08-26 06:56:07 +00:00
Sebastian Dröge
9f19e0e0a2 gst: Convert is_writable() / make_writable() macros to inline functions
Plus actual functions that are exported from the library.

Apart from improving type-safety, this also makes bindings more happy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9588>
2025-08-23 12:42:12 +00:00
Daniel Morin
c2d83fabbd tensordecoders: fix wrong assumption in ultralightfacedetectortensordec
- UltraLightFaceDetection was assmuming only one TensorMeta could be attach to
  buffer. We need to look at all TensorMeta attach to the buffer and check for
  the one it support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9564>
2025-08-22 23:10:31 +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
Seungha Yang
0f4bddc9a9 wasapi2: Add support for format negotiation
Enumerate supported formats during open so that src/sink can
report them via get_caps(). The format is then fixated and
initialized on acquire(), allowing users to select their
preferred format

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:28 +00:00
Seungha Yang
d9279a5145 wasapi2: Enumerate supported shared mode formats
... and report it via device provider property

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:28 +00:00
Seungha Yang
c97ed1e6f6 wasapi2: Workaround for S24_32LE format mismatch
Since Windows 24bit-in-32bit format is not supported
by GStreamer (Windows one is MSB-aligned), converts format
in ringbuffer using SSE2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:28 +00:00
Seungha Yang
0d94713288 wasapi2: Demote S24_32LE in exclusive-mode format ordering
Some endpoints accept 24-bit in 32-bit PCM (S24_32LE) in exclusive mode
but playback at very low volume. Until the root cause is identified,
push S24_32LE to the end of the candidate list

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:27 +00:00
Seungha Yang
f2aabd6a71 wasapi2: Add support for exclusive mode device switching
Because of APO/OS mixer bypass in exclusive mode, we should
convert samples if new device has different format.
The conversion with additional buffering is implemented in this patch

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:26 +00:00
Seungha Yang
4257cd8546 wasapi2: Fix process loopback device init
Fix AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM flag usage

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:26 +00:00
Seungha Yang
18b5398960 wasapi2: Add support for exclusive mode
Add "exclusive" property and try exclusive mode streaming

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:25 +00:00
Seungha Yang
370499875c wasapi2: Probe exclusive mode formats
... and report it via device provider props

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9586>
2025-08-22 22:10:25 +00:00
Stéphane Cerveau
34a009d85c tests: add vulkan AV1 encode test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8841>
2025-08-21 17:42:47 +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
Julian Bouzas
ea133d97a0 lcevcdec: Support all available formats
RGB and GRAY formats are only placeholders in LCEVCDec and therefore are not
supported yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:55 +00:00
Julian Bouzas
3fc37b90e1 lcevcdec: Remove unneeded LCEVC 2.0.0 workaround
This is not needed anymore as the min version for LCEVCdec is 4.0.1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:55 +00:00
Julian Bouzas
30aa1e84e4 lcevcdec: Handle pixel aspect ratio and crop size correctly
LCEVCdec supports different pixel aspect ratios other than 1/1. This change
forwards the pixel aspect ratio of the base picture to the LCEVC decoder,
and also updates the output pixel aspect ratio caps base on the one from the
enhanced frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:55 +00:00
Julian Bouzas
d66213bfa3 lcevcdec: Peek the decoder for output resolution
The output resolution is not always twice as big as the input resultion divided
by the pixel aspect ratio. This is the case for LCEVC '0D' mode, where the
output resolution is the same as the input resolution, and the only enhancement
is the picture being clearer.

This patch uses LCEVC_PeekDecoder() after sending the LCEVC enhancement data to
know what the output resolution will be before allocating the output picture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:54 +00:00
Julian Bouzas
3208d6c62a lcevcdec: Fix LCEVC picture access flags
Even though the LCEVC decoder works fine without this, it is recommended to
set read access to base pictures that are sent to the decoder, and write access
to enhanced pictures that are received from the decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:54 +00:00
Julian Bouzas
265b69520a lcevcdec: Fix width type typo
This was always meant to be gint instead of gint32.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9463>
2025-08-21 14:00:53 +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
48dd6aee51 vulkanh265dec: fix validation layer complain
Silence the validation VUID-VkImageMemoryBarrier2-srcAccessMask-03915

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9591>
2025-08-20 20:11:18 +02:00
Ian Napier
aee742223c decklinkvideosrc: fix decklinkvideosrc becomes unrecoverable if it fails to start streaming
See #2611

When transitioning to PLAYING we call IDeckLinkInput::StartStreams() (via GstDecklinkInput::start_streams). This can
fail for various reasons, including if the hardware device is already in use.

Previously, we logged StartStreams() failure as an element error but otherwise continued to successfully transition to
PLAYING. Now, if StartStreams() returns an error we fail the state change.

If StartStreams() fails then a subsequent call to StopStreams(), when transitioning PAUSED to READY, will also fail.

Previously, if StopStreams() failed then the state change also failed. Unfortunately this prevented the element from
later being disposed, which in turn meant the associated hardware resources was never freed. Consequently, if a
decklinkvideosrc failed to transition PAUSED to READY, then the associated hardware device could not subsequently be
used by any other decklinkvideosrc.

Now, we log an element error if StopStreams() fails but otherwise consider the state change to have succeeded. This
means that the element can be disposed and the associated hardware resource released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9578>
2025-08-20 11:38:03 +00: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
c63d3b5cb4 tests: fix queues for vulkan h26x encoders
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9571>
2025-08-18 19:46:26 +02:00
Víctor Manuel Jáquez Leal
c1d0fb0165 vulkanh26xdec: fix debug category name
This is a regression from merge request !78011

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9560>
2025-08-16 16:33:14 +00:00
Víctor Manuel Jáquez Leal
9c93152599 vulkanh26xdec: re-negotiate after FLUSH
Vulkan decoders also have the same issue as VA decoders fixed in !9457, where
FLUSH event doesn't renegotiate downstream the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9560>
2025-08-16 16:33:14 +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
Jan Alexander Steffens (heftig)
fbe7a86973 tests: cccombiner: Test durationless buffers
Crashes without the previous fix.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9415>
2025-08-15 00:12:03 +00:00