diff options
author | Boyuan Yang <byang@debian.org> | 2022-07-14 15:56:57 -0400 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2022-07-14 15:56:57 -0400 |
commit | d4dbf19f6b0181ee78034bfe4caf189d1c016998 (patch) | |
tree | 47d5d28d2ab770a10e6c48788725c51dffeb84a9 /src/buffer_pool.cc | |
parent | 320ef65362608ee1148c299d8d5d7618af34e470 (diff) | |
download | libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.gz libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.bz2 libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.zip |
New upstream version 0.18.0
Diffstat (limited to 'src/buffer_pool.cc')
-rw-r--r-- | src/buffer_pool.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/buffer_pool.cc b/src/buffer_pool.cc index c1a5606..582f13c 100644 --- a/src/buffer_pool.cc +++ b/src/buffer_pool.cc @@ -156,19 +156,15 @@ bool BufferPool::OnFrameBufferSizeChanged(int bitdepth, } RefCountedBufferPtr BufferPool::GetFreeBuffer() { - // In frame parallel mode, the GetFreeBuffer() calls from ObuParser all happen - // from the same thread serially, but the GetFreeBuffer() call in - // DecoderImpl::ApplyFilmGrain can happen from multiple threads at the same - // time. So this function has to be thread safe. - // TODO(b/142583029): Investigate if the GetFreeBuffer() call in - // DecoderImpl::ApplyFilmGrain() call can be serialized so that this function - // need not be thread safe. std::unique_lock<std::mutex> lock(mutex_); for (auto buffer : buffers_) { if (!buffer->in_use_) { buffer->in_use_ = true; buffer->progress_row_ = -1; buffer->frame_state_ = kFrameStateUnknown; + buffer->hdr_cll_set_ = false; + buffer->hdr_mdcv_set_ = false; + buffer->itut_t35_set_ = false; lock.unlock(); return RefCountedBufferPtr(buffer, RefCountedBuffer::ReturnToBufferPool); } |