[Mplayer-cvslog] CVS: main/libmpcodecs img_format.h,1.8,1.9

Moritz Bunkus CVS mosu at mplayerhq.hu
Wed Jan 15 12:17:04 CET 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv14644/libmpcodecs

Modified Files:
	img_format.h 
Log Message:
bunkus: Encapsulated arguments to #define in ( ... ) so that the #defines can be safely used like functions: mydef(flag ? val1 : val2)

Index: img_format.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/img_format.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- img_format.h	1 Aug 2002 12:39:07 -0000	1.8
+++ img_format.h	15 Jan 2003 11:16:30 -0000	1.9
@@ -24,11 +24,11 @@
 #define IMGFMT_BGR24 (IMGFMT_BGR|24)
 #define IMGFMT_BGR32 (IMGFMT_BGR|32)
 
-#define IMGFMT_IS_RGB(fmt) ((fmt&IMGFMT_RGB_MASK)==IMGFMT_RGB)
-#define IMGFMT_IS_BGR(fmt) ((fmt&IMGFMT_BGR_MASK)==IMGFMT_BGR)
+#define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB)
+#define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR)
 
-#define IMGFMT_RGB_DEPTH(fmt) (fmt&~IMGFMT_RGB)
-#define IMGFMT_BGR_DEPTH(fmt) (fmt&~IMGFMT_BGR)
+#define IMGFMT_RGB_DEPTH(fmt) ((fmt)&~IMGFMT_RGB)
+#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&~IMGFMT_BGR)
 
 
 /* Planar YUV Formats */



More information about the MPlayer-cvslog mailing list