*/
/**
- * @file libavcodec/eamad.c
+ * @file
* Electronic Arts Madcow Video Decoder
* by Peter Ross <pross@xvid.org>
*
#include "aandcttab.h"
#include "mpeg12.h"
#include "mpeg12data.h"
+#include "libavcore/imgutils.h"
#define EA_PREAMBLE_SIZE 8
#define MADk_TAG MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */
AVFrame last_frame;
void *bitstream_buf;
unsigned int bitstream_buf_size;
- DECLARE_ALIGNED_16(DCTELEM, block[64]);
+ DECLARE_ALIGNED(16, DCTELEM, block)[64];
} MadContext;
static void bswap16_buf(uint16_t *dst, const uint16_t *src, int count)
{
int i;
for (i=0; i<count; i++)
- dst[i] = bswap_16(src[i]);
+ dst[i] = av_bswap16(src[i]);
}
static av_cold int decode_init(AVCodecContext *avctx)
/* The RL decoder is derived from mpeg1_decode_block_intra;
Escaped level and run values a decoded differently */
+ i = 0;
{
OPEN_READER(re, &s->gb);
/* now quantify & encode AC coefficients */
buf += 16;
if (avctx->width != s->width || avctx->height != s->height) {
- if (avcodec_check_dimensions(avctx, s->width, s->height) < 0)
+ if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
return -1;
avcodec_set_dimensions(avctx, s->width, s->height);
if (t->frame.data[0])
AVCodec eamad_decoder = {
"eamad",
- CODEC_TYPE_VIDEO,
+ AVMEDIA_TYPE_VIDEO,
CODEC_ID_MAD,
sizeof(MadContext),
decode_init,