Mercurial > mplayer.hg
comparison cinepak.c @ 4881:f5f854541977
stride!=width*bpp support to cinepak decoder
author | arpi |
---|---|
date | Thu, 28 Feb 2002 01:12:24 +0000 |
parents | 1504901deed8 |
children | 6078b7894e20 |
comparison
equal
deleted
inserted
replaced
4880:e6cd9c81db9d | 4881:f5f854541977 |
---|---|
381 * width - the width of the output frame | 381 * width - the width of the output frame |
382 * height - the height of the output frame | 382 * height - the height of the output frame |
383 * bit_per_pixel - the number of bits per pixel allocated to the output | 383 * bit_per_pixel - the number of bits per pixel allocated to the output |
384 * frame (only 24 or 32 bpp are supported) | 384 * frame (only 24 or 32 bpp are supported) |
385 */ | 385 */ |
386 void decode_cinepak(void *context, unsigned char *buf, int size, unsigned char *frame, int width, int height, int bit_per_pixel) | 386 void decode_cinepak(void *context, unsigned char *buf, int size, unsigned char *frame, int width, int height, int bit_per_pixel, int stride_) |
387 { | 387 { |
388 cinepak_info *cvinfo = (cinepak_info *)context; | 388 cinepak_info *cvinfo = (cinepak_info *)context; |
389 cvid_codebook *v4_codebook, *v1_codebook, *codebook = NULL; | 389 cvid_codebook *v4_codebook, *v1_codebook, *codebook = NULL; |
390 unsigned long x, y, y_bottom, frame_flags, strips, cv_width, cv_height, cnum, | 390 unsigned long x, y, y_bottom, frame_flags, strips, cv_width, cv_height, cnum, |
391 strip_id, chunk_id, x0, y0, x1, y1, ci, flag, mask; | 391 strip_id, chunk_id, x0, y0, x1, y1, ci, flag, mask; |
427 cvid_v1 = cvid_v1_32; | 427 cvid_v1 = cvid_v1_32; |
428 cvid_v4 = cvid_v4_32; | 428 cvid_v4 = cvid_v4_32; |
429 break; | 429 break; |
430 } | 430 } |
431 | 431 |
432 frm_stride = width * bpp; | 432 frm_stride = stride_ ? stride_ : width * bpp; |
433 frm_ptr = frame; | 433 frm_ptr = frame; |
434 frm_end = frm_ptr + width * height * bpp; | 434 frm_end = frm_ptr + width * height * bpp; |
435 | 435 |
436 if(len != size) | 436 if(len != size) |
437 { | 437 { |