-
Notifications
You must be signed in to change notification settings - Fork 330
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
Change wire format to little-endian #36
Comments
If the highest bits of a byte decide what should be done the checks can be simplified.
This allows checks without masks:
This trick works also in C. I have not measured how much time is saved with this in C. If the lowest bits are used to do the decisions this type of optimization is not possible. |
The file format for QOI will not change anymore. See #37 for more info. Ideas for a successor to QOI should be discussed here: https://github.com/nigeltao/qoi2-bikeshed/issues |
Please reconsider. This is a huge wart for the spec, if you ask me. There's little reason to have big-endian ints in 2021. |
As far as I can tell it's only the header fields that are big endian. The rest of this diff is about the bit encoding inside the bytes which isn't really endianness related (and I think @ThomasMertes is right, it makes sense to keep it as-is). I totally agree though it's a super weird decision to make the headers big endian and should probably be changed. |
Spun out of #28 (comment) where I said:
I just uploaded a proof of concept which showed an approx 1.05x improvement in decode speed. Copy/pasting the commit message:
The key difference between
qoi.h
andqoile.h
is:The text was updated successfully, but these errors were encountered: