Simplify logics in encode_inter_mb_segment
Unify coefficient context used by different experiments. Make
block size and transform block size consistent with rest codebase.
Change-Id: I237336f161d6c473b88c59c48ee68d24b75ce738
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 008da3c..6657fa4 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -4376,8 +4376,8 @@
struct macroblock_plane *const p = &x->plane[0];
MODE_INFO *const mi = xd->mi[0];
const BLOCK_SIZE plane_bsize = get_plane_block_size(mi->mbmi.sb_type, pd);
- const int width = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
- const int height = 4 * num_4x4_blocks_high_lookup[plane_bsize];
+ const int width = block_size_wide[plane_bsize];
+ const int height = block_size_high[plane_bsize];
int idx, idy;
const uint8_t *const src =
&p->src.buf[av1_raster_block_offset(BLOCK_8X8, i, p->src.stride)];
@@ -4389,8 +4389,8 @@
TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, i, tx_size);
const SCAN_ORDER *scan_order = get_scan(cm, tx_size, tx_type, 1);
- const int num_4x4_w = num_4x4_blocks_wide_txsize_lookup[tx_size];
- const int num_4x4_h = num_4x4_blocks_high_txsize_lookup[tx_size];
+ const int num_4x4_w = tx_size_wide_unit[tx_size];
+ const int num_4x4_h = tx_size_high_unit[tx_size];
#if CONFIG_EXT_TX && CONFIG_RECT_TX
assert(IMPLIES(xd->lossless[mi->mbmi.segment_id], tx_size == TX_4X4));
@@ -4430,11 +4430,8 @@
block = k;
else
block = (i ? 2 : 0);
-#if CONFIG_VAR_TX
- coeff_ctx = get_entropy_context(tx_size, ta + (k & 1), tl + (k >> 1));
-#else
+
coeff_ctx = combine_entropy_contexts(*(ta + (k & 1)), *(tl + (k >> 1)));
-#endif
#if CONFIG_NEW_QUANT
av1_xform_quant_fp_nuq(cm, x, 0, block, idy + (i >> 1), idx + (i & 0x01),
BLOCK_8X8, tx_size, coeff_ctx);