]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/interplayvideo.c
Fix raw rgb/bgr vertical flip in avi based on info from http://www.fourcc.org/fccbihg...
[ffmpeg] / libavcodec / interplayvideo.c
index 23532f42af5abf8d441bc08424d4c9fd697f0d2f..83a9a47ef909861db208a4b2e5753142f09fb8ad 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file interplayvideo.c
+ * @file libavcodec/interplayvideo.c
  * Interplay MVE Video Decoder by Mike Melanson (melanson@pcisys.net)
  * For more information about the Interplay MVE format, visit:
  *   http://www.pcisys.net/~melanson/codecs/interplay-mve.txt
@@ -60,14 +60,14 @@ typedef struct IpvideoContext {
     AVFrame second_last_frame;
     AVFrame last_frame;
     AVFrame current_frame;
-    unsigned char *decoding_map;
+    const unsigned char *decoding_map;
     int decoding_map_size;
 
-    unsigned char *buf;
+    const unsigned char *buf;
     int size;
 
-    unsigned char *stream_ptr;
-    unsigned char *stream_end;
+    const unsigned char *stream_ptr;
+    const unsigned char *stream_end;
     unsigned char *pixel_ptr;
     int line_inc;
     int stride;
@@ -804,7 +804,6 @@ static void ipvideo_decode_opcodes(IpvideoContext *s)
     s->line_inc = s->stride - 8;
     s->upper_motion_limit_offset = (s->avctx->height - 8) * s->stride
         + s->avctx->width - 8;
-    s->dsp = s->dsp;
 
     for (y = 0; y < (s->stride * s->avctx->height); y += s->stride * 8) {
         for (x = y; x < y + s->avctx->width; x += 8) {
@@ -836,7 +835,7 @@ static void ipvideo_decode_opcodes(IpvideoContext *s)
     }
 }
 
-static int ipvideo_decode_init(AVCodecContext *avctx)
+static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
 {
     IpvideoContext *s = avctx->priv_data;
 
@@ -879,7 +878,7 @@ static int ipvideo_decode_init(AVCodecContext *avctx)
 
 static int ipvideo_decode_frame(AVCodecContext *avctx,
                                 void *data, int *data_size,
-                                uint8_t *buf, int buf_size)
+                                const uint8_t *buf, int buf_size)
 {
     IpvideoContext *s = avctx->priv_data;
     AVPaletteControl *palette_control = avctx->palctrl;
@@ -920,7 +919,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
     return buf_size;
 }
 
-static int ipvideo_decode_end(AVCodecContext *avctx)
+static av_cold int ipvideo_decode_end(AVCodecContext *avctx)
 {
     IpvideoContext *s = avctx->priv_data;
 
@@ -943,4 +942,5 @@ AVCodec interplay_video_decoder = {
     ipvideo_decode_end,
     ipvideo_decode_frame,
     CODEC_CAP_DR1,
+    .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE Video"),
 };