Commit Graph

11 Commits

Author SHA1 Message Date
John Stiles
1972b46ca8 Rewrite #includes to satisfy presubmit.
For reasons I don't understand, rewrite-includes suddenly started
detecting these experimental files as needing their includes rewritten.

Change-Id: Ie62e8861169dfb988840e74976248992633874e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/455160
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-10-01 18:31:26 +00:00
Herb Derby
d9c17b4051 trunc bilerp 3.8% error rate
Change-Id: I79d240c84263af3d90347d366320799f93dc8b23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449179
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-27 20:31:20 +00:00
Herb Derby
85dde4e315 add benchmarks for bilerp study
Change-Id: I6e69a902cc660154b56a82cae727751ec6f5e806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448273
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-13 21:14:18 +00:00
Herb Derby
ec7b63a745 add baseline integer lerp
Add a lerp that uses full 32-bit resolution for the multiply.
This gives the same answers as the floating point, and
demonstrates the error introduced by using the faster
16-bit multiply.

Change-Id: I90c46b350fae09f74d9c9cf2af7ef3d3d1d0f202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448102
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-13 14:49:09 +00:00
Herb Derby
2505b2ca46 use higher res to check [-1, 1)
Because the [-1, 1) lerp can handle a higher sampling rate in t,
decrease the t step to ensure everything is covered. The
limit needs to be trimmed by a 1/65536 to allow the older lerps
to run properly.

Remove the scaled test cases. They no longer make sense.
Change-Id: Ida841d65ebe794ba5d0ae67dfb145268764ec6a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448101
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-09-13 14:13:25 +00:00
Herb Derby
fe678d9b1c change of parameter from [0, 1) to [-1, 1) for better lerp
Using the extra bit improves the difference rate from .38% to .19%.
I think this uses the full resolution of all the values, and there
is no more accuracy by trying to get more bits in use. The maximum
difference is still 1.

This gives the same answer with the neon_vqrdmulhq_s16 and
ssse3_mm_mulhrs_epi16 instructions.

Change-Id: Ie801b68aead408c5e1845aaf94ea660121e414b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447719
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-13 13:32:03 +00:00
Herb Derby
2b868d6b9a math and error rates for lerp
Study that compares scaled integer lerp to float lerp. This
shows an error rate of 0.38% with a max difference of 1.

Study to compare scaled values the would result as the
intermediate values of a bilerp. This shows an error rate
of 24% with a max difference of 1.

Change-Id: Id27b6baa9ce56efedb30f490a3f84ccf808315fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447183
Reviewed-by: Brian Osman <brianosman@google.com>
2021-09-10 18:51:51 +00:00
Herb Derby
10d153ee21 improve quality of life
Change-Id: I75e93820bd1df57d076560f1b2991f1756ca5389
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446996
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-09-09 17:23:57 +00:00
Herb Derby
0f2d2f0efd implement ARM saturating multiply using ssse3
Change-Id: I530373e9b53e76a7cd1c0b3a5a1b05354975790c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446186
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-09-08 00:32:55 +00:00
Herb Derby
535f43d734 add simulation for arm rounding saturating multiply
Change-Id: I31dd90b2f09876d37c2c202d620cef4028af6266
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446183
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-09-07 21:15:04 +00:00
Herb Derby
887230a36a basic experiments for understanding lowp
Change-Id: I5f0c36b44cd5bfd3f978d892a342a1d008baceb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/446176
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-09-07 20:08:50 +00:00