From a9aee08d900f686e966c64afec5d88a7d9d130a3 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 3 Feb 2014 10:09:45 -0800 Subject: dsputil: Split off FDCT bits into their own context --- libavcodec/proresenc.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'libavcodec/proresenc.c') diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index 51e3783e50..bdb826cf07 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -23,8 +23,7 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "avcodec.h" -#include "dct.h" -#include "dsputil.h" +#include "fdctdsp.h" #include "put_bits.h" #include "bytestream.h" #include "internal.h" @@ -192,9 +191,9 @@ typedef struct ProresContext { const uint8_t *quant_mat; const uint8_t *scantable; - void (* fdct)(DSPContext *dsp, const uint16_t *src, - int linesize, int16_t *block); - DSPContext dsp; + void (*fdct)(FDCTDSPContext *fdsp, const uint16_t *src, + int linesize, int16_t *block); + FDCTDSPContext fdsp; int mb_width, mb_height; int mbs_per_slice; @@ -263,27 +262,27 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src, mb_width * sizeof(*emu_buf)); } if (!is_chroma) { - ctx->fdct(&ctx->dsp, esrc, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc, elinesize, blocks); blocks += 64; if (blocks_per_mb > 2) { - ctx->fdct(&ctx->dsp, esrc + 8, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc + 8, elinesize, blocks); blocks += 64; } - ctx->fdct(&ctx->dsp, esrc + elinesize * 4, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc + elinesize * 4, elinesize, blocks); blocks += 64; if (blocks_per_mb > 2) { - ctx->fdct(&ctx->dsp, esrc + elinesize * 4 + 8, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc + elinesize * 4 + 8, elinesize, blocks); blocks += 64; } } else { - ctx->fdct(&ctx->dsp, esrc, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc, elinesize, blocks); blocks += 64; - ctx->fdct(&ctx->dsp, esrc + elinesize * 4, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc + elinesize * 4, elinesize, blocks); blocks += 64; if (blocks_per_mb > 2) { - ctx->fdct(&ctx->dsp, esrc + 8, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc + 8, elinesize, blocks); blocks += 64; - ctx->fdct(&ctx->dsp, esrc + elinesize * 4 + 8, elinesize, blocks); + ctx->fdct(&ctx->fdsp, esrc + elinesize * 4 + 8, elinesize, blocks); blocks += 64; } } @@ -1068,7 +1067,7 @@ static av_cold int encode_close(AVCodecContext *avctx) return 0; } -static void prores_fdct(DSPContext *dsp, const uint16_t *src, +static void prores_fdct(FDCTDSPContext *fdsp, const uint16_t *src, int linesize, int16_t *block) { int x, y; @@ -1079,7 +1078,7 @@ static void prores_fdct(DSPContext *dsp, const uint16_t *src, block[y * 8 + x] = tsrc[x]; tsrc += linesize >> 1; } - dsp->fdct(block); + fdsp->fdct(block); } static av_cold int encode_init(AVCodecContext *avctx) @@ -1098,7 +1097,7 @@ static av_cold int encode_init(AVCodecContext *avctx) ctx->fdct = prores_fdct; ctx->scantable = interlaced ? ff_prores_interlaced_scan : ff_prores_progressive_scan; - ff_dsputil_init(&ctx->dsp, avctx); + ff_fdctdsp_init(&ctx->fdsp, avctx); mps = ctx->mbs_per_slice; if (mps & (mps - 1)) { -- cgit v1.2.3