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

jxl

Anything JPEG XL related

fab
2021-04-15 07:34:11
usually 0,6 0,3 mpx/s for encoding at s9 with normal heuristic
2021-04-15 07:42:13
does C 5 is valid input
2021-04-15 07:42:34
so is different shades of RCT
2021-04-15 07:42:39
or same settings
2021-04-15 07:42:52
so the value doesn't change changing the -C
2021-04-15 07:43:02
<@!179701849576833024>
veluca
2021-04-15 07:49:55
Probably because lossy modular doesn't actually do RCTs
2021-04-15 07:50:01
I don't remember if it does
2021-04-15 07:50:08
But I wouldn't be surprised if it didn't
_wb_
2021-04-15 07:57:00
It uses XYB so RCTs are not useful
2021-04-15 07:57:26
Only when doing lossy in forced RGB will it use YCoCg, iirc
fab
2021-04-15 08:08:49
How is the QUALITY: based on butteraugli metric. Good at -d 1, use -d 2 for web distribution. d 1 is similar or the same as q 90 Vardct.
2021-04-15 08:08:59
this is not official from the manpages
2021-04-15 08:09:06
this is written by me
2021-04-15 08:09:16
but probably i will unify this
2021-04-15 08:09:24
when there is a new encoder
_wb_
2021-04-15 08:09:32
q90 = d1
fab
2021-04-15 08:10:09
so this is fixed
2021-04-15 08:10:21
great
Jyrki Alakuijala
2021-04-16 07:57:06
previously in guetzli we had d1.0 = quality 94 or so --- if today quality 90, we may have slipped a bit in quality
2021-04-16 07:57:50
what constitutes great quality also relates to the size of the pixels and it is possible that pixels are getting smaller ๐Ÿ˜›
2021-04-16 07:59:31
also can be that our mapping between quality values and butteraugli scores is less methodical or uses a different method in JPEG XL than it was in guetzli (where we likely calibrated the quality through butteraugli max score -- it is possible that a lower norm is better for this purpose and that a lower norm leads to slightly lower quality values mapping to d1.0)
2021-04-16 08:00:49
my viewpoint on quality is that people should use the -d way of defining quality, i.e., define it through the butteraugli rather than the traditional way
2021-04-16 08:01:37
-d relates to butteraugli's understanding of human vision observing compression artefacts where as -q relates to old heuristics done in an early JPEG1 implementation
2021-04-16 08:06:45
...
2021-04-16 08:07:00
I'm meeting with Chrome's Blink API owners next week
2021-04-16 08:07:53
I need to bring them data about: 1) content providers showing interest, 2) other browsers showing interest, and 3) other considerations about the unique value that JPEG XL is bringing
2021-04-16 08:08:33
if anyone here has a specific on-going effort that could help with one of these three things, I'd like to learn about it so that I could bring it up in the meeting
2021-04-16 08:08:55
this would simplify/speed up turning JPEG XL on by default in Chrome
veluca
Jyrki Alakuijala if anyone here has a specific on-going effort that could help with one of these three things, I'd like to learn about it so that I could bring it up in the meeting
2021-04-16 08:35:00
https://discord.com/channels/794206087879852103/794206087879852106/832388137224634409 <@!801963509898149908>
_wb_
Jyrki Alakuijala -d relates to butteraugli's understanding of human vision observing compression artefacts where as -q relates to old heuristics done in an early JPEG1 implementation
2021-04-16 08:45:08
Not to mention that libjpeg -quality and Photoshop 'quality' are very different (and ImageMagick and mozjpeg are somewhat different from default libjpeg too)
fab
2021-04-16 09:24:57
is it true that jxl is opened with libjxl
2021-04-16 09:25:05
so even imagemagick
2021-04-16 09:25:10
or qtjpegdll
2021-04-16 09:25:14
or kdedll
2021-04-16 09:25:19
they use libjxl
_wb_
2021-04-16 09:25:38
Yes
fab
2021-04-16 09:25:39
or they have different code
2021-04-16 09:25:56
so you need libjxl installed
_wb_
2021-04-16 09:48:24
They can also link statically
Jyrki Alakuijala
2021-04-16 09:50:37
I like this post -- it is written from a very practical viewpoint
fab
2021-04-16 09:58:19
thanks
2021-04-16 10:01:32
i wrote newerimage instead on newer image
2021-04-16 10:03:53
but those don't show in SEO
2021-04-16 10:03:55
at all
2021-04-16 10:04:08
but honestly i don't care i wrote for me
2021-04-16 01:09:06
i edited the section of software in spanish
2021-04-16 01:12:12
2021-04-16 01:12:12
2021-04-16 01:12:13
2021-04-16 01:13:20
2021-04-16 01:13:36
squoosh line is too long
2021-04-16 01:13:42
maybe i need to edit
2021-04-16 01:13:49
i don't know i can't format text
2021-04-16 01:14:07
neither i can edit web pages
2021-04-16 01:15:27
in italian they removed the software section due to a possible spam
Petr
fab in italian they removed the software section due to a possible spam
2021-04-16 01:29:36
Strange. At least something should be in that section.
Deleted User
Petr Strange. At least something should be in that section.
2021-04-16 01:36:19
By the way: there's a tiny problem with that section, but in English version. https://en.wikipedia.org/w/index.php?title=JPEG_XL&diff=next&oldid=1017219501
2021-04-16 01:37:05
Someone removed my edit, but I think it should be there due to https://en.wikipedia.org/wiki/MOS:DATED...
fab
2021-04-16 02:01:25
right it was useless
2021-04-16 02:01:36
what the person did is right
2021-04-16 02:01:55
anyway to disable most thing in jpeg xl do
2021-04-16 02:01:56
-s 6 -faster decoding=5 --epf=0 noise=o dots=o gaborish=0 --intensity_target=200 -q 78.5
2021-04-16 02:06:17
for %i in (C:\Users\User\Documents\dd\*.png) do cjxl4 "%i" "%i.jxl" -s 6 --faster_decoding=5 --epf=0 --noise=0 --dots=0 --gaborish=0 --intensity_target=200 -q 78.5 --num_threads=2
2021-04-16 02:09:58
maybe i like more the jpeg look it gives this setting
2021-04-16 02:10:06
2021-04-16 02:10:13
2021-04-16 02:10:17
it's the smaller file
2021-04-16 02:10:25
the bigger file is
2021-04-16 02:10:26
for %i in (C:\Users\User\Documents\dd2\*.png) do cjxl4 "%i" "%i.jxl" -s 6 -d 2.035 --num_threads=2
-=MO=-
2021-04-17 05:39:04
Where potato user can take windows binaries for encode png's to jxl format? Mm?
Scope
2021-04-17 05:44:46
<#822120855449894942>
fab
2021-04-17 07:55:58
can modular support intensity target?
_wb_
2021-04-17 08:01:02
It won't make any difference for compression, but it should make a difference for how it is signalled/displayed on hdr screens
fab
2021-04-17 08:02:13
yes but to me makes a difference
2021-04-17 08:02:23
for %i in (C:\Users\User\Documents\jxl*.png) do cjxl4 "%i" "%i.jxl" -q 86.5 -s 6 -g 3 --intensity_target=1024 -P 6 -m --num_threads=2
2021-04-17 08:02:28
makes better lossy screenshots
2021-04-17 08:02:52
-s 4 -g 3 -intensity=180 -P 6 -C 3 -I 0.779 -m -q 93
2021-04-17 08:03:05
maybe it can achieve an avif effect
2021-04-17 08:03:33
but better avoid an avif effect and use like image editor default
2021-04-17 08:04:44
but if the encoder crashes with multiplier of 0 how we can know if those settings are good
_wb_
2021-04-17 09:44:49
Not sure why it crashes
spider-mario
fab makes better lossy screenshots
2021-04-17 09:52:16
and much brighter, too
fab
2021-04-17 10:21:21
i don't know i don't have an android hdr phone
2021-04-17 10:21:47
i have a phone from 2013
raysar
2021-04-17 10:22:50
Hello, is there in jxl metadata all encode param? like video file with the full encoder option? xnviewmp see noting.
Crixis
2021-04-17 11:55:31
I don't think cjxl store encode parameters
_wb_
2021-04-17 12:15:32
Only what is needed to decode it
2021-04-17 12:16:34
Nothing stops you though from adding a metadata box with the encode params you used
raysar
2021-04-17 02:38:25
So imageviewer can't say me easyly if the picture is progressive,lossless jpeg,modular, original bit depth etc?
2021-04-17 02:39:45
but it can ask to the decoder par of this information?
Scientia
2021-04-17 03:07:48
i think all of those except original bit depth should be ascertainable from the image without any metadata
_wb_
2021-04-17 03:37:31
What jxl_info can tell you are things that can be found out by parsing the codestream header
fab
2021-04-17 04:53:10
jpeg xl can look good even at q 58.91 -s 6
2021-04-17 04:53:33
but i hope they do not make a neutral quality
2021-04-17 04:56:05
-q 66.7 -s 8 to me is great quality
2021-04-17 04:57:44
file: https://discord.com/channels/794206087879852103/806898911091753051/833006333192044544
2021-04-17 05:16:28
for %i in (C:\Users\User\Documents\F*.jpg) do cjxl "%i" "%i.jxl" -j -P 5 --palette=0 -I 5 -s 3 -m --mquality=75 --num_threads=2
2021-04-17 05:16:51
when i used simpler settings
2021-04-17 05:25:34
use -m -q 75.58 -P 9 -s 9 on this image you have with 0.3.4
2021-04-17 05:25:47
this a more recent one i used
raysar
2021-04-17 05:59:37
<@416586441058025472> We don't understand what you say in this chan. Make good sentences with deepl.com if you need to translate. Are you testing random settings? That's very strange :D
Pieter
2021-04-17 06:02:38
I have no idea what <@!416586441058025472> is trying to say most of the time either here.
fab
2021-04-17 06:20:24
how to denoise image jxl. make look bad https://discord.com/channels/794206087879852103/794206170445119489/832329750998679552
Pieter
2021-04-17 06:22:51
You want to remove the noise in a jxl image? At encode time, or after? What are you trying to make look bad? Which image?
fab
2021-04-17 06:23:06
they were 7 test images
Pieter
2021-04-17 06:23:40
Most of all, what does this have to with JPEG-XL?
fab
2021-04-17 06:23:58
nothing they are only notes
Pieter
2021-04-17 06:24:22
I have no clue what you're trying to say.
fab
2021-04-17 06:24:49
the url is called how-is-the-codec-jxl/
2021-04-17 06:25:08
sorry for being confusing but maybe i need better web skills
Pieter
2021-04-17 06:25:15
What are you trying to do?
fab
2021-04-17 06:25:54
see the various modular settings
Pieter
2021-04-17 06:26:56
I'm very sorry, but I think I'm missing the big picture. You post a bunch of commands, and then say things about denoising. I don't know how they're related, what you're trying to achieve, or what you hope to accomplish by mentioning it here.
fab
2021-04-17 06:27:08
it's a denoising look not true denoising it's bad
Pieter
2021-04-17 06:29:57
I don't know what you're trying to make me look at.
fab
2021-04-17 06:30:34
nothing random command like i did q 75 and -d 2.19 and imageglass jxl
Pieter
2021-04-17 06:31:12
What is your question?
fab
2021-04-17 06:31:15
i'm deleting some other messages, there is some spam up
2021-04-17 06:32:32
like what you're talking talked (now i deleted) about what i deleted on my site that was confusing.
2021-04-17 06:32:50
not related with jpeg xl sorry if it confused you
Pieter
2021-04-17 06:33:17
Ok, this is about your website?
fab
2021-04-17 06:33:32
yes confusing posts i made yesterday morning
2021-04-17 06:34:04
somehow i put in the <#794206170445119489>
Scientia
2021-04-17 06:46:00
Honestly I'd just use `-s 9 -d x.xx` (where x.xx is either 0.00 or a nonzero number that is needed for a lossy image)
_wb_
2021-04-17 07:16:48
Or just default speed -d x.x
Scientia
2021-04-17 07:33:17
Does speed 9 really have that much of a penalty?
2021-04-17 07:33:36
I personally can wait a little extra to encode as long as decode is pretty similar
Crixis
Scientia I personally can wait a little extra to encode as long as decode is pretty similar
2021-04-17 08:01:48
Modular s9 is better, standard vardct s7 is more safe and tested then s9
raysar
2021-04-17 08:02:33
Visually -s7 and -s9 in lossy dct have the same look. -s9 is very usefull for lossless.
Scientia
2021-04-17 08:06:31
size wise are s7 and s9 the same in dct?
2021-04-17 08:06:37
or is s9 smaller?
BlueSwordM
2021-04-17 08:06:53
S9 is particularly useful for photographic images.
2021-04-17 08:07:29
The psycho-visual boost you get is quite nice with S9, and it is not easily noticed at 1st glance.
fab
2021-04-17 08:19:16
what about
2021-04-17 08:19:17
--faster_decoding=2 --gaborish=1 --epf=2 --noise=1 -s 7 -q 89.26
2021-04-17 08:20:37
we will see when new version will come out
BlueSwordM The psycho-visual boost you get is quite nice with S9, and it is not easily noticed at 1st glance.
2021-04-17 08:21:22
it improve dssim dssim at s 9 q 99.2 with 50ยฐ commit is near perfect
raysar
BlueSwordM The psycho-visual boost you get is quite nice with S9, and it is not easily noticed at 1st glance.
2021-04-17 08:21:32
I thought so, but on my comparison, it's really imperceptible even at 400% zoom, i'm working to create a custom webpage with different encoder params on different image type. Dev seem to say the same thing.
_wb_
2021-04-17 08:28:57
As it often goes, for lossy, slower speed setting is mostly guaranteed to be slower ๐Ÿ˜…
BlueSwordM
raysar I thought so, but on my comparison, it's really imperceptible even at 400% zoom, i'm working to create a custom webpage with different encoder params on different image type. Dev seem to say the same thing.
2021-04-17 08:57:56
What you need is something with lots of random detail and lots of color and low-mid bpp.
2021-04-17 08:58:05
That's where you'll see the biggest differences.
raysar
BlueSwordM That's where you'll see the biggest differences.
2021-04-17 09:01:37
ok ๐Ÿ™‚
_wb_ What jxl_info can tell you are things that can be found out by parsing the codestream header
2021-04-17 09:11:01
i'm testing jxlinfo on different jxl. There is no line to say if it's a dct or modular file? I expect to have: dct, jpeg-lossless, modular, (maybe possible to detect: modular-lossy, and dct-lossless.) <:BlobYay:806132268186861619>
Deleted User
Pieter I have no idea what <@!416586441058025472> is trying to say most of the time either here.
2021-04-17 10:16:00
It seems he doesn't know either. ๐Ÿ˜œ
2021-04-18 02:08:41
Does chroma from luma prediction work in Modular? If yes, then in lossless, lossy or both?
_wb_
2021-04-18 04:52:31
Chroma from luma with signaled weights per 64x64 pixels is a VarDCT thing (the weights are multipliers for the Y DCT coeffs, which after multiplication get subtracted from/added to X and B DCT coeffs)
2021-04-18 04:55:31
There is also the generic notion of channel decorrelation by means of color transforms, and for that there are RCTs (reversible color transforms) in Modular mode. An RCT can be applied image-wide but also per group, so you could see it as a form of low-res simple chroma from luma with signalled transform per 256x255 pixels (or 128x128 with -g 0)
eddie.zato
2021-04-18 05:22:41
So '-d' only works for VarDCT, for Modular should use '-q' or '-Q', right?
monad
2021-04-18 05:25:37
~~-d for modular, -Q for VarDCT, -q will map to either~~
eddie.zato
2021-04-18 05:25:53
When I try, -m ignores the -d value and works lossless.
monad
2021-04-18 05:26:27
oh, lossy modular maybe is different
2021-04-18 05:27:36
wait, no, brainfart
2021-04-18 05:27:49
obviously values other than 0 for distance are lossy
2021-04-18 05:33:12
Yeah, looks like you're right.
eddie.zato
2021-04-18 05:35:18
Is this a bug or it should be that way?
monad
2021-04-18 05:37:20
It's intended, see this discussion. I was just confused, apologies. https://discord.com/channels/794206087879852103/803645746661425173/831228523871993875
eddie.zato
2021-04-18 05:38:13
Oh, ok, thanks ๐Ÿ˜„
monad
2021-04-18 05:42:42
I'm mainly interested in lossless and just use -d 0 all the time.
fab
2021-04-18 08:57:22
ok i updated the settings and deleted messages here
2021-04-18 08:57:37
the benchmarks i did
2021-04-18 08:58:35
also i wrote the bugs and the commands that crashes here
2021-04-18 08:58:41
in BUGS section
diskorduser
fab in BUGS section
2021-04-18 11:29:55
Why don't you file bugs on gitlab issues?
fab
2021-04-18 11:49:52
because they aren't actual bugs but resolution that didn't work
2021-04-18 11:50:06
with some specific command not supported by the encoder
2021-04-18 11:50:19
or supported but not by the current
2021-04-18 11:50:41
and also they were deleted
2021-04-18 11:50:52
from <#803645746661425173> to avoid spam
sklwmp
2021-04-18 01:10:10
I want to confirm something. When I transcode a JPG to JXL via `cjxl`: 1. The resulting .jxl file contains the DCT data of the original JPG file, but in a more efficient format. (a.k.a. filesize savings) 2. When I decode using `djxl` to a .jpg file, it should be exactly the same image as the original JPG. 3. When I decode using `djxl` to pixels (such as to .png), the resulting file is not the original JPG file, but rather, a JPG with **improved quality** i.e. a different image altogether. I'm putting special emphasis on the 3rd point, because I only remember that information being mentioned in passing in an article somewhere. I may have forgotten where :> Either way, I'm asking this because I got really confused as to why ImageMagick was saying that my losslessly transcoded JPG files were different from the original JPG file. I tried decoding with djxl to a .png file, and ImageMagick said the images were different. But then, when I tried decoding to a .jpg file, the images were now exactly the same. It took me a few minutes to recall that JPEG XL can "improve" the quality of transcoded JPGs.
2021-04-18 01:11:52
If this is true, should we be saying that somewhere in the output of `djxl`? Because I assume that most people, when they hear that their JPG is being losslessly transcoded into a JXL file, they think that when they decode it back, the image will be exactly the same, no matter if it was decoded back into a JPG or PNG. At least, I expected that. As in, should we note that the decoded image when ***not*** reconstructing a `.jpg` file will be different than the original JPG file? And how exactly do we handle cases such as the image comparisons I mentioned above? When I compare a JPG file to a JXL file that's a transcoded JPG file, I expect the output to be the same, but they aren't.
2021-04-18 01:14:04
I apologize if I couldn't explain my situation properly or briefly enough.
sklwmp If this is true, should we be saying that somewhere in the output of `djxl`? Because I assume that most people, when they hear that their JPG is being losslessly transcoded into a JXL file, they think that when they decode it back, the image will be exactly the same, no matter if it was decoded back into a JPG or PNG. At least, I expected that. As in, should we note that the decoded image when ***not*** reconstructing a `.jpg` file will be different than the original JPG file? And how exactly do we handle cases such as the image comparisons I mentioned above? When I compare a JPG file to a JXL file that's a transcoded JPG file, I expect the output to be the same, but they aren't.
2021-04-18 01:17:42
*Or we can maybe place that in the README somewhere? I don't really know. Sorry for sending so many messages. I tend to have a problem with saying too much.
_wb_
2021-04-18 01:53:13
The main thing to note is that the old JPEG format is somewhat underspecified, in the sense that there is some degree of freedom in how you decode it.
2021-04-18 01:53:57
Two different jpeg decoders can produce different pixel values for the same input jpeg and still both be conforming decoders.
2021-04-18 01:55:38
Probably the jxl decode pipeline is a bit more precise and smarter about dequantization than most jpeg decode pipelines.
2021-04-18 01:57:14
Note that (vardct) jxl will also be somewhat underspecified (not as much as JPEG, but still a bit), and there will be slight pixel value differences e.g. between optimized and unoptimized decode paths, between ARM and x86, and even between different C compilers.
diskorduser
2021-04-18 02:28:55
Does it mean I get different colors on phone and laptop on vardct jxls? ๐Ÿค”
spider-mario
2021-04-18 02:36:07
depends on what you call โ€œdifferent colorsโ€ but it should not happen to a notable extent
2021-04-18 02:36:26
the colors are still defined in absolute terms
2021-04-18 02:37:41
now, how different systems manage to display absolute colors the way they should be is a different matter but itโ€™s outside of jxlโ€™s control and not specific to it
2021-04-18 02:38:17
no format is exempt from the latter problem
sklwmp
_wb_ Note that (vardct) jxl will also be somewhat underspecified (not as much as JPEG, but still a bit), and there will be slight pixel value differences e.g. between optimized and unoptimized decode paths, between ARM and x86, and even between different C compilers.
2021-04-18 02:41:25
Thanks for clearing that up. On another note, though, this variability in decoding is really only okay because VarDCT is used for lossy, right? Ideally, I think, the same input should be standardized to have the same output, but for lossy I guess the tradeoff is fine?
_wb_
2021-04-18 02:56:22
Modular does everything in integer arithmetic and its decoded output is defined exactly (also in lossy modular)
2021-04-18 02:56:55
Well except if you use XYB, then there might still be some rounding differences
2021-04-18 03:00:24
VarDCT does the DCT and other things that are best implemented using floating or fixed point arithmetic, which leads to different rounding errors depending on how exactly you implement it (making trade-offs between precision and decode speed)
Pieter
sklwmp I want to confirm something. When I transcode a JPG to JXL via `cjxl`: 1. The resulting .jxl file contains the DCT data of the original JPG file, but in a more efficient format. (a.k.a. filesize savings) 2. When I decode using `djxl` to a .jpg file, it should be exactly the same image as the original JPG. 3. When I decode using `djxl` to pixels (such as to .png), the resulting file is not the original JPG file, but rather, a JPG with **improved quality** i.e. a different image altogether. I'm putting special emphasis on the 3rd point, because I only remember that information being mentioned in passing in an article somewhere. I may have forgotten where :> Either way, I'm asking this because I got really confused as to why ImageMagick was saying that my losslessly transcoded JPG files were different from the original JPG file. I tried decoding with djxl to a .png file, and ImageMagick said the images were different. But then, when I tried decoding to a .jpg file, the images were now exactly the same. It took me a few minutes to recall that JPEG XL can "improve" the quality of transcoded JPGs.
2021-04-18 03:57:39
When you decode a losslessly-recompressed-jpeg-to-jxl to pixels you get an image whose pixels are identical to those of the jpeg you'd get when decoding to jpeg; no quality difference. It may be even lower quality if you decode to pixels to jpeg, because there is another lossy compression step.
_wb_
2021-04-18 04:05:47
Yes but there are different jpeg decoders and they don't all do exactly the same thing
Pieter
2021-04-18 04:08:08
Sure, I just wanted to comment on <@!557099078337560596> thinking that decoding to pixels would give you better quality. At best, it's the same quality.
_wb_
2021-04-18 04:09:12
It could be slightly better than what you get with default libjpeg-turbo though
Pieter
2021-04-18 04:09:59
How so? Decoding to pixels and reconverting to jpeg can only add additional noise. It can't add data that isn't there.
_wb_
2021-04-18 04:10:00
I think we do the dequant in a better way, and the DCT and color transforms more precisely
2021-04-18 04:11:24
I mean comparing the result of `djxl recompressed-jpeg.jxl out1.png` with the result of `djxl recompressed-jpeg.jxl tmp.jpg; djpeg tmp.jpg > out2.ppm`
Pieter
2021-04-18 04:11:46
yes
2021-04-18 04:12:09
there is signal and noise in the original jpeg
_wb_
2021-04-18 04:12:14
Of course then doing another lossy jpeg encode can only add loss, and probably will
Pieter
2021-04-18 04:12:16
that same signal and noise is in the recompressed one
2021-04-18 04:12:31
decoding to jpeg will also have that exact same signal and noise
2021-04-18 04:13:20
decoding to png can at best have the same (but due to quantization differences in the dct->png conversion have additional noise? unsure about this) - reconverting to jpeg can only add noise
_wb_
2021-04-18 04:14:15
Correct, best to always avoid recompression
2021-04-18 04:15:10
Generation loss can be quite heavy if the quant tables of first and second jpeg don't match
2021-04-18 04:16:43
https://cloudinary.com/blog/why_jpeg_is_like_a_photocopier
BlueSwordM
_wb_ https://cloudinary.com/blog/why_jpeg_is_like_a_photocopier
2021-04-18 04:28:33
Does mozjpeg do any chroma subsampling?
Deleted User
_wb_ Generation loss can be quite heavy if the quant tables of first and second jpeg don't match
2021-04-18 04:32:20
<@!826537092669767691> how hard would be writing a program that guesses the original JPEG quantisation tables?
Kornel
2021-04-18 04:32:23
what do you mean original? getting qtable from pixels?
Deleted User
2021-04-18 04:34:04
Let's say you've got a decoded PNG/PPM file and the only thing you know about it is that it was compressed once with JPEG. We have to guess the quantisation tables having only pixel values that resulted from it.
Kornel
2021-04-18 04:36:43
it's possible-ish
2021-04-18 04:36:58
apply float DCT to the image
2021-04-18 04:37:07
and then make a histogram for each coefficient, across the whole image
2021-04-18 04:37:22
the histogram won't be very clear, because YUV/RGB and clipping makes a mess
2021-04-18 04:38:27
but you should see higher peaks in the histogram that are close to the original quantized values
Deleted User
2021-04-18 04:51:50
Would the list of most popular quantisation tables (this one was taken from Squoosh) make the task easier?
_wb_
Kornel but you should see higher peaks in the histogram that are close to the original quantized values
2021-04-18 05:13:06
Yes, I made something like that for Cloudinary, it kind of works but it's not perfect. Good enough to see if it was a jpeg before or not, and to guess if it was a high quality one or a low quality one, but not good enough to get precise quant tables. Haven't really tried hard yet though, can probably do more if you first estimate chroma subsampling.
Kornel
Would the list of most popular quantisation tables (this one was taken from Squoosh) make the task easier?
2021-04-18 05:14:45
I think so. Once you get the histogram, you can brute force through all quant tables at all qualities, and see which fits the histogram best.
fab
2021-04-18 05:29:29
2021-04-18 05:29:59
this could crash
2021-04-18 05:30:01
-s 4 -g 3 -intensity=180 -P 6 -C 2 -I 0.779 -m -q 93
2021-04-18 05:30:06
is too complicated
2021-04-18 05:30:16
also is not called intensity
_wb_ https://cloudinary.com/blog/why_jpeg_is_like_a_photocopier
2021-04-18 05:30:54
interesting article
Deleted User
2021-04-18 06:07:30
Hi everyone, is someone here monitoring the libVips JPEG XL integration effort?
improver
2021-04-18 06:13:52
i guess? stuff was written about it in <#804324493420920833> a bit
Deleted User
2021-04-18 06:17:41
I'm just asking if I should file issues over at GitLab if I find problems that are (almost) certainly coming from libjxl or if this would be confusing since some team member is already watching...
improver
2021-04-18 06:34:38
filling issues on gitlab would probably be better, since it's easier to track them there
2021-04-18 06:35:24
sometimes stuff gets told in chat and forgotten...
Deleted User
2021-04-18 06:35:55
Ok, thanks
improver
2021-04-18 06:39:36
i mean for usage questions chat is probably preferred because of possibly lower latency, but once it's clear that there's an issue in the library, gitlab issue should be opened for that
2021-04-18 06:39:59
but that's just my opinion, i'm not core dev
Deleted User
2021-04-18 06:43:28
Ok, I'll try here first:
2021-04-18 06:44:25
Are there known issues in limited memory environments (Docker)?
improver
2021-04-18 06:45:20
something like https://gitlab.com/wg1/jpeg-xl/-/issues/99 ?
Deleted User
2021-04-18 06:48:40
``` bash-5.1# free -m total used free shared buff/cache available Mem: 3936 166 3342 107 428 3460 Swap: 1023 513 510 ``` ``` bash-5.1# cjxl front.png front-s8.jxl -s 8 J P E G \/ | /\ |_ e n c o d e r [v0.3.7 | SIMD supported: AVX2,SSE4,Scalar] Read 4946x6933 image, 16.4 MP/s Encoding [VarDCT, d1.000, kitten], 1 threads. Killed ```
2021-04-18 06:49:43
Well, or like https://gitlab.com/wg1/jpeg-xl/-/issues/192
2021-04-18 06:50:23
The first problem seem to be that it isn't handled gracefully...
_wb_
2021-04-18 08:06:54
An error message when failing to allocate memory would be nice, yes
sivertba
2021-04-18 08:42:02
Good people. Couple of challenging questions for you perhaps! Does the jxl format have any multi component support like jpeg2000, and how to beat fake it! And is there any document that describes encoding speed for more complex architectures? I just want to make an argument for jxl in space
_wb_
2021-04-18 08:52:51
It supports up to 4099 channels/components (3 for visual/RGB, 4096 "extra channels")
2021-04-18 08:53:17
What do you mean with "more complex architectures"?
sivertba
_wb_ What do you mean with "more complex architectures"?
2021-04-19 06:13:44
Poor posed question, but how many MP/s can be achieved with something like jetson tx2. Or is this still far off the goal of jpeg xl in terms of target hardware?
_wb_
2021-04-19 06:37:14
jetson tx2 is dual-core NVIDIA Denver2 + quad-core ARM Cortex-A57. any guess of what kind of encode speeds we get there, <@!179701849576833024> ?
veluca
2021-04-19 06:38:16
I have absolutely no idea what a denver2 is like ๐Ÿ˜„ if it's reasonably close to a A72, I think you should be able to get ~2 mp/s on it
raysar
_wb_ Yes, I made something like that for Cloudinary, it kind of works but it's not perfect. Good enough to see if it was a jpeg before or not, and to guess if it was a high quality one or a low quality one, but not good enough to get precise quant tables. Haven't really tried hard yet though, can probably do more if you first estimate chroma subsampling.
2021-04-19 06:42:39
So you are saying to us than social media and other BIG website have technical solution to estimate original jpeg and NOT re encode some jpeg because they see if it's a high jpeg compression and it's USELESS to re-encode it?
_wb_
veluca I have absolutely no idea what a denver2 is like ๐Ÿ˜„ if it's reasonably close to a A72, I think you should be able to get ~2 mp/s on it
2021-04-19 06:44:15
what encode speed setting are you talking about? s3 fd4 will be faster than s9 fd0 ๐Ÿ™‚
veluca
2021-04-19 06:44:30
s3 fd0 IIRC
2021-04-19 06:44:54
give me a couple of minutes and I'll give some up-to-date numbers on my Samsung A51
_wb_
raysar So you are saying to us than social media and other BIG website have technical solution to estimate original jpeg and NOT re encode some jpeg because they see if it's a high jpeg compression and it's USELESS to re-encode it?
2021-04-19 06:45:32
If it's a JPEG, you can just see what the quantization table is and avoid re-encoding because, you know, it's a JPEG already. If it's not a JPEG, then you cannot avoid re-encoding because you don't have the JPEG ๐Ÿ™‚
diskorduser
veluca give me a couple of minutes and I'll give some up-to-date numbers on my Samsung A51
2021-04-19 06:45:41
How do you estimate that? My phone has A76
veluca
2021-04-19 06:46:16
I just run it ๐Ÿ˜›
_wb_
diskorduser How do you estimate that? My phone has A76
2021-04-19 06:46:32
you can just compile cjxl/djxl in Termux and run it
diskorduser
veluca I just run it ๐Ÿ˜›
2021-04-19 06:46:36
Cross compiled using Android ndk?
_wb_
2021-04-19 06:46:58
no need to cross compile, just Termux and compile natively
diskorduser
2021-04-19 06:47:07
Oh easy.
veluca
2021-04-19 06:48:35
although cross compiling can be quite a bit faster
2021-04-19 06:49:00
(depends on your mobile cpu and x86 cpu ๐Ÿ˜› my personal phone compiles faster than my work laptop, say...)
_wb_ what encode speed setting are you talking about? s3 fd4 will be faster than s9 fd0 ๐Ÿ™‚
2021-04-19 06:52:50
single core s6 fd0 1.8 MP/s, s6 fd4 2.5 MP/s, all cores 5.43 and 6.61 resp
_wb_
2021-04-19 07:02:36
nice
2021-04-19 07:03:20
s6 fd0 is pretty close to default encoding, which is good
diskorduser
2021-04-19 07:11:37
I just want Google camera jxl encoding asap ๐Ÿค“
2021-04-19 07:12:08
Also Google photos jxl support
BlueSwordM
diskorduser How do you estimate that? My phone has A76
2021-04-19 07:14:33
About 1,8-2x faster on A76 vs A73.
veluca
2021-04-19 07:16:51
not surprising...
diskorduser
2021-04-19 07:21:32
Is the speed enough for shooting 16mp photos?
2021-04-19 07:22:22
64mp jpeg mode takes at least one or two second to save on my phone .
Orum
2021-04-19 07:22:45
depends on too many factors
2021-04-19 07:23:03
but it *should* be able to replace jpeg
2021-04-19 07:23:40
Has anyone attempted (or even hinted at) a non-reference jxl encoder/library? I know it's early but I'm a bit curious...
diskorduser
2021-04-19 07:36:02
Is this possible. Take jxl photo from native camera app at fast speeds and then compress them later (with slower speeds) on desktop or laptop without affecting the image quality?
veluca
Orum Has anyone attempted (or even hinted at) a non-reference jxl encoder/library? I know it's early but I'm a bit curious...
2021-04-19 07:37:33
not as far as I know - any specific reason why you would want it?
diskorduser Is this possible. Take jxl photo from native camera app at fast speeds and then compress them later (with slower speeds) on desktop or laptop without affecting the image quality?
2021-04-19 07:37:56
in theory yes, but I don't know if it's a good idea
Orum
2021-04-19 07:38:46
Just to compare, really. The reference libraries aren't always known for their speed or compression efficiency.
veluca
2021-04-19 07:40:42
I'd be surprised if a significantly faster/more efficient implementation is (easily) possible - we put quite a lot of work in that ๐Ÿ™‚
Orum
2021-04-19 07:41:41
Well, that's refreshing to hear <:BlobYay:806132268186861619>
fab
2021-04-19 07:42:26
-s 8 -q 87.76 -P 4 -X 39 -Y 30 -m -q 69.6 --intensity_target=310 --dots=0 --epf=1
2021-04-19 07:42:36
what is bad about it?
2021-04-19 07:42:46
should i always use the default
Orum
2021-04-19 07:42:58
use `-d` not `-q`
fab
2021-04-19 07:42:59
even if the compression don't satisfy me
diskorduser
2021-04-19 07:44:07
With some phones coming with over 108mp, Idk whether these speeds are enough to save them without taking too much time.
veluca
2021-04-19 07:45:08
you *can* do quite faster encoding ๐Ÿ™‚
Orum
2021-04-19 07:46:04
Odds are a device made for taking pictures will have some form of HW encoder.
diskorduser
Orum Odds are a device made for taking pictures will have some form of HW encoder.
2021-04-19 07:49:32
Hw encoder for images? I don't think so
Orum
2021-04-19 07:50:08
Sure, digital cameras have them.
2021-04-19 07:50:56
whether or not they'll support JPEG XL depends a lot on adoption
diskorduser
2021-04-19 07:52:30
It would be nice to have jxl hw encoder with s7 speeds on phones and cameras.
2021-04-19 07:53:23
With 16bit support ๐Ÿ˜
veluca
2021-04-19 07:54:36
(we actually use floats typically :P)
2021-04-19 07:54:55
I do wonder what an FPGA-based encoder could do, sometimes
Jyrki Alakuijala
veluca I do wonder what an FPGA-based encoder could do, sometimes
2021-04-19 08:03:54
cost per unit, performance, density, and energy efficiency are better with asics than fpga
Orum
2021-04-19 08:03:54
I've got one, but the tooling is hell
Jyrki Alakuijala cost per unit, performance, density, and energy efficiency are better with asics than fpga
2021-04-19 08:05:05
sure but FPGAs are much more flexible, and update-able with software
veluca
2021-04-19 08:06:38
In particular, I can make a FPGA encoder (in theory), but not an ASIC encoder ๐Ÿ˜›
Jyrki Alakuijala
2021-04-19 08:08:35
FPGAs allow shipping early because the system doesn't need to be as bug free
2021-04-19 08:08:56
we can make ASICs if we need
2021-04-19 08:09:52
I believe our TPUs are -- for example -- ASICs
2021-04-19 08:10:27
the transistors are getting so cheap that people are really creative on what can be put into hardware -- and even compression algorithms are becoming a topic
2021-04-19 08:11:09
for example Microsoft's Zipline is an exploration step in this direction
veluca
2021-04-19 08:12:15
sure, but it's a lot easier to make an algorithm for FPGA to try it out ๐Ÿ˜›
fab
2021-04-19 08:15:29
random settings part 2
2021-04-19 08:15:30
-S 6 -I 0.427 -g 2 -Y 70.72 -X 41.25 -q 81.1 -s 8
2021-04-19 08:15:38
ok i will stop
2021-04-19 08:24:14
for %i in (C:\Users\User\Documents\orb\*.png) do cjxl4 "%i" "%i.jxl" -s 6 -q 87.76 -I 0.427 -g 2 -Y 70.72 -X 41.25 -m --num_threads=2 for %i in (C:\Users\User\Documents\orb2\*.png) do cjxl4 "%i" "%i.jxl" -q 81.1 -s 8 --num_threads=2
2021-04-19 08:24:38
the command works in 0.3.7
2021-04-19 08:24:55
alternatively you could use only -q 87.76 modular
2021-04-19 08:25:05
and s 6
2021-04-19 08:25:12
or s7
2021-04-19 08:29:10
it encodes but decoder don't read it
diskorduser
fab random settings part 2
2021-04-19 08:40:54
How about writing every random settings on a Excel sheet? And posting it's link here
fab
2021-04-19 08:44:16
but the -I with three 0.xxx don't work
2021-04-19 08:44:24
intensity target with modular i think not
2021-04-19 08:44:44
the thing that makes me nervous when i create a file and the decoder don't open
2021-04-19 08:44:51
but i shouldn't be agitated
2021-04-19 08:44:55
this is expected
2021-04-19 08:45:24
but we don't know if is encoder fault that creates -i 0.xxx files that are unreadable
2021-04-19 08:45:26
or is djxl
Some1NamedNate
2021-04-19 10:36:31
Just out of curiosity, does JPEG XL make a good replacement format for screenshots? Sure, transcoding a PNG screenshot to JXL is fine, but does screenshoting *to* JXL sound okay?
Orum
2021-04-19 10:38:06
why not?
Some1NamedNate
2021-04-19 10:40:33
Understand that adoption in future devices and OS's as well as online services and websites needs to come to fruition once JXL's ISO standards are finalized
Orum
2021-04-19 10:41:20
Sure, but I see no reason not to offer JXL as an option when screenshotting.
Nova Aurora
2021-04-19 11:12:55
JXL lossless should be a drop-in replacement as afar as I'm concerned
Some1NamedNate
2021-04-20 12:22:31
Who wins? JXL lossless or PNG?
BlueSwordM
Some1NamedNate Who wins? JXL lossless or PNG?
2021-04-20 12:22:47
JXL lossless.
Scientia
2021-04-20 12:29:49
by a significant margin right?
2021-04-20 12:30:12
I haven't compared directly
2021-04-20 12:30:20
but something like 30% right?
BlueSwordM
Scientia but something like 30% right?
2021-04-20 12:34:07
For non photographic images, that is a good estimate.
2021-04-20 12:34:25
For photographic types of images, 50% is not too uncommon.
Scientia
2021-04-20 12:35:56
have you compared a zopflinated png?
2021-04-20 12:36:15
i can usually get 20-30% losslessly with zopfli out of png
2021-04-20 12:37:03
the only issue is it's zopfli so it takes about 30 minutes for a 4k image <:YEP:808828808127971399>
BlueSwordM
2021-04-20 12:41:18
Yes, I've compared with ECT.
Orum
2021-04-20 02:48:46
JXL vs PNG isn't really much of a contest. JXL vs WebP is much more interesting.
Scope
2021-04-20 03:38:59
<https://docs.google.com/spreadsheets/d/1ju4q1WkaXT7WoxZINmQpf4ElgMD2VMlqeDN2DuZ6yJ8/>
2021-04-20 03:40:04
And this is a comparison with very optimized PNGs
Scientia
2021-04-20 03:57:03
So red is larger than jxl right?
Scope
2021-04-20 03:59:26
Yep Below there are tabs with file sizes and also a comparison of the best PNG optimizers (there the colors are reversed, red is the smaller size for visual convenience)
Lastrosade
2021-04-20 03:59:58
I think this is the first time I see EMMA doing anything good
2021-04-20 04:02:13
Wait that has to be a bug
2021-04-20 04:02:32
EMMA is doing pretty bad on every tests
Scientia
2021-04-20 04:03:35
What is EMMA? I can't find anything about that codec on the web?
Lastrosade
2021-04-20 04:03:52
Scope
2021-04-20 04:03:52
What are the comparisons and which EMMA (there are several versions with the same compressor name)?
Lastrosade
2021-04-20 04:04:33
Like on pretty much any tab you'll find BMF and EMMA on the far right
2021-04-20 04:04:51
unless I can't read a table
Scope
2021-04-20 04:04:53
No, it's only reverse colors, green is more effective
Lastrosade
2021-04-20 04:04:56
which is possible
2021-04-20 04:05:15
uhhh
2021-04-20 04:05:44
EMMA everywhere, red = bad ?
2021-04-20 04:05:57
EMMA on the details page, green = good ?
Scientia What is EMMA? I can't find anything about that codec on the web?
2021-04-20 04:06:52
https://encode.su/threads/2459-EMMA-Context-Mixing-Compressor
Scientia
2021-04-20 04:08:11
Ohh
2021-04-20 04:08:55
I assume with context mixing this is veeerrry slow?
Scope
2021-04-20 04:11:58
In the general table, I changed the colors since it was already created by Jon Sneyers and clearer as a comparison of all formats (but in separate tabs I compared with Jpeg XL all other encoders and red is a negative efficiency) Btw this is a different EMMA (but the basis is the same, I used GDC EMMA version from <https://globalcompetition.compression.ru/#leaderboards>)
2021-04-20 04:12:37
Orum
2021-04-20 04:12:59
while interesting on pure compression ratio it says nothing of speed <:SadOrange:806131742636507177>
Scientia
2021-04-20 04:14:51
Wait what's pglz and what dark magic is it doing?
2021-04-20 04:15:42
Oh
2021-04-20 04:15:49
It's for SQL apparently
Orum
2021-04-20 04:16:12
it's probably very slow and ill suited to other content types
Scientia
2021-04-20 04:16:28
Nah I'm talking about it being very fast
2021-04-20 04:16:45
The compression ratio seems somewhat ok
Orum
2021-04-20 04:16:54
oh, I see, the scatter plot above
Scope
2021-04-20 04:17:51
Because it is difficult to compare it as well as lossy compression, also because I was comparing very new and experimental formats, each new version can differ significantly in speed (for example very old versions of Jpeg XL were much faster and used all CPU threads, then it became very slow, and newer versions are faster, more efficient, but slower than the oldest)
2021-04-20 04:18:46
And lossless WebP2 is crazy slow (because it hasn't been optimized at all yet)
Orum
2021-04-20 04:19:22
honestly I wouldn't even test webp v2 yet
Scientia
2021-04-20 04:20:07
Google has their hand in every basket huh?
2021-04-20 04:20:22
Avif, webp2,jxl
Orum
2021-04-20 04:20:42
half of the compressors on compression.ru I've never even heard of <:Thonk:805904896879493180>
Scientia
2021-04-20 04:21:16
Most of them are closed source and designed to win benchmarks <:kekw:808717074305122316>
Orum
2021-04-20 04:21:41
yeah, if it's not OSS I'm not interested
Scientia
2021-04-20 04:21:52
Though cmix is good
2021-04-20 04:21:56
It's open source
2021-04-20 04:22:08
Actually definitively the best compressor
2021-04-20 04:22:55
Too bad it needs 32GB+ of ram and it's speed is measured in minutes per megabyte <:ReeCat:806087208678588437>
2021-04-20 04:23:35
Hell maybe even hours per megabyte
Orum
2021-04-20 04:23:52
that alone makes it not the best
Scientia
2021-04-20 04:24:05
Best as in compression wise
Orum
2021-04-20 04:24:33
yeah, but I tend to prefer practical things to impractical ones
Scientia
2021-04-20 04:24:38
If we're talking best for daily use lzma2 and zip's deflate are the best
2021-04-20 04:24:45
Repeatedly shown their worth
Orum
2021-04-20 04:25:09
lrz is my fav, but never got the adoption zstd got
Scope
2021-04-20 04:25:09
Also on some images with the same resolution Jpeg XL is much slower than others (so it is possible to create a very wrong test with a small number of images) For the experimental compressors I chose only the strongest ones for compressing images (to compare the maximum possible compressibility)
Scientia
2021-04-20 04:25:57
JXL seems very good, especially with how asymmetric it is
2021-04-20 04:26:11
Still a 95 sec decode time seems very long
2021-04-20 04:26:23
But I guess it's a half gig image
2021-04-20 04:26:31
And such a thing is to be expected
Scope
2021-04-20 04:27:36
In the GDC test it is a set of about 1 gigabyte of images
Orum
2021-04-20 04:27:40
they used `--num_threads=1` <:WhatThe:806133036059197491>
Scientia
2021-04-20 04:28:02
I assume to make it equal
2021-04-20 04:28:15
Since the more advanced ones probably aren't multi threaded
Orum
2021-04-20 04:28:21
that's one way of defining 'equal'
Scientia
2021-04-20 04:28:28
I guess
2021-04-20 04:28:41
Not my methodology ๐Ÿคทโ€โ™‚๏ธ
2021-04-20 04:29:17
This is more of a technical than a pragmatic graph
Orum
2021-04-20 04:29:25
yeah
2021-04-20 04:30:58
mine benchmarks are more pragmatic, but also out of date
Scope
2021-04-20 04:31:02
Yep `--num_threads=0` was more correct for 1 thread (but Jpeg XL was only as a lower bar option from open formats)
Orum
2021-04-20 04:32:07
oh actually they're more up to date than that page, which used 0.1.0
Scope
2021-04-20 04:34:27
Yes, this is already an outdated version anyway, after which there have been significant changes Multi-threaded comparison would also be interesting (but in practice, especially when used on servers where many images are encoded simultaneously, it is rarely used)
Orum
2021-04-20 04:36:01
fair, but lots of images are compressed by users before they're ever uploaded to a server
Scope
2021-04-20 04:39:04
Yes, although users can also have a lot of images, and I don't think GDC was user-oriented (but it's also an interesting comparison for me, where I can find some new experimental encoders) And closer to practical use than, for example, the Hutter Prize comparison (which prioritizes the highest possible compression and also the old, not changing test set)
Orum
2021-04-20 04:40:51
if you want to deal with proprietary formats, sure
Scope
2021-04-20 04:57:15
Yes, but for experimental formats it is not so important, because even for open formats there is very little chance of their adoption as a standard (it should be created for this purpose from the beginning, it may be useful the methods they use, but even closed formats with GDC usually share what they used)
il1kesonic
2021-04-20 05:08:46
heys kittens
2021-04-20 05:08:52
owo
Scientia
2021-04-20 05:38:22
Though the conversations can get a bit offtopic (no thanks to me lol) this isn't a general chat
2021-04-20 05:38:38
You're probably looking for <#806898911091753051>
2021-04-20 05:44:06
Looks like for icons especially jxl often loses
_wb_
2021-04-20 05:44:20
WebP lossless is quite good (most of the people who made it are here, btw, as they also made jxl)
2021-04-20 05:44:43
Some things are just a matter of encoder optimization
2021-04-20 05:45:23
We have mostly been focusing on larger images, not paying that much attention to tiny images
2021-04-20 05:45:42
So the encoder is probably still doing some silly things
Scientia
2021-04-20 05:46:09
It makes sense since that's the application, photos and other user created imagery
_wb_
2021-04-20 05:46:27
Well we do want to be universally applicable
Scientia
2021-04-20 05:46:34
doesn't PNG do reasonably well for icons since they're relatively small regardless?
2021-04-20 05:47:03
ideally in the far future you could use jxl lossless for that
_wb_
2021-04-20 05:47:25
Well it's easy to have large variations in size when the size is in the 50-500 byte range
Scope
2021-04-20 05:51:31
With manual selection of options, JXL can usually beat lossless WebP on most images where it was previously worse (mainly because the current encoder is not always optimal)
Orum
2021-04-20 06:00:25
True, but averaged over many images of different types, JXL seems to always hold the advantage
2021-04-20 06:02:29
yeah, we've found a few and the devs are aware of most if not all of them
Scope
2021-04-20 06:09:28
That's why I did my comparisons on different types of images with the size of each image for each format And yes, on certain single images almost any modern format can be better than another, even lossless AVIF, but the overall result is more important
2021-04-20 06:11:48
For example here <https://docs.google.com/spreadsheets/d/1ju4q1WkaXT7WoxZINmQpf4ElgMD2VMlqeDN2DuZ6yJ8/>
2021-04-20 06:13:35
The spreadsheet has Tabs for different types of images and the size and compression efficiency of each image for each format
2021-04-20 06:16:02
Yes, especially for faster encoding speeds
2021-04-20 06:18:06
And emoji/icons (but this is also because FLIF/WebP/WebP2 removes the invisible alpha)
2021-04-20 06:25:25
Yes, it discards unnecessary alpha (without visual changes)
_wb_
2021-04-20 06:27:11
To be precise: WebP makes invisible pixels black, jxl currently keeps their RGB intact, and AVIF and WebP2 use premultiplied alpha which makes invisible pixels black but also reduces precision of semi-transparant pixels.
Scope
2021-04-20 06:34:38
Yes, but this usually does not affect the image visually, it remains without visual losses (but might be important elsewhere, for example in games as some technical information) And it would be useful to have such an option in JXL as well (it's possible but not yet implemented in encoder options for lossless)
2021-04-20 06:37:16
In WebP/AVIF encoders this can be enabled/disabled ```-exact ................. preserve RGB values in transparent area, default=off``` ```-p,--premultiply: Premultiply color by the alpha channel and signal this in the AVIF```
2021-04-20 06:40:33
Also WebP (89 262)
2021-04-20 06:40:50
2021-04-20 06:41:06
JXL (67 071)
2021-04-20 06:52:51
For now it's just a bruteforce, but in the future I hope the encoder itself will be more optimal in choosing About MA tree I think it is better to explain someone from the devs
_wb_
2021-04-20 06:54:27
as you can see in <#824000991891554375> , MA trees are a very expressive/powerful context modeling technique
2021-04-20 06:54:45
the search space is enormous though
2021-04-20 06:55:10
the current encoder, even at -s 9, is very far from exhaustive when it is trying to determine a good MA tree for the image
2021-04-20 06:56:23
exhaustive search would be computationally infeasible, likely it would take longer than the age of the universe to really find the absolute best MA tree for a medium-sized image
2021-04-20 06:57:12
so it boils down to making good heuristic decisions in the encoder, and different algorithms and settings are possible for that
Crixis
2021-04-20 07:08:05
use more of the source pixel to try
2021-04-20 07:08:15
I 1 use all pixels
2021-04-20 07:13:33
E make channels see each others (E 3 all colors channel see each other) seam one of the flags that always make smaller file but is slow
2021-04-20 07:13:52
work only on s 9
2021-04-20 07:15:15
g is how big are the separate squares for encoding, big square -> more probability to find an order. g 0-3, default is 2
_wb_
2021-04-20 09:20:40
Default is 1
2021-04-20 09:20:55
Group size is 128 << that number
2021-04-20 09:21:15
So 128 for 0, 256 for 1, 512 for 2 and 1024 for 3
2021-04-20 09:21:26
For jxl art we use -g 3
2021-04-20 09:21:42
(usually)
2021-04-20 09:22:16
Bigger groups means less parallel decode (so slower on multicore)
2021-04-20 09:23:20
It can mean better compression (because less boundaries that are poorly predicted) or worse compression (because less opportunity to do localized RCTs and palettes)
fab
2021-04-20 04:01:23
is the image quality at q 60.4 improving?
2021-04-20 04:01:50
like is any better than doing
2021-04-20 04:01:52
for %i in (C:\Users\User\Documents\jpg*.png) do cjxl "%i" "%i.jxl" -I 3.9 -X 8 -P 8 -Q 86.6 -m -s 8 --num_threads=2 for %i in (C:\Users\User\Documents\jxl1*.png) do cjxl "%i" "%i.jxl" -q 60.4 -s 4 --faster_decoding=3 --num_threads=2
2021-04-20 04:02:07
with 0.3.5 or so
2021-04-20 04:02:34
i think yes because you have 1 less generation loss
Troc
2021-04-20 08:14:46
Thumbnails have stopped working. What do I do?
Eugene Vert
Troc Thumbnails have stopped working. What do I do?
2021-04-20 08:51:32
If you are on kde, check your `/usr/share/kservices5/imagethumbnail.desktop` MimeType section. There must be image/jxl;
Troc
2021-04-20 08:51:42
Windows 10.
Jyrki Alakuijala
2021-04-20 08:55:39
big step for JPEG XL: https://bugs.chromium.org/p/chromium/issues/detail?id=1178058#c16
2021-04-20 08:56:09
Erik Andre from Facebook expresses support for JPEG XL image coding
2021-04-20 08:56:39
"""Just wanted to chime in and mention that us at Facebook are eagerly awaiting full JPEG XL support in Chrome. We've very exited about the potential of JPEG XL and once decoding support is available (without the need to use a flag to enable the feature on browser start) we're planning to start experiments serving JPEG XL images to users on desktop web. The benefit of smaller file size and/or higher quality can be a great benefit to our users. On our end this is part of a larger initiative to trial JPEG XL on mobile (in our native iOS and Android apps as well as desktop)."""
190n
2021-04-20 08:57:42
maybe this will get mozilla off their ass
Jyrki Alakuijala
2021-04-20 09:00:48
I consider this is one of the three biggest achievement for us -- right along with the chrome integration and standardization
2021-04-20 09:01:08
Mozilla is very responsive and kind as usual -- I don't see big worries there
2021-04-20 09:01:40
Just we have been too busy to take them into account appropriately
Nova Aurora
2021-04-21 04:23:57
Hope the JPEG meeting goes well!
veluca
2021-04-21 04:30:52
it's a plenary meeting, they tend not to be the most interesting activity of the day...
Pieter
2021-04-21 04:48:17
unless they go on for 24 hours, of course?
veluca
2021-04-21 05:11:57
please don't even suggest that...
2021-04-21 05:12:28
there have been 4+ hours plenaries
sklwmp
2021-04-21 05:48:45
I've tried to compile jpeg-xl via `./ci.sh opt` on Ubuntu 20.04 through WSL, and I'm getting this error. I've installed all the libraries they've told me to, so I'm not really sure what's going on. It compiles fine on Debian 10 Buster (WSL).
2021-04-21 05:48:49
``` [46/464] Linking CXX static library third_party/highway/libhwy.a Compiled HWY_TARGETS: AVX3 AVX2 SSE4 Scalar HWY_BASELINE_TARGETS: Scalar [293/464] Linking CXX executable lib/jxl_gbench FAILED: lib/jxl_gbench : && /usr/bin/clang++ -DJXL_DEBUG_WARNING -DJXL_DEBUG_ON_ERROR -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O2 -g -DNDEBUG -fPIE -pie lib/CMakeFiles/jxl_gbench.dir/extras/tone_mapping_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/dec_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/enc_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/splines_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/tf_gbench.cc.o -o lib/jxl_gbench lib/libjxl_extras-static.a lib/libjxl.a /usr/lib/x86_64-linux-gnu/libbenchmark_main.a third_party/brotli/libbrotlienc-static.a third_party/brotli/libbrotlidec-static.a third_party/brotli/libbrotlicommon-static.a -lm third_party/highway/libhwy.a -ldl third_party/libskcms.a /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so third_party/liblodepng.a /usr/lib/x86_64-linux-gnu/libgif.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so third_party/sjpeg/libsjpeg.a /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libIexMath.so /usr/lib/x86_64-linux-gnu/libIlmThread.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libbenchmark.so.1.5.0 -pthread /usr/lib/x86_64-linux-gnu/librt.so && : /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x24): undefined reference to `main' clang: error: linker command failed with exit code 1 (use -v to see invocation) [302/464] Building CXX object lib/CMakeFiles/encode_test.dir/jxl/encode_test.cc.o ninja: build stopped: subcommand failed. + retcode=1 ```
2021-04-21 05:49:14
I'm not yet well-versed in C/C++, nor compiling code, so any help is appreciated. Thank you!
Jyrki Alakuijala """Just wanted to chime in and mention that us at Facebook are eagerly awaiting full JPEG XL support in Chrome. We've very exited about the potential of JPEG XL and once decoding support is available (without the need to use a flag to enable the feature on browser start) we're planning to start experiments serving JPEG XL images to users on desktop web. The benefit of smaller file size and/or higher quality can be a great benefit to our users. On our end this is part of a larger initiative to trial JPEG XL on mobile (in our native iOS and Android apps as well as desktop)."""
2021-04-21 05:50:28
Well, I guess it'll be another invisible win for users. Most people probably won't even realize they're being served JPEG XL files until they suddenly can't share them with other people :> Ah, the joys of adopting new formats.
veluca
sklwmp ``` [46/464] Linking CXX static library third_party/highway/libhwy.a Compiled HWY_TARGETS: AVX3 AVX2 SSE4 Scalar HWY_BASELINE_TARGETS: Scalar [293/464] Linking CXX executable lib/jxl_gbench FAILED: lib/jxl_gbench : && /usr/bin/clang++ -DJXL_DEBUG_WARNING -DJXL_DEBUG_ON_ERROR -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O2 -g -DNDEBUG -fPIE -pie lib/CMakeFiles/jxl_gbench.dir/extras/tone_mapping_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/dec_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/enc_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/splines_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/tf_gbench.cc.o -o lib/jxl_gbench lib/libjxl_extras-static.a lib/libjxl.a /usr/lib/x86_64-linux-gnu/libbenchmark_main.a third_party/brotli/libbrotlienc-static.a third_party/brotli/libbrotlidec-static.a third_party/brotli/libbrotlicommon-static.a -lm third_party/highway/libhwy.a -ldl third_party/libskcms.a /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so third_party/liblodepng.a /usr/lib/x86_64-linux-gnu/libgif.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so third_party/sjpeg/libsjpeg.a /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libIexMath.so /usr/lib/x86_64-linux-gnu/libIlmThread.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libbenchmark.so.1.5.0 -pthread /usr/lib/x86_64-linux-gnu/librt.so && : /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x24): undefined reference to `main' clang: error: linker command failed with exit code 1 (use -v to see invocation) [302/464] Building CXX object lib/CMakeFiles/encode_test.dir/jxl/encode_test.cc.o ninja: build stopped: subcommand failed. + retcode=1 ```
2021-04-21 05:54:56
not sure what is wrong there... can you try `./ci.sh opt -DENABLE_TESTING=Off`?
sklwmp
2021-04-21 05:57:39
Hm. Alright then, I'll try that.
2021-04-21 06:17:05
``` [295/464] Linking CXX executable lib/jxl_gbench FAILED: lib/jxl_gbench : && /usr/bin/clang++ -DJXL_DEBUG_WARNING -DJXL_DEBUG_ON_ERROR -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O2 -g -DNDEBUG -fPIE -pie lib/CMakeFiles/jxl_gbench.dir/extras/tone_mapping_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/dec_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/enc_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/splines_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/tf_gbench.cc.o -o lib/jxl_gbench lib/libjxl_extras-static.a lib/libjxl.a /usr/lib/x86_64-linux-gnu/libbenchmark_main.a third_party/brotli/libbrotlienc-static.a third_party/brotli/libbrotlidec-static.a third_party/brotli/libbrotlicommon-static.a -lm third_party/highway/libhwy.a -ldl third_party/libskcms.a /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so third_party/liblodepng.a /usr/lib/x86_64-linux-gnu/libgif.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so third_party/sjpeg/libsjpeg.a /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libIexMath.so /usr/lib/x86_64-linux-gnu/libIlmThread.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libbenchmark.so.1.5.0 -pthread /usr/lib/x86_64-linux-gnu/librt.so && : /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x24): undefined reference to `main' clang: error: linker command failed with exit code 1 (use -v to see invocation) [304/464] Building CXX object lib/CMakeFiles/encode_test.dir/jxl/encode_test.cc.o ninja: build stopped: subcommand failed. + retcode=1 ``` I seem to be getting the same error. Huh.
veluca
2021-04-21 06:18:06
ok, let's see if my sleep-deprived brain can figure this out
sklwmp
2021-04-21 06:19:31
` ./ci.sh opt -DENABLE_TESTING=OFF` seems to skip a lot of the tests, yes, but gives the same error ``` [9/193] Linking CXX executable lib/jxl_gbench FAILED: lib/jxl_gbench : && /usr/bin/clang++ -DJXL_DEBUG_WARNING -DJXL_DEBUG_ON_ERROR -funwind-tables -Xclang -mrelax-all -Xclang -mconstructor-aliases -fno-omit-frame-pointer -O2 -g -DNDEBUG -fPIE -pie lib/CMakeFiles/jxl_gbench.dir/extras/tone_mapping_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/dec_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/enc_external_image_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/splines_gbench.cc.o lib/CMakeFiles/jxl_gbench.dir/jxl/tf_gbench.cc.o -o lib/jxl_gbench lib/libjxl_extras-static.a lib/libjxl.a /usr/lib/x86_64-linux-gnu/libbenchmark_main.a third_party/brotli/libbrotlienc-static.a third_party/brotli/libbrotlidec-static.a third_party/brotli/libbrotlicommon-static.a -lm third_party/highway/libhwy.a -ldl third_party/libskcms.a /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so third_party/liblodepng.a /usr/lib/x86_64-linux-gnu/libgif.so /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/x86_64-linux-gnu/libz.so third_party/sjpeg/libsjpeg.a /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libIexMath.so /usr/lib/x86_64-linux-gnu/libIlmThread.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libbenchmark.so.1.5.0 -pthread /usr/lib/x86_64-linux-gnu/librt.so && : /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x24): undefined reference to `main' clang: error: linker command failed with exit code 1 (use -v to see invocation) [18/193] Building CXX object third_party/highway/CMakeFiles/logical_test.dir/hwy/tests/logical_test.cc.o ninja: build stopped: subcommand failed. + retcode=1 ```
2021-04-21 06:19:32
You don't *need* to help, by the way, if it's too much trouble for you. I really appreciate it though!
veluca
2021-04-21 06:20:34
try uninstalling `libbenchmark-dev`
2021-04-21 06:20:52
(and then clearing the build directory and rerunning `./ci.sh opt`)
2021-04-21 06:22:34
from what I understand, the command line there should *not* give that error, because `main` should be defined in `/usr/lib/x86_64-linux-gnu/libbenchmark_main.a`... this might be a broken package on your system, but if you uninstall `libbenchmark-dev` then we shouldn't even try to compile that file
sklwmp
2021-04-21 06:26:53
okay, okay, i'll do that
2021-04-21 06:35:12
<@!179701849576833024> Looks like it worked! I wonder why the package was broken in the first place, but no matter, thank you so much for the help!
veluca
2021-04-21 06:43:08
you're welcome! I have no idea what was broken but happy to help
Jyrki Alakuijala
sklwmp Well, I guess it'll be another invisible win for users. Most people probably won't even realize they're being served JPEG XL files until they suddenly can't share them with other people :> Ah, the joys of adopting new formats.
2021-04-21 07:05:08
I don't know if the facebook app has a 'save image' and if it does, they can convert at that time. In Chrome I believe they can reload the image as image/jpeg (or they could also convert locally) if someone wants to save it.
fab
2021-04-21 07:10:00
yes it has even on mobile
2021-04-21 07:10:40
facebook
2021-04-21 07:10:56
you can save with the left button other poeple foto and it will appears download
Jyrki Alakuijala
2021-04-21 07:11:12
in that case they need to convert it at that time I suspect
fab
2021-04-21 07:13:38
maybe is called save photo and not download
Crixis
2021-04-21 07:17:03
they can also re-download
monad
2021-04-21 07:17:15
It would be more cool if they just saved the JXL and forced everyone else to implement it.
2021-04-21 07:17:43
Wouldn't redownloading somewhat defeat the purpose?
Jyrki Alakuijala
2021-04-21 07:18:27
technocrats have a responsibility to accommodate a good life for the technically handicapped
2021-04-21 07:18:38
ideally users would not have to think about this at all
2021-04-21 07:18:55
if they need to think -- we very quickly start eating the savings a new format can create
2021-04-21 07:19:39
humans are 1000x expensive than the computers, cables, and energy used to transmit data ๐Ÿ˜„
monad
2021-04-21 07:20:10
Yeah, yeah, I tried to make that a cool(TM), but Discord wouldn't allow the trademark character.
Petr
Jyrki Alakuijala humans are 1000x expensive than the computers, cables, and energy used to transmit data ๐Ÿ˜„
2021-04-21 07:20:27
In terms of money? Or natural resources? ๐Ÿ™‚