]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/flicvideo.c
Replace pow(x, 0.75) with sqrtf(x * sqrtf(x)) for a 33% speedup.
[ffmpeg] / libavcodec / flicvideo.c
index ea1d8c4261fd4938c140ebf7b6e2fca2dde7d937..37bed0a0de9047dba0adaa24f18976f346f79d76 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file flic.c
+ * @file libavcodec/flicvideo.c
  * Autodesk Animator FLI/FLC Video Decoder
  * by Mike Melanson (melanson@pcisys.net)
  * for more information on the .fli/.flc file format and all of its many
@@ -40,8 +40,8 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "libavutil/intreadwrite.h"
 #include "avcodec.h"
-#include "bswap.h"
 
 #define FLI_256_COLOR 4
 #define FLI_DELTA     7
@@ -701,8 +701,10 @@ static int flic_decode_frame_24BPP(AVCodecContext *avctx,
 
 static int flic_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;
     if (avctx->pix_fmt == PIX_FMT_PAL8) {
       return flic_decode_frame_8BPP(avctx, data, data_size,
                                     buf, buf_size);
@@ -750,5 +752,5 @@ AVCodec flic_decoder = {
     NULL,
     NULL,
     NULL,
-    .long_name = "Autodesk Animator Flic video",
+    .long_name = NULL_IF_CONFIG_SMALL("Autodesk Animator Flic video"),
 };