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

Andre Weber WeberAndre at gmx.de
Wed Sep 9 18:05:44 CEST 2009


Hi,

would this plane swap also fix the wrong color output for DirectX overlay on windows?
- were I get "slight blue" colored pictures?

(I do not mean to same code - just the idea to swap those planes before sending to
 the picture to the DirectX API)

--
André Weber

----- Original Message ----- 
From: "git version control" <git at videolan.org>
To: <vlc-devel at videolan.org>
Sent: Wednesday, September 09, 2009 5:52 PM
Subject: [vlc-devel] commit: xcb-xv: fix YV12 again ( Rémi Denis-Courmont )


> 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])
>              {
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>




More information about the vlc-devel mailing list