*/
/**
- * @file smc.c
+ * @file libavcodec/smc.c
* QT SMC Video Decoder by Mike Melanson (melanson@pcisys.net)
* For more information about the SMC format, visit:
* http://www.pcisys.net/~melanson/codecs/
#include <string.h>
#include <unistd.h>
+#include "libavutil/intreadwrite.h"
#include "avcodec.h"
-#include "dsputil.h"
#define CPAIR 2
#define CQUAD 4
typedef struct SmcContext {
AVCodecContext *avctx;
- DSPContext dsp;
AVFrame frame;
- unsigned char *buf;
+ const unsigned char *buf;
int size;
/* SMC color tables */
}
}
-static int smc_decode_init(AVCodecContext *avctx)
+static av_cold int smc_decode_init(AVCodecContext *avctx)
{
SmcContext *s = avctx->priv_data;
s->avctx = avctx;
avctx->pix_fmt = PIX_FMT_PAL8;
- dsputil_init(&s->dsp, avctx);
s->frame.data[0] = NULL;
static int smc_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
SmcContext *s = avctx->priv_data;
return buf_size;
}
-static int smc_decode_end(AVCodecContext *avctx)
+static av_cold int smc_decode_end(AVCodecContext *avctx)
{
SmcContext *s = avctx->priv_data;
smc_decode_end,
smc_decode_frame,
CODEC_CAP_DR1,
+ .long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"),
};