aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/skcms/src/GaussNewton.c
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-05-16 13:12:08 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-16 16:00:52 +0000
commitd6b41a27678f0c153eff982be4f1120e6cb65692 (patch)
tree3e259d0adda4451a85ed0e4fd3cef66d33ea031b /third_party/skcms/src/GaussNewton.c
parenteeeb32847ef797adde7a3e000beea1c137e5aaac (diff)
Roll skia/third_party/skcms ce2fabc..e040063 (1 commits)
https://skia.googlesource.com/skcms.git/+log/ce2fabc..e040063 2018-05-16 mtklein@chromium.org spin off Curve.[ch] 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. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel TBR=herb@google.com Change-Id: Ie9571b17589849e55d2db079f38c40ba5a8fede4 Reviewed-on: https://skia-review.googlesource.com/128465 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/skcms/src/GaussNewton.c')
-rw-r--r--third_party/skcms/src/GaussNewton.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/third_party/skcms/src/GaussNewton.c b/third_party/skcms/src/GaussNewton.c
index 11f55b53b4..7e9f774538 100644
--- a/third_party/skcms/src/GaussNewton.c
+++ b/third_party/skcms/src/GaussNewton.c
@@ -93,23 +93,3 @@ bool skcms_gauss_newton_step(float (*rg)(float x, const void*, const float P[3],
P[2] += dP.vals[2];
return isfinitef_(P[0]) && isfinitef_(P[1]) && isfinitef_(P[2]);
}
-
-float skcms_eval_curve(float x, const skcms_Curve* curve) {
- if (curve->table_entries == 0) {
- return skcms_TransferFunction_eval(&curve->parametric, x);
- }
-
- // TODO: today we should always hit an entry exactly, but if that changes, lerp?
- // (We add half to account for slight int -> float -> int round tripping issues.)
- int ix = (int)( x*(curve->table_entries - 1) + 0.5f );
-
- if (curve->table_8) {
- return curve->table_8[ix] * (1/255.0f);
- } else {
- uint16_t be;
- memcpy(&be, curve->table_16 + 2*ix, 2);
-
- uint16_t le = ((be << 8) | (be >> 8)) & 0xffff;
- return le * (1/65535.0f);
- }
-}