JPEG XL image format reference C++ implementation

Overview

JPEG XL reference implementation

JXL logo

This repository contains a reference implementation of JPEG XL (encoder and decoder), called libjxl.

JPEG XL is in the final stages of standardization and its codestream format is frozen.

The libraries API, command line options and tools in this repository are subject to change, however files encoded with cjxl conform to the JPEG XL format specification and can be decoded with current and future djxl decoders or libjxl decoding library.

Quick start guide

For more details and other workflows see the "Advanced guide" below.

Checking out the code

git clone https://gitlab.com/wg1/jpeg-xl.git --recursive

This repository uses git submodules to handle some third party dependencies under third_party/, that's why is important to pass --recursive. If you didn't check out with --recursive, or any submodule has changed, run: git submodule update --init --recursive.

Important: If you downloaded a zip file or tarball from the web interface you won't get the needed submodules and the code will not compile. You can download these external dependencies from source running ./deps.sh. The git workflow described above is recommended instead.

Installing dependencies

Required dependencies for compiling the code, in a Debian/Ubuntu based distribution run:

sudo apt install cmake pkg-config libbrotli-dev

Optional dependencies for supporting other formats in the cjxl/djxl tools, in a Debian/Ubuntu based distribution run:

sudo apt install libgif-dev libjpeg-dev libopenexr-dev libpng-dev libwebp-dev

We recommend using a recent Clang compiler (version 7 or newer), for that install clang and set CC and CXX variables. For example, with clang-7:

sudo apt install clang-7
export CC=clang-7 CXX=clang++-7

Building

cd jpeg-xl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
cmake --build . -- -j$(nproc)

The encoder/decoder tools will be available in the build/tools directory.

Installing

sudo cmake --install .

Basic encoder/decoder

To encode a source image to JPEG XL with default settings:

build/tools/cjxl input.png output.jxl

For more settings run build/tools/cjxl --help or for a full list of options run build/tools/cjxl -v -v --help.

To decode a JPEG XL file run:

build/tools/djxl input.jxl output.png

When possible cjxl/djxl are able to read/write the following image formats: .exr, .gif, .jpeg/.jpg, .pfm, .pgm/.ppm, .pgx, .png.

Benchmarking

For speed benchmarks on single images in single or multi-threaded decoding djxl can print decoding speed information. See djxl --help for details on the decoding options and note that the output image is optional for benchmarking purposes.

For a more comprehensive comparison of compression density between multiple options see "Benchmarking with benchmark_xl" section below.

Advanced guide

Building with Docker

We build a common environment based on Debian/Ubuntu using Docker. Other systems may have different combinations of versions and dependencies that have not been tested and may not work. For those cases we recommend using the Docker environment as explained in the step by step guide.

Building JPEG XL for developers

For experienced developers, we also provide build instructions for an up to date Debian-based Linux and 64-bit Windows. If you encounter any difficulties, please use Docker instead.

Benchmarking with benchmark_xl

We recommend build/tools/benchmark_xl as a convenient method for reading images or image sequences, encoding them using various codecs (jpeg jxl png webp), decoding the result, and computing objective quality metrics. An example invocation is:

build/tools/benchmark_xl --input "/path/*.png" --codec jxl:wombat:d1,jxl:cheetah:d2

Multiple comma-separated codecs are allowed. The characters after : are parameters for the codec, separated by colons, in this case specifying maximum target psychovisual distances of 1 and 2 (higher implies lower quality) and the encoder effort (see below). Other common parameters are r0.5 (target bitrate 0.5 bits per pixel) and q92 (quality 92, on a scale of 0-100, where higher is better). The jxl codec supports the following additional parameters:

Speed: falcon, cheetah, hare, wombat, squirrel, kitten, tortoise control the encoder effort in ascending order. This also affects memory usage: using lower effort will typically reduce memory consumption during encoding.

  • falcon disables all of the following tools.
  • cheetah enables coefficient reordering, context clustering, and heuristics for selecting DCT sizes and quantization steps.
  • hare enables Gaborish filtering, chroma from luma, and an initial estimate of quantization steps.
  • wombat enables error diffusion quantization and full DCT size selection heuristics.
  • squirrel (default) enables dots, patches, and spline detection, and full context clustering.
  • kitten optimizes the adaptive quantization for a psychovisual metric.
  • tortoise enables a more thorough adaptive quantization search.

Mode: JPEG XL has two modes. The default is Var-DCT mode, which is suitable for lossy compression. The other mode is Modular mode, which is suitable for lossless compression. Modular mode can also do lossy compression (e.g. jxl:m:q50).

  • m activates modular mode.

Other arguments to benchmark_xl include:

  • --save_compressed: save codestreams to output_dir.
  • --save_decompressed: save decompressed outputs to output_dir.
  • --output_extension: selects the format used to output decoded images.
  • --num_threads: number of codec instances that will independently encode/decode images, or 0.
  • --inner_threads: how many threads each instance should use for parallel encoding/decoding, or 0.
  • --encode_reps/--decode_reps: how many times to repeat encoding/decoding each image, for more consistent measurements (we recommend 10).

The benchmark output begins with a header:

Compr              Input    Compr            Compr       Compr  Decomp  Butteraugli
Method            Pixels     Size              BPP   #    MP/s    MP/s     Distance    Error p norm           BPP*pnorm   Errors

ComprMethod lists each each comma-separated codec. InputPixels is the number of pixels in the input image. ComprSize is the codestream size in bytes and ComprBPP the bitrate. Compr MP/s and Decomp MP/s are the compress/decompress throughput, in units of Megapixels/second. Butteraugli Distance indicates the maximum psychovisual error in the decoded image (larger is worse). Error p norm is a similar summary of the psychovisual error, but closer to an average, giving less weight to small low-quality regions. BPP*pnorm is the product of ComprBPP and Error p norm, which is a figure of merit for the codec (lower is better). Errors is nonzero if errors occurred while loading or encoding/decoding the image.

License

This software is available under a 3-clause BSD license which can be found in the LICENSE file, with an "Additional IP Rights Grant" as outlined in the PATENTS file.

Please note that the PATENTS file only mentions Google since Google is the legal entity receiving the Contributor License Agreements (CLA) from all contributors to the JPEG XL Project, including the initial main contributors to the JPEG XL format: Cloudinary and Google.

Additional documentation

Codec description

Development process

Contact

If you encounter a bug or other issue with the software, please open an Issue here.

There is a subreddit about JPEG XL, and informal chatting with developers and early adopters of libjxl can be done on the JPEG XL Discord server.

Comments
  • API only (proposal): set CMS and desired output color encoding in decoder

    API only (proposal): set CMS and desired output color encoding in decoder

    No implementation yet, just an API proposal.

    The aim is to make uint8 output more useful by allowing applications to let libjxl do the color conversion before conversion to uint8. That way, the uint8 output can be guaranteed to be in display space, and it's no longer necessary to use the float pixel callback and manually do the color management and conversion to uint8.

    Open question: in the encode API there's a default cms available, but I guess that here it also has to work in the lightweight decode-only libjxl_dec which doesn't include a default cms. We could perhaps allow calling JxlDecoderSetColorEncoding or JxlDecoderSetICCProfile when no explicit cms was set, but only in libjxl builds where we can have a default cms (i.e. if you do that when linking with libjxl_dec, it will return error).

    enhancement decoder api 
    opened by jonsneyers 28
  • GIMP Plugin Updates and Fixes

    GIMP Plugin Updates and Fixes

    • Reorganize save dialog
    • Rename functions, modify messages
    • Use JxlEncoderSetBasicInfo
    • Use float as intermediary format
    • Fix float image alpha channels
    • Fix grayscale ICC profile loading
    • Fix distance/quality conversion

    screenshot

    plugin 
    opened by xiota 28
  • Segmentation fault with cjxl built under cygwin

    Segmentation fault with cjxl built under cygwin

    Am running cygwin.

    Built the code according to the instructions on the main page with the following optional libraries: libgif-dev libjpeg-dev libpng-dev libwebp-dev

    Code built successfully

    Running cjxl against any image file as instructed gets this response:

    $cjxl 12345.jpg 12345.jxl
    JPEG XL encoder v0.5.0 [AVX2,SSE4,Scalar]
    Failed to choose default num_threads; you can avoid this error by specifying a --num_threads N argument.
    Use 'cjxl -h' for more information
    

    So, re-ran this:

    $cjxl --num_threads 1 12345.jpg 12345.jxl
    JPEG XL encoder v0.5.0 [AVX2,SSE4,Scalar]
    Read 799x1200 image, 76.4 MP/s
    Encoding [Container | JPEG, lossless transcode, squirrel | JPEG reconstruction data], 1 threads.
    Segmentation fault (core dumped)
    

    To Reproduce Steps to reproduce the behavior:

    Run the locally compiled (under cygwin) cjxl against any image file
    

    Expected behavior

    A jpegxl (.jxl) version of the input image is the expected output
    

    Screenshots If applicable, add screenshots or example input/output images to help explain your problem.

    Environment

    • OS: [e.g. Windows]
    Windows 8.1 / cygwin 3.1.7(0.340/5/3)
    
    • Compiler version: [e.g. clang 11.0.1]

    ~~Dunno how to find which compiler~~

    gcc --version
    gcc (GCC) 9.3.0
    

    Thanks

    • CPU type: [e.g. x86_64]
    x86_64
    
    • cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]]
    cjxl -v
    JPEG XL encoder v0.5.0 [AVX2,SSE4,Scalar]
    

    Additional context Add any other context about the problem here.

    stackdump attached:

    Exception: STATUS_ACCESS_VIOLATION at rip=0010057893E
    rax=000000000000002F rbx=000000080005EE90 rcx=00000000FFFF87F0
    rdx=0000000000000000 rsi=0000000000000001 rdi=0000000000000000
    r8 =00000000FFFF87D0 r9 =0000000000000000 r10=000000080005EE90
    r11=0000000000000000 r12=00000000000000F0 r13=000000080005F5D0
    r14=0000000000000000 r15=00000008000151F0
    rbp=00000000FFFF8810 rsp=00000000FFFF8730
    program=C:\cygwin64\usr\local\bin\cjxl.exe, pid 3362, thread main
    cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
    Stack trace:
    Frame        Function    Args
    000FFFF8810  0010057893E (00000000021, 0000000001E, 0080005F5D0, 00000000000)
    000FFFF88A0  0010057741F (00080183758, 00000000000, 00800053B14, 00000000066)
    000FFFF88E0  0010054B2C0 (00000000006, 008000151A8, 008000151F0, 00800015258)
    000FFFF8D00  00100447AA6 (00800053920, 000FFFFA410, 00800014AA8, 00800014368)
    000FFFF8E00  0010041EABD (000FFFF9DA0, 00800014A40, 00800014220, 000FFFFA850)
    000FFFF94C0  00100419308 (00000000068, 00000000001, 000FFFFBDB0, 000FFFFA410)
    000FFFFA170  00100408CC3 (4034F98C0B0EF22D, 000FFFFBEA0, 00800012FE0, 000FFFFBDB0)
    000FFFFBD90  001004022C9 (000FFFFCC70, 000FFFFCDF0, 00000000030, 8080808080808080)
    000FFFFCCE0  0018004AF2D (00000000000, 00000000000, 00000000000, 00000000000)
    000FFFFFFF0  00180048886 (00000000000, 00000000000, 00000000000, 00000000000)
    000FFFFFFF0  00180048934 (00000000000, 00000000000, 00000000000, 00000000000)
    End of stack trace
    
    building/portability 
    opened by JohnDarkhorse 20
  • JPEG XL image compression quality

    JPEG XL image compression quality

    I tried to assess lossy compression quality for medical images. I used V0.3.7. The lossy compressed images look like useless. I tried efforts 4 and 7 there is no difference. The quality I chose include 90, 98, 99. In all cases artifacts clearly visible. Are any there parameters I missed to adjust, or JPEG XL does not work for 16 bits gray scale images in lossy mode? I tried lossless, it worked fine. I can provide a comparison display of images original and compressed if there is a way to upload. The following is command line I used to compress images:

    ./cjxl ori_file comp_file -e 7 -q 99 --num_threads=2 --num_reps=1 -p

    CJXL responded like this:

    /data/out_png/ct_head_01.png JPEG XL encoder v0.3.7 [AVX2,SSE4,Scalar] ../lib/extras/codec_png.cc:497: PNG: no color_space/icc_pathname given, assuming sRGB Read 512x512 image, 35.8 MP/s Encoding [VarDCT, d0.190, squirrel], 2 threads. Compressed to 9983 bytes (0.305 bpp). 512 x 512, 3.23 MP/s [3.23, 3.23], 1 reps, 2 threads. /data/out_png/ct_lung.png

    question encoder quality 
    opened by yongjianbao 20
  • Request of EXIF support for convert JXL to JPG (exif needs to be added after convertion)

    Request of EXIF support for convert JXL to JPG (exif needs to be added after convertion)

    Hello! I'm looking forward to builders needs to add DJXL for exif support after convertion from JXL to JPG, so JPG recompressed need to have same original metadata came from my camera picture. I tried using exiftool to add .exif metadata into JXL file, but updated file failed.

    3 Major Developers, that I need request help to add EXIF support from JXL to JPG @deymo @jonsneyers @jxl-bot

    Please add support to build.

    Regards

    • Martin Eesmaa
    djxl 
    opened by MartinEesmaa 18
  • cjxl - temp JPEG files remain

    cjxl - temp JPEG files remain

    If the input files are JPEGs, cjxl creates jpe????.tmp files in the system %temp% folder and doesn't delete them after the encoding is finished.

    Windows 10 20H2 x64, cjxl v0.3.7-12-g04267a8

    cjxl building/portability 
    opened by eddiezato 18
  • encoder api: error codes

    encoder api: error codes

    ~~Builds on top of https://github.com/libjxl/libjxl/pull/358 ~~

    ~~Adds an encoder api return code for the case where the jbrd cannot be stored (e.g. because there is too much tail data), but the jpeg image data itself can be recompressed. This is not a fatal error (can still produce a useful jxl that has all the image data and any exif/xmp if there was any), but it's also not just OK (the result is not bit-exact-reconstructible to the original jpeg file).~~

    ~~Applications that do not know this new return code will likely treat it as an (unknown) encoder error, which is fine (this is what would happen before, when failure to write the jbrd would be a fatal encode error).~~

    Adds JxlEncoderGetError which can be used to check the reason why JXL_ENCODE_ERROR was returned: it could be either bad API usage, so an application bug, or an error condition that is not caused by an application bug and an application might want to react to it, e.g. by retrying JPEG recompression without storing the jbrd or by informing the user that the input is invalid.

    Also check the tail data size and return an error slightly earlier if it is too large, and catch this error in cjxl, so instead of a somewhat mysterious error like this:

    ./lib/jxl/fields.cc:729: JXL_FAILURE: No feasible selector for 9936393
    

    you now get a somewhat more useful error like this:

    ./lib/jxl/jpeg/jpeg_data.cc:367: JXL_FAILURE: Tail data too large (max size = 4260096, size = 9936393).
    
    encoder api container/metadata 
    opened by jonsneyers 17
  • GIMP plug-in use too much memory during image loading

    GIMP plug-in use too much memory during image loading

    Hello @xiota ,

    I was able to open this animation http://188.121.162.14/jxl/animation.jxl via GIMP 2.10 plug-in: gimp-jxl_frames

    However it look lot of time and consumed lot of memory.

    Animation has 330 full-hd frames. The plug-in first load all the frames into memory with FLOAT precision and at the end, it shrinks all the data 4-times by converting to U8 precision. Temporarily >10GB of memory is used.

    Isn't it better to load the frames in 8bit depth directly? Or if you load data in JXL_TYPE_FLOAT format, it can be converted to 8bit after each frame, so less memory is occupied during loading.

    plugin unrelated to 1.0 
    opened by novomesk 16
  • Subsampling Fails

    Subsampling Fails

    Describe the bug Attempting to subsample colors causes encoding to fail.

    To Reproduce Add --resampling=2 (or any other valid value other than 1). An error occurs: Failed to compress to VarDCT.

    Expected behavior Produce an image.

    Environment

    • OS: Windows 10
    • Compiler version: various
    • CPU type: x86_64
    • cjxl/djxl version string: [v0.3.7 | SIMD supported: AVX, Scalar]
    cjxl 
    opened by jimbo2150 16
  • Allow explicit targeting to psnr/ssim/etc.

    Allow explicit targeting to psnr/ssim/etc.

    Is your feature request related to a problem? Please describe. As well as targeting size/bpp, it would also be useful to target a specified fidelity type and value.

    Describe the solution you'd like Would like a --target_((psnr)|(ssim)|...)=X option to help slot in to static (Web site) image generation. cwebp has an option that works nicely for me right now, see https://www.earth.org.uk/note-on-site-technicals-51.html#2021-08-12

    Describe alternatives you've considered Writing my own script loop (again) around one of the other --target_XXXs.

    Additional context https://www.earth.org.uk/note-on-site-technicals-51.html#2021-08-12

    enhancement wontfix cjxl 
    opened by DamonHD 15
  • Building libjxl dependency Highway 0.14.0 halfway results in

    Building libjxl dependency Highway 0.14.0 halfway results in "Error running executable: Illegal instruction"

    Hello. Hopefully I'm doing this right.

    Describe the bug

    I am trying to build libjxl (0.5) from the Arch Linux User Repository (AUR) and halfway while building its dependency Highway (0.14.0) from the AUR also , I get this error when I am using the GCC:

    [ 56%] Building CXX object CMakeFiles/highway_test.dir/hwy/highway_test.cc.o
    [ 58%] Linking CXX executable tests/highway_test
    CMake Error at /usr/share/cmake-3.21/Modules/GoogleTestAddTests.cmake:77 (message):
      Error running test executable.                                                                                                           
    
        Path: '/home/kylxbn/.cache/paru/clone/highway/src/build/tests/highway_test'                                                            
        Result: Illegal instruction                                                                                                            
        Output:                                                                                                                                
                                                                                                                                               
    
    Call Stack (most recent call first):                                                                                                       
      /usr/share/cmake-3.21/Modules/GoogleTestAddTests.cmake:173 (gtest_discover_tests_impl)                                                   
    
    
    make[2]: *** [CMakeFiles/highway_test.dir/build.make:102: tests/highway_test] Error 1
    make[2]: *** Deleting file 'tests/highway_test'
    make[2]: Leaving directory '/home/kylxbn/.cache/paru/clone/highway/src/build'
    make[1]: *** [CMakeFiles/Makefile2:368: CMakeFiles/highway_test.dir/all] Error 2
    make[1]: Leaving directory '/home/kylxbn/.cache/paru/clone/highway/src/build'
    make: *** [Makefile:146: all] Error 2
    make: Leaving directory '/home/kylxbn/.cache/paru/clone/highway/src/build'
    ==> ERROR: A failure occurred in build().
        Aborting...
    error: failed to build 'highway-0.14.0-1': 
    

    When I try using the clang compiler, I get this:

    [ 56%] Building CXX object CMakeFiles/highway_test.dir/hwy/highway_test.cc.o
    [ 58%] Linking CXX executable tests/highway_test
    CMake Error at /usr/share/cmake-3.21/Modules/GoogleTestAddTests.cmake:77 (message):
      Error running test executable.                                                                                                           
    
        Path: '/home/kylxbn/.cache/paru/clone/highway/src/build/tests/highway_test'                                                            
        Result: Illegal instruction                                                                                                            
        Output:                                                                                                                                
                                                                                                                                               
    
    Call Stack (most recent call first):                                                                                                       
      /usr/share/cmake-3.21/Modules/GoogleTestAddTests.cmake:173 (gtest_discover_tests_impl)                                                   
    
    
    make[2]: *** [CMakeFiles/highway_test.dir/build.make:102: tests/highway_test] Error 1
    make[2]: *** Deleting file 'tests/highway_test'
    make[2]: Leaving directory '/home/kylxbn/.cache/paru/clone/highway/src/build'
    make[1]: *** [CMakeFiles/Makefile2:368: CMakeFiles/highway_test.dir/all] Error 2
    make[1]: Leaving directory '/home/kylxbn/.cache/paru/clone/highway/src/build'
    make: *** [Makefile:146: all] Error 2
    make: Leaving directory '/home/kylxbn/.cache/paru/clone/highway/src/build'
    

    This has been happening since libjxl 0.3.x days (not sure if even older versions are affected, since I only tried compiling 0.3.x), and I was thinking that it was just that my CPU is really old (since it doesn't support SSE 4.2). But I guess I better ask for confirmation regarding this, too.

    To Reproduce

    I have Paru as my AUR helper, and just trying to install libjxl with it will trigger the error.

    paru -S libjxl
    

    It seems to be failing while building the test binaries for Highway. I'm not really familiar with how Highway works, but it looks like it will build test executables, then try to execute it. However, maybe because of that missing SSE 4.2 support on my CPU, some inline assembly code fails to run, resulting in that "Illegal instruction" error and the build failing.

    Expected behavior

    I was hoping that an Illegal instruction error would not occur.

    Environment

    • OS: Arch Linux with GNU/Linux 5.13.7-zen1-1-zen (Zen kernel)
    • Desktop: KDE Plasma 5.22.4
    • Multimedia: PipeWire 0.3.32 and Wayland 1.19 (with xorg-xwayland 21.1.2)
    • Compiler version: GNU GCC 11.1.0 and Clang 12.0.1
    • Compile flags: Please see below
    • Terminal: yakuake
    • Shell: bash 5.1.008
    • CPU type: Intel Core 2 Duo P8400 (x86_64) @ 2.26GHz
    • CPU flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti tpr_shadow vnmi flexpriority vpid dtherm ida
    • Hardware: 4GB RAM, 140GB HDD, Dell Latitude E5400
    • cjxl/djxl version string: cjxl v0.5 (not sure if that's how it's shown--I wasn't able to compile cjxl due to dependency problems)

    Compile flags:

    CARCH="x86_64"
    CHOST="x86_64-pc-linux-gnu"
    CFLAGS="-march=x86-64 -mtune=generic -O2 -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,zelro,-z,now"
    

    Additional context

    This is an old laptop and it probably does not support SSE 4.2. While using SIMD instructions is cool and all, maybe a fallback to good old x86_64 ISA would be good if the CPU does not support SIMD? I'm honestly not even sure if the compiler can detect it and if it can be done with stuff like preprocessor commands, but... Just a suggestion? I'm honestly not that familiar with C++.

    This was how the build files were generated when I am using GCC

    -- The C compiler identification is GNU 11.1.0
    -- The CXX compiler identification is GNU 11.1.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Performing Test HWY_EMSCRIPTEN
    -- Performing Test HWY_EMSCRIPTEN - Failed
    -- Found GTest: /usr/lib64/cmake/GTest/GTestConfig.cmake (found version "1.11.0")  
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/kylxbn/.cache/paru/clone/highway/src/build
    

    and this is for clang:

    -- The C compiler identification is Clang 12.0.1
    -- The CXX compiler identification is Clang 12.0.1
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/clang - 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: /usr/bin/clang++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Performing Test HWY_EMSCRIPTEN
    -- Performing Test HWY_EMSCRIPTEN - Failed
    -- Found GTest: /usr/lib64/cmake/GTest/GTestConfig.cmake (found version "1.11.0")  
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/kylxbn/.cache/paru/clone/highway/src/build
    

    Hopefully this is useful! Please tell me if I can provide any more details and I would happily help.

    opened by kylxbn 15
  • Failed to build with vcpkg

    Failed to build with vcpkg

    Describe the bug Failed to build with vcpkg.

    To Reproduce Steps to reproduce the behavior: Followed the vcpkg build instructions.

    Expected behavior libjxl successfully build.

    Screenshots If applicable, add screenshots or example input/output images to help explain your problem.

    Environment

    • OS: Windows 11 22H2 build 22621.963
    • Compiler version: clang 11.0.1
    • CPU type: x86_64
    • cjxl/djxl version string: [e.g. cjxl [v0.3.7 | SIMD supported: SSE4,Scalar]]
    • Microsoft Visual Studio Community 2022 (64-bit) - Version 17.4.3

    Additional context

    I get this error

    Error	CMake Error at C:/Users/Alifian/scoop/apps/vcpkg/current/installed/x64-windows/share/gtest/GTestTargets.cmake:42 (message):
      Some (but not all) targets in this export set were already defined.
    
      Targets Defined: GTest::gtest, GTest::gtest_main
    
      Targets not yet defined: GTest::gmock, GTest::gmock_main		C:/Users/Alifian/scoop/apps/vcpkg/current/installed/x64-windows/share/gtest/GTestTargets.cmake	42	
    

    with vcpkg version 2022-11-10-5fdee72bc1fceca198fb1ab7589837206a8b81ba CMake log files

    opened by AlifianK 0
  • djxl no longer outputs all frames of animations

    djxl no longer outputs all frames of animations

    Describe the bug In djxl v0.6.1 and earlier, decoding JXL animations would dump all image frames. Since v0.7.0, it only outputs 1 file and I cannot find a relevant option for it in the manpage.

    To Reproduce Steps to reproduce the behavior:

    1. Unzip and use this as the input file - animation.zip
    2. Run djxl animated.jxl output.png
    3. Observe that only 1 output file was generated

    Expected behavior Because the input is an animation, it should generate multiple image frames: output-0.png, output-1.png...

    Environment

    • OS: Windows 10, Ubuntu 20.04
    • CPU type: x86_64
    • cjxl/djxl version string: djxl v0.7.0 [SSE4,SSSE3,Unknown]

    Additional context I tried using wildcard (*) in the output filename, which didn't help either.

    opened by marto55555 0
  • cjxl: add --use_original_profile option

    cjxl: add --use_original_profile option

    Enable --use_original_profile on the command-line tool cjxl, which makes libjxl avoid the XYB transform and encode the image in the same color space as the original image. This is potentially useful if the original ICC profile needs to be preserved.

    opened by thebombzen 1
  • DZgas' red-green test image correction

    DZgas' red-green test image correction

    This seems to reduce other red-green border artefacts, too.

    Butteraugli and ssimulacra2 don't agree that this is an improvement, but the red-green image becomes bearable after this PR and other main artefacts are reduced.

    Butteraugli thinks this is a 0.3 % degradation SSIMULACRA2 thinks something like 0.1 %

    DZgas' test image at d1 gets ~7 % more bytes as adaptive quantization allocates more bits in red/green saturated areas. The additional bytes sharpen the blurry text and fix some other remaining artefacts.

    Before:
    
    Encoding      kPixels    Bytes          BPP  E MP/s  D MP/s     Max norm  SSIMULACRA2        pnorm   PSNR   QABPP  SmallB  DCT4x8     AFV  DCT8x8    8x16    8x32      16   16x32      32   32x64      64       BPP*pnorm   Bugs
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    jxl:d0.1        18611 15044326    6.4665612   1.513   9.230   1.12962782  99.92010191   0.11925665  53.89   6.477 40.4601 21.5116  0.6252 29.8594  5.3100  0.0000  1.7166  0.8638  0.2366  0.1100  0.0880  0.771180443964      0
    jxl:d0.5        18611  5657878    2.4319477   1.772  14.019   1.47863185  97.36129278   0.37665935  45.00   2.473 14.7154 25.1931  0.7166 13.4177 27.1559  0.0000 17.9402  1.0756  0.3686  0.1100  0.0880  0.916015848219      0
    jxl:d0.8        18611  4208381    1.8089048   1.986  14.663   1.69022286  91.87824544   0.51771618  42.47   2.102 11.3576 21.8920  0.8077 10.0629 25.5356  0.0000 28.1215  1.4305  1.3204  0.1430  0.1100  0.936499269827      0
    jxl:d1          18611  3642003    1.5654563   2.034  15.915   1.86755776  89.14575226   0.59946063  41.29   2.153 10.0698 20.2803  0.8435  8.7555 22.6161  0.0000 32.0484  2.6024  3.3671  0.1100  0.0880  0.938429422430      0
    jxl:d1.1        18611  3428955    1.4738811   2.052  15.685   1.91853881  87.98104375   0.63784097  40.78   2.168  9.5543 19.6145  0.8659  8.3340 21.1238  0.0000 32.7664  3.5542  4.7701  0.1100  0.0880  0.940101722060      0
    jxl:d1.2        18611  3238109    1.3918490   2.057  15.893   2.33638668  86.82709996   0.67455548  40.33   2.166  9.0980 19.0114  0.8934  7.8852 19.7765  0.0000 32.8132  4.8334  6.2721  0.1100  0.0880  0.938879356530      0
    jxl:d1.3        18611  3100997    1.3329136   2.123  15.325   2.39044285  85.93008247   0.70501245  40.08   2.185  8.6765 18.5317  0.8961  7.5231 18.8804  0.0000 32.1530  6.2309  7.6806  0.1210  0.0880  0.939720684401      0
    jxl:d1.4        18611  2950017    1.2680173   2.087  15.660   2.24278617  84.88540266   0.74036454  39.68   2.183  8.3223 18.0107  0.9116  7.2088 18.0145  0.0000 31.4941  7.5706  8.9846  0.1541  0.1100  0.938795027845      0
    jxl:d1.5        18611  2813683    1.2094163   2.109  14.396   2.54174995  83.95820922   0.77491274  39.32   2.204  8.0056 17.5537  0.9288  6.9557 17.4341  0.0000 30.5368  8.9130 10.2445  0.1210  0.0880  0.937192107734      0
    jxl:d1.6        18611  2695924    1.1587995   2.206  15.354   2.76223683  83.10598124   0.80744657  38.97   2.203  7.7126 17.1566  0.9467  6.7271 16.9279  0.0000 29.6496 10.2170 11.1798  0.1541  0.1100  0.935668677620      0
    jxl:d1.7        18611  2588606    1.1126706   2.101  14.885   2.70151877  82.25856853   0.84071902  38.65   2.227  7.4224 16.8024  0.9773  6.5087 16.5854  0.0000 28.6125 11.3008 12.3627  0.1210  0.0880  0.935443319925      0
    jxl:d1.8        18611  2490588    1.0705391   2.139  14.892   2.78579783  81.45777419   0.87099349  38.35   2.212  7.1892 16.4482  1.0086  6.3873 16.2271  0.0000 27.7061 12.3242 13.2595  0.1210  0.1100  0.932432608657      0
    jxl:d1.8        18611  2490588    1.0705391   2.119  15.858   2.78579783  81.45777419   0.87099349  38.35   2.212  7.1892 16.4482  1.0086  6.3873 16.2271  0.0000 27.7061 12.3242 13.2595  0.1210  0.1100  0.932432608657      0
    jxl:d1.9        18611  2399595    1.0314273   2.139  16.066   2.77918530  80.68341290   0.90297829  38.07   2.218  6.9375 16.1315  1.0230  6.2481 15.9011  0.0000 26.9097 13.4136 14.0078  0.1210  0.0880  0.931356413556      0
    jxl:d2.0        18611  2316197    0.9955800   2.162  15.141   2.82473421  79.92668746   0.93270135  37.80   2.193  6.7257 15.7993  1.0340  6.0699 15.7099  0.0000 26.2990 14.2058 14.7285  0.1210  0.0880  0.928578774606      0
    jxl:d2.1        18611  2238787    0.9623065   2.251  14.780   3.35349011  79.14093490   0.96610258  37.54   2.252  6.4826 15.4156  1.0598  5.9558 15.4733  0.0000 25.5810 15.1549 15.3942  0.1541  0.1100  0.929686818679      0
    jxl:d2.2        18611  2165884    0.9309703   2.233  15.422   3.32903099  78.41750323   0.99628453  37.29   2.217  6.2838 15.1164  1.0739  5.8234 15.4403  0.0000 24.8355 15.8564 16.1425  0.1210  0.0880  0.927511349728      0
    jxl:d2.3        18611  2100579    0.9029000   2.230  15.595   3.46015573  77.67635306   1.02569449  37.06   2.263  6.1580 14.8358  1.0753  5.7312 15.1700  0.0000 24.2468 16.5579 16.7972  0.1210  0.0880  0.926099592860      0
    jxl:d2.4        18611  2036756    0.8754668   2.215  15.605   3.56859946  76.95752256   1.05523639  36.84   2.239  5.9957 14.5494  1.0808  5.5810 15.0566  0.0000 23.8011 17.1713 17.2814  0.1541  0.1100  0.923824372878      0
    jxl:d2.5        18611  1977828    0.8501375   2.170  15.265   3.33239198  76.22269563   1.08469355  36.62   2.273  5.8138 14.2681  1.0952  5.4871 14.8537  0.0000 23.3389 17.9224 17.7490  0.1430  0.1100  0.922138662823      0
    jxl:d2.6        18611  1922714    0.8264476   2.198  15.320   3.61969137  75.56669614   1.11460687  36.42   2.255  5.6838 14.0367  1.1155  5.3729 14.7175  0.0000 22.8245 18.3240 18.4863  0.1320  0.0880  0.921164211453      0
    jxl:d2.7        18611  1870479    0.8039953   2.256  15.751   3.87303877  74.93499104   1.14316471  36.22   2.239  5.5194 13.7478  1.1334  5.3303 14.6632  0.0000 22.2344 18.7696 19.1630  0.1320  0.0880  0.919099013639      0
    jxl:d2.8        18611  1820484    0.7825057   2.235  15.015   5.03217363  74.27263995   1.17305075  36.03   2.265  5.3609 13.5174  1.1413  5.2037 14.5985  0.0000 21.6953 19.3528 19.6472  0.1541  0.1100  0.917918916654      0
    jxl:d2.9        18611  1776099    0.7634275   2.177  14.263   4.41133070  73.61098963   1.20010391  35.86   2.250  5.2780 13.3180  1.1578  5.1202 14.5628  0.0000 21.3596 19.7105 20.0543  0.1320  0.0880  0.916192373796      0
    jxl:d3          18611  1734147    0.7453951   2.062  14.538   4.88195276  72.96157715   1.23093087  35.68   2.257  5.0710 13.0903  1.1299  5.0469 14.4218  0.0000 20.7930 20.4147 20.5935  0.1320  0.0880  0.917529900435      0
    jxl:d5          18611  1188111    0.5106904   2.061   8.606   5.28249359  61.23316770   1.73666844  33.21   2.279  3.5047  8.6696  1.0319  3.2568 11.6867  0.0000 16.4602 28.9976 26.8987  0.1651  0.1100  0.886899849057      0
    jxl:d7          18611   922883    0.3966864   2.084   8.431   7.21535873  51.52022851   2.19141630  31.70   2.313  2.7117  6.1604  0.8535  2.2788  9.8552  0.0000 13.8592 34.3785 30.3868  0.1871  0.1100  0.869305020776      0
    jxl:d15         18611   517951    0.2226329   2.158   8.159  11.85975456  21.79491977   3.68955130  28.69   2.202  1.3046  1.8820  0.3377  0.6571  5.8561  0.0000  8.0286 40.1857 41.5061  0.8693  0.1541  0.821415478139      0
    jxl:d24         18611   367938    0.1581522   0.293  18.859  30.86896896  -0.08960468   5.37868678  26.97   2.569  1.0777  2.3964  0.1881  0.7648  3.2599  0.0000  3.5006  9.4687  4.8306  0.0000  0.0000  0.850651263259      0
    jxl:d32         18611   296596    0.1274870   0.299  19.035  32.47261429 -13.13899416   6.16561480  26.37   2.364  0.7964  1.8070  0.1547  0.5485  2.9318  0.0000  3.0645 10.5498  5.6339  0.0000  0.0000  0.786035808525      0
    Aggregate:      18611  2099388    0.9023881   1.842  14.305   3.59352210  76.10914711   1.00672092  37.17   2.325  5.9778 12.7561  0.8334  5.1895 13.7189  0.0000 19.2658 10.0305  9.3650  0.1403  0.0980  0.908452963178      0
    
    After:
    
    Encoding      kPixels    Bytes          BPP  E MP/s  D MP/s     Max norm  SSIMULACRA2        pnorm   PSNR   QABPP  SmallB  DCT4x8     AFV  DCT8x8    8x16    8x32      16   16x32      32   32x64      64       BPP*pnorm   Bugs
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    jxl:d0.1        18611 15065296    6.4755748   1.510   9.113   1.12765002  99.91226860   0.11994889  53.95   6.486 40.4192 21.4838  0.6248 30.0282  5.2144  0.0000  1.7097  0.8665  0.2366  0.1100  0.0880  0.776737998200      0
    jxl:d0.5        18611  5671732    2.4379026   1.822  14.132   1.48691559  97.29544464   0.37851556  45.04   2.474 14.8031 25.1807  0.7221 13.4944 27.0341  0.0000 17.9045  1.0756  0.3686  0.1100  0.0880  0.922784066069      0
    jxl:d0.8        18611  4220248    1.8140056   2.005  13.594   1.64892650  91.90863672   0.51935594  42.50   2.119 11.4071 21.9669  0.8053 10.1272 25.4138  0.0000 28.0155  1.4277  1.3645  0.1430  0.1100  0.942114591146      0
    jxl:d1          18611  3651625    1.5695922   2.016  15.560   1.86793721  89.17545202   0.60153761  41.30   2.183 10.1107 20.4322  0.8411  8.8161 22.4243  0.0000 32.0938  2.5584  3.3066  0.1100  0.0880  0.944168721120      0
    jxl:d1.1        18611  3436153    1.4769750   2.131  15.930   1.93274319  87.92091018   0.64024408  40.80   2.194  9.6004 19.7686  0.8635  8.3824 20.9986  0.0000 32.8214  3.4772  4.6711  0.1100  0.0880  0.945624497590      0
    jxl:d1.2        18611  3242711    1.3938271   2.073  15.288   2.33638668  86.81735330   0.67709071  40.34   2.181  9.1121 19.1441  0.8913  7.9289 19.7201  0.0000 32.8572  4.7234  6.2061  0.1100  0.0880  0.943747365225      0
    jxl:d1.3        18611  3105471    1.3348367   2.187  16.255   2.67803311  85.88030467   0.70723639  40.08   2.184  8.6906 18.6906  0.8982  7.5592 18.8590  0.0000 32.2080  6.0796  7.5871  0.1210  0.0880  0.944045071566      0
    jxl:d1.4        18611  2954371    1.2698888   2.103  16.586   2.23413968  84.88138474   0.74283372  39.68   2.189  8.3419 18.1579  0.9095  7.2449 17.9347  0.0000 31.5106  7.4825  8.9350  0.1541  0.1100  0.943316200931      0
    jxl:d1.5        18611  2816855    1.2107797   2.119  14.310   2.54174995  83.97688757   0.77706510  39.32   2.229  8.0217 17.6724  0.9302  6.9612 17.3873  0.0000 30.5271  8.8993 10.1730  0.1210  0.0880  0.940854678570      0
    jxl:d1.6        18611  2699043    1.1601401   2.243  15.518   2.72953343  83.08328928   0.81043138  38.97   2.234  7.7250 17.2515  0.9508  6.7553 16.9038  0.0000 29.6689 10.1537 11.1083  0.1541  0.1100  0.940213986331      0
    jxl:d1.7        18611  2591053    1.1137224   2.162  15.223   2.72247791  82.24744623   0.84190886  38.65   2.229  7.4399 16.9148  0.9742  6.5400 16.5703  0.0000 28.5987 11.2046 12.3297  0.1210  0.0880  0.937652745202      0
    jxl:d1.8        18611  2492439    1.0713347   2.207  15.670   2.68261623  81.47514506   0.87285111  38.35   2.208  7.1865 16.5404  1.0103  6.4172 16.2092  0.0000 27.8037 12.2444 13.1385  0.1210  0.1100  0.935115728357      0
    jxl:d1.8        18611  2492439    1.0713347   2.214  15.532   2.68261623  81.47514506   0.87285111  38.35   2.208  7.1865 16.5404  1.0103  6.4172 16.2092  0.0000 27.8037 12.2444 13.1385  0.1210  0.1100  0.935115728357      0
    jxl:d1.9        18611  2401180    1.0321085   2.156  16.060   2.83999348  80.65052726   0.90492680  38.06   2.245  6.9341 16.1992  1.0254  6.2556 15.9052  0.0000 26.9496 13.3613 13.9417  0.1210  0.0880  0.933982672870      0
    jxl:d2.0        18611  2318512    0.9965750   2.200  15.669   2.83064461  79.89344825   0.93580956  37.79   2.192  6.7247 15.9090  1.0313  6.0706 15.7244  0.0000 26.2384 14.2388 14.6350  0.1210  0.0880  0.932604436488      0
    jxl:d2.1        18611  2240615    0.9630923   2.216  15.714   3.16792607  79.14517575   0.96800518  37.54   2.244  6.4908 15.5160  1.0619  5.9572 15.4919  0.0000 25.5191 15.1852 15.2952  0.1541  0.1100  0.932278295631      0
    jxl:d2.2        18611  2167190    0.9315317   2.220  15.552   3.26319051  78.39036845   0.99772656  37.29   2.223  6.2770 15.1962  1.0784  5.8361 15.3997  0.0000 24.8327 15.8647 16.0875  0.1210  0.0880  0.929413925062      0
    jxl:d2.3        18611  2101426    0.9032641   2.240  15.903   3.53807282  77.67983242   1.02731748  37.07   2.255  6.1583 14.8753  1.0801  5.7271 15.1446  0.0000 24.3637 16.5744 16.6487  0.1210  0.0880  0.927939008677      0
    jxl:d2.4        18611  2037950    0.8759800   2.285  15.885   3.57654333  76.95929162   1.05751105  36.84   2.257  5.9977 14.5824  1.0808  5.5851 15.0187  0.0000 23.9098 17.1273 17.2154  0.1541  0.1100  0.926358503892      0
    jxl:d2.5        18611  1978135    0.8502695   2.183  16.099   3.28589249  76.28845396   1.08677029  36.63   2.282  5.8083 14.3069  1.0928  5.4981 14.8571  0.0000 23.3348 17.9471 17.6830  0.1430  0.1100  0.924047589674      0
    jxl:d2.6        18611  1922650    0.8264201   2.234  15.853   3.68295431  75.57381663   1.11676471  36.42   2.270  5.6690 14.0679  1.1189  5.3709 14.7313  0.0000 22.7874 18.3845 18.4313  0.1320  0.0880  0.922916829235      0
    jxl:d2.7        18611  1870668    0.8040765   2.257  15.855   3.85926461  74.94072141   1.14518800  36.23   2.251  5.5160 13.8059  1.1365  5.3186 14.6446  0.0000 22.2124 18.9072 19.0200  0.1320  0.0880  0.920818757147      0
    jxl:d2.8        18611  1820845    0.7826609   2.305  14.469   5.28625488  74.23488572   1.17614949  36.03   2.268  5.3726 13.5453  1.1485  5.2037 14.5779  0.0000 21.7049 19.4106 19.5537  0.1541  0.1100  0.920526205963      0
    jxl:d2.9        18611  1776474    0.7635887   2.304  14.816   4.34010172  73.65222060   1.20159603  35.86   2.258  5.2784 13.3393  1.1602  5.1188 14.5291  0.0000 21.3624 19.7407 20.0323  0.1320  0.0880  0.917525184531      0
    jxl:d3          18611  1733931    0.7453023   2.144  15.411   4.86109877  72.98725028   1.23144983  35.68   2.240  5.0634 13.1010  1.1337  5.0394 14.3895  0.0000 20.8370 20.4257 20.5715  0.1320  0.0880  0.917802398196      0
    jxl:d5          18611  1188111    0.5106904   2.071   8.829   5.28249359  61.23316770   1.73666844  33.21   2.279  3.5047  8.6696  1.0319  3.2568 11.6867  0.0000 16.4602 28.9976 26.8987  0.1651  0.1100  0.886899849057      0
    jxl:d7          18611   922883    0.3966864   2.077   8.054   7.21535873  51.52022851   2.19141630  31.70   2.313  2.7117  6.1604  0.8535  2.2788  9.8552  0.0000 13.8592 34.3785 30.3868  0.1871  0.1100  0.869305020776      0
    jxl:d15         18611   517951    0.2226329   2.238   8.313  11.85975456  21.79491977   3.68955130  28.69   2.202  1.3046  1.8820  0.3377  0.6571  5.8561  0.0000  8.0286 40.1857 41.5061  0.8693  0.1541  0.821415478139      0
    jxl:d24         18611   367938    0.1581522   0.298  19.087  30.86896896  -0.08960468   5.37868678  26.97   2.569  1.0777  2.3964  0.1881  0.7648  3.2599  0.0000  3.5006  9.4687  4.8306  0.0000  0.0000  0.850651263259      0
    jxl:d32         18611   296596    0.1274870   0.297  19.559  32.47261429 -13.13899416   6.16561480  26.37   2.364  0.7964  1.8070  0.1547  0.5485  2.9318  0.0000  3.0645 10.5498  5.6339  0.0000  0.0000  0.786035808525      0
    Aggregate:      18611  2101139    0.9031409   1.871  14.487   3.59549789  76.10674076   1.00893822  37.17   2.332  5.9829 12.8038  0.8342  5.2010 13.6878  0.0000 19.2720  9.9938  9.3264  0.1403  0.0980  0.911213333380      0
    
    CI:full 
    opened by jyrkialakuijala 0
  • JPEG XL software support - Titan Engine

    JPEG XL software support - Titan Engine

    Thanks for making an excellent image codec!

    I've just integrated it into my "Titan" game engine https://esenthel.com/ https://github.com/Esenthel/EsenthelEngine/

    Perhaps you want to include it on your list - https://github.com/libjxl/libjxl/blob/main/doc/software_support.md

    Where can I show my support to contact Google so they integrate it into Chrome? Is there any email I can contact or a change.org campaign?

    documentation unrelated to 1.0 
    opened by GregSlazinski 1
Releases(v0.7.0)
  • v0.7.0(Sep 21, 2022)

    Added

    • decoder API: Ability to decode the content of metadata boxes: JXL_DEC_BOX, JXL_DEC_BOX_NEED_MORE_OUTPUT, JxlDecoderSetBoxBuffer, JxlDecoderGetBoxType, JxlDecoderGetBoxSizeRaw and JxlDecoderSetDecompressBoxes.
    • decoder API: ability to mark the input is finished: JxlDecoderCloseInput.
    • decoder API: ability to request updates on different progressive events using JxlDecoderSetProgressiveDetail; currently supported events are kDC, kLastPasses and kPasses.
    • decoder API: ability to specify desired intensity target using JxlDecoderSetDesiredIntensityTarget
    • decoder API: new function JxlDecoderSetCoalesced to allow decoding non-coalesced (unblended) frames, e.g. layers of a composite still image or the cropped frames of a recompressed GIF/APNG.
    • decoder API: new function JxlDecoderSetUnpremultiplyAlpha to set preference for getting an associated alpha channel with premultiplied or unpremultiplied colors.
    • decoder API: field added to JxlFrameHeader: a JxlLayerInfo struct that contains crop dimensions and offsets and blending information for the non-coalesced case.
    • decoder API: new function JxlDecoderGetExtraChannelBlendInfo to get the blending information for extra channels in the non-coalesced case.
    • decoder API: new function JxlDecoderSetMultithreadedImageOutCallback, allowing output callbacks to receive more information about the number of threads on which they are running.
    • decoder API: new function JxlDecoderSkipCurrentFrame to skip processing the current frame after a progressive detail is reached.
    • decoder API: new function JxlDecoderGetIntendedDownsamplingRatio to get the intended downsampling ratio of progressive steps, based on the information in the frame header.
    • decoder API: new function JxlDecoderSetRenderSpotcolors to allow disabling rendering of spot colors.
    • decoder/encoder API: add two fields to JXLBasicInfo: intrinsic_xsize and intrinsic_ysize to signal the intrinsic size.
    • encoder API: ability to add metadata boxes, added new functions JxlEncoderAddBox, JxlEncoderUseBoxes, JxlEncoderCloseBoxes and JxlEncoderCloseFrames.
    • encoder API: added ability to set several encoder options / extra fields to frames using JxlEncoderSetFrameName, JxlEncoderFrameSettingsSetOption, JxlEncoderFrameSettingsSetFloatOption.
    • encoder API: added ability to check required codestream compatibility level and force specified using JxlEncoderGetRequiredCodestreamLevel and JxlEncoderSetCodestreamLevel.
    • encoder API: added ability to force emitting box-based container format using JxlEncoderUseContainer.
    • encoder API: added ability to store JPEG metadata for lossless reconstruction using JxlEncoderStoreJPEGMetadata
    • encoder API: new functions JxlEncoderSetFrameHeader and JxlEncoderSetExtraChannelBlendInfo to set animation and blending parameters of the frame, and JxlEncoderInitFrameHeader and JxlEncoderInitBlendInfo to initialize the structs to set.
    • encoder API: ability to encode arbitrary extra channels: JxlEncoderInitExtraChannelInfo, JxlEncoderSetExtraChannelInfo, JxlEncoderSetExtraChannelName and JxlEncoderSetExtraChannelBuffer.
    • encoder API: ability to plug custom CMS implementation using JxlEncoderSetCms(JxlEncoder* enc, JxlCmsInterface cms)
    • encoder API: added JxlEncoderGetError to retrieve last encoder error.

    Changed

    • decoder API: using JxlDecoderCloseInput at the end of all input is required when using JXL_DEC_BOX, and is now also encouraged in other cases, but not required in those other cases for backwards compatibility.
    • encoder API: JxlEncoderCloseInput now closes both frames and boxes input.
    • CLI: cjxl and djxl have been reimplemented on the base of public decoder and encoder API; dropped dependency on gflags for argument parsing.

    Deprecated

    • decoder API: JXL_DEC_EXTENSIONS event: use JXL_DEC_BASIC_INFO
    • decoder / encoder API: pixel types JXL_TYPE_BOOLEAN and JXL_TYPE_UINT32: consider using JXL_TYPE_UINT8 and JXL_TYPE_FLOAT correspondingly.
    • decoder API: pixel format parameter for JxlDecoderGetColorAsEncodedProfile and JxlDecoderGetICCProfileSize: pass NULL.
    • decoder API: JxlDecoderDefaultPixelFormat
    • encoder API: JxlEncoderOptions: use JxlEncoderFrameSettings instead.
    • encoder API: JxlEncoderOptionsCreate: use JxlEncoderFrameSettingsCreate instead.
    • encoder API: JxlEncoderOptionsSetDistance: use JxlEncoderSetFrameDistance instead.
    • encoder API: JxlEncoderOptionsSetLossless: use JxlEncoderSetFrameLossless instead.
    • encoder API: JxlEncoderOptionsSetEffort: use JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_EFFORT, effort) instead.
    • encoder API: JxlEncoderOptionsSetDecodingSpeed: use JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_DECODING_SPEED, tier) instead.
    • encoder API: deprecated JXL_ENC_NOT_SUPPORTED, the encoder returns JXL_ENC_ERROR instead and there is no need to handle JXL_ENC_NOT_SUPPORTED.

    Note: This release is for evaluation purposes and may contain bugs, including security bugs, that may not be individually documented when fixed. See the SECURITY.md file for details. Always prefer to use the latest release.

    Please provide feedback and report bugs here.

    Source code(tar.gz)
    Source code(zip)
    jxl-linux-x86_64-static-v0.7.0.tar.gz(9.73 MB)
    jxl-x86-windows-static.zip(4.79 MB)
    jxl-x64-windows-static.zip(5.77 MB)
    jxl-debs-amd64-debian-bookworm-v0.7.0.tar.gz(78.52 MB)
    jxl-debs-amd64-debian-bullseye-v0.7.0.tar.gz(82.22 MB)
    jxl-debs-amd64-ubuntu-18.04-v0.7.0.tar.gz(82.11 MB)
    jxl-debs-amd64-ubuntu-20.04-v0.7.0.tar.gz(85.32 MB)
  • v0.7rc(Aug 9, 2022)

    THIS IS A RELEASE CANDIDATE. We expect to have v0.7 release soon.

    Added

    • decoder API: Ability to decode the content of metadata boxes: JXL_DEC_BOX, JXL_DEC_BOX_NEED_MORE_OUTPUT, JxlDecoderSetBoxBuffer, JxlDecoderGetBoxType, JxlDecoderGetBoxSizeRaw and JxlDecoderSetDecompressBoxes.
    • decoder API: ability to mark the input is finished: JxlDecoderCloseInput.
    • decoder API: ability to request updates on different progressive events using JxlDecoderSetProgressiveDetail; currently supported events are kDC, kLastPasses and kPasses.
    • decoder API: ability to specify desired intensity target using JxlDecoderSetDesiredIntensityTarget
    • decoder API: new function JxlDecoderSetCoalesced to allow decoding non-coalesced (unblended) frames, e.g. layers of a composite still image or the cropped frames of a recompressed GIF/APNG.
    • decoder API: new function JxlDecoderSetUnpremultiplyAlpha to set preference for getting an associated alpha channel with premultiplied or unpremultiplied colors.
    • decoder API: field added to JxlFrameHeader: a JxlLayerInfo struct that contains crop dimensions and offsets and blending information for the non-coalesced case.
    • decoder API: new function JxlDecoderGetExtraChannelBlendInfo to get the blending information for extra channels in the non-coalesced case.
    • decoder API: new function JxlDecoderSetMultithreadedImageOutCallback, allowing output callbacks to receive more information about the number of threads on which they are running.
    • decoder API: new function JxlDecoderSkipCurrentFrame to skip processing the current frame after a progressive detail is reached.
    • decoder API: new function JxlDecoderGetIntendedDownsamplingRatio to get the intended downsampling ratio of progressive steps, based on the information in the frame header.
    • decoder API: new function JxlDecoderSetRenderSpotcolors to allow disabling rendering of spot colors.
    • decoder/encoder API: add two fields to JXLBasicInfo: intrinsic_xsize and intrinsic_ysize to signal the intrinsic size.
    • encoder API: ability to add metadata boxes, added new functions JxlEncoderAddBox, JxlEncoderUseBoxes, JxlEncoderCloseBoxes and JxlEncoderCloseFrames.
    • encoder API: added ability to set several encoder options / extra fields to frames using JxlEncoderSetFrameName, JxlEncoderFrameSettingsSetOption, JxlEncoderFrameSettingsSetFloatOption.
    • encoder API: added ability to check required codestream compatibility level and force specified using JxlEncoderGetRequiredCodestreamLevel and JxlEncoderSetCodestreamLevel.
    • encoder API: added ability to force emitting box-based container format using JxlEncoderUseContainer.
    • encoder API: added ability to store JPEG metadata for lossless reconstruction using JxlEncoderStoreJPEGMetadata
    • encoder API: new functions JxlEncoderSetFrameHeader and JxlEncoderSetExtraChannelBlendInfo to set animation and blending parameters of the frame, and JxlEncoderInitFrameHeader and JxlEncoderInitBlendInfo to initialize the structs to set.
    • encoder API: ability to encode arbitrary extra channels: JxlEncoderInitExtraChannelInfo, JxlEncoderSetExtraChannelInfo, JxlEncoderSetExtraChannelName and JxlEncoderSetExtraChannelBuffer.
    • encoder API: ability to plug custom CMS implementation using JxlEncoderSetCms(JxlEncoder* enc, JxlCmsInterface cms)
    • encoder API: added JxlEncoderGetError to retrieve last encoder error.

    Changed

    • decoder API: using JxlDecoderCloseInput at the end of all input is required when using JXL_DEC_BOX, and is now also encouraged in other cases, but not required in those other cases for backwards compatibility.
    • encoder API: JxlEncoderCloseInput now closes both frames and boxes input.
    • CLI: cjxl and djxl have been reimplemented on the base of public decoder and encoder API; dropped dependency on gflags for argument parsing.

    Deprecated

    • decoder API: JXL_DEC_EXTENSIONS event: use JXL_DEC_BASIC_INFO
    • decoder / encoder API: pixel types JXL_TYPE_BOOLEAN and JXL_TYPE_UINT32: consider using JXL_TYPE_UINT8 and JXL_TYPE_FLOAT correspondingly.
    • decoder API: pixel format parameter for JxlDecoderGetColorAsEncodedProfile and JxlDecoderGetICCProfileSize: pass NULL.
    • decoder API: JxlDecoderDefaultPixelFormat
    • encoder API: JxlEncoderOptions: use JxlEncoderFrameSettings instead.
    • encoder API: JxlEncoderOptionsCreate: use JxlEncoderFrameSettingsCreate instead.
    • encoder API: JxlEncoderOptionsSetDistance: use JxlEncoderSetFrameDistance instead.
    • encoder API: JxlEncoderOptionsSetLossless: use JxlEncoderSetFrameLossless instead.
    • encoder API: JxlEncoderOptionsSetEffort: use JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_EFFORT, effort) instead.
    • encoder API: JxlEncoderOptionsSetDecodingSpeed: use JxlEncoderFrameSettingsSetOption(frame_settings, JXL_ENC_FRAME_SETTING_DECODING_SPEED, tier) instead.
    • encoder API: deprecated JXL_ENC_NOT_SUPPORTED, the encoder returns JXL_ENC_ERROR instead and there is no need to handle JXL_ENC_NOT_SUPPORTED.

    Note: This release is for evaluation purposes and may contain bugs, including security bugs, that may not be individually documented when fixed. See the SECURITY.md file for details. Always prefer to use the latest release.

    Please provide feedback and report bugs here.

    Source code(tar.gz)
    Source code(zip)
    jxl-linux-x86_64-static-v0.7rc.tar.gz(9.73 MB)
    jxl-x86-windows-static.zip(4.18 MB)
    jxl-x64-windows-static.zip(5.14 MB)
    jxl-debs-amd64-debian-bookworm-v0.7rc.tar.gz(79.53 MB)
    jxl-debs-amd64-debian-sid-v0.7rc.tar.gz(78.51 MB)
    jxl-debs-amd64-debian-bullseye-v0.7rc.tar.gz(82.20 MB)
    jxl-debs-amd64-debian-buster-v0.7rc.tar.gz(81.87 MB)
    jxl-debs-amd64-ubuntu-18.04-v0.7rc.tar.gz(82.09 MB)
    jxl-debs-amd64-ubuntu-20.04-v0.7rc.tar.gz(85.29 MB)
  • v0.6.1(Oct 29, 2021)

    Changed

    • Security: Fix OOB read in splines rendering (#735 - CVE-2021-22563)
    • Security: Fix OOB copy (read/write) in out-of-order/multi-threaded decoding (#708 - CVE-2021-22564)
    • Fix segfault in djxl tool with --allow_partial_files flag (#781).
    • Fix border in extra channels when using upsampling (#796)

    Note: This release is for evaluation purposes and may contain bugs, including security bugs, that may not be individually documented when fixed. See the SECURITY.md file for details. Always prefer to use the latest release.

    Please provide feedback and report bugs here.

    Source code(tar.gz)
    Source code(zip)
    jxl-linux-x86_64-static-v0.6.1.tar.gz(9.17 MB)
    jxl-x86-windows-static.zip(3.71 MB)
    jxl-debs-amd64-debian-buster-v0.6.1.tar.gz(86.60 MB)
    jxl-debs-amd64-debian-bookworm-v0.6.1.tar.gz(86.96 MB)
    jxl-debs-amd64-ubuntu-20.04-v0.6.1.tar.gz(88.41 MB)
    jxl-x64-windows-static.zip(4.53 MB)
    jxl-debs-amd64-ubuntu-18.04-v0.6.1.tar.gz(61.85 MB)
  • v0.6(Oct 4, 2021)

    Added

    • API: New functions to decode extra channels: JxlDecoderExtraChannelBufferSize and JxlDecoderSetExtraChannelBuffer.
    • API: New function JxlEncoderInitBasicInfo to initialize JxlBasicInfo (only needed when encoding). NOTE: it is now required to call this function when using the encoder. Padding was added to the struct for forward compatibility.
    • API: Support for encoding oriented images.
    • API: FLOAT16 support in the encoder API.
    • Rewrite of the GDK pixbuf loader plugin. Added proper color management and animation support.
    • Rewrite of GIMP plugin. Added compression parameters dialog and switched to using the public C API.
    • Debian packages for GDK pixbuf loader (libjxl-gdk-pixbuf) and GIMP (libjxl-gimp-plugin) plugins.
    • cjxl/djxl support for stdin and stdout.

    Changed

    • API: Renamed the field alpha_associated in JxlExtraChannelInfo to alpha_premultiplied, to match the corresponding name in JxlBasicInfo.
    • Improved the 2x2 downscaling method in the encoder for the optional color channel resampling for low bit rates.
    • Fixed: the combination of floating point original data, XYB color encoding, and Modular mode was broken (in both encoder and decoder). It now works. NOTE: this can cause the current encoder to write jxl bitstreams that do not decode with the old decoder. In particular this will happen when using cjxl with PFM, EXR, or floating point PSD input, and a combination of XYB and modular mode is used (which caused an encoder error before), e.g. using options like -m -q 80 (lossy modular), -d 4.5 or --progressive_dc=1 (modular DC frame), or default lossy encoding on an image where patches end up being used. There is no problem when using cjxl with PNG, JPEG, GIF, APNG, PPM, PGM, PGX, or integer (8-bit or 16-bit) PSD input.
    • libjxl static library now bundles skcms, fixing static linking in downstream projects when skcms is used.
    • Spline rendering performance improvements.
    • Butteraugli changes for less visual masking.

    Note: This release is for evaluation purposes and may contain bugs, including security bugs, that may not be individually documented when fixed. See the SECURITY.md file for details. Always prefer to use the latest release.

    Please provide feedback and report bugs here.

    Source code(tar.gz)
    Source code(zip)
  • v0.5(Aug 2, 2021)

    Added

    • API: New function to decode the image using a callback outputting a part of a row per call.
    • API: 16-bit float output support.
    • API: JxlDecoderRewind and JxlDecoderSkipFrames functions to skip more efficiently to earlier animation frames.
    • API: JxlDecoderSetPreferredColorProfile function to choose color profile in certain circumstances.
    • encoder: Adding center_x and center_y flags for more control of the tile order.
    • New encoder speeds lightning (1) and thunder (2).

    Changed

    • Re-licensed the project under a BSD 3-Clause license. See the LICENSE and PATENTS files for details.
    • Full JPEG XL part 1 specification support: Implemented all the spec required to decode files to pixels, including cases that are not used by the encoder yet. Part 2 of the spec (container format) is final but not fully implemented here.
    • Butteraugli metric improvements. Exact numbers are different from previous versions.
    • Memory reductions during decoding.
    • Reduce the size of the jxl_dec library by removing dependencies.
    • A few encoding speedups.
    • Clarify the security policy.
    • Significant encoding improvements (~5 %) and less ringing.
    • Butteraugli metric to have some less masking.
    • cjxl flag --speed is deprecated and replaced by the --effort synonym.

    Removed

    • API for returning a downsampled DC was deprecated (JxlDecoderDCOutBufferSize and JxlDecoderSetDCOutBuffer) and will be removed in the next release.

    Note: This release is for evaluation purposes and may contain bugs, including security bugs, that may not be individually documented when fixed. See the SECURITY.md file for details. Always prefer to use the latest release.

    Please provide feedback and report bugs here.

    Source code(tar.gz)
    Source code(zip)
Owner
libjxl
JPEG XL reference software and related tools
libjxl
Rufus is a utility that helps format and create bootable USB flash drives.

Rufus is a utility that helps format and create bootable USB flash drives.

Pete Batard 21.3k Jan 9, 2023
IntX is a C++11 port of IntX arbitrary precision Integer library with speed, about O(N * log N) multiplication/division algorithms implementation.

IntX IntX is a C++11 port of IntX arbitrary precision Integer library with speed, about O(N * log N) multiplication/division algorithms implementation

Telepati 8 Dec 22, 2022
A C++ implementation of the graph algorithm of finding all strongly connected components with DFS

SinkSCC A C++ implementation of the graph algorithm of finding all strongly connected components with DFS. Details Each SCC of a graph can be treated

Schrodinger ZHU Yifan 2 Nov 2, 2021
The Implementation of quadtree-based multi-thread tiled pyramid building algorithm.

tile-map-parallel-builder Quadtree-based multi-thread tiled pyramid building algorithm. Core Concept NOTE: The level is different from TMS zoom level.

Shepard 5 May 16, 2022
C implementation of a sudoku solver with backtracking algorithm

SUDOKU SOLVER Sudoku solver using backtracking algorithm Sudoku game To solve a sudoku, you need a sudoku. So i made a basic implmentation of one with

Jonas STIRNEMANN 2 Mar 23, 2022
C implementation of a classical prefix tree with a search function

C implementation of a classical prefix tree with a search function

Liz3 1 Nov 19, 2021
Standalone c++ implementation for computing Motif Adjacency Matrices of large directed networks, for 3-node graphlets and 4-node graphletsa containing a 4 edge loop.

Building Motif Adjacency Matrices This is an efficient C++ software for building Motif Adjacency Matrices (MAM) of networks, for a range of motifs/gra

null 6 Sep 27, 2022
A C++ implementation of timsort

TimSort A C++ implementation of TimSort, an O(n log n) stable sorting algorithm, ported from Python's and OpenJDK's. See also the following links for

TimSort 267 Dec 9, 2022
Implementation of Dijkstra's algorithm for finding the shortest paths between nodes in a graph using Priority Queue data structure in C

Implementation of Dijkstra's algorithm for finding the shortest paths between nodes in a graph using Priority Queue data structure in C. File "airport

Artem Kolpakov 1 Jan 24, 2022
C implementation of the Landau-Vishkin algorithm

This repo implements the Landau-Vishkin algorithm to compute the edit distance between two strings. This is a fast method for highly similar strings.

Heng Li 35 Sep 9, 2022
The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.

OpenEXR OpenEXR provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the mot

Academy Software Foundation 1.3k Jan 6, 2023
Analysing and implementation of lossless data compression techniques like Huffman encoding and LZW was conducted along with JPEG lossy compression technique based on discrete cosine transform (DCT) for Image compression.

PROJECT FILE COMPRESSION ALGORITHMS - Huffman compression LZW compression DCT Aim of the project - Implement above mentioned compression algorithms an

null 1 Dec 14, 2021
The “Quite OK Image” format for fast, lossless image compression

The “Quite OK Image” format for fast, lossless image compression

Dominic Szablewski 6k Dec 30, 2022
An 'embedded-friendly' (aka Arduino) JPEG image encoding library

Starting in the late 80's I wrote my own imaging codecs for the existing standards (CCITT G3/G4 was the first). I soon added GIF, JPEG and not long after that, the PNG specification was ratified. All of this code was "clean room" - written just from the specification. I used my imaging library in many projects and products over the years and recently decided that some of my codecs could get a new lease on life as open source, embedded-friendly libraries for microcontrollers.

Larry Bank 38 Dec 30, 2022
Second life for famous JPEGView - fast and tiny viewer/editor for JPEG, BMP, PNG, WEBP, TGA, GIF and TIFF images with a minimalist GUI and base image processing.

JPEGView-Image-Viewer-and-Editor Updated Dec 07 2021. Version 1.1.1.0 has been released. Download link1, link2 added. Second life for famous JPEGView

Ann Hatt 40 Dec 27, 2022
Official repository of the ISO Base Media File Format Reference Software

ISO Base Media File Format (ISOBMFF) This repository is the official repository for the ISO Base Media File Format Reference Software. The ISO base me

null 87 Dec 14, 2022
A Linux reference software for building the Demo Core-Image on Renesas RZ/V2M Evaluation Kit

Introduction This repository is a Linux reference software for building the Demo Core-Image on Renesas RZ/V2M Evaluation Kit . You have to get the pro

Lexra Chang 3 Jan 20, 2022
(Simple String Format) is an syntax of format and a library for parse this.

SSFMT (Simple String Format) is an syntax of format and a library for parse this. SSFMT != {fmt} SSFMT is NOT an API/library for parse {fmt} syntax !

null 2 Jan 30, 2022
An AV1 Image (AVIF) file format plug-in for Adobe® Photoshop®

avif-format An AV1 Image (AVIF) file format plug-in for Adobe® Photoshop®. Single images can be loaded and saved using 8, 10 or 12 bits-per-channel, i

Nicholas Hayes 100 Dec 20, 2022
Quite OK Image (QOI) format encoder/decoder

This project implements encoding and decoding the "Quite OK Image" (QOI) format in the Ć programming language. Ć can be automatically translated to pu

Piotr Fusik 50 Dec 25, 2022