Fix broken bit-stream syntax issue in cb4x4
Use the offset to code tx_size, which allows better scalability in
the implementation. This commit fixes the enc/dec mismatch issue
in cb4x4 experiment.
Change-Id: Ia814273b0be43819f92d1c41cfae4964cfb76ced
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index bfdab7b..13ca96b 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -925,23 +925,25 @@
};
#endif // CONFIG_PALETTE
+// The transform size is coded as an offset to the smallest transform
+// block size.
const aom_tree_index av1_tx_size_tree[MAX_TX_DEPTH][TREE_SIZE(TX_SIZES)] = {
{
// Max tx_size is 8X8
- -TX_4X4, -TX_8X8,
+ -0, -1,
},
{
// Max tx_size is 16X16
- -TX_4X4, 2, -TX_8X8, -TX_16X16,
+ -0, 2, -1, -2,
},
{
// Max tx_size is 32X32
- -TX_4X4, 2, -TX_8X8, 4, -TX_16X16, -TX_32X32,
+ -0, 2, -1, 4, -2, -3,
},
#if CONFIG_TX64X64
{
// Max tx_size is 64X64
- -TX_4X4, 2, -TX_8X8, 4, -TX_16X16, 6, -TX_32X32, -TX_64X64,
+ -0, 2, -1, 4, -2, 6, -3, -4,
},
#endif // CONFIG_TX64X64
};