Commit graph

118523 commits

Author SHA1 Message Date
Seungha Yang
461c4bc32c d3d11: Add support for more packed formats using compute shader
Adding below listed formats support, and reorders supported format
list based on preference

<YUV 4:2:2>
UYVY, VYUY, YVYU, v210, v216

<YUV 4:4:4>
v308, IYU2

<RGB 16bits per pixel>
RGB16, RGB15, BGR16, BGR15

<RGB 8bits per channel>
ARGB, xRGB, ABGR, xBGR, RGB, BGR

<RGB 10bits per channel>
r210, BGR10A2

<RGB 16bits per channel>
BGRA64

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717>
2023-11-27 15:14:09 +00:00
Seungha Yang
f23d4475b3 d3d11convert: Allow MSAA only for native DXGI formats
Enable MSAA only if converter can render directly on texture
without post-processing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717>
2023-11-27 15:14:09 +00:00
Seungha Yang
845f5d4856 d3d11: Rework memory allocation params signalling
Hide GstD3D11AllocationParams detail from public header and
set setter methods.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717>
2023-11-27 15:14:09 +00:00
Jan Alexander Steffens (heftig)
393e254255 baseparse: Reset metadata for reverse playback fragment buffers
Don't let the adapter leak uncontrollable values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5718>
2023-11-27 14:38:45 +00:00
Jan Alexander Steffens (heftig)
3319d152a8 baseparse: Add missing gst_buffer_make_writable
When the subclass attempts to finish without an explicit `out_buffer`,
we take a buffer from our adapter. We need to make this buffer writable
before copying the metadata.

This led to data races such as in the following pipeline, which randomly
messed up the buffer PTS:

    gst-launch-1.0 -e audiotestsrc timestamp-offset=5555 num-buffers=100 \
      ! opusenc ! tee name=t ! queue ! opusparse ! fakesink silent=0 \
      t. ! queue ! opusparse ! fakesink silent=0 -v | grep '0000, dur'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5718>
2023-11-27 14:38:44 +00:00
Philippe Normand
986a36273f pbutils: Don't include default vp9 parameters in resulting codec mime string
According to the document defining the vp9 codec string, the optional fields
should all be present only if at least one of them has a non-default value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5716>
2023-11-27 10:36:01 +00:00
Seungha Yang
721533d042 d3d11: Use shader model 4
Since shader model 4 is sufficient for the current pixel shader
implementations, prebuild HLSL with shader model 4 as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Seungha Yang
df0e6c4140 d3d11converter: Do not use R32_UINT UAV
It does not work well with YUY2 texture on some GPUs. Always use
the same DXGI formats for each SRV and UAV

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Seungha Yang
030800905b d3d11device: Remove outdated comment
We do support 4:2:2 YUV formats using compute shader now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Seungha Yang
3ab8d520fb d3d11: Drop legacy device support
Direct3D feature level 10 supported GPUs were released
more than 15 years ago, around the time when Windows
Vista / 7 were released. Also our d3d11 plugin/library
does not support feature level 9.x very well already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5709>
2023-11-25 20:27:43 +09:00
Philippe Normand
ee1b905ff3 dashdemux2: Fix a couple leaks and a use-after-move
The tags and caps were leaked for unknown streams, I'm not sure they'd be valid
in that case, but better safe than sorry.

The tags ownership is transfered when calling `gst_adaptive_demux_track_new()`
so unreffing those afterwards was a mistake.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5714>
2023-11-24 17:01:33 +00:00
Thibault Saunier
ce661c3b99 validate: Add support to replace variables in deeply nested structures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5713>
2023-11-23 16:56:40 -03:00
Tim-Philipp Müller
66835031f1 gitlab issue templates: add 'Question' template
.. and send people over to Discourse.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5561>
2023-11-22 21:54:33 +00:00
Tim-Philipp Müller
8adaf9b386 gitlab issue template: add link to Discourse forum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5561>
2023-11-22 21:54:33 +00:00
Link Mauve
4cd9dd3940 v4l2codecs: Query the right buffer before expbuf
We were previously always querying index 0, and while the number of planes per
buffer will never change, it seems more proper to query the right buffer rather
than always the first one.

This was found while reading strace logs, and wondering why the
V4L2_BUF_FLAG_MAPPED flag was present on all ¬0 indices even though that
happened before VIDIOC_EXPBUF.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5647>
2023-11-22 15:50:08 +00:00
Ruben Gonzalez
2d663880af debug: delete reference to gstdump script
It's an interesting script from @thiblahute my-devtools repository[1],
but no official.

[1] https://github.com/thiblahute/my-devtools

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5705>
2023-11-22 11:45:38 +01:00
Sebastian Dröge
773ea1c65e ci: Update to cargo-c 0.9.28
And remove useless comment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5698>
2023-11-21 21:00:50 +00:00
Stéphane Cerveau
15b719d7f6 vkbufferpool: add support for video encoded buffers
Add support for non video raw  buffers to allocate memory
such as in encoded content scenario.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5645>
2023-11-21 19:16:37 +00:00
Stéphane Cerveau
c6a5437e0d vkbufferpool: allow to set allocation params
Add the possibility to change the vulkan usage and mem properties from
external source.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5645>
2023-11-21 19:16:37 +00:00
Daniel Morin
d23a90cb16 analytics: base class for analytics meta
- GstAnalyticRelationMeta is a base class for analytics
  meta. It's able to store analytics results (GstAnalyticRelatableMtd)
  and describe the relation between each analysis results.
- GstAnalysisRelationMeta also contain an algorithm able to explore
  analysis results relation using a bfs.
- Relation(edge) between analysis results (vertice) are stored in an adjacency-matrix
  that allow to quickly identify if two analysis results are related and by
  which relation they related. It also work for indirect relation
  and can provide the path of analysis results by which two
  analysis results are related.
- One allocation per buffer to store analysis results. Here we rely on
  the application to guess how much space will be required to store all
  analysis results. This is something that could be improved
  significantly but it's a starting point.
- Define common analysis results, classification, object-detection,
  tracking that are subclass of GstAnalyticRelatableMtd. The also
  provide exemple of how to extend GstAnalyticRelatableMtd to have them
  benefit for the mechanim to express relation with other analysis
  results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4962>
2023-11-21 18:04:53 +00:00
Olivier Crête
aa7333fe43 meta: Add a new "clear" transform to avoid re-allocations
In the buffer pool, try to clear metas before freeing them so we
avoid constant reallocations on every frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4962>
2023-11-21 18:04:53 +00:00
Nicolas Dufresne
150adf6df4 videorate: Don't forget last_ts on caps changes
Whenever that caps changes does not imply that a new segment will start.
Don't reset the last_ts if only the caps have changed. This fixes issues
if you have a stream without only first frame with TS=0, and have resolution
change happening. This was a regression introduced by !3059, which issue was
described in #1352. The reported issue is still fix after this change.

Fixes #1034

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5687>
2023-11-21 16:36:37 +00:00
Jordan Petridis
c1c6d017c1 ci: Fix unbound variables for the check video formats job
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5699>
2023-11-21 15:16:09 +00:00
Stéphane Cerveau
159f24c07f vulkan: use gst_vulkan_device_select_queue
Use gst_vulkan_device_select_queue api to retrieve a valid queue
in vkupload, vkdownload, vkimagebufferpool, and vkvideofilter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5656>
2023-11-21 13:51:21 +00:00
Stéphane Cerveau
74c6298eb7 vkdevice: select queue with expected flags
Allow to select a queue with the given flags
such as compute bit etc from a given device.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5656>
2023-11-21 13:51:21 +00:00
Seungha Yang
0004a52866 qsvdecoder: Fix stream format detection
Fixing typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5700>
2023-11-21 21:22:47 +09:00
Nirbheek Chauhan
ec3962f9c7 directxmath.wrap: Fix cpuid mismatch on MinGW
This fixes a build failure with meson 1.3.0, which was caused by
a bugfix in Meson that made the cc.compile() check succeed on MSYS2
MinGW and enable DirectXMath SIMD, which in turn triggered the broken
`__cpuid()` issue mentioned in the meson.build file.

Upstream fix: https://github.com/microsoft/DirectXMath/pull/172

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5690>
2023-11-20 20:08:57 +00:00
Nirbheek Chauhan
f65d074354 meson: Rework d3d11 checks, add new d3d11-math option
This allows us to ensure that directxmath SIMD is enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5690>
2023-11-20 18:49:13 +00:00
Seungha Yang
b42b45af46 d3d11: Add Y412 format support
It's mapped to DXGI_FORMAT_Y416 and major format for 12bits 4:4:4
video decoding. Since DXGI_FORMAT_Y416 format cannot be a render target,
adding corresponding compute shader code too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5692>
2023-11-21 02:40:10 +09:00
Víctor Manuel Jáquez Leal
b83927f301 vulkanh264dec: add Vulkan H.264 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal
f3d63183dc vulkan: update gir file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Stéphane Cerveau
23a144dcec test: look for proper queue among multiple physical device
There might be multiple GPUs in a system and only one might provided vulkan
video extensions. Now, in order to run the tests, the proper GPU is looked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal
221811119a test: add vkvideodecode test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal
5bece78ca2 vkqueue: add decoder factory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal
4f475732bd vkdecoder: add gstvkdecoder helper object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal
8ee3ec105c vkvideo-private: video structures and session handle
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Stéphane Cerveau
96daac8ac7 vkvideoutils: add GstVulkanVideoOperation enum
To differentiate a video/x-h264 caps use with a decoder or an encoder
and get the correct video profile, the API expects an enum
GstVulkanVideoOperation to handle this difference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal
8ee0f04d8d vkvideoutils: add dec postfix to profiles
So it the future don't collide with encoding profiles.

Original-patch-by: Stéphane Cerveau <scerveau@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:20 +00:00
Víctor Manuel Jáquez Leal
bf7a01f3fd vkvideoutils: add video capabilities structure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Víctor Manuel Jáquez Leal
8023e3c19a vkvideoutils: add gst_vulkan_video_profile_is_equal()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Víctor Manuel Jáquez Leal
13d78652b7 vkvideoutils: add gst_vulkan_video_profile_is_valid()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Víctor Manuel Jáquez Leal
f896e2a347 vkvideoutils: add VkVideoDecodeUsageInfoKHR in profile
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Víctor Manuel Jáquez Leal
fd1b1332b7 vkvideoutils: if unknown codec nullify pNext
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Víctor Manuel Jáquez Leal
d5036e4429 vkvideoutils: mark as private members of profile structure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Víctor Manuel Jáquez Leal
e3054056ff vkimagebufferpool: set image's number of layers
Handle the image's number of layers as configuration so it can be set by the
user, still isn't exposed as function since it's very niche.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Stéphane Cerveau
d52d50570e vkmemory: avoid the property flag check
During the video session memory allocation, the property flags can
be different from the expected ones, so do not expect all the
property flags and test it with G_MAXUINT32

It's failing with driver 525.47.26 and NVidia HW NVIDIA GeForce
RTX 3050 and 2060

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
2023-11-20 13:32:19 +00:00
Seungha Yang
e235599fe9 d3d11: Update plugin doc cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5691>
2023-11-20 20:41:07 +09:00
Seungha Yang
522d883fc3 d3d11: Add support for Y210 and Y212 formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5691>
2023-11-20 20:29:13 +09:00
Seungha Yang
0ad1c07b20 d3d11testsrc: Bind UAV if needed
YUV packed formats require UAV

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5691>
2023-11-20 20:29:13 +09:00
Seungha Yang
ca14eeeeaa d3d11convert: Add support for YUY2 and Y410 output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5691>
2023-11-20 20:29:13 +09:00