[Mplayer-cvslog] CVS: main/vidix/drivers nvidia_vid.c,1.13,1.14

Alex Beregszaszi alex at mplayerhq.hu
Fri Oct 17 11:19:16 CEST 2003


Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var/tmp.root/cvs-serv31384

Modified Files:
	nvidia_vid.c 
Log Message:
support for disabling the colorkey

Index: nvidia_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/nvidia_vid.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- nvidia_vid.c	14 Oct 2003 21:29:25 -0000	1.13
+++ nvidia_vid.c	17 Oct 2003 09:18:47 -0000	1.14
@@ -3,7 +3,7 @@
    Copyrights 2003 Sascha Sommer. This file is based on sources from
    RIVATV (rivatv.sf.net)
    Licence: GPL
-   WARNING: THIS DRIVER IS IN BETTA STAGE
+   WARNING: THIS DRIVER IS IN BETA STAGE
    
    multi buffer support and TNT2 fixes by Dmitry Baryshkov
 */
@@ -410,6 +410,7 @@
 /* Compute and set colorkey depending on the colour depth. */
 static void rivatv_overlay_colorkey (rivatv_info* info, unsigned int chromakey){
 	uint32_t r, g, b, key = 0;
+
 	r = (chromakey & 0x00FF0000) >> 16;
 	g = (chromakey & 0x0000FF00) >> 8;
 	b = chromakey & 0x000000FF;
@@ -428,7 +429,6 @@
 		break;
 	}
 	//printf("[nvidia_vid] depth=%d %08X \n", info->depth, chromakey);
-    if(!info->use_colorkey)return;
     switch (info->chip.arch) {
 	  case NV_ARCH_10:
 	  case NV_ARCH_20:
@@ -727,7 +727,7 @@
    
   rivatv_enable_PMEDIA(info);
   info->next_frame = 0;
-  info->use_colorkey = 1;
+  info->use_colorkey = 0;
   return 0;
 }
 
@@ -834,6 +834,14 @@
 }
 
 int vixSetGrKeys( const vidix_grkey_t * grkey){
+  if (grkey->ckey.op == CKEY_FALSE)
+  {
+    info->use_colorkey = 0;
+    printf("[nvidia_vid] colorkeying disabled\n");
+    return 0;
+  }
+
+  info->use_colorkey = 1;
   info->vidixcolorkey = ((grkey->ckey.red<<16)|(grkey->ckey.green<<8)|grkey->ckey.blue);
   printf("[nvidia_vid] set colorkey 0x%x\n",info->vidixcolorkey);
   rivatv_overlay_colorkey(info,info->vidixcolorkey);



More information about the MPlayer-cvslog mailing list