]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tiertexseqv.c
Add missing #includes to fix 'make checkheaders'.
[ffmpeg] / libavcodec / tiertexseqv.c
index 5343d5fa52c9b41421ec81d2b4350447d8fcfd02..56c817a518ea5997423488960b66a21f1d725a46 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 #include "avcodec.h"
-#include "common.h"
 #define ALT_BITSTREAM_READER_LE
 #include "bitstream.h"
 
@@ -147,7 +146,7 @@ static void seqvideo_decode(SeqVideoContext *seq, unsigned char *data, int data_
         for (i = 0; i < 256; i++) {
             for (j = 0; j < 3; j++, data++)
                 c[j] = (*data << 2) | (*data >> 4);
-            seq->palette[i] = (c[0] << 16) | (c[1] << 8) | c[2];
+            seq->palette[i] = AV_RB24(c);
         }
         memcpy(seq->frame.data[1], seq->palette, sizeof(seq->palette));
         seq->frame.palette_has_changed = 1;
@@ -176,7 +175,7 @@ static void seqvideo_decode(SeqVideoContext *seq, unsigned char *data, int data_
 
 static int seqvideo_decode_init(AVCodecContext *avctx)
 {
-    SeqVideoContext *seq = (SeqVideoContext *)avctx->priv_data;
+    SeqVideoContext *seq = avctx->priv_data;
 
     seq->avctx = avctx;
     avctx->pix_fmt = PIX_FMT_PAL8;
@@ -191,7 +190,7 @@ static int seqvideo_decode_frame(AVCodecContext *avctx,
                                  uint8_t *buf, int buf_size)
 {
 
-    SeqVideoContext *seq = (SeqVideoContext *)avctx->priv_data;
+    SeqVideoContext *seq = avctx->priv_data;
 
     seq->frame.reference = 1;
     seq->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
@@ -210,7 +209,7 @@ static int seqvideo_decode_frame(AVCodecContext *avctx,
 
 static int seqvideo_decode_end(AVCodecContext *avctx)
 {
-    SeqVideoContext *seq = (SeqVideoContext *)avctx->priv_data;
+    SeqVideoContext *seq = avctx->priv_data;
 
     if (seq->frame.data[0])
         avctx->release_buffer(avctx, &seq->frame);