You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
eamad: Use dsputils instead of its own bswap16_buf
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
f92a99dae5
commit
19d40c7912
@ -57,13 +57,6 @@ typedef struct MadContext {
|
|||||||
int mb_y;
|
int mb_y;
|
||||||
} MadContext;
|
} 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)
|
static av_cold int decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
MadContext *s = avctx->priv_data;
|
MadContext *s = avctx->priv_data;
|
||||||
@ -285,7 +278,7 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
av_fast_malloc(&s->bitstream_buf, &s->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
|
av_fast_malloc(&s->bitstream_buf, &s->bitstream_buf_size, (buf_end-buf) + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!s->bitstream_buf)
|
if (!s->bitstream_buf)
|
||||||
return AVERROR(ENOMEM);
|
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);
|
||||||
memset((uint8_t*)s->bitstream_buf + (buf_end-buf), 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
memset((uint8_t*)s->bitstream_buf + (buf_end-buf), 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf));
|
init_get_bits(&s->gb, s->bitstream_buf, 8*(buf_end-buf));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user