diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jxl/base/float.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/base/float.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/base/float.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/base/float.h b/third_party/jpeg-xl/lib/jxl/base/float.h index 00e112bb34..0f5b3b1f3a 100644 --- a/third_party/jpeg-xl/lib/jxl/base/float.h +++ b/third_party/jpeg-xl/lib/jxl/base/float.h @@ -17,9 +17,9 @@ namespace jxl { -namespace { +namespace detail { // Based on highway scalar implementation, for testing -float LoadFloat16(uint16_t bits16) { +static JXL_INLINE float LoadFloat16(uint16_t bits16) { const uint32_t sign = bits16 >> 15; const uint32_t biased_exp = (bits16 >> 10) & 0x1F; const uint32_t mantissa = bits16 & 0x3FF; @@ -40,7 +40,7 @@ float LoadFloat16(uint16_t bits16) { memcpy(&result, &bits32, 4); return result; } -} // namespace +} // namespace detail template <typename SaveFloatAtFn> static Status JXL_INLINE LoadFloatRow(const uint8_t* src, size_t count, @@ -83,11 +83,11 @@ static Status JXL_INLINE LoadFloatRow(const uint8_t* src, size_t count, case JXL_TYPE_FLOAT16: if (little_endian) { for (size_t i = 0; i < count; ++i) { - callback(i, LoadFloat16(LoadLE16(src + stride * i))); + callback(i, detail::LoadFloat16(LoadLE16(src + stride * i))); } } else { for (size_t i = 0; i < count; ++i) { - callback(i, LoadFloat16(LoadBE16(src + stride * i))); + callback(i, detail::LoadFloat16(LoadBE16(src + stride * i))); } } return true; |