[Gridflow-cvs] [svn] commit: r5383 - in /trunk/src: colorspace.hxx videodev.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Wed Apr 7 21:49:02 EDT 2010


Author: matju
Date: Wed Apr  7 21:49:02 2010
New Revision: 5383

Log:
make macros for RGB->magic (future use)

Modified:
    trunk/src/colorspace.hxx
    trunk/src/videodev.cxx

Modified: trunk/src/colorspace.hxx
==============================================================================
--- trunk/src/colorspace.hxx (original)
+++ trunk/src/colorspace.hxx Wed Apr  7 21:49:02 2010
@@ -39,7 +39,11 @@
 
 // these convert from full-range RGB to full-range YUV
 // macros for reduced-range YUV would be needed in order to really support the 'magic' colorspace everywhere.
-#define RGB2Y(R,G,B) fastclip(    ((  76*R + 150*G +  29*B)>>8))
-#define RGB2U(R,G,B) fastclip(128+((- 44*R -  85*G + 108*B)>>8))
-#define RGB2V(R,G,B) fastclip(128+(( 128*R - 108*G -  21*B)>>8))
+#define RGB2Y(R,G,B)  fastclip(    ((  76*R + 150*G +  29*B)>>8))
+#define RGB2U(R,G,B)  fastclip(128+((- 44*R -  85*G + 108*B)>>8))
+#define RGB2V(R,G,B)  fastclip(128+(( 128*R - 108*G -  21*B)>>8))
 
+// these convert from full-range RGB to reduced-range YUV
+#define RGB2Y_(R,G,B) fastclip(    ((  66*R + 129*G +  25*B)>>8))
+#define RGB2U_(R,G,B) fastclip(128+((- 38*R -  74*G + 112*B)>>8))
+#define RGB2V_(R,G,B) fastclip(128+(( 112*R -  94*G -  18*B)>>8))

Modified: trunk/src/videodev.cxx
==============================================================================
--- trunk/src/videodev.cxx (original)
+++ trunk/src/videodev.cxx Wed Apr  7 21:49:02 2010
@@ -444,11 +444,6 @@
 	}
 }
 
-/* these are factors for RGB to analog YUV */
-// Y =   66*R + 129*G +  25*B
-// U = - 38*R -  74*G + 112*B
-// V =  112*R -  94*G -  18*B
-
 // strange that read2 is not used and read3 is used instead
 static int read2(int fd, uint8 *image, int n) {
 	int r=0;



More information about the Gridflow-cvs mailing list