[Mplayer-cvslog] CVS: main/drivers/radeon radeon_vid.c,1.25,1.26 radeon.h,1.14,1.15

Nick Kurshev nick at mplayer.dev.hu
Thu Dec 6 11:21:15 CET 2001


Update of /cvsroot/mplayer/main/drivers/radeon
In directory mplayer:/var/tmp.root/cvs-serv23795/main/drivers/radeon

Modified Files:
	radeon_vid.c radeon.h 
Log Message:
Minor fixes

Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/drivers/radeon/radeon_vid.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- radeon_vid.c	5 Dec 2001 08:58:09 -0000	1.25
+++ radeon_vid.c	6 Dec 2001 10:21:02 -0000	1.26
@@ -378,7 +378,7 @@
     {
 	OUTREG(OV0_GRAPHICS_KEY_MSK, besr.graphics_key_msk);
 	OUTREG(OV0_GRAPHICS_KEY_CLR, besr.graphics_key_clr);
-	OUTREG(OV0_KEY_CNTL,GRAPHIC_KEY_FN_FALSE|VIDEO_KEY_FN_FALSE|CMP_MIX_OR);
+	OUTREG(OV0_KEY_CNTL,GRAPHIC_KEY_FN_EQ|VIDEO_KEY_FN_FALSE|CMP_MIX_OR);
     }
     else OUTREG(OV0_KEY_CNTL,GRAPHIC_KEY_FN_NE);
    
@@ -457,15 +457,24 @@
 void radeon_vid_set_color_key(int ckey_on, uint8_t R, uint8_t G, uint8_t B)
 {
     besr.ckey_on = ckey_on;
-    if(radeon_vid_get_dbpp() == 16)
-    {  /* 5.6.5 mode, 
-          note that these values depend on DAC_CNTL.EXPAND_MODE setting */
-       R = (R<<3);
-       G = (G<<2);
-       B = (B<<3);
-       besr.graphics_key_msk=((R|0x7)<<16)|((G|0x3)<<8)|(B|0x7)|(0xff<<24);
+    switch(radeon_vid_get_dbpp() == 16)
+    { 
+	case 16:
+        	/* 5.6.5 mode, 
+    	    	note that these values depend on DAC_CNTL.EXPAND_MODE setting */
+		R = (R<<3);
+		G = (G<<2);
+		B = (B<<3);
+//		besr.graphics_key_msk=((R|0x7)<<16)|((G|0x3)<<8)|(B|0x7)|(0xff<<24);
+		besr.graphics_key_msk=((R|0x7)<<16)|((G|0x3)<<8)|(B|0x7)|(0xff<<24);
+		break;
+	case 24: besr.graphics_key_msk = ((R)<<16)|((G)<<8)|(B);
+		break;
+	case 32:
+	default: besr.graphics_key_msk = ((R)<<16)|((G)<<8)|(B)|(0xff<<24);
+		break;
     }
-    else besr.graphics_key_msk = ((R)<<16)|((G) <<8)|(B)|(0xff<<24);
+    besr.graphics_key_msk=(1ULL<<radeon_vid_get_dbpp()) - 1;
     besr.graphics_key_clr=(R<<16)|(G<<8)|(B)|(0x00 << 24);
 }
 

Index: radeon.h
===================================================================
RCS file: /cvsroot/mplayer/main/drivers/radeon/radeon.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- radeon.h	4 Dec 2001 09:22:53 -0000	1.14
+++ radeon.h	6 Dec 2001 10:21:02 -0000	1.15
@@ -510,8 +510,13 @@
 #define OV0_SCALE_CNTL                         0x0420  
 #	define SCALER_PIX_EXPAND               0x00000001L
 #	define SCALER_Y2R_TEMP                 0x00000002L
+#ifdef RAGE128
+#	define SCALER_HORZ_PICK_NEAREST        0x00000003L
+#	define SCALER_VERT_PICK_NEAREST        0x00000004L
+#else
 #	define SCALER_HORZ_PICK_NEAREST        0x00000004L
 #	define SCALER_VERT_PICK_NEAREST        0x00000008L
+#endif
 #	define SCALER_SIGNED_UV                0x00000010L
 #	define SCALER_GAMMA_SEL_MASK           0x00000060L
 #	define SCALER_GAMMA_SEL_BRIGHT         0x00000000L
@@ -540,7 +545,11 @@
 #	define SCALER_UNKNOWN_FLAG0            0x00002000L /* ??? */
 #	define SCALER_UNKNOWN_FLAG1            0x00004000L /* ??? */
 #	define SCALER_SMART_SWITCH             0x00008000L
+#ifdef RAGE128
 #	define SCALER_BURST_PER_PLANE          0x00ff0000L
+#else
+#	define SCALER_BURST_PER_PLANE          0x007f0000L
+#endif
 #	define SCALER_DOUBLE_BUFFER            0x01000000L
 #	define SCALER_UNKNOWN_FLAG3            0x02000000L /* ??? */
 #	define SCALER_UNKNOWN_FLAG4            0x04000000L /* ??? */
@@ -628,16 +637,34 @@
 #define OV0_GRAPHICS_KEY_CLR                   0x04EC
 #define OV0_GRAPHICS_KEY_MSK                   0x04F0
 #define OV0_KEY_CNTL                           0x04F4  
+#ifdef RAGE128
 #	define VIDEO_KEY_FN_MASK               0x00000007L
+#else
+#	define VIDEO_KEY_FN_MASK               0x00000003L
+#endif
 #	define VIDEO_KEY_FN_FALSE              0x00000000L
 #	define VIDEO_KEY_FN_TRUE               0x00000001L
+#ifdef RAGE128
 #	define VIDEO_KEY_FN_EQ                 0x00000004L
 #	define VIDEO_KEY_FN_NE                 0x00000005L
+#else
+#	define VIDEO_KEY_FN_EQ                 0x00000002L
+#	define VIDEO_KEY_FN_NE                 0x00000003L
+#endif
+#ifdef RAGE128
 #	define GRAPHIC_KEY_FN_MASK             0x00000070L
+#else
+#	define GRAPHIC_KEY_FN_MASK             0x00000030L
+#endif
 #	define GRAPHIC_KEY_FN_FALSE            0x00000000L
 #	define GRAPHIC_KEY_FN_TRUE             0x00000010L
+#ifdef RAGE128
 #	define GRAPHIC_KEY_FN_EQ               0x00000040L
 #	define GRAPHIC_KEY_FN_NE               0x00000050L
+#else
+#	define GRAPHIC_KEY_FN_EQ               0x00000020L
+#	define GRAPHIC_KEY_FN_NE               0x00000030L
+#endif
 #	define CMP_MIX_MASK                    0x00000100L
 #	define CMP_MIX_OR                      0x00000000L
 #	define CMP_MIX_AND                     0x00000100L




More information about the MPlayer-cvslog mailing list