Add skcms_PrimariesToXYZD50

PNG decoders, as well as those constructing profiles programmatically
often need this functionality. This is based on the Skia implementation,
but it's slightly cleaner to read (thanks to skcms_MV_mul).

This continues to use CIE D50, rather than the ICC version. Bizarrely,
running the adaptation with these (non-standard?) values produces lower
error in the matrix, relative to the matrix published by the ICC.

Bug: skia:
Change-Id: Ic84e19b713124e017459e41af99f3c6163defe03
Reviewed-on: https://skia-review.googlesource.com/127050
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
6 files changed