-
Notifications
You must be signed in to change notification settings - Fork 22
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
struct Rav1dFrameData::{cur,prev}_segmap
: Arc
ify with an Option<DisjointMutArcSlice<u8>>
#971
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kkysen
force-pushed
the
kkysen/segmap-Arc
branch
2 times, most recently
from
April 13, 2024 11:08
c7f9b38
to
5a45af6
Compare
kkysen
force-pushed
the
kkysen/struct-Bounds-simplify-DisjointMut
branch
from
April 13, 2024 11:18
2ac10fe
to
5013571
Compare
kkysen
force-pushed
the
kkysen/segmap-Arc
branch
3 times, most recently
from
April 13, 2024 11:58
2490d88
to
640058f
Compare
kkysen
changed the title
Apr 13, 2024
struct Rav1dContext_refs::{,cur_,prev_}segmap
: Arc
ify with an Option<DisjointMutArcSlice>
struct Rav1dFrameData::{cur,prev}_segmap
: Arc
ify with an Option<DisjointMutArcSlice<u8>>
randomPoison
approved these changes
Apr 15, 2024
kkysen
force-pushed
the
kkysen/segmap-Arc
branch
from
April 16, 2024 06:19
640058f
to
f7afaa4
Compare
kkysen
force-pushed
the
kkysen/struct-Bounds-simplify-DisjointMut
branch
from
April 16, 2024 07:14
5013571
to
2dcff75
Compare
kkysen
force-pushed
the
kkysen/segmap-Arc
branch
from
April 16, 2024 07:14
f7afaa4
to
60a1427
Compare
kkysen
force-pushed
the
kkysen/struct-Bounds-simplify-DisjointMut
branch
from
April 16, 2024 07:55
2dcff75
to
ae88ac6
Compare
kkysen
force-pushed
the
kkysen/segmap-Arc
branch
from
April 16, 2024 07:55
60a1427
to
b5759ff
Compare
kkysen
force-pushed
the
kkysen/struct-Bounds-simplify-DisjointMut
branch
from
April 16, 2024 07:59
ae88ac6
to
e3b8f4f
Compare
kkysen
changed the base branch from
kkysen/struct-Bounds-simplify-DisjointMut
to
kkysen/struct-RefMvsFrame-r-DisjointMut
April 16, 2024 08:02
kkysen
force-pushed
the
kkysen/segmap-Arc
branch
from
April 16, 2024 08:02
b5759ff
to
5ef95c6
Compare
kkysen
force-pushed
the
kkysen/struct-RefMvsFrame-r-DisjointMut
branch
2 times, most recently
from
April 16, 2024 19:41
626c721
to
ca5296d
Compare
…ointMut<[_]>>` with no overhead when `#[cfg(not(debug_assertions))]`.
…DisjointMutArcSlice<u8>>`.
…ap_pool` now that `segmap`s have been `Arc`ified.
kkysen
force-pushed
the
kkysen/struct-RefMvsFrame-r-DisjointMut
branch
from
April 17, 2024 00:09
ca5296d
to
09c4e25
Compare
Base automatically changed from
kkysen/struct-RefMvsFrame-r-DisjointMut
to
main
April 17, 2024 00:17
kkysen
force-pushed
the
kkysen/segmap-Arc
branch
from
April 17, 2024 00:20
5ef95c6
to
683f7c3
Compare
kkysen
added a commit
that referenced
this pull request
Apr 19, 2024
This fixes a bug from #971 where I was overslicing. It wasn't caught by the normal tests, only the argon tests that only ran on `main` once I merged.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
{cur,prev}_segmap{,_ref}
fields ofRav1dFrameContext
: Make fields safe #713.segmap{,_pool}
fields offn rav1d_ref_create_using_pool
: Replace withArc::new
#641.To do this, I first added a few things to
DisjointMut
:T: ?Sized
soDisjointMut<[_]>
is possible. This didn't really require any changes other than expanding the bounds.impl AsMutPtr for [_]
impl AsMutPtr for Box<[_]>
fn DisjointMut::new
to create a non-default()
DisjointMut
from a pre-existingT
DisjointMutArcSlice
, which is anArc<DisjointMut<[_]>>
in release mode, and anArc<DisjointMut<Box<[_]>>>
in debug mode. In release mode,DisjointMut
is#[repr(transparent)]
, so we can do this and safe allocations and indirections. And in debug mode, the overhead is fine.Then this
Arc
ifies thesegmaps
with the aboveDisjointMutArcSlice<u8>
.