|
CrushedAsian255
|
2024-03-03 09:37:45
|
(also svg exists)
|
|
|
_wb_
|
2024-03-03 09:38:05
|
Yes and for logos and things like that, squeeze is going to be less effective
|
|
|
Traneptora
|
2024-03-03 09:38:10
|
yea, basically the people who want to progressively render tend not to be the same people as those that want lossless images
|
|
2024-03-03 09:38:16
|
if you happen to want both you can turn it on
|
|
2024-03-03 09:38:21
|
but that's the reason it's off by default
|
|
|
_wb_
|
2024-03-03 09:39:37
|
Lossless is mostly used in authoring workflows where files are local and progressive rendering is not that useful (except maybe for a preview thumbnail or something, but that can usually be done in other ways)
|
|
|
CrushedAsian255
|
|
Traneptora
not by a lot, but by some
|
|
2024-03-03 09:40:34
|
i think im doing something wrong
|
|
2024-03-03 09:40:57
|
|
|
2024-03-03 09:41:00
|
here are the files
|
|
|
Traneptora
|
|
CrushedAsian255
i think im doing something wrong
|
|
2024-03-03 09:43:24
|
nope, Squeeze is extremely ineffective on this sort of image
|
|
|
_wb_
|
2024-03-03 09:44:53
|
Could also be that libjxl is making some bad choices, we haven't really been looking at lossless + squeeze
|
|
|
Traneptora
|
2024-03-03 09:45:19
|
that being said, if you consider a photographic image, like The Gecko
|
|
|
_wb_
|
2024-03-03 09:45:19
|
But yeah this is the sort of image that benefits a lot from things like patches and palette
|
|
|
Traneptora
|
2024-03-03 09:45:30
|
```
-rw-r--r-- 1 leo leo 1.3M Mar 3 16:44 eating-insect-big-1080x720.png
-rw-r--r-- 1 leo leo 879K Mar 3 16:44 squeeze-off.jxl
-rw-r--r-- 1 leo leo 1.3M Mar 3 16:44 squeeze-on.jxl
```
|
|
2024-03-03 09:45:41
|
you end up with 1.3M vs ~900k
|
|
2024-03-03 09:45:55
|
which is still more, but not such a dramatic difference that you are seeing with your test image
|
|
2024-03-03 09:46:10
|
(`-d 0 -e 7 -R 1` vs `-d 0 -e 7`)
|
|
|
CrushedAsian255
|
2024-03-03 09:46:23
|
-d 0 -R 1 -e 10```
JPEG XL encoder v0.10.0 ab47708d [NEON]
Encoding [Modular, lossless, effort: 10]
Compressed to 130.9 kB including container (1.123 bpp).
1290 x 723, 0.063 MP/s [0.06, 0.06], 1 reps, 14 threads.
```
-d 0 -R 1 -e 7```
JPEG XL encoder v0.10.0 ab47708d [NEON]
Encoding [Modular, lossless, effort: 7]
Compressed to 1388.0 kB including container (11.906 bpp).
1290 x 723, 1.652 MP/s [1.65, 1.65], 1 reps, 14 threads.
```
something in e10 does something big
|
|
2024-03-03 09:46:27
|
(with my image)
|
|
|
Traneptora
|
2024-03-03 09:46:43
|
I'm using -e 7 since I think that's a good way to measure real world stuff
|
|
|
CrushedAsian255
|
2024-03-03 09:46:55
|
yeah i mainly also use e7 for most things
|
|
|
Traneptora
|
2024-03-03 09:46:56
|
Not entirely sure what e10 is doing here
|
|
2024-03-03 09:47:10
|
that said, 1.123 bpp for your test image is okay
|
|
2024-03-03 09:47:31
|
but `-e 7 -d 0` without `-R` is still 0.473 bpp
|
|
2024-03-03 09:47:35
|
at least on my build
|
|
|
CrushedAsian255
|
|
Traneptora
|
2024-03-03 09:47:57
|
so that's still more than 2x the size. the image you provided is an example of where squeeze does very poorly, losslessly
|
|
|
CrushedAsian255
|
2024-03-03 09:47:58
|
`-e 10` then gives 0.373 bpp
|
|
|
Traneptora
|
2024-03-03 09:48:26
|
squeeze is best at photographic content and worst at synthetic content like screenshots of text, or logos with hard edges
|
|
2024-03-03 09:48:42
|
it's based on a modified Haar transform
|
|
2024-03-03 09:48:51
|
basically it uses wavelets
|
|
|
CrushedAsian255
|
2024-03-03 09:50:21
|
but is Squeeze used in the modular section of lossy jxl?
|
|
|
Traneptora
|
2024-03-03 09:50:39
|
I don't believe it is, but I'm not sure
|
|
2024-03-03 09:50:50
|
it could be, but if you need stronger responsiveness, you're better off using LF Frames
|
|
|
CrushedAsian255
|
2024-03-03 09:51:02
|
LF frames?
|
|
|
Traneptora
|
2024-03-03 09:51:09
|
the 8x8-downsampled image is encoded as a modular image
|
|
2024-03-03 09:51:17
|
but the JXL bitstream allows you to encode it as a vardct image instead
|
|
2024-03-03 09:51:23
|
using something called "LF Frames"
|
|
|
CrushedAsian255
|
2024-03-03 09:51:38
|
and then that vardct image then has another LF frame?
|
|
2024-03-03 09:51:49
|
so you have 8x8 then 64x64 or someting?
|
|
|
Traneptora
|
2024-03-03 09:51:50
|
in theory you can have 0-3 LF levels but more than 1 is rarely important
|
|
|
CrushedAsian255
|
2024-03-03 09:52:10
|
ig you probably wouldn't need 512x512 downsample :/
|
|
|
Traneptora
|
2024-03-03 09:52:18
|
basically, instead of encoding the LF-image (i.e. the 8x8 downsampled image) as an inlined modular bitstream, instead, the VarDCT frame says "use another frame for that"
|
|
2024-03-03 09:52:28
|
that frame itself could be VarDCT encoded
|
|
2024-03-03 09:52:37
|
you can do this up to 3 layers
|
|
2024-03-03 09:52:44
|
512x512 is two layers
|
|
2024-03-03 09:52:57
|
so you can have up to a 4096x4096-downsampled version
|
|
2024-03-03 09:53:11
|
this is possibly useful for enormous astronomical photos, like say a full-resolution hubble ultra-deep field
|
|
2024-03-03 09:53:43
|
the LF Frame itself can be VarDCT-encoded, and its modular sub-bitstream can have its own LF Frame
|
|
2024-03-03 09:53:52
|
that's the gist of it
|
|
|
CrushedAsian255
|
2024-03-03 09:53:55
|
makes sense
|
|
|
Traneptora
|
2024-03-03 09:54:07
|
it's a more useful technique for super responsiveness than squeezing the modular bitstream
|
|
|
CrushedAsian255
|
2024-03-03 09:54:13
|
this format is way more variable than i thought when first starting using it
|
|
|
Traneptora
|
2024-03-03 09:54:32
|
yea, a lot of it is like putting legos together
|
|
2024-03-03 09:54:55
|
for example, the encoder I wrote called hydrium, achives ultra-low-memory usage by encoding one 256x256 tile as its own image frame
|
|
2024-03-03 09:55:08
|
and tells the decoder to just tile them together
|
|
|
CrushedAsian255
|
2024-03-03 09:55:23
|
what if the decoder doesn't support multiframe images?
|
|
|
Traneptora
|
2024-03-03 09:55:28
|
it has to by specification
|
|
2024-03-03 09:55:35
|
they're used in frame blending
|
|
|
CrushedAsian255
|
2024-03-03 09:55:55
|
apple jpeg xl only supports 1 frame
|
|
|
Traneptora
|
2024-03-03 09:56:09
|
I'm not talking about animated JXL
|
|
|
CrushedAsian255
|
2024-03-03 09:56:09
|
like animations don't play
|
|
|
Traneptora
|
2024-03-03 09:56:23
|
multiple frames are a core part of even still-image JXLs
|
|
|
CrushedAsian255
|
2024-03-03 09:56:40
|
can you send a test image just to make sure apple decoder is compliant?
|
|
|
Traneptora
|
2024-03-03 09:57:07
|
it uses libjxl internally so I'd be surprised if it doesn't work
|
|
2024-03-03 09:57:12
|
LF Frames, Patch frames, and alpha-blended frames are all coding tools that are core to compliance
|
|
2024-03-03 10:00:03
|
|
|
2024-03-03 10:00:06
|
here's an example, if you'd like one
|
|
2024-03-03 10:00:09
|
test this on an apple device
|
|
|
CrushedAsian255
|
2024-03-03 10:05:16
|
it looks like a lizard or something
|
|
|
Traneptora
|
2024-03-03 10:05:25
|
that's what it's supposed to look like
|
|
2024-03-03 10:05:46
|
here's the jpeg
|
|
2024-03-03 10:05:50
|
discord should render it
|
|
|
CrushedAsian255
|
2024-03-03 10:06:48
|
i think it's working
|
|
|
Traneptora
|
2024-03-03 10:07:06
|
yea, the image tiles themselves are fairly small
|
|
2024-03-03 10:07:16
|
if rendered only one tile, you'd know pretty clearly
|
|
2024-03-03 10:08:24
|
fwiw, that lizard in a lot of my test images are photographs I took of my gecko
|
|
2024-03-03 10:08:46
|
I'm giving anyone explicit written permission to do anything with them with or without attribution
|
|
2024-03-03 10:08:55
|
his name was George in case that's relevant
|
|
2024-03-03 10:09:02
|
(he died in september 2021)
|
|
|
CrushedAsian255
|
|
Traneptora
I'm giving anyone explicit written permission to do anything with them with or without attribution
|
|
2024-03-03 10:10:30
|
CC0?
|
|
|
Traneptora
(he died in september 2021)
|
|
2024-03-03 10:10:33
|
sorry
|
|
|
Traneptora
|
|
CrushedAsian255
CC0?
|
|
2024-03-03 10:11:09
|
well not explicitly but yea
|
|
2024-03-03 10:11:30
|
basically, some countries like the United States, where I live, have a concept of public domain where you can irreversibly give up copyright to something
|
|
2024-03-03 10:11:51
|
this happens by default for things old enough. like Thomas Jefferson's diary is public domain
|
|
|
spider-mario
|
2024-03-03 10:12:05
|
(death + 70 years)
|
|
|
CrushedAsian255
|
2024-03-03 10:12:10
|
isn't CC0 public domain?
|
|
|
Traneptora
|
2024-03-03 10:12:23
|
it does say it's public domain in places where it exists yea
|
|
2024-03-03 10:12:34
|
some countries, notably in the EU, don't have this concept, so you just say "you can do anything you want with this for any reason" and that serves enough of a purpose
|
|
|
spider-mario
|
|
CrushedAsian255
isn't CC0 public domain?
|
|
2024-03-03 10:12:36
|
not quite, itโs โwhatever is the closest possible locallyโ
|
|
|
Traneptora
|
2024-03-03 10:13:29
|
The Ants on a Dandelion is another photo i took that I explicitly CC0ed
|
|
|
spider-mario
|
2024-03-03 10:13:44
|
my understanding is that if you were to just say โI put this in the public domainโ in a country where you canโt just do that, the net result is that you end up granting no rights at all (since your declaration is invalid)
|
|
|
Traneptora
|
2024-03-03 10:14:09
|
yea
|
|
2024-03-03 10:14:09
|
https://commons.wikimedia.org/wiki/File:Ants_on_a_dandelion.jpg
|
|
2024-03-03 10:14:19
|
that's why images like this are CC0ed instead
|
|
|
spider-mario
|
2024-03-03 10:14:48
|
this is the purpose of e.g. this segment from the licence:
> Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose.
|
|
|
CrushedAsian255
|
2024-03-03 10:15:16
|
so basically "if you can't do public domain, do the closest possible"
|
|
2024-03-03 10:15:19
|
?
|
|
|
Traneptora
|
2024-03-03 10:15:23
|
yea that
|
|
|
CrushedAsian255
|
2024-03-03 10:15:48
|
only thing with CC0 is im guessing you can't say it's your own work can you?
|
|
|
Traneptora
|
2024-03-03 10:15:52
|
yea basically when I publish this photograph I took under CC0 I'm saying it's public domain in places where that's a thing
and I grant anyone the legal right to do anything with it, without my knowledge or consent, for any reason, in places where that's not a thing
|
|
|
CrushedAsian255
|
|
CrushedAsian255
only thing with CC0 is im guessing you can't say it's your own work can you?
|
|
2024-03-03 10:15:59
|
like say "hey i took this"?
|
|
|
Traneptora
|
|
CrushedAsian255
only thing with CC0 is im guessing you can't say it's your own work can you?
|
|
2024-03-03 10:16:02
|
there's actually no restriction on that
|
|
|
CrushedAsian255
|
|
Traneptora
|
2024-03-03 10:16:22
|
"you can do anything you want with or without my knowledge or consent, for any reason" means that
|
|
2024-03-03 10:16:41
|
if someone else claims to have created that photograph that I took, I have no legal right to tell them to stop under copyright law
|
|
2024-03-03 10:16:44
|
I have given that right up
|
|
2024-03-03 10:17:10
|
however, if someone is making that claim and it's *fraudulent* that may trigger fraudulent sales laws but it's not my say or responsibility
|
|
2024-03-03 10:17:37
|
like if someone tries to sell a photograph I took and CC0ed, and claims they took it themselves, that's fraud. but it's not copyright infringement
|
|
2024-03-03 10:17:50
|
it's just lying about the product you're selling, which is an unrelated part of the legal system
|
|
|
CrushedAsian255
|
2024-03-03 10:18:03
|
so its like you say "everyone and nobody owns this"?
|
|
|
Traneptora
|
2024-03-03 10:18:24
|
public domain does not mean everybody owns it
|
|
2024-03-03 10:18:26
|
it means nobody owns it
|
|
2024-03-03 10:18:49
|
someone else can sell it, and if they don't defraud someone, it's not illegal to do that
|
|
|
CrushedAsian255
|
2024-03-03 10:18:54
|
so no copyright infringement?
|
|
|
Traneptora
|
2024-03-03 10:19:02
|
that's correct, that's not copyright infringement
|
|
|
CrushedAsian255
|
2024-03-03 10:19:05
|
lol
|
|
2024-03-03 10:19:17
|
also that was a dm to an alt so i didn't actually do that
|
|
|
Traneptora
|
2024-03-03 10:19:35
|
this was actually a legal case where stock photograph websites were selling this photograph
|
|
2024-03-03 10:19:37
|
https://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Lunch_atop_a_Skyscraper_-_Charles_Clyde_Ebbets.jpg/1024px-Lunch_atop_a_Skyscraper_-_Charles_Clyde_Ebbets.jpg
|
|
2024-03-03 10:19:41
|
It's a famous photo taken in 1932
|
|
2024-03-03 10:19:49
|
https://en.wikipedia.org/wiki/Lunch_atop_a_Skyscraper
|
|
2024-03-03 10:19:54
|
there's an article about it on wikipedia, etc.
|
|
|
CrushedAsian255
|
2024-03-03 10:20:21
|
were they allowed to sell it?
|
|
|
Traneptora
|
2024-03-03 10:20:28
|
there was some controvery where shutterstock was selling it
|
|
2024-03-03 10:20:35
|
they're allowed to do that, provided they don't make false claims
|
|
|
CrushedAsian255
|
2024-03-03 10:20:50
|
so as long as they don't say they took it or something its fine?
|
|
|
Traneptora
|
2024-03-03 10:20:55
|
"you can do anything" means "you can do anything" provided that thing isn't illegal. obviously I can't grant someone the right to break the law
|
|
|
CrushedAsian255
|
2024-03-03 10:21:31
|
ok
|
|
2024-03-03 10:21:58
|
so don't use the image as part of a malicious exploit chain or something
|
|
|
Traneptora
|
2024-03-03 10:21:59
|
https://www.gettyimages.com/detail/news-photo/while-new-yorks-thousands-rush-to-crowded-restaurants-and-news-photo/515612650
|
|
2024-03-03 10:22:15
|
you can buy it from getty images for 500 USD
|
|
2024-03-03 10:22:20
|
even though you can also jsut get it on wikipedia
|
|
|
CrushedAsian255
|
|
Traneptora
|
2024-03-03 10:22:53
|
it's not illegal for them to do this provided they do not lie about it
|
|
2024-03-03 10:22:59
|
that would be fraud
|
|
|
lonjil
|
|
Traneptora
if someone else claims to have created that photograph that I took, I have no legal right to tell them to stop under copyright law
|
|
2024-03-03 10:36:47
|
Well, you still probably do under most EU jurisdictions. Even with CC0.
|
|
2024-03-03 10:38:40
|
(pedantically, rather than copyright we have "author's rights", which encompass a lot more than just economic rights.)
|
|
|
Orum
|
|
veluca
--streaming_output is not on by default ๐
|
|
2024-03-04 12:16:09
|
๐ค well it seems to have a 0 or near-zero effect on file size then
|
|
|
_wb_
|
|
Traneptora
LF Frames, Patch frames, and alpha-blended frames are all coding tools that are core to compliance
|
|
2024-03-04 07:49:13
|
We designed it this way so we can be sure that all compliant decoders can do those things. As opposed to the usual approach where the core codec just encodes samples and it is left to the application layer to make sense of it, which often doesn't end up happening and then you cannot rely on it if you want full interop.
|
|
|
kdx
|
|
CrushedAsian255
also that was a dm to an alt so i didn't actually do that
|
|
2024-03-04 10:33:47
|
Really funny if you did
|
|
|
CrushedAsian255
|
2024-03-04 11:57:22
|
With lossy modular is it the residuals that are being quantised or is something about the tree quantised (leaf trimming or something?)
|
|
|
|
veluca
|
2024-03-04 12:03:35
|
Residuals
|
|
|
CrushedAsian255
|
2024-03-04 12:04:11
|
So kinda like a vardct layer?
|
|
|
|
veluca
|
2024-03-04 12:28:49
|
not sure what you mean
|
|
|
CrushedAsian255
|
2024-03-04 12:29:45
|
Like VarDCT quantisation
|
|
|
|
veluca
|
2024-03-04 12:31:25
|
that works in completely different ways
|
|
|
Traneptora
|
2024-03-04 05:12:52
|
why is https://github.com/libjxl/libjxl/issues/3348 tagged as unrelated to 1.0
|
|
2024-03-04 05:13:32
|
the library crashes when you request sRGB from an HDR image
|
|
2024-03-04 05:15:41
|
I don't see how defering that bug fix makes sense
|
|
|
_wb_
|
2024-03-04 05:21:45
|
agreed if the issue is in libjxl (which I assume it is). If it would be only some issue in djxl, maybe it's less urgent, but still it should probably be fixed for 1.0
|
|
|
Orum
|
2024-03-04 06:10:52
|
what is it supposed to do in that situation, tone map?
|
|
|
Traneptora
|
|
Orum
what is it supposed to do in that situation, tone map?
|
|
2024-03-04 06:27:57
|
at the very least, gamut map
|
|
2024-03-04 06:28:22
|
libjxl doesn't run peak detection but it should gamut map
|
|
|
jonnyawsom3
|
|
Traneptora
why is https://github.com/libjxl/libjxl/issues/3348 tagged as unrelated to 1.0
|
|
2024-03-04 07:08:25
|
I generally take it that all issues get set as unrelated unless proven serious and pointed out
|
|
|
Orum
๐ค well it seems to have a 0 or near-zero effect on file size then
|
|
2024-03-04 07:10:07
|
Streaming output shouldn't have any effect, as far as I understand it. It just writes the file a group at a time instead of all at once, with the same data in the end
|
|
|
Orum
|
2024-03-04 07:39:08
|
ah okay... well, streaming input seems to have almost no effect either (except on speed at e 10)
|
|
|
jonnyawsom3
|
2024-03-04 07:48:48
|
That's because it does essentially the same but for the input, with e 10 loading the entire image at once instead
|
|
|
Orum
|
2024-03-04 07:52:51
|
yeah but e 10 gets locked to like 2 or 3 threads without forcing streaming
|
|
|
jonnyawsom3
|
2024-03-04 07:55:08
|
Yep, which is why it's also called 'old e 9', because it's the same as normal e 9 but without streaming (I think)
|
|
|
Orum
|
2024-03-04 08:35:49
|
well it's still different from the new e 9, even if you force streaming on it
|
|
|
CrushedAsian255
|
2024-03-04 11:50:27
|
i think im doing something wrong, using `--progressive_dc=1` makes it so that i need to load **more** of thie image before `djxl` finds a preview image
|
|
|
jonnyawsom3
|
|
CrushedAsian255
i think im doing something wrong, using `--progressive_dc=1` makes it so that i need to load **more** of thie image before `djxl` finds a preview image
|
|
2024-03-05 01:13:16
|
How does the filesize compare to without?
|
|
|
CrushedAsian255
|
2024-03-05 01:26:49
|
150kb vs 160kb
|
|
|
_wb_
|
|
CrushedAsian255
i think im doing something wrong, using `--progressive_dc=1` makes it so that i need to load **more** of thie image before `djxl` finds a preview image
|
|
2024-03-05 06:49:37
|
No, I think it's libjxl being not as progressive as it could be. It waits for the main frame's DC groups before showing any DC, while it could already start showing stuff while decoding the DC frame... Maybe open an issue about it, it won't be a high-priority bug but it is something we should eventually fix.
|
|
|
Tirr
|
2024-03-05 06:57:07
|
maybe libjxl is ignoring pass information of LF frame
|
|
|
jonnyawsom3
|
2024-03-05 03:44:23
|
Issue has been open a while
https://github.com/libjxl/libjxl/issues/3296
|
|
|
Traneptora
|
2024-03-05 05:06:11
|
C++ is wild sometimes
|
|
2024-03-05 05:06:16
|
```c++
std::vector<std::vector<float*, std::allocator<float*> >, std::allocator<std::vector<float*, std::allocator<float*> > > > const&,
```
|
|
|
RedNicStone
|
|
Traneptora
```c++
std::vector<std::vector<float*, std::allocator<float*> >, std::allocator<std::vector<float*, std::allocator<float*> > > > const&,
```
|
|
2024-03-05 05:31:11
|
```cpp
template<typename T>
using allocating_vector = std::vector<T, std::allocator<T>>;
allocating_vector<allocating_vector<float*>> const& a;
```
|
|
|
Traneptora
|
2024-03-05 05:32:00
|
yea, it makes sense
|
|
2024-03-05 05:32:41
|
it come from a crashlog from libjxl, I just thought it was amusing
|
|
|
RedNicStone
|
2024-03-05 05:33:57
|
fair enough, its a funny type name
|
|
|
kkourin
|
2024-03-05 05:36:30
|
Unfortunately this one is still pretty tame
|
|
|
RedNicStone
|
2024-03-05 05:38:00
|
yea, recursive template substitution can produce some cursed types for example
|
|
|
Traneptora
|
2024-03-05 05:40:15
|
my favorite one is Java enum types
|
|
2024-03-05 05:40:49
|
```java
public abstract class Enum<E extends Enum<E>> implements Comparable<E>, Serialable {
}
```
|
|
|
RedNicStone
|
2024-03-05 05:41:15
|
im glad i stopped working with java years ago
|
|
|
Traneptora
|
2024-03-05 05:41:18
|
all java enums are actually subclasses of `java.lang.Enum`
|
|
2024-03-05 05:41:28
|
so if I do something like
|
|
2024-03-05 05:41:37
|
```java
public enum Planet {
```
|
|
2024-03-05 05:42:01
|
it's actually `Planet -> Enum<Planet> -> Object` in the compile-time hierarchy
|
|
2024-03-05 05:42:20
|
(generics are erased at runtime due to Type Erasure so at runtime it's just `Planet -> Enum -> Object`)
|
|
|
CrushedAsian255
|
2024-03-05 10:10:27
|
just wondering what program is used to generate the images on the left (like find the vardct blocks)?
https://www.youtube.com/watch?v=sflaIZ29e_Q
|
|
|
monad
|
|
CrushedAsian255
just wondering what program is used to generate the images on the left (like find the vardct blocks)?
https://www.youtube.com/watch?v=sflaIZ29e_Q
|
|
2024-03-05 10:30:13
|
benchmark_xl
|
|
|
Traneptora
|
|
CrushedAsian255
just wondering what program is used to generate the images on the left (like find the vardct blocks)?
https://www.youtube.com/watch?v=sflaIZ29e_Q
|
|
2024-03-06 01:58:02
|
jxlatte can also render varblocks if you decode with `--draw-varblocks`
|
|
2024-03-06 01:58:12
|
though i believe this was done with benchmark_xl
|
|
2024-03-06 01:59:23
|
for example, like so
|
|
|
Serentty
|
2024-03-06 02:48:20
|
I am curious about something. I keep seeing demos of generation loss in JXLโs lossy mode compared to other formats, and it seems very minimal. How does it do that? Is the encoder just really good at noticing the compression artefacts of the input image and recreating the same process that led to them instead of doing something different? Does it become โstableโ in a way?
|
|
|
Orum
|
2024-03-06 03:27:42
|
<:JXL:805850130203934781> is far from perfect when it comes to generation loss; it's more that other formats are just particularly bad at it
|
|
2024-03-06 03:28:17
|
it's still a welcome improvement though <:BlobYay:806132268186861619>
|
|
|
Serentty
|
|
Orum
<:JXL:805850130203934781> is far from perfect when it comes to generation loss; it's more that other formats are just particularly bad at it
|
|
2024-03-06 03:37:05
|
What makes a format good or bad at it though? Does a format which is good at avoiding it fall into a local minimum or something?
|
|
|
Orum
|
2024-03-06 03:38:11
|
I just run tests be encoding an image, decoding that, then reencoding, etc., usually up to ~100 times or so and then look at the results and see how they compare to the first encode
|
|
2024-03-06 03:38:33
|
JXL is definitely better than others, but there are still spots in images that can degrade substantially
|
|
|
monad
|
|
Serentty
I am curious about something. I keep seeing demos of generation loss in JXLโs lossy mode compared to other formats, and it seems very minimal. How does it do that? Is the encoder just really good at noticing the compression artefacts of the input image and recreating the same process that led to them instead of doing something different? Does it become โstableโ in a way?
|
|
2024-03-06 03:39:19
|
If you're looking at Jon's old videos, they are very optimistic and not representative of current libjxl (see https://discord.com/channels/794206087879852103/803645746661425173/1197491887393755136 or `in:benchmarks has:video` in general). You can probably make an encoder with low generation loss disabling some tools which propagate distortions across the image, or generally tune loss to accommodate reencodes, but current encoders aren't doing anything magical.
|
|
|
Tirr
|
2024-03-06 03:41:08
|
yeah it's basically test, tune, repeat
|
|
|
Orum
|
2024-03-06 03:41:51
|
here's an encode I did with an old libjxl, first gen: https://cdn.discordapp.com/attachments/673202643916816384/917339173625675786/bunnies-00001.jxl?ex=65f8022e&is=65e58d2e&hm=a1831520cc3173db7c82525af52cb500bc5acbd1256a303d579d28e4f3f4ddb6&
...and 120th gen: https://cdn.discordapp.com/attachments/673202643916816384/917339341456564274/bunnies-00120.jxl?ex=65f80256&is=65e58d56&hm=e566f242447d31f7e6bf095fc67516a1f3e0481a04e092ebd9cc127736ff2c92&
|
|
2024-03-06 03:42:27
|
I mean, considering that is 120 gens of encoding, that's certainly not bad ๐
|
|
|
Tirr
|
2024-03-06 03:42:34
|
libjxl being perceptually optimized may play a role here, not sure
|
|
|
monad
|
2024-03-06 03:42:48
|
Encoders which apply filters across the whole image, rather than keeping distortions to some locality, can degrade particularly quickly.
|
|
|
jonnyawsom3
|
|
CrushedAsian255
just wondering what program is used to generate the images on the left (like find the vardct blocks)?
https://www.youtube.com/watch?v=sflaIZ29e_Q
|
|
2024-03-06 03:44:50
|
https://github.com/libjxl/libjxl/blob/main/tools/demo_vardct_select.sh
|
|
|
HCrikki
|
2024-03-06 03:58:14
|
in modular mode block weight might be preserved since the first encode and leveraged in future passes
|
|
|
Orum
|
2024-03-06 03:58:15
|
man, I have some weird files... not only is webp's lossless smaller than all levels of jxl, but its smallest is at `z 3` <:WTF:805391680538148936>
|
|
|
monad
|
|
Orum
man, I have some weird files... not only is webp's lossless smaller than all levels of jxl, but its smallest is at `z 3` <:WTF:805391680538148936>
|
|
2024-03-06 04:34:44
|
~~643~~ 670 images
``` Pareto front for user+system time and size
|Pareto front for real time and size
mean Mpx/(user+system s)||included in 'all'
mean bpp mins unique mins mean Mpx/(real s)best of
4.39958847 100.00% ยทยทยทยท 0.2100912 0.2100484 URยท all
4.40349437 79.70% 78.81% 0.3051652 0.3050352 URA cwebp_1.2.4_z9
4.49514314 9.25% 6.12% 3.74702 3.74811 URA cwebp_1.2.4_z8
4.52124923 6.57% 3.13% 6.63647 6.63570 URA cwebp_1.2.4_z7
4.53955333 2.24% 0.75% 7.70769 7.71461 URA cwebp_1.2.4_z6
4.55472840 2.69% 0.75% 8.72237 8.69632 URA cwebp_1.2.4_z5
4.57174140 2.84% 1.04% 9.02545 9.02809 URA cwebp_1.2.4_z4
4.57620796 2.69% 1.64% 9.23825 9.23381 URA cwebp_1.2.4_z3
4.72031097 3.58% 2.69% 11.3586 11.3572 URA cwebp_1.2.4_z2
4.89731172 1.19% 0.45% 14.4591 14.4299 URA cwebp_1.2.4_z1
5.59301326 ยทยทยทยทยท ยทยทยทยท 30.772 30.444 URยท cwebp_1.2.4_z0```
|
|
|
Orum
|
2024-03-06 04:50:59
|
sure, but did you compare them to jxl?
|
|
|
monad
|
2024-03-06 04:53:43
|
``` Pareto front for user+system time and size
|Pareto front for real time and size
mean Mpx/(user+system s) ||included in 'all'
mean bpp mins unique mins mean Mpx/(real s) best of
3.97564906 100.00% ยทยทยทยท 0.058516653 0.067390140 URยท all
4.08271079 68.06% 67.76% 0.1702559 0.1835379 URA cjxl_0.10.1_d0e10
4.19361574 3.73% 3.43% 0.4661693 0.9185732 URA cjxl_0.10.1_d0e9
4.25978872 1.34% 1.19% 0.7629193 1.525089 URA cjxl_0.10.1_d0e8
4.37865952 0.60% 0.60% 1.68391 3.50931 URA cjxl_0.10.1_d0e7
4.40349437 18.96% 18.36% 0.3051652 0.3050352 ยทยทA cwebp_1.2.4_z9
4.49514314 2.39% 0.60% 3.74702 3.74811 URA cwebp_1.2.4_z8
4.52124923 2.54% 0.60% 6.63647 6.63570 URA cwebp_1.2.4_z7
4.53955333 1.49% 0.45% 7.70769 7.71461 URA cwebp_1.2.4_z6
4.55472840 1.19% ยทยทยทยท 8.72237 8.69632 URยท cwebp_1.2.4_z5
4.56345308 ยทยทยทยทยท ยทยทยทยท 1.97572 4.25842 ยทยทยท cjxl_0.10.1_d0e6
4.57174140 1.64% 0.60% 9.02545 9.02809 URA cwebp_1.2.4_z4
4.57620796 1.19% 0.45% 9.23825 9.23381 URA cwebp_1.2.4_z3
4.66748403 0.15% 0.15% 2.26227 5.01991 ยทยทA cjxl_0.10.1_d0e5
4.72031097 2.84% 2.09% 11.3586 11.3572 URA cwebp_1.2.4_z2
4.89731172 0.60% 0.15% 14.4591 14.4299 URA cwebp_1.2.4_z1
5.03576491 0.45% 0.45% 3.26335 7.50953 ยทยทA cjxl_0.10.1_d0e4
5.42554725 ยทยทยทยทยท ยทยทยทยท 5.67879 21.207 ยทRยท cjxl_0.10.1_d0e3
5.59301326 ยทยทยทยทยท ยทยทยทยท 30.772 30.444 URยท cwebp_1.2.4_z0
5.72045380 ยทยทยทยทยท ยทยทยทยท 8.5257 24.701 ยทยทยท cjxl_0.10.1_d0e2
6.30480646 ยทยทยทยทยท ยทยทยทยท 41.425 48.159 URยท cjxl_0.10.1_d0e1```
|
|
2024-03-06 12:10:42
|
I had f'd up a few timings (10 images), so I fixed that. z0 didn't find any mins after all.
|
|
|
|
afed
|
2024-03-06 04:01:48
|
new e8, even with `Revert palette transforms` almost the same as the old non-streaming e7, even a little worse on photo-like images <:Thonk:805904896879493180>
|
|
2024-03-06 04:06:32
|
and sometimes the difference is about 1% on average on a large set, so i even thought i did something wrong, but nope
|
|
|
Orum
|
2024-03-06 04:12:59
|
weird that you got so many wins with e 10
|
|
2024-03-06 04:13:14
|
but I'm assuming you weren't using streaming input/output?
|
|
|
_wb_
|
|
monad
I had f'd up a few timings (10 images), so I fixed that. z0 didn't find any mins after all.
|
|
2024-03-06 05:30:00
|
how many threads is this? 4?
|
|
2024-03-06 05:34:19
|
interesting that webp is still on the Pareto front โ what kind of images are these? nonphoto, judging by the bpp...
|
|
|
Orum
|
2024-03-06 05:42:06
|
without graphing it's hard to say it's actually on the front
|
|
2024-03-06 05:42:39
|
on average, in my testing, it wasn't even close
|
|
2024-03-06 05:43:11
|
but cjxl was also using ~2200% CPU while webp (at best) was 200% ๐
|
|
|
jonnyawsom3
|
2024-03-06 05:44:17
|
I say it every other week, but I wonder how much is pallete sorting
|
|
|
_wb_
|
2024-03-06 05:59:38
|
We should get a corpus of images where webp does better and basically check what it is doing to see what we need to do differently in libjxl...
There isn't much that webp can do but jxl cannot, but there are some differences (like planar vs interleaved, tiling vs nontiled, etc). In general we should be able to do whatever webp is doing (and more), but probably the current jxl encoder is still making some bad decisions (like using a palette when it shouldn't or not using it when it should, etc)
|
|
|
yoochan
|
2024-03-06 06:12:33
|
I want to play ๐ค but do you have an existing repository of difficult images to which people can contribute?
|
|
|
lonjil
|
2024-03-06 06:13:19
|
<#1187313089612369991> has some stuff
|
|
|
|
afed
|
2024-03-06 06:20:55
|
yeah, webp palette ordering probably also more efficient for such images
|
|
2024-03-06 06:25:02
|
this also fixes some, but still not much and only for e8+
https://github.com/libjxl/libjxl/pull/3373
|
|
|
Orum
|
|
_wb_
We should get a corpus of images where webp does better and basically check what it is doing to see what we need to do differently in libjxl...
There isn't much that webp can do but jxl cannot, but there are some differences (like planar vs interleaved, tiling vs nontiled, etc). In general we should be able to do whatever webp is doing (and more), but probably the current jxl encoder is still making some bad decisions (like using a palette when it shouldn't or not using it when it should, etc)
|
|
2024-03-06 06:51:59
|
I'm happy to upload all of my images where lossless webp does better
|
|
2024-03-06 06:53:42
|
will take me a while to upload (as some of them are quite large res), and keep in mind I only tested with streaming I/O on
|
|
|
|
JendaLinda
|
2024-03-06 07:20:39
|
The new -e 10 is sometimes worse than the speed enhanced -e 9
|
|
|
|
afed
|
2024-03-06 07:22:20
|
because streaming sometimes gets better results than non-streaming
|
|
|
|
JendaLinda
|
2024-03-06 07:24:06
|
I kept the default streaming settings.
|
|
|
_wb_
|
2024-03-06 07:25:05
|
It's basically greedy local optimization vs greedy global optimization. Cannot say which will be best.
|
|
|
JendaLinda
I kept the default streaming settings.
|
|
2024-03-06 07:25:34
|
Default is to use streaming up to e9, no streaming at e10
|
|
|
|
JendaLinda
|
2024-03-06 07:26:23
|
So that explains it. -e 9 also seems to better utilize CPU threads.
|
|
|
Orum
|
2024-03-06 07:38:27
|
yeah, but you can force streaming with e 10 (which is the only way it's remotely practical IMHO)
|
|
|
|
JendaLinda
|
2024-03-06 07:52:26
|
What is the actual difference between streaming and not streaming?
|
|
2024-03-06 07:53:58
|
Is that the streaming mode better uses the available resources?
|
|
|
|
afed
|
2024-03-06 07:55:41
|
streaming is encoding in independent blocks, non-streaming is the whole image
|
|
|
|
JendaLinda
|
2024-03-06 07:57:27
|
So in non-streaming mode, the encoder has access to more information to work with, right?
|
|
|
|
afed
|
|
|
JendaLinda
|
2024-03-06 08:11:04
|
Maybe I'm too cautious, but I always verify the losslessly encoded files by decoding them and comparing with the input.
|
|
|
Quackdoc
|
2024-03-06 10:35:44
|
has anyone else noticed very large sizes when using faster_decoding={1,2} with lossless? faster_decoding={3,4} seem to work fine `cjxl -e 6 -d 0 --faster_decoding=$FASTER_NUM png/{0} jxl/{1}.jxl`
|
|
|
HCrikki
|
2024-03-06 10:41:26
|
i did around 0.9.2
|
|
2024-03-06 10:44:48
|
folder of original pngs with alpha: 679mb
jxls no fast decoding/0: 360mb (expected result)
jxl fast decoding 1: 1390mb (!)
jxl fastdec 4: 614mb
|
|
|
Quackdoc
|
2024-03-06 10:46:07
|
yeah im testing something similar, im still encoding fasterdec3 but in 75% of the way through and it looks normal
```ps
jxl-sequence dua
2.48 GiB jxl-nofast
4.51 GiB jxl-fast4
7.41 GiB png
25.65 GiB jxl-fast1
40.89 GiB total
```
|
|
|
Orum
|
2024-03-07 01:48:31
|
oh no... not having streaming input support for image types other than ppm/pgm is a much bigger deal than I thought
|
|
2024-03-07 01:48:50
|
as there's no way to use streaming input on images with alpha then <:FeelsSadMan:808221433243107338>
|
|
|
|
afed
|
|
Orum
|
2024-03-07 01:54:14
|
speaking of which, is there an easy way to identify if an image has an alpha channel or not? (without looking at it, i.e. with a CLI utility)
|
|
2024-03-07 01:55:05
|
I'm sure imagemagick has a way but I don't feel like wading through its documentation again
|
|
2024-03-07 02:04:39
|
okay, `identify -format %A <image.foo>` will do it, with `Blend` meaning it has an alpha channel, and `Undefined` means no alpha
|
|
|
HCrikki
|
2024-03-07 02:11:33
|
open in xnviewmp (crossplat), in 'image' it shows the option to remove or alpha channel only if one exists. in 'view', you can hide or display the alpha layer
|
|
|
Orum
|
2024-03-07 02:12:12
|
isn't imagemagick pretty cross platform? <:Thonk:805904896879493180>
|
|
|
VcSaJen
|
2024-03-07 02:25:30
|
Issue #2995 highlights the need for example files with all the edge cases like that, so programs can be reliably tested
|
|
|
Orum
|
2024-03-07 02:36:46
|
edge cases like what?
|
|
|
VcSaJen
|
2024-03-07 02:44:25
|
large boxes
|
|
|
jonnyawsom3
|
2024-03-07 03:10:54
|
Hmm, this seems like a very fun bad idea
|
|
|
Orum
|
2024-03-07 03:25:16
|
is it ppm? <:Thonk:805904896879493180>
|
|
2024-03-07 03:25:48
|
also is that openttd?
|
|
|
jonnyawsom3
|
2024-03-07 03:32:03
|
Either BMP or PNG, and yes
|
|
2024-03-07 03:33:03
|
Ironically the game actually has a wiki page explaining that 8bit PNG is best... Then saves PNGs in 24 bit anyway
|
|
2024-03-07 03:34:11
|
So pallete, with tiles and text, and large resolutions. Seems made for JXL, eventually
|
|
|
Orum
|
2024-03-07 04:03:27
|
well, save it as bmp
|
|
|
jonnyawsom3
|
2024-03-07 04:04:14
|
Any reason why?
|
|
|
Orum
|
2024-03-07 04:05:01
|
because good luck having a png compressor not die when trying to compress that
|
|
2024-03-07 04:05:24
|
actually does bmp even support that res?
|
|
|
jonnyawsom3
|
|
Orum
because good luck having a png compressor not die when trying to compress that
|
|
2024-03-07 04:10:28
|
The encoder uses 8,192 byte chunks, can see from checking a sane screenshot, main issue is filesize due to that 8KB limit
|
|
|
Orum
|
2024-03-07 04:29:01
|
8KB limit?
|
|
|
jonnyawsom3
|
2024-03-07 04:33:12
|
It will only compress 8Kb at a time, so duplicate data will rapidly pile up
|
|
|
Traneptora
|
|
Orum
speaking of which, is there an easy way to identify if an image has an alpha channel or not? (without looking at it, i.e. with a CLI utility)
|
|
2024-03-07 04:51:45
|
generic image? imagemagick identify can do that
|
|
|
Orum
|
2024-03-07 04:52:10
|
read above โคด๏ธ
|
|
|
Traneptora
|
2024-03-07 04:52:31
|
ye, but if you have a specific type it's easier
|
|
|
Orum
|
2024-03-07 04:52:40
|
type?
|
|
|
Traneptora
|
2024-03-07 04:52:47
|
like png, jxl, etc
|
|
|
Orum
|
2024-03-07 04:53:01
|
I don't know what the type will be, that's the thing
|
|
|
Traneptora
|
|
Orum
|
2024-03-07 04:54:11
|
this is for a script to convert any image into the smallest lossless size, looking at either only jxl, only webp, or both
|
|
2024-03-07 04:54:45
|
of course there's still the odd image that is better than both of those in xz, but I don't bother checking that as that's quite rare and inconvenient to use even if it is the smallest
|
|
|
Traneptora
|
|
Orum
this is for a script to convert any image into the smallest lossless size, looking at either only jxl, only webp, or both
|
|
2024-03-07 05:01:56
|
do note that if you convert to png first and run optipng with some fixed options itll strip an unneeded alpha channel
|
|
2024-03-07 05:02:02
|
i.e. constant-1
|
|
2024-03-07 05:02:21
|
may be worth considering
|
|
|
Orum
|
2024-03-07 05:02:45
|
let me put it this way: if the image already has an alpha channel, I always want to keep it
|
|
|
Traneptora
|
2024-03-07 05:02:53
|
ah
|
|
2024-03-07 05:03:06
|
why do you need to detect it then?
|
|
2024-03-07 05:03:10
|
out of curiosity
|
|
|
Orum
|
2024-03-07 05:03:50
|
because I would normally convert anything that isn't ppm/pgm into ppm first, so that I can use `--streaming_input`
|
|
2024-03-07 05:03:58
|
but ppm doesn't support alpha, so I need to use png
|
|
|
Traneptora
|
2024-03-07 05:04:06
|
pam does
|
|
2024-03-07 05:04:17
|
does streaming input not work on pam?
|
|
|
Orum
|
2024-03-07 05:05:00
|
it doesn't *say* that it does:
> --streaming_input
> Enable streaming processing of the input file (works only for PPM and PGM input files).
|
|
2024-03-07 05:05:09
|
but it might ๐ค
|
|
|
Traneptora
|
2024-03-07 05:05:36
|
test it. may be a documentation error
|
|
|
Orum
|
2024-03-07 05:06:22
|
not sure exactly how I verify that though as I think it falls back to not using --streaming_input (if you give it that option on something it won't work with)...
|
|
2024-03-07 05:06:25
|
but let me check
|
|
2024-03-07 05:08:36
|
Oh, no, it actually does error if you try and use that with png. Let me try with pam then...
|
|
|
Traneptora
|
2024-03-07 05:09:00
|
if it's explicitly enabled and refuses it should error, not silently ignore
|
|
|
Orum
|
2024-03-07 05:12:10
|
GIMP doesn't understand pam? <:WTF:805391680538148936>
|
|
2024-03-07 05:12:34
|
nor does nomacs...
|
|
|
jonnyawsom3
|
2024-03-07 05:13:08
|
ffmpeg my beloved
|
|
|
Orum
|
2024-03-07 05:14:27
|
sure would be nice if I could actually verify the decompressed image is even accurate
|
|
|
jonnyawsom3
|
2024-03-07 05:14:51
|
> PNM decoding failed.
:c
|
|
|
Orum
|
2024-03-07 05:15:40
|
yeah, streaming input doesn't support it anyway so what's the point?
|
|
2024-03-07 05:15:58
|
well I suppose it still saves me from encoding the intermediate png
|
|
2024-03-07 05:25:06
|
at least my script should handle pretty much every case now
|
|
|
CrushedAsian255
|
2024-03-07 06:04:42
|
Whatโs the difference between the p*m formats?
|
|
|
monad
|
|
_wb_
interesting that webp is still on the Pareto front โ what kind of images are these? nonphoto, judging by the bpp...
|
|
2024-03-07 06:24:15
|
i5-13600K, unlimited threads. cjxl cannot exploit threading so much with smaller images, and there's plenty of content outside photo where webp is competitive with jxl.
|
|
2024-03-07 06:29:52
|
I intend to break this out by category in the next Irresponsible! Computing? I just didn't see it as a priority for the last one and wanted to be done
|
|
2024-03-07 06:33:56
|
I don't really want to redo all my timings on 0.10, but I feel like it's prudent
|
|
2024-03-07 06:38:22
|
or whatever, I can just post the timings from 0.9 tonight
|
|
2024-03-07 06:40:16
|
it will just remain useless to Orum <:PepeOK:805388754545934396>
|
|
|
Traneptora
|
|
CrushedAsian255
Whatโs the difference between the p*m formats?
|
|
2024-03-07 07:49:39
|
the original, portable bitmap, or pbm, is black and white. 1-bit
portable graymap, pgm, is grayscale, and ppm, portable pixel map, is rgb
|
|
2024-03-07 07:50:03
|
pam is portable anymap. it can do all of those, plus alpha
|
|
2024-03-07 07:50:30
|
pfm, portable floatmap, looks like other netpbm formats but it's a bit different
|
|
2024-03-07 07:50:48
|
and came way later
|
|
|
yurume
|
2024-03-07 08:11:33
|
and there are unfortunately multiple pfm formats in existence, though the current winner is one described in the netpbm distribution
|
|
|
fab
|
2024-03-07 10:46:11
|
|
|
2024-03-07 10:46:30
|
Jon how is the quality of those images I generated on cloudflare
|
|
2024-03-07 10:46:44
|
Space, Tesla.
|
|
2024-03-07 05:18:48
|
|
|
2024-03-07 05:18:58
|
Real image without ia
|
|
2024-03-07 05:19:14
|
Only neural compression
|
|
2024-03-07 05:23:12
|
We are in a point when we can encode desideria videos at 7mbps 50fps but it looks good to subjective score minimum
|
|
|
fab
|
|
2024-03-07 05:23:34
|
Perfect metrics upscaling look boring
|
|
2024-03-07 05:23:49
|
LIAje like
|
|
|
Orum
|
2024-03-08 02:36:21
|
is there a reason piping input can't work with `--streaming_input`?
|
|
|
CrushedAsian255
|
2024-03-08 04:51:53
|
Probably because the size might not be defined Iโm not 100% sure
|
|
|
Orum
|
2024-03-08 04:52:38
|
size is defined in the header though
|
|
|
monad
it will just remain useless to Orum <:PepeOK:805388754545934396>
|
|
2024-03-08 04:55:25
|
all I'm suggesting is to see the Pareto front you want a graph like this: https://discord.com/channels/794206087879852103/803645746661425173/1211973220798828625
|
|
|
monad
|
|
Orum
all I'm suggesting is to see the Pareto front you want a graph like this: https://discord.com/channels/794206087879852103/803645746661425173/1211973220798828625
|
|
2024-03-08 06:32:23
|
I was referring to this comment https://discord.com/channels/794206087879852103/803645746661425173/1213471872315035658, but decided to just post results for default settings https://discord.com/channels/794206087879852103/803645746661425173/1215268764711649340. RE: "it's hard to say it's actually on the front"--I don't understand, given I provide the relevant numbers and mark the optimal settings in the table.
|
|
|
Orum
|
2024-03-08 06:35:07
|
the front looks at two things: compression level and speed; it's hard to see both at the same time on a table of numbers, but trivial on a graph
|
|
|
Traneptora
|
|
Orum
the front looks at two things: compression level and speed; it's hard to see both at the same time on a table of numbers, but trivial on a graph
|
|
2024-03-08 07:42:45
|
well, anything is on the pareto front provided it isn't dominated by anything else
|
|
2024-03-08 07:42:55
|
if anything else beats it in both compression *and* speed, then it loses
|
|
2024-03-08 07:43:14
|
you can easily see if something is dominated by sorting the table
|
|
|
Orum
|
2024-03-08 07:44:17
|
but you're only sorting by one thing at a time
|
|
2024-03-08 07:44:53
|
so if you sort by speed, you have to then compare the compression numbers, or if you sort by compression, then you have to compare the speed numbers
|
|
|
Traneptora
|
2024-03-08 07:44:55
|
sure, but if you sort by, say, speed, then you just look at everything faster and see if any of them also beat it in ratio
|
|
2024-03-08 07:45:03
|
it's not a hard comparison to do
|
|
|
Orum
|
2024-03-08 07:45:12
|
it's much easier to just graph it and you can instantly see the front
|
|
|
Traneptora
|
2024-03-08 07:45:25
|
sure, but it's not exactly a difficult comparison when you have like ten entries in the table
|
|
2024-03-08 07:46:21
|
another easy method is to sort by speed (ascending) and then sort by ratio (descending)
|
|
2024-03-08 07:46:34
|
and the diffs between the sorts will be where things are not on the pareto front
|
|
|
Orum
so if you sort by speed, you have to then compare the compression numbers, or if you sort by compression, then you have to compare the speed numbers
|
|
2024-03-08 07:48:47
|
yea, also keep in mind that non-monotonicity is what you're looking for
|
|
2024-03-08 07:49:09
|
so, like if you sort by speed, in column A, then in column B, with ratio, will be monotonic if everything is on the pareto front
|
|
2024-03-08 07:49:24
|
if something isn't, then that's where you have an increase and then a decrease
|
|
2024-03-08 07:49:41
|
so like, as things get slower, you'd expect a ratio to increase, but if it ever decreases (or remains the same) you've found an issue
|
|
2024-03-08 07:49:45
|
and it's not hard to eyeball that
|
|
|
yoochan
|
2024-03-12 08:33:04
|
I don't remember if I already asked that yet but, did the spline ever demonstrated its ability to save bytes ? I heard it was designed to draw hairs, and I understand that the encoder can't use it yet (which is fine) but was the concept validated with a prototype (even manually made) which showed that for some real case pictures, splines can help compress better ? or something else ? or was it just an intuition that it could be useful ?
|
|
|
spider-mario
|
2024-03-12 08:35:39
|
yes, a few crops where I manually hardcoded some splines in the encoder
|
|
|
yoochan
|
2024-03-12 08:36:06
|
can we see one ? just curious ๐ if not it's ok
|
|
2024-03-12 08:36:28
|
what is encoded below the spline ?
|
|
|
spider-mario
|
2024-03-12 08:36:55
|
I donโt have them at hand right now but Iโll try to remember tomorrow (not sure whether they will still be usable)
|
|
|
yoochan
what is encoded below the spline ?
|
|
2024-03-12 08:37:06
|
XYB(image) โ spline
|
|
|
yoochan
|
2024-03-12 08:37:46
|
ah true, splines are blended on top, not perfectly opaque, I forgot
|
|
|
Traneptora
|
|
yoochan
what is encoded below the spline ?
|
|
2024-03-12 08:37:57
|
the concept is that you look at the pixels, you create a spline that matches a hair strand, and then subtract the rendered spline from the image
|
|
2024-03-12 08:38:02
|
and then encode the subtracted version
|
|
2024-03-12 08:38:15
|
the decoder renders the spline and adds it back on
|
|
|
yoochan
|
|
spider-mario
I donโt have them at hand right now but Iโll try to remember tomorrow (not sure whether they will still be usable)
|
|
2024-03-12 08:38:22
|
no need to hurry but if you find an example, I would be glad to see what it looks like
|
|
|
spider-mario
|
2024-03-12 08:38:25
|
I think the code that subtracts from the image is still there, actually
|
|
2024-03-12 08:38:34
|
(or did we drop it?)
|
|
|
Traneptora
|
2024-03-12 08:38:48
|
one of the reasons splines are additive rather than replaced is that they taper out along the edges
|
|
2024-03-12 08:39:11
|
so if you add a spline atop something, you end up with a smooth transition
|
|
2024-03-12 08:39:18
|
they fade to zero slowly
|
|
|
yoochan
|
|
spider-mario
|
|
spider-mario
I think the code that subtracts from the image is still there, actually
|
|
2024-03-12 08:40:10
|
right, it is, itโs just that
```c++
Splines FindSplines(const Image3F& opsin) {
// TODO(user): implement spline detection.
return {};
}
```
|
|
2024-03-12 08:40:37
|
(โuserโ is me, scraped)
|
|
|
lonjil
|
2024-03-12 08:40:52
|
I still feel like it would've been better to do that taper in the alpha channel and then do a regular alpha blend, rather than adding.
|
|
|
yoochan
|
2024-03-12 08:42:45
|
what is the profile of the fade out ? e^(-xยฒ) ?
|
|
|
Traneptora
|
|
lonjil
I still feel like it would've been better to do that taper in the alpha channel and then do a regular alpha blend, rather than adding.
|
|
2024-03-12 08:45:52
|
you still have the boundary-of-the-spline issue
|
|
2024-03-12 08:46:16
|
splines theoretically cover the whole image. the magnitude decays exponentially with distance from the spline
|
|
2024-03-12 08:46:31
|
in practice, decoders just choose to stop below a certain threshold
|
|
2024-03-12 08:47:46
|
if you had done that taper in the alpha channel, you now have both that exponential decay in the alpha channel and the question of magnitude in the XYB channels
|
|
2024-03-12 08:47:49
|
it complicates matters quite a bit
|
|
|
lonjil
|
|
Traneptora
|
|
yoochan
what is the profile of the fade out ? e^(-xยฒ) ?
|
|
2024-03-13 04:22:23
|
I don't quite remember but I think it's Erf
|
|
|
spider-mario
|
2024-03-13 04:26:41
|
it is exp(-xยฒ) iirc
|
|
2024-03-13 04:26:50
|
erf was just used to compute the integral of that over the pixel
|
|
|
Traneptora
|
|
spider-mario
|
|
yoochan
no need to hurry but if you find an example, I would be glad to see what it looks like
|
|
2024-03-13 04:30:23
|
|
|
|
jonnyawsom3
|
|
spider-mario
|
|
spider-mario
erf was just used to compute the integral of that over the pixel
|
|
2024-03-13 04:36:34
|
(I know, โover the pixelโ is not really a thing given that a โpixelโ is theoretically a point sampleย โ just imagine photosites with 100% fill factor like on a camera, which is effectively like a box filter followed by point sampling)
|
|
|
yoochan
|
|
spider-mario
|
|
2024-03-13 04:53:10
|
Thanks! Not hairs but and interesting application nonetheless ๐
|
|
2024-03-13 04:54:54
|
At the perfect center of the spline the opacity is 100% or anything else specified?
|
|
|
_wb_
|
2024-03-13 05:00:04
|
it's not alpha blended, it is added to the XYB. So something like a spline with constant color X=B=0, Y = -0.1 has a darkening effect but you'll still see what's "underneath"
|
|
|
yoochan
|
2024-03-13 05:03:40
|
Until you "saturate" a channel? If it make sense? Back in rgb it can't go below zero?
|
|
2024-03-13 05:14:53
|
But perhaps this make no sense in an hdr world
|
|
|
Traneptora
|
|
yoochan
Until you "saturate" a channel? If it make sense? Back in rgb it can't go below zero?
|
|
2024-03-13 05:27:29
|
out of range colors in RGB typically represent out of gamut colors
|
|
|
_wb_
|
2024-03-13 05:50:26
|
well if you go into negative Y it's blacker than black and will just be clamped to black when converting to RGB
|
|
|
yoochan
|
2024-03-13 05:52:09
|
In this case, it could be used for ink stroke of mangas... Perhaps
|
|
|
_wb_
|
2024-03-13 05:57:30
|
even without relying on clamping it could be used for that
|
|
|
CrushedAsian255
|
2024-03-13 10:49:43
|
does lossy modular have any real use case?
|
|
|
jonnyawsom3
|
2024-03-13 11:02:41
|
Very high quality lossy or non-photographic content can look better with it
|
|
|
Traneptora
|
|
CrushedAsian255
does lossy modular have any real use case?
|
|
2024-03-13 11:54:23
|
Conpared to VarDCT there's not much reason to use it except at extremely low distances, like between 0.01 and 0.03
|
|
|
lonjil
|
2024-03-13 11:57:44
|
I reckon a port of webp's "near lossless" would work quite well
|
|
|
Orum
|
|
Traneptora
Conpared to VarDCT there's not much reason to use it except at extremely low distances, like between 0.01 and 0.03
|
|
2024-03-14 12:17:51
|
I disagree; it's quite useful on non-photo
|
|
|
CrushedAsian255
|
|
Traneptora
Conpared to VarDCT there's not much reason to use it except at extremely low distances, like between 0.01 and 0.03
|
|
2024-03-14 12:19:58
|
wait so is it like webp's near lossless?
|
|
|
jonnyawsom3
|
2024-03-14 12:22:09
|
I'm sure they love all the pings :P
|
|
|
Traneptora
|
|
Orum
I disagree; it's quite useful on non-photo
|
|
2024-03-14 12:22:11
|
depends on what you mean by "non-photo"
|
|
2024-03-14 12:22:31
|
for things like logos and that sort of thing, it's pretty bad because squeeze is very bad at that
|
|
|
CrushedAsian255
wait so is it like webp's near lossless?
|
|
2024-03-14 12:23:13
|
no, it's a bit different. webp "near lossless" runs a lossy pre-filter and then just uses its lossless mode
|
|
|
lonjil
|
|
Traneptora
for things like logos and that sort of thing, it's pretty bad because squeeze is very bad at that
|
|
2024-03-14 12:24:38
|
I don't think anyone is talking about Squeeze
|
|
|
jonnyawsom3
|
2024-03-14 12:28:32
|
Squeeze is enabled by default for lossy
|
|
|
Traneptora
|
|
lonjil
I don't think anyone is talking about Squeeze
|
|
2024-03-14 03:42:33
|
that's what happens when you use lossy modular tho
|
|
|
Orum
|
2024-03-14 04:00:06
|
here's a perfect example of where I think lossy modular does better than VDCT
|
|
2024-03-14 04:00:53
|
that's `-d 2` for modular and `-d 2.98` for VDCT (in order to get similar BPP)
|
|
2024-03-14 04:03:07
|
so yeah, it's not hard to find examples for non-photo where lossy modular makes sense
|
|
2024-03-14 04:15:31
|
why is there such a big gap in BPP in VDCT between -d 2.999 and 3.0?
|
|
2024-03-14 04:16:45
|
```
Encoding [VarDCT, d2.999, effort: 7]
Compressed to 364.2 kB (0.351 bpp).
Encoding [VarDCT, d3.000, effort: 7]
Compressed to 341.1 kB (0.329 bpp).
```
|
|
|
Traneptora
|
2024-03-14 04:19:39
|
most likely because some features enable at >= 3.0
|
|
|
Orum
that's `-d 2` for modular and `-d 2.98` for VDCT (in order to get similar BPP)
|
|
2024-03-14 04:20:07
|
was this at `-e 7`?
|
|
2024-03-14 04:20:17
|
do you have the original?
|
|
|
Orum
|
2024-03-14 04:20:36
|
yeah, 1 sec
|
|
2024-03-14 04:22:07
|
lossless original โคต๏ธ
|
|
|
Traneptora
|
2024-03-14 04:23:15
|
<@548366727663321098> looks like this is because using modular enables a patch frame
|
|
2024-03-14 04:23:25
|
this could be done with VarDCT, it just isn't, for some reason
|
|
|
Orum
|
2024-03-14 04:23:41
|
in any case, there are definitely reasons to use lossy modular at times
|
|
|
Traneptora
|
2024-03-14 04:24:06
|
this instance is one where all the savings you're observing with modular are due to the patch frame
|
|
|
Orum
|
2024-03-14 04:24:20
|
are patch frames even possible with VDCT?
|
|
|
Traneptora
|
2024-03-14 04:24:29
|
yes, identical method of coding
|
|
2024-03-14 04:25:08
|
patches are stored in a separate frame (typically lossless modular) and then there's a bundle in the LFGlobal section that tells you where to copy them over
|
|
2024-03-14 04:25:28
|
in this case, test-vdct isn't doing that, and I'm not really sure why
|
|
2024-03-14 04:25:40
|
may be worth opening an issue about it
|
|
|
Orum
|
2024-03-14 04:27:07
|
well I'll let you do that as you know much more about it than I do <:BlobYay:806132268186861619>
|
|
|
CrushedAsian255
|
|
Traneptora
no, it's a bit different. webp "near lossless" runs a lossy pre-filter and then just uses its lossless mode
|
|
2024-03-14 07:27:30
|
as in like the same use case as webp near lossless
|
|
2024-03-14 07:28:02
|
also can i get better efficiency by turning off jpeg auto-transcoding and decoding to pixels then encoding using VarDCT?
|
|
|
Traneptora
|
|
CrushedAsian255
also can i get better efficiency by turning off jpeg auto-transcoding and decoding to pixels then encoding using VarDCT?
|
|
2024-03-14 09:36:56
|
depends on what you mean by efficiency
|
|
2024-03-14 09:37:54
|
doing this will incur some level of generation loss because the jxl encoder will attempt to preserve the jpeg artifacts
|
|
2024-03-14 09:38:18
|
if the jpeg is very high quality, this will be a nonissue
|
|
2024-03-14 09:38:26
|
and is preferred
|
|
2024-03-14 09:38:48
|
otherwise I wouldn't
|
|
|
lonjil
|
|
Traneptora
that's what happens when you use lossy modular tho
|
|
2024-03-14 10:06:15
|
The way I see it, JXL has a bunch of coding tools, and a lossy encoder can use whichever ones make sense. And libjxl simply happens to use squeeze when you ask for lossy. Though I was wrong and Orum was in fact talking about Squeeze.
|
|
|
Traneptora
|
|
lonjil
The way I see it, JXL has a bunch of coding tools, and a lossy encoder can use whichever ones make sense. And libjxl simply happens to use squeeze when you ask for lossy. Though I was wrong and Orum was in fact talking about Squeeze.
|
|
2024-03-14 10:07:12
|
sure, but libjxl has only two tools available to it to do lossy modular, which are squeeze and delta palette
|
|
|
lonjil
|
2024-03-14 10:08:58
|
the encoder can do anything it wants, with the goal of the image file being as small as possible and the decoded image as close as possible to the original
|
|
2024-03-14 10:09:33
|
I don't think squeeze and delta palette are the only coding tools available that would be useful for such an encoder.
|
|
2024-03-14 10:10:51
|
Say, something like pngquant but designed for what jxl has to offer, rather than just plain quantization.
|
|
2024-03-14 10:13:51
|
just good use of delta palette would probably be pretty great though
|
|
|
Traneptora
|
|
lonjil
I don't think squeeze and delta palette are the only coding tools available that would be useful for such an encoder.
|
|
2024-03-14 10:14:05
|
I'm referring to libjxl in its current state, not the theoretical prime of lossy modular
|
|
2024-03-14 10:14:34
|
I agree that in theory it could be different but at the moment those are the only things libjxl has to work with for lossy modular
|
|
|
lonjil
|
2024-03-14 10:15:45
|
I felt that I had already acknowledged libjxl's current state, sorry.
|
|
2024-03-14 10:16:46
|
so that "sure, but" confused me a bit I think
|
|
|
fab
|
2024-03-14 10:24:12
|
Apparently YT Is testing live video re encoding
|
|
|
jonnyawsom3
|
2024-03-14 10:24:46
|
And how is that related to JXL?
|
|
|
fab
|
2024-03-14 10:29:56
|
Cloudinary is still working on jpg
|
|
2024-03-14 10:30:23
|
Jxl is a lot of Activity
|
|
|
lonjil
|
2024-03-14 10:34:58
|
<@853026420792360980> since you have some experience with jxl implmentations, if I wanted to make a toy encoder to test different strategies, how much work do you think it'd be from starting to having minimal modular encoder?
|
|
|
Traneptora
|
|
lonjil
<@853026420792360980> since you have some experience with jxl implmentations, if I wanted to make a toy encoder to test different strategies, how much work do you think it'd be from starting to having minimal modular encoder?
|
|
2024-03-14 10:41:26
|
a decent amount because implementing an entropy encoder is hard
|
|
|
lonjil
|
|
Traneptora
|
2024-03-14 10:41:59
|
a trivial passthrough encoder isn't hard but that won't actually be very helpful
|
|
2024-03-14 10:42:35
|
that said hydrium's entropy encoder is mostly self-contained so you can always use the code from it
|
|
|
lonjil
|
2024-03-14 10:42:50
|
hm. I wonder if it would be worthwhile to port the entropy coding from libjxl to a standalone library, so that it could be re-used in other encoders
|
|
|
Traneptora
that said hydrium's entropy encoder is mostly self-contained so you can always use the code from it
|
|
2024-03-14 10:43:10
|
oh heh. Yeah I'll check that out as a first stop once I get to entropy coding :)
|
|
|
|
veluca
|
2024-03-14 10:49:42
|
I personally find the part that codes the distributions to be the most annoying one to reproduce ๐ the rest is relatively simple
|
|
|
Traneptora
|
2024-03-14 10:50:11
|
it was difficult to figure out how the hybrid symbol residues worked with ans state flushes
|
|
2024-03-14 10:50:19
|
with the whole, reverse thing
|
|
2024-03-14 10:50:43
|
also how to invert the alias table was nontrivial
|
|
|
Traneptora
it was difficult to figure out how the hybrid symbol residues worked with ans state flushes
|
|
2024-03-14 10:52:45
|
essentially the way I did this was I hybridized all the symbols into residues and tokens, and then sent the tokens to the FSE one at a time, and for each state flush I tagged what index it occurred on and then cached it
|
|
2024-03-14 10:53:12
|
so then when I wrote the state flushes in the inverse order, I knew where to put the hybrid residues
|
|
2024-03-14 10:57:23
|
an issue I ran into when building prefix trees as well
|
|
2024-03-14 10:57:33
|
brotli prefix trees have a max tree depth
|
|
2024-03-14 10:57:51
|
so if you build a huffman tree in the conventional theoretical way, you end up with symbol lengths that can exceed the max symbol length
|
|
2024-03-14 10:58:20
|
it required a bit of math on my part to figure out how to fix that
|
|
|
VcSaJen
|
2024-03-15 01:48:35
|
Are there any mainstream viewers that can actually display additional channels such as depth, etc? What about pages from multi-page JXL?
|
|
|
Traneptora
|
|
VcSaJen
Are there any mainstream viewers that can actually display additional channels such as depth, etc? What about pages from multi-page JXL?
|
|
2024-03-15 04:41:29
|
animated jxl viewers should theoretically be able to do that if paused
|
|
|
w
|
2024-03-15 04:42:03
|
yes a viewer that can display them will display them
|
|
2024-03-15 04:42:11
|
<:trollface:834012731710505011>
|
|
|
damian101
|
2024-03-16 08:59:41
|
Is reversible internal colorspace conversion to YCoCg-R or something similar used for lossless compression of RGB sources in JXL or WebP? It should have some benefits on most sources...
|
|
|
_wb_
|
2024-03-16 11:33:37
|
Yes, it is used in both.
|
|
|
|
JendaLinda
|
2024-03-17 05:18:10
|
At some point, it was possible in cjxl to specify different bit depth for color and alpha using sBIT chunk. Now alpha always has the same bit depth as color. Was this change deliberate?
|
|
|
Traneptora
|
|
Is reversible internal colorspace conversion to YCoCg-R or something similar used for lossless compression of RGB sources in JXL or WebP? It should have some benefits on most sources...
|
|
2024-03-17 10:11:31
|
there's actually 42 RCT (reversible color transforms) in JXL
|
|
2024-03-17 10:11:51
|
there's 7 different types, and each one may be followed by a permutation of the three color channels
|
|
2024-03-17 10:12:01
|
(since there's six permutations of 3 elements, that's 7x6 = 42)
|
|
|
|
JendaLinda
|
2024-03-17 11:28:42
|
So it was a deliberate change:
https://github.com/libjxl/libjxl/commit/ed6eb09bd23226db3dfdd828c359f61a8d39ddac
|
|
2024-03-17 11:29:11
|
Have different bit depth for alpha caused any problems?
|
|
2024-03-18 07:30:11
|
Actually, jonsneyers added the feature, because extra channels can apparently use different bit depth than color channels, but eustas removed it right away ๐
|
|
|
jonnyawsom3
|
2024-03-18 09:13:42
|
Maybe that would be best as part of this discussion https://github.com/libjxl/libjxl/issues/3415
|
|
|
|
JendaLinda
|
2024-03-18 10:42:50
|
There are legitimate use cases, where alpha could be encoded with 1 bit depth. GIF is a typical example of 8 bit RGB with 1 bit alpha. Also PNG with tRNS chunk consisting from just a single fully transparent entry.
|
|
|
jonnyawsom3
|
2024-03-18 10:46:33
|
I could be wrong, but I thought cjxl only goes down to 8 bit at most and then uses pallete for any lower? Or at least that's the case with a 4 bit image I tested a while ago
|
|
|
|
JendaLinda
|
2024-03-18 10:49:56
|
JXL probably uses palette internally for low color images but tRNS can be used for 24bpp images as well.
|
|
2024-03-18 10:52:53
|
JXL can go as low as 1 bit in all channels and these will decode either to 8 bit PNG or PNM with the actual bit depth.
|
|
2024-03-18 10:54:21
|
Although this applies only to Modular as VarDCT decodes only to 8bit, 16bit or 32bit.
|
|
2024-03-18 11:00:55
|
So libjxl apparently can do bit expansion if needed so I don't think alpha in lower bit depth would be a problem.
|
|
|
Orum
|
2024-03-19 06:42:42
|
is there any way to tell what depth a jxl image is with djxl?
|
|
2024-03-19 06:44:42
|
oh, nvm, there's `jxlinfo` ๐
|
|
2024-03-19 10:02:11
|
interesting, with 0.10.2 I'm getting a lot more wins from effort 10 than 9 compared to 0.10.0... but I suppose that's from the change to e 9 in 0.10.1
|
|
|
Traneptora
|
2024-03-19 05:02:01
|
djxl from git main reports v0.10.0
|
|
2024-03-19 05:02:09
|
even though git main should be more recent than 0.10.2
|
|
2024-03-19 05:02:11
|
any idea why?
|
|
|
|
afed
|
2024-03-19 05:04:49
|
cjxl also
|
|
|
Traneptora
|
|
afed
cjxl also
|
|
2024-03-19 05:22:46
|
apparently the version macro bumps were never ported to main
|
|
2024-03-19 05:22:46
|
https://github.com/libjxl/libjxl/pull/3434
|
|
2024-03-19 05:22:52
|
so I just sent a PR to fix that
|
|
|
|
afed
|
2024-03-19 05:25:57
|
yeah, except that git binary releases have the correct version
|
|
|
Traneptora
|
2024-03-19 05:33:16
|
looking like bench_oriented_brg5 is failing
|
|
2024-03-19 05:33:17
|
not sure why
|
|
2024-03-19 05:33:32
|
that's only on scalar asan
|
|
2024-03-19 05:33:50
|
as is alpha_not_premultiplied
|
|
2024-03-19 05:33:59
|
most of them are passing, but on scalar_asan some are not for some reason
|
|
2024-03-19 05:34:11
|
is it because of UB?
|
|
|
Orum
|
2024-03-20 03:59:28
|
I built from source and the version is correct:
```cjxl --version
cjxl v0.10.2 [AVX2,SSE4,SSE2]```
|
|
2024-03-20 04:00:54
|
djxl too: `djxl v0.10.2 [AVX2,SSE4,SSE2]`
|
|
|
gb82
|
2024-03-20 07:02:17
|
<@184373105588699137> do you happen to have that HDR Blender image you were using a while ago on hand? I can't find it in this server's message history - I believe it had a 10000 nit peak?
|
|
|
190n
|
|
2024-03-20 07:07:35
|
nevermind, found it
|
|
|
gb82
`cjxl final16.png final16.jxl --intensity_target=1206.76 -e 9 -p -v -d 1.0`
|
|
2024-03-20 07:11:26
|
running this *exact* same command with libjxl 0.10.2, I get a different looking output when viewing the image in Thorium
|
|
2024-03-20 07:11:45
|
here's the new one
|
|
2024-03-20 07:11:59
|
and the old from the original thread
|
|