commit | a52db47aa53f894d1fd478173c7b7c4eb0984f42 | [log] [tgz] |
---|---|---|

author | Mike Klein <mtklein@google.com> | Mon Oct 07 13:18:05 2019 -0500 |

committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Tue Oct 08 19:00:09 2019 +0000 |

tree | 93cdcee90297b90059ea57f7229ad4b5fc43f434 | |

parent | 5c593bf702db07bdd782b58f9bde28e8ee67061b [diff] |

sketch PQ and HLG APIs In the end I'd like to support 3 new forms to transfer function, - PQ / inv PQ - HLG - inv HLG PQ's inverse is in the same form, but no luck for HLG. I've written the HLG and inv HLG factories to take the same parameters, hoping that makes things easier to work with. I figure most people come at this from the perspective of the encoding inverse HLG (hence the "log" in the name... it's not HEG hybrid-exponent-gamma), so those shared parameters are in the form most natural to describe the inverse, making the description of the decoding HLG forward direction just a bit messier. It's unclear to me if we really want to be the arbiters of canonical "PQ" or "HLG" functions or if we just provide the PQ-ish and HLG-ish factories. There's so much nuance and opinion involved in what the output range of these functions should be. PQ 0->1 or 0->10000? HLG 0->1 or 0->12? Or some other range!? I'm also uncertain whether HLG and its inverse will need a parameter to control the gamma/log crossover point, or if it's always best at 1. Will probably find this out as I implement and test. I learned even the beautiful PQ function needs a clamp up to zero in its numerator or the math will go complex. Crushed my heart. So far I'm roughly at: [x] draft some APIs [x] impl. and test scalar PQ [ ] impl. and test scalar HLG [ ] impl. and test vector PQ [ ] impl. and test vector HLG [ ] make sure we're happy with APIs I think this might be a good first spot to land now that the unit tests do their first vaguely interesting work. Bug: chromium:960620 Change-Id: If22584f8ad24158fdaf3c30e084dd6754455d8fb Reviewed-on: https://skia-review.googlesource.com/c/skcms/+/246807 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>

3 files changed