summaryrefslogtreecommitdiff
path: root/lib/extras/dec/jpg.h
diff options
context:
space:
mode:
authorJiyong <jiyong.min@samsung.com>2023-12-26 10:55:00 +0900
committerJiyong <jiyong.min@samsung.com>2023-12-26 11:08:07 +0900
commit3b773d382e34fcfc7c8995d8bd681a6ef0529b02 (patch)
tree2dd316dd1fb388662a34065d3e15b2298384fbfe /lib/extras/dec/jpg.h
parent7fa2aaed0a5c855460b77fb1fedcc01591ff6470 (diff)
downloadlibjxl-upstream.tar.gz
libjxl-upstream.tar.bz2
libjxl-upstream.zip
Imported Upstream version 0.9.0upstream/0.9.0upstream
Change-Id: I60862786d19d92bb65425923bfeaa8ec236d8722
Diffstat (limited to 'lib/extras/dec/jpg.h')
-rw-r--r--lib/extras/dec/jpg.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/extras/dec/jpg.h b/lib/extras/dec/jpg.h
index 66b3452..6e7b2f7 100644
--- a/lib/extras/dec/jpg.h
+++ b/lib/extras/dec/jpg.h
@@ -13,19 +13,31 @@
#include "lib/extras/codec.h"
#include "lib/extras/dec/color_hints.h"
#include "lib/jxl/base/data_parallel.h"
-#include "lib/jxl/base/padded_bytes.h"
#include "lib/jxl/base/span.h"
#include "lib/jxl/base/status.h"
-#include "lib/jxl/codec_in_out.h"
namespace jxl {
+
+struct SizeConstraints;
+
namespace extras {
+bool CanDecodeJPG();
+
+struct JPGDecompressParams {
+ int num_colors = 0;
+ bool two_pass_quant = false;
+ // 0 = none, 1 = ordered, 2 = Floyd-Steinberg
+ int dither_mode = 0;
+};
+
// Decodes `bytes` into `ppf`. color_hints are ignored.
// `elapsed_deinterleave`, if non-null, will be set to the time (in seconds)
// that it took to deinterleave the raw JSAMPLEs to planar floats.
Status DecodeImageJPG(Span<const uint8_t> bytes, const ColorHints& color_hints,
- const SizeConstraints& constraints, PackedPixelFile* ppf);
+ PackedPixelFile* ppf,
+ const SizeConstraints* constraints = nullptr,
+ const JPGDecompressParams* dparams = nullptr);
} // namespace extras
} // namespace jxl