JPEG XL

Info

rules 57
github 35276
reddit 647

JPEG XL

tools 4225
website 1655
adoption 20712
image-compression-forum 0

General chat

welcome 3810
introduce-yourself 291
color 1414
photography 3435
other-codecs 23765
on-topic 24923
off-topic 22701

Voice Channels

General 2147

Archived

bot-spam 4380

libjxl

lonjil
2024-02-19 09:52:10
wait, does this impact whether JXL can be adopted as a new format for DICOM?
Traneptora
2024-02-19 09:52:43
at least that was at that time
HCrikki
2024-02-19 10:18:29
dicom sounded excited about jxl in last week's podcast (s7 e2, first mention i recall around 29min in)
spider-mario
2024-02-19 10:20:20
I read that as an effort parameter at first
2024-02-19 10:20:40
“they’re excited about effort 2 specifically? odd, but why not”
lonjil
HCrikki dicom sounded excited about jxl in last week's podcast (s7 e2, first mention i recall around 29min in)
2024-02-19 10:22:08
the SIIMcast link Jon posted in <#822105409312653333> ?
2024-02-19 10:22:30
hm, that's e3
Oleksii Matiash
_wb_ But seriously, even at 14 bit the least significant bits are pretty much noise, I cannot really imagine use cases where you really have 24 bit data that is worth storing losslessly (i.e. not just 12 bits of real data plus 12 bits of noise)
2024-02-20 08:26:07
It is useful for jxl-in-dng raws. All modern cameras have 14 bpp precision, CMOS based DB's and I believe some latest "small" cameras have 16 bpp. And at least in case of DB's these 2 extra bits are not only noise: tried zeroing 14 MSB, and the leftover had some image residuals.
CrushedAsian255
Oleksii Matiash It is useful for jxl-in-dng raws. All modern cameras have 14 bpp precision, CMOS based DB's and I believe some latest "small" cameras have 16 bpp. And at least in case of DB's these 2 extra bits are not only noise: tried zeroing 14 MSB, and the leftover had some image residuals.
2024-02-20 08:35:25
Is there a way to convert (Linear) DNGs to JXL? Like the ones an iPhone output?
2024-02-20 08:35:31
Like listlessly #
2024-02-20 08:35:37
Losslessly
Oleksii Matiash
CrushedAsian255 Is there a way to convert (Linear) DNGs to JXL? Like the ones an iPhone output?
2024-02-20 08:36:31
Adobe dng converter can do it, I believe, if you ask it correctly
CrushedAsian255
2024-02-20 08:37:20
Does it keep the 12bit data?
2024-02-20 08:37:34
I’m asking because the iphones’s DNG uses Lossless jpeg
2024-02-20 08:37:52
And I’m thinking lossless JXL would be higher compression efficiency
Oleksii Matiash
2024-02-20 08:40:02
It does, however I did not get significant size reduction. Don't know why. But I tested on 16 bit raw, maybe it is the reason
jonnyawsom3
2024-02-20 09:06:15
My phone makes 20MP RAWs, uncompressed they're 24MB, default Lossless Jpeg is around 7MB, JXL was around 6MB, although at default e7 (I think, the converter is horrid to use)
CrushedAsian255 Does it keep the 12bit data?
2024-02-20 09:07:07
Page 21 https://helpx.adobe.com/content/dam/help/en/photoshop/pdf/DNG_Spec_1_7_1_0.pdf
Oleksii Matiash
My phone makes 20MP RAWs, uncompressed they're 24MB, default Lossless Jpeg is around 7MB, JXL was around 6MB, although at default e7 (I think, the converter is horrid to use)
2024-02-20 09:07:20
I got ~7 MB difference on 100 MP raws, like 122 MB vs 115
CrushedAsian255
Page 21 https://helpx.adobe.com/content/dam/help/en/photoshop/pdf/DNG_Spec_1_7_1_0.pdf
2024-02-20 09:07:43
Problem I don’t have Photoshop
Oleksii Matiash
CrushedAsian255 Problem I don’t have Photoshop
2024-02-20 09:08:43
It is not about photoshop. PS currently does not support jxl or jxl-dng directly, only in ACR
CrushedAsian255
2024-02-20 09:09:10
Does cameras cost money?
jonnyawsom3
CrushedAsian255 Problem I don’t have Photoshop
2024-02-20 09:09:30
Me neither, it's free https://helpx.adobe.com/uk/camera-raw/using/adobe-dng-converter.html
2024-02-20 09:09:58
I've never used an Adobe product, apart from this
Demiurge
2024-02-20 02:06:31
Is it being considered to reduce the default effort only in lossless mode to level 3, to be closer in performance with vardct effort 7 speed?
2024-02-20 02:07:19
There isn't that big a difference in bitrate compared to the huge speed gain you get, when using lossless mode
2024-02-20 02:07:56
I think it would give people a better first impression of the format and tools
jonnyawsom3
2024-02-20 02:09:16
I remember promoting effort 5 for lossless, since that's when patches is enabled to match lossy's e7. But I was unaware how inaccurate and slow patches is anyway. And I think it's disabled for the default streaming mode now anyway
Demiurge
2024-02-20 03:57:32
After effort 3, the speed of lossless mode drops tenfold for marginal benefit
2024-02-20 03:58:29
A faster default setting for lossless mode would be very useful especially for first impressions, which is important at this early stage
2024-02-20 03:59:32
At least until a genius like Jyrki ports his lossless webp encoder to output jpegxl
Oleksii Matiash
Demiurge A faster default setting for lossless mode would be very useful especially for first impressions, which is important at this early stage
2024-02-20 04:06:25
But the speed is only one half of impression
_wb_
2024-02-20 04:10:34
In libjxl 0.10, e7 lossless will be significantly faster than in libjxl 0.9, at least for larger images
Demiurge
2024-02-20 04:55:49
The speed/bitrate is at a very good balance at e3 in my experience (in lossless mode only)
2024-02-20 04:56:58
By comparison e7 is much much slower in lossless mode than in lossy mode and this goes against what I would assume would be most people's expectations when getting a first impression.
2024-02-20 05:00:23
e3 already easily beats other lossless formats in a very quick encode speed. The only thing competitive is lossless webp
_wb_
2024-02-20 06:38:46
For photos, e3 is very good
2024-02-20 06:40:57
The speed of e7 lossless will be in the same ballpark as lossy. But maybe it would make sense to make e6 the default for both...
qdwang
2024-02-21 03:32:51
Hi guys, anyone know how to compile libjxl to wasm? I've tried this: ``` emcmake cmake .. \ -D CMAKE_BUILD_TYPE=Release \ -D BUILD_TESTING=OFF \ -D JPEGXL_ENABLE_DEVTOOLS=OFF \ -D JPEGXL_ENABLE_TOOLS=OFF \ -D JPEGXL_ENABLE_DOXYGEN=OFF \ -D JPEGXL_ENABLE_MANPAGES=OFF \ -D JPEGXL_ENABLE_BENCHMARK=OFF \ -D JPEGXL_ENABLE_EXAMPLES=OFF \ -D BROTLI_BUNDLED_MODE=ON make ``` No errors, but only some `.a` static libs, `brotli.wasm` and `hwy_list_targets.wasm` are generated. I'm not quite familar with cmake system. So anyone know how to solve this?
yoochan
2024-02-21 08:11:23
<@625718249262284800> did you followed : https://github.com/libjxl/libjxl/blob/main/doc/building_wasm.md ? my compile script looks very much like it :
2024-02-21 08:13:29
```sh source ${JXL_root_DIR}/repo/emsdk/emsdk_env.sh pushd $JXL_root_DIR/build build_dir=$JXL_root_DIR/build/wasm32 source_dir=$JXL_root_DIR/repo/libjxl if [[ -d ${build_dir} ]] then rm -rf ${build_dir} fi pushd ${source_dir} BUILD_TARGET=wasm32 BUILD_DIR=$build_dir SKIP_TEST=1 ENABLE_WASM_SIMD=1 emconfigure ./ci.sh release popd popd ```
Demiurge
_wb_ The speed of e7 lossless will be in the same ballpark as lossy. But maybe it would make sense to make e6 the default for both...
2024-02-21 08:29:42
That's unexpected. They are like 1000x difference right now
qdwang
yoochan <@625718249262284800> did you followed : https://github.com/libjxl/libjxl/blob/main/doc/building_wasm.md ? my compile script looks very much like it :
2024-02-21 09:03:13
Thank you, I'll try this.
yoochan <@625718249262284800> did you followed : https://github.com/libjxl/libjxl/blob/main/doc/building_wasm.md ? my compile script looks very much like it :
2024-02-21 09:44:10
I tried this, it said: `CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.`
yoochan
2024-02-21 09:45:13
if you use ubuntu : `sudo apt install ninja-build`
qdwang
2024-02-21 09:56:10
thank you, i'm not using linux, but i managed to install ninja
yoochan
2024-02-21 10:04:02
oki, what do you use ?
qdwang
2024-02-21 10:06:02
homebrew on macos
2024-02-21 10:08:13
It's weird. With `-G Ninja`, it will cause `make: *** No targets specified and no makefile found. Stop.` to run `make`.
2024-02-21 10:09:37
And I cannot see any `wasm` files generated
spider-mario
2024-02-21 10:09:44
if using `-G Ninja`, you should run `ninja` instead of `make`
2024-02-21 10:09:46
it’s its own command
2024-02-21 10:10:08
which uses a `build.ninja` instead of a `Makefile`
yoochan
2024-02-21 10:10:14
indeed and ./ci.sh does it
qdwang
yoochan indeed and ./ci.sh does it
2024-02-21 10:11:32
I cannot run ci.sh, I don't have a lot of dependencies installed, and ci.sh cannot disable these features. So I choose to manually disable the flags.
spider-mario which uses a `build.ninja` instead of a `Makefile`
2024-02-21 10:11:52
Thank you. `ninja` works.
2024-02-21 10:15:20
after `ninja`, there are still only `.a` files in build folder. I can merge they to `wasm` file by using `emcc`, but it will return JXL_ENC_ERROR when calling some functions like setting basic info.
2024-02-21 10:24:59
anyway, thank you guys. I'll try to figure this out myself.
2024-02-21 10:42:25
<@1051137277813870592> btw, how did you use the libjxl wasm? Did you write another c++ file and compile to another wasm file? Or call the libjxl wasm from js directly(i don't think it's possible to create a c struct basic info in javascript)?
yoochan
2024-02-21 10:58:53
ha ! I used only the demo... (https://github.com/libjxl/libjxl/blob/main/tools/wasm_demo/README.md) I planned to be more fluent in the integration of wasm into my own code but I'm not. I expected to write the glue code in javascript, I think it's what most people do
2024-02-21 11:01:14
if I remember well, the integration of libjxl.wasm into a web page is not so easy, you want to setup workers to do the job in backends, and perhaps a caching system to save your converted file... I wanted to use the demo as a way to learn a bit how I could adapt the wasm to my needs and website but I couldn't spend more time on it yet
qdwang
yoochan if I remember well, the integration of libjxl.wasm into a web page is not so easy, you want to setup workers to do the job in backends, and perhaps a caching system to save your converted file... I wanted to use the demo as a way to learn a bit how I could adapt the wasm to my needs and website but I couldn't spend more time on it yet
2024-02-21 12:44:30
Thanks for the info you provided. I'll try these.
yoochan
2024-02-21 12:46:37
<@625718249262284800> what's your final goal ? as for me I wanted to build a simple gallery webapp. If you learn something interesting don't hesitate to document your journey 😄
qdwang
yoochan <@625718249262284800> what's your final goal ? as for me I wanted to build a simple gallery webapp. If you learn something interesting don't hesitate to document your journey 😄
2024-02-21 01:30:40
encode image to jxl on browser
2024-02-21 01:31:42
I manage to set basic info now. But another issue occurred during processing: ``` libjxl.js:1 Uncaught RuntimeError: Aborted(OOM). Build with -sASSERTIONS for more info. at abort (libjxl.js:1:5258) at abortOnCannotGrowMemory (libjxl.js:1:57926) at _emscripten_resize_heap (libjxl.js:1:58029) at libjxl.wasm:0x1eed at libjxl.wasm:0x2623 at libjxl.wasm:0x19ef at libjxl.wasm:0x1d7251 ``` during `JxlEncoderProcessOutput`
2024-02-21 01:32:39
My code is just trying to encode a 16x16 size RGB data
2024-02-21 01:33:10
The code runs no problem for the desktop target.
yoochan
2024-02-21 01:34:26
you could try to find the guy who made squoosh, have a look at this post https://discord.com/channels/794206087879852103/803645746661425173/1209853020259618848
qdwang
2024-02-21 01:41:08
Oh, i figured out the issue. I need to add `-sALLOW_MEMORY_GROWTH` to emcc to enable memory growth during running.
jonnyawsom3
2024-02-21 02:17:31
If you can, I'd try building with 0.10.0, for the same reason I mentioned in <#803645746661425173>
2024-02-21 08:17:13
Well that was faster than expected
veluca
Well that was faster than expected
2024-02-21 08:18:20
😎
_wb_
Well that was faster than expected
2024-02-21 09:08:12
That's a good summary of v0.10
2024-02-21 09:08:24
Faster than expected
spider-mario
2024-02-21 09:23:48
nobody expects the v0.10
MSLP
2024-02-21 09:31:11
should we be afraid of v0.10?
jonnyawsom3
_wb_ Faster than expected
2024-02-21 09:31:23
Shame we don't have names for versions
yoochan
2024-02-21 09:40:07
We already have weird names for the efforts, I think that's enough
CrushedAsian255
yoochan We already have weird names for the efforts, I think that's enough
2024-02-21 10:07:23
what are they
MSLP should we be afraid of v0.10?
2024-02-21 10:07:31
is it bad or smth?
MSLP
2024-02-21 10:35:31
no, just unexpected so fast
CrushedAsian255
2024-02-21 10:37:44
is it fine if i stay on `ab47708d`
2024-02-21 10:38:58
i looked through the Commit-logs and nothing pops out
jonnyawsom3
2024-02-21 11:00:51
Probably fine if using the release causes issues for you
MSLP
2024-02-21 11:02:32
just when reporting any bugs/problems is easier with fixed releases, ppl responding don't have to search for the particular commit
w
2024-02-22 01:22:43
are all the aborts removed yet
Traneptora
2024-02-22 01:23:49
still not, iirc
Nyao-chan
2024-02-22 01:48:46
is -e 9 from previous versions now equal to -e 10? I'd like to use the global compression tools
Traneptora
2024-02-22 01:50:28
no, -e 9 is still there
2024-02-22 01:50:38
previous e10 is now e11, and there's now a new e10
Nyao-chan
2024-02-22 01:51:34
yes, but -e 9 now uses streaming and does not use patches as far as I can tell. so it does less than before?
Traneptora
2024-02-22 01:52:01
hm, then yea use e10 if you want nonstreaming with patches
Nyao-chan
2024-02-22 01:52:11
thank you
yoochan
CrushedAsian255 what are they
2024-02-22 07:37:35
TectonicPlate, Glacier, Tortoise, Kitten, Squirrel, Wombat, Hare, Cheetah, Falcon, Thunder, Lightning
CrushedAsian255
2024-02-22 07:47:34
Is tectonic plate e11
yoochan
2024-02-22 07:49:12
perhaps, I couldn't find exactly the correspondance as tectonic has a value of -1 as shown in `lib/jxl/common.h`
2024-02-22 07:50:12
the associated comment says : ```cpp // Try multiple combinations of Glacier flags for modular mode. Otherwise // like kGlacier. ```
veluca
CrushedAsian255 Is tectonic plate e11
2024-02-22 08:08:59
yup
w are all the aborts removed yet
2024-02-22 08:09:29
encoder is being fuzzed though, so we should not be hitting them, at least
Oleksii Matiash
2024-02-22 09:05:26
Hmm, did a quick test, and 0.10 -e 10 is slightly worse than 0.9 -e 9 when compressing jpg. Really slightly, but a bit unexpected. And funny enough 0.10 -e 9 gave slightly better result than 0.10 -e 10 with that jpg, but 0.9 -e 9 is still better
2024-02-22 09:23:39
Also, just curious: JPEG XL encoder v0.9.2 41b8cda [AVX2,SSE4,SSSE3,SSE2] JPEG XL encoder v0.10.0 19bcd82 [AVX2,SSE2] Are SSE4 and SSSE3 disabled intentionally?
veluca
2024-02-22 09:28:25
no
2024-02-22 09:28:32
did you change compilers perhaps?
Tirr
2024-02-22 09:40:17
that happens also on my builds, using clang on arch linux
sklwmp
Well that was faster than expected
2024-02-22 09:41:49
> encoder API: implemented new api functions for streaming encoding. does this mean cjxl v0.10.0 is not yet using streaming encoding, just that it is available? or is it already being used?
Oleksii Matiash
veluca did you change compilers perhaps?
2024-02-22 09:45:35
I just downloaded win build from github
veluca
2024-02-22 09:46:05
huh, also for v0.9.2?
Oleksii Matiash
2024-02-22 09:46:26
No, JPEG XL encoder v0.9.2 41b8cda [AVX2,SSE4,SSSE3,SSE2]
veluca
2024-02-22 09:47:09
I don't understand this answer...
Oleksii Matiash
2024-02-22 09:47:28
Well, then I did not get the question, sorry
Tirr
2024-02-22 09:47:59
did you download v0.9.2 also on github?
Oleksii Matiash
2024-02-22 09:48:04
Ah, yes, sorry
veluca
2024-02-22 09:48:52
... interesting
2024-02-22 09:48:58
it might be the highway update
Tirr
2024-02-22 09:50:33
maybe SSE2 is there because it's static, and AVX2 because it's dynamically selected? seems a bit awkward
veluca
2024-02-22 09:53:48
I suspect SSE4 is not built
Tirr
2024-02-22 09:54:27
maybe I can test the binary in machine with SSE4 but not with AVX2
2024-02-22 09:56:36
``` ~/libjxl-v0.10.0 ❯ ./djxl -V djxl v0.10.0 19bcd82 [SSE4,SSE2] Copyright (c) the JPEG XL Project ```
2024-02-22 09:57:53
so it seems like it just shows only the selected one
veluca
2024-02-22 10:29:14
ah
Oleksii Matiash
Oleksii Matiash Hmm, did a quick test, and 0.10 -e 10 is slightly worse than 0.9 -e 9 when compressing jpg. Really slightly, but a bit unexpected. And funny enough 0.10 -e 9 gave slightly better result than 0.10 -e 10 with that jpg, but 0.9 -e 9 is still better
2024-02-22 10:35:22
The same with lossless encoding: 0.10 e 10 is little worse than 0.9 e 9 😦
jonnyawsom3
sklwmp > encoder API: implemented new api functions for streaming encoding. does this mean cjxl v0.10.0 is not yet using streaming encoding, just that it is available? or is it already being used?
2024-02-22 11:53:52
It's already being used, and streaming is now default for both cjxl and libjxl until effort 10
sklwmp
2024-02-22 04:42:51
weird, i'm getting the same [AVX2] vs [AVX2,SSE4,SSE2] thing
2024-02-22 04:42:59
i built libjxl v0.10.0 exactly the same as v0.9.2
Tirr so it seems like it just shows only the selected one
2024-02-22 04:43:50
ah, if this is intentional, it should probably be communicated somewhere
jonnyawsom3
2024-02-22 05:27:53
Part of me wonders why those extensions are enabled/disabled, since you'd assume SSE3 is better than SSE2, although I could be misremembering what ones my chip has and it's a naive assumption
2024-02-22 05:28:19
I'll check when I'm home
Kleis Auke
2024-02-22 05:51:00
I think `uint32_t` here: <https://github.com/libjxl/libjxl/blob/v0.10.0/tools/codec_config.cc#L42> should be `int64_t`, see e.g. commit: <https://github.com/google/highway/commit/379457ceb1041d2e38c35af02b4ea9990143a070>. Not sure if that fixes the `[AVX2,SSE4,SSSE3,SSE2]` versus `[AVX2,SSE2]` thing.
2024-02-22 05:51:38
(let me verify this and open a PR if required)
2024-02-22 06:02:20
That doesn't fix it, but I think `SSSE3` should never be listed there after commit <https://github.com/libjxl/libjxl/commit/beb3dae3fb7219525c4278e9e775d681c0b381f7>. Not sure about `SSE4` though.
veluca I suspect SSE4 is not built
2024-02-22 06:12:50
Indeed, I suspect that this may also be the cause. See for example: ```console $ djxl -V djxl v0.10.0 b38469de [AVX3_ZEN4,AVX3,AVX2,SSE4,SSE2] Copyright (c) the JPEG XL Project $ vips --targets builtin targets: AVX3_SPR AVX3_ZEN4 AVX3 AVX2 SSE4 SSE2 supported targets: AVX3_ZEN4 AVX3_DL AVX3 AVX2 SSE4 SSSE3 SSE2 ``` (libjxl was built with `-DJPEGXL_ENABLE_AVX512{,_ZEN4,_SPR}=TRUE`) So, the targets listed by `djxl -V` are the ones that are built and supported by the current CPU. So, if it isn't built (or not supported), it is not listed. `vips --targets` would display both, so the ones supported by the current CPU and the ones that are builtin.
veluca
2024-02-22 06:35:25
SSSE3 I can understand
2024-02-22 06:35:38
SSE4 is about as common and just better
2024-02-22 06:35:49
I don't understand SSE4 disappearing though
Tirr
2024-02-22 06:42:00
I'm getting SSE4 on Intel Celeron so it's actually in prebuilt binary
2024-02-22 06:43:31
uh well I'm getting AVX2 and SSE4 on another CPU with my build ``` ❯ djxl -V djxl v0.10.0 b38469de [AVX2,SSE4,SSE2] Copyright (c) the JPEG XL Project ```
2024-02-22 06:43:55
I'll try prebuilt one
veluca
2024-02-22 06:44:51
It might be compiler dependent
Tirr
2024-02-22 06:45:33
yeah I'm getting SSE4, this is the statically linked one ``` /tmp/libjxl-v0.10.0/tools ❯ ./djxl -V djxl v0.10.0 19bcd82 [AVX2,SSE4,SSE2] Copyright (c) the JPEG XL Project ```
Kleis Auke
2024-02-22 06:45:38
Looks like it's a MSVC thing: <https://github.com/libjxl/libjxl/actions/runs/7993393111/job/21829120447#step:10:4008>
2024-02-22 06:53:55
Found it: https://github.com/google/highway/commit/30a85e23fc820dacbeff72e5a666712c9982b305#diff-bfe5635b4f0b39e741ed4ce8f585674994a3434568c7caa471c0e7be9a7938c8R604
2024-02-22 06:55:14
So, only `AVX2` and `SSE2` are attainable when building with MSVC.
2024-02-22 07:00:10
Does vcpkg support building with `clang-cl`? AFAIK, that would cause `HWY_COMPILER_MSVC` to become `0`.
jonnyawsom3
2024-02-22 07:23:19
On the plus side, it means 0.10.0 could actually be even faster ;P
veluca
2024-02-22 09:25:00
mhhh, I'd much rather still have SSE4 in MSVC builds
On the plus side, it means 0.10.0 could actually be even faster ;P
2024-02-22 09:25:13
not if you support AVX2, no 😛
jonnyawsom3
2024-02-22 09:26:15
Ahh, I've not spent a weekend reading up on extensions yet, only half a dozen image formats and a few video codecs so far xD
spider-mario
2024-02-22 09:27:27
are faster builds the only reason?
veluca
2024-02-22 09:37:14
it seems to be? at least if one trusts the commit message
Nyao-chan
2024-02-22 09:59:48
I used to get only AVX2 since I can remember on my custom builds on linux
2024-02-22 10:06:10
https://github.com/libjxl/libjxl/issues/235#issue-931512361 2021
sklwmp
sklwmp weird, i'm getting the same [AVX2] vs [AVX2,SSE4,SSE2] thing
2024-02-23 02:05:00
this is on arch linux btw, not sure why sse4 and sse2 would just disappear when i haven't changed any compiler options
Nyao-chan
2024-02-23 09:25:44
What does `-E` do? I thought it described how many input image channels will be looked at at a time when encoding. But when `-E` is larger than the number of input image channels, it still increases encoding time. Should I open a bug report on GitHub?
_wb_
2024-02-23 10:57:00
Yeah maybe, it could be doing something silly like recording useless all-zeroes properties...
veluca
2024-02-23 11:29:55
it probably does exactly that
Nyao-chan
2024-02-23 11:48:36
the output file does not change if that matters
_wb_
2024-02-24 07:47:29
Makes sense to cap it to the number of prev channels that actually exist...
DZgas Ж
2024-02-24 09:30:50
how many threads is libjxl parallelized in ffmpeg on -e 1 ?
jonnyawsom3
2024-02-24 09:51:26
Actually, when would ffmpeg get updated to libjxl 0.10?
DZgas Ж
2024-02-24 10:41:48
someday... (messages 2 weeks ago)
2024-02-24 10:42:51
<:PepeOK:805388754545934396> I'm sure they know
Traneptora
DZgas Ж how many threads is libjxl parallelized in ffmpeg on -e 1 ?
2024-02-24 10:58:21
defaults to cpu count
Actually, when would ffmpeg get updated to libjxl 0.10?
2024-02-24 10:59:30
can be updated in place, since there was no ABI break
Nyao-chan
2024-02-24 11:48:26
on arch at least, ffmpeg links to a versioned .so name so it's a little problematic
Traneptora
2024-02-24 02:11:40
but it just needs to be rebuilt
2024-02-24 02:11:56
there's nothing that ffmpeg has to change
Nyao-chan
2024-02-24 07:29:37
oh yeah, it just annoys me a little because I build libjxl from git as a system package and it breaks mpv and ffmpeg. I guess I'll start symlinking to the previous .so version as a workaround. I don't want to rebuild ffmpeg and mpv
Quackdoc
Nyao-chan oh yeah, it just annoys me a little because I build libjxl from git as a system package and it breaks mpv and ffmpeg. I guess I'll start symlinking to the previous .so version as a workaround. I don't want to rebuild ffmpeg and mpv
2024-02-24 11:34:29
yeah, libjxl i have in it's own chroot thingy, i don't globally run git since it breaks a lot of things too like kde stuff too
Nyao-chan
2024-02-24 11:49:29
I guess since I'm already running a custom PKGBUILD, I might as well just modify it to not replace the original libjxl I definitely prefer to have it as a system package
Traneptora
Nyao-chan oh yeah, it just annoys me a little because I build libjxl from git as a system package and it breaks mpv and ffmpeg. I guess I'll start symlinking to the previous .so version as a workaround. I don't want to rebuild ffmpeg and mpv
2024-02-25 01:33:57
this won't work
2024-02-25 01:34:16
the reason the versions are marked as incompatible is libjxl has an ABI break between 0.8 and 0.9
2024-02-25 01:34:28
so if you just symlink it you'll get incorrect behavior
Nyao-chan
2024-02-25 01:39:37
arch has 0.9.2 now in repos. it does work with 0.10.0, I just tested it. at least, does not throw errors
w
2024-02-25 09:47:46
jxl lossless jpeg grayscale reports num_color_channels 3 is this intended? because now I have to dump the gray icc
Demiurge
2024-02-25 01:02:05
did you check the original jpeg?
w
2024-02-25 01:11:24
djxl makes it the grayscale jpeg where libjpeg says it's jpeg_color_space JCS_GRAYSCALE
2024-02-26 01:31:49
libjxl cms also skips the gray icc in the jpeg
jonnyawsom3
2024-02-26 01:34:04
Maybe update the 0.10 release to include this PR too? I know there's a system to update release packages already https://github.com/libjxl/libjxl/pull/3322
veluca
2024-02-26 01:52:20
fair point
2024-02-26 01:52:28
there's a few fixes we probably want to have in 0.10.1
qdwang
2024-02-26 02:25:39
When will 0.10.1 be released then? Is there an approximate date?
veluca
2024-02-26 02:28:16
hopefully this week
Demiurge
Maybe update the 0.10 release to include this PR too? I know there's a system to update release packages already https://github.com/libjxl/libjxl/pull/3322
2024-02-27 02:46:11
doesn't effort 0-9 make more sense from a programmer's perspective than 1-10?
monad
2024-02-27 03:07:00
no
yurume
2024-02-27 04:39:37
0 is generally thought to be "uncompressed"
2024-02-27 05:46:59
I personally think both are not very good choices for that reason 😉
monad
2024-02-27 06:22:23
Why should 0 and 100 be confusing? they are just abstract names with a clear hierarchy.
yurume
2024-02-27 06:28:40
that still indicates something that was not intended, so leaving them out does make sense.
monad
2024-02-27 06:51:38
what do they indicate? percentages on some hypothetical absolute scale? but that would make no sense and would be corrected promptly.
yurume
2024-02-27 06:52:42
nothing, but human generally perceives round numbers as some sort of extreme values anyway.
2024-02-27 06:54:10
FWIW, cjxl has a special code for d0 (mathematically lossless), and as a consequence it also converts any non-zero distance < 0.01 to d0.01.
2024-02-27 06:54:42
while zero is singular and 100 is more or less arbitrary, roughly same argument would apply.
monad
2024-02-27 07:07:34
surprising how?
yoochan
Demiurge doesn't effort 0-9 make more sense from a programmer's perspective than 1-10?
2024-02-27 07:36:36
I would have prefered that you can type any name of an animal and libjxl fetches its speed on wikipedia a use that to set the effort level
qdwang
2024-02-27 08:00:21
It seems v0.10.0 remove the needs for `libskcms`, am i right?
Demiurge
2024-02-27 08:12:37
Most of the time we count starting at zero. At least in the programmer world
2024-02-27 08:12:46
Not 1
w
2024-02-27 08:13:10
nah count at 1
Demiurge
2024-02-27 08:13:53
Why? Then effort 10 is a whole extra digit to type
w
2024-02-27 08:14:09
isnt effort 11 already a thing
Demiurge
2024-02-27 08:14:11
That's too much effort to type a whole extra keypress
w isnt effort 11 already a thing
2024-02-27 08:14:36
Only in insanity mode
w
2024-02-27 08:14:39
skill issue
Demiurge
2024-02-27 08:17:13
Effort 11 SHOULD be difficult to reach since it's almost certainly not what people looking for it actually want
yurume
2024-02-27 08:26:10
require effort to be typed in unary
_wb_
2024-02-27 08:42:52
-e -e -e -e -e -e -e
yoochan
2024-02-27 08:53:24
https://www.youtube.com/watch?v=Qskm9MTz2V4
monad
Demiurge Most of the time we count starting at zero. At least in the programmer world
2024-02-27 10:47:46
surely you only count from zero when the language makes that canonical. if you're counting from zero when you don't have to, that's weird.
Demiurge
2024-02-27 11:11:41
Well, setting a slider for a software library, that's a context where it makes sense to count from zero...
jonnyawsom3
yoochan https://www.youtube.com/watch?v=Qskm9MTz2V4
2024-02-27 11:14:07
The URL of this video is what activates `-e 11`
2024-02-27 11:14:50
Oh, also because turning it up to 11 for insanity just makes sense
Moritz Firsching
2024-02-27 12:26:06
I dimmly remember somebody asked for rebasing the chrome patch to a specific version (122?) of chrome two days ago. I'm happy to do that, but cannot find the message here anymore...
yoochan
2024-02-27 12:30:44
I saw it too 😄 don't remember the version neither
jonnyawsom3
2024-02-27 12:46:53
Maybe whatever build issue they were having was resolved and they deleted the message
Oleksii Matiash
2024-02-29 12:26:31
I found 2 animated pngs that produce "Getting pixel data failed." error from cjxl, but are played correctly by image viewers. Should I upload it somewhere?
Traneptora
Oleksii Matiash I found 2 animated pngs that produce "Getting pixel data failed." error from cjxl, but are played correctly by image viewers. Should I upload it somewhere?
2024-02-29 06:20:28
possibly relevant: https://github.com/libjxl/libjxl/issues/756
Oleksii Matiash
Traneptora possibly relevant: https://github.com/libjxl/libjxl/issues/756
2024-02-29 06:22:16
Seems so, thanks
Pierre-Anthony Lemieux
2024-03-01 03:34:16
`FastLosslessEncode()` was changed to `JxlFastLosslessEncode()`. What is the correct way to call it single threaded?
_wb_
2024-03-01 03:47:19
if you pass `nullptr` as the last argument, it should be single threaded
2024-03-01 03:49:55
nothing really changed in that code though, afaik. The biggest speedups for lossless are at e4+, for which you have to use the libjxl api (the fast lossless encoder is used by libjxl to implement e1).
Pierre-Anthony Lemieux
2024-03-01 06:59:36
Thanks. So JxlFastLosslessEncode() needs to be called for lossless E0, E1, E2, E3, right?
2024-03-01 07:01:35
... and is there a recipe for FJxlParallelRunner, which is not optional?
veluca
2024-03-01 07:04:57
I'd just call the main library API with effort 1/2/3
2024-03-01 07:06:27
effort 1 calls what used to be fjxl - you can still call the "old" entry point, but it's mostly meant to be used in case you want a standalone encoder
_wb_
2024-03-01 07:11:06
FastLosslesEncode only implements lossless E1. Anything higher effort requires libjxl.
Nova Aurora
2024-03-01 10:12:19
What actually changed for 0.10's massive speedups?
afed
2024-03-01 10:32:56
streaming mode
Pierre-Anthony Lemieux
2024-03-02 12:28:41
<@179701849576833024> Here's what I have today: https://github.com/sandflow/libench/blob/90d8fb3ca0f84b8355b91382ac9d7f394b2f86e4/src/main/cpp/jxl_codec.cpp#L32, can you suggest what it should be to be compatible with 0.10?
veluca
2024-03-02 12:34:42
just renaming the function to JxlFastLosslessEncode and adding two `nullptr` parameters at the end should do the trick
2024-03-02 12:35:18
so ``` this->cb_.size = JxlFastLosslessEncode(image.planes8[0], image.width, image.width * 3, image.height, 3, 8, E, &this->cb_.codestream, nullptr, nullptr); ```
CrushedAsian255
2024-03-02 12:37:10
What do the nullptrs signify ?
veluca
2024-03-02 12:40:54
"no parallel runner" (i.e. run everything sequentially)
Pierre-Anthony Lemieux
2024-03-02 02:05:21
just renaming the function to
qdwang
2024-03-02 03:04:12
Does lossless encoding in libjxl support multithreading? For v0.10.0, it seems to uses only one cpu core. I was calling the C API with `JxlEncoderSetParallelRunner`. The VarDCT encoding mode has no problem to use this parallel processing.
veluca
2024-03-02 03:30:41
how large images are you encoding?
Traneptora
Does lossless encoding in libjxl support multithreading? For v0.10.0, it seems to uses only one cpu core. I was calling the C API with `JxlEncoderSetParallelRunner`. The VarDCT encoding mode has no problem to use this parallel processing.
2024-03-03 12:18:38
theoretically it should thread over groups
2024-03-03 12:19:13
but if your image is small enough to have only one group, thrn probably not
qdwang
Traneptora but if your image is small enough to have only one group, thrn probably not
2024-03-03 08:00:04
it's about `1000*1000`, is the smallest group `1024*1024`?
veluca
2024-03-03 08:00:56
ah, there's some logic in lossless to make images up to that size a single group, iirc
2024-03-03 08:01:09
ah no, it'd be half that size
2024-03-03 08:01:10
ignore that
qdwang
2024-03-03 08:53:15
Is lossless e9 generating larger file size than e4 normal?
monad
2024-03-03 09:06:40
yes
2024-03-03 09:07:33
there is no guarantee that higher effort will produce smaller output, but there is a tendency that it should be true
2024-03-03 09:33:03
``` mean colors/px images mean MP | mean e3/e1 | share | share | | tag 1 100.00% 0.00 100.00% 0.00 0.55 DirectClass_sRGB_Alpha 1 100.00% 0.00 100.00% 0.00 0.55 all 1 100.00% 0.00 100.00% 0.00 0.55 icon 1 100.00% 0.00 100.00% 0.00 0.55 source_app mean Mpx/(user+system s) | mean Mpx/(real s) mean bpp | | best of 0.64843750 0.7 0.7 cjxl_0.9.0_d0e7 0.64843750 0.5 0.5 cjxl_0.9.0_d0e8 0.65429688 0.34 0.34 cjxl_0.9.0_d0e9 0.66992188 0.0004973 0.00931 cjxl_0.9.0_d0e10 0.69921875 0.7 1 cjxl_0.9.0_d0e5 0.69921875 0.7 1 cjxl_0.9.0_d0e6 0.71289062 0.7 1 cjxl_0.9.0_d0e4 0.74414062 0.7 1 cjxl_0.9.0_d0e3 0.75781250 0.8 1 cjxl_0.9.0_d0e2 1.36132812 1 1 cjxl_0.9.0_d0e1```
qdwang
monad there is no guarantee that higher effort will produce smaller output, but there is a tendency that it should be true
2024-03-03 11:20:01
Ok. I get it. Thank you~
Traneptora
veluca ah no, it'd be half that size
2024-03-03 05:17:59
nah, -g3 is 1k
veluca
2024-03-03 05:48:01
yes, but IIRC the heuristic triggers only for images below 512x512 or so
2024-03-03 05:48:37
https://github.com/libjxl/libjxl/blob/main/lib/jxl/enc_frame.cc#L319
2024-03-03 05:48:40
400x400
jonnyawsom3
2024-03-03 05:49:36
512x512 is default group size, trying other sizes is only at high efforts
HCrikki
2024-03-03 09:07:29
is there a way to maximize or capping cpu usage for encodes beyond fiddling with effort/threads? curious as to wether dedicating more cpu cycles could result in even quicker encoding
veluca
2024-03-03 09:11:33
not sure what you mean
HCrikki
2024-03-03 09:26:53
in one session losslessly converting an animated gif into jxl consumed only 13% cpu cycles on an old processor (used 8 threads)
_wb_
2024-03-03 09:48:39
We should maybe add some frame parallelism mechanism, for things like a 200x200 animation with 100 frames it's a bit silly that we can only use one thread...
Quackdoc
2024-03-03 09:54:08
0.0
Traneptora
512x512 is default group size, trying other sizes is only at high efforts
2024-03-03 10:03:21
iirc default groupsize is 256
2024-03-03 10:03:28
modular can be anywhere from 128 to 1024
2024-03-03 10:03:39
but iirc the default was to use the same as VarDCT, which is only 256 and nothing else
monad
monad ``` mean colors/px images mean MP | mean e3/e1 | share | share | | tag 1 100.00% 0.00 100.00% 0.00 0.55 DirectClass_sRGB_Alpha 1 100.00% 0.00 100.00% 0.00 0.55 all 1 100.00% 0.00 100.00% 0.00 0.55 icon 1 100.00% 0.00 100.00% 0.00 0.55 source_app mean Mpx/(user+system s) | mean Mpx/(real s) mean bpp | | best of 0.64843750 0.7 0.7 cjxl_0.9.0_d0e7 0.64843750 0.5 0.5 cjxl_0.9.0_d0e8 0.65429688 0.34 0.34 cjxl_0.9.0_d0e9 0.66992188 0.0004973 0.00931 cjxl_0.9.0_d0e10 0.69921875 0.7 1 cjxl_0.9.0_d0e5 0.69921875 0.7 1 cjxl_0.9.0_d0e6 0.71289062 0.7 1 cjxl_0.9.0_d0e4 0.74414062 0.7 1 cjxl_0.9.0_d0e3 0.75781250 0.8 1 cjxl_0.9.0_d0e2 1.36132812 1 1 cjxl_0.9.0_d0e1```
2024-03-04 06:23:17
more accurately ``` mean colors/px images mean MP | mean e3/e1 | share | share | | tag 1 100.00% 0.61 100.00% 0.00 0.82 DirectClass_sRGB 1 100.00% 0.61 100.00% 0.00 0.82 all 1 100.00% 0.61 100.00% 0.00 0.82 lossy 1 100.00% 0.61 100.00% 0.00 0.82 photo 1 100.00% 0.61 100.00% 0.00 0.82 source_imagemagick Pareto front for user+system time and size |Pareto front for real time and size || mean Mpx/(user+system s) || | mean Mpx/(real s) || mean bpp | | best of UR 2.95271812 3.16 5.78 cjxl_0.10.1_d0e4 UR 2.99067811 4.85 15 cjxl_0.10.1_d0e3 UR 3.43969780 8.3 17 cjxl_0.10.1_d0e2 ·· 3.64973696 0.1306 0.1359 cjxl_0.10.1_d0e10 UR 3.65891381 34 36 cjxl_0.10.1_d0e1 ·· 3.65962581 0.5602 0.692 cjxl_0.10.1_d0e9 ·· 3.69968224 0.852 1.09 cjxl_0.10.1_d0e8 ·· 3.71802276 1.63 2.54 cjxl_0.10.1_d0e7 ·· 3.76017563 2.28 3.70 cjxl_0.10.1_d0e6 ·· 3.82520470 2.33 4.60 cjxl_0.10.1_d0e5```
jonnyawsom3
Traneptora iirc default groupsize is 256
2024-03-04 11:22:39
You're right, guess my hangover was worse than I thought :P
qdwang
2024-03-05 01:26:13
Is it possible to use a custom effort for VarDCT? Like `e4.5: e4 + gabor-like transform`
2024-03-05 01:27:32
For some low end CPU devices, `e4` is quite fast but quality is much worst than `e5` which is too slow
2024-03-05 01:28:15
So I'd like to have a balance between these two, don't know if it's possible.
veluca
2024-03-05 01:35:57
--gaborish=1 to cjxl
qdwang
veluca --gaborish=1 to cjxl
2024-03-05 01:37:23
That's cool. But how about C api in libjxl?
veluca
2024-03-05 01:37:45
there's a frame setting for it
qdwang
veluca there's a frame setting for it
2024-03-05 01:38:04
Thank you, I'll check it out
2024-03-05 02:07:30
The release note of `0.10.1` wrote **fixing a significant speed regression present since 0.9.0**, but which situation could cause the speed regression from 0.9.0 to 0.10.0?
2024-03-05 02:10:53
Oh, I updated my program to v0.10.1, which is way faster now with e5 (about 1/2 time saved) for VarDCT.
Traneptora
The release note of `0.10.1` wrote **fixing a significant speed regression present since 0.9.0**, but which situation could cause the speed regression from 0.9.0 to 0.10.0?
2024-03-05 05:33:36
iirc it was an issue with multithreading in windows builds
2024-03-05 05:33:48
where it would only use ~200% even on cpus with 8+ cores
2024-03-05 05:33:52
(100% being of one core)
spider-mario
2024-03-05 07:09:54
it was because of allocations
2024-03-05 07:09:57
we did too many short-lived ones
2024-03-05 07:10:06
we’ve consolidated some of them
qdwang
Traneptora iirc it was an issue with multithreading in windows builds
2024-03-06 01:41:31
It reminds me that, this issue also existed in macos/ios in previous versions. Now it's fixed. Many thanks to the dev team~
_wb_
2024-03-07 05:16:33
ugh, does anyone know how to solve this issue on macos? ``` a2x: ERROR: "xmllint" --nonet --noout --valid "/Users/jonsneyers/dev/libjxl/build/djxl.xml" returned non-zero exit status 4 ```
2024-03-07 05:17:23
it's caused by the thing not finding the relevant xml thingie: ``` $ "xmllint" --nonet --noout --valid "/Users/jonsneyers/dev/libjxl/build/djxl.xml" I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd /Users/jonsneyers/dev/libjxl/build/djxl.xml:2: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" D DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" ^ /Users/jonsneyers/dev/libjxl/build/djxl.xml:5: validity error : Validation failed: no DTD found ! <refentry lang="en"> ^ ```
Tirr
2024-03-07 05:18:37
looks like it's network error
_wb_
2024-03-07 05:19:32
yes well I guess `--nonet` doesn't allow it to fetch it
2024-03-07 05:20:18
I think it's supposed to have that particular definition locally, or something. except it doesn't.
CrushedAsian255
2024-03-08 04:52:49
Is there a way to convert a JPEG to PNG with it actually transcoding (I don’t need the reconstruction feature and I want the actual file size savings from VarDCT)
2024-03-08 04:53:25
Currently I just do convert image.jpg image.png
2024-03-08 04:53:29
The covert the png
jonnyawsom3
2024-03-08 04:56:14
You can do -j 0 to disable transcoding, or --allow_jpeg_reconstruction=0 to only remove the reconstruction data
Traneptora
CrushedAsian255 Is there a way to convert a JPEG to PNG with it actually transcoding (I don’t need the reconstruction feature and I want the actual file size savings from VarDCT)
2024-03-08 07:36:44
what are you trying to? just decode the JPEG to pixels?
2024-03-08 07:37:44
if so, you can always decode the JPEG to PNG using `djpegli input.jxl out.png`
2024-03-08 07:37:58
if you meant JPEG to JXL, you can then do `cjxl out.png out.jxl`
2024-03-08 07:38:30
I recommend using jpegli first, because while you *can* do `cjxl -j 0 input.jpg output.jxl`, cjxl won't use jpegli to decode the jpeg, it will use system libjpeg turbo
CrushedAsian255
2024-03-08 08:07:46
Is Jpegli better?
monad
2024-03-08 08:08:20
who knows
2024-03-08 08:10:58
maybe more mathematically accurate
_wb_
_wb_ ugh, does anyone know how to solve this issue on macos? ``` a2x: ERROR: "xmllint" --nonet --noout --valid "/Users/jonsneyers/dev/libjxl/build/djxl.xml" returned non-zero exit status 4 ```
2024-03-08 08:15:49
`export XML_CATALOG_FILES="/opt/homebrew/etc/xml/catalog"` did the trick for me, in case anyone else is running into this issue when building on mac
2024-03-08 08:39:25
another annoying thing I'm getting now: ``` /Library/Developer/CommandLineTools/usr/bin/clang++ -DFJXL_ENABLE_AVX512=0 -DHWY_DISABLED_TARGETS="(HWY_SSSE3|HWY_AVX3|HWY_AVX3_SPR|HWY_AVX3_ZEN4|HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_ENABLE_APNG=1 -DJPEGXL_ENABLE_EXR=1 -DJPEGXL_ENABLE_GIF=1 -DJPEGXL_ENABLE_JPEG=1 -DJPEGXL_ENABLE_SJPEG=1 -DJXL_EXPORT="" -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/opt/homebrew/include -I/Users/jonsneyers/dev/libjxl/lib/../third_party/sjpeg/src -I/opt/homebrew/Cellar/openexr/3.2.2/include -I/opt/homebrew/Cellar/openexr/3.2.2/include/OpenEXR -I/opt/homebrew/Cellar/imath/3.1.10/include -I/opt/homebrew/Cellar/imath/3.1.10/include/Imath -I/Users/jonsneyers/dev/libjxl -I/Users/jonsneyers/dev/libjxl/lib/include -I/Users/jonsneyers/dev/libjxl/build/lib/include -I/Users/jonsneyers/dev/libjxl/third_party/highway -DJXL_DEBUG_WARNING [...] In file included from /Users/jonsneyers/dev/libjxl/lib/jxl/frame_header.h:26: In file included from /Users/jonsneyers/dev/libjxl/lib/jxl/image_metadata.h:21: /Users/jonsneyers/dev/libjxl/lib/jxl/color_encoding_internal.h:348:12: error: use of undeclared identifier 'FROM_JXL_BOOL' return FROM_JXL_BOOL(cms_.run(cms_data_, thread, buf_src, buf_dst, xsize)); ^ 1 error generated. ```
2024-03-08 08:42:10
I suppose the issue here is that the `-I/opt/homebrew/include` comes before the `-I/Users/jonsneyers/dev/libjxl/lib/include` so it is taking includes from the system libjxl headers (which are still a v0.9.1 here) and not from the local source tree
2024-03-08 08:44:20
Build systems are such a mess, with scripts generating scripts generating scripts and all that — does anyone know where to change something so that order gets changed so outdated system headers do not get used?
Tirr
2024-03-08 08:54:27
you can specify whether project include directories come before or after system ones, this might help https://stackoverflow.com/a/34274943
_wb_
2024-03-08 09:58:03
Thanks! That did the trick.
tufty
2024-03-08 12:20:14
hello, I have a dumb question! I'm trying to encode a pixel-interleaved CMYK image I'm setting num_color_channels = 3, num_extra_channels = 1, and using JxlEncoderSetExtraChannelInfo() to tag the extra channel as BLACK but with libjxl 0.10.1 I get "./lib/jxl/encode.cc:820: Extra channel 0 is not initialized" do I need to pull out the K channel and encode it separately? the docs seem to suggest I can just pass a 4 channel image to JxlEncoderAddImageFrame() I've probably misunderstood
2024-03-08 12:21:22
the PR with the code fwiw https://github.com/libvips/libvips/pull/3883
veluca
2024-03-08 12:21:50
you can pass it a 4-channel image, but only if it is RGBA
tufty
2024-03-08 12:22:08
😦 ah that's a shame
2024-03-08 12:25:07
would CMYKA be CMYA + K as a separate channel?
veluca
2024-03-08 12:25:46
yep
2024-03-08 12:25:51
that would work
tufty
2024-03-08 12:28:24
Thanks! I think I'll quietly park CMYK support for now heh, it'll be too much work
vtorri
2024-03-08 01:34:23
hello
2024-03-08 01:34:41
i have a compilation error with the last release on windows (msys2 + mingw64) :
2024-03-08 01:34:51
C:/Documents/msys2/home/vincent.torri/ewpi_64/share/ewpi/packages/libjxl/libjxl-0.10.2/lib/jxl/color_encoding_internal.h:348:12: error: 'FROM_JXL_BOOL' was not declared in this scope; did you mean 'TO_JXL_BOOL'?
2024-03-08 01:35:04
is it known ?
Tirr
2024-03-08 01:37:35
seems like this https://github.com/libjxl/libjxl/pull/3397
2024-03-08 01:38:01
it happens when you already have libjxl installed
vtorri
2024-03-08 01:40:39
oh, ok
2024-03-08 01:40:47
trying
2024-03-08 01:46:02
good
2024-03-08 01:46:07
thank you
_wb_
veluca you can pass it a 4-channel image, but only if it is RGBA
2024-03-08 04:30:58
It should be only a matter of designing the api (JxlPixelFormat etc) in a somewhat more flexible way; there's no real reason we couldn't also support things like CMYK and BGRA or even CMYKA
2024-03-08 04:33:18
or even more silly: if you happen to have or need R, G, B in separate planar channels, then the API forces you to convert it to/from interleaved, while internally libjxl does things planar anyway
Traneptora
CrushedAsian255 Is Jpegli better?
2024-03-08 09:52:14
as a jpeg decoder yea, it produces higher quality results from the same jpeg
2024-03-08 09:52:22
JPEG decoding isn't fully specified, unlike most other image codecs
2024-03-08 09:52:35
so there's often more than one correct way to decode a jpeg that have slight differences
2024-03-08 09:53:02
jpegli provides a higher-quality way to do this, libjpeg-turbo focuses on being fast and compliant
veluca you can pass it a 4-channel image, but only if it is RGBA
2024-03-08 09:54:30
can we fix that? I feel like CMYK is a common use-case for wanting to do that
2024-03-08 09:54:36
at least common enough
_wb_ or even more silly: if you happen to have or need R, G, B in separate planar channels, then the API forces you to convert it to/from interleaved, while internally libjxl does things planar anyway
2024-03-08 09:55:11
as far as I understand, isn't the reason for this that most CMS libraries take rgb interleaved? like lcms
2024-03-08 09:55:32
so the first stage of encoding / final stage of decoding needs packed
_wb_
2024-03-08 09:57:53
yes, often it's like that.
CrushedAsian255
Traneptora I recommend using jpegli first, because while you *can* do `cjxl -j 0 input.jpg output.jxl`, cjxl won't use jpegli to decode the jpeg, it will use system libjpeg turbo
2024-03-08 10:18:28
Someone should make a way to use jpegli with cjxl directly like something like —use-jpegli 1
Traneptora
CrushedAsian255 Someone should make a way to use jpegli with cjxl directly like something like —use-jpegli 1
2024-03-08 10:19:26
I agree, cjxl/djxl should use jpegli for jpeg decoding
lonjil
2024-03-08 10:22:13
and encoding, if you happen to output to jpeg
Traneptora
2024-03-08 10:25:14
ye
2024-03-08 10:25:31
ye, since --pixels_to_jpeg exists
Demiurge
2024-03-10 10:30:33
It would be a very small patch to change cjxl to use jpegli
2024-03-10 10:30:42
Honestly it is very perplexing that it doesn’t
2024-03-10 10:30:57
What's even the point of having all that code there that isn't even being used for anything
2024-03-10 10:34:16
So many missed opportunities and low hanging fruit in the libjxl source. And a lot of weirdness too like for example in the bayer matrix code, for some reason the matrix is a weird size for a weirdly explained reason
2024-03-10 10:34:49
Like it's working around bugs and quirks in the code instead of actually fixing them and making the code clearer
2024-03-10 10:36:45
Not meaning to offend, hopefully this criticism is constructive.
2024-03-10 10:37:59
There's literally 3 jpeg encoders in the libjxl source tree
2024-03-10 10:39:40
One code path uses sjpeg, one code path uses libjpeg library, and one uses jpegli, which is identical to libjpeg but with "li" added
2024-03-10 10:45:08
That's two more than is necessary to exist
diskorduser
2024-03-11 06:29:35
Is this a crypto currency related account?
CrushedAsian255
2024-03-11 11:27:29
Who doesn’t love spam
Kremzli
2024-03-11 05:13:54
wheres the documentation on faster decoding flag
Nova Aurora
CrushedAsian255 Who doesn’t love spam
2024-03-11 05:57:31
People who want to ban Fab <:YEP:808828808127971399>
2024-03-11 05:58:20
Fab is an interesting person though, I still don't understand him
Traneptora
Kremzli wheres the documentation on faster decoding flag
2024-03-11 08:13:36
``` cjxl -v -v --help ```
2024-03-11 08:13:53
under "Expert Options" third one down iirc
Kremzli
2024-03-11 08:14:00
is that all?
Traneptora
2024-03-11 08:14:47
is what all?
2024-03-11 08:15:01
iirc there's no documentation on what exactly `--faster_decoding` does internally
2024-03-11 08:15:05
just hwo to enable it
Kremzli
2024-03-11 08:15:13
yeah thats what i meant
Quackdoc
2024-03-11 08:15:50
I find usually 1 and 2 do the same thing as eachother, and 3 and 4 do the same thing. 90% of the time I get matching hashes
_wb_
2024-03-11 09:02:04
faster decoding just disables various stuff that will cause decoding to be slower, sacrificing some compression for faster decoding. Should generally not be needed for most use cases.
Kremzli
2024-03-11 09:09:05
what does it mean "at the expense of quality"
Traneptora
2024-03-11 09:09:25
well for lossless it means at the expense of ratio
2024-03-11 09:09:40
it behaves like a faster preset basically
Kremzli
2024-03-11 09:38:14
What about lossy
Traneptora
2024-03-11 11:27:20
same with lossy, behaves like a faster preset but in a way that makes decoding faster
2024-03-11 11:27:48
in the sense that faster presets have higher file sizes for the same quality
Kremzli
2024-03-11 11:55:20
So why does it say at the expense of quality
Traneptora
2024-03-12 12:15:39
higher file sizes for the same quality translates to lower quality at the same file sizes
Kremzli
2024-03-12 12:20:24
Alright thanks
afed
2024-03-12 09:23:02
`--keep_invisible` should work for this or it's just for some transparent pixels? https://github.com/libjxl/libjxl/issues/3415
yurume
2024-03-12 09:42:31
the size difference is really small (147 bytes out of ~460 KB), so it's not a big deal IMO
afed
2024-03-12 09:50:31
small, but still there and it's only for this image such a setting would be useful or probably `--keep_invisible` should work for such cases as well
2024-03-12 10:04:36
and for RGB+Alpha to 1-bit grayscale, perhaps takes the same behavior and transform from webp
JendaLinda
2024-03-12 10:04:41
--keep_invisible=0 in lossless seems to just zero out fully transparent pixels.
afed
2024-03-12 10:10:05
yeah, but basically a fully unused transparent channel is also useless as just some pixels (except for some specific data)
JendaLinda
2024-03-12 10:11:31
Sure but this particular flag does something different, it's intended for images that actually use the alpha.
afed
2024-03-12 10:12:52
for example something like `--keep_invisible=2` should be applied to unused alpha channels as well
JendaLinda
2024-03-12 10:13:40
However, such optimizations like reducing to RGB or grayscale would be certainly useful. This would require creating a new flag to avoid confusion.
2024-03-12 10:14:33
I suppose optimizations should be turned off for lossless by default but they could be turned on for lossy.
afed
2024-03-12 10:15:14
at least some settings to be able to replicate the same behavior as lossless webp
JendaLinda
2024-03-12 10:33:51
It seems VP8L is working exclusively in ARGB but it's doing a great job. It has alpha_is_used flag in the header but that is only informative.
_wb_
2024-03-12 10:41:31
I guess it's debatable if converting an all-opaque RGBA image to RGB is really "lossless", just like converting all-gray RGB to Grayscale, or a 16-bit image to 8-bit if it only actually uses 256 different values per channel. I would say mostly yes, but you could also argue that this image metadata is part of the information that needs to be preserved.
2024-03-12 10:44:20
From the libjxl API perspective, we have to decide whether to signal that there's an alpha channel _before_ we receive the actual image frame(s). So we could do such stripping of trivial alpha channels only if the input is fully sent and closed before the first output is requested, and we're not doing a streaming encode.
afed
2024-03-12 10:44:36
maybe not by default, but as an option, like for anything lossless as a visible image, but not as some data like optimizers and webp do
_wb_
2024-03-12 10:46:52
The easier way is to let cjxl do it (add an option to check if the input image can be reduced to RGB or to Grayscale), but then of course it's only cjxl that does it.
jonnyawsom3
2024-03-12 10:48:21
I have noticed cjxl reducing 24 bit images to 8 in lossless, but that's as far as it goes
JendaLinda
2024-03-12 10:48:57
I think using oxipng with fast settings to do the optimization beforehand is not that bad.
jonnyawsom3
2024-03-12 10:49:25
Not really useful for anything past a single person though
JendaLinda
2024-03-12 10:54:18
IMHO the application is responsible for using the appropriate pixel format.
Traneptora
I have noticed cjxl reducing 24 bit images to 8 in lossless, but that's as far as it goes
2024-03-12 11:03:45
in lossless? it shouldn't
w
2024-03-12 11:08:13
24 bit? as in 8 bpc 3 channel or 24 bpc
HCrikki
2024-03-12 11:13:31
a recent change may have changed this for greyscale images that used to be generated as rgb
jonnyawsom3
w 24 bit? as in 8 bpc 3 channel or 24 bpc
2024-03-12 11:22:55
You made me realise it is the same bitdepth, just getting mixed up between per pixel and per channel again
JendaLinda
2024-03-12 12:03:38
There might be another issue, converting a grayscale image encoded as RGB to the actual grayscale may invalidate the included ICC profile. Anyhow, JXL can encode 256 grays in RGB using palette.
_wb_
2024-03-12 01:06:27
yes, or apply an RCT that turns it into one grayscale channel and two all-zero channels
JendaLinda
2024-03-12 04:09:32
JXL is pretty good in compressing empty channels. PNG on the other hand not so much. Deflate also has a limit how many bytes can be compressed to a single byte, so large areas of single color result in strings of repeating bytes in the codestream.
_wb_
2024-03-12 05:24:39
Yes, in JXL a single-value channel basically has a constant size (regardless of image dimensions). Unlike most other formats. I should at some point make an update of this blogpost: https://cloudinary.com/blog/a_one_color_image_is_worth_two_thousand_words 🙂
JendaLinda
2024-03-12 06:37:27
So I suppose JXL is using similar strategy as FLIF.
_wb_
2024-03-12 07:54:29
Not quite, FLIF cheated a bit by encoding channel ranges explicitly and taking those into account in its symbol coder (which is a rather computationally expensive thing to do), so in that specific case it can do it with zero bits but it cannot quite do JXL art style stuff, once the channel range is not a singleton it still has a minimum cost per pixel.
2024-03-12 07:55:57
While jxl doesn't have explicit channel ranges, but it does allow contexts to have singleton histograms which are really zero bits per symbol.
2024-03-12 07:58:03
(in FLIF that's not an option since it uses a binary arithmetic coding with chances that are adapting dynamically at decode time, so the chance can never be an exact 0 or 1. In jxl the chances are static and signaled in advance)
Traneptora
JendaLinda So I suppose JXL is using similar strategy as FLIF.
2024-03-12 08:41:58
JXL uses brotli prefix codes if you choose to use prefix codes, and one of the things you can do is you can set the alphabet size to 1
2024-03-12 08:42:28
if so, symbols don't take up any bits
2024-03-12 08:42:50
the JXL entropy decoder is set up so you request a symbol from the entropy stream, and then it provides it
2024-03-12 08:43:22
you can do this as many times as you need. you request a symbol, and it is provided. sometimes the entropy stream needs to read more bits to provide that symbol, sometimes it does not.
2024-03-12 08:43:38
in the case of a prefix code with one symbol, it never reads more bits. it just returns the only symbol, every time you ask
2024-03-12 08:43:49
so you set up a prefix code where the empty string maps to "0" and that's it.
JendaLinda
2024-03-12 08:56:06
For the encoder to setup the JXL file this way, the encoder would have to know the contents of the entire image in advance, so it presumably wouldn't be possible to do automatically in streaming mode.
Traneptora
JendaLinda For the encoder to setup the JXL file this way, the encoder would have to know the contents of the entire image in advance, so it presumably wouldn't be possible to do automatically in streaming mode.
2024-03-12 09:05:40
no, but each individual group could be done this way
2024-03-12 09:06:05
so an all-zero channel in a group could be encoded in a separate context with essentially no overhead for that group
2024-03-12 09:06:56
so while yes theoretically streaming mode makes it so the image size matters, you end up with like, an extremely small overhead for each 2048x2048 chunk, which is still fairly negligible in the grand scheme of things, and significantly lower than, say PNG
JendaLinda
2024-03-12 09:27:16
It's good to know that JXL can handle that pretty well by itself. I always convert images to the best fitting pixel format before encoding, so the encoder has easier job.
afed
2024-03-13 05:45:21
<:Poggers:805392625934663710> maybe also port some webp transforms, palette ordering? https://github.com/libjxl/libjxl/pull/3420
_wb_
2024-03-13 05:58:27
yeah there's still quite some room for improvement in the palette stuff
2024-03-13 06:00:12
especially deciding how many colors to allow is something somewhat tricky — in png/webp the limit is 256 anyway, so it's less of an issue, but in jxl you can have thousands of palette colors but just because you can doesn't mean you should 🙂
afed
2024-03-13 06:00:19
or has everything useful from here already been taken? <https://github.com/webmproject/libwebp/blob/main/src/utils/palette.c>
_wb_
2024-03-13 06:01:09
no, I haven't implemented any fancy palette ordering yet, it's still basically just luma sorting (with the minor tweak of putting very rarely used colors at the end)
afed
afed <:Poggers:805392625934663710> maybe also port some webp transforms, palette ordering? https://github.com/libjxl/libjxl/pull/3420
2024-03-13 06:46:44
these improvements are just for e4 and slower?
_wb_
2024-03-13 06:49:57
yes, e2/e3 don't do palette and e1 has a separate code path for palette
afed
afed <:Poggers:805392625934663710> maybe also port some webp transforms, palette ordering? https://github.com/libjxl/libjxl/pull/3420
2024-03-15 11:44:57
<@794205442175402004> is this pr ready to merge or still need some changes?
_wb_
2024-03-15 11:48:10
ready to merge — though there's still a lot that can be improved in libjxl's handling of palettes, both regarding speed and compression
2024-03-15 11:51:40
these were just some easy changes, that do seem to improve compression by ~1% for manga-type images, and by much more for small icons where the previous code was kind of messing up and using palettes too easily — if a 64x64 icon has 1000 distinct colors, it's unlikely to be a good idea to do palette 🙂
afed
2024-03-15 12:01:21
and something fast for e2/e3 would be nice too <:YEP:808828808127971399>
JendaLinda
_wb_ especially deciding how many colors to allow is something somewhat tricky — in png/webp the limit is 256 anyway, so it's less of an issue, but in jxl you can have thousands of palette colors but just because you can doesn't mean you should 🙂
2024-03-15 04:13:54
I think 256 colors would be a reasonable default. It can be overrided by the user anyway. Historically color palettes were limited to 256 colors as well. Some kind of RGB arrangement was usually used for more colors.
_wb_
2024-03-15 04:55:09
The current default is to have 1024 as a hard limit, but there are heuristics to make the effective limit smaller.
2024-03-15 04:56:02
Also note that in jxl you can have a palette for the whole image, but also a palette for just one group (256x256 pixels, by default).
2024-03-15 04:58:34
Also: the palette can involve full pixels, e.g. every palette entry is an RGB or RGBA color, but it can also involve only some of the channels, even just one channel. Single-channel palettes can be quite useful (they have their own heuristics/limits)
Eugene Vert
2024-03-16 06:48:07
Was trying to encode some animations to jxl via apng, but keep getting `JXL_FAILURE: IDAT chunk after fcTL chunk` errors from cjxl. Neither of these produces acceptable by cjxl apng, is there any other way? * `apngasm *.png` * `magick convert *.png APNG:out.apng` * `ffmpeg -f concat -i ./concat_demuxer -plays 0 -c:v apng out.apng`
_wb_
2024-03-16 08:04:38
Maybe open an issue, could be we have a regression in the apng reading...
Ufnv
2024-03-19 11:01:02
Looks like there is still an issue with alpha channel decoding performance in 10.0.2: trying 100 decoding cycles for the same image: jxl_lossy_alpha: 794.9941000ms jxl_lossless_a: 786.3887000ms jxl_removed_alpha: 489.7623000ms webp: 146.8004000ms So removing alpha channel altogether gives very high boost, while there is close to zero difference between lossy and lossless alpha decoding speed. the file size differs quite a lot though: lossy_alpha: 20kb lossless_alpha 34kb no_alpha 11kb webp 44kb
2024-03-19 11:01:09
2024-03-19 11:01:20
the image itself
2024-03-19 11:05:54
interestingly, one of the most time-consuming functions is jxl::N_AVX2::MakeUnsigned when finalizing the frame
2024-03-19 11:20:20
the difference between alpha/no alpha performance is all in DecodeModularChannelMAANS function and it is huge
2024-03-19 12:01:12
DJXL stats: lossy alpha: 8.877 MP/s lossless alpha: 9.117 MP/s no alpha: 14.694 MP/s
Traneptora
2024-03-19 03:34:55
that's likely because alpha is modular and modular is much slower than VarDCT
2024-03-19 03:35:05
but that said if the alpha channel is all 1s then it shouldn't be that slow
Ufnv
2024-03-19 06:32:40
Likely a stupid question - why alpha cannot be VarDCT? Or maybe there is a way to force specifically faster alpha decoding with the size trade off?
_wb_
2024-03-19 06:37:30
VarDCT is hardcoded for 3 channels in the spec. For extra channels, Modular is the only option.
Ufnv
2024-03-19 08:19:18
Well, a simple solution. I split alpha and RGB, compress RGB with jxl and alpha with webp. The result is: The overall size is comparable to jxl with lossy alpha - 22kb for jxl without alpha+webp vs 20kb for jxl with lossy alpha. Speed wise - about 2x faster for jxl without alpha+webp
2024-03-19 08:20:29
Maybe it is possible to incorporate some really simple solution similar to this split? Even 2x times improvement in decompression speed is essential and the size can be obviously smaller as there is no need for extra header and there is no need to store all three components for grayscale "alpha" image
lonjil
2024-03-19 08:33:00
Maybe there should be an "extra channels effort" option in addition to the main "effort" option, so that a faster setting can be chosen for the alpha. And maybe the effort scale should be changed so that modular and vardct more closely match in encoding speed.
_wb_
Ufnv interestingly, one of the most time-consuming functions is jxl::N_AVX2::MakeUnsigned when finalizing the frame
2024-03-19 09:33:43
This could be an indication that there is some room for improvement in the decode speed...
2024-03-19 09:34:48
Most test images have no alpha so probably it hasn't been tested/optimized as much as it could have been.
lonjil
2024-03-19 09:35:28
oh, decompression speed, not compression speed, derp. I gotta read more carefully.
Ufnv
2024-03-19 10:04:54
yes, compression speed is not really important - it is compressed once but decompressed thousand of times
Kremzli
2024-03-23 03:40:49
why doesnt cjxl take webp input
spider-mario
2024-03-23 03:41:55
mainly, there isn’t that much point
DZgas Ж
2024-03-23 03:42:42
why doesnt cjxl take avif input 🧐
Kremzli
2024-03-23 03:46:55
can cjxl convert to xyb like cjpegli?
lonjil
2024-03-23 03:47:24
cjxl always does that unless you ask for lossless
Kremzli
2024-03-23 03:48:22
what if i want "lossless" (which it wont be anymore) but make it xyb
spider-mario
2024-03-23 03:54:55
that’s also possible
Kremzli
2024-03-23 03:55:13
how do i do that?
spider-mario
2024-03-23 03:58:46
not sure `cjxl` allows it with “lossless”, but `-m 1 -q 99` should get you close-to-lossless xyb
2024-03-23 03:59:25
sorry, `-m` takes a value now (fixed it)
Kremzli
spider-mario mainly, there isn’t that much point
2024-03-23 06:37:33
What about heic? Phones use that so that would be valuable
jonnyawsom3
2024-03-23 07:00:18
There are tools other than cjxl to convert between formats too
Kremzli
2024-03-23 08:12:53
what do you guys use
HCrikki
2024-03-23 08:32:17
xl converter. handles resizing unlike convert-only cli, as well as convert to a predetermined filesize https://github.com/JacobDev1/xl-converter
2024-03-23 08:34:06
used to jxl batch converter since its more configurable but lags in jxl library support (can still work with newer binaries)
Kremzli
2024-03-23 08:37:34
what do you mean
HCrikki
2024-03-23 08:39:25
cjxl is supposed to only to basic conversions, anything more advanced like supporting extra formats as source is the domain of specialized conversion/export utilities
Kremzli
HCrikki used to jxl batch converter since its more configurable but lags in jxl library support (can still work with newer binaries)
2024-03-23 08:40:36
i mean this
HCrikki
2024-03-23 08:40:49
updated less frequently
Kremzli
2024-03-23 08:41:02
but it doesnt have to?
HCrikki
2024-03-23 08:41:51
its focused on jxl so youd expect it matching libjxl releases or have a way to fetch any newer binaries
Kremzli
2024-03-23 08:42:42
well other than not getting the binaries for you, does it have any other issues
HCrikki
2024-03-23 08:44:56
no but thats just me (these are straight frontends calling libjxl after all). check whichever suits your needs better but unless you need advanced options, xl converter is easier to handle
Kremzli
2024-03-23 08:46:03
ive been using jxl batch converter so i was curious
TheBigBadBoy - 𝙸𝚛
2024-03-23 09:41:55
how can I see `cjpegli` version ? there's no `--version` argument and `--help` doesn't print any version information
spider-mario
2024-03-24 08:44:42
not sure there’s anything better than `cjxl --version`
Demiurge
Ufnv Well, a simple solution. I split alpha and RGB, compress RGB with jxl and alpha with webp. The result is: The overall size is comparable to jxl with lossy alpha - 22kb for jxl without alpha+webp vs 20kb for jxl with lossy alpha. Speed wise - about 2x faster for jxl without alpha+webp
2024-03-24 09:57:10
Is this lossless webp?
2024-03-24 09:58:30
lossless webp is overall better than libjxl. The only exceptions being at extreme speeds.
2024-03-24 09:58:41
(either extremely fast or extremely slow)
spider-mario
2024-03-24 10:40:58
that’s not what https://cloudinary.com/blog/jpeg-xl-and-the-pareto-front#the_pareto_front found
w
2024-03-25 03:49:26
Tbh it's pretty dishonest for that to come from a first party
Traneptora
2024-03-25 04:26:52
it's not dishonest to test your own things and report the results
2024-03-25 04:27:04
it would be dishonest if the data were manipulated intentionally to get what you want
w
2024-03-25 04:39:13
~~it~~ everything is manipulated intentionally
Traneptora
2024-03-25 04:58:22
no?
2024-03-25 04:58:44
you do realize it's fairly standard to publish results about your own inventions
2024-03-25 04:59:00
not dishonest
w
2024-03-25 04:59:47
yeah but this argument is more of a "not for me"
2024-03-25 05:00:18
and when you present data, you always have to manipulate it to show your point
Traneptora
2024-03-25 05:00:26
no you don't
2024-03-25 05:00:41
you only have to manipulate it if it doesn't already show your point naturally
2024-03-25 05:00:53
analyzing data is not the same thing as manipulating it
2024-03-25 05:01:03
manipulating it is when you change it or fabricate it post-experiment
w
2024-03-25 05:01:09
umm
Traneptora
2024-03-25 05:01:29
what
2024-03-25 05:01:33
are you saying the JXL folks are lying
2024-03-25 05:01:39
or being intentionally misleading
w
2024-03-25 05:01:49
no
Traneptora
2024-03-25 05:02:06
then how is it dishonest
2024-03-25 05:02:13
I don't understand the criticism here
afed
2024-03-25 05:13:50
for lossless it's harder, especially if using someone else's datasets, like these from avif and daala teams but still some, also for speed, like a specific arch or the number of cores is more favorable and for lossy there's a lot more options
2024-03-25 05:20:44
and anyway lossless webp is not overall better, not even close for any speeds (with streaming mode), it may be better only for some specific images like apps or desktop screenshots, but even for screenshots it is very type dependent
yoochan
2024-03-25 07:21:21
<@1028567873007927297> Except on some cherry picked samples, as shown on this old benchmark, libjxl is better at lossless than webp https://docs.google.com/spreadsheets/u/0/d/1ju4q1WkaXT7WoxZINmQpf4ElgMD2VMlqeDN2DuZ6yJ8/htmlview?pli=1
2024-03-25 07:24:29
But you are right webp lossless is very good. Good news is, most webp tricks for problematic images should be portable in the jxl format, but haven't been yet
_wb_
2024-03-25 08:43:01
Lossless WebP is the second best lossless format, and lossy AVIF is the second best lossy format, and both come quite close to JXL. If you pick specific images, you can make WebP / AVIF look better than JXL. When I select images to test on, I just try to find images that are relevant / representative for the use case. Ideally testing is done by independents, but in practice it seems to be mostly people working on codecs who are doing codec testing.
fab
2024-03-25 10:55:13
spider-mario
2024-03-25 06:16:49
infamous p-values
Demiurge
2024-03-27 07:01:53
Maybe something changed recently. I remember webp lossless dominating the middle and jxl at the extreme ends. But it looks like jxl got significant speedups in the last update