diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-01-24 11:55:16 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-30 07:58:46 -0700 |
commit | e3fcb14347466095839c2a3c47ebecff02da891e (patch) | |
tree | 38fbcef2c592faae3610887dbda3ab333181d1dc /libavcodec/aic.c | |
parent | adcb8392c9b185fd8a91a95fa256d15ab1432a30 (diff) | |
download | ffmpeg-e3fcb14347466095839c2a3c47ebecff02da891e.tar.gz |
dsputil: Split off IDCT bits into their own context
Diffstat (limited to 'libavcodec/aic.c')
-rw-r--r-- | libavcodec/aic.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/libavcodec/aic.c b/libavcodec/aic.c index 68ae728763..dac9d8b7fd 100644 --- a/libavcodec/aic.c +++ b/libavcodec/aic.c @@ -24,10 +24,10 @@ #include "avcodec.h" #include "bytestream.h" -#include "dsputil.h" #include "internal.h" #include "get_bits.h" #include "golomb.h" +#include "idctdsp.h" #include "unary.h" #define AIC_HDR_SIZE 24 @@ -139,7 +139,7 @@ static const uint8_t *aic_scan[NUM_BANDS] = { typedef struct AICContext { AVCodecContext *avctx; AVFrame *frame; - DSPContext dsp; + IDCTDSPContext idsp; ScanTable scantable; int num_x_slices; @@ -336,16 +336,15 @@ static int aic_decode_slice(AICContext *ctx, int mb_x, int mb_y, recombine_block_il(ctx->block, ctx->scantable.permutated, &base_y, &ext_y, blk); unquant_block(ctx->block, ctx->quant); - ctx->dsp.idct(ctx->block); + ctx->idsp.idct(ctx->block); if (!ctx->interlaced) { dst = Y + (blk >> 1) * 8 * ystride + (blk & 1) * 8; - ctx->dsp.put_signed_pixels_clamped(ctx->block, dst, - ystride); + ctx->idsp.put_signed_pixels_clamped(ctx->block, dst, ystride); } else { dst = Y + (blk & 1) * 8 + (blk >> 1) * ystride; - ctx->dsp.put_signed_pixels_clamped(ctx->block, dst, - ystride * 2); + ctx->idsp.put_signed_pixels_clamped(ctx->block, dst, + ystride * 2); } } Y += 16; @@ -354,9 +353,9 @@ static int aic_decode_slice(AICContext *ctx, int mb_x, int mb_y, recombine_block(ctx->block, ctx->scantable.permutated, &base_c, &ext_c); unquant_block(ctx->block, ctx->quant); - ctx->dsp.idct(ctx->block); - ctx->dsp.put_signed_pixels_clamped(ctx->block, C[blk], - ctx->frame->linesize[blk + 1]); + ctx->idsp.idct(ctx->block); + ctx->idsp.put_signed_pixels_clamped(ctx->block, C[blk], + ctx->frame->linesize[blk + 1]); C[blk] += 8; } } @@ -426,11 +425,11 @@ static av_cold int aic_decode_init(AVCodecContext *avctx) avctx->pix_fmt = AV_PIX_FMT_YUV420P; - ff_dsputil_init(&ctx->dsp, avctx); + ff_idctdsp_init(&ctx->idsp, avctx); for (i = 0; i < 64; i++) scan[i] = i; - ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, scan); + ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable, scan); ctx->mb_width = FFALIGN(avctx->width, 16) >> 4; ctx->mb_height = FFALIGN(avctx->height, 16) >> 4; |