Commit 641c1e57 authored by Jingning Han's avatar Jingning Han
Browse files

Shortcut soft quant optimization for certain coeffs

When the reconstructed coefficient is below the original coeff
in magnitude, skip the level down search for the given coefficient.
With fast-mode fix, performance change is within 0.01% level. The
overall clip encoding process speed is up by 10%-15%.

Change-Id: I93b68e494aa995faa3093fdfa1bda0bcb0e2564a
parent e3bae4a3
......@@ -1769,6 +1769,10 @@ void try_level_down_facade(LevelDownStats *stats, int scan_idx,
const int dqv = txb_info->dequant[coeff_idx != 0];
const tran_low_t dqc = qcoeff_to_dqcoeff(qc, dqv, txb_info->shift);
if (scan_idx != txb_info->eob - 1)
if (abs(dqc) < abs(tqc)) return;
const int64_t dqc_dist = get_coeff_dist(tqc, dqc, txb_info->shift);
stats->low_qc = get_lower_coeff(qc);
......
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