Enable intraframe partition pruning on midres
Performance:
| AVG_PSNR | OVR_PSNR | SSIM | AVG_SPD | OVR_SPD
KF-only | +0.063% | +0.063% | -0.037% | +27.286% | +37.605%
33-frms | +0.020% | +0.022% | -0.010$ | +1.528% | +1.832%
STATS_CHANGED
Change-Id: I556838d9d4463f812fb1d949f448a05ec11bf244
diff --git a/av1/encoder/partition_cnn_weights.h b/av1/encoder/partition_cnn_weights.h
index 7a60f88..68d8c42 100644
--- a/av1/encoder/partition_cnn_weights.h
+++ b/av1/encoder/partition_cnn_weights.h
@@ -2090,27 +2090,19 @@
#undef BRANCH_3_NUM_LOGITS
static const float av1_intra_mode_cnn_partition_split_thresh_hdres[5] = {
- 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
+ 100.0f, 100.0f, 100.0f, 100.0f, 100.0f,
};
static const float av1_intra_mode_cnn_partition_no_split_thresh_hdres[5] = {
- 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
-};
-
-static const float av1_intra_mode_cnn_partition_no_rect_thresh_hdres[5] = {
- 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
+ -100.0f, -100.0f, -100.0f, -100.0f, -100.0f,
};
static const float av1_intra_mode_cnn_partition_split_thresh_midres[5] = {
- 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
+ 100.000000f, 3.218737f, 2.657764f, 0.868458f, 2.454447f,
};
static const float av1_intra_mode_cnn_partition_no_split_thresh_midres[5] = {
- 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
-};
-
-static const float av1_intra_mode_cnn_partition_no_rect_thresh_midres[5] = {
- 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
+ -100.000000f, -3.842426f, -4.005076f, -3.642994f, -2.467197f,
};
static const float av1_intra_mode_cnn_partition_split_thresh_lowres[5] = {
diff --git a/av1/encoder/partition_strategy.c b/av1/encoder/partition_strategy.c
index 070e8e9..c63dbae 100644
--- a/av1/encoder/partition_strategy.c
+++ b/av1/encoder/partition_strategy.c
@@ -48,7 +48,7 @@
#if !CONFIG_REALTIME_ONLY
// TODO(chiyotsai@google.com): This is very much a work in progress. We still
// need to the following:
-// -- add support for midres and hdres
+// -- add support for hdres
// -- add support for pruning rectangular partitions
// -- use reconstructed pixels instead of source pixels for padding
// -- use chroma pixels in addition to luma pixels
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index ff426ae..23befc0 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -123,6 +123,7 @@
sf->use_square_partition_only_threshold = BLOCK_128X128;
} else if (is_480p_or_larger) {
sf->use_square_partition_only_threshold = BLOCK_64X64;
+ sf->intra_cnn_split = (speed == 1);
} else {
sf->use_square_partition_only_threshold = BLOCK_32X32;