diff options
author | skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com> | 2018-04-23 18:57:32 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-23 19:20:10 +0000 |
commit | 3315f7e9c635a3277e8457c77cb9813aae8db5dc (patch) | |
tree | 25169e434275d114cf1a10096a89ce5b3b4d2249 /third_party/skcms/src/Transform_inl.h | |
parent | 9ad12134c90eabd920012772ab63b90ad3636ec0 (diff) |
Roll skia/third_party/skcms fe14a6a..e8bc226 (1 commits)
https://skia.googlesource.com/skcms.git/+log/fe14a6a..e8bc226
2018-04-23 mtklein@chromium.org skcms_OptimizeForSpeed()
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: Ib0c40a1dc5314ee6ca18da6ddac9895977c12bdc
Reviewed-on: https://skia-review.googlesource.com/123072
Reviewed-by: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: skcms-skia-autoroll <skcms-skia-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Diffstat (limited to 'third_party/skcms/src/Transform_inl.h')
-rw-r--r-- | third_party/skcms/src/Transform_inl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/skcms/src/Transform_inl.h b/third_party/skcms/src/Transform_inl.h index aba8b7ea16..bc3cc1489d 100644 --- a/third_party/skcms/src/Transform_inl.h +++ b/third_party/skcms/src/Transform_inl.h @@ -239,6 +239,12 @@ SI ATTR F NS(apply_transfer_function_)(const skcms_TransferFunction* tf, F x) { } #define apply_transfer_function NS(apply_transfer_function_) +SI ATTR F NS(apply_tf13_)(const skcms_TF13* tf, F x) { + F sign = (F)if_then_else(x < 0, -F1, F1); + return x*(x*(x*tf->A + sign*tf->B) + (1 - tf->A - tf->B) ); +} +#define apply_tf13 NS(apply_tf13_) + // Strided loads and stores of N values, starting from p. #if N == 1 #define LOAD_3(T, p) (T)(p)[0] @@ -840,6 +846,10 @@ static void NS(exec_ops)(const Op* ops, const void** args, case Op_tf_b:{ b = apply_transfer_function(*args++, b); } break; case Op_tf_a:{ a = apply_transfer_function(*args++, a); } break; + case Op_tf13_r:{ r = apply_tf13(*args++, r); } break; + case Op_tf13_g:{ g = apply_tf13(*args++, g); } break; + case Op_tf13_b:{ b = apply_tf13(*args++, b); } break; + case Op_table_8_r: { r = NS(table_8_ )(*args++, r); } break; case Op_table_8_g: { g = NS(table_8_ )(*args++, g); } break; case Op_table_8_b: { b = NS(table_8_ )(*args++, b); } break; |