comparison vmdav.c @ 4364:05e932ddaaa9 libavcodec

rename BE/LE_8/16/32 to AV_RL/B_8/16/32
author alex
date Fri, 19 Jan 2007 22:12:59 +0000
parents 42553b85aa7e
children a96d905dcbaa
comparison
equal deleted inserted replaced
4363:9b7662fa4905 4364:05e932ddaaa9
90 unsigned int i, j; 90 unsigned int i, j;
91 91
92 s = src; 92 s = src;
93 d = dest; 93 d = dest;
94 d_end = d + dest_len; 94 d_end = d + dest_len;
95 dataleft = LE_32(s); 95 dataleft = AV_RL32(s);
96 s += 4; 96 s += 4;
97 memset(queue, 0x20, QUEUE_SIZE); 97 memset(queue, 0x20, QUEUE_SIZE);
98 if (LE_32(s) == 0x56781234) { 98 if (AV_RL32(s) == 0x56781234) {
99 s += 4; 99 s += 4;
100 qpos = 0x111; 100 qpos = 0x111;
101 speclen = 0xF + 3; 101 speclen = 0xF + 3;
102 } else { 102 } else {
103 qpos = 0xFEE; 103 qpos = 0xFEE;
202 202
203 int frame_x, frame_y; 203 int frame_x, frame_y;
204 int frame_width, frame_height; 204 int frame_width, frame_height;
205 int dp_size; 205 int dp_size;
206 206
207 frame_x = LE_16(&s->buf[6]); 207 frame_x = AV_RL16(&s->buf[6]);
208 frame_y = LE_16(&s->buf[8]); 208 frame_y = AV_RL16(&s->buf[8]);
209 frame_width = LE_16(&s->buf[10]) - frame_x + 1; 209 frame_width = AV_RL16(&s->buf[10]) - frame_x + 1;
210 frame_height = LE_16(&s->buf[12]) - frame_y + 1; 210 frame_height = AV_RL16(&s->buf[12]) - frame_y + 1;
211 211
212 /* if only a certain region will be updated, copy the entire previous 212 /* if only a certain region will be updated, copy the entire previous
213 * frame before the decode */ 213 * frame before the decode */
214 if (frame_x || frame_y || (frame_width != s->avctx->width) || 214 if (frame_x || frame_y || (frame_width != s->avctx->width) ||
215 (frame_height != s->avctx->height)) { 215 (frame_height != s->avctx->height)) {
337 VMD_HEADER_SIZE); 337 VMD_HEADER_SIZE);
338 return -1; 338 return -1;
339 } 339 }
340 vmd_header = (unsigned char *)avctx->extradata; 340 vmd_header = (unsigned char *)avctx->extradata;
341 341
342 s->unpack_buffer_size = LE_32(&vmd_header[800]); 342 s->unpack_buffer_size = AV_RL32(&vmd_header[800]);
343 s->unpack_buffer = av_malloc(s->unpack_buffer_size); 343 s->unpack_buffer = av_malloc(s->unpack_buffer_size);
344 if (!s->unpack_buffer) 344 if (!s->unpack_buffer)
345 return -1; 345 return -1;
346 346
347 /* load up the initial palette */ 347 /* load up the initial palette */