-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use Float32
for the matrix coefficients for low precision colors
#482
Conversation
Codecov Report
@@ Coverage Diff @@
## master #482 +/- ##
==========================================
- Coverage 93.42% 93.40% -0.03%
==========================================
Files 9 9
Lines 1050 1061 +11
==========================================
+ Hits 981 991 +10
- Misses 69 70 +1
Continue to review full report at Codecov.
|
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.
Feel free to resolve these comments if they don't make sense.
64f2269
to
3e4173f
Compare
This comment has been minimized.
This comment has been minimized.
f29cddd
to
06cd267
Compare
I will submit some additional PRs to mitigate the precompilation problem. |
b379c2c
to
50d1d69
Compare
Benchmarkusing Colors, FixedPointNumbers, BenchmarkTools
N = 1000;
rgb_f64 = rand(RGB{Float64}, N, N);
rgb_f32 = rand(RGB{Float32}, N, N);
rgb_n0f8 = rand(RGB{N0f8}, N, N);
xyz_f64 = XYZ.(rgb_f64);
xyz_f32 = XYZ.(rgb_f32);
yiq_f64 = YIQ.(rgb_f64);
yiq_f32 = YIQ.(rgb_f32);
@btime convert.(XYZ, $rgb_f64);
@btime convert.(XYZ, $rgb_f32);
@btime convert.(XYZ, $rgb_n0f8);
@btime convert.(RGB, $xyz_f64);
@btime convert.(RGB, $xyz_f32);
@btime convert.(RGB{N0f8}, $xyz_f32);
@btime convert.(YIQ, $rgb_f64);
@btime convert.(YIQ, $rgb_f32);
@btime convert.(YIQ, $rgb_n0f8);
@btime convert.(RGB, $yiq_f64);
@btime convert.(RGB, $yiq_f32);
@btime convert.(RGB{N0f8}, $yiq_f32);
*: see also PR #493
|
This also changes the definition of the sRGB transform matrix slightly.
Now that the |
This also changes the definition of the sRGB transform matrix slightly. (cf. #355 (comment))
cf. #477