From: Gildas Bazin Date: Fri, 10 Sep 2004 13:53:43 +0000 (+0000) Subject: * modules/video_output/x11/xcommon.c, modules/video_output/directx/directx.c: when... X-Git-Tag: 0.8.0~430 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e9abcc11514a5f3d4e49667de1721b22e6a0889a;p=vlc * modules/video_output/x11/xcommon.c, modules/video_output/directx/directx.c: when we invert the YV12 picture buffer chroma planes, we need to report a I420 chroma. --- diff --git a/modules/video_output/directx/directx.c b/modules/video_output/directx/directx.c index eab877d0fe..dd284c1078 100644 --- a/modules/video_output/directx/directx.c +++ b/modules/video_output/directx/directx.c @@ -376,7 +376,7 @@ static int Init( vout_thread_t *p_vout ) if( !I_OUTPUTPICTURES ) { /* hmmm, it didn't work! Let's try commonly supported chromas */ - if( p_vout->output.i_chroma != VLC_FOURCC('Y','V','1','2') ) + if( p_vout->output.i_chroma != VLC_FOURCC('I','4','2','0') ) { p_vout->output.i_chroma = VLC_FOURCC('Y','V','1','2'); NewPictureVec( p_vout, p_vout->p_picture, MAX_DIRECTBUFFERS ); @@ -1624,6 +1624,10 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic, case VLC_FOURCC('Y','V','1','2'): + /* U and V inverted compared to I420 + * Fixme: this should be handled by the vout core */ + p_vout->output.i_chroma = VLC_FOURCC('I','4','2','0'); + p_pic->Y_PIXELS = p_pic->p_sys->ddsd.lpSurface; p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height; p_pic->p[Y_PLANE].i_visible_lines = p_vout->output.i_height; diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index 46ac6d8e3f..733721fddc 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -1236,6 +1236,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) { /* U and V inverted compared to I420 * Fixme: this should be handled by the vout core */ + p_vout->output.i_chroma = VLC_FOURCC('I','4','2','0'); p_pic->U_PIXELS = p_pic->p_sys->p_image->data + p_pic->p_sys->p_image->offsets[2]; p_pic->V_PIXELS = p_pic->p_sys->p_image->data