ref: be2ba48cacdf867f648535b57b002fd7d25fe836
parent: 334e9abb0b05881edc59fb25e91b4efbede848ef
parent: 9ab4d9df387d3dd3881fae4d7af6215f37e3c9b8
author: Peter Boström <pbos@chromium.org>
date: Fri Sep 1 01:37:51 EDT 2017
Merge "Prevent data race from low-pass filter."
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -258,14 +258,6 @@
}
}
-// Disabled for tsan, see:
-// https://bugs.chromium.org/p/webm/issues/detail?id=1049
-#if defined(__has_feature)
-#if __has_feature(thread_sanitizer)
-#define BUILDING_WITH_TSAN
-#endif
-#endif
-#ifndef BUILDING_WITH_TSAN
TEST_P(DatarateTestLarge, DropFramesMultiThreads) {
denoiser_on_ = 0;
cfg_.rc_buf_initial_sz = 500;
@@ -285,7 +277,6 @@
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.4)
<< " The datarate for the file missed the target!";
}
-#endif // !BUILDING_WITH_TSAN
class DatarateTestRealTime : public DatarateTestLarge {
public:
@@ -402,10 +393,6 @@
}
}
-// Disabled for tsan, see:
-// https://bugs.chromium.org/p/webm/issues/detail?id=1049
-
-#ifndef BUILDING_WITH_TSAN
TEST_P(DatarateTestRealTime, DropFramesMultiThreads) {
denoiser_on_ = 0;
cfg_.rc_buf_initial_sz = 500;
@@ -426,7 +413,6 @@
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.4)
<< " The datarate for the file missed the target!";
}
-#endif
TEST_P(DatarateTestRealTime, GFBoost) {
denoiser_on_ = 0;
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -4445,6 +4445,9 @@
/* start loopfilter in separate thread */
sem_post(&cpi->h_event_start_lpf);
cpi->b_lpf_running = 1;
+ /* wait for the filter_level to be picked so that we can continue with
+ * stream packing */
+ sem_wait(&cpi->h_event_end_lpf);
} else
#endif
{
@@ -4462,13 +4465,6 @@
if (cpi->oxcf.error_resilient_mode) {
cm->refresh_entropy_probs = 0;
}
-#endif
-
-#if CONFIG_MULTITHREAD
- /* wait that filter_level is picked so that we can continue with stream
- * packing */
- if (vpx_atomic_load_acquire(&cpi->b_multi_threaded))
- sem_wait(&cpi->h_event_end_lpf);
#endif
/* build the bitstream */