Refactor tx_size use cases in blockd.c
Use table to replace the arithmetic computation for mapping between
transform block and pixel number. Support automatic scale of block
size and transform block size.
Change-Id: I84766850172265d4295f418383dbc5e6e5838ec8
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index 88bfb0a..9d851e2 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -480,6 +480,22 @@
#endif
};
+// Transform block width in log2
+static const int tx_size_wide_log2[TX_SIZES_ALL] = {
+ 2, 3, 4, 5,
+#if CONFIG_EXT_TX
+ 2, 3, 3, 4, 4, 5,
+#endif
+};
+
+// Transform block height in log2
+static const int tx_size_high_log2[TX_SIZES_ALL] = {
+ 2, 3, 4, 5,
+#if CONFIG_EXT_TX
+ 3, 2, 4, 3, 5, 4,
+#endif
+};
+
static const int tx_size_2d[TX_SIZES_ALL] = {
16, 64, 256, 1024,
#if CONFIG_EXT_TX