[vlc-devel] commit: xcb-xv: fix YV12 again ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Sep 9 17:52:53 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep  9 18:52:26 2009 +0300| [34753619c682705d7e090cb31526ab7ccd5cadce] | committer: Rémi Denis-Courmont 

xcb-xv: fix YV12 again

Chrominance planes swap had been broken by the vout rework.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=34753619c682705d7e090cb31526ab7ccd5cadce
---

 modules/video_output/xcb/xvideo.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 95be5c7..fbd355e 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -560,6 +560,13 @@ static picture_t *Get (vout_display_t *vd)
             /* We assume that offsets[0] is zero */
             for (int i = 1; i < pic->i_planes; i++)
                 res->p[i].p_pixels = res->p[0].p_pixels + offsets[i];
+            if (vd->fmt.i_chroma == VLC_CODEC_YV12)
+            {   /* YVU: swap U and V planes */
+                uint8_t *buf = res->p[2].p_pixels;
+                res->p[2].p_pixels = res->p[1].p_pixels;
+                res->p[1].p_pixels = buf;
+            }
+
             pic_array[count] = picture_NewFromResource (&vd->fmt, res);
             if (!pic_array[count])
             {




More information about the vlc-devel mailing list