rtc: Disable speed feature use_rtc_tf for spatial layers

It was already disabled for resize and is_psnr_calc_enabled(),
disable it always for now for spatial layers.

Fixes the buffer overflow in issue below.

Bug: 491358681
Change-Id: Idd8cc7cdebaf7a1ea221de4f62e9c91e6d66e934
(cherry picked from commit fb36c205a6e47aab9272d3fd56816bfe8dd157fe)
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 8cc56a2..e771245 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -1827,9 +1827,12 @@
   // temporal filtering which may change the input source during encoding:
   // this causes an issue on resized frames when psnr is calculated,
   // so disable it here for frames that are resized (encoding width/height
-  // different from configured width/height).
-  if (is_psnr_calc_enabled(cpi) && (cpi->oxcf.frm_dim_cfg.width != cm->width ||
-                                    cpi->oxcf.frm_dim_cfg.height != cm->height))
+  // different from configured width/height). Also disable for spatial layers.
+  // Bug: 491358681
+  if ((is_psnr_calc_enabled(cpi) &&
+       (cpi->oxcf.frm_dim_cfg.width != cm->width ||
+        cpi->oxcf.frm_dim_cfg.height != cm->height)) ||
+      cpi->svc.number_spatial_layers > 1)
     sf->rt_sf.use_rtc_tf = 0;
 
   // This speed feature is causing artifacts with active_maps enabled, so