Commit graph

2836 commits

Author SHA1 Message Date
Seungha Yang d316356bf2 d3d12memory: Add alloc_wrapped() method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 3308a976bd d3d12: Add upload element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang e4f794cbdd d3d12bufferpool: Wait fence before reusing buffer
Buffer can be released without waiting fence for previous commands

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:39:00 +00:00
Seungha Yang 1c5bba4b6b d3d12decoder: Remove ID3D12Device4 interface requirement
Old OS may not support the interface. And allow 11_0 feature level
hardware.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 4e5d4a45a3 d3d12decoder: Reduce the number of resource barriers
Single barrier per texture is sufficient in case of array-of-textures.
Avoid unnecessary decay barriers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang e6bdb0458c d3d12decoder: Use flexible task queue
Instead of using fixed size command allocator array, make it
resizable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang efc023e76e d3d12: Rework command scheduling
* Use single fence object per queue and remove GstD3D12Fence
  implementation
* Add a helper method for texture copy
* Run background thread and release unused resource from the thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 6d7d9291c3 d3d12: Add resource pool objects
Adding pool objects for command list, command allocator, and descriptor
heap

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 93458c0155 d3d12memory: Add more SRV/RTV getter methods
Adding a method so that memory object can create SRV/RTV
on external descriptor heap. And remove unused methods

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Seungha Yang 2578f234dd d3d12: Remove d3d11 dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5870>
2023-12-29 14:38:59 +00:00
Olivier Crête e19428a802 onnx: Update build instructions to use onnx-runtime 0.16.3
This synchronizes it with the meson.build file

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5861>
2023-12-22 14:43:23 -05:00
Víctor Manuel Jáquez Leal fdfd51397b vajpegdec: only support progressive mjpeg streams
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal ec4054e637 jpegparse: always forward pixel-aspect-ratio
And by default it's 1/1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal ae55ebfdf2 jpegparse: fix endianness
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 470b90a14a jpegparse: on app0 use fourcc rather than strings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 367deef132 jpegparse: dump whole failed app marker
Instead of just log the parsed string. It's better for debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 658b5b4399 jpegparse: don't trigger message for failed com marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 497890f678 jpegparse: refactor renegotation
Instead of comparing caps, just signal when renegotation is needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 03d51244c0 jpegparse: pass colorimetry in caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Víctor Manuel Jáquez Leal 20b636ee9a jpegparse: add support interlaced mjpeg
Interlaced MJPEG is a big hack. Most of the streams we've found are from old
AVID tools. There are two methods to detect interlaced stream: the container
offers a height bigger (or double) than the image's height in SOF. The other
is from a APP0 marker.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5838>
2023-12-22 04:38:06 +00:00
Aaron Boxer e2ee207367 onnx: add README outlining install and test instructions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5816>
2023-12-20 14:48:41 -05:00
Marek Vasut 5f3d4215a0 v4l2codecs: Switch gst_codec_picture_ts_ns() to gst_util_uint64_scale_int()
Instead of plain multiplication, use gst_util_uint64_scale_int()
to achieve the same effect with additional checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 3335af0efe v4l2codecs: Deduplicate picture frame number to timestamp in ns
Add macro which converts picture frame number to suitable timestamp in
nanoseconds for use in V4L2 VB2 buffer lookup. Since multiple codecs do
the same operation and almost all got it wrong, do it in one place so it
can be fixed in one place again, if needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 552a171671 vp9decoder: Simplify gst_v4l2_codecs_vp9_dec_fill_refs()
In case reference_frames is NULL, return outright. Remove the
duplicate check from subsequent conditionals. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 4560cdff5c h265decoder: Align wraparound fix
Instead of casting GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) to u64,
use 1000ULL which is also u64 . This only aligns the behavior here
with '*decoder: Fix multiplication wraparound' commits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 7725aa7d77 h264decoder: Align wraparound fix
Instead of casting GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) to u64,
use 1000ULL which is also u64 . This only aligns the behavior here
with '*decoder: Fix multiplication wraparound' commits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 3cbf09d0c9 mpeg2decoder: Fix multiplication wraparound
The GstMpeg2Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecMpeg2Dec *_ref_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during MPEG2 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 50fb6f8c02 av1decoder: Fix multiplication wraparound
The GstAV1Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecAV1Dec v4l2_av1_frame.*_frame_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during AV1 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 6f74818a07 vp9decoder: Fix multiplication wraparound
The GstVp9Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecVp9Dec v4l2_vp9_frame.*_frame_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during VP9 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Marek Vasut 15c9a6caa9 vp8decoder: Fix multiplication wraparound
The GstVp8Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecVp8Dec v4l2_vp8_frame.*_frame_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during VP8 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
2023-12-20 18:47:39 +00:00
Mengkejiergeli Ba 141cd38715 h264parse: Remove dead code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5833>
2023-12-20 13:03:25 +00:00
Sebastian Dröge 2e86fb691a video-format: Fix format order once again
RGBA should be before RBGA. Both the Python script and the gstreamer-rs
tests agree on that, but somehow this is not caught by the CI.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5837>
2023-12-20 05:33:43 +00:00
Olivier Crête f5d5f2cf1a meta: Add API to register metas in two steps
And also remove the specific registration APIs for
serializable meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5830>
2023-12-19 22:41:31 +00:00
Olivier Crête 2a9c4e3270 meta: Move the clear operation to its own vfunc
Some transforms always assumed that the transformation was some kind
of copy. So adding a "clear" operation didn't work out in practice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5830>
2023-12-19 22:41:31 +00:00
Philippe Normand 61d3f5c8e0 play: Include pipeline dump in error details structure
This can be useful for debugging purposes. It can't be done on application side
because the on_error callback tears down the pipeline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5828>
2023-12-18 20:13:38 +00:00
Philippe Normand c6c567e3e4 play: Fix error details parsing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5828>
2023-12-18 20:13:38 +00:00
Robert Mader c481fe7059 camerabin: Correctly relink viewfinderbin_queue
This reverts a part of de92a6c7f2. Unlike `image_filter` and
`video_filter`, `viewfinder_filter` does not get linked to `src` but
`viewfinderbin_queue`. Thus the fix in the mentioned commit does not
apply for it and should be reverted.

This was not spotted earlier as only the other filters are used in
the project that uncovered the issue.

Fixes: de92a6c7f2 ("camerabin: Fix source updates with user filters")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5689>
2023-12-18 17:07:31 +00:00
Seungha Yang 890d59e97e av1parser: Fix array sizes in scalability structure
Since the AV1 specification is not explicitly mentioning about
the array size bounds, array sizes in scalability structure
should be defined as possible maximum sizes that can have.

Also, this commit removes GST_AV1_MAX_SPATIAL_LAYERS define from
public header which is API break but the define is misleading
and this patch is introducing ABI break already

ZDI-CAN-22300

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5823>
2023-12-18 10:58:24 +00:00
Xavier Claessens 533f814fd9 h264parse: test - AU align with SEI between frame slices
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5741>
2023-12-17 21:42:47 +00:00
Daniel Morin 49f200cb54 h264parse: Improved AU boundary detection
- AU boundary detection reviewed to follow more closely H.264 spec. and more
  specifically clauses 7.4.1.2.3 and 7.4.1.2.4.
- The gist of the changes is a look-a-head in then next AU required identify the
  last vcl-nal of current AU and firt vcl-nal of next AU (according to
  7.4.1.2.4) followed by the identification of the first nal of next AU
  (according to 7.4.1.2.3).
- A backlog of all nals of current AU and next AU up to the point where current
  AU can identified completed is kept.
- In NAL alignement mode vcl-nal are sent immediatly but the history is kept to
  allow AU boundary detection. Non-vcl-nal can be delayed up to the reception of
  the next vcl-nal to allow a correct AUD insertion.
- Based on this improved AU boudary detection we can avoid erronous AUD
  insertion, like the one highlighted by test
  test_parse_sliced_with_prefix_and_sei_nal_au.
- Add support for MVC AU boundary detection. (H.7.4.1.2.4)
- Explicitly report SVC not supported. We don't have the SVC NAL parsing
  required to identify boundary. (missing dependency_id and quality_id fields
  from SVC, see G.7.4.1.2.4)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5741>
2023-12-17 21:42:47 +00:00
Xavier Claessens f076a9bf2f unixfd: Serialize buffer metas
Serialize every GstMeta that supports serialization into the NEW_BUFFER
payload. This is especially important for GstVideoMeta in the case of
multiplanar buffers, or if stride!=width.

Sponsored-by: Netflix Inc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5355>
2023-12-17 16:13:26 +00:00
He Junyan 35390de50d vacompositor: consider the DMA kind input for sink pad
Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan 0bbaa00c3f vacompositor: Override the update_caps() of video aggregator class
The input of the vacompositor may be DMA buffers. And in this case, the input
caps has the format=DMA_DRM, which can not be recognized by base video
aggregator class' find_best_format() function. So we need to override the
update_caps() virtual function.

Also we consider the DMA kind caps in negotiated_src_caps() for output.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan e68724c8e0 vacompositor: add helper function to get formats from caps
Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan c76999fe7b vacompositor: add helper function to choose format
The function is based on the most supported formats by Intel/Mesa VA drivers.

Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
He Junyan eb4d2dd204 vacompositor: record the input caps for each input pad
The caps of each input sink pad wil decide the final output format and
caps of the src pad.

Co-authored-by: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5160>
2023-12-16 10:56:09 +00:00
Seungha Yang 800a83b435 d3d12decoder: Implement threaded decoding
To achieve maximum throughput, waiting on command commit thread
is not ideal. And render-delay will introduce unwanted latency.
Best is to split thread and wait finished decoding job in a dedicated
output thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 22:56:33 +09:00
Seungha Yang 7471db9a30 d3d12decoder: Disable d3d11 interop
It does not seem to work with some AMD iGPU

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 20:40:21 +09:00
Seungha Yang 7afa914054 d3d12fence: Reset fence after waiting done
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:40 +09:00
Seungha Yang a24a155279 d3d12: Enable debug layer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:40 +09:00
Seungha Yang 7443cc00b5 d3d12: Requires ID3D12Device4 interface
ID3D12Device4::CreateCommandList1() method is required

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:39 +09:00
Seungha Yang 818c95e8c3 d3d12: Update allocation params signalling
Sync up with d3d11 implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5812>
2023-12-15 19:48:36 +09:00
Víctor Manuel Jáquez Leal 8210784dab vabasedec: clean up decide_allocation() vmethod
When creating a new VA pool set config size to zero because it's not used.

Also, given the potential different sizes from software buffer pools and VA
buffer pools, this patch handle that potential different values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 4fab6bb45a vabasetransform: clean up decide_allocation() vmethod
When creating a new VA pool set config size to zero because it's not used.

Also, given the potential different sizes from software buffer pools and VA
buffer pools, this patch handle that potential different values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 33e49023ff vacompositor: clean up decide_allocation() vmethod
When creating a new VA pool set config size to zero because it's not used.

Also, given the potential different sizes from software buffer pools and VA
buffer pools, this patch handle that potential different values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 1c7ce208bd vapluginsutils: add helper gst_va_create_other_pool()
This helper function creates a software-based buffer pool, where if size is
zero, its value is retrieved from the canonical size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Víctor Manuel Jáquez Leal 4a22cc8fb3 va: no need to provide a buffer size for VA pool
VA drivers allocate surfaces given their properties, so there's no need to
provide a buffer size to the VA pool.

Though, the buffer size is provided by the driver, or the canonical size
is used for single planed surfaces.

This patch removes the need to provide a size for the function
gst_va_pool_new_with_config() and adds a helper method to retrieve the surface
size, gst_va_pool_get_buffer_size(). Also change the callers accordingly.

Changes for custom VA pool creation will be addressed in the following commits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5805>
2023-12-14 12:50:32 +00:00
Seungha Yang fab1c5f953 d3d12: Use d3dx12.h helper library
... and remove manually implemented helper methods

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5807>
2023-12-14 18:08:00 +09:00
Seungha Yang 38c04a5f34 d3d12: Use DirectX-Headers and drop MinGW build support
There are some conflicts between MinGW toolchan and DirectX-Headers.
And due to ABI differences, more fixes are required.
We will support only MSVC build for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5807>
2023-12-14 18:08:00 +09:00
Mengkejiergeli Ba 41f13f4373 msdk: Remove dead code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5796>
2023-12-14 00:47:28 +00:00
Víctor Manuel Jáquez Leal f413714b37 vaallocator: use gst_va_display_check_version()
Instead of the local method to parse the vendor string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5800>
2023-12-13 09:12:28 +00:00
Víctor Manuel Jáquez Leal 8574bb8914 vadisplay: add gst_va_display_check_version()
This function compares the driver version with the user provided one to check if
driver's is equal or bigger.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5800>
2023-12-13 09:12:28 +00:00
Víctor Manuel Jáquez Leal 94e6a6e3de vaallocator: clean up use derived feature
Remove allocator member variable for use derived feature which doesn't need to be kept,
it's just for configuration purposes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5799>
2023-12-12 18:39:49 +01:00
He Junyan 5ae7bbf5fb va: h265dec: Add support for more -still and -intra profiles
They are actually compitable with the main and main-10 profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5797>
2023-12-12 21:30:16 +08:00
He Junyan 5345652896 va: Add decoder compatible caps string field into profiles' map
Some profiles such as main or main-10 in HEVC can support more
compatible profiles such as main-still-picture or main-10-intra.
We should add them into decoder's sink caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5797>
2023-12-12 21:30:08 +08:00
He Junyan 354aceb9cd va: Add the entrypoint parameter to gst_va_profile_caps()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5797>
2023-12-12 20:41:54 +08:00
Mengkejiergeli Ba 484a636841 msdkvpp: Add fix_format for src caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Mengkejiergeli Ba 5536f742e9 msdk: Add a help func to fix the map
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Mengkejiergeli Ba 8081a665f8 msdk: Remove func to export dmabuf to va surface
Since we use va allocator and va dma allocator to create surface, the
surface is already exported in the case of dma allocator. So remove
redundant export function in msdk allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu 61282ebd34 msdkenc: Add modifier support
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu 9ccdfae545 msdkvpp: Add modifier support
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu 63c0fdd29a msdkdec: Add modifier support
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Mengkejiergeli Ba e65e954e2b msdk: Config pool with max/min number of buffers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:12 +08:00
Yinhang Liu e668cf9305 msdk: Add help functions to handle drm caps
Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 14:56:03 +08:00
Yinhang Liu bf4703e9a0 msdk: Add modifier when creating dynamic caps
Add modifier in gst-inspect for dma features.

Co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 11:30:07 +08:00
Yinhang Liu 8100b04ea0 msdk: Add a helper function to get supported modifiers
The modifiers will be used when creating caps for dma feature.

co-authored-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5208>
2023-12-12 10:22:11 +08:00
Stefan Brüns ea6d602cca ladspa: Make RDF parsing truely optional
If the ladspa plugin is enabled explicitly or via auto-features, the
liblrdf dependency can not be disabled.

As the RDF parsing currently provides hardly any features, the possibility
to disable it fairly useful.

Fixes: #3168
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5794>
2023-12-11 14:49:42 +00:00
Kalev Lember 1dadccd48c openh264: Drop runtime version checks
With the way the runtime checks are currently set up, every single
openh264 release, no matter how minor, is considered an ABI break and
requires gst-plugins-bad recompilation. This is unnecessarily strict
because it doesn't allow downstream distributions to ship any openh264
bug fix version updates without breaking gstreamer's openh264 support.

Years ago, at the time when gstreamer's openh264 support was merged,
openh264 releases were done without a versioned soname (the library was
just libopenh264.so, unversioned). Since then, starting with version
1.3.0, openh264 has started using versioned sonames and the intent has
been to bump the soname every time there's a new release with an ABI
change.

This patch drops the strict version check. meson.build already has a
minimum requirement on openh264 version 1.3.0 where soname versioning
was added, which should be good enough to ensure that the library is
using soname versioning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5780>
2023-12-11 13:53:09 +00:00
He Junyan fac9fb2174 codecs: correct the print log for h265 picture getting by poc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5789>
2023-12-11 10:24:34 +00:00
Jordan Petridis 30c968f0ee build/mse: Add the enum sources to the test gstmse_private_test_dep
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5763>
2023-12-11 06:39:29 +00:00
Alessandro Bono 81169fca8e gstdtlscertificate: Define _WINSOCKAPI_ before including windows.h
This avoid a build failure when compiling against OpenSSL 3.2.0. The
problem is when windows.h is included before WinSock2.h. Because
windows.h includes winsock.h[1]. Defining _WINSOCKAPI_ stops windows.h
including winsock.h.

Error:
```
[748/1041] Compiling C object ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj
FAILED: ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj
[...]
Windows Kits\10\include\10.0.17763.0\shared\ws2def.h(235): error C2011: 'sockaddr': 'struct' type redefinition
Windows Kits\10\include\10.0.17763.0\um\winsock.h(482): note: see declaration of 'sockaddr'
```

[1] https://stackoverflow.com/a/1372836

Closes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5770>
2023-12-08 08:13:40 +00:00
Alexander Slobodeniuk 651dcb4912 d3d11: fix building with address sanitizer
When building with address sanitizer it gives next error:
"gstd3d11window_corewindow.cpp : fatal error C1128: number of sections
exceeded object file format limit: compile with /bigobj"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5779>
2023-12-07 21:36:20 +00:00
Víctor Manuel Jáquez Leal 7332eb6427 vaallocator: force non-derived for old mesa drivers
Mesa <23.3 can't map derived images for P010 format. This patch forces
non-derived if this is the case.

See: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24381
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Víctor Manuel Jáquez Leal ddf6fd9c61 va: check surface status before get derive image
According with documentation the surface has to be in ready state before getting
it derived image. This patch adds that check.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Víctor Manuel Jáquez Leal 6b1fba14bf vaallocator: remove runtime mapping selection
The original idea was to select the type of mapping (either using derive images
or downloading the image) in runtime, under the assumption that both methods
shared the same memory layout (offsets and strides), because a single
GstVideoMeta is assigned by the buffer pool at allocation time. Nonetheless, in
recent hardware this assumption is invalid, raising memory access errors.

This patch removes completely the mapping type selection at runtime, using the
method selected when the allocator is configured, synced with the bufferpool
allocation.

This problem was fixed originally for iHD driver only. But now it makes sense to
remove all of it.

Original-patch-by: Mengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Víctor Manuel Jáquez Leal 90af9b7704 vaallocator: don't fail if drm fourcc are different
When exporting a DMABuf from a VASurface the user might tell that the surface
was allocated with certain fourcc, but the returned VADRMPRIMESurfaceDescriptor
migth tell a different fourcc, as in the case or radeonsi driver, for duplicated
fourcc, such as YUY2 and YUYV.

Originally it was supposed to be a failed exportation. This patch relax this
validation by allowing different fourcc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5760>
2023-12-07 10:42:50 +00:00
Mengkejiergeli Ba be7e502769 msdk: Let deviceID config the mfx implementation
In multi-card scenario, user can set GST_MSDK_DRM_DEVICE env variable to
choose the device. This patch can align vpl's queried results with the
users' choice by passing deviceID when creating mfx implementation.

Co-authored-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5697>
2023-12-07 11:17:20 +08:00
Daniel Morin 81051c16b6 onnx: replace video-region-of-interest with analytics-meta
- Use analytics-meta/OD to transport object detection results

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5767>
2023-12-06 18:25:16 +00:00
Daniel Morin 4425562661 analytics: fix analytics-meta re-use
- Fix alignment error when source and destination analytics-meta have the same
  relation order.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5767>
2023-12-06 18:25:16 +00:00
Seungha Yang 012222bcb3 cudaipcsink: Fix deadlock on stop
Manually close connection if client does not hold any shared memory
on stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5747>
2023-12-06 16:09:27 +00:00
Seungha Yang ed5987efd4 d3d11ipcsink: Fix deadlock on stop
Manually close connection if client does not hold any shared memory
on stop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5747>
2023-12-06 16:09:27 +00:00
Seungha Yang b168647073 nvdec: Fix division by zero when calculating buffer duration
Don't try to calculate buffer duration from variable framerate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5764>
2023-12-06 13:38:09 +00:00
renjun wang 4ff2f07e51 v4l2codecs: av1: Fix typo in debug log message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5722>
2023-12-06 10:25:24 +00:00
Daniel Morin d3ebaa316d onnx: avoid leak on failure and cleanup
- Unmap buffer on Ort exception
- Avoid retrieving unused videometa

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Daniel Morin 15e5866e51 onnx: add offset and scale properties
- Offset each datapoint by the value set on offset property.
- Scale each datapoint by the value set on scale property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Daniel Morin 3793619a02 onnx: fix tensor id loading
- Fix quark genaration. String loaded from the model/file are not static.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Daniel Morin 48e3836482 onnx: Add support for float datatype
This is a bit of a hack solution has I think the correct solution is to
expose model caps on sinkpad (eventually sinkpads). Till then I think
this is reasonable.

- Add a property to onnxinference to set datatype.
- Fix internal buffer allocation size based on datatype.
- Extract method to remove alphe channel and convert to planar image
  when requested. Also template the method to support writing to buffers
  of different datatype.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>
2023-12-05 16:54:45 +00:00
Guillaume Desmottes 56e72889c1 meson: update PACKAGE_BUGREPORT
Some were still using pre-monorepo links.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5762>
2023-12-05 11:47:51 +01:00
Ruben Gonzalez 97817ef44c gstgaussblur: delete unused code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5737>
2023-12-04 18:54:31 +00:00
Daniel Morin aaee569087 analytics: replace id type from gint to guint
- Replace all id type from gint to guint
- Fix annotation for GstAnalyticsODMtdData

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5758>
2023-12-04 10:14:59 -05:00