aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vdpau')
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c3
-rw-r--r--src/gallium/state_trackers/vdpau/mixer.c2
-rw-r--r--src/gallium/state_trackers/vdpau/output.c1
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c8
4 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 48dfb0e0003..8d3c58714a8 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -600,7 +600,8 @@ vlVdpDecoderRender(VdpDecoder decoder,
if (vlsurf->device != vldecoder->device)
return VDP_STATUS_HANDLE_DEVICE_MISMATCH;
- if (vlsurf->video_buffer != NULL && vlsurf->video_buffer->chroma_format != dec->chroma_format)
+ if (vlsurf->video_buffer != NULL &&
+ pipe_format_to_chroma_format(vlsurf->video_buffer->buffer_format) != dec->chroma_format)
// TODO: Recreate decoder with correct chroma
return VDP_STATUS_INVALID_CHROMA_TYPE;
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
index a50232bfac3..2e2bd20ef39 100644
--- a/src/gallium/state_trackers/vdpau/mixer.c
+++ b/src/gallium/state_trackers/vdpau/mixer.c
@@ -272,7 +272,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer,
if (vmixer->video_width > video_buffer->width ||
vmixer->video_height > video_buffer->height ||
- vmixer->chroma_format != video_buffer->chroma_format)
+ vmixer->chroma_format != pipe_format_to_chroma_format(video_buffer->buffer_format))
return VDP_STATUS_INVALID_SIZE;
if (layer_count > vmixer->max_layers)
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index cb0e2ffa57c..ac8fc550bc7 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -465,7 +465,6 @@ vlVdpOutputSurfacePutBitsYCbCr(VdpOutputSurface surface,
mtx_lock(&vlsurface->device->mutex);
memset(&vtmpl, 0, sizeof(vtmpl));
vtmpl.buffer_format = format;
- vtmpl.chroma_format = FormatYCBCRToPipeChroma(source_ycbcr_format);
if (destination_rect) {
vtmpl.width = abs(destination_rect->x0-destination_rect->x1);
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index e9d55a282e2..1f1b0b3ef68 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -89,7 +89,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
PIPE_VIDEO_CAP_PREFERED_FORMAT
);
- p_surf->templat.chroma_format = ChromaToPipe(chroma_type);
+ assert(pipe_format_to_chroma_format(p_surf->templat.buffer_format) == ChromaToPipe(chroma_type));
p_surf->templat.width = width;
p_surf->templat.height = height;
p_surf->templat.interlaced = pipe->screen->get_video_param
@@ -168,11 +168,11 @@ vlVdpVideoSurfaceGetParameters(VdpVideoSurface surface,
if (p_surf->video_buffer) {
*width = p_surf->video_buffer->width;
*height = p_surf->video_buffer->height;
- *chroma_type = PipeToChroma(p_surf->video_buffer->chroma_format);
+ *chroma_type = PipeToChroma(pipe_format_to_chroma_format(p_surf->video_buffer->buffer_format));
} else {
*width = p_surf->templat.width;
*height = p_surf->templat.height;
- *chroma_type = PipeToChroma(p_surf->templat.chroma_format);
+ *chroma_type = PipeToChroma(pipe_format_to_chroma_format(p_surf->templat.buffer_format));
}
return VDP_STATUS_OK;
@@ -186,7 +186,7 @@ vlVdpVideoSurfaceSize(vlVdpSurface *p_surf, int component,
*height = p_surf->templat.height;
vl_video_buffer_adjust_size(width, height, component,
- p_surf->templat.chroma_format,
+ pipe_format_to_chroma_format(p_surf->templat.buffer_format),
p_surf->templat.interlaced);
}