From 6680d26f3013001d97adeba91304a10a878d9488 Mon Sep 17 00:00:00 2001 From: Victorien Le Couviour--Tuffet Date: Thu, 8 Sep 2022 14:45:35 +0200 Subject: threading: Limit the progress bitfields to the used size Store the used size instead of the allocated size. The used size can be smaller than the allocated size, which results in a wrong computation of the linear progress from the frame_progress bitfield. --- src/thread_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread_task.c b/src/thread_task.c index 655956c..5ddc05c 100644 --- a/src/thread_task.c +++ b/src/thread_task.c @@ -196,8 +196,8 @@ static int create_filter_sbrow(Dav1dFrameContext *const f, if (!prog) return -1; f->frame_thread.frame_progress = prog; f->frame_thread.copy_lpf_progress = prog + prog_sz; - f->frame_thread.prog_sz = prog_sz; } + f->frame_thread.prog_sz = prog_sz; memset(f->frame_thread.frame_progress, 0, prog_sz * sizeof(atomic_uint)); memset(f->frame_thread.copy_lpf_progress, 0, prog_sz * sizeof(atomic_uint)); atomic_store(&f->frame_thread.deblock_progress, 0); -- cgit v1.2.3