Include partition cost in best_remain_rdcost for PARTITION_HORZ Currently, the calculation of best_remain_rdcost for PARTITION_HORZ does not take the cost of choosing PARTITION_HORZ into account. This commit corrects this issue and make it consistent with the calculation for other PARTITION_TYPES. STATS_CHANGED Change-Id: Ibca173739b2a6de269955ebe9c54b39cb26f0895
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index 7cf3247..f06cf25 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c
@@ -4398,11 +4398,11 @@ pc_tree->horizontal[0].pred_interp_filter = av1_extract_interp_filter(ctx_none->mic.interp_filters, 0); } + sum_rdc.rate = partition_cost[PARTITION_HORZ]; + sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, 0); const int64_t best_remain_rdcost = best_rdc.rdcost == INT64_MAX ? INT64_MAX : (best_rdc.rdcost - sum_rdc.rdcost); - sum_rdc.rate = partition_cost[PARTITION_HORZ]; - sum_rdc.rdcost = RDCOST(x->rdmult, sum_rdc.rate, 0); rd_pick_sb_modes(cpi, tile_data, x, mi_row, mi_col, &this_rdc, PARTITION_HORZ, subsize, &pc_tree->horizontal[0], best_remain_rdcost);