Refactor supertx decoding context
Use table access to replace integer to enum conversion.
Change-Id: Idb3e7e2e3267bccf322cffbe4bfaa969e9018296
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 42629f2..fd206f9 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -766,12 +766,7 @@
if (has_second_ref(&xd->mi[0]->mbmi))
set_ref(cm, xd, 1, mi_row_pred, mi_col_pred);
- if (!bextend) {
- mbmi->tx_size = b_width_log2_lookup[bsize_top];
-#if CONFIG_CB4X4
- ++mbmi->tx_size;
-#endif
- }
+ if (!bextend) mbmi->tx_size = max_txsize_lookup[bsize_top];
xd->plane[0].dst.stride = dst_stride[0];
xd->plane[1].dst.stride = dst_stride[1];
@@ -1772,7 +1767,7 @@
#if CONFIG_SUPERTX
const int read_token = !supertx_enabled;
int skip = 0;
- TX_SIZE supertx_size = b_width_log2_lookup[bsize] + CONFIG_CB4X4;
+ TX_SIZE supertx_size = max_txsize_lookup[bsize];
const TileInfo *const tile = &xd->tile;
int txfm = DCT_DCT;
#endif // CONFIG_SUPERTX