|
_wb_
|
2021-02-13 09:18:25
|
The default behavior for palette and channel-palette is probably still quite stupid, especially in case of grayscale
|
|
|
Orum
|
2021-02-13 10:01:33
|
I assume ultimately it will detect when it makes sense to use it (and enable it automatically in those situations)?
|
|
|
Scope
|
2021-02-13 10:28:42
|
Update with `-s9 -E 3 -X 0 -Y 0`:
<https://docs.google.com/spreadsheets/d/1ugFqODnDnyeHbww9g4kKsqk--VKvosMQ2YYd1YN5KLA/edit#gid=584197871>
Examples (better with `-X 0 -Y 0`):
<https://i.redd.it/ew0krp5u4r641.png>
<https://i.redd.it/xptmu1db53o31.png>
<https://i.redd.it/9snkif62a2x51.png>
|
|
2021-02-14 01:09:05
|
JXL (30 482 507)
```Read 6720x4480 image, 27.1 MP/s
Encoding [JPEG, lossless transcode, kitten], 8 threads.
Compressed to 30482507 bytes (8.100 bpp).
6720 x 4480, 16.25 MP/s [16.25, 16.25], 1 reps, 8 threads.```
Brunsli (30 515 294)
```6720 x 4480, 8.20 MP/s [8.20, 8.20], 1 reps, 1 threads.``` <:Thonk:805904896879493180>
|
|
|
_wb_
|
2021-02-14 07:34:12
|
Usually brunsli will be a bit smaller because of its dedicated DCT8x8 context model, but it depends. On 4:4:4 jpegs, jxl can be a bit smaller than brunsli. JXL has potentially better DC encoding, and for 4:4:4 it can use chroma from luma also for existing jpegs, which brunsli doesn't do.
|
|
|
Dr. Taco
|
2021-02-14 03:25:24
|
Has anyone done JXL benchmarks using these?
https://github.com/FLIF-hub/benchmarks
|
|
|
_wb_
|
2021-02-14 03:33:26
|
Not afaik
|
|
|
Scope
|
2021-02-15 01:56:17
|
Hmm, yep, that fixes AVIF premultiply alpha https://github.com/AOMediaCodec/libavif/pull/491
|
|
2021-02-15 01:56:23
|
|
|
2021-02-15 01:56:33
|
AVIF
|
|
2021-02-15 02:00:10
|
AVIF (without fix)
|
|
|
fab
|
2021-02-15 02:02:00
|
so this there are invisible pixels
|
|
2021-02-15 02:02:03
|
like jpeg xl
|
|
|
Fox Wizard
|
2021-02-15 02:02:59
|
<:monki:750177061020106762>
|
|
|
Scope
|
2021-02-15 02:38:54
|
<@!794205442175402004> FLIF has no premultiply alpha options like AVIF and WebP v2?
|
|
2021-02-15 02:39:02
|
Although it might be better to do it in the PNG optimization step, so that all encoders are on equal footing (but I can't remember which optimizers do it right)
|
|
|
_wb_
|
2021-02-15 02:39:32
|
no, FLIF only does non-premultiplied alpha, like PNG
|
|
2021-02-15 02:39:48
|
but it does by default not encode the RGB of A=0 pixels
|
|
2021-02-15 02:40:19
|
so there's that
|
|
2021-02-15 02:41:28
|
by the way, WebP2 is supposed to be named "WebP2", without space and "v"
|
|
2021-02-15 02:42:34
|
it's not a version 2.0 implementation of WebP
|
|
|
Scope
|
2021-02-15 02:42:39
|
Yep, in the beginning it was called that and I got used to it
|
|
|
_wb_
|
2021-02-15 02:42:49
|
it's a new codec confusingly called WebP2
|
|
2021-02-15 02:43:13
|
at some point there might be a libwebp v2.0 and a libwp2 v1.0
|
|
2021-02-15 02:44:03
|
things will _really_ get confusing then π
|
|
|
Scope
|
2021-02-15 02:44:58
|
The numbers are somewhat confusing, unlike letter designations like Jpeg XT and Jpeg XL (although people often get that confused as well)
|
|
|
_wb_
|
2021-02-15 02:45:38
|
yes, I don't really like JPEG's naming choices
|
|
2021-02-15 02:46:20
|
JPEG XT was actually backwards compatible so for that one, JPEG 2 would maybe kind of make sense
|
|
2021-02-15 02:49:04
|
XR (wdp / HD Photo) is supposed to mean "extended range" but JPEG 2000 actually supports higher range than XR
|
|
2021-02-15 02:50:52
|
I think XT is supposed to mean "extensions"
|
|
2021-02-15 02:51:25
|
XS is supposed to mean "extra speed" or something, as it is aiming for ultra-low-latency/complexity
|
|
2021-02-15 02:52:11
|
and then basically it became a 'tradition' to name things JPEG X<something>
|
|
2021-02-15 02:52:19
|
I don't know how they came up with XL
|
|
2021-02-15 02:52:41
|
maybe it was a joke, t-shirt sizes XS - XL or something
|
|
2021-02-15 02:53:05
|
Touradj once told me the L can mean "longterm"
|
|
|
Scope
|
2021-02-15 02:53:27
|
Yep, L - Long-term seems logical (for the conditions that were presented for its acceptance)
|
|
|
_wb_
|
2021-02-15 02:54:27
|
it's still somewhat confusing that they call all their codecs "JPEG <something>"
|
|
2021-02-15 02:54:35
|
and they also call themselves JPEG
|
|
|
Crixis
|
2021-02-15 02:55:29
|
Is only the contribute of jpeg group to the meme world
|
|
|
_wb_
|
2021-02-15 02:57:13
|
and there still is no easy unambiguous way to refer to the old jpeg (10918-1, or rather 18477-1 which is the formal standardization of the de facto standard)
|
|
2021-02-15 02:57:19
|
some say "legacy JPEG"
|
|
2021-02-15 02:57:24
|
some say "JPEG-1"
|
|
2021-02-15 02:57:34
|
some say "JFIF"
|
|
|
Crixis
|
2021-02-15 02:59:29
|
whatsapp use .jfif
|
|
|
_wb_
|
2021-02-15 03:02:23
|
where do you see filename extensions in whatsapp?
|
|
|
Crixis
|
|
_wb_
where do you see filename extensions in whatsapp?
|
|
2021-02-15 03:10:55
|
Whatsapp web
|
|
2021-02-15 03:13:44
|
strange, other image are .jpeg, only a lucky case?
|
|
|
Scope
|
2021-02-15 03:17:31
|
Chrome sometimes saves JFIF instead of WebP
|
|
2021-02-15 03:42:12
|
Maybe I should change LEA back to BMF, my idea was what results are possible with LEA's fast encoder (faster than JXL's default -s 7 and sometimes -s 5), while it is better in compression than -s 9 (-E 3), but it has symmetric decoding speed, with still not enough for practical use <:Thonk:805904896879493180>
|
|
|
|
Deleted User
|
2021-02-15 04:03:24
|
Animation comparison for <@!532010383041363969> and <@!794205442175402004> , here is the APNG original:
|
|
2021-02-15 04:03:53
|
jxl:
|
|
2021-02-15 04:03:59
|
|
|
2021-02-15 04:04:26
|
WebP (like VP8)
|
|
2021-02-15 04:04:26
|
|
|
2021-02-15 04:04:50
|
|
|
2021-02-15 04:04:51
|
and VP9:
|
|
|
_wb_
|
2021-02-15 04:05:55
|
what distance did you use for the jxl?
|
|
|
|
Deleted User
|
2021-02-15 04:07:39
|
I used rgb for VP9, since WebP already represents YUV420. Size target was 64 KiB, but I don't quite remember which exact quality number of each codec resulted in that size.
|
|
2021-02-15 04:08:52
|
But JXL looks really nice while the other two create blocking in the out of focus parts and thin lines or fine color edges get blurred.
|
|
|
_wb_
|
2021-02-15 04:10:09
|
I see jxl ringing around the nose
|
|
|
|
Deleted User
|
2021-02-15 04:11:50
|
I only see that if I push my nose against the screen. ^^
|
|
|
_wb_
|
2021-02-15 04:14:34
|
jxl is ringing quite strongly around many of the edges, but it does avoid banding/blockiness
|
|
2021-02-15 04:15:10
|
the banding of vp8 and vp9, especially in the darks, is quite noticeable
|
|
2021-02-15 04:15:57
|
video codecs really suck at dark browns
|
|
2021-02-15 04:16:23
|
I would almost say they are racist
|
|
|
|
Deleted User
|
2021-02-15 04:20:10
|
Better than VarDCT? (first frame only):
|
|
2021-02-15 04:20:38
|
-m -Q 70 -s 9
|
|
|
Scope
|
2021-02-16 01:51:42
|
Some examples of pixel art compressibility and also excessively large `-s 3`:
https://i.redd.it/uo9u57i7opj41.png
|
|
2021-02-16 01:54:07
|
```BMF 11 032
WebP 14 294
S3.jxl 1 618 449 <-
S9.jxl 29 347```
|
|
2021-02-16 01:56:27
|
https://i.redd.it/b5t7kfq0w2141.png
|
|
2021-02-16 01:58:08
|
```BMF 4 024
FLIF 14 038
S3.jxl 253 144
S9.jxl 21 348``` BMF <:Thonk:805904896879493180>
|
|
2021-02-16 02:00:29
|
https://i.redd.it/41xxebbzfak41.png
|
|
2021-02-16 02:01:54
|
```BMF 792
WebP 1 170
S3.jxl 10 736
S9.jxl 3 440```
|
|
2021-02-16 02:05:32
|
https://i.redd.it/e9vgojjx5fe41.png
|
|
2021-02-16 02:06:30
|
```BMF 29 404
WebP 87 202
S3.jxl 790 306 <-
S9.jxl 101 239```
|
|
2021-02-16 02:31:13
|
https://i.redd.it/5ixlfk5xm7f41.png
|
|
2021-02-16 02:32:07
|
```BMF 36 436
WebP 53 410
S3.jxl 1 289 528 <-
S9.jxl 61 481```
|
|
|
BlueSwordM
|
2021-02-16 03:22:26
|
`S9_g3_I1.0.jxl 59491`
|
|
|
_wb_
|
2021-02-16 11:45:22
|
interesting stuff
|
|
2021-02-16 11:47:57
|
s3 does really poorly on such big-block stuff
|
|
2021-02-16 11:48:31
|
https://openbenchmarking.org/test/pts/jpegxl-decode it would be interesting to get some ARM numbers
|
|
|
Jyrki Alakuijala
|
2021-02-16 05:34:49
|
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_02_02/index.html#air-force-academy-chapel-colorado-springs-co-04090u-original&WEBP2=l&JXL=m&subset1
|
|
2021-02-16 05:34:51
|
vs
|
|
2021-02-16 05:34:53
|
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_02_15/index.html#air-force-academy-chapel-colorado-springs-co-04090u-original&WEBP2=l&JXL=m&subset1
|
|
2021-02-16 05:35:09
|
small improvement on the worst image
|
|
2021-02-16 05:36:29
|
WEBP2 is quite a lot stronger on this image
|
|
2021-02-16 05:37:13
|
I'll probably be able to make a similar improvement in the next two weeks
|
|
|
Crixis
|
|
Jyrki Alakuijala
small improvement on the worst image
|
|
2021-02-16 05:41:05
|
This is a f**** ammount of less ringing and more details
|
|
2021-02-16 05:41:51
|
Webp2 sky is literaly make of squares
|
|
|
Jyrki Alakuijala
|
2021-02-16 05:55:44
|
WebP2 is compromising the sky -- it is a natural consequence of the YUV/RGB color space
|
|
2021-02-16 05:55:59
|
we see this is we optimize neural codec against the XYB or RGB
|
|
2021-02-16 05:56:17
|
RGB neural codec puts less bits on the sky and on red objects than an XYB neural codec
|
|
2021-02-16 05:56:45
|
plots can be interesting, too
|
|
2021-02-16 05:56:49
|
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_02_02/plots.html
|
|
2021-02-16 05:56:50
|
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/2021_02_15/plots.html
|
|
2021-02-16 05:57:16
|
nothing is better than looking at the images, of course π
|
|
2021-02-16 05:57:57
|
the 2021_02_15 version includes jxl 0.3.2
|
|
2021-02-16 05:59:25
|
2021_02_02 version includes jxl 0.3.0
|
|
|
fab
|
2021-02-16 05:59:30
|
jxl 0.3.2 has image improvement to 0.3.1
|
|
2021-02-16 05:59:31
|
?
|
|
|
Jyrki Alakuijala
|
2021-02-16 06:00:12
|
as far as I know 0.3.1 has severe problems with some colorspace mistyped as XYX (instead of XYZ), and should be avoided
|
|
|
fab
|
2021-02-16 06:02:39
|
i converted some files with 0.3.1
|
|
|
_wb_
|
2021-02-16 06:23:41
|
I suppose it typically should only affect lossless? In lossy we don't typically store compressed icc profiles, just a colorspace enum which is not affected
|
|
|
fab
|
2021-02-16 06:30:11
|
i haven't encoded anything with lossless in 0.3.1
|
|
|
_wb_
|
2021-02-16 06:43:26
|
Probably fine then - best to check if things you encoded with 0.3.1 do decode in 0.3.2, if not we could probably make a "bitstream fixer" tool
|
|
|
Scope
|
2021-02-16 07:22:50
|
https://i.redd.it/314b01jokhh61.png
```FLIF 600 112
BMF 193 140
WEBP 196 524
S3.jxl 4 640 180
S9.jxl 994 491
S9_E3_I1.jxl 1 261 993```
|
|
|
|
Deleted User
|
2021-02-16 07:23:33
|
Patches go brrrr
|
|
|
_wb_
|
2021-02-16 07:25:29
|
Interesting image to try better patch heuristics with
|
|
|
Crixis
|
2021-02-16 07:28:33
|
Why jxl is so bad in this?
|
|
|
_wb_
|
2021-02-16 07:28:37
|
It probably currently doesn't detect any
|
|
2021-02-16 07:29:36
|
Because lz-based codecs will do automatic deduplication
|
|
|
Jyrki Alakuijala
|
2021-02-16 07:29:37
|
we don't have this category of images in the test corpus
|
|
|
_wb_
|
2021-02-16 07:30:06
|
Try `-I 0 -s 9 -g 3`?
|
|
|
Jyrki Alakuijala
|
2021-02-16 07:30:28
|
I believe that will be able to eventually use our palette coding for making complex patterns compress very well
|
|
2021-02-16 07:30:37
|
but for those images patches could work, too
|
|
2021-02-16 07:31:04
|
just the palette with context modeling is incredibly powerful for simple repetitive patterns
|
|
2021-02-16 07:31:36
|
basically we could code a say whole 11x17 pixel pattern into a single palette entry
|
|
2021-02-16 07:32:24
|
just trigger the rest by context modeling
|
|
|
_wb_
|
2021-02-16 07:33:48
|
Could be done, but patches will probably also work well here, if you can detect all occurrences
|
|
|
Dr. Taco
|
2021-02-16 07:36:10
|
is that a crazy bunny made out of minecraft blocks
|
|
|
Scope
|
2021-02-16 07:37:54
|
Also Web2 is worse than WebP on this kind of pixel art content (but consistently better on other types)
|
|
|
BlueSwordM
|
2021-02-16 07:44:25
|
https://discord.com/channels/794206087879852103/803645746661425173/811316681544171590
Interestingly enough, -s 9 does worse than -s 8 on that image.
`s8_g3 834915`
`s9_g3 855966`
|
|
|
Scope
|
2021-02-16 07:45:04
|
https://i.redd.it/qs0p97ahf8k51.png
```FLIF 237 281
BMF 37 948
WEBP 57 718
S3.jxl 3 755 790
S9.jxl 76 990
S9_E3_I1.jxl 76 351```
|
|
|
Crixis
|
2021-02-16 07:59:10
|
A fast test for individuate pixel art (nΓn) for esample spartial color correlation (to individuate n) and then force palette of nΓn pixels or paches?
|
|
|
Scope
|
2021-02-16 08:01:55
|
Images like this mostly because I'm in the process of increasing the PixelArt set (the previous one was very small), although I don't think pixel art should be a priority right now (especially if it requires big changes), there are more important things, but this is also one of the weaknesses of JXL's lossless mode so far, especially at fast speeds, and lossy compression is not the best choice for this content either
|
|
2021-02-16 08:12:58
|
https://i.redd.it/ze1j32m9lka61.png
```BMF 103 108
WEBP 131 228
WEBP2 140 481
S3.jxl 646 053
S9.jxl 309 170
S9_E3_I1.jxl 247 157```
|
|
|
_wb_
|
2021-02-16 08:13:02
|
We need to add a fast mode for non-photo that maybe doesn't do great on these but at least not terrible
|
|
|
Scope
|
2021-02-16 08:18:43
|
https://i.redd.it/ky96oyujjtg61.png
```
BMF 3 400
WEBP 1 160
WEBP2 2 935
AVIF 3 380
PNG 2 293 <-
S3.jxl 146 817
S9.jxl 6 176
S9_E3_I1.jxl 6 137
S9_I0_G3_P0.jxl 2 153```
|
|
2021-02-16 08:21:58
|
https://i.redd.it/mkqqi5ly31c61.png
```
BMF 20 144
WEBP 14 868
WEBP2 36 852
AVIF 15 772
PNG 27 310
S3.jxl 66 631
S9.jxl 29 918
S9_E3_I1.jxl 29 923
S9_I0_G3_P0.jxl 22 959```
|
|
|
_wb_
|
2021-02-16 08:22:08
|
Repetitive stuff is great for compression but we mostly don't play that game yet. Bitstream has many ways of doing it though.
|
|
2021-02-16 08:22:52
|
Try `-P 0 -I 0 -g 3 -s 9` maybe?
|
|
|
Scope
|
2021-02-16 08:46:58
|
Sometimes even just -g 3 helps on such content (it would be nice to find signs of its efficiency on the image automatically without bruteforcing, at higher resolutions it works more often, but also not always)
|
|
2021-02-17 02:36:21
|
https://i.redd.it/nikixial60s21.png
```
BMF 148
WEBP 1 166
PNG 1 036
S3.jxl 4 287
S9_E3.jxl 361
S9_E3_I1.jxl 184
```
|
|
2021-02-17 02:36:38
|
`-I 1` <:Thonk:805904896879493180>
|
|
2021-02-17 02:41:41
|
https://i.redd.it/uszh7pkxda141.png
```WEBP 70 676
WEBP2 347 475
PNG 119 814
S3.jxl 4 367 097
S9_E3.jxl 34 254
S9_E3_I1.jxl 14 477```
|
|
|
|
veluca
|
|
Scope
https://i.redd.it/uszh7pkxda141.png
```WEBP 70 676
WEBP2 347 475
PNG 119 814
S3.jxl 4 367 097
S9_E3.jxl 34 254
S9_E3_I1.jxl 14 477```
|
|
2021-02-17 02:44:19
|
where is this image from?
|
|
2021-02-17 02:44:45
|
I mean, how is it generated
|
|
|
Scope
|
2021-02-17 02:45:25
|
Idk, /r/fractals or something like that, from reddit
|
|
|
|
veluca
|
2021-02-17 02:46:32
|
I guess it's generated by some simple rule, but can't tell on the top of my head π
|
|
|
_wb_
|
2021-02-17 02:48:17
|
Tree learning will figure out the rule
|
|
|
Scope
|
2021-02-17 02:49:18
|
Also https://i.imgur.com/UL1fXgB.png
```WEBP 14 410
WEBP2 50 011
BMF 12 940
PNG 113 542
S3.jxl 1 157 680
S9_E3.jxl 54 340
S9_E3_I1.jxl 54 605```
|
|
|
|
veluca
|
2021-02-17 02:51:12
|
that's one where turning on/off patches and -I 0 will make a big difference (but I don't really know in what direction :P)
|
|
|
Crixis
|
|
Scope
Also https://i.imgur.com/UL1fXgB.png
```WEBP 14 410
WEBP2 50 011
BMF 12 940
PNG 113 542
S3.jxl 1 157 680
S9_E3.jxl 54 340
S9_E3_I1.jxl 54 605```
|
|
2021-02-17 02:56:04
|
In this webp is sick!
|
|
|
Scope
|
2021-02-17 02:59:47
|
Yep, also Lossless WebP in general is well tuned over these 10 years (it has very stable results on all kinds of content)
|
|
|
Crixis
|
|
veluca
that's one where turning on/off patches and -I 0 will make a big difference (but I don't really know in what direction :P)
|
|
2021-02-17 03:00:45
|
-I 0 is bad in this
|
|
|
|
Deleted User
|
2021-02-17 03:02:39
|
Jyrki made a really great job with WebP Lossless...
|
|
2021-02-17 03:03:03
|
But JPEG XL has *WAAAYYYY* more potential
|
|
|
Crixis
|
2021-02-17 03:04:37
|
just pay more Jyrki
|
|
|
Scope
|
2021-02-17 03:10:22
|
He turned to the dark ||lossy || side
|
|
2021-02-17 04:30:18
|
On average `-s 9 -E 3 -I 1` gives 0.25% better efficiency than just `-s 9 -E 3` π€
|
|
|
|
veluca
|
2021-02-17 04:34:17
|
not unexpected, by default we learn the tree with 50% of the pixels, so I don't expect *huge* gains from doubling the samples
|
|
|
Scope
|
2021-02-17 04:37:41
|
And up to 2-3% on something like pixel art
|
|
|
_wb_
|
2021-02-17 04:49:34
|
changing the group size and/or activating lz77 will probably make a bigger difference
|
|
2021-02-17 04:50:45
|
<@!179701849576833024> do we have a way to do *both* lz77 and MA trees in the current encoder? or is it one or the other atm?
|
|
|
|
veluca
|
2021-02-17 04:51:38
|
well.. in theory we currently learn a MA tree, and then try to use lz77 to figure out if there is any entropy left to reduce. This is in many ways not optimal at all though...
|
|
|
Jyrki Alakuijala
|
|
Jyrki made a really great job with WebP Lossless...
|
|
2021-02-17 08:42:28
|
Thank you :-D, warms my heart to hear this!
|
|
|
Pieter
|
|
Jyrki Alakuijala
Thank you :-D, warms my heart to hear this!
|
|
2021-02-17 08:45:41
|
I'm sure that's desirable in Finland right now.
|
|
|
|
Deleted User
|
|
Jyrki Alakuijala
Thank you :-D, warms my heart to hear this!
|
|
2021-02-17 08:48:58
|
But really, back when JPEG XL wasn't well developed yet, I was really planning to run `cwebp -z 9` on ALL of my ~15k PNG phone screenshots because of storage space savings, i could save GIGABYTES of space. Unfortunately I didn't have time and resources so I didn't encode more than a test suite from most recent screenshots.
|
|
2021-02-17 08:51:31
|
It seems like it was a good decision to wait though, JPEG XL's patches probably gonna save even more space because those screenshots are text and images, and the former compresses incredibly well with patches.
|
|
|
BlueSwordM
|
2021-02-17 08:52:05
|
Actually, that reminds me.
|
|
2021-02-17 08:52:15
|
We need MTed lossless modular. π
|
|
2021-02-17 08:52:29
|
I want to start using JXL for screenshots.
|
|
|
|
Deleted User
|
|
BlueSwordM
We need MTed lossless modular. π
|
|
2021-02-17 08:52:48
|
Wait, it's single threaded currently?
|
|
|
BlueSwordM
|
2021-02-17 08:53:01
|
From what I've seen, -s 4 and above are not threaded nearly as well as -s 3.
|
|
|
|
veluca
|
2021-02-17 08:53:55
|
if you want to compress a large set of images, you're likely better off with per-image parallelism - just saying π
|
|
2021-02-17 08:54:03
|
otherwise, yes, tree learning is single threaded
|
|
|
BlueSwordM
|
2021-02-17 08:54:20
|
I mean, it's not an issue with post-processing(I can just use GNU parallel for that), but I'd like to take them in JXL in the 1st place.
|
|
|
|
veluca
|
2021-02-17 08:54:26
|
one of those things that are not *too* hard to fix, but they take time that I currently don't really have
|
|
|
|
Deleted User
|
2021-02-17 08:55:00
|
Ok, at least it works π
|
|
|
BlueSwordM
|
2021-02-17 08:55:16
|
However, VARDCT already works well for screenshots, and it is quite speedy.
|
|
2021-02-17 08:55:38
|
I'd love it if Spectacle(the KDE screenshot utility) allowed you to change encoder settings though.
|
|
2021-02-17 08:55:40
|
That'd be nice.
|
|
|
|
Deleted User
|
|
BlueSwordM
However, VARDCT already works well for screenshots, and it is quite speedy.
|
|
2021-02-17 08:57:23
|
For lossy ones, yes. Current lossless PNG screenshots are quite big, but I've got an idea to compress that thing better.
|
|
2021-02-17 08:58:06
|
Let's say I'm doing a Facebook post screenshot. A JPG photo and some text.
|
|
2021-02-17 08:59:30
|
If we *somehow* tap into JPG decoder, then we probably can directly copy-paste JPG DCT coeffs as VarDCT 8x8 and encode the text with patches.
|
|
2021-02-17 08:59:34
|
Will it work?
|
|
|
Scope
|
2021-02-17 08:59:55
|
Btw, on older builds (before major changes in lossless and smaller group sizes) lossless JXL paralleled very well, but the encoding speed was much slower and it took me weeks to update comparison results for all sets
|
|
|
BlueSwordM
|
2021-02-17 09:01:11
|
Yeah, I remember the sub 0.1MP/s speeds with S9.
|
|
|
|
veluca
|
|
Will it work?
|
|
2021-02-17 09:01:38
|
*in theory* it should work. Writing an encoder for that might be really hard though...
|
|
|
|
Deleted User
|
|
veluca
*in theory* it should work. Writing an encoder for that might be really hard though...
|
|
2021-02-17 09:02:12
|
Yep, I'm afraid that the lossless VarDCT coeffs copy-paste will be the hardest.
|
|
|
|
veluca
|
2021-02-17 09:02:33
|
at some point in the past tree learning was ran per group and not per image. This meant a lot more parallelism but also more compute overall π
|
|
|
Yep, I'm afraid that the lossless VarDCT coeffs copy-paste will be the hardest.
|
|
2021-02-17 09:03:02
|
that's more or less already the jpeg recompression encoder path, so that should be doable - splitting text and non-text, on the other hand...
|
|
|
|
Deleted User
|
2021-02-17 09:05:57
|
Splitting text should be easy if the OEM integrates the JPEG XL encoder deep into the OS (e.g. Samsung is known for deep integrations, like S Pen software and One UI in general)
|
|
2021-02-17 09:08:29
|
For example this screenshot:
|
|
2021-02-17 09:09:57
|
It's gonna be really tricky to grab the original JPEG file (shown in the middle), but if deeply OS-integrated encoder *somehow* manages to do that, then it's gonna be easy
|
|
2021-02-17 09:10:20
|
Just grabbing the JPG will be a nightmare
|
|
|
|
veluca
|
2021-02-17 09:10:44
|
I guess you could integrate it in the system graphic libraries, but that's not going to be trivial either π and I don't see that happening anytime soon...
|
|
|
|
Deleted User
|
2021-02-17 09:11:53
|
The text above the image? The OS should be able to forward the info to the encoder "this is not the image, this is text". But even if it doesn't, encoder should manage to detect those patches on its own, it's quite easy case.
|
|
2021-02-17 09:13:25
|
Profile picture (near `Jacek Gladysiak` text)? Either VarDCT (lossy) or Modular (lossless). Unfortunately the picture is processed way too much to be losslessly recompressed.
Icons (below the image and in other places)? Modular.
|
|
|
BlueSwordM
|
2021-02-17 09:14:35
|
So, what you essentially want to do is Screen Content Detection?
|
|
|
Scope
|
2021-02-17 09:15:36
|
I think this is overly complicated at different levels of integration, but even having just lossless/lossy mix compression is good
https://youtu.be/MBVBfLdh984?list=LL&t=1336
|
|
|
|
Deleted User
|
|
BlueSwordM
So, what you essentially want to do is Screen Content Detection?
|
|
2021-02-17 09:18:02
|
Yep. So the encoder doesn't have to do all the work from scratch, but simply grab already prepared info from the OS in order to improve e.g. patches detection (just grab the literal text strings from the OS) and the image quality (e.g. for JPEGs shown at 1:1 scale and with little to none processing)
|
|
|
For example this screenshot:
|
|
2021-02-17 09:20:25
|
Another thing to encode on that screenshot: the crop of the previous image just below the group top bar.
|
|
2021-02-17 09:23:20
|
Of course we can re-encode the thing, but is it possible to grab the original JPEG file, extract just the lowest blocks (the one we see here, **including those we see partially**), encode them losslessly and then overlay the top bar over the partially visible 8x8 blocks (because it's unlikely for 8x8 blocks to *always* align their boundaries with the top bar)?
|
|
|
Scope
|
2021-02-17 09:24:32
|
But, this can be a task for various even third-party pre-processors whose main task is to select the needed parts of the data and e.g. images, which then compress in the best way for them
|
|
|
|
Deleted User
|
|
Scope
https://i.redd.it/mkqqi5ly31c61.png
```
BMF 20 144
WEBP 14 868
WEBP2 36 852
AVIF 15 772
PNG 27 310
S3.jxl 66 631
S9.jxl 29 918
S9_E3_I1.jxl 29 923
S9_I0_G3_P0.jxl 22 959```
|
|
2021-02-17 09:26:00
|
I've got *lots* of usage ideas for JPEG XL. Remember that image with potential for patches. I'm about to ask lots of questions for core devs about patches and then write yet another lengthy essay about possible improvements!
|
|
|
Scope
But, this can be a task for various even third-party pre-processors whose main task is to select the needed parts of the data and e.g. images, which then compress in the best way for them
|
|
2021-02-17 09:27:33
|
But how can you perfectly restore the original JPEG coefficients? It's already quite hard, and when 8x8 blocks are only partially visible (e.g. the previous image in that screenshot just below the group's top bar), the task becomes literally impossible without the data grabbed from the app or OS.
|
|
|
|
veluca
|
2021-02-17 09:28:02
|
patch detection at the moment is pretty much a horrible hack π there's lots of room for improvements
|
|
|
|
Deleted User
|
|
veluca
patch detection at the moment is pretty much a horrible hack π there's lots of room for improvements
|
|
2021-02-17 09:29:11
|
I know. But that's a topic for another related essay: possibility for manual construction of perfect JPEG XL files current encoder can't create on its own *yet*.
|
|
|
|
veluca
|
2021-02-17 09:29:17
|
it's pretty hard to undo ycbcr and idct and get back the dct coefficients from it in a lossless way without having access to the JPEG directly - especially if there was anything like rescaling done it's probably impossible
|
|
|
|
Deleted User
|
|
veluca
it's pretty hard to undo ycbcr and idct and get back the dct coefficients from it in a lossless way without having access to the JPEG directly - especially if there was anything like rescaling done it's probably impossible
|
|
2021-02-17 09:30:01
|
That was the thing I was talking about to Scope. We need deep OS integration for grabbing original JPEG files.
|
|
|
Scope
|
2021-02-17 09:30:13
|
Yep, it's just as challenging for any other application or utility as it is for JXL and requires deeper integration to know exactly what type of data it is
|
|
|
|
Deleted User
|
2021-02-17 09:31:27
|
But don't worry, it's possible. Samsung somehow integrated S Pen deeply into OS.
|
|
|
Jyrki Alakuijala
|
|
Pieter
I'm sure that's desirable in Finland right now.
|
|
2021-02-17 09:31:36
|
I'm living in Switzerland for 14 years... for the first four years I didn't even have a winter jacket, but now I'm acclimatised
|
|
|
Pieter
|
|
Jyrki Alakuijala
I'm living in Switzerland for 14 years... for the first four years I didn't even have a winter jacket, but now I'm acclimatised
|
|
2021-02-17 09:32:28
|
Ah, nice. I've lived in Zurich for 4 years (now I'm in the US).
|
|
|
Jyrki Alakuijala
|
|
fab
jxl 0.3.2 has image improvement to 0.3.1
|
|
2021-02-17 09:32:48
|
Yes. My work on improving the chapel has at least partially landed.
|
|
|
Scope
|
2021-02-17 09:38:34
|
Speaking of lossy JXL, one of the main problems I often hear from people (including Lee from here) at the moment is noticeable artefacts, ringing and jagged lines in art images (even at not very low bpp like 0.5-1 and higher)
|
|
2021-02-17 09:46:27
|
And from conversations with many people, the main complaints were from those who are involved in art-like content and AVIF impresses them more (while with photo content, most are happy with JXL results)
My opinion, and as many services do, is to store such images in full resolution in lossless, and previews and lower resolutions in lossy (lower resolutions are usually viewed less closely and small artefacts are not as important there or if AVIF wins there significantly, then use a mix of formats for now)
But, this is a solution that not everyone agrees with, some do not want to use many different formats (or when they are not very supported), some can not keep lossless images (due to traffic and internet speed of most visitors), etc.
|
|
|
|
Deleted User
|
2021-02-17 09:53:55
|
I'm testing latest build and... wow. When Chromium JPEG XL support will be ready, I'll create a support topic for Google Photos team and I'd like to suggest them some things, e.g. recommended Butteraugli distance to use that'll give the best quality/size ratio.
|
|
2021-02-17 09:55:44
|
I'm testing `-j -p -d 2 -c 0 --noise=1 --dots=1 --epf=-1 --gaborish=1` with some photos grabbed from my dad's crappy temporary phone (common use case) and... wow.
|
|
2021-02-17 09:56:18
|
This is one photo:
|
|
2021-02-17 09:56:35
|
And that's another:
|
|
2021-02-17 09:57:05
|
Challenge for y'all: tell me which one is original JPEG and which one is `-d 2` JPEG XL.
|
|
2021-02-17 09:58:04
|
https://tenor.com/view/good-luck-liam-neeson-taken3-adventure-action-gif-4666091
|
|
2021-02-17 10:00:05
|
Oh, and by the way:
JPG - 3.45 MB
JXL - 884 KB
Let that sink in.
|
|
|
Fox Wizard
|
2021-02-17 10:00:38
|
|
|
2021-02-17 10:02:08
|
The low camera quality makes it very hard
|
|
|
Scope
|
2021-02-17 10:04:30
|
8q4ocr7nasoi.png - Source
ou4q3kjlds2p.png - JXl (it adds a bit of sharpening)
|
|
|
|
Deleted User
|
|
Scope
8q4ocr7nasoi.png - Source
ou4q3kjlds2p.png - JXl (it adds a bit of sharpening)
|
|
2021-02-17 10:07:04
|
PARTY POOPER
|
|
|
Fox Wizard
|
|
Scope
|
2021-02-17 10:08:32
|
But this is without zooming and quick flip comparison
|
|
|
Fox Wizard
|
2021-02-17 10:09:03
|
8q4ocr7nasoi.png does look like aggressive shitty phone camera denoising
|
|
|
|
Deleted User
|
2021-02-17 10:09:17
|
But I think that for an inexperienced eye (e.g. my dad, who took the photo and other Google Photos users) the difference is insignificant enough
|
|
2021-02-17 10:09:57
|
You'll probably agree that both are quite pleasant to look at, compared to what you'll see in a while
|
|
|
Fox Wizard
|
2021-02-17 10:10:13
|
Oh no <a:dogescared:749458017954562058>
|
|
|
|
Deleted User
|
2021-02-17 10:10:32
|
OH YES
|
|
|
Fox Wizard
|
2021-02-17 10:10:45
|
<a:CatNo:806636752810409986>
|
|
|
|
Deleted User
|
2021-02-17 10:11:28
|
1.32 MB, Google Photos encoded JPG. Look in the shadows and burn your eyes afterwards.
|
|
|
Scope
|
2021-02-17 10:12:10
|
Yep, but it also depends on the source photos quality (on higher quality photos it is easier to see the difference, for example with zooming I often distinguish -d 1)
|
|
|
|
Deleted User
|
2021-02-17 10:12:36
|
Lots of people are shooting with mid-range photos
|
|
2021-02-17 10:13:11
|
And even if they're using flagships, vast majority of casual photo takers probably still won't notice
|
|
2021-02-17 10:13:40
|
I haven't heard neither my mom nor dad complain about Guetzli JPG encoding
|
|
|
Scope
|
2021-02-17 10:13:56
|
But on such, it is not very noticeable to the naked eye (I can sometimes identify JXL by certain types of changes it makes, but that would be some cheating, also I use -d 1 more often as I notice its changes and much less use stronger compression except for tests)
|
|
|
|
Deleted User
|
2021-02-17 10:14:03
|
Now they'll have smaller files AND better photo quality (that they won't notice anyway)
|
|
2021-02-17 10:15:18
|
My first encodes done 3 years ago, just after joining Google Photos are quite decent
|
|
2021-02-17 10:15:50
|
I don't know why, but the quality of current encodes is... decreasing? Maybe I'm crazy. Maybe Google lowered encode quality just for me.
|
|
2021-02-17 10:16:58
|
But even on my phone and on my laptop in online viewer I can see those ugly 8x8 DCT blocks
|
|
2021-02-17 10:17:49
|
Just look in the shadows in the Guetzli encode above
|
|
|
Scope
|
2021-02-17 10:25:20
|
And -d 1 sometimes adds a little more sharpness, so I thought so when choosing and it seems that the encoded image even became "better" (but longer distances, on the contrary, lose detail and sharpness)
|
|
2021-02-17 10:28:59
|
However, I identified a more blurry photo (just inferred incorrectly from this due to frequent use -d 1)
|
|
2021-02-17 10:47:25
|
About Guetzli quality, perhaps over time there have been some "optimization" when this quality is enough for most, at first it is usually always with a margin (such as AV1 video bitrate on YouTube) and later tried to find the golden mean between quality and size
|
|
|
|
Deleted User
|
2021-02-17 10:55:22
|
Or maybe Google decreased quality globally because they've had storage spaces problems and wanted to squeeze even more photos in limited disk space. That turned out to not be enough, hence the June 1st free tier apocalypse...
|
|
|
Scope
|
2021-02-17 11:01:55
|
I don't think Google has a real problem with space, considering how many people are uploading videos to Youtube, including private videos or with a couple of views, some even use Youtube as a free VP9 encoder or to store their terabytes
|
|
2021-02-17 11:03:33
|
Even the traffic with just previews on YouTube is more than all the other image services (btw, as far as I understand one of the main reasons to start developing WebP)
|
|
|
Pieter
|
2021-02-17 11:04:38
|
I'm pretty sure Google's interest is in reducing bandwidth primarily, not storage.
|
|
|
Scope
|
|
Pieter
|
2021-02-17 11:47:56
|
Hmm, I wonder why the sudden growth in 2020? π€
|
|
|
Master Of Zen
|
2021-02-17 11:54:33
|
Can someone benchmark this?
|
|
|
|
Deleted User
|
|
Scope
I don't think Google has a real problem with space, considering how many people are uploading videos to Youtube, including private videos or with a couple of views, some even use Youtube as a free VP9 encoder or to store their terabytes
|
|
2021-02-17 11:55:14
|
Yet somehow they decided to ditch Google Photos free tier... maybe because 100% free storage for everyone isn't a viable business model even for a giant like Google? π
|
|
|
Master Of Zen
|
2021-02-17 11:56:04
|
I get jxl bigger than png on this one
|
|
2021-02-17 11:56:09
|
|
|
|
|
Deleted User
|
|
Master Of Zen
Can someone benchmark this?
|
|
2021-02-17 11:56:24
|
I've also got lots of screenshots with articles from a paywalled newspaper, can I add some to a test suite?
|
|
|
Master Of Zen
|
|
I've also got lots of screenshots with articles from a paywalled newspaper, can I add some to a test suite?
|
|
2021-02-17 11:56:40
|
why ask me?
|
|
|
|
Deleted User
|
2021-02-17 11:59:25
|
Not you in particular, it's more like open question
|
|
2021-02-18 12:00:10
|
I don't want to spam here with my screenshots if you've already got plenty enough
|
|
|
Master Of Zen
|
2021-02-18 12:00:59
|
Ok, s9 got it down to 775, and it took a while, like 5 minutes
`3840 x 2160, 0.03 MP/s`
|
|
2021-02-18 12:02:38
|
That's huge difference beetween s9 and s8
|
|
|
|
Deleted User
|
2021-02-18 12:05:44
|
|
|
2021-02-18 12:06:37
|
```C:\Users\zieme\Downloads\jpeg-xl-mingw64-e2b1e60f> .\cjxl -s 9 .\reading.png .\reading.jxl
J P E G \/ |
/\ |_ e n c o d e r [v0.3.2 | SIMD supported: SSE4,Scalar]
Read 3840x2160 image, 47.2 MP/s
Encoding [VarDCT, d1.000, tortoise], 2 threads.
..\lib/jxl/image.cc:102: JXL_CHECK: bytes_.get()```
OH HELL NO
|
|
2021-02-18 12:06:44
|
NOT AGAIN
|
|
|
Master Of Zen
|
|
```C:\Users\zieme\Downloads\jpeg-xl-mingw64-e2b1e60f> .\cjxl -s 9 .\reading.png .\reading.jxl
J P E G \/ |
/\ |_ e n c o d e r [v0.3.2 | SIMD supported: SSE4,Scalar]
Read 3840x2160 image, 47.2 MP/s
Encoding [VarDCT, d1.000, tortoise], 2 threads.
..\lib/jxl/image.cc:102: JXL_CHECK: bytes_.get()```
OH HELL NO
|
|
2021-02-18 12:07:06
|
you didn't set lossless
|
|
|
|
Deleted User
|
|
Master Of Zen
you didn't set lossless
|
|
2021-02-18 12:08:12
|
Like if it mattered...
```C:\Users\zieme\Downloads\jpeg-xl-mingw64-e2b1e60f> .\cjxl -m -s 9 .\reading.png .\reading.jxl
J P E G \/ |
/\ |_ e n c o d e r [v0.3.2 | SIMD supported: SSE4,Scalar]
Read 3840x2160 image, 44.5 MP/s
Encoding [Modular, lossless, tortoise], 2 threads.
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc```
|
|
|
Master Of Zen
|
2021-02-18 12:08:32
|
Idk, everything works for me
|
|
2021-02-18 12:08:35
|
|
|
|
Scope
|
2021-02-18 12:09:12
|
It takes a lot of RAM for these resolutions
|
|
|
|
Deleted User
|
2021-02-18 12:09:16
|
It's either `..\lib/jxl/image.cc:102: JXL_CHECK: bytes_.get()` or `terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc`
|
|
|
Scope
It takes a lot of RAM for these resolutions
|
|
2021-02-18 12:10:02
|
6.0/7.9 GB (76%)
|
|
|
Master Of Zen
|
2021-02-18 12:10:19
|
2140MB for me
|
|
|
|
Deleted User
|
2021-02-18 12:10:50
|
You mean 2140 MB used by OS and apps?
|
|
2021-02-18 12:12:02
|
The most RAM-hungry apps currently
|
|
|
Master Of Zen
|
|
You mean 2140 MB used by OS and apps?
|
|
2021-02-18 12:12:18
|
2140 MB for cjxl
|
|
|
|
Deleted User
|
2021-02-18 12:12:21
|
And no, don't ask me how many Chrome tabs I've got opened
|
|
|
Master Of Zen
2140 MB for cjxl
|
|
2021-02-18 12:12:30
|
Ah, OK
|
|
2021-02-18 12:12:48
|
Because my OS and apps utilize 6 GB currently
|
|
|
Scope
|
2021-02-18 12:13:04
|
And if crop a small part of the image, will the encoding work?
|
|
|
Jyrki Alakuijala
|
2021-02-18 12:13:12
|
I'm trying to reduce memory use right now
|
|
|
|
Deleted User
|
2021-02-18 12:13:31
|
I can't go beyond `-s 4` or `-s 5`, otherwise it throws one of those errors
|
|
|
Jyrki Alakuijala
|
2021-02-18 12:13:58
|
If I'm successful, it is about 3 bytes less memory per pixel at some stage of the compression π
|
|
|
|
Deleted User
|
2021-02-18 12:14:12
|
Especially if I explicitly enable `--patches=1`, then even `-s 3` is impossible
|
|
|
Scope
|
2021-02-18 12:14:31
|
`[v0.3.2 | SIMD supported: SSE4,Scalar]`
<:Thonk:805904896879493180> Then maybe there is something wrong with the SIMD?
|
|
|
Jyrki Alakuijala
|
2021-02-18 12:14:33
|
probably we allocate 222 bytes per pixel or so, improvement comes in small small drops
|
|
|
|
Deleted User
|
|
Scope
`[v0.3.2 | SIMD supported: SSE4,Scalar]`
<:Thonk:805904896879493180> Then maybe there is something wrong with the SIMD?
|
|
2021-02-18 12:15:49
|
I don't think so, I'm using your latest build from encode.su, if you haven't guessed that yet from my command listings
|
|
2021-02-18 12:16:50
|
I've got the exact same `SIMD supported` on my own previous WSL2 compiles
|
|
|
Scope
|
2021-02-18 12:17:05
|
I mean if the CPU does not support AVX and stuff, otherwise I had no problems except for RAM (but I also often encode a lot of images in parallel)
|
|
|
Jyrki Alakuijala
|
|
Pieter
I'm pretty sure Google's interest is in reducing bandwidth primarily, not storage.
|
|
2021-02-18 12:17:54
|
I like to think that there is no Google's interest, no single person is that represents Google with special interest.
|
|
|
|
Deleted User
|
2021-02-18 12:18:21
|
Here's a CPU-Z screenshot, my CPU should support AVX
|
|
|
Jyrki Alakuijala
|
2021-02-18 12:18:54
|
Motivation is more like a bunch of engineers decided to build it, and more senior engineers decided not to stop them.
|
|
|
Pieter
|
2021-02-18 12:19:14
|
<@456226577798135808> Not familiar with the JPEG-XL encoder codebase, but usually it's AVX2 that matters (as it adds 256-bit registers), not AVX.
|
|
|
Master Of Zen
|
2021-02-18 12:19:47
|
|
|
2021-02-18 12:20:02
|
Is there anything better than this `-s 9 -E 3 -I 1`?
|
|
|
Jyrki Alakuijala
|
2021-02-18 12:20:05
|
My primary motivation was to build a present for humanity -- less so for making computers cheaper to run, and more so for reducing wait times that people have for the internet.
|
|
|
|
Deleted User
|
|
Pieter
<@456226577798135808> Not familiar with the JPEG-XL encoder codebase, but usually it's AVX2 that matters (as it adds 256-bit registers), not AVX.
|
|
2021-02-18 12:20:08
|
Then unfortunately it seems like my CPU doesn't support AVX2 π
|
|
|
Master Of Zen
|
|
Jyrki Alakuijala
My primary motivation was to build a present for humanity -- less so for making computers cheaper to run, and more so for reducing wait times that people have for the internet.
|
|
2021-02-18 12:20:36
|
Noble goal, thank you π
|
|
|
|
Deleted User
|
2021-02-18 12:21:32
|
<@!532010383041363969> by the way have you seen my message on <#794206170445119489>?
|
|
|
Pieter
|
|
Then unfortunately it seems like my CPU doesn't support AVX2 π
|
|
2021-02-18 12:21:48
|
You just missed it. Haswell has AVX2. Ivy Bridge is the generation just before it.
|
|
|
|
Deleted User
|
|
Pieter
You just missed it. Haswell has AVX2. Ivy Bridge is the generation just before it.
|
|
2021-02-18 12:23:31
|
I'm actually thankful that this laptop can run programs in reasonable time at all, I've bought it used for 800 zΕ (~215 $)
|
|
2021-02-18 12:24:05
|
Fortunately I bought a version with small (128 GB), but an SSD
|
|
|
Scope
|
2021-02-18 12:24:37
|
`[v0.3.2 | SIMD supported: AVX2]`
Btw, I compile a more optimized build for my CPU, are there any disadvantages when only AVX2 is used?
|
|
|
Pieter
|
2021-02-18 12:26:23
|
As in you compile with `-march=native` or so?
|
|
|
|
veluca
|
2021-02-18 12:26:53
|
avx2 enables integer instructions, avx already has 256-wide float registers π
|
|
|
Pieter
|
2021-02-18 12:27:18
|
<@!179701849576833024> Ah, right. My experience is with applied cryptography... floating point stuff is pointless π
|
|
|
|
veluca
|
2021-02-18 12:27:23
|
as for patches going out of memory... well, I can't say I cared so much about memory usage when I wrote that heuristic π
|
|
2021-02-18 12:28:06
|
"only avx2" means avx2 and anything before it anyway, so no disadvantages that I can think of
|
|
|
Scope
|
2021-02-18 12:28:35
|
Yep or sometimes `-march=haswell` (in order to have at least AVX2 support)
|
|
|
Master Of Zen
|
2021-02-18 12:28:55
|
What are best settings I can try encode my image with?
|
|
|
|
veluca
|
2021-02-18 12:29:35
|
lossy or lossless?
|
|
2021-02-18 12:29:39
|
and what kind of content?
|
|
|
Scope
|
2021-02-18 12:31:00
|
https://discord.com/channels/794206087879852103/803645746661425173/811747451069399100
|
|
|
|
Deleted User
|
2021-02-18 12:32:31
|
I've tried modular lossy on this, not only quality dropped (of course), but also file size **increased**. It didn't pay off at all, just use lossless
|
|
|
Master Of Zen
Is there anything better than this `-s 9 -E 3 -I 1`?
|
|
2021-02-18 12:42:06
|
Yes, `-s 9 -E 3 -I 1 -g 3 --patches=1` π
463 KB.
|
|
2021-02-18 12:43:42
|
I've just run Scope's build on another, just powered-on, not bloated laptop. Unfortunately the CPU is Ivy Bridge, too, so no AVX, but at least the encoder didn't crash.
|
|
|
BlueSwordM
|
2021-02-18 12:43:47
|
Aren't patches enabled by default at -s 7 though?
|
|
|
|
Deleted User
|
|
BlueSwordM
Aren't patches enabled by default at -s 7 though?
|
|
2021-02-18 12:44:06
|
You know, better safe than sorry...
|
|
|
|
veluca
|
2021-02-18 12:44:11
|
but that's lossy, right?
|
|
|
|
Deleted User
|
2021-02-18 12:44:28
|
Nope, it's lossless
|
|
2021-02-18 12:44:42
|
```C:\Users\Admin\Downloads\jpeg-xl-mingw64-e2b1e60f> .\cjxl -m -s 9 -E 3 -I 1 -g 3 --patches=1 .\reading.png .\reading.jxl
J P E G \/ |
/\ |_ e n c o d e r [v0.3.2 | SIMD supported: SSE4,Scalar]
Read 3840x2160 image, 46.2 MP/s
Encoding [Modular, lossless, tortoise], 2 threads.
Compressed to 473186 bytes (0.456 bpp).
3840 x 2160, 0.03 MP/s [0.03, 0.03], 1 reps, 2 threads.```
|
|
|
|
veluca
|
2021-02-18 12:45:45
|
hah, I forgot to actually pass the speed flag π ignore me...
|
|
|
|
Deleted User
|
|
BlueSwordM
|
|
veluca
hah, I forgot to actually pass the speed flag π ignore me...
|
|
2021-02-18 12:49:42
|
Are the presets different for modular vs VARDCT, or are the same encoders tools adapted for different compression techniques?
|
|
|
|
veluca
|
2021-02-18 12:51:27
|
entirely different
|
|
|
BlueSwordM
|
2021-02-18 12:51:47
|
Ah ok.
|
|
2021-02-18 12:52:00
|
Does that mean you need to forcefully enable some flags for the encoder to use them?
|
|
|
|
Deleted User
|
2021-02-18 01:32:51
|
Fun and useful parameters: `--patches=1 -m -Q -500 -s 9 -I 1 -E 3` let you see the patches in action (`-Q -500` is low enough to turn non-patched pixels into shit in order to reveal patched ones, but high enough not to turn the whole image into complete mess, because that's what `-Q -1000` did).
|
|
|
Master Of Zen
|
|
Fun and useful parameters: `--patches=1 -m -Q -500 -s 9 -I 1 -E 3` let you see the patches in action (`-Q -500` is low enough to turn non-patched pixels into shit in order to reveal patched ones, but high enough not to turn the whole image into complete mess, because that's what `-Q -1000` did).
|
|
2021-02-18 01:33:42
|
I think there is djxl command that disables patches, so you can decode with and without patches and compare results
|
|
|
|
Deleted User
|
|
Master Of Zen
I think there is djxl command that disables patches, so you can decode with and without patches and compare results
|
|
2021-02-18 01:35:19
|
I didn't find that in `djxl -h`, unfortunately
|
|
2021-02-18 01:35:53
|
But with my command you can see the patches themselves
|
|
2021-02-18 01:37:54
|
Here you've got one of those screenshots from a newspaper I was talking about, this is the first part of article about human trafficking in Russia (I don't have anything against Eastern nations, people can simply be assholes no matter the nation)
|
|
2021-02-18 01:38:41
|
Here's JXL encoded with my parameters...
|
|
2021-02-18 01:38:55
|
...and PNG result after decoding.
|
|
2021-02-18 01:41:37
|
You can see now some weird behaviours of current patch heuristics at really low quality levels
|
|
2021-02-18 01:42:06
|
They don't detect all letters
|
|
2021-02-18 01:45:26
|
Basically all of detected letters are thinner and sharper because the patches lost all of letters' border smoothing (antialiasing)
|
|
2021-02-18 01:46:31
|
And some of the letters are patched... partially? <:WhatThe:806133036059197491>
|
|
2021-02-18 01:58:45
|
Here's an interactive comparison:
https://slow.pics/c/2Tnboc6q
|
|
|
|
veluca
|
2021-02-18 02:17:55
|
some things are shared though - like patches, splines, noise and restoration filters
|
|
|
Scope
|
2021-02-18 02:18:58
|
Are the splines implemented in the current encoder?
|
|
|
|
veluca
|
|
|
Deleted User
|
2021-02-18 02:19:32
|
But the decoder can decode them, if you prepare the file in e.g. hex editor
|
|
|
|
veluca
|
2021-02-18 02:20:30
|
good luck preparing them in an hex editor π but yes
|
|
2021-02-18 02:23:20
|
(it's likely easier to hardcode them in the encoder - we do have code to remove them from the image and write them in the bitstream, just not to find them...)
|
|
|
|
Deleted User
|
2021-02-18 02:25:40
|
Are they removed in similar way as patches?
|
|
|
Scope
|
2021-02-18 02:27:09
|
LowPoly set, difference with `-I 1`
|
|
2021-02-18 02:31:22
|
https://i.redd.it/igu24zbqgud41.png
```S9_E3.jxl 2 833 233
S9_E3_I1.jxl 2 618 650```
Here the difference is more noticeable (in most other images less than 1%)
|
|
|
|
Deleted User
|
|
veluca
(it's likely easier to hardcode them in the encoder - we do have code to remove them from the image and write them in the bitstream, just not to find them...)
|
|
2021-02-18 02:39:54
|
Hmmm... why not put spline parameters into a CSV file and make the encoder use that file for spline(s)?
|
|
|
|
veluca
|
|
Hmmm... why not put spline parameters into a CSV file and make the encoder use that file for spline(s)?
|
|
2021-02-18 02:42:52
|
Same answer to all other questions about things to do in the encoder π€£
|
|
|
Pieter
|
2021-02-18 02:52:40
|
"patches welcome" ?
|
|
|
Scope
|
|
Nova Aurora
|
2021-02-18 03:19:35
|
Interesting
|
|
|
|
Deleted User
|
|
Scope
|
|
2021-02-18 03:26:10
|
Which command did you use?
|
|
|
Scope
|
2021-02-18 03:26:34
|
`djxl -s 8`
|
|
|
|
Deleted User
|
2021-02-18 03:26:54
|
You probably meant `cjxl -s 8`
|
|
|
Scope
|
2021-02-18 03:28:17
|
No, it's downsampling on the decoder side
|
|
|
|
Deleted User
|
2021-02-18 03:30:02
|
So it downsamples everything but the patches?
|
|
2021-02-18 03:30:20
|
I thought that patches would be downsampled as well...
|
|
|
Scope
|
2021-02-18 03:31:28
|
Patches seem to be stored and decoded as is
|
|
|
|
Deleted User
|
2021-02-18 03:32:29
|
In this sample patches seem to work really well
|
|
2021-02-18 03:32:38
|
I can read most of the text lol
|
|
|
Scope
|
2021-02-18 03:33:49
|
Even default avatars (and status icons), yep
|
|
|
|
Deleted User
|
2021-02-18 03:34:00
|
WAIT
|
|
2021-02-18 03:34:25
|
OH MY GOD
|
|
2021-02-18 03:34:33
|
I SEE IT LOL
|
|
2021-02-18 03:35:23
|
AND STATUS ICONS TOO
|
|
2021-02-18 03:38:23
|
Can you see those icons (available / idle)?
|
|
2021-02-18 03:39:13
|
I truly underestimated current patch heuristics
|
|
2021-02-18 03:40:37
|
But it doesn't mean that they shouldn't be improved at lower quality levels, because they probably can
|
|
|
Nova Aurora
|
|
fab
|
|
I'm testing latest build and... wow. When Chromium JPEG XL support will be ready, I'll create a support topic for Google Photos team and I'd like to suggest them some things, e.g. recommended Butteraugli distance to use that'll give the best quality/size ratio.
|
|
2021-02-18 08:48:58
|
which speed
|
|
2021-02-18 08:49:04
|
which version of jpeg xl
|
|
|
|
Deleted User
|
|
fab
which version of jpeg xl
|
|
2021-02-18 11:13:03
|
0.3.2, latest build by Scope on encode.su
|
|
|
fab
which speed
|
|
2021-02-18 11:13:59
|
Various speeds, `-s 9` (or sometimes lower) on Modular, `-s 7` on VarDCT
|
|
|
Crixis
|
2021-02-18 11:17:04
|
why not -s 8 on VarDCT it is not slow
|
|
|
|
Deleted User
|
|
Crixis
why not -s 8 on VarDCT it is not slow
|
|
2021-02-18 11:17:24
|
Last time I checked it was
|
|
2021-02-18 11:17:44
|
Not as slow as `-s 9` VarDCT, but still
|
|
|
Crixis
|
2021-02-18 11:17:45
|
not as -s 9 lossless
|
|
2021-02-18 11:18:19
|
-s 9 is also worst in quality then -s 8 on VarDCT
|
|
|
|
veluca
|
2021-02-18 11:20:43
|
-s 9 should be fixed now π
|
|
2021-02-18 11:20:56
|
as in it has better quality than -s 8
|
|
2021-02-18 11:21:11
|
probably not quite fast yet though
|
|
|
Crixis
|
|
veluca
-s 9 should be fixed now π
|
|
2021-02-18 11:28:34
|
uh, I must retest
|
|
2021-02-18 01:59:02
|
I make a image darker (for use as wallpaper) and I was curios if do it will make a smaller jxl
|
|
2021-02-18 01:59:20
|
spoiler: a LOT smaller
|
|
2021-02-18 02:02:46
|
dark
|
|
2021-02-18 02:02:55
|
original
|
|
2021-02-18 02:03:05
|
|
|
|
|
Deleted User
|
|
|
|
2021-02-18 02:49:46
|
I've just tried to decode this file and guess what.
While even `djxl -s 4` decoded this at full resolution and I found literally no differences at all in GIMP, `djxl -s 8` resulted in a completely black image. Does it mean that this `.jxl` file is... just patches and nothing else? <:kekw:808717074305122316>
|
|
2021-02-18 02:52:36
|
Or maybe something broke in the decoder
|
|
2021-02-18 02:52:42
|
I don't know
|
|
|
Scope
|
2021-02-18 10:56:32
|
https://i.imgur.com/UGhOCH8.png
```WEBP 44 218
AVIF 47 452
BMF 40 452
PNG 120 487
S3.jxl 1 457 897
S9.jxl 96 995
S9_E3_I1.jxl 96 528```
|
|
2021-02-18 11:01:22
|
-
https://i.imgur.com/sxpUQlN.png
```WEBP 9 956
FLIF 7 682
BMF 9 676
PNG 12 364
S3.jxl 77 859
S9.jxl 16 980
S9_E3_I1.jxl 16 852```
|
|
2021-02-18 11:05:01
|
-
https://i.imgur.com/zHEkAUH.png
```WEBP 131 970
WEBP2 162 045
FLIF 154 871
BMF 137 108
PNG 150 327
S3.jxl 1 547 221
S9.jxl 213 727
S9_E3_I1.jxl 210 847```
|
|
2021-02-18 11:10:00
|
-
https://i.imgur.com/J86WTWN.png
```WEBP 1 666
WEBP2 2 536
FLIF 1 892
BMF 984
AVIF 46 966
EMMA 10 302
S3.jxl 3 464
S9.jxl 2 395
S9_E3_I1.jxl 2 398```
|
|
2021-02-18 11:10:21
|
AVIF, EMMA <:Thonk:805904896879493180>
|
|
2021-02-18 11:18:53
|
-
https://i.imgur.com/yYj04fO.png
```WEBP 44 916
BMF 131 224
S3.jxl 3 369 891 <-
S9.jxl 112 604
S9_E3_I1.jxl 108 344```
|
|
2021-02-18 11:22:44
|
-
https://i.imgur.com/Q2Uwkrh.png
```FLIF 1 673
BMF 656 <-
S3.jxl 15 518
S9.jxl 2 514
S9_E3_I1.jxl 2 335```
|
|
|
|
Deleted User
|
2021-02-19 08:26:22
|
<@!111445179587624960> what is BMF? I see it has the lowest size every time. We should drop jxl and use BMF π
|
|
|
_wb_
|
2021-02-19 08:40:10
|
it's a closed-source compressor that is only available as an `.exe`.
|
|
2021-02-19 08:41:59
|
and it does not have the lowest size every time. It's quite good though. But as long as the author wants to keep it secret, its usefulness is very limited.
|
|
|
Scope
|
2021-02-19 01:03:34
|
BMF is an old image compressor (first version in 1998, last version in 1999 and in 2010 recompiled with some tweaks) often tops in many image comparisons having reasonable compression speed, but EMMA (one of the new experimental compressors) wins in overall result except pixel art content.
The problem is that all of them are not open-source and have symmetric decoding speeds.
|
|
2021-02-19 01:03:48
|
|
|
2021-02-19 01:04:39
|
|
|
|
Crixis
|
2021-02-19 01:15:16
|
Why is avif lossless so bad? I'm surprised jxl s7 beat webp2 overall
|
|
2021-02-19 01:17:03
|
A better s3 will be the game on completly replace png
|
|
|
Scope
|
2021-02-19 01:19:11
|
AVIF lossless will be better after adding YCgCo-R (9-bit) support
<https://docs.google.com/spreadsheets/d/1DHJ0TajtxWDV6bfLwIZPHztxDuB3x3SS-HZ2Yi3sbRc/>
|
|
2021-02-19 01:21:31
|
Yes, `-s 3` is good, especially if the efficiency on pixel art content is improved
|
|
2021-02-19 01:22:15
|
|
|
2021-02-19 01:22:38
|
|
|
2021-02-19 01:23:54
|
|
|
2021-02-19 01:26:20
|
<https://docs.google.com/spreadsheets/d/1ju4q1WkaXT7WoxZINmQpf4ElgMD2VMlqeDN2DuZ6yJ8/edit#gid=0>
|
|
|
_wb_
|
2021-02-19 01:39:18
|
for pixel art and other kinds of 'weird' images, the gap between super-optimized PNG and quickly-encoded PNG is likely larger
|
|
|
|
veluca
|
2021-02-19 02:35:21
|
I guess an -s3 for non-photographic content might be something like what you get today with `-s 8 -P (select? left? top?) -g 3 -I 0`
|
|
2021-02-19 03:00:36
|
+ some option to do ycgco (I never remember *which* option xD)
|
|
|
Scope
|
2021-02-19 04:12:38
|
`-C K, --colorspace=K
[modular encoding] color transform: 0=RGB, 1=YCoCg, 2-37=RCT (default: try several, depending on speed)`
-C 1 gives slightly worse results for pixel art
|
|
|
|
veluca
|
2021-02-19 04:13:18
|
yes, but it should be significantly faster
|
|
2021-02-19 04:15:45
|
likely `-s 8 -P (0|4) -g 3 -I 0 -C 1` is (or can be) as fast as the current `-s 3` if not faster and should be reasonably good for pixel art
|
|
|
Scope
|
2021-02-19 04:17:53
|
```122 573 827 -s 8 -P 4 -g 3 -I 0
127 762 048 -s 8 -P 4 -g 3 -I 0 -C 1```
|
|
|
|
veluca
|
2021-02-19 04:50:48
|
do you have some measurement of encoding speed in the two cases? (also how it compares with plain `-s 3`)
|
|
|
Scope
|
2021-02-19 04:55:58
|
I can't measure exactly, but roughly according to my observations it corresponds to the `-s 3` speed
|
|
2021-02-19 05:01:23
|
And `-P 0` is more effective on small pixel art images and `-P 4` on something like game screenshots
|
|
|
|
Deleted User
|
|
Scope
`-C K, --colorspace=K
[modular encoding] color transform: 0=RGB, 1=YCoCg, 2-37=RCT (default: try several, depending on speed)`
-C 1 gives slightly worse results for pixel art
|
|
2021-02-19 05:05:47
|
> `2-37=RCT`
What is RCT?
|
|
|
|
veluca
|
2021-02-19 05:09:39
|
Reversible Color Transform
|
|
|
|
Deleted User
|
|
veluca
Reversible Color Transform
|
|
2021-02-19 05:12:24
|
How does it work?
|
|
|
|
veluca
|
2021-02-19 05:17:15
|
it's just things like (a, b, c) -> (a-b, b, c) or things like that
|
|
|
_wb_
|
2021-02-19 05:18:07
|
you can select 3 channels (typically the first/only 3), do a permutation on them, and then subtract the average of two channels from the third and/or subtract one channel from another
|
|
|
|
Deleted User
|
2021-02-19 05:18:23
|
For example (G, R-G, B-G) from FLIF? Or something like that?
|
|
|
_wb_
|
2021-02-19 05:18:26
|
basically slightly simpler versions of YCoCg that are also reversible
|
|
2021-02-19 05:18:36
|
yes, subtracting green is an example
|
|
2021-02-19 05:18:52
|
that would be -C 12 I think
|
|
2021-02-19 05:19:48
|
but you could also e.g. do (G - (R+B)/2, R-B, B) or something like that
|
|
|
|
Deleted User
|
|
_wb_
that would be -C 12 I think
|
|
2021-02-19 05:21:18
|
Which code stands for which RCT? Is there any way to know?
|
|
|
_wb_
|
2021-02-19 05:24:36
|
uh, no, only the code and the spec documents that atm
|
|
2021-02-19 05:24:59
|
|
|
2021-02-19 05:25:00
|
that's the spec
|
|
2021-02-19 05:26:49
|
the cjxl option -C for some silly reason has 0 as no-op, 1 as YCoCg, and 2+N for the general case
|
|
2021-02-19 05:27:50
|
(originally YCoCg and other RCTs were specified separately, now they're both called an RCT which makes more sense)
|
|
|
Scope
|
2021-02-19 05:34:08
|
<@!794205442175402004> <@!179701849576833024> <https://docs.google.com/spreadsheets/d/1ugFqODnDnyeHbww9g4kKsqk--VKvosMQ2YYd1YN5KLA/edit#gid=1077758646>
`-P 4` better on large and complex pixel art images like game screenshots (starting from 04gyqZ8.png - 1843)
|
|
2021-02-19 05:41:54
|
For the rest `-P 0` (but, on a general pixel art set `-P 4` is also better)
```-s 8 -P 4 -C 1 -g 3 -I 0```
|
|
2021-02-19 05:49:32
|
The only thing left to do is to somehow turn it on for `-s 3` by default on pixel art content <:Thonk:805904896879493180>
|
|
|
_wb_
|
2021-02-19 06:14:58
|
We could make some simple heuristic to select either current -s 3 or something that works better on pixel art.
|
|
2021-02-19 06:15:52
|
Like just look at some random rows and count what percentage of pixels are equal to the pixel to its left
|
|
2021-02-19 06:17:00
|
If less than, say, 20%, then it's probably photographic and current -s 3 (weighted predictor) is probably best
|
|
2021-02-19 06:17:32
|
Otherwise probably -P 4 is good
|
|
|
Crixis
|
2021-02-19 06:18:36
|
Sound good
|
|
|
Yarandir
|
2021-02-19 09:56:18
|
hi, how's JXL decompression speed ? are there benchmarks available, especially for lossless ?
|
|
|
spider-mario
|
2021-02-19 10:49:28
|
for lossy, we have published https://infoscience.epfl.ch/record/277420, and additionally one can now run https://openbenchmarking.org/test/pts/jpegxl-decode
|
|
|
Yarandir
|
2021-02-19 11:18:54
|
thanks, I don't know if it makes sense but do you have any guesstimate how it compares against png decoding (a magnitude order is ok) ?
|
|
|
Scope
|
2021-02-20 01:51:42
|
Btw, in terms of speed `-s 3` is still faster by 1.5 - 3.5 times depending on the image (sometimes 5 times) than `-s 8 -P 4 -C 1 -g 3 -I 0` <:SadCat:805389277247701002>
|
|
2021-02-20 03:05:20
|
And `-g 3` gives worse overall results on my pixel art set, so something like this is better:
```-s 8 -P 4 -C 1 -q 100 -I 0```
|
|
2021-02-20 03:10:08
|
|
|
2021-02-20 03:10:22
|
<https://docs.google.com/spreadsheets/d/1ugFqODnDnyeHbww9g4kKsqk--VKvosMQ2YYd1YN5KLA/edit#gid=1077758646>
|
|
2021-02-21 02:42:47
|
Hmm, interesting, after some tests, `-s 4 -P 4` was faster and more efficient for pixel art, it is slower than `-s 3`, but on many images much faster than `-s 8 -P 4 -C 1 -I 0`, although on some images the size can also be much larger (but still not like `-s 3`)
```
[-s 3]
Compressed to 691067 bytes (1.818 bpp).
2325 x 1308, 4.98 MP/s [4.98, 4.98], 1 reps, 0 threads.
[-s 4 -P 4]
Compressed to 596078 bytes (1.568 bpp).
2325 x 1308, 1.59 MP/s [1.59, 1.59], 1 reps, 0 threads.
[-s 8 -P 4 -C 1 -I 0]
Compressed to 948671 bytes (2.496 bpp).
2325 x 1308, 0.62 MP/s [0.62, 0.62], 1 reps, 0 threads.
```
```[-s 3]
Compressed to 196053 bytes (1.859 bpp).
1125 x 750, 4.73 MP/s [4.73, 4.73], 1 reps, 0 threads.
[-s 4 -P 4]
Compressed to 24439 bytes (0.232 bpp).
1125 x 750, 3.32 MP/s [3.32, 3.32], 1 reps, 0 threads
[-s 8 -P 4 -C 1 -I 0]
Compressed to 24160 bytes (0.229 bpp).
1125 x 750, 1.48 MP/s [1.48, 1.48], 1 reps, 0 threads.```
```[-s 3]
Compressed to 574821 bytes (0.994 bpp).
2325 x 1990, 3.57 MP/s [3.57, 3.57], 1 reps, 0 threads.
[-s 4 -P 4]
Compressed to 100171 bytes (0.173 bpp).
2325 x 1990, 1.81 MP/s [1.81, 1.81], 1 reps, 0 threads.
[-s 8 -P 4 -C 1 -I 0]
Compressed to 96273 bytes (0.166 bpp).
2325 x 1990, 1.07 MP/s [1.07, 1.07], 1 reps, 0 threads.```
|
|
2021-02-21 03:02:24
|
Sometimes like this:
```[-s 3]
Compressed to 967018 bytes (1.570 bpp).
2220 x 2220, 3.49 MP/s [3.49, 3.49], 1 reps, 0 threads.
[-s 4 -P 4]
Compressed to 166369 bytes (0.270 bpp).
2220 x 2220, 1.31 MP/s [1.31, 1.31], 1 reps, 0 threads.
[-s 8 -P 4 -C 1 -I 0]
Compressed to 98913 bytes (0.161 bpp).
2220 x 2220, 1.36 MP/s [1.36, 1.36], 1 reps, 0 threads.```
|
|
2021-02-21 03:04:06
|
But overall, -s 4 was faster and more efficient
<https://docs.google.com/spreadsheets/d/1ugFqODnDnyeHbww9g4kKsqk--VKvosMQ2YYd1YN5KLA/edit#gid=1077758646>
|
|
2021-02-21 03:13:57
|
Perhaps there are some other options to make `-s 4` encode faster without much loss of efficiency, then it would be possible to replace `-s 3` on pixel art content, and `-s 8 -P 4 -C 1 -I 0` can be too slow (for that speed), except in some cases
|
|
|
|
veluca
|
|
Scope
Btw, in terms of speed `-s 3` is still faster by 1.5 - 3.5 times depending on the image (sometimes 5 times) than `-s 8 -P 4 -C 1 -g 3 -I 0` <:SadCat:805389277247701002>
|
|
2021-02-21 03:05:59
|
we didn't quite optimize that combination as you can imagine by the number of flags you're passing π
|
|
|
Scope
And `-g 3` gives worse overall results on my pixel art set, so something like this is better:
```-s 8 -P 4 -C 1 -q 100 -I 0```
|
|
2021-02-21 03:06:29
|
that's just weird...
|
|
|
_wb_
|
2021-02-21 03:18:06
|
-g 3 can be bad for local palette
|
|
2021-02-21 03:19:02
|
Or other local structure that can be captured in the context model / histograms
|
|
|
Scope
|
|
veluca
we didn't quite optimize that combination as you can imagine by the number of flags you're passing π
|
|
2021-02-21 03:27:21
|
Yep, my idea was to take the maximum compression-enhancing features for pixel art from `-s 4` and disable the rest, so in terms of speed it was something between `-s 3` and `-s 4` (preferably closer to `-s 3`), since the default `-s 3` on such content is very "bloated"
|
|
|
|
Deleted User
|
|
I've just tried to decode this file and guess what.
While even `djxl -s 4` decoded this at full resolution and I found literally no differences at all in GIMP, `djxl -s 8` resulted in a completely black image. Does it mean that this `.jxl` file is... just patches and nothing else? <:kekw:808717074305122316>
|
|
2021-02-21 03:32:25
|
Ok, now I know why it happened. My dumb ass didn't enable `-p`, so how was decoder supposed to downsample it?
|
|
|
Master Of Zen
Can someone benchmark this?
|
|
2021-02-21 03:52:19
|
I've just tried encoding this image with everything the same as my last settings, except that this time I added `-p` and (aside from making JXL file larger than original PNG) guess what happened after `djxl -s 8`? Letters turned into colorful mess. Then I zoomed into the original and found the reason. **ClearType.** It completely butchers patch detection.
|
|
|
_wb_
|
2021-02-21 03:53:11
|
Yes, subpixel rendering is a mess for compression
|
|
2021-02-21 03:53:38
|
It also is display dependent if it even does the right thing
|
|
|
|
Deleted User
|
2021-02-21 03:54:57
|
I can add a screenshot of my own with an even harder case of ClearType (even smaller letters), with additional images for added complexity. It did the same thing, completely blank screen on `djxl -s 8` without progressive, filesize larger than original and colorful mess on `djxl -s 8` with progressive.
|
|
2021-02-21 03:55:04
|
|
|
2021-02-21 03:56:34
|
You can add it to your patches' testing suite, it's a screenshot from a public website.
|
|
|
|
veluca
|
|
Scope
Yep, my idea was to take the maximum compression-enhancing features for pixel art from `-s 4` and disable the rest, so in terms of speed it was something between `-s 3` and `-s 4` (preferably closer to `-s 3`), since the default `-s 3` on such content is very "bloated"
|
|
2021-02-21 03:56:46
|
problem is that you can't do -s 4 without tree learning, and that's slower than lz77 with optimal implementations
|
|
2021-02-21 03:57:33
|
of course we could try to create some reasonable tree
|
|
|
_wb_
|
2021-02-21 04:01:29
|
Fixed tree like in s3 WP could work
|
|
2021-02-21 04:05:35
|
Use like 2-4 properties, put them in 5 buckets, use a fixed predictor like P4 or P5, special case it, and it should be faster than current s3 and decent for nonphoto (and not even that bad for photo if you use P5)
|
|
2021-02-21 04:06:42
|
Could be worth doing, since nonphoto is the main use case where lossless can make sense on the web
|
|
|
Scope
|
2021-02-21 04:06:52
|
π€
Btw, I added Summary, but with Tab names (because something like Porn in the names does not look good in public presentations and Twitter posts) <:SadOrange:806131742636507177>
|
|
2021-02-21 04:06:55
|
|
|
2021-02-21 04:10:00
|
|
|
|
_wb_
|
2021-02-21 04:13:55
|
Will update tomorrow
|
|
|
Scope
|
2021-02-21 04:14:34
|
<https://docs.google.com/spreadsheets/d/1ju4q1WkaXT7WoxZINmQpf4ElgMD2VMlqeDN2DuZ6yJ8/edit#gid=174429822>
|
|
2021-02-21 04:15:12
|
<:SadCat:805389277247701002>
|
|
|
_wb_
|
2021-02-21 04:17:08
|
Emoji still needs some improvement, though I guess it's mostly because they usually have alpha and we don't have an encode option yet to allow invisible pixels to change (which is default in WebP and FLIF), let alone to do premultiplied alpha (which is atm obligatory in wp2)
|
|
2021-02-21 04:20:00
|
If we make a fast option like what I described, it would be faster than current s3, and better on nonphoto. We could call that s2. We could then change s3 to first do some quick heuristic to decide whether to do s2 or the current s3.
|
|
|
Scope
|
2021-02-21 04:22:22
|
Yep, I will test with alpha options when they are added, but also `-s 3` is often more effective on Emoji than slow modes, so there are still tuning possibilities there
|
|
|
_wb_
|
2021-02-21 04:24:04
|
In the slow enough modes we should probably just also do s3 and see what is best
|
|
2021-02-21 04:24:49
|
It would also be interesting to try some 10-bit, 12-bit and 16-bit images
|
|
2021-02-21 04:25:52
|
If only to be able to write "n/a" in the WebP column, and also (for 12 and 16) in the wp2 and avif columns
|
|
|
Scope
|
2021-02-21 04:26:46
|
I have not tested them because it is difficult to make such sets of public images, in addition, not all formats support it
|
|
|
_wb_
|
2021-02-21 04:27:22
|
Yes, it's harder to find test images for that
|
|
2021-02-21 04:29:34
|
https://github.com/FLIF-hub/benchmarks/tree/master/test_images/Lukas-2D-16bit here are some
|
|
2021-02-21 04:30:12
|
I think those are only really 10-bit, or maybe 11-bit
|
|
|
Scope
|
2021-02-21 04:34:52
|
I'll look into it when I have time, different test sets probably exist with any data, but I don't really prefer them (because most likely they are often tested by various encoders and they will be better tuned for these sets)
|
|
|
|
veluca
|
|
_wb_
In the slow enough modes we should probably just also do s3 and see what is best
|
|
2021-02-21 04:35:59
|
thing is we shouldn't *need* to do that if our tree learning was good enough xD
|
|
|
_wb_
|
2021-02-21 04:39:04
|
Yes, that's also true. But can we make it good enough without more slowdown/memory requirements than it already has?
|
|
2021-02-21 04:41:17
|
Trying some well-crafted fixed trees is cheap compared to actual tree learning...
|
|
2021-02-21 04:46:39
|
(or maybe not fully fixed but parametrized)
|
|
|
Scope
|
2021-02-21 07:25:17
|
`-s 4 -P 5` is also not bad
|
|
|
190n
|
2021-02-22 12:50:06
|
I benchmarked lossless JPEG to JXL conversion using 1,672 photos taken on my phone. Mostly pet photos, landscape shots, and random things I saw walking around. All 4608x3456 or 3456x4608 (16MP) with 8 bits per channel. I used libjpeg-xl v0.3.2, speed 7, and only one thread on both encode and decode (although up to 4 jobs were running at once) with a Ryzen 5 2600 at stock clocks (6c/12 3.4-3.9GHz).
- Total space savings: **18.81%** (8.23 β 6.70 GiB)
- Average encode speed: **808 ms/image or 19.70 MP/sec**
- Average speed decoding to JPEG: **671 ms/image or 23.73 MP/sec**
- Average speed decoding to pixels (aka PPM images on a ramdisk): **1.311 sec or 12.151 MP/sec**
- Worst-case space savings: **12.90%** (it doesn't make files bigger!)
Charts and the raw CSV should be below:
|
|
2021-02-22 12:50:14
|
|
|
2021-02-22 12:50:15
|
|
|
2021-02-22 12:50:16
|
|
|
2021-02-22 12:50:16
|
|
|
2021-02-22 12:50:24
|
|
|
|
Scope
|
2021-02-22 05:17:54
|
Comparison `-s 4 -P 5` on all sets (also better for Emoji than `-s 7` and `-s 9`)
|
|
|
spider-mario
|
|
_wb_
It also is display dependent if it even does the right thing
|
|
2021-02-22 05:13:57
|
I remember having ClearType briefly enabled on a Windows tablet, until I realized that Windows did not automatically take the tabletβs orientation into account
|
|