aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>2018-04-24 20:34:32 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-24 21:04:37 +0000
commit058f2e6ed2921399879d987e3276f96e8c0cd70b (patch)
treeb82103c49270f68c35fc559ffc5076a1a173ed36 /third_party
parentff134f20aeeac3394d2e92d08a6eb495f87d2f1a (diff)
Roll skia/third_party/skcms cca4d5d..e19e9b9 (1 commits)
https://skia.googlesource.com/skcms.git/+log/cca4d5d..e19e9b9 2018-04-24 brianosman@google.com Remove skcms_BestSingleCurve The AutoRoll server is located here: https://skcms-skia-roll.skia.org Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary. TBR=stani@google.com Change-Id: I28c0be7b318c8475dd34b0d7f26b012c16dafe44 Reviewed-on: https://skia-review.googlesource.com/123530 Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com> Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Diffstat (limited to 'third_party')
-rw-r--r--third_party/skcms/skcms.h4
-rw-r--r--third_party/skcms/src/TransferFunction.c44
-rwxr-xr-xthird_party/skcms/version.sha12
3 files changed, 1 insertions, 49 deletions
diff --git a/third_party/skcms/skcms.h b/third_party/skcms/skcms.h
index 32c30cbe7d..af0801afa4 100644
--- a/third_party/skcms/skcms.h
+++ b/third_party/skcms/skcms.h
@@ -130,10 +130,6 @@ void skcms_OptimizeForSpeed(skcms_ICCProfile*);
bool skcms_ApproximateCurve(const skcms_Curve* curve, skcms_TransferFunction* approx,
float* max_error);
-// What is the best single transfer function to use for the given profile? Note that there is
-// no real upper bound on the error of this transfer function.
-skcms_TransferFunction skcms_BestSingleCurve(const skcms_ICCProfile*);
-
typedef struct skcms_ICCTag {
uint32_t signature;
uint32_t type;
diff --git a/third_party/skcms/src/TransferFunction.c b/third_party/skcms/src/TransferFunction.c
index 345b9aa3cb..c87e0695bd 100644
--- a/third_party/skcms/src/TransferFunction.c
+++ b/third_party/skcms/src/TransferFunction.c
@@ -321,47 +321,3 @@ bool skcms_ApproximateCurve(const skcms_Curve* curve,
}
return isfinitef_(*max_error);
}
-
-static float max_error_over_curve(const skcms_TransferFunction* tf, const skcms_Curve* curve) {
- int N = curve->table_entries ? (int)curve->table_entries : 256;
- const float x_scale = 1.0f / (N - 1);
- float err = 0;
- for (int i = 0; i < N; i++) {
- float x = i * x_scale;
- err = fmaxf_(err, fabsf_(skcms_eval_curve(x, curve) - skcms_TransferFunction_eval(tf, x)));
- }
- return err;
-}
-
-skcms_TransferFunction skcms_BestSingleCurve(const skcms_ICCProfile* profile) {
- if (!profile || !profile->has_trc) {
- return skcms_sRGB_profile.trc[0].parametric;
- }
-
- skcms_TransferFunction tf[3];
- for (int i = 0; i < 3; ++i) {
- if (profile->trc[i].table_entries) {
- float max_error;
- if (!skcms_ApproximateCurve(&profile->trc[i], &tf[i], &max_error)) {
- return skcms_sRGB_profile.trc[0].parametric;
- }
- } else {
- tf[i] = profile->trc[i].parametric;
- }
- }
-
- int best_tf = 0;
- float min_max_error = INFINITY_;
- for (int i = 0; i < 3; ++i) {
- float err = 0;
- for (int j = 0; j < 3; ++j) {
- err = fmaxf_(err, max_error_over_curve(&tf[i], &profile->trc[j]));
- }
- if (min_max_error > err) {
- min_max_error = err;
- best_tf = i;
- }
- }
-
- return tf[best_tf];
-}
diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1
index 399e159cda..b78dbac96f 100755
--- a/third_party/skcms/version.sha1
+++ b/third_party/skcms/version.sha1
@@ -1 +1 @@
-cca4d5d9654b31900fc2a612007a9069f83f6de2 \ No newline at end of file
+e19e9b9418405e14169a6e4e500150432fcc57c4 \ No newline at end of file