From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc') diff --git a/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc b/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc index a43cb4e1ab..18588e2012 100644 --- a/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc +++ b/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc @@ -15,19 +15,20 @@ class SpotColorStage : public RenderPipelineStage { JXL_ASSERT(spot_c_ >= 3); } - void ProcessRow(const RowInfo& input_rows, const RowInfo& output_rows, - size_t xextra, size_t xsize, size_t xpos, size_t ypos, - size_t thread_id) const final { + Status ProcessRow(const RowInfo& input_rows, const RowInfo& output_rows, + size_t xextra, size_t xsize, size_t xpos, size_t ypos, + size_t thread_id) const final { // TODO(veluca): add SIMD. float scale = spot_color_[3]; for (size_t c = 0; c < 3; c++) { float* JXL_RESTRICT p = GetInputRow(input_rows, c, 0); const float* JXL_RESTRICT s = GetInputRow(input_rows, spot_c_, 0); - for (ssize_t x = -xextra; x < ssize_t(xsize + xextra); x++) { + for (ssize_t x = -xextra; x < static_cast(xsize + xextra); x++) { float mix = scale * s[x]; p[x] = mix * spot_color_[c] + (1.0f - mix) * p[x]; } } + return true; } RenderPipelineChannelMode GetChannelMode(size_t c) const final { -- cgit v1.2.3