From d8d90ecf30d9fe9c5b59bb4e5591818545f0ca1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rico=20Sch=C3=BCller?= Date: Wed, 21 Aug 2013 10:06:42 +0200 Subject: [PATCH] vl/query: Only support VDP_CHROMA_TYPE_420 for 12 bit formats. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Christian König --- src/gallium/state_trackers/vdpau/query.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c index 72b1fe91b83..1d352528ce1 100644 --- a/src/gallium/state_trackers/vdpau/query.c +++ b/src/gallium/state_trackers/vdpau/query.c @@ -122,6 +122,11 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp pipe_mutex_lock(dev->mutex); switch(bits_ycbcr_format) { + case VDP_YCBCR_FORMAT_NV12: + case VDP_YCBCR_FORMAT_YV12: + *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_420; + break; + case VDP_YCBCR_FORMAT_UYVY: case VDP_YCBCR_FORMAT_YUYV: *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_422; @@ -133,7 +138,7 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp break; default: - *is_supported = true; + *is_supported = false; break; } -- 2.30.2