-
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
fn dav1d_parse_sequence_header
: backport simplification from dav1d 1.2.1
#897
Conversation
b806651
to
8e2ebfb
Compare
Note sure whether the API function |
b2918a2
to
df3dfa7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Could you just use assert!
instead of assert_eq!
on a bool
?
It's not used by anything, and the data it references is stack-allocated.
Creating an entire decoder instance just for some bitstream parsing is completely unnecessary. We can instead parse the sequence header directly into the user-provided buffer while ignoring/skipping other OBU types, with zero memory allocations required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed these couple things before. We should port the NOINLINE
C added.
Avoid creating an entire decoder instance to just parse a sequence header.