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/convolve-inl.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/convolve-inl.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/convolve-inl.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/convolve-inl.h b/third_party/jpeg-xl/lib/jxl/convolve-inl.h index cd79153a3a..949fd8ad67 100644 --- a/third_party/jpeg-xl/lib/jxl/convolve-inl.h +++ b/third_party/jpeg-xl/lib/jxl/convolve-inl.h @@ -118,7 +118,7 @@ class Neighbors { // Returns indices for SetTableIndices such that TableLookupLanes on the // rightmost unaligned vector (rightmost sample in its most-significant lane) // returns the mirrored values, with the mirror outside the last valid sample. -static inline const int32_t* MirrorLanes(const size_t mod) { +inline const int32_t* MirrorLanes(const size_t mod) { const HWY_CAPPED(float, 16) d; constexpr size_t kN = MaxLanes(d); @@ -181,7 +181,7 @@ class ConvolveT { JXL_CHECK(SameSize(rect, *out)); JXL_CHECK(rect.xsize() >= MinWidth()); - static_assert(int64_t(kRadius) <= 3, + static_assert(static_cast<int64_t>(kRadius) <= 3, "Must handle [0, kRadius) and >= kRadius"); switch (rect.xsize() % Lanes(Simd())) { case 0: @@ -273,15 +273,17 @@ class ConvolveT { const Weights& weights, ThreadPool* pool, Image* out) { const int64_t ysize = rect.ysize(); - RunBorderRows<kSizeModN>(in, rect, 0, std::min(int64_t(kRadius), ysize), + RunBorderRows<kSizeModN>(in, rect, 0, + std::min(static_cast<int64_t>(kRadius), ysize), weights, out); - if (ysize > 2 * int64_t(kRadius)) { - RunInteriorRows<kSizeModN>(in, rect, int64_t(kRadius), - ysize - int64_t(kRadius), weights, pool, out); + if (ysize > 2 * static_cast<int64_t>(kRadius)) { + RunInteriorRows<kSizeModN>(in, rect, static_cast<int64_t>(kRadius), + ysize - static_cast<int64_t>(kRadius), weights, + pool, out); } - if (ysize > int64_t(kRadius)) { - RunBorderRows<kSizeModN>(in, rect, ysize - int64_t(kRadius), ysize, - weights, out); + if (ysize > static_cast<int64_t>(kRadius)) { + RunBorderRows<kSizeModN>(in, rect, ysize - static_cast<int64_t>(kRadius), + ysize, weights, out); } } }; |