[Mplayer-cvslog] CVS: main mp_image.h,1.1,1.2

Arpi of Ize arpi at mplayer.dev.hu
Wed Jan 16 02:19:25 CET 2002


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv7881

Modified Files:
	mp_image.h 
Log Message:
bpp != depth

Index: mp_image.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_image.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mp_image.h	16 Jan 2002 00:14:59 -0000	1.1
+++ mp_image.h	16 Jan 2002 01:19:22 -0000	1.2
@@ -13,9 +13,14 @@
 // set if it's swapped plane/byteorder
 #define MP_IMGFLAG_SWAPPED 0x40
 
+#define MP_IMGTYPE_EXPORT 0
+#define MP_IMGTYPE_STATIC 1
+#define MP_IMGTYPE_TEMP 2
+
 typedef struct mp_image_s {
     unsigned short flags;
-    unsigned short bpp;
+    unsigned char type;
+    unsigned char bpp;  // bits/pixel. NOT depth! for RGB it will be n*8
     unsigned int imgfmt;
     int width,height;  // stored dimensions
     int x,y,w,h;  // visible dimensions
@@ -30,11 +35,11 @@
     mpi->flags&=~(MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV|MP_IMGFLAG_SWAPPED);
     mpi->out_fmt=out_fmt;
     if( (out_fmt&IMGFMT_RGB_MASK) == IMGFMT_RGB ){
-	mpi->bpp=out_fmt&255;
+	mpi->bpp=((out_fmt&255)+7)&(~7);
 	return;
     }
     if( (out_fmt&IMGFMT_BGR_MASK) == IMGFMT_BGR ){
-	mpi->bpp=out_fmt&255;
+	mpi->bpp=((out_fmt&255)+7)&(~7);
 	mpi->flags|=MP_IMGFLAG_SWAPPED;
 	return;
     }




More information about the MPlayer-cvslog mailing list