[Mplayer-cvslog] CVS: main/vidix/drivers radeon_vid.c,1.19,1.20

Nick Kurshev nick at mplayer.dev.hu
Sun Jan 20 18:11:07 CET 2002


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

Modified Files:
	radeon_vid.c 
Log Message:
RGB independed correction (similar to brightness)

Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- radeon_vid.c	20 Jan 2002 14:42:08 -0000	1.19
+++ radeon_vid.c	20 Jan 2002 17:11:05 -0000	1.20
@@ -309,15 +309,21 @@
  *            cont - contrast                                               *
  *            sat - saturation                                              *
  *            hue - hue                                                     *
+ *            red_intense - intense of red component                        *
+ *            green_intense - intense of green component                    *
+ *            blue_intense - intense of blue component                      *
  *            ref - index to the table of refernce transforms               *
  *   Outputs: NONE                                                          *
  ****************************************************************************/
 
 static void radeon_set_transform(float bright, float cont, float sat,
-				 float hue, unsigned ref)
+				 float hue, float red_intense,
+				 float green_intense,float blue_intense,
+				 unsigned ref)
 {
 	float OvHueSin, OvHueCos;
 	float CAdjLuma, CAdjOff;
+	float RedAdj,GreenAdj,BlueAdj;
 	float CAdjRCb, CAdjRCr;
 	float CAdjGCb, CAdjGCr;
 	float CAdjBCb, CAdjBCr;
@@ -340,6 +346,9 @@
 
 	CAdjLuma = cont * trans[ref].RefLuma;
 	CAdjOff = cont * trans[ref].RefLuma * bright * 1023.0;
+	RedAdj = cont * trans[ref].RefLuma * red_intense * 1023.0;
+	GreenAdj = cont * trans[ref].RefLuma * green_intense * 1023.0;
+	BlueAdj = cont * trans[ref].RefLuma * blue_intense * 1023.0;
 
 	CAdjRCb = sat * -OvHueSin * trans[ref].RefRCr;
 	CAdjRCr = sat * OvHueCos * trans[ref].RefRCr;
@@ -365,11 +374,11 @@
 	OvGCr = CAdjGCr;
 	OvBCb = CAdjBCb;
 	OvBCr = CAdjBCr;
-	OvROff = CAdjOff -
+	OvROff = RedAdj + CAdjOff -
 		OvLuma * Loff - (OvRCb + OvRCr) * Coff;
-	OvGOff = CAdjOff - 
+	OvGOff = GreenAdj + CAdjOff - 
 		OvLuma * Loff - (OvGCb + OvGCr) * Coff;
-	OvBOff = CAdjOff - 
+	OvBOff = BlueAdj + CAdjOff - 
 		OvLuma * Loff - (OvBCb + OvBCr) * Coff;
 #if 0 /* default constants */
 	OvROff = -888.5;
@@ -1102,6 +1111,9 @@
 		       RTFContrast(equal.contrast),
 		       RTFSaturation(equal.saturation),
 		       RTFHue(equal.hue),
+		       RTFBrightness(equal.red_intense),
+		       RTFBrightness(equal.green_intense),
+		       RTFBrightness(equal.blue_intense),
 		       itu_space);
 #endif
   return 0;




More information about the MPlayer-cvslog mailing list