Support auto-intra-tools-off in the key-value API

The --auto-intra-tools-off option was added in
https://aomedia-review.googlesource.com/c/aom/+/149021. However, it was
only added as an aomenc option and was not recognized by the key-value
API (the aom_codec_set_option() function). This CL corrects that.

Bug: aomedia:3281
Change-Id: I22933b0388908f31629813d18ee560966c2356f8
(cherry picked from commit 4ab159e7565e0dc3c01722758bc3a4f9815d38c8)
diff --git a/aom/aomcx.h b/aom/aomcx.h
index abf6284..be9007f 100644
--- a/aom/aomcx.h
+++ b/aom/aomcx.h
@@ -1403,7 +1403,8 @@
    */
   AOME_GET_LOOPFILTER_LEVEL = 150,
 
-  /*!\brief Codec control to automatically turn off several intra coding tools
+  /*!\brief Codec control to automatically turn off several intra coding tools,
+   * unsigned int parameter
    * - 0 = do not use the feature
    * - 1 = enable the automatic decision to turn off several intra tools
    */
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index 0db25e6..12de7ea 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -844,6 +844,7 @@
   RANGE_CHECK(extra_cfg, deltaq_strength, 0, 1000);
   RANGE_CHECK_HI(extra_cfg, loopfilter_control, 3);
   RANGE_CHECK_HI(extra_cfg, enable_cdef, 2);
+  RANGE_CHECK_BOOL(extra_cfg, auto_intra_tools_off);
   RANGE_CHECK_BOOL(extra_cfg, strict_level_conformance);
 
   return AOM_CODEC_OK;
@@ -3933,6 +3934,9 @@
   } else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.loopfilter_control,
                               argv, err_string)) {
     extra_cfg.loopfilter_control = arg_parse_int_helper(&arg, err_string);
+  } else if (arg_match_helper(&arg, &g_av1_codec_arg_defs.auto_intra_tools_off,
+                              argv, err_string)) {
+    extra_cfg.auto_intra_tools_off = arg_parse_uint_helper(&arg, err_string);
   } else if (arg_match_helper(&arg,
                               &g_av1_codec_arg_defs.strict_level_conformance,
                               argv, err_string)) {
diff --git a/test/av1_key_value_api_test.cc b/test/av1_key_value_api_test.cc
index 058b8ce..a5734f6 100644
--- a/test/av1_key_value_api_test.cc
+++ b/test/av1_key_value_api_test.cc
@@ -101,9 +101,10 @@
 // The string type typically involves reading a path/file, which brings
 // potential fails.
 const KeyValParam enc_valid_params[] = {
-  std::make_tuple("min-gf-interval", "10"),    // uint
-  std::make_tuple("min-partition-size", "4"),  // int
-  std::make_tuple("tune", "psnr"),             // enum
+  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("tune", "psnr"),               // enum
 };
 
 const KeyValParam enc_invalid_params[] = {