X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fsmc.c;h=d0102eaa9c8a6992f7369a5f5c7b0ed95ae0dc81;hb=bad5537e2c2caeb5deb1ff9d771ea01058b8010c;hp=78f130cf3ad43fc4928ead637c9f92dbe703f725;hpb=e5a389a1b70a32a56aa83377e88bf718251aa8f0;p=ffmpeg diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 78f130cf3ad..d0102eaa9c8 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -20,7 +20,7 @@ */ /** - * @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/ @@ -33,8 +33,8 @@ #include #include +#include "libavutil/intreadwrite.h" #include "avcodec.h" -#include "dsputil.h" #define CPAIR 2 #define CQUAD 4 @@ -45,10 +45,9 @@ typedef struct SmcContext { AVCodecContext *avctx; - DSPContext dsp; AVFrame frame; - unsigned char *buf; + const unsigned char *buf; int size; /* SMC color tables */ @@ -428,13 +427,12 @@ static void smc_decode_stream(SmcContext *s) } } -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; @@ -443,7 +441,7 @@ static int smc_decode_init(AVCodecContext *avctx) 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; @@ -467,7 +465,7 @@ static int smc_decode_frame(AVCodecContext *avctx, return buf_size; } -static int smc_decode_end(AVCodecContext *avctx) +static av_cold int smc_decode_end(AVCodecContext *avctx) { SmcContext *s = avctx->priv_data; @@ -487,4 +485,5 @@ AVCodec smc_decoder = { smc_decode_end, smc_decode_frame, CODEC_CAP_DR1, + .long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"), };