Commit 9bf993a5 authored by Reimar Döffinger's avatar Reimar Döffinger
Browse files

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.

Originally committed as revision 18469 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0c13bbf5
......@@ -138,7 +138,7 @@ typedef struct FourXContext{
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 @@ static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
}
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 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){
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;
......
......@@ -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 @@ static int tqi_decode_frame(AVCodecContext *avctx,
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;
......
......@@ -36,7 +36,7 @@ typedef struct {
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 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment