Commit f93279eb authored by Damien Fouilleul's avatar Damien Fouilleul

- direct3d: partial fix for i420->rgb conversion on little endian CPU (proper...

- direct3d: partial fix for i420->rgb conversion on little endian CPU (proper fix should go in i420_rgb converter)
parent 41583bb9
...@@ -163,6 +163,9 @@ static int OpenVideo( vlc_object_t *p_this ) ...@@ -163,6 +163,9 @@ static int OpenVideo( vlc_object_t *p_this )
p_vout->p_sys->b_cursor_hidden = 0; p_vout->p_sys->b_cursor_hidden = 0;
p_vout->p_sys->i_lastmoved = mdate(); p_vout->p_sys->i_lastmoved = mdate();
var_Create( p_vout, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
var_Create( p_vout, "disable-screensaver", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
/* Set main window's size */ /* Set main window's size */
p_vout->p_sys->i_window_width = p_vout->i_window_width; p_vout->p_sys->i_window_width = p_vout->i_window_width;
p_vout->p_sys->i_window_height = p_vout->i_window_height; p_vout->p_sys->i_window_height = p_vout->i_window_height;
...@@ -319,6 +322,9 @@ static int Init( vout_thread_t *p_vout ) ...@@ -319,6 +322,9 @@ static int Init( vout_thread_t *p_vout )
return i_ret; return i_ret;
} }
/* Change the window title bar text */
PostMessage( p_vout->p_sys->hwnd, WM_VLC_CHANGE_TEXT, 0, 0 );
p_vout->fmt_out.i_chroma = p_vout->output.i_chroma; p_vout->fmt_out.i_chroma = p_vout->output.i_chroma;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -914,60 +920,70 @@ static int Direct3DVoutSetOutputFormat(vout_thread_t *p_vout, D3DFORMAT format) ...@@ -914,60 +920,70 @@ static int Direct3DVoutSetOutputFormat(vout_thread_t *p_vout, D3DFORMAT format)
break; break;
case D3DFMT_X8R8G8B8: case D3DFMT_X8R8G8B8:
case D3DFMT_A8R8G8B8: case D3DFMT_A8R8G8B8:
/*
** FIXME: some custom masks are not handled properly in rgb_yuv converter,
** ARGB do NOT work !
*/
p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '3', '2'); p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '3', '2');
p_vout->output.i_rmask = 0x000000ff; p_vout->output.i_rmask = 0x00ff0000;
p_vout->output.i_gmask = 0x0000ff00; p_vout->output.i_gmask = 0x0000ff00;
p_vout->output.i_bmask = 0x00ff0000; p_vout->output.i_bmask = 0x000000ff;
# if defined( WORDS_BIGENDIAN )
p_vout->output.i_rrshift = 0;
p_vout->output.i_lrshift = 24;
p_vout->output.i_rgshift = 0;
p_vout->output.i_lgshift = 16;
p_vout->output.i_rbshift = 0;
p_vout->output.i_lbshift = 8;
# else
p_vout->output.i_rrshift = 0;
p_vout->output.i_lrshift = 8; p_vout->output.i_lrshift = 8;
p_vout->output.i_rgshift = 0;
p_vout->output.i_lgshift = 16; p_vout->output.i_lgshift = 16;
p_vout->output.i_rbshift = 0;
p_vout->output.i_lbshift = 24; p_vout->output.i_lbshift = 24;
# endif
break; break;
case D3DFMT_R5G6B5: case D3DFMT_R5G6B5:
p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '1', '6'); p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '1', '6');
# if defined( WORDS_BIGENDIAN )
p_vout->output.i_rmask = (0x1fL)<<11; p_vout->output.i_rmask = (0x1fL)<<11;
p_vout->output.i_gmask = (0x3fL)<<5; p_vout->output.i_gmask = (0x3fL)<<5;
p_vout->output.i_bmask = (0x1fL)<<0; p_vout->output.i_bmask = (0x1fL)<<0;
//p_vout->output.i_rshift = 11; # if defined( WORDS_BIGENDIAN )
//p_vout->output.i_gshift = 5; p_vout->output.i_rrshift = 0;
//p_vout->output.i_bshift = 0; p_vout->output.i_lrshift = 11;
p_vout->output.i_rgshift = 0;
p_vout->output.i_lgshift = 5;
p_vout->output.i_rbshift = 0;
p_vout->output.i_lbshift = 0;
# else # else
/* /* FIXME: since components are not byte aligned,
** FIXME: in little endian mode, following masking is not byte aligned, there is not chance that this will work */
** therefore green bits will not be sequentially merged ! p_vout->output.i_rrshift = 0;
*/ p_vout->output.i_lrshift = 0;
p_vout->output.i_rmask = (0x1fL)<<0; p_vout->output.i_rgshift = 0;
p_vout->output.i_gmask = (0x3fL)<<5; p_vout->output.i_lgshift = 5;
p_vout->output.i_bmask = (0x1fL)<<11; p_vout->output.i_rbshift = 0;
//p_vout->output.i_rshift = 0; p_vout->output.i_lbshift = 11;
//p_vout->output.i_gshift = 5;
//p_vout->output.i_bshift = 11;
# endif # endif
break; break;
case D3DFMT_X1R5G5B5: case D3DFMT_X1R5G5B5:
p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '1', '5'); p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '1', '5');
# if defined( WORDS_BIGENDIAN )
p_vout->output.i_rmask = (0x1fL)<<10; p_vout->output.i_rmask = (0x1fL)<<10;
p_vout->output.i_gmask = (0x1fL)<<5; p_vout->output.i_gmask = (0x1fL)<<5;
p_vout->output.i_bmask = (0x1fL)<<0; p_vout->output.i_bmask = (0x1fL)<<0;
//p_vout->output.i_rshift = 10; # if defined( WORDS_BIGENDIAN )
//p_vout->output.i_gshift = 5; p_vout->output.i_rrshift = 0;
//p_vout->output.i_bshift = 0; p_vout->output.i_lrshift = 10;
p_vout->output.i_rgshift = 0;
p_vout->output.i_lgshift = 5;
p_vout->output.i_rbshift = 0;
p_vout->output.i_lbshift = 0;
# else # else
/* /* FIXME: since components are not byte aligned,
** FIXME: in little endian mode, following masking is not byte aligned, there is not chance that this will work */
** therefore green bits will not be sequentially merged ! p_vout->output.i_rrshift = 0;
*/ p_vout->output.i_lrshift = 1;
p_vout->output.i_rmask = (0x1fL)<<1; p_vout->output.i_rgshift = 0;
p_vout->output.i_gmask = (0x1fL)<<6; p_vout->output.i_lgshift = 5;
p_vout->output.i_bmask = (0x1fL)<<11; p_vout->output.i_rbshift = 0;
//p_vout->output.i_rshift = 1; p_vout->output.i_lbshift = 11;
//p_vout->output.i_gshift = 5;
//p_vout->output.i_bshift = 11;
# endif # endif
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment