Enable new --tune=ssimulacra2 defaults

These new defaults were picked to increase image quality and
consistency, guided by the SSIMULACRA2 metric and subjective
quality checks.

Bug: aomedia:375221136
Change-Id: Ie9f011ed20020689e8a390cfe65230b257fdec8d
diff --git a/aom/aomcx.h b/aom/aomcx.h
index e8595b73ca..e8f8bde 100644
--- a/aom/aomcx.h
+++ b/aom/aomcx.h
@@ -1670,6 +1670,8 @@
  * Setting the tuning option to AOM_TUNE_SSIMULACRA2 causes the following
  * options to be set (expressed as command-line options):
  *   * --enable-qm=1
+ *   * --sharpness=7
+ *   * --enable-cdef=3
  */
 typedef enum {
   AOM_TUNE_PSNR = 0,
@@ -1685,6 +1687,9 @@
  * time.
  */
 #define AOM_HAVE_TUNE_SSIMULACRA2 1
+  /* Increases image quality and consistency, guided by the SSIMULACRA2 metric
+   * and subjective quality checks. Shares the rdmult code with AOM_TUNE_SSIM.
+   */
   AOM_TUNE_SSIMULACRA2 = 10,
 } aom_tune_metric;
 
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index 1500047..c715310 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -1788,8 +1788,15 @@
                                      struct av1_extracfg *extra_cfg) {
   if (extra_cfg->tuning == AOM_TUNE_SSIMULACRA2) {
     if (ctx->cfg.g_usage != AOM_USAGE_ALL_INTRA) return AOM_CODEC_INCAPABLE;
+    // Enable QMs as they've been found to be beneficial for images, when used
+    // with an alternative QM formula (see aom_get_qmlevel_allintra()).
     extra_cfg->enable_qm = 1;
-    // TODO: bug 375221136 - set other options in extra_cfg.
+    // We can turn on loop filter sharpness, as frames do not have to serve as
+    // references to others.
+    extra_cfg->sharpness = 7;
+    // CDEF_ALL has been found to blur images at high quality QPs, so let's use
+    // a version that adapts on QP.
+    extra_cfg->enable_cdef = CDEF_ADAPTIVE;
   }
   return AOM_CODEC_OK;
 }
@@ -2878,7 +2885,7 @@
     if (priv->cfg.g_usage == AOM_USAGE_ALL_INTRA) {
       // CDEF has been found to blur images, so it's disabled in all-intra mode
       priv->extra_cfg.enable_cdef = 0;
-      // These QM min/max values have been found to be optimal for images,
+      // These QM min/max values have been found to be beneficial for images,
       // when used with an alternative QM formula (see
       // aom_get_qmlevel_allintra()).
       // These values could also be beneficial for other usage modes, but