gstreamer/subprojects/gst-plugins-bad/sys/va
Víctor Manuel Jáquez Leal 301e281777 vabasedec: refactor format and capsfeature selection
This is a simplification of the venerable
gst_va_base_dec_get_preferred_format_and_caps_features() function, which
predates since gstreamer-vaapi. It's used to select the format and the
capsfeature to use when setting the output state. It was complex and hard to
follow. This refactor simplifies a lot the algorithm.

The first thing to remove _downstream_has_video_meta() since, most of the time
it will be called before the caps negotiation, and allocation queries make sense
only after caps negotiation. It might work during renegotiation but, in that
case, caps feature change is uncommon. Better a simple and common approach.

Also, for performance, instead of dealing with caps features as strings, GQuarks
are used.

The refactor works like this:

1. If peer pad returns any caps, the returned caps feature is system memory and
   looks for a proper format in the allowed caps.

2. The allowed caps are traversed at most 3 times: one per each valid caps
   feature. First VAMemory, later DMABuf, and last system memory. The first to
   match in allowed caps is picked, and the first format matching with the
   chroma is picked too.

Notice that, right now, using playbin videoconvert never return any.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6154>
2024-02-22 20:59:13 +00:00
..
gstjpegdecoder.c jpegdecoder: fail early if no input caps have been provided 2023-02-25 10:41:53 +08:00
gstjpegdecoder.h vajpegdec: Hide gst_jpeg_decoder_get_type() symbol 2023-03-06 13:39:20 +00:00
gstvaav1dec.c va: no need to provide a buffer size for VA pool 2023-12-14 12:50:32 +00:00
gstvaav1dec.h
gstvaav1enc.c va: Implement the vaav1enc plugin 2024-01-30 08:24:26 +00:00
gstvaav1enc.h va: Implement the vaav1enc plugin 2024-01-30 08:24:26 +00:00
gstvabase.c va: use GstVideoInfoDmaDrm when importing buffers 2023-11-09 17:36:06 +00:00
gstvabase.h va: use GstVideoInfoDmaDrm when importing buffers 2023-11-09 17:36:06 +00:00
gstvabasedec.c vabasedec: refactor format and capsfeature selection 2024-02-22 20:59:13 +00:00
gstvabasedec.h va: Apply the new DMA format:modifier pair negotiation in decoder 2023-08-07 22:49:26 +00:00
gstvabaseenc.c va: baseenc: Fix the wrong parameter order to call va_map_buffer() 2024-01-30 15:50:23 +00:00
gstvabaseenc.h va: baseenc: Extend the create_output_buffer() to accept prefix data 2024-01-30 08:24:25 +00:00
gstvabasetransform.c vabasetransform: clean up decide_allocation() vmethod 2023-12-14 12:50:32 +00:00
gstvabasetransform.h va: use GstVideoInfoDmaDrm when importing buffers 2023-11-09 17:36:06 +00:00
gstvacaps.c va: Add the entrypoint parameter to gst_va_profile_caps() 2023-12-12 20:41:54 +08:00
gstvacaps.h va: Improve the template caps for DMA, use new drm-format kind caps 2023-08-07 22:49:26 +00:00
gstvacompositor.c vacompositor: consider the DMA kind input for sink pad 2023-12-16 10:56:09 +00:00
gstvacompositor.h va: vpp: add compositor 2022-05-21 21:18:15 +02:00
gstvadecoder.c va: Fix in error logs functions mismatches 2023-08-24 17:54:32 +00:00
gstvadecoder.h vadecoder: remove display reference in decode picture 2023-03-24 14:05:15 +00:00
gstvadeinterlace.c va: Add Windows specific element type/feature naming support 2023-03-10 13:57:47 +00:00
gstvadeinterlace.h
gstvadevice.h va: Add render node name in non-first devices. 2022-12-01 16:00:55 +00:00
gstvadevice_linux.c va: No need to sort the device after registered 2023-05-16 08:37:48 +00:00
gstvadevice_win32.cpp va: Add support for Win32 backend 2023-03-10 13:57:47 +00:00
gstvadisplay_priv.c va: Fix in error logs functions mismatches 2023-08-24 17:54:32 +00:00
gstvadisplay_priv.h va: Set <gst/va/gstva.h> as library single point entry header. 2022-03-29 19:48:30 +00:00
gstvaencoder.c va: no need to provide a buffer size for VA pool 2023-12-14 12:50:32 +00:00
gstvaencoder.h vaencoder: remove display reference in decode picture 2023-03-24 14:05:15 +00:00
gstvafilter.c va: Improve the template caps for DMA, use new drm-format kind caps 2023-08-07 22:49:26 +00:00
gstvafilter.h va: filter/postproc: move unconditional props to vavpp 2022-06-27 12:17:53 -04:00
gstvah264dec.c h264decoder: Port to GstCodecPicture struct 2023-09-08 11:51:23 +00:00
gstvah264dec.h
gstvah264enc.c va: baseenc: Extend the create_output_buffer() to accept prefix data 2024-01-30 08:24:25 +00:00
gstvah264enc.h va: H264enc: Add encoder for VAEntrypointEncSliceLP. 2022-05-25 20:40:48 +00:00
gstvah265dec.c va: h265dec: Add support for more -still and -intra profiles 2023-12-12 21:30:16 +08:00
gstvah265dec.h
gstvah265enc.c va: baseenc: Extend the create_output_buffer() to accept prefix data 2024-01-30 08:24:25 +00:00
gstvah265enc.h va: Implement the vah265enc plugin for va HEVC encoding. 2022-12-01 09:44:08 +08:00
gstvajpegdec.c vajpegdec: only support progressive mjpeg streams 2023-12-22 04:38:06 +00:00
gstvajpegdec.h va: Add vajpegdec element. 2022-06-27 13:43:14 +00:00
gstvampeg2dec.c mpeg2decoder: Port to GstCodecPicture struct 2023-09-08 11:51:23 +00:00
gstvampeg2dec.h
gstvapluginutils.c vapluginsutils: add helper gst_va_create_other_pool() 2023-12-14 12:50:32 +00:00
gstvapluginutils.h vapluginsutils: add helper gst_va_create_other_pool() 2023-12-14 12:50:32 +00:00
gstvaprofile.c va: Add decoder compatible caps string field into profiles' map 2023-12-12 21:30:08 +08:00
gstvaprofile.h va: Add the entrypoint parameter to gst_va_profile_caps() 2023-12-12 20:41:54 +08:00
gstvavp8dec.c vp8decoder: Port to GstCodecPicture struct 2023-09-08 11:51:23 +00:00
gstvavp8dec.h
gstvavp9dec.c vp9decoder: Port to GstCodecPicture struct 2023-09-08 11:51:23 +00:00
gstvavp9dec.h
gstvavpp.c va: Apply the new DMA format:modifier pair negotiation in vpp 2023-08-07 22:49:26 +00:00
gstvavpp.h Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
meson.build va: Implement the vaav1enc plugin 2024-01-30 08:24:26 +00:00
plugin.c va: Implement the vaav1enc plugin 2024-01-30 08:24:26 +00:00
vacompat.h Bump GLib requirement to >= 2.62 2022-06-10 06:01:41 +00:00