diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-02-13 20:57:05 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-23 05:22:31 +0400 |
commit | c67b449bebbe0b35c73b203683e77a0a649bc765 (patch) | |
tree | fef2691cbb548198024dbc1461419dfdd9d3fea2 /libavcodec/mimic.c | |
parent | 7b9ef8d701c319c26f7d0664fe977e176764c74e (diff) |
dsputil: Split bswap*_buf() off into a separate context
Diffstat (limited to 'libavcodec/mimic.c')
-rw-r--r-- | libavcodec/mimic.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 179ffeae14..4d21b5165e 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -28,6 +28,7 @@ #include "internal.h" #include "get_bits.h" #include "bytestream.h" +#include "bswapdsp.h" #include "dsputil.h" #include "hpeldsp.h" #include "thread.h" @@ -54,6 +55,7 @@ typedef struct { GetBitContext gb; ScanTable scantable; BlockDSPContext bdsp; + BswapDSPContext bbdsp; DSPContext dsp; HpelDSPContext hdsp; VLC vlc; @@ -148,6 +150,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx) return ret; } ff_blockdsp_init(&ctx->bdsp, avctx); + ff_bswapdsp_init(&ctx->bbdsp); ff_dsputil_init(&ctx->dsp, avctx); ff_hpeldsp_init(&ctx->hdsp, avctx->flags); ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, col_zag); @@ -425,9 +428,9 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, if (!ctx->swap_buf) return AVERROR(ENOMEM); - ctx->dsp.bswap_buf(ctx->swap_buf, - (const uint32_t*) (buf + MIMIC_HEADER_SIZE), - swap_buf_size >> 2); + ctx->bbdsp.bswap_buf(ctx->swap_buf, + (const uint32_t *) (buf + MIMIC_HEADER_SIZE), + swap_buf_size >> 2); init_get_bits(&ctx->gb, ctx->swap_buf, swap_buf_size << 3); res = decode(ctx, quality, num_coeffs, !is_pframe); |