Commit 8b33c641 authored by Dmitry Kovalev's avatar Dmitry Kovalev Committed by Gerrit Code Review

Merge "Using clamp() for active_{best, worst}_quality."

parents e211244b 8d80c262
......@@ -958,17 +958,10 @@ static int rc_pick_q_and_bounds_two_pass(const VP9_COMP *cpi,
}
// Clip the active best and worst quality values to limits.
if (active_worst_quality > rc->worst_quality)
active_worst_quality = rc->worst_quality;
if (active_best_quality < rc->best_quality)
active_best_quality = rc->best_quality;
if (active_best_quality > rc->worst_quality)
active_best_quality = rc->worst_quality;
if (active_worst_quality < active_best_quality)
active_worst_quality = active_best_quality;
active_best_quality = clamp(active_best_quality,
rc->best_quality, rc->worst_quality);
active_worst_quality = clamp(active_worst_quality,
active_best_quality, rc->worst_quality);
*top_index = active_worst_quality;
*bottom_index = active_best_quality;
......
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