rtc: Enable top_right_sync_wait_in_mis

The 'cdef_strength' member of MB_MODE_INFO structure
is made non bit-field because when accessing a bit-field,
a thread may inadvertently access a separate bit-field
in adjacent memory resulting in data race. Also, enabled
the speed feature 'top_right_sync_wait_in_mis' for rt
speed >= 9.

BUG: aomedia:3317

Change-Id: Iaaf1e7678153e95c008cfa20406bb3654afed988
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index cfcf1ac..b575cfb 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -323,7 +323,7 @@
   /*! \brief Whether to use interintra wedge */
   uint8_t use_wedge_interintra : 1;
   /*! \brief CDEF strength per BLOCK_64X64 */
-  int8_t cdef_strength : 4;
+  int8_t cdef_strength;
   /**@}*/
 
 #if CONFIG_RD_DEBUG
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index d6847c7..50e6c37 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -1709,9 +1709,10 @@
     // For multi-thread use case with row_mt enabled, enable top right
     // dependency wait of threads at mi level.
     if ((cpi->oxcf.row_mt == 1) && (cpi->mt_info.num_workers > 1)) {
-      // TODO(Deepa, yunqing): Temporarily disabled this feature due to a TSAN
-      // error. Will re-enable it after the fix.
-      sf->rt_sf.top_right_sync_wait_in_mis = false;
+      sf->rt_sf.top_right_sync_wait_in_mis =
+          frame_is_intra_only(cm) ? 0
+                                  : (!cpi->oxcf.tool_cfg.enable_global_motion &&
+                                     cpi->sf.rt_sf.use_nonrd_pick_mode);
     }
   }
   if (speed >= 10) {