ref: 3f3d14e1d335d2d9cf60c77bb96b3513a76fe2d2
parent: e69461593d97e7b3648b220343a01e0777816d82
author: Dmitry Kovalev <[email protected]>
date: Tue Nov 12 12:28:27 EST 2013
Moving q_index from MACROBLOCKD to MACROBLOCK. Moving because q_index is used only by encoder. Change-Id: I0b96175614ed4fd3d76ee56a0ba36258e1e896f6
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -215,8 +215,6 @@
int corrupted;
- int q_index;
-
/* Y,U,V,(A) */
ENTROPY_CONTEXT *above_context[MAX_MB_PLANE];
ENTROPY_CONTEXT left_context[MAX_MB_PLANE][16];
--- a/vp9/encoder/vp9_block.h
+++ b/vp9/encoder/vp9_block.h
@@ -95,6 +95,7 @@
int skip_block;
int select_txfm_size;
int skip_optimize;
+ int q_index;
search_site *ss;
int ss_count;
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2410,7 +2410,7 @@
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;
--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -301,17 +301,17 @@
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] *
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3167,7 +3167,7 @@
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 @@
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++) {