aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vdpau/query.c')
-rw-r--r--src/gallium/state_trackers/vdpau/query.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/query.c b/src/gallium/state_trackers/vdpau/query.c
index e69c9b11f55..435cafd4041 100644
--- a/src/gallium/state_trackers/vdpau/query.c
+++ b/src/gallium/state_trackers/vdpau/query.c
@@ -123,8 +123,21 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
switch(bits_ycbcr_format) {
case VDP_YCBCR_FORMAT_NV12:
+ *is_supported = surface_chroma_type == VDP_CHROMA_TYPE_420;
+ break;
+
case VDP_YCBCR_FORMAT_YV12:
*is_supported = surface_chroma_type == VDP_CHROMA_TYPE_420;
+
+ /* We can convert YV12 to NV12 on the fly! */
+ if (*is_supported &&
+ pscreen->is_video_format_supported(pscreen,
+ PIPE_FORMAT_NV12,
+ PIPE_VIDEO_PROFILE_UNKNOWN,
+ PIPE_VIDEO_ENTRYPOINT_BITSTREAM)) {
+ pipe_mutex_unlock(dev->mutex);
+ return VDP_STATUS_OK;
+ }
break;
case VDP_YCBCR_FORMAT_UYVY: