Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-picking #71

Merged
merged 33 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
68ec57e
Absolutize "using" declarations (#3701)
eustas Jul 5, 2024
bc1f35c
Use tracking memory manager in fuzzers, remove ancient memory_limit h…
eustas Jul 5, 2024
9eed38f
Make -Werror optional (#3687)
novomesk Jul 6, 2024
bee1e9b
don't do a funky conversion from uint8 to float (#3626)
jonsneyers Jul 8, 2024
9d61a8f
mention new jpegli repo (#3707)
mo271 Jul 9, 2024
562c8ca
Bump actions/setup-node from 4.0.2 to 4.0.3 (#3711)
dependabot[bot] Jul 16, 2024
d7ca70d
Bump actions/download-artifact from 4.1.7 to 4.1.8 (#3706)
dependabot[bot] Jul 16, 2024
d5337ed
Bump actions/dependency-review-action from 4.3.3 to 4.3.4 (#3710)
dependabot[bot] Jul 16, 2024
b5a239d
Bump github/codeql-action from 3.25.11 to 3.25.12 (#3709)
dependabot[bot] Jul 16, 2024
2d83cb0
Parse cLLi chunk (#3665)
ledoge Jul 23, 2024
21cde66
[jpegli] fix buffer overflow when chroma component has refinement (#3…
haixia-meta Jul 29, 2024
598d220
Fix incorrect encoding behaviour in some cases in Modular mode. (#3725)
veluca93 Jul 29, 2024
789c10e
Bump actions/upload-artifact from 4.3.3 to 4.3.4 (#3705)
dependabot[bot] Aug 5, 2024
2e4f06c
Gimp plugin: fix loading files with named frames (#3708)
alistair7 Aug 5, 2024
8522d71
tools/benchmark_codec_avif.cc: fix discarded avifResult warnings (#3719)
Traneptora Aug 5, 2024
b843067
Bump step-security/harden-runner from 2.8.1 to 2.9.0 (#3715)
dependabot[bot] Aug 5, 2024
b2ad0ed
Bump github/codeql-action from 3.25.12 to 3.25.15 (#3726)
dependabot[bot] Aug 5, 2024
3e4c0ad
Bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#3727)
dependabot[bot] Aug 5, 2024
479d46f
benchmark_utils: use correct environ on macOS (#3527)
barracuda156 Aug 6, 2024
9925851
fix e1 condition again (#3733)
jonsneyers Aug 7, 2024
00e59f1
Make enc/apng support float input (#3739)
sboukortt Aug 8, 2024
bab3cc5
Fix palette ∩ fast_lossless ∩ big-endian (#3740)
sboukortt Aug 8, 2024
0bcb7f2
update highway submodule to 1.2.0 (#3734)
mo271 Aug 9, 2024
821d778
bump version to 0.11.0 (#3736)
mo271 Aug 9, 2024
68f1bd7
Default to lcms2 on big-endian architectures (#3743)
sboukortt Aug 9, 2024
c15faf3
Bump actions/upload-artifact from 4.3.4 to 4.3.5 (#3732)
dependabot[bot] Aug 14, 2024
eb355e2
Bump step-security/harden-runner from 2.9.0 to 2.9.1 (#3748)
dependabot[bot] Aug 14, 2024
14591de
Bump actions/upload-artifact from 4.3.5 to 4.3.6 (#3756)
dependabot[bot] Aug 19, 2024
f792692
Bump github/codeql-action from 3.25.15 to 3.26.2 (#3757)
dependabot[bot] Aug 19, 2024
2c2e73b
more bits and precision for small blue details (#3735)
jyrkialakuijala Aug 20, 2024
816f748
Delete copy constructor and copy assignment operator (#3760)
mo271 Aug 21, 2024
ae529a1
padded_bytes: different initialization only (#3761)
mo271 Aug 22, 2024
30c8ecb
Cherry-pie topping: lint + fix includes + cherry-pick-in-forked-code
eustas Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build_test_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
mkdir -p ./build/Testing/Temporary
unzip ./tools/scripts/test_cost-${{ matrix.identifier }}.zip -d ./build/Testing/Temporary

- uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: env.WILL_RUN_TESTS == 'true'
with:
name: cross_binary-${{ matrix.identifier }}
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
with:
egress-policy: audit

- uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
if: (matrix.shard_number < env.LAST_SHARD) && (env.WILL_RUN_TESTS == 'true')
with:
name: cross_binary-${{ matrix.identifier }}
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
-I ${{ matrix.shard_number }},,${{ env.LAST_SHARD }} \
-E '(bash_test|conformance_tooling_test|test_jxl_jni_wrapper)'

- uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
name: Upload test cost
if: (env.UPLOAD_TEST_COST == 'true') && (matrix.shard_number == 0) && (env.WILL_RUN_TESTS == 'true')
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_test_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
build-wasm-${{ runner.os }}-${{ steps.git-env.outputs.parent }}-${{ matrix.variant }}

- name: Install node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{env.NODE_VERSION}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
language: c++
fuzz-seconds: 600
- name: Upload Crash
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
${{ runner.workspace }}/jpegli-linux-x86_64-static-${{ github.event.release.tag_name }}.tar.gz

- name: Upload artifacts
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: jpegli-linux-x86_64-static
path: ${{ runner.workspace }}/release_file.tar.gz
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
./ci.sh debian_stats

- name: Upload artifacts
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: ${{ steps.env.outputs.artifact_name }}
path: |
Expand Down Expand Up @@ -364,7 +364,7 @@ jobs:
BUILD_CONFIG=Release/ BENCHMARK_NUM_THREADS=2 STORE_IMAGES=0 ./ci.sh fast_benchmark

- name: Upload artifacts
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: jpegli-${{matrix.triplet}}
path: |
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Kai Hollberg <[email protected]>
Kerry Su <[email protected]>
Kleis Auke Wolthuizen <[email protected]>
L. E. Segovia
ledoge
Leo Izen <[email protected]>
Lovell Fuller
Maarten DB <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project(LIBJXL LANGUAGES C CXX)

# TODO(sboukortt): remove once oss-fuzz passes -DBUILD_SHARED_LIBS=OFF
if(JPEGXL_ENABLE_FUZZERS)
message(INFO "Fuzzer build detected, building static libs")
message(STATUS "Fuzzer build detected, building static libs")
set(BUILD_SHARED_LIBS OFF)
endif()

Expand Down Expand Up @@ -118,7 +118,7 @@ set(JPEGXL_ENABLE_SJPEG true CACHE BOOL
"Build JPEGXL with support for encoding with sjpeg.")
set(JPEGXL_ENABLE_OPENEXR true CACHE BOOL
"Build JPEGXL with support for OpenEXR if available.")
set(JPEGXL_ENABLE_SKCMS true CACHE BOOL
set(JPEGXL_ENABLE_SKCMS ${ENABLE_SKCMS_DEFAULT} CACHE BOOL
"Build with skcms instead of lcms2.")
set(JPEGXL_ENABLE_TCMALLOC ${ENABLE_TCMALLOC_DEFAULT} CACHE BOOL
"Build JPEGXL using gperftools (tcmalloc) allocator.")
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
jpeg-xl (0.11.0) UNRELEASED; urgency=medium

* Bump JPEG XL version to 0.11.0.

-- JPEG XL Maintainers <[email protected]> Tue, 06 Aug 2024 14:35:34 +0200

jpeg-xl (0.10.2) unstable; urgency=medium

* Bump JPEG XL version to 0.10.2.
Expand Down
2 changes: 1 addition & 1 deletion deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MYDIR=$(dirname "${SELF}")
# update a git submodule.
TESTDATA="873045a9c42ed60721756e26e2a6b32e17415205"
THIRD_PARTY_GOOGLETEST="58d77fa8070e8cec2dc1ed015d66b454c8d78850"
THIRD_PARTY_HIGHWAY="58b52a717469e62b2d9b8eaa2f5dddb44d4a4cbf"
THIRD_PARTY_HIGHWAY="457c891775a7397bdb0376bb1031e6e027af1c48"
THIRD_PARTY_SKCMS="42030a771244ba67f86b1c1c76a6493f873c5f91"
THIRD_PARTY_SJPEG="e5ab13008bb214deb66d5f3e17ca2f8dbff150bf"
THIRD_PARTY_ZLIB="51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf" # v1.3.1
Expand Down
6 changes: 3 additions & 3 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# https://developers.google.com/open-source/licenses/bsd

set(JPEGXL_MAJOR_VERSION 0)
set(JPEGXL_MINOR_VERSION 10)
set(JPEGXL_PATCH_VERSION 2)
set(JPEGXL_MINOR_VERSION 11)
set(JPEGXL_PATCH_VERSION 0)
set(JPEGXL_LIBRARY_VERSION
"${JPEGXL_MAJOR_VERSION}.${JPEGXL_MINOR_VERSION}.${JPEGXL_PATCH_VERSION}")

Expand All @@ -16,7 +16,7 @@ set(JPEGXL_LIBRARY_VERSION
# It is important to update this value when making incompatible API/ABI changes
# so that programs that depend on libjxl can update their dependencies. Semantic
# versioning allows 0.y.z to have incompatible changes in minor versions.
set(JPEGXL_SO_MINOR_VERSION 10)
set(JPEGXL_SO_MINOR_VERSION 11)
if (JPEGXL_MAJOR_VERSION EQUAL 0)
set(JPEGXL_LIBRARY_SOVERSION
"${JPEGXL_MAJOR_VERSION}.${JPEGXL_SO_MINOR_VERSION}")
Expand Down
4 changes: 1 addition & 3 deletions lib/base/float.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ static Status JXL_INLINE LoadFloatRow(const uint8_t* src, size_t count,

case JXL_TYPE_UINT8:
for (size_t i = 0; i < count; ++i) {
// Integer multiply uint8 value before scaling so that the UINT8 value
// and the corresponding UINT16 value convert to the same float
callback(i, (src[stride * i] * 257) * scale);
callback(i, src[stride * i] * scale);
}
return true;

Expand Down
2 changes: 1 addition & 1 deletion lib/cms/jxl_cms.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#else // JPEGXL_ENABLE_SKCMS
#include "lcms2.h"
#include "lcms2_plugin.h"
#include "lib/jxl/base/span.h"
#include "lib/base/span.h"
#endif // JPEGXL_ENABLE_SKCMS

#define JXL_CMS_VERBOSE 0
Expand Down
6 changes: 3 additions & 3 deletions lib/extras/butteraugli_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
namespace jxl {
namespace {

using extras::PackedImage;
using extras::PackedPixelFile;
using test::TestImage;
using ::jxl::extras::PackedImage;
using ::jxl::extras::PackedPixelFile;
using ::jxl::test::TestImage;

Image3F SinglePixelImage(float red, float green, float blue) {
JxlMemoryManager* memory_manager = jxl::test::MemoryManager();
Expand Down
2 changes: 1 addition & 1 deletion lib/extras/codec_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

namespace jxl {

using test::ThreadPoolForTests;
using ::jxl::test::ThreadPoolForTests;

namespace extras {

Expand Down
4 changes: 3 additions & 1 deletion lib/extras/jpegli_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ namespace jxl {
namespace extras {
namespace {

using test::TestImage;
using ::jxl::Butteraugli3Norm;
using ::jxl::ButteraugliDistance;
using ::jxl::test::TestImage;

#define TEST_LIBJPEG_SUPPORT() \
do { \
Expand Down
9 changes: 1 addition & 8 deletions lib/extras/packed_image_convert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,7 @@ Status ConvertFromExternalNoSizeCheck(const uint8_t* data, size_t xsize,
size_t bytes_per_pixel = format.num_channels * bytes_per_channel;
size_t pixel_offset = c * bytes_per_channel;
// Only for uint8/16.
float scale = 1.0f;
if (format.data_type == JXL_TYPE_UINT8) {
// We will do an integer multiplication by 257 in LoadFloatRow so that a
// UINT8 value and the corresponding UINT16 value convert to the same float
scale = 1.0f / (257 * ((1ull << bits_per_sample) - 1));
} else {
scale = 1.0f / ((1ull << bits_per_sample) - 1);
}
float scale = 1.0f / ((1ull << bits_per_sample) - 1);

const bool little_endian =
format.endianness == JXL_LITTLE_ENDIAN ||
Expand Down
2 changes: 1 addition & 1 deletion lib/jpegli/test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ std::string GetTestDataPath(const std::string& filename) {
return std::string(TEST_DATA_PATH "/") + filename;
}
#else
using bazel::tools::cpp::runfiles::Runfiles;
using ::bazel::tools::cpp::runfiles::Runfiles;
const std::unique_ptr<Runfiles> kRunfiles(Runfiles::Create(""));
std::string GetTestDataPath(const std::string& filename) {
std::string root(JPEGXL_ROOT_PACKAGE "/testdata/");
Expand Down
4 changes: 2 additions & 2 deletions lib/jxl_lists.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,9 @@ libjxl_jpegli_wrapper_sources = [

libjxl_major_version = 0

libjxl_minor_version = 10
libjxl_minor_version = 11

libjxl_patch_version = 2
libjxl_patch_version = 0

libjxl_public_headers = [
"include/jxl/cms.h",
Expand Down
6 changes: 1 addition & 5 deletions lib/jxl_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests)
foreach (TESTFILE IN LISTS JPEGXL_INTERNAL_TESTS)
# The TESTNAME is the name without the extension or directory.
get_filename_component(TESTNAME ${TESTFILE} NAME_WE)
if(TESTFILE STREQUAL ../tools/djxl_fuzzer_test.cc)
add_executable(${TESTNAME} ${TESTFILE} ../tools/djxl_fuzzer.cc)
else()
add_executable(${TESTNAME} ${TESTFILE})
endif()
add_executable(${TESTNAME} ${TESTFILE})
if(EMSCRIPTEN)
set_target_properties(${TESTNAME} PROPERTIES LINK_FLAGS "${JXL_WASM_TEST_LINK_FLAGS}")
else()
Expand Down
4 changes: 2 additions & 2 deletions lib/lib.gni
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,9 @@ libjxl_jpegli_wrapper_sources = [

libjxl_major_version = 0

libjxl_minor_version = 10
libjxl_minor_version = 11

libjxl_patch_version = 2
libjxl_patch_version = 0

libjxl_public_headers = [
"include/jxl/cms.h",
Expand Down
2 changes: 1 addition & 1 deletion lib/threads/thread_parallel_runner_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "lib/base/testing.h"
#include "lib/threads/test_utils.h"

using jxl::test::ThreadPoolForTests;
using ::jxl::test::ThreadPoolForTests;

namespace jpegxl {
namespace {
Expand Down
21 changes: 21 additions & 0 deletions third_party/apngdis/dec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,17 @@ Status DecodeChrmChunk(Bytes payload, JxlColorEncoding* color_encoding) {
return true;
}

/** Extracts information from 'cLLi' chunk. */
Status DecodeClliChunk(Bytes payload, float* max_content_light_level) {
if (payload.size() != 8) return JXL_FAILURE("Wrong cLLi size");
const uint8_t* data = payload.data();
const uint32_t maxcll_png =
Clamp1(png_get_uint_32(data), uint32_t{0}, uint32_t{10000 * 10000});
// Ignore MaxFALL value.
*max_content_light_level = static_cast<float>(maxcll_png) / 10000.f;
return true;
}

/** Returns false if invalid. */
JXL_INLINE Status DecodeHexNibble(const char c, uint32_t* JXL_RESTRICT nibble) {
if ('a' <= c && c <= 'f') {
Expand Down Expand Up @@ -1123,6 +1134,11 @@ Status DecodeImageAPNG(const Span<const uint8_t> bytes,
color_info_type = ColorInfoType::GAMA_OR_CHRM;
continue;

case MakeTag('c', 'L', 'L', 'i'):
JXL_RETURN_IF_ERROR(
DecodeClliChunk(payload, &ppf->info.intensity_target));
continue;

case MakeTag('e', 'X', 'I', 'f'):
// TODO(eustas): next eXIF chunk overwrites current; is it ok?
ppf->metadata.exif.resize(payload.size());
Expand All @@ -1148,6 +1164,11 @@ Status DecodeImageAPNG(const Span<const uint8_t> bytes,
JXL_RETURN_IF_ERROR(
ApplyColorHints(color_hints, color_is_already_set, is_gray, ppf));

if (ppf->color_encoding.transfer_function != JXL_TRANSFER_FUNCTION_PQ) {
// Reset intensity target, in case we set it from cLLi but TF is not PQ.
ppf->info.intensity_target = 0.f;
}

bool has_nontrivial_background = false;
bool previous_frame_should_be_cleared = false;
for (size_t i = 0; i < frames.size(); i++) {
Expand Down
17 changes: 16 additions & 1 deletion third_party/apngdis/enc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class APNGEncoder : public Encoder {
std::vector<JxlPixelFormat> AcceptedFormats() const override {
std::vector<JxlPixelFormat> formats;
for (const uint32_t num_channels : {1, 2, 3, 4}) {
for (const JxlDataType data_type : {JXL_TYPE_UINT8, JXL_TYPE_UINT16}) {
for (const JxlDataType data_type :
{JXL_TYPE_UINT8, JXL_TYPE_UINT16, JXL_TYPE_FLOAT}) {
for (JxlEndianness endianness : {JXL_BIG_ENDIAN, JXL_LITTLE_ENDIAN}) {
formats.push_back(
JxlPixelFormat{num_channels, data_type, endianness, /*align=*/0});
Expand Down Expand Up @@ -355,6 +356,20 @@ Status APNGEncoder::EncodePackedPixelFileToAPNG(
} else {
memcpy(out.data(), in, out_size);
}
} else if (format.data_type == JXL_TYPE_FLOAT) {
constexpr float kMul = 65535.0;
const uint8_t* p_in = in;
uint8_t* p_out = out.data();
for (size_t i = 0; i < num_samples;
++i, p_in += sizeof(float), p_out += 2) {
float val =
Clamp1(format.endianness == JXL_BIG_ENDIAN ? LoadBEFloat(p_in)
: format.endianness == JXL_LITTLE_ENDIAN
? LoadLEFloat(p_in)
: *reinterpret_cast<const float*>(p_in),
0.f, 1.f);
StoreBE16(static_cast<uint32_t>(std::lroundf(val * kMul)), p_out);
}
}
png_structp png_ptr;
png_infop info_ptr;
Expand Down
2 changes: 1 addition & 1 deletion third_party/highway
Submodule highway updated 161 files
5 changes: 5 additions & 0 deletions tools/benchmark/benchmark_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
#include <cstdlib>
#include <utility>

#ifdef __APPLE__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern char** environ; // NOLINT
#endif

namespace jpegxl {
namespace tools {
Expand Down
11 changes: 5 additions & 6 deletions tools/benchmark/benchmark_xl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ Status WriteImage(const Image3F& image, ThreadPool* pool,
}

void PrintStats(const TrackingMemoryManager& memory_manager) {
fprintf(stderr, "Allocations: %" PRIuS " (max bytes in use: %E)\n",
static_cast<size_t>(memory_manager.num_allocations),
fprintf(stderr,
"Allocation count: %" PRIuS ", total: %E (max bytes in use: %E)\n",
static_cast<size_t>(memory_manager.total_allocations),
static_cast<double>(memory_manager.total_bytes_allocated),
static_cast<double>(memory_manager.max_bytes_in_use));
}

Expand Down Expand Up @@ -804,10 +806,7 @@ class Benchmark {
public:
// Return the exit code of the program.
static Status Run() {
JxlMemoryManager default_memory_manager;
JXL_RETURN_IF_ERROR(
jxl::MemoryManagerInit(&default_memory_manager, nullptr));
TrackingMemoryManager memory_manager(&default_memory_manager);
TrackingMemoryManager memory_manager{};
bool ok = true;
{
const StringVec methods = GetMethods();
Expand Down
4 changes: 2 additions & 2 deletions tools/optimizer/simplex_fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def EvalCacheForget():
def RandomizedJxlCodecs():
retval = []
minval = 0.2
maxval = 9.3
maxval = 2.3
rangeval = maxval/minval
steps = 13
steps = 3
for i in range(steps):
mul = minval * rangeval**(float(i)/(steps - 1))
mul *= 0.99 + 0.05 * random.random()
Expand Down
Loading
Loading