Commit graph

480 commits

Author SHA1 Message Date
Fabian Orccon d07ffae343 h264parser: Write Unregistered User Data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5071>
2023-08-08 02:47:41 +00:00
He Junyan 919d398bff va: update the gst_va_dma_drm_info_to_video_info() to use DMA_DRM format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4044>
2023-08-07 22:49:26 +00:00
He Junyan 93d763b85c va: Use new dma drm caps in va pool when we setup DMA pools
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4044>
2023-08-07 22:49:26 +00:00
He Junyan d7d25de892 va: Use GstVideoInfoDmaDrm in DMA allocator's get/set_format() API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4044>
2023-08-07 22:49:26 +00:00
He Junyan ab9d11bc17 va: Include drm fourcc header file in gstvavideoformat.h
And add some definition to pass the Windows compiling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4044>
2023-08-07 22:49:26 +00:00
Nicolas Dufresne 0149d77eff waylandsink: Improve DMA DRM integration
Pass GstVideoInfoDmaDrm or GstVideoInfo whenever possible, avoiding passing
strange combination of GstVieoFormat + modifier. Even though we don't have any
at the moment, this also allow supporting GstVideoFormat that are not supported
in our DRM integration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5120>
2023-08-01 14:55:23 -04:00
Cheah, Vincent Beng Keat 6e22846301 waylandsink: Add DRM modifiers support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5103>
2023-07-27 17:08:26 +00:00
Mengkejiergeli Ba 809a984b91 va:allocator: Rework the func va_map_unlocked
Rework the va_map_unlocked() after we keep mapping behavior (whether to
use derive) consistent with allocator_try stage. Also remove the flag
for iHD case because pitch/stride difference between vaCreateImage and
vaDeriveImage only possibly happen on iHD by now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5046>
2023-07-27 15:04:01 +00:00
Mengkejiergeli Ba b997f541b2 va:allocator: Let pool alloc_info be consitent with the test order in gst_va_allocator_try
In gst_va_allocator_try, the first try is to use derive_image, if it
succeeds, we should use info from derived image to create bufferpool.
If derive fails, then try create_image and give created image info
to the pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5046>
2023-07-27 15:04:01 +00:00
He Junyan 5aa2239c4b codecs: AV1: Ensure current picture and frame to NULL before return
The current code fails to clear the current picture and frame pointer if
some flow error such as EOS happens. This causes the double free issue in
gst_av1_decoder_reset().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5104>
2023-07-26 16:27:43 +08:00
Fabian Orccon 216f9d66a0 h265parser: Write Unregistered User Data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5070>
2023-07-25 18:28:26 +00:00
Fabian Orccon dd47fa53d8 h265parse: Parse SEI unregistered user data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5070>
2023-07-25 18:28:26 +00:00
Seungha Yang 9a902afce4 codecs: Use release_frame() instead of drop_frame()
drop_frame() will post QoS message which is not intended here

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5024>
2023-07-13 13:48:46 +00:00
Seungha Yang 45766f2448 codecs: Propagate downstream flow ERROR
Don't translate downstream flow ERROR to OK

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5024>
2023-07-13 13:48:46 +00:00
Seungha Yang b18bd5ec2b d3d11bufferpool: Fix heavy CPU usage in case of fixed-size pool
There's no reason to release GstMemory manually at all.
If we do release GstMemory, corresponding GstBuffer will be
discarded by GstBufferPool baseclass because the size is changed
to zero.

Actual cause of heavy CPU usage in case of fixed-size pool
(i.e., decoder output buffer pool) and if we remove GstMemory from
GstBuffer is that GstBufferPool baseclass is doing busy wait in acquire_buffer()
for some reason. That needs to be investigated though, discarding
and re-alloc every GstBuffer is not ideal already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4935>
2023-06-27 23:25:09 +00:00
Seungha Yang 9aa1d683a2 d3d11poolallocator: Initialize flush flag with TRUE
If it's not active state, it should return flushing from acquire
method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4935>
2023-06-27 23:25:09 +00:00
He Junyan 6accb7a1f5 va: Only change video format in gst_va_video_info_from_dma_info()
The current way of using gst_video_info_set_format() will change all
fields of the GstVideoInfo. We only need to change its format, stride
and offset fields.

In order to keep the consistency with th common drm API, we rename the
gst_va_video_info_from_dma_info() into gst_va_dma_drm_info_to_video_info().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4883>
2023-06-26 16:18:23 +00:00
Stéphane Cerveau 2974c18a5c codecparsers: keep naming consistency in GST_H264_LEVEL
GST_H264_LEVEL_2 should be used instead of GST_H264_LEVEL_2_0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4737>
2023-06-26 10:47:36 +00:00
Stéphane Cerveau c98f5c2bf4 vkvideoutils: fix memory leak in structure's string
Retrieve a const char* from structure for "chromat-format" and
avoid extra mem copy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4904>
2023-06-22 04:42:58 +00:00
Stéphane Cerveau fc0ee45fb5 vkdevice: fix beta extensions symbol
Missing 's' to VK_ENABLE_BETA_EXTENSIONS

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4904>
2023-06-22 04:42:58 +00:00
Stéphane Cerveau c1149d60c1 vkphysicaldevice: fix leak with queue_family_query_props
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4904>
2023-06-22 04:42:58 +00:00
Stéphane Cerveau 6920166af4 vulkan: fix C2099 error with VS2019
As VK_FORMAT_FEATURE_2_xxx are defined as static const variable, the
vscoce C compiler prevents the initialization of the  vk_usage_map
structure with error "C2099: initializer is not a constant".

Init the structure separately.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4904>
2023-06-22 04:42:58 +00:00
Seungha Yang de749fa356 cuda: Introduce GST_CUDA_CRITICAL_ERRORS env to abort on critical error
Adding GST_CUDA_CRITICAL_ERRORS env variable so that program can be
terminated on unrecoverable error.

Example)
GST_CUDA_CRITICAL_ERRORS=2,700 gst-launch-1.0 ...

In this example, CUDA_ERROR_OUT_OF_MEMORY(2) and
CUDA_ERROR_ILLEGAL_ADDRESS(700) are registered as critical error
and program will be aborted on those errors

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4729>
2023-06-18 16:44:43 +00:00
Seungha Yang 58b166453d cuda: Move cuda debug helper function to .cpp
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4729>
2023-06-18 16:44:43 +00:00
Benjamin Gaignard 465d146864 codecparser: AV1: fix reference frame ordering
In AV1 specifications earliest_order_hint is initialized at
beginning of the process and not before each frame ordering.

FFMPEG parser does the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1011>
2023-06-16 01:30:40 +00:00
Seungha Yang 5b6ecf359e va: Fix Windows build
DRM_FORMAT_MOD_LINEAR and DRM_FORMAT_MOD_INVALID are not defined
on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4864>
2023-06-15 21:14:29 +00:00
Seungha Yang 842805d7c6 av1decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
Seungha Yang 77b9e1351a mpeg2decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
Seungha Yang 965e566156 vp9decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
Seungha Yang 7d2beab9b1 vp8decoder: Fix DPB size signalling
Take current frame into account for the DPB size signalling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4845>
2023-06-14 15:16:04 +00:00
Seungha Yang a88d90b777 d3d11: Log device removed reason
... and live objects. It could be useful hint for GPU debugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4170>
2023-06-14 06:23:12 +00:00
Víctor Manuel Jáquez Leal 06a2b2c7d9 va: dmabuf allocator to use GstVideoInfoDmaDrm
Change the internal GstVideoInfo structure in the GstVaDmabufAllocator to
GstVideoInfoDmaDrm in order to keep track of the exported DRM format by the
driver, and thus removing the DRMModifier quark attached as qdata in the
GstMemory. Though, the exposed API isn't updated yet; that has to go in a
second iteration.

Also this patch clean up some code (remove an unused buffer size assignation)
and fix some typos in documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan e00e64116a va: Add a helper function to detect the surface modifier
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan a01f2f0206 va: Lower the message level for va_export_surface_to_dmabuf()
Some surface formats such as GST_VIDEO_FORMAT_Y42B and GST_VIDEO_FORMAT_RGB
can be created but can not be exported as DMA buffer. You can not say that
this is a driver bug because the driver may never want to share this kind of
surface out of libva.
And this function will be used to detect modifiers later, so the error message
will be annoying.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan 7166fd3863 va: Extend the va_create_surfaces() function to accept modifiers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:37 +00:00
He Junyan 994ab957c1 va: Add a helper function to convert video drm info to video info
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:36 +00:00
He Junyan 547f3e8622 va: Map drm fourcc into va fourcc in video format
The fourcc defined in va.h and drm_fourcc.h sometimes is not identical.
For example, the I420 format is defined as "I420" in va.h but defined
as "YU12" in drm_fourcc.h.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4821>
2023-06-14 01:08:36 +00:00
Seungha Yang e422a991f3 h265decoder: Calculate DPB size based on level
As specified in "A.4 Tiers and levels", calculate DPB size based
on level in order to avoid over preallocated DPB

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4840>
2023-06-13 02:57:06 +00:00
Seungha Yang 15735a4ef3 d3d11converter: Add support for premultiplied alpha
Adding "src-alpha-mode" and "dest-alpha-mode" properties
and performs premultiplied alpha conversion if needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4825>
2023-06-10 18:12:58 +00:00
Seungha Yang 1aa9e74aaf cudadownload: Always download CUDA memory if it's bound to decoder
Decoder bounded CUDA memory is allocated by driver and the pool size
is fixed. Since we don't know how many buffers would be held by
downstream non-CUDA element, we should download such CUDA memory
and release it back to decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4810>
2023-06-08 22:27:06 +00:00
Víctor Manuel Jáquez Leal 53860147c6 va: bump libva version to 1.12
Remove all checks in gstva for all version lower than 1.12

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781>
2023-06-08 08:50:04 +00:00
Seungha Yang 1e5343f0c6 d3d11memory: Add support for resource sharing via NT handle
Adding gst_d3d11_memory_get_nt_handle() method so that GstD3D11Memory
can hold shareable NT handle and for easy reuse of it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4774>
2023-06-06 17:54:44 +00:00
Víctor Manuel Jáquez Leal e074cb55f7 va: remove unused parameters in internal function
gst_va_buffer_surface_new() don't use neither format, width nor height.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4768>
2023-06-04 19:16:53 +02:00
Víctor Manuel Jáquez Leal 06d793033d vulkan/format: use basic features (v1) as fallback
if vkGetPhysicalDeviceFormatProperties2 isn't available.

This approach assumes that, for basic features flags symbols,
VkFormatFeatureFlagBits and VkFormatFeatureFlagBits2 are binary equivalent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4746>
2023-06-01 13:58:47 +00:00
Matthew Waters 0a74a967e3 vulkan/format: don't rely on vulkan header version for function availability
e.g. android will have update vulkan.h headers but old platforms will
not contain the function and will result in a link error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4746>
2023-06-01 13:58:47 +00:00
Mathieu Duponchelle 211928ca41 webrtc/nice: put usage of OPTION_CONSENT_FRESHNESS behind check
See https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/257

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4750>
2023-06-01 00:42:28 +00:00
Colin Kinloch 82c449ce00 waylandsink: Emit "map" signal boarder surface is ready
This allows gtkwaylandsink to queue a draw of its gtk widget at the
correct time, avoiding a race.

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4722>
2023-05-31 18:57:56 +00:00
Víctor Manuel Jáquez Leal 8b75e5fb57 vkvideoutils: fix code-style
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal 365454790a vkphysicaldevice: fetch queue family query result support
And merged in a single structure the queue family operations report.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 10:08:27 +02:00
Víctor Manuel Jáquez Leal e2a40c58bf vkimagebufferpool: chain the correct structure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4716>
2023-05-26 09:45:07 +02:00