From d6b41a27678f0c153eff982be4f1120e6cb65692 Mon Sep 17 00:00:00 2001 From: "skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com" Date: Wed, 16 May 2018 13:12:08 +0000 Subject: 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 Reviewed-by: skcms-skia-autoroll --- third_party/skcms/src/GaussNewton.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'third_party/skcms/src/GaussNewton.c') 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); - } -} -- cgit v1.2.3