add a warning about non-D50 profiles

And add the two profiles from crbug.com/847024.

Threshold is somewhat arbitrary, tuned so these two new profiles
trigger and the next weirdest, the Kodak profile, doesn't.

Change-Id: I3eff63a60ea0cdba4fe1a479dd2e1715b1e5e0f0
Reviewed-on: https://skia-review.googlesource.com/137883
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Auto-Submit: Mike Klein <mtklein@chromium.org>
diff --git a/profiles/fuzz/infinite_roundtrip.icc.txt b/profiles/fuzz/infinite_roundtrip.icc.txt
index 7140dea..d9e06d4 100644
--- a/profiles/fuzz/infinite_roundtrip.icc.txt
+++ b/profiles/fuzz/infinite_roundtrip.icc.txt
@@ -22,6 +22,7 @@
  XYZ : | 8224.125000000 8224.125000000 8224.125000000 |
        | 8224.125000000 8224.125000000 8224.125000000 |
        | 8224.125000000 8224.125000000 8224.125000000 |
+ !!! This does not appear to use a D50 whitepoint, rather [24672.4 24672.4 24672.4]
 252 random bytes transformed to linear XYZD50 bytes:
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
diff --git a/profiles/fuzz/inverse_tf_adb_negative.icc.txt b/profiles/fuzz/inverse_tf_adb_negative.icc.txt
index 19fb7c9..7f335db 100644
--- a/profiles/fuzz/inverse_tf_adb_negative.icc.txt
+++ b/profiles/fuzz/inverse_tf_adb_negative.icc.txt
@@ -23,6 +23,7 @@
  XYZ : | 8224.125000000 8224.125000000 8224.125000000 |
        | 8224.125000000 8224.125000000 8224.125000000 |
        | -0.003417969 8224.125000000 8224.125000000 |
+ !!! This does not appear to use a D50 whitepoint, rather [24672.4 24672.4 16448.2]
 252 random bytes transformed to linear XYZD50 bytes:
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
diff --git a/profiles/fuzz/polytf_big_float_to_int_cast.icc.txt b/profiles/fuzz/polytf_big_float_to_int_cast.icc.txt
index 065f4aa..7d4a38c 100644
--- a/profiles/fuzz/polytf_big_float_to_int_cast.icc.txt
+++ b/profiles/fuzz/polytf_big_float_to_int_cast.icc.txt
@@ -22,6 +22,7 @@
  XYZ : | 8224.125000000 8224.125000000 8224.125000000 |
        | 8224.125000000 8224.125000000 8224.125000000 |
        | 8224.125000000 -223.874511719 28769.447265625 |
+ !!! This does not appear to use a D50 whitepoint, rather [24672.4 24672.4 36769.7]
 252 random bytes transformed to linear XYZD50 bytes:
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
diff --git a/profiles/fuzz/polytf_nan_after_update.icc.txt b/profiles/fuzz/polytf_nan_after_update.icc.txt
index 3dbb2f7..6654bb5 100644
--- a/profiles/fuzz/polytf_nan_after_update.icc.txt
+++ b/profiles/fuzz/polytf_nan_after_update.icc.txt
@@ -22,6 +22,7 @@
  XYZ : | 8224.125000000 8224.125000000 8224.125000000 |
        | 8224.125000000 8224.125000000 8224.125000000 |
        | 8224.125000000 8224.125000000 8224.125000000 |
+ !!! This does not appear to use a D50 whitepoint, rather [24672.4 24672.4 24672.4]
 252 random bytes transformed to linear XYZD50 bytes:
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
 	ffffff ffffff ffffff ffffff ffffff ffffff ffffff
diff --git a/profiles/misc/BenQ_GL2450.icc b/profiles/misc/BenQ_GL2450.icc
new file mode 100644
index 0000000..0a19760
--- /dev/null
+++ b/profiles/misc/BenQ_GL2450.icc
Binary files differ
diff --git a/profiles/misc/BenQ_GL2450.icc.txt b/profiles/misc/BenQ_GL2450.icc.txt
new file mode 100644
index 0000000..90e3a8c
--- /dev/null
+++ b/profiles/misc/BenQ_GL2450.icc.txt
@@ -0,0 +1,46 @@
+                Size : 0x00001B54 : 6996
+    Data color space : 0x52474220 : 'RGB '
+                 PCS : 0x58595A20 : 'XYZ '
+           Tag count : 0x0000000E : 14
+
+ Tag    : Type   : Size   : Offset
+ ------ : ------ : ------ : --------
+ 'cprt' : 'text' :     45 : 300
+ 'desc' : 'desc' :    109 : 348
+ 'wtpt' : 'XYZ ' :     20 : 460
+ 'bkpt' : 'XYZ ' :     20 : 480
+ 'rXYZ' : 'XYZ ' :     20 : 500
+ 'gXYZ' : 'XYZ ' :     20 : 520
+ 'bXYZ' : 'XYZ ' :     20 : 540
+ 'dmnd' : 'desc' :    111 : 560
+ 'dmdd' : 'desc' :    109 : 672
+ 'lumi' : 'XYZ ' :     20 : 784
+ 'tech' : 'sig ' :     12 : 804
+ 'rTRC' : 'curv' :   2060 : 816
+ 'gTRC' : 'curv' :   2060 : 2876
+ 'bTRC' : 'curv' :   2060 : 4936
+
+rTRC : 16-bit table with 1024 entries
+  ~= : 1.998019, 1.000748, -0.0009201114, 0.08681955, 0.08699902, 9.568995e-05, 0 (Max error: 0.0222163) (D-gap: -8.0606e-07)
+gTRC : 16-bit table with 1024 entries
+  ~= : 1.998019, 1.000748, -0.0009201114, 0.08681955, 0.08699902, 9.568995e-05, 0 (Max error: 0.0222163) (D-gap: -8.0606e-07)
+bTRC : 16-bit table with 1024 entries
+  ~= : 1.998019, 1.000748, -0.0009201114, 0.08681955, 0.08699902, 9.568995e-05, 0 (Max error: 0.0222163) (D-gap: -8.0606e-07)
+Best : 1.998019, 1.000748, -0.0009201114, 0.08681955, 0.08699902, 9.568995e-05, 0 (D-gap: -8.0606e-07)
+ XYZ : | 0.388397217 0.402297974 0.201400757 |
+       | 0.193893433 0.741104126 0.065093994 |
+       | 0.010299683 0.061203003 1.014602661 |
+ !!! This does not appear to use a D50 whitepoint, rather [0.992096 1.00009 1.08611]
+252 random bytes transformed to linear XYZD50 bytes:
+	406149 a5da17 54711b 20104c 281372 5d4c08 569330
+	693848 221b1c 6d483a 9ea810 536909 384f41 522acd
+	b094db 5f6ec9 879070 4a6022 341682 867b0b 8f4adf
+	6f3d32 13065c d5f086 833bcf 90bf33 2f12b1 587e62
+	535446 42335e 28116d 939676 9dd294 8445a4 48800b
+	8798bb 425822 4e2706 5f9f41 0a0c0c 23119b 333479
+	280fb6 2d3004 5971a1 100e2b 2a410e 4d321d 986ecb
+	b8b27a ac76fe 5b3730 4a7740 5e9254 1d111a 68b918
+	5b8b2d 76690b 281a3e 3a3411 140b52 0a032e 44302e
+	776a9b 5f3c90 406c0a 57278b 34183e 393977 7072c5
+	324c1c 412bbe 170b50 512a07 60a00d 040215 6465e6
+	69b116 482b46 465056 5d3d36 609856 4e3226 636cbc
diff --git a/profiles/misc/MartiMaria_browsertest_HARD.icc.txt b/profiles/misc/MartiMaria_browsertest_HARD.icc.txt
index 41af522..b12fdb6 100644
--- a/profiles/misc/MartiMaria_browsertest_HARD.icc.txt
+++ b/profiles/misc/MartiMaria_browsertest_HARD.icc.txt
@@ -25,6 +25,7 @@
  XYZ : | 0.964202881 0.000000000 0.964202881 |
        | 1.000000000 0.000000000 1.000000000 |
        | 0.824905396 0.000000000 0.824905396 |
+ !!! This does not appear to use a D50 whitepoint, rather [1.92841 2 1.64981]
  A2B : "A", CLUT, "B"
  "A" : 3 inputs
   A0 : 1, 1, 0, 0, 0, 0, 0 (~Identity)
diff --git a/profiles/misc/Phase_One_P25.icc.txt b/profiles/misc/Phase_One_P25.icc.txt
index 546b99a..7a15f78 100644
--- a/profiles/misc/Phase_One_P25.icc.txt
+++ b/profiles/misc/Phase_One_P25.icc.txt
@@ -26,6 +26,7 @@
  XYZ : | 0.647903442 0.357360840 0.156417847 |
        | 0.382919312 1.109725952 0.000000000 |
        | 0.083267212 0.679275513 0.523422241 |
+ !!! This does not appear to use a D50 whitepoint, rather [1.16168 1.49265 1.28596]
  A2B : "A", CLUT, "B"
  "A" : 3 inputs
   A0 : 16-bit table with 256 entries
diff --git a/profiles/misc/SM245B.icc b/profiles/misc/SM245B.icc
new file mode 100644
index 0000000..e1a62ec
--- /dev/null
+++ b/profiles/misc/SM245B.icc
Binary files differ
diff --git a/profiles/misc/SM245B.icc.txt b/profiles/misc/SM245B.icc.txt
new file mode 100644
index 0000000..231dcb5
--- /dev/null
+++ b/profiles/misc/SM245B.icc.txt
@@ -0,0 +1,45 @@
+                Size : 0x00000964 : 2404
+    Data color space : 0x52474220 : 'RGB '
+                 PCS : 0x58595A20 : 'XYZ '
+           Tag count : 0x0000000D : 13
+
+ Tag    : Type   : Size   : Offset
+ ------ : ------ : ------ : --------
+ 'cprt' : 'text' :     56 : 288
+ 'desc' : 'desc' :    128 : 344
+ 'dmnd' : 'desc' :    122 : 472
+ 'dmdd' : 'desc' :     98 : 596
+ 'rXYZ' : 'XYZ ' :     20 : 696
+ 'gXYZ' : 'XYZ ' :     20 : 716
+ 'bXYZ' : 'XYZ ' :     20 : 736
+ 'wtpt' : 'XYZ ' :     20 : 756
+ 'rTRC' : 'curv' :    524 : 776
+ 'gTRC' : 'curv' :    524 : 1300
+ 'bTRC' : 'curv' :    524 : 1824
+ 'calt' : 'dtim' :     20 : 2348
+ 'view' : 'view' :     36 : 2368
+
+rTRC : 16-bit table with 256 entries
+  ~= : 2.200449, 0.9998741, 0.0001117428, 0.00389105, 0.01176471, -1.221265e-05, 0 (Max error: 0.00392157) (D-gap: -6.50107e-09)
+gTRC : 16-bit table with 256 entries
+  ~= : 2.200449, 0.9998741, 0.0001117428, 0.00389105, 0.01176471, -1.221265e-05, 0 (Max error: 0.00392157) (D-gap: -6.50107e-09)
+bTRC : 16-bit table with 256 entries
+  ~= : 2.200449, 0.9998741, 0.0001117428, 0.00389105, 0.01176471, -1.221265e-05, 0 (Max error: 0.00392157) (D-gap: -6.50107e-09)
+Best : 2.200449, 0.9998741, 0.0001117428, 0.00389105, 0.01176471, -1.221265e-05, 0 (D-gap: -6.50107e-09)
+ XYZ : | 0.458724976 0.322952271 0.168487549 |
+       | 0.232894897 0.697387695 0.069717407 |
+       | 0.014114380 0.149780273 0.923767090 |
+ !!! This does not appear to use a D50 whitepoint, rather [0.950165 1 1.08766]
+252 random bytes transformed to linear XYZD50 bytes:
+	2f5645 99d32b 476620 1c0e3e 211160 604a0b 428637
+	723d3c 1d1716 724a31 9da41d 4a5f12 29443c 4b29b7
+	aa91ce 4a63bc 7a876b 3d5523 2f176e 8a7913 9550ca
+	7c4329 0e064b cbed8b 8a43ba 80b53e 27119c 44715f
+	494c3f 3a2d50 23115b 898f71 84c897 8b4b91 387419
+	738eb3 364d23 592d05 4a9248 060809 1b0f87 262b6a
+	210ea0 272a07 456597 0b0a22 1f3711 503217 956dbb
+	b4af77 ab77ed 613927 386b41 498656 1a0f13 53ad2a
+	487f33 796710 231732 362f10 0f0943 070323 412d26
+	6c638e 5b3a7e 316015 592b78 331932 2b3169 5e67b8
+	25421d 3526a9 120941 5c3006 4e941f 03010f 505bd8
+	55a528 482a39 38464d 603d2d 4a8b58 51321f 4f61b0
diff --git a/test_only.c b/test_only.c
index cdbffa0..03c9718 100644
--- a/test_only.c
+++ b/test_only.c
@@ -160,6 +160,17 @@
                toXYZ.vals[0][0], toXYZ.vals[0][1], toXYZ.vals[0][2],
                toXYZ.vals[1][0], toXYZ.vals[1][1], toXYZ.vals[1][2],
                toXYZ.vals[2][0], toXYZ.vals[2][1], toXYZ.vals[2][2]);
+
+
+        float white_x = toXYZ.vals[0][0] + toXYZ.vals[0][1] + toXYZ.vals[0][2],
+              white_y = toXYZ.vals[1][0] + toXYZ.vals[1][1] + toXYZ.vals[1][2],
+              white_z = toXYZ.vals[2][0] + toXYZ.vals[2][1] + toXYZ.vals[2][2];
+        if (fabsf_(white_x - 0.964f) > 0.01f ||
+            fabsf_(white_y - 1.000f) > 0.01f ||
+            fabsf_(white_z - 0.825f) > 0.01f) {
+            fprintf(fp, " !!! This does not appear to use a D50 whitepoint, rather [%g %g %g]\n",
+                    white_x, white_y, white_z);
+        }
     }
 
     if (profile->has_A2B) {
diff --git a/tests.c b/tests.c
index fea003b..8116b89 100644
--- a/tests.c
+++ b/tests.c
@@ -508,6 +508,10 @@
 
     // Table is approximated by a TF whose inverse has g > 16M (timeout in approx_pow)
     "profiles/fuzz/inverse_tf_huge_g.icc",            // chromium:842374
+
+    // Non-D50 profiles.
+    "profiles/misc/SM245B.icc",
+    "profiles/misc/BenQ_GL2450.icc",
 };
 
 static void test_Parse(bool regen) {