svc-rtc: Adjust logic for mode 2 of cdf-update

For cdf-update-mode=2 with layers: disable cdf update
on top temporal enhancememnt layers.
For (3SL,3TL) at speed 9: ~4-5% speedup with ~1.5% bdrate loss.

Also update some control settings in svc_rtc_encoder.c

Change-Id: Ie63a2510fd27966a5a92e8e9a4c028238d76c1a5
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 66d684b..fa66cee 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3189,7 +3189,13 @@
         features->disable_cdf_update =
             (frame_is_intra_only(cm) || !cm->show_frame) ? 0 : 1;
       } else {
-        features->disable_cdf_update = cm->current_frame.frame_number & 1;
+        if (cpi->svc.number_spatial_layers == 1 &&
+            cpi->svc.number_temporal_layers == 1)
+          features->disable_cdf_update = cm->current_frame.frame_number & 1;
+        else if (cpi->svc.number_temporal_layers > 1)
+          // Disable only on top temporal enhancement layer for now.
+          features->disable_cdf_update = (cpi->svc.temporal_layer_id ==
+                                          cpi->svc.number_temporal_layers - 1);
       }
       break;
   }
diff --git a/examples/svc_encoder_rtc.c b/examples/svc_encoder_rtc.c
index 4ad76f4..dae92cb 100644
--- a/examples/svc_encoder_rtc.c
+++ b/examples/svc_encoder_rtc.c
@@ -1061,9 +1061,10 @@
   aom_codec_control(&codec, AV1E_SET_ENABLE_ORDER_HINT, 0);
   aom_codec_control(&codec, AV1E_SET_ENABLE_TPL_MODEL, 0);
   aom_codec_control(&codec, AV1E_SET_DELTAQ_MODE, 0);
-  aom_codec_control(&codec, AV1E_SET_COEFF_COST_UPD_FREQ, 2);
-  aom_codec_control(&codec, AV1E_SET_MODE_COST_UPD_FREQ, 2);
+  aom_codec_control(&codec, AV1E_SET_COEFF_COST_UPD_FREQ, 3);
+  aom_codec_control(&codec, AV1E_SET_MODE_COST_UPD_FREQ, 3);
   aom_codec_control(&codec, AV1E_SET_MV_COST_UPD_FREQ, 3);
+  aom_codec_control(&codec, AV1E_SET_CDF_UPDATE_MODE, 1);
   aom_codec_control(&codec, AV1E_SET_TILE_COLUMNS,
                     cfg.g_threads ? get_msb(cfg.g_threads) : 0);
   if (cfg.g_threads > 1) aom_codec_control(&codec, AV1E_SET_ROW_MT, 1);