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/ac_strategy.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'third_party/jpeg-xl/lib/jxl/ac_strategy.cc') diff --git a/third_party/jpeg-xl/lib/jxl/ac_strategy.cc b/third_party/jpeg-xl/lib/jxl/ac_strategy.cc index 3de477f71c..e7a72f5a33 100644 --- a/third_party/jpeg-xl/lib/jxl/ac_strategy.cc +++ b/third_party/jpeg-xl/lib/jxl/ac_strategy.cc @@ -8,12 +8,9 @@ #include #include -#include // iota -#include #include #include "lib/jxl/base/bits.h" -#include "lib/jxl/image_ops.h" namespace jxl { @@ -86,10 +83,12 @@ constexpr size_t AcStrategy::kMaxCoeffBlocks; constexpr size_t AcStrategy::kMaxBlockDim; constexpr size_t AcStrategy::kMaxCoeffArea; -AcStrategyImage::AcStrategyImage(size_t xsize, size_t ysize) - : layers_(xsize, ysize) { - row_ = layers_.Row(0); - stride_ = layers_.PixelsPerRow(); +StatusOr AcStrategyImage::Create(size_t xsize, size_t ysize) { + AcStrategyImage img; + JXL_ASSIGN_OR_RETURN(img.layers_, ImageB::Create(xsize, ysize)); + img.row_ = img.layers_.Row(0); + img.stride_ = img.layers_.PixelsPerRow(); + return img; } size_t AcStrategyImage::CountBlocks(AcStrategy::Type type) const { -- cgit v1.2.3