Rework txk_type indexing system for chroma component
Use the row and column indexes to fetch txk_type, which allows the
chroma components to derive the tx type from the corresponding luma
components. It improves the coding performance of txk-sel by 0.18%.
Change-Id: I3f4bca5839e13ae95e51053e76cd86fe58202ac9
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index f5a1a2b..1c0db25 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1563,7 +1563,8 @@
const int supertx_enabled,
#endif
#if CONFIG_TXK_SEL
- int block, int plane, TX_SIZE tx_size,
+ int blk_row, int blk_col, int block, int plane,
+ TX_SIZE tx_size,
#endif
aom_writer *w) {
MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
@@ -1583,7 +1584,8 @@
// Only y plane's tx_type is transmitted
if (plane > 0) return;
PLANE_TYPE plane_type = get_plane_type(plane);
- const TX_TYPE tx_type = av1_get_tx_type(plane_type, xd, block, tx_size);
+ TX_TYPE tx_type =
+ av1_get_tx_type(plane_type, xd, blk_row, blk_col, block, tx_size);
#endif
if (!FIXED_TX_TYPE) {