diff options
author | Mike Klein <mtklein@chromium.org> | 2016-10-31 10:08:55 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-31 14:30:44 +0000 |
commit | cd5e7d75e96922d041cca9f10486e4f02974a545 (patch) | |
tree | 472e5b31782462a00d0c34dd6c0c74e4633a493f /src | |
parent | 8f5468f0221a987f7bc6565d2cae255372863a2d (diff) |
update SkFixed15 float conversion notes.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4181
Change-Id: Iec7ec71340a2b17db067b5e7fc0c34f3a2d313b2
Reviewed-on: https://skia-review.googlesource.com/4181
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkFixed15.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkFixed15.h b/src/core/SkFixed15.h index 69502434bf..43a9fae773 100644 --- a/src/core/SkFixed15.h +++ b/src/core/SkFixed15.h @@ -63,7 +63,9 @@ private: // vandq_s16(x,y), 15); // - Conversion to and from float can be done manually with bit masks and float add/subtract, // rather than the naive version here involving int<->float conversion and float multiply. -// - On ARM, we can alternatively use the vcvtq_n_f32_u32(vmovl_u16(x), 15) to convert 4 at a -// time to float, and vcvtq_n_u32_f32(..., 15) for the other way around. +// - On x86, conversion to float is _mm_sub_ps(_mm_unpacklo_epi16(x, _mm_set1_epi16(0x4380)), +// _mm_set1_ps(256.0f)). // 0x43800000 +// - On ARM, we can use the vcvtq_n_f32_u32(vmovl_u16(x), 15) to convert to float, +// and vcvtq_n_u32_f32(..., 15) for the other way around. #endif//SkFixed15_DEFINED |