Commit 208e9c49db for aom
commit 208e9c49dba9fe961251fbd0e9c0494d9b8dbe76
Author: chendixi <chendixi@google.com>
Date: Thu Sep 17 13:07:14 2026 -0700
av1/cx: support resize-mode in aom_codec_set_option
Exposes rc_resize_mode configuration via aom_codec_set_option("resize-mode", ...)
and adds unit test coverage in av1_key_value_api_test.
Bug: b/558826197
Change-Id: I6868c09a7146c4dc1fcc1743abb2ba51da1fcaf4
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index cced80c024..030da6e1cc 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -4910,6 +4910,9 @@ static aom_codec_err_t encoder_set_option(aom_codec_alg_priv_t *ctx,
} else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.force_max_q, argv,
err_string)) {
extra_cfg.force_max_q = arg_parse_uint_helper(&arg, err_string);
+ } else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.resize_mode, argv,
+ err_string)) {
+ ctx->cfg.rc_resize_mode = arg_parse_uint_helper(&arg, err_string);
} else {
match = 0;
snprintf(err_string, ARG_ERR_MSG_MAX_LEN, "Cannot find aom option %s",
diff --git a/test/av1_key_value_api_test.cc b/test/av1_key_value_api_test.cc
index d3e9dc1c4c..844490767d 100644
--- a/test/av1_key_value_api_test.cc
+++ b/test/av1_key_value_api_test.cc
@@ -104,6 +104,7 @@ const KeyValParam enc_valid_params[] = {
std::make_tuple("auto-intra-tools-off", "1"), // uint
std::make_tuple("min-gf-interval", "10"), // uint
std::make_tuple("min-partition-size", "4"), // int
+ std::make_tuple("resize-mode", "3"), // uint
std::make_tuple("tune", "psnr"), // enum
};
@@ -121,6 +122,7 @@ const KeyValParam enc_invalid_params[] = {
std::make_tuple("tune", "PsnR1"),
// out of range
std::make_tuple("cq-level", "1000"),
+ std::make_tuple("resize-mode", "10"),
};
INSTANTIATE_TEST_SUITE_P(KeyValAPI, EncValidTest,