Commit graph

46 commits

Author SHA1 Message Date
Thibault Saunier 339e5916c6 Build documentation for rust plugins
- Update the docker image we use, starting using the standard one adding
  `gtk4-doc` as required by rust plugins
- Update the plugins_doc_caches as required, some more plugins are built
  with the new image
- Install ninja from pip as the version from F31 is too old
- Avoid buildings all GSreamer plugins when building the doc as it takes
  time and resources for no good reason
- Stop linking to `GInstanceInitFunc` as it is not present in latest GLib
  documentation, leading to warnings in hotdoc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2954>
2022-09-15 20:11:47 +00:00
Thibault Saunier 6a4425e46a meson: Call pkgconfig.generate in the loop where we declare plugins dependencies
Removing some copy pasted code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Seungha Yang 66d504ee58 d3d11: Don't find global default allocator
We were using global default allocator already. Pass null
allocator object to *_alloc() methods then the method will
use default allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2843>
2022-08-06 23:55:18 +09:00
Nirbheek Chauhan b2d22c0f00 meson: Don't pass -Werror to vendored code
Do it the correct way with libusrsctp -- override the option so that
it's done in a compiler-agnostic and future-proof way.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2494>
2022-07-30 11:27:12 +00:00
Seungha Yang cf94045dbf qsvencoder: Add support for D3D11 shared texture
Although input texture belongs to the other d3d11 device,
we can do GPU copy when its physical device is identical.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2790>
2022-07-23 16:53:14 +00:00
Seungha Yang 02c2485468 qsvencoder: Fix for latency report when B-frame is enabled
QSV runtime will introduce additional delay when B-frame is enabled

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2730>
2022-07-08 13:24:12 +00:00
Seungha Yang 4f90e9b561 qsvencoder: Do not query again if previous call succeeded
Don't need to query multiple times

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2730>
2022-07-08 13:24:12 +00:00
Seungha Yang aca71fd692 d3d11: Update gst_d3d11_allocation_params_new() interface
Define GST_D3D11_ALLOCATION_FLAG_DEFAULT (0) value instead of
casting enum type everywhere. And pass D3D11_RESOURCE_MISC_FLAG value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2646>
2022-06-27 19:33:57 +00:00
Seungha Yang 170271b86f d3d11: Revert staging buffer pool implementation
The staging buffer pool implementation was added to improve
throughput performance since we can avoid per-frame
CPU copy operation via staging texture but it turned out that
we can not make it thread safe. See
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1182

Reverting the staging texture implementation as it does not show
any visible value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2651>
2022-06-23 22:03:52 +09:00
Seungha Yang abd60b6b1e qsvdecoder: Fix system memory alignment
Do right padding, not left

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2651>
2022-06-23 21:43:25 +09:00
Seungha Yang 8e5a4246b9 qsvh264dec: Use newly added avcC data parsing API
Use gst_h264_parser_parse_decoder_config_record() method to parse
codec_data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2449>
2022-06-15 19:58:59 +00:00
Seungha Yang 44768b233a qsvencoder: Do not copy if input is D3D11 texture
In case that input is D3D11 texture, QSV seems to work regardless
of the alignment. Actually the alignment requirement seems to make
only sense for system memory.
Other Intel GPU dependent implementations (new VA encoder, and MediaFoundation)
do not require such alignment nor other vendor specific ones (NVENC and AMF)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2540>
2022-06-09 20:28:10 +00:00
Seungha Yang 7c8902c983 qsvencoder: Bind internal texture to render target
... so that memory allocator can initialize texture with black color

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2502>
2022-05-27 14:03:49 +00:00
Seungha Yang 4c384f8356 qsv: Add AV1 encoder element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2467>
2022-05-23 13:28:11 +00:00
Seungha Yang 8e665fa435 qsvencoder: Move common property to baseclass
adapter-luid and device-path are common for all codecs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2467>
2022-05-23 13:28:11 +00:00
Seungha Yang 909154a989 qsv: Disable non-MSVC build on Windows
... and remove pointless UWP consideration that will never work.

Cross-compiled binary has an issue which causes deadlock.
Although cerbero will not build this plugin for non-MSVC build,
people can still build this plugin and may complain its brokenness.

See also
https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/854

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2431>
2022-05-17 03:32:10 +09:00
Seungha Yang 81ee2a9f2a qsvencoder: Workaround for invalid DTS with VP9
SDK runtime seems to report zero DTS for all frames in case of VP9 but
we don't need to use DTS for the codec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2291>
2022-04-26 04:51:54 +09:00
Seungha Yang 6a3776c527 qsv: Add GPU description to element long-name on Windows
Would be useful for a multi-Intel-GPU system

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2249>
2022-04-20 18:49:18 +00:00
Seungha Yang 23e280f05b qsvdecoder: Use system memory for non-d3d11 downstream
QSV's memory download implementation seems to be more faster
than our implementation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 22:59:48 +09:00
Seungha Yang 9543998aa3 qsv: Add H.265 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:31 +09:00
Seungha Yang d136c98770 qsv: Include single gstva.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:31 +09:00
Seungha Yang fba44e8a01 qsvh264dec: Don't register element if it's not supported by device
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:31 +09:00
Seungha Yang 0692a5dde9 qsvh264dec: Add support for packetized format
Handle avc/avc3 packetized formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 20:57:26 +09:00
Seungha Yang 3c3274a8da qsv: Move debug init into each source file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 04:15:13 +09:00
Seungha Yang a9a49c235d qsvdecoder: Reset next_task_index per init_session()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2206>
2022-04-17 04:15:13 +09:00
Seungha Yang 86cf307a6c qsvencoder: Rename property name i-frames to idr-interval
... and clarify the meaning of the value for each h264 and h265
encoder since the usage of mfxInfoMFX::IdrInterval is different
per codec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2204>
2022-04-16 23:34:41 +09:00
Seungha Yang f848619ff4 qsvh265enc: Write HDR10 metadata SEI
If device supports HDR10 metadata API, write the information
into bitstream per IDR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2204>
2022-04-16 23:34:41 +09:00
Seungha Yang ad434759a9 qsv: Add JPEG encoder
Note that YUY2 is not supported yet, since the format support is not
implemented now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2142>
2022-04-10 23:38:07 +09:00
Seungha Yang 7b89cdbefe qsvencoder: Update property names and default values
Stop using MSDK plugins property naming, instead use unified names
and default values to be consistent with newly written NVIDIA encoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2140>
2022-04-09 14:00:35 +00:00
Seungha Yang 26fa35dcdf qsvencoder: Don't use USAGE_HINT_ENCODER and enable derived image support
Peformance issue by disabled derived image support was reported

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2111>
2022-04-04 21:18:13 +00:00
Seungha Yang b5ed0eb4b0 qsvencoder: Add support for VA memory
Use VA allocator and buffer pool implementation for zero-copy
encoding with upstream VA elements

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2030>
2022-03-31 20:48:24 +00:00
Seungha Yang 9c44b32c21 qsv: Use pipeline's VA context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2030>
2022-03-31 20:48:24 +00:00
Seungha Yang 886cfecd36 qsvencoder: Add support for dynamic bitrate update
... and add more encoding options.

QSV API supports dynamic bitrate change without IDR insertion.
That's more efficient way of runtime encoding option update
than starting from new sequence with IDR per bitrate option change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
2022-03-29 15:52:58 +00:00
Seungha Yang a8d7b10cc4 qsvh265enc: Add missing gop-size property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
2022-03-29 15:52:58 +00:00
Seungha Yang 1a7b23dc02 qsv: Fix mfxFrameAllocator::Lock for encoder
Only read map is possible for encoder input system memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2039>
2022-03-29 15:52:58 +00:00
Seungha Yang 769800ad5f qsvencoder: Clear caps after debug print
Otherwise debug function will print (null) for alread cleared pointer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2012>
2022-03-24 02:55:49 +09:00
Seungha Yang 188382ca9a qsvh264enc: Fix profile and level setting in codec data
The profile field in SPS is located after header byte

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2012>
2022-03-24 02:55:31 +09:00
Seungha Yang 00f773bd10 qsv: Remove strcpy for DRM device path
Simplify code. It's just one-time allocation, so don't need to worry
about leaking.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1835>
2022-03-03 11:29:33 +00:00
Seungha Yang c4ac657364 qsv: Add H.264 decoder
Initial decoder implementation with baseclass

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1786>
2022-03-01 21:24:07 +00:00
Seungha Yang ad73f73356 qsvencoder: Fix caps leak in Linux build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1769>
2022-02-22 12:55:26 +00:00
Seungha Yang 20328914dc qsv: Fix debug category name of qsvallocator
Remove gst prefix to make $env:GST_DEBUG="qsv*:6" work for qsvallocator
as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1769>
2022-02-22 12:55:26 +00:00
Seungha Yang 278908ce96 qsv: Add support for HEVC encoding
main and main-10 profiles are supported for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang 3a7e4635bb qsv: Add support for VP9 encoding and more video formats
Add VP9 encoder with 4:2:0 8 bits and 4:4:4 8/10 bits formats support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang 64ed6075b7 qsv: Introduce H.264 Intel Quick Sync Video Encoder
A new implementation of Intel Quick Sync Video plugin.
This plugin supports both Windows and Linux but optimization for
VA/DMABuf is not implemented yet.

This new plugin has some notable differences compared with existing
MSDK plugin.

* Encoder will expose formats which can be natively supported
without internal conversion. This will make encoder
control/negotiation flow much simpler and cleaner than
that of MSDK plugin.

* This plugin includes QSV specific library loading helper,
called dispatcher, with QSV SDK headers as a part of this plugin.
So, there will be no more SDK version dependent #ifdef in the code
and also there will be no more build-time MSDK/oneVPL SDK
dependency.

* Memory allocator interop between GStreamer and QSV is re-designed
and decoupled. Instead of implementing QSV specific allocator/bufferpool,
this plugin will make use of generic GStreamer memory
allocator/bufferpool (e.g., GstD3D11Allocator and GstD3D11BufferPool).
Specifically, GstQsvAllocator object will help interop between
GstMemory and mfxFrameAllocator memory abstraction layers.

Note that because of the design decision, VA/DMABuf support is not made
as a part of this initial commit. We can add the optimization for Linux
later once GstVA library exposes allocator/bufferpool implementation as
an API like GstD3D11.

* Initial encoder implementation supports interop with GstD3D11
infrastructure, including zero-copy encoding with upstream D3D11 element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang c80132e4a3 qsv: Remove unnecessary pargma message
We know what we are doing, just remove noisy build warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00
Seungha Yang 81d63948d1 qsv: Import libmfx API and dispatch code from oneVPL project
Copied from oneVPL project (https://github.com/oneapi-src/oneVPL)
v2022.0.3 tag at the commit of efc259f8b7ee5c334bca1a904a503186038bbbdd

This is corresponding to MFX API version 2.6

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1408>
2022-02-08 10:05:35 +00:00