int mb_y;
} MadContext;
-static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count)
-{
- int i;
- for (i=0; i<count; i++)
- dst[i] = av_bswap16(src[i]);
-}
-
static av_cold int decode_init(AVCodecContext *avctx)
{
MadContext *s = avctx->priv_data;
av_fast_malloc(&s->bitstream_buf, &s->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
if (!s->bitstream_buf)
return AVERROR(ENOMEM);
- bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2);
+ s->dsp.bswap16_buf(s->bitstream_buf, (const uint16_t*)buf, (buf_end-buf)/2);
init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf));
for (s->mb_y=0; s->mb_y < (avctx->height+15)/16; s->mb_y++)