summaryrefslogtreecommitdiff
path: root/libavcodec/proresenc_kostya.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-08 03:12:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-08 03:19:06 +0200
commit14e2406de7d211d50fcce0059c90103bdaa947aa (patch)
tree10e20cd60b4f4bc91d14957b9565871cdd0381c3 /libavcodec/proresenc_kostya.c
parent5c7bf354dc0c8bea6e7af21c0bc2edad92974274 (diff)
parenta9aee08d900f686e966c64afec5d88a7d9d130a3 (diff)
Merge commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3'
* commit 'a9aee08d900f686e966c64afec5d88a7d9d130a3': dsputil: Split off FDCT bits into their own context Conflicts: configure libavcodec/Makefile libavcodec/asvenc.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/dsputilenc_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/proresenc_kostya.c')
-rw-r--r--libavcodec/proresenc_kostya.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index ea1fd8ae7f..93bcde727d 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -26,8 +26,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"
@@ -195,9 +194,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;
@@ -266,27 +265,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;
}
}
@@ -1066,7 +1065,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;
@@ -1077,7 +1076,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)
@@ -1096,7 +1095,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)) {