Fix pvq for cb4x4 and maintain its configure
Recently, sub8x8 inter mode decition functions have been
removed from the av1 codebase, so codebase does not allow
disabling cb4x4 anymore.
This makes pvq not working simply crashing
because we had disabled cb4x4 if pvq is enabled.
Hence, pvq has been fixed for cb4x4.
Also, if pvq is enabled, disable lgt and highbitdepth in the configure.
Change-Id: I2cb675c0dbc12bce60ed6a66c34ea3e907cc35b3
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index dcf3d29..05dca20 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -849,8 +849,16 @@
int max_blocks_wide;
int max_blocks_high;
int step = (1 << tx_size);
+
+#if CONFIG_CHROMA_SUB8X8
const BLOCK_SIZE plane_bsize =
- get_plane_block_size(AOMMAX(bsize, BLOCK_8X8), pd);
+ AOMMAX(BLOCK_4X4, get_plane_block_size(bsize, pd));
+#elif CONFIG_CB4X4
+ const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd);
+#else
+ const BLOCK_SIZE plane_bsize =
+ get_plane_block_size(AOMMAX(BLOCK_8X8, bsize), pd);
+#endif
adapt = x->daala_enc.state.adapt;
@@ -3965,7 +3973,9 @@
aom_start_encode(&mode_bc, dst + total_size);
write_modes(cpi, &tile_info, &mode_bc, &tok, tok_end);
#if !CONFIG_LV_MAP
+#if !CONFIG_PVQ
assert(tok == tok_end);
+#endif // !CONFIG_PVQ
#endif // !CONFIG_LV_MAP
aom_stop_encode(&mode_bc);
tile_size = mode_bc.pos;
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 201c598..803f852 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2149,6 +2149,9 @@
const int r_tx_size = tx_size_cost(cpi, x, bs, tx_size);
+#if CONFIG_PVQ
+ assert(tx_size >= TX_4X4);
+#endif // CONFIG_PVQ
assert(skip_prob > 0);
#if CONFIG_EXT_TX && CONFIG_RECT_TX
assert(IMPLIES(is_rect_tx(tx_size), is_rect_tx_allowed_bsize(bs)));
diff --git a/configure b/configure
index 6f7a1fe..b4f75fc 100755
--- a/configure
+++ b/configure
@@ -525,11 +525,12 @@
soft_enable tempmv_signaling
# Fix up experiment dependencies
- enabled pvq && disable_feature chroma_sub8x8
- enabled pvq && disable_feature cb4x4
+ enabled pvq && disable_feature chroma_2x2
enabled pvq && disable_feature rect_tx
enabled pvq && disable_feature ext_tx
enabled pvq && disable_feature var_tx
+ enabled pvq && disable_feature highbitdepth
+ enabled pvq && disable_feature lgt
enabled palette_throughput && soft_enable palette
enabled ext_delta_q && soft_enable delta_q
enabled txk_sel && soft_enable lv_map