ext_partition_types: Make update tree shape match
Update the first PARTITION_PLOFFSET (4) contexts with the four classic
partitions. The extended partitions are only codable above 8x8, but
there are PARTITION_PLOFFSET (4) contexts for dropping below 8x8.
Change-Id: Ib3291dded6dc24103222e8f470504c20e29adb88
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 12e8a81..b7b8208 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -4666,17 +4666,17 @@
}
#if CONFIG_EXT_PARTITION_TYPES
- prob_diff_update(av1_partition_tree, fc->partition_prob[0],
- counts->partition[0], PARTITION_TYPES, probwt, header_bc);
- for (i = 1; i < PARTITION_CONTEXTS_PRIMARY; ++i)
+ for (i = 0; i < PARTITION_PLOFFSET; ++i)
+ prob_diff_update(av1_partition_tree, fc->partition_prob[i],
+ counts->partition[i], PARTITION_TYPES, probwt, header_bc);
+ for (; i < PARTITION_CONTEXTS_PRIMARY; ++i)
prob_diff_update(av1_ext_partition_tree, fc->partition_prob[i],
counts->partition[i], EXT_PARTITION_TYPES, probwt,
header_bc);
#else
- for (i = 0; i < PARTITION_CONTEXTS_PRIMARY; ++i) {
+ for (i = 0; i < PARTITION_CONTEXTS_PRIMARY; ++i)
prob_diff_update(av1_partition_tree, fc->partition_prob[i],
counts->partition[i], PARTITION_TYPES, probwt, header_bc);
- }
#endif // CONFIG_EXT_PARTITION_TYPES
#if CONFIG_UNPOISON_PARTITION_CTX
for (; i < PARTITION_CONTEXTS_PRIMARY + PARTITION_BLOCK_SIZES; ++i) {