Merge "Prevent data race from low-pass filter."
This commit is contained in:
commit
be2ba48cac
@ -258,14 +258,6 @@ TEST_P(DatarateTestLarge, ChangingDropFrameThresh) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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) {
|
TEST_P(DatarateTestLarge, DropFramesMultiThreads) {
|
||||||
denoiser_on_ = 0;
|
denoiser_on_ = 0;
|
||||||
cfg_.rc_buf_initial_sz = 500;
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
@ -285,7 +277,6 @@ TEST_P(DatarateTestLarge, DropFramesMultiThreads) {
|
|||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.4)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.4)
|
||||||
<< " The datarate for the file missed the target!";
|
<< " The datarate for the file missed the target!";
|
||||||
}
|
}
|
||||||
#endif // !BUILDING_WITH_TSAN
|
|
||||||
|
|
||||||
class DatarateTestRealTime : public DatarateTestLarge {
|
class DatarateTestRealTime : public DatarateTestLarge {
|
||||||
public:
|
public:
|
||||||
@ -402,10 +393,6 @@ TEST_P(DatarateTestRealTime, ChangingDropFrameThresh) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled for tsan, see:
|
|
||||||
// https://bugs.chromium.org/p/webm/issues/detail?id=1049
|
|
||||||
|
|
||||||
#ifndef BUILDING_WITH_TSAN
|
|
||||||
TEST_P(DatarateTestRealTime, DropFramesMultiThreads) {
|
TEST_P(DatarateTestRealTime, DropFramesMultiThreads) {
|
||||||
denoiser_on_ = 0;
|
denoiser_on_ = 0;
|
||||||
cfg_.rc_buf_initial_sz = 500;
|
cfg_.rc_buf_initial_sz = 500;
|
||||||
@ -426,7 +413,6 @@ TEST_P(DatarateTestRealTime, DropFramesMultiThreads) {
|
|||||||
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.4)
|
ASSERT_LE(cfg_.rc_target_bitrate, file_datarate_ * 1.4)
|
||||||
<< " The datarate for the file missed the target!";
|
<< " The datarate for the file missed the target!";
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
TEST_P(DatarateTestRealTime, GFBoost) {
|
TEST_P(DatarateTestRealTime, GFBoost) {
|
||||||
denoiser_on_ = 0;
|
denoiser_on_ = 0;
|
||||||
|
@ -4445,6 +4445,9 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
|
|||||||
/* start loopfilter in separate thread */
|
/* start loopfilter in separate thread */
|
||||||
sem_post(&cpi->h_event_start_lpf);
|
sem_post(&cpi->h_event_start_lpf);
|
||||||
cpi->b_lpf_running = 1;
|
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
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -4464,13 +4467,6 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
|
|||||||
}
|
}
|
||||||
#endif
|
#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 */
|
/* build the bitstream */
|
||||||
vp8_pack_bitstream(cpi, dest, dest_end, size);
|
vp8_pack_bitstream(cpi, dest, dest_end, size);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user