vl/query: Only support VDP_CHROMA_TYPE_420 for 12 bit formats.
authorRico Schüller <kgbricola@web.de>
Wed, 21 Aug 2013 08:06:42 +0000 (10:06 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 21 Aug 2013 09:25:10 +0000 (11:25 +0200)
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/query.c

index 72b1fe91b834a85df24fcc9535faed88129b0910..1d352528ce1fe6d8b5f16ad3f91c7f0b356d3c85 100644 (file)
@@ -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;
    }