Enable dual buffer rd search and encoding scheme
This commit enables the dual buffer rate-distortion optimization and encoding scheme. It stacks the original transform coefficients, quantized levels, and reconstructed coefficients, in the rate- distortion optimization search process, hence eliminates the need to re-run residual generation, forward transform, and quantization in the encoding stage. Change-Id: I011bfad3a59a380a869ee552e91dae0394ec492e
This commit is contained in:
@@ -613,11 +613,12 @@ static void pick_sb_modes(VP9_COMP *cpi, const TileInfo *const tile,
|
||||
xd->mi_8x8[0]->mbmi.sb_type = bsize;
|
||||
|
||||
for (i = 0; i < MAX_MB_PLANE; ++i) {
|
||||
p[i].coeff = ctx->coeff_pbuf[i][1];
|
||||
pd[i].qcoeff = ctx->qcoeff_pbuf[i][1];
|
||||
pd[i].dqcoeff = ctx->dqcoeff_pbuf[i][1];
|
||||
pd[i].eobs = ctx->eobs_pbuf[i][1];
|
||||
p[i].coeff = ctx->coeff_pbuf[i][0];
|
||||
pd[i].qcoeff = ctx->qcoeff_pbuf[i][0];
|
||||
pd[i].dqcoeff = ctx->dqcoeff_pbuf[i][0];
|
||||
pd[i].eobs = ctx->eobs_pbuf[i][0];
|
||||
}
|
||||
ctx->is_coded = 0;
|
||||
|
||||
// Set to zero to make sure we do not use the previous encoded frame stats
|
||||
xd->mi_8x8[0]->mbmi.skip_coeff = 0;
|
||||
@@ -2407,10 +2408,13 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
|
||||
MODE_INFO **mi_8x8 = xd->mi_8x8;
|
||||
MODE_INFO *mi = mi_8x8[0];
|
||||
MB_MODE_INFO *mbmi = &mi->mbmi;
|
||||
PICK_MODE_CONTEXT *ctx = get_block_context(x, bsize);
|
||||
unsigned int segment_id = mbmi->segment_id;
|
||||
const int mis = cm->mode_info_stride;
|
||||
const int mi_width = num_8x8_blocks_wide_lookup[bsize];
|
||||
const int mi_height = num_8x8_blocks_high_lookup[bsize];
|
||||
x->skip_optimize = ctx->is_coded;
|
||||
ctx->is_coded = 1;
|
||||
x->use_lp32x32fdct = cpi->sf.use_lp32x32fdct;
|
||||
x->skip_encode = (!output_enabled && cpi->sf.skip_encode_frame &&
|
||||
xd->q_index < QIDX_SKIP_THRESH);
|
||||
|
||||
Reference in New Issue
Block a user