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

Ufnv
2023-03-04 02:22:46
so probable AVX2 is there, unless N_ means "No"
_wb_
2023-03-04 02:23:12
Yes, it means avx2 is used, so that's good
Ufnv
2023-03-04 02:23:34
I can share screen with the profiler, if you like
_wb_
2023-03-04 02:24:44
What kind of speed does djxl report if you do --num_reps=100 --num_threads=1 on that same image?
Ufnv
2023-03-04 02:25:12
one sec
_wb_
2023-03-04 02:26:35
If it takes 9s for about 200 mpx, that's only 22 megapixels per second. I would expect a vardct image without alpha to be faster to decode
Ufnv
2023-03-04 02:26:40
26.72 MP/s
2023-03-04 02:27:03
[23.40, 29.59]
_wb_
2023-03-04 02:27:26
Ok that's the same ballpark. Could you try the image encoded at e6?
Ufnv
2023-03-04 02:27:46
one sec
_wb_
2023-03-04 02:28:35
Maybe it's an image where patches are used. That would also slow down decoding. At e6, patches are disabled
Ufnv
2023-03-04 02:29:15
24.28 with e6
_wb_
2023-03-04 02:29:59
~25 MP/s decoding on single core when avx2 is available is kind of disappointing, I would expect it to be faster. <@179701849576833024> any idea what could cause this?
Ufnv
2023-03-04 02:31:34
btw the source image is 32bit, so maybe it includes alpha? or cjxl accounts for the "unused" alpha?
2023-03-04 02:32:17
when there is a meaningful alpha, the speed is around 11 MP/s
_wb_
2023-03-04 02:35:46
If you encode RGBA, it does not automatically strip trivial alpha
2023-03-04 02:36:29
It will compress quite well and also decode quite quickly compared to nontrivial alpha, but it will still be there
2023-03-04 02:37:28
Try converting the image to ppm first so the alpha gets dropped, and encoding that
2023-03-04 02:39:11
(we should really start detecting trivial alpha and auto drop it when doing lossy, it's a waste of resources to keep it around)
Ufnv
2023-03-04 02:40:47
43.69
2023-03-04 02:44:29
but still 5 times slower than WebP 😦
2023-03-04 03:19:59
btw, lossless without alpha = 15.87
_wb_
2023-03-04 03:20:11
Yeah, though with more threads the gap should be smaller
Ufnv
2023-03-04 03:46:10
BTW, what makes alpha (even the trivial one) so slow to decode? It literally takes half of the decoding time. You think the lossless alpha + lossy RGB should be faster?
_wb_
2023-03-04 03:57:08
The squeeze transform in modular is a bit slow, and is used for lossy alpha. Also there might be other things that can/should be optimized, we haven't really been trying to optimize the decode speed of images with alpha yet.
Ufnv
2023-03-04 04:27:33
unfortunately, cannot try with the lossless alpha yet - will wait until JxlEncoderSetExtraChannelDistance appears in the stable build
ayumi
2023-03-04 05:49:24
Assuming a `libjxl`-based decoder with the progressive detail option set to `kPasses` and a VarDCT image compressed with `--progressive_ac` and `--progressive_dc=1` how many `JXL_DEC_FRAME_PROGRESSION` events should I expect to get? My guess would be four (1:8 DC, 1:4 AC, rough 1:2 AC and non-rough 1:2 AC), but I am only getting three...
_wb_
2023-03-04 08:44:36
Hm, could be a bug... What do you get with kLastPasses?
ayumi
2023-03-04 09:39:08
With `kLastPasses` I also get three `JXL_DEC_FRAME_PROGRESSION` events. If I flush the image buffer when those events occur both `kPasses` and `KLastPasses` give me the same output buffer content for every event. With `kDC` I get one event (as expected).
_wb_
2023-03-04 09:47:47
Looks like we aren't actually distinguishing kLastPasses and kPasses then or something. Could you open an issue?
ayumi
2023-03-04 09:48:35
Yes, I can.
2023-03-04 10:51:41
I am sorry it took me so long, but here it is: https://github.com/libjxl/libjxl/issues/2264.
_wb_
2023-03-04 11:23:04
No rush, it's weekend anyway 🙂
Ufnv
2023-03-05 01:09:05
What is the quality loss if I set FasterDecoding to 4? Does it corellate somehow with the Distance? Like if I set Distance to 1.0, but then faster decoding to 4, will I get the same quality but less compression?
_wb_
2023-03-05 01:27:38
Yes, I think it just hurts compression, not quality. Not sure though. <@179701849576833024> ?
veluca
2023-03-05 01:28:37
At high quality, it doesn't really affect quality much, but it does disable filters (gaborish and epf) at the higher values of faster decoding
Ufnv
2023-03-05 02:17:38
Well, I see two times faster decoding for 4 in exchange for about 10-20% file size - this is with complex alpha. If it does not hurt quality, then it can be a good tradeoff.
2023-03-05 04:14:12
No, unfortunately on the bigger set the statistics is much worse - Faster Decoding 4 gives approx 2.5 times increase of the file size on my data, while lower values don't offer a substantial decoding speed increase.
yoochan
2023-03-05 05:40:34
I started something... an encoder oriented FAQ: https://docs.google.com/document/d/18MBqu3o2yRpWz4GUxsxTLzcIR2F6WLfpDa-sVWRyG9w/edit?usp=sharing It is more drafty than expected though 😄
2023-03-05 05:41:25
I'll try to correct and complete in my spare time, if some knowledgeable people mind having a look, especially at highlighted places
w
2023-03-06 04:53:47
according to https://docs.google.com/spreadsheets/d/1ju4q1WkaXT7WoxZINmQpf4ElgMD2VMlqeDN2DuZ6yJ8/edit#gid=174429822 jxl's always better maybe also include this sheet?
2023-03-06 05:09:19
on slowest settings, i got 67283, 71992, 357758 respectively
Traneptora
2023-03-06 08:06:32
veluca has put some work into patch detection that could improve jxl on these
yoochan
yoochan I started something... an encoder oriented FAQ: https://docs.google.com/document/d/18MBqu3o2yRpWz4GUxsxTLzcIR2F6WLfpDa-sVWRyG9w/edit?usp=sharing It is more drafty than expected though 😄
2023-03-06 08:39:44
could someone just confirm that anybody have the right to edit the doc ?
w
2023-03-06 08:44:55
yes
yoochan
2023-03-06 08:45:06
thanks 🙂
DZgas Ж
2023-03-06 10:23:14
wow, JPEG XL -e9 give result only 19 bytes less than WEBP
yoochan
2023-03-06 10:25:07
lossless webP is good, but what's better is that the guy who designed webp lossless now works for jpegxl
DZgas Ж
2023-03-06 10:25:34
-e 1 253742 bytes -e 2 310505 bytes -e 3 387400 bytes -e 4 119893 bytes it's amazing how anomalous this image is
yoochan
2023-03-06 10:25:48
the 3rd image under squoosh @ e8 (I'm lazy) goes down to 473kb
DZgas Ж
yoochan lossless webP is good, but what's better is that the guy who designed webp lossless now works for jpegxl
2023-03-06 10:27:17
only here I can't understand why in this case JPEG XL has performed so badly, it's the first time I've seen similar results in 3 years
yoochan lossless webP is good, but what's better is that the guy who designed webp lossless now works for jpegxl
2023-03-06 10:28:04
webp lossless codec name is VP8L
_wb_
2023-03-06 11:41:58
It has nothing to do with VP8 though
DZgas Ж
2023-03-06 12:13:33
wellknown
Demiurge
2023-03-06 09:41:22
Yeah it's a dumb misnomer and probably just a way for the on2 codec team to put their name on it
2023-03-06 09:41:38
to feel like they can take some form of credit for it or whatever
2023-03-06 09:44:00
Who is truly responsible for it anyways? Didn't Jyrki here help with it or something?
spider-mario
2023-03-06 09:46:01
afaik, he pretty much wrote webp lossless as shipped
Demiurge
2023-03-06 10:38:28
Well... how did on2 get involved in all the branding and whatever anyways?
2023-03-06 10:38:47
It kind of annoys me how they put their own fugly branding on matroska too
2023-03-06 10:40:46
I mean come on, how can you possibly improve on this branding?
2023-03-06 10:41:48
Does this look better to you?
2023-03-06 10:42:27
Who are they to put their own name and branding on a pre existing thing that they didn't create anyways?
2023-03-06 10:43:11
I dunno, dumb little things like that tend to drive me crazy, but I'm probably just crazy.
improver
2023-03-06 11:26:22
being put off by undeserved & potentially misleading arrogance isn't a crazy thing
2023-03-06 11:30:23
can be considered something in lines of autism spectrum if these thoughts get too intrusive & get in your way of life though
2023-03-06 11:31:53
but no you're definitely not crazy, i can feel these too (not that it's a good thing for my own stability; trying to get angry abt & fix everything wrong in the world just never works & isn't good way to spend time)
2023-03-06 11:52:46
just not as much as i've used to nowadays
Jyrki Alakuijala
Demiurge Who is truly responsible for it anyways? Didn't Jyrki here help with it or something?
2023-03-07 01:10:22
I designed WebP lossless -- Pascal helped me to add limitations that he considered important to make it hardware friendly -- such as the 16k x 16k pixels per side and he reduced the descriptivity of recursive control images -- also he asked for the RIFF header and 'alpha flag' which I considered somewhat unnecessary bloat
2023-03-07 01:11:04
Zoltan helped with the velocity of development during the format design process by keeping the decoder in sync with my encoder changes
2023-03-07 01:12:21
WebP was gated by Mozilla in 2011 -- they had a list of conditions that they'd want to see improved before they'd accept it -- one of the conditions was to have lossless coding and that is how I got involved (thank you Mozilla!!)
yoochan
2023-03-07 01:20:37
you worked for google at the time ?
veluca
2023-03-07 01:35:16
he still does 😛
2023-03-07 01:35:39
(so do I)
yoochan
2023-03-07 01:46:52
oki, nice ! remotely or at Mountain View ?
spider-mario
2023-03-07 01:46:57
from the Zürich office
yoochan
2023-03-07 01:47:48
ok, it explains the fact both are awake at the same time as me 😄
spider-mario
2023-03-07 01:48:06
https://research.google/people/105344/
yoochan
2023-03-07 02:01:24
impressive resume we have here
Jyrki Alakuijala
2023-03-07 02:36:27
I was very selfish in choosing jobs when I was young. In my first job (a neurosurgery robots startup) I recruited Jarkko Oikarinen, the author of IRC, to work with me. He then taught me to code.
2023-03-07 02:38:58
I was using IRC from day 1, also used its predecessor. Seeing such systems emerge (most often side projects initially) made it easier for me to understand how to build them myself.
jonnyawsom3
2023-03-07 02:47:51
A while ago I suddenly wondered how on earth I've ended up in a discord server full of Google devs, format creators and coders, just from me having fun learning codec options and trying to compress various files. Certainly an interesting world we live in now
yoochan
Jyrki Alakuijala I was using IRC from day 1, also used its predecessor. Seeing such systems emerge (most often side projects initially) made it easier for me to understand how to build them myself.
2023-03-07 02:48:33
IRC ! it makes me feel old 😄 it was our main way to communicate bewteen two games of CS 1.6
gb82
A while ago I suddenly wondered how on earth I've ended up in a discord server full of Google devs, format creators and coders, just from me having fun learning codec options and trying to compress various files. Certainly an interesting world we live in now
2023-03-07 04:31:27
too real
_wb_
2023-03-07 04:33:29
It's nice both ways. Direct community interaction is also a lot of fun and very informative for codec devs.
gb82
2023-03-07 04:33:56
<:BlobYay:806132268186861619>
Demiurge
2023-03-07 09:17:28
Jyrki here really is the heroic warlock-priest of image coding
Jyrki Alakuijala
2023-03-08 12:33:29
anyone who wants can be it, it just requires a lot of sitting still at the computer 😛
DZgas Ж
2023-03-09 07:30:42
<@532010383041363969> When will you fix the codec for my latest pictures? because considering the number of problems, I would like to say you to literally** return the old version**, because the new https://github.com/libjxl/libjxl/pull/2252 fix has made more problems and artifacts
2023-03-09 07:36:10
fab
2023-03-09 07:39:06
For autistic vision I'd say it does not look bad
2023-03-09 07:39:19
Is good
2023-03-09 07:39:28
Not good
DZgas Ж
2023-03-09 07:39:32
????
fab
2023-03-09 07:39:35
I'm joking
2023-03-09 07:39:47
But is not poor
DZgas Ж
2023-03-09 07:39:54
are drunk 👆
fab
2023-03-09 07:40:09
Like usable for autistic people
2023-03-09 07:40:16
More than acceptable
2023-03-09 07:41:06
2 and 10 images have good colours
DZgas Ж
2023-03-09 07:41:32
WHO ASKED?
2023-03-09 07:41:53
<@179701849576833024> can you do something with this drunk man
fab
2023-03-09 07:42:24
Is normal because libjxl is not a codec you have a cold block and you drag it the corner of the color temperature and paste warm blocks
DZgas Ж <@179701849576833024> can you do something with this drunk man
2023-03-09 07:42:38
Is a feature
2023-03-09 07:42:57
It won't do as libwebp2
2023-03-09 07:43:11
Because Jon Sneyers do not like this effect
2023-03-09 07:43:32
He said denoising make pictures less bright
2023-03-09 07:43:48
And codec job is not denoising
jonnyawsom3
2023-03-09 07:44:00
I think there's some miscommunication going on...
fab
I think there's some miscommunication going on...
2023-03-09 07:44:43
No is like that they prefer to not do this effect in libjxl
2023-03-09 07:45:31
JPEG XL is good for archicterual images
w
2023-03-09 08:29:20
omg the fab is back
2023-03-09 08:29:57
fab x dzgas wild interaction
DZgas Ж
2023-03-12 09:07:18
<@532010383041363969> any news? I see that you are work. just don't talk about them. I did the tests on the last build and I see that on the very first 4 pictures that I provided - there are absolutely no artifacts, They work Perfectly! But there are still new artifacts in the new pictures. Here is an example, the first image is new, and it began to look very bad, the colors seemed to have disappeared. But next to 2 old images, which in the last build look just **perfect**
2023-03-12 09:08:51
I observe the dim of color in all images. containing a red channel. I don't quite understand why this is so.
2023-03-12 09:43:07
recommendation for using this argument is written here. but such argument doesn't exist anymore
2023-03-12 09:43:34
now its --modular_palette_colors
2023-03-12 09:46:08
I know that for VarDCT, when the quality is -q 0, the image is size resampled 2 times. but I can't understand why to make it for Modular
2023-03-12 09:51:11
I absolutely do not understand what the --modular_lossy_palette parameter does (on any -q parameter), the file becomes 10% larger with completely identical contents
_wb_
2023-03-12 11:19:32
It's supposed to enable delta palette and shouldn't be combined with lower q settings. But it could very well be broken in current cjxl, it's rather experimental
DZgas Ж
2023-03-12 02:03:58
-m 0 -q 100 do not work. it continues to be Modular
2023-03-12 02:04:51
for VarDCT -d 0 i use -d 0.0000000000000000001 (or less)
2023-03-12 02:07:02
(Although this is actually one of the most pointless things you can do with Jpeg XL)
jonnyawsom3
2023-03-12 04:55:48
There simply is no lossless VarDCT
DZgas Ж
2023-03-12 08:42:17
<:AngryCry:805396146322145301>
veluca
2023-03-12 10:02:08
the libjxl artefacts on https://artifacts.lucaversari.it/libjxl/libjxl/ have started taking almost a terabyte of storage, and I figure it might be a good idea to get rid of some of the older ones 🙂 what do y'all think is the best option? (a) remove everything older than six months (b) remove everything older than a year, and keep 10% (chosen at random) of commits between a month old and six months old (c) other ideas?
afed
2023-03-12 10:05:24
I think (a) and older release versions
w
2023-03-12 10:05:29
instead of random it can be every nth
jonnyawsom3
2023-03-12 10:05:31
Maybe one set of commits per week/month? Then we still have old versions to test with without storing every single change
2023-03-12 10:06:12
Or hybrid, keep everything for a month then trim down to once a week
afed
afed I think (a) and older release versions
2023-03-12 10:08:28
or since there are release versions on github, then (a) + keep one old build every 3 months or something like that
improver
2023-03-12 10:22:10
(a) + release tags
2023-03-12 10:22:37
(b) would be idk how useful
2023-03-12 10:23:10
you'd probably want all of the versions in some sort of different archive thingy to reproduce per-commit stuff
w
2023-03-12 10:23:11
is any of it useful?
2023-03-12 10:23:15
(d) delete all of it
improver
2023-03-12 10:23:47
yeah honestly i'd keep 2 weeks of versions and do something extra for rest
veluca
afed I think (a) and older release versions
2023-03-12 10:24:16
older releases does make some sense (but at that point maybe I should also name them :P)
improver
2023-03-12 10:24:20
or. well. idk. maybe 6 months are fine too if it fits your storage quota
veluca
improver or. well. idk. maybe 6 months are fine too if it fits your storage quota
2023-03-12 10:24:54
it's my hard drive, so "storage quota" is an ... adaptive ... concept
improver
2023-03-12 10:25:28
yeah storage quota is what you decide it to be tbh
veluca
improver you'd probably want all of the versions in some sort of different archive thingy to reproduce per-commit stuff
2023-03-12 10:25:43
tbh if you need to reproduce per commit stuff you should probably build it yourself 😛
2023-03-12 10:26:02
can you download releases from GH without being logged in?
jonnyawsom3
2023-03-12 10:26:27
Yeah, github has the releases itself anyway, it's just the commits inbetween that matter
improver
2023-03-12 10:26:38
fair. this leaves one with just few months plus releases, & anything else is build yourself
2023-03-12 10:26:48
sounds.. okay
veluca
2023-03-12 10:26:51
the main point of this existing at all is that you can't for CI artifacts, so I guess keeping around the last couple of months is sufficient
2023-03-12 10:27:07
if you need old releases go to github
2023-03-12 10:27:32
(it's also much simpler to implement with "only newer than 6 monts" :P)
improver
2023-03-12 10:27:47
maybe do 3 months rather than 6
jonnyawsom3
2023-03-12 10:28:11
Something else to consider, Github also has 10GB of storage for the artefacts itself, so anything recent will always be on there
improver
2023-03-12 10:28:46
and yeah idk if keeping releases as special is any worth
2023-03-12 10:28:56
as they should prob be just attached to tags on github
veluca
2023-03-12 10:30:33
meh, I'll go with deleting things older than 4 months and calling it a day
improver
2023-03-12 10:31:08
im sure it'll be fine for people who just want to try stuff out without compiling on their own
veluca
2023-03-12 10:31:18
yep
2023-03-12 10:33:08
this would delete anything older than `2022-11-11`
2023-03-12 10:33:12
which I think is fair
2023-03-12 10:36:27
ok, done 😄 thanks for the discussion 😉
spider-mario
2023-03-13 10:02:50
how much space did that save?
veluca
2023-03-13 10:03:20
about 700 gb
2023-03-13 10:03:43
now it's ~300 gb or so
Jyrki Alakuijala
DZgas Ж <@532010383041363969> any news? I see that you are work. just don't talk about them. I did the tests on the last build and I see that on the very first 4 pictures that I provided - there are absolutely no artifacts, They work Perfectly! But there are still new artifacts in the new pictures. Here is an example, the first image is new, and it began to look very bad, the colors seemed to have disappeared. But next to 2 old images, which in the last build look just **perfect**
2023-03-13 10:43:54
Thank you for your kindness and help. I'm working towards more improvements on challenging images. I have a nice improvement in my client, about 5 % on max error of such images, and butteraugli and simulacra2 are also happy -- but when I look at other images, I see more ringing, more artefacts -- I need to choose some other way than what I have now. I will likely need to make Gaborish encoding side non-linear, and possibly turn off Gaborish for certain kinds of images (highly dithered/high contrast/high frequency/patterned pixel graphics), but I haven't yet fully convinced myself about that, so some more experiments are needed.
2023-03-13 10:45:19
this is currently the worst image I know about
2023-03-13 10:47:47
this image confuses VarDCT and the results are rather disappointing -- some blue pixels seem to turn yellow etc., a lot of unthinkable things are happening
Moritz Firsching
DZgas Ж now its --modular_palette_colors
2023-03-13 10:59:34
we should fix that...
DZgas Ж
Jyrki Alakuijala Thank you for your kindness and help. I'm working towards more improvements on challenging images. I have a nice improvement in my client, about 5 % on max error of such images, and butteraugli and simulacra2 are also happy -- but when I look at other images, I see more ringing, more artefacts -- I need to choose some other way than what I have now. I will likely need to make Gaborish encoding side non-linear, and possibly turn off Gaborish for certain kinds of images (highly dithered/high contrast/high frequency/patterned pixel graphics), but I haven't yet fully convinced myself about that, so some more experiments are needed.
2023-03-13 11:23:57
Yesterday I noticed that when Gaborish is disabled, the errors that I show become very clearly visible even on very high quality like q95 (and even on q96-98) The first image in my collection is the most revealing of all. on the libjxl version from February 27, with the quality of q95 and with an absolutely identical file size, the difference is simply amazing, after fixing in latest builds of libjxl, this image is simply corrupted
veluca the libjxl artefacts on https://artifacts.lucaversari.it/libjxl/libjxl/ have started taking almost a terabyte of storage, and I figure it might be a good idea to get rid of some of the older ones 🙂 what do y'all think is the best option? (a) remove everything older than six months (b) remove everything older than a year, and keep 10% (chosen at random) of commits between a month old and six months old (c) other ideas?
2023-03-13 11:32:48
I have an idea just compress everything into a normal archive
veluca the libjxl artefacts on https://artifacts.lucaversari.it/libjxl/libjxl/ have started taking almost a terabyte of storage, and I figure it might be a good idea to get rid of some of the older ones 🙂 what do y'all think is the best option? (a) remove everything older than six months (b) remove everything older than a year, and keep 10% (chosen at random) of commits between a month old and six months old (c) other ideas?
2023-03-13 11:37:17
I think you can delete everything and leave only the One build of every 5 days, that is, the build from the 15th from the 20th from the 25th of each month
jonnyawsom3
2023-03-13 11:52:18
A bit late for that
DZgas Ж
DZgas Ж Yesterday I noticed that when Gaborish is disabled, the errors that I show become very clearly visible even on very high quality like q95 (and even on q96-98) The first image in my collection is the most revealing of all. on the libjxl version from February 27, with the quality of q95 and with an absolutely identical file size, the difference is simply amazing, after fixing in latest builds of libjxl, this image is simply corrupted
2023-03-13 12:02:11
Since this problem has not been solved in 2 weeks since the pull/2252 fix, I personally had to rollback to the version Before this fix in order to use Jpeg XL for my needs
Demiurge
2023-03-14 10:25:49
Using album art covers as test images is a great idea.
DZgas Ж
Demiurge Using album art covers as test images is a great idea.
2023-03-14 12:09:23
I literally encode one image and see bugs. I use Jpeg XL only a couple of times a month. but it's enough to see them all. - The image with my albums is literally the only image that I have encoded in the last month use Jpeg XL. if I used Jpeg XL every day then rest assured I would report errors every hour
2023-03-14 12:14:41
although in the coming **days **I have plans to compress about 500 thousand manga pages to JPEG XL. But since these are black and white images, I am sure that there will be no problems with them. just for this reason, *I recently asked about the analog of YUV400 in Jpeg XL, and received the answer that 3 color channel are hardcoded* which will undoubtedly greatly slow down the compression, because as I have already shown - compressing an empty image with 1 color takes the same time as compressing a regular image. although I'm more concerned about memory consumption
Demiurge
2023-03-14 12:36:05
Monochrome/greyscale images?
2023-03-14 12:36:40
I'm pretty sure JXL supports images with only 1 color channel.
2023-03-14 12:37:01
idk if libjxl does
novomesk
2023-03-14 12:39:50
libjxl supports grayscale images.
improver
2023-03-14 12:49:39
3 color channels are hardcoded only in vardct
2023-03-14 12:49:49
iirc
DZgas Ж
2023-03-14 12:50:29
> VarDCT is hardcoded for 3 channels. If 2 are all-zeroes, in principle it could be optimized but in libjxl that isn't done. https://discord.com/channels/794206087879852103/848189884614705192/1082049729782878279 <@1028567873007927297><@886264098298413078><@260412131034267649>
improver
2023-03-14 12:51:09
yeh thats what i said
jonnyawsom3
2023-03-14 12:53:57
We were doing tests on manga yesterday, you can look at the parameters we ended up with https://discord.com/channels/794206087879852103/794206170445119489/1084857747079700500
DZgas Ж
improver yeh thats what i said
2023-03-14 12:54:12
no. you said 👉 iirc
We were doing tests on manga yesterday, you can look at the parameters we ended up with https://discord.com/channels/794206087879852103/794206170445119489/1084857747079700500
2023-03-14 12:55:32
I'm going to use VarDCT i.e. lossy compression
jonnyawsom3
2023-03-14 12:57:27
Lossless was smaller, and naturally, lossless too. Although lowering the bit depth would help both cases even more no doubt
2023-03-15 03:33:30
I had a thought, you can use `r` with benchmark_xl to set a target bpp, why not have it in cjxl too? As far as I'm aware -r does nothing currently while -R is squeeze transform, unless we don't think it would be used enough
Demiurge
DZgas Ж > VarDCT is hardcoded for 3 channels. If 2 are all-zeroes, in principle it could be optimized but in libjxl that isn't done. https://discord.com/channels/794206087879852103/848189884614705192/1082049729782878279 <@1028567873007927297><@886264098298413078><@260412131034267649>
2023-03-16 04:29:36
Is this true? does libjxl really not support greyscale images?
Traneptora
Demiurge Is this true? does libjxl really not support greyscale images?
2023-03-16 04:35:07
no, it's not true
2023-03-16 04:36:23
VarDCT is hardcoded for 3 colors internally, but in grayscale you have X=B=0 which compresses to some constant very minimal overhead regardless of the image size
2023-03-16 04:37:03
there's no special case handling for it cause it isn't really needed
2023-03-16 04:38:49
upon decoding if the image is marked as grayscale it just discards two channels
_wb_
Traneptora there's no special case handling for it cause it isn't really needed
2023-03-16 05:47:34
The main reason for adding a special case is to save some memory — currently we do allocate buffers for 3 components which is a bit much. E.g. a 1-bit grayscale image we currently represent using 3 float32 buffers, so 96 bits per pixel, which is kind of wasteful 🙂
2023-03-16 05:48:42
But yes, compression/bitstream-wise there is no problem, this is just a potential implementation optimization
Demiurge
2023-03-16 05:50:14
that's pretty extreme to have 3 planes for a bitonal image
2023-03-16 05:50:38
from an implementation pov
_wb_
2023-03-16 05:53:14
Yes. It's pretty convenient to have only one code path to worry about though.
DZgas Ж
Demiurge Is this true? does libjxl really not support greyscale images?
2023-03-16 08:37:45
Yep. But An empty channel with a size of 8000x8000 is file size about ~200 bytes
Demiurge
2023-03-16 09:49:56
that's 200 more bytes than needed...
Hello71
2023-03-17 01:02:15
arguably that's just probability-weighted coding though, like it could be 199 bytes less, but then you waste 1 byte on all colored images. so the question is the rate of grayscale images, and I think the answer is probably not very much
username
2023-03-18 09:15:54
I really hope that this can be issue can addressed at some point because once it is then paint.net will be able to include jxl support by default https://github.com/libjxl/libjxl/issues/1450
2023-03-18 09:16:21
quite a few people use paint.net including myself
2023-03-18 09:19:58
and I have seen in a lot of cases that people will use paint.net as a viewer for formats that they can't open normally with the default programs included with windows
yoochan
2023-03-25 05:55:15
tried to compile via the docker, got the following error ```CMake Error at third_party/brotli/CMakeLists.txt:4 (cmake_minimum_required): CMake 3.10.4 or higher is required. You are running version 3.10.2 ```
2023-03-25 05:57:26
crap, the image seems to be 18.04, cmake can't be upgraded via apt...
improver
2023-03-25 08:43:52
18.04 is like 5y old by now
spider-mario
2023-03-27 05:22:14
https://tenor.com/view/old-man-gif-4679601
gameplayer55055
2023-03-27 05:29:23
is it linuxy thing?
yoochan
2023-03-27 06:33:38
Ubuntu? Yes, April 2018 no
gameplayer55055
2023-03-27 06:46:50
its complicated
Fraetor
2023-03-28 07:28:42
At work we use RHEL7, and its always fun seeing what doesn't run due to an outdated glibc.
kmadura
2023-03-29 10:34:39
We still use Centos 7 on production, can't be easily upgraded without causing any downtime. We will probably migrate into Rocky Linux at some point.
improver
2023-03-29 10:56:07
many such stories...
gameplayer55055
2023-03-29 10:57:36
still can't beat windows XP ATMs
2023-03-29 10:57:39
oh
2023-03-29 10:57:42
i know what can
2023-03-29 10:57:47
flightmares
2023-03-29 11:01:28
https://en.m.wikipedia.org/wiki/Airline_teletype_system
2023-03-29 11:01:32
this teletype
jonnyawsom3
2023-04-02 11:35:25
I did wonder, we're able to set bpp in the benchmark, but isn't there a place for specifying filesize in cjxl too? The only times I've known of being able to set a filesize target is usually with constant bitrate after calculating from a video file, but it feels like something that should be more commonplace
2023-04-02 12:17:55
Huh, interesting
Traneptora
2023-04-04 03:50:33
yea the old frontend used to do the binary search for you
2023-04-04 03:50:43
the new frontend is based on the library, which doesn't do that
2023-04-04 03:50:50
you can still try with benchmark_xl though iirc
2023-04-04 02:10:48
`./lib/jxl/color_encoding_internal.cc:234: JXL_FAILURE: Invalid gamma 2.200000`
2023-04-04 02:10:54
am I supposed to pass `0.45455`?
_wb_
2023-04-04 04:49:11
Yes, it's always confusing what gamma means, 1/x and x are kind of both used
username
2023-04-04 07:32:56
when I put this image into cjxl with "-e 9 -q 99" the text at the top that says "printer" gains a inner outline https://github.com/bigratmonster/bigrat.monster/raw/main/media/printer1bigger.png
2023-04-04 07:34:11
I tried a older version of cjxl from October of 2022 and still had the same problem
2023-04-04 07:34:53
I also tested lossy webp (libwebp 1.3.0) and it ended up having no problem with the text
2023-04-04 07:37:01
2023-04-04 07:37:25
first image is cjxl second image is cwebp
2023-04-04 07:39:11
and here is the source image:
w
2023-04-04 07:39:28
looks like gaborish=0 fixes that
2023-04-04 07:40:30
i thought it was crazy until i tried it myself
username
2023-04-04 07:42:10
oh wow it does solve the problem
w
2023-04-04 07:46:40
desktop now covered in rat
fab
w looks like gaborish=0 fixes that
2023-04-04 07:49:39
for %i in (C:\Users\Use\Pictures\telefono\niko\*.jpg) do cjxl -q 96.373 -e 9 -I 15 --epf=0 --faster_decoding=3 --dots=0 --lossless_jpeg=0 "%i" "%i.jxl"
w
2023-04-06 10:22:46
is there a way to crop an ImageBundle?
Traneptora
2023-04-06 02:07:31
what do you mean by an ImageBundle?
veluca
2023-04-06 02:08:53
I assume the libjxl class
Traneptora
2023-04-06 02:08:59
ah
veluca
2023-04-06 02:09:11
I guess the answer is by cropping each of the channels manually
w
2023-04-06 05:46:05
is there an efficient way to do that
veluca
2023-04-06 06:48:59
an Image(3)F has a Crop method iirc
2023-04-06 06:49:05
it is O(1)
_wb_
2023-04-06 06:53:33
Also doesn't dealloc any memory, right?
w
2023-04-06 07:15:24
so it's also good if I have many crops of the same imagebundle?
_wb_
2023-04-06 07:19:43
I don't think that will work with the code as it is now, but it probably is possible to make it work that way
w
2023-04-06 08:21:21
work as in work at all? or as in work well?
_wb_
2023-04-11 05:18:26
It's not made for that, I don't think it will work at all.
DZgas Ж
2023-04-14 01:19:54
after what % of the JPEG XL file download does its first preview image begin? what does it depend on? as far as I know, it shouldn't depend on weight at all and should be tied relatively in percentages. But I can observe that some images are progressively decoded and shown after **5%** loading, some only after 45% loading
2023-04-14 01:29:53
here are 2 images, the first image 1 layer of display comes after 4.8% loading, and the second image only after 46.1% of loading, I can not understand why so
yoochan
2023-04-14 01:30:43
this is linked to the question asked in <#794206170445119489>, is seems the info of "where does the progressive pass start and stop" is available in the header, I plan to make a tool to read this from a file
DZgas Ж
yoochan this is linked to the question asked in <#794206170445119489>, is seems the info of "where does the progressive pass start and stop" is available in the header, I plan to make a tool to read this from a file
2023-04-14 01:31:17
I don't think these are related topics.
yoochan
2023-04-14 01:31:49
don't you want to know after which percent of the file a jxl can be progressively decoded ?
DZgas Ж
yoochan don't you want to know after which percent of the file a jxl can be progressively decoded ?
2023-04-14 01:34:05
I want to understand why this figure is so different from file to file. What I see in my examples shows that it is almost a static number of bytes, which depends on the number of blocks
2023-04-14 01:36:17
If calculate the percentage and size of the file, can see that the first layer is displayed after 1. 18 kb 2. 17 kb
yoochan
2023-04-14 01:37:14
indeed I didn't cared about why 😄 and I don't know
DZgas Ж
2023-04-14 01:38:23
☝️ my concern is that in files that are compressed with quality d 5 - the first layer is displayed only after loading Half of the entire file
_wb_
2023-04-14 01:54:51
generally the first preview is available when the 1:8 (DC) image is available. When that happens % wise depends on some things: - how complicated is the DC? some images have 'easier' DC than others - how much info is in the AC? generally at higher quality, the proportion of AC vs DC increases
2023-04-14 01:56:05
then there are also some things that are encoded together with or before the DC, like Patches and the AC metadata (chroma from luma etc)
2023-04-14 01:56:56
in images with lots of patches, that can cause the first preview to happen later
DZgas Ж
_wb_ then there are also some things that are encoded together with or before the DC, like Patches and the AC metadata (chroma from luma etc)
2023-04-14 02:07:45
Yes. perhaps. it's all very big for images that are created with d 5+ quality
2023-04-14 02:11:36
Another question is - is the macroblocks of size 256x256 is hardcoded or frozen by specification?
2023-04-14 02:13:19
I mean the blocks that I see during image loading. Is it possible to make them of any size or remove them altogether? will this be supported by the decoder?
_wb_
2023-04-14 03:06:42
256x256 is hardcoded in VarDCT — but of course a decoder can choose to only show complete passes instead of showing every 256x256 chunk as it becomes available
2023-04-14 03:07:18
in modular mode the spec allows choosing between 128x128, 256x256, 512x512 and 1024x1024
jonnyawsom3
2023-04-14 03:20:22
-g 0, 1, 2, 3 respectively
zamfofex
2023-04-15 09:23:25
Are there plans of some kind regarding the release date of 0.9? Or some kind of idea about whether it’s somewhat close or not, or the kinds of features that are wanted for it? Also, what kinds of changes are there in `main` compared to 0.8.1? (If it’s easy enough to summarize, I mean.)
DZgas Ж
Are there plans of some kind regarding the release date of 0.9? Or some kind of idea about whether it’s somewhat close or not, or the kinds of features that are wanted for it? Also, what kinds of changes are there in `main` compared to 0.8.1? (If it’s easy enough to summarize, I mean.)
2023-04-15 09:33:52
I don't think you need to rush, after a few global changes it works slightly worse in quality than the old version. But immediately after the release of build 0.9.0 on the githab I will compare them
w
2023-04-15 09:45:01
version number is just a number
zamfofex
2023-04-15 09:47:04
Generally, assigning a version number is indication of some kind of stability or reached milestone.
_wb_
2023-04-15 09:56:24
Not sure if there will be a 0.9, the next one might be 1.0
DZgas Ж
2023-04-15 09:58:20
Are you sure? because I don't see the full Preparedness
Fraetor
2023-04-15 11:19:04
1.0 was wanting to remove all abort() and something else?
2023-04-15 11:19:14
Actually I guess it is all listed here: https://github.com/libjxl/libjxl/milestone/1
jonnyawsom3
2023-04-15 01:19:11
Abort VMYK Lossy 16 bit Other language Unicode characters Are the big ones, other than optimisation and documentation
w
2023-04-18 08:04:13
jxl recompression when?
2023-04-22 08:11:46
it was a serious question i want to be able to input jxl and losslessly re-encode with different settings
Traneptora
2023-04-22 08:28:58
well you wouldn't be able to change varblock sizes or HF coeffs after quant
2023-04-22 08:29:15
so not sure what else ngl
_wb_
2023-04-22 08:30:27
For lossless to lossless or lossless to lossy it makes the most sense and it would be relatively easy to add
Traneptora
2023-04-22 08:31:40
but for that you can just decode to pixels
_wb_
2023-04-22 08:32:03
For lossless recompression of vardct jxl, it would be a lot of work for very limited potential gains imo, since it's only the entropy coding that can possibly be improved, but that will not make more than a few percent difference
Traneptora
2023-04-22 08:32:15
unless wwww meant accepting jxl in cjxl
2023-04-22 08:32:45
which I agree would be nice
2023-04-22 08:33:17
also allow ssimu2.1 and other tools to work with jxl directly rather than png
jonnyawsom3
2023-04-22 11:02:39
It would certainly fulfil the "Re-encode with different settings" they wanted, maybe for going to higher distances too. Adds quite a few test cases
derberg🛘
2023-04-22 11:11:26
The reason they asked is likely that they have files converted with cjxl v 0.8 and `-q 100 -e 9 -E 3 -I 1` (according to their site) but since -I 100 is what -I 1 was before (in <=0.6.1), the files could be multiple percent points smaller
2023-04-22 11:12:00
(in fact, I DMed wwwwwwww on the same day mentioning that they likely forgot to switch to -I 100)
jonnyawsom3
2023-04-22 11:14:21
Oddly I've had `I 0` or 1 sometimes give better results than 100
afed
2023-04-22 11:17:50
at least for windows there is a solution by supporting a wic api, like cwebp or avifenc (with patch), so that all system wic decoders work and for example cwebp accepts webp, jxl, avif, ppm and any other wic installed decoders
yoochan
2023-04-22 11:22:50
which reminds me that the last WIC implementation date from 3 years (https://github.com/mirillis/jpegxl-wic) and would need a refresh
derberg🛘
Traneptora well you wouldn't be able to change varblock sizes or HF coeffs after quant
2023-04-22 11:23:18
Third possible tool called rjxl just for that task jxl → (smaller) jxl and that doesn't have options one should not use? 🤔
jonnyawsom3
yoochan which reminds me that the last WIC implementation date from 3 years (https://github.com/mirillis/jpegxl-wic) and would need a refresh
2023-04-22 11:35:32
A bit newer, but still nearly a year old https://github.com/saschanaz/jxl-winthumb
yoochan
2023-04-22 12:00:29
nice ! thank you for the link
w
2023-04-22 12:52:07
I want lossless to lossless, including lossless jpeg reconstruction to lossless with optional from pixels. I know it's relatively simple to do manually, just would be super nice if cjxl can handle it
Traneptora
2023-04-22 01:39:51
having cjxl and other related tools accept JXL input is on the todo list iirc
gb82
Traneptora also allow ssimu2.1 and other tools to work with jxl directly rather than png
2023-04-22 06:03:49
This would be great. How probable is this?
_wb_
2023-04-22 06:32:39
Very probable - if nobody else implements that, I will do it myself when I eventually have time to do it
fab
2023-04-22 07:14:57
https://ci.appveyor.com/project/louquillio/libavif/builds/46841469
2023-04-22 07:15:12
compile this for sse4 gb80
2023-04-22 07:15:27
codec avm on
2023-04-22 07:15:45
this is a pull request
derberg🛘
2023-04-22 09:29:15
So now that more and more tools integrate JXL writing I wonder if there couldn't be a environment variable to tell applications which options (that might not even exist yet) to use to save jxl. It looks like ksnip only uses quality 100 and xfce4-screenshooter will likely use quality 100 as well. However, when taking screenshots in PNG and converting them using cjxl, I can easily get smaller JXL files...
jonnyawsom3
2023-04-22 10:06:40
I know I wanted something like that for FFMPEG a while ago, but never found anything except building it yourself with the options baked in. Would be nice to have a way to change the defaults
derberg🛘
2023-04-23 12:36:50
Just opened an issue regarding that. Will likely not be that active for a month starting tomorrow thus I wanted to just get this out by now.
Traneptora
I know I wanted something like that for FFMPEG a while ago, but never found anything except building it yourself with the options baked in. Would be nice to have a way to change the defaults
2023-04-23 03:37:00
adding more options to the FFmpeg libjxl encoder wrapper is on my to-do list btw
2023-04-23 03:37:13
atm only supports distance, effort, and force modular
jonnyawsom3
2023-04-23 03:42:08
I meant having a way of setting options to be used by default, so for example -hide_banner would be applied to all commands
2023-04-23 03:43:20
There's no real neat way to do it as far as I'm aware, only building it with the defaults changed in the code
Traneptora
2023-04-23 04:30:18
yea, there's no config or environment for that like there is with mpv
gb82
fab compile this for sse4 gb80
2023-04-24 03:57:51
Hm?
monad
2023-04-25 08:22:04
he said compile this for sse4 gb80
Nova Aurora
2023-04-25 10:28:52
https://tenor.com/view/cant-tell-me-what-to-do-its-always-s-unny-in-philadephia-gif-4955839
gb82
monad he said compile this for sse4 gb80
2023-04-26 08:29:53
<:Poggers:805392625934663710> <:PepeHands:808829977608323112>
username
2023-04-27 10:41:25
when I try to make a progressive lossless JXL the file size is noticeably larger then a adam7 PNG
yoochan
2023-04-28 06:27:07
If I understood correctly, modular mode and progressiveness don't work well together.... Which is a shame because the progressiveness of FLIF and FUIF was mind-blowing
_wb_
2023-04-28 06:35:08
FUIF is the same as JXL in that regards
2023-04-28 06:35:45
FLIF does progressive like adam7 does it, i.e. with NN subsampling rather than actual downscales
2023-04-28 06:36:10
that has advantages especially on nonphotographic images, since it e.g. never increases the number of colors
2023-04-28 06:37:19
but it also means you don't really get usable downscaled versions of the image out of it (NN downscaling is a quite horrible way to downscale an image)
2023-04-28 06:39:38
the way FLIF gets good compression while doing adam7-like interlacing, is by effectively predicting pixels from 8 of its 9 neighbors — everything except the neighbor at the right or the one at the bottom is already known at decode time, so it can be used for prediction and context modeling
2023-04-28 06:41:54
Squeeze does 'real' progressive (in the sense that the previews are actual downscales where every pixel contributes to the averaged value, not just the top left one of each N x N block)
2023-04-28 06:42:43
for photographic images, it does it in a way that is reasonably effective in terms of compression
2023-04-28 06:44:19
for non-photo, it will almost certainly be worse than what can be done when not 'introducing new colors'
2023-04-28 06:45:51
for progressive lossless non-photo, I think we should just use a lossy preview frame at reduced resolution and call it a day, I don't think there's really much more that can be done
2023-04-28 06:50:02
for non-photo images, FLIF's interlacing or PNG's Adam7 will be less bad for compression than FUIF/JXL's Squeeze, but the previews you get out of it will also be less useful. If it's just a preview shown while transferring the full image, it's OK, but if you would want to use a truncated bitstream as the final image for a 1:2 or 1:4 version of the image, it's not good enough.
monad
2023-04-28 06:04:56
<@532010383041363969> Is there a reason d1.8 is listed twice in the benchmarks associated with your commits? <https://github.com/libjxl/libjxl/commit/492725c4d12d5ed7903c361a25071990600ac2eb>
2023-04-28 06:09:38
Didn't want to bother needlessly, but I kept seeing that and imagined it could represent unintended bias in conclusions.
_wb_
gb82 This would be great. How probable is this?
2023-04-28 07:54:23
probability is now approaching 1: https://github.com/libjxl/libjxl/pull/2444
derberg🛘
2023-04-28 11:12:47
»Allowing jxl input for cjxl can be useful if the input is lossless or higher quality than what is desired for the output.« Doesn't this also allow going from lossless to lossless with some additional bytes saved (better options)?
gb82
_wb_ probability is now approaching 1: https://github.com/libjxl/libjxl/pull/2444
2023-04-29 04:15:59
Awesome! Looking good!
_wb_
derberg🛘 »Allowing jxl input for cjxl can be useful if the input is lossless or higher quality than what is desired for the output.« Doesn't this also allow going from lossless to lossless with some additional bytes saved (better options)?
2023-04-29 06:05:12
Yes, that too.
2023-05-01 06:12:11
Could it be a 16-bit png that uses sBIT to make the channels 8-bit?
Traneptora
2023-05-01 01:52:50
does this file produce this? https://buzo.us/W.png
2023-05-01 01:52:56
it doesn't for my version of imagemagick
2023-05-01 01:53:08
but it's a 16-bit PNG with 8-bit sBIT chunk
Yari-nyan
2023-05-01 03:24:27
my application that uses libjxl doesn't seem to free its memory correctly. i destroy `JxlDecoder` and `JxlResizableParallelDecoder` at the end, but depending on the image, the memory usage can be as much as 20 MB higher than it should be, and that doesn't count the actual buffer
spider-mario
2023-05-01 04:26:47
any insight from valgrind or msan?
Yari-nyan
2023-05-01 05:33:25
how's this? i'm not good with debuggers
2023-05-01 05:35:28
yes, i'm using libjxl in a zig application
frank cilantro
2023-05-01 06:52:36
hi, is there a guide to all the information that needs to be provided to the encoder/decoder to support arbitrary number of extra channels (lossless, if that makes a difference)
Traneptora
Yari-nyan yes, i'm using libjxl in a zig application
2023-05-01 08:02:27
compile with -g
frank cilantro hi, is there a guide to all the information that needs to be provided to the encoder/decoder to support arbitrary number of extra channels (lossless, if that makes a difference)
2023-05-01 08:03:44
the api docs should cover it
TheBigBadBoy - 𝙸𝚛
2023-05-01 09:42:53
```powershell $ cjxl -e 10 -d 0 --brotli_effort=11 --allow_expert_options --num_threads=0 -I 100 -g 3 -E 11 cover.jpg cover.jxl JPEG XL encoder v0.8.1 c27d4992 [AVX2,SSE4,SSSE3,Unknown] Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0). Read JPEG image with 269801 bytes. Encoding [Container | JPEG, lossless transcode, effort: 10 | JPEG reconstruction data], JxlEncoderProcessOutput failed. EncodeImageJXL() failed. ```Should I report it, even if the command is quite exotic/uncommon ?
username
2023-05-01 09:46:48
I think that's already reported
2023-05-01 09:46:56
one sec ill try to find the issue page
TheBigBadBoy - 𝙸𝚛 ```powershell $ cjxl -e 10 -d 0 --brotli_effort=11 --allow_expert_options --num_threads=0 -I 100 -g 3 -E 11 cover.jpg cover.jxl JPEG XL encoder v0.8.1 c27d4992 [AVX2,SSE4,SSSE3,Unknown] Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0). Read JPEG image with 269801 bytes. Encoding [Container | JPEG, lossless transcode, effort: 10 | JPEG reconstruction data], JxlEncoderProcessOutput failed. EncodeImageJXL() failed. ```Should I report it, even if the command is quite exotic/uncommon ?
2023-05-01 09:53:04
it seems like this has already been solved but the fix is not in any stable marked builds/versions currently. https://github.com/libjxl/libjxl/issues/2034
Yari-nyan
Traneptora compile with -g
2023-05-01 10:50:29
compile libjxl with -g? what should that do?
Traneptora
Yari-nyan compile libjxl with -g? what should that do?
2023-05-01 10:54:59
no, compile your own code with -g
2023-05-01 10:55:09
what that does is it changes those `????` to actual function names
2023-05-01 10:55:15
with lines of code and source.c
2023-05-01 10:56:35
also you say the memory is ~20 MB higher than it should be, but how are you measuring this, and how are you measuring how much it "should be"?
Yari-nyan
Traneptora also you say the memory is ~20 MB higher than it should be, but how are you measuring this, and how are you measuring how much it "should be"?
2023-05-02 07:16:15
gnome system monitor, i have other decoder libraries in my program that have at most 1? MB memory usage after decoding libwebp, spng, libavif, libjpeg-turbo
Traneptora what that does is it changes those `????` to actual function names
2023-05-02 07:16:25
i'll try
Yari-nyan gnome system monitor, i have other decoder libraries in my program that have at most 1? MB memory usage after decoding libwebp, spng, libavif, libjpeg-turbo
2023-05-02 07:20:31
the memory buffer is reported separately as Shared Memory, so it's clear how much of it is ideal
2023-05-02 07:24:25
the application is designed to use very little system memory, so there is clearly something up with my usage of libjxl or libjxl itself
2023-05-02 07:47:04
zig build doesn't recognize `-g`
zamfofex
2023-05-02 07:59:59
`-g` is a C compiler flag. You need to figure out how to keep debugging information in Zig if you’d like.
Jyrki Alakuijala
monad <@532010383041363969> Is there a reason d1.8 is listed twice in the benchmarks associated with your commits? <https://github.com/libjxl/libjxl/commit/492725c4d12d5ed7903c361a25071990600ac2eb>
2023-05-02 10:13:38
d1.8 doubled -- just a mistake I had on the command line
monad Didn't want to bother needlessly, but I kept seeing that and imagined it could represent unintended bias in conclusions.
2023-05-02 10:15:26
the optimization uses a set of randomly chosen somewhat geometric series of distances in a selected range, usually something like d0.4 to d6.0 -- the last verification is more for manual viewing and getting some idea how the optimization scales to d0.1 and d7+ etc.
2023-05-02 10:15:57
of course I shouldn't have d1.8 doubled, but it is not going to make a significant difference here I believe
Traneptora
2023-05-02 10:18:25
it is very possible that libjxl isn't handling memory properly. you can run djxl through valgrind and find numerous issues
2023-05-02 10:29:18
a number of them are mismatched free() and delete()s, idk if we care about those or not tho
2023-05-02 10:29:47
I'm not really a C++ programmer so I don't know how big of a deal that is
_wb_
2023-05-02 10:32:44
well in any case we need to ensure that 1) libjxl has no leaks and 2) it returns error when alloc fails, instead of just aborting
Traneptora
2023-05-02 10:35:47
I'd say (2) is higher priority
Jyrki Alakuijala
2023-05-02 10:36:31
file an issue about the valgrind -- how you did it and what are examples on what you find
2023-05-02 10:37:02
then you can relax and do more interesting things and the bugs will fix themselves 😛
Traneptora
2023-05-02 10:37:18
pretty much any input has mismatched free/deletes, so lemme try with a conformance sample
Jyrki Alakuijala
2023-05-02 10:37:19
well, maybe not quite, but it can be more fun for a competent C++ programmer to fix
2023-05-02 10:37:56
if you find bugs and are able to debug and fix them -- while enjoying the time -- then it is of course appreciated
Traneptora
2023-05-02 10:38:23
I would if it were C but wrangling C++-specific issues (mismatched free/delete) is outside my scope of what I'd call "fun"
2023-05-02 10:38:31
since I just don't know the language-specific stuff that well
Jyrki Alakuijala file an issue about the valgrind -- how you did it and what are examples on what you find
2023-05-02 10:43:29
interesting, it's gone after I updated libjxl
2023-05-02 10:43:33
bug must have been fixed already
2023-05-02 10:43:39
good job to whoever did that :D
veluca
Traneptora pretty much any input has mismatched free/deletes, so lemme try with a conformance sample
2023-05-02 12:30:26
I *suspect* this is actually a valgrind issue
2023-05-02 12:31:04
i.e. it's not replacing *all* calls to free/malloc with its own wrappers properly, or stuff like that
Traneptora
veluca I *suspect* this is actually a valgrind issue
2023-05-02 12:46:58
well apparently after recent commits that say "fix msan issues" it works now
2023-05-02 12:47:08
so not sure
veluca
2023-05-02 12:52:52
ah, maybe
Traneptora
2023-05-04 12:03:23
``` ./lib/jxl/dec_ans.cc:367: Histogram can represent numbers that are too large: 124 ``` what does this mean?
veluca
Traneptora ``` ./lib/jxl/dec_ans.cc:367: Histogram can represent numbers that are too large: 124 ``` what does this mean?
2023-05-04 07:34:56
https://github.com/libjxl/libjxl/blob/5fef3ec57452f2865a62c0e01cdcf3635f09b920/lib/jxl/dec_ans.cc#L360 long story short, some code tries to upper bound the # of bits needed for coefficients during decoding (to use smaller buffers if possible) and gives a warning if it can't know 32 will be enough
Eugene Vert
2023-05-04 12:50:57
Quickly made an example, both 8bit and 16bit RGB/RGBA PNG export works fine on it.
2023-05-04 12:57:28
With 16bit output, i got that 16/8-bit thing too. ``` Depth: 16/8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit ```
2023-05-04 12:58:09
Yep
2023-05-04 01:04:39
Oh wait, it encoded 16bit rgb example without errors, but the result is this
2023-05-04 01:06:54
And that's encoded 16bit RGBA example
2023-05-04 01:14:52
I used JetBrainsMono Nerd Font, so it's probably the font not installed in Inkscape.
2023-05-04 01:19:12
<@456226577798135808> Shall I open an issue?
2023-05-04 01:47:01
https://github.com/libjxl/libjxl/issues/2457
Kampidh
2023-05-07 04:53:36
``` lib\jxl\render_pipeline\stage_blending.cc:40: JXL_FAILURE: Trying to blend XYB reference frame 0 and non-XYB frame lib\jxl\render_pipeline\render_pipeline.h:81: JXL_RETURN_IF_ERROR code=1: stage->IsInitialized() lib\jxl\dec_frame.cc:653: JXL_RETURN_IF_ERROR code=1: dec_state_->PreparePipeline(decoded_, pipeline_options) lib\jxl\decode.cc:1142: frame processing failed ``` hmm, I bumped into something while decoding a layered jxl (with coalesce) that encoded losslessly with effort 5 and up...
2023-05-07 04:55:30
it weirdly only affects a certain part of an image, and went away when that part got cropped
_wb_
2023-05-07 05:00:54
Can you open an issue?
Kampidh
_wb_ Can you open an issue?
2023-05-07 05:04:23
sure, I'll also attach the files there
Vincent Torri
2023-05-10 01:11:44
hello
2023-05-10 01:13:06
why are some libraries are cloned with libjxl git ? some of them are so used that i doubt that a system does not have them. And even in that case, it will be easy to install, these days.
2023-05-10 01:14:25
libpng, zlib, libjpeg (instead of sjpeg), lodepng can be removed too
yoochan
2023-05-10 01:37:09
also brotli is pulled as third party and recommended to install from the system on the BUILDING.md
Vincent Torri
2023-05-10 02:04:41
it's just a matter of throwing an error if they are not installed (if they are needed)
Traneptora
Vincent Torri why are some libraries are cloned with libjxl git ? some of them are so used that i doubt that a system does not have them. And even in that case, it will be easy to install, these days.
2023-05-11 03:01:44
it's a thing that google libraries do for some reason
_wb_
2023-05-11 03:14:56
Isn't this mostly just for convenience for Windows builds?
Traneptora
2023-05-11 04:42:47
I don't know, but most google libraries do this shaderc, highway, etc.
2023-05-11 04:43:12
and the default is to not use the system libraries and instead statically link them in
2023-05-11 04:43:26
even if they exist
vtorri
2023-05-12 04:16:28
<@853026420792360980> it's not because google libraries are doing so that you should also doing so
2023-05-12 04:17:41
shared libs are good, and save space on disk
2023-05-12 04:24:37
on windows you also have vcpkg, or other similar systems, that could install libpng or other libs
2023-05-12 04:25:27
but, imho, relying on system libs makes the build system a lot simpler
2023-05-12 04:26:19
also, when i want to test the latest code, pulling from git is a lot faster
2023-05-12 04:33:13
and for windows build, it's easy : install msys2, pacman -S libpng etc... and some comands for cmake
Traneptora
2023-05-12 10:15:11
I don't disagree
2023-05-12 10:15:26
I was just pointing out the pattern
Mrtt
2023-05-12 12:39:14
From my current experience, using vcpkg is a good way to ensure a proper build, but this also can be a real pain in the neck (my project has more than 300 C++ dependencies at the end of the day (including libjxl) ) but when it works it really a good way to ensure quality end product, and the best is that if you do not want vpckg embedded you can still do it by hand (which in my case i do not support at my job)
vtorri
2023-05-17 01:00:43
hey, is butteraugli used for XYB - RGB colorspace conversion ,
2023-05-17 01:00:44
?
2023-05-17 01:02:26
<@931493879801348106> i have written a small program than compile the dependencies of the framework i'm using. It compiles them from source
2023-05-17 01:03:13
<@931493879801348106> it can also cross-compile them on linux for windows
2023-05-17 01:04:17
i prefer that rather than vcpkg
2023-05-17 01:04:52
because i know how they are built, i can tweak the build as i want, etc...
Traneptora
vtorri hey, is butteraugli used for XYB - RGB colorspace conversion ,
2023-05-17 01:34:43
it is not
2023-05-17 01:35:23
XYB to RGB a biased cubic transfer followed by a linear transformation
2023-05-17 01:35:34
butteraugli is a metric
veluca
Traneptora XYB to RGB a biased cubic transfer followed by a linear transformation
2023-05-17 01:43:13
there's also a (simple) linear transform before that 😛
Traneptora
2023-05-17 01:43:59
ye tru ig
2023-05-17 01:44:02
kek
vtorri
2023-05-17 01:47:19
thanks
Mrtt
2023-05-17 02:03:08
<@918053334554918933> : Sounds great, in my case i have 375 packages at the end of the process, that's why i picked the vcpkg way, and i like the fact that we can still do it by hand since i use CMake to control all the configuration logic of the specific software. Lots of different options exists, but there is probably no silver bullet for all cases
vtorri
2023-05-17 02:03:49
<@931493879801348106> i have far less packages (around 85)
diskorduser
2023-05-18 05:36:19
????
2023-05-18 05:39:56
cjpegli from here https://artifacts.lucaversari.it/libjxl/libjxl/latest/jxl-linux-x86_64-static.zip
MysteriousJ
2023-05-18 06:31:38
I'm trying to statically link a windows exe with `jxl_dec-static.lib`. I built libjxl by generating visual studio build files with cmake and compiling in visual studio. The linker cannot find the implementations, e.g. ``` error LNK2019: unresolved external symbol __imp_JxlDecoderCreate referenced in function ... ``` It works fine when linking with `jxl_dec.lib`. Am I misunderstanding the intent of the static versions?
novomesk
MysteriousJ I'm trying to statically link a windows exe with `jxl_dec-static.lib`. I built libjxl by generating visual studio build files with cmake and compiling in visual studio. The linker cannot find the implementations, e.g. ``` error LNK2019: unresolved external symbol __imp_JxlDecoderCreate referenced in function ... ``` It works fine when linking with `jxl_dec.lib`. Am I misunderstanding the intent of the static versions?
2023-05-18 07:25:14
Not sure but I would try to define JXL_STATIC_DEFINE
MysteriousJ
novomesk Not sure but I would try to define JXL_STATIC_DEFINE
2023-05-19 02:31:26
Awesome, that was the missing ingredient. tyty
gb82
2023-05-19 06:48:06
Are there any plans for automatic chroma subsampling with jpegli, like mozjpeg does? I think jpegli has a lot of potential but this holds it back right now
Jyrki Alakuijala
gb82 Are there any plans for automatic chroma subsampling with jpegli, like mozjpeg does? I think jpegli has a lot of potential but this holds it back right now
2023-05-22 08:52:28
jpegli is first and foremost a library -- the user of a library decides about coding particularities -- (we are having an increased focus on yuv420 now, optimizing its quantization matrices etc.)
diskorduser ????
2023-05-22 08:53:39
would you create an issue in libjxl for this? -- is it this image https://wallhaven.cc/w/x67o8v ?
Abort VMYK Lossy 16 bit Other language Unicode characters Are the big ones, other than optimisation and documentation
2023-05-22 09:04:23
seems reasonable -- do we have libjxl issues for all of these?
username
Jyrki Alakuijala seems reasonable -- do we have libjxl issues for all of these?
2023-05-22 09:10:13
it seems like it: https://github.com/libjxl/libjxl/issues/2126 https://github.com/libjxl/libjxl/issues/1763 https://github.com/libjxl/libjxl/issues/1719 https://github.com/libjxl/libjxl/issues/1450 https://github.com/libjxl/libjxl/issues/683
jonnyawsom3
Jyrki Alakuijala seems reasonable -- do we have libjxl issues for all of these?
2023-05-22 09:38:48
I took those directly from the issues haha, so yeah
diskorduser
Jyrki Alakuijala would you create an issue in libjxl for this? -- is it this image https://wallhaven.cc/w/x67o8v ?
2023-05-22 09:58:13
Yes. That image
gb82
Jyrki Alakuijala jpegli is first and foremost a library -- the user of a library decides about coding particularities -- (we are having an increased focus on yuv420 now, optimizing its quantization matrices etc.)
2023-05-22 02:50:45
But with the cjpegli binary, it still loses to mozjpeg in either mode but isn’t prone to losing overall; switching between 420 & 444 at a particular quality level would probably do some good, no?
uis
2023-05-23 02:05:57
Does libjxl decoder support all format features now?
2023-05-23 02:09:27
In other words: is decoder part completely finished?
_wb_
2023-05-23 02:55:18
yes, it has been for a while
2023-05-23 02:55:29
up to undiscovered bugs, of course
ator
2023-05-23 07:25:07
<@532010383041363969> I've found another image (vector + text) that jpegli behaves badly on - lots of nasty color bleeding! (Tested both older versions and the libjxl git main branch commit 05966ba4).
2023-05-23 07:25:11
Original image.
2023-05-23 07:25:18
At -d1
2023-05-23 07:25:25
At -d3
2023-05-23 07:26:06
Blue background bleeds purple into the "Jules Ducatel" text. The circle/diamond shapes in the text bleed cyan/magenta onto the background.
Jyrki Alakuijala
2023-05-25 11:26:21
could you give a zoom of the worst bleeding
diskorduser Yes. That image
2023-05-25 11:27:27
this image had alpha, removing the alpha channel fixes it
gb82 But with the cjpegli binary, it still loses to mozjpeg in either mode but isn’t prone to losing overall; switching between 420 & 444 at a particular quality level would probably do some good, no?
2023-05-25 11:28:08
at lower quality or specific content it is possible that 420 is better
ator
Jyrki Alakuijala could you give a zoom of the worst bleeding
2023-05-25 12:48:43
Demiurge
2023-05-26 03:48:18
The abort() thing is an extremely serious issue and is a stopper for libjxl being used by Paint.NET
2023-05-26 03:50:01
It makes all other bugs seem like not a big deal by comparison
2023-05-26 03:51:35
Of course the most important thing for any new compression is how good the compression is, but having a usable implementation is a close second...
jonnyawsom3
2023-05-26 07:42:14
Yeah, I mentioned the top issues a while back and Jyrki did take notice, but not sure if anyone's actually assigned to it yet
_wb_
2023-05-26 08:20:58
It's one of the things we need to address before 1.0
Moritz Firsching
2023-05-26 04:35:11
https://github.com/libjxl/libjxl/issues/1450 It is not forgotten
w
2023-05-26 05:51:36
almost the anniversary
DZgas Ж
ator
2023-05-27 07:31:55
This https://discord.com/channels/794206087879852103/794206170445119489/1107298314237530132
username
2023-05-28 12:28:14
I see that there are quite a lot of pretty big changes planned for 1.0 so maybe it would be worth it to do a 0.9 release at some point in the meantime with the abort() issue solved?
sklwmp
2023-05-28 04:38:33
Happy to report that ImageMagick seems to work fine when `LD_PRELOAD`ing jpegli and converting to JPEG! (with libjpeg so version set to 8 because Arch)
2023-05-28 04:38:45
makes things much easier sometimes than using `cjpegli`
Demiurge
username I see that there are quite a lot of pretty big changes planned for 1.0 so maybe it would be worth it to do a 0.9 release at some point in the meantime with the abort() issue solved?
2023-05-29 05:03:50
I don't think it's solved in the master branch yet
username
2023-05-29 05:05:31
I know
2023-05-29 05:06:16
I was just trying to say that once it is solved it could be pushed to a 0.9 release
Demiurge
sklwmp Happy to report that ImageMagick seems to work fine when `LD_PRELOAD`ing jpegli and converting to JPEG! (with libjpeg so version set to 8 because Arch)
2023-05-29 05:11:04
that's awesome. It would be nice to install jpegli as the system libjpeg.
2023-05-29 05:12:15
I notice that there is no separate folder in the source tree for public API header files, like an "include" folder.
2023-05-29 05:12:46
That kind of makes the project look messier.
2023-05-29 05:18:21
The time is nigh for libjxl to conquer the planet
2023-05-29 05:19:33
Better JPEG-compatible compression for free is likely going to be a big factor in that.
2023-05-29 05:21:26
When you compare jpegli to other encoders it's just a no brainer. it's like night and day
ator
Demiurge When you compare jpegli to other encoders it's just a no brainer. it's like night and day
2023-05-30 02:40:05
It's truly excellent, except for some odd cases where it trips and falls down the stairs -- like weird color bleed and ghost spot issues <@226977230121598977> and I have encountered.
DZgas Ж
2023-05-30 05:41:39
<:CatBlobPolice:805388337862279198> I am sure that what is jxl now cannot release as 1.0
Demiurge
2023-05-30 09:32:22
lol. Well does it truly produce worse-looking results than mozjpeg in those cases?
2023-05-30 09:33:11
Is this when encoding to jpegxl or jpeg1?
2023-05-30 09:33:27
or both
MysteriousJ
2023-05-31 02:20:16
I want to use the libjxl decoder as a library in a C-to-web-assembly project. How can I produce wasm object files to link with? I do have it compiling and running the CI tests with emscripten.
yoochan
2023-05-31 07:00:26
you can try to follow this : https://github.com/libjxl/libjxl/blob/main/doc/building_wasm.md easier with an up to date ubuntu (or a docker)
2023-05-31 07:00:49
this page is a bit buggy though, be ready to navigate
vertexgamer
2023-06-01 11:33:00
lossless libjxl 0.8.1 with e3 gets a larger file size than the uncompressed version of the image above, am i missing something?
veluca
2023-06-01 12:28:22
not surprised with that image
2023-06-01 12:28:25
try e1 or e2
vertexgamer
veluca try e1 or e2
2023-06-01 01:28:54
2023-06-01 01:30:16
idk maybe the dithering is causing problems?
veluca
2023-06-01 01:30:44
ohhh that's an interesting testcase
2023-06-01 01:31:16
it's certainly true that jxl lossless and dithering don't play very nicely with each other
vertexgamer
2023-06-01 01:43:11
<@179701849576833024> ok i think i found the issue, the original image is using pal8 instead of rgb24. That could explain why when loaded in photoshop it showed as "scala di colori" instead of rgb.
veluca
2023-06-01 01:44:13
mhhh yeah, e1 at least doesn't paletteize non-rgba images
_wb_
veluca mhhh yeah, e1 at least doesn't paletteize non-rgba images
2023-06-01 03:38:22
hold my beer, https://github.com/libjxl/libjxl/pull/2518
2023-06-01 03:41:28
now e2 and e3 will be embarrassingly worse than e1 on that image since they don't do any palette detection at all but at least e1 doesn't care if you give it pixels as RGBA or RGB anymore
afed
2023-06-01 03:51:18
now it works for cases like this? https://canary.discord.com/channels/794206087879852103/794206087879852106/1060234070409347173
_wb_
afed now it works for cases like this? https://canary.discord.com/channels/794206087879852103/794206087879852106/1060234070409347173
2023-06-02 12:48:29
yes, and I also changed it so e2 and e3 also do some palette detection so we don't get the embarrassing behavior that e1 does better on png8 input than e2 and e3 (though e2 might still be better than e3 depending on the image)
Demiurge
2023-06-02 10:49:40
Are you trying to go for the Metal Gear Solid look with your profile image, <@794205442175402004>?