[ods15 at ods15.dyndns.org: [MPlayer-dev-eng] [PATCH] possible vo_cvidix bug]

Sascha Sommer saschasommer at freenet.de
Mon Dec 26 11:42:01 CET 2005


Hi,

On Sunday 25 December 2005 19:11, you wrote:
> forwarding this to you cause i really want this patch committed, please
> look over patch.
>
> - ods15
>
> ----- Forwarded message from Oded Shimon <ods15 at ods15.dyndns.org> -----
>
> Date: Sat, 24 Dec 2005 21:02:14 +0200
> To: mplayer-dev-eng at mplayerhq.hu
> From: Oded Shimon <ods15 at ods15.dyndns.org>
> Subject: [MPlayer-dev-eng] [PATCH] possible vo_cvidix bug
>
> When using vo_cvidix on matrox, colorkey setting doesn't work right, it
> seems to apply only after switching to full screen. By hacking the code I
> found that it only works if you change the colorkey BEFORE calling
> vidix_init, not after. Because it was changed after, it was only applied
> when calling vidix_init again (like to change resolution for a full screen
> switch). With this patch, it works perfectly
>
> I am not maintainer of this and do not truely understand the change I made,
> so I will not commit this unless approoved by someone who does... So,
> someone please look over this patch...
>
> - ods15
>
> Index: libvo/vo_cvidix.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libvo/vo_cvidix.c,v
> retrieving revision 1.16
> diff -u -r1.16 vo_cvidix.c
> --- libvo/vo_cvidix.c	4 Sep 2005 20:58:39 -0000	1.16
> +++ libvo/vo_cvidix.c	24 Dec 2005 18:29:51 -0000
> @@ -55,11 +55,6 @@
>      else y=0;
>    }
>    if(vo_config_count)vidix_stop();
> -  if(vidix_init(swidth, sheight, x, y, vo_dwidth, vo_dheight, sformat, 32,
> vo_screenwidth,vo_screenheight)){ -    mp_msg(MSGT_VO, MSGL_FATAL, "Can't
> setup VIDIX driver: %s\n", strerror(errno)); -    return 1;
> -  }
> -  vidix_start();
>    if(vidix_grkey_support()){
>      vidix_grkey_get(&gr_key);
>      gr_key.key_op = KEYS_PUT;
> @@ -72,6 +67,11 @@
>      else gr_key.ckey.op = CKEY_FALSE;
>      vidix_grkey_set(&gr_key);
>    }
> +  if(vidix_init(swidth, sheight, x, y, vo_dwidth, vo_dheight, sformat, 32,
> vo_screenwidth,vo_screenheight)){ +    mp_msg(MSGT_VO, MSGL_FATAL, "Can't
> setup VIDIX driver: %s\n", strerror(errno)); +    return 1;
> +  }
> +  vidix_start();
>    return 0;
>  }
>
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
> ----- End forwarded message -----

Do you own a matrox card?
I'm against this change as it is only a workaround. I just looked over all the 
other drivers and they seem to write the new colorkey to the registers when 
the vixSetGrKeys function gets called.
You could try to seperate the colorkey part of mga_vid_write_regs function and 
then call this from vixSetGrKey, too.
As quick alternative something like the attached patch might also work.

Regards

Sascha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mga_vid_colorkey.diff
Type: text/x-diff
Size: 496 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20051226/3c8c2a05/attachment.diff>


More information about the MPlayer-dev-eng mailing list