Set mv_cost_upd_level appropriately when row_mt = 1 The sf mv_cost_upd_level was set as INTERNAL_COST_UPD_SBROW to avoid cost update for a set of rows when row multi-threading was enabled and mv_cost_upd_level was INTERNAL_COST_UPD_SBROW_SET. This logic is not required when mv_cost_upd_level is set to INTERNAL_COST_UPD_OFF. This CL fixes this behaviour and adds appropriate comments. Change-Id: I6dd40f5074000b64e831a7305df11123afd602d5
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c index c275ac6..5c601a3 100644 --- a/av1/encoder/speed_features.c +++ b/av1/encoder/speed_features.c
@@ -1862,8 +1862,11 @@ else if (cpi->oxcf.unit_test_cfg.motion_vector_unit_test == 2) cpi->mv_search_params.find_fractional_mv_step = av1_return_min_sub_pixel_mv; + // For multi-thread use case with row_mt enabled, cost update for a set of + // SB rows is not desirable. Hence, the sf mv_cost_upd_level is set to + // INTERNAL_COST_UPD_SBROW in such cases. if ((cpi->oxcf.row_mt == 1) && (cpi->mt_info.num_workers > 1)) { - if (sf->inter_sf.mv_cost_upd_level < INTERNAL_COST_UPD_SBROW) { + if (sf->inter_sf.mv_cost_upd_level == INTERNAL_COST_UPD_SBROW_SET) { // Set mv_cost_upd_level to use row level update. sf->inter_sf.mv_cost_upd_level = INTERNAL_COST_UPD_SBROW; }