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/chroma_from_luma.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/chroma_from_luma.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/chroma_from_luma.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/chroma_from_luma.h b/third_party/jpeg-xl/lib/jxl/chroma_from_luma.h index cb3b710762..1f2353d9af 100644 --- a/third_party/jpeg-xl/lib/jxl/chroma_from_luma.h +++ b/third_party/jpeg-xl/lib/jxl/chroma_from_luma.h @@ -12,19 +12,15 @@ #include <stddef.h> #include <stdint.h> -#include <vector> +#include <limits> -#include "lib/jxl/base/compiler_specific.h" -#include "lib/jxl/base/data_parallel.h" #include "lib/jxl/base/status.h" #include "lib/jxl/cms/opsin_params.h" #include "lib/jxl/dec_bit_reader.h" -#include "lib/jxl/entropy_coder.h" #include "lib/jxl/field_encodings.h" #include "lib/jxl/fields.h" #include "lib/jxl/frame_dimensions.h" #include "lib/jxl/image.h" -#include "lib/jxl/quant_weights.h" namespace jxl { @@ -55,7 +51,8 @@ struct ColorCorrelationMap { // xsize/ysize are in pixels // set XYB=false to do something close to no-op cmap (needed for now since // cmap is mandatory) - ColorCorrelationMap(size_t xsize, size_t ysize, bool XYB = true); + static StatusOr<ColorCorrelationMap> Create(size_t xsize, size_t ysize, + bool XYB = true); float YtoXRatio(int32_t x_factor) const { return base_correlation_x_ + x_factor * color_scale_; @@ -96,7 +93,7 @@ struct ColorCorrelationMap { color_factor_ == kDefaultColorFactor; } - int32_t RatioJPEG(int32_t factor) const { + static int32_t RatioJPEG(int32_t factor) { return factor * (1 << kCFLFixedPointPrecision) / kDefaultColorFactor; } |