Commit graph

26 commits

Author SHA1 Message Date
He Junyan ad0ba3ab7d va: Delay the VAProcPipelineCaps query after context created.
The VAAPI vaQueryVideoProcPipelineCaps() requires the context as the
parameter. So far, we always pass VA_INVALID_ID and it can succeed.
But the API does not say that and in theory, a valid context is required.
Now the new platform really needs a valid context and so we have to
delay that query until the context is created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3613>
2022-12-21 14:31:23 +00:00
Victor Manuel Jaquez Leal cccbf1f02d vafilter: Increase the caps for HDR.
As they might be other medatadata types.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3473>
2022-12-01 15:17:49 +00:00
Victor Manuel Jaquez Leal b25b1be70d vafilter: Increase the number of 3DLUT caps to 16.
To fix the warning on Alderlake

vafilter gstvafilter.c:534:gst_va_filter_ensure_filters:<vafilter0>
vaQueryVideoProcFiltersCaps: list argument exceeds maximum number

Increase the number of caps to 16 as vadumpcaps does.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3473>
2022-12-01 15:17:49 +00:00
Víctor Manuel Jáquez Leal eb0f90f6ec vafilter: Log out processed surfaces for debug.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3373>
2022-11-11 04:19:54 +00:00
Víctor Manuel Jáquez Leal e4f6ade308 va: Complete library and plugin documentation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
Víctor Manuel Jáquez Leal a51ac72b5e va: Move gstvavideoformat out of library headers.
Since it's no needed for API consumers. Though it can be added later.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1025>
2022-09-13 14:57:21 +02:00
U. Artie Eoff 211ba46369 va: filter/postproc: move unconditional props to vavpp
Only conditional/dynamic properties should be installed/handled
by vafilter.  Thus, move and install the unconditional/static
properties in vavpp.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654>
2022-06-27 12:17:53 -04:00
U. Artie Eoff 178f4fcd20 va: compositor/filter: use scale method setter
Use the filter's scale method member instead of the sample's member.

Removes the filter_flags member from the composite sample.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654>
2022-06-27 10:53:11 -04:00
U. Artie Eoff 280678fe42 va: filter: add scale method field and setter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654>
2022-06-27 10:52:03 -04:00
Víctor Manuel Jáquez Leal 685a611812 va: Use driver implementation macro rather than function.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2642>
2022-06-21 18:21:46 +00:00
Víctor Manuel Jáquez Leal 46e536898f vafilter: Fix logging of unsupported alpha blending.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2477>
2022-05-24 12:30:49 +00:00
U. Artie Eoff afe8723196 va: vpp: add compositor
New implementation of a VA-API compositor with blend feature.

Various chunks of code was taken from vavpp.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2332>
2022-05-21 21:18:15 +02:00
Víctor Manuel Jáquez Leal e207ff905b va: Expose a couple va surface/buffer methods.
And use them in va plugin.

Also, set as default logging category the vadisplay one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2077>
2022-04-20 15:15:56 +00:00
Víctor Manuel Jáquez Leal 400faf7361 va: Set <gst/va/gstva.h> as library single point entry header.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
He Junyan 990fbb3b52 va: Move allocators and pool objects into gstva library.
In order to other plugins use gstva objects, such as allocators and buffer
pools, this merge request move them from the va plugin to the gstva library.

This objects are not exposed in <gst/va/gstva.h> since they are not expected
to be used by users, only by plugin implementators.

Because of the surface copy design, which is used to implement allocator's
mem_copy() virtual function, depends on the vafilter, which is kept inside
the plugin, memory copy through VAPosproc is disabled and removed temporarly.

Also added some missing parameter validation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
He Junyan 53783eab6c va: Move the video format functions into gstlibva.
Untabifying header file.

The logging category was moved from the plugin generic category to
the display category. It can argue that video formats hacks are
display dependant.

Added validations for input parameters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2048>
2022-03-29 19:48:30 +00:00
He Junyan 24c3e0fcfa va: Delete the display lock/unlock when we call VA-API.
According to the VA-API's description, they are MT-safe, we do not
need to care about that in our middleware layer. The lock/unlock
operations have overhead and make the performance lower.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1333>
2022-02-15 10:02:08 +00:00
Víctor Manuel Jáquez Leal df6c985474 va: filter: Log the added filter name.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1675>
2022-02-09 11:07:47 +00:00
Víctor Manuel Jáquez Leal 4be3413fec vapostproc: Process HDR caps
This patch adds a new parameter: hdr-tone-mapping (same as
vaapipostproc), if the HDR capabilites are availabe in driver, and
it's disabled by default.

If hdr-tone-mapping is enabled then HDR fields in sink caps are
processed in frames from HDR to SDR, removing those hdr fields in
source pad caps too.

hdr-tone-mapping is not enabled if a color conversion is also
requested, since it fails to process in the iHD driver, so far.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1258>
2022-02-09 10:26:02 +00:00
Víctor Manuel Jáquez Leal c7e52e869d va: filter & postproc: Match color with caps features.
When fixating color, there might be "other caps" with color spaces not
supported by the caps features exposed in the vapostproc's source pad
caps template (perhaps it's a bug somewhere else in GStreamer).

This solution checks if the proposed format exists in the filter
within the caps feature associated with the proposed format.

The check is done with the new filter's function
gst_va_filter_has_video_format().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1559>
2022-01-24 18:10:49 +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 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 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 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
Víctor Manuel Jáquez Leal f1e2eb4f1e va: filter: Enable to pass VASurfaceID in GstVaSample.
Initially GstVaSample processed its GstBuffer member to get the
VASurfaceID. But it might cases where we already have the VASurfaceID
to process by the filter.

This patch enables the possibility to pass the surfaces rather than
the buffers. In order to validate the surfaces a function to check
surfaces were added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +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
Renamed from sys/va/gstvafilter.c (Browse further)