-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rework gamut_LUT sampling #17436
Rework gamut_LUT sampling #17436
Conversation
843beed
to
829b633
Compare
This breaks at least test
The diff output is: Probably expected? Can you confirm @jenshannoschwalm? TIA. |
Yes, (unfortunately) expected. If you think, the difference is too big, i would rethink. Yet - the new way offers clearly improved gamut_luts for UCS mode. The option would be to use different algos ... Another point, there is also some surpringly large difference in CPU vs GPU code in colorbalancergb. So we might have - i would say hopefully - another round of differences if the reason for this is found. (still on the track) |
Yes, I've seen that too.
Let's wait a bit before merging this then, I'll prefer having a single integration test update if possible. |
bdfc385
to
0094614
Compare
0094614
to
ac293c8
Compare
LUT_ELEM is currently meant to be used with a table per 1°, this commit 1. allows larger tables to be used for higher precision for later linear interpolation 2. does not use the final UCS mode box averaging any more but uses proper average of data inside the lut element. 3. Fix color equalizer and colorbalancergb to work correctly with all values of LUT_ELEM
That code was copy&pasted from the original in colorbalancergb, has been deduplicated.
Subtly improved precision for lookup_gamut function due to larger table. Also, as we use LUT_ELEM to be as 2^n we can redefine lookup_gamut - removing the restriction of hue input angle - improved performance
ac293c8
to
c040b82
Compare
@TurboGit would you re-review? I think the first 2 commits should be merged in any case as simplification, code-bug fix and deduplication. The third commit improves "things" slightly, marginally better interpolated data plus subtle perf gain. |
@jenshannoschwalm : Sure, I'll try to review again later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'll update 0093 test. Thanks!
Fixes and flexibility for LUT_ELEM
LUT_ELEM is currently meant to be used with a table per 1°, this commit
Increase LUT_ELEM to 512
Subtly improved precision for lookup_gamut function due to larger table.
Also, as we use LUT_ELEM to be as 2^n we can redefine lookup_gamut