#include "libavutil/timer.h"
#include "avcodec.h"
+#include "blockdsp.h"
#include "dsputil.h"
#include "internal.h"
#include "mpegvideo.h"
if (ctx->cid_table->bit_depth == 8) {
for (i = 1; i < 64; i++) {
- int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]];
+ int j = ctx->m.idsp.idct_permutation[ff_zigzag_direct[i]];
weight_matrix[j] = ctx->cid_table->luma_weight[i];
}
- ff_convert_matrix(&ctx->m.dsp, ctx->qmatrix_l, ctx->qmatrix_l16,
+ ff_convert_matrix(&ctx->m, ctx->qmatrix_l, ctx->qmatrix_l16,
weight_matrix, ctx->m.intra_quant_bias, 1,
ctx->m.avctx->qmax, 1);
for (i = 1; i < 64; i++) {
- int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]];
+ int j = ctx->m.idsp.idct_permutation[ff_zigzag_direct[i]];
weight_matrix[j] = ctx->cid_table->chroma_weight[i];
}
- ff_convert_matrix(&ctx->m.dsp, ctx->qmatrix_c, ctx->qmatrix_c16,
+ ff_convert_matrix(&ctx->m, ctx->qmatrix_c, ctx->qmatrix_c16,
weight_matrix, ctx->m.intra_quant_bias, 1,
ctx->m.avctx->qmax, 1);
// 10-bit
for (qscale = 1; qscale <= ctx->m.avctx->qmax; qscale++) {
for (i = 1; i < 64; i++) {
- int j = ctx->m.dsp.idct_permutation[ff_zigzag_direct[i]];
+ int j = ctx->m.idsp.idct_permutation[ff_zigzag_direct[i]];
/* The quantization formula from the VC-3 standard is:
* quantized = sign(block[i]) * floor(abs(block[i]/s) * p /
avctx->bits_per_raw_sample = ctx->cid_table->bit_depth;
+ ff_blockdsp_init(&ctx->bdsp, avctx);
+ ff_idctdsp_init(&ctx->m.idsp, avctx);
ff_dct_common_init(&ctx->m);
ff_dct_encode_init(&ctx->m);
ptr_v + ctx->dct_uv_offset,
ctx->m.uvlinesize);
} else {
- dsp->clear_block(ctx->blocks[4]);
- dsp->clear_block(ctx->blocks[5]);
- dsp->clear_block(ctx->blocks[6]);
- dsp->clear_block(ctx->blocks[7]);
+ ctx->bdsp.clear_block(ctx->blocks[4]);
+ ctx->bdsp.clear_block(ctx->blocks[5]);
+ ctx->bdsp.clear_block(ctx->blocks[6]);
+ ctx->bdsp.clear_block(ctx->blocks[7]);
}
} else {
dsp->get_pixels(ctx->blocks[4],
if (avctx->mb_decision == FF_MB_DECISION_RD || !RC_VARIANCE) {
dnxhd_unquantize_c(ctx, block, i, qscale, last_index);
- ctx->m.dsp.idct(block);
+ ctx->m.idsp.idct(block);
ssd += dnxhd_ssd_block(block, src_block);
}
}