Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialized tiles vecs #954

Merged
merged 1 commit into from
Apr 4, 2024
Merged
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
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ pub(crate) unsafe fn rav1d_open(c_out: &mut *mut Rav1dContext, s: &Rav1dSettings
delayed_fg: Mutex::new(mem::zeroed()),
};
(&mut (*c).task_thread as *mut Arc<TaskThreadData>).write(Arc::new(ttd));
addr_of_mut!((*c).tiles).write(Default::default());
ptr::addr_of_mut!((*c).frame_thread.out_delayed).write(if (*c).n_fc > 1 {
(0..(*c).n_fc).map(|_| Default::default()).collect()
} else {
Expand All @@ -287,6 +288,7 @@ pub(crate) unsafe fn rav1d_open(c_out: &mut *mut Rav1dContext, s: &Rav1dSettings
for n in 0..n_fc {
let f: &mut Rav1dFrameData = &mut *((*c).fc).offset(n as isize);
f.index = n;
addr_of_mut!(f.tiles).write(Default::default());
addr_of_mut!(f.task_thread.tasks).write(UnsafeCell::new(Default::default()));
addr_of_mut!(f.frame_thread).write(Default::default());
if n_tc > 1 {
Expand Down
Loading