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/enc_ac_strategy.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/enc_ac_strategy.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/enc_ac_strategy.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/enc_ac_strategy.h b/third_party/jpeg-xl/lib/jxl/enc_ac_strategy.h index 9f6d92a6f7..31eb73c6a0 100644 --- a/third_party/jpeg-xl/lib/jxl/enc_ac_strategy.h +++ b/third_party/jpeg-xl/lib/jxl/enc_ac_strategy.h @@ -58,16 +58,22 @@ struct ACSConfig { }; struct AcStrategyHeuristics { - AcStrategyHeuristics(const CompressParams& cparams) : cparams(cparams) {} + explicit AcStrategyHeuristics(const CompressParams& cparams) + : cparams(cparams), mem_per_thread(0), qmem_per_thread(0) {} void Init(const Image3F& src, const Rect& rect_in, const ImageF& quant_field, const ImageF& mask, const ImageF& mask1x1, DequantMatrices* matrices); + void PrepareForThreads(std::size_t num_threads); void ProcessRect(const Rect& rect, const ColorCorrelationMap& cmap, - AcStrategyImage* ac_strategy); - void Finalize(const FrameDimensions& frame_dim, - const AcStrategyImage& ac_strategy, AuxOut* aux_out); + AcStrategyImage* ac_strategy, size_t thread); + Status Finalize(const FrameDimensions& frame_dim, + const AcStrategyImage& ac_strategy, AuxOut* aux_out); const CompressParams& cparams; - ACSConfig config; + ACSConfig config = {}; + size_t mem_per_thread; + hwy::AlignedFreeUniquePtr<float[]> mem; + size_t qmem_per_thread; + hwy::AlignedFreeUniquePtr<uint32_t[]> qmem; }; } // namespace jxl |