]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mimic.c
Add function to export EDGE_WIDTH from libavcodec.
[ffmpeg] / libavcodec / mimic.c
index da5bba3c2ebe7cec318816ab778f58b44465cee8..e5f7123e947a39f7abe2a460c658c0f37fb55ef5 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdint.h>
 
 #include "avcodec.h"
-#include "bitstream.h"
+#include "get_bits.h"
 #include "bytestream.h"
 #include "dsputil.h"
 
@@ -36,7 +36,7 @@ typedef struct {
     int             num_vblocks[3];
     int             num_hblocks[3];
 
-    uint8_t        *swap_buf;
+    void           *swap_buf;
     int             swap_buf_size;
 
     int             cur_index;
@@ -45,7 +45,7 @@ typedef struct {
     AVFrame         buf_ptrs    [16];
     AVPicture       flipped_ptrs[16];
 
-    DECLARE_ALIGNED_16(DCTELEM, dct_block[64]);
+    DECLARE_ALIGNED(16, DCTELEM, dct_block)[64];
 
     GetBitContext   gb;
     ScanTable       scantable;
@@ -334,12 +334,12 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
     prepare_avpic(ctx, &ctx->flipped_ptrs[ctx->cur_index],
                   (AVPicture*) &ctx->buf_ptrs[ctx->cur_index]);
 
-    ctx->swap_buf = av_fast_realloc(ctx->swap_buf, &ctx->swap_buf_size,
+    av_fast_malloc(&ctx->swap_buf, &ctx->swap_buf_size,
                                  swap_buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
     if(!ctx->swap_buf)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
 
-    ctx->dsp.bswap_buf((uint32_t*)ctx->swap_buf,
+    ctx->dsp.bswap_buf(ctx->swap_buf,
                         (const uint32_t*) buf,
                         swap_buf_size>>2);
     init_get_bits(&ctx->gb, ctx->swap_buf, swap_buf_size << 3);
@@ -380,7 +380,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx)
 
 AVCodec mimic_decoder = {
     "mimic",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MIMIC,
     sizeof(MimicContext),
     mimic_decode_init,