Seungha Yang
3922ae5d92
d3d11compositor: Fix transparent background mode with YUV output
...
In case of YUV format without alpha channel, zero clear value
for each channle will result in green color. Use calculated black
background color with alpha=0 for transparent background mode instead.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7181 >
2024-07-16 14:18:12 +00:00
Seungha Yang
845f5d4856
d3d11: Rework memory allocation params signalling
...
Hide GstD3D11AllocationParams detail from public header and
set setter methods.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5717 >
2023-11-27 15:14:09 +00:00
Seungha Yang
cb3c1390f2
d3d11: Avoid ID3D11DeviceContext::Map if possible
...
Allocate resource with initial date instead of calling Map/Unmap
after allocation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5660 >
2023-11-15 23:38:59 +09:00
Seungha Yang
5389cc2cc3
d3d11compositor: Set rasterizer state
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5572 >
2023-10-28 22:12:17 +09:00
Seungha Yang
8a35c8a2a5
d3d11compositor: Fix typo in property description
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5481 >
2023-10-14 12:32:46 +00:00
Seungha Yang
cf1286b0e9
d3d11: Add support for HLSL precompile and shader caching
...
Compile HLSL at build time in case of MSVC, and use it if device
supports shader model 5. Also cache/reuse pixel shader and vertex
shader objects.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5426 >
2023-10-03 09:42:03 +00:00
Seungha Yang
53dc1b96e2
d3d11compositor: Reconfigure resource only when output caps is changed
...
GstD3D11Converter setup is heavy operation since it requires
shader compile, GPU resource allocation, some math, mutex, etc.
We can avoid it if negotiated caps is not changed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4439 >
2023-04-17 17:30:26 +00:00
Seungha Yang
3d6a609590
d3d11compositor: Add "ignore-inactive-pads" property
...
Same as compositor element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4438 >
2023-04-17 13:19:15 +00:00
Seungha Yang
7eefdd1b95
d3d11compositor: Skip zero alpha input
...
Blending such input is a waste of resource since nothing will
be rendered
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4438 >
2023-04-17 13:19:15 +00:00
Seungha Yang
a1bd4afb8a
d3d11compositor: Fix composition error on release_pad()
...
Composition might be still in progress while it's being released
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4169 >
2023-03-15 04:50:49 +00:00
Seungha Yang
467a2408a1
d3d11compositor: Workaround blending artifacts on Intel platform
...
Disable vendor implemented converter in d3d11compositor to workaround
artifacts
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3770 >
2023-01-23 23:34:04 +09:00
Seungha Yang
6974b6f6ff
d3d11: Update for documentation
...
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
properties
* Add doc caps
* Increase deinterlace max resolution
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250 >
2022-10-24 12:42:51 +00:00
Seungha Yang
b8010e41a1
d3d11compositor: Add gamma-mode and primaries-mode properties
...
Allows controlling gamma remap and/or chromatic adaptation behavior.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2831 >
2022-08-04 03:19:42 +09:00
Seungha Yang
ac6577e2a9
d3d11compositor: Add support for crop meta
...
GstD3D11Converter supports cropping already. Cropping is just
a matter of setting source rectangle area to converter,
from d3d11 point of view
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2782 >
2022-07-22 05:07:23 +09:00
Seungha Yang
1c3fac818d
d3d11: Move GstD3D11Converter to gst-libs
...
The object is equivalent to GstVideoConverter but for D3D11.
Application can use this object directly for various conversions,
such as color space conversion, rescale, crop and flip/rotation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2767 >
2022-07-22 00:08:51 +09:00
Seungha Yang
1dd29a2564
d3d11: Move HLSL compiler to gst-libs
...
We should move this functionality to gst-libs so that GstD3D11Converter
can be moved to gst-libs.
Another advantage is that applications can call our
HLSL compiler wrapper method without any worry about OS version
dependent system installed HLSL library.
Note that there are multiple HLSL compiler library versions
on Windows and system installed one would be OS version dependent.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2760 >
2022-07-15 06:31:51 +09:00
Seungha Yang
b09ca8635f
d3d11: Use scoped device lock
...
Make code simpler and more deadlock-free
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2728 >
2022-07-09 03:36:17 +09:00
Seungha Yang
7a48843ca6
d3d11: Remove video processor
...
Processing using ID3D11VideoProcessor was integrated into
GstD3D11Converter and GstD3D11VideoProcessor implementation is
not used anymore.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2713 >
2022-07-04 18:46:51 +00:00
Seungha Yang
9709bcf3fe
d3d11compositor: Use single GstD3D11Converter object
...
... and remove unnessary videoprocessor/upload/copy code
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697 >
2022-07-02 05:37:55 +09:00
Seungha Yang
91a732fe90
d3d11converter: Add support conversion using videoprocessor
...
* Add videoprocessor feature to d3d11converter, in order to unifiy
conversion flow.
* Add convert_buffer() method to support automatic shader/videoprocessor
selection. The method also supports texture upload if input memory
cannot be used for conversion (e.g., system memory or so)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697 >
2022-07-02 05:37:55 +09:00
Seungha Yang
b2d09de899
d3d11: Don't use const pointer to GstDxgiColorSpace
...
Instead, fill values of passed GstDxgiColorSpace struct
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2697 >
2022-07-01 19:34:16 +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
a040450685
d3d11compositor: Performance optimization
...
Removing glvideomixer-like nuance (it was initially referenced)
and rewriting element since it's not an optimal design at all
from performance point of view.
* Remove wrapper bin (and internal conversion/upload/download elements)
which will waste CPU/GPU resources. Conversion/blending can be done by the
d3d11compositor element at once.
* Add support YUV blending without RGB conversion.
The RGB <-> YUV conversion is completely unnecessary since YUV textures
support blending as well.
* Remove complicated blending operation properties since it's hard
to use from application point of view. Instead, adding "operator" property
like what compositor element does.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2631 >
2022-06-20 19:18:53 +00:00
Seungha Yang
59f39724b7
d3d11converter: Objectify converter
...
... and set conversion options via property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2622 >
2022-06-17 19:40:48 +00:00
Seungha Yang
ec6384947b
d3d11compositor: Don't use GstD3D11Quad
...
The helper object will be removed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2622 >
2022-06-17 19:40:48 +00:00
Seungha Yang
e63a3a7f31
d3d11compositor: Don't try to read empty buffer
...
The queued buffer may not be readable buffer in case that
upstream sends GAP event or so.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1497 >
2022-01-13 20:27:50 +00:00
Thibault Saunier
019971a3c7
Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir
2021-09-24 16:14:36 -03:00