Mercurial > libavcodec.hg
comparison lcl.c @ 4827:b3ee9a1526b0 libavcodec
Get rid of unnecessary pointer casts.
patch by Nicholas Tung, ntung ntung com
author | diego |
---|---|
date | Sun, 08 Apr 2007 20:24:16 +0000 |
parents | 66ef3690d108 |
children | f99e40a7155b |
comparison
equal
deleted
inserted
replaced
4826:9ca9a53a848b | 4827:b3ee9a1526b0 |
---|---|
198 * Decode a frame | 198 * Decode a frame |
199 * | 199 * |
200 */ | 200 */ |
201 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) | 201 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
202 { | 202 { |
203 LclContext * const c = (LclContext *)avctx->priv_data; | 203 LclContext * const c = avctx->priv_data; |
204 unsigned char *encoded = (unsigned char *)buf; | 204 unsigned char *encoded = (unsigned char *)buf; |
205 unsigned int pixel_ptr; | 205 unsigned int pixel_ptr; |
206 int row, col; | 206 int row, col; |
207 unsigned char *outptr; | 207 unsigned char *outptr; |
208 unsigned int width = avctx->width; // Real image width | 208 unsigned int width = avctx->width; // Real image width |
615 * Init lcl decoder | 615 * Init lcl decoder |
616 * | 616 * |
617 */ | 617 */ |
618 static int decode_init(AVCodecContext *avctx) | 618 static int decode_init(AVCodecContext *avctx) |
619 { | 619 { |
620 LclContext * const c = (LclContext *)avctx->priv_data; | 620 LclContext * const c = avctx->priv_data; |
621 unsigned int basesize = avctx->width * avctx->height; | 621 unsigned int basesize = avctx->width * avctx->height; |
622 unsigned int max_basesize = ((avctx->width + 3) & ~3) * ((avctx->height + 3) & ~3); | 622 unsigned int max_basesize = ((avctx->width + 3) & ~3) * ((avctx->height + 3) & ~3); |
623 unsigned int max_decomp_size; | 623 unsigned int max_decomp_size; |
624 int zret; // Zlib return code | 624 int zret; // Zlib return code |
625 | 625 |
850 * Uninit lcl decoder | 850 * Uninit lcl decoder |
851 * | 851 * |
852 */ | 852 */ |
853 static int decode_end(AVCodecContext *avctx) | 853 static int decode_end(AVCodecContext *avctx) |
854 { | 854 { |
855 LclContext * const c = (LclContext *)avctx->priv_data; | 855 LclContext * const c = avctx->priv_data; |
856 | 856 |
857 if (c->pic.data[0]) | 857 if (c->pic.data[0]) |
858 avctx->release_buffer(avctx, &c->pic); | 858 avctx->release_buffer(avctx, &c->pic); |
859 #ifdef CONFIG_ZLIB | 859 #ifdef CONFIG_ZLIB |
860 inflateEnd(&(c->zstream)); | 860 inflateEnd(&(c->zstream)); |