Remove ALLOW_128X32_BLOCK flag
It is confirmed that we will not support HORZ_4 and VERT_4
partition on 128x128 blocks
Change-Id: I629503291770be1acb671e8e7e411ffd38b9dd52
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 9502997..9b747ad 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -765,18 +765,11 @@
{ AOM_CDF10(9216, 9952, 11849, 30134, 30379, 30624, 31256, 31888, 32134) },
{ AOM_CDF10(7424, 9008, 9528, 30664, 31192, 31720, 31893, 32066, 32594) },
{ AOM_CDF10(1280, 1710, 2069, 31978, 32121, 32264, 32383, 32502, 32647) },
-#if ALLOW_128X32_BLOCKS
- { AOM_CDF10(28416, 28705, 28926, 32258, 32354, 32450, 32523, 32596, 32693) },
- { AOM_CDF10(9216, 9952, 11849, 30134, 30379, 30624, 31256, 31888, 32134) },
- { AOM_CDF10(7424, 9008, 9528, 30664, 31192, 31720, 31893, 32066, 32594) },
- { AOM_CDF10(1280, 1710, 2069, 31978, 32121, 32264, 32383, 32502, 32647) },
-#else
// 128x128 -> 64x64
{ AOM_CDF8(28416, 28705, 28926, 32258, 32402, 32547, 32548) },
{ AOM_CDF8(9216, 9952, 11849, 30134, 30502, 30870, 30871) },
{ AOM_CDF8(7424, 9008, 9528, 30664, 31456, 32248, 32249) },
{ AOM_CDF8(1280, 1710, 2069, 31978, 32193, 32409, 32410) },
-#endif // ALLOW_128X32_BLOCKS
};
static const aom_cdf_prob default_intra_ext_tx_cdf
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index f8305fe..979e0fb 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -59,11 +59,6 @@
#define KF_MODE_CONTEXTS 5
-// A define to configure whether 4:1 and 1:4 partitions are allowed for 128x128
-// blocks. They seem not to be giving great results (and might be expensive to
-// implement in hardware), so this is a toggle to conditionally disable them.
-#define ALLOW_128X32_BLOCKS 0
-
struct AV1Common;
typedef struct {
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 9f5340e..c443a22 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -980,10 +980,7 @@
out[0] -= cdf_element_prob(in, PARTITION_HORZ_A);
out[0] -= cdf_element_prob(in, PARTITION_HORZ_B);
out[0] -= cdf_element_prob(in, PARTITION_VERT_A);
-#if !ALLOW_128X32_BLOCKS
- if (bsize != BLOCK_128X128)
-#endif // !ALLOW_128X32_BLOCKS
- out[0] -= cdf_element_prob(in, PARTITION_HORZ_4);
+ if (bsize != BLOCK_128X128) out[0] -= cdf_element_prob(in, PARTITION_HORZ_4);
out[0] = AOM_ICDF(out[0]);
out[1] = AOM_ICDF(CDF_PROB_TOP);
}
@@ -998,10 +995,7 @@
out[0] -= cdf_element_prob(in, PARTITION_HORZ_A);
out[0] -= cdf_element_prob(in, PARTITION_VERT_A);
out[0] -= cdf_element_prob(in, PARTITION_VERT_B);
-#if !ALLOW_128X32_BLOCKS
- if (bsize != BLOCK_128X128)
-#endif // !ALLOW_128X32_BLOCKS
- out[0] -= cdf_element_prob(in, PARTITION_VERT_4);
+ if (bsize != BLOCK_128X128) out[0] -= cdf_element_prob(in, PARTITION_VERT_4);
out[0] = AOM_ICDF(out[0]);
out[1] = AOM_ICDF(CDF_PROB_TOP);
}
@@ -1063,11 +1057,10 @@
// Return the number of elements in the partition CDF when
// partitioning the (square) block with luma block size of bsize.
static INLINE int partition_cdf_length(BLOCK_SIZE bsize) {
- if (bsize <= BLOCK_8X8) return PARTITION_TYPES;
-#if !ALLOW_128X32_BLOCKS
+ if (bsize <= BLOCK_8X8)
+ return PARTITION_TYPES;
else if (bsize == BLOCK_128X128)
return EXT_PARTITION_TYPES - 2;
-#endif // !ALLOW_128X32_BLOCKS
else
return EXT_PARTITION_TYPES;
}
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 82331bf..06cf409 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -3147,16 +3147,12 @@
const int ext_partition_allowed =
do_rectangular_split && bsize > BLOCK_8X8 && partition_none_allowed;
-// partition4_allowed is 1 if we can use a PARTITION_HORZ_4 or PARTITION_VERT_4
-// for this block. This is almost the same as ext_partition_allowed, except
-// that we don't allow 128x32 or 32x128 blocks if ALLOW_128X32_BLOCKS is false,
-// so we require that bsize is not BLOCK_128X128.
-#if !ALLOW_128X32_BLOCKS
+ // partition4_allowed is 1 if we can use a PARTITION_HORZ_4 or
+ // PARTITION_VERT_4 for this block. This is almost the same as
+ // ext_partition_allowed, except that we don't allow 128x32 or 32x128 blocks,
+ // so we require that bsize is not BLOCK_128X128.
const int partition4_allowed =
ext_partition_allowed && bsize != BLOCK_128X128;
-#else
- const int partition4_allowed = ext_partition_allowed;
-#endif
// The standard AB partitions are allowed whenever ext-partition-types are
// allowed