Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4848,23 +4848,7 @@ pub fn rav1d_submit_frame(c: &Rav1dContext, state: &mut Rav1dState) -> Rav1dResu
}
let out_delayed = &mut state.frame_thread.out_delayed[next as usize];
if out_delayed.p.data.is_some() || fc.task_thread.error.load(Ordering::SeqCst) != 0 {
let first = c.task_thread.first.load(Ordering::SeqCst);
if first as usize + 1 < c.fc.len() {
c.task_thread.first.fetch_add(1, Ordering::SeqCst);
} else {
c.task_thread.first.store(0, Ordering::SeqCst);
}
let _ = c.task_thread.reset_task_cur.compare_exchange(
first,
u32::MAX,
Ordering::SeqCst,
Ordering::SeqCst,
);
// `cur` is not actually mutated from multiple threads concurrently
let cur = c.task_thread.cur.get();
if cur != 0 && (cur as usize) < c.fc.len() {
c.task_thread.cur.update(|cur| cur - 1);
}
c.task_thread.advance_first(c.fc.len());
}
let error = &mut *fc.task_thread.retval.try_lock().unwrap();
if error.is_some() {
Expand Down
Loading
Loading