Commit 46d375770a for aom
commit 46d375770a276201cde397ded4e72837fba1a3f0
Author: Bohan Li <bohanli@google.com>
Date: Sun Aug 23 22:47:10 2026 -0700
Revert "Implement WebM RC VBR TPL QP override"
This reverts commit 2f6ab661a0eaaa6792ac63c64ab9ae8e1ca7f11a.
Reason for revert: Result not as expected with 25% overshooting pct.
Change-Id: I3b899a38a0d0dc4e521bf6ba9e16634863263aa7
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 626e57466c..3842190096 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3476,18 +3476,6 @@ static int encode_with_recode_loop(AV1_COMP *cpi, size_t *size, uint8_t *dest,
// q.
if (encode_frame_decision.q_index != AOM_DEFAULT_Q) {
q = encode_frame_decision.q_index;
-#if !CONFIG_REALTIME_ONLY
- // This pass sends tpl stats to ext_rc. Use libaom's own Q.
- if (av1_use_tpl_for_extrc(&cpi->ext_ratectrl) &&
- cpi->ppi->tpl_data.tpl_frame[cpi->gf_frame_index].is_valid &&
- !is_lossless_requested(&cpi->oxcf.rc_cfg)) {
- q = av1_tpl_get_q_index(&cpi->ppi->tpl_data, cpi->gf_frame_index,
- cpi->ppi->p_rc.base_layer_qp,
- cm->seq_params->bit_depth);
- q = clamp(q, cpi->oxcf.rc_cfg.best_allowed_q,
- cpi->oxcf.rc_cfg.worst_allowed_q);
- }
-#endif
}
}
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index 218c596e8a..ba54d55e13 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -2136,29 +2136,6 @@ int av1_tpl_setup_stats(AV1_COMP *cpi, int gop_eval,
int extended_frame_count = init_gop_frames_for_tpl(
cpi, frame_params, gf_group, &tpl_gf_group_frames, &pframe_qindex);
- if (av1_encode_for_extrc(&cpi->ext_ratectrl)) {
- // Find the maximum QP for this GOP from ext_rc. Use it as the base qp.
- int max_q = 0;
- for (int frame_idx = 0; frame_idx < gf_group->size; ++frame_idx) {
- aom_rc_encodeframe_decision_t encode_frame_decision;
-
- int use_delta_q = 0;
- encode_frame_decision.use_delta_q = &use_delta_q;
- encode_frame_decision.sb_params_list = NULL;
- if (av1_extrc_get_encodeframe_decision(&cpi->ext_ratectrl, frame_idx,
- &encode_frame_decision) ==
- AOM_CODEC_OK) {
- if (encode_frame_decision.q_index != AOM_DEFAULT_Q &&
- encode_frame_decision.q_index > max_q) {
- max_q = encode_frame_decision.q_index;
- }
- }
- }
- if (max_q > 0) {
- pframe_qindex = max_q;
- }
- }
-
cpi->ppi->p_rc.base_layer_qp = pframe_qindex;
av1_init_tpl_stats(tpl_data);
diff --git a/test/ext_ratectrl_test.cc b/test/ext_ratectrl_test.cc
index 5f22d77de3..57944d993f 100644
--- a/test/ext_ratectrl_test.cc
+++ b/test/ext_ratectrl_test.cc
@@ -259,7 +259,6 @@ class ExtRateCtrlQpTest : public ExtRateCtrlTest {
protected:
ExtRateCtrlQpTest() {
rc_funcs_.get_encodeframe_decision = mock_get_encodeframe_decision_const_q;
- rc_funcs_.send_tpl_gop_stats = nullptr;
}
~ExtRateCtrlQpTest() override = default;
@@ -296,7 +295,6 @@ class ExtRateCtrlUpdateEncodeFrameResultTest : public ExtRateCtrlTest {
rc_funcs_.rc_type = AOM_RC_QP;
rc_funcs_.get_encodeframe_decision = mock_get_encodeframe_decision_const_q;
rc_funcs_.update_encodeframe_result = mock_update_encodeframe_result;
- rc_funcs_.send_tpl_gop_stats = nullptr;
}
~ExtRateCtrlUpdateEncodeFrameResultTest() override = default;