Dmitry Osipenko
644969e0ba
kmssink: Support auto-detection of NVIDIA Tegra driver
...
NVIDIA Tegra SoCs have a separate (from GPU) display controller. It's
the primary display device on all Tegra SoCs. Add Tegra to the list
of primary DRM drivers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1514 >
2022-01-13 04:50:55 +00:00
Nirbheek Chauhan
1be6d6ccf5
meson: Add explicit check: kwarg to all run_command() calls
...
This is required since Meson 0.61.0, and causes a warning to be
emitted otherwise:
2c079d855e
https://github.com/mesonbuild/meson/issues/9300
This exposed a bunch of places where we had broken run_command()
calls, unnecessary run_command() calls, and places where check: true
should be used.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1507 >
2022-01-09 18:12:47 +05:30
Nirbheek Chauhan
6b7d819c25
vtenc: Signal ignored alpha component with ProRes
...
When the image is opaque but the output ProRes format has an alpha
component (4 component, 32 bits per pixel), Apple requires that we
signal that it should be ignored by setting the depth to 24 bits per
pixel. Not doing so causes the encoded files to fail validation.
So we set that in the caps and qtmux sets the depth value in the
container, which will be read by demuxers so that decoders can skip
those bytes entirely. qtdemux does this, but vtdec does not use this
information at present.
The sister change was made in qtmux and qtdemux in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1061
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1489 >
2022-01-04 18:01:54 +00:00
Seungha Yang
5fefc689a0
d3d11decoder: Negotiate again on the first output buffer
...
... unconditionally. There may be updated field in sinkpad caps
after the new_sequence() call (HDR related ones for example),
then we should signal the information to downstream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1474 >
2021-12-30 11:09:45 +00:00
He Junyan
85d2118a53
va: av1dec: Use named profiles to replace the numeric ones.
...
Use named AV1 profiles (i.e., main, high, and professional) to replace
the old 0, 1, 2 profiles.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456 >
2021-12-21 22:20:34 +09:00
Seungha Yang
91484ce2ac
d3d11av1dec: Update sinkpad template for profile
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456 >
2021-12-21 22:20:34 +09:00
Seungha Yang
1564567c3e
d3d11av1dec: Fix for Cdef param
...
av1parser will increase the sec_strength values by 1 if parsed
values were equal to 3 as defined in spec. But DXVA wants unmodified
ones.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1455 >
2021-12-17 23:28:29 +09:00
Seungha Yang
146815bbb6
d3d11av1dec: Sync DXVA AV1 data structure with released header
...
Update AV1 data structure based on Windows 11 SDK header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1455 >
2021-12-17 23:27:24 +09:00
Seungha Yang
f10867dfb5
d3d11videosink: Use only tested color space for swapchain
...
We are querying supported swapchain colorspace via
CheckColorSpaceSupport() but it doesn't seem to be reliable.
Use only tested full-range RGB formats which are:
- sRGB
- BT709 primaries with linear RGB
- BT2020 primaries with PQ gamma
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1433 >
2021-12-12 11:00:24 +00:00
Nicolas Dufresne
e0f8ce501b
v4l2codecs: vp9: Add alpha decodebin wrapper
...
This will allow HW accelerated decoding of WebM alpha videos.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439 >
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
31d49da237
v4l2codecs: plugin: Minor style fix
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439 >
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
3f02515380
v4l2codecs: decoder: Improve logging of timed out request
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439 >
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
c4216a693c
v4l2codecs: mpeg2: Check that the decoder output formats
...
This is to avoid exposing a decoder for which we don't support any
output format. This happens on platform using vendor formats or
not yet supported tiles formats.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439 >
2021-12-10 21:37:14 +00:00
Seungha Yang
e8c923ebde
d3d11window: Remove hack related to color space selection
...
Use input GstVideoColorPrimaries without any special case handling
otherwise rendered image color would be very wrong.
The hack was added to work around an issue that some Intel driver
couldn't handle wide color gamut image without HDR10 metadata, specifically PQ image.
But device capability can be checked via a method added in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1723
so there's no issue now.
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1175
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1430 >
2021-12-09 20:12:12 +09:00
Seungha Yang
1a12883993
d3d11window: Fix typo in debug message
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1430 >
2021-12-09 19:51:20 +09:00
Nicolas Dufresne
7e875ddb2c
v4l2codecs: mpeg2: Fix selected sizeimage
...
Due to a copy paste bug, the bitdepth was never set and that was leading
to requesting sizeimage of 0. Previously that worked since the driver
would in that case pick a size for us. But now the we bumped the minimum
to 4KB, the driver happily allocate 4KB of bitstream which lead to
decoding error.
As MPEG2 have a fixed bitdeph of 8, use a define instead of the run-time
variable.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1415 >
2021-12-03 07:55:30 -05:00
Nicolas Dufresne
05458f05e0
v4l2codecs: vp9: Drop frames on non-keyframe format change
...
V4L2 does not yet support this feature, this will skip over the
transition portion up to the next keyframe.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1404 >
2021-12-02 15:52:03 -05:00
Nicolas Dufresne
a6eb1e7782
v4l2codecs: Fix renegotiation
...
If we hold the last reference to the allocator, leaving the device
streaming will cause an EBUSY error when trying to free the allocate
buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1404 >
2021-12-02 15:45:26 -05:00
Seungha Yang
e87791592e
d3d11vp9dec: Drop frames on non-keyframe format change
...
... in case of NVIDIA GPU
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407 >
2021-12-02 19:19:59 +00:00
Seungha Yang
2c834b5fc7
nvvp9sldec: Drop frames on non-keyframe format change
...
NVDEC doesn't seem to be able to handle the case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407 >
2021-12-02 19:19:59 +00:00
Nicolas Dufresne
d04fba93f8
v4l2codecs: vp9: Remove uneeded picture data
...
The GstV4l2Request now holds a reference on the picture buffer and is
recounted already. This effectively removes usage of GRefCount which is only
available in GLib 2.58, while we support 2.56.
Fixes #910
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1402 >
2021-11-30 17:11:59 -05:00
Nicolas Dufresne
19d99dbcae
v4l2codecs: decoder: Add method to get the pic_buf
...
This helper will be needed for VP9 frame duplication.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1402 >
2021-11-30 17:11:59 -05:00
Nicolas Dufresne
8a1440b3f1
v4l2codecs: vp9: Add missing error checks in decide_allocation
...
This could otherwise lead to crash.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1402 >
2021-11-30 17:11:56 -05:00
Nicolas Dufresne
4ca7f1e014
v4l2codecs: h264: Fix typo in comment
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1387 >
2021-11-30 00:28:34 +00:00
Nicolas Dufresne
83933b7772
v4l2codecs: h264: Properly set pic_num/frame_num
...
The V4L2 uAPI uses pic_num for both PicNum and ShortTermPicNum. It also
doe the same for both FrameNum and LongTermFrameIdx. This change does
not change the fluster score, but fixed a visual corruption noticed
with some third party streams.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1387 >
2021-11-30 00:28:34 +00:00
He Junyan
b5c07e11ca
va: Use a lock to protect the surface copy by using vpp.
...
If we use vpp to do the surface copy, its operation is not atomic.
We need to maintain the filter's context unchanged during the whole
copy progress.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1373 >
2021-11-29 19:25:31 +00:00
He Junyan
954f7cf88c
va: Use the GstVaSurfaceCopy of the allocator atomically.
...
The mem_copy() of the allocator can be called simultaneously from
different threads. We should use atomic pointer operations to create
and use the GstVaSurfaceCopy of the allocator.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1373 >
2021-11-29 19:25:31 +00:00
He Junyan
7f31dcf084
va: DMA allocator: Set the copied memory properly when popped from pool.
...
The current code does not set the copied memory correctly when it is popped
from the surface cache pool.
1. We forget to ref the allocator, which causes the allocator to be freed
unexpected, and we get a crash later because of the memory violation.
2. We forget to add ref_mems_count, which causes the surface leak because
the surface can not be pushed back to the cache pool again.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1373 >
2021-11-29 19:25:31 +00:00
Daniel Almeida
285695ee52
v4l2codecs: gstv4l2decoder: set minimum sizeimage
...
Set minimum sizeimage such that there is enough space for any overhead
introduced by the codec.
Notably fix a vp9 issue in which a small image would not have a
bitstream buffer large enough to accomodate it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012 >
2021-11-29 17:41:19 +00:00
Daniel Almeida
120b96a974
v4l2codecs: gstv4l2codecsvp9dec: implement a render delay
...
The v4l2 backend support delayed output for performance reasons.
It is then possible to use render delays to queue multiple requests
simultaneously, thus increasing performance.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012 >
2021-11-29 17:41:19 +00:00
Daniel Almeida
ccab90773f
v4l2codecs: vp9dec: Implement VP9 v4l2 decoder
...
Implement a v4l2 based vp9 decoder element based on the preexisting vp8
v4l2 decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012 >
2021-11-29 17:41:19 +00:00
Daniel Almeida
c51d74ae3a
v4l2codecs: update to the new uAPI
...
The new VP9 stateless API is in its way to be destaged. Update our
headers to match.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012 >
2021-11-29 17:41:19 +00:00
Víctor Manuel Jáquez Leal
5e3bf0fff7
vapostproc, vadeinterlace: don't transform caps if no intersection.
...
If caps to transform don't intersect with those supported by the VA
filter (VAEntrypointVideoProc) then return them as is, because only
pass-through mode is the only possibility.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369 >
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
68379649db
vapostproc: Append featured caps rather than merge.
...
So it would be possible to honor upstream preference.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369 >
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
718e83ed4c
vapostproc: Remove dead code.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369 >
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
26040bd932
va: filter: Validate input parameter in internal function.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369 >
2021-11-22 15:27:10 +00:00
Víctor Manuel Jáquez Leal
8377463128
va: allocator: log drm modifier
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1369 >
2021-11-22 15:27:10 +00:00
He Junyan
a14f0da324
va: vpp: Fix the memory leak in fixate_caps().
...
For the BaseTransform class, the function of fixate_caps(), takes
the ownership of "othercaps". So we should clear it in our subclass.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1372 >
2021-11-22 10:54:23 +00:00
He Junyan
c2bffe22f3
va: decoder: Also ref the display when duplicating pictures.
...
The _destroy_buffers() will check the display handle using the
g_return_val_if_fail. we should not generate the invalid pointer
warning.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1368 >
2021-11-19 14:40:18 +00:00
Seungha Yang
7f796b10b2
wasapi2: Fix typo in doc
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1360 >
2021-11-19 13:38:19 +00:00
Seungha Yang
6acf89b3d3
mediafoundation: Skip doc for non-default encoder elements
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1360 >
2021-11-19 13:38:19 +00:00
Seungha Yang
7fe08d8bed
d3d11: Stop doc for non-default decoder and deinterlacer elements
...
Just skip doc for non-default decoder/deinterlacer elements
since there are multiple element in case that system has
multiple GPUs.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1360 >
2021-11-19 13:38:19 +00:00
Wonchul Lee
ae7a365274
d3d11: Fix deadlock while doing unprepare
...
ShowWindow() could be blocked while doing gst_d3d11_window_win32_unprepare
when external window handle provided to d3d11videosink in multi-threaded
environment.
The condition that issue happened is, UI thread is waiting for a
background thread that changes d3d11videosink state to NULL, and the
background thread would try to send a window message to the queue.
The queue is already occupied by the UI thread, so the background
thread will be blocked.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1366 >
2021-11-19 13:42:53 +09:00
Thomas Klausner
49449dfa41
shm: NetBSD build fix
...
shm_unlink() and friends live in librt on NetBSD. Adapt build system.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1323 >
2021-11-08 21:14:42 +00:00
Antonio Ospite
7deee582d2
magicleap: update lumin_rt libraries names to the latest official version
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1314 >
2021-11-05 16:21:34 +00:00
Thibault Saunier
d0c5778669
doc: Update nvdec documentation
...
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/870
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1309 >
2021-11-05 13:26:33 +00:00
Seungha Yang
8eee442715
wasapi2ringbuffer: Fix client object leak
...
Check whether ringbuffer is holding client object already since
open_device() may be called multiple times
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1307 >
2021-11-04 12:41:32 +00:00
Daniel Almeida
f9958eda8e
v4l2codecs: gstv4l2codecsmpeg2dec: implement a render delay
...
The v4l2 backend support delayed output for performance reasons.
It is then possible to use render delays to queue multiple requests
simultaneously, thus increasing performance.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013 >
2021-11-02 16:16:29 +00:00
Daniel Almeida
477b824f8e
v4l2codecs: Implement a MPEG2 V4L2 decoder element
...
Implement a MPEG2 V4L2 decoder element based on the previous h264
implementation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013 >
2021-11-02 16:16:29 +00:00
Daniel Almeida
4fe6bc1afe
v4l2codecs: mpeg2: update to the new uAPI
...
The mpeg2 stateless api has undergone changes as it is being
destage. Update the v4l2-controls header to match.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013 >
2021-11-02 16:16:29 +00:00
Daniel Almeida
f6e17ea294
sys: va: GstVaMpeg2Dec: use slice sc_offset and size
...
Seeing as how GstMpeg2Slice will now record the start code offset
as well as its size with the above field taken into account, the
manual computation in this class is not needed.
Remove it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1013 >
2021-11-02 16:16:29 +00:00
James Cowgill
8b932c105f
v4l2codecs: Handle allocator creation failure
...
If `VIDIOC_REQBUFS` doesn't return enough buffers the allocator creation
function can fail and return `NULL`. Handle this by generating an error
and returning instead of segfaulting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1220 >
2021-11-02 15:25:48 +00:00
James Cowgill
3846b0563a
v4l2codecs: Fix segfault when destroying non-detached allocator
...
The GstV4l2CodecAllocator dispose function clears `self->decoder` but
the finalize function then tries to use it if the allocator has no been
detached yet.
Fix by detaching in the dispose function before we clear
`self->decoder`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1220 >
2021-11-02 15:25:48 +00:00
Nirbheek Chauhan
b8d6fd905e
applemedia: Add ARGB64_BE, RGBA64_LE support to vtenc/vtdec
...
We can add this now that ARGB64_BE videoconvert support was added in:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1247
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214 >
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
fed69c48b6
vtenc: Add FieldDetail properties for interlaced input
...
Standard interlace handling:
* If we have interlace-mode=interleaved and the field order, we just
set it when creating the session
* If we have interlace-mode=(interleaved|mixed) and no field order, we
set the field order on the first buffer
The encoder session does not support changing the FieldDetail after it
has started encoding frames, so we cannot support mixed streams
correctly.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214 >
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
29a32703a5
vtenc: Add a property to forcibly ignore alpha values
...
This PropertyKey is not documented in any headers anywhere, so we need
to define it ourselves.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214 >
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
4e37f99975
vtenc: Set colorimetry information
...
It looks like VideoToolbox doesn't support all our colorimetries.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214 >
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
0f0e68080c
applemedia: Add ProRes support to vtenc and vtdec
...
For vtdec, we continue to prefer NV12; else we pick whatever
downstream wants. In the special case where we're decoding 10-bit or
12-bit ProRes formats, we will prefer AYUV64.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214 >
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
db638134e7
vtenc: Improve error reporting in chain function
...
Otherwise it is quite difficult to figure out why the chain function
failed. Also assert not reached for case statements that should not be
hit.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214 >
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan
d7f6f8172a
vtdec: Remove dead code in switch statement
...
We never advertise these formats, so these cases will never be hit.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214 >
2021-11-01 09:24:52 +00:00
Víctor Manuel Jáquez Leal
4a4823b972
va: Delay decoders downstream negotiation.
...
Delay decoders downstream negotiation just before an output frame
needs to be allocated.
This is required, are least for H.264 and H.265 decoders, since
codec_data might trigger a new sequence before finishing upstream
negotiation, and sink pad caps need to set before setting source pad
caps, particularly to forward HDR fields. The other decoders are
changed too in order to keep the same structure among them.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257 >
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal
5494ec38d0
vabasedec: Move warning message to decoder's category.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257 >
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal
97e3f88c20
va: Move common variable need_negotiation to GstBaseDec.
...
This is a common variable to all decoders, so it's sound to move it to
the base helper.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257 >
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal
a2a3c81c85
va: Move back parent_object to each element.
...
Using GstBaseDec hack to access the parent_object of each element in
the element itself is a bit fragile. It would be better to keep its
own parent object as the usual global variable. It would make it
resistant to code changes.
The GstBaseDec macro to access the parent object now it's internal to
base decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257 >
2021-10-29 16:06:52 +00:00
Mengkejiergeli Ba
5b1662d37e
msdk: Insert hdr sei at hevc encoder
...
There are two HDR SEIs defined in spec: mastering display colour volume and
content light level. Add insertion of HDR SEIs when they are available
during encoding.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1242 >
2021-10-28 08:36:05 +00:00
Víctor Manuel Jáquez Leal
cf3d271cde
vapostproc: Color fixation will choose othercaps' structure.
...
gst_va_fixate_format() will iterate all othercaps' structures to find
the one with less information lost at color conversion. If a structure
with same color format is found, the iteration stops. It's like a
smart truncation. Then, this function also will choose the caps
feature.
Later this structure is used fixate its size and no further truncation
is needed.
Don't intersect at fixate, since it kills possible resizing.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1261 >
2021-10-27 18:01:50 +00:00
Víctor Manuel Jáquez Leal
bc6a7a63f0
vapostproc: Ignore direction at orientation swapping.
...
It doesn't matter the direction of the negotiation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1261 >
2021-10-27 18:01:50 +00:00
Víctor Manuel Jáquez Leal
cbca0bb06e
vapostproc: Consider video orientation for border calculation.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1261 >
2021-10-27 18:01:50 +00:00
Mengkejiergeli Ba
3ca6734860
msdkvpp: Add 12bit formats
...
Add 12bit formats for different chroma samplings at sink pad and
src pad, including P012_LE, Y212_LE and Y412_LE.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1218 >
2021-10-26 07:08:10 +00:00
Víctor Manuel Jáquez Leal
74c75b1e8b
vah265dec: Fix end_picture() vmethod.
...
Since commit 88437a9c
the signature of h265decoder's end_picture()
changed to return GstFlowReturn, but vah265dec was not updated.
This commit fixes this regression.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1248 >
2021-10-25 17:01:26 +02:00
Mengkejiergeli Ba
164244a2eb
va: allocator: Fix possible memory leaks
...
At gst_va_dmabuf_allocator_setup_buffer_full, static code analysis tool
does not know number of objects in descriptor is always larger than 0 if
export_surface_to_dmabuf succeeds. Thus, the tool will assume buf is
allocated with mem but not released when desc.num_objects equals to 0
and raise a mem leak issue.
For gst_va_dambuf_memories_setup, we should also inform the tool that
n_planes will be larger than 0 by checking the value at very beginning.
Then, the defect similar to above will not be raised during static analysis.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1241 >
2021-10-25 15:03:30 +08:00
Mathieu Duponchelle
2f8030d98b
nvh264enc: add constrained-baseline to the caps profiles
...
In practice, when baseline is requested from the encoder it
produces constrained baseline, and it is already reflected
in the profile-iop flags.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1213 >
2021-10-21 09:06:08 +00:00
Seungha Yang
8b6c3e030b
mediafoundation: Fix for UWP build
...
We don't support D3D11 interop for UWP because some APIs
(specifically MFTEnum2) are desktop application only.
However, the code for symbol loading is commonly used by both UWP and WIN32.
Just link GModule unconditionally which is UWP compatible, and simply don't
try to load any library/symbol dynamically when D3D11 interop is unavailable.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1216 >
2021-10-21 05:11:40 +00:00
Tim-Philipp Müller
e0f336c1b4
meson: va, msdk: simplify dep.get_variable() use
...
With recent Meson versions we can just write dep.get_variable('foo')
instead of dep.get_variable(pkgconfig: 'driverdir', internal: 'driverdir').
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183 >
2021-10-20 11:20:44 +00:00
Tim-Philipp Müller
f1bb2c76c6
meson: update for dep.get_pkgconfig_variable() deprecation
...
... in favour of dep.get_variable('foo', ..) which in some
cases allows for further cleanups in future since we can
extract variables from pkg-config dependencies as well as
internal dependencies using this mechanism.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183 >
2021-10-20 11:20:44 +00:00
Víctor Manuel Jáquez Leal
5c6b641ae3
vadeinterlace: Accept ANY feature.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024 >
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal
bf1b03e5cb
vadeinterlace: Fixate interlace-mode and framerate accordingly.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024 >
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal
10e5db047a
vapostproc: Accept ANY feature.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024 >
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal
7e53161ea5
vapostproc: Traverse caps features in gst_va_vpp_caps_remove_fields()
...
The previous code had a potential failure for multiple caps features. Now
each caps feature in each structure is reviewed, and if it has a supported
feature, the structure is processed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024 >
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal
c00ad9e70c
vapostproc: Refactor gst_va_vpp_complete_caps_features()
...
gst_va_vpp_complete_caps_features() now receives the @feature_name to
add and return if @caps doesn't provide it.
So, instead of two nested loops, now the function is a single loop,
traversing @caps to find if each structure already contains the requested
@features_name.
It's important to add missing caps features with @caps, in order to
not lost information.
The function caller does the external loop by calling per each
available caps feature.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024 >
2021-10-18 19:14:15 +00:00
Víctor Manuel Jáquez Leal
d12991c979
vapostproc: Split caps transform in two phases.
...
In order to make more readable the caps transformation, the operation
was split in two phases:
1. Rangify the supported caps structures.
2. Add the missing (and supported) caps features.
Step 1 modified its logic, by copying any unrecognized structure.
It's a previous step required for allowing ANY caps feature as
passthrough.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1024 >
2021-10-18 19:14:15 +00:00
Seungha Yang
be9cf6c9cd
d3d11: d3d11{convert,scale}: Add add-borders property
...
Functionally identical to that of videoscale element.
When disabled, d3d11convert or d3d11scale element will scale
image without adding borders, meaning that display aspect ratio
will not be preserved.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1170 >
2021-10-17 12:36:28 +00:00
Víctor Manuel Jáquez Leal
ff0fae50af
vapostproc: Add add-borders property to keep dar
...
Just as videoscale, it enables add-borders property (FALSE by default)
in vapostproc to add border, if necessary, to keep the display aspect
ratio from the original image.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1169 >
2021-10-17 11:24:26 +00:00
Víctor Manuel Jáquez Leal
52c09778b7
vapostproc: Fix early fixation.
...
First copy missing fields and then fixate all remaining fields.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1169 >
2021-10-17 11:24:26 +00:00
Seungha Yang
47a53f5063
meson: wasapi2,mediafoundation: Work around Windows SDK header issue
...
Some SDK headers are not standard compliant, so MSVC will
complain when such headers are in use with "/permissive-" compile
option. Use "/Zc:twoPhase-" to work around the issue as documented in
https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160#windows-header-issues
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1174 >
2021-10-17 08:01:47 +00:00
Seungha Yang
d0c86365d2
mediafoundation: Use GetProcAddress() for OS version dependent symbols
...
We are using some symbols which are not available on Windows 7,
specifically D3D11 interop related ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1167 >
2021-10-16 18:07:06 +09:00
Víctor Manuel Jáquez Leal
ee7af02c3e
vapostproc: Transfer colorimetry at fixate if possible.
...
Taken from videoconvert element.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1110 >
2021-10-16 05:17:19 +00:00
Seungha Yang
ba79339d56
mediafoundation: Fix various string constness handling
...
... with fixing typo (g_strup -> g_strdup)
Constness needs to be explicit in C++ world otherwise compiler
would complain about that.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1164 >
2021-10-15 23:38:48 +09:00
Mengkejiergeli Ba
4a6cc431d2
va: Fix null ptr dereference for vadeocder
...
Making a null check in gst_va_decode_picture_free () indicates pic->buffers or pic->slices
can be null, then in _destroy_buffers () the pointers are dereferenced, which is detected
as dereference after null check by Coverity. Thus, modify the code to do null check in
_detroy_buffers ().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1143 >
2021-10-15 00:45:44 +00:00
Seungha Yang
b3710aa68d
d3d11: Rename screen capture element
...
Old name "desktopdup" may confuse users. Now it's renamed to
"screencapture"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1136 >
2021-10-14 15:15:56 +00:00
Mengkejiergeli Ba
5e7aa06257
va: Fix error handling for decoder
...
Need to check if va decoder is closed successfully.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131 >
2021-10-14 11:12:41 +00:00
Mengkejiergeli Ba
2eaba0cefa
va: Fix error handling for base transform
...
Need to check the returned value of gst_buffer_pool_set_active() when
setting the active status of buffer pool.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131 >
2021-10-14 11:12:41 +00:00
Víctor Manuel Jáquez Leal
a2aa2cda42
vapostproc: Negotiate interlaced.
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109 >
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal
60be3dbd2a
vapostproc: Copy missing fields at fixate.
...
When caps negotiation implies a caps feature change, some fields might
get lost. This patch brings them back from input caps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109 >
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal
5ae1072c2f
vapostproc: Simplify size fixate.
...
gst_va_vpp_fixate_size() returned the fixated caps, but that is not
needed since `othercaps` are modified inline.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109 >
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal
b53446ddc9
vapostproc: Simplify fixate.
...
The first approach to fixate was simply a copy&paste of both
videoconvert and videoscale, trying to keep their logic as isolated
as possible. But that brought duplicated and sparse logic.
This patch merge both approaches simplifying the fixate operation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109 >
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal
1642c3fc96
va: filter, deinterlace, vpp: Add gst_va_buffer_get_surface_flags().
...
Add a helper function to get, from GstVideoInfo and GstBuffers flags,
the VA interlace surface flags. This is used currently by vainterlace
element, but it will be used in vapostproc too if it can process
interlaced frames.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109 >
2021-10-13 14:59:09 +00:00
Mengkejiergeli Ba
40d559adcf
msdkenc: fix vp9enc initialization fail
...
MediaSDK does not support to handle extbuff with id
MFX_EXTBUFF_VIDEO_SIGNAL_INFO for mjpegenc and vp9enc. Hence, need to
exclude mjpeg and vp9 when passing color properties to MediaSDK during
msdkenc initialization.
Fix issue: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/764
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1101 >
2021-10-12 03:45:41 +00:00
Seungha Yang
4b85704b88
d3d11: Add device provider for d3d11desktopdupsrc
...
... and add support for multi-GPU/multi-monitor
By using newly added "monitor-handle" property, user can specify a
monitor to be captured via HMONITOR handle.
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1673
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1103 >
2021-10-11 15:21:26 +00:00
Víctor Manuel Jáquez Leal
35575e7b11
va: allocator: dmabuf: Use GstVaSurfaceCopy, if possible.
...
If dmabuf-based buffer to copy contains only one memory, and there are
memories available in the allocator's pool, it's possible a fast
memory copy using GstVaSurfaceCopy, regardless the drm modifier.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023 >
2021-10-10 17:03:29 +00:00