]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/kmvc.c
Simplify ptr[0]; ptr++; to *ptr++
[ffmpeg] / libavcodec / kmvc.c
index e8f39fca15e498ed5a6bee38684343310c8e1f2f..8a190cb1762cde6c02e2ecab62077d682aed6e97 100644 (file)
@@ -228,7 +228,7 @@ static void kmvc_decode_inter_8x8(KmvcContext * ctx, uint8_t * src, int w, int h
 static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint8_t * buf,
                         int buf_size)
 {
-    KmvcContext *const ctx = (KmvcContext *) avctx->priv_data;
+    KmvcContext *const ctx = avctx->priv_data;
     uint8_t *out, *src;
     int i;
     int header;
@@ -342,11 +342,10 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint
  */
 static int decode_init(AVCodecContext * avctx)
 {
-    KmvcContext *const c = (KmvcContext *) avctx->priv_data;
+    KmvcContext *const c = avctx->priv_data;
     int i;
 
     c->avctx = avctx;
-    avctx->has_b_frames = 0;
 
     c->pic.data[0] = NULL;
 
@@ -368,13 +367,13 @@ static int decode_init(AVCodecContext * avctx)
         av_log(NULL, 0, "Extradata missing, decoding may not work properly...\n");
         c->palsize = 127;
     } else {
-        c->palsize = LE_16(avctx->extradata + 10);
+        c->palsize = AV_RL16(avctx->extradata + 10);
     }
 
     if (avctx->extradata_size == 1036) {        // palette in extradata
         uint8_t *src = avctx->extradata + 12;
         for (i = 0; i < 256; i++) {
-            c->pal[i] = LE_32(src);
+            c->pal[i] = AV_RL32(src);
             src += 4;
         }
         c->setpal = 1;
@@ -395,7 +394,7 @@ static int decode_init(AVCodecContext * avctx)
  */
 static int decode_end(AVCodecContext * avctx)
 {
-    KmvcContext *const c = (KmvcContext *) avctx->priv_data;
+    KmvcContext *const c = avctx->priv_data;
 
     av_freep(&c->frm0);
     av_freep(&c->frm1);