diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-02-03 10:09:45 -0800 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-07-07 12:28:45 -0700 |
commit | a9aee08d900f686e966c64afec5d88a7d9d130a3 (patch) | |
tree | 92335216bc97235507f805401693ed534a8f5fc9 /libavcodec/proresenc.c | |
parent | 1e9a93bfca2c2f43a07e01f2ef9fd5cbafe6c22d (diff) | |
download | ffmpeg-a9aee08d900f686e966c64afec5d88a7d9d130a3.tar.gz |
dsputil: Split off FDCT bits into their own context
Diffstat (limited to 'libavcodec/proresenc.c')
-rw-r--r-- | libavcodec/proresenc.c | 31 |
1 files changed, 15 insertions, 16 deletions
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)) { |