summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/ac_strategy.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /third_party/jpeg-xl/lib/jxl/ac_strategy.cc
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/ac_strategy.cc')
-rw-r--r--third_party/jpeg-xl/lib/jxl/ac_strategy.cc13
1 files changed, 6 insertions, 7 deletions
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 <string.h>
#include <algorithm>
-#include <numeric> // iota
-#include <type_traits>
#include <utility>
#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> 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 {