Remove nonrd condition in var based partitioning
Prior to this commit, the condition was added to prevent a regression.
The regression was due to an incorrect segment id, which led to the
wrong q index being used.
This commit fixes the issue by replacing
av1_set_offsets_without_segment_id with av1_set_offsets.
Performance:
SPD_SET | TESTSET | AVG_PSNR | OVR_PSNR | SSIM | SPD
---------+---------+----------+----------+---------+-------
5 | rtc | -0.617% | -0.487% | -0.923% | +0.9%
5 |rtc_derf | -0.256% | -0.243% | -0.178% | -2.0%
---------+---------+----------+----------+---------+-------
6 | rtc | -1.283% | -1.147% | -1.593% | -0.3%
6 |rtc_derf | -0.127% | -0.199% | -0.120% | -1.6%
---------+---------+----------+----------+---------+-------
STATS_CHANGED
Change-Id: I643cde296344bfa68e0f9c655bfed0d85cd7e404
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 80eb7f3..714d5f8 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -632,8 +632,7 @@
start_timing(cpi, rd_use_partition_time);
#endif
// partition search starting from a variance-based partition
- av1_set_offsets_without_segment_id(cpi, tile_info, x, mi_row, mi_col,
- sb_size);
+ av1_set_offsets(cpi, tile_info, x, mi_row, mi_col, sb_size);
av1_choose_var_based_partitioning(cpi, tile_info, td, x, mi_row, mi_col);
PC_TREE *const pc_root = av1_alloc_pc_tree_node(sb_size);
av1_rd_use_partition(cpi, td, tile_data, mi, tp, mi_row, mi_col, sb_size,
diff --git a/av1/encoder/var_based_part.c b/av1/encoder/var_based_part.c
index e08b52a..1b676e6 100644
--- a/av1/encoder/var_based_part.c
+++ b/av1/encoder/var_based_part.c
@@ -1062,9 +1062,9 @@
const int segment_id = xd->mi[0]->segment_id;
if (cpi->oxcf.q_cfg.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled &&
- cyclic_refresh_segment_id_boosted(segment_id) &&
- cpi->sf.rt_sf.use_nonrd_pick_mode) {
- int q = av1_get_qindex(&cm->seg, segment_id, cm->quant_params.base_qindex);
+ cyclic_refresh_segment_id_boosted(segment_id)) {
+ const int q =
+ av1_get_qindex(&cm->seg, segment_id, cm->quant_params.base_qindex);
set_vbp_thresholds(cpi, thresholds, q, x->content_state_sb.low_sumdiff,
x->content_state_sb.source_sad, 1);
} else {
@@ -1199,8 +1199,7 @@
(max_var_32x32[m] - min_var_32x32[m]) > 3 * (thresholds[1] >> 3) &&
max_var_32x32[m] > thresholds[1] >> 1 &&
(noise_level >= kMedium || cpi->ppi->use_svc ||
- cpi->sf.rt_sf.force_large_partition_blocks ||
- !cpi->sf.rt_sf.use_nonrd_pick_mode)) {
+ cpi->sf.rt_sf.force_large_partition_blocks)) {
force_split[1 + m] = 1;
force_split[0] = 1;
}