Mercurial > libavcodec.hg
comparison 8bps.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 |
---|---|
59 * Decode a frame | 59 * Decode a frame |
60 * | 60 * |
61 */ | 61 */ |
62 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) | 62 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
63 { | 63 { |
64 EightBpsContext * const c = (EightBpsContext *)avctx->priv_data; | 64 EightBpsContext * const c = avctx->priv_data; |
65 unsigned char *encoded = (unsigned char *)buf; | 65 unsigned char *encoded = (unsigned char *)buf; |
66 unsigned char *pixptr, *pixptr_end; | 66 unsigned char *pixptr, *pixptr_end; |
67 unsigned int height = avctx->height; // Real image height | 67 unsigned int height = avctx->height; // Real image height |
68 unsigned int dlen, p, row; | 68 unsigned int dlen, p, row; |
69 unsigned char *lp, *dp; | 69 unsigned char *lp, *dp; |
150 * Init 8BPS decoder | 150 * Init 8BPS decoder |
151 * | 151 * |
152 */ | 152 */ |
153 static int decode_init(AVCodecContext *avctx) | 153 static int decode_init(AVCodecContext *avctx) |
154 { | 154 { |
155 EightBpsContext * const c = (EightBpsContext *)avctx->priv_data; | 155 EightBpsContext * const c = avctx->priv_data; |
156 | 156 |
157 c->avctx = avctx; | 157 c->avctx = avctx; |
158 | 158 |
159 c->pic.data[0] = NULL; | 159 c->pic.data[0] = NULL; |
160 | 160 |
210 * Uninit 8BPS decoder | 210 * Uninit 8BPS decoder |
211 * | 211 * |
212 */ | 212 */ |
213 static int decode_end(AVCodecContext *avctx) | 213 static int decode_end(AVCodecContext *avctx) |
214 { | 214 { |
215 EightBpsContext * const c = (EightBpsContext *)avctx->priv_data; | 215 EightBpsContext * const c = avctx->priv_data; |
216 | 216 |
217 if (c->pic.data[0]) | 217 if (c->pic.data[0]) |
218 avctx->release_buffer(avctx, &c->pic); | 218 avctx->release_buffer(avctx, &c->pic); |
219 | 219 |
220 return 0; | 220 return 0; |