changeset 4393:5187883df562 libavcodec

enum
author michael
date Wed, 24 Jan 2007 10:41:03 +0000
parents e0c94f1b8f55
children 182949fbc53e
files bmp.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bmp.c	Wed Jan 24 00:54:36 2007 +0000
+++ b/bmp.c	Wed Jan 24 10:41:03 2007 +0000
@@ -27,10 +27,12 @@
     AVFrame picture;
 } BMPContext;
 
-#define BMP_RGB       0
-#define BMP_RLE8      1
-#define BMP_RLE4      2
-#define BMP_BITFIELDS 3
+typedef enum {
+    BMP_RGB=0,
+    BMP_RLE8,
+    BMP_RLE4,
+    BMP_BITFIELDS,
+} BiCompression;
 
 #define read16(bits) bswap_16(get_bits(bits, 16))
 #define read32(bits) bswap_32(get_bits_long(bits, 32))
@@ -55,7 +57,7 @@
     unsigned int fsize, hsize;
     int width, height;
     unsigned int depth;
-    unsigned int comp;
+    BiCompression comp;
     unsigned int ihsize;
     int i, j, n, linesize;
     uint32_t rgb[3];