Commit 2c50f9ae authored by Debargha Mukherjee's avatar Debargha Mukherjee
Browse files

Some RD fixes

Change-Id: Ie6b41ac068846da3c87bdcaa94180777edb27d1f
parent a496c673
......@@ -387,6 +387,7 @@ static INLINE void av1_merge_rd_stats(RD_STATS *rd_stats_dst,
rd_stats_dst->rate += rd_stats_src->rate;
rd_stats_dst->dist += rd_stats_src->dist;
rd_stats_dst->sse += rd_stats_src->sse;
rd_stats_dst->zero_rate += rd_stats_src->zero_rate;
rd_stats_dst->skip &= rd_stats_src->skip;
rd_stats_dst->invalid_rate &= rd_stats_src->invalid_rate;
#if CONFIG_RD_DEBUG
......
......@@ -4183,16 +4183,16 @@ static void select_inter_block_yrd(const AV1_COMP *cpi, MACROBLOCK *x,
return;
}
av1_merge_rd_stats(rd_stats, &pn_rd_stats);
this_rd += AOMMIN(RDCOST(x->rdmult, pn_rd_stats.rate, pn_rd_stats.dist),
RDCOST(x->rdmult, 0, pn_rd_stats.sse));
this_rd +=
AOMMIN(RDCOST(x->rdmult, pn_rd_stats.rate, pn_rd_stats.dist),
RDCOST(x->rdmult, pn_rd_stats.zero_rate, pn_rd_stats.sse));
block += step;
if (rd_info_tree != NULL) rd_info_tree += 1;
}
}
}
this_rd = AOMMIN(RDCOST(x->rdmult, rd_stats->rate, rd_stats->dist),
RDCOST(x->rdmult, 0, rd_stats->sse));
RDCOST(x->rdmult, rd_stats->zero_rate, rd_stats->sse));
if (this_rd > ref_best_rd) is_cost_valid = 0;
if (!is_cost_valid) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment