Commit graph

2410 commits

Author SHA1 Message Date
Seungha Yang 73744df6e4 d3d12memory: Make d3d12memory CPU accessible
Add support for gst_memory_{map,unmap} without GST_MAP_D3D12 flag

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Seungha Yang 68cfb64ae3 d3d12: Fix d3d12sdklayer setup and d3d12device debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5345>
2023-09-19 08:52:04 +00:00
Víctor Manuel Jáquez Leal 4c5e17308e vaallocator: don't update size in info for single plane images
Don't update info's size with the VA image reported data size for single plane
images, since drivers might allocate bigger space than the strictly required to
store the image, but when we dump the buffer as is (using filesink, for example)
the produced stream is corrupted. For multi-plane images video meta is required
to read/write them.

We updated info's size because gstreamer-vaapi did it too, but the reason to
update it there was for uploading and rendering surfaces (commit c698a015).

Furthermore, this patch adds an error message if the allocated data size for the
image by the driver is lesser than the expected because it would be a buggy
driver.

Fixes: #2959
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5308>
2023-09-18 14:55:10 +00:00
Víctor Manuel Jáquez Leal b5de07a8c5 msdk: meson: don't warn deprecated symbols
Since it's impossible to not to use any because any possible version mismatch
between the header and the runtime, such in the case of the denoise structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5283>
2023-09-18 09:30:33 +00:00
Víctor Manuel Jáquez Leal b3b2f3016c msdkdec: fix method declaration signature
Thus silencing a compilation warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5283>
2023-09-18 09:30:33 +00:00
Seungha Yang d849e238fe d3d12: Add AV1 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:39 +09:00
Seungha Yang 10bda3a12a d3d12: Add VP9 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:39 +09:00
Seungha Yang fb27733dd8 d3d12: Add H.265 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:39 +09:00
Seungha Yang 734dd50879 d3d12: Add H.264 decoder
Adding Direct3D12 h264 decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:53:24 +09:00
Seungha Yang 2c058b3b99 d3d11decoder: Port to GstDxva
Use new DXVA baseclass

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:30:07 +09:00
Seungha Yang 729c11cb0c dxva: Add DXVA decoder baseclass implementation
Extract Direct3D version independent common DXVA logic from d3d11
decoder so that it can be used by the other APIs (D3D9 and D3D12)
as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4161>
2023-09-17 18:30:03 +09:00
Seungha Yang 48a0c01570 h264decoder: Update latency dynamically
The actual number of reorder frames is unknown
unless frame reordering is disabled
(e.g., POC type 2 or constrained-* profiles).
Also derived maximum DPB size or max_num_reorder_frames in VUI
is not the upper bound of output delay.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2702
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5326>
2023-09-17 01:43:29 +09:00
Seungha Yang bd25c2738e nvdecoder: Copy output frame if needed
Even if decoder is negotiated with CUDA memory feature, if downstream
proposed no buffer pool, assume that the pool size is unknown.
And disable zero-copy if there's no more free output surface.
Or, in case of reverse playback, always copy frames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5338>
2023-09-17 00:15:47 +09:00
Seungha Yang c5a5dcdf18 nvh265dec: Reconfigure decoder on max-dpb-size change
Decoder should create new picture pool for larger DPB size

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5338>
2023-09-16 23:00:11 +09:00
Seungha Yang 85f01d7709 d3d11h265dec: Reconfigure decoder on max-dpb-size change
Decoder should create new picture pool for larger DPB size

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5338>
2023-09-16 22:56:03 +09:00
Seungha Yang 6785c7d378 av1parser: Fix segmentation params update
Even if the segmentation feature value is not updated,
the parsed "segmentation_update_map" and "segmentation_temporal_update"
values should not be cleared as it's referenced during lower
level bitstream parsing. Also, don't use assert() in parser
unless it's clearly impossible condition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5334>
2023-09-16 07:50:41 +09:00
Seungha Yang 3ac2690807 h265decoder: Fix DPB overflow
If DPB is full already, GstH265Decoder::new_picture() might fail if
subclass uses fixed size picture pool and its size is equal to the DPB
size. Call the new_picture() after DPB is cleared in gst_h265_decoder_dpb_init()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5333>
2023-09-15 18:26:31 +00:00
Matthew Waters 86f00367fc androidmedia/enc: handle codec-data before popping GstVideoCodecFrames
Issue is that when amc was producing a codec-data buffer, a
GstVideoCodecFrame was being popped off the internal queue.  This meant
that the codec-data was being associated with the first input frame and
the second (first encoded buffer) output buffer with the second input
frame.  At the end (assuming one input produces one output which seems
to hold in my testing and how the encoder is currently implemented)
there would be an input frame missing and would be pushed without any
timing information.  This would lead to e.g. muxers rejecting the buffer
without PTS and failing to mux.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5330>
2023-09-15 17:47:17 +03:00
Matthew Waters bec57df2f8 androidmedia/enc: add fixme log about partial frames
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5330>
2023-09-15 13:46:47 +00:00
Mengkejiergeli Ba b3e7404312 msdkvpp: Add compute scaling mode
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5128>
2023-09-14 13:50:48 +08:00
Mengkejiergeli Ba 887b4095ca msdkvpp: Enable HDR-to-SDR tone mapping
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5277>
2023-09-13 14:58:59 +08:00
Mengkejiergeli Ba 0ee7ebd17d msdkvpp: Set color properties for input and output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5277>
2023-09-13 14:58:59 +08:00
Matthew Waters c6b867e470 vulkancolorconvert: actually support passthrough correctly
e.g. passthrough of YUV (or RGB) formats should not modify any buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5317>
2023-09-13 01:12:18 +00:00
Mengkejiergeli Ba 8ab6559362 msdkh265enc: Use vpl APIs to handle HDR SEIs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5135>
2023-09-12 07:36:39 +00:00
Thomas Schneider 2f3fea33ca androidmedia: fix hevc codec profile registration
Fix the codec registration logic such that all supported
profiles are available instead of just the first in the
list.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5282>
2023-09-11 12:00:05 +00:00
Sebastian Dröge 889a3fe932 rtmp2: Set default flash version to NULL
This is consistent with the librtmp-based old rtmp plugin and ffmpeg.
While some servers require a valid flash-version, others are failing
with a too long or any flash-version at all.

By changing to the same default as in the old plugin and in ffmpeg,
GStreamer will at least behave the same and will work and fail with the
same servers without setting a flash-version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5293>
2023-09-11 08:23:33 +00:00
Nicolas Dufresne c7e6463e9e doc: Update cache after template pixel formats changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5304>
2023-09-10 19:13:28 -04:00
Nicolas Dufresne 16ae1286d1 wayland: Use generated formats list
Update the order according to what the generator produces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5304>
2023-09-10 19:06:07 -04:00
Víctor Manuel Jáquez Leal b7ded81f7b vkbufferimagepool: short circuit usage for decoding
NVIDIA & RADV drivers don't report decoding features for color format. Setting
requested usage to zero to short circuit validation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 18:11:55 +02:00
Matthew Waters 9d79852890 vkformat: assume that unknown rgb transfer is sRGB
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters b82a402bf1 vkformat: also check configured usage flags
This does also mean that if the primary format fails this check, we need
to try the secondary format before returning an error

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2957
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters 4d3b03e8e8 vkformat: invert srgb and multiplane && planes > 1 checks
The primary format for RGB includes sRGB transfer but was not actually
being used.

The !(no_multiplane && planes > 1) check for YUV resulted in those
formats never being used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters 8a9d630e3b vkformat: FORMAT_FEATURE_COLOR_ATTACHMENT also includes INPUT_ATTACHMENT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Matthew Waters 6c534655d4 vkformat: reorder RGBA formats before RGBx formats
Fixes gst_vulkan_format_to_video_format to use the RGBA formats instead
of RGBx formats.

Fixes vulkansink exposing a RGBx/BGRx format instead of the more
relevant RGBA/BGRA formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Aleksandr Slobodeniuk a98330636a h264/h265parser: clarify some gtk-doc annotations
Needed for the documentation since the transfer
is not obvious.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5287>
2023-09-08 13:41:01 +00:00
Seungha Yang efe35a3f6c h264parse, h265parse: Fix potential integer overflow
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2961
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5295>
2023-09-08 12:45:12 +00:00
Seungha Yang f9169c5431 nvdecoder: Move common logic to decoder helper object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang 6cf6c73712 d3d11decoder: Move common logic to decoder helper object
We can remove duplicated code by using the GstCodecPicture struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang 97fc02cfe3 av1decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang a73c6d7fb6 vp9decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang 4571fac946 vp8decoder: Port to GstCodecPicture struct
... and remove unused "pts" variable from GstVp8Picture struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang a5ddf7af3b mpeg2decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang 6e7cab43be h265decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang ea3dfadbed h264decoder: Port to GstCodecPicture struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Seungha Yang d69bacb954 codecs: Define common codec picture struct
Adding parent class of codec picture struct

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5285>
2023-09-08 11:51:23 +00:00
Robert Mader 649eeeaa27 wlvideoformat: Add P010
It is similar to NV12 but has 10bits per channel instead of 8.
As it is supported by many modern GPUs, VA-API and an increasing
number of Wayland compositors, let's support it as well.

Also bump the required libdrm version accordingly and add a temporary
define for the WL_SHM format.

Tested with Weston, Mutter and Sway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275>
2023-09-07 13:50:48 +00:00
Robert Mader fd82342bbd waylandsink: Move format caps list to shared library
So it can be shared and more easily updated. While on it, order the
formats according to the documentation for GstVideo.VIDEO_FORMATS_ALL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275>
2023-09-07 13:50:48 +00:00
Akihiro Sagawa 3c7ba382db codecparsers: Fix MPEG-1 aspect ratio table
The values defined in ISO/IEC 11172-2 are different from those used so far.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5272>
2023-09-06 12:24:37 +00:00
He Junyan 6b23f2c4be va: baseenc: use in_info rather than input_state->info
The in_info is correct video info which already considers the
DMA kind caps case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5289>
2023-09-06 15:40:03 +08:00
He Junyan 732a32a243 va: Add modifier paramters check for va_create_surfaces()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5267>
2023-09-01 17:26:51 +08:00