Mercurial > libavcodec.hg
comparison xan.c @ 6303:d78e2ce9b088 libavcodec
const
author | aurel |
---|---|
date | Fri, 01 Feb 2008 23:24:35 +0000 |
parents | 81be720492ac |
children | 2a2f9cb7f1b0 |
comparison
equal
deleted
inserted
replaced
6302:81be720492ac | 6303:d78e2ce9b088 |
---|---|
204 size = opcode & 3; | 204 size = opcode & 3; |
205 bytecopy(dest, src, size); dest += size; src += size; | 205 bytecopy(dest, src, size); dest += size; src += size; |
206 } | 206 } |
207 | 207 |
208 static inline void xan_wc3_output_pixel_run(XanContext *s, | 208 static inline void xan_wc3_output_pixel_run(XanContext *s, |
209 unsigned char *pixel_buffer, int x, int y, int pixel_count) | 209 const unsigned char *pixel_buffer, int x, int y, int pixel_count) |
210 { | 210 { |
211 int stride; | 211 int stride; |
212 int line_inc; | 212 int line_inc; |
213 int index; | 213 int index; |
214 int current_x; | 214 int current_x; |
282 int motion_x, motion_y; | 282 int motion_x, motion_y; |
283 int x, y; | 283 int x, y; |
284 | 284 |
285 unsigned char *opcode_buffer = s->buffer1; | 285 unsigned char *opcode_buffer = s->buffer1; |
286 int opcode_buffer_size = s->buffer1_size; | 286 int opcode_buffer_size = s->buffer1_size; |
287 unsigned char *imagedata_buffer = s->buffer2; | 287 const unsigned char *imagedata_buffer = s->buffer2; |
288 int imagedata_buffer_size = s->buffer2_size; | |
289 | 288 |
290 /* pointers to segments inside the compressed chunk */ | 289 /* pointers to segments inside the compressed chunk */ |
291 const unsigned char *huffman_segment; | 290 const unsigned char *huffman_segment; |
292 const unsigned char *size_segment; | 291 const unsigned char *size_segment; |
293 const unsigned char *vector_segment; | 292 const unsigned char *vector_segment; |
299 imagedata_segment = s->buf + AV_RL16(&s->buf[6]); | 298 imagedata_segment = s->buf + AV_RL16(&s->buf[6]); |
300 | 299 |
301 xan_huffman_decode(opcode_buffer, huffman_segment, opcode_buffer_size); | 300 xan_huffman_decode(opcode_buffer, huffman_segment, opcode_buffer_size); |
302 | 301 |
303 if (imagedata_segment[0] == 2) | 302 if (imagedata_segment[0] == 2) |
304 xan_unpack(imagedata_buffer, &imagedata_segment[1], | 303 xan_unpack(s->buffer2, &imagedata_segment[1], s->buffer2_size); |
305 imagedata_buffer_size); | |
306 else | 304 else |
307 imagedata_buffer = &imagedata_segment[1]; | 305 imagedata_buffer = &imagedata_segment[1]; |
308 | 306 |
309 /* use the decoded data segments to build the frame */ | 307 /* use the decoded data segments to build the frame */ |
310 x = y = 0; | 308 x = y = 0; |