-/**
- * @file
+/*
* Psygnosis YOP decoder
*
* Copyright (C) 2010 Mohamed Naufal Basheer <naufal11@gmail.com>
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct YopDecContext {
AVFrame frame;
return -1;
}
- avctx->pix_fmt = PIX_FMT_PAL8;
+ avctx->pix_fmt = AV_PIX_FMT_PAL8;
s->num_pal_colors = avctx->extradata[0];
s->first_color[0] = avctx->extradata[1];
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- ret = avctx->get_buffer(avctx, &s->frame);
+ ret = ff_get_buffer(avctx, &s->frame);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
AVCodec ff_yop_decoder = {
- "yop",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_YOP,
- sizeof(YopDecContext),
- yop_decode_init,
- NULL,
- yop_decode_close,
- yop_decode_frame,
- .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"),
+ .name = "yop",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_YOP,
+ .priv_data_size = sizeof(YopDecContext),
+ .init = yop_decode_init,
+ .close = yop_decode_close,
+ .decode = yop_decode_frame,
+ .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"),
+ .capabilities = CODEC_CAP_DR1,
};