Mercurial > libavcodec.hg
comparison pngenc.c @ 7235:dd07ede98d7e libavcodec
Remove useless casts.
Patch by avcoder ffmpeg at gmail d0t com
author | benoit |
---|---|
date | Thu, 10 Jul 2008 11:49:53 +0000 |
parents | e943e1409077 |
children | 04423b2f6e0b |
comparison
equal
deleted
inserted
replaced
7234:dea986389c57 | 7235:dd07ede98d7e |
---|---|
230 } | 230 } |
231 | 231 |
232 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ | 232 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ |
233 PNGEncContext *s = avctx->priv_data; | 233 PNGEncContext *s = avctx->priv_data; |
234 AVFrame *pict = data; | 234 AVFrame *pict = data; |
235 AVFrame * const p= (AVFrame*)&s->picture; | 235 AVFrame * const p= &s->picture; |
236 int bit_depth, color_type, y, len, row_size, ret, is_progressive; | 236 int bit_depth, color_type, y, len, row_size, ret, is_progressive; |
237 int bits_per_pixel, pass_row_size; | 237 int bits_per_pixel, pass_row_size; |
238 int compression_level; | 238 int compression_level; |
239 uint8_t *ptr, *top; | 239 uint8_t *ptr, *top; |
240 uint8_t *crow_base = NULL, *crow_buf, *crow; | 240 uint8_t *crow_base = NULL, *crow_buf, *crow; |
423 } | 423 } |
424 | 424 |
425 static av_cold int png_enc_init(AVCodecContext *avctx){ | 425 static av_cold int png_enc_init(AVCodecContext *avctx){ |
426 PNGEncContext *s = avctx->priv_data; | 426 PNGEncContext *s = avctx->priv_data; |
427 | 427 |
428 avcodec_get_frame_defaults((AVFrame*)&s->picture); | 428 avcodec_get_frame_defaults(&s->picture); |
429 avctx->coded_frame= (AVFrame*)&s->picture; | 429 avctx->coded_frame= &s->picture; |
430 dsputil_init(&s->dsp, avctx); | 430 dsputil_init(&s->dsp, avctx); |
431 | 431 |
432 s->filter_type = av_clip(avctx->prediction_method, PNG_FILTER_VALUE_NONE, PNG_FILTER_VALUE_MIXED); | 432 s->filter_type = av_clip(avctx->prediction_method, PNG_FILTER_VALUE_NONE, PNG_FILTER_VALUE_MIXED); |
433 if(avctx->pix_fmt == PIX_FMT_MONOBLACK) | 433 if(avctx->pix_fmt == PIX_FMT_MONOBLACK) |
434 s->filter_type = PNG_FILTER_VALUE_NONE; | 434 s->filter_type = PNG_FILTER_VALUE_NONE; |