Support rectangular tx size in cb4x4 mode
This commit makes ext-tx and rect-tx experiments supported in the
cb4x4 mode. It resolves an enc/dec mismatch issue when all the
transform experiments are enabled.
The coding gains are
ext-tx + rect-tx cb4x4 vartx total
lowres 4.0% 2.3% 0.5% 6.9%
The encoding speed is about the same when cb4x4 and vartx are
further enabled.
BUG=aomedia:139
Change-Id: I3fdabc6d5de23ceb78ac0751a9bf7332ebc0a3ac
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index a80ca5e..4ea247c 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -950,8 +950,12 @@
{ { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } },
#if CONFIG_TX64X64
{ { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } },
-#endif // CONFIG_TX64X64
+#endif // CONFIG_TX64X64
+#if CONFIG_CB4X4
+ { { TX_4X8, TX_4X4 }, { TX_2X2, TX_2X2 } }, // used
+#else
{ { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } }, // used
+#endif
{ { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } },
{ { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } },
{ { TX_4X8, TX_4X4 }, { TX_4X4, TX_4X4 } },
@@ -977,7 +981,11 @@
{ { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } },
#endif // CONFIG_TX64X64
{ { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } },
+#if CONFIG_CB4X4
+ { { TX_8X4, TX_2X2 }, { TX_4X4, TX_2X2 } }, // used
+#else
{ { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } }, // used
+#endif
{ { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } },
{ { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } },
{ { TX_8X4, TX_4X4 }, { TX_4X4, TX_4X4 } },
@@ -1293,6 +1301,7 @@
// Generates 4 bit field in which each bit set to 1 represents
// a blocksize partition 1111 means we split 64x64, 32x32, 16x16
// and 8x8. 1000 means we just split the 64x64 to 32x32
+/* clang-format off */
static const struct {
PARTITION_CONTEXT above;
PARTITION_CONTEXT left;
@@ -1340,6 +1349,7 @@
{ 0, 0 }, // 64X64 - {0b0000, 0b0000}
#endif // CONFIG_EXT_PARTITION
};
+/* clang-format on */
#if CONFIG_SUPERTX
static const TX_SIZE uvsupertx_size_lookup[TX_SIZES][2][2] = {