diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jxl/enc_params.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/enc_params.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/enc_params.h | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/enc_params.h b/third_party/jpeg-xl/lib/jxl/enc_params.h index 89fd2c924f..162c59d04c 100644 --- a/third_party/jpeg-xl/lib/jxl/enc_params.h +++ b/third_party/jpeg-xl/lib/jxl/enc_params.h @@ -15,6 +15,7 @@ #include <vector> #include "lib/jxl/base/override.h" +#include "lib/jxl/common.h" #include "lib/jxl/enc_progressive_split.h" #include "lib/jxl/frame_dimensions.h" #include "lib/jxl/frame_header.h" @@ -24,36 +25,6 @@ namespace jxl { -enum class SpeedTier { - // Try multiple combinations of Tortoise flags for modular mode. Otherwise - // like kTortoise. - kGlacier = 0, - // Turns on FindBestQuantizationHQ loop. Equivalent to "guetzli" mode. - kTortoise = 1, - // Turns on FindBestQuantization butteraugli loop. - kKitten = 2, - // Turns on dots, patches, and spline detection by default, as well as full - // context clustering. Default. - kSquirrel = 3, - // Turns on error diffusion and full AC strategy heuristics. Equivalent to - // "fast" mode. - kWombat = 4, - // Turns on gaborish by default, non-default cmap, initial quant field. - kHare = 5, - // Turns on simple heuristics for AC strategy, quant field, and clustering; - // also enables coefficient reordering. - kCheetah = 6, - // Turns off most encoder features. Does context clustering. - // Modular: uses fixed tree with Weighted predictor. - kFalcon = 7, - // Currently fastest possible setting for VarDCT. - // Modular: uses fixed tree with Gradient predictor. - kThunder = 8, - // VarDCT: same as kThunder. - // Modular: no tree, Gradient predictor, fast histograms - kLightning = 9 -}; - // NOLINTNEXTLINE(clang-analyzer-optin.performance.Padding) struct CompressParams { float butteraugli_distance = 1.0f; @@ -106,7 +77,7 @@ struct CompressParams { int progressive_dc = -1; // If on: preserve color of invisible pixels (if off: don't care) - // Default: on for lossless, off for lossy + // Default: on Override keep_invisible = Override::kDefault; JxlCmsInterface cms; @@ -137,6 +108,7 @@ struct CompressParams { ModularOptions options; int responsive = -1; int colorspace = -1; + int move_to_front_from_channel = -1; // Use Global channel palette if #colors < this percentage of range float channel_colors_pre_transform_percent = 95.f; // Use Local channel palette if #colors < this percentage of range @@ -159,9 +131,6 @@ struct CompressParams { if (f > 0) return false; if (f < 0 && butteraugli_distance != 0) return false; } - // if no explicit ec_distance given, and using vardct, then the modular part - // is empty or not lossless - if (!modular_mode && ec_distance.empty()) return false; // all modular channels are encoded at distance 0 return true; } @@ -194,7 +163,7 @@ struct CompressParams { int level = -1; // See JXL_ENC_FRAME_SETTING_BUFFERING option value. - int buffering = 0; + int buffering = -1; // See JXL_ENC_FRAME_SETTING_USE_FULL_IMAGE_HEURISTICS option value. bool use_full_image_heuristics = true; |