-
-
Notifications
You must be signed in to change notification settings - Fork 278
PR: Fix and improve "Sony S-Log" curves implementation errors and consistency. #338
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
Conversation
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.
For consistency, I think log_encoding_SLog3 and log_decoding_SLog3 should be updated to include the bit_depth, in/out_legal, and in/out_reflection kwargs that the other two have.
It won't work quite the same as the other two. For example, for log_encoding_SLog3, out_legal=True could just return the current y value. out_legal=False would need to return:
CV_to_IRE(y * (2**bit_depth - 1), bit_depth, True)/100
This is needed to make all three S-Logs able to return the values in the Table in the S-Log3 white paper, because the IRE column is based on out_legal=False, and the CV column is based on out_legal=True.
Make sense?
I would also argue for the default to be out_legal=True rather than the current False. This will produce float values compatible with the ACES IDTs.
nick-shaw
left a comment
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.
The function RGB_range in ycbcr.py has been replaced with the new CV_range function. However there are still references to RGB_range in the docstrings.
…ency. References #336.
…ctively "colour.legal_to_full" and "colour.full_to_legal" definitions.
4e5f345 to
609166e
Compare
b42954b to
850df56
Compare
|
Coverage increased (+0.02%) to 98.198% when pulling 850df560d8d4b25eeedd77ee6e7ea266ab84d4ed on feature/sony_slog into 124461c on develop. |
850df56 to
bccdbd8
Compare
|
Coverage increased (+0.02%) to 98.198% when pulling bccdbd84b7be8c5b537999e41288160561cf208c on feature/sony_slog into 124461c on develop. |
…colour.log_encoding_SLog2" and "colour.log_decoding_SLog2" definitions use legal range.
bccdbd8 to
aba669a
Compare
|
@nick-shaw : I have implemented the requested changes. The following snippet matches the table in [1]: from colour import log_encoding_SLog2, log_encoding_SLog, log_encoding_SLog3
for x in [0.0, 0.18, 0.9]:
print( x, "S-Log3 IRE", 100 * log_encoding_SLog3(x, bit_depth=10, out_legal=False))
print( x, "S-Log2 IRE", 100 * log_encoding_SLog2(x, bit_depth=10, out_legal=False))
print( x, "S-Log IRE", 100 * log_encoding_SLog(x, bit_depth=10, out_legal=False))
print( x, "S-Log3 CV", 1023 * log_encoding_SLog3(x, bit_depth=10, out_legal=True))
print( x, "S-Log2 CV", 1023 * log_encoding_SLog2(x, bit_depth=10, out_legal=True))
print( x, "S-Log CV", 1023 * log_encoding_SLog(x, bit_depth=10, out_legal=True) )References
|
|
Coverage decreased (-0.03%) to 98.156% when pulling 634348b055321f0d00f62ead9fcf1a5c0d4b36cc on feature/sony_slog into 124461c on develop. |
…mplementation consistency.
634348b to
2af7b71
Compare
|
That all looks good to me now. |
|
Thanks @nick-shaw! :) |
References #336.