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

Allow the bytes per pixel to be forced in qoibench #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jstavats
Copy link

@jstavats jstavats commented Feb 4, 2022

Hi, QOI is a really exciting and interesting image format. Thanks for sharing your inspired code.

This update adds a --forcebpp # option to qoibench to allow the number of bytes per pixel to be forced to 3,4,etc. Also provides better logging on to QOI mismatches.

This change was made in development of on a version of a complementary QOI-inspired 1 byte per pixel greyscale encoding. It is here: https://github.com/jstavats/qoi/tree/adding_grey

I do machine vision, so speed is the most critical feature in lossless image compression. In that domain the majority of images are still greyscale, so I was inspired to come up with a greyscale version to that would complement your colour one.

Would you consider adding this greyscale implementation into QOI? The code and benchmarks results against the benchmark suite are in the repo above (for 1,3 and 4 byte per pixel encodings).

Keep up the awesome work!

Thanks, Jay

This update adds the --forcebpp # option to qoibench to allow the number of bytes per pixel to be forced to 3,4,etc.
@bojh
Copy link

bojh commented Feb 9, 2022

Hi,
would also see great benefits for the GRAYSCALE variant and a huge amount of applications. I'm curious about the pros and cons. THX for your all superior idea's and implementations.

@jstavats jstavats mentioned this pull request Feb 9, 2022
Comment on lines +577 to +580
printf("## Benchmarking %s/*.png -- %d runs ", path, opt_runs);
if(opt_forcebpp)
printf("-- forcing %d bytes per pixel\n\n", opt_forcebpp);
printf("\n\n");

Choose a reason for hiding this comment

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

You may want to adjust the whitespacing for consistent dumps 🙂

Suggested change
printf("## Benchmarking %s/*.png -- %d runs ", path, opt_runs);
if(opt_forcebpp)
printf("-- forcing %d bytes per pixel\n\n", opt_forcebpp);
printf("\n\n");
printf("## Benchmarking %s/*.png -- %d runs", path, opt_runs);
if(opt_forcebpp)
printf(" -- forcing %d bytes per pixel", opt_forcebpp);
printf("\n\n");

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