[Mplayer-cvslog] CVS: main/libmpcodecs img_format.c, 1.10, 1.11 img_format.h, 1.15, 1.16

Michael Niedermayer CVS syncmail at mplayerhq.hu
Wed Aug 11 03:41:45 CEST 2004


CVS change done by Michael Niedermayer CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv19442

Modified Files:
	img_format.c img_format.h 
Log Message:
missing 32bit RGBA variants and some cleanup


Index: img_format.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/img_format.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- img_format.c	4 Nov 2003 19:58:37 -0000	1.10
+++ img_format.c	11 Aug 2004 01:41:43 -0000	1.11
@@ -11,7 +11,7 @@
 	case IMGFMT_RGB15: return("RGB 15-bit");
 	case IMGFMT_RGB16: return("RGB 16-bit");
 	case IMGFMT_RGB24: return("RGB 24-bit");
-	case IMGFMT_RGB32: return("RGB 32-bit");
+//	case IMGFMT_RGB32: return("RGB 32-bit");
 	case IMGFMT_BGR1: return("BGR 1-bit");
 	case IMGFMT_BGR4: return("BGR 4-bit");
 	case IMGFMT_BG4B: return("BGR 4-bit per byte");
@@ -19,7 +19,11 @@
 	case IMGFMT_BGR15: return("BGR 15-bit");
 	case IMGFMT_BGR16: return("BGR 16-bit");
 	case IMGFMT_BGR24: return("BGR 24-bit");
-	case IMGFMT_BGR32: return("BGR 32-bit");
+//	case IMGFMT_BGR32: return("BGR 32-bit");
+	case IMGFMT_ABGR: return("ABGR");
+	case IMGFMT_BGRA: return("BGRA");
+	case IMGFMT_ARGB: return("ARGB");
+	case IMGFMT_RGBA: return("RGBA");
 	case IMGFMT_YVU9: return("Planar YVU9");
 	case IMGFMT_IF09: return("Planar IF09");
 	case IMGFMT_YV12: return("Planar YV12");

Index: img_format.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/img_format.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- img_format.h	4 Nov 2003 19:58:37 -0000	1.15
+++ img_format.h	11 Aug 2004 01:41:43 -0000	1.16
@@ -8,7 +8,7 @@
 #define IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8))
 #define IMGFMT_RGB1  (IMGFMT_RGB|1)
 #define IMGFMT_RGB4  (IMGFMT_RGB|4)
-#define IMGFMT_RG4B  (IMGFMT_RGB|4|128) // RGB4 with 1 pixel per byte
+#define IMGFMT_RGB4_CHAR  (IMGFMT_RGB|4|128) // RGB4 with 1 pixel per byte
 #define IMGFMT_RGB8  (IMGFMT_RGB|8)
 #define IMGFMT_RGB15 (IMGFMT_RGB|15)
 #define IMGFMT_RGB16 (IMGFMT_RGB|16)
@@ -19,13 +19,29 @@
 #define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8))
 #define IMGFMT_BGR1 (IMGFMT_BGR|1)
 #define IMGFMT_BGR4 (IMGFMT_BGR|4)
-#define IMGFMT_BG4B (IMGFMT_BGR|4|128) // BGR4 with 1 pixel per byte
+#define IMGFMT_BGR4_CHAR (IMGFMT_BGR|4|128) // BGR4 with 1 pixel per byte
 #define IMGFMT_BGR8 (IMGFMT_BGR|8)
 #define IMGFMT_BGR15 (IMGFMT_BGR|15)
 #define IMGFMT_BGR16 (IMGFMT_BGR|16)
 #define IMGFMT_BGR24 (IMGFMT_BGR|24)
 #define IMGFMT_BGR32 (IMGFMT_BGR|32)
 
+#ifdef WORDS_BIGENDIAN
+#define IMGFMT_ABGR IMGFMT_RGB32
+#define IMGFMT_BGRA (IMGFMT_RGB32|64)
+#define IMGFMT_ARGB IMGFMT_BGR32
+#define IMGFMT_RGBA (IMGFMT_BGR32|64)
+#else
+#define IMGFMT_ABGR (IMGFMT_BGR32|64)
+#define IMGFMT_BGRA IMGFMT_BGR32
+#define IMGFMT_ARGB (IMGFMT_RGB32|64)
+#define IMGFMT_RGBA IMGFMT_RGB32
+#endif
+
+/* old names for compatibility */
+#define IMGFMT_RG4B  IMGFMT_RGB4_CHAR
+#define IMGFMT_BG4B  IMGFMT_BGR4_CHAR
+
 #define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
 #define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
 




More information about the MPlayer-cvslog mailing list