Mercurial > libavcodec.hg
comparison bmp.c @ 4415:f792b146869b libavcodec
Segregate code common to BMP decoder and future encoder
patch by Michel Bardiaux, mbardiaux mediaxim be
author | diego |
---|---|
date | Sat, 27 Jan 2007 07:39:16 +0000 |
parents | 182949fbc53e |
children | a848b652f0ac |
comparison
equal
deleted
inserted
replaced
4414:7c42c51b1130 | 4415:f792b146869b |
---|---|
1 /* | 1 /* |
2 * BMP image format | 2 * BMP image format decoder |
3 * Copyright (c) 2005 Mans Rullgard | 3 * Copyright (c) 2005 Mans Rullgard |
4 * | 4 * |
5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
6 * | 6 * |
7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
20 */ | 20 */ |
21 | 21 |
22 #include "avcodec.h" | 22 #include "avcodec.h" |
23 #include "bitstream.h" | 23 #include "bitstream.h" |
24 #include "bswap.h" | 24 #include "bswap.h" |
25 | 25 #include "bmp.h" |
26 typedef struct BMPContext { | |
27 AVFrame picture; | |
28 } BMPContext; | |
29 | |
30 typedef enum { | |
31 BMP_RGB =0, | |
32 BMP_RLE8 =1, | |
33 BMP_RLE4 =2, | |
34 BMP_BITFIELDS =3, | |
35 } BiCompression; | |
36 | 26 |
37 #define read16(bits) bswap_16(get_bits(bits, 16)) | 27 #define read16(bits) bswap_16(get_bits(bits, 16)) |
38 #define read32(bits) bswap_32(get_bits_long(bits, 32)) | 28 #define read32(bits) bswap_32(get_bits_long(bits, 32)) |
39 | 29 |
40 static int bmp_decode_init(AVCodecContext *avctx){ | 30 static int bmp_decode_init(AVCodecContext *avctx){ |