Mercurial > libavcodec.hg
changeset 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 |
files | 4xm.c eatqi.c mimic.c |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/4xm.c Sun Apr 12 09:33:38 2009 +0000 +++ b/4xm.c Sun Apr 12 12:25:53 2009 +0000 @@ -138,7 +138,7 @@ VLC pre_vlc; int last_dc; DECLARE_ALIGNED_8(DCTELEM, block[6][64]); - uint8_t *bitstream_buffer; + void *bitstream_buffer; unsigned int bitstream_buffer_size; int version; CFrameBuffer cfrm[CFRAME_BUFFER_COUNT]; @@ -379,7 +379,7 @@ } f->bitstream_buffer= av_fast_realloc(f->bitstream_buffer, &f->bitstream_buffer_size, bitstream_size + FF_INPUT_BUFFER_PADDING_SIZE); - f->dsp.bswap_buf((uint32_t*)f->bitstream_buffer, (const uint32_t*)(buf + extra), bitstream_size/4); + f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)(buf + extra), bitstream_size/4); init_get_bits(&f->gb, f->bitstream_buffer, 8*bitstream_size); f->wordstream= (const uint16_t*)(buf + extra + bitstream_size); @@ -657,7 +657,7 @@ prestream_size= length + buf - prestream; f->bitstream_buffer= av_fast_realloc(f->bitstream_buffer, &f->bitstream_buffer_size, prestream_size + FF_INPUT_BUFFER_PADDING_SIZE); - f->dsp.bswap_buf((uint32_t*)f->bitstream_buffer, (const uint32_t*)prestream, prestream_size/4); + f->dsp.bswap_buf(f->bitstream_buffer, (const uint32_t*)prestream, prestream_size/4); init_get_bits(&f->pre_gb, f->bitstream_buffer, 8*prestream_size); f->last_dc= 0*128*8*8;
--- a/eatqi.c Sun Apr 12 09:33:38 2009 +0000 +++ b/eatqi.c Sun Apr 12 12:25:53 2009 +0000 @@ -38,7 +38,7 @@ typedef struct TqiContext { MpegEncContext s; AVFrame frame; - uint8_t *bitstream_buf; + void *bitstream_buf; unsigned int bitstream_buf_size; } TqiContext; @@ -129,7 +129,7 @@ t->bitstream_buf = av_fast_realloc(t->bitstream_buf, &t->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE); if (!t->bitstream_buf) return AVERROR(ENOMEM); - s->dsp.bswap_buf((uint32_t*)t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4); + s->dsp.bswap_buf(t->bitstream_buf, (const uint32_t*)buf, (buf_end-buf)/4); init_get_bits(&s->gb, t->bitstream_buf, 8*(buf_end-buf)); s->last_dc[0] = s->last_dc[1] = s->last_dc[2] = 0;
--- a/mimic.c Sun Apr 12 09:33:38 2009 +0000 +++ b/mimic.c Sun Apr 12 12:25:53 2009 +0000 @@ -36,7 +36,7 @@ int num_vblocks[3]; int num_hblocks[3]; - uint8_t *swap_buf; + void *swap_buf; int swap_buf_size; int cur_index; @@ -339,7 +339,7 @@ if(!ctx->swap_buf) return AVERROR(ENOMEM); - ctx->dsp.bswap_buf((uint32_t*)ctx->swap_buf, + ctx->dsp.bswap_buf(ctx->swap_buf, (const uint32_t*) buf, swap_buf_size>>2); init_get_bits(&ctx->gb, ctx->swap_buf, swap_buf_size << 3);