Do not allocate tf_sync->mutex_ if real-time only
In av1_create_second_pass_workers(), do not allocate tf_sync->mutex_ in
real-time only build.
BUG=aomedia:3030
Change-Id: I0d1ae75ab2c9e2a2487192a10353b74a6acf2d6a
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index 14b185c..12a000d 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -550,18 +550,20 @@
aom_malloc(sizeof(*(gm_sync->mutex_))));
if (gm_sync->mutex_) pthread_mutex_init(gm_sync->mutex_, NULL);
}
+#if !CONFIG_REALTIME_ONLY
AV1TemporalFilterSync *tf_sync = &mt_info->tf_sync;
if (tf_sync->mutex_ == NULL) {
CHECK_MEM_ERROR(cm, tf_sync->mutex_, aom_malloc(sizeof(*tf_sync->mutex_)));
if (tf_sync->mutex_) pthread_mutex_init(tf_sync->mutex_, NULL);
}
+#endif // !CONFIG_REALTIME_ONLY
AV1CdefSync *cdef_sync = &mt_info->cdef_sync;
if (cdef_sync->mutex_ == NULL) {
CHECK_MEM_ERROR(cm, cdef_sync->mutex_,
aom_malloc(sizeof(*(cdef_sync->mutex_))));
if (cdef_sync->mutex_) pthread_mutex_init(cdef_sync->mutex_, NULL);
}
-#endif
+#endif // CONFIG_MULTITHREAD
for (int i = num_workers - 1; i >= 0; i--) {
AVxWorker *const worker = &mt_info->workers[i];