| 1 |
// Copyright (c) the JPEG XL Project Authors. All rights reserved. |
| 2 |
// |
| 3 |
// Use of this source code is governed by a BSD-style |
| 4 |
// license that can be found in the LICENSE file. |
| 5 |
|
| 6 |
#ifndef LIB_JXL_RENDER_PIPELINE_STAGE_NOISE_H_ |
| 7 |
#define LIB_JXL_RENDER_PIPELINE_STAGE_NOISE_H_ |
| 8 |
|
| 9 |
#include <cstddef> |
| 10 |
#include <memory> |
| 11 |
|
| 12 |
#include "lib/jxl/chroma_from_luma.h" |
| 13 |
#include "lib/jxl/noise.h" |
| 14 |
#include "lib/jxl/render_pipeline/render_pipeline_stage.h" |
| 15 |
|
| 16 |
namespace jxl { |
| 17 |
|
| 18 |
// Adds noise to color channels. |
| 19 |
std::unique_ptr<RenderPipelineStage> GetAddNoiseStage( |
| 20 |
const NoiseParams& noise_params, const ColorCorrelation& color_correlation, |
| 21 |
size_t noise_c_start); |
| 22 |
|
| 23 |
// Applies a 5x5 subtract-box-filter convolution to the noise input channels. |
| 24 |
std::unique_ptr<RenderPipelineStage> GetConvolveNoiseStage( |
| 25 |
size_t noise_c_start); |
| 26 |
|
| 27 |
} // namespace jxl |
| 28 |
|
| 29 |
#endif // LIB_JXL_RENDER_PIPELINE_STAGE_NOISE_H_ |