GetBitContext gb;
void *bitstream_buf;
unsigned int bitstream_buf_size;
- DECLARE_ALIGNED(16, DCTELEM, block)[64];
+ DECLARE_ALIGNED(16, int16_t, block)[64];
ScanTable scantable;
uint16_t quant_matrix[64];
int mb_x;
}
}
-static inline void idct_put(MadContext *t, DCTELEM *block, int mb_x, int mb_y, int j)
+static inline void idct_put(MadContext *t, int16_t *block, int mb_x, int mb_y, int j)
{
if (j < 4) {
ff_ea_idct_put_c(
}
}
-static inline void decode_block_intra(MadContext *s, DCTELEM * block)
+static inline void decode_block_intra(MadContext *s, int16_t * block)
{
int level, i, j, run;
RLTable *rl = &ff_rl_mpeg1;
}
static int decode_frame(AVCodecContext *avctx,
- void *data, int *data_size,
+ void *data, int *got_frame,
AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
if (buf_size < 17) {
av_log(avctx, AV_LOG_ERROR, "Input buffer too small\n");
- *data_size = 0;
+ *got_frame = 0;
return -1;
}
}
}
- av_fast_malloc(&s->bitstream_buf, &s->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
+ av_fast_padded_malloc(&s->bitstream_buf, &s->bitstream_buf_size,
+ buf_end - buf);
if (!s->bitstream_buf)
return AVERROR(ENOMEM);
s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2);
for (s->mb_x=0; s->mb_x < (avctx->width +15)/16; s->mb_x++)
decode_mb(s, inter);
- *data_size = sizeof(AVFrame);
+ *got_frame = 1;
*(AVFrame*)data = s->frame;
if (chunk_type != MADe_TAG)