changeset 9116:d7fb212b5505

avoid extract of imposible high depths in wrong rgb/bgr functions
author iive
date Sun, 26 Jan 2003 22:24:48 +0000
parents fc803aa85058
children 582bda49dd30
files libmpcodecs/img_format.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/img_format.h	Sun Jan 26 22:24:17 2003 +0000
+++ b/libmpcodecs/img_format.h	Sun Jan 26 22:24:48 2003 +0000
@@ -27,8 +27,8 @@
 #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_MASK)
+#define IMGFMT_BGR_DEPTH(fmt) ((fmt)&~IMGFMT_BGR_MASK)
 
 
 /* Planar YUV Formats */