Add depth to tx_size mapper to bit-stream coding
It serves as a helper function to integrate various transform coding
options.
Change-Id: I64e7d0c88ea10137fa1ff1072d865eb0054c2a25
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 260319e..899aa81 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -414,6 +414,7 @@
const int tx_size_cat = is_inter ? inter_tx_size_cat_lookup[bsize]
: intra_tx_size_cat_lookup[bsize];
const TX_SIZE coded_tx_size = txsize_sqr_up_map[tx_size];
+ const int depth = tx_size_to_depth(coded_tx_size);
#if CONFIG_EXT_TX && CONFIG_RECT_TX
assert(IMPLIES(is_rect_tx(tx_size), is_rect_tx_allowed(xd, mbmi)));
@@ -423,7 +424,7 @@
av1_write_token(w, av1_tx_size_tree[tx_size_cat],
cm->fc->tx_size_probs[tx_size_cat][tx_size_ctx],
- &tx_size_encodings[tx_size_cat][coded_tx_size]);
+ &tx_size_encodings[tx_size_cat][depth]);
}
}