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

Tweak eval cmp key for more consistent results #671

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

andrews05
Copy link
Collaborator

This changes the evaluator to prefer a later image instead of an earlier one in the case of a tie. This gives more consistent results since the baseline is always added last.

I also removed bit depth from the key since the uncompressed size should cover that.

Fixes #649.
(Mostly. I did discover another possible but very rare issue: if multiple colours tie for "most popular edge colour" in the luma sort, the sort may affect which one is actually picked and multiple runs may flip-flop back and forth)

@ace-dent
Copy link

@andrews05

... prefer a later image ... since the baseline is always added last.

For my use, preferring the input image (which has been heavily pre-optimised), in case of a tie, is preferred. 👍

... if multiple colours tie... in the luma sort ...

Nice catch! I still ponder whether there is something smarter we can do here around edge colours. I still haven't quite got my head around potential interactions with filtering (beyond f0).... 🤔

Copy link
Collaborator

@AlexTMjugador AlexTMjugador left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@AlexTMjugador AlexTMjugador merged commit 8a44cdb into shssoichiro:master Jan 29, 2025
12 checks passed
@andrews05 andrews05 deleted the eval_cmp_key branch January 29, 2025 19:01
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.

Program seems to find new compressions to make after multiple runs (?)
3 participants