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

benchmarks

veluca
2021-06-05 09:51:18
likely has very different encoder heuristics
Scope
2021-06-07 10:11:01
Source
2021-06-07 10:11:18
New LP (i0p0 - 137 801)
2021-06-07 10:11:27
Old LP (257 112)
2021-06-07 10:11:38
VarDCT (175 343)
2021-06-07 10:14:29
New LP - VarDCT
2021-06-07 10:15:58
But, except that the size of the lossless PNG is 24994
Jim
2021-06-07 11:11:40
Not sure what you were attempting. With `-s 9 -I 1` I was able to get it to 24654.
veluca
2021-06-07 11:13:02
-I0 -P0 -s 9
Scope New LP (i0p0 - 137 801)
2021-06-07 11:13:18
should be strictly better than this
Scope
Jim Not sure what you were attempting. With `-s 9 -I 1` I was able to get it to 24654.
2021-06-07 11:13:53
This is only a lossy comparison, new lossy-palette, old lossy-palette and VarDCT (I have no goal to get the smallest size by any means, only to compare the quality of different lossy methods)
veluca
2021-06-07 11:14:11
but tbh, pixel art is not where I'd use lossy palette
Jim
2021-06-07 11:16:16
Hm... I get some weird error when I try it lossy.
Scope
2021-06-07 11:19:39
On most content, lossy-palette efficiency is not yet sufficient to be noticeably better than VarDCT (but if the sizes are even smaller, VarDCT is likely to have noticeable artifacts)
2021-06-07 11:36:26
Source
2021-06-07 11:37:23
WebP NL 40 <https://files.catbox.moe/9zw3lt.webp> New/Old LP (there are still some problems)
2021-06-08 12:40:22
Examples with visible fixes in the New LP
2021-06-08 12:40:37
Old
2021-06-08 12:40:48
New
2021-06-08 12:41:08
Old
2021-06-08 12:41:19
New
2021-06-08 12:46:26
- Noticeable banding and other things in the new and old LP
2021-06-08 12:46:44
Source
2021-06-08 12:46:56
New
2021-06-08 12:47:08
Old
2021-06-08 12:47:26
WebP NL 40 <https://files.catbox.moe/ko86em.webp> - Source
2021-06-08 12:47:36
New
2021-06-08 12:47:45
Old
2021-06-08 12:48:19
WebP NL 40 <https://files.catbox.moe/5q1lgd.webp> <@!532010383041363969> ^
diskorduser
2021-06-08 03:06:37
png - 28.5 kb webp - 23.9 jxl - 29.2
eddie.zato
2021-06-08 03:37:08
```Powershell PS > cwebp -z 9 -mt -m 6 -lossless -o keyboard.webp keyboard.png PS > cjxl keyboard.png keyboard7.jxl -m -e 7 -I 1 PS > cjxl keyboard.png keyboard8.jxl -m -e 8 -I 1 PS > cjxl keyboard.png keyboard9.jxl -m -e 9 -I 1 Name Length ---- ------ keyboard.png 29149 keyboard.webp 24600 keyboard7.jxl 27249 keyboard8.jxl 25923 keyboard9.jxl 22296 ```
diskorduser
2021-06-08 04:26:48
but it takes more time than webp
2021-06-08 04:27:07
I always test with default flags
eddie.zato
2021-06-08 05:08:08
`cwebp` has had enough years to get all the optimization it needs.
Jim
2021-06-08 11:29:31
Wait till <:JXL:805850130203934781> has lossless optimization...
Jyrki Alakuijala
Scope
2021-06-09 04:44:03
qlic2 is better, but for photographs -- for PNGs in the internet webp lossless is better
Scope WebP NL 40 <https://files.catbox.moe/9zw3lt.webp> New/Old LP (there are still some problems)
2021-06-09 04:46:50
This one I know how to fix -- it will be next improvement
Scope New
2021-06-09 04:47:51
This one, too
Scope
Jyrki Alakuijala qlic2 is better, but for photographs -- for PNGs in the internet webp lossless is better
2021-06-09 04:49:13
Yes, but it is also noticeably faster than WebP when encoding, at about the same decoding speed, it is also faster (encoding and decoding) and more efficient than the current JXL `-s 2/1` (although there are still possible optimizations) https://discord.com/channels/794206087879852103/803645746661425173/847570960453730334
Jyrki Alakuijala
Scope New
2021-06-09 04:49:19
This looks like it needs a heuristics fix
Scope Yes, but it is also noticeably faster than WebP when encoding, at about the same decoding speed, it is also faster (encoding and decoding) and more efficient than the current JXL `-s 2/1` (although there are still possible optimizations) https://discord.com/channels/794206087879852103/803645746661425173/847570960453730334
2021-06-09 04:49:44
It doesn't do LZ77 -- and that is the main slowdown in WebP lossless
Scope
2021-06-09 04:52:15
However, it would be nice to have a very fast and relatively efficient mode for this speed
Jyrki Alakuijala
eddie.zato `cwebp` has had enough years to get all the optimization it needs.
2021-06-09 04:52:55
The overall time and man power spent with cwebp lossless optimization is much much less than that spent on respective JPEG XL side of things
2021-06-09 04:53:31
it is just a simple format that matches the PNG images needs rather well
2021-06-09 04:54:40
the first version I wrote in 2011 included optimal parsing, predictor search, entropy clustering and it performed very similar to the current version (in density) but was dead slow at encoding, but relatively fast in decoding (50-600 MB/s back then)
_wb_
2021-06-09 05:19:05
I see lossless webp as png on steroids, basically replacing every ingredient of png with a better one (better entropy coding, better lz77 distance encoding, better variable predictors, etc)
2021-06-09 05:20:14
As such, it can reliably do better than png, and also have very attractive speed trade-offs.
2021-06-09 05:22:38
Lossless jxl is more radically new, containing most of flif/fuif, the weighted predictor, delta palette, and an entirely new way of combining context modeling with predictor selection, and combining statistical entropy coding (ANS) with dictionary entropy coding (lz77).
2021-06-09 05:32:53
Doing encoding fast and reliably dense with such a new beast is not trivial though. We haven't even really figured out yet how to do encoding that really leverages all bitstream possibilities at the same time (e.g. doing tree learning and lz77 optimization at the same time, or learning predictor offsets/multipliers)
Scope
2021-06-09 05:37:31
Yep, but if Qlic2 doesn't do LZ77 but still remains efficient (except for pixel art) and very fast, is it possible to use other methods?
_wb_
2021-06-09 05:45:56
Jxl at speeds < 8 also doesn't do lz77, but it is spending a lot of time on MA tree learning at speeds > 3
Scope
2021-06-09 06:07:08
I mean, as far as I understand from the past discussions with `-I 0` modes, theoretically it is possible to achieve better efficiency and speed than the current `-s 3`
_wb_
2021-06-09 06:16:56
-I 0 is closer to png / lossless webp
2021-06-09 06:20:13
Likely something like the current -s 2 / -s 3 (fixed MA tree so no learning gets done) but with some kind of cheap lz77 matching enabled could be good for fast encoding of various kinds of images (photo and nonphoto)
eddie.zato
Jyrki Alakuijala The overall time and man power spent with cwebp lossless optimization is much much less than that spent on respective JPEG XL side of things
2021-06-09 07:05:23
I see some improvements in the speed of cwebp in 6 years ๐Ÿ˜„ ```PowerShell PS > (Measure-Command {.\cwebp044 -mt -m 6 -lossless -o then.webp 0.jpg}).TotalSeconds 29,6634277 PS > (Measure-Command {.\cwebp120 -mt -m 6 -lossless -o now.webp 0.jpg}).TotalSeconds 12,8111611 ```
Eugene Vert
2021-06-09 10:22:09
Kinda noticeable mosquito noise & ringing on `-d 1` orig: https://www.pixiv.net/en/artworks/88346344 up to date cjxl (33a23b3)
2021-06-09 10:22:35
crop:
lithium
2021-06-10 03:46:12
<@!532010383041363969> I get the same issue on gitlab issue 147 https://gitlab.com/wg1/jpeg-xl/-/issues/147 And full version image from https://www.pixiv.net/en/artworks/88346344 original png RGBA32 8bit 12.9MB to jxl lossless -s7 6.93MB
Jyrki Alakuijala
eddie.zato I see some improvements in the speed of cwebp in 6 years ๐Ÿ˜„ ```PowerShell PS > (Measure-Command {.\cwebp044 -mt -m 6 -lossless -o then.webp 0.jpg}).TotalSeconds 29,6634277 PS > (Measure-Command {.\cwebp120 -mt -m 6 -lossless -o now.webp 0.jpg}).TotalSeconds 12,8111611 ```
2021-06-12 08:56:07
I suspect much of that is just adding multithreading, not fundamental algorithmic optimizations. I fixed a terrible density bug somewhere around 0.5.x that did improve image density, particularly so for gray scale images (a ~40 % improvement in that category). Lode improved WebP lossless by making alpha lossy by default and improved the related algorithms. Both fixes were inspired in my attempt to reach near parity with flif -n for internet content. After these fixes WebP lossless was 2 % more dense than flif in the 16-256 kB category of internet PNGs. Marcin (working on Riegeli) extended the near-lossless to work with spatially predicted images.
lithium <@!532010383041363969> I get the same issue on gitlab issue 147 https://gitlab.com/wg1/jpeg-xl/-/issues/147 And full version image from https://www.pixiv.net/en/artworks/88346344 original png RGBA32 8bit 12.9MB to jxl lossless -s7 6.93MB
2021-06-12 08:56:58
I have not forgotten.
lithium
Jyrki Alakuijala I have not forgotten.
2021-06-12 09:25:21
I understand, Thank you for your reply. ๐Ÿ™‚
Scope
2021-06-12 12:04:39
<https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html>
fab
2021-06-12 03:01:35
to see how images change from video to image
2021-06-12 03:01:39
-d 1.159 -s 7 --use_new_heuristics
2021-06-12 03:01:40
2021-06-12 03:01:45
first video
2021-06-12 03:01:53
then converted to image artificially
2021-06-12 03:02:00
i tried to simulate a jpeg xl effect
2021-06-12 03:02:29
you could like as jpeg xl effect but the best thing is to save the video or the image and use lossless
2021-06-12 03:02:52
v0.3.7-125-g9a3fbdd
2021-06-12 03:03:17
now i understood why images use more bytes
2021-06-12 03:05:12
so using less than distance where's there is a video image it could enlarge the file size
2021-06-12 03:05:34
sorry for the trash image but i don't know better scenes
2021-06-12 03:05:50
i hope jyri or raysar won't be furious at me
diskorduser
2021-06-12 03:56:30
Ah sudwe font
lithium
2021-06-12 04:32:03
I try to combine some lossy png encoder and jxl lossless, but I get some lossless compress problem on webp near-lossless. original png RGBA32 8bit (650KB) pingo webp near-lossless 40 (202KB) ImageMagick decode to png (414KB) jpeg xl lossless to jxl (304KB) > cjxl -m -q 100 -s 9 -g 3 -E 3 -I 1 How to optimize jxl lossless compressed file size for dwebp near-lossless image?
2021-06-12 04:32:41
dwebp near-lossless 40
_wb_
2021-06-12 04:36:28
It's hard to recompress pixels that have been specifically designed to compress well in another codec
2021-06-12 04:37:04
For the same reason why taking a jpeg and converting it to png is a bad idea for compression
fab
2021-06-12 04:38:17
so better using -j
2021-06-12 04:38:36
converting to png is bad?
lithium
2021-06-12 04:41:56
> // original png > Input file: 002.png | 666361 bytes > Image: 512x480 pixels | 8 bits/sample | RGB & Alpha | 93463 color(s) > Delta filter: None > Filter per scanline: > 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 > Chunks: only critical > > // dwebp near-lossless 40 > Input file: 002.png | 424549 bytes > Image: 512x480 pixels | 8 bits/sample | RGB & Alpha | 91584 color(s) > Delta filter: Mixed > Filter per scanline: > 14444444444444444444444444444444111414444141414444244444424444444244444444444444444444111111444442222222222222224442222222222222444222222222222242422224244224221444444444444444444422444444444414444444444444414444444444444444 > Chunks: only critical
2021-06-12 04:46:53
I understand, but other lossy png mode, like pingo pngcolor can compress very well on jpeg xl lossless. pingo pngcolor 60 (341KB) jpeg xl lossless to jxl (232KB) > cjxl -m -q 100 -s 9 -g 2 -e 3 -c 1 webp lossless (217KB)
2021-06-12 04:51:02
lossy pngcolor mode is a greedy-palettization mode like this https://github.com/chrissimpkins/greedy-palettization
2021-06-12 04:52:55
> // pingo pngcolor 60 > Input file: 002.png | 349427 bytes > Image: 512x480 pixels | 8 bits/sample | RGB & Alpha | 18747 color(s) > Delta filter: Mixed > Filter per scanline: > 44444444444444444444444444444444141444444444444444444444444444444442444444444444444444444444444444444222222424444444224424244224444442422224444444444444444444441444444444444444444444444444444414444444444444444444444444444444 > Chunks: only critical
_wb_
2021-06-12 05:08:33
The current jxl encoder does not make an attempt to use delta palette in a lossless way (in cases where because of unusual luck, that can be done). I think for recompression of near-lossless webp that might be needed/useful.
fab
diskorduser Ah sudwe font
2021-06-12 05:34:50
document with good font https://s3.savethechildren.it/public/files/uploads/pubblicazioni/riscriviamo-il-futuro-una-rilevazione-sulla-poverta-educativa-digitale_0.pdf
Deleted User
_wb_ It's hard to recompress pixels that have been specifically designed to compress well in another codec
2021-06-12 05:36:04
There were some basic methods for doing near-lossless in JXL. Do any of them prevent generationloss like near-lossless WebP? (i.e. decoding to pixels and recompressing as lossless JXL will result in the same file size)
_wb_
2021-06-12 05:37:46
In principle, Squeeze could be idempotent, I think
lithium
_wb_ The current jxl encoder does not make an attempt to use delta palette in a lossless way (in cases where because of unusual luck, that can be done). I think for recompression of near-lossless webp that might be needed/useful.
2021-06-12 07:35:40
I understand, thank you ๐Ÿ™‚
Jyrki Alakuijala
fab i hope jyri or raysar won't be furious at me
2021-06-12 08:09:08
I think that is a great idea and could be deployable. I don't think we should prioritize it right now, but I would welcome a bug that proposes this so that we can keep the idea around.
lithium lossy pngcolor mode is a greedy-palettization mode like this https://github.com/chrissimpkins/greedy-palettization
2021-06-12 08:11:00
So funny that you bring this algorithm here. I designed it in summer 2007, tuned it's psychovisuals, and it was Zoltan's intern project. It is a great little algorithm that should not have been forgotten ๐Ÿ™‚
2021-06-12 08:12:38
after Zoltan's intern project Zoltan and me didn't work together again until 2013, when we started with Brotli's precursor -- a LZMA speed class general purpose compressor (that I cancelled in order to start the actual Brotli)
2021-06-12 08:13:25
Lee, perhaps you found it because of some marketing I did earlier?
lithium dwebp near-lossless 40
2021-06-12 08:15:30
I suspect -near_lossless=40 is only supported on cwebp -- dwebp doesn't need to know what kind of webp image it is, and cannot tell near lossless and true lossless apart
fab
Jyrki Alakuijala I think that is a great idea and could be deployable. I don't think we should prioritize it right now, but I would welcome a bug that proposes this so that we can keep the idea around.
2021-06-12 08:21:23
i do not talked about a idea
2021-06-12 08:21:33
i noticed only what video was doing
2021-06-12 08:21:45
and tried to explain what i noticed
Jyrki Alakuijala
2021-06-12 08:22:24
I consider it a plausible idea for better image compression -- it will be not easy to build, but we like challenges
fab
2021-06-12 08:22:41
better image compression isn't simply using d 1.2
2021-06-12 08:22:47
obviously i was joking
2021-06-12 08:22:51
don't take seriously
2021-06-12 08:22:57
d 1.0 is still more efficient
Jyrki Alakuijala
2021-06-12 08:23:57
no, I like the idea that we detect a video frame or other blurred rectangular areas and spend less precision there, possibly turn on more blurring than we would otherwise
fab
2021-06-12 08:24:16
more blurring in a videoframe
Jyrki Alakuijala
2021-06-12 08:24:19
in my experience such adjustments need to be very moderate, like 10-20 % in distance
2021-06-12 08:24:22
yeah
fab
2021-06-12 08:24:26
so like some d 1.0
2021-06-12 08:24:32
looks like d 1.2
2021-06-12 08:24:44
will be efficient to do
2021-06-12 08:24:50
or jpeg xl will lose quality
2021-06-12 08:25:37
i don't know i'm not a video compression expert so i don't know how to measure filesize
Deleted User
Jyrki Alakuijala no, I like the idea that we detect a video frame or other blurred rectangular areas and spend less precision there, possibly turn on more blurring than we would otherwise
2021-06-12 10:43:57
How about doing it similar to DjVu? Use a low quality lossy layer for the video frame and a high quality/lossless layer for the remaining text.
Jyrki Alakuijala
2021-06-13 09:50:13
DjVu was a great idea. It was released in 1998 as a digital document format.
2021-06-13 09:50:55
DjVu's main idea (writing out of memory now) is that images are stored at 100 dpi and black/white (or other high contrast) pixels at 300 dpi
2021-06-13 09:52:19
documents on paper (such as A4 or letter) are usually read at a specific distance, i.e., they get the pixels/degree specified because of their domain, and can choose reasonable compromises based on the human vision
2021-06-13 09:53:57
300 dpi was matching the resolution of many laser printers at that time (or possibly the lasers from 1995), it wasn't necessary to go higher in their design
2021-06-13 09:54:49
JPEG XL allows such a decomposition by layering -- you can have a layer subsampled 2x or 4x, and have black-and-white geometry stored at higher resolution, and photographs at a lower resolution
2021-06-13 09:55:57
JPEG XL specifies an extremely high quality upsampling method (non-separable) for layers that in my viewing works significantly better than bicubic or lanczos
lithium
Jyrki Alakuijala Lee, perhaps you found it because of some marketing I did earlier?
2021-06-13 09:57:36
I forgot where I found it, I think probably on encode forum or other compress forum. ๐Ÿ™‚
Jyrki Alakuijala I suspect -near_lossless=40 is only supported on cwebp -- dwebp doesn't need to know what kind of webp image it is, and cannot tell near lossless and true lossless apart
2021-06-13 09:57:41
Sorry, I'm not clear enough my word, I use webp near-lossless like this, pingo webp near-lossless 40 => dwebp to pixel(png) => jxl lossless compress png. For current jxl implement, only lossy palette can do some lossy thing without DCT, but lossy palette still a experiment option, So I plan use some lossy png tools combine jxl lossless, but look like webp near-lossless decode pixel(png) can't get great compress on jxl lossless compress.
Jyrki Alakuijala
2021-06-13 10:42:35
lossy palette will eventually (hopefully soon) be far better than a process with cwebp near-lossless 40, I believe
2021-06-13 10:42:59
even when both have the average predictor and the select predictor, it is unlikely that they will be controlled similarly
2021-06-13 10:43:16
in webp lossless I decided the predictor for a square, i.e., there is a 4x, 8x, 16x or whaever subresolution image deciding the predictor
2021-06-13 10:43:42
in jpeg xl a predictor is decided for a context -- it is different and way more complicated
2021-06-13 10:44:15
I am not expecting jpeg xl lossless encoder to do a great job trying to do decisions that were optimal for webp lossless
2021-06-13 10:44:20
that's the bad news
2021-06-13 10:44:48
the good news is that jpeg xl lossless has a lot of potential that is not yet experimented, I anticipate 2x improvements in many domains
2021-06-13 10:45:06
particularly noiseless graphics with gradients through delta palette
2021-06-13 10:45:23
but also in pixel graphics we should be able to use the combo of LZ77 and context modeling more elegantly
2021-06-13 10:46:11
for example, the palette and the context modeling are so powerful that they allow a 'sprite' to be triggered as a palette entry, and it can be a sprite with some internal conditionals
2021-06-13 10:46:43
of course we have nothing like this in the lossless encoder yet, and likely it takes 3-5 years before such things emerge
2021-06-13 10:47:00
but the format is really pretty amazing for "near lossless" use
_wb_
Jyrki Alakuijala I am not expecting jpeg xl lossless encoder to do a great job trying to do decisions that were optimal for webp lossless
2021-06-13 11:07:00
I don't think it's really worth doing, but you could make an encoder that takes into account that the source was optimized/near-lossless webp. E.g. the predictor image could be converted to an equivalent MA tree...
2021-06-13 11:08:44
Could do similar things for the tricks various (lossy) GIF and PNG optimizers apply
2021-06-13 11:10:05
But I think effort is better spent on making original inputs compress better, than on mimicking various near-lossless things from different formats...
Jyrki Alakuijala
_wb_ I don't think it's really worth doing, but you could make an encoder that takes into account that the source was optimized/near-lossless webp. E.g. the predictor image could be converted to an equivalent MA tree...
2021-06-13 04:16:26
and then the decoder could turn it back into a 2d array so that decoding would be fast ...
_wb_ But I think effort is better spent on making original inputs compress better, than on mimicking various near-lossless things from different formats...
2021-06-13 04:17:01
We are in total agreement on this ๐Ÿ˜„
raysar
2021-06-14 12:32:12
Did some of you find the max visual quality for the same file size compare to the same file size with a lower resolution? For example considering than for the same file size 1420x800 -d 3 is better than 1920x1080 -d 5 I know it's subjective and vary between pictures, but i think it's a great idea to know the max d value before resizing especially for full resolution camera. Exemple here, for me d 3 is the max visual acceptable, for low file size i reduce the resolution. Here 1080p= -d 5 800p= -d 3
2021-06-14 12:32:14
_wb_
2021-06-14 09:04:27
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#2011-03-05-03-13-madeira-159-funchal-mercado-dos-lavradores*3:1&AVIF-AOM=b&JXL=b&subset1 The pillars and the gray wall in the passageway in the center become smooth in AVIF. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#205-vallee-de-colca-panorama-juin-2010-5-de-6*3:1&AVIF-AOM=m&JXL=m&subset1 The steep rocky part in the shadow in the middle of the image gets thrashed by AVIF. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#abandoned-packard-automobile-factory-detroit-200*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF has less ringing in the roof lines, but the brick walls of the further away buildings get smoothed. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#bath-from-alexandra-park*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF ruins the clouds. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#buenos-aires-cityline-at-night-irargerich*3:1&AVIF-AOM=l&JXL=l&subset1 AVIF has color banding in the sky and turns the water surface into a glossy plastic. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#cecret-lake-panorama-albion-basin-alta-utah-july-2009*3:1&AVIF-AOM=s&JXL=s&subset1 AVIF destroys the clouds and the lake. Lake gets smoothed a lot yet has visible macroblock edges. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#citroen-c4f*3:1&AVIF-AOM=l&JXL=l&subset1 AVIF smooths the metal above the wheels. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#clovisfest*3:1&AVIF-AOM=b&JXL=b&subset1 JXL has more DCT artifacts around the edges, AVIF smooths the clouds and thin lines on the balloons
2021-06-14 09:31:47
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#crepuscular-rays-at-sunset-near-waterberg-plateau*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF makes the top branches disappear against the dark cloud background, sand loses detail, clouds get smoothed, rays of light get blurred https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#eaglefairy-hst-big*3:1&AVIF-AOM=b&JXL=b&subset1 AVIF smoothes everything. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#end-of-show-3*3:1&AVIF-AOM=b&JXL=b&subset1 AVIF removes texture and detail from the dresses. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#endeavour-with-columbia-ferry-flyby-gpn-2000-001996*3:1&AVIF-AOM=b&JXL=b&subset1 Visible blocks in the sky in AVIF, also dark parts become a bit too bright (colorspace issue? even lossless AVIF looks different from original here...) https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#florac-le-vibron-source-du-pecher*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF destroys the wall and windows on the top left, also blurs water surface below. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#grimburgwalamsterdam*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF flattens most of the brick walls, also removes detail in the bottom left part https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#iena-avenches-6*3:1&AVIF-AOM=m&JXL=m&subset1 Horse becomes plasticky. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#kopenhagen-tivoli-9120*3:1&AVIF-AOM=m&JXL=m&subset1 Diagonal blue/white stripes at the top look cleaner in AVIF, but black whale building gets smoothed in AVIF, bolts on the lighthouse disappear, scales of the green fish in the front disappear.
2021-06-14 10:09:47
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#kryer-ps*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF removes a lot of brushstrokes. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#lufthansa-aviation-center-after-sunset-frankfurt-germany-near-airport-frankfurt-fraport-03*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF has cleaner edges, but removes a lot of the palm tree detail, and in the side wall on the right, it removes some of the detail (mostly the horizontal features disappearing, keeping only the vertical ones). https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#meg-20110701-japan-expo-02*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF turns the skin (arms, face) into plastic. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#moscow-july-2011-4a*3:1&AVIF-AOM=l&JXL=l&subset1 AVIF has banding in the sky and blurs the cloud. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#nymphe-et-amour-tenant-une-guirlande-statues-du-parterre-deau-chateau-de-versailles-p1050390-p1050394-rectilinear*3:1&AVIF-AOM=l&JXL=l&subset1 AVIF smooths the texture of both the statue itself and the stone it is on. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#ohashi0806shield*3:1&AVIF-AOM=s&JXL=s&subset1 AVIF is way better at preserving nice clean lines at low fidelity bitrates like this (JXL tries to preserve more details but gets nasty artifacts at hard edges). At high fidelity targets (e.g. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#ohashi0806shield*3:1&AVIF-AOM=b&JXL=b&subset1), JXL becomes indistinguishable from original while AVIF still has noticeable blur.
2021-06-14 10:09:49
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#washington-monument-washington-dc-04037u-original*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF blurs the monument and the clouds a lot, JXL has some ringing around the monument. https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_06_08/index.html#wasserfassstelle-von-1898-im-schanerloch*3:1&AVIF-AOM=m&JXL=m&subset1 AVIF blurs the waterfall, also at the bottom of the image.
2021-06-14 10:18:10
In other words: after spending ~80 minutes on reviewing carefully (putting my BenQ calibrated monitor to good use), in my opinion, the June 8th situation is still similar to what it was in the past: AVIF does a better job at high-appeal, low-fidelity (keeping nice and clean lines even at very bitrates), but is consistently worse than JXL at medium to high fidelity. AVIF especially has a problem in the darks (shadowy regions) and with subtle (low contrast) textures, which systematically get erased, turning all materials into glossy plastic. Even at high bitrates this remains a problem.
fab
2021-06-14 04:04:54
this was copied by notepad?
2021-06-14 04:05:07
or you used discord for an hour
_wb_
2021-06-14 04:09:12
I just went over the images, typed my remarks in discord, until the message got too long and then I pressed enter ๐Ÿ™‚
Deleted User
Jyrki Alakuijala JPEG XL allows such a decomposition by layering -- you can have a layer subsampled 2x or 4x, and have black-and-white geometry stored at higher resolution, and photographs at a lower resolution
2021-06-14 08:40:45
You've just said that you can apply resampling separately to every layer. Can the same be done with noise synthesis? For example: a screenshot with main Modular layer with text+graphics and separate VarDCT layers for every photo. If those images are noisy, I don't want grain synthesis to be applied to text, it'd ruin the screenshot...
veluca
2021-06-14 08:55:54
you can
2021-06-14 08:56:43
with some limitations, I think you need to either apply noise to the first K layers or to have an extra "put it together" layer
Deleted User
2021-06-14 08:57:46
Related question: would it be possible to apply different amount of noise synthesis to different VarDCT layers?
veluca
2021-06-14 08:58:43
yep, but that likely needs a "put it together" layer
Deleted User
2021-06-14 09:01:16
"Put it together" layer? How would it work?
veluca
2021-06-14 09:03:09
you have 2-3 "pictures" layers that have their own noise levels, and then you paste them with patches on top of a final layer
2021-06-14 09:03:25
(possibly a layer with the screenshot parts)
Deleted User
2021-06-14 09:04:25
Ok, one last question: Modular and noise synthesis?
_wb_
2021-06-14 09:07:10
Modular can do all the stuff VarDCT can: patches, splines, noise, filters.
2021-06-14 09:07:46
(usually only patches would be used though, for lossless. But the bitstream allows it all)
Deleted User
2021-06-14 09:10:50
Thank you everyone for answers! ๐Ÿ˜ƒ
2021-06-14 09:11:37
I'm too stupid to understand such an advanced codebase, but I hope I'll ever be able to contribute and make some useful patches...
Scientia
_wb_ In other words: after spending ~80 minutes on reviewing carefully (putting my BenQ calibrated monitor to good use), in my opinion, the June 8th situation is still similar to what it was in the past: AVIF does a better job at high-appeal, low-fidelity (keeping nice and clean lines even at very bitrates), but is consistently worse than JXL at medium to high fidelity. AVIF especially has a problem in the darks (shadowy regions) and with subtle (low contrast) textures, which systematically get erased, turning all materials into glossy plastic. Even at high bitrates this remains a problem.
2021-06-15 02:34:09
I did like jxl more than avif even at low bpp on some of the more detailed images
2021-06-15 02:34:48
At the lowest settings it retained detail with artifacting while avif just blurred everything
Jyrki Alakuijala
2021-06-15 09:08:39
From what I hear both teams are making improvements to quality now
2021-06-15 10:11:05
great times for image quality enthusiasts ๐Ÿ™‚
Scientia At the lowest settings it retained detail with artifacting while avif just blurred everything
2021-06-15 10:12:21
I believe I will be able to reduce JXL artifacting 3x as complex consequences of the decision tree reversal in the next three weeks
2021-06-15 11:19:03
particularly excited I am about the improvements with d1 (d0.8 - d1.5) category, to get more robustness there, although the biggest improvements I observed in d3-d8 (especially with no or little filtering)
2021-06-15 11:20:12
I'd like a fire-and-forget system, where people can just do jxl:d1 and not to think about it, not to review the images if they actually worked (because "it just works")
2021-06-15 11:21:10
in the current head there are situations where d1 is not yet visually lossless in many situations (particularly so in some anime), and I am hoping to change that (or at least make a significant improvement)
Deleted User
2021-06-15 11:22:08
It already works waaaaay better than JPEG ๐Ÿ˜ƒ
Jyrki Alakuijala
2021-06-15 02:01:36
thank you!! ๐Ÿ˜„
Scientia
2021-06-15 02:27:25
For most people in regular jpeg q95-98 is the "fire and forget" option I think
2021-06-15 02:28:02
Having 1 be agreed on perceptual lossless is nice
Jyrki Alakuijala
2021-06-15 02:29:07
I agree with that -- when I reviewed normal jpeg results, I found out that 1 image out of 1000 was not perceptually lossless until I used q98
2021-06-15 02:29:41
q94 or q93 yuv444 seemed like the perfect compromise for me
2021-06-15 02:30:45
Google+ used to serve q93, while Facebook was serving the other end of quality at 72 and 73 (as identified by 'identify')
2021-06-15 02:31:07
that didn't help Google+ ๐Ÿ˜„
Scientia
2021-06-15 02:31:07
Wow 73 is pretty low
Jyrki Alakuijala
2021-06-15 02:31:38
I think Facebook has upgraded their quality from those times (not sure)
Scientia
2021-06-15 02:32:26
Maybe they at least use something like mozjpeg
2021-06-15 02:32:30
Though I doubt it
Deleted User
2021-06-15 02:36:31
> JPEG XL encoding at speed/effort 6 is as fast as JPEG encoding (using MozJpeg with Trellis encoding enabled). If they reference mozjpeg in speed comparisons, they're probably using it.
_wb_
2021-06-15 02:49:02
mozjpeg can have various speeds depending on encode options
fab
2021-06-15 03:08:21
https://www.instagram.com/p/CQG9egMFCuE/
2021-06-15 03:08:34
obviously fb uses mozjpeg
2021-06-15 03:08:40
i think fb not
2021-06-15 03:08:44
but instagram yes
2021-06-15 03:08:57
this photo is encoded with mozjpeg
2021-06-15 03:09:57
mozjpeg looks like a bit modular lossy jxl
2021-06-15 03:10:12
i made the error to sharpen some photo of this
2021-06-15 03:10:29
mozjpeg images are already pretty sharp even if they don't present detail
Deleted User
2021-06-15 04:04:20
Here's a direct link to a 1080p photo (hosted on Discord):
fab
2021-06-15 04:19:42
ahahah
2021-06-15 04:22:21
hhahah
2021-06-15 04:22:41
however jpeg xl can be a bit improvement for this type of photo and similar to AVIF
2021-06-15 04:23:09
building still i don't still particularly the grey grainy and noisy buildings
Fox Wizard
2021-06-15 04:25:04
Wonder if FB and Instagram actually use mozjpeg. When I drop any mozjpeg encoded files in a program like FileOptimizer it can't reduce the file size at all, but with FB and Insta it always reduces it with 1% - 5% (without removing metadata)<a:ThinkingSphere:821038590091329557>
2021-06-15 04:25:33
~~Or they use some fast settings at the cost of efficiency~~
2021-06-15 04:26:31
Similar for me for Twitter (usually around 2% reduction)
fab
2021-06-15 04:45:14
fb uses libjpeg
2021-06-15 04:45:18
instagram mozjpeg
2021-06-15 04:45:41
but fb images are smaller
2021-06-15 04:45:48
instagram images weight a lot
2021-06-15 04:45:59
like 190 kb - 340 kb
2021-06-15 04:46:12
rarely 182 - 92 kb
Scope
2021-06-15 04:47:50
fab
2021-06-15 04:48:37
yes but instagram images look sharper
2021-06-15 04:48:46
i think also fb uses mozjpeg
2021-06-15 04:49:06
there is a ringing effect 2:1:0 around q 78
2021-06-15 04:49:24
2021-06-15 04:49:58
i'm installing xnview
2021-06-15 04:50:03
to see estimated quality
_wb_
2021-06-15 04:56:59
Cloudinary uses mozjpeg, but not default mozjpeg (it's a bit too slow). I can imagine facebook does something similar.
fab
2021-06-15 05:09:01
xnview lacks estimated quality in the version i installed xnviewmp
2021-06-15 05:15:29
the second is estimated 63
2021-06-15 05:15:32
the first 80
_wb_
2021-06-15 05:21:08
Note that estimating quality in jpeg is not necessarily very accurate. You can have quantization tables of all ones (the most lossless thing jpeg can do, libjpeg -quality 100) but still do lossy trickery that makes it a much lower quality image.
2021-06-15 05:22:13
E.g. guetzli kind of works that way, and you cannot really estimate its quality (because it doesn't really _have_ a libjpeg-style uniform quantization)
Eugene Vert
lithium <@!532010383041363969> I get the same issue on gitlab issue 147 https://gitlab.com/wg1/jpeg-xl/-/issues/147 And full version image from https://www.pixiv.net/en/artworks/88346344 original png RGBA32 8bit 12.9MB to jxl lossless -s7 6.93MB
2021-06-15 08:53:53
`-d 1` on "Reversing the decision tree" pull request. size: 1,237,529 -> 1,221,946 webp animation: old -> Jyrki patch -> original <https://cdn.discordapp.com/attachments/852294618694942750/854459641056722944/jxl_patch_cmp_d1.webp>
Crixis
2021-06-15 09:21:31
Anime fixed
Jyrki Alakuijala
2021-06-18 07:46:54
Eugene, thank you!!! ๐Ÿ˜„
2021-06-18 07:47:42
I'll try to make a similar further improvement by adjusting the heuristics to benefit from this change more ๐Ÿ˜„
Crixis
2021-06-19 09:46:17
Can you spot which is the new Jyrki commit?
improver
2021-06-19 10:48:42
tbh both look bad but first one looks less bad in some places
Crixis
2021-06-19 10:54:45
new commit is right
2021-06-19 10:56:21
is -d 6, to me new commit is a LOT better, no random colourful noise on flat area
2021-06-19 10:56:48
and smoother borders
improver
2021-06-19 10:57:47
i see random colorful noise in both sides
2021-06-19 10:59:04
is new encode smaller? or is it the same size?
Crixis
2021-06-19 11:03:08
113 KB (old) vs 110 KB (new)
improver
2021-06-19 11:03:26
some rose petals look better on the right, some green leaves look better on the left
2021-06-19 11:03:48
if it ends up smaller that explains why its not superior
Crixis
2021-06-19 11:07:18
-d 4
2021-06-19 11:07:23
improver
2021-06-19 11:09:42
could you try adjusting quality a bit so that they end up matching in size?
Deleted User
2021-06-19 11:10:31
They both have their own kind of artifacts
2021-06-19 11:11:04
Could you upload them as separate images? It'd be waaaay easier to flick between them.
Crixis
2021-06-19 11:26:15
Original
2021-06-19 11:26:25
2021-06-19 11:26:30
old
2021-06-19 11:26:35
2021-06-19 11:26:47
new
2021-06-19 11:26:55
raysar
Crixis Can you spot which is the new Jyrki commit?
2021-06-19 01:57:49
Right image have less visual artifacts ๐Ÿ˜
_wb_
Crixis
2021-06-19 02:28:52
new image does have noticeably less ringing even though it's almost 3% smaller
fab
2021-06-19 08:18:47
this better for some jpgs
2021-06-19 08:18:57
it introduces more distortions
2021-06-19 08:18:59
it prettify
2021-06-19 08:19:17
2021-06-19 08:20:10
new encoder you can make finetuning of quality and better standard quality at s 7 and d 1
2021-06-19 08:20:16
it's designed for that use
2021-06-19 08:20:27
but i think it's designed for png at -d 4r
2021-06-19 08:20:35
and not for lossy jpg
2021-06-19 08:20:47
although you can do lossy jpg but is way less efficient
2021-06-19 08:22:15
v0.3.7-157-gf6d3a89 win_x64 sse4 2021.06.19
2021-06-19 08:22:31
if you want less distortions so you want a natural image
2021-06-19 08:22:51
and compression
2021-06-19 08:22:58
and not great edge compression
2021-06-19 08:23:01
you can use
2021-06-19 08:23:28
i think best compromise is a raw image with -d 4 -s 8
2021-06-19 08:24:52
though the jxl looks like a different resolution
2021-06-19 08:25:23
i see only her chin a bit lower in jxl photos
2021-06-19 08:25:36
but is a good compromise to me
2021-06-19 08:27:32
she looks a bit different like maria elena boschi, a president in jxl, in jpg it looks like a south compain worker
2021-06-19 08:27:57
a lot of DCT coefficient DCT
2021-06-19 08:29:04
I have to say it looks better than webp and jpg together
2021-06-19 08:29:08
good compression
2021-06-19 08:30:06
2021-06-19 08:30:15
that's a particular of jpg image
2021-06-19 08:30:23
you can see her skin ceading
2021-06-19 08:31:17
like her nose remain still behind and the cheeks on the right looks very off
2021-06-19 08:31:31
in the jpg you can see her becoming older
2021-06-19 08:31:39
in the jxl there isn't nothing of this
2021-06-19 08:33:04
probably jxl in the new heuristics tries to deblock harder and not guess the intensity of deblock
2021-06-19 08:33:34
that's what i hate about new heuristics but for other encoder is transparent on photos with no super great color range
2021-06-19 08:37:04
2021-06-19 08:37:16
original looks better
2021-06-19 08:37:35
obviously the jxl looks sharpened
2021-06-19 08:37:42
but is a good compromise
diskorduser
2021-06-19 08:45:17
I don't understand your comparison. Why are using a compressed jpg as source?
2021-06-19 08:47:56
Just use lossless recompression jpg mode.
fab
2021-06-20 05:26:17
this is case when even ewp2 can't encode good
2021-06-20 05:26:38
jxl can but at cost of some distortion
2021-06-20 05:27:02
this two are all settings for jpg
2021-06-20 05:27:15
before i used worse encoders
2021-06-20 05:27:41
there is th generation loss problem
2021-06-20 05:27:48
that has to be considered
diskorduser I don't understand your comparison. Why are using a compressed jpg as source?
2021-06-20 05:29:27
i agree that is loss of details, jxl image looks plasticky and artificial. also new encoder is meant to generate more distortions obviously if you have a raw it will happen less
diskorduser
2021-06-20 07:12:53
You could just download raw photos from internet and develop them and use them as source for comparison.
raysar
2021-06-20 08:20:38
Hello, is there an easy soft to mesure "picture entropy"? i think it's better to use it against bit per pixel. Bit per pixel divided by entropy level could be better ๐Ÿ˜„
_wb_
2021-06-20 08:33:36
Could use png size as a proxy I guess
raysar
2021-06-20 08:34:49
I understand that there is: shannon entropy Spatial Disorder Entropy Generalized Ising Entropy Monkey Model Entropy Aura Matrix Entropy But don't know where i can use it ^^ Ok ratio bmp vs png could aproxymate entropy? ^^
_wb_
2021-06-20 08:39:27
For lossless, whatever gives the best lossless compression is the best upper bound available for the actual Kolmogorov complexity
2021-06-20 08:40:00
For lossy, it's... complicated
raysar
2021-06-20 10:25:05
i'm only interested to "estimate" the visual complexity for comparing images with same "complexity".
lithium
2021-06-21 03:19:02
This issue sample from av1 server Just MPEG-LAlena(Tim's Mom)โ„ข, cjxl -d 1.0 -s 8 have some ringing issue on dark red floor for anime content image, (I still can see some tiny noticeable ringing on cjxl -d 0.5). > original-full jpeg q100 444 to floor-original-cut png rgb24
2021-06-21 03:19:12
floor-original-cut
2021-06-21 03:19:23
floor-original-cut_d1.0_s8
2021-06-21 03:19:35
floor-original-cut_d1.45_s8
2021-06-21 03:19:43
floor-original-cut_d1.9_s8
2021-06-21 03:19:48
floor-original-cut_d0.5_s8
eddie.zato
2021-06-22 06:08:32
Still waiting for JXL to be good on comicbook images. ```PowerShell PS > avifenc 0.png 1.avif -j 4 -r f -y 444 --min 12 --max 12 -s 4; avifdec 1.avif 1.png PS > (ls 1.avif).Length 57875 PS > cjxl 0.png 2.jxl -e 8 -I 1 --target_size=57875; djxl 2.jxl 2.png PS > ssimulacra 0.png 1.png; ssimulacra 0.png 2.png 0.00605603 0.01064027 ```
2021-06-22 06:08:47
Original enlarged crop
2021-06-22 06:08:55
AVIF
2021-06-22 06:09:13
JXL. Notice how the image has lost the white in the hair.
190n
2021-06-22 06:39:42
oof
2021-06-22 06:39:54
JXL is a lot noisier too, notice teal artifacts in the bottom right
2021-06-22 06:40:26
what did the file size of the jxl end up being?
_wb_
2021-06-22 06:42:37
It's possible that -e 8 does worse than -e 7 on these images
190n
2021-06-22 06:43:53
oh wow i have old libjxl, missed that the aur package got renamed
eddie.zato
190n what did the file size of the jxl end up being?
2021-06-22 07:21:58
The size is the same. I used `--target_size` to match the AVIF file size and to compare quality only.
190n
2021-06-22 07:22:23
interesting
2021-06-22 07:22:57
my cjxl doesn't have `--target_size`, does that tune `-d` until the size matches or use some other method? targeting a specific size isn't always the best for efficiency
eddie.zato
2021-06-22 07:25:35
Yeah, it tries several times with different `-d`.
190n
2021-06-22 07:25:58
nice
2021-06-22 07:26:14
ooh the code to do that must be interesting, you could probably binary search or something
_wb_
2021-06-22 07:28:17
that's what it does โ€” until the size is close enough. It's a slow way to encode but practical for benchmarking (comparing at same bpp is the fairest thing to do)
2021-06-22 07:39:39
for lossy illustrations of the "ligne claire" type, AVIF does get nicer looking results still. There has been progress on improving jxl on these type of images, and there's likely still a lot of room for encoder improvements (especially if we would find ways to actually use splines in an encoder), but the current situation is that avif encoders can go to lower bpp while looking good on these images
2021-06-22 07:42:22
In my opinion the main problem with low bpp AVIF are the smearing/smudging/smoothing artifacts that make a photo look like a bit like an illustration of the "ligne claire" type. These artifacts are perfect if that's the style anyway ๐Ÿ™‚
John Smith
2021-06-22 07:44:25
Am I understanding it correctly: splines are like brush strokes, and in theory it would be possible for painter program to directly convert brush strokes from a tablet to splines when saving?
eddie.zato
2021-06-22 07:57:28
AVIF is slower and loses some detail because of its excessive smoothness. In this case, I think we need something in between AVIF and the current JXL.
lithium
2021-06-22 08:08:11
Something interesting comment from Hacker News, > https://news.ycombinator.com/item?id=27577328 > pavon > Yeah, I agree that webp looks better for many of the images. For most of them it comes back to the subjective issue that webp (and VP9) choose to err on the side of blurring detail they can't encode, while jpeg XL (and x264, etc) try to keep all the detail they can at the expense of more artifacts. There are very vocal proponents of both approaches, and personally I think it varies by the image content. > For all these examples, I was comparing at Small (as with Tiny they were both bad enough but in different ways that I often couldn't decide which was least bad). For the Abandoned Factory and Panthera Tigres, I think the extra detail of JXL looks better than the blurring of WEBP. On the otherhand, I think WEBP looks cleaner than JXL for Buenos Aires, Reykjavik, B-24 Bombers without loosing significant detail. And Avenches is a mix as JXL looks much better than WEBP for the trees and tile roof, but has worse chroma artifacts near the edges of the hat and clothing. > But that isn't the whole story, as for some of the images WEBP seems to both preserve more detail, and have fewer artifacts, such as Air Force Academy Chapel, Pont de Quebec, Steinway and White Dunes. What all these cases seem to have in common is a smooth gradient adjacent to sharp detail. WEBP seems to do a much better job of dealing with that boundary by blurring the smooth part, put preserving the sharp lines. > And if you bump up to WEBP2, the number of cases where it both preserves more detail and has fewer artifacts than JXL increases significantly. I think for current jxl can't work very well on smooth gradient and sharp lines detail area(anime content), probably vardct improve from Jyrki Alakuijala can solve this issue?
_wb_
John Smith Am I understanding it correctly: splines are like brush strokes, and in theory it would be possible for painter program to directly convert brush strokes from a tablet to splines when saving?
2021-06-22 08:20:02
Yes, that should be possible in principle. The strokes can vary in thickness and color along the path too. If I'm not mistaken (<@!604964375924834314> correct me if I'm wrong) they are centripetal Catmull-Rom splines (https://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline) with an arbitrary number of control points. The thickness and color are (unfortunately) not entropy coded (it's a fixed cost per spline), the control points themselves are compressed though, so you can have quite complex shapes without necessarily needing a lot of bytes.
2021-06-22 08:22:18
VarDCT block selection improvements can also help a lot โ€” e.g. we're at the moment only doing naturally aligned blocks that don't cross the 64x64 grid, while potentially the bitstream allows floating blocks (non-naturally aligned) that could move freely within the 256x256 grid.
2021-06-22 08:26:12
Another thing that might be worth doing is to use patches as a way to emulate AVIF's palette blocks. In jxl, such 'palette blocks' can have any rectangular shape and positioning, aren't restricted to 8 shades per component, and they can benefit from better lossless entropy coding, so it's in principle strictly more powerful than what AVIF can do โ€” except the jxl encoder isn't trying to do it (and it's not easy to come up with a good way to do it either, in general, without making a very slow encoder).
eddie.zato
2021-06-22 08:41:16
> a very slow encoder Will it affect the decoding speed?
_wb_
2021-06-22 08:42:17
Splines and patches a bit yes, depending on how many of those have to be drawn.
2021-06-22 08:47:30
Though if they reduce entropy of the dct part, it may not be much of a net speed penalty
eddie.zato
2021-06-22 08:54:22
I've been testing several comic books. Converted them to JXL and AVIF. AVIF's decoding speed in its current state is some pain when you need to scroll through a book quickly. For my purpose, I need JXL to be just a little better in quality for "ligne claire" (need to remember ๐Ÿ˜„) type images.
_wb_
2021-06-22 09:08:58
we're getting there, Jyrki's recent and upcoming improvements in block selection are helping a lot for those
_wb_ Though if they reduce entropy of the dct part, it may not be much of a net speed penalty
2021-06-22 09:10:14
quick test on a screen shot where quite a bit of patches are used: with patches: 564806 bytes, 3-norm: 0.630946 2560 x 1440, geomean: 70.02 MP/s [35.12, 80.49], 30 reps, 4 threads. without patches: 627161 bytes, 3-norm: 0.677592 2560 x 1440, geomean: 76.06 MP/s [35.87, 88.73], 30 reps, 4 threads.
2021-06-22 09:10:33
so there is some decode speed penalty but it's worth it
spider-mario
190n ooh the code to do that must be interesting, you could probably binary search or something
2021-06-22 09:45:43
for VarDCT, not quite binary searchโ€ฏโ€”โ€ฏthe target butteraugli distance is multiplied by the ratio โ€œactual size รท target sizeโ€, for 7 iterations
2021-06-22 09:48:51
it tends to work quite well: ``` $ tools/cjxl --target_bpp=0.7 _12A2284.png out.jxl JPEG XL encoder v0.3.7 [AVX2,SSE4,Scalar] Butteraugli distance 2.270 yields 1383878 bytes, 0.546 bpp. Butteraugli distance 1.772 yields 1612165 bytes, 0.637 bpp. Butteraugli distance 1.611 yields 1736309 bytes, 0.686 bpp. Butteraugli distance 1.578 yields 1764706 bytes, 0.697 bpp. Butteraugli distance 1.571 yields 1770677 bytes, 0.699 bpp. Butteraugli distance 1.569 yields 1772407 bytes, 0.700 bpp. Butteraugli distance 1.569 yields 1772928 bytes, 0.700 bpp. Read 5554x3648 image, 17.5 MP/s Encoding [VarDCT, d1.569, squirrel], 16 threads. Compressed to 1772928 bytes (0.700 bpp). 5554 x 3648, 20.33 MP/s [20.33, 20.33], 1 reps, 16 threads. ```
improver
Crixis
2021-06-22 01:43:04
flipping thru them, i can say that with inversion it is more better than worse, but there are still locations where it IS worse. encodes with more equal filesize would probably help either confirming or eliminating doubts why that happens
2021-06-22 01:44:00
2021-06-22 01:44:02
without inversion
2021-06-22 01:44:09
2021-06-22 01:44:11
with inversion
2021-06-22 01:45:34
without inversion is clearly more close to original and artifact is overall less noticeable in this case
Crixis
improver
2021-06-22 01:46:56
I see a lot more rigging on this
improver
2021-06-22 01:49:26
I see red color alteration near the line in inversion version
2021-06-22 01:49:36
which is more noticeable to me
2021-06-22 01:51:26
2021-06-22 01:51:30
non-inversion
2021-06-22 01:51:36
2021-06-22 01:51:40
with inversion
2021-06-22 01:52:04
there is noise in both but without inversion one looks smoother from a bit further
2021-06-22 01:53:16
I'm just pointing out areas where i find new version to be worse -- it looks better in most cases
_wb_
2021-06-22 01:55:48
in general I see the ringing getting less far away from the hard edge - there is still ringing, but it is closer to the edge itself
2021-06-22 01:56:58
those distant haloes/ripples are likely caused by doing dct on a too big block around the edge, better block fitting can avoid that
fab
2021-06-22 01:57:42
i just want jxl to do good when the encoded is all blurred
2021-06-22 01:57:44
like avif
2021-06-22 02:00:50
is because isn't based off video
2021-06-22 02:00:56
so it tries to guess quantization
2021-06-22 02:01:02
based on your input
_wb_
2021-06-22 02:01:03
I want to preserve low-contrast texture too, not basically vectorize the image into clean hard lines and smooth regions
fab
2021-06-22 02:01:19
youtube use hw av1
2021-06-22 02:01:25
and is even worse
2021-06-22 02:01:35
less blocking in dark areas
2021-06-22 02:01:44
but worse quality
_wb_
2021-06-22 02:03:58
in general hw encoders tend to be worse than sw encoders for any codec, they're aimed at fast and cheap encode but typically make compromises in what bitstream features get used and how
2021-06-22 02:04:37
the hardware jpeg encode in your camera is very stupid compared to mozjpeg
Crixis
improver
2021-06-22 02:04:44
In this also I like more the not inversion mode, same level of rigging but little more precise color, but not a big deal for me
Eugene Vert
2021-06-23 08:59:09
Tables w/ results `cjxl -m` (v0.3.7 409efe0) Set 1: https://docs.google.com/spreadsheets/d/1zpdrQdr-Gd8FqQxhEi2FSrpd9TeC39YD0uwLxaO6xzM/edit?usp=sharing Set 2: https://docs.google.com/spreadsheets/d/1lgLTP07g-EQQSWOWKEvpxmYAhS5EIujsEcvqJQDglFI/edit?usp=sharing
lithium
2021-06-23 10:58:14
Look like sometime lossless modular can't choose best method for png pal8 image, need specify some modular option.
_wb_
2021-06-23 11:18:19
we need to find better ways to do lossless at -e 4 to -e 8, it's currently spending a lot of time on tree learning and not enough time on trying different predictors etc
Deleted User
_wb_ we need to find better ways to do lossless at -e 4 to -e 8, it's currently spending a lot of time on tree learning and not enough time on trying different predictors etc
2021-06-23 12:28:20
Which ones does it try now?
_wb_
2021-06-23 12:47:44
IIRC best of gradient and weighted, not trying the rest at all
Deleted User
2021-06-23 12:57:28
You've just reminded me of an issue with cjxl... https://discord.com/channels/794206087879852103/804324493420920833/852136639546523668
Eugene Vert
Eugene Vert `-d 1` on "Reversing the decision tree" pull request. size: 1,237,529 -> 1,221,946 webp animation: old -> Jyrki patch -> original <https://cdn.discordapp.com/attachments/852294618694942750/854459641056722944/jxl_patch_cmp_d1.webp>
2021-06-23 08:16:38
"Tuning ac strategy heuristics 4569267" vs "Reversing the decision tree 3259467" `cjxl -d 1` size: 1221915 -> 1216365 webp animation: `3x zoom` old -> new -> original <https://cdn.discordapp.com/attachments/852294618694942750/857352535894261770/4569267_d1.webp>
fab
2021-06-23 08:23:58
why bigger file size
Eugene Vert
fab why bigger file size
2021-06-23 08:33:10
It's commit hashes) upd: Added file-sizes
_wb_
2021-06-23 08:37:18
I'd say it does look better, less ringing overall. Sometimes the ringing just moves position, but often it gets better.
2021-06-23 08:39:09
It's also slightly lower bpp so overall that's a win
Scope
2021-06-23 11:26:01
Some tests with images I already compared some time ago: Source
2021-06-23 11:26:11
AVIF
2021-06-23 11:27:01
JXL old (2fc78ac54fc3d4f6bc8adf626c9216a5ed8a8ad1, before "Reversing the decision tree")
2021-06-23 11:27:13
JXL new
2021-06-23 11:29:17
(there is more noticeable ringing with the new build)
2021-06-23 11:31:52
Source
2021-06-23 11:32:02
AVIF
2021-06-23 11:32:12
JXL old
2021-06-23 11:32:21
JXL new
2021-06-23 11:39:13
Source
2021-06-23 11:39:23
AVIF
2021-06-23 11:39:31
JXL old
2021-06-23 11:39:40
JXL new
2021-06-23 11:39:51
Source
2021-06-23 11:40:22
AVIF
2021-06-23 11:40:37
JXL old
2021-06-23 11:40:49
JXL new
2021-06-23 11:41:19
Source
2021-06-23 11:41:32
AVIF
2021-06-23 11:41:42
JXL old
2021-06-23 11:41:50
JXL new
2021-06-23 11:42:07
Source
2021-06-23 11:42:14
AVIF
2021-06-23 11:42:21
JXL old
2021-06-23 11:42:28
JXL new
Scope Some tests with images I already compared some time ago: Source
2021-06-23 11:44:45
In general on medium-low bpp the latest changes are mostly better, except this image
Deleted User
2021-06-23 11:45:23
Are you sure you didn't mix them up?
Scope
2021-06-23 11:45:40
Yep
2021-06-23 11:55:17
Source
2021-06-23 11:55:25
AVIF
2021-06-23 11:55:33
JXL old
2021-06-23 11:55:41
JXL new
Eugene Vert
Scope JXL old (2fc78ac54fc3d4f6bc8adf626c9216a5ed8a8ad1, before "Reversing the decision tree")
2021-06-24 12:43:08
What arguments did you use? I can't get similar-looking results by using distances from `-d 1` to `-d 5` (old cjxl from april)
Scope
2021-06-24 12:45:10
`-s 8 --target_size=` Where the size is taken from the AVIF size
2021-06-24 12:46:29
All images from the comparison are the same size (I did not compare the same `-d`)
Eugene Vert
2021-06-24 01:04:54
Found it, it's near `-d 3.8` (new cjxl) size: 79085 (0.55 bpp)
2021-06-24 01:11:13
btw `-d 3.5` and `-d 4` artifacts are not that noticeable
2021-06-24 01:35:28
But yep, AVIF did very well for such bpp (Any low-contrast details is wiped out, but image appeal is there)
fab
2021-06-24 05:19:28
the one with hat is no win, th one with dark hair avif wins, the female looks better in jxl (I prefer jxl); the one with flowers i hate avif, bulma looks hanced with AVIF, it's a big no; last one both looks bad;
2021-06-24 05:22:06
compare with cavif rs 1.3.0 at similar size using q
2021-06-24 05:22:10
start from first image
2021-06-24 05:22:23
then do same q for every image, do not change it
lithium
Scope `-s 8 --target_size=` Where the size is taken from the AVIF size
2021-06-24 06:35:30
Thank you for your work <@!111445179587624960> ๐Ÿ™‚
fab
2021-06-24 08:11:28
i'm doing new encoding at lower settings
2021-06-24 08:12:16
the files are big with progressive
2021-06-24 08:12:23
there is now the same bug
2021-06-24 08:22:21
the color was encoded wrong
2021-06-24 08:38:51
2021-06-24 08:38:51
2021-06-24 08:38:51
2021-06-24 08:38:52
2021-06-24 08:38:53
2021-06-24 08:38:55
2021-06-24 08:38:56
2021-06-24 08:42:08
for %i in (C:\Users\User\Documents\source\*.png) do cjxl -q 58.59 -s 7 -p %i %i.jxl
2021-06-24 08:42:57
2021-06-24 08:43:05
source.zip are encoded jxl files with q 58.59
2021-06-24 08:43:18
distance is d 3.827
2021-06-24 08:57:16
2021-06-24 08:58:18
the mainly improvement is the compression that now at speed 7 it can reach 0.275 bpp more easily
2021-06-24 09:03:01
mostly in the 0.414 bpp 0.629 bpp range you'll notice the improvements and with cartoons/ anime drawings and solid objects/screenshots
2021-06-24 09:04:04
the mouth can looks less oriented in right and more oriented at left but you gain compression
2021-06-24 10:05:10
-d 3.35613 -s 2 --use_new_heuristics
_wb_
2021-06-24 10:56:37
does anyone have a recent PC to run some speed comparisons? I would like to see timings for cjxl (at various speed settings) compared to aom, rav1e, svt avif encoding
2021-06-24 10:58:06
(let's say at a few different bpp ranges, because things are different for -d 1 than for -d 4, also between different q settings in avif)
fab
2021-06-24 11:32:36
aom is about 8 seconds a image, cavif rs is 5x slower, svt don't know
Orum
2021-06-24 03:11:42
VPS are affected by literally all the other VPSes running on the same hardware
2021-06-24 03:12:26
I've done comparisons but they're all only for lossless (and only vs webp)
2021-06-24 03:19:10
main issue with doing lossy comparisons is it inevitably ends with people arguing about what metric you used, how you applied the metric, etc.
Jyrki Alakuijala
Scope Source
2021-06-24 09:47:41
Thank you, this is very useful for me.
Scope `-s 8 --target_size=` Where the size is taken from the AVIF size
2021-06-25 01:05:04
It looks to me that AVIF is still much better for this content at these bitrates, but the reversal of decision tree reduced the gap by 15 % or so
Scope
2021-06-25 01:12:31
Yes, because AVIF is very good at maintaining clarity and structure of lines and contours, and they are most noticeable in images like this
Scope Some tests with images I already compared some time ago: Source
2021-06-25 01:42:09
The same images size with: <https://github.com/libjxl/libjxl/pull/221>
2021-06-25 01:42:31
2021-06-25 01:42:31
2021-06-25 01:42:32
2021-06-25 01:42:33
2021-06-25 01:42:35
2021-06-25 01:42:35
2021-06-25 01:42:35
2021-06-25 01:45:38
All images have less ringing (maybe not in all areas, but overall better)
Jyrki Alakuijala
2021-06-25 02:03:48
thank you ๐Ÿ˜„
2021-06-25 02:04:03
I will be able to make a similar or slightly better improvement next
2021-06-25 02:04:08
likely tomorrow
2021-06-25 02:04:35
Scope, did you ever try delta palette?
Scope
2021-06-25 02:09:58
Other than last time, no, I think there still need some fixes
Jyrki Alakuijala
2021-06-25 02:20:07
it might work well for the three girls anime picture
Scope
2021-06-25 02:23:13
At higher quality, maybe, but these comparisons are mostly at medium and low bpp
2021-06-25 02:29:23
The lossy-palette images are 2-5 times larger than these examples, perhaps if there was a choice of modes like in WebP, some might be of comparable size with better quality than VarDCT
Jyrki Alakuijala
Scope All images have less ringing (maybe not in all areas, but overall better)
2021-06-25 02:39:27
It is surprising that a 0.14 % improvement can be so clearly visible -- of course it is not a day-and-night kind of difference, but this is indeed a change for the better
Scope
2021-06-25 02:51:25
I think if there was a metric only for ringing artifacts, the difference would be higher
raysar
Jyrki Alakuijala It is surprising that a 0.14 % improvement can be so clearly visible -- of course it is not a day-and-night kind of difference, but this is indeed a change for the better
2021-06-25 03:22:54
I don't understand what is the "pnorm" metric.
Jyrki Alakuijala
2021-06-25 08:42:47
'pnorm' is a p-norm of the butteraugli field, almost
2021-06-25 08:43:12
'a 3-norm' is actually an average of 3 norm, 6 norm and 12 norm
2021-06-25 08:43:29
psnr, ssim, and most other metrics use a 2 norm
2021-06-25 08:43:48
they allow a lot of error somewhere if the image is mostly good
2021-06-25 08:44:15
a higher norm penalises a higher amount of error more
2021-06-25 08:44:28
infinity norm woult be just taking the maximum error
2021-06-25 08:45:35
https://en.wikipedia.org/wiki/Lp_space
Scope I think if there was a metric only for ringing artifacts, the difference would be higher
2021-06-25 09:04:27
I share that sentiment and I consider that it has been a mistake from my side not to have a separate approach to emphasize ringing -- it's impact seems to much higher at lower quality than just linearly scaling from the just-noticeable-error boundary
2021-06-25 09:04:49
also it is more prominent on artificial images than on photographs, and butteraugli was mostly tuned for photographs
2021-06-25 09:05:49
I'm thinking of fixing that mistake and introducing a ringing part into a quality metric once there is small enough quantity of ringing appearing
2021-06-25 09:06:03
then we can use adaptive quantization more effectively to suppress the ringing
2021-06-25 09:06:23
... currently I believe that often the 8 and 9 speed modes ring more than the 7 mode
2021-06-25 09:07:01
... at least I had to try to put 'breaks' on the 8 and 9 speeds to avoid it going too far from the 7 mode because of that problem
2021-06-25 09:08:47
when ringing is present in less than 1-2 % of the surface area then we can relatively cheaply just ramp up the adaptive quantization ~50 % in those areas, possibly also put some more smoothing there (yikes!)
2021-06-25 09:21:42
Scope, I mentioned your anime verification work in https://github.com/libjxl/libjxl/pull/221 ๐Ÿ˜„
2021-06-25 09:23:28
it is inspiring and most helpful to see what happens with this material -- thank you for running these, especially when it comes with opinions on what is going wrong
eddie.zato
2021-06-25 11:31:34
Tried `cjxl` with the `ea8926c` commit. Dunno if this is worse or better. It just looks different. `ssimulacra` says it is slightly better. The previous version without the last two improvements along with the original and avif is here https://discord.com/channels/794206087879852103/803645746661425173/856777833627123763
2021-06-25 11:31:53
Hey, the white in hair almost came back.
2021-06-25 11:39:33
Ok, it's certainly better.
Jyrki Alakuijala
eddie.zato Hey, the white in hair almost came back.
2021-06-25 11:51:11
that's a big improvement -- thank you for showing, it gives me motivation to do more of such improvements!
2021-06-25 11:52:03
I like how it has somehow now more contrast and vividness, too (in addition to more precision)
2021-06-25 11:53:26
https://github.com/kornelski/dssim/issues/102 is interesting
fab
2021-06-25 12:07:46
to me cavif rs 1.3.0 would look more natural
2021-06-25 12:07:49
and better
2021-06-25 12:07:58
drag and drop the imaged
2021-06-25 12:08:29
ah i don't have the original image
Jyrki Alakuijala
190n ooh the code to do that must be interesting, you could probably binary search or something
2021-06-25 01:18:22
it is an approximate newton's method, far better than just binary search
eddie.zato AVIF is slower and loses some detail because of its excessive smoothness. In this case, I think we need something in between AVIF and the current JXL.
2021-06-25 01:18:45
Getting there
lithium
2021-06-26 04:12:33
I can't make clear this error, probably like a ringing issue?
fab
2021-06-26 04:25:41
i see blocking
2021-06-26 04:26:38
if you use libjxl v0.3.7-169-g1f7445a and especially with new heuristics and gaborish 0 as jon said you'll get blocking
2021-06-26 04:28:00
jpeg xl is too early to use, like it got adopted to cloudinary auto q today
2021-06-26 04:28:19
give them at least 6 months