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

lithium
2021-07-03 06:38:16
Holiday mode πŸ˜›
2021-07-03 06:55:55
https://discord.com/channels/794206087879852103/803645746661425173/860925867550310462 Some supplement information Artist: γ‚†γŸγΎγ‚ > https://www.pixiv.net/users/1566535 Touhou Project-Hata no Kokoro (秦 こころ) > https://www.pixiv.net/artworks/54764555
diskorduser
lithium https://discord.com/channels/794206087879852103/803645746661425173/860925867550310462 Some supplement information Artist: γ‚†γŸγΎγ‚ > https://www.pixiv.net/users/1566535 Touhou Project-Hata no Kokoro (秦 こころ) > https://www.pixiv.net/artworks/54764555
2021-07-03 07:25:03
Cute
raysar
2021-07-04 12:02:51
-s 9 seem to be always visually better. For same file size -s 7 d2.2 or d2.3 == -s 9 d2
2021-07-04 12:45:11
decision are not always perfect :p color variation is visible here. 800% zoom and d1 is 1/10 the png file size.
Scope
Scope <https://github.com/libjxl/libjxl/pull/262>
2021-07-04 06:29:48
<https://github.com/libjxl/libjxl/pull/273>
2021-07-04 06:30:00
2021-07-04 06:30:00
2021-07-04 06:30:00
2021-07-04 06:30:00
2021-07-04 06:30:01
2021-07-04 06:30:01
2021-07-04 06:30:02
2021-07-04 06:32:26
It's overall better and less of the most noticeable ringing artifacts
lithium
2021-07-04 06:57:46
cool, I only try s7 and s8, I never thought s9 can get better quality.
fab
2021-07-04 07:01:47
when it gets really better compression quality everything else is
2021-07-04 07:01:52
for %i in (C:\Users\User\Documents\imf5*.png) do cjxl -q 97.6 --epf=1 --faster_decoding=4 -p -s 7 --use_new_heuristics %i %i.jxl
2021-07-04 07:01:59
about -d 4.38 i was joking
2021-07-04 07:02:02
quite decent blurring
2021-07-04 07:02:10
but jxl isn't designed to get here
2021-07-04 07:02:16
webp like does better
Scope
lithium cool, I only try s7 and s8, I never thought s9 can get better quality.
2021-07-04 07:12:03
`-s 9` may give better quality, especially on art content and after recent changes in VarDCT, but I would say that it is not always very consistent and sometimes there can be unexpected strange artifacts (so for me for now `-s 8` remains the safer choice)
Scope <https://github.com/libjxl/libjxl/pull/273>
2021-07-04 07:13:09
The same images but with `-s 9`, for example
2021-07-04 07:13:16
2021-07-04 07:13:17
2021-07-04 07:13:17
2021-07-04 07:13:17
2021-07-04 07:13:18
2021-07-04 07:13:18
2021-07-04 07:13:19
Scope
2021-07-04 07:22:22
A little better overall, but there are strange things, like in this area
fab
2021-07-04 07:22:28
jpeg xl is optimized for the highest bitrate possible
2021-07-04 07:22:40
not for webp comparison
lithium
Scope A little better overall, but there are strange things, like in this area
2021-07-04 07:25:49
yes, I can see some strange area on s9.
Scope
Scope <https://github.com/libjxl/libjxl/pull/273>
2021-07-04 12:11:08
<https://github.com/libjxl/libjxl/pull/276>
2021-07-04 12:11:20
2021-07-04 12:11:21
2021-07-04 12:11:21
2021-07-04 12:11:22
2021-07-04 12:11:22
2021-07-04 12:11:22
2021-07-04 12:11:22
2021-07-04 12:14:11
Slightly less ringing artifacts, maybe I need some examples with bigger distances on which the difference would be more noticeable
raysar
Scope Slightly less ringing artifacts, maybe I need some examples with bigger distances on which the difference would be more noticeable
2021-07-04 12:16:56
What are the distance of you image compression?
Scope
2021-07-04 12:18:25
Various, from 0.2 bpp to 0.9 bpp (~`-d 2` ... `-d 5`), depending on the size of AVIF images
raysar
Scope Various, from 0.2 bpp to 0.9 bpp (~`-d 2` ... `-d 5`), depending on the size of AVIF images
2021-07-04 12:21:38
But we can compare all iteration of same picture you upload?
Scope
2021-07-04 12:26:14
All images are the same size, I leave a quote for past comparisons with past builds, the sources and AVIF images was in the very first message So it's possible to see the progress and compare different changes to each other
spider-mario
fab jpeg xl is optimized for the highest bitrate possible
2021-07-04 01:59:34
not _quite_, as that would mean it doesn’t compress
diskorduser
2021-07-04 02:35:33
Can jxl compress pictures with low artifacts at low bpp when used with avif source? Like use avif as texture denoiser.
fab
diskorduser Can jxl compress pictures with low artifacts at low bpp when used with avif source? Like use avif as texture denoiser.
2021-07-04 02:36:54
you could try downloading those thumbnails
2021-07-04 02:36:55
https://music.youtube.com/playlist?list=PLic8c70Da8qigm7NXv6a5w7D2uLRkTxCy&feature=share
2021-07-04 02:37:09
are 100 songs
2021-07-04 02:37:24
but you won't get original webp
2021-07-04 02:37:32
i guess you can download only jpg
2021-07-04 02:37:36
and is a limit
diskorduser
2021-07-04 02:40:30
You can download webp. It's there. But I don't understand why is it needed
2021-07-04 02:41:07
https://i.ytimg.com/vi_webp/dgxwEmU2_Oc/maxresdefault. webp
fab
diskorduser You can download webp. It's there. But I don't understand why is it needed
2021-07-04 02:50:00
you know all
2021-07-04 02:50:47
how to download all 100 thumbnails in webp with youtube-dl
2021-07-04 02:51:08
is there a script you can do
diskorduser
2021-07-04 02:55:12
No script is needed. You can just use shell commands.
fab
2021-07-04 03:26:11
no with browser, i want to do in cmd
diskorduser
2021-07-04 03:49:10
I know only Linux commands. I don't know about windows cmd.
fab
2021-07-04 04:13:22
so you know how to download the one hundred webp in a second
2021-07-04 04:13:35
can send a compressed file
2021-07-04 04:13:51
is the command that long
raysar
diskorduser Can jxl compress pictures with low artifacts at low bpp when used with avif source? Like use avif as texture denoiser.
2021-07-04 08:36:26
it's not a good idea. jxl "denoise" also when you compress more. Using a real denoiser tuned with eye is a good solution if you want to reduce file size.
diskorduser
2021-07-05 01:46:14
But avif blurs textures and keeps lines sharp, making pictures look good at low bpp. A denoiser denoises everything.
_wb_
2021-07-05 06:02:50
A good denoiser doesn't
eddie.zato
2021-07-06 06:11:25
I'm not sure how valuable that is, but...
2021-07-06 06:11:34
I took random art and photo images and encoded them to avif/jxl. I dunno how to get the "same quality", so I targeted for the same file size. Encode to avif: `avifenc -j 4 -r f -y 444 --min 0 --max 63 -a cq-level=12 -a end-usage=q in.jpg out.avif` then encode to jxl: `cjxl -j --num_threads=4 --target_size=<avif_size> in.jpg out.jxl`
2021-07-06 06:11:43
Then I did decoding to pixels 10 times for each image and took the average time. Commands: `avifdec -j 4 -c dav1d -i in.avif` `djxl --num_threads=4 in.jxl`
2021-07-06 06:12:00
Here's what I got:
2021-07-06 06:12:10
``` Name Time_sec ---- -------- art1.avif 0,089 art1.jxl 0,1614 art2.avif 0,0799 art2.jxl 0,132 art3.avif 0,0566 art3.jxl 0,098 photo1.avif 0,2241 photo1.jxl 0,2133 photo2.avif 0,1191 photo2.jxl 0,1258 photo3.avif 0,2781 photo3.jxl 0,3467 ```
2021-07-06 06:12:24
The archive with the original images and powershell script is here (17,1 MiB): https://github.com/eddiezato/eddiezato.github.io/releases/download/bin/test_dspeed.7z
_wb_
2021-07-06 06:21:06
A more accurate way to measure is to do `--num_reps=50` (no idea if avifdec has something similar)
2021-07-06 06:23:06
Also single-core decode probably still matters most for browsers, so you might want to compare that too.
eddie.zato
2021-07-06 06:27:28
Unfortunately, `avifdec` has no `--num_reps`.
2021-07-06 06:32:47
With `avifdec -j 1` and `djxl --num_threads=1`, 50 tries for each image:
2021-07-06 06:33:10
``` Name Time_sec ---- -------- art1.avif 0,1236 art1.jxl 0,3415 art2.avif 0,0914 art2.jxl 0,2465 art3.avif 0,0619 art3.jxl 0,1446 photo1.avif 0,426 photo1.jxl 0,5318 photo2.avif 0,1278 photo2.jxl 0,2243 photo3.avif 0,8158 photo3.jxl 0,9727 ```
_wb_
2021-07-06 06:36:41
How are the numbers for 10-bit avif?
2021-07-06 06:38:17
Also might be interesting to see what happens when you add `--faster_decoding=4` when encoding with cjxl
2021-07-06 06:38:47
Is this x86 or ARM?
eddie.zato
2021-07-06 06:40:37
i5 3570k
2021-07-06 06:41:37
I'll try `--faster_decoding` later.
2021-07-06 07:23:08
With `cjxl --faster_decoding=4`, `avifdec -j 1` and `djxl --num_threads=1`, 50 tries for each image:
2021-07-06 07:23:30
``` Name Time_sec ---- -------- art1.avif 0,1239 art1.jxl 0,2396 art2.avif 0,092 art2.jxl 0,1656 art3.avif 0,062 art3.jxl 0,1262 photo1.avif 0,4293 photo1.jxl 0,4835 photo2.avif 0,129 photo2.jxl 0,1943 photo3.avif 0,8188 photo3.jxl 0,9249 ```
_wb_
2021-07-06 07:27:03
Btw num_threads=0 might be better, not sure if it still makes a difference
eddie.zato
2021-07-06 09:18:43
Yeah, the differences are within the margin of error
veluca
2021-07-06 09:22:48
how big are the images?
2021-07-06 09:23:08
the first decode in a process has some significant setup time in djxl
eddie.zato
2021-07-06 09:27:40
``` art1.jpg 790206 bytes 2387x3000 art2.jpg 1101110 bytes 2560x1600 art3.jpg 504564 bytes 1920x1080 photo1.jpg 6866353 bytes 4296x2709 photo2.jpg 1261580 bytes 2560x1600 photo3.jpg 7365131 bytes 6000x4000 ```
_wb_
2021-07-06 12:56:16
--num_reps=50 will give different results from starting 50 processes and taking the average
frank cilantro
2021-07-07 02:52:14
trying to run a benchmark on like 10000 jpegs but the process just gets killed, i assume its trying to load them all in mem - is there a different way to do this?
2021-07-07 02:52:49
also is there a faster way to transcode a massive set of jpeg files than just launching a new cjxl process per image?
spider-mario
2021-07-07 03:00:38
I think I would personally just do it in parallel with https://github.com/gittup/tup, it’s meant to be a build system but I find that it can have many more uses
2021-07-07 03:01:01
```tup : foreach jpegs/*.jpeg jpegs/*.jpg |> cjxl %f %o |> jxl/%B.jxl ```
_wb_
2021-07-07 03:01:35
if the images are large then doing it in parallel may not be the best idea
2021-07-07 03:02:46
you could use benchmark_xl with --save_compressed and --num_threads=[some low enough number]
frank cilantro
2021-07-07 03:05:42
awesome thanks both of you
2021-07-07 03:08:51
one last q.. to find transcoding compression speed in terms of megabytes/sec, it is sufficient to multiply (MP/s) x (# input file megabytes)/(# megapixels) right?
_wb_
2021-07-07 03:41:56
Usually when speeds are expressed in megabytes/s, it's uncompressed megabytes, which in case of 8-bit RGB means just x3: 1 MP/s = 3 MB/s
2021-07-07 03:45:47
(when it's higher bit depth I don't know what the convention is, since e.g. 10 bit can either be 6 bytes per pixel like in ppm, 4 bytes per pixel if you pack 30 bits in 32 bits, or 3.75 bytes per pixel if you really pack the uncompressed bits tightly)
frank cilantro
2021-07-07 03:46:19
ah ok cool thanks πŸ˜„
2021-07-08 08:15:58
I'm finding that lepton is about 10% faster at compressing JPEG files than cjxl - does that line up w ur expectations/experience?
_wb_
2021-07-08 09:42:59
Haven't compared recently but that sounds plausible
2021-07-08 09:44:46
Different use case though - Lepton is not an image codec, you need the whole file and decode to jpeg before you can show the image
Deleted User
2021-07-09 11:20:49
<@!604964375924834314> --noise=1 still bugs out in some weird cases :/
2021-07-09 11:20:53
2021-07-09 11:21:36
top: JXL, bottom: original
spider-mario
<@!604964375924834314> --noise=1 still bugs out in some weird cases :/
2021-07-09 11:25:23
yes, to be clear, `--noise=1` on its own is still the old behavior
2021-07-09 11:25:52
for now, to get the new model, one must choose a parameter manually with `--photon_noise=`
Deleted User
2021-07-09 11:31:57
okay, I was just thinking that you maybe fixed that as a little bonus. But no problem, I just tested photon_noise and think I have to rename myself now!
spider-mario
okay, I was just thinking that you maybe fixed that as a little bonus. But no problem, I just tested photon_noise and think I have to rename myself now!
2021-07-09 11:36:23
I think we hope to do that eventually, and thank you for the feedback πŸ˜„
Jyrki Alakuijala
okay, I was just thinking that you maybe fixed that as a little bonus. But no problem, I just tested photon_noise and think I have to rename myself now!
2021-07-13 11:42:25
my expectation is that finding the noise level from an image is a too hard problem -- I have seen three people trying to solve it and the result has always been 90 % good, 10 % surprising
2021-07-13 11:42:54
my anticipation is that when we find the best solution possible, it will be 99.5 % working, 0.5 % surprising -- i.e., still not ok
_wb_
2021-07-13 11:47:01
depends on how bad the surprise is, I guess
2021-07-13 11:47:38
certainly a first condition is to have good detection of photo vs nonphoto, so we don't add noise to a screenshot or something silly like that
2021-07-13 11:48:14
(photo vs nonphoto would be useful more generally to choose between modular and vardct, possibly also to segment the image and do a combination)
Jyrki Alakuijala
2021-07-13 11:48:32
yes, but that kind of thinking will add to the surprise -- because the screenshot can be 75 % photo, 90 % photo or 20 % photo
2021-07-13 11:49:10
if adding one more pixel of photography surface will flip the noise on/off, then weird things are bound to happen
2021-07-13 11:49:32
and this relates to having large areas of noisy textures
2021-07-13 11:49:49
trees vs. noise for example, with a small patch of non-noisy sky in between
_wb_
2021-07-13 11:50:31
agreed - segmenting the image in photo/vardct regions (with noise) and nonphoto/modular parts (without noise) would be needed, and that's not so easy if it has to be done accurately
2021-07-13 11:50:46
(the regions don't have to be rectangular in general, etc)
Jyrki Alakuijala
2021-07-13 11:51:29
If our noise is per layer, then that could be done, yes.
2021-07-13 11:51:45
layers will likely complicate and slow down decoding, so they are not an option right now
_wb_
2021-07-13 11:51:45
our noise is per frame so it can be done
Jyrki Alakuijala
2021-07-13 11:52:32
do we add single-channel noise if the layer is single channel ?
_wb_
2021-07-13 11:53:30
two layers should be fine for decode speed, especially if they are used for what they're good at (doing nonphoto stuff like text with modular is likely not really slower than doing it with vardct, and we already kind of do it anyway with Patches)
2021-07-13 11:53:49
layers all have the same number of channels, grayscale vs color is an image level thing
Jyrki Alakuijala
2021-07-13 11:54:05
ok
2021-07-13 11:54:26
what was the final decision on the blending colorspace?
2021-07-13 11:54:49
both xyb and linear sRGBish ? source colorspace?
2021-07-13 11:55:13
I remember there being complications of doing good things there
_wb_
2021-07-13 11:55:40
XYB can be used for blending patches, source colorspace for blending frames
Jyrki Alakuijala
2021-07-13 11:55:55
ok, thanks
2021-07-13 11:56:19
but xyb could the source colorspace?
_wb_
2021-07-13 11:57:03
yes, xyb is possible source colorspace (though we don't do that atm, we signal the actual original colorspace atm)
2021-07-13 11:57:42
we only allow enum colorspaces for frame blending though, not arbitrary ICC profiles
2021-07-13 11:58:19
(because we want the decoder to not have to depend on lcms/skcms just to figure out what the decoded pixels are)
Jyrki Alakuijala
2021-07-13 12:04:48
that makes sense
Scope
Scope <https://github.com/libjxl/libjxl/pull/276>
2021-07-15 03:41:53
<https://github.com/libjxl/libjxl/pull/322>
2021-07-15 03:42:02
2021-07-15 03:42:02
2021-07-15 03:42:03
2021-07-15 03:42:04
2021-07-15 03:42:04
2021-07-15 03:42:04
2021-07-15 03:42:05
lithium
2021-07-15 06:40:07
I understand zoom in image not a fair compare, this sample only use for jxl quality improve, not compare different encoder. jxl-2db3204 have some quality improve, I think use -s8 can reduce more ringing, maybe implement slower but strong ringing reduce in -s8 or -s9 is worth it?
2021-07-16 08:00:48
rework
fab
2021-07-16 08:03:59
I see all the images the same because i wake up but at night i see more differences
lithium
2021-07-16 10:31:26
I update a rework version, use same jxl commits (2db3204), I still feel red and blue area have some strange behavior, maybe vardct too radical on red and blue area?
Jyrki Alakuijala
2021-07-19 05:09:34
I do add 20 % more bits for blue areas in delta palette matching
2021-07-19 05:09:51
I could add a similar heuristic to VarDCT
2021-07-19 05:10:46
blue diffs cannot be see when they are below the red and green values
2021-07-19 05:10:54
however, when they are above, they become visible
2021-07-19 05:11:08
in usual compression it is all superposition and the normal formalism cannot capture that
2021-07-19 05:11:49
in XYB it is more complicated, but still superposition and quantization is going to go wrong
2021-07-19 05:12:00
need to think about it and experiment, looks like a great possibility
2021-07-19 05:12:14
does it happen on both red and blue or only on blue?
2021-07-19 05:12:17
green is always ok?
2021-07-19 05:13:32
Lee, Thank You for keeping this topic alive, it gives more motivation and guidance to deal with it from all angles...
fab
2021-07-19 05:13:58
d 0.5 -s 8 looks ok
lithium
2021-07-19 05:15:52
I don't test too much green color image sample, so I not sure green is safety.
Jyrki Alakuijala
2021-07-19 05:21:41
could you take your image and swap the color channels in gimp
2021-07-19 05:21:53
decompose to RGB, and then recompose in another way
lithium
2021-07-19 05:26:31
separate to single color channels?
2021-07-19 05:26:59
I try to use photoshop make this.
2021-07-19 05:29:45
jxl-d0.5-s9-green and blue_png 200% in photoshop
2021-07-19 05:31:44
probably like this?
2021-07-19 05:32:55
jxl-d0.5-s9-blue-only_png 200% in photoshop
2021-07-19 05:36:09
jxl-d0.5-s9-green-only_png 200% in photoshop
Jyrki Alakuijala
2021-07-19 05:37:15
I'd be most interested if you can swap B<->G channels, compress with -s7 -d1, swap B<->R channels, compress with -s7 -d1
lithium
2021-07-19 05:37:32
ok
Jyrki Alakuijala
2021-07-19 05:38:18
that would help me to explore the channels -- if I use B only for additional bits like in delta palette, or if I need to do that for R, too
lithium
2021-07-19 05:42:47
wait a minute, I need find how to swap color channels.
Jyrki Alakuijala
2021-07-19 05:48:01
perhaps rotate hue by 120 degrees (I don't know photoshop)
lithium
2021-07-19 05:51:24
like this order? RBG BGR
Jyrki Alakuijala
2021-07-19 05:54:00
I don't mind any order
2021-07-19 05:54:13
as long as B goes to R in one, and into G in another
lithium
2021-07-19 05:55:25
Irfanview swap color_1.0_s7_BGR
2021-07-19 05:56:30
Irfanview swap color_1.0_s7_RBG
Jyrki Alakuijala
2021-07-19 05:57:53
ok, so it is blue that is the problem
lithium
2021-07-19 05:59:04
I using cjxl 0.3.7-2db3204
Jyrki Alakuijala
2021-07-19 05:59:25
just checking -- you swapped the colors in the originals and then compressed with s7 d1?
2021-07-19 05:59:45
could you run them with s9 d1, too -- does that mitigate the problem or make it worse?
lithium
2021-07-19 06:02:21
oh, I use jxl s7 d1 => png => swap
2021-07-19 06:07:20
original_RBG_to_1.0_s7
2021-07-19 06:07:48
original_BGR_to_1.0_s7
2021-07-19 06:09:58
original_RBG_to_1.0_s9
2021-07-19 06:10:09
original_BGR_to_1.0_s9
2021-07-19 06:13:16
I can't say s9 is better than s7, still have some problem.
Jyrki Alakuijala
2021-07-19 06:13:55
yes, looks the same, and blue is more of a problem than others (when you didn't swap)
2021-07-19 06:14:14
then the blue hair gets the terrible artefacts
lithium
2021-07-19 06:16:25
I should try other color channel swap?
2021-07-19 06:20:17
Why blue color will affect red color in XYB?
Jyrki Alakuijala
2021-07-19 06:20:21
perhaps run the without swap here, too with those two -s7 and -s9
2021-07-19 06:20:31
with d1
lithium
2021-07-19 06:20:40
ok
Jyrki Alakuijala
2021-07-19 06:20:41
just to have a calibration reference on how bad it looks then
lithium
2021-07-19 06:22:17
original_to_1.0_s7_no-swap
2021-07-19 06:22:28
original_to_1.0_s9_no-swap
2021-07-19 06:26:03
red ribbon have some tiny error(like ringing), blue hair is look better than older jxl version.
Jyrki Alakuijala
2021-07-19 06:40:06
great, I have an idea now how to reflect this on VarDCT
2021-07-19 06:40:50
very likely the same idea that I used in delta palettization works there, too, for a better initial guess (to make s7 behaviour closer to s9, and possibly improve both a tiny bit)
lithium
2021-07-19 06:41:28
Thank you for your work πŸ™‚
Jyrki Alakuijala
lithium red ribbon have some tiny error(like ringing), blue hair is look better than older jxl version.
2021-07-19 07:29:41
blue hair is still terrible and I can improve on this
_wb_
2021-07-19 07:51:17
Another approach is to look at generation loss after lots of d1 encodes, it can give an indication of where things can be improved
2021-07-19 07:52:03
Last time I did that was a long time ago but then it was blue-yellow discolorations that were the biggest problem
lithium
2021-07-20 10:09:22
Input file: green-original.png -1,823,722 Image: 1920x1080 pixels | 8 bits/sample | RGB | 385379 color(s) cjxl-0.3.7-2db3204 Look like green color area doesn't have issue in this sample?
2021-07-20 10:09:43
green-original_1.0_s7-213,762
2021-07-20 10:10:11
green-original_1.0_s8-202,128
2021-07-20 10:10:35
green-original_1.0_s9-201,989
eclipseo
2021-07-20 10:31:11
Comparison of 0.3.7 versus latest GIT https://eclipseo.github.io/image-comparison-web/jxl_results.html Significant improvement noticed
veluca
eclipseo Comparison of 0.3.7 versus latest GIT https://eclipseo.github.io/image-comparison-web/jxl_results.html Significant improvement noticed
2021-07-20 10:45:17
do you have the images too? πŸ˜„
eclipseo
veluca do you have the images too? πŸ˜„
2021-07-20 10:50:22
https://eclipseo.github.io/image-comparison-web/#abandonned-factory&JXL_0.3.7=s&JXL_20210715=s&subset1
veluca
2021-07-20 11:28:46
thanks!
Jyrki Alakuijala
2021-07-20 01:51:27
Venti!
2021-07-20 01:52:21
Lee, do you play Genshin Impact?
lithium
Jyrki Alakuijala Lee, do you play Genshin Impact?
2021-07-20 02:24:41
I haven't play Genshin Impact yet, but I like game soundtrack, story and character πŸ™‚
2021-07-20 02:28:36
About this image, I find a tiny issue on d1.0 s7, venti green pants have a tiny issue point(upper area).
Jyrki Alakuijala
2021-07-20 02:28:56
I got a bitter bamboo flute because of the soundtrack :-]
lithium
2021-07-20 02:32:06
cool, can you play a bitter bamboo flute?
_wb_
2021-07-20 03:05:51
<@!493871605408071681> for lossless, you might also want to try `-e 3` and `-e 2` for faster encode/decode, and `-e 9 -E 3 -I 1` for very slow but dense compression
2021-07-20 03:06:37
we still need to work on better speed for lossless encode
eclipseo
2021-07-20 03:10:13
I have a -e 9 -E 3 -I 1 locally that I didn't publish or plot yet
2021-07-20 03:11:31
I'll try with -e 3, it seems heif has a better Weissman score due to the speed at which it encodes, the compression rate being very similar otherwise
_wb_
2021-07-20 03:13:07
is q100 rgb jpeg actually lossless btw? I assume it's still slightly lossy
2021-07-20 03:14:36
not sure if Weissman score with the mean of encode and decode time is that useful in practice
2021-07-20 03:15:18
it depends on the use case imo - for encode-once, decode-very-often use cases, you basically care only about decode speed
2021-07-20 03:16:05
and for authoring workflows and archival use cases - i.e. encode-very-often, decode-rarely, you basically care only about encode speed
2021-07-20 03:17:52
so it might be useful to also have an "encode Weissman score" and "decode Weissman score"
2021-07-20 03:19:37
Maybe PNG (say whatever default imagemagick does) is a more useful reference codec for lossless than rgb mozjpeg
eclipseo
_wb_ is q100 rgb jpeg actually lossless btw? I assume it's still slightly lossy
2021-07-20 03:20:50
its near lossless for jpg, i only use it as a reference for time
2021-07-20 03:21:26
i use to have png as a reference
2021-07-20 03:21:43
but png is already the source file
_wb_
2021-07-20 03:22:04
did you check if heif-enc is actually lossless? it seems to have quite good density, better than what I expected - but then again, the images are all photographic so that might help
eclipseo
2021-07-20 03:23:20
I used the parameters explained in the help: -L -p chroma=444 --matrix_coefficients=0
_wb_
2021-07-20 03:23:33
well you could also just take 24 bpp ppm as the source file and have compression ratios in the usual way, comparing to uncompressed
Jyrki Alakuijala
lithium cool, can you play a bitter bamboo flute?
2021-07-20 03:23:40
probably yes, I haven't tried yet, but in general I can play the flutes -- the flutes are still on their way (I will get an C and A key)
Scope
2021-07-20 03:26:25
Yep `lossless: heif-enc -L -p chroma=444 --matrix_coefficients=0 -o [output] [input(PNG)]` it looks like lossless, but in my tests on various sets HEVC-HEIF (x265) was not good and could not compete with WebP and sometimes even optimized PNG (although it may make more sense on photos)
_wb_
2021-07-20 03:27:18
``` $ compare -metric pae ClassA_8bit_BIKE_2048x2560_8b_RGB.ppm.png ClassA_8bit_BIKE_2048x2560_8b_RGB.ppm.png.heif.png null: 257 (0.00392157) ```
2021-07-20 03:27:42
looks like it does still get off-by-ones even with those options
2021-07-20 03:27:55
off by 0.25 on average
eclipseo
2021-07-20 03:29:25
it is strange because bpg used to be the worse performing yet heif is better
_wb_
2021-07-20 03:30:01
``` Channel distortion: MAE red: 81.3112 (0.00124073) green: 49.7283 (0.000758805) blue: 106.136 (0.00161953) all: 79.0585 (0.00120636) ```
2021-07-20 03:30:20
well if it allows the lsb to not be quite lossless, as seems to be the case, then it's easy to be better
2021-07-20 03:30:48
because then basically you win 3 bpp
2021-07-20 03:32:20
less error on green than on red and blue suggests that it is either still doing YCbCr internally anyway (despite the --matrix_coefficients=0), or it is doing something like YCoCg but with the lsb of CoCg dropped, so they remain 8-bit
eclipseo
2021-07-20 03:33:14
i'm not familiar with these tools
_wb_
2021-07-20 03:33:53
point is: best not to believe encoders when they call something "lossless", best check on at least one image that you can decode it to something so that when you do `compare -metric pae orig.png decoded.png null:`, the result is 0 (no error)
2021-07-20 03:36:25
Apple Preview has an "Export..." option to HEIC and you can select "Lossless" there, but what it actually does is a YCbCr 4:2:0 HEIC encode at some high quality
2021-07-20 03:37:10
so it's not even visually lossless, since on some images you can see chroma subsampling artifacts
2021-07-20 03:37:40
(also for some bizarre reason it also subsamples the alpha channel if there is one, even at the 'lossless' setting)
eclipseo
2021-07-20 03:37:56
ah yes this is bad
2021-07-20 03:38:53
what the flag on compare -metric to get the channel separated?
_wb_
2021-07-20 03:39:10
`compare -metric pae -verbose orig.png decoded.png null:`
2021-07-20 03:39:17
pae is the max error per pixel
2021-07-20 03:39:21
mae is the mean error per pixel
2021-07-20 03:39:34
(peak absolute error, mean absolute error)
eclipseo
2021-07-20 03:39:49
ok
2021-07-20 03:40:26
I'll see with heif upstream for what they consider "lossless"
_wb_
2021-07-20 03:40:51
the numbers are in 16-bit if you have a default imagemagickq16, so 256 means "off by one in 8-bit"
2021-07-20 03:41:25
maybe it's just a bug in the decoder and the heif is actually lossless, but I'll only believe that when I see it
eclipseo
2021-07-20 03:42:24
I remember reading this https://github.com/strukturag/libheif/issues/62#issuecomment-758674528 but thought the option fixed it
Scope
2021-07-20 03:44:00
BPG should have true lossless, but it has a very old version of x265 so it could theoretically be a little less effective, also Avifenc has true lossless
eclipseo
2021-07-20 03:46:16
checked Wep@, it's true lossless too
2021-07-20 03:46:25
*webp2
Jyrki Alakuijala
_wb_ Apple Preview has an "Export..." option to HEIC and you can select "Lossless" there, but what it actually does is a YCbCr 4:2:0 HEIC encode at some high quality
2021-07-20 03:57:32
if it looks right then it is lossless, right? πŸ˜›
eclipseo
_wb_ did you check if heif-enc is actually lossless? it seems to have quite good density, better than what I expected - but then again, the images are all photographic so that might help
2021-07-21 11:51:13
Some people found the commit whcich regressed heif lossless mode https://github.com/strukturag/libheif/issues/533 I'm reencoding now and the files are now significantly larger
_wb_
2021-07-21 12:21:10
Cool
2021-07-21 12:22:06
Looking forward to the updated results 😁
2021-07-21 12:24:13
It's a bit of a pity that there's not more competition in lossless, I think there's room for jxl improvement in lossless too but we're already the densest of the practical codecs so it's not really a priority to work on improvements there
Scope
2021-07-21 12:43:41
But, I think the speed/density competition is still there and it would be nice to have a JXL mode that would be only slightly slower than WebP (especially in decoding) but at a higher density, which could be used as a full replacement for WebP, JXL is better in maximum compression but not consistently better in speed/efficiency ratio on all types of content and in the current implementation there is a big difference in decoding speed
eclipseo
2021-07-21 12:49:54
I've try -e 3 it's fast but compresses no better than webp (losslessly)
_wb_
2021-07-21 01:08:51
yes, we need lossless -e 4 to -e 9 to get better speed/density trade-offs
eclipseo
2021-07-21 02:11:18
heif went from the best compressed to the worse with now true lossless, JXL is now king with the fastest decode after mozjpeg too https://eclipseo.github.io/image-comparison-web/speed_results.html
_wb_
2021-07-21 02:20:35
nice - i'm not a big fan of that patent mess of a codec, so the more it can be shown to suck, the better πŸ™‚
2021-07-21 02:21:16
if you have results for faster and slower lossless jxl, I think that could be interesting to add
2021-07-21 02:23:21
and also the speed of png encode/decode (e.g. measure how long it takes imagemagick to convert between ppm and png - which is not the best thing you can do, but it is a commonly used implementation)
2021-07-21 02:24:55
also webp1 can probably get better weissman scores with different `-z` values
eclipseo
2021-07-21 02:33:53
it makes heif looks way worse in lossy too, before it was appearing to keep more details but now it looks very bad with colors being kept correctly
_wb_
2021-07-21 02:38:18
wait what? in lossy nothing should change, I would assume?
2021-07-21 02:38:59
the `--matrix_coefficients=0` you shouldn't use for lossy
2021-07-21 02:39:58
even forcing 444 might not be the best idea
2021-07-21 02:40:55
typically for heic and avif, 420 is better at low bpp (but you always need 444 at high bpp because otherwise you can't get rid of the subsampling artifacts)
2021-07-21 02:48:06
for lossy, doing things in RGB and not in some luma-chroma-chroma space is a bad idea
2021-07-21 02:50:02
imagemagick jpeg encoding and mozjpeg by default do ycbcr 4:2:0 on quality < 90 and ycbcr 4:4:4 on quality >= 90
eclipseo
2021-07-21 02:50:31
aren't the other codecs keeping 444?
_wb_
2021-07-21 02:51:12
i think avif defaults to 420, not sure
2021-07-21 02:51:27
webp can only do 420
2021-07-21 02:51:39
webp2 can do 444 but I assume it also defaults to 420
2021-07-21 02:52:26
ah but webp2 you do set to 444
eclipseo
2021-07-21 02:52:33
yes
2021-07-21 02:52:47
jxl is doing 444 no?
2021-07-21 02:53:04
i've tried to keep everyone at the same level
_wb_
2021-07-21 02:53:24
avifenc defaults to 444, so that's ok too
2021-07-21 02:53:41
jxl cannot really do 420
2021-07-21 02:54:09
it can do ycbcr 420 when recompressing jpeg but you cannot use variable block sizes, only fixed block sizes when doing 420
eclipseo
2021-07-21 02:54:24
only webp is 420 and jpeg too
_wb_
2021-07-21 02:54:30
yep
2021-07-21 02:54:37
jpeg below quality 90
2021-07-21 02:55:29
ok so doing heic in 444 is fine, but you have to drop the `--matrix_coefficients=0`
2021-07-21 02:55:42
only for lossless YCbCr should be skipped
Scientia
2021-07-22 12:19:02
Wait
2021-07-22 12:19:11
Jxl doesn't do 420 well?
2021-07-22 12:20:24
444 by default is pretty cool
raysar
Scientia Jxl doesn't do 420 well?
2021-07-22 01:07:08
in varDCT and modular mode chroma subsampling doesn't exist. It use better solution for reducing file size. chroma subsampling is for noob file format 😜 (and ultra low visual quality like video)
Scientia
2021-07-22 01:15:45
I have an HDR screen on my phone and chroma subsampling makes jpeg look gross on it, so jxl not using subsampling is good
diskorduser
Scientia I have an HDR screen on my phone and chroma subsampling makes jpeg look gross on it, so jxl not using subsampling is good
2021-07-22 02:34:11
On all images?
2021-07-22 02:35:22
I don't understand why 8 bit jpeg might look bad on HDR display than a non HDR display.
Scientia
diskorduser On all images?
2021-07-22 02:38:01
It's not the 8 bit
2021-07-22 02:38:06
It's the chroma subsampling
2021-07-22 02:38:20
Either that or my screenshot app
2021-07-22 02:40:01
Difference between 420 jpeg from snapseed and 444 png from my phone screenshot manager
2021-07-22 02:40:26
Open original
diskorduser
2021-07-22 02:41:28
But I think phone's HDR mode work only when viewing HDR videos and pictures( depends on gallery app)
2021-07-22 02:41:59
UI always run on 8bit mode
2021-07-22 02:45:49
It's always easier to see chrome subsampling artifacts on text screenshots and on 🌴 images.
veluca
2021-07-22 08:16:29
420 in screenshots is a Very Bad Idea, but that's not what is going wrong here πŸ˜„
2021-07-22 08:16:46
looks like gamut issues
Fox Wizard
2021-07-22 08:58:41
420 <:Hsss:806131225278152756>
Deleted User
_wb_ it can do ycbcr 420 when recompressing jpeg but you cannot use variable block sizes, only fixed block sizes when doing 420
2021-07-27 12:42:11
Could other <:JXL:805850130203934781> inventions be used (EPF, noise, gaborish) when using YCbCr 4:2:0? (Not like I'm a fan of YCbCr 4:2:0, I'm just curious lmao)
_wb_
2021-07-27 01:17:41
not sure what is allowed, some things are 444 only
2021-07-27 01:18:22
<@!179701849576833024> do you remember the restrictions? in 420, can you do epf, gaborish, noise, splines, patches?
veluca
2021-07-27 01:21:12
yes to all
2021-07-27 01:21:22
you can't do adaptive DC smoothing
_wb_
2021-07-27 02:14:30
you can't do it because we specced it that way? (in principle it could be done though, right? just for chroma DC it would be annoying to implement β€” or am I missing something?)
2021-07-27 02:15:08
the things you can do, they are all done after the chroma upsampling I assume?
veluca
_wb_ the things you can do, they are all done after the chroma upsampling I assume?
2021-07-27 02:33:27
yup
_wb_ you can't do it because we specced it that way? (in principle it could be done though, right? just for chroma DC it would be annoying to implement β€” or am I missing something?)
2021-07-27 02:33:58
also yup (I am not sure how to do it either - adaptive DC smoothing works on all the channels at the same time)
_wb_
2021-07-27 02:47:16
ah right, it's not a per-channel thing
eclipseo
2021-07-29 09:08:58
JXL looks particularly good on paintings at very low BPP (0.30) compared to AVIF and HEIF: https://eclipseo.github.io/image-comparison-web/#kryer*2:1&AOM_20210715=t&JXL_20210715=t&subset1
_wb_
2021-07-29 09:18:42
I suppose it depends on the painting style: avif/heif tend to blur/smudge/vectorize, which is bad for brush strokes and charcoal-like highly textured styles, but it is perfect for ligne claire manga-like material.
paperboyo
2021-07-29 10:26:58
πŸ˜† Now: how do I write a format-choosing logic that depends on historical art style…? 😜
lithium
2021-07-30 07:42:23
I think probably disable denoising can get better result for this case? > -a color:enable-dnl-denoising=0 -a color:denoise-noise-level=5 or 8 and for high quality optimize > -a color:sharpness=2 -a color:aq-mode=1 -a color:qm-min=0 or 2 original > https://eclipseo.github.io/image-comparison-web/report.html > between q=4 and q=63: avifenc -a end-usage=q -a tune=butteraugli -a sharpness=3 --min 0 --max 63 -a cq-level=$quality -o [output] [input(PNG)]
2021-07-30 07:49:01
I hope jxl can improve quality for ligne claire manga-like material(anime), still can't get transparency quality result on -d 0.5 -s 9.
_wb_
2021-07-30 07:58:54
The bitstream itself can certainly do it - it can directly represent Splines and mix DCT-based with non-DCT-based methods, which theoretically makes it great for ligne claire / manga. It's just extremely hard to make an encoder that fully uses the bitstream, detecting splines etc, so for now we (mostly Jyrki) are trying to do generic improvements like being better at VarDCT block selection (which will help for any kind of image).
lithium
2021-07-30 08:11:12
I'm really looking forward to seeing next jxl quality improvement. πŸ™‚
kb
_wb_ The bitstream itself can certainly do it - it can directly represent Splines and mix DCT-based with non-DCT-based methods, which theoretically makes it great for ligne claire / manga. It's just extremely hard to make an encoder that fully uses the bitstream, detecting splines etc, so for now we (mostly Jyrki) are trying to do generic improvements like being better at VarDCT block selection (which will help for any kind of image).
2021-07-31 12:40:07
in these cases I wonder whether support could be added, eventually, to specific authoring tools (like, say, inkscape, or whatever), as those would be able to exploit that kind of features far better
Scope
Scope Source
2021-07-31 12:25:37
There are still noticeable differences <https://github.com/libjxl/libjxl/pull/385> `-s 9 --lossy-palette --palette=0 -P 0`
2021-07-31 12:25:45
2021-07-31 12:26:00
WebP NL40
2021-07-31 12:31:12
- But, there is a visible improvement, images are closer to the source Source:
2021-07-31 12:31:17
2021-07-31 12:32:29
`-s 9 --lossy-palette --palette=0 -P 0` (before 385)
2021-07-31 12:32:53
`-s 9 --lossy-palette --palette=0 -P 0` (after)
2021-07-31 12:33:06
WebP NL40
2021-07-31 12:33:58
(mostly background texture)
veluca
2021-07-31 12:36:49
oh wow, there's definitely some noticeable extra dithering going on there
2021-07-31 12:37:59
it did improve though πŸ™‚ IIRC there's still some work that needs doing on improving the clustering, both for colors and for deltas, but I am not really sure
_wb_
2021-07-31 12:44:51
It's a more interesting/tricky thing to optimize when it's not just about selecting colors but also about selecting deltas and deciding when to use implicit colors/deltas and when to make them explicit
2021-07-31 12:45:31
Plus there's way more powerful context modeling to exploit which makes things even harder to optimize for
fab
2021-07-31 12:53:45
does delta offer higher compression of images of aut people
2021-07-31 12:53:59
is useful for that
2021-07-31 12:54:05
please be honest
Scope
Scope Source
2021-07-31 12:56:09
`-s 9 --lossy-palette --palette=0 -P 0` (385)
2021-07-31 12:56:25
WebP NL40
fab
2021-07-31 01:47:08
it can't be compared, jxl way better
2021-07-31 01:47:21
the artifacts in the sun
2021-07-31 01:47:30
heavy blocking banding and dithering
2021-07-31 01:48:10
can you share those files in a zstandard preset 3 or zip file?
2021-07-31 01:48:33
ah true they are jxl so already compressed
2021-07-31 01:48:46
share in zip for compatibilty
2021-07-31 01:49:12
the clear lines in jxl
kb
Scope
2021-07-31 10:32:21
so subtle
Jyrki Alakuijala
Scope WebP NL40
2021-08-03 11:03:46
NL40 is the winner here -- but we will get the delta palettization eventually to it's quality level, also the NL40 approach is possible within the non-palettized JPEG XL lossless, it is just a lot of effort to build
2021-08-03 11:04:03
simple for non-predicted images, but somewhat complicated for predicted
Scope
2021-08-03 11:07:39
Yep, I'm only pointing to images where the differences with the source are very noticeable, these are not real comparisons because JXL in these examples are much smaller
Jyrki Alakuijala
_wb_ is q100 rgb jpeg actually lossless btw? I assume it's still slightly lossy
2021-08-03 11:08:12
guetzli goes to quality 110, and it is still lossy
fab please be honest
2021-08-03 11:29:25
my experience is that most often custom delta's don't change much since the dithering coming from slack in stock deltas is masked by the noise in a photograph
2021-08-03 11:29:59
however, for fully noiseless images with gradients the slack in stock deltas manifest as weird dithering patterns (not particularly beautiful)
2021-08-03 11:30:13
the smallest non-zero delta there is 4, 4, 4
2021-08-03 11:30:32
and if only one color component is changing (for example green) the smallest delta is 12 steps or so
2021-08-03 11:30:38
that is not cool
2021-08-03 11:30:55
it works for photographs, but not for smooth graphics
2021-08-03 11:31:29
custom delta generation can identify when the image has a lot of small deltas and choose deltas that fill the gaps in stock deltas
2021-08-03 11:31:47
when those gaps are filled, then in respective areas there are no dithering patterns to observe
2021-08-03 11:31:51
----
2021-08-03 11:32:24
in webp near lossless I have another approach -- there, I change only those pixels that are in a visually active area
2021-08-03 11:33:09
it is easier to get right visually, but is pretty complicated to implement because every pixel change changes the prediction residuals and the quantization of prediction residuals is what matters
2021-08-03 11:34:13
the palettization is inherently more powerful for quantization -- it is vector quantization after all -- but requires more care to get right
2021-08-03 11:34:59
I believe that eventually we will have a palette solution that compresses ~35 % more than webp near lossless with roughly similar quality
eddie.zato
2021-08-04 11:10:55
<:kekw:808717074305122316> ``` PS > cjxl 0.jpg 7.jxl -j -e 7 JPEG XL encoder v0.5.0 [SSE4] Read 1988x3056 image, 53.6 MP/s Encoding [VarDCT, d1.000, squirrel], 4 threads. Compressed to 1300653 bytes (1.713 bpp). 1988 x 3056, 4.36 MP/s [4.36, 4.36], 1 reps, 4 threads. PS > cjxl 0.jpg 8.jxl -j -e 8 JPEG XL encoder v0.5.0 [SSE4] Read 1988x3056 image, 53.2 MP/s Encoding [VarDCT, d1.000, kitten], 4 threads. Compressed to 4397281 bytes (5.790 bpp). 1988 x 3056, 0.52 MP/s [0.52, 0.52], 1 reps, 4 threads. PS > ls -File | Format-Table Name,Length Name Length ---- ------ 0.jpg 2097141 7.jxl 1300653 8.jxl 4397281 ```
2021-08-04 11:15:02
<:PepeOK:805388754545934396> ``` PS > cjxl 0.jpg 8p.jxl -j -e 8 --patches=0 JPEG XL encoder v0.5.0 [SSE4] Read 1988x3056 image, 52.9 MP/s Encoding [VarDCT, d1.000, kitten], 4 threads. Compressed to 1298130 bytes (1.709 bpp). 1988 x 3056, 0.55 MP/s [0.55, 0.55], 1 reps, 4 threads. PS > ls -File | Format-Table Name,Length Name Length ---- ------ 0.jpg 2097141 7.jxl 1300653 8.jxl 4397281 8p.jxl 1298130 ```
raysar
2021-08-04 11:16:56
what about -e 9? πŸ˜„
eddie.zato
2021-08-04 11:20:55
I'm trying, but it's quite long πŸ˜„
2021-08-04 11:27:17
``` Name Length ---- ------ 0.jpg 2097141 7.jxl 1300653 8.jxl 4397281 8p.jxl 1298130 9.jxl 4387353 9p.jxl 1306128 ```
raysar
2021-08-04 11:38:18
i'm testing with some jpeg, i have not the same issue.
eddie.zato
2021-08-04 11:44:20
Some kind of images can produce amusing results.
Scope
Scope <https://github.com/libjxl/libjxl/pull/322>
2021-08-04 12:09:04
<https://github.com/libjxl/libjxl/pull/403>
2021-08-04 12:09:15
2021-08-04 12:09:15
2021-08-04 12:09:16
2021-08-04 12:09:16
2021-08-04 12:09:16
2021-08-04 12:09:17
2021-08-04 12:09:17
2021-08-04 12:16:58
There is less ringing as well at not very high distances, but sometimes the differences are not so big and the artifacts have just moved to other areas
fab
Scope
2021-08-04 12:55:30
i use speed 2 but with a optimal settings, the images are 75-80 kb small ones, those images are more than 3 mpx and they weight 60 kb. Is completly different
2021-08-04 12:55:42
it's x2,5 more compression
2021-08-04 12:55:56
do not be fooled
2021-08-04 12:56:27
this is what medium compression is today
lithium
2021-08-04 01:25:37
Thank you for your work πŸ™‚ Test on libjxl_0debc57, hope jxl can reduce those tiny artifacts in red circle(red area), on normal (no zoom in) status still can notice those tiny artifacts.
_wb_
eddie.zato ``` Name Length ---- ------ 0.jpg 2097141 7.jxl 1300653 8.jxl 4397281 8p.jxl 1298130 9.jxl 4387353 9p.jxl 1306128 ```
2021-08-04 03:01:52
Can you share the image? Looks like a spectacular patches encode heuristics fail...
eddie.zato
_wb_ Can you share the image? Looks like a spectacular patches encode heuristics fail...
2021-08-04 03:41:10
Page from the comic book
fab
2021-08-04 03:51:32
n my opinion in 5 improvements after 0.5.0 will become good at q 70.08 s 9 epf 1 faster decoding 1
2021-08-04 03:51:36
just wait for it
2021-08-04 03:53:07
how to delta palette? what changed to normal palette? is simply adding l0 p1 or this types of commands? should i write palette 0 palette 1024 -m -s 8
2021-08-04 03:53:13
what is correct command for normal use
2021-08-04 03:53:33
could someone create a page like pingo encoder optimizer? same layout?
2021-08-04 03:54:07
in html format, like it was before, in february 2021 and february 2020
2021-08-04 03:54:25
and findable by everyone not by a cmd command that could fail
2021-08-04 03:54:31
why complicate things?
2021-08-04 03:54:57
also s 2 N 3 or what are possible options and speed for near lossless?
_wb_
eddie.zato Page from the comic book
2021-08-04 04:07:45
Interesting case for patches, <@179701849576833024> . We don't do dots when we do patches, right? Maybe that's the issue?
Deleted User
_wb_ Interesting case for patches, <@179701849576833024> . We don't do dots when we do patches, right? Maybe that's the issue?
2021-08-04 04:14:26
https://discord.com/channels/794206087879852103/794206170445119489/821763695772041236 What's the difference between dots and patches, by the way?
_wb_
2021-08-04 04:33:08
Decode-side it is the same thing. Encode-side there are two different detection heuristics.
veluca
2021-08-04 04:57:05
pretty sure it's not dots
2021-08-04 04:57:18
would love to see the image with patches removed...
raysar
2021-08-04 08:07:45
We can see patch with djxl -s 8 There are one pixel patches? i don't understand the aim <:ugly:805106754668068868>
_wb_
2021-08-04 08:12:31
Those small patches are likely very counterproductive
2021-08-04 08:12:54
Also a bit disappointing how little text it detects
2021-08-04 08:14:49
I think we need a large corpus of images to refine the patch heuristics, avoiding counterproductive patches but also improving detection of productive patches.
Scope
2021-08-04 08:15:57
Yep, something similar happens on black and white lossless images, where disabling patches improves efficiency
_wb_
2021-08-04 08:17:46
The current heuristics are likely to detect counterproductive patches in monochrome regions
raysar
2021-08-04 08:18:44
Is 1 2 and 3 pixels patches useful on picture? Disabling small patch on jpeg input could be an easy solution? πŸ˜„
Scope
2021-08-04 08:21:14
Or more precisely, not only b&w, but others where there are only a few colors https://discord.com/channels/794206087879852103/803645746661425173/843591188866793503
Deleted User
2021-08-04 08:33:24
Maybe minimum/recommended patch size as a fraction of image dimensions?
2021-08-04 08:33:56
You know, bigger images usually require bigger patches...
_wb_
2021-08-04 08:38:26
Small patches _can_ be useful: something like the dot on an i or a comma (,) is expensive to do without ringing with the DCT and if it can be replaced by a patch it can be very productive.
2021-08-04 08:39:18
But here they just seem to increase the entropy of the residual image instead of decreasing it
lithium
2021-08-05 06:41:14
This quality improve commits not merge to main libjxl branches yet, > https://github.com/libjxl/libjxl/pull/403 look like my testing not include this commits...😒 > https://discord.com/channels/794206087879852103/803645746661425173/872470336329895977
2021-08-05 06:48:32
And I notice some grayscale comic image also have some file size inflate issue.
diskorduser
lithium This quality improve commits not merge to main libjxl branches yet, > https://github.com/libjxl/libjxl/pull/403 look like my testing not include this commits...😒 > https://discord.com/channels/794206087879852103/803645746661425173/872470336329895977
2021-08-05 06:53:29
Are you testing with high distance
lithium
diskorduser Are you testing with high distance
2021-08-05 07:20:41
No, I only test lower distance, > cjxl -d 0.5 and -d 1.0 -e7~-e9
diskorduser
2021-08-05 08:50:42
Then you don't need that ringing commit I think
veluca
2021-08-05 10:56:37
very likely it does nothing at d0.5 and d1
2021-08-05 10:56:54
(and I'm still unsure on whether it is an improvement at d7+...)
Scope
Scope <https://github.com/libjxl/libjxl/pull/403>
2021-08-05 11:03:18
<@!179701849576833024> In these art images the ringing improvements are noticeable (quality between `d2` and `d5.7`)
veluca
2021-08-05 11:12:28
From what I can see in photographic content it's generally worse, so I'm not really sure if it is overall better...
fab
2021-08-05 11:29:14
Worse
2021-08-05 11:29:19
-s 7 -d 1.24 --epf=0 --use_new_heuristics
2021-08-05 11:29:41
Only good with an added new heuristics
2021-08-05 11:29:50
Lets veluca decide
improver
2021-08-05 12:39:39
needs --anime switch
diskorduser
2021-08-05 02:01:31
Yes yes. With best settings for anime.
raysar
2021-08-06 06:04:24
I have 2 visual problem in -d 1 -e 8 in this synthetic picture The details in the highlight center of the flower disapear. And the are little color shift in the stars. There is green desaturation and little yellow desaturation, in the top of the picture. I understant that it's because it's simple to encode this hard part of the picture but in -d 1 i expect a little bit visual transparency. Maybe it's linked to the color shift in a previous scope image (full noise image)? What do you think?
2021-08-06 06:04:41
lithium
2021-08-06 06:13:06
Maybe try cjxl -d 0.8 and -d 0.5 -e 8~e 9 can get better result? I guess some synthetic image(anime) use -d 1.0 still too risk...
2021-08-06 06:15:51
Hope vardct can improve quality for synthetic image(anime) 😒
BlueSwordM
raysar I have 2 visual problem in -d 1 -e 8 in this synthetic picture The details in the highlight center of the flower disapear. And the are little color shift in the stars. There is green desaturation and little yellow desaturation, in the top of the picture. I understant that it's because it's simple to encode this hard part of the picture but in -d 1 i expect a little bit visual transparency. Maybe it's linked to the color shift in a previous scope image (full noise image)? What do you think?
2021-08-06 06:19:40
I don't see any issue <:kekw:808717074305122316>
raysar
2021-08-06 06:20:36
I add that at -d0.5 the center of the flower is also blur πŸ˜•
2021-08-06 06:21:40
I can search in real picture, sky detail could have the same problem. As a photographer blue highlight is very important.
2021-08-06 06:24:04
2021-08-06 06:26:59
-d0.2 is ok πŸ˜„ , but it's not a bug because detail in blue high light is not at all very visible in humain vision.
lithium
2021-08-06 06:28:43
but for synthetic image, blue still very important.
2021-08-06 06:34:43
Maybe we need cjxl parameter like this? > --ImageContent=content (Photo, Screenshot(anime))
2021-08-06 06:37:12
Look like graphical images quality improve have some conflict on photo images? > https://github.com/libjxl/libjxl/pull/403
2021-08-06 06:41:37
or some heuristic can detect content type?
2021-08-06 06:44:49
Just my opinion, for now I still think synthetic image quality is vardct weak point...
Scope
2021-08-06 06:45:19
It is more convenient to do it like x264, but this can complicate both development and use, and it is better to improve the quality that will be universal for different types of images
2021-08-06 06:50:24
or webp, but, images are rarely encoded with individual settings for each
_wb_
2021-08-06 06:59:30
Encoder tuning presets can rarely be used in automated workflows.
2021-08-06 07:00:15
They also don't help in case of mixed contents, like a screenshot containing icons, text, photos, and illustrations.
lithium
2021-08-06 07:01:56
That make sense, mixed contents is a problem.
BlueSwordM
raysar I can search in real picture, sky detail could have the same problem. As a photographer blue highlight is very important.
2021-08-06 07:04:37
I honestly do not see the issue at all in my viewers.
lithium
2021-08-06 07:07:05
I remember aomenc have some heuristic to detect screenshot content, but I can't find source...
fab
lithium but for synthetic image, blue still very important.
2021-08-06 07:27:46
if you need many parameters there is this https://css-ig.net/pingo
2021-08-06 07:30:02
still don't know this is other codecs
2021-08-06 07:30:10
how to download all images in that site
raysar
2021-08-07 12:26:11
This is the default avif, similar size to -d1 Detail in high light is less good than jxl. But there is no desaturation on stars in the top of the picture (but noise reduction in dark area) And there are a bizarre color shift in the yellow. I prefer jxl πŸ˜„
2021-08-07 12:30:32
2021-08-07 12:57:37
Same comparison with jpeg, massive desaturation and blur, but no visible artifact (no blocking no ringing wow). Mozjpeg is very good !
BlueSwordM
raysar Same comparison with jpeg, massive desaturation and blur, but no visible artifact (no blocking no ringing wow). Mozjpeg is very good !
2021-08-07 02:21:09
Are you sure you are not having image viewer issues <:Thonk:805904896879493180>
diskorduser
2021-08-07 04:24:33
https://github.com/Blobfolio/refract
paperboyo
diskorduser https://github.com/Blobfolio/refract
2021-08-07 06:07:59
> All conversion takes place at Pixel Level and is intended for displays with an sRGB color space (e.g. web browsers). Gamma correction, color profiles, and other metadata are ignored and stripped out when saving next-gen copies. <:SadOrange:806131742636507177>
diskorduser
2021-08-07 06:39:33
I see it as a workaround for web browsers without having good color management ( Firefox)
_wb_
2021-08-07 07:48:14
Firefox has ok color management, it just doesn't do the right thing by default on untagged images
w
2021-08-07 07:49:41
gfx.color_management.mode needs to be set to 1
_wb_
2021-08-07 07:50:17
Yes. I don't understand why it isn't the default.
w
2021-08-07 07:51:26
i dont even know if color management is even enabled by default
2021-08-07 07:51:39
i remember having to turn it on but im always on nightly now
_wb_
2021-08-07 07:52:09
ICC profiles are handled correctly by default
2021-08-07 07:53:41
It's untagged images that are a problem, and maybe also partially tagged images like png without icc but with gamma
spider-mario
2021-08-07 10:17:02
also ICCv4 iirc
2021-08-07 10:17:29
right: `gfx.color_management.enablev4`
paperboyo
2021-08-07 10:53:28
^ what Jon and Sami wrote. My workaround for Firefox having (still, hopefully not for much longer: https://bugzilla.mozilla.org/show_bug.cgi?id=455077) a wrong default is to embed a small 500b sRGB equivalent profile in all images. Bit wasteful, but the only way (DCF EXIF in JPEG would be smaller, but isn’t supported).
lithium
2021-08-07 01:26:05
This test isn't my test, A little curious, in this case why jxl blue color different original blue color? https://encode.su/attachment.php?attachmentid=8579&d=1625392452 > https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=70124&viewfull=1#post70124
2021-08-09 04:29:57
For drawing, screenshot, anime, manga contents, I notice avif can get more stable and balance quality, even original source not lossless, flat quantization, blurry, strong filter those features can let result more stable, but for photography contents, avif need some parameter optimize to preserve detail, jxl vardct is very powerful on photography contents, but for drawing or screenshot contents, I think still need some quality improvement.
fab
lithium For drawing, screenshot, anime, manga contents, I notice avif can get more stable and balance quality, even original source not lossless, flat quantization, blurry, strong filter those features can let result more stable, but for photography contents, avif need some parameter optimize to preserve detail, jxl vardct is very powerful on photography contents, but for drawing or screenshot contents, I think still need some quality improvement.
2021-08-09 04:43:10
if you use -d 0.681 -s 8 --use_new_heuristics -I 0.25
2021-08-09 04:43:17
It's like placebo
2021-08-09 04:43:29
for the build luca versari released
diskorduser
2021-08-09 04:43:43
~~I think avif will always look better than jxl on synthetic images.~~ Edit: I was wrong. It fails on anime which have complex brush strokes.
lithium For drawing, screenshot, anime, manga contents, I notice avif can get more stable and balance quality, even original source not lossless, flat quantization, blurry, strong filter those features can let result more stable, but for photography contents, avif need some parameter optimize to preserve detail, jxl vardct is very powerful on photography contents, but for drawing or screenshot contents, I think still need some quality improvement.
2021-08-09 04:47:13
Which encoder do you use for avif? aom or rav1e or svt?
lithium
diskorduser Which encoder do you use for avif? aom or rav1e or svt?
2021-08-09 05:02:19
libavif aomenc
diskorduser ~~I think avif will always look better than jxl on synthetic images.~~ Edit: I was wrong. It fails on anime which have complex brush strokes.
2021-08-09 05:12:57
For now jxl have butteraugli and very strong, but avif also a strong option, It's very difficult to say which encoder is better...
Scope
2021-08-09 05:18:45
For images with many flat areas AVIF is often better, but for more complex synthetic images I would not say so