Update JPEG XL to latest version.

Also update repositories.
This commit is contained in:
Luca Versari
2021-07-21 18:25:41 +02:00
parent 2427763a14
commit a040c47047
10 changed files with 8 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
CODEC_URL = https://gitlab.com/wg1/jpeg-xl.git CODEC_URL = https://github.com/libjxl/libjxl.git
CODEC_VERSION = ab7c5e9b6795134377aa4846ceaae2c5bc504f76 CODEC_VERSION = 3f76321a7cbcf4f452894dc173eb7be60f508ecb
CODEC_DIR = node_modules/jxl CODEC_DIR = node_modules/jxl
CODEC_BUILD_ROOT := $(CODEC_DIR)/build CODEC_BUILD_ROOT := $(CODEC_DIR)/build
CODEC_MT_BUILD_DIR := $(CODEC_BUILD_ROOT)/mt CODEC_MT_BUILD_DIR := $(CODEC_BUILD_ROOT)/mt

Binary file not shown.

Binary file not shown.

View File

@@ -35,13 +35,15 @@ val encode(std::string image, int width, int height, JXLOptions options) {
cparams.epf = options.epf; cparams.epf = options.epf;
cparams.speed_tier = static_cast<jxl::SpeedTier>(options.speed); cparams.speed_tier = static_cast<jxl::SpeedTier>(options.speed);
cparams.near_lossless = options.nearLossless;
cparams.decoding_speed_tier = options.decodingSpeedTier; cparams.decoding_speed_tier = options.decodingSpeedTier;
if (options.lossyPalette) { if (options.lossyPalette || options.nearLossless) {
cparams.lossy_palette = true; cparams.lossy_palette = true;
cparams.palette_colors = 0; cparams.palette_colors = 0;
cparams.options.predictor = jxl::Predictor::Zero; cparams.options.predictor = jxl::Predictor::Zero;
// Near-lossless assumes -R 0
cparams.responsive = 0;
cparams.modular_mode = true;
} }
float quality = options.quality; float quality = options.quality;
@@ -77,12 +79,6 @@ val encode(std::string image, int width, int height, JXLOptions options) {
} }
} }
if (cparams.near_lossless) {
// Near-lossless assumes -R 0
cparams.responsive = 0;
cparams.modular_mode = true;
}
io.metadata.m.SetAlphaBits(8); io.metadata.m.SetAlphaBits(8);
if (!io.metadata.size.Set(width, height)) { if (!io.metadata.size.Set(width, height)) {
return val::null(); return val::null();

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.