Moving q_index from MACROBLOCKD to MACROBLOCK.
Moving because q_index is used only by encoder. Change-Id: I0b96175614ed4fd3d76ee56a0ba36258e1e896f6
This commit is contained in:
parent
e69461593d
commit
3f3d14e1d3
@ -215,8 +215,6 @@ typedef struct macroblockd {
|
||||
|
||||
int corrupted;
|
||||
|
||||
int q_index;
|
||||
|
||||
/* Y,U,V,(A) */
|
||||
ENTROPY_CONTEXT *above_context[MAX_MB_PLANE];
|
||||
ENTROPY_CONTEXT left_context[MAX_MB_PLANE][16];
|
||||
|
@ -95,6 +95,7 @@ struct macroblock {
|
||||
int skip_block;
|
||||
int select_txfm_size;
|
||||
int skip_optimize;
|
||||
int q_index;
|
||||
|
||||
search_site *ss;
|
||||
int ss_count;
|
||||
|
@ -2410,7 +2410,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
|
||||
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);
|
||||
x->q_index < QIDX_SKIP_THRESH);
|
||||
if (x->skip_encode)
|
||||
return;
|
||||
|
||||
|
@ -301,17 +301,17 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
|
||||
SEG_LVL_SKIP);
|
||||
|
||||
/* save this macroblock QIndex for vp9_update_zbin_extra() */
|
||||
x->e_mbd.q_index = qindex;
|
||||
x->q_index = qindex;
|
||||
|
||||
/* R/D setup */
|
||||
cpi->mb.errorperbit = rdmult >> 6;
|
||||
cpi->mb.errorperbit += (cpi->mb.errorperbit == 0);
|
||||
|
||||
vp9_initialize_me_consts(cpi, xd->q_index);
|
||||
vp9_initialize_me_consts(cpi, x->q_index);
|
||||
}
|
||||
|
||||
void vp9_update_zbin_extra(VP9_COMP *cpi, MACROBLOCK *x) {
|
||||
const int qindex = x->e_mbd.q_index;
|
||||
const int qindex = x->q_index;
|
||||
const int y_zbin_extra = (cpi->common.y_dequant[qindex][1] *
|
||||
(cpi->zbin_mode_boost + x->act_zbin_adj)) >> 7;
|
||||
const int uv_zbin_extra = (cpi->common.uv_dequant[qindex][1] *
|
||||
|
@ -3167,7 +3167,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
const int bhs = num_8x8_blocks_high_lookup[bsize] / 2;
|
||||
int best_skip2 = 0;
|
||||
|
||||
x->skip_encode = cpi->sf.skip_encode_frame && xd->q_index < QIDX_SKIP_THRESH;
|
||||
x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
|
||||
|
||||
// Everywhere the flag is set the error is much higher than its neighbors.
|
||||
ctx->frames_with_high_error = 0;
|
||||
@ -3862,7 +3862,7 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
b_mode_info best_bmodes[4];
|
||||
int best_skip2 = 0;
|
||||
|
||||
x->skip_encode = cpi->sf.skip_encode_frame && xd->q_index < QIDX_SKIP_THRESH;
|
||||
x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
|
||||
vpx_memset(x->zcoeff_blk[TX_4X4], 0, 4);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user