issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 262k ⌀ | issue_title stringlengths 1 1.02k | issue_comments_url stringlengths 53 116 | issue_comments_count int64 0 2.49k | issue_created_at stringdate 1999-03-17 02:06:42 2025-06-23 11:41:49 | issue_updated_at stringdate 2000-02-10 06:43:57 2025-06-23 11:43:00 | issue_html_url stringlengths 34 97 | issue_github_id int64 132 3.17B | issue_number int64 1 215k |
|---|---|---|---|---|---|---|---|---|---|
[
"libjxl",
"libjxl"
] | **Describe the bug**
Consider a PNG input like the following white 8x8 square:
> 
`benchmark_xl` crashes with `--save_decompressed` on this input, even on a debug build (the only build where it's supported).
**To Reproduce**
Save `white.png` locally, and run `benchmark_xl --input=white.png --save_decompressed`
**Expected behavior**
benchmark_xl should work as it is documented, without crashing.
**Actual behavior**
```
$ build/tools/benchmark_xl --input=./white.png --save_decompressed
benchmark_xl v0.8.0 997069d1 [AVX2]
4 total threads, 1 tasks, 0 threads, 4 inner threads
./lib/extras/dec/color_hints.cc:54: No color_space/icc_pathname given, assuming sRGB
./lib/extras/codec.cc:172: PNG only supports up to 16 bits per sample
./lib/jxl/dec_external_image.cc:259: JXL_CHECK: float_out ? bits_per_sample == 16 || bits_per_sample == 32 : bits_per_sample > 0 && bits_per_sample <= 16
Illegal instruction (core dumped)
```
**Environment**
- OS: Arch Linux x86_64 6.0.6-arch1-1
- Compiler version: GCC g++ 12.2.0
- cjxl/djxl version string: 997069d111d4ba6c516580c218255c6f46c45c57
**Additional context**
Compiled with `CMAKE_BUILD_TYPE=Debug`
| benchmark_xl crashes with --save_decompressed and PNG input | https://api.github.com/repos/libjxl/libjxl/issues/1873/comments | 0 | 2022-11-06T21:09:49Z | 2022-11-06T21:09:55Z | https://github.com/libjxl/libjxl/issues/1873 | 1,437,541,118 | 1,873 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Consider a PNG input like [the following white 8x8 square](https://user-images.githubusercontent.com/1342577/200194862-2b679b6c-7e1b-4f4a-9d96-d6420ab396e5.png):
> 
`benchmark_xl` crashes with `--save_decompressed` on this input, even on a debug build (the only build where it's supported).
**To Reproduce**
Save `white.png` locally, and run `benchmark_xl --input=white.png --save_decompressed`
**Expected behavior**
benchmark_xl should work as it is documented, without crashing.
**Actual behavior**
```
$ build/tools/benchmark_xl --input=./white.png --save_decompressed
benchmark_xl v0.8.0 997069d1 [AVX2]
4 total threads, 1 tasks, 0 threads, 4 inner threads
./lib/extras/dec/color_hints.cc:54: No color_space/icc_pathname given, assuming sRGB
./lib/extras/codec.cc:172: PNG only supports up to 16 bits per sample
./lib/jxl/dec_external_image.cc:259: JXL_CHECK: float_out ? bits_per_sample == 16 || bits_per_sample == 32 : bits_per_sample > 0 && bits_per_sample <= 16
Illegal instruction (core dumped)
```
**Environment**
- OS: Arch Linux x86_64 6.0.6-arch1-1
- Compiler version: GCC g++ 12.2.0
- cjxl/djxl version string: 997069d111d4ba6c516580c218255c6f46c45c57
**Additional context**
Compiled with `CMAKE_BUILD_TYPE=Debug`
| benchmark_xl crashes with --save_decompressed and PNG input | https://api.github.com/repos/libjxl/libjxl/issues/1872/comments | 2 | 2022-11-06T21:09:09Z | 2024-02-12T17:21:38Z | https://github.com/libjxl/libjxl/issues/1872 | 1,437,540,945 | 1,872 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
```bash
$ cjxl --lossless_jpeg=1 -p /tmp/FullMoon2010.jpg /tmp/FullMoon2010.jxl
```
```
JPEG XL encoder v0.8.0 3a4fd8a0 [AVX2,SSE4,SSSE3,Unknown]
Read JPEG image with 2143958 bytes.
Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data],
./lib/jxl/enc_frame.cc:899: JXL_CHECK: enc_state_->passes.size() == 1
Illegal instruction (core dumped)
```
**To Reproduce**
* Extract `FullMoon2010.jpg` from [`Moons.jxl.zip`](https://github.com/libjxl/libjxl/files/9944572/Moons.jxl.zip).
* Run above command.
**Environment**
- Distributor ID: Pop
- Description: Pop!_OS 22.04 LTS
- Release: 22.04
- Codename: jammy
- Compiler version: g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.8.0 3a4fd8a0 [AVX2,SSE4,SSSE3,Unknown] | `cjxl` fails on moon JPEG in progressive mode. ICC seems to be at fault. | https://api.github.com/repos/libjxl/libjxl/issues/1871/comments | 0 | 2022-11-05T19:31:35Z | 2023-05-16T11:31:13Z | https://github.com/libjxl/libjxl/issues/1871 | 1,437,161,312 | 1,871 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
`Jxl::ImageBundle::SetAlpha` calls `Jxl::Abort` on the following line when encoding with premultiplied alpha.
https://github.com/libjxl/libjxl/blob/a0204edcaf9288b62a0fd1a708c97456ec717b02/lib/jxl/image_bundle.cc#L107
The issue appears to be caused by `BufferToImageBundle` setting `alpha_is_premultiplied` to `false` instead of using the value from the alpha channel info.
https://github.com/libjxl/libjxl/blob/a0204edcaf9288b62a0fd1a708c97456ec717b02/lib/jxl/enc_external_image.cc#L271
**To Reproduce**
Set the alpha channel to premultiplied using `JxlEncoderSetExtraChannelInfo`.
Call `JxlEncoderAddImageFrame` with the image data.
**Expected behavior**
The image encodes correctly.
**Screenshots**
N/A
**Environment**
- OS: Windows
- Compiler version: MSVC 19.33.31630
- CPU type: x86_64
- cjxl/djxl version string: N/A, I am using libjxl version 0.7.0 directly.
**Additional context**
The stack trace that Visual Studio shows when hitting this issue:
```
jxl::Abort() Line 136 C++
jxl::ImageBundle::SetAlpha(jxl::Plane<float> && alpha, bool alpha_is_premultiplied) Line 107 C++
jxl::ConvertFromExternal(jxl::Span<unsigned char const> bytes, unsigned __int64 xsize, unsigned __int64 ysize, const jxl::ColorEncoding & c_current, unsigned __int64 channels, bool alpha_is_premultiplied, unsigned __int64 bits_per_sample, JxlEndianness endianness, jxl::ThreadPool * pool, jxl::ImageBundle * ib, bool float_in, unsigned __int64 align) Line 379 C++
jxl::BufferToImageBundle(const JxlPixelFormat & pixel_format, unsigned int xsize, unsigned int ysize, const void * buffer, unsigned __int64 size, jxl::ThreadPool * pool, const jxl::ColorEncoding & c_current, jxl::ImageBundle * ib) Line 418 C++
JxlEncoderAddImageFrame(const JxlEncoderFrameSettingsStruct * frame_settings, const JxlPixelFormat * pixel_format, const void * buffer, unsigned __int64 size) Line 1626 C++
```
| Encoding with premultiplied alpha is not supported | https://api.github.com/repos/libjxl/libjxl/issues/1869/comments | 0 | 2022-11-05T01:02:33Z | 2022-12-02T09:47:31Z | https://github.com/libjxl/libjxl/issues/1869 | 1,436,757,195 | 1,869 |
[
"libjxl",
"libjxl"
] | I solved the _decoding_ of animations in #1863. Probably I will do this too. | GIMP plugin cannot encode animations | https://api.github.com/repos/libjxl/libjxl/issues/1864/comments | 1 | 2022-11-04T08:15:34Z | 2022-11-04T15:24:11Z | https://github.com/libjxl/libjxl/issues/1864 | 1,435,711,557 | 1,864 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Severity Code Description Project File Line Suppression State Error
Description: xmllint --nonet --noout --valid C:\changsheng\libjxl\out\build\x64-Clang-Release\djxl.xml returned non-zero exit status 1 Project: C:\changsheng\libjxl\out\build\x64-Clang-Release\libjxl
File: C:\changsheng\libjxl\out\build\x64-Clang-Release\a2x
Line: 1
**To Reproduce**
### 1. check out the code by using: git clone https://github.com/libjxl/libjxl.git --recursive --shallow-submodules
### 2. install dependencies:
vcpkg install gtest:x64-windows
vcpkg install giflib:x64-windows
vcpkg install libjpeg-turbo:x64-windows
vcpkg install libpng:x64-windows
vcpkg install zlib:x64-windows
### 3. open "libjxl" folder from Visual Studio 2022
### 4. CMake setting: deleted "x64-Debug" and add "x64-Clang-Release" and edited it as:
{
"configurations": [
{
"name": "x64-Clang-Release",
"generator": "Ninja",
"configurationType": "MinSizeRel",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DCMAKE_TOOLCHAIN_FILE=C:\\changsheng\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64" ],
"variables": [
{
"name": "VCPKG_TARGET_TRIPLET",
"value": "x64-windows",
"type": "STRING"
},
{
"name": "JPEGXL_ENABLE_TCMALLOC",
"value": "False",
"type": "BOOL"
},
{
"name": "BUILD_GMOCK",
"value": "True",
"type": "BOOL"
},
{
"name": "gtest_force_shared_crt",
"value": "True",
"type": "BOOL"
},
{
"name": "JPEGXL_ENABLE_FUZZERS",
"value": "False",
"type": "BOOL"
},
{
"name": "JPEGXL_ENABLE_VIEWERS",
"value": "False",
"type": "BOOL"
}
]
}
]
}
### 5. save the CMakeSettings.json and it automatically doing cmake. The output of CMake is as below, several performing test failed and some packages not found.
1> CMake generation started for configuration: 'x64-Clang-Release'.
1> Environment settings:
1> CXXFLAGS=-m64 -fdiagnostics-absolute-paths
1> CFLAGS=-m64 -fdiagnostics-absolute-paths
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="MinSizeRel" -DCMAKE_INSTALL_PREFIX:PATH="C:\changsheng\libjxl\out\install\x64-Clang-Release" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows" -DJPEGXL_ENABLE_TCMALLOC:BOOL="False" -DBUILD_GMOCK:BOOL="True" -Dgtest_force_shared_crt:BOOL="True" -DJPEGXL_ENABLE_FUZZERS:BOOL="False" -DJPEGXL_ENABLE_VIEWERS:BOOL="False" -DCMAKE_C_COMPILER:FILEPATH="C:/PROGRAM FILES/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/Tools/Llvm/bin/clang-cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/PROGRAM FILES/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/Tools/Llvm/bin/clang-cl.exe" -DCMAKE_TOOLCHAIN_FILE=C:\changsheng\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\changsheng\libjxl" 2>&1"
1> Working directory: C:\changsheng\libjxl\out\build\x64-Clang-Release
1> [CMake] -- The C compiler identification is Clang 14.0.5 with MSVC-like command-line
1> [CMake] -- The CXX compiler identification is Clang 14.0.5 with MSVC-like command-line
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/PROGRAM FILES/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/Tools/Llvm/bin/clang-cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/PROGRAM FILES/MICROSOFT VISUAL STUDIO/2022/COMMUNITY/VC/Tools/Llvm/bin/clang-cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Performing Test JPEGXL_EMSCRIPTEN
1> [CMake] -- Performing Test JPEGXL_EMSCRIPTEN - Failed
1> [CMake] -- CMAKE_SYSTEM_PROCESSOR is AMD64
1> [CMake] -- Performing Test CXX_FUZZERS_SUPPORTED
1> [CMake] -- Performing Test CXX_FUZZERS_SUPPORTED - Failed
1> [CMake] -- Performing Test CXX_CONSTRUCTOR_ALIASES_SUPPORTED
1> [CMake] -- Performing Test CXX_CONSTRUCTOR_ALIASES_SUPPORTED - Success
1> [CMake] -- Performing Test CXX_MACRO_PREFIX_MAP
1> [CMake] -- Performing Test CXX_MACRO_PREFIX_MAP - Failed
1> [CMake] -- Performing Test CXX_NO_RTTI_SUPPORTED
1> [CMake] -- Performing Test CXX_NO_RTTI_SUPPORTED - Failed
1> [CMake] -- Found PkgConfig: C:/ProgramData/chocolatey/bin/pkg-config.exe (found version "0.28")
1> [CMake] -- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED
1> [CMake] -- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED - Failed
1> [CMake] -- Compiled IDs C:Clang, C++:Clang
1> [CMake] -- Looking for pthread.h
1> [CMake] -- Looking for pthread.h - not found
1> [CMake] -- Found Threads: TRUE
1> [CMake] -- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
1> [CMake] -- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Success
1> [CMake] CMake Deprecation Warning at third_party/googletest/CMakeLists.txt:1 (cmake_minimum_required):
1> [CMake] Compatibility with CMake < 2.8.12 will be removed from a future version of
1> [CMake] CMake.
1> [CMake]
1> [CMake] Update the VERSION argument <min> value or use a ...<max> suffix to tell
1> [CMake] CMake that the project does not need compatibility with older versions.
1> [CMake]
1> [CMake]
1> [CMake] CMake Deprecation Warning at third_party/googletest/googlemock/CMakeLists.txt:42 (cmake_minimum_required):
1> [CMake] Compatibility with CMake < 2.8.12 will be removed from a future version of
1> [CMake] CMake.
1> [CMake]
1> [CMake] Update the VERSION argument <min> value or use a ...<max> suffix to tell
1> [CMake] CMake that the project does not need compatibility with older versions.
1> [CMake]
1> [CMake]
1> [CMake] CMake Deprecation Warning at third_party/googletest/googletest/CMakeLists.txt:49 (cmake_minimum_required):
1> [CMake] Compatibility with CMake < 2.8.12 will be removed from a future version of
1> [CMake] CMake.
1> [CMake]
1> [CMake] Update the VERSION argument <min> value or use a ...<max> suffix to tell
1> [CMake] CMake that the project does not need compatibility with older versions.
1> [CMake]
1> [CMake]
1> [CMake] -- Found PythonInterp: C:/Program Files/Python311/python.exe (found version "3.11")
1> [CMake] -- Found GTest: C:/changsheng/vcpkg/installed/x64-windows/share/gtest/GTestConfig.cmake (found version "1.12.1")
1> [CMake] -- Performing Test HWY_EMSCRIPTEN
1> [CMake] -- Performing Test HWY_EMSCRIPTEN - Failed
1> [CMake] -- Performing Test HWY_RISCV
1> [CMake] -- Performing Test HWY_RISCV - Failed
1> [CMake] CMake Deprecation Warning at third_party/brotli/CMakeLists.txt:5 (cmake_minimum_required):
1> [CMake] Compatibility with CMake < 2.8.12 will be removed from a future version of
1> [CMake] CMake.
1> [CMake]
1> [CMake] Update the VERSION argument <min> value or use a ...<max> suffix to tell
1> [CMake] CMake that the project does not need compatibility with older versions.
1> [CMake]
1> [CMake]
1> [CMake] -- Performing Test BROTLI_EMSCRIPTEN
1> [CMake] -- Performing Test BROTLI_EMSCRIPTEN - Failed
1> [CMake] -- Compiler is not EMSCRIPTEN
1> [CMake] -- Looking for log2
1> [CMake] -- Looking for log2 - found
1> [CMake] -- Performing Test CXX_WPSABI_SUPPORTED
1> [CMake] -- Performing Test CXX_WPSABI_SUPPORTED - Success
1> [CMake] -- Found ZLIB: optimized;C:/changsheng/vcpkg/installed/x64-windows/lib/zlib.lib;debug;C:/changsheng/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found version "1.2.13")
1> [CMake] -- Found PNG: optimized;C:/changsheng/vcpkg/installed/x64-windows/lib/libpng16.lib;debug;C:/changsheng/vcpkg/installed/x64-windows/debug/lib/libpng16d.lib (found version "1.6.37")
1> [CMake] CMake Deprecation Warning at third_party/sjpeg/CMakeLists.txt:1 (cmake_minimum_required):
1> [CMake] Compatibility with CMake < 2.8.12 will be removed from a future version of
1> [CMake] CMake.
1> [CMake]
1> [CMake] Update the VERSION argument <min> value or use a ...<max> suffix to tell
1> [CMake] CMake that the project does not need compatibility with older versions.
1> [CMake]
1> [CMake]
1> [CMake] -- Performing Test SJPEG_HAVE_FLAG___SSE2__
1> [CMake] -- Performing Test SJPEG_HAVE_FLAG___SSE2__ - Success
1> [CMake] -- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__
1> [CMake] -- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__ - Failed
1> [CMake] -- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__
1> [CMake] -- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__ - Failed
1> [CMake] -- Found JPEG: optimized;C:/changsheng/vcpkg/installed/x64-windows/lib/jpeg.lib;debug;C:/changsheng/vcpkg/installed/x64-windows/debug/lib/jpeg.lib (found version "62")
1> [CMake] -- Found OpenGL: opengl32
1> [CMake] -- Checking for module 'glut'
1> [CMake] -- No package 'glut' found
1> [CMake] -- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
1> [CMake] -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
1> [CMake] -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
1> [CMake] -- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS
1> [CMake] -- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS - Failed
1> [CMake] -- Found GIF: optimized;C:/changsheng/vcpkg/installed/x64-windows/lib/gif.lib;debug;C:/changsheng/vcpkg/installed/x64-windows/debug/lib/gif.lib (found suitable version "5.2.1", minimum required is "5.1")
1> [CMake] -- Checking for module 'OpenEXR'
1> [CMake] -- No package 'OpenEXR' found
1> [CMake] -- Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found version "1.9.5 (2f6875a5ca481a69a6f32650c77a667f87d25e88)") found components: doxygen missing components: dot
1> [CMake] CMake Warning at CMakeLists.txt:395 (message):
1> [CMake] sphinx-build not found, skipping rtd documentation
1> [CMake]
1> [CMake]
1> [CMake] -- Building with JPEGXL_VERSION=b11c0dab (auto-updated)
1> [CMake] -- Checking for module 'libwebp'
1> [CMake] -- No package 'libwebp' found
1> [CMake] -- Checking for module 'libavif'
1> [CMake] -- No package 'libavif' found
1> [CMake] -- Building tools: cjxl;djxl;jxlinfo;cjpeg_hdr;benchmark_xl
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/changsheng/libjxl/out/build/x64-Clang-Release
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.
### 6. build all
When I build all from visual studio 2022, it failed and got two errors as described above.
But when I only build "cjxl.exe" it succeed. However, when I run the command "cjxl landscape.png landscape.jxl" it failed to encode an image and there are two system error **"The code execution cannot proceed because jxl.dll was not found. Reinstalling the program may fix this problem." and "The code excution cannot proceed because jxl_threads.dll was not found. Reinstalling the program may fix this problem."**
**Expected behavior**
I would like to build the code with vcpkg successfully and install it on my computer.
**Screenshots**
**Environment**
- OS: Edition Windows 11 Pro; Version 21H2; OS build 22000.1098; Experience Windows Feature Experience Pack 1000.22000.1098.0
- Compiler version: Clang 14.0.5
- CPU type: Processor 11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz 3.50 GHz; Installed RAM 32.0 GB (31.8 GB usable); System type 64-bit operating system, x64-based processor
- cjxl/djxl version string: I am not sure which version it is. I just git clone the code.
**Additional context**
I followed the instructions for Ubuntu and installed the repo successfully. But I have no idea why it doesn't work for Windows with vcpkg. Do I need to install other dependencies?
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Fail to build on Windows with vcpkg | https://api.github.com/repos/libjxl/libjxl/issues/1859/comments | 0 | 2022-11-02T11:39:13Z | 2024-03-04T10:24:19Z | https://github.com/libjxl/libjxl/issues/1859 | 1,432,995,764 | 1,859 |
[
"libjxl",
"libjxl"
] | I can't combine `libjxl/experimental/fast_lossless` and the `github.com/veluca93/fpnge` encoder code in the same program (e.g. to compare the two encoders' speeds), because both fjxl and fpnge declare `struct BitWriter` in the top-level namespace, with the same name (and both have a `Write(uint32_t, uint64_t)` method) but different field layout (see links below). Linking both of them leads to a crash, presumably because the fjxl code mistakenly calls the fpnge BitWriter or vice versa.
- https://github.com/libjxl/libjxl/blob/506714edaa3dd670133b9fe094d5efb94f6d0f6e/experimental/fast_lossless/fast_lossless.cc#L46
- https://github.com/veluca93/fpnge/blob/48020025e197318ab3c695903a4577e3d9565ddb/fpnge.cc#L374
I believe one solution would be to wrap a C++ "anonymous namespace" around all of `fast_lossless.cc` code except for the final `FastLosslessEncode` function.
@veluca93 | experimental/fast_lossless doesn't anon-namespace its BitWriter | https://api.github.com/repos/libjxl/libjxl/issues/1855/comments | 2 | 2022-10-31T06:18:53Z | 2022-11-08T12:51:52Z | https://github.com/libjxl/libjxl/issues/1855 | 1,429,318,812 | 1,855 |
[
"libjxl",
"libjxl"
] | https://bugs.chromium.org/p/chromium/issues/detail?id=1178058
Please @jonsneyers do something, talk to them..
You can't let one overzealous aGiLe chromium manager ruin the web and incur an insanely big negative ecological and and user experience impact. | Convince chromium that JPEG XL has an objectively high value proposition | https://api.github.com/repos/libjxl/libjxl/issues/1854/comments | 5 | 2022-10-31T00:04:43Z | 2025-01-22T10:39:18Z | https://github.com/libjxl/libjxl/issues/1854 | 1,429,066,705 | 1,854 |
[
"libjxl",
"libjxl"
] | `lib/jxl/encode.cc` says `"Set use_original_profile=true for lossless encoding"` (inside a `JXL_API_ERROR` invocation), twice, but the field is called `uses_original_profile`.
Note the one versus two `s`s in `use_etc` versus `uses_etc`.
Grepping for `use_original_profile` with only one `s` gives no other hits (other than a `lossy_use_original_profile` function argument in `lib/jxl/encode_test.cc`). | JXL_API_ERROR use_original_profile typo | https://api.github.com/repos/libjxl/libjxl/issues/1853/comments | 1 | 2022-10-30T11:08:55Z | 2022-10-31T11:24:12Z | https://github.com/libjxl/libjxl/issues/1853 | 1,428,734,795 | 1,853 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
in order to compile `main` branch I had to comment out all lines with `StoreInterleaved2` `StoreInterleaved3` `StoreInterleaved4`
(in `dec_group_jpeg.cc` and `stage_write.cc`)
**To Reproduce**
try to compile `main` branch
**Expected behavior**
`main` branch compiles successfully
**Environment**
- OS: Gentoo Linux
- Compiler version: gcc-12.2.1
- CPU type: x86_64
- cjxl/djxl version string: JPEG XL encoder v0.8.0 [AVX2]
**Additional context**
`emerge =media-libs/libjxl-9999` with `-DJXL_HWY_DISABLED_TARGETS_FORCED:BOOL=ON`
| StoreInterleaved: 2 3 4 | https://api.github.com/repos/libjxl/libjxl/issues/1852/comments | 3 | 2022-10-30T10:43:51Z | 2022-11-10T20:00:17Z | https://github.com/libjxl/libjxl/issues/1852 | 1,428,724,671 | 1,852 |
[
"libjxl",
"libjxl"
] | cjxl always encodes GIF as RGB+Alpha even if the original GIF doesn't use transparency at all. It does it for both static images and animations.
If transparency is not used in the entire GIF file, I would expect the GIF to be encoded as RGB.
Static image:
```
d:\>gifsicle -I pict.gif
* pict.gif 1 image
logical screen 100x100
global color table [2]
background 0
+ image #0 100x100
d:\>cjxl pict.gif pict.jxl
JPEG XL encoder v0.8.0 506714e [SSE4,SSSE3,Unknown]
Read 100x100 image, 369 bytes, 101.6 MP/s
Encoding [Modular, lossless, effort: 7],
Compressed to 138 bytes (0.110 bpp).
100 x 100, 1.30 MP/s [1.30, 1.30], 1 reps, 4 threads.
d:\>jxlinfo pict.jxl
JPEG XL image, 100x100, (possibly) lossless, 8-bit RGB+Alpha
Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual
```
Animation:
```
d:\>gifsicle -I anim.gif
* anim.gif 2 images
logical screen 100x100
global color table [4]
background 0
loop forever
+ image #0 100x100
disposal asis delay 1.00s
+ image #1 100x100
disposal asis delay 1.00s
d:\>cjxl anim.gif anim.jxl
JPEG XL encoder v0.8.0 506714e [SSE4,SSSE3,Unknown]
Read 100x100 image, 759 bytes, 81.5 MP/s
Encoding [Modular, lossless, effort: 7],
Compressed to 290 bytes (0.116 bpp/frame).
100 x 100, 0.71 MP/s [0.71, 0.71], 1 reps, 4 threads.
d:\>jxlinfo anim.jxl
JPEG XL animation, 100x100, (possibly) lossless, 8-bit RGB+Alpha
Color space: RGB, D65, sRGB primaries, sRGB transfer function, rendering intent: Perceptual
frame: full image size, duration: 1000.0 ms
frame: full image size, duration: 1000.0 ms
Animation length: 2.000 seconds (looping)
```
Test files:


| cjxl: GIF always encoded as RGB+Alpha | https://api.github.com/repos/libjxl/libjxl/issues/1851/comments | 0 | 2022-10-28T18:56:40Z | 2022-10-31T08:18:59Z | https://github.com/libjxl/libjxl/issues/1851 | 1,427,687,969 | 1,851 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Encode an image with non-default exif orientation and `--center_x`, `--center_y` and `--group_order` flags and observe it load in chrome. It doesn't render progressively
**Expected behavior**
Progressive rendering of that image.
**Additional context**
Also there is some documentation needed to say what `--center_x`, `--center_y` refers to in case of images with non-default orientation.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| progressive images with non-default orientation | https://api.github.com/repos/libjxl/libjxl/issues/1846/comments | 0 | 2022-10-24T08:26:22Z | 2022-10-24T08:26:22Z | https://github.com/libjxl/libjxl/issues/1846 | 1,420,434,442 | 1,846 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
GIMP plugin fails to load truncated progressive files that `djxl` can understand
**To Reproduce**
Steps to reproduce the behavior:
Encode an image progressively.
Truncate it.
Try to load it in GIMP.
**Expected behavior**
The image to load in GIMP.
**Environment**
- OS: GNU/Linux
- Compiler version: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
- CPU type: x86_64
- cjxl/djxl version string: v0.8.0 99b07212 [AVX3,AVX2,SSE4,SSSE3,Unknown]
Copyright (c) the JPEG XL Project
| GIMP plugin fails to load truncated progressive files that `djxl` can understand | https://api.github.com/repos/libjxl/libjxl/issues/1845/comments | 2 | 2022-10-22T06:43:16Z | 2022-11-16T11:59:42Z | https://github.com/libjxl/libjxl/issues/1845 | 1,419,129,145 | 1,845 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
```
> djxl test.jxl --bits_per_sample 16 test3.png
JPEG XL decoder v0.8.0 60a019fb [AVX2,SSE4,SSSE3,Unknown]
Read 259 compressed bytes.
JxlDecoderSetImageOutBitDepth failed
DecompressJxlToPackedPixelFile failed
```
**To Reproduce**
Encode any image into any kind of jxl, and decode into png with --bits_per_sample 16
**Expected behavior**
It should produce a 16 bit png
**Environment**
- OS: Ubuntu 22.04
- Compiler version: clang 14
- CPU type: x86_64
- cjxl/djxl version string: JPEG XL decoder v0.8.0 60a019fb [AVX2,SSE4,SSSE3,Unknown]
| cjxl --bits_per_sample 16 not working | https://api.github.com/repos/libjxl/libjxl/issues/1840/comments | 0 | 2022-10-19T09:46:56Z | 2022-11-02T12:57:11Z | https://github.com/libjxl/libjxl/issues/1840 | 1,414,650,906 | 1,840 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I converted a few PNG screenshots to lossless JXL by using cjxl and noticed that the same screenshots turned into bigger JXL files when I used 0.7.0 compared to 0.6.1 no matter which options I used.
**To Reproduce**
Steps to reproduce the behavior:
(Example output files in block with file size in front of the names)
0.6.1 `cjxl -q 100 -m -s 9 -E 3 -I 1 $PNG $JXL`
```
652K Bildschirmfoto_2022-09-21_01-05-01.jxl
1,2M Bildschirmfoto_2022-09-21_01-05-08.jxl
705K Bildschirmfoto_2022-09-21_01-05-27.jxl
```
0.7.0 `cjxl -q 100 -m 1 -e 9 -E 3 -I 1 $PNG $JXL`
```
712K Bildschirmfoto_2022-09-21_01-05-01.jxl
1,3M Bildschirmfoto_2022-09-21_01-05-08.jxl
790K Bildschirmfoto_2022-09-21_01-05-27.jxl
```
0.7.0 `cjxl -q 100 -e 9 --brotli_effort 11 -E 3 -I 10 $PNG $JXL`
```
670K Bildschirmfoto_2022-09-21_01-05-01.jxl
1,2M Bildschirmfoto_2022-09-21_01-05-08.jxl
743K Bildschirmfoto_2022-09-21_01-05-27.jxl
```
I also tested dropping -q and -m or using -m 0, etc.
**Expected behavior**
`cjxl -q 100 -m 1 -e 9 -E 3 -I 1` looks like it should create files as small as 0.6.1's `cjxl -q 100 -m -s 9 -E 3 -I 1` since effort is the replacement for speed.
So I expect generated JXL files at least as small as in 0.6.1.
**Screenshots**
Not necessary.
**Environment**
- OS: Arch Linux
- Compiler version: clang 14.0.6 / gcc 12.2.0
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.7.0 f95da131 [AVX2,SSE4,SSSE3,Unknown]
- cjxl/djxl version string (old): cjxl v0.6.1 a205468b [AVX2,SSE4,SSSE3,Scalar]
**Additional context**
I did not compile libjxl myself but used Arch Linux's libjxl package but also tested the static 0.7.0 cjxl from the Release page of this GitHub repo. | cjxl 0.7 seems to produce bigger lossless pictures than 0.6.1 | https://api.github.com/repos/libjxl/libjxl/issues/1839/comments | 3 | 2022-10-17T22:00:24Z | 2022-10-19T17:19:53Z | https://github.com/libjxl/libjxl/issues/1839 | 1,412,283,036 | 1,839 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Android `libjxl.so` libraries are huge. They range from 39MiB for armeabi-v7a to 66MiB for x86_64.
```
-rw-r--r--. 1 maarten maarten 41M 15 okt 16:00 android.arm64-v8a/libjxl.so
-rw-r--r--. 1 maarten maarten 39M 15 okt 16:00 android.armeabi-v7a/libjxl.so
-rw-r--r--. 1 maarten maarten 66M 15 okt 16:00 android.x86_64/libjxl.so
-rw-r--r--. 1 maarten maarten 48M 15 okt 16:00 android.x86/libjxl.so
```
These file sizes exclude libbrotli, which is built separately as a shared library.
Am I misconfiguring libjxl or is this normal?
**To Reproduce**
Use the [simplatex/android-lightweight](https://hub.docker.com/r/simplatex/android-lightweight) docker image:
Start it with:
```
docker run --rm -ti simplatex/android-lightweight /bin/bash
```
Run the following inside the container. It downloads, builds and installs libjxl:
```
git clone https://github.com/libjxl/libjxl.git /src
git -C /src submodule update --recursive --init
apt-get update && apt-get install -y cmake ninja-build
cmake -S /src -B /tmp/build_libjxl -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake" -DANDROID_PLATFORM=16 -DANDROID_ABI=x86 -DBUILD_SHARED_LIBS=ON -GNinja -DBUILD_TESTING=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_PLUGINS=OFF -DJPEGXL_ENABLE_SKCMS=OFF -DJPEGXL_FORCE_SYSTEM_HWY=OFF -DCMAKE_INSTALL_PREFIX=/tmp/libjxl_prefix
cmake --build /tmp/build_libjxl --target install
ls -al /tmp/libjxl_prefix/lib/*.so --block-size=M
```
=> output:
```
-rw-r--r--. 1 root root 1M Oct 15 14:20 /tmp/libjxl_prefix/lib/libbrotlicommon.so
-rw-r--r--. 1 root root 1M Oct 15 14:20 /tmp/libjxl_prefix/lib/libbrotlidec.so
-rw-r--r--. 1 root root 2M Oct 15 14:20 /tmp/libjxl_prefix/lib/libbrotlienc.so
-rw-r--r--. 1 root root 34M Oct 15 14:21 /tmp/libjxl_prefix/lib/libjxl.so
-rw-r--r--. 1 root root 2M Oct 15 14:21 /tmp/libjxl_prefix/lib/libjxl_threads.so
```
=> `libjxl.so` for x86@Android is 34 MiB
**Expected behavior**
`libjxl.so` having a more reasonable size.
**Environment**
- OS: Linux
- Compiler version: clang
- CPU type: x86 (but applies to all
- cjxl/djxl version string: n/a
**Additional context**
I found out about this while creating android prefab archives for SDL_image.
| How to reduce size of libjxl when targeting Android | https://api.github.com/repos/libjxl/libjxl/issues/1835/comments | 2 | 2022-10-15T14:26:24Z | 2022-10-15T14:34:10Z | https://github.com/libjxl/libjxl/issues/1835 | 1,410,183,457 | 1,835 |
[
"libjxl",
"libjxl"
] | We're keen to deploy JXL and have been testing it in production. Historically, we have used WebP but we are now serving images encoded in JXL to clients which advertise support in their accept headers, on the order of ~10k images a day. In terms of file size and quality (as checked by SSIM) things look good, however the challenge we are facing is that encoding JXL takes ~5x longer than the same operation using WebP (we test encode each image, so we can observe the compared encoding times.) It's a naive example, but you can see this performance discrepancy comparing cwebp vs cjxl on most test images. Because of the performance gap we are limited to deploying JXL only up to a certain size of image, e.g. https://cdn.shopify.com/s/files/1/0647/7081/files/japan_street.jpg?v=1656964576&width=400 otherwise we exceed our encoding time budget (we cache all the encoded images at the CDN layer, but we have a cache miss budget as well.)
As mentioned, we're excited to help drive JXL adoption but are interested to understand if there are performance improvements in the works which will help pave the way for more widespread deployment? Are there specific areas which could be improved but are waiting for contributions? Thanks! | Relatively slow performance limiting deployment | https://api.github.com/repos/libjxl/libjxl/issues/1832/comments | 1 | 2022-10-11T16:03:10Z | 2022-10-12T07:05:43Z | https://github.com/libjxl/libjxl/issues/1832 | 1,404,889,519 | 1,832 |
[
"libjxl",
"libjxl"
] | E.g. comparing these two images using `butteraugli_main`
https://jon-cld.s3.amazonaws.com/test/images/2387532.png
https://jon-cld.s3.amazonaws.com/test/distorted/2387532/mozjpeg-2x2-revert-q100.jpg
results in a very high score:
```
4.4267010689
3-norm: 2.373483
```
while I would expect a value very close to 0 here.
Indeed, when converting the jpeg to png with `convert`, I get:
```
0.3288663626
3-norm: 0.123273
```
Possibly this is a colorspace issue (the png has a gAMA chunk while the jpeg doesn't) but I cannot see any difference between the two images when I open them in Chrome or Firefox. When I open them in Safari, the PNG does in fact look darker than the JPEG and than how it is shown in Chrome and Firefox.
So I guess either Chrome and Firefox are both wrong, the PNG should be darker than the JPEG like in Safari, and Butteraugli is right to give a large error, or Chrome and Firefox are right, and Safari and Butteraugli are wrong.
So I don't know if this is a bug in libjxl/butteraugli or in Chrome and Firefox. To me the most plausible explanation is this:
- Chrome and Firefox simply treat any grayscale image (or at least any without an explicit ICC profile) as if it follows the sRGB transfer curve;
- Safari and libjxl do respect the gAMA chunk (which looks slightly darker than the sRGB transfer curve);
- This difference causes the butteraugli to be higher than expected when looking at the images in Chrome;
- Converting the png to jpeg with mozjpeg produces an untagged JPEG which means it incorrectly changes the transfer curve from the original gamma 0.45455 to the implicit sRGB transfer curve that untagged images are supposed to be interpreted with;
- Converting the jpeg to png with ImageMagick produces a PNG that gets (incorrectly) tagged with the gAMA chunk, which undoes the error that mozjpeg made.
If the above is true, then basically there are subtle bugs in Chrome, Firefox, Mozjpeg and ImageMagick, and libjxl and Safari are the only ones who get it right.
Sigh.
| bug in handling grayscale images in butteraugli? or not? | https://api.github.com/repos/libjxl/libjxl/issues/1828/comments | 1 | 2022-10-11T09:33:44Z | 2022-10-11T21:57:44Z | https://github.com/libjxl/libjxl/issues/1828 | 1,404,323,684 | 1,828 |
[
"libjxl",
"libjxl"
] | I wrote some code using the encoder API that was accidentally setting the blend mode for the first/only frame to `JXL_BLEND_BLEND`. Under specific conditions, this produces a file that fails to decode.
**To Reproduce**
- Start with an image that's susceptible to patches - e.g. a picture of text.
- Encode it using the libjxl API:
- Set the first frame's blend mode to something other than `JXL_BLEND_REPLACE`.
- Make sure the encoder settings allow the use of patches (enable explicitly or set effort >= 5?)
- I was encoding losslessly - not sure if that matters.
- Decode the resulting file with coalescing enabled.
- The file will fail to decode (JxlDecoderProcessInput returns `JXL_DEC_ERROR` when we expect `JXL_DEC_FULL_IMAGE`; djxl and image viewer plugins fail).
The problem disappears when patches are disabled in the encoder.
The problem never happens when coalescing is disabled in the decoder - this matters even when the file consists of a single uncropped frame.
**Expected behavior**
Depends whether the blend mode of the first frame is meaningful... There's obviously no source frame to reference, which I guess is what's upsetting the decoder, but maybe some applications could potentially use it for displaying the JXL against some other background image?
If it's not meaningful, the encoder API should reject or ignore any blend mode other than `JXL_BLEND_REPLACE` for the first frame.
Either way, decoding with coalescing enabled should always behave as if the first frame was using `JXL_BLEND_REPLACE`.
**Environment**
- OS: Linux x86_64 (Arch / Ubuntu)
- Compiler version: clang 14.0.0
- CPU type: x86_64
- cjxl/djxl version string: JPEG XL encoder v0.8.0 a58fc0a9 [AVX2,SSE4,SSSE3,Unknown]
<details><summary>Self-contained example that encodes a file and then fails to decode it</summary><p>
```C++
// Compiled with:
// g++ -Og -g3 patches.cpp `pkg-config libjxl --cflags --libs`
#include <cassert>
#include <cstring>
#include <iost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~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~@@A\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\200\200\200~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~~~@@A\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\200\200\200"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~\240\240\240\200\200\200\200\200\200\0\0\001\0\0\001\0\0\001\0\0\001\0\0\001\040\040!\200\200\200\200\200\200\200\200\200\200\200\200\300\300\300~~~~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"~~~~~~~~~~~~~";
const JxlPixelFormat format = { 3, JXL_TYPE_UINT8, JXL_NATIVE_ENDIAN, 0 };
JxlEncoderPtr enc = JxlEncoderMake(nullptr);
JxlBasicInfo bi;
JxlEncoderInitBasicInfo(&bi);
bi.xsize = 243;
bi.ysize = 36;
bi.uses_original_profile = JXL_TRUE;
JxlEncoderSetBasicInfo(enc.get(), &bi);
JxlColorEncoding col;
JxlColorEncodingSetToSRGB(&col, JXL_FALSE);
JxlEncoderSetColorEncoding(enc.get(), &col);
JxlEncoderFrameSettings* fs = JxlEncoderFrameSettingsCreate(enc.get(), nullptr);
JxlEncoderFrameSettingsSetOption(fs, JXL_ENC_FRAME_SETTING_EFFORT, 5);
JxlEncoderSetFrameLossless(fs, JXL_TRUE);
JxlEncoderFrameSettingsSetOption(fs, JXL_ENC_FRAME_SETTING_PATCHES, 1); ////////
JxlFrameHeader fh{};
JxlEncoderInitBlendInfo(&fh.layer_info.blend_info);
fh.layer_info.blend_info.blendmode = JXL_BLEND_BLEND; ////////
JxlEncoderSetFrameHeader(fs, &fh);
assert(JxlEncoderAddImageFrame(fs, &format, data, sizeof data - 1) == JXL_ENC_SUCCESS);
JxlEncoderCloseFrames(enc.get());
// Buffer for encoded JXL
uint8_t encoded[4000];
uint8_t* next = encoded;
size_t avail = sizeof encoded;
assert(JxlEncoderProcessOutput(enc.get(), &next, &avail) == JXL_ENC_SUCCESS);
size_t encoded_size = sizeof encoded - avail;
/*{
// Save a copy
std::ofstream saved("encoded.jxl", std::ios::binary);
saved.write(reinterpret_cast<char*>(encoded), encoded_size);
}*/
// Decode back to pixels
JxlDecoderPtr dec = JxlDecoderMake(nullptr);
JxlDecoderSetCoalescing(dec.get(), JXL_TRUE); ////////
JxlDecoderSetInput(dec.get(), encoded, encoded_size);
JxlDecoderCloseInput(dec.get());
JxlDecoderSubscribeEvents(dec.get(), JXL_DEC_FRAME|JXL_DEC_FULL_IMAGE);
assert(JxlDecoderProcessInput(dec.get()) == JXL_DEC_FRAME);
size_t decoded_size;
JxlDecoderImageOutBufferSize(dec.get(), &format, &decoded_size);
static uint8_t decoded[sizeof data];
JxlDecoderSetImageOutBuffer(dec.get(), &format, decoded, sizeof decoded);
JxlDecoderGetFrameHeader(dec.get(), &fh);
std::cout << "Blend mode: " << fh.layer_info.blend_info.blendmode << '\n';
assert(JxlDecoderProcessInput(dec.get()) == JXL_DEC_FULL_IMAGE);
assert(JxlDecoderProcessInput(dec.get()) == JXL_DEC_SUCCESS);
assert(memcmp(data, decoded, sizeof data - 1) == 0);
std::cout << "Success\n";
return 0;
}
```
</p></details>
| JXLs with non-default blend mode for the first frame can fail to decode | https://api.github.com/repos/libjxl/libjxl/issues/1827/comments | 3 | 2022-10-09T12:52:56Z | 2024-04-22T12:31:36Z | https://github.com/libjxl/libjxl/issues/1827 | 1,402,265,634 | 1,827 |
[
"libjxl",
"libjxl"
] |
It would be useful to add these columns to benchmark_xl:
- standard deviation of maxnorm and pnorm: this allows tracking encoder consistency over a corpus (a change might slightly improve the geomean but also decrease consistency)
- ssimulacra2
- standard deviation of ssimulacra2
Perhaps it would also be useful to replace `bpp*pnorm` by `bpp*(pnorm + 1 stdev of pnorm)`, so improvements in consistency get reflected there too (since that is typically the column we look at when evaluating the overall effect of a change). | Add some columns to benchmark_xl | https://api.github.com/repos/libjxl/libjxl/issues/1821/comments | 0 | 2022-10-07T10:03:09Z | 2022-10-07T11:20:59Z | https://github.com/libjxl/libjxl/issues/1821 | 1,400,930,880 | 1,821 |
[
"libjxl",
"libjxl"
] | Hello,
this was discovered by Gentoo Linux developers: https://bugs.gentoo.org/875617
I am able to reproduce the problem with following compiler flags: `-Werror=odr -flto`
```
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:66:8: error: type ‘struct OpHlg’ violates the C++ One Definition Rule [-Werror=odr]
66 | struct OpHlg {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:62:8: note: a different type is defined in another translation unit
62 | struct OpHlg {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:78:11: note: the first difference of corresponding definitions is field ‘hlg_ootf_’
78 | HlgOOTF hlg_ootf_;
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:79:11: note: a field of same name but different type is defined in another translation unit
79 | HlgOOTF hlg_ootf_;
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/dec_tone_mapping-inl.h:132:7: note: type ‘struct HlgOOTF’ defined in anonymous namespace cannot match across the translation unit bounda ry
132 | class HlgOOTF {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:88:8: error: type ‘struct OpGamma’ violates the C++ One Definition Rule [-Werror=odr]
88 | struct OpGamma {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:89:8: note: a different type is defined in another translation unit
89 | struct OpGamma {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:89:15: note: the first difference of corresponding definitions is field ‘inverse_gamma’
89 | const float inverse_gamma;
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:90:15: note: a field with different name is defined in another translation unit
90 | const float gamma;
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:25:8: error: type ‘struct PerChannelOp’ violates the C++ One Definition Rule [-Werror=odr]
25 | struct PerChannelOp {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:25:8: note: a different type is defined in another translation unit
25 | struct PerChannelOp {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:34:6: note: the first difference of corresponding definitions is field ‘op’
34 | Op op;
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:34:6: note: a field of same name but different type is defined in another translation unit
34 | Op op;
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:88:8: note: type ‘struct OpGamma’ itself violates the C++ One Definition Rule
88 | struct OpGamma {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:89:8: note: the incompatible type is defined here
89 | struct OpGamma {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_to_linear.cc:68:8: warning: type of ‘Transform’ does not match original declaration [-Wlto-type-mismatch]
68 | void Transform(D d, T* r, T* g, T* b) const {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:72:8: note: ‘Transform’ was previously declared here
72 | void Transform(D d, T* r, T* g, T* b) const {
| ^
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/render_pipeline/stage_from_linear.cc:72:8: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
lto1: some warnings being treated as errors
lto-wrapper: fatal error: /usr/bin/x86_64-pc-linux-gnu-g++ returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
```
| Build error: type ‘struct OpHlg’ violates the C++ One Definition Rule [-Werror=odr] | https://api.github.com/repos/libjxl/libjxl/issues/1819/comments | 1 | 2022-10-07T09:55:16Z | 2024-03-04T10:12:55Z | https://github.com/libjxl/libjxl/issues/1819 | 1,400,921,176 | 1,819 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
AFAIK the JXL file has been losslessly compressed:
* https://github.com/libjxl/testdata/blob/main/jxl/splines.jxl
Depending on the arch libjxl is compiled I do not get the exact same decompressed buffer.
**To Reproduce**
On Debian/sid/amd64:
% djxl /usr/share/libjxl-testdata/jxl/splines.jxl /tmp/splines2.amd64.ppm && md5sum /tmp/splines2.amd64.ppm
JPEG XL decoder v0.7.0 [AVX2,SSE4,SSSE3,Unknown]
Read 59 compressed bytes.
Decoded to pixels.
320 x 320, 11.56 MP/s [11.56, 11.56], 1 reps, 8 threads.
77c4ccf6f23b320819610ebd5e1b2af0 /tmp/splines2.amd64.ppm
On Debian/sid/i386:
% djxl /usr/share/libjxl-testdata/jxl/splines.jxl /tmp/splines2.i386.ppm && md5sum /tmp/splines2.i386.ppm
JPEG XL decoder v0.7.0 [SSE4,SSSE3,Unknown]
Read 59 compressed bytes.
Decoded to pixels.
320 x 320, 8.68 MP/s [8.68, 8.68], 1 reps, 8 threads.
9ca111503859edaa6c3b1cb92ff657b7 /tmp/splines2.i386.ppm
**Expected behavior**
md5sum should match
**Screenshots**


**Environment**
- OS: Linux
- Compiler version: gcc-12.2
- CPU type: x86_64+x86
- cjxl/djxl version string: JPEG XL decoder v0.7.0 [AVX2,SSE4,SSSE3,Unknown] + JPEG XL decoder v0.7.0 [SSE4,SSSE3,Unknown]
**Additional context**
| Lossless decompression of libjxl-testdata/jxl/splines.jxl | https://api.github.com/repos/libjxl/libjxl/issues/1811/comments | 7 | 2022-10-05T06:38:32Z | 2022-10-05T09:43:15Z | https://github.com/libjxl/libjxl/issues/1811 | 1,397,310,628 | 1,811 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
cjxl fails encoding

(sha256sum of the file is 6ed7af5e245da443fcce378340b81db2c5e982d8ae9972e3c2d65f8a5d90f159)
`jpegtran -copy all` doesn't help.
seems like a test image for some color profile stuff but i can't tell if there is something wrong with it why jxl shouldn't be able to encode it.
**To Reproduce**
Steps to reproduce the behavior:
`cjxl -v -v v4esrgb.jpg v4esrgb.jxl`
**Expected behavior**
Likely shouldn't fail, or at least tell the reason why it does.
**Screenshots**
```
% cjxl -v -v Downloads/failed/v4esrgb.jpg v4esrgb.jxl
JPEG XL encoder v0.7.0 f95da131 [AVX2,SSE4,SSSE3,Unknown]
Read JPEG image with 27972 bytes.
Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data],
Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0).
JxlEncoderAddJPEGFrame() failed.
```
**Environment**
- OS: archlinux
- Compiler version: not sure, distro package
- CPU type: x86_64
- cjxl/djxl version string: v0.7.0 f95da131 [AVX2,SSE4,SSSE3,Unknown] | cjxl fails transcoding a jpeg | https://api.github.com/repos/libjxl/libjxl/issues/1810/comments | 5 | 2022-10-04T13:17:54Z | 2024-04-24T14:16:49Z | https://github.com/libjxl/libjxl/issues/1810 | 1,396,263,998 | 1,810 |
[
"libjxl",
"libjxl"
] | If I undesstand correctly, following command should encode the image as if it was 2x downsampled, so the resulting image would be displayed 2x upsampled.
`cjxl lena_std.png lena.jxl --resampling=2 --already_downsampled`
However, cjxl is failing with following error.
```
d:\>cjxl lena_std.png lena.jxl --resampling=2 --already_downsampled
JPEG XL encoder v0.8.0 fe7d16b [SSE4,SSSE3,Unknown]
Read 512x512 image, 473243 bytes, 139.1 MP/s
Encoding [VarDCT, d1.000, effort: 7],
JxlEncoderAddImageFrame() failed.
EncodeImageJXL() failed.
```
Am I missing something? | cjxl --already_downsampled is failing | https://api.github.com/repos/libjxl/libjxl/issues/1809/comments | 1 | 2022-10-04T08:47:38Z | 2025-01-18T15:43:10Z | https://github.com/libjxl/libjxl/issues/1809 | 1,395,890,352 | 1,809 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
Various descriptive image information is rather important in various image workflows.
One of the common tools to get such information is [exiftool](https://github.com/exiftool/exiftool)
However, currently exiftool doesn't support some of the basic technical info that's available for other image formats
**Describe the solution you'd like**
I'd like your `cjxl` tool to write some key image information into the resulting image's metadata, e.g.
- number of channels
- bit depth per channel
- lossy/lossless (there is already an issue for that https://github.com/libjxl/libjxl/issues/432)
- orientation
- color space
- progressive
- maybe even bpp (that's a good metric, pity it's not widespread)
- and some encoder options like effort and speed would also be a nice bonus)
This could be optional behind a cli flag to save a few bytes to those who don't care about such information
**Describe alternatives you've considered**
I've opened an issue with ExifTool https://github.com/exiftool/exiftool/issues/157, but a dev there mentioned that it might be too complicated for their tool to have to parse the bitstream to extract such info
Another alternative would be to parse the `jxlinfo` output, but that's also a rather poor substitute
**Additional context**
None
| Add image information as xmp metadata to avoid having to parse the bitstream | https://api.github.com/repos/libjxl/libjxl/issues/1806/comments | 13 | 2022-10-03T13:05:33Z | 2025-06-22T11:42:00Z | https://github.com/libjxl/libjxl/issues/1806 | 1,394,701,354 | 1,806 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
the file from an old issue from gitlab https://gitlab.com/wg1/jpeg-xl/-/issues/215 seems to be still failing to encode
compressing https://mega.nz/file/gExDAQRI#O52UgV1bpfNLIol09egKKtZ1tvhKo7ch1V0v3UGJJcM results in no visible error but it fails and exits with error code 1
**To Reproduce**
Steps to reproduce the behavior:
download the file & run `cjxl -v 20210424_201012.exr 20210424_201012.jxl`
**Expected behavior**
it either converts properly or fails with some error message
**Screenshots**
```
% cjxl -v 20210424_201012.exr 20210424_201012.jxl
JPEG XL encoder v0.8.0 f7c10956 [AVX2]
Getting pixel data.
% echo $?
1
% stat 20210424_201012.jxl
stat: cannot statx '20210424_201012.jxl': No such file or directory
```
**Environment**
- OS: archlinux
- Compiler version: idk
- CPU type: x86_64
- cjxl/djxl version string: v0.8.0 f7c10956 [AVX2]
**Additional context**
none
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| cjxl fails encoding exr file | https://api.github.com/repos/libjxl/libjxl/issues/1804/comments | 1 | 2022-10-01T20:18:24Z | 2022-10-03T12:52:57Z | https://github.com/libjxl/libjxl/issues/1804 | 1,393,540,363 | 1,804 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Does not build on armv7l like it does on x86_64
**To Reproduce**
```
mkdir builddir
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_LIBRARY_PATH=/usr/local/lib -DCMAKE_C_FLAGS='-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto' -DCMAKE_CXX_FLAGS='-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto' -DCMAKE_EXE_LINKER_FLAGS='-flto ' -DCMAKE_SHARED_LINKER_FLAGS='-flto ' -DCMAKE_STATIC_LINKER_FLAGS='-flto ' -DCMAKE_MODULE_LINKER_FLAGS='-flto ' -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE -DCMAKE_BUILD_TYPE=Release \
-DJPEGXL_ENABLE_BENCHMARK:BOOL='false' \
-DJPEGXL_ENABLE_EXAMPLES:BOOL='false' \
-DJPEGXL_ENABLE_FUZZERS:BOOL='false' \
-DJPEGXL_ENABLE_PLUGINS:BOOL='true' \
-DJPEGXL_ENABLE_VIEWERS:BOOL='false' \
-DJPEGXL_FORCE_SYSTEM_BROTLI:BOOL='true' \
-DJPEGXL_FORCE_SYSTEM_GTEST:BOOL='false' \
-DJPEGXL_FORCE_SYSTEM_HWY:BOOL='true' \
-DJPEGXL_BUNDLE_LIBPNG:BOOL='NO' \
-Wdev \
-G Ninja \
..
ninja -C builddir
```
**Expected behavior**
It builds!
**Environment**
- OS: ChromeOS/Chrombrew
- Compiler version: GCC 12.2
- CPU type: armv7l
**Additional context**
```
[102/367] Building CXX object lib/CMakeFiles/jxl_extras-static.dir/extras/packed_image_convert.cc.o
samu: job failed: /usr/local/bin/c++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_ENABLE_APNG=1 -DJPEGXL_ENABLE_EXR=1 -DJPEGXL_ENABLE_JPEG=1 -DJPEGXL_ENABLE_SJPEG=1 -DJXL_EXPORT="" -DJXL_THREADS_STATIC_DEFINE -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/usr/local/tmp/crew/libjxl.20220930142427.dir -I/usr/local/tmp/crew/libjxl.20220930142427.dir/lib/include -I/usr/local/tmp/crew/libjxl.20220930142427.dir/builddir/lib/include -I/usr/local/tmp/crew/libjxl.20220930142427.dir/third_party/sjpeg/src -isystem /usr/local/include/OpenEXR -O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto -fno-rtti -funwind-tables -fno-omit-frame-pointer -O3 -DNDEBUG -O2 -flto=auto -fno-fat-lto-objects -fPIC -fmacro-prefix-map=/usr/local/tmp/crew/libjxl.20220930142427.dir=. -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -fsized-deallocation -fno-exceptions -fmath-errno -DJPEGXL_ENABLE_SKCMS=1 -DJPEGXL_BUNDLE_SKCMS=1 -DHWY_SHARED_DEFINE -pthread -std=c++11 -MD -MT lib/CMakeFiles/jxl_extras-static.dir/extras/enc/jpg.cc.o -MF lib/CMakeFiles/jxl_extras-static.dir/extras/enc/jpg.cc.o.d -o lib/CMakeFiles/jxl_extras-static.dir/extras/enc/jpg.cc.o -c /usr/local/tmp/crew/libjxl.20220930142427.dir/lib/extras/enc/jpg.cc
/usr/local/tmp/crew/libjxl.20220930142427.dir/lib/extras/enc/jpg.cc: In function ‘jxl::Status jxl::extras::{anonymous}::EncodeWithLibJpeg(const jxl::extras::PackedImage&, const JxlBasicInfo&, const std::vector<unsigned char>&, std::vector<unsigned char>, size_t, const std::string&, std::vector<unsigned char>*)’:
/usr/local/tmp/crew/libjxl.20220930142427.dir/lib/extras/enc/jpg.cc:126:34: error: invalid conversion from ‘long unsigned int*’ to ‘size_t*’ {aka ‘unsigned int*’} [-fpermissive]
126 | jpeg_mem_dest(&cinfo, &buffer, &size);
| ^~~~~
| |
| long unsigned int*
In file included from /usr/local/tmp/crew/libjxl.20220930142427.dir/lib/extras/enc/jpg.cc:8:
/usr/local/include/jpeglib.h:979:28: note: initializing argument 3 of ‘void jpeg_mem_dest(j_compress_ptr, unsigned char**, size_t*)’
979 | EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
| ^~~
```
Build log:
[libjxl-0.7.0-armv7l.log](https://github.com/libjxl/libjxl/files/9685444/libjxl-0.7.0-armv7l.log)
| 0.7.0 Fails to build on armv7l w/libjpeg or libjpeg_turbo, and on x86_64,i686 w/ libjpeg_turbo | https://api.github.com/repos/libjxl/libjxl/issues/1802/comments | 12 | 2022-09-30T14:48:32Z | 2022-09-30T22:06:01Z | https://github.com/libjxl/libjxl/issues/1802 | 1,392,557,596 | 1,802 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
Currently quick cli file conversions are a bit cumbersome as they require you to pass an explicit output file name argument for no good reason ;)
**Describe the solution you'd like**
I'd prefer the default output file name to be chosen by the cjxl tool automatically by just changing the file extension of the output file
`cjxl input.jpg` should work as is (without an `OUTPUT` argument) and produce a lossless `input.jxl` — very convenient!
(and then the benchmarking folks would need to pass another flag instead for the cjxl tool not to create a file)
**Describe alternatives you've considered**
Creating some shell shim that would parse the `INPUT` path, get the file name, replace the extension, and pass the output file name
**Additional context**
None
| Add default output file name (input_name.jxl) without an OUTPUT argument | https://api.github.com/repos/libjxl/libjxl/issues/1796/comments | 11 | 2022-09-28T13:38:59Z | 2022-10-05T08:36:19Z | https://github.com/libjxl/libjxl/issues/1796 | 1,389,382,212 | 1,796 |
[
"libjxl",
"libjxl"
] | At the moment, it is not used for most (all?) allocations. Either use it for everything, or document this fact. | Clarify the behaviour of the JPEG XL memory manager | https://api.github.com/repos/libjxl/libjxl/issues/1795/comments | 2 | 2022-09-28T13:16:51Z | 2025-06-19T12:51:09Z | https://github.com/libjxl/libjxl/issues/1795 | 1,389,344,938 | 1,795 |
[
"libjxl",
"libjxl"
] | CodecInOut is only used in tests after the transition to using the API functions. Let's remove it and also use the API in the tests. | Remove CodecInOut | https://api.github.com/repos/libjxl/libjxl/issues/1794/comments | 0 | 2022-09-28T13:11:51Z | 2024-03-04T10:12:54Z | https://github.com/libjxl/libjxl/issues/1794 | 1,389,337,023 | 1,794 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
The build fails with the following error:
``` shell
…
112 | D d;
| ^
In function ‘D skx::cast(const S&) [with D = __vector(16) float; S = __vector(16) unsigned char]’,
inlined from ‘skx::F skx::F_from_U8(U8)’ at /home/yaron/.cache/yay/libjxl-git/src/libjxl/third_party/skcms/src/Transform_inl.h:611:19,
inlined from ‘void skx::exec_ops(const Op*, const void**, const char*, char*, int)’ at /home/yaron/.cache/yay/libjxl-git/src/libjxl/third_party/skcms/src/Transform_inl.h:772:30:
/home/yaron/.cache/yay/libjxl-git/src/libjxl/third_party/skcms/src/Transform_inl.h:114:14: warning: ‘d’ may be used uninitialized [-Wmaybe-uninitialized]
114 | d[i] = v[i];
| ~~~~~^~~~
/home/yaron/.cache/yay/libjxl-git/src/libjxl/third_party/skcms/src/Transform_inl.h: In function ‘void skx::exec_ops(const Op*, const void**, const char*, char*, int)’:
/home/yaron/.cache/yay/libjxl-git/src/libjxl/third_party/skcms/src/Transform_inl.h:112:7: note: ‘d’ was declared here
112 | D d;
| ^
make[2]: Leaving directory '/home/yaron/.cache/yay/libjxl-git/src/build'
make[1]: *** [CMakeFiles/Makefile2:1342: lib/CMakeFiles/jxl_dec-obj.dir/all] Error 2
[ 9%] Linking CXX static library libsjpeg.a
make[2]: Leaving directory '/home/yaron/.cache/yay/libjxl-git/src/build'
[ 9%] Built target sjpeg
make[2]: Leaving directory '/home/yaron/.cache/yay/libjxl-git/src/build'
[ 9%] Built target skcms-obj
make[2]: *** [lib/CMakeFiles/jxl_enc-obj.dir/build.make:146: lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_ar_control_field.cc.o] Error 1
make[2]: *** [lib/CMakeFiles/jxl_enc-obj.dir/build.make:104: lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_ac_strategy.cc.o] Error 1
make[2]: *** [lib/CMakeFiles/jxl_enc-obj.dir/build.make:118: lib/CMakeFiles/jxl_enc-obj.dir/jxl/enc_adaptive_quantization.cc.o] Error 1
make[2]: Leaving directory '/home/yaron/.cache/yay/libjxl-git/src/build'
make[1]: *** [CMakeFiles/Makefile2:1368: lib/CMakeFiles/jxl_enc-obj.dir/all] Error 2
make[1]: Leaving directory '/home/yaron/.cache/yay/libjxl-git/src/build'
make: *** [Makefile:146: all] Error 2
make: Leaving directory '/home/yaron/.cache/yay/libjxl-git/src/build'
==> ERROR: A failure occurred in build().
Aborting...
-> error making: libjxl-git
```
**To Reproduce**
Install using AUR (in my case `yay -Syyu`).
**Expected behavior**
Build should have been successful.
**Environment**
- OS: Manjaro KDE Linux, kernel 5.19.7, Plasma: 5.25.0, Framework: 5.97.0
- Compiler version: clang 14.0.6
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.7.0 f5d6e292 [AVX2,SSE4,SSSE3,Scalar]
**Additional context**
https://aur.archlinux.org/packages/libjxl-git
There are some reports about successes. | Cannot build using AUR | https://api.github.com/repos/libjxl/libjxl/issues/1792/comments | 1 | 2022-09-28T09:08:13Z | 2023-04-29T05:52:36Z | https://github.com/libjxl/libjxl/issues/1792 | 1,389,003,052 | 1,792 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I tried to transcode jpeg image to a jpeg xl image and reconstruct it to jpeg using libjxl API (v0.6.1).
Most jpeg images are successfully transcoded and reconstructed, but som jpeg failed to reconstructing from transcoded jpeg xl.
In my case, failed case has zero padding bits.
I think a padding_spot_limit, variable in jpeg_data.cc, is a reason.
While decoding, value of the padding_spot_limit was not equal to value of the padding_spot_limit while encoding.
And I found it the values of variables in CalculateMcuSize() such as width, height, max_h_samp_factor etc. are not assigned to correctly (It seems not assigned and just have initial values), and it make invalid value for the padding_spot_limit.
**To Reproduce**
Simple pseudo code that i test like below,
```c++
// transcoding jpeg -> jxl
vector<uint8_t> jpg = read("001.jpg");
JxlEncoder* encoder = JxlEncoderCreate(NULL);
JxlEncoderUseContainer(encoder, JXL_TRUE);
JxlEncoderStoreJPEGMetadata(encoder, JXL_TRUE);
JxlEncoderOptions* encoderOptions = JxlEncoderOptionsCreate(encoder, NULL);
// set some encoding options...
JxlEncoderAddJPEGFrame(encoderOptions, jpg->data(), jpg->size());
vector<uint8_t> jxl;
while (true) {
JxlEncoderStatus status = JxlEncoderProcessOutput(encoder, &nextOut, &availOut);
if(status == JXL_ENC_SUCCESS) break;
else if (status == JXL_ENC_ERROR) // handle error
else if (//.. handle each encoding status
}
JxlEncoderDestroy(encoder);
// reconstruction jpeg xl -> jpeg
JxlDecoder* decoder = JxlDecoderCreate(NULL);
JxlDecoderSubscribeEvents(decoder, JXL_DEC_BASIC_INFO | JXL_DEC_COLOR_ENCODING | JXL_DEC_FULL_IMAGE | JXL_DEC_JPEG_RECONSTRUCTION);
JxlDecoderSetInput(decoder, jxl.data(), jxl.size());
vector<uint8_t> reconJpg;
while (true) {
JxlDecoderStatus status = JxlDecoderProcessInput(decoder);
if (status == JXL_DEC_SUCCESS) break;
else if(status == JXL_DEC_ERROR) // handle error
else if(//... handle each decoding status
}
JxlDecoderDestroy(decoder);
```
and below is test jpg image that failed reconstructing.
[001](https://user-images.githubusercontent.com/24429565/192573060-12fd2d58-25c4-4f0e-939a-b75efd8268cc.jpg)
**Environment**
- OS: centos7.4
- CPU type: x86_64
| fail to reconstruct jpeg from jpeg xl | https://api.github.com/repos/libjxl/libjxl/issues/1790/comments | 6 | 2022-09-27T15:58:39Z | 2022-11-04T12:21:50Z | https://github.com/libjxl/libjxl/issues/1790 | 1,388,000,341 | 1,790 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
```
% lib/tests/jxl_test "--gtest_filter=JxlTest.RoundtripLargeFast"
Running main() from ./googletest/src/gtest_main.cc
Note: Google Test filter = JxlTest.RoundtripLargeFast
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from JxlTest
[ RUN ] JxlTest.RoundtripLargeFast
./lib/extras/dec/apng.cc:193: JXL_FAILURE: Failed to parse decimal
./lib/extras/dec/apng.cc:232: JXL_RETURN_IF_ERROR code=1: DecodeDecimal(&pos, encoded_end, &bytes_to_decode)
./lib/extras/dec/apng.cc:128: Couldn't parse 'Raw format type' text chunk
./lib/jxl/jxl_test.cc:465: Failure
Expected: (Roundtrip(&io, cparams, {}, &pool, &io2)) <= (450800u), actual: 450818 vs 450800
[ FAILED ] JxlTest.RoundtripLargeFast (4066 ms)
[----------] 1 test from JxlTest (4066 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (4066 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] JxlTest.RoundtripLargeFast
1 FAILED TEST
```
**To Reproduce**
Build jpeg-xl 0.7.0 release on ppc64el, ia64 or riscv64 under Debian/sid.
**Expected behavior**
Test should run without issue.
**Screenshots**
* https://buildd.debian.org/status/fetch.php?pkg=jpeg-xl&arch=ia64&ver=0.7.0-1&stamp=1664189468&raw=0
* https://buildd.debian.org/status/fetch.php?pkg=jpeg-xl&arch=riscv64&ver=0.7.0-1&stamp=1664192440&raw=0
* https://buildd.debian.org/status/fetch.php?pkg=jpeg-xl&arch=ia64&ver=0.7.0-1&stamp=1664189468&raw=0
**Environment**
- OS: linux/debian/sid
- Compiler version: gcc/12.2.0
- CPU type: ppc64el, riscv64 or ia64
- cjxl/djxl version string: 0.7.0 release
| Expected: (Roundtrip(&io, cparams, {}, &pool, &io2)) <= (450800u), actual: 450818 vs 450800 | https://api.github.com/repos/libjxl/libjxl/issues/1788/comments | 1 | 2022-09-27T10:04:27Z | 2022-09-27T19:53:14Z | https://github.com/libjxl/libjxl/issues/1788 | 1,387,481,233 | 1,788 |
[
"libjxl",
"libjxl"
] | One of the many features I like about JXL is the progressive encoding and decoding. So I run all my tests with `cjxl` with the `-p` flag on.
But I have no idea how to then see all the progressive steps that are available when decoding. Running `djxl --help` didn't help me that much. I understand that the flags `--allow_partial_files` and `--allow_more_progressive_steps` have something to do with it. But when I use those flags, I see nothing different happening. I was kinda hoping that it would then output a separate file for every progressive step.
I just really want to see what the quality and file-sizes of each progressive step would be. To see what steps could be useful in which use-cases. | Is there any documentation on how to test progressively encoded images? | https://api.github.com/repos/libjxl/libjxl/issues/1783/comments | 6 | 2022-09-25T05:06:55Z | 2025-05-21T14:25:26Z | https://github.com/libjxl/libjxl/issues/1783 | 1,384,898,643 | 1,783 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
The build fails on platforms where the C++ stdlib doesn't provide a sized variant of operator delete. Removing `-fsized-deallocation` from the flags added to `JPEGXL_INTERNAL_FLAGS` in `lib/CMakeLists.txt` fixes the problem.
**To Reproduce**
Steps to reproduce the behavior:
Try building libjxl 0.7.0 on an affected platform, for example macOS 10.11 with Clang 14 installed via MacPorts.
**Expected behavior**
`-fsized-deallocation` is only added to the compiler flags if it works, and the build succeeds.
**Screenshots**
Link error on macOS 10.11:
```
Undefined symbols for architecture x86_64:
"operator delete(void*, unsigned long)", referenced from:
jpegxl::(anonymous namespace)::ResizeableParallelRunner::SetNumThreads(unsigned long) in resizable_parallel_runner.cc.o
_JxlResizableParallelRunnerDestroy in resizable_parallel_runner.cc.o
__ZNSt3__114__thread_proxyB6v15001INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN6jpegxl12_GLOBAL__N_124ResizeableParallelRunner13SetNumThreadsEmEUlvE_EEEEEPvSC_ in resizable_parallel_runner.cc.o
std::__1::vector<std::__1::thread, std::__1::allocator<std::__1::thread> >::__append(unsigned long) in resizable_parallel_runner.cc.o
std::__1::vector<std::__1::thread, std::__1::allocator<std::__1::thread> >::reserve(unsigned long) in thread_parallel_runner_internal.cc.o
jpegxl::ThreadParallelRunner::~ThreadParallelRunner() in thread_parallel_runner_internal.cc.o
void std::__1::vector<std::__1::thread, std::__1::allocator<std::__1::thread> >::__emplace_back_slow_path<void (&)(jpegxl::ThreadParallelRunner*, int), jpegxl::ThreadParallelRunner*, unsigned int&>(void (&&&)(jpegxl::ThreadParallelRunner*, int), jpegxl::ThreadParallelRunner*&&, unsigned int&&&) in thread_parallel_runner_internal.cc.o
```
**Environment**
- OS: macOS 10.11.6
- Compiler version: Clang 14.0.6
- CPU type: x86_64
- cjxl/djxl version string: N/A
**Additional context**
Sized deallocation appears to be a C++14 feature, according to `clang++ --help`:
```
-fsized-deallocation Enable C++14 sized global deallocation functions
```
Using it unconditionally seems at odds with the C++11 requirement declared in the main `CMakeLists.txt`. | -fsized-deallocation causes the build to fail on some systems | https://api.github.com/repos/libjxl/libjxl/issues/1782/comments | 0 | 2022-09-24T23:51:37Z | 2022-09-28T08:28:02Z | https://github.com/libjxl/libjxl/issues/1782 | 1,384,844,382 | 1,782 |
[
"libjxl",
"libjxl"
] | Using Visual Studio v17.2.6; cl.exe 19.32.31332.
In Git Bash:
```sh
./deps.sh
```
In x64 dev prompt:
```
mkdir build && cd build
cmake .. -GNinja -DBUILD_TESTING=OFF
ninja
```
<details>
<summary>CMake output:</summary>
```
-- The C compiler identification is MSVC 19.32.31332.0
-- The CXX compiler identification is MSVC 19.32.31332.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test JPEGXL_EMSCRIPTEN
-- Performing Test JPEGXL_EMSCRIPTEN - Failed
-- CMAKE_SYSTEM_PROCESSOR is AMD64
-- Performing Test CXX_FUZZERS_SUPPORTED
-- Performing Test CXX_FUZZERS_SUPPORTED - Failed
-- Performing Test CXX_CONSTRUCTOR_ALIASES_SUPPORTED
-- Performing Test CXX_CONSTRUCTOR_ALIASES_SUPPORTED - Failed
-- Performing Test CXX_MACRO_PREFIX_MAP
-- Performing Test CXX_MACRO_PREFIX_MAP - Failed
-- Performing Test CXX_NO_RTTI_SUPPORTED
-- Performing Test CXX_NO_RTTI_SUPPORTED - Failed
-- Found PkgConfig: C:/Users/Johannes/win-packages/perl/perl/bin/pkg-config.bat (found version "0.26")
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED
-- Performing Test JXL_HWY_DISABLED_TARGETS_FORCED - Failed
-- Compiled IDs C:MSVC, C++:MSVC
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS
-- Performing Test ATOMICS_LOCK_FREE_INSTRUCTIONS - Success
-- Performing Test HWY_EMSCRIPTEN
-- Performing Test HWY_EMSCRIPTEN - Failed
-- Performing Test HWY_RISCV
-- Performing Test HWY_RISCV - Failed
CMake Deprecation Warning at third_party/brotli/CMakeLists.txt:5 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Performing Test BROTLI_EMSCRIPTEN
-- Performing Test BROTLI_EMSCRIPTEN - Failed
-- Compiler is not EMSCRIPTEN
-- Looking for log2
-- Looking for log2 - found
-- Performing Test CXX_WPSABI_SUPPORTED
-- Performing Test CXX_WPSABI_SUPPORTED - Failed
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
CMake Deprecation Warning at third_party/sjpeg/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Performing Test SJPEG_HAVE_FLAG___SSE2__
-- Performing Test SJPEG_HAVE_FLAG___SSE2__ - Failed
-- Performing Test SJPEG_HAVE_FLAG___SSE2__
-- Performing Test SJPEG_HAVE_FLAG___SSE2__ - Failed
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__ - Failed
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__
-- Performing Test SJPEG_HAVE_FLAG___ARM_NEON__ - Failed
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Found OpenGL: opengl32
-- Checking for module 'glut'
-- Can't find glut.pc in any of C:/Users/Johannes/win-packages/perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
-- Performing Test COMPILER_HAS_DEPRECATED
-- Performing Test COMPILER_HAS_DEPRECATED - Success
-- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS
-- Performing Test LINKER_SUPPORT_EXCLUDE_LIBS - Success
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) (Required is at least version "5.1")
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Checking for module 'OpenEXR'
-- Can't find OpenEXR.pc in any of C:/Users/Johannes/win-packages/perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Warning at CMakeLists.txt:457 (message):
asciidoc was not found, the man pages will not be installed.
-- Building with JPEGXL_VERSION=2ee9886a (auto-updated)
-- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
-- Checking for module 'libwebp'
-- Found libwebp, version 1.1.0
CMake Warning at tools/CMakeLists.txt:253 (message):
Using dynamic libwebp
-- Checking for module 'libavif'
-- Can't find libavif.pc in any of C:/Users/Johannes/win-packages/perl/c/lib/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'
-- Building tools: cjxl;djxl;jxlinfo;cjpeg_hdr;benchmark_xl
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Johannes/source/repos/libjxl/build
```
</details>
Rerunning with `ninja -j1` (far too many warnings in the full build output log):
```
[3/4] Building CXX object tools\CMakeFiles\benchmark_xl.dir\benchmark\benchmark_codec_webp.cc.obj
FAILED: tools/CMakeFiles/benchmark_xl.dir/benchmark/benchmark_codec_webp.cc.obj
C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1432~1.313\bin\Hostx64\x64\cl.exe /nologo /TP -DBENCHMARK_WEBP -DHWY_STATIC_DEFINE -DJPEGXL_ENABLE_SJPEG=1 -DJXL_EXPORT="" -DJXL_THREADS_STATIC_DEFINE -IC:\Users\Johannes\source\repos\libjxl -IC:\Users\Johannes\source\repos\libjxl\lib\include -IC:\Users\Johannes\source\repos\libjxl\build\lib\include -IC:\Users\Johannes\source\repos\libjxl\third_party\brotli\c\include -IC:\Users\Johannes\source\repos\libjxl\third_party\highway "/D_CRT_SECURE_NO_WARNINGS /W1" /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /Fotools\CMakeFiles\benchmark_xl.dir\benchmark\benchmark_codec_webp.cc.obj /Fdtools\CMakeFiles\benchmark_xl.dir\ /FS -c C:\Users\Johannes\source\repos\libjxl\tools\benchmark\benchmark_codec_webp.cc
C:\Users\Johannes\source\repos\libjxl\lib/jxl/base/status.h(127): warning C4646: function declared with 'noreturn' has non-void return type
C:\Users\Johannes\source\repos\libjxl\lib/jxl/fields.h(51): warning C4244: 'return': conversion from 'uint64_t' to 'uint32_t', possible loss of data
C:\Users\Johannes\source\repos\libjxl\lib/jxl/frame_header.h(106): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
C:\Users\Johannes\source\repos\libjxl\lib/jxl/quantizer.h(88): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Johannes\source\repos\libjxl\lib/jxl/quantizer.h(89): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
C:\Users\Johannes\source\repos\libjxl\tools/args.h(45): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\Johannes\source\repos\libjxl\tools/cmdline.h(354): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
C:\Users\Johannes\source\repos\libjxl\tools\benchmark\benchmark_codec_webp.cc(9): fatal error C1083: Cannot open include file: 'webp/decode.h': No such file or directory
ninja: build stopped: subcommand failed.
```
So it can't find `webp/decode.h`, which isn't too surprising because it doesn't seem to exist, even after downloading the dependencies with `deps.sh`. The next include, `webp/encode.h`, also doesn't exist. But from the CMake output, it can be seen that the `libwebp` target is found .. | Build failure on MSVC 2022 | https://api.github.com/repos/libjxl/libjxl/issues/1781/comments | 2 | 2022-09-24T18:11:22Z | 2022-09-26T12:22:36Z | https://github.com/libjxl/libjxl/issues/1781 | 1,384,767,600 | 1,781 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
CMYK JXL files are not rendered with correct colors. Even when I decode it to PNG, the colors are still incorrect.
**To Reproduce**
1. Download the [test file](https://github.com/libjxl/conformance/blob/master/testcases/cmyk_layers/input.jxl?raw=true) from the conformance repo.
2. `djxl input.jxl output.png`
**Actual behavior**
A warning is displayed during `djxl`: `libpng warning: profile '1': 'CMYK': invalid ICC profile color space`
`input.jxl` and `output.png` both have incorrect colors when viewed in image viewer (e.g. Gwenview), mpv player, etc.
https://user-images.githubusercontent.com/103918092/192083872-38b55a79-570f-44f9-827a-4cf0979c2df8.png
**Expected behavior**
https://github.com/libjxl/conformance/blob/master/testcases/cmyk_layers/ref.png?raw=true
**Environment**
`JPEG XL decoder v0.7.0 f95da131 [AVX2,SSE4,SSSE3,Unknown]`, Arch Linux package, x86_64
| libjxl fails to render cmyk_layers / export it to PNG with correct colors | https://api.github.com/repos/libjxl/libjxl/issues/1780/comments | 1 | 2022-09-24T06:43:45Z | 2024-04-22T09:49:00Z | https://github.com/libjxl/libjxl/issues/1780 | 1,384,550,852 | 1,780 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
Nope
**Describe the solution you'd like**
Add "JXL" text to the file header for future identification of extension less files and/or data recovery
**Describe alternatives you've considered**
NA
**Additional context**
| Add "JXL" text to the file header for future easy identification of extension less files and/or data recovery | https://api.github.com/repos/libjxl/libjxl/issues/1779/comments | 2 | 2022-09-24T04:00:49Z | 2022-09-26T11:51:53Z | https://github.com/libjxl/libjxl/issues/1779 | 1,384,508,118 | 1,779 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I followed the libjxl documentation of msys2 to build libjxl, I installed packages and built successfully.
Used CMake build commands of MSYS2 PKGBUILD:
```
CFLAGS="-DHWY_COMPILE_ONLY_SCALAR" CXXFLAGS="-DHWY_COMPILE_ONLY_SCALAR" cmake -DCMAKE_INSTALL_PREFIX=/mingw64 -DJPEGXL_ENABLE_PLUGINS=ON -DBUILD_TESTING=OFF -DJPEGXL_WARNING_AS_ERRORS=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=OFF -DJPEGXL_FORCE_SYSTEM_HWY=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_TCMALLOC=OFF -DJPEGXL_ENABLE_OPENEXR=OFF ..
```
Second chance of libjxl documentation command:
```
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_GTEST=ON -DCMAKE_INSTALL_PREFIX=/mingw64 ..
```
On FFmpeg, I tried to configure to enable libjxl with FFmpeg repository, gave me this:
```
require_pkg_config libjxl libjxl >= 0.7.0 jxl/decode.h JxlDecoderVersion
check_pkg_config libjxl libjxl >= 0.7.0 jxl/decode.h JxlDecoderVersion
test_pkg_config libjxl libjxl >= 0.7.0 jxl/decode.h JxlDecoderVersion
pkg-config --exists --print-errors libjxl >= 0.7.0
check_func_headers jxl/decode.h JxlDecoderVersion -IC:/msys64/mingw64/include -DHWY_STATIC_DEFINE -LC:/msys64/mingw64/lib -ljxl
test_ld cc -IC:/msys64/mingw64/include -DHWY_STATIC_DEFINE -LC:/msys64/mingw64/lib -ljxl
test_cc -IC:/msys64/mingw64/include -DHWY_STATIC_DEFINE -LC:/msys64/mingw64/lib
BEGIN /tmp/ffconf.WmYweOpw/test.c
1 #include <jxl/decode.h>
2 #include <stdint.h>
3 long check_JxlDecoderVersion(void) { return (long) JxlDecoderVersion; }
4 int main(void) { int ret = 0;
5 ret |= ((intptr_t)check_JxlDecoderVersion) & 0xFFFF;
6 return ret; }
END /tmp/ffconf.WmYweOpw/test.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c11 -fomit-frame-pointer -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include -DHWY_STATIC_DEFINE -LC:/msys64/mingw64/lib -c -o /tmp/ffconf.WmYweOpw/test.o /tmp/ffconf.WmYweOpw/test.c
C:/msys64/tmp/ffconf.WmYweOpw/test.c: In function 'check_JxlDecoderVersion':
C:/msys64/tmp/ffconf.WmYweOpw/test.c:3:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
3 | long check_JxlDecoderVersion(void) { return (long) JxlDecoderVersion; }
| ^
gcc -Wl,--nxcompat,--dynamicbase -Wl,--high-entropy-va -Wl,--as-needed -Wl,--image-base,0x140000000 -IC:/msys64/mingw64/include -DHWY_STATIC_DEFINE -LC:/msys64/mingw64/lib -o /tmp/ffconf.WmYweOpw/test.exe /tmp/ffconf.WmYweOpw/test.o -ljxl
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/tmp/ffconf.WmYweOpw/test.o:test.c:(.text+0x3): undefined reference to `__imp_JxlDecoderVersion'
collect2.exe: error: ld returned 1 exit status
ERROR: libjxl >= 0.7.0 not found using pkg-config
```
**To Reproduce**
Steps to reproduce the behavior:
1. Clone libjxl with recursive
2. Making directory build & cd build
3. Configure with CMake (both commands)
4. Build and install libjxl
5. Configure `./configure --enable-libjxl` of FFmpeg build.
**Expected behavior**
Configure success for FFmpeg.
**Screenshots**
If applicable, add screenshots or example input/output images to help explain your problem.
**Environment**
- OS: Windows 11 Pro 21H2
- Compiler version: GCC 12.2.0 (Rev1)
- CPU type: x86_64
- cjxl/djxl version string: cjxl/djxl v0.8.0 https://github.com/libjxl/libjxl/commit/2ee9886a7c3b31564f7431812bb6c6a4a03927b2
**Additional context**
Add any other context about the problem here.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
- Martin Eesmaa | ffmpeg does not configure my libjxl build on Windows MSYS2 | https://api.github.com/repos/libjxl/libjxl/issues/1778/comments | 4 | 2022-09-24T00:26:40Z | 2022-10-06T09:22:16Z | https://github.com/libjxl/libjxl/issues/1778 | 1,384,458,425 | 1,778 |
[
"libjxl",
"libjxl"
] | The attached file [rgbau.jxl.zip](https://github.com/libjxl/libjxl/files/9625401/rgbau.jxl.zip) has num_color_channels = 3, num_extra_channels = 2, with the first extra channel being JXL_CHANNEL_OPTIONAL and the second one JXL_CHANNEL_ALPHA
Yet ``jxlinfo -v rgbua.jxl`` reports
```
[...]
JPEG XL image, 20x20, (possibly) lossless, 8-bit RGBA+Optional
num_color_channels: 3
num_extra_channels: 2
extra channel 0:
type: Optional
bits_per_sample: 8
name: Band 4
extra channel 1:
type: Alpha
bits_per_sample: 8
name: Band 5
alpha_premultiplied: 0 (Non-premultiplied)
```
Note ``RGBA+Optional``. I would rather expect ``RGB+Optional+Alpha``
On the decoding side, JxlBasicInfo.alpha_bits is set to 8, whether I would expect it to be 0. The documentation of the num_extra_channels, alpha_bits is not super clear if the "main alpha channel" is supposed to be the first extra channel, or could be any. In any case, it seems checking the type of the first extra channel with JxlDecoderGetExtraChannelInfo() is needed.
**Environment**
- OS: Ubuntu 20.04
- Compiler version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
- CPU type: x86_64
- cjxl/djxl version string: JPEG XL encoder v0.7.0 5e7ed06 [AVX2,SSE4,SSSE3,Scalar]
| JxlBasicInfo.alpha_bits set even for a R,G,B,undefined,alpha file | https://api.github.com/repos/libjxl/libjxl/issues/1773/comments | 6 | 2022-09-22T11:57:56Z | 2024-04-22T09:48:59Z | https://github.com/libjxl/libjxl/issues/1773 | 1,382,327,765 | 1,773 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Building libjxl fails.
**To Reproduce**
Install asciidoc and run cmake. Configuration succeeds, but the build step fails:
```
[1/215] Generating djxl.1
FAILED: djxl.1 C:/msys64/home/kmilos/MINGW-packages/mingw-w64-libjxl/src/build-UCRT64/djxl.1
cmd.exe /C "cd /D C:\msys64\home\kmilos\MINGW-packages\mingw-w64-libjxl\src\build-UCRT64 && C:\msys64\ucrt64\bin\python3.10.exe C:/msys64/ucrt64/bin/a2x.exe --format manpage --destination-dir="C:/msys64/home/kmilos/MINGW-packages/mingw-w64-libjxl/src/build-UCRT64" C:/msys64/home/kmilos/MINGW-packages/mingw-w64-libjxl/src/libjxl/doc/man/djxl.txt"
SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\msys64\ucrt64\bin\a2x.exe on line 2, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details
```
**Expected behavior**
Build succeeds and man pages are available.
Perhaps `C:\msys64\ucrt64\bin\python3.10.exe C:/msys64/ucrt64/bin/a2x.exe` is the culprit: should be trying to interpret a Python script (`C:/msys64/ucrt64/bin/a2x-script.py` maybe, or `C:/msys64/ucrt64/lib/python3.10/site-packages/asciidoc/a2x.py`?), not a binary?
**Environment**
- OS: Windows (MSYS2 UCRT64)
- Compiler version: gcc 12.2.0
- CPU type: x86_64
- cjxl/djxl version string: 0.7.0
| Unable to build man pages for MinGW | https://api.github.com/repos/libjxl/libjxl/issues/1772/comments | 1 | 2022-09-22T08:20:10Z | 2024-03-04T10:12:53Z | https://github.com/libjxl/libjxl/issues/1772 | 1,382,032,703 | 1,772 |
[
"libjxl",
"libjxl"
] | **To Reproduce**
`cjxl -m 1 -I 0 -P 0 -e 9 -g 3 --patches=0 image.png image.jxl`
**Actual behavior**
`JxlEncoderProcessOutput failed.`
**Expected behavior**
Show a clearer message so that the user knows that the combination of lossy modular with no MA tree learning is not yet implemented. | Lossy modular with no MA tree learning fails with a cryptic error | https://api.github.com/repos/libjxl/libjxl/issues/1765/comments | 2 | 2022-09-21T05:15:18Z | 2025-01-17T23:18:57Z | https://github.com/libjxl/libjxl/issues/1765 | 1,380,329,897 | 1,765 |
[
"libjxl",
"libjxl"
] | I'm implementing support for lossy 16bit RGB compression with JXL and am encountering an issue. However I can reproduce my issue with cjxl.
Test image (16bit png, so doesn't render in gihub):

Test setup: `cjxl extract.png extract.jxl` , i.e. expecting compression with distance=1, visually lossless
Expected result: visually lossless jxl
Observed result: 1.5kb jxl image, severlely lossy and barely recognisable
Attached screenshots reconverted to 8bits for visualization:
Original:

JXL:

Is this configuration expected to be supported? If so how?
| Guidance for lossy 16bit compression | https://api.github.com/repos/libjxl/libjxl/issues/1763/comments | 14 | 2022-09-20T09:59:53Z | 2024-09-16T08:07:52Z | https://github.com/libjxl/libjxl/issues/1763 | 1,379,146,947 | 1,763 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I was converting my library from JPG to JXL and stumbled upon a few files where cjxl would not produce any output, even though it returns with 0 exist codes and shows as if everything is correct
**To Reproduce**
1.Download [this file](https://user-images.githubusercontent.com/1924829/190955641-5fbe7bc6-b2b1-4745-8c68-861c0eab6967.jpg) and rename it to 1.jpg
2. Run `cjxl 1.jpg 1.jxl`
**Expected behavior**
A file with a name 1.jxl is created.
If the file is not created, at least the returned status code should not be 0.
**Actual behavior**
No file is created.
Returned status code is 0.
**Screenshots**

**Environment**
- OS: Manjaro Linux
- Compiler version: not sure
- CPU type: x86_64, AMD Ryzen 7 3700X 8-Core Processor
- cjxl/djxl version string: cjxl v0.6.1 a205468b [AVX2,SSE4,SSSE3,Scalar]
**Additional context**
Add any other context about the problem here. | No output file produced when converting a JPG file, cjxl exists without error | https://api.github.com/repos/libjxl/libjxl/issues/1759/comments | 3 | 2022-09-19T05:43:03Z | 2022-09-19T22:30:32Z | https://github.com/libjxl/libjxl/issues/1759 | 1,377,430,583 | 1,759 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
While decoding with djxl works fine, gimp shows some weird artifacts when using resampling while encoding.
**To Reproduce**
Steps to reproduce the behavior:
Encode a file with
`cjxl -m -e 9 --resampling=2 test.png test.jxl`
**Expected behavior**
Gimp should decode the files the same as djxl
**Screenshots**

**Environment**
- OS: Linux
- Compiler version: Unknown (Arch Linux binary package)
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.6.1 a205468b [AVX2,SSE4,SSSE3]
- Gimp version string: GIMP 2.10.32


| Decoding error in gimp when using modular with resampling | https://api.github.com/repos/libjxl/libjxl/issues/1758/comments | 3 | 2022-09-19T02:50:34Z | 2024-03-04T10:12:52Z | https://github.com/libjxl/libjxl/issues/1758 | 1,377,318,141 | 1,758 |
[
"libjxl",
"libjxl"
] | Could you please tag all future release major.minor.patch instead of major.minor?
Thanks. | Keep tagged release major.minor.patch | https://api.github.com/repos/libjxl/libjxl/issues/1757/comments | 2 | 2022-09-18T13:35:57Z | 2022-09-21T09:16:09Z | https://github.com/libjxl/libjxl/issues/1757 | 1,377,061,642 | 1,757 |
[
"libjxl",
"libjxl"
] | It seems I can't compile without enabling -DJXL_HWY_DISABLED_TARGETS_FORCED:BOOL=ON.
If I don't I get the following errors:
```
<command-line>: error: 'HWY_SVE_256' was not declared in this scope; did you mean 'HWY_SVE2'?
<command-line>: error: 'HWY_SVE2_128' was not declared in this scope; did you mean 'HWY_SVE2'?
```
What does it change? Will I lose something if I enable that?
highway: 1.0.1
libjxl: 7c0ce231165db47a6a065e01afd7d5083e8605a6 | What does JXL_HWY_DISABLED_TARGETS_FORCED do? | https://api.github.com/repos/libjxl/libjxl/issues/1756/comments | 0 | 2022-09-18T12:43:02Z | 2022-10-06T08:48:43Z | https://github.com/libjxl/libjxl/issues/1756 | 1,377,043,993 | 1,756 |
[
"libjxl",
"libjxl"
] | cjxl doesn't accept --resampling=2, it complains it is an invalid resampling value. Other resampling values do work.
```
d:\>cjxl lena_std.png lena.jxl --resampling=2
JPEG XL encoder v0.8.0 7c0ce23 [SSE4,SSSE3,Unknown]
Invalid flag value for --resampling: Valid values are {-1, 1, 2, 4, 8}.
d:\>cjxl lena_std.png lena.jxl --resampling=4
JPEG XL encoder v0.8.0 7c0ce23 [SSE4,SSSE3,Unknown]
Read 512x512 image, 473243 bytes, 139.0 MP/s
Encoding [VarDCT, d1.000, effort: 7],
Compressed to 5684 bytes (0.173 bpp).
512 x 512, 14.85 MP/s [14.85, 14.85], 1 reps, 4 threads.
```
cjxl should allow using --resampling=2 according to documentation.
It looks like there is a mistake in cjxl_main.cc
https://github.com/libjxl/libjxl/blob/7c0ce231165db47a6a065e01afd7d5083e8605a6/tools/cjxl_main.cc#L834
The valuie 2 is missing in the check.
It looks like the same problem may affect ec_resampling as well as there is also value 2 missing in the check. | cjxl not accepting --resampling=2 | https://api.github.com/repos/libjxl/libjxl/issues/1755/comments | 1 | 2022-09-18T10:51:56Z | 2024-03-04T10:12:52Z | https://github.com/libjxl/libjxl/issues/1755 | 1,377,016,324 | 1,755 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
My assumptions are that the release version will also be tagged as 0.7 like the previous 0.6 release and as can be seen in the current release candidate. The tarball is versioned `0.7rc` but the actual program output of e.g. `djxl --version` is reporting `0.7.0`, the library is also versioned `libjxl.so.0.7.0` and the pkg-config information also reads `Version: 0.7.0`, so it would be nice and consistent if the actual release & tarball could also be tagged & released as `0.7.0` instead of just `0.7`.
**To Reproduce**
* Download & compile 0.7rc
* See version and library and libjxl.pc report 0.7.0 instead of 0.7
**Expected behavior**
* tag/tarball are named 0.7.0 instead of 0.7
**Screenshots**
none
**Environment**
- OS: Linux
- Compiler version: GCC 12.2.0
- CPU type: x86_64
- cjxl/djxl version string: cjxl/djxl v0.7.0 [AVX2]
**Additional context**
none | version discrepancy between tag/tarball and version/library/pkg-config | https://api.github.com/repos/libjxl/libjxl/issues/1751/comments | 3 | 2022-09-15T10:16:31Z | 2022-10-05T12:00:34Z | https://github.com/libjxl/libjxl/issues/1751 | 1,374,285,338 | 1,751 |
[
"libjxl",
"libjxl"
] | hey everyone,
I got these build errors when compiling libjxl on armv7:
```
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10995:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_u32(uint32_t*, uint32x4_t)’: target specific option mismatch
```
I tried to export ` -DJPEGXL_FORCE_NEON=ON ` , without success.
I'm forced to use system highway with neon enabled, as it won't compile without neon optimizations. I checked out and compiled it at the exact same commit you're using ( https://github.com/google/highway/tree/22e3d7276f4157d4a47586ba9fd91dd6303f441a )
anything else I can try to config, or is this a bug?
**Environment**
- OS: Linux x86_64 host, armv7a target
- Compiler version: gcc-10.4.0
- CPU type: x86_64 host, armv7a target
| libjxl fails to compile on armv7 | https://api.github.com/repos/libjxl/libjxl/issues/1748/comments | 10 | 2022-09-15T06:26:15Z | 2023-03-06T08:01:43Z | https://github.com/libjxl/libjxl/issues/1748 | 1,373,994,534 | 1,748 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
```
-d maxError, --distance=maxError
Max. butteraugli distance, lower = higher quality. Range: 0 .. 25.
0.0 = mathematically lossless. Default for already-lossy input (JPEG/GIF).
1.0 = visually lossless. Default for other input.
```
This help text gives the impression that selecting -d 1 should lead to a smaller file size than the default -d 0 which is selected for a gif, by dropping some details.
But just adding "-d 1" will lead to a VarDCT encoding instead of a Modular encoding and thus to a *significantly* larger file size.
**To Reproduce**
```sh
$ wget https://web.archive.org/web/20240731143411/https://discord.com/assets/e4ec7c5d7af5342f57347c9ada429fba.gif
$ cjxl e4ec7c5d7af5342f57347c9ada429fba.gif e4ec7c5d7af5342f57347c9ada429fba_d0.jxl -e 9 2>/dev/null
$ du -h e4ec7c5d7af5342f57347c9ada429fba_d0.jxl
2.6M e4ec7c5d7af5342f57347c9ada429fba_d0.jxl
```
And the same procedure, just with '-d 1' added:
```sh
$ cjxl e4ec7c5d7af5342f57347c9ada429fba.gif e4ec7c5d7af5342f57347c9ada429fba_d1.jxl -e 9 -d 1 2>/dev/null
$ du -h e4ec7c5d7af5342f57347c9ada429fba_d1.jxl
8.6M e4ec7c5d7af5342f57347c9ada429fba_d1.jxl
```
**Expected behavior**
The encoder should not change the encoding type just because the user overrides the quality selection. Instead setting the _quality/distance_ should only affect the _quality/distance_, nothing else.
**Environment**
- OS: Linux
- Compiler version: Unknown; installed as binary package under Arch Linux
- CPU type: x86_64
- cjxl/djxl version string: `cjxl v0.6.1 a205468b [AVX2,SSE4,SSSE3]`
Edit: Fixed gif link with the backup by the internet archive. | -d 1 is much larger than (implicit) -d 0 due to silent switch to VarDCT | https://api.github.com/repos/libjxl/libjxl/issues/1746/comments | 13 | 2022-09-14T17:46:16Z | 2025-01-18T02:38:13Z | https://github.com/libjxl/libjxl/issues/1746 | 1,373,364,524 | 1,746 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
One of the trials I did to support HDR in Krita involved asking libjxl to convert the pixels' data type, from whatever their original format, to `JXL_TYPE_FLOAT`. This saves me from having to convert the pixels myself before linearizing (our HDR machinery expect floating point images):
```
case JXL_TRANSFER_FUNCTION_PQ: {
dbgFile << "linearizing from PQ";
d.linearizePolicy = LinearizePolicy::LinearFromPQ;
d.m_pixelFormat.data_type = JXL_TYPE_FLOAT;
return TRC_LINEAR;
}
```
**Widening** conversions through this function seem to introduce denormal values at arbitrary locations; they are mostly invisible to the naked eye, until the resulting canvas is tonemapped with e.g. OpenColorIO, which will clamp those invalid pixels to black.
**Narrowing** conversions will instead turn the pixel data into garbage.
**To Reproduce**
Download image number 17 from https://people.csail.mit.edu/ericchan/hdr/hdr-jxl.php. This image is identified by jxlinfo as:
```
JPEG XL file format container (ISO/IEC 18181-2)
JPEG XL image, 2048x2048, lossy, 16-bit RGB
Color space: RGB, D65, Rec.2100 primaries, PQ transfer function, rendering intent: Perceptual
Uncompressed Exif metadata: 918 bytes
Brotli-compressed XML metadata: 6130 compressed bytes
unknown box: type: "hrgm" size: 75863
layer: full image size, name: "main"
```
Open it in a JXL compliant viewer, but beforehand, in the pixel format provided to libjxl set `data_type` to e.g. `JXL_TYPE_FLOAT`.
**Expected behavior**
Given that the original image has no NaN or infinite values, no NaN or infinite values should be found in the extracted bitmap.
**Screenshots**
`JXL_TYPE_UINT16` to:
| `JXL_TYPE_FLOAT16` | `JXL_TYPE_FLOAT32` | Manual conversion |
| ---------------------- | -----------------------|--------------------|
|  |  |  |
**Environment**
- OS: Windows 10 21H2
- Compiler version: Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31721 for x64
- CPU type: x86_64 znver1
- cjxl/djxl version string: `cjxl v0.7.0 0.7.0 [AVX2,SSE4,SSSE3,Unknown]`
**Additional context**
Krita's HDR JXL support is not yet available except for floating point, linear gamma, ICC profile images. I'm working on it, hence why this bug report is being made.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| JxlDecoderSetImageOutCallback cannot reliably convert the pixel data type | https://api.github.com/repos/libjxl/libjxl/issues/1745/comments | 2 | 2022-09-14T15:51:23Z | 2024-03-04T10:12:52Z | https://github.com/libjxl/libjxl/issues/1745 | 1,373,224,500 | 1,745 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Encoding an image with `cjxl -v -q 0` fails. The error message "Setting frame distance failed" is output.
**To Reproduce**
Steps to reproduce the behavior:
1. Download [tiger.png](https://user-images.githubusercontent.com/51164219/189933857-4a79b7d3-1168-47bf-a4f3-475b3a817754.png)
2. Build JpegXL at 12902774295fea02aaa19ff41a1ec9941e9b882b
3. Run `./cjxl tiger.png tiger.jxl -v -q 0`
**Expected behavior**
An encoded tiger.jxl is successfully created.
**Environment**
- OS: Debian
- Compiler version: GNU 12.1.0
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.8.0 12902774 [AVX2,SSE4,SSSE3,Unknown] | cjxl -q 0 fails with "Setting frame distance failed" | https://api.github.com/repos/libjxl/libjxl/issues/1741/comments | 2 | 2022-09-13T15:33:00Z | 2022-10-07T12:42:00Z | https://github.com/libjxl/libjxl/issues/1741 | 1,371,644,934 | 1,741 |
[
"libjxl",
"libjxl"
] | https://github.com/Frozen1084/test/releases/download/test/4676.6000_9af79512a3c64ed8945e54b4c9cbed22.jpg
I tried to convert this 32MB JPG image (4676x6000) and when I use the parameter "--lossless_jpeg=0 -d 1.0", it all works fine and there is no difference with other images. It took about 3 seconds. jxl file 6483KB.
But when I use "--lossless_jpeg=0 -d 1.0 -e 8", everything becomes bad.
The cjxl.exe was using memory like crazy, up to 8GB of memory. It ended up using it for 50 seconds.
But what is incomprehensible is that the jxl file size is 7123KB.
v0.7rc
win 11 - 64
====
By the way
1, when converting jpg, the "-d" option is ignored by default, which is a really bad choice. It confuses people.
2, I converted a gif image to jxl and tried to play it using multiple image viewers, but none of them played properly. Only IrfanView was able to play it at the wrong speed. Other image viewers can't open it at all. jxl animation still not ready? | Bad behavior when processing large size images | https://api.github.com/repos/libjxl/libjxl/issues/1737/comments | 8 | 2022-09-11T20:16:47Z | 2025-01-13T10:53:57Z | https://github.com/libjxl/libjxl/issues/1737 | 1,369,052,599 | 1,737 |
[
"libjxl",
"libjxl"
] | [Invalid_read_of_size_4.zip](https://github.com/libjxl/libjxl/files/9542867/Invalid_read_of_size_4.zip)
Testing latest commit from [0.7.x](https://github.com/libjxl/libjxl/tree/v0.7.x) branch.
`valgrind djxl clusterfuzz-testcase-minimized-kimgio_jxl_fuzzer-6272022027567104.jxl out.png`
```
==17945== Invalid read of size 4
==17945== at 0x49A2DE0: jxl::PerformBlending(float const* const*, float const* const*, float* const*, unsigned long, unsigned long, jxl::PatchBlending const&, jxl::PatchBlending const*, std::vector<jxl::ExtraChannelInfo, std::allocator<jxl::ExtraChannelInfo> > const&) (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x4A6303E: jxl::N_AVX2::BlendingStage::ProcessRow(std::vector<std::vector<float*, std::allocator<float*> >, std::allocator<std::vector<float*, std::allocator<float*> > > > const&, std::vector<std::vector<float*, std::allocator<float*> >, std::allocator<std::vector<float*, std::allocator<float*> > > > const&, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long) const (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x4A5C0AA: jxl::LowMemoryRenderPipeline::RenderRect(unsigned long, std::vector<jxl::Plane<float>, std::allocator<jxl::Plane<float> > >&, jxl::RectT<unsigned long>, jxl::RectT<unsigned long>) (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x4A5CE5B: jxl::LowMemoryRenderPipeline::ProcessBuffers(unsigned long, unsigned long) (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x49FA0B1: jxl::ThreadPool::RunCallState<jxl::ModularFrameDecoder::FinalizeDecoding(jxl::PassesDecoderState*, jxl::ThreadPool*, bool)::{lambda(unsigned long)#1}, jxl::ModularFrameDecoder::FinalizeDecoding(jxl::PassesDecoderState*, jxl::ThreadPool*, bool)::{lambda(unsigned int, unsigned long)#2}>::CallDataFunc(void*, unsigned int, unsigned long) (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x49A268B: jxl::ThreadPool::SequentialRunnerStatic(void*, void*, int (*)(void*, unsigned long), void (*)(void*, unsigned int, unsigned long), unsigned int, unsigned int) (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x49FA54D: jxl::ModularFrameDecoder::FinalizeDecoding(jxl::PassesDecoderState*, jxl::ThreadPool*, bool) (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x49D8D4E: jxl::FrameDecoder::Flush() (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x49D9024: jxl::FrameDecoder::FinalizeFrame() (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x4A0B6E6: JxlDecoderProcessInput (in /usr/lib64/libjxl.so.0.7.0)
==17945== by 0x117587: jxl::extras::DecodeImageJXL(unsigned char const*, unsigned long, jxl::extras::JXLDecompressParams const&, unsigned long*, jxl::extras::PackedPixelFile*, std::vector<unsigned char, std::allocator<unsigned char> >*) (in /usr/bin/djxl)
==17945== by 0x110BC4: main (in /usr/bin/djxl)
```
| Invalid read of size 4 in jxl::PerformBlending | https://api.github.com/repos/libjxl/libjxl/issues/1736/comments | 2 | 2022-09-11T15:26:34Z | 2024-03-04T10:12:52Z | https://github.com/libjxl/libjxl/issues/1736 | 1,368,979,724 | 1,736 |
[
"libjxl",
"libjxl"
] | what is better to build with? | skcms vs lcms2? | https://api.github.com/repos/libjxl/libjxl/issues/1734/comments | 3 | 2022-09-09T13:49:58Z | 2022-09-14T10:35:17Z | https://github.com/libjxl/libjxl/issues/1734 | 1,367,858,595 | 1,734 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When I use nightly cjxl to encode an image at a high distance (>=20), and uses Gwenview to view the output, the output is corrupted.
**To Reproduce**
1. Encode an image with nightly cjxl: `cjxl -d 20 wollerau.png new-20.jxl`
2. View the image in Gwenview
**Expected behavior**
The image should be rendered properly without any glitch.
**Screenshots**

**Environment**
- OS: Arch Linux x86_64
- Libraries:
- cjxl `v0.8.0 c76ec204`(nightly CI build)
- djxl `0.6.1` (Arch package)
- kimageformats `5.97.0` (for JXL Qt plugin)
- Gwenview `22.08.0`
- [Test files](https://github.com/libjxl/libjxl/files/9522224/test-files.tar.gz)
| At distance >= 20, v0.6.1 + kimageformats + Gwenview fail to properly render nightly's output | https://api.github.com/repos/libjxl/libjxl/issues/1732/comments | 4 | 2022-09-07T14:26:57Z | 2024-03-04T10:12:51Z | https://github.com/libjxl/libjxl/issues/1732 | 1,364,753,364 | 1,732 |
[
"libjxl",
"libjxl"
] | [Z:/libjxl-main/lib/extras/enc/jpg.cc:169] (performance) Parameter 'exif' is passed by value. It could be passed as a const reference which is usually faster and recommended in C++. [passedByValue]
[Z:/libjxl-main/plugins/gimp/file-jxl-save.cc:604] (performance) Parameter 'model' is passed by value. It could be passed as a const reference which is usually faster and recommended in C++. [passedByValue]
[Z:/libjxl-main/tools/benchmark/benchmark_codec_jpeg.cc:51] (performance) When an object of a class is created, the constructors of all member variables are called consecutively in the order the variables are declared, even if you don't explicitly write them to the initialization list. You could avoid assigning 'jpeg_encoder_' a value by passing the value to the constructor in the initialization list. [useInitializationList]
[Z:/libjxl-main/tools/benchmark/benchmark_stats.cc:127] (performance) Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr] | Code analysis | https://api.github.com/repos/libjxl/libjxl/issues/1728/comments | 1 | 2022-09-05T05:53:40Z | 2024-03-04T10:12:51Z | https://github.com/libjxl/libjxl/issues/1728 | 1,361,439,096 | 1,728 |
[
"libjxl",
"libjxl"
] | In the ImageMagick project we would like to have the possibility to add version checks in our code to make it possible to be compatible with multiple versions of the libjxl library. For now we will force people to use the latest version but it would be nice if we could add versions checks in the future
It would be nice if we had the following header file (lib/include/jxl/jxl_version.h):
```c
#ifndef JPEGXL_VERSION_H
#define JPEGXL_VERSION_H
#define JPEGXL_MAJOR_VERSION 0
#define JPEGXL_MINOR_VERSION 7
#define JPEGXL_PATCH_VERSION 0
/* Numeric representation of the version */
#define JPEGXL_NUMERIC_VERSION ((JPEGXL_MAJOR_VERSION <<24) | (JPEGXL_MINOR_VERSION <<16) | (JPEGXL_PATCH_VERSION <<8) | 0)
#endif /* JPEGXL_VERSION_H */
```
I don't mind opening a pull request to add this to the project.
| Add lib/include/jxl/jxl_version.h | https://api.github.com/repos/libjxl/libjxl/issues/1721/comments | 2 | 2022-08-28T18:08:04Z | 2024-03-04T10:12:51Z | https://github.com/libjxl/libjxl/issues/1721 | 1,353,428,688 | 1,721 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Throughout the libjxl code there are references to the CMYK color space being supported. However,
https://github.com/libjxl/libjxl/blob/4c31ef03e3fd5239d6b794771d4ae7daa7815b28/lib/jxl/encode.cc#L754
this check actively prevents us from exporting JXL CMYK images.
**To Reproduce**
Call JxlEncoderSetBasicInfo with basicInfo.num_color_channels = 4 and num_extra_channels = 1.
**Expected behavior**
Export working out of the box.
**Screenshots**
N/A
**Environment**
- OS: [e.g. Windows] Windows 10 21H2
- Compiler version: [e.g. clang 11.0.1] MSVC 19.34.31721
- CPU type: [e.g. x86_64] x86_64
- cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]] JPEG XL encoder v0.7.0 0.7.0 [AVX2,SSE4,SSSE3,Unknown]
**Additional context**
N/A | Unclear support status for CMYK in v0.7 | https://api.github.com/repos/libjxl/libjxl/issues/1719/comments | 10 | 2022-08-25T13:39:26Z | 2025-06-19T13:34:18Z | https://github.com/libjxl/libjxl/issues/1719 | 1,350,919,201 | 1,719 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I'm trying to build libjxl on MSVC 2019, x64 debug.
I'm currently getting a series of compiler errors when building "stage_upsampling.cc":
```
template <ssize_t N>
void ProcessRowImpl(const RowInfo& input_rows, const RowInfo& output_rows,
ssize_t x0, ssize_t x1) const {
static HWY_FULL(float) df;
using V = hwy::HWY_NAMESPACE::Vec<HWY_FULL(float)>;
V ups0, ups1, ups2, ups3, ups4, ups5, ups6, ups7;
(void)ups2, (void)ups3, (void)ups4, (void)ups5, (void)ups6, (void)ups7;
V* ups[N];
if (N >= 2) {
ups[0] = &ups0;
ups[1] = &ups1;
}
if (N >= 4) {
ups[2] = &ups2; //<- compiler error for every array index 2 and higher
ups[3] = &ups3;
}
if (N == 8) {
ups[4] = &ups4;
ups[5] = &ups5;
ups[6] = &ups6;
ups[7] = &ups7;
}
```
Error says "C4789 buffer 'ups' of size 16 bytes will be overrun; 8 bytes will be written starting at offset 56", so the compiler thinks there is a buffer overflow error here.
**Environment**
- OS: Windows 10
- Compiler version: MSVC 2019
- CPU type: x64 (debug build)
- cjxl/djxl version string: Whatever was on Git Main at the time of this bug report
| stage_upsampling.cc not building on MSVC 2019 (C4789 error claiming buffer overrun) | https://api.github.com/repos/libjxl/libjxl/issues/1715/comments | 2 | 2022-08-24T15:54:42Z | 2024-03-04T10:12:50Z | https://github.com/libjxl/libjxl/issues/1715 | 1,349,674,198 | 1,715 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I would like to run 'make test' without error. One test is currently failing:
```
The following tests FAILED:
990 - DecodeTest.ContinueFinalNonEssentialBoxTest (SEGFAULT)
```
**To Reproduce**
I can reproduce it on Debian/stable (gcc-10) and Debian/sid (gcc-12).
```
% lib/tests/decode_test "--gtest_filter=DecodeTest.ContinueFinalNonEssentialBoxTest" "--gtest_also_run_disabled_tests"
Running main() from ./googletest/src/gtest_main.cc
WARNING: CPU supports 1a00 but software requires 4000000000000000
Note: Google Test filter = DecodeTest.ContinueFinalNonEssentialBoxTest
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from DecodeTest
[ RUN ] DecodeTest.ContinueFinalNonEssentialBoxTest
./lib/jxl/decode_test.cc:3728: Failure
Value of: br.JumpToByteBoundary()
Actual: false
Expected: true
./lib/jxl/decode_test.cc:3738: Failure
Value of: ReadFrameHeader(&br, &frame_header)
Actual: false
Expected: true
./lib/jxl/decode_test.cc:3748: Failure
Value of: ReadGroupOffsets(toc_entries, &br, §ion_offsets, §ion_sizes, &groups_total_size)
Actual: false
Expected: true
/usr/include/c++/12/bits/stl_vector.h:1124:34: runtime error: reference binding to null pointer of type 'value_type'
```
**Expected behavior**
No error upon "make test"
**Screenshots**
* https://buildd.debian.org/status/fetch.php?pkg=jpeg-xl&arch=amd64&ver=0.7.0%7Egit20220805.980c90f-1&stamp=1660127268&raw=0
**Environment**
- OS: Linux/Debian/sid
- Compiler version: gcc-12
- CPU type: x86_64
- cjxl/djxl version string: 0.7rc (980c90f65f41066cc4959b4eb80eba906867103b)
| DecodeTest.ContinueFinalNonEssentialBoxTest is failing in 0.7rc | https://api.github.com/repos/libjxl/libjxl/issues/1710/comments | 3 | 2022-08-22T12:48:49Z | 2025-01-30T12:51:43Z | https://github.com/libjxl/libjxl/issues/1710 | 1,346,370,623 | 1,710 |
[
"libjxl",
"libjxl"
] | Hi,
I'd like to specify a different downsampling ratio and quality ratio for each extra channel, in the same way it is possible to specify a different quantization on a per-channel basis.
For example, such an image would have those parameters set for each of its extra channel:
```
downsampling quality
main_framebuffer 1 0.5
extra[0] 1 1.0
extra[1] 2 1.2
extra[2] 4 1.2
```
Since `JxlEncoderFrameSettings` is specified at each `JxlEncoderAddImageFrame` & `JxlEncoderSetExtraChannelBuffer` call, I first thought it was possible to modify the parameters in between calls. It seems that those parameters are used for the first `JxlEncoderAddImageFrame` call and then ignored (at least for those I tweaked).
So, it may be possible to get such feature without a change in the current API.
The alternative solution I use right now is to split the file in multiple JPEG-XL files with different compression and downsampling parameters.
In my case, I have an image with multiple components saved as gray framebuffers. The higher ranks framebuffers are less important than the lower order ones, similarly to chrominance vs. luminance. So, we want to compress higher orders more aggressively, which has a minor impact on the reconstruction. We want to use JPEG-XL for its large set of features and storage types (we are mixing float and integer framebuffers).
By the way, thank you for this awesome new image format! | Different compression and downsampling ratios for extra channels | https://api.github.com/repos/libjxl/libjxl/issues/1707/comments | 0 | 2022-08-18T15:57:44Z | 2022-10-06T08:49:17Z | https://github.com/libjxl/libjxl/issues/1707 | 1,343,308,295 | 1,707 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
if input are jpg files, cjxl only output lossless jxl files,with -q 、-d options.
**Screenshots**

[AVX2,SSE4,SSSE3,Unknown]("Unknown" is "Emu128" in v0.7.0)
**Environment**
- OS: Windows10 x64 21H2
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.8.0 aa5e8f0
| The last version cjxl.exe can't turn jpg files to lossy jxl files. | https://api.github.com/repos/libjxl/libjxl/issues/1706/comments | 4 | 2022-08-18T05:33:59Z | 2022-08-23T14:04:52Z | https://github.com/libjxl/libjxl/issues/1706 | 1,342,581,406 | 1,706 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Since 2022-07-18 the automatic builds on "https://artifacts.lucaversari.it/libjxl/libjxl/" for windows static are not executable anymore.
Some not included dll's like brotli are requestet.
Also the file size of the exe is smaler since then.
**To Reproduce**
Start exe on winodws system without any parameter and you get the dll requestes
**Expected behavior**
Like last working version "v0.7.0 9df69ef [AVX2,SSE4,SSSE3,Emu128]" | Windows static build seems to be dynamic | https://api.github.com/repos/libjxl/libjxl/issues/1694/comments | 7 | 2022-08-11T07:29:47Z | 2022-12-18T17:03:04Z | https://github.com/libjxl/libjxl/issues/1694 | 1,335,576,405 | 1,694 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I'd like to be able to compile libjxl 0.7rc on arm64 with highway 1.0. It currently fails with:
[256/392] /usr/bin/c++ -DJPEGXL_ENABLE_APNG=1 -DJPEGXL_ENABLE_EXR=1 -DJPEGXL_ENABLE_JPEG=1 -DJXL_EXPORT="" -DJXL_THREADS_STATIC_DEFINE -DTEST_DATA_PATH=\"/usr/share/libjxl-testdata\" -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I"/<<PKGBUILDDIR>>" -I"/<<PKGBUILDDIR>>/lib/include" -I"/<<PKGBUILDDIR>>/obj-aarch64-linux-gnu/lib/include" -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DJXL_DEBUG_WARNING -DJXL_DEBUG_ON_ERROR -Wdate-time -D_FORTIFY_SOURCE=2 -fno-rtti -funwind-tables -fno-omit-frame-pointer -fPIE "-fmacro-prefix-map=/<<PKGBUILDDIR>>=." -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++17-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -fsized-deallocation -fno-exceptions -fmath-errno -DHWY_SHARED_DEFINE -DGTEST_HAS_PTHREAD=1 -std=c++17 -MD -MT lib/CMakeFiles/rational_polynomial_test.dir/jxl/rational_polynomial_test.cc.o -MF lib/CMakeFiles/rational_polynomial_test.dir/jxl/rational_polynomial_test.cc.o.d -o lib/CMakeFiles/rational_polynomial_test.dir/jxl/rational_polynomial_test.cc.o -c '/<<PKGBUILDDIR>>/lib/jxl/rational_polynomial_test.cc'
FAILED: lib/CMakeFiles/rational_polynomial_test.dir/jxl/rational_polynomial_test.cc.o
/usr/bin/c++ -DJPEGXL_ENABLE_APNG=1 -DJPEGXL_ENABLE_EXR=1 -DJPEGXL_ENABLE_JPEG=1 -DJXL_EXPORT="" -DJXL_THREADS_STATIC_DEFINE -DTEST_DATA_PATH=\"/usr/share/libjxl-testdata\" -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I"/<<PKGBUILDDIR>>" -I"/<<PKGBUILDDIR>>/lib/include" -I"/<<PKGBUILDDIR>>/obj-aarch64-linux-gnu/lib/include" -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DJXL_DEBUG_WARNING -DJXL_DEBUG_ON_ERROR -Wdate-time -D_FORTIFY_SOURCE=2 -fno-rtti -funwind-tables -fno-omit-frame-pointer -fPIE "-fmacro-prefix-map=/<<PKGBUILDDIR>>=." -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++17-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -fsized-deallocation -fno-exceptions -fmath-errno -DHWY_SHARED_DEFINE -DGTEST_HAS_PTHREAD=1 -std=c++17 -MD -MT lib/CMakeFiles/rational_polynomial_test.dir/jxl/rational_polynomial_test.cc.o -MF lib/CMakeFiles/rational_polynomial_test.dir/jxl/rational_polynomial_test.cc.o.d -o lib/CMakeFiles/rational_polynomial_test.dir/jxl/rational_polynomial_test.cc.o -c '/<<PKGBUILDDIR>>/lib/jxl/rational_polynomial_test.cc'
In file included from /<<PKGBUILDDIR>>/lib/jxl/rational_polynomial_test.cc:17,
from /usr/include/hwy/foreach_target.h:103,
from /<<PKGBUILDDIR>>/lib/jxl/rational_polynomial_test.cc:13:
/<<PKGBUILDDIR>>/lib/jxl/rational_polynomial_test.cc: In member function ‘jxl::N_SVE::T jxl::N_SVE::EvalLog2::operator()(jxl::N_SVE::T, const jxl::N_SVE::T (&)[NP], const jxl::N_SVE::T (&)[NQ]) const’:
/<<PKGBUILDDIR>>/lib/jxl/rational_polynomial_test.cc:56:5: error: there are no arguments to ‘Abs’ that depend on a template parameter, so a declaration of ‘Abs’ must be available [-fpermissive]
56 | JXL_DASSERT(AllTrue(di, Eq(Abs(x_bits), x_bits)));
| ^~~~~~~~~~~
**To Reproduce**
Compile libjxl 0.7rc on arm64 using a local install of highway 1.0
**Expected behavior**
make compilation should go all the way.
**Screenshots**
* https://buildd.debian.org/status/fetch.php?pkg=jpeg-xl&arch=arm64&ver=0.7.0%7Egit20220805.980c90f-1&stamp=1660127570&raw=0
**Environment**
- OS: Linux/Debian/sid
- Compiler version: gcc-12
- CPU type: arm64
- cjxl/djxl version string: v0.7rc
| error: there are no arguments to ‘Abs’ that depend on a template parameter, so a declaration of ‘Abs’ must be available [-fpermissive] | https://api.github.com/repos/libjxl/libjxl/issues/1693/comments | 3 | 2022-08-10T11:22:24Z | 2024-04-22T09:45:50Z | https://github.com/libjxl/libjxl/issues/1693 | 1,334,474,535 | 1,693 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I'd like to run 'make test' without error. make test return the following:
The following tests FAILED:
2522 - DjxlFuzzerTestInstantiation/DjxlFuzzerTest.TestOne/4546077333782528 (ILLEGAL)
<snip>
2563 - DjxlFuzzerTestInstantiation/DjxlFuzzerTest.TestOne/6735607318052864 (ILLEGAL)
2564 - DjxlFuzzerTestInstantiation/DjxlFuzzerTest.TestOne/6737321070821376 (ILLEGAL)
2565 - DjxlFuzzerTestInstantiation/DjxlFuzzerTest.TestOne/6748486320652288 (ILLEGAL)
**To Reproduce**
download v0.7rc and build on amd64 using gcc-12.
**Expected behavior**
I'd like to run 'make test' without error.
**Screenshots**
* https://buildd.debian.org/status/fetch.php?pkg=jpeg-xl&arch=amd64&ver=0.7.0%7Egit20220805.980c90f-1&stamp=1660127268&raw=0
**Environment**
- OS: Linux/Debian/sid
- Compiler version: gcc-12
- CPU type: x86_64
- cjxl/djxl version string: v0.7rc
| DjxlFuzzerTestInstantiation/DjxlFuzzerTest.TestOne/ status ? | https://api.github.com/repos/libjxl/libjxl/issues/1692/comments | 5 | 2022-08-10T11:20:32Z | 2024-03-04T10:12:49Z | https://github.com/libjxl/libjxl/issues/1692 | 1,334,472,401 | 1,692 |
[
"libjxl",
"libjxl"
] | I can't build on Arch Linux libjxl from git with LLVM/Clang instead GCC.
My `makepkg.conf`:
```bash
#!/hint/bash
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
'fossil::fossil'
'git::git'
'hg::mercurial'
'svn::subversion')
#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags
export CC=clang
export CXX=clang++
#CPPFLAGS=""
CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fuse-ld=lld"
LTOFLAGS="-flto=auto"
# Rust
CARGO_PROFILE_RELEASE_LTO="thin"
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang
RUSTFLAGS="-C opt-level=3 -C target-cpu=native -C linker=clang -C linker-plugin-lto -C link-arg=-flto -C link-arg=--ld-path=mold"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc)"
NINJAFLAGS="-j$(nproc)"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
#DEBUG_RUSTFLAGS="-C debuginfo=2"
#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
BUILDENV=(!distcc color ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg
#########################################################################
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- debug: Add debugging flags as specified in DEBUG_* variables
#-- lto: Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""
#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -z -q --threads=0 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)
#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'
#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=()
```
paru -S libjxl-git give [this](https://gist.github.com/roland-rollo/a60f8c6b15496ae7198679e385e1ed29).
I tried `mold` instead `lld`, but it gives the same output.
**Environment**
- OS: Arch Linux
- Compiler version: Clang 14.0.6
- CPU type: x86_64 AMD Ryzen 7 4800H
Sorry for attaching link to output, but github say it's too long for comment body. | Build fails with clang | https://api.github.com/repos/libjxl/libjxl/issues/1688/comments | 8 | 2022-08-09T12:56:24Z | 2024-03-04T11:02:12Z | https://github.com/libjxl/libjxl/issues/1688 | 1,333,219,558 | 1,688 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When building from source, I encounter linker issues on macOS.
```console
$ otool -L lib/libjxl.dylib
lib/libjxl.dylib:
/Users/ajstewart/spack/opt/spack/darwin-monterey-m1/apple-clang-13.1.6/libjxl-main-swqqeydkhwe6vivbmo6aigloq352xq2v/lib/libjxl.0.7.dylib (compatibility version 0.7.0, current version 0.7.0)
libbrotlidec.1.dylib (compatibility version 1.0.0, current version 1.0.7)
libbrotlienc.1.dylib (compatibility version 1.0.0, current version 1.0.7)
libbrotlicommon.1.dylib (compatibility version 1.0.0, current version 1.0.7)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
```
As you can see, the linker is unable to find `libbrotli*`.
**To Reproduce**
On macOS:
```console
$ git clone https://github.com/libjxl/libjxl.git
$ cd libjxl
$ git submodule update --init --recursive
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON
$ make
$ make install
```
**Expected behavior**
I would expect libjxl.dylib to know where to find its dependencies from RPATH.
**Environment**
- OS: macOS 12.5
- Compiler version: Apple Clang 13.1.6
- CPU type: arm64
- cjxl/djxl version string: ?
**Additional context**
Full build logs:
* [build log](https://github.com/libjxl/libjxl/files/9285579/spack-build-02-build-out.txt)
* [build env](https://github.com/libjxl/libjxl/files/9285581/spack-build-env.txt)
Trying to build libjxl as a GDAL driver. Added a package for libjxl to Spack in https://github.com/spack/spack/pull/31983, let me know if anyone would like to help maintain this build recipe.
P.S. Is it possible to build libjxl with external packages instead of git submodules? | brotli linking issues on macOS | https://api.github.com/repos/libjxl/libjxl/issues/1686/comments | 6 | 2022-08-08T23:37:06Z | 2024-03-04T10:12:48Z | https://github.com/libjxl/libjxl/issues/1686 | 1,332,520,263 | 1,686 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Small and simple issue, the cjxl flag for enabling the lossy palette is misspelt [here](https://github.com/libjxl/libjxl/blob/79293824dcdb91f1f934244b6f48e83bfed97588/tools/cjxl_main.cc#L353). It's `moular_lossy_palette` instead of `modular_lossy_palette`. | Spelling mistake in cjxl "modular lossy palette" flag | https://api.github.com/repos/libjxl/libjxl/issues/1668/comments | 1 | 2022-08-02T11:40:55Z | 2022-08-02T14:24:45Z | https://github.com/libjxl/libjxl/issues/1668 | 1,325,725,904 | 1,668 |
[
"libjxl",
"libjxl"
] | Hello,
I encoded following picture using old and new cjxl.
When viewing the JXL output in Google Chrome, the old one has correct orientation but new one is not rotated.

Encoded files:
[old.zip](https://github.com/libjxl/libjxl/files/9235787/old.zip)
[new.zip](https://github.com/libjxl/libjxl/files/9235790/new.zip)
| New cjxl seems to ignore Exif orientation | https://api.github.com/repos/libjxl/libjxl/issues/1667/comments | 3 | 2022-08-01T16:56:29Z | 2024-03-04T10:12:48Z | https://github.com/libjxl/libjxl/issues/1667 | 1,324,706,662 | 1,667 |
[
"libjxl",
"libjxl"
] | djxl v0.6.1 is unable to decode JXL files that were created by JPEG lossless transcode using recent version of cjxl.
```
d:\>cjxl Obrázky\tapeta.jpg a.jxl
WARNING: CPU supports 1800 but software requires 2000000000000000
JPEG XL encoder v0.7.0 40460f7 [SSE4,SSSE3]
Read JPEG image with 80401 bytes.
Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data],
Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0).
WARNING: CPU supports 1800 but software requires 2000000000000000
Compressed to 56994 bytes including container
d:\>djxl a.jxl a.jpg
JPEG XL decoder v0.6.1 a205468 [SSE4,Scalar]
Read 56994 compressed bytes.
Unknown compressed image format
d:\>djxl a.jxl a.png
JPEG XL decoder v0.6.1 a205468 [SSE4,Scalar]
Read 56994 compressed bytes.
Unknown compressed image format
```
djxl is supposed to decode all valid codestreams since 0.5 | djxl v0.6.1 unable to decode JPEG transcoded to JXL by cjxl v0.7.0 | https://api.github.com/repos/libjxl/libjxl/issues/1666/comments | 1 | 2022-07-31T15:36:27Z | 2022-08-03T08:06:24Z | https://github.com/libjxl/libjxl/issues/1666 | 1,323,494,438 | 1,666 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
`git describe --tags main` yields `v0.3.7-1197-g40460f72`
**Describe the solution you'd like**
add tags at the branch-off points in master
e.g. tag `20cccbf646158cb128d68db20d12f93d1fb9b6a1` as `v0.6.x`
resulting in `git describe --tags main` yielding `v0.6.x-794-g40460f72`
**Describe alternatives you've considered**
manually traversing the commit tree to find the closest tag
although possible, that seems pretty ridiculous
**Additional context**
generic versioning of devel packages | add tags for reasonable `git describe` output | https://api.github.com/repos/libjxl/libjxl/issues/1665/comments | 11 | 2022-07-31T05:12:18Z | 2022-08-03T13:58:53Z | https://github.com/libjxl/libjxl/issues/1665 | 1,323,364,481 | 1,665 |
[
"libjxl",
"libjxl"
] | cjxl.exe image_21447_24bit.exr image_21447_24bit_exr.jxl -v -m 1 -q 100 -e 5 -C 1 --num_threads=4
JPEG XL encoder v0.7.0 0.7.0-59f7d19 [Unknown]
cjxl_main.cc:676: JXL_FAILURE: Codecs failed to decode input. | Problem with OpenEXR | https://api.github.com/repos/libjxl/libjxl/issues/1662/comments | 3 | 2022-07-30T06:29:46Z | 2025-01-22T12:06:32Z | https://github.com/libjxl/libjxl/issues/1662 | 1,322,915,548 | 1,662 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When building with libhwy > 0.15.0, the build fails with a variety of error messages (.
**To Reproduce**
Just build with libhwy > 0.15.0. GCC will emit a bunch of error messages related to entities not being found (I suspect they've been moved around).
**Expected behavior**
libjxl should build fine.
**Screenshots**
N/A (I have a build log but its insanely huge).
**Environment**
- OS: NixOS 22.05, but this also occurs on Darwin platforms.
- Compiler version: GCC 11.3.0 (Apple Clang as well)
- CPU type: x86_64
- cjxl/djxl version string: `JPEG XL encoder v0.6.1 [AVX2,SSE4,SSSE3,Scalar]`
**Additional context**
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| 0.6.1: build fails with libhwy > 0.15.0 | https://api.github.com/repos/libjxl/libjxl/issues/1659/comments | 5 | 2022-07-27T17:28:05Z | 2024-03-04T10:12:48Z | https://github.com/libjxl/libjxl/issues/1659 | 1,319,870,873 | 1,659 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When transcoding an image from JPEG to JPEG XL with `-j 0` without any extra parameters, the files generated are very large and seems to use a lossless VarDCT mode (can be emulated with a very small `-d`). The command output is contradictory: it says `Setting 'lossless' default for GIF or JPEG input.` but also `Encoding [VarDCT, d1.000, effort: 7]` with the distance seemingly set to d0.
**To Reproduce**
With any JPEG image (here named image.jpg, name doesn't matter), do these commands:
```bash
# bug
cjxl -j 0 image.jpg image.jxl
# d1.0 claimed
cjxl -j 0 -d 1 image.jpg image-d1.jxl
# d0.001 (to emulate lossless)
cjxl -j 0 -d 0.001 image.jpg image-d0.jxl
```
Notice that image.jxl and image-d0.jxl have the same size.
**Expected behavior**
Use `-d 1` as claimed in **Screenshots**
**Screenshots**
The tested image is from https://jpeg.org/images/jpegxl-home.jpg but any JPEG image should trigger this.
<details><summary>Commands output</summary>
<p>
```
$ tools/cjxl -j 0 jpegxl-home.jpg jpegxl-home.jxl
JPEG XL encoder v0.7.0 5fef3ec [AVX2,SSE4,SSSE3,Emu128]
Setting 'lossless' default for GIF or JPEG input.
Read 800x400 image, 97787 bytes, 276.5 MP/s
Encoding [VarDCT, d1.000, effort: 7],
Compressed to 577556 bytes (14.439 bpp).
800 x 400, 5.23 MP/s [5.23, 5.23], 1 reps, 12 threads.
$ tools/cjxl -j 0 -d 0.001 jpegxl-home.jpg jpegxl-home-d0.jxl
JPEG XL encoder v0.7.0 5fef3ec [AVX2,SSE4,SSSE3,Emu128]
Read 800x400 image, 97787 bytes, 294.8 MP/s
Encoding [VarDCT, d0.000, effort: 7],
Compressed to 577556 bytes (14.439 bpp).
800 x 400, 5.03 MP/s [5.03, 5.03], 1 reps, 12 threads.
$ tools/cjxl -j 0 -d 1 jpegxl-home.jpg jpegxl-home.jxl
JPEG XL encoder v0.7.0 5fef3ec [AVX2,SSE4,SSSE3,Emu128]
Read 800x400 image, 97787 bytes, 271.0 MP/s
Encoding [VarDCT, d1.000, effort: 7],
Compressed to 77081 bytes (1.927 bpp).
800 x 400, 8.41 MP/s [8.41, 8.41], 1 reps, 12 threads.
```
</p>
</details>
**Environment**
- OS: Debian unstable
- Compiler version: gcc version 12.1.0 (Debian 12.1.0-7)
- CPU type: x86-64
- cjxl/djxl version string: JPEG XL encoder v0.7.0 5fef3ec [AVX2,SSE4,SSSE3,Emu128]
| Transcoding from JPEG with -j 0 and no distance uses a lossless VarDCT mode | https://api.github.com/repos/libjxl/libjxl/issues/1657/comments | 6 | 2022-07-27T12:30:55Z | 2024-03-04T10:12:48Z | https://github.com/libjxl/libjxl/issues/1657 | 1,319,494,802 | 1,657 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Attempting to build ffmpeg 5.1 with libjxl support fails during the configuration of ffmpeg
due to failing pkgconfig check for libjxl>=0.7.0, checking the config.log in rebuild it show it actually fails with
unknown symbol errors referring to the standard C++ libraries.
It might be clang issue rather then a macOS issue.
**It can be fixed by adding -lstdc++to the Libs.private section of both libjxl.pc and libjxl_threads.pc**
**To Reproduce**
build ffmpeg with libjxl support
libjxl cmake invocation...
cmake -DCMAKE_INSTALL_PREFIX:PATH=$3 -DINSTALL_PKGCONFIG_DIR=$3/lib/pkgconfig -DENABLE_SHARED=NO -DBUILD_TESTING=OFF -DJPEGXL_STATIC=YES \
-DJPEGXL_FORCE_SYSTEM_BROTLI=YES -DJPEGXL_FORCE_SYSTEM_HWY=YES -DJPEGXL_FORCE_NEON=YES \
-DJPEGXL_ENABLE_MANPAGES=NO -DJPEGXL_ENABLE_BENCHMARK=NO -DJPEGXL_ENABLE_BENCHMARK=NO -DJPEGXL_ENABLE_EXAMPLES=NO \
-DJPEGXL_ENABLE_SJPEG=NO -DJPEGXL_ENABLE_OPENEXR=NO \
-DJPEGXL_ENABLE_TOOLS=NO \
-DJPEGXL_ENABLE_VIEWERS=NO \
-DJPEGXL_ENABLE_SKCMS=NO \
../${SOFTWARE}
**Expected behavior**
libjxl pkgconfig checks are successful, and ffmpeg builds successfully
**Screenshots**
I'll attach logs later, but I need to unfix it first and recompile, and transfer them from my build "server"
**Environment**
- OS: macOS 12.4
- Compiler version: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
- CPU type: ARM64
- cjxl/djxl version string: not build the tools, building from main, git clone https://github.com/libjxl/libjxl.git
| libjxl's pkgconfig checks fail on macos, needs -lstdc++ | https://api.github.com/repos/libjxl/libjxl/issues/1648/comments | 6 | 2022-07-25T12:50:35Z | 2024-03-04T10:12:47Z | https://github.com/libjxl/libjxl/issues/1648 | 1,316,792,163 | 1,648 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Test suite fails to pass when compiling with `-Wp,-D_GLIBCXX_ASSERTIONS` on `CXXFLAGS`, showing the error `Assertion '__n < this->size()' failed`. This flag is enabled by default on some Linux distributions build tools, [like on Arch Linux](https://github.com/archlinux/devtools/blob/20220621/makepkg-x86_64.conf#L46).
On the tests summary:
```
The following tests FAILED:
1665 - JxlTest.RoundtripDotsForceEpf (Subprocess aborted)
1671 - JxlTest.RoundtripSmallPatches (Subprocess aborted)
1673 - JxlTest.RoundtripGrayscale (Subprocess aborted)
1689 - JxlTest.RoundtripDots (Subprocess aborted)
1817 - PatchDictionaryTest.GrayscaleModular (Subprocess aborted)
1818 - PatchDictionaryTest.GrayscaleVarDCT (Subprocess aborted)
2029 - RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches # GetParam() = grayscale_patches_png_1011x277_Patches (Subprocess aborted)
2030 - RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise # GetParam() = grayscale_patches_png_1011x277_PatchesAndNoise (Subprocess aborted)
2031 - RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2 # GetParam() = grayscale_patches_png_1011x277_PatchesAndUps2 (Subprocess aborted)
```
On `LastTest.log`:
```
1665/2092 Testing: JxlTest.RoundtripDotsForceEpf
1665/2092 Test: JxlTest.RoundtripDotsForceEpf
Command: "/build/libjxl-git/src/build/lib/tests/jxl_test" "--gtest_filter=JxlTest.RoundtripDotsForceEpf" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"JxlTest.RoundtripDotsForceEpf" start time: Jul 23 14:41 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = JxlTest.RoundtripDotsForceEpf
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from JxlTest
[ RUN ] JxlTest.RoundtripDotsForceEpf
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.15 sec
----------------------------------------------------------
Test Failed.
"JxlTest.RoundtripDotsForceEpf" end time: Jul 23 14:41 UTC
"JxlTest.RoundtripDotsForceEpf" time elapsed: 00:00:00
----------------------------------------------------------
1671/2092 Testing: JxlTest.RoundtripSmallPatches
1671/2092 Test: JxlTest.RoundtripSmallPatches
Command: "/build/libjxl-git/src/build/lib/tests/jxl_test" "--gtest_filter=JxlTest.RoundtripSmallPatches" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"JxlTest.RoundtripSmallPatches" start time: Jul 23 14:41 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = JxlTest.RoundtripSmallPatches
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from JxlTest
[ RUN ] JxlTest.RoundtripSmallPatches
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.08 sec
----------------------------------------------------------
Test Failed.
"JxlTest.RoundtripSmallPatches" end time: Jul 23 14:41 UTC
"JxlTest.RoundtripSmallPatches" time elapsed: 00:00:00
----------------------------------------------------------
1673/2092 Testing: JxlTest.RoundtripGrayscale
1673/2092 Test: JxlTest.RoundtripGrayscale
Command: "/build/libjxl-git/src/build/lib/tests/jxl_test" "--gtest_filter=JxlTest.RoundtripGrayscale" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"JxlTest.RoundtripGrayscale" start time: Jul 23 14:41 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = JxlTest.RoundtripGrayscale
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from JxlTest
[ RUN ] JxlTest.RoundtripGrayscale
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.08 sec
----------------------------------------------------------
Test Failed.
"JxlTest.RoundtripGrayscale" end time: Jul 23 14:41 UTC
"JxlTest.RoundtripGrayscale" time elapsed: 00:00:00
----------------------------------------------------------
1689/2092 Testing: JxlTest.RoundtripDots
1689/2092 Test: JxlTest.RoundtripDots
Command: "/build/libjxl-git/src/build/lib/tests/jxl_test" "--gtest_filter=JxlTest.RoundtripDots" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"JxlTest.RoundtripDots" start time: Jul 23 14:42 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = JxlTest.RoundtripDots
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from JxlTest
[ RUN ] JxlTest.RoundtripDots
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.21 sec
----------------------------------------------------------
Test Failed.
"JxlTest.RoundtripDots" end time: Jul 23 14:42 UTC
"JxlTest.RoundtripDots" time elapsed: 00:00:00
----------------------------------------------------------
1817/2092 Testing: PatchDictionaryTest.GrayscaleModular
1817/2092 Test: PatchDictionaryTest.GrayscaleModular
Command: "/build/libjxl-git/src/build/lib/tests/patch_dictionary_test" "--gtest_filter=PatchDictionaryTest.GrayscaleModular" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"PatchDictionaryTest.GrayscaleModular" start time: Jul 23 14:42 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = PatchDictionaryTest.GrayscaleModular
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from PatchDictionaryTest
[ RUN ] PatchDictionaryTest.GrayscaleModular
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.21 sec
----------------------------------------------------------
Test Failed.
"PatchDictionaryTest.GrayscaleModular" end time: Jul 23 14:42 UTC
"PatchDictionaryTest.GrayscaleModular" time elapsed: 00:00:00
----------------------------------------------------------
1818/2092 Testing: PatchDictionaryTest.GrayscaleVarDCT
1818/2092 Test: PatchDictionaryTest.GrayscaleVarDCT
Command: "/build/libjxl-git/src/build/lib/tests/patch_dictionary_test" "--gtest_filter=PatchDictionaryTest.GrayscaleVarDCT" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"PatchDictionaryTest.GrayscaleVarDCT" start time: Jul 23 14:42 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = PatchDictionaryTest.GrayscaleVarDCT
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from PatchDictionaryTest
[ RUN ] PatchDictionaryTest.GrayscaleVarDCT
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.19 sec
----------------------------------------------------------
Test Failed.
"PatchDictionaryTest.GrayscaleVarDCT" end time: Jul 23 14:42 UTC
"PatchDictionaryTest.GrayscaleVarDCT" time elapsed: 00:00:00
----------------------------------------------------------
2029/2092 Testing: RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches # GetParam() = grayscale_patches_png_1011x277_Patches
2029/2092 Test: RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches # GetParam() = grayscale_patches_png_1011x277_Patches
Command: "/build/libjxl-git/src/build/lib/tests/render_pipeline_test" "--gtest_filter=RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches # GetParam() = grayscale_patches_png_1011x277_Patches" start time: Jul 23 14:43 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from RenderPipelineTest/RenderPipelineTestParam
[ RUN ] RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.19 sec
----------------------------------------------------------
Test Failed.
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches # GetParam() = grayscale_patches_png_1011x277_Patches" end time: Jul 23 14:43 UTC
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_Patches # GetParam() = grayscale_patches_png_1011x277_Patches" time elapsed: 00:00:00
----------------------------------------------------------
2030/2092 Testing: RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise # GetParam() = grayscale_patches_png_1011x277_PatchesAndNoise
2030/2092 Test: RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise # GetParam() = grayscale_patches_png_1011x277_PatchesAndNoise
Command: "/build/libjxl-git/src/build/lib/tests/render_pipeline_test" "--gtest_filter=RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise # GetParam() = grayscale_patches_png_1011x277_PatchesAndNoise" start time: Jul 23 14:43 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from RenderPipelineTest/RenderPipelineTestParam
[ RUN ] RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.18 sec
----------------------------------------------------------
Test Failed.
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise # GetParam() = grayscale_patches_png_1011x277_PatchesAndNoise" end time: Jul 23 14:43 UTC
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndNoise # GetParam() = grayscale_patches_png_1011x277_PatchesAndNoise" time elapsed: 00:00:00
----------------------------------------------------------
2031/2092 Testing: RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2 # GetParam() = grayscale_patches_png_1011x277_PatchesAndUps2
2031/2092 Test: RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2 # GetParam() = grayscale_patches_png_1011x277_PatchesAndUps2
Command: "/build/libjxl-git/src/build/lib/tests/render_pipeline_test" "--gtest_filter=RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2" "--gtest_also_run_disabled_tests"
Directory: /build/libjxl-git/src/build/lib
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2 # GetParam() = grayscale_patches_png_1011x277_PatchesAndUps2" start time: Jul 23 14:43 UTC
Output:
----------------------------------------------------------
Running main() from /build/gtest/src/googletest-release-1.12.1/googletest/src/gtest_main.cc
Note: Google Test filter = RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from RenderPipelineTest/RenderPipelineTestParam
[ RUN ] RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2
WARNING: CPU supports 1a00 but software requires 2000000000001000
/usr/include/c++/12.1.0/bits/stl_vector.h:1142: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = jxl::PatchBlending; _Alloc = std::allocator<jxl::PatchBlending>; const_reference = const jxl::PatchBlending&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
<end of output>
Test time = 0.67 sec
----------------------------------------------------------
Test Failed.
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2 # GetParam() = grayscale_patches_png_1011x277_PatchesAndUps2" end time: Jul 23 14:43 UTC
"RenderPipelineTest/RenderPipelineTestParam.PipelineTest/grayscale_patches_png_1011x277_PatchesAndUps2 # GetParam() = grayscale_patches_png_1011x277_PatchesAndUps2" time elapsed: 00:00:00
----------------------------------------------------------
```
**To Reproduce**
```
$ export CXXFLAGS+=' -Wp,-D_GLIBCXX_ASSERTIONS'
$ <your_preferred_cmake_command>
$ make -C build all
$ make -C build test
```
**Expected behavior**
The test suite to pass.
**Screenshots**
Not applicable, as this is a build error.
**Environment**
- OS: Arch Linux
- Compiler version: clang 14.0.6 and gcc 12.1.0 (tested with both, with the same result)
- CPU type: x86_64
- cjxl/djxl version string: not applicable, as this is a build error. Using libjxl git master sources, currently at commit f5d6e2922820d5862f0334cf1e15d5d9eed6ff1a.
**Additional context**
- The test suite passes fine when adding `-Wp,-U_GLIBCXX_ASSERTIONS` at the end of `CXXFLAGS`, to remove the definition of the `_GLIBCXX_ASSERTIONS` macro.
- Commit 7d047b5feca7a4a0bd620de171179d2c3810bc8e is known to be good for me.
<!--
Currently github does not allow uploading files that end in `.jxl`, but when you
rename them for example as `image.jxl.jpg`, it will be possible to upload them
and also view them in browsers that are configured to support it.
See https://github.com/orgs/github-community/discussions/18139
-->
| Test suite fails when compiling with `-Wp,-D_GLIBCXX_ASSERTIONS` | https://api.github.com/repos/libjxl/libjxl/issues/1644/comments | 0 | 2022-07-23T15:12:08Z | 2024-03-04T10:12:47Z | https://github.com/libjxl/libjxl/issues/1644 | 1,315,680,885 | 1,644 |
[
"libjxl",
"libjxl"
] | GCC 11.3.1 20220429
libjxl version 0.7.0-c2548a1
cjxl.exe image_21447_24bit.png image_21447_24bit.jxl -v -m -q 100 -s 5 -C 1 --num_threads=4
`Invalid flag, -q must be 0 or 1` | Problem with creating photos | https://api.github.com/repos/libjxl/libjxl/issues/1643/comments | 3 | 2022-07-23T05:02:56Z | 2022-07-26T17:55:34Z | https://github.com/libjxl/libjxl/issues/1643 | 1,315,562,186 | 1,643 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When using effort 6 (or lower) and an iso-value is specified, cjxl will crash ungracefully.
**To Reproduce**
Run one of the following commands:
```console
$ cjxl --jpeg_transcode --effort=6 --photon_noise=ISO400 'original.jpg' 'converted.jxl'
$ cjxl --jpeg_transcode --effort=5 --photon_noise=ISO400 'original.jpg' 'converted.jxl'
$ cjxl --jpeg_transcode --effort=4 --photon_noise=ISO400 'original.jpg' 'converted.jxl'
$ cjxl --jpeg_transcode --effort=3 --photon_noise=ISO400 'original.jpg' 'converted.jxl'
$ cjxl --jpeg_transcode --effort=2 --photon_noise=ISO400 'original.jpg' 'converted.jxl'
$ cjxl --jpeg_transcode --effort=1 --photon_noise=ISO400 'original.jpg' 'converted.jxl'
```
**Expected behavior**
Print a warning that the ISO setting is not supported?
**Environment**
- OS: ArchLinux
- Compiler version: Unknown ([Binary Package](https://archive.archlinux.org/packages/l/libjxl/libjxl-0.6.1-3-x86_64.pkg.tar.zst) from Archlinux)
- CPU type: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
- cjxl/djxl version string: JPEG XL encoder v0.6.1 a205468b [AVX2,SSE4,SSSE3]
**Additional context**
Error message:
```console
JPEG XL encoder v0.6.1 a205468b [AVX2,SSE4,SSSE3]
Read 3280x2464 image, 36.1 MP/s
Encoding [Container | VarDCT, d1.000, thunder | 31885-byte Exif], 4 threads.
/startdir/src/libjxl/lib/jxl/enc_noise.cc:369: JXL_ASSERT: noise_params.HasAny()
Illegal instruction (core dumped)
```
core dump info:
```console
PID: 2279583 (cjxl)
UID: 1000 (rubenk)
GID: 1000 (rubenk)
Signal: 4 (ILL)
Timestamp: Wed 2022-07-20 15:53:30 CEST (29s ago)
Command Line: cjxl --jpeg_transcode --effort=3 --photon_noise=ISO400 original.jpg converted.jpg
Executable: /usr/bin/cjxl
Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-org.kde.konsole-4166bed3c42042f7b8b70350ecc8e4c8.scope
Unit: user@1000.service
User Unit: app-org.kde.konsole-4166bed3c42042f7b8b70350ecc8e4c8.scope
Slice: user-1000.slice
Owner UID: 1000 (rubenk)
Boot ID: 09a5c9218ad440249cc5612a887c1363
Machine ID: 69193dc8cfa14efb8613fb69a7281682
Hostname: i5.local
Storage: /var/lib/systemd/coredump/core.cjxl.1000.09a5c9218ad440249cc5612a887c1363.2279583.1658325210000000.zst (present)
Disk Size: 109.0M
Message: Process 2279583 (cjxl) of user 1000 dumped core.
Module linux-vdso.so.1 with build-id 087d2cc34eb08f0a60507de0bdae28d6a7695bed
Module ld-linux-x86-64.so.2 with build-id 0effd0e43efa4468d3c31871c93af0b7f3005673
Module libbrotlicommon.so.1 with build-id 78aaeccd2e9ff99935680b501054dc2b8f16a4c2
Module libIex-3_1.so.30 with build-id 2e101d833e001ddd6ef915489beb61017b504387
Module libIlmThread-3_1.so.30 with build-id 56f383b8f76f73fff6631838bd2b241d24847566
Module libz.so.1 with build-id 99abeb8ef45357635879f1c43374f27709e82654
Module libc.so.6 with build-id 60df1df31f02a7b23da83e8ef923359885b81492
Module libpthread.so.0 with build-id 95ae4f30a6f12ccbff645d30f8e1a3ee23ec7d36
Module libgcc_s.so.1 with build-id 0e3de903950e35ae59a5de8c00b1817a4a71ca01
Module libm.so.6 with build-id 1b7296ef9fd806e47060788389293c824b09ad72
Module libstdc++.so.6 with build-id b3eaebcb5369487562e52dd8d016c9cd77f80c54
Module libtcmalloc_minimal.so.4 with build-id 344fe63596a48843f408e2cf98345ec750f0e9fc
Module libbrotlienc.so.1 with build-id 3ba42510bce7d34c03c18bcc732c37c90504a25c
Module libbrotlidec.so.1 with build-id a4fe8ab9a881a431cf9bc06c0ba0526f1f19fbe8
Module libOpenEXR-3_1.so.30 with build-id 56849d01198bdb268e78f9419bcdb44cf662558e
Module libpng16.so.16 with build-id 943741d5b79603ee543540603c5fd804b018ba19
Module libjpeg.so.8 with build-id 55d88ba2b55f327ca131b0f3246794fff086928d
Module libgif.so.7 with build-id 472552b5f413b53b7d5ff2f24c3859fa65f920af
Module cjxl without build-id.
Stack trace of thread 2279583:
#0 0x0000557ca9a120e8 n/a (cjxl + 0x1080e8)
#1 0x0000557ca99c070c n/a (cjxl + 0xb670c)
#2 0x0000557ca9947e2f n/a (cjxl + 0x3de2f)
#3 0x0000557ca9945150 n/a (cjxl + 0x3b150)
#4 0x0000557ca991af54 n/a (cjxl + 0x10f54)
#5 0x0000557ca992cf73 n/a (cjxl + 0x22f73)
#6 0x00007fb360829290 n/a (libc.so.6 + 0x29290)
#7 0x00007fb36082934a __libc_start_main (libc.so.6 + 0x2934a)
#8 0x0000557ca99171ae n/a (cjxl + 0xd1ae)
Stack trace of thread 2279584:
#0 0x00007fb360889119 n/a (libc.so.6 + 0x89119)
#1 0x00007fb36088b920 pthread_cond_wait (libc.so.6 + 0x8b920)
#2 0x00007fb360cced71 __gthread_cond_wait (libstdc++.so.6 + 0xced71)
#3 0x00007fb360ca40fe _ZN9__gnu_cxx17__nothrow_wait_cv4waitERSt11unique_lockISt5mutexE (libstdc++.so.6 + 0xa40fe)
#4 0x0000557ca9ce119a n/a (cjxl + 0x3d719a)
#5 0x00007fb360cd6183 execute_native_thread_routine (libstdc++.so.6 + 0xd6183)
#6 0x00007fb36088c54d n/a (libc.so.6 + 0x8c54d)
#7 0x00007fb360911874 __clone (libc.so.6 + 0x111874)
Stack trace of thread 2279586:
#0 0x00007fb360889119 n/a (libc.so.6 + 0x89119)
#1 0x00007fb36088b920 pthread_cond_wait (libc.so.6 + 0x8b920)
#2 0x00007fb360cced71 __gthread_cond_wait (libstdc++.so.6 + 0xced71)
#3 0x00007fb360ca40fe _ZN9__gnu_cxx17__nothrow_wait_cv4waitERSt11unique_lockISt5mutexE (libstdc++.so.6 + 0xa40fe)
#4 0x0000557ca9ce119a n/a (cjxl + 0x3d719a)
#5 0x00007fb360cd6183 execute_native_thread_routine (libstdc++.so.6 + 0xd6183)
#6 0x00007fb36088c54d n/a (libc.so.6 + 0x8c54d)
#7 0x00007fb360911874 __clone (libc.so.6 + 0x111874)
Stack trace of thread 2279585:
#0 0x00007fb360889119 n/a (libc.so.6 + 0x89119)
#1 0x00007fb36088b920 pthread_cond_wait (libc.so.6 + 0x8b920)
#2 0x00007fb360cced71 __gthread_cond_wait (libstdc++.so.6 + 0xced71)
#3 0x00007fb360ca40fe _ZN9__gnu_cxx17__nothrow_wait_cv4waitERSt11unique_lockISt5mutexE (libstdc++.so.6 + 0xa40fe)
#4 0x0000557ca9ce119a n/a (cjxl + 0x3d719a)
#5 0x00007fb360cd6183 execute_native_thread_routine (libstdc++.so.6 + 0xd6183)
#6 0x00007fb36088c54d n/a (libc.so.6 + 0x8c54d)
#7 0x00007fb360911874 __clone (libc.so.6 + 0x111874)
Stack trace of thread 2279587:
#0 0x00007fb360889119 n/a (libc.so.6 + 0x89119)
#1 0x00007fb36088b920 pthread_cond_wait (libc.so.6 + 0x8b920)
#2 0x00007fb360cced71 __gthread_cond_wait (libstdc++.so.6 + 0xced71)
#3 0x00007fb360ca40fe _ZN9__gnu_cxx17__nothrow_wait_cv4waitERSt11unique_lockISt5mutexE (libstdc++.so.6 + 0xa40fe)
#4 0x0000557ca9ce119a n/a (cjxl + 0x3d719a)
#5 0x00007fb360cd6183 execute_native_thread_routine (libstdc++.so.6 + 0xd6183)
#6 0x00007fb36088c54d n/a (libc.so.6 + 0x8c54d)
#7 0x00007fb360911874 __clone (libc.so.6 + 0x111874)
ELF object binary architecture: AMD x86-64
``` | Crash on effort 6 and iso value | https://api.github.com/repos/libjxl/libjxl/issues/1634/comments | 2 | 2022-07-20T13:47:03Z | 2022-07-26T09:34:14Z | https://github.com/libjxl/libjxl/issues/1634 | 1,311,143,544 | 1,634 |
[
"libjxl",
"libjxl"
] | I bench-marked about 2k of my private digital cam pictures with d=1.0 and different efforts using "JPEG XL encoder v0.7.0 ab775e2".
First I checked some hundreds in an effort range from 2 to 8 and found that the resulting BPP for 3 is almost same as with effort 4. Effort 5 is near effort 6 in resulting BPP. Effort 2 is significant 'bad' in resulting compression size and 8 takes too long time. Therefore I skipped 2, 5, 6 and 8 for later tests (means using only 3, 5, 7).
I counted how often which effort results in lowest BPP and over all always -e 3 won. (e.g. a folder with 1714 jpg-files effort 3 won 1310 times. 5 with 373 and effort 7 with only 31). So I calculated the optimal lowest file size using for each file the best effort, setting this to 100%. Recompressing jpg-files with **only** the same effort: Effort 7 results in 106.7% -- effort 5 in 105,5% -- effort 3 in 101,3% in relation to optimum.
So even I choose only effort 3 for all files I'm very near to the optimum.
An other set (about 500 files) results in: e7=107,3% -- e5=104,9% -- e3 =101,7%
Question (has not to be answered but be considered in future development): Why the effort 7 which is more complex and should outperform lower efforts, is so bad?
With effort 8 it's a bit different. It wins more often against e 3 but not as much as I thought. It depends on selected jpg-files. I tried about 50 pictures. Effort 3 results in an over all file size of only 100.6% related to using effort 8.
I also switched for my set of 1714 files to "-d 0.5". Resulting in: e7=103.1% -- e5=103.2% -- e3 = 101.3% (like before comparing optimum to using only one effort). Now e7 is a bit better than e5 but still e3 wins.
I suggest to switch to default effort=3.
Best regards
Andreas | Suggest to switch to default effort 3 | https://api.github.com/repos/libjxl/libjxl/issues/1632/comments | 11 | 2022-07-19T16:38:35Z | 2023-03-13T14:10:14Z | https://github.com/libjxl/libjxl/issues/1632 | 1,309,785,963 | 1,632 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Running `cjxl -d 0 input.png output.jxl` causes cjxl to report something like: `Encoding [VarDCT, lossless, effort: 7],` which is not correct. It does actually encode it losslessly, which forces modular mode and the original profile, as it should, so this is only an error in the human-readable report.
**To Reproduce**
Run `cjxl -d 0 input.png output.jxl` on any PNG.
**Environment**
- OS: Arch Linux x86_64
- Compiler version: gcc 12.1.0
- cjxl/djxl version string: libjxl/libjxl@66afb51b
**Additional Information**
As far as I'm aware, this bug is here. It doesn't take distance or quality into account: https://github.com/libjxl/libjxl/blob/66afb51bb4f132f205ba16d236993ebf8fdba89f/tools/cjxl_main.cc#L488-L492
Thanks to The_Decryptor#7970 for finding this.
On lines https://github.com/libjxl/libjxl/blob/66afb51bb4f132f205ba16d236993ebf8fdba89f/tools/cjxl_main.cc#L1096-L1101 you can see that it is properly setting Lossless mode though, and jxlinfo reports modular mode for the resulting file.
| cjxl reports VarDCT for lossless (but correctly uses modular) | https://api.github.com/repos/libjxl/libjxl/issues/1627/comments | 0 | 2022-07-19T10:08:35Z | 2022-07-21T07:20:57Z | https://github.com/libjxl/libjxl/issues/1627 | 1,309,289,817 | 1,627 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
Software like [DigiKam](https://www.digikam.org/) and [LibrePhotos](https://github.com/LibrePhotos/librephotos) detect faces via image recognition with a NN. Afterwards the faces are stored as x/y w/h information either in a database, a sidecar file or in the picture's metadata itself.
Faces can be shown in a gallery, and therefore special thumbnails of the cropped faces are generated and stored in addition to regular thumbnails.
**Describe the solution you'd like**
To avoid the additional creation of thumbnail files, analog to #1621. It would be neat if libjxl would crop out a specific region of the image and decode it – without the need to fetch the whole image via network/from storage.
I asked @jonsneyers if the bit stream would allow this in theory, and he acknowledged that this is possible. :)
**Describe alternatives you've considered**
Creating an additional layer in the same file per face and just decode it. But this would alter the Image data, increase the image size by duplicating some data and in addition may lead to some incompatibilities.
| Ability to decode a section of the picture via x/y h/w with minimal I/O | https://api.github.com/repos/libjxl/libjxl/issues/1623/comments | 11 | 2022-07-18T08:13:28Z | 2025-03-02T00:56:59Z | https://github.com/libjxl/libjxl/issues/1623 | 1,307,566,738 | 1,623 |
[
"libjxl",
"libjxl"
] | **Is your feature request related to a problem? Please describe.**
For responsive websites it may be necessary to decode a JXL to a different image format for older clients, with a certain maximum bit depth and an upper boundary on the image resolution.
**Describe the solution you'd like**
It would be nice if there's not only a downsampling factor but a target image size for decoding, to allow the file to be only fetched so far as necessary from the storage, to output the image with the required bit depth and resolution requested.
Something like
```
djxl --downsamping_width=1920 --downsampling_height=1080 --color_space=RGB_D65_SRG_Rel_Lin --jpeg_quality=65 --bits_per_sample=8 INPUT.jxl OUTPUT.jpg
```
would decode a maximum width of 1920 px and a maximum height of 1080 px with the selected color space and a maximum bit depth of 8 bit/channel.
Additionally, an optional flag would be nice to reduce the quality a bit by selecting one quality lower, as the command above would round the downsampling step to one above, this flag would round down:
```
djxl --downsamping_lq --downsamping_width=1920 --downsampling_height=1080 --color_space=RGB_D65_SRG_Rel_Lin --jpeg_quality=90 --bits_per_sample=8 INPUT.jxl OUTPUT.jpg
```
**Describe alternatives you've considered**
Only possible with a lot of boiler plating, reading image sizes and figure out the nearest downsamping factor and then do the pixel conversion afterwards.
| Decoding with limited image dimensions as output | https://api.github.com/repos/libjxl/libjxl/issues/1621/comments | 1 | 2022-07-16T18:35:11Z | 2024-08-08T15:52:50Z | https://github.com/libjxl/libjxl/issues/1621 | 1,306,875,193 | 1,621 |
[
"libjxl",
"libjxl"
] | I tried to reencode a JPEG XL image to a progressive JPEG XL image, but it seems cjxl is not accepting JPEG XL as input.
I thought when using JPEG XL as input already the reencoding could maybe benefit from the encoded information already available..? Also the parallelization seems to be poor when encoding (only using 1-2 cores most of the time..) | Progressive reencoding #cjxl | https://api.github.com/repos/libjxl/libjxl/issues/1615/comments | 3 | 2022-07-14T18:31:39Z | 2022-07-15T07:00:19Z | https://github.com/libjxl/libjxl/issues/1615 | 1,305,151,171 | 1,615 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
If you pass `cjxl` a non-existent file or a file it cannot read, it won't tell you, it will just exit with failure.
**To Reproduce**
Steps to reproduce the behavior:
Just run `cjxl sdkjgksgj.png` or some other nonexistent file and cjxl dumps the banner and does nothing.
**Expected behavior**
`cjxl` should print some sort of informative error message of why it didn't do anything.
**Environment**
- OS: Tested on both Linux and Windows
- JPEG XL encoder v0.7.0 0a23d683
**Log**
```
leo@gauss ~ :) $ ls -l foo.png # no read perms
---------- 2 leo leo 2517521 Jul 31 2017 foo.png
leo@gauss ~ :) $ cjxl foo.png foo.jxl
JPEG XL encoder v0.7.0 0a23d683 [AVX2]
leo@gauss ~ :( $ cjxl selkgjsdkj
JPEG XL encoder v0.7.0 0a23d683 [AVX2]
leo@gauss ~ :( $ cjxl fkdjkgj.png
JPEG XL encoder v0.7.0 0a23d683 [AVX2]
leo@gauss ~ :( $
``` | cjxl reports no error message upon failing to read input | https://api.github.com/repos/libjxl/libjxl/issues/1592/comments | 8 | 2022-07-11T20:39:48Z | 2022-07-18T04:54:16Z | https://github.com/libjxl/libjxl/issues/1592 | 1,301,200,202 | 1,592 |
[
"libjxl",
"libjxl"
] | current head of git fails to compile with a total of 2235 errors, something must have gone very wrong recently.
Here are a few of them:
```
../lib/jxl/fast_math-inl.h:133:10: error: ‘GetLane’ was not declared in this scope
```
```
../lib/jxl/fast_math-inl.h:115:24: error: ‘Abs’ was not declared in this scope
```
```
../lib/jxl/dct-inl.h:122:25: error: ‘MulAdd’ was not declared in this scope
```
```
../lib/jxl/dct-inl.h:78:17: error: invalid operands of types ‘__SVFloat32_t’ and ‘__SVFloat32_t’ to binary ‘operator+’
```
**To Reproduce**
git clone latest git and compile for aarch64
**Expected behavior**
I expect the compile to pass through
**Environment**
- OS: Linux
- Compiler version: gcc-10.4.0 (cross compiler, but will confirm on native gcc to be sure)
- CPU type: x86_64 host, aarch64 target
the full build log is attched: [build.log.zip](https://github.com/libjxl/libjxl/files/9062720/build.log.zip) | libjxl fails to compile with many different errors for arm64 | https://api.github.com/repos/libjxl/libjxl/issues/1582/comments | 10 | 2022-07-07T10:30:14Z | 2022-07-14T15:05:28Z | https://github.com/libjxl/libjxl/issues/1582 | 1,297,168,278 | 1,582 |
[
"libjxl",
"libjxl"
] | [Wrong colors images.zip](https://drive.google.com/file/d/1-vQf05lzci1N9R4g4hYgoBoiTR6S8AC7/view?usp=sharing)
The wrong colors zip is around 290MB which is why I had to use Google Drive for the upload. The jxl file is one using the default parameters for cjxl.exe
**Describe the bug**
I used the release version 0.6.1 x64 cjxl.exe to convert a png to a jxl file. This all used default parameters which I believe is distance 1 (-d 1) because it is a png file. I was getting crazy super dark color results viewing the jxl file using the ImageGlass viewer so I used the reference decoder djxl.exe to convert the jxl to a jpg to see what libjxl viewed the image as. The result is an image that seems to be slightly dark or slightly more blue than the regular version as seen below in the screenshots.
What's weird about this is that later on I tried converting the png to jxl using cjxl.exe with a distance of 0 (-d 0) and when viewing the jxl file and using djxl.exe to get a jpg file they both looked exactly like the original. I then tested using a distance of 2 and it looks wrong like the distance of 1 does.
**Screenshots** (These are screenshots of the ImageGlass viewer displaying the images because the images are so big)

This is the regular version

This is what shows up after converting the jxl back to a jpg using djxl.exe, the image viewer I am using (ImageGlass) uses the Magick.Net decoder which shows even darker colors than above when viewing the jxl file. This is why I am showing the jpg I got back from djxl because I assume that would be what a reference decoder should look like.
I have created an issue for Magick.Net for the decoding issues [https://github.com/dlemstra/Magick.NET/issues/1212](https://github.com/dlemstra/Magick.NET/issues/1212)
**Environment**
- OS: Windows 11 x64 Version 21H2 (Build 22000.739)
- CPU type: x86_64
- cjxl/djxl version string: I'm just using the 'jxl-x64-windows-static v0.6.1' from the releases page.
| PNG to JPEG XL conversion using default (-d 1) parameters is causing wrong colors | https://api.github.com/repos/libjxl/libjxl/issues/1579/comments | 16 | 2022-07-06T07:45:34Z | 2024-04-22T12:31:34Z | https://github.com/libjxl/libjxl/issues/1579 | 1,295,374,343 | 1,579 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
I have a JPEG->JXL reconstructed file. `uses_original_profile = true` because it's a JPEG reconstruction, and it's got a simple sRGB enum set with no attached ICC profile. The following results in a JXL_ERROR being returned:
```
JxlColorEncoding jxl_color;
JxlDecoderGetColorAsEncodedProfile(decoder, NULL, JXL_COLOR_PROFILE_TARGET_ORIGINAL, &jxl_color);
ret = JxlDecoderSetPreferredColorProfile(decoder, &jxl_color);
```
After the following `ret == JXL_DEC_ERROR`, which is incorrect, since the code requested the exact original profile returned. If any other profile was requested, this should return false, but this specific one being requested without modification should return `JXL_DEC_SUCCESS`.
I believe this was introduced in [acc405da4471afd7a66c0d8fcd545dd4bfadee7c](https://github.com/libjxl/libjxl/commit/acc405da4471afd7a66c0d8fcd545dd4bfadee7c).
Sample of the type of file to trigger the bug is attached as a `.jxl.jpg` but it's actually a JXL file.

| JxlDecoderSetPreferredColorProfile regression when uses_original_profile=true | https://api.github.com/repos/libjxl/libjxl/issues/1578/comments | 0 | 2022-07-05T19:23:56Z | 2022-07-07T16:22:49Z | https://github.com/libjxl/libjxl/issues/1578 | 1,294,678,834 | 1,578 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
The documentation for `JxlEncoderSetFrameDistance` says that you can pass in any value between 0 and 15, and that 0 is "mathematically lossless".
But if you actually pass in 0, then try to encode an image using VarDCT mode, you get a division by 0 exception later on.
The line of code that actually throws the division by 0 is in the function `FindBestBlockEntropyModel` found in "lib/jxl/enc_heuristics.cc".
```
// Repeatedly merge the lowest-count pair.
std::vector<uint8_t> remap((qft.size() + 1) * kNumOrders);
std::iota(remap.begin(), remap.end(), 0);
std::vector<uint8_t> clusters(remap);
size_t nb_clusters = Clamp1((int)(tot / size_for_ctx_model / 2), 2, 9); //<-- crashes on this line, size_for_ctx_model == 0
size_t nb_clusters_chroma = Clamp1((int)(tot / size_for_ctx_model / 3), 1, 5);
```
I also see that the cjxl tool enforces a minimum distance of 0.1. The C API does not enforce such a limit.
---
Additionally, the documentation for `JxlEncoderSetFrameLossless` doesn't say anywhere that you must set JxlBasicInfo.uses_original_profile to true, otherwise it doesn't actually operate in lossless mode.
**Environment**
- OS: Windows 10
- Compiler version: MSVC 2019
- CPU type: x64
- version: Was built from main Git branch on 2022-06-30 | Calling JxlEncoderSetFrameDistance with distance 0 causes division by zero error once encoding happens (VarDCT mode) | https://api.github.com/repos/libjxl/libjxl/issues/1568/comments | 0 | 2022-07-03T02:45:08Z | 2022-07-04T08:38:25Z | https://github.com/libjxl/libjxl/issues/1568 | 1,292,190,842 | 1,568 |
[
"libjxl",
"libjxl"
] | Build failed with `-DJPEGXL_EMSCRIPTEN=OFF`. The compiler throw
`x86_64-w64-mingw32/bin/ld: cannot find -ljxl_extras-static: No such file or directory`
when I checked commit fd4028d
https://github.com/libjxl/libjxl/blob/9eaaebf6cd93c6c694811baf38e14f66aa0b1922/tools/CMakeLists.txt#L424-L431
The `else()` block should not compile `jxl_emcc `. Probably copy paste error | Build error JPEGXL_EMSCRIPTEN=OFF | https://api.github.com/repos/libjxl/libjxl/issues/1564/comments | 1 | 2022-07-02T00:15:30Z | 2022-07-03T09:49:19Z | https://github.com/libjxl/libjxl/issues/1564 | 1,291,917,434 | 1,564 |
[
"libjxl",
"libjxl"
] | My current idea for this is to add `enum JxlColorPlane` with values like `ALL, RED, GREEN, BLUE, LUMA, EXTRA` etc. `JxlDecoderSetOutputBufferPlane` would be added as a function similar to `JxlDecoderSetOutputBuffer` (and similar things for the callback functions), but it would accept an extra `enum JxlColorPlane` as an argument. The `ALL` plane would request packed/interleaved output pixel data, whereas `RED`, `GREEN`, or `BLUE` could be requested for RGB data, `LUMA` would be used for grayscale (or perhaps for YCbCr), and `EXTRA` for extra channels (you'd need some way to specify extra channel index or type). Setting nonsensical combinations should result in an error, i.e. asking for RED on a grayscale image, or asking for RED and ALL at the same time on any image.
This proposal doesn't discuss the ordering of packed/interleaved RGB pixel data - that will need a different API. Thoughts? | API Proposal: Set individual buffers for planar output | https://api.github.com/repos/libjxl/libjxl/issues/1542/comments | 1 | 2022-06-28T18:45:04Z | 2024-03-04T10:12:47Z | https://github.com/libjxl/libjxl/issues/1542 | 1,287,743,479 | 1,542 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Documentation on what "delta palette" or "lossy palette" is and why anyone would use it is missing.
I am the primary manual writer for Krita, and have read more or less everything related to JPEG XL to be able to write an artist friendly description of the export options, and I think I've managed to find explanations for everything, but I cannot find anything about delta palettes that isn't code itself or a [vague gitlab issue suggesting it's a proof of concept](https://gitlab.com/wg1/jpeg-xl/-/issues/221). I mean, I can guess it does lossy compression on the palette, but I can't find enough information about what kind of compression this is, and when it might be useful for artists to toggle this. | Lacking documentation on 'Delta Palette' | https://api.github.com/repos/libjxl/libjxl/issues/1540/comments | 8 | 2022-06-28T11:41:50Z | 2025-06-20T11:13:35Z | https://github.com/libjxl/libjxl/issues/1540 | 1,287,215,388 | 1,540 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
We are trying to test JXL on ARM Cortex-M7 embedded microcontroller using Arm GNU Toolchain for bare-metal target. No idea if it would work and how well, but first step is to make it compiling. Unfortunately the libjxl code does not compile because integer types are mixed up. E.g. int and int32_t cross-used.
An example code segment from "enc_chroma_from_luma.cc":
```c
// Function header
void ComputeDC(const ImageF& dc_values, bool fast, int* dc_x, int* dc_b)
// Calling function
void CfLHeuristics::ComputeDC(bool fast, ColorCorrelationMap* cmap) {
int32_t ytob_dc = 0;
int32_t ytox_dc = 0;
HWY_DYNAMIC_DISPATCH(ComputeDC)(dc_values, fast, &ytox_dc, &ytob_dc);
```
Error:
`libjxl/lib/jxl/enc_chroma_from_luma.cc:345:62: error: invalid conversion from 'int32_t*' {aka 'long int*'} to 'int*' [-fpermissive]`
Another example with STL vectors in enc_ans.cc:
```c
// Function header:
std::vector<int> CreateFlatHistogram(int length, int total_count);
// Calling code (3 relevant lines)
using ANSHistBin = int32_t;
// ...
std::vector<ANSHistBin> counts(histogram, histogram + alphabet_size);
// ...
counts = CreateFlatHistogram(alphabet_size, ANS_TAB_SIZE);
```
Error:
`libjxl/lib/jxl/enc_ans.cc:492:61: error: no match for 'operator=' (operand types are 'std::vector<long int>' and 'std::vector<int>')`
Prrinting out relevant GCC intrinsic macros with:
`echo | arm-none-eabi-gcc -E -dM - `
Reveals that:
`#define __INT32_TYPE__ long int`
The sizeof(int) and sizeof(int32_t) matches, both are 4 (bytes), but semantics are different and code does not compile.
We started making local fixes, but new issues keep popping up. Did not find a way to solve it with compiler flags either.
**To Reproduce**
There is no official support for ARM Cortex-M target building so it is fully manual process to create/modify the build system for it. I skip the steps, it doesn't matter.
**Expected behavior**
I am not 100% sure that libjxl violates C/C++ standard(s), but it would make very much sense to avoid mixing types and use width-defined types only (int32_t, uint32_t, int64_t, etc.). It might also be possible to use some static code analyzer to detect the issues.
**Environment**
- OS: Windows
- Compiler version:[ Arm GNU Toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) 11.2-2022.02 AArch32 bare-metal target (arm-none-eabi).
- CPU type: ARM Cortex M7 (32-bits)
- cjxl/djxl version string: N/A
**Additional context**
Add any other context about the problem here.
| Integer types mixup | https://api.github.com/repos/libjxl/libjxl/issues/1534/comments | 6 | 2022-06-27T09:34:42Z | 2024-03-04T10:12:46Z | https://github.com/libjxl/libjxl/issues/1534 | 1,285,522,765 | 1,534 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
Failed to configure
```console
<pre>
CMake Error at lib/jxl.cmake:497 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:skcms-obj>
Objects of target "skcms-obj" referenced but no such target exists.
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
CMake Error at lib/jxl.cmake:547 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:skcms-obj>
Objects of target "skcms-obj" referenced but no such target exists.
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
CMake Error at lib/jxl.cmake:497 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:skcms-obj>
Objects of target "skcms-obj" referenced but no such target exists.
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
CMake Error at lib/jxl.cmake:547 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:skcms-obj>
Objects of target "skcms-obj" referenced but no such target exists.
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
CMake Error at lib/jxl.cmake:497 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:skcms-obj>
Objects of target "skcms-obj" referenced but no such target exists.
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
CMake Error at lib/jxl.cmake:547 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:skcms-obj>
Objects of target "skcms-obj" referenced but no such target exists.
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
CMake Error at lib/jxl.cmake:497 (add_library):
No SOURCES given to target: jxl-static
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
CMake Error at lib/jxl.cmake:547 (add_library):
No SOURCES given to target: jxl
Call Stack (most recent call first):
lib/CMakeLists.txt:136 (include)
</pre>
```
**To Reproduce**
Just try to compile and build
**Expected behavior**
Proceed well.
**Screenshots**
N/A
**Environment**
- OS: Ubuntu 22.04
- Compiler version: clang 14.0.0
- CPU type: x86_64
- cjxl/djxl version string: cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]
**Additional context**
Add any other context about the problem here.
Can anybody help please? | $<TARGET_OBJECTS:skcms-obj> | https://api.github.com/repos/libjxl/libjxl/issues/1532/comments | 2 | 2022-06-25T05:25:59Z | 2024-03-04T10:55:32Z | https://github.com/libjxl/libjxl/issues/1532 | 1,284,457,573 | 1,532 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
While building [this PR](https://repo.palemoon.org/MoonchildProductions/UXP/pulls/1928) which will include JPEG-XL support to [Pale Moon's](http://www.palemoon.org/) platform, the project owner who is on Windows found that it fails to build with the MSVC compiler, which we use to build Pale Moon on Windows. Here's his output when the error occurred:
0:32.95 c:\mozdev\obj-pm-x64-unstable\dist\include\jxl/decode.h(861): error C2146: syntax error: missing ';' before ide
ntifier 'JxlDecoderStatus'
0:32.95
0:32.96 In the directory /c/mozdev/obj-pm-x64-unstable/image
0:32.96 The following command failed to execute properly:
0:32.96 c:/mozdev/obj-pm-x64-unstable/_virtualenv/Scripts/python.exe -m mozbuild.action.cl c:/VS2015/VC/BIN/amd64/cl.EX
E -FoUnified_cpp_image0.obj -c -Ic:/mozdev/obj-pm-x64-unstable/dist/stl_wrappers -DNDEBUG=1 -DTRIMMED=1 -DWIN32_LEAN_AND
_MEAN -D_WIN32 -DWIN32 -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DOS_WIN=1 -D_UNICODE -DCHROMIUM_BUILD -DU_STATI
C_IMPLEMENTATION -DUNICODE -D_WINDOWS -D_SECURE_ATL -DCOMPILER_MSVC -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZIL
LA_INTERNAL_API -DIMPL_LIBXUL -Ic:/mozdev/PaleMoon/platform/image -Ic:/mozdev/obj-pm-x64-unstable/image -Ic:/mozdev/obj-
pm-x64-unstable/ipc/ipdl/_ipdlheaders -Ic:/mozdev/PaleMoon/platform/ipc/chromium/src -Ic:/mozdev/PaleMoon/platform/ipc/g
lue -Ic:/mozdev/PaleMoon/platform/dom/base -Ic:/mozdev/PaleMoon/platform/dom/svg -Ic:/mozdev/PaleMoon/platform/gfx/2d -I
c:/mozdev/PaleMoon/platform/image/decoders -Ic:/mozdev/PaleMoon/platform/layout/svg -Ic:/mozdev/PaleMoon/platform/netwer
k/base -Ic:/mozdev/PaleMoon/platform/xpcom/threads -Ic:/mozdev/PaleMoon/platform/gfx/skia -Ic:/mozdev/PaleMoon/platform/
gfx/skia/skia/include/config -Ic:/mozdev/PaleMoon/platform/gfx/skia/skia/include/core -Ic:/mozdev/PaleMoon/platform/gfx/
skia/skia/include/gpu -Ic:/mozdev/PaleMoon/platform/gfx/skia/skia/include/utils -Ic:/mozdev/obj-pm-x64-unstable/dist/inc
lude -Ic:/mozdev/obj-pm-x64-unstable/dist/include/nspr -Ic:/mozdev/obj-pm-x64-unstable/dist/include/nss -MD -FI c:/mozde
v/obj-pm-x64-unstable/mozilla-config.h -DMOZILLA_CLIENT -TP -nologo -wd5026 -wd5027 -Zc:sizedDealloc- -wd4752 -wd4091 -w
d4577 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -utf-8 -FS -Gw -wd4251 -wd4244 -wd4267 -wd4345 -wd4351 -wd4800 -wd4595 -we4
553 -GR- -Zi -O2 -GTs -GS- -favor:AMD64 -Oy -Ic:/mozdev/obj-pm-x64-unstable/dist/include/cairo -Fdgenerated.pdb c:/mozde
v/obj-pm-x64-unstable/image/Unified_cpp_image0.cpp
0:32.97 mozmake.EXE[5]: *** [c:/mozdev/PaleMoon/platform/config/rules.mk;886: Unified_cpp_image0.obj] Error 1
0:32.98 mozmake.EXE[4]: *** [c:/mozdev/PaleMoon/platform/config/recurse.mk;71: image/target] Error 2
0:32.98 mozmake.EXE[4]: *** Waiting for unfinished jobs....
**To Reproduce**
Refer to [our developer instructions for Windows](http://developer.palemoon.org/build/windows/). But before building: after cloning the UXP platform, pull from [my UXP fork](https://repo.palemoon.org/jobbautista9/UXP) and checkout the `1769-take2` branch. Add `--enable-jxl` to your `.mozconfig` before running `./mach build`.
**Expected behavior**
It should build fine.
**Screenshots**
N/A
**Environment**
- OS: Windows
- Compiler version: MSVC 2015
- CPU type: x86_64
- cjxl/djxl version string: N/A(?)
**Additional context**
We are building on the tree of commit 192ddd90fdf0c69cd1db1c8d7850db036dd87f4b to match Mozilla's implementation, and (just in case this is important) we're also using 0.17.0 for highway instead of 0.15.0 which Mozilla uses. Also pinging @wolfbeast who's the one who ran into the build issue here.
| Build error in MSVC (error C2146: syntax error: missing ';' before identifier 'JxlDecoderStatus') | https://api.github.com/repos/libjxl/libjxl/issues/1525/comments | 9 | 2022-06-22T03:48:17Z | 2022-06-24T13:33:39Z | https://github.com/libjxl/libjxl/issues/1525 | 1,279,461,308 | 1,525 |
[
"libjxl",
"libjxl"
] | /lib/jxl/dec_huffman.cc line 73
Maybe here is a shift of a negative value possible.
Code:
old_repeat = repeat;
if (repeat > 0) {
repeat -= 2;
repeat <<= extra_bits; // shift if repeat == -1
}
| undefined behavior | https://api.github.com/repos/libjxl/libjxl/issues/1520/comments | 1 | 2022-06-20T15:45:37Z | 2024-03-04T10:12:46Z | https://github.com/libjxl/libjxl/issues/1520 | 1,277,113,537 | 1,520 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
The build artifact "jxl-x64-windows-static" (e.g. from https://github.com/libjxl/libjxl/actions/runs/2514725515) is missing the DLLs `brotlidec.dll` and `brotlienc.dll`, which is needed to run `cjxl_ng.exe`, `djxl_ng.exe` and `jxlinfo.exe`.
**To Reproduce**
Steps to reproduce the behavior:
1. Download `jxl-x64-windows-static` from the latest GitHub action build
2. Run `jxlinfo.exe`
**Expected behavior**
It should run.
**Screenshots**
n/a
**Environment**
- OS: Windows 10
- Compiler version: n/a
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.7.0 c426256 [AVX2,SSE4,SSSE3,Emu128]
**Additional context**
n/a
| GitHub Action build missing brotlidec.dll, brotlienc.dll | https://api.github.com/repos/libjxl/libjxl/issues/1518/comments | 1 | 2022-06-18T16:57:24Z | 2025-05-21T14:26:05Z | https://github.com/libjxl/libjxl/issues/1518 | 1,275,835,241 | 1,518 |
[
"libjxl",
"libjxl"
] | **Describe the bug**
When decoding a grayscale animated JXL to APNG, `djxl` reports the following line, and then crashes with SIGILL:
```
./lib/jxl/image_bundle.cc:34: JXL_CHECK: metadata_->color_encoding.IsGray() == c_current.IsGray()
Illegal instruction (core dumped)
```
If the same file is decoded but no APNG is created, instead the output is discarded, then djxl exits successfully and gracefully after "Decoded to pixels."
**To Reproduce**
Take the attached JXL file and run `djxl test.jxl test.apng` and compare the output with `djxl test.jxl`.
**Expected behavior**
djxl should write the animated PNG without crashing.
**Environment**
- OS: Arch Linux x86_64
- Compiler version: gcc 12.1.0
- cjxl/djxl version string: `JPEG XL decoder v0.7.0 ec093557 [AVX2]`
**Full Log**
```
$ djxl test.jxl
JPEG XL decoder v0.7.0 ec093557 [AVX2]
Read 79 compressed bytes.
No output file specified.
Decoding will be performed, but the result will be discarded.
Decoded to pixels.
64 x 64, 3.54 MP/s [3.54, 3.54], 1 reps, 4 threads.
Allocations: 413 (max bytes in use: 3.873179E+06)
$ djxl test.jxl test.apng
JPEG XL decoder v0.7.0 ec093557 [AVX2]
Read 79 compressed bytes.
Decoded to pixels.
./lib/jxl/image_bundle.cc:34: JXL_CHECK: metadata_->color_encoding.IsGray() == c_current.IsGray()
Illegal instruction (core dumped)
```
**Sample**
It's attached as a `.jxl.gz` because github doesn't allow `.jxl` file extensions. Just `gunzip` it before testing.
[test.jxl.gz](https://github.com/libjxl/libjxl/files/8933880/test.jxl.gz) | djxl: Color Encoding check fails when decoding grayscale animated JXL to APNG | https://api.github.com/repos/libjxl/libjxl/issues/1517/comments | 5 | 2022-06-18T15:34:02Z | 2022-07-05T19:27:40Z | https://github.com/libjxl/libjxl/issues/1517 | 1,275,818,165 | 1,517 |
[
"libjxl",
"libjxl"
] | I noted in #1492 that Gimp and ImageMagick do produce wildly different compression results with quality 100:
I have the suspicion that ImageMagick does not switch to lossless modular when `-quality 100` is set by the user.
Can you have a look at what ImageMagick outputs when just `-quality 100` and a `.jxl` as output is selected? I suspect that there's a bug there somewhere given the large size differences of the files.
_Originally posted by @RubenKelevra in https://github.com/libjxl/libjxl/issues/1492#issuecomment-1152230669_
Demo files:
[demo.zip](https://github.com/libjxl/libjxl/files/8874274/demo.zip) | ImageMagick seems to be very poor in compressing with Quality 100 | https://api.github.com/repos/libjxl/libjxl/issues/1516/comments | 2 | 2022-06-17T18:59:25Z | 2022-06-29T14:44:30Z | https://github.com/libjxl/libjxl/issues/1516 | 1,275,366,638 | 1,516 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.