Mesa (master): st/vdpau: don' t re-allocate interlaced buffer with packed YUV format
Leo Liu
leoliu at kemper.freedesktop.org
Wed Oct 4 13:24:41 UTC 2017
Module: Mesa
Branch: master
Commit: 327480d10f2dab52de28e9a84609fac81c2034c5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=327480d10f2dab52de28e9a84609fac81c2034c5
Author: Leo Liu <leo.liu at amd.com>
Date: Sat Sep 30 22:19:49 2017 -0400
st/vdpau: don't re-allocate interlaced buffer with packed YUV format
It caused corruption, when vlVdpVideoSurfacePutBitsYCbCr putting YUV to the fields
Cc: mesa-stable at lists.freedesktop.org
Cc: Andy Furniss <adf.lists at gmail.com>
Tested-by: Andy Furniss <adf.lists at gmail.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
---
src/gallium/state_trackers/vdpau/surface.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index 884ae30831..c678eb7037 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -350,6 +350,8 @@ vlVdpVideoSurfacePutBitsYCbCr(VdpVideoSurface surface,
/* adjust the template parameters */
p_surf->templat.buffer_format = nformat;
+ if (nformat == PIPE_FORMAT_YUYV || nformat == PIPE_FORMAT_UYVY)
+ p_surf->templat.interlaced = false;
/* and try to create the video buffer with the new format */
p_surf->video_buffer = pipe->create_video_buffer(pipe, &p_surf->templat);
More information about the mesa-commit
mailing list