[MPlayer-dev-eng] remote X on DecWindows
Gabucino
gabucino at mplayerhq.hu
Sat Jan 10 00:58:53 CET 2004
I've received this patch by mail. It fixes remote X11 playing to an Alpha
running DecWindows (VMS), in 32bpp. Colours are correct. I know this patch
is not for head CVS, and not even unified diff, but maybe someone can comment
on it.
--
Gabucino
MPlayer Core Team
-------------- next part --------------
diff MPlayer-0.92-orig/libvo/vo_x11.c MPlayer-0.92/libvo/vo_x11.c
381,400c381,382
< switch ((bpp=myximage->bits_per_pixel)){
< case 24: draw_alpha_fnc=draw_alpha_24;
< out_format= IMGFMT_BGR24; break;
< case 32: draw_alpha_fnc=draw_alpha_32;
< out_format= IMGFMT_BGR32; break;
< case 15:
< case 16: if (depth==15){
< draw_alpha_fnc=draw_alpha_15;
< out_format= IMGFMT_BGR15;
< }else{
< draw_alpha_fnc=draw_alpha_16;
< out_format= IMGFMT_BGR16;
< }break;
< case 8: draw_alpha_fnc=draw_alpha_null;
< out_format= IMGFMT_BGR8; break;
< default: draw_alpha_fnc=draw_alpha_null;
< }
<
< /* always allocate swsContext as size could change between frames */
< swsContext= getSwsContextFromCmdLine(width, height, in_format, width, height, out_format );
> /* - maulis - a mode es a bpp selector megcserelese, h hasznalni tudjam a mode -t */
> bpp=myximage->bits_per_pixel;
402c384
< //printf( "X11 bpp: %d color mask: R:%lX G:%lX B:%lX\n",bpp,myximage->red_mask,myximage->green_mask,myximage->blue_mask );
---
> // printf( "X11 bpp: %d color mask: R:%lX G:%lX B:%lX\n",bpp,myximage->red_mask,myximage->green_mask,myximage->blue_mask );
428,429c410,411
< mp_msg(MSGT_VO,MSGL_ERR,"BGR not supported, please contact the developers\n");
< return -1;
---
> mp_msg(MSGT_VO,MSGL_ERR,"BGR is colorless (not supported) please contact the developers\n");
> //return -1;
431a414,438
>
> switch (bpp){
> case 24: draw_alpha_fnc=draw_alpha_24;
> out_format= (mode == MODE_RGB) ? IMGFMT_BGR24 : IMGFMT_RGB32;
> break;
> case 32: draw_alpha_fnc=draw_alpha_32;
> out_format= (mode == MODE_RGB )? IMGFMT_BGR32: IMGFMT_RGB32; break;
> case 15:
> case 16: if (depth==15){
> draw_alpha_fnc=draw_alpha_15;
> out_format= (mode == MODE_RGB) ? IMGFMT_BGR15 : IMGFMT_RGB15;
> }else{
> draw_alpha_fnc=draw_alpha_16;
> out_format= (mode == MODE_RGB) ? IMGFMT_BGR16 : IMGFMT_RGB16;
> }break;
> case 8: draw_alpha_fnc=draw_alpha_null;
> out_format= (mode == MODE_RGB) ? IMGFMT_BGR8: IMGFMT_RGB8;
> break;
> default: draw_alpha_fnc=draw_alpha_null;
> }
>
> /* always allocate swsContext as size could change between frames */
> swsContext= getSwsContextFromCmdLine(width, height, in_format, width, height, out_format );
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040110/ea571671/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list