skcms: Add PQ and HLG types

The PQ and HLG types differ from PQish and HLGish as follows:
- always use the constants from ITU-R BT.2100 (PQish and HLGish can
  use other constants)
- include an explicit parameter for scaling by HDR reference white
  (PQish and HLGish are capable of this, but the scaling is not an
  explicit parameter)
- for HLG, include parameters for the OOTF, namely, the peak luminance
  and system gamma (absent for HLGish)
- when used with SkColorSpace, will include the OOTF (absent for HLGish)

The skcms_TransferFunction_makePQ and skcms_TransferFunction_makeHLG
functions had no callers, to repurpose them to initialize these
types.

Once all use of PQish and HLGish is removed, we will be able to remove
PQish and HLGish entirely, so that we just have these PQ and HLG.

Bug: 420956739
Change-Id: If7a3fec007cd21825c3533272b865faf91fe5331
Reviewed-on: https://skia-review.googlesource.com/c/skcms/+/1002396
Reviewed-by: Christopher Cameron <ccameron@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
Reviewed-by: Kaylee Lubick <kjlubick@google.com>
3 files changed
tree: 3e99115fade8be450f5c9263cf9cace351224ee9
  1. bazel/
  2. fuzz/
  3. infra/
  4. ninja/
  5. profiles/
  6. src/
  7. toolchain/
  8. .bazelrc
  9. .bazelversion
  10. .gitignore
  11. BAZEL.md
  12. bench.c
  13. BUILD.bazel
  14. build.ninja
  15. codereview.settings
  16. iccdump.c
  17. LICENSE
  18. msvs.ninja
  19. OWNERS
  20. README.chromium
  21. README.md
  22. skcms.cc
  23. skcms.gni
  24. skcms.h
  25. test_only.c
  26. test_only.h
  27. tests.c
  28. whitespace.txt
  29. WORKSPACE.bazel
README.md

To build with ninja, simply run ninja from the root directory. This will produce a library in /out.

There are also Bazel rules, outlined in BAZEL.md