From 3296bee70d074bb8094b3229dbe12fa016657e90 Mon Sep 17 00:00:00 2001 From: mtklein Date: Thu, 14 Jul 2016 11:02:09 -0700 Subject: Expand _01 half<->float limitation to _finite. Simplify. It's become clear we need to sometimes deal with values <0 or >1. I'm not yet convinced we care about NaN or +-inf. We had some fairly clever tricks and optimizations here for NEON and SSE. I've thrown them out in favor of a single implementation. If we find the specializations mattered, we can certainly figure out how to extend them to this new range/domain. This happens to add a vectorized float -> half for ARMv7, which was missing from the _01 version. (The SSE strategy was not portable to platforms that flush denorm floats to zero.) I've tested the full float range for FloatToHalf on my desktop and a 5x. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2145663003 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2145663003 --- src/core/SkSpanProcs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/SkSpanProcs.cpp') diff --git a/src/core/SkSpanProcs.cpp b/src/core/SkSpanProcs.cpp index dddf7419e2..87dcbc0ee7 100644 --- a/src/core/SkSpanProcs.cpp +++ b/src/core/SkSpanProcs.cpp @@ -42,7 +42,7 @@ static void load_f16(const SkPixmap& src, int x, int y, SkPM4f span[], int count SkASSERT(src.addr64(x + count - 1, y)); for (int i = 0; i < count; ++i) { - SkHalfToFloat_01(addr[i]).store(span[i].fVec); + SkHalfToFloat_finite(addr[i]).store(span[i].fVec); } } -- cgit v1.2.3