summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-03-05 16:43:15 +0100
committerChristian König <[email protected]>2012-03-08 11:37:02 +0100
commit5d5b414a7b840a4a90050041fabd88a9af6dca43 (patch)
treec1c8a4b061dd16fcd4687083be7cb032aadebd60 /src/gallium/state_trackers
parentf6546535c9c8ce001e081487b8cd30b6703c0f4d (diff)
st/vdpau: fix chroma_format handling in VideoSurfaceQueryGetPutBitsYCbCrCapabilities
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/vdpau/query.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c
index 9d4083409a3..2b13ce15487 100644
--- a/src/gallium/state_trackers/vdpau/query.c
+++ b/src/gallium/state_trackers/vdpau/query.c
@@ -87,9 +87,6 @@ vlVdpVideoSurfaceQueryCapabilities(VdpDevice device, VdpChromaType surface_chrom
/* XXX: Current limits */
*is_supported = true;
- if (surface_chroma_type != VDP_CHROMA_TYPE_420)
- *is_supported = false;
-
max_2d_texture_level = pscreen->get_param(pscreen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS);
pipe_mutex_unlock(dev->mutex);
if (!max_2d_texture_level)
@@ -124,7 +121,24 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
return VDP_STATUS_RESOURCES;
pipe_mutex_lock(dev->mutex);
- *is_supported = pscreen->is_video_format_supported
+
+ switch(bits_ycbcr_format) {
+ case VDP_YCBCR_FORMAT_UYVY:
+ case VDP_YCBCR_FORMAT_YUYV:
+ *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_422;
+ break;
+
+ case VDP_YCBCR_FORMAT_Y8U8V8A8:
+ case VDP_YCBCR_FORMAT_V8U8Y8A8:
+ *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_444;
+ break;
+
+ default:
+ *is_supported = true;
+ break;
+ }
+
+ *is_supported &= pscreen->is_video_format_supported
(
pscreen,
FormatYCBCRToPipe(bits_ycbcr_format),