Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictorien Le Couviour--Tuffet <victorien@videolan.org>2022-09-08 15:45:35 +0300
committerVictorien Le Couviour--Tuffet <victorien@videolan.org>2022-09-08 15:50:25 +0300
commit6680d26f3013001d97adeba91304a10a878d9488 (patch)
tree375ecf1f4e61c4cf0641118e01ff1d85dc9fefd0
parentfab6427e2a37f995beced2bbe15b8f7a2404bec2 (diff)
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.
-rw-r--r--src/thread_task.c2
1 files changed, 1 insertions, 1 deletions
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);