Extend inter rd model to rectangular block
Also set the threshold from 0.9 to 0.85
The following test are conducted on speed 0.
Encoding Time Reduction
city_4cif 10.77%
soccer_4cif 9.85%
crowd_run 2.86%
Keiba_832x480 11.85%
avg 8.83%
Coding Performance Change
lowres: 0.034%
midres: 0.051%
STATS_CHANGED
Change-Id: Iccfaf20874f6eee737227baf3dc5006c13c7dcba
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 9198133..759775c 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -747,10 +747,11 @@
#if CONFIG_COLLECT_INTER_MODE_RD_STATS
static int inter_mode_data_block_idx(BLOCK_SIZE bsize) {
- if (bsize == BLOCK_8X8) return 1;
- if (bsize == BLOCK_16X16) return 2;
- if (bsize == BLOCK_32X32) return 3;
- return -1;
+ if (bsize == BLOCK_4X4 || bsize == BLOCK_4X8 || bsize == BLOCK_8X4 ||
+ bsize == BLOCK_4X16 || bsize == BLOCK_16X4) {
+ return -1;
+ }
+ return 1;
}
void av1_inter_mode_data_init(TileDataEnc *tile_data) {
@@ -861,7 +862,7 @@
rd_model->dist_sum += dist;
rd_model->ld_sum += ld;
rd_model->sse_sum += sse;
- rd_model->sse_sse_sum += sse * sse;
+ rd_model->sse_sse_sum += (double)sse * (double)sse;
rd_model->sse_ld_sum += sse * ld;
}
}
@@ -12189,7 +12190,7 @@
const int data_idx = inter_modes_info->rd_idx_pair_arr[j].idx;
*mbmi = inter_modes_info->mbmi_arr[data_idx];
int64_t curr_est_rd = inter_modes_info->est_rd_arr[data_idx];
- if (curr_est_rd * 0.9 > top_est_rd) {
+ if (curr_est_rd * 0.85 > top_est_rd) {
continue;
}
const int mode_rate = inter_modes_info->mode_rate_arr[data_idx];