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

two passes? #5

Closed
Kidlike opened this issue Nov 24, 2021 · 4 comments
Closed

two passes? #5

Kidlike opened this issue Nov 24, 2021 · 4 comments

Comments

@Kidlike
Copy link

Kidlike commented Nov 24, 2021

First of all, this is awesome - great work!


Since encoding is 20x-50x faster, would it make sense to run a 2nd pass, with a different direction, and then keep the smallest of the 2 results?

So, basically run a "horizontal" pass, then a "vertical" pass, and keep the smallest in size.

Most likely should not be the default, but if I was using QOI, I would like to have this option.

(I haven't read the code yet)

@tgonzalez89
Copy link

A vertical pass could be much slower because of cache locality, but it still could be faster than png. Maybe one could start at the "end" of the image (bottom-right) and go up (horizontally) to the top-left.

@millette
Copy link

Speaking of directions, and slightly related. I skimmed thru the code but my c is very rusty (no pun). I assume it's encoding the image line by line. If line 0 is processed left to right, is line 1 processed right to left? I would probably yield slightly better compression.

@Noxime
Copy link

Noxime commented Nov 25, 2021

I think ideally the image would be encoded in a Hilbert curve-order for, but that will trash cache quite badly. Anyone up for testing that approach and benchmarking?

@phoboslab
Copy link
Owner

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

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

No branches or pull requests

5 participants