]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/msvideo1.c
Move arch check before OS check.
[ffmpeg] / libavcodec / msvideo1.c
index 2106498baedcebf29c85ea0da7acf8a1958b8bfb..854f36fb562ab34a5698ac7c6e34ab73cb78fbe1 100644 (file)
@@ -36,7 +36,6 @@
 #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;
 
@@ -74,8 +72,6 @@ static int msvideo1_decode_init(AVCodecContext *avctx)
         avctx->pix_fmt = PIX_FMT_RGB555;
     }
 
-    dsputil_init(&s->dsp, avctx);
-
     s->frame.data[0] = NULL;
 
     return 0;
@@ -297,7 +293,7 @@ static void msvideo1_decode_16bit(Msvideo1Context *s)
 
 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;
 
@@ -323,7 +319,7 @@ static int msvideo1_decode_frame(AVCodecContext *avctx,
     return buf_size;
 }
 
-static int msvideo1_decode_end(AVCodecContext *avctx)
+static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
 {
     Msvideo1Context *s = avctx->priv_data;
 
@@ -343,4 +339,5 @@ AVCodec msvideo1_decoder = {
     msvideo1_decode_end,
     msvideo1_decode_frame,
     CODEC_CAP_DR1,
+    .long_name= "Microsoft Video 1",
 };