Skip to content

Select raw formats based on surface's chroma

The try-and-error approach for getting the possible image formats from a surface has brought several problems in different drivers, from crashes to drop in performance.

Instead of that we change the algorithm to determine the possible image formats based in the surface chroma: only those available image formats with same chroma are exposed as possible raw caps.

Do this is important to avoid performance degrading in raw sinks which doesn't handle NV12 but it does YV12 or I420.

And remove gst_vaapi_plugin_base_get_allowed_srcpad_raw_caps() since nobody uses it. Thus extract_allowed_surface_formats() is refactored to attend only gst_vaapi_plugin_base_get_allowed_sinkpad_raw_caps().

Merge request reports