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

change encoding format, ~7% smaller files on kodim test suite #41

Closed
wants to merge 4 commits into from
Closed

change encoding format, ~7% smaller files on kodim test suite #41

wants to merge 4 commits into from

Conversation

kmar
Copy link

@kmar kmar commented Nov 27, 2021

by changing the encoding a bit, I've managed to reduce qoi file sizes on the kodim testsuite
the new encoding operates in two modes, color (default) and alpha.
alpha mode is more suited for images with varying alpha channel, improving the compression ratio even more
improving the hashing function may improve the sizes even further, but I kept it as is to minimize performance impact

@kmar kmar changed the title change encoding format, ~6% smaller files on kodim test suite change encoding format, ~7% smaller files on kodim test suite Nov 27, 2021
@aligokalppeker
Copy link

This PR has made this efficient and simple image format far more complex. I rather choose the original version. Performance impact should be considered (measured) for this case. If we desire more efficient compression over performance, there is many other formats out there.

@kmar
Copy link
Author

kmar commented Nov 28, 2021

This PR has made this efficient and simple image format far more complex. I rather choose the original version. Performance impact should be considered (measured) for this case. If we desire more efficient compression over performance, there is many other formats out there.

your definition of "far more complex" seems rather odd, the useless 16-bit RLE mode is gone and alpha mode tries to improve a problem with complex alpha channels where the original encoding just struggles. I prefer a better compression ratio with very little cost. Also when this encoding is combined with 16x16 blocks here #33, the ratio is improved further 7% on the kodim suite. That's significant - ask anyone who actually ever did program a compressor.
7% is roughly what you get with optimal LZ parsing, which is way more demanding.
Anyway - since there's apparently no will to accept encoding improvements, I'm closing this PR. What a waste of time.

@kmar kmar closed this Nov 28, 2021
@aligokalppeker
Copy link

By the complexity, i mean about code complexity. As i see in the change set, it is not simple additions/modifications you made here, it is rather change in many different points in the block.

@aligokalppeker
Copy link

aligokalppeker commented Nov 28, 2021

Sorry, but I do not want to make you close this PR, but only discuss and improve its results

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.

2 participants