Commit b7926e61f1 for aom
commit b7926e61f11b6393d5178805fb6a85b1d8f25daf
Author: Qiu Jianlin <jianlin.qiu@intel.com>
Date: Wed Sep 9 13:36:42 2026 +0800
rtc: relax high bitdepth build constraint for AV1 RTC RC.
The RTC rate controller implementation is actually not depending on the
CONFIG_AV1_HIGHBITDEPTH build flag. Remove the code guard against it.
Bug: 544795255
Change-Id: I2f2d970da7c084150d7263b95c7b8c6f98a9e8da
diff --git a/av1/ratectrl_rtc.cc b/av1/ratectrl_rtc.cc
index 6f76c8db45..966f5697f9 100644
--- a/av1/ratectrl_rtc.cc
+++ b/av1/ratectrl_rtc.cc
@@ -159,9 +159,6 @@ bool AV1RateControlRTC::InitRateControl(const AV1RateControlRtcConfig &rc_cfg) {
RATE_CONTROL *const rc = &cpi_->rc;
const int bit_depth = rc_cfg.bit_depth == 0 ? 8 : rc_cfg.bit_depth;
if (bit_depth != 8 && bit_depth != 10 && bit_depth != 12) return false;
-#if !CONFIG_AV1_HIGHBITDEPTH
- if (bit_depth > 8) return false;
-#endif
cm->seq_params->profile = (bit_depth == 12) ? PROFILE_2 : PROFILE_0;
cm->seq_params->bit_depth = static_cast<aom_bit_depth_t>(bit_depth);
cm->show_frame = 1;
diff --git a/test/ratectrl_rtc_test.cc b/test/ratectrl_rtc_test.cc
index 8c78673bf2..9120122e6a 100644
--- a/test/ratectrl_rtc_test.cc
+++ b/test/ratectrl_rtc_test.cc
@@ -732,7 +732,6 @@ void RcExternMethodsInterfaceTest::TestBitDepthRateControl() {
ASSERT_FALSE(av1_ratecontrol_rtc_update(controller_8, &rc_cfg_));
av1_ratecontrol_rtc_destroy(controller_8);
-#if CONFIG_AV1_HIGHBITDEPTH
rc_cfg_.bit_depth = 10;
AomAV1RateControlRTC *controller_10 = av1_ratecontrol_rtc_create(&rc_cfg_);
ASSERT_NE(controller_10, nullptr);
@@ -744,16 +743,9 @@ void RcExternMethodsInterfaceTest::TestBitDepthRateControl() {
AomAV1RateControlRTC *controller_12 = av1_ratecontrol_rtc_create(&rc_cfg_);
ASSERT_NE(controller_12, nullptr);
av1_ratecontrol_rtc_destroy(controller_12);
-#else
- rc_cfg_.bit_depth = 10;
- ASSERT_EQ(av1_ratecontrol_rtc_create(&rc_cfg_), nullptr);
- rc_cfg_.bit_depth = 12;
- ASSERT_EQ(av1_ratecontrol_rtc_create(&rc_cfg_), nullptr);
-#endif
}
void RcExternMethodsInterfaceTest::TestLoopFilterLevelBitDepth() {
-#if CONFIG_AV1_HIGHBITDEPTH
frame_params_.spatial_layer_id = 0;
frame_params_.temporal_layer_id = 0;
frame_params_.frame_type = kAomKeyFrame;
@@ -780,7 +772,6 @@ void RcExternMethodsInterfaceTest::TestLoopFilterLevelBitDepth() {
// than for 8-bit at the same configuration.
EXPECT_GT(lpf_10.filter_level[0], lpf_8.filter_level[0]);
EXPECT_GT(lpf_10.filter_level[1], lpf_8.filter_level[1]);
-#endif // CONFIG_AV1_HIGHBITDEPTH
}
TEST_P(RcInterfaceTest, OneLayer) { RunOneLayer(); }