vajpegdec: Fix 4:2:2 for i965.

Since i965 uses NV12 either for 4:2:0 and 4:2:2 chroma (using an
internal color conversion) the chroma validation has to be shortcut.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2899>
This commit is contained in:
Víctor Manuel Jáquez Leal 2022-08-16 20:05:15 +02:00 committed by GStreamer Marge Bot
parent 074bdad21f
commit a075e57c61

View file

@ -373,7 +373,12 @@ gst_va_jpeg_dec_negotiate (GstVideoDecoder * decoder)
if (format == GST_VIDEO_FORMAT_UNKNOWN)
return FALSE;
if (gst_va_chroma_from_video_format (format) != base->rt_format)
/* @XXX: validate if the preferred format has the same requested
* chroma, except for i965, since NV12 is either for both 4:2:0 and
* 4:2:2 */
if (!(GST_VA_DISPLAY_IS_IMPLEMENTATION (base->display, INTEL_I965)
&& format == GST_VIDEO_FORMAT_NV12)
&& (gst_va_chroma_from_video_format (format) != base->rt_format))
return FALSE;
/* hack for RGBP rt_format */