#include <unistd.h>
#include "avcodec.h"
-#include "dsputil.h"
#define PALETTE_COUNT 256
#define CHECK_STREAM_PTR(n) \
typedef struct Msvideo1Context {
AVCodecContext *avctx;
- DSPContext dsp;
AVFrame frame;
- unsigned char *buf;
+ const unsigned char *buf;
int size;
int mode_8bit; /* if it's not 8-bit, it's 16-bit */
} Msvideo1Context;
-static int msvideo1_decode_init(AVCodecContext *avctx)
+static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
{
Msvideo1Context *s = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_RGB555;
}
- dsputil_init(&s->dsp, avctx);
-
s->frame.data[0] = NULL;
return 0;
static int msvideo1_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
Msvideo1Context *s = avctx->priv_data;
return buf_size;
}
-static int msvideo1_decode_end(AVCodecContext *avctx)
+static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
{
Msvideo1Context *s = avctx->priv_data;
msvideo1_decode_end,
msvideo1_decode_frame,
CODEC_CAP_DR1,
+ .long_name= "Microsoft Video 1",
};