summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/modular
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/jpeg-xl/lib/jxl/modular
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/modular')
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h10
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/encoding/enc_debug_tree.cc3
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/options.h4
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/transform/enc_palette.cc1
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/transform/palette.cc4
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/transform/palette.h8
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/transform/squeeze.h4
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/transform/transform.cc2
-rw-r--r--third_party/jpeg-xl/lib/jxl/modular/transform/transform.h6
9 files changed, 32 insertions, 10 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h b/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h
index df54a9425e..0a71bec24f 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h
+++ b/third_party/jpeg-xl/lib/jxl/modular/encoding/context_predict.h
@@ -6,9 +6,17 @@
#ifndef LIB_JXL_MODULAR_ENCODING_CONTEXT_PREDICT_H_
#define LIB_JXL_MODULAR_ENCODING_CONTEXT_PREDICT_H_
-#include <utility>
+#include <algorithm>
+#include <array>
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
#include <vector>
+#include "lib/jxl/base/bits.h"
+#include "lib/jxl/base/compiler_specific.h"
+#include "lib/jxl/base/status.h"
+#include "lib/jxl/field_encodings.h"
#include "lib/jxl/fields.h"
#include "lib/jxl/image_ops.h"
#include "lib/jxl/modular/modular_image.h"
diff --git a/third_party/jpeg-xl/lib/jxl/modular/encoding/enc_debug_tree.cc b/third_party/jpeg-xl/lib/jxl/modular/encoding/enc_debug_tree.cc
index f863823629..04f8812750 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/encoding/enc_debug_tree.cc
+++ b/third_party/jpeg-xl/lib/jxl/modular/encoding/enc_debug_tree.cc
@@ -5,8 +5,7 @@
#include "lib/jxl/modular/encoding/enc_debug_tree.h"
-#include <cinttypes>
-#include <cstdint>
+#include <cinttypes> // PRId64
#include <cstdlib>
#include "lib/jxl/base/os_macros.h"
diff --git a/third_party/jpeg-xl/lib/jxl/modular/options.h b/third_party/jpeg-xl/lib/jxl/modular/options.h
index 6613b513de..5b08236ff2 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/options.h
+++ b/third_party/jpeg-xl/lib/jxl/modular/options.h
@@ -6,9 +6,9 @@
#ifndef LIB_JXL_MODULAR_OPTIONS_H_
#define LIB_JXL_MODULAR_OPTIONS_H_
-#include <stdint.h>
-
#include <array>
+#include <cstddef>
+#include <cstdint>
#include <vector>
#include "lib/jxl/enc_ans_params.h"
diff --git a/third_party/jpeg-xl/lib/jxl/modular/transform/enc_palette.cc b/third_party/jpeg-xl/lib/jxl/modular/transform/enc_palette.cc
index 7f9399d3c4..86d161e891 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/transform/enc_palette.cc
+++ b/third_party/jpeg-xl/lib/jxl/modular/transform/enc_palette.cc
@@ -170,6 +170,7 @@ Status FwdPaletteIteration(Image &input, uint32_t begin_c, uint32_t end_c,
size_t w = input.channel[begin_c].w;
size_t h = input.channel[begin_c].h;
+ if (input.bitdepth >= 32) return false;
if (!lossy && nb_colors < 2) return false;
if (!lossy && nb == 1) {
diff --git a/third_party/jpeg-xl/lib/jxl/modular/transform/palette.cc b/third_party/jpeg-xl/lib/jxl/modular/transform/palette.cc
index 1ab499ccf6..7726fd8ff3 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/transform/palette.cc
+++ b/third_party/jpeg-xl/lib/jxl/modular/transform/palette.cc
@@ -5,6 +5,10 @@
#include "lib/jxl/modular/transform/palette.h"
+#include <atomic>
+
+#include "lib/jxl/modular/transform/transform.h" // CheckEqualChannels
+
namespace jxl {
Status InvPalette(Image &input, uint32_t begin_c, uint32_t nb_colors,
diff --git a/third_party/jpeg-xl/lib/jxl/modular/transform/palette.h b/third_party/jpeg-xl/lib/jxl/modular/transform/palette.h
index 2a9e5c71f4..ee51d4c556 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/transform/palette.h
+++ b/third_party/jpeg-xl/lib/jxl/modular/transform/palette.h
@@ -6,13 +6,17 @@
#ifndef LIB_JXL_MODULAR_TRANSFORM_PALETTE_H_
#define LIB_JXL_MODULAR_TRANSFORM_PALETTE_H_
-#include <atomic>
+#include <algorithm>
+#include <array>
+#include <cstddef>
+#include <cstdint>
+#include "lib/jxl/base/compiler_specific.h"
#include "lib/jxl/base/data_parallel.h"
#include "lib/jxl/base/status.h"
#include "lib/jxl/modular/encoding/context_predict.h"
#include "lib/jxl/modular/modular_image.h"
-#include "lib/jxl/modular/transform/transform.h" // CheckEqualChannels
+#include "lib/jxl/modular/options.h"
namespace jxl {
diff --git a/third_party/jpeg-xl/lib/jxl/modular/transform/squeeze.h b/third_party/jpeg-xl/lib/jxl/modular/transform/squeeze.h
index f0333da6fd..f56d6dd7e9 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/transform/squeeze.h
+++ b/third_party/jpeg-xl/lib/jxl/modular/transform/squeeze.h
@@ -23,9 +23,11 @@
// wavelet transform", IEEE Transactions on Image Processing, vol. 1, no. 2, pp.
// 205-220, April 1992, doi: 10.1109/83.136597.
-#include <stdlib.h>
+#include <cstdlib>
+#include <vector>
#include "lib/jxl/base/data_parallel.h"
+#include "lib/jxl/base/status.h"
#include "lib/jxl/modular/modular_image.h"
#include "lib/jxl/modular/transform/transform.h"
diff --git a/third_party/jpeg-xl/lib/jxl/modular/transform/transform.cc b/third_party/jpeg-xl/lib/jxl/modular/transform/transform.cc
index a609cfb3fb..05a18215d1 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/transform/transform.cc
+++ b/third_party/jpeg-xl/lib/jxl/modular/transform/transform.cc
@@ -5,7 +5,7 @@
#include "lib/jxl/modular/transform/transform.h"
-#include <cinttypes>
+#include <cinttypes> // PRIu32
#include "lib/jxl/base/printf_macros.h"
#include "lib/jxl/fields.h"
diff --git a/third_party/jpeg-xl/lib/jxl/modular/transform/transform.h b/third_party/jpeg-xl/lib/jxl/modular/transform/transform.h
index 70c383834a..cb46d0888f 100644
--- a/third_party/jpeg-xl/lib/jxl/modular/transform/transform.h
+++ b/third_party/jpeg-xl/lib/jxl/modular/transform/transform.h
@@ -6,13 +6,17 @@
#ifndef LIB_JXL_MODULAR_TRANSFORM_TRANSFORM_H_
#define LIB_JXL_MODULAR_TRANSFORM_TRANSFORM_H_
+#include <cstddef>
#include <cstdint>
-#include <string>
#include <vector>
+#include "lib/jxl/base/compiler_specific.h"
#include "lib/jxl/base/data_parallel.h"
+#include "lib/jxl/base/status.h"
+#include "lib/jxl/field_encodings.h"
#include "lib/jxl/fields.h"
#include "lib/jxl/modular/encoding/context_predict.h"
+#include "lib/jxl/modular/modular_image.h"
#include "lib/jxl/modular/options.h"
namespace jxl {