summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc')
-rw-r--r--third_party/jpeg-xl/lib/jxl/render_pipeline/stage_spot.cc9
1 files changed, 5 insertions, 4 deletions
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<ssize_t>(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 {