comparison eatqi.c @ 9414:5a738e8f9524 libavcodec

Use void * instead of uint8_t * for the destination buffer for dsp.bswap_buf where easily possible (mimic, eatqi, 4xm). This allows to avoid a typecast.
author reimar
date Sun, 12 Apr 2009 12:25:53 +0000
parents 1eafaea58613
children 141badec76fc
comparison
equal deleted inserted replaced
9413:1eafaea58613 9414:5a738e8f9524
36 #include "mpegvideo.h" 36 #include "mpegvideo.h"
37 37
38 typedef struct TqiContext { 38 typedef struct TqiContext {
39 MpegEncContext s; 39 MpegEncContext s;
40 AVFrame frame; 40 AVFrame frame;
41 uint8_t *bitstream_buf; 41 void *bitstream_buf;
42 unsigned int bitstream_buf_size; 42 unsigned int bitstream_buf_size;
43 } TqiContext; 43 } TqiContext;
44 44
45 static av_cold int tqi_decode_init(AVCodecContext *avctx) 45 static av_cold int tqi_decode_init(AVCodecContext *avctx)
46 { 46 {
127 } 127 }
128 128
129 t->bitstream_buf = av_fast_realloc(t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE); 129 t->bitstream_buf = av_fast_realloc(t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
130 if (!t->bitstream_buf) 130 if (!t->bitstream_buf)
131 return AVERROR(ENOMEM); 131 return AVERROR(ENOMEM);
132 s->dsp.bswap_buf((uint32_t*)t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4); 132 s->dsp.bswap_buf(t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4);
133 init_get_bits(&s->gb, t->bitstream_buf, 8*(buf_end-buf)); 133 init_get_bits(&s->gb, t->bitstream_buf, 8*(buf_end-buf));
134 134
135 s->last_dc[0] = s->last_dc[1] = s->last_dc[2] = 0; 135 s->last_dc[0] = s->last_dc[1] = s->last_dc[2] = 0;
136 for (s->mb_y=0; s->mb_y<(avctx->height+15)/16; s->mb_y++) 136 for (s->mb_y=0; s->mb_y<(avctx->height+15)/16; s->mb_y++)
137 for (s->mb_x=0; s->mb_x<(avctx->width+15)/16; s->mb_x++) 137 for (s->mb_x=0; s->mb_x<(avctx->width+15)/16; s->mb_x++)