Commit 16cda5ffac for aom
commit 16cda5ffacc435d0ce96e93481efb941b57752fe
Author: Jerome Jiang <jianj@google.com>
Date: Fri Feb 20 14:28:26 2026 -0500
Fix TPl: Cap qindex at MAXQ in tpl qstep search
Bug: 474101937
Change-Id: I93b5894e91270b9ce72f53d7c5504549a0b1360b
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index d3699c90cf..5dcf47b6f5 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -2412,7 +2412,7 @@ int av1_get_q_index_from_qstep_ratio(int leaf_qindex, double qstep_ratio,
if (qstep <= target_qstep) break;
}
} else {
- for (qindex = leaf_qindex; qindex <= MAXQ; ++qindex) {
+ for (qindex = leaf_qindex; qindex < MAXQ; ++qindex) {
const double qstep = av1_dc_quant_QTX(qindex, 0, bit_depth);
if (qstep >= target_qstep) break;
}