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

diskorduser
2021-08-09 05:21:29
I tried encoding an anime image with has many complex features (noise ) Avif looks smooth/less detailed even with --max 5 --min 5 but file size is very small compared to jxl.
lithium
2021-08-09 05:40:45
Maybe add some parameter can get better result? > // from blue > avifenc --min 0 --max 15 --minalpha 0 --maxalpha 0 -d 10 -s 4 -j 12 -a end-usage=q -a cq-level=15 -a color:enable-dnl-denoising=0 -a color:denoise-noise-level=5 -a color:sharpness=2 -a color:qm-min=0
diskorduser
2021-08-09 05:44:26
I will check it tomorrow
lithium
2021-08-09 06:26:26
I change some parameter from blue version. > // original blue version > https://discord.com/channels/794206087879852103/794206170445119489/873604405491019786
Scope For images with many flat areas AVIF is often better, but for more complex synthetic images I would not say so
2021-08-09 06:52:16
Yes, jxl for keep grain and detail is very well, I really hope I can use jxl on my drawing content, but for now I still can't get great quality flat areas from jxl.😒
fab
2021-08-09 06:54:56
Color is Not perfect and contrast
2021-08-09 06:55:35
Butter sacrificies that it only look for details
2021-08-09 06:55:55
Also in cjxl we dont have deringing
lithium Yes, jxl for keep grain and detail is very well, I really hope I can use jxl on my drawing content, but for now I still can't get great quality flat areas from jxl.😒
2021-08-09 06:56:46
Save in lossless
lithium
2021-08-09 07:13:21
Lossless is great, but I want high quality lossy(near-lossless).
raysar
lithium Lossless is great, but I want high quality lossy(near-lossless).
2021-08-09 09:15:40
What is the min quality of jxl visually lossless for you?
diskorduser
lithium Maybe add some parameter can get better result? > // from blue > avifenc --min 0 --max 15 --minalpha 0 --maxalpha 0 -d 10 -s 4 -j 12 -a end-usage=q -a cq-level=15 -a color:enable-dnl-denoising=0 -a color:denoise-noise-level=5 -a color:sharpness=2 -a color:qm-min=0
2021-08-10 02:03:00
Yeah. This looks good
2021-08-10 02:03:24
Default avif aom encoding is bad
2021-08-10 02:04:36
I used this image https://www.pixiv.net/en/artworks/77033762
lithium
raysar What is the min quality of jxl visually lossless for you?
2021-08-10 04:49:05
For now I need jxl -d 0.1~0.3 -e 8~9 to reach visually lossless for specific drawing image, I hope jxl -d 0.5 -e 8~9 can reach visually lossless for any drawing image, jxl -d 0.8~1.0 -e 8~9 I hope on this distance, I can get still look good quality, lost some detail is fine, I using webp near-lossless 40 and 60 compare jxl d 1.0 and 0.5 quality.
diskorduser
lithium Maybe add some parameter can get better result? > // from blue > avifenc --min 0 --max 15 --minalpha 0 --maxalpha 0 -d 10 -s 4 -j 12 -a end-usage=q -a cq-level=15 -a color:enable-dnl-denoising=0 -a color:denoise-noise-level=5 -a color:sharpness=2 -a color:qm-min=0
2021-08-10 05:26:30
Avif looks very good with this setting. It's visually lossless even on noisy artworks. I can even see some extra grain than original image when zoomed at 500% lol.
fab
2021-08-10 05:28:29
Jxl will always sacrifice something
diskorduser
2021-08-10 05:29:00
Jxl is good for photographs and avif is good for artworks.
lithium
diskorduser Avif looks very good with this setting. It's visually lossless even on noisy artworks. I can even see some extra grain than original image when zoomed at 500% lol.
2021-08-10 06:32:01
I heard extra grain issue before, but I haven't find issue sample, Could you share more information about this issue? That extra grain issue is very notable? extra grain will let drawing look really bad?
2021-08-10 06:35:03
For RGB content ycocg it might help. > --cicp 2/2/8 And for dark area. > -a color:aq-mode=1
diskorduser Jxl is good for photographs and avif is good for artworks.
2021-08-10 06:37:23
I really hope jxl can get good quality for artworks.😒
diskorduser
lithium I heard extra grain issue before, but I haven't find issue sample, Could you share more information about this issue? That extra grain issue is very notable? extra grain will let drawing look really bad?
2021-08-11 01:15:32
No. It doesn't look bad. Extra grain is not visible on normal viewing distance.
2021-08-11 01:22:56
Extra grain looks bad on using --min 0 --max 63. I am using --min 0 --max 5 But file size bigger than jxl. On --max 15 loss of noise detail.
2021-08-11 07:18:56
<@461421345302118401> https://wallhaven.cc/w/r71m9q
lithium
2021-08-11 07:33:11
<@!263309374775230465> Thank you for your help πŸ™‚, I think avif is strong but not easy to use for image contents... Hope Jyrki Alakuijala can bring some good news for drawing contents.
Scope
2021-08-11 02:43:16
<https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_08_10/index.html>
paperboyo
Scope <https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_08_10/index.html>
2021-08-11 03:04:24
[initially posted on AV1 server by mistake, haha] Wow! I think the progress of JXL at lowest bitrates is very noticable! Where was this comparison that allowed one to compare different releases in this same interface? [EDIT: answered there by Scope: https://eclipseo.github.io/image-comparison-web/]
Deleted User
paperboyo [initially posted on AV1 server by mistake, haha] Wow! I think the progress of JXL at lowest bitrates is very noticable! Where was this comparison that allowed one to compare different releases in this same interface? [EDIT: answered there by Scope: https://eclipseo.github.io/image-comparison-web/]
2021-08-11 03:12:06
And the author's even here! <@493871605408071681>, time to make 0.5.0 I guess? πŸ˜‰
Scope
2021-08-11 03:14:07
Yep, also Shift is now broken in Chrome (after the latest slider changes)
paperboyo
paperboyo [initially posted on AV1 server by mistake, haha] Wow! I think the progress of JXL at lowest bitrates is very noticable! Where was this comparison that allowed one to compare different releases in this same interface? [EDIT: answered there by Scope: https://eclipseo.github.io/image-comparison-web/]
2021-08-11 03:17:57
> I think the progress of JXL at lowest bitrates is very noticable! Oh, I know what gave me this impression. `Tiny` got bitrate bump in newest version compared to previous… (I agree the new higher value may be more realistic, but there goes my initial excitement…). Makes comparisons between versions harder too.
Scope
2021-08-11 03:56:52
Old > Methodology > Large images were first encoded with BPG at q24 filesizes. Medium is 60% of Large. Small is 60% of Medium. Tiny is 60% of Small. All other codecs were matched to +/- 5% filesize. New > Methodology > Large images were first encoded with Mozjpeg at q85 filesizes. Big is 125% of Large. Medium is 60% of Large. Small is 60% of Medium. Tiny is 60% of Small. Everything else was matched to +/- 5% filesize.
lithium
2021-08-11 05:31:39
I tested this drawing image on jxl -d 0.5 -e 8, > https://wallhaven.cc/w/r71m9q jxl really powerful for complex structure and simulate real style drawing, but for now when drawing content have some flat areas, jxl can't work very well. Jyrki Alakuijala mention smooth areas and visual masking have some problem for current jxl. > https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=69868&viewfull=1#post69868
eclipseo
And the author's even here! <@493871605408071681>, time to make 0.5.0 I guess? πŸ˜‰
2021-08-11 05:53:43
not sure i will do another so soon as it was done very close to the 0.5 release
Scope
2021-08-11 05:54:43
<@!493871605408071681> https://discord.com/channels/794206087879852103/803645746661425173/875034356098433086
eclipseo
Scope Yep, also Shift is now broken in Chrome (after the latest slider changes)
2021-08-11 05:55:25
How so?
Scope
2021-08-11 05:56:01
It like switches once and doesn't work anymore
2021-08-11 05:56:56
On all chromium-based browsers on Windows
eclipseo
Scope It like switches once and doesn't work anymore
2021-08-11 05:56:56
I can't reproduce on Chromium or Vivalde
2021-08-11 05:59:19
I will be trying on a Windows when i have access to one
Scope
2021-08-11 05:59:51
Strange, I tested it on Edge, Chrome, Opera and some others and it's the same, but FF works fine
eclipseo
2021-08-11 06:01:15
does the size info change when you press shift?
Scope
2021-08-11 06:02:35
Only bpp is shifted a bit
2021-08-11 06:03:27
2021-08-11 06:04:00
eclipseo
2021-08-11 06:04:02
if you use the same codec both side this won't work
2021-08-11 06:04:23
does the info text change with different codec?
Scope
2021-08-11 06:05:01
Yep
eclipseo
2021-08-11 06:07:10
can you tell me if there is an error message in the console when you shift switch?
Scope
2021-08-11 06:08:43
```splitimage2.js:96 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getAttribute') at getSelValue (splitimage2.js:96) at setFile (splitimage2.js:239) at splitimage2.js:459```
eclipseo
2021-08-11 06:11:04
the message repeat when you switch?
Scope
2021-08-11 06:12:07
No
eclipseo
2021-08-11 06:12:37
that is weird
2021-08-11 06:14:27
whats your chrome version?
Scope
2021-08-11 06:14:58
Dev 94.0.4603.0 But if this happens only in my browsers, perhaps some scripts are blocked (although I have tried disabling all plug-ins and extensions) Also, the previous version worked fine
eclipseo
2021-08-11 06:17:03
the script is not blocked, the images load, but somehow the size of the canvas or opacity is not changed
2021-08-11 06:18:43
does it happens also on Chrome stable browser?
2021-08-11 06:19:25
if you escape switch mode, does the moving split works?
Scope
2021-08-11 06:21:25
Yes, as and when I switch to another image, but once, stable I will check
2021-08-11 06:24:05
Hmm, stable Chrome works, so it's something on my side or something happened in this Dev version <:Thonk:805904896879493180>
eclipseo
2021-08-11 06:25:04
damn 😩
2021-08-11 06:27:41
i'm grabbing a chrome canary to see what's happening in the debugger
Scope
2021-08-11 06:28:46
<@!493871605408071681> So perhaps everything is fine on stable versions, btw, I also had a suggestion to add a set of some art or UI images, though we need to find some free to use
2021-08-11 06:29:27
With large flat color areas and clear lines
eclipseo
2021-08-11 06:29:35
I tested Chrome Version 94.0.4603.0 (Official Build) dev (64-bit) and it works too?
2021-08-11 06:30:56
I'd like too but I don't know where to find some with a CC license, also I already at max capacity on Github
Scope
2021-08-11 06:32:25
It's the same on my version, but maybe it's only a problem on my side Also maybe do WebP and AVIF as real images instead of PNGs to reduce the size (although this might be a problem for Safari for AVIF)
diskorduser
lithium I tested this drawing image on jxl -d 0.5 -e 8, > https://wallhaven.cc/w/r71m9q jxl really powerful for complex structure and simulate real style drawing, but for now when drawing content have some flat areas, jxl can't work very well. Jyrki Alakuijala mention smooth areas and visual masking have some problem for current jxl. > https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=69868&viewfull=1#post69868
2021-08-11 06:32:49
Avif needs bigger file size to retain grain compared to jxl no matter how your tune encoder parameters
eclipseo
Scope It's the same on my version, but maybe it's only a problem on my side Also maybe do WebP and AVIF as real images instead of PNGs to reduce the size (although this might be a problem for Safari for AVIF)
2021-08-11 06:33:39
Could you try on a fresh profile wiyj no custom config?
diskorduser Avif needs bigger file size to retain grain compared to jxl no matter how your tune encoder parameters
2021-08-11 06:35:21
I think sometimes people don't see the subtle change in the background. I notice JXL isn't always the best on the main focus of thr image but is better at keeping texture details on backgroud elements
_wb_
eclipseo I'd like too but I don't know where to find some with a CC license, also I already at max capacity on Github
2021-08-11 06:35:45
You can perhaps host the images on a free Cloudinary account (or somewhere else)? Btw you can also use Cloudinary conversion to see what the Aurora avif encoder does
Scope
2021-08-11 06:35:55
I tried it, but maybe it's not completely fresh, and I also tried Incognito mode, since it also disables extensions
eclipseo
Scope It's the same on my version, but maybe it's only a problem on my side Also maybe do WebP and AVIF as real images instead of PNGs to reduce the size (although this might be a problem for Safari for AVIF)
2021-08-11 06:41:16
I use to do that but I changed to PNG to avoid problems with color profile detection on various browser
2021-08-11 06:52:01
I'll look into Google Cloud storage or DigitalOcean
2021-08-11 06:53:34
Also on pixel art or drawing, sometimes lossless is more efficient than lossy but I don't know how to select the best options on a pr image basis
lithium
diskorduser Avif needs bigger file size to retain grain compared to jxl no matter how your tune encoder parameters
2021-08-11 06:56:19
I think av1 is a good video encoder, but for still image jxl is better, so I really look forward jxl can fix flat areas weak point. πŸ™‚
diskorduser
2021-08-11 06:58:17
Yes for video good enough
Scope
eclipseo Also on pixel art or drawing, sometimes lossless is more efficient than lossy but I don't know how to select the best options on a pr image basis
2021-08-11 07:05:38
Yes, but often needs much more compression than lossless, especially if the images are quite complex also with sharp lines and flat areas And for comparison I think 2-3 such images will be enough
eclipseo
2021-08-11 07:10:46
For example: https://www.deviantart.com/kaiseto/art/With-a-Staff-I-Guess-136421766 On default lossy, it weight 65KB, on lossless only 16KB. How does the layman will know when lossless is a better choice than lossy? this is not easy to tell
Scope
2021-08-11 07:13:27
Yep, but not lossy pixel art, btw JXL also needs improvement in pixel art compression in lossless mode
Cool Doggo
2021-08-11 07:18:21
lossy compression being worse than lossless in cases is a problem in some cases, but in general for pixel art i dont think you should be using lossy compression anyways
improver
2021-08-11 07:20:53
the fun of dual formats
Deleted User
2021-08-11 08:15:09
I'm revisiting GitLab issues and here's one that might be related to the problem: https://gitlab.com/wg1/jpeg-xl/-/issues/188
2021-08-11 08:21:35
I don't know exactly how `cjxl` works, but it could count colors in an image **regardless of the mode** and if there's more than *threshold* (1024 by default), abort color counting immediately and switch to VarDCT like if nothing happened. But if there are less colors than that in the whole image (or just the testing area, like e.g. first row of pixels, depends on the color counting algorithm's implementation), try lossless Modular encoding first.
2021-08-11 08:24:07
That's another question... how is color counting performed in Modular? Does it do O(n^2) sweep through the whole image? Is there any premature aborting if it detects threshold overshoot earlier?
_wb_
2021-08-11 08:24:40
Counting colors is a bit expensive to do
2021-08-11 08:25:20
Yes, modular palette transforms abort as soon as there are too many colors
Deleted User
_wb_ Counting colors is a bit expensive to do
2021-08-11 08:25:57
As a heuristic, on a limited number of pixels (aka "testing area")? I don't think so... πŸ€”
_wb_
2021-08-11 08:27:43
There's still room to make it faster though, current encoder uses std::set on std::vector (so it works for arbitrary number of channels) to do the counting, so that's probably not very optimal, lol
2021-08-11 08:29:02
We could certainly add some heuristics to detect cases where lossless is likely better, and at slow enough speeds try both lossy and lossless
Deleted User
2021-08-11 08:30:27
I'm already thinking about edge cases (e.g. be cautious around 100% white pixels because that could mean either some art background, a document or clipped sky in a photo)
Cool Doggo
2021-08-11 08:31:26
well if you only check if lossless is better than lossy and not the opposite way around then that shouldnt be a problem right?
_wb_
2021-08-11 08:32:36
It's mostly a matter of speed - you don't want to waste a lot of time trying a high-effort lossless to then discard it because lossy was smaller after all.
Deleted User
2021-08-11 08:37:12
You can try both lossy and lossless on the very slowest speed (or on other speeds by using a new `cjxl` switch), but medium speeds could probably use some sort of neural network to quickly detect the best settings, like the one used in Opus to switch between music and speech coding? https://jmvalin.ca/opus/opus-1.3/
lithium
2021-08-12 07:06:23
If jxl have some heuristic to switch between photography(steep) and drawing(flat) coding, that will be very useful.
Deleted User
2021-08-12 11:19:51
It'd have to switch not only between VarDCT and lossless Modular, but also lossy Modular.
raysar
It'd have to switch not only between VarDCT and lossless Modular, but also lossy Modular.
2021-08-12 11:46:24
And detect if patches/dots option is usefull or not πŸ˜„
2021-08-12 11:46:39
There are many choices πŸ˜„
Deleted User
raysar And detect if patches/dots option is usefull or not πŸ˜„
2021-08-12 11:46:50
That'd be a lot harder
2021-08-12 11:47:19
As if VarDCT / lossless Modular / lossy Modular heuristics already weren't hard
raysar
2021-08-12 11:48:35
BRUTEFORCE rule them all ! πŸ˜†
Scope
2021-08-12 11:53:14
Veluca is working on improving patches, so they will be better (someday)
lithium
2021-08-12 12:12:32
I guess pull requests 403 also work in process, maybe we can get better drawing quality on next quality improvement. πŸ™‚ > https://github.com/libjxl/libjxl/pull/403
fab
2021-08-12 01:15:55
I think after 19082021 it will change more
veluca
Scope Veluca is working on improving patches, so they will be better (someday)
2021-08-12 02:13:44
https://github.com/libjxl/libjxl/pull/434 I'm not so convinced...
lithium
2021-08-12 02:29:29
This commits also can fix some vardct file size inflate issue?
Scope
2021-08-12 03:52:33
Did some tests, but no time yet to code the whole set, so it mostly helped where the patches worked worse, but there are exceptions
2021-08-12 03:55:36
Examples where the new build equals `--patches=0` and it helps: https://i.imgur.com/H98sH.png
2021-08-12 03:55:38
https://i.redd.it/ixnqw29s2li31.png
2021-08-12 03:56:10
https://i.redd.it/w5fls6lwpcp31.png
2021-08-12 03:56:39
https://i.redd.it/zdyvupnbeam41.png
2021-08-12 04:00:50
<@!179701849576833024> But: ```111 086 - s9 E3 I1 (master build) 111 086 - s9 E3 I1 (improved patches) 109 413 - s9 E3 I1 patches=0``` https://files.catbox.moe/kkug21.png
2021-08-12 04:02:41
- ```658 553 - s9 E3 I1 (master build) 645 747 - s9 E3 I1 (improved patches) 594 170 - s9 E3 I1 patches=0``` https://i.redd.it/ps0qma6rixf41.png
2021-08-12 04:04:58
- ```489 632 - s9 E3 I1 (master build) 489 854 - s9 E3 I1 (improved patches) 474 441 - s9 E3 I1 patches=0``` https://i.redd.it/x58a481h2xe31.png
fab
2021-08-12 04:05:53
We'll see on 19082021 how it evolves
2021-08-12 04:06:28
So far so good
Scope
2021-08-12 04:06:40
- ```82 458 - s9 E3 I1 (master build) 77 061 - s9 E3 I1 (improved patches) 68 592 - s9 E3 I1 patches=0``` https://i.redd.it/xmtoihicvlj41.png
fab
2021-08-12 04:07:03
Good at high distance
2021-08-12 04:07:20
Maybe use this for high distance
2021-08-12 04:07:47
Better than expected
2021-08-12 04:08:40
Maybe delete i1
2021-08-12 04:08:49
Is lossless or lossy
2021-08-12 04:08:55
<@111445179587624960>
raysar
Scope - ```82 458 - s9 E3 I1 (master build) 77 061 - s9 E3 I1 (improved patches) 68 592 - s9 E3 I1 patches=0``` https://i.redd.it/xmtoihicvlj41.png
2021-08-12 04:09:10
Is it exception pictures where patches is not good? Or it's common?
Scope
2021-08-12 04:10:31
That's all I've found so far where the patches have been worse
fab
2021-08-12 04:10:40
Scope is lossy or lossless
Scope
2021-08-12 04:10:49
Lossless
fab
2021-08-12 04:11:04
●<:Poggers:805392625934663710>
raysar
Scope That's all I've found so far where the patches have been worse
2021-08-12 04:13:57
So it's rare in lossless mode?
Scope
2021-08-12 04:14:44
With improved patches, yes But here, for example, the size is larger after the changes https://discord.com/channels/794206087879852103/803645746661425173/875409538457669682
veluca
2021-08-12 04:33:28
yeah, I guess the question is whether overall it helps more than it hurts πŸ˜„
Scope
2021-08-12 04:43:25
<@!179701849576833024> But, it's VarDCT
2021-08-12 04:47:38
fab
2021-08-12 04:48:05
Good
2021-08-12 04:48:13
I want a build
2021-08-12 04:48:21
Color are amazing
veluca
2021-08-12 04:48:21
that's an interesting result xD
Scope
2021-08-12 04:48:29
veluca
2021-08-12 04:49:08
mhhh, this one I'm pretty sure is a bad idea πŸ˜„
fab
2021-08-12 04:49:16
What distance is it
2021-08-12 04:49:31
Last image
2021-08-12 04:49:39
Seems like d10
2021-08-12 04:49:56
<@111445179587624960>
2021-08-12 04:50:58
It looks detailed on my samsung galaxy s4
2021-08-12 04:52:31
Can you also Say file sizes and send a build
veluca
2021-08-12 04:52:36
I think I have some constants I can tweak for this, I'll try and see what happens
Scope
fab Can you also Say file sizes and send a build
2021-08-12 04:53:42
This is a "debug" image to see how the patches work, it is not intended for normal encoding, there is no difference between the builds except for the patches
fab
Scope This is a "debug" image to see how the patches work, it is not intended for normal encoding, there is no difference between the builds except for the patches
2021-08-12 04:55:18
Distance and file size on Last image
Scope
2021-08-12 04:57:13
These are the default settings, I have not changed anything for the encoding
fab
Scope These are the default settings, I have not changed anything for the encoding
2021-08-12 04:57:38
S 7 d 1?
Scope
2021-08-12 04:57:47
Yes
fab
2021-08-12 04:58:19
File sizes versus lossy with old patches
2021-08-12 04:58:26
In Last image
2021-08-12 04:58:29
Vs png
Scope
2021-08-12 04:58:55
https://discord.com/channels/794206087879852103/803645746661425173/875409965421047878
fab
2021-08-12 04:59:37
I want the lossy file size
2021-08-12 04:59:42
Not lossless
2021-08-12 04:59:53
Scope
2021-08-12 05:00:35
Send s 7 d1 s7 d1 new and png
2021-08-12 05:01:17
I want to view latest image
2021-08-12 05:01:32
In my image viewer
2021-08-12 05:01:54
Jxl file please
Scope
2021-08-12 05:04:03
I don't know, I deleted images after encoding because it doesn't matter, I just needed to know how the patches work, on this image we have to wait for improved patches
fab
2021-08-12 05:09:31
So was it smaller
2021-08-12 05:09:43
Like 10% less
Scope
2021-08-12 05:12:45
I compared only lossless, if the patches will be improved it will also affect lossy, that's why I search and show "bad" examples
lithium
2021-08-12 05:36:46
Scope Thank you for your work πŸ™‚
Scope
2021-08-12 05:42:16
https://i.imgur.com/UL1fXgB.png
2021-08-12 05:42:25
2021-08-12 05:45:07
Not all are detected as patches, but perhaps because the letters are not exactly the same (and the new changes don't make it worse or better)
veluca
2021-08-12 05:51:38
that one is worth investigating
2021-08-12 05:51:50
my bet would be the "is this a flat area" heuristic
2021-08-12 05:53:22
I updated the code, would you be willing to give it another go? πŸ˜„
Deleted User
Scope Not all are detected as patches, but perhaps because the letters are not exactly the same (and the new changes don't make it worse or better)
2021-08-12 05:54:54
> perhaps because the letters are not exactly the same Nope, they're the same. I've just made a quick check in GIMP, with "Difference" layer mode.
2021-08-12 05:55:41
It's monospace font, the subpixel rendering pattern should be consistent across the whole screen.
Scope
2021-08-12 05:58:39
```enc_patch_dictionary.cc:316:1: error: version control conflict marker in file <<<<<<< HEAD ^ 1 error generated.``` I'll try to re-download πŸ€”
It's monospace font, the subpixel rendering pattern should be consistent across the whole screen.
2021-08-12 06:04:17
Yep, but sometimes the image may not be completely lossless with some distortions
veluca
Scope https://i.imgur.com/UL1fXgB.png
2021-08-12 06:07:12
so there are ways to change the parameters of the heuristic to detect ~all the patches there, but I suspect it horribly breaks other images then xD (or even the same image in a different mode...) `jxl:m 52873`
2021-08-12 06:07:37
those heuristics definitely need a good old rewrite xD
veluca so there are ways to change the parameters of the heuristic to detect ~all the patches there, but I suspect it horribly breaks other images then xD (or even the same image in a different mode...) `jxl:m 52873`
2021-08-12 06:09:11
```diff diff --git a/lib/jxl/enc_patch_dictionary.cc b/lib/jxl/enc_patch_dictionary.cc index 035b842e..d5de772e 100644 --- a/lib/jxl/enc_patch_dictionary.cc +++ b/lib/jxl/enc_patch_dictionary.cc @@ -208,7 +208,7 @@ std::vector<PatchInfo> FindTextLikePatches( if (state->cparams.patches == Override::kOff) return {}; PatchColorspaceInfo pci(is_xyb); - float kSimilarThreshold = 0.8f; + float kSimilarThreshold = 5.0f; auto is_similar_impl = [&pci](std::pair<uint32_t, uint32_t> p1, std::pair<uint32_t, uint32_t> p2, @@ -346,7 +346,7 @@ std::vector<PatchInfo> FindTextLikePatches( ZeroFillImage(&is_background); Image3F background(opsin.xsize(), opsin.ysize()); ZeroFillImage(&background); - constexpr size_t kDistanceLimit = 50; + constexpr size_t kDistanceLimit = 1000; float* JXL_RESTRICT background_rows[3] = { background.PlaneRow(0, 0), background.PlaneRow(1, 0), @@ -378,8 +378,8 @@ std::vector<PatchInfo> FindTextLikePatches( background_rows[c][cur.second * background_stride + cur.first] = opsin_rows[c][src.second * opsin_stride + src.first]; } - for (int dx = -kSearchRadius; dx <= kSearchRadius; dx++) { - for (int dy = -kSearchRadius; dy <= kSearchRadius; dy++) { + for (int dx = -4; dx <= 4; dx++) { + for (int dy = -4; dy <= 4; dy++) { if (dx == 0 && dy == 0) continue; int next_first = cur.first + dx; int next_second = cur.second + dy; ``` this works in lossless mode on this image (and likely on this image only)
Deleted User
Scope Yep, but sometimes the image may not be completely lossless with some distortions
2021-08-12 06:13:00
I know, ClearType is a bitch. But in *this* particular case that's not the issue, fortunately.
Scope
Scope <@!179701849576833024> But: ```111 086 - s9 E3 I1 (master build) 111 086 - s9 E3 I1 (improved patches) 109 413 - s9 E3 I1 patches=0``` https://files.catbox.moe/kkug21.png
2021-08-12 06:14:12
Same
Scope - ```489 632 - s9 E3 I1 (master build) 489 854 - s9 E3 I1 (improved patches) 474 441 - s9 E3 I1 patches=0``` https://i.redd.it/x58a481h2xe31.png
2021-08-12 06:15:06
Same
Scope - ```82 458 - s9 E3 I1 (master build) 77 061 - s9 E3 I1 (improved patches) 68 592 - s9 E3 I1 patches=0``` https://i.redd.it/xmtoihicvlj41.png
2021-08-12 06:15:44
69 726
veluca
2021-08-12 06:16:02
ah nice πŸ˜„
Scope
2021-08-12 06:17:28
<@!179701849576833024> So, there are still some patches/dots(?) left, also not sure if they are effective
Deleted User
veluca ```diff diff --git a/lib/jxl/enc_patch_dictionary.cc b/lib/jxl/enc_patch_dictionary.cc index 035b842e..d5de772e 100644 --- a/lib/jxl/enc_patch_dictionary.cc +++ b/lib/jxl/enc_patch_dictionary.cc @@ -208,7 +208,7 @@ std::vector<PatchInfo> FindTextLikePatches( if (state->cparams.patches == Override::kOff) return {}; PatchColorspaceInfo pci(is_xyb); - float kSimilarThreshold = 0.8f; + float kSimilarThreshold = 5.0f; auto is_similar_impl = [&pci](std::pair<uint32_t, uint32_t> p1, std::pair<uint32_t, uint32_t> p2, @@ -346,7 +346,7 @@ std::vector<PatchInfo> FindTextLikePatches( ZeroFillImage(&is_background); Image3F background(opsin.xsize(), opsin.ysize()); ZeroFillImage(&background); - constexpr size_t kDistanceLimit = 50; + constexpr size_t kDistanceLimit = 1000; float* JXL_RESTRICT background_rows[3] = { background.PlaneRow(0, 0), background.PlaneRow(1, 0), @@ -378,8 +378,8 @@ std::vector<PatchInfo> FindTextLikePatches( background_rows[c][cur.second * background_stride + cur.first] = opsin_rows[c][src.second * opsin_stride + src.first]; } - for (int dx = -kSearchRadius; dx <= kSearchRadius; dx++) { - for (int dy = -kSearchRadius; dy <= kSearchRadius; dy++) { + for (int dx = -4; dx <= 4; dx++) { + for (int dy = -4; dy <= 4; dy++) { if (dx == 0 && dy == 0) continue; int next_first = cur.first + dx; int next_second = cur.second + dy; ``` this works in lossless mode on this image (and likely on this image only)
2021-08-12 06:17:32
You can change \`\`\` to \`\`\`diff to enable syntax highlighting for diffs πŸ™‚
2021-08-12 06:19:13
veluca
2021-08-12 06:19:41
I didn't know, thanks πŸ˜„
Scope <@!179701849576833024> So, there are still some patches/dots(?) left, also not sure if they are effective
2021-08-12 06:20:21
likely they aren't, but I'm afraid I'll end up turning them off in too many places if I try to get rid of them
2021-08-12 06:20:42
and I consider the reduction large enough as it is
2021-08-12 06:21:09
hopefully this didn't end up disabling patches in places where they're important...
Scope
2021-08-12 06:22:15
Yep, and the overall result is pretty good on this image (not that much difference vs the disabled patches)
Deleted User
veluca I didn't know, thanks πŸ˜„
2021-08-12 06:26:24
There's a bunch of syntax highlighting (for C and C++ too), Discord uses Markdown πŸ™‚
Scope https://i.imgur.com/UL1fXgB.png
2021-08-12 06:29:07
What about this image with Luca's patch? I'm really curious, literally the whole image can be <:JXL:805850130203934781>-patched...
veluca
2021-08-12 06:31:43
not going to change
Scope
2021-08-12 06:32:05
I thought this was the size https://discord.com/channels/794206087879852103/803645746661425173/875440300355633184
veluca
2021-08-12 06:32:06
unless you apply the patch in the message manually and use lossless - in that case you do get something
2021-08-12 06:32:14
yep
2021-08-12 06:32:33
it's about 33% the size without the patch
Scope
2021-08-12 06:59:23
```2 412 - s9 E3 I1 (master build) 2 639 - s9 E3 I1 (improved patches) 2 639 - s9 E3 I1 patches=0```
2021-08-12 07:01:34
<:PepeOK:805388754545934396> ``` 9 214 - s9 E3 I1 (master build) 8 979 - s9 E3 I1 (improved patches) 10 071 - s9 E3 I1 patches=0```
2021-08-12 07:05:19
- ```36 887 - s9 E3 I1 (master build) 36 305 - s9 E3 I1 (improved patches) 28 728 - s9 E3 I1 patches=0```
2021-08-12 07:07:17
- ```11 895 - s9 E3 I1 (master build) 10 124 - s9 E3 I1 (improved patches) 9 631 - s9 E3 I1 patches=0```
veluca
Scope - ```36 887 - s9 E3 I1 (master build) 36 305 - s9 E3 I1 (improved patches) 28 728 - s9 E3 I1 patches=0```
2021-08-12 07:09:34
ahhhh, dithering patterns... there's one way to fix it which will likely make other things even worse πŸ˜› (also -- what happens at -s 7)
Scope
2021-08-12 07:10:05
<:PepeOK:805388754545934396> ```957 114 - s9 E3 I1 (master build) 955 418 - s9 E3 I1 (improved patches) 977 919 - s9 E3 I1 patches=0```
veluca ahhhh, dithering patterns... there's one way to fix it which will likely make other things even worse πŸ˜› (also -- what happens at -s 7)
2021-08-12 07:11:50
46 793
veluca
2021-08-12 07:15:03
I mean before/after πŸ™‚
Scope
2021-08-12 07:18:33
Lossless Speed 7 before patch changes and after? Also VarDCT
veluca
2021-08-12 07:20:01
yup
Scope
2021-08-12 07:20:38
```47 501 - s7 (master build) 46 793 - s7 (improved patches)```
veluca
2021-08-12 07:20:50
ok, thought so
2021-08-12 07:20:56
and no patches?
Scope
2021-08-12 07:22:44
`432 451` πŸ€”
veluca
2021-08-12 07:23:06
hah
2021-08-12 07:23:24
I guess our lossless mode with no lz77 really doesn't like dithering
2021-08-12 07:24:02
(by the way, if you have a `benchmark_xl` somewhere, you can get more info on patches by passing a `--debug_image_dir` option)
Scope
2021-08-12 07:24:26
Ah, no, something unwanted got into the options, the real size: `40 068`
veluca
2021-08-12 07:24:35
ah 😦 oh well
Scope
2021-08-12 07:28:18
But, overall, these changes mostly do better than worse
2021-08-12 07:34:49
However, for something like pixel art it would be nice to have a mode similar to WebP and maybe with a larger default group size and probably without patches at all
veluca
2021-08-12 07:38:25
ehhh, later πŸ˜„
2021-08-12 07:38:53
improvements to lossless mode for me are mostly in the "doing it when I'm waiting for other stuff" category
Scope
2021-08-12 09:44:57
But, yes, it's not the highest priority right now, even for lossless, in my opinion for now it's more important to improve patches, then better palette selection work, then maybe automatic group selection up to `-g 3` Btw, now I'm encoding a larger set to compare patch improvements
2021-08-13 01:13:26
So, after encoding a larger set, there are still many images where patches are ineffective, especially on not very large images, I will show the results later
veluca
2021-08-13 01:31:28
ok, thanks πŸ˜„
Scope
2021-08-13 01:39:16
I think I'll make some sets like GoodPatches and BadPatches, for a more convenient comparison of where patches help and where they are bad
2021-08-14 12:00:39
Eh, but since there are very few images where the patches work and help, at least on my test corpus, and where they are ineffective quite a lot, most likely I will make one combined set πŸ€”
2021-08-14 12:06:50
I think I also need some sort of set with UI, screenshots containing text and repeating elements, but a good sampling of different random relevant images is not so easy to compile
2021-08-14 11:48:12
**Patches Tuning Corpus** <https://docs.google.com/spreadsheets/d/14dIfETkUkocEuDOhGQI24tiKnnpTMKSp1qlTtmXOD74/> `PatchesCorpus.7z` <https://drive.google.com/file/d/1o48eAuEaGn-EO5kiTJvJ-iFzHQ8KcqRd/>
Jyrki Alakuijala
2021-08-15 02:23:48
makes me proud to see WebP still competitive for some image sets -- but then again, my explicit design guidance for JPEG XL lossless as well as some architectural/project team headcount allocation choices I made were to prioritize lossless photography compression this time (and for WebP lossless I prioritized explicitly the other way around). Also, WebP lossless is a more light-weight construction for decoding resource use.
2021-08-15 02:33:16
for WebP lossless I decided to take a 10 % density hit for photograhs by leaving out larger filters -- I just considered photography compression out of scope of that effort
Scope
2021-08-15 02:45:43
Yes, but if we focus on Web usage, it's very rare to use lossless photos and it will mostly be art, UI/design elements and the like As I wrote before, the need for lossless even at very good quality or visual/near lossless modes will not disappear, maybe even grow, because there are a lot of sites that use even less efficient PNG and bandwidth or traffic is not a big problem for them and for most of their users, also with lossless modes no need to worry that the image may have any artifacts or other visual losses (which can not always be seen or closely compared even at very high quality)
Jyrki Alakuijala
2021-08-15 02:48:39
yes, that was my thinking for WebP lossless
2021-08-15 02:49:17
for JPEG XL I considered a world where WebP lossless exists and does a pretty good job in that corner -- i.e., winning over it is not the priority, but it is more important to fill the gaps
2021-08-15 02:49:34
and from raw photography we know that some people are keen on lossless photo compression
Scope
2021-08-15 02:54:29
Yep, but still, JXL would also be nice to have some more practical mode that could be a competitor to WebP in similar content, but fast enough for Web use (prioritized for decoding), but maybe a little better overall and at the expense of slower speed, but within comfortable practical use
_wb_
2021-08-15 02:55:35
With fuif I wanted something universal, but it needed pik to be really good at photo. I think the end result is quite universal though.
2021-08-15 02:59:22
Bitstream-wise I think jxl is an improvement over lossless webp. Encoder-wise there is still work to be done to make jxl get more consistent gains.
Scope
2021-08-15 03:04:34
And for patches, I think for lossless they are very hard to use correctly so where they start to work, quite often the compression gets worse and this can be a problem especially for small images (which are also very common on the Web) where the size increase is most noticeable
_wb_
2021-08-15 03:07:50
For small images it would probably be good to have a more exhaustive encode mode that actually tries things with and without and takes the best.
Scope
2021-08-15 03:10:43
For lossy, there can be a problem on images with text or UI when there is significant compression, because some letters or elements will be much crisper and cleaner than others and it sometimes looks worse than the same quality degradation across the image or it may even appear that the encoding or the image itself is broken (but with better patch detection and less ringing artifacts it will be becoming less noticeable)
_wb_
2021-08-15 03:15:19
For lossy I want to try doing patches (or an extra layer) also for non-repeated but just not-dct-friendly stuff
Scope
2021-08-15 03:16:23
Yes, that might be a good idea
_wb_
2021-08-15 03:16:49
E.g. a text part would then be extracted completely, quantized a bit, and done with lossless modular (some of it with patches, some of it without, but consistent quality anyway)
2021-08-15 03:17:13
Last day of holiday for me today
2021-08-15 03:17:20
I'll give it a try tomorrow
Scope
2021-08-16 04:11:16
`-d 8` 1. Old `--resampling=2` 2. New `--resampling=2`
2021-08-16 04:11:28
2021-08-16 04:11:29
2021-08-16 04:11:29
2021-08-16 04:11:30
2021-08-16 04:11:31
2021-08-16 04:11:32
2021-08-16 04:11:33
2021-08-16 04:11:34
2021-08-16 04:11:35
2021-08-16 04:11:35
2021-08-16 04:11:42
2021-08-16 04:11:43
2021-08-16 04:11:47
2021-08-16 04:11:48
2021-08-16 04:11:49
2021-08-16 04:11:51
2021-08-16 04:11:53
2021-08-16 04:11:54
2021-08-16 04:12:32
------- `-d 4` 1. Old `--resampling=2` 2. New `--resampling=2`
2021-08-16 04:12:45
2021-08-16 04:12:45
2021-08-16 04:12:48
2021-08-16 04:12:48
2021-08-16 04:12:51
2021-08-16 04:12:51
2021-08-16 04:12:55
2021-08-16 04:12:55
2021-08-16 04:12:58
2021-08-16 04:12:58
2021-08-16 04:13:02
2021-08-16 04:13:02
2021-08-16 04:13:05
2021-08-16 04:13:05
2021-08-16 04:13:09
2021-08-16 04:13:10
2021-08-16 04:13:13
2021-08-16 04:13:13
2021-08-16 04:13:45
<@!532010383041363969> ^
2021-08-16 04:16:44
Sometimes better, sometimes not sure, and it seems that yes, more useful would be an implementation with partial upscaling, but not the whole image
Deleted User
2021-08-16 04:19:34
<@!111445179587624960> which commits did you compare? `631c862` and `7193782`?
Scope
2021-08-16 04:21:11
Yep, with <https://github.com/libjxl/libjxl/pull/445> and without For `-d 4` mostly better, but for `-d 8` the artifacts are more noticeable
_wb_
2021-08-16 04:55:37
d8 with 2x resampling is _very_ lossy though, I think at that point you're maybe at the 1x equivalent of d20 (just inventing a number) and you might be better off doing d3 with 4x resampling or something...
veluca
2021-08-16 05:01:38
for very low bitrates, try resampling + photon noise...
Scope
2021-08-16 05:14:28
I'm not sure if it works, I haven't noticed any difference
veluca
2021-08-16 05:15:18
it does work πŸ˜› just to be clear, I don't mean `--noise`
Scope
2021-08-16 05:15:58
`--photon_noise=ISO250` ... `--photon_noise=ISO1500` + `--resampling=2`
veluca
2021-08-16 05:32:33
weird... <@!604964375924834314> what did you try?
spider-mario
2021-08-16 05:34:17
a 2021Γ—1586 image with `--photon_noise=ISO8000 --resampling=2 -d 2.2` (that’s what matched the bitrate of d8 without resampling on that image if I recall correctly)
2021-08-16 05:34:54
but it’s a rather noisy image
veluca
2021-08-16 05:35:44
ok, so a *lot* more noise
Scope
2021-08-16 05:36:40
Yes, perhaps my numbers were too low
2021-08-16 05:49:55
It somewhat masks artifacts, but it is not suitable for every image
veluca
2021-08-16 05:52:22
yes, of course - on synthetic content especially I doubt it will do anything sensible
Deleted User
2021-08-16 08:05:21
I've just tested it and the new resampling method indeed works better. I used Windows executables from GitHub artifacts (I've been able to download them because I've been logged in to GitHub). Options: `--target_size=170000 --resampling=2`
2021-08-16 08:07:22
**Before** (commit `Fix docs (#448)`, hash `631c862`)
2021-08-16 08:09:14
**After** (commit `Implement sharper 2x2 downsampling kernel`, hash `7193782`)
fab
2021-08-16 08:09:39
settings?
Deleted User
fab settings?
2021-08-16 08:09:58
https://discord.com/channels/794206087879852103/803645746661425173/876919583376826410
veluca
I've just tested it and the new resampling method indeed works better. I used Windows executables from GitHub artifacts (I've been able to download them because I've been logged in to GitHub). Options: `--target_size=170000 --resampling=2`
2021-08-16 08:28:24
https://artifacts.lucaversari.it/libjxl/libjxl/latest πŸ˜›
2021-08-16 08:28:42
try adding photon noise too
fab
veluca https://artifacts.lucaversari.it/libjxl/libjxl/latest πŸ˜›
2021-08-16 08:29:32
for %i in (C:\Users\Utente\Documents\wqe\Camera*.png) do cjxl -s 8 -I 0.953 --gaborish=1 -q 97.056 --photon_noise=ISO44 %i %i.jxl
2021-08-16 08:29:38
i did and it was s..
2021-08-16 08:29:47
like better than the two deltas
Deleted User
veluca try adding photon noise too
2021-08-16 08:29:59
Too much time, I just wanted to test the resampling itself πŸ˜›
fab
2021-08-16 08:30:12
but the blurring of a normal shape not good
Scope
2021-08-16 11:05:38
Low bitrate comparison, same size (e.g. what could be better as the default setting for low quality): ```1. AVIF (*.avif.png) - also for comparison 2. Modular (*.JXL_m.png) 3. No resampling (*.JXL_nr.png) 4. Old `resampling=2 --photon_noise=ISO2000` (*.JXL_r2.png) 5. New `resampling=2 --photon_noise=ISO2000` (*.JXL_r2n.png)```
2021-08-16 11:06:09
2021-08-16 11:06:10
2021-08-16 11:06:11
2021-08-16 11:06:12
2021-08-16 11:06:13
2021-08-16 11:06:16
2021-08-16 11:06:16
2021-08-16 11:06:17
2021-08-16 11:06:19
2021-08-16 11:06:20
2021-08-16 11:06:24
2021-08-16 11:06:24
2021-08-16 11:06:25
2021-08-16 11:06:27
2021-08-16 11:06:28
2021-08-16 11:06:30
2021-08-16 11:06:32
2021-08-16 11:06:33
2021-08-16 11:06:35
2021-08-16 11:06:36
2021-08-16 11:06:39
2021-08-16 11:06:39
2021-08-16 11:06:41
2021-08-16 11:06:44
2021-08-16 11:06:46
2021-08-16 11:06:48
2021-08-16 11:06:49
2021-08-16 11:06:51
2021-08-16 11:06:52
2021-08-16 11:06:55
2021-08-16 11:06:58
2021-08-16 11:06:59
2021-08-16 11:07:00
2021-08-16 11:07:01
2021-08-16 11:07:03
2021-08-16 11:07:07
2021-08-16 11:07:08
2021-08-16 11:07:09
2021-08-16 11:07:10
2021-08-16 11:07:10
Jyrki Alakuijala
2021-08-17 12:49:53
https://twitter.com/jyzg/status/1427338090658607112
**After** (commit `Implement sharper 2x2 downsampling kernel`, hash `7193782`)
2021-08-17 01:00:27
we have a few more resampling improvements in the pipeline -- possibly roughly the same amount of improvement that is available in the 445 PR
2021-08-17 01:04:21
I'd like to remind that with 2x2 resampling the bitrates are roughly 4x lower -- this means that jxl:resampling=2:d2 is roughly the same bitrate as jxl:d8
2021-08-17 01:17:19
Perhaps 2x2 resampling is good enough that we could degrade to that for extremely high distances rather than the modular mode
2021-08-17 01:18:08
Today the modular/VarDCT flip creates a strange discontinuity in quality: https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_08_10/plots.html
2021-08-17 10:10:58
also a link to the images https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_08_10/index.html#seikima-ii-20100704-japan-expo-32*3:1&JXL=m&HEIF=m&subset1 -- can be difficulty to find from the objective plots link
2021-08-17 10:11:26
thank you everyone for posting the results on 2x downsampling, this is helping us to prioritize things
lvandeve
I've just tested it and the new resampling method indeed works better. I used Windows executables from GitHub artifacts (I've been able to download them because I've been logged in to GitHub). Options: `--target_size=170000 --resampling=2`
2021-08-17 10:49:12
Thanks for the feedback! We're working on further downsampling methods to improve it further: This was the original resampling:
2021-08-17 10:49:50
This is after yesterday's patch:
2021-08-17 10:50:50
And this is what's possible with optimal downsampling:
2021-08-17 10:57:31
And also this, which has more ringing but is sharper:
diskorduser
2021-08-17 11:41:56
What is this --resampling parameter? Is it supposed to downscale/resize input by 50%? It doesn't do anything when I use it.
lvandeve
2021-08-17 11:42:11
try --resampling=2
diskorduser
2021-08-17 11:42:19
Yeah I used that
lvandeve
2021-08-17 11:42:33
it downscales when encoding, but upscales when decoding, so it encodes 1/4th of the pixels, but you still get the original resolution
diskorduser
2021-08-17 11:43:21
Oh. Yeah. I get original resolution that's why I got confused
2021-08-17 11:45:09
I have used it on a full gradient image. So I couldn't see any difference
Scope
Scope Low bitrate comparison, same size (e.g. what could be better as the default setting for low quality): ```1. AVIF (*.avif.png) - also for comparison 2. Modular (*.JXL_m.png) 3. No resampling (*.JXL_nr.png) 4. Old `resampling=2 --photon_noise=ISO2000` (*.JXL_r2.png) 5. New `resampling=2 --photon_noise=ISO2000` (*.JXL_r2n.png)```
2021-08-17 03:36:44
Same size <https://github.com/libjxl/libjxl/pull/445> vs <https://github.com/libjxl/libjxl/pull/458>
2021-08-17 03:36:54
2021-08-17 03:36:55
2021-08-17 03:36:56
2021-08-17 03:36:56
2021-08-17 03:36:57
2021-08-17 03:36:57
2021-08-17 03:36:58
2021-08-17 03:36:59
2021-08-17 03:37:00
2021-08-17 03:37:01
2021-08-17 03:37:01
2021-08-17 03:37:02
2021-08-17 03:37:06
2021-08-17 03:37:08
2021-08-17 03:37:08
2021-08-17 03:37:10
2021-08-17 03:38:30
Sharper, but the ringing artifacts on flat areas have become much more noticeable
Scope Same size <https://github.com/libjxl/libjxl/pull/445> vs <https://github.com/libjxl/libjxl/pull/458>
2021-08-17 04:11:26
Updated <https://github.com/libjxl/libjxl/pull/458>
2021-08-17 04:11:27
2021-08-17 04:11:27
2021-08-17 04:11:28
2021-08-17 04:11:29
2021-08-17 04:11:29
2021-08-17 04:11:29
2021-08-17 04:11:31
fab
Scope Updated <https://github.com/libjxl/libjxl/pull/458>
2021-08-17 04:33:06
do you have exe for windows, can you send build
2021-08-17 04:38:49
<@!111445179587624960>
2021-08-17 04:40:05
would be extremely good
2021-08-17 04:40:50
<@!111445179587624960>
2021-08-17 04:44:27
-d 0.838 -s 8 --epf=1 -I 0.373
2021-08-17 04:45:08
this is really impressive
2021-08-17 04:45:17
if you have build please send cjxl
Scope
2021-08-17 04:49:55
I only have AVX2 build and there are changes just for --`resampling=` and if don't use this option, there is no changes for quality
fab
Scope I only have AVX2 build and there are changes just for --`resampling=` and if don't use this option, there is no changes for quality
2021-08-17 04:52:38
ah
2021-08-17 05:01:02
yes on third try i notice improvement
eddie.zato
2021-08-18 11:55:19
32979 photos in jpeg. Resolution from 1372x2000 to 11064x14006. Transcoded lossless with `-e 8` to jxl. 100,24 GiB - jpegs. 80,68 GiB - jxls.
_wb_
2021-08-18 12:02:20
looks like the ~20% gain estimate is about right πŸ™‚
Scope
2021-08-18 01:29:09
πŸ€”
_wb_
2021-08-18 01:30:13
lol that looks messy
2021-08-18 01:31:07
it kind of makes sense in a way, I would say it selected the "most nonphotographic" parts of the image
2021-08-18 01:32:09
but looks like the thresholds could use improvement, and also if you have many borders like in this example, it is likely going to be counterproductive because those borders add entropy too
Scope
2021-08-18 01:32:12
`-d 2`
2021-08-18 01:32:16
`-d 2 --separate=1`
2021-08-18 01:32:37
2021-08-18 01:32:52
And with almost the same size
2021-08-18 01:32:57
_wb_
2021-08-18 01:34:35
hmm, the quantization is really bad in that example, you can see the banding the modular image introduces in those long gradients
2021-08-18 01:35:04
and then vardct has to undo that banding, which is way more work than not introducing it in the first place
Scope
2021-08-18 01:36:28
Yep, it appears when converting from XYB?
_wb_
2021-08-18 01:37:31
well if you do the modular part with too high quality, you're basically losslessly encoding a ~12-bit version of the image, so the size will blow up
2021-08-18 01:38:28
so like in other patches, I quantize the (XYB) colors to make it more compressible - and since vardct will still encode the residuals, it can still correct any quantization error that was introduced
Scope
2021-08-18 01:40:46
`-d 2`
2021-08-18 01:41:09
`-d 2 --separate=1`
2021-08-18 01:41:44
`djxl -d 8`
2021-08-18 01:45:54
And further for all images: `-d 2` `-d 2 --separate=1` `djxl -d 8`
2021-08-18 01:45:57
2021-08-18 01:46:01
2021-08-18 01:48:14
Yep, there are some noticeable artifacts even at the border between modes, but still, a very promising option
spider-mario
2021-08-18 01:49:35
it’s an interesting effect, though
2021-08-18 01:49:53
probably deserving of some space in <#805007255061790730>
2021-08-18 01:50:37
it’s like having enhancing glass on certain parts of the image
Scope
2021-08-18 01:56:52
2021-08-18 01:56:56
2021-08-18 01:57:00
2021-08-18 01:57:12
2021-08-18 01:57:18
2021-08-18 01:58:38
However, the size is larger here, perhaps because the blocks on the large single-color area are not combined and there is no benefit in compression
_wb_
2021-08-18 02:17:35
I should probably add something to ignore solid-color regions - for those it doesn't really matter what mode is used, and it would be silly to separate just because there's a solid background
spider-mario
2021-08-18 02:18:11
did you say it replaced the modular part with black in the vardct image?
2021-08-18 02:18:29
maybe it could replace with an average of the surrounding or something like that instead
Scope
2021-08-18 02:31:19
Also if the images will be encoded in lossless with VarDCT lossy patches? <:Thonk:805904896879493180>
2021-08-18 03:37:36
2021-08-18 03:37:39
2021-08-18 03:37:43
2021-08-18 04:35:04
2021-08-18 04:35:34
2021-08-18 06:02:44
2021-08-18 06:02:56
2021-08-18 06:03:02
2021-08-18 06:03:06
2021-08-18 06:06:59
Larger size, but no ringing artifacts (if not counting artifacts between different modes)
2021-08-18 11:39:22
Hmm, I think it would be useful to encode in modular mode also the crossings between solid color backgrounds and sharp lines/edges, even if it is not so beneficial for compression (because artifacts or blurry/jagged lines are most noticeable there) It would be even better if all the sharp lines were compressed in modular mode and then overlaid on top of VarDCT, but I'm not sure if it is possible, and using splines for that would be quite difficult
2021-08-18 11:40:02
Like this (modular mode only works on the background and mostly does not touch the lines): Source
2021-08-18 11:40:11
2021-08-18 11:40:36
2021-08-18 11:47:58
And also to be much closer to lossless at higher quality settings, like `-d 1`, at least visually
2021-08-19 01:48:27
Some upscalers comparison (960x540 >> 1920x1080) 1. AMD FidelityFX Super Resolution 2. ImageMagick Lanczos 3. `-d 0.1 --resampling=2` 4. Cropped 1920x1080 source
2021-08-19 01:48:39
2021-08-19 01:48:40
2021-08-19 01:48:41
2021-08-19 01:48:43
2021-08-19 01:48:46
2021-08-19 01:48:47
2021-08-19 01:48:48
2021-08-19 01:48:49
2021-08-19 01:48:52
2021-08-19 01:48:53
2021-08-19 01:48:53
2021-08-19 01:48:54
2021-08-19 01:48:57
2021-08-19 01:48:58
2021-08-19 01:48:59
2021-08-19 01:49:00
2021-08-19 01:49:03
2021-08-19 01:49:03
2021-08-19 01:49:04
2021-08-19 01:49:05
2021-08-19 01:49:08
2021-08-19 01:49:08
2021-08-19 01:49:09
2021-08-19 01:49:10
2021-08-19 01:49:13
2021-08-19 01:49:14
2021-08-19 01:49:14
2021-08-19 01:49:15
2021-08-19 01:58:49
Not very correct comparison, but I had this idea after AMD FidelityFX Super Resolution was open source <https://github.com/GPUOpen-Effects/FidelityFX-CLI>, it is very fast GPU upscaler (except I'm not sure about mobile GPU, but it is implemented on shaders), it is intended for upscaling mainly in games and in real time, but in general suitable for any content, its main advantage speed, good quality, openness and it should run on any relatively modern GPU So maybe in the future it will be possible to use something like this upscaler implementation on GPU
2021-08-19 02:01:47
For `--resampling=2` there are noticeable problems with lines and some more blurring, although I understand that it is also intended for highly compressed images and better hiding various artifacts
w
2021-08-19 03:00:55
just use nnedi
Scope
2021-08-19 03:11:26
Nnedi is very much slower, FSR is extremely fast (it is intended for 1000+ fps in real time at 4k+ resolution)
veluca
2021-08-19 03:13:36
how did you *down*sample?
Scope
2021-08-19 03:18:07
Also ImageMagick Lanczos (but also tried other methods, not seeing much difference)
fab
2021-08-19 03:40:59
for %i in (C:\Users\Utente\Documents\wfwe\*.png) do cjxlsharpness -q 98.36 -s 7 --progressive --faster_decoding=1 --use_new_heuristics --epf=2 %i %i.jxl for %i in (C:\Users\Utente\Documents\wfwe\d\*.jxl) do djxl %i %i.png
2021-08-19 03:42:22
sharpness 06052021 BUILD
2021-08-19 03:42:22
2021-08-19 03:43:01
2021-08-19 03:43:29
2021-08-19 03:44:00
2021-08-19 03:44:35
2021-08-19 03:45:00