comparison vb.c @ 6218:dfdff1ca78a7 libavcodec

consts I have underestimated this a little, and these are just some ...
author michael
date Fri, 01 Feb 2008 03:26:31 +0000
parents 82ac47c0c6dd
children 48759bfbd073
comparison
equal deleted inserted replaced
6217:f838213ca91b 6218:dfdff1ca78a7
42 AVCodecContext *avctx; 42 AVCodecContext *avctx;
43 AVFrame pic; 43 AVFrame pic;
44 44
45 uint8_t *frame, *prev_frame; 45 uint8_t *frame, *prev_frame;
46 uint32_t pal[256]; 46 uint32_t pal[256];
47 uint8_t *stream; 47 const uint8_t *stream;
48 } VBDecContext; 48 } VBDecContext;
49 49
50 static const uint16_t vb_patterns[64] = { 50 static const uint16_t vb_patterns[64] = {
51 0x0660, 0xFF00, 0xCCCC, 0xF000, 0x8888, 0x000F, 0x1111, 0xFEC8, 51 0x0660, 0xFF00, 0xCCCC, 0xF000, 0x8888, 0x000F, 0x1111, 0xFEC8,
52 0x8CEF, 0x137F, 0xF731, 0xC800, 0x008C, 0x0013, 0x3100, 0xCC00, 52 0x8CEF, 0x137F, 0xF731, 0xC800, 0x008C, 0x0013, 0x3100, 0xCC00,
80 static inline int check_line(uint8_t *buf, uint8_t *start, uint8_t *end) 80 static inline int check_line(uint8_t *buf, uint8_t *start, uint8_t *end)
81 { 81 {
82 return buf >= start && (buf + 4) <= end; 82 return buf >= start && (buf + 4) <= end;
83 } 83 }
84 84
85 static int vb_decode_framedata(VBDecContext *c, uint8_t *buf, int offset) 85 static int vb_decode_framedata(VBDecContext *c, const uint8_t *buf, int offset)
86 { 86 {
87 uint8_t *prev, *cur; 87 uint8_t *prev, *cur;
88 int blk, blocks, t, blk2; 88 int blk, blocks, t, blk2;
89 int blocktypes = 0; 89 int blocktypes = 0;
90 int x, y, a, b; 90 int x, y, a, b;
171 } 171 }
172 } 172 }
173 return 0; 173 return 0;
174 } 174 }
175 175
176 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) 176 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
177 { 177 {
178 VBDecContext * const c = avctx->priv_data; 178 VBDecContext * const c = avctx->priv_data;
179 uint8_t *outptr, *srcptr; 179 uint8_t *outptr, *srcptr;
180 int i, j; 180 int i, j;
181 int flags; 181 int flags;