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

feat: introduce rbsp unscaping buffer reader #346

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

murillo128
Copy link
Member

completely untested, ptal

@murillo128 murillo128 changed the title feat: introduce rbsp scaping buffer reader feat: introduce rbsp unscaping buffer reader Sep 16, 2024
this->pos = 0;
}

inline bool Assert(size_t num) const
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we asserting here?

Is this method used to skip the input NAL for a h26x buffer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method is used to ensure that we have enough bytes to call PeekX method safely, we probably want to replace them with exceptions eventually.

Note that this RbspReader as the same methods as the BufferReader so we can use them as template input for the BaseBitReader

Copy link
Contributor

@mildsunrise mildsunrise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yayyyy, finally ^^ thanks for implementing this.
other than the typo it lgtm. i'm sad we're copying the same bunch of code in three places though

src/h264/H26xNal.h Show resolved Hide resolved
src/h264/H26xNal.h Outdated Show resolved Hide resolved
@murillo128 murillo128 marked this pull request as ready for review September 18, 2024 09:14
@murillo128
Copy link
Member Author

thanxs for your reivews! yes, it is sad that I had to copy the same code in 3 places, couldn't find any good idea for cleaning it up, any idea on ow to improve it?

@murillo128 murillo128 merged commit b36b7b8 into master Sep 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants