]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/fraps.c
DCA: ARM/NEON optimised lfe_fir
[ffmpeg] / libavcodec / fraps.c
index 0c31e03c41833bcff9c8f65b916a9f7009a5688b..4e85f6106ab20a1c28765207b3eb40093e2240b9 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 /**
- * @file fraps.c
+ * @file libavcodec/fraps.c
  * Lossless Fraps 'FPS1' decoder
  * @author Roine Gustafsson <roine at users sf net>
  * @author Konstantin Shishkov
@@ -32,7 +32,7 @@
  */
 
 #include "avcodec.h"
-#include "bitstream.h"
+#include "get_bits.h"
 #include "huffman.h"
 #include "bytestream.h"
 #include "dsputil.h"
@@ -63,7 +63,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
     avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */
 
     s->avctx = avctx;
-    s->frame.data[0] = NULL;
     s->tmpbuf = NULL;
 
     dsputil_init(&s->dsp, avctx);
@@ -130,8 +129,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
  */
 static int decode_frame(AVCodecContext *avctx,
                         void *data, int *data_size,
-                        const uint8_t *buf, int buf_size)
+                        AVPacket *avpkt)
 {
+    const uint8_t *buf = avpkt->data;
+    int buf_size = avpkt->size;
     FrapsContext * const s = avctx->priv_data;
     AVFrame *frame = data;
     AVFrame * const f = (AVFrame*)&s->frame;
@@ -238,7 +239,7 @@ static int decode_frame(AVCodecContext *avctx,
             for(y=0; y<avctx->height; y++)
                 memcpy(&f->data[0][ (avctx->height-y)*f->linesize[0] ],
                        &buf[y*avctx->width*3],
-                       f->linesize[0]);
+                       3*avctx->width);
         }
         break;
 
@@ -365,7 +366,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
 
 AVCodec fraps_decoder = {
     "fraps",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FRAPS,
     sizeof(FrapsContext),
     decode_init,