Nirbheek Chauhan
da86a92a2d
msdk: Fix libdrm dependency detection and usage
...
drm_fourcc.h should be picked up via the pkgconfig include, not the
system includedir directly.
Also consolidate the libdrm usage in va and msdk.
All this allows it to be picked up consistently (via the subproject,
for example).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7760 >
2024-10-27 12:29:08 +00:00
Víctor Manuel Jáquez Leal
85b4fbf40b
msdk: replace strcmp with g_strcmp0
...
Because strcmp doesn't handle NULL.
Fixes : #3721
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7349 >
2024-08-13 18:13:56 +01:00
Víctor Manuel Jáquez Leal
6f7d62eb73
msdk: sink context reference
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6527 >
2024-04-03 16:34:26 +00:00
Mengkejiergeli Ba
fc38459e50
msdk: Fix possible memory leaks
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6161 >
2024-02-22 11:53:06 +00:00
Mengkejiergeli Ba
bf7f4eef20
msdk: Use gst_video_info_dma_drm_to_video_info to extract video info
...
Note that we need mappings for all drm_fourcc, otherwise we will get
GST_VIDEO_FORMAT_UNKNOWN for some formats...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5991 >
2024-01-31 06:24:13 +00:00
Mengkejiergeli Ba
b8cb0d1d7f
msdkdec: Fix leaks
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5930 >
2024-01-18 08:43:48 +00:00
Mengkejiergeli Ba
a6ab4fa98b
msdkdec: Let msdk base decoder maintain the output_state
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5929 >
2024-01-17 10:04:03 +08:00
Mengkejiergeli Ba
2c61fd92e2
msdkvpp: Fix dma caps negotiation
...
Modify the fix_output_format in vpp to directly generate caps with
negotiated src caps, and we have the correct dma caps negotiation in
fix_output_format function. And thus, we can remove the redundant
negotiation of using function pad_accept_memory in vpp.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5845 >
2024-01-16 14:04:05 +08:00
Mengkejiergeli Ba
0d04660c5d
msdk: Fix memory leaks
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5819 >
2024-01-11 14:52:45 +08:00
Mengkejiergeli Ba
14c5d3ee91
msdk: Modify the caps order when register plugins
...
With this patch, the caps is registered in the order of memory features
as: VAMemory, DMABuf then raw caps in linux path, and D3D11Memory then
raw caps in windows path. It helps to prioritize the video memory for all
msdk elements when doing negotiation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5898 >
2024-01-10 01:14:21 +00:00
Mengkejiergeli Ba
7d62166098
msdk: Remove useless function for vp8dec and vc1dec in windows path
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5898 >
2024-01-10 01:14:21 +00:00
Mengkejiergeli Ba
5d488c444e
msdkvpp: Remove passthrough condition in propose_allocation
...
According to basetransform func: gst_base_transform_do_bufferpool,
it is the upstream to decide if it needs a bufferpool from vpp, so
we don't need passthrough condition in subclass propose_allocation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5879 >
2024-01-04 04:35:40 +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
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
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
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
Seungha Yang
c432a73e80
msdk: Fix build error after d3d11 API change
...
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3158
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5723 >
2023-11-28 19:17:20 +09:00
Mengkejiergeli Ba
cef1f179c6
msdk: Add device env in plugin dependencies
...
Add env vars GST_MSDK_DRM_DEVICE in plugin_add_dependencies to register
msdk plugins according to user's choice in a multi-gpu platform.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5615 >
2023-11-15 02:34:27 +00:00
Mengkejiergeli Ba
c14f4cda0c
msdkvpp: Use filter flag to handle passthrough for tone mapping
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5449 >
2023-10-12 05:02:37 +00:00
Tong Wu
57bfbf51b2
msdkvpp: fix an issue which causes dangling pointer
...
Put all the external buffer structures into thiz to avoid being freed
early.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5377 >
2023-09-22 10:04:30 +08: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
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
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
Mengkejiergeli Ba
8846400b83
msdkh264enc: Set profile as unknown when not specified by downstream
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5039 >
2023-07-26 02:01:31 +00:00
Mengkejiergeli Ba
b9ecd4e618
msdkenc: Apply update functions when setting property
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4865 >
2023-06-25 02:03:28 +00:00
Mengkejiergeli Ba
1308b2f6e5
msdkenc: Add help functions to check and update property
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4865 >
2023-06-25 02:03:28 +00:00
Víctor Manuel Jáquez Leal
94250e8c31
msdk: remove libva check before 1.12
...
Since gstmsdk depends on gstva library it also bumps the required version.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4781 >
2023-06-08 08:50:05 +00:00
Mengkejiergeli Ba
a15a16c99b
msdkenc: Add a property to insert pic timing SEI for avc and hevc
...
User can decide whether to insert pic timing sei with pic_struct
syntax via oneVPL API mfxExtCodingOption.PicTimingSEI.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4673 >
2023-05-29 02:11:20 +00:00
Ma, Mingyang
a2e83a019a
msdkdec: Fix decoding cases with resolution change (VP9)
...
The resolution of VP9 video can be changed without keyframe.
The change detected by MSDK/VPL should be negotiated with downstream.
Only the situation can be fixed here if the changed resolution is less than or equal to the initial surface resolution.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4450 >
2023-05-19 05:51:36 +00:00
Yinhang Liu
76fe73806b
msdkenc: Remove unsupported image formats for MSDK path
...
For unsupported encoding formats, please use msdkvpp plugin
to do conversion first.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4000 >
2023-05-19 00:02:09 +00:00
Yinhang Liu
f292b6061c
msdkenc: Remove internal vpp function
...
The internal vpp function and msdkvpp plugin are duplicated,
so remove the internal vpp, please use msdkvpp plugin to do
conversion if necessary.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4000 >
2023-05-19 00:02:08 +00:00
Mengkejiergeli Ba
7613e50cbb
bad:docs: Add new properties description for msdkh264enc and msdkh265enc
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4589 >
2023-05-18 17:53:44 +00:00
Mengkejiergeli Ba
7d993f930b
msdkenc: Add properties max/min-qp for I/P/B frame separately in avc and hevc
...
max-qp and min-qp will set the same quantizer scale for I/P/B frames,
while max-qp-i/p/b and min-qp-i/p/b enable the max/min quantizer for I,P,B
frame separately. When max/min-qp and max/min-qp-i/p/b are given
simultaneously, the later set one will overide the previous one.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4589 >
2023-05-18 17:53:44 +00:00
Yinhang Liu
c5748c2051
msdkmjpegdec: Fix ColorFormat for BGRx format
...
For msdkmjpegdec, the BGRx format is supported in src caps,
set the ColorFormat to MFX_JPEG_COLORFORMAT_RGB.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4489 >
2023-05-15 05:41:35 +00:00
Yinhang Liu
3883ae8c2a
msdk: Fix initialization of the msdk_session.impl_idx
...
This fixes the issue of msdk_session.impl_idx not being initialized.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4448 >
2023-05-15 01:22:29 +00:00
Tong Wu
b05659859a
msdk: fix a not referenced build error
...
Error Type: error C4189: ‘dma_caps’: local variable is initialized but not referenced
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4587 >
2023-05-10 07:57:45 +00:00
Yinhang Liu
cb5c0e47c8
msdk: Remove unreachable statement
...
The execution cannot reach the statement: "gst_caps_unref(dma_caps);",
so remove it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4449 >
2023-05-09 05:57:06 +00:00
Yinhang Liu
35177b81b3
msdk: Fix segfault for OneVPL dispatcher + legacy MSDK runtime path
...
From the spec, the OneVPL dispatcher should be able to work with
legacy MSDK runtime:
https://www.intel.com/content/www/us/en/docs/onevpl/upgrade-from-msdk/2023-1/onevpl-hardware-support-details.html
Currently supported capabilities:
OneVPL dispatcher + OneVPL runtime: dynamic capability
MSDK dispatcher + MSDK runtime: static capability
MSDK dispatcher + OneVPL runtime: static capability
OneVPL dispatcher + legacy MSDK runtime: static capability
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2506
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4466 >
2023-04-25 08:09:29 +00:00