Mercurial > libavcodec.hg
comparison bmp.c @ 4393:5187883df562 libavcodec
enum
author | michael |
---|---|
date | Wed, 24 Jan 2007 10:41:03 +0000 |
parents | a90490a13ac4 |
children | 182949fbc53e |
comparison
equal
deleted
inserted
replaced
4392:e0c94f1b8f55 | 4393:5187883df562 |
---|---|
25 | 25 |
26 typedef struct BMPContext { | 26 typedef struct BMPContext { |
27 AVFrame picture; | 27 AVFrame picture; |
28 } BMPContext; | 28 } BMPContext; |
29 | 29 |
30 #define BMP_RGB 0 | 30 typedef enum { |
31 #define BMP_RLE8 1 | 31 BMP_RGB=0, |
32 #define BMP_RLE4 2 | 32 BMP_RLE8, |
33 #define BMP_BITFIELDS 3 | 33 BMP_RLE4, |
34 BMP_BITFIELDS, | |
35 } BiCompression; | |
34 | 36 |
35 #define read16(bits) bswap_16(get_bits(bits, 16)) | 37 #define read16(bits) bswap_16(get_bits(bits, 16)) |
36 #define read32(bits) bswap_32(get_bits_long(bits, 32)) | 38 #define read32(bits) bswap_32(get_bits_long(bits, 32)) |
37 | 39 |
38 static int bmp_decode_init(AVCodecContext *avctx){ | 40 static int bmp_decode_init(AVCodecContext *avctx){ |
53 AVFrame *p = &s->picture; | 55 AVFrame *p = &s->picture; |
54 GetBitContext bits; | 56 GetBitContext bits; |
55 unsigned int fsize, hsize; | 57 unsigned int fsize, hsize; |
56 int width, height; | 58 int width, height; |
57 unsigned int depth; | 59 unsigned int depth; |
58 unsigned int comp; | 60 BiCompression comp; |
59 unsigned int ihsize; | 61 unsigned int ihsize; |
60 int i, j, n, linesize; | 62 int i, j, n, linesize; |
61 uint32_t rgb[3]; | 63 uint32_t rgb[3]; |
62 uint8_t *ptr; | 64 uint8_t *ptr; |
63 int dsize; | 65 int dsize; |