|
|
Deleted User
|
2022-04-13 03:45:23
|
Hi guys! Anyone know what "AFV" stands for? I can't find it in the "Abbreviated term" list
|
|
|
_wb_
|
2022-04-13 04:27:22
|
it's Alakuijala - Fischbacher - Versari, i.e. <@!532010383041363969> , Thomas and <@!179701849576833024>
|
|
2022-04-13 04:29:17
|
basically it's a variant of DCT8x8 where one of the corners is treated specially, so you can have an edge that just shows up a little bit in one of the corners of the 8x8 block without needing lots of high freq coeffs to represent it without ringing
|
|
|
Yari-nyan
|
2022-04-13 04:43:12
|
any advice for best JPEG XL pixel art compression? right now i have `-e 9 -q 100 -I 0 -P 0 -g 3`, but it doesn't do as good as the equivalent highest effort lossless webp? am i missing something?
|
|
|
_wb_
|
2022-04-13 04:50:32
|
You could try adding --patches 0 and/or removing the -I 0 -P 0
|
|
|
Yari-nyan
|
2022-04-13 05:27:49
|
is there a way to specify thread count for cjxl? it always does 2 threads for some reason
|
|
2022-04-13 05:27:54
|
avifenc has `--jobs`
|
|
|
monad
|
2022-04-13 05:28:12
|
`--num_threads`
|
|
|
Yari-nyan
|
2022-04-13 05:28:25
|
does it say this anywhere outside the source code
|
|
|
monad
|
2022-04-13 05:28:39
|
`cjxl -h -v -v`
|
|
|
Yari-nyan
|
2022-04-13 05:28:58
|
nice
|
|
2022-04-13 05:34:18
|
`--patches 0` helped in some cases, but it still doesn't beat webp for whatever reason
|
|
2022-04-13 05:34:33
|
well
|
|
2022-04-13 05:34:35
|
not enough testing
|
|
2022-04-13 05:34:55
|
i can't be bothered to wait so long for it to finish every time
|
|
|
_wb_
|
2022-04-13 06:17:37
|
what kind of pixel art are you encoding?
|
|
2022-04-13 06:19:02
|
for NN upsampled stuff, it might be worthwhile if we try to detect that and encode it at lower res with an jxl upsampling filter that does NN
|
|
|
Yari-nyan
|
2022-04-13 06:24:48
|
sounds good
|
|
2022-04-13 06:27:31
|
i would be happy to see that
|
|
|
|
Deleted User
|
|
_wb_
basically it's a variant of DCT8x8 where one of the corners is treated specially, so you can have an edge that just shows up a little bit in one of the corners of the 8x8 block without needing lots of high freq coeffs to represent it without ringing
|
|
2022-04-13 08:08:31
|
Ah, I see. Thanks!π
|
|
|
Yari-nyan
|
2022-04-21 01:43:18
|
link to the reddit thread? <@456226577798135808>
|
|
2022-04-21 01:46:17
|
nvm found it
|
|
|
_wb_
|
2022-04-24 12:59:15
|
The 95th JPEG meeting is in Asian timezone (to accommodate Japanese/Australian/etc members)
|
|
2022-04-24 12:59:34
|
First plenary session starts at 11pm my time
|
|
2022-04-24 12:59:53
|
First 'day' ends at 8am my time
|
|
2022-04-24 01:00:39
|
Trying to sleep now, can't sleep...
|
|
2022-04-24 01:21:27
|
https://c.tenor.com/h4yUDOmTXeMAAAAM/me-squidward.gif
|
|
2022-04-24 01:21:29
|
https://c.tenor.com/6SW3q9pfiBgAAAAM/insomnia-cant-sleep.gif
|
|
|
improver
|
2022-04-24 03:04:19
|
take 5htp and melatonin
|
|
2022-04-24 03:05:23
|
dont take em before meeting tho & b aware of how long they last
|
|
2022-04-24 03:06:45
|
coffeine and theanine may help staying not too sleepy, or just green tea if you prefer traditional way
|
|
2022-04-24 03:06:52
|
or caffee
|
|
2022-04-24 03:08:44
|
5htp alone may b pretty useful at restoring proper function & tired-ness after nonsleep
|
|
2022-04-24 03:09:00
|
without being forced like melatonin
|
|
2022-04-24 03:10:21
|
or traditional way wise, proper food
|
|
|
_wb_
|
2022-04-24 05:14:28
|
I guess I will have an easier time to sleep after the first meeting "day"
|
|
2022-04-24 05:15:38
|
It's just weird to try to self-impose a jetlag without actually physically changing timezone. Seeing the noon sun and sleeping is not a good combo.
|
|
2022-04-24 05:16:22
|
My respect to people working night shifts.
|
|
2022-04-25 12:18:21
|
https://tenor.com/view/tom-and-jerry-tom-trying-to-stay-awake-tired-cat-gif-19658579
|
|
|
Fox Wizard
|
2022-04-25 01:07:44
|
Gotta join those meetings <a:ElmoHELL:593434575146057728>
|
|
2022-04-25 01:08:31
|
~~Wonder what happens when I open those links~~
|
|
2022-04-25 01:11:18
|
<@794205442175402004>some of those links have passwords in them apparently :p
|
|
|
_wb_
|
2022-04-25 01:11:34
|
oops
|
|
2022-04-25 01:11:46
|
shouldn't have shared that then
|
|
|
Fox Wizard
|
2022-04-25 01:12:42
|
Inb4 zoom bomb <a:DogeScared:821038589201612820>
|
|
|
_wb_
|
2022-04-25 01:13:20
|
they will kick you out fast enough π
|
|
2022-04-25 01:14:14
|
but still, better not give people ideas
|
|
|
Fox Wizard
|
2022-04-25 01:16:29
|
True probably. At least JPEG meetings aren't really fun targets and guess most people here are more mature than those YouTube Zoom bombers <:KekDog:884736660376535040>
|
|
|
Yari-nyan
|
2022-04-25 05:41:29
|
"JPEG raid"
|
|
2022-04-25 05:46:22
|
dad i'm invading the jay pedge meeting with my friends π
|
|
|
_wb_
|
2022-04-28 06:05:23
|
Allowed, yes I guess, as long as it doesn't get too spammy. But pointing out that there's no need to use a website with ads is also allowed π
|
|
|
novomesk
|
2022-04-28 05:41:40
|
Have you ever see similar error in dmesg?
traps: ksplashqml[1820] trap invalid opcode ip:7fffec083252 sp:7fffffffba90 error:0 in libhwy.so.0.16.0[7fffec082000+5000]
https://bugs.gentoo.org/841413
I suspect it could be related to CPU Intel Core2 Duo E8400
|
|
2022-04-29 11:17:36
|
Most probably it is related.
|
|
|
yurume
|
2022-05-04 08:23:32
|
I realized that any conforming JXL implementation necessarily requires a complete CMS since non-XYB samples might be using an embedded ICC profile
|
|
2022-05-04 08:26:06
|
in formats like PNG you can simply delegate the color conversion to the user, if my understanding is correct you can't do so with JXL
|
|
|
improver
|
2022-05-04 08:43:35
|
pretty sure you should be able to delegate
|
|
2022-05-04 08:44:20
|
or.. what exactly do you mean 'to the user'?
|
|
|
yurume
|
2022-05-04 08:47:28
|
the library user would be expected to do the conversion from the color space described in the file to the display space
|
|
2022-05-04 08:48:17
|
but in the context of JXL you can't just do that because decoders have to mix colors which might involve a color conversion (again, if my understanding is correct)
|
|
|
_wb_
|
2022-05-04 09:06:10
|
They only need to mix colors for frame blending, which they only have to do in enum spaces, not in icc spaces. But if they want to produce output in the original icc space, they do indeed need a cms in the xyb case.
|
|
|
yurume
|
2022-05-04 09:07:30
|
by enum spaces do you mean the ColourEncoding bundle
|
|
|
_wb_
|
|
yurume
|
2022-05-04 09:08:56
|
I guess my understanding was in fact incorrect (thankfully) then
|
|
|
_wb_
|
2022-05-04 09:09:00
|
Alpha blending is supposed to happen in the image space, and is only allowed if that's an enum space.
|
|
2022-05-04 09:09:32
|
Well or if it's a non-xyb image, because then the pixels are already in image space.
|
|
|
yurume
|
2022-05-04 09:09:55
|
uh, that non-XYB case was my concern
|
|
|
_wb_
|
2022-05-04 09:11:31
|
In the non-xyb case, decoders produce output in the image space so there is no conversion needed. Displaying the image requires cms then, but decoding to png doesn't.
|
|
|
yurume
|
2022-05-04 09:20:38
|
I seem to get it now, after some more (frantic) reading of the spec; I didn't fully understand what save_before_ct exactly meant
|
|
|
_wb_
|
2022-05-04 09:34:35
|
Basically patches we want to blend in xyb space, frames in image space.
|
|
2022-05-04 09:42:13
|
It's all a bit confusing because xyb means the data is in an absolute space that can be converted by libjxl to any enum space, and non-xyb is in image space, does not need conversion to do the decode itself, but may require the application to do conversion to display it (extreme example: cmyk).
|
|
2022-05-04 09:43:06
|
So the output you get can be whatever enum space you want in case of xyb, but in general only image space in case of non-xyb.
|
|
2022-05-04 09:44:53
|
That's why I think it would be more convenient to have a default cms integrated in the libjxl decoder (just like we have it in the encoder), so applications can regardless of input:
- request the result in any space they want (in particular display space)
- request the result in image space.
|
|
2022-05-04 09:47:42
|
Currently you can in general get any enum space in case of xyb (but not necessarily image space), image space in case of non-xyb (but not necessarily any enum space), and both in case image space is an enum space. That's how it is when libjxl does not have to do arbitrary icc conversions, which is how we wanted it in libjxl_dec for binary size reasons.
|
|
|
yurume
|
|
_wb_
That's why I think it would be more convenient to have a default cms integrated in the libjxl decoder (just like we have it in the encoder), so applications can regardless of input:
- request the result in any space they want (in particular display space)
- request the result in image space.
|
|
2022-05-05 04:56:20
|
agreed, if you can afford a CMS it should be there
|
|
2022-05-05 04:57:42
|
the context was that I tried to make a small JXL implementation from scratch (I believe there are others doing this, but having multiple independent implementations help) and realized that a CMS is nothing but small π
|
|
|
_wb_
|
2022-05-05 05:12:58
|
Yes, enum only is ok, and it covers 99% of what is in current use, but full icc is quite hairy
|
|
|
yurume
|
2022-05-05 05:13:43
|
I only learned that Skia had its own CMS (skcms) after that realization
|
|
|
Fraetor
|
2022-05-05 12:18:20
|
Is buteraugli commutative? ie does comparing image A to image B give the same result as comparing image B to image A?
|
|
|
|
veluca
|
|
_wb_
|
2022-05-05 01:06:47
|
neither is ssimulacra. syntax is [original] [distorted] and the order does make a difference
|
|
|
yurume
|
2022-05-05 08:00:24
|
the following code in the section C.2.4 of the spec:
```cpp
len = 0; while (len < 3) { if (Bool()) len++; else break; }
shift = u(len) + (1 << len) - 1;
/* shift <= (1 << 12) + 1 */
```
...seems to be redundant because len is in [0,3] and shift is in [0,14]
|
|
2022-05-05 08:00:40
|
I suspect `shift <= 12 + 1` is the correct assertion?
|
|
2022-05-05 08:07:34
|
yeah, it matches the current libjxl code (where `ANS_LOG_TAB_SIZE` is 12)
|
|
|
|
veluca
|
2022-05-05 08:08:22
|
ups xD <@794205442175402004>
|
|
|
_wb_
|
2022-05-05 08:09:15
|
heh yes good catch
|
|
|
yurume
|
2022-05-05 08:11:47
|
also a small nit: "Indexing D with an out-of-bounds value results in a 0 value" in the section C.2.1 should also mention writes I think
|
|
|
_wb_
|
2022-05-05 08:12:56
|
so if len==3, and u(3) is 0b111, then shift could be 14, but the assert says it should be at most what? 13?
|
|
|
yurume
|
2022-05-05 08:13:05
|
4097 π
|
|
|
_wb_
|
2022-05-05 08:13:18
|
yeah the wrong assert is clearly wrong
|
|
2022-05-05 08:13:30
|
just wondering what the right one should be when fixing the spec
|
|
|
yurume
|
2022-05-05 08:13:52
|
shouldn't that match with libjxl (13)?
|
|
|
_wb_
|
2022-05-05 08:16:07
|
ah right, dec_ans.cc returns error when shift > ANS_LOG_TAB_SIZE + 1
|
|
|
yurume
|
|
yurume
also a small nit: "Indexing D with an out-of-bounds value results in a 0 value" in the section C.2.1 should also mention writes I think
|
|
2022-05-05 08:20:59
|
hmm actually C.2.4 doesn't seem to handle out-of-bounds writes to D at all
|
|
|
_wb_
|
2022-05-05 08:21:11
|
|
|
2022-05-05 08:25:21
|
I guess if out of bounds writes happen to D, it's not a valid bitstream, because spec says D "is a (1 Β« log_alphabet_size)-element array having elements representing symbol probabilities and summing to 1 Β« 12"
|
|
2022-05-05 08:25:37
|
but probably it's better to clarify that
|
|
|
yurume
|
2022-05-05 08:25:40
|
that makes sense
|
|
2022-05-05 08:27:52
|
does libjxl explicitly handle that though? I'm not sure how a simple (1 or 2 entries) or flat histogram is validated against this situation
|
|
|
_wb_
|
2022-05-05 08:28:11
|
good question
|
|
|
yurume
|
|
yurume
the context was that I tried to make a small JXL implementation from scratch (I believe there are others doing this, but having multiple independent implementations help) and realized that a CMS is nothing but small π
|
|
2022-05-06 03:23:01
|
still working on it, the entropy distribution decoding is probably complete by now
|
|
2022-05-06 05:31:06
|
well my hope turned out to be unsubstantiated
|
|
2022-05-06 05:31:57
|
so far the Annex C is very hard to comprehend, lots of implicit and/or seemingly unordered definitions
|
|
|
_wb_
|
2022-05-06 05:38:47
|
Yes, I can imagine. It was even worse in the 1st edition.
|
|
2022-05-06 05:40:21
|
If you want to, I can give you read access to the spec repo, so you can make pull requests there to improve the text (or issues to complain about them)
|
|
|
yurume
|
2022-05-06 06:21:17
|
that's more than welcoming
|
|
2022-05-06 06:21:43
|
for the reference I had the following notes right now:
|
|
2022-05-06 06:21:57
|
```
1. read LZ77Params; and also lz_len_conf (C.2.7) only if LZ77 is enabled
2. read clusters (C.2.6): if num_dist > 1
1. if is_simple = Bool()
1. read nbits
2. read (num_dist * nbits) more bits into clusters
else
3. read use_mtf
4. read huffman tree with alphabet size = num_dist (presumably) (C.1)
- the spec refers to RFC 7932 sec. 3.5, but sec. 3.4 should be also used
5. read num_dist integers (alphabets) with that tree to read clusters (C.1)
- this is NOT DecodeHybridVarLenUint!
6. if use_mtf, apply inverse MTF transform to clusters
2. determine num_clusters s.t. for all k = [0, num_clusters) k is in clusters
and all clusters[i] are in [0, num_clusters)
3. read use_prefix_code (which is only used for reading distributions!)
4. determine log_alphabet_size (may read more bits if use_prefix_code is false)
- each D[i] has 2^log_alphabet_size entries but has to sum to 2^12 (C.2.4)
5. read configs[i] where i = [0, num_clusters) (C.2.7)
```
|
|
2022-05-06 06:22:03
|
```
6. if use_prefix_code
1. read count[i] where i = [0, num_clusters)
2. for i = [0, num_clusters)
1. read huffman tree with alphabet size = count[i]
2. read 2^log_alphabet_size integers to fill D???
else
3. for each i = [0, num_clusters)
1. read ANS distribution D[i] (C.2.4): if Bool()
1. read Bool() then one or two values v1/v2 and set D[i][v1]/D[i][v2] accordingly
else if Bool()
2. read one value vmax and distribute probabilities evenly to D[i][0]..D[i][vmax-1]
else
3. read shift and alphabet_size (<= 2^log_alphabet_size)
4. read 1- to 7-bit-long prefix code enough times to read alphabet_size numbers later
- codes 0..12 are exponentially distributed frequency bins
- code 13 is RLE; should read repeat count here, not later
5. determine which entry to omit (implicitly determined from other entries),
which is the smallest alphabet
6. read D[i][0]..D[i][alphabet_size-1] with previously read prefix codes
- frequency bins read additional bits accordingly; larger shift, more accurate
- RLE can't be followed by other RLE but can be the first code (prev is implicitly 0)
4. initialize alias mapping from D[i] where i = [0, num_clusters) (C.2.2)
7. allocate 1MB window if LZ77 is enabled
```
|
|
2022-05-06 06:22:05
|
```
8. call DecodeHybridVarLenUint with explicit ctx and optional dist_multiplier (C.2.6)
1. if there's an active LZ77 len-dist pair, handle that first
2. read a single integer as token from clusters[ctx]
2. read (per-ctx) state if it is not yet initialized (C.2.3)
3. do the usual ANS stuff and alias mapping to return the read symbol (C.2.2, C.2.3)
3. if token >= lz77.min_symbol
1. read the length symbol with the distribution D[lz_len_conf]
2. read the distance symbol with ??? (what's lz_ctx?)
3. adjust length and distance with some special mapping and dist_multiplier
4. activate the LZ77 len-dist pair and handle it first
else
5. read required additional bits
4. update the window and return the reconstructed integer
```
|
|
|
Toggleton
|
2022-05-07 07:45:56
|
has someone a better answer for the question if encoding gif to animated jxl is supported in ffmpeg already https://www.reddit.com/r/ffmpeg/comments/ukjii7/converting_gif_to_jxl/ did only quick test and failed <:okayman:959407078928175174>
|
|
|
Traneptora
|
2022-05-08 03:51:24
|
unlikely any time soon
|
|
|
Toggleton
has someone a better answer for the question if encoding gif to animated jxl is supported in ffmpeg already https://www.reddit.com/r/ffmpeg/comments/ukjii7/converting_gif_to_jxl/ did only quick test and failed <:okayman:959407078928175174>
|
|
2022-05-08 03:51:55
|
it's not
|
|
|
|
JendaLinda
|
2022-05-08 10:17:07
|
You may use cjxl to convert animated GIF to JXL. However, in my testing, I found out that converting heavily dithered GIFs to lossless JXL isn't worth it. The resulting file is twice the size of the original. Such GIFs are actually already compressed lossily due to dithering. Perhaps the lossy JXL with some tweaks might produce a smaller file, which wouldn't look too bad.
|
|
|
_wb_
|
2022-05-08 10:49:45
|
Trying to do effective recompression of GIFs that themselves come from video is kind of hard, since gif optimizers optimize for the specific entropy coding of GIF.
|
|
|
w
|
2022-05-08 10:51:41
|
i found that dithered gif still works well in lossless jxl
|
|
|
_wb_
|
2022-05-08 10:58:13
|
Often it does, but not always
|
|
|
|
JendaLinda
|
2022-05-08 11:22:03
|
Those GIFs look like being dithered using white noise rather than Floyd-Steinberg. That's the worst case for any compression. I tried lossy webp as well and it simply blurred the image to remove the noise. I guess it's a natural feature of the video codec. Not sure if this is the right strategy, after all both noisy and blurry versions look pretty bad.
|
|
|
_wb_
|
2022-05-08 11:26:41
|
I think some gif optimizers use a dithering strategy that looks like noise but actually compresses very well with gif's lzw. Those would be hard to recompress losslessly effectively.
|
|
|
|
JendaLinda
|
2022-05-08 11:43:13
|
In such cases, the damage was already done, and keeping the original file seems to be the optimal option.
Anyway, JXL works pretty well for GIFs with cartoon content, producing files about halt the size of the original.
|
|
|
|
Deleted User
|
2022-05-08 11:46:39
|
if the original GIF wasn't pixel art or some other content with few individual colors, then I would simply delete the GIF and forget that it ever existed. :D
(or go and find the source material used for the GIF and make it directly into a video)
|
|
|
_wb_
|
2022-05-08 11:51:08
|
Yeah, gif is basically like a crappy old VCR tape. You don't make a blu-ray version of a movie by just digitizing the VCR tape...
|
|
|
Fraetor
|
2022-05-08 11:54:19
|
From an endusers point of view, I'd wager that if you have a lot of hard to compress lossy GIFs you are probably best ensuring you have GIF decode capability. If you only have them as rare special cases you are probably best off just taking the efficiency hit just for the uniformity.
|
|
|
|
JendaLinda
|
2022-05-08 11:55:58
|
Nobody seems to use APNG, althogh using APNG to produce barely compressed 24bpp animation from video is a similar level of insanity as using GIF for that purpose. However APNG would have a better chance to be recompressed to some video codec and don't look like garbage.
|
|
|
The_Decryptor
|
2022-05-08 11:58:07
|
I think a lot of what people wanted APNG for has been subsumed by things like Lottie-js or WebM, there's more ways to have high quality animations now
|
|
|
Fraetor
|
2022-05-08 12:02:00
|
APNG also took ages to be adopted widely right?
|
|
|
|
JendaLinda
|
2022-05-08 12:03:33
|
APNG was IMO designed quite poorly, it doesn't even support all features of GIF like local palettes. I have GIFs with cartoons, that make use of local palettes. In this case APNG produces a bigger file just because it has to use 24bpp instead of 8bpp. So it can't be considered as GIF replacement and it can't be optimized very well.
|
|
|
The_Decryptor
|
2022-05-08 12:03:45
|
Nearly 10 years for Chrome to support it
|
|
2022-05-08 12:03:53
|
Firefox got it in 2008, Chrome in 2017
|
|
|
|
JendaLinda
|
2022-05-08 12:21:51
|
Considering how versatile standard PNG is with the variety of supported bit depth options and color/grayscale modes, the limitations of APNG look like a lost opportunity.
At the moment, webp looks like a much better alternative to APNG, it allows using mix of lossy and losslkess frames as well and it's easy to make. Of course, JXL looks very promising as well. JXL can do everything that webp can and much more.
|
|
|
_wb_
|
2022-05-08 12:42:20
|
well initially they wanted to make MNG the motion png
|
|
2022-05-08 12:44:52
|
MNG is quite complex, see http://www.libpng.org/pub/mng/spec/mng-1.0-20010209-pdg.html
|
|
2022-05-08 12:46:03
|
so complex that they defined a subset called MNG-LC that is easier to implement
|
|
2022-05-08 12:46:20
|
and then a subset of that called MNG-VLC (for "very low complexity")
|
|
2022-05-08 12:46:45
|
and APNG is even simpler than MNG-VLC
|
|
|
yurume
|
2022-05-08 12:52:37
|
I remember that spec, it is sort of an attempt to (re)do SVG + animation in a binary format
|
|
2022-05-08 12:53:00
|
plus also the half-baked movie format
|
|
|
_wb_
|
2022-05-08 12:53:20
|
well MNG kind of predates SVG and it's raster only
|
|
|
yurume
|
2022-05-08 12:53:44
|
yeah, but that's my impression (especially after knowing SVG)
|
|
2022-05-08 12:55:04
|
thinking about that it can be more accurately described as an SWF format but without vector shapes π
|
|
|
_wb_
|
2022-05-08 12:55:19
|
yes, maybe
|
|
|
yurume
|
2022-05-08 12:55:54
|
and SWF (most probably) only got popular due to the proper authoring software, of which MNG had none
|
|
|
_wb_
|
2022-05-08 12:56:37
|
I think that kind of stuff (animations described using some kind of drawing instructions) is now better done using CSS animations, which browsers will render smoothly
|
|
2022-05-08 12:57:29
|
that's basically what SVG currently is, right? animated svg is pretty much css animation, no?
|
|
|
|
JendaLinda
|
2022-05-08 12:57:44
|
MNG doesn't seem to be widely supported at all. APNG is extremely limited. As I found out, APNG even doesn't support commonly used GIF features. No wonder people continued using GIF. The last nail to APNG's coffin for me is Gimp even doesn't support APNG out of the box. It does support animated GIF and WebP though.
|
|
|
_wb_
|
2022-05-08 12:59:16
|
recurring theme: the success of a format doesn't depend that much on its technical strengths, but more on availability of (good) tooling
|
|
2022-05-08 01:00:00
|
GIF still exists in 2022 because it is so well-supported by everything
|
|
2022-05-08 01:00:57
|
JPEG 2000 and MNG failed to get traction because they lacked good implementations
|
|
2022-05-08 01:01:59
|
most of the hate for WebP and the reason it took so long for non-chrome browsers to implement it is also the lack of support in common tools
|
|
2022-05-08 01:02:07
|
but of course that's a chicken and egg problem
|
|
|
|
JendaLinda
|
2022-05-08 01:03:54
|
That's true. Cteating GIFs is easy. Webp has quite usable command line tools. Creating APNG is kinda painful, but doable. However if I wanted to create a MNG, I guess I would have to use my favorite hex editor.
|
|
|
yurume
|
|
_wb_
that's basically what SVG currently is, right? animated svg is pretty much css animation, no?
|
|
2022-05-08 01:04:10
|
implementation-wise probably, but SVG has a different (XML-based) syntax for animation
|
|
2022-05-08 01:05:01
|
talking about the implementation availability... I kind of seem to keep finding issues from the JXL specification (oops)
|
|
2022-05-08 01:05:26
|
is mine the first reimplementation besides libjxl and jxl-rs?
|
|
|
|
JendaLinda
|
2022-05-08 01:08:40
|
SVG can do anything, but it got kinda too complex. To render SVG properly, you need a web browser engine. It's not a big problem for web use, but it makes SVG kinda awkward to be used as a general purpose vector format.
|
|
|
yurume
|
2022-05-08 01:09:14
|
yeah, I recall attempts like https://github.com/google/iconvg/
|
|
|
_wb_
|
|
yurume
is mine the first reimplementation besides libjxl and jxl-rs?
|
|
2022-05-08 01:17:14
|
Yes, afaik it is. So it's great that you're doing this, it's the best way to find spec bugs and discrepancies between libjxl and the spec
|
|
|
yurume
|
2022-05-08 01:18:48
|
if you are interested in the current state of implementation, it's here: https://gist.github.com/lifthrasiir/137a3bf550f5a8408d4d9450d026101f
|
|
2022-05-08 01:19:17
|
my best guess is that this is about a third or quarter of the entire decoding process?
|
|
|
_wb_
|
|
yurume
yeah, I recall attempts like https://github.com/google/iconvg/
|
|
2022-05-08 01:20:33
|
I kind of feel like doing something like that, with good entropy coding, and then maybe have it as a jxl extension at some point.
|
|
|
yurume
my best guess is that this is about a third or quarter of the entire decoding process?
|
|
2022-05-08 01:25:25
|
Yeah, you have mostly header parsing there, still have to do the actual modular and vardct stuff
|
|
|
yurume
|
2022-05-08 01:26:03
|
the main reason is that, of course, we need to implement about every entropy coding stuff before doing the _actual_ frame decoding π
|
|
|
_wb_
|
2022-05-08 01:26:18
|
I recommend starting with modular, so you can get some decoded images at some point, which will be a nice milestone
|
|
2022-05-08 01:26:33
|
Vardct needs modular but not the other way around
|
|
|
yurume
|
2022-05-08 01:27:16
|
I thought ICC's `enc_size` can be used to skip the ICC data, but it is the number of entropy-coded bytes so I can't skip the ICC decoding process
|
|
|
_wb_
|
2022-05-08 01:28:18
|
Yeah that and permuted TOC using entropy decode was a bit of a mistake with hindsight, since it prevents making a simple parser
|
|
2022-05-08 01:29:04
|
For now you can just work with jxl files without explicit icc profile though
|
|
|
yurume
|
2022-05-08 01:29:43
|
that's true, though entropy coding is something I would eventually have to implement so I'm trying that first
|
|
|
_wb_
|
2022-05-08 01:57:27
|
Yes, makes sense
|
|
|
improver
|
2022-05-08 02:06:38
|
when i tried doing my own decoder some time ago i kinda just stopped at ICC part because ive realized that i can't care at that point that was a bit too much lol
|
|
2022-05-08 02:11:16
|
not to mention that i was doing it in golang & there aint that much of ICC processing stuff done there, it aint exactly language used for image processing
|
|
|
yurume
|
|
improver
not to mention that i was doing it in golang & there aint that much of ICC processing stuff done there, it aint exactly language used for image processing
|
|
2022-05-08 02:28:56
|
golang is fine enough I think, there is no fundamental issue preventing an efficient decoder in Go
|
|
2022-05-08 02:30:23
|
I'm writing it in C (haha) only because i) I wanted to make it small and C is probably the best language to do that and ii) I like stb_image's overall selling point despite of its enormous shortcomings
|
|
2022-05-08 02:31:35
|
it feels very different to write things in C and in other languages, as in C you're gonna very aware of memory uses
|
|
2022-05-08 02:32:05
|
because otherwise you will either leak it or risk memory unsafety
|
|
|
improver
|
2022-05-08 03:34:16
|
C is fine, tbh. I've done quite a lot of stuff in it so manual deallocation just feels natural when you get used to structuring code the right way
|
|
|
yurume
|
2022-05-08 03:38:08
|
well the manual deallocation itself is not bad, just annoying, but a logic bug in C can manifest itself as a memory unsafety
|
|
2022-05-08 03:38:51
|
which doesn't always crash and can become an exploitable bug (in fact, if you can guarantee crash for any such case it's probably okay)
|
|
|
improver
|
2022-05-08 04:36:51
|
you also gotta be careful about myriad of ways compiler misinterprets undefined behavior as allowance to optimize out checks
|
|
2022-05-08 04:37:44
|
but, again, if you structure it in the right way it usually doesn't manifest itself
|
|
2022-05-08 04:39:02
|
i personally like freedom from bound checks, but you gotta keep your brain flexed in certain ways to avoid doing errors
|
|
2022-05-08 04:39:55
|
which is sometimes kinda tiring
|
|
|
yurume
|
|
improver
but, again, if you structure it in the right way it usually doesn't manifest itself
|
|
2022-05-08 04:52:39
|
I think this is not very true, I've just restructured jxsml in the way no implicit integral conversion should occur for example
|
|
2022-05-08 04:54:06
|
because I realized that u(31) will cause an UB under the current impl
|
|
2022-05-08 04:54:28
|
note that we don't actually have u(31) onwards in the spec, but we still need to make sure that u(31) never occurs
|
|
|
improver
|
2022-05-08 05:11:09
|
enabling all warnings & then some also helps
|
|
2022-05-08 05:13:06
|
for stuff you described, `-Warith-conversion` should help
|
|
|
yurume
|
2022-05-08 05:13:31
|
yeah I did end up enabling `-Wconversion` (which doesn't seem to be enabled when `-Wall`, which is a lie)
|
|
2022-05-08 05:13:46
|
off-topic: lol on `-Weverything`
|
|
|
improver
|
2022-05-08 05:14:19
|
don't do that lol maybe only to find some extra flags to add in but definitely not for actual use
|
|
2022-05-08 05:14:45
|
that's usually wayy too noisy
|
|
|
yurume
|
2022-05-08 05:15:18
|
yeah `-Weverything` is not recommended, is `-Wextra` usable by now?
|
|
|
improver
|
2022-05-08 05:19:10
|
I do use it for one project of mine so probably
|
|
2022-05-08 05:19:30
|
but then i also manually deactivate some warnings too
|
|
|
yurume
|
2022-05-08 05:19:47
|
actually, `-W` is a synonym for `-Wextra` (didn't realize that so far) so it's just fine
|
|
2022-05-08 05:20:14
|
and I've found yet another curiously named option `-Wmost`...
|
|
2022-05-08 05:21:21
|
(which is a subset of `-Wall` by the way)
|
|
|
improver
|
2022-05-08 05:22:21
|
`-Wmissing-prototypes -Wstrict-prototypes` are some of flags that improve quality of codebase, if enforced, and I think aint included in `-Wall` or `-Wextra`
|
|
|
yurume
|
2022-05-08 10:28:29
|
```
ctx=0 byte=0x41 A
ctx=0 byte=0x44 D
ctx=0 byte=0x42 B
ctx=0 byte=0x45 E
```
|
|
2022-05-08 10:28:41
|
kind of relieved to see this log
|
|
|
lithium
|
2022-05-09 11:22:45
|
A little curious, PR1395 heuristic probably can identify some non-photo features(like pixel art)
and use modular patches process those non-photo features on non-DCT lossy method?
> https://github.com/libjxl/libjxl/pull/1395
|
|
2022-05-09 11:22:55
|
|
|
|
_wb_
|
2022-05-09 12:39:26
|
those images have alpha, which atm kind of ruins the heuristics because by default in vardct mode we change invisible pixels to some blurry mess that compresses better with vardct, causing the heuristic I have there to not be very effective
|
|
2022-05-09 12:42:13
|
if I turn the images into ppm so no alpha channel, it does do something:
```
Encoding kPixels Bytes BPP E MP/s D MP/s Max norm pnorm BPP*pnorm Bugs
--------------------------------------------------------------------------------------------------------------------------
jxl:d0.5:no_more_patches 8057 3827508 3.8000262 2.523 24.258 1.60146487 0.40673860 1.545617357804 0
jxl:d0.5:more_patches 8057 3924483 3.8963049 1.641 12.429 1.60146487 0.36146831 1.408390756813 0
jxl:d1:no_more_patches 8057 2743640 2.7239405 2.569 23.389 2.60309267 0.67690235 1.843841691805 0
jxl:d1:more_patches 8057 2879987 2.8593085 1.683 13.612 2.28676367 0.60322047 1.724793400146 0
jxl:d2:no_more_patches 8057 1877509 1.8640283 2.614 23.201 4.18940258 1.10066881 2.051677866936 0
jxl:d2:more_patches 8057 2002257 1.9878806 1.751 14.471 3.41511583 0.99260559 1.973181445061 0
jxl:d3:no_more_patches 8057 1445875 1.4354935 2.515 24.347 5.78894663 1.48654022 2.133918846267 0
jxl:d3:more_patches 8057 1616553 1.6049460 1.582 16.985 4.45794296 1.35440503 2.173746978943 0
Aggregate: 8057 2383855 2.3667388 2.061 18.433 2.94360591 0.77641388 1.837568844778 0
```
|
|
2022-05-09 12:42:47
|
not sure if it's doing something good, but it's doing something
|
|
2022-05-09 12:43:12
|
(quality improves but size also goes up)
|
|
|
lithium
|
|
_wb_
those images have alpha, which atm kind of ruins the heuristics because by default in vardct mode we change invisible pixels to some blurry mess that compresses better with vardct, causing the heuristic I have there to not be very effective
|
|
2022-05-09 01:10:09
|
Thank you for your reply,
This heuristics is really flexible, π
if force keep lossless alpha channel, probably can preserve alpha channel?
> --keep_invisible=1
> force disable/enable preserving color of invisible pixels (default: 1 if lossless, 0 if lossy).
|
|
|
_wb_
|
2022-05-09 01:12:54
|
yes, that would help, or what would also help is if we would do the modification of invisible pixels in a different way
|
|
|
lithium
|
2022-05-09 01:20:07
|
Thank you for your work, I appreciate your help very much π
|
|
|
_wb_
|
2022-05-09 01:20:22
|
i get these results now on average for a manga set
|
|
|
lithium
|
2022-05-09 01:22:40
|
Cool <:BlobYay:806132268186861619> , That improvement is really great.
|
|
|
_wb_
|
2022-05-09 01:28:09
|
probably more can be done still, this only produces rectangular patches where the four corner pixels have identical colors, so it can replace things like lines or text with Modular when they're on a solid background, but not things like hard edges between two regions of different color, or backgrounds that are not solid but e.g. a gradient
|
|
2022-05-09 01:29:13
|
the tricky thing is if the background is not solid, how do you extract a patch without messing up the remaining vardct image _and_ without introducing extra entropy in the modular patch
|
|
|
lithium
|
2022-05-09 01:35:11
|
Maybe <@532010383041363969> have some idea?,
I remember `Jyrki Alakuijala` mention something different lossy method on `encode.su` comment.
|
|
|
Traneptora
|
2022-05-09 01:35:48
|
you can ping him, btw <@532010383041363969>
|
|
2022-05-09 01:35:58
|
devs don't mind getting pinged
|
|
|
|
Deleted User
|
|
Traneptora
devs don't mind getting pinged
|
|
2022-05-09 04:19:34
|
they are only polite and don't complain about our constant annoyance. But you should be careful to not spam people like <@532010383041363969>, <@794205442175402004>, <@179701849576833024> or <@604964375924834314> else we might never see 1.0.
|
|
|
Traneptora
|
2022-05-09 04:43:55
|
why warn me not to spam them in the same message where you literally ping all 4
|
|
|
Fox Wizard
|
2022-05-09 04:53:45
|
<:KekDog:884736660376535040>
|
|
|
_wb_
|
2022-05-09 05:06:19
|
<:Spam:806628077656473650>
|
|
|
spider-mario
|
2022-05-09 07:38:26
|
Iβm fine with being pinged
|
|
2022-05-09 07:38:29
|
itβs generally interesting
|
|
|
_wb_
|
2022-05-09 08:21:47
|
https://c.tenor.com/ZeNcyTscKGIAAAAM/generally-jade.gif
|
|
|
yurume
|
2022-05-10 11:29:08
|
```c
#if UINT64_MAX >= SIZE_MAX
typedef uint64_t jxsml__size64_t;
#else
typedef size_t jxsml__size64_t;
#endif
```
|
|
2022-05-10 11:29:15
|
I hate C's integer handling (again).
|
|
|
improver
|
2022-05-11 12:14:53
|
this is stupid why not just alias to long unsigned int or uint64_t all the times
|
|
|
yurume
|
2022-05-11 12:21:53
|
so the issue is that the buffer size comes from the outside so it has to be size_t (or you can convert beforehand, but that's only moving the conversion point)
|
|
2022-05-11 12:22:05
|
while you have uint64_t sizes in the container format
|
|
2022-05-11 12:22:27
|
so somewhere you need to compare size_t against uint64_t to prevent overflow
|
|
2022-05-11 12:23:02
|
now, the integer promotion rule means that you can do that just fine, but `-Wconversion` prevents that π
|
|
2022-05-11 12:23:07
|
(for the good cause)
|
|
2022-05-11 12:23:49
|
so I needed a type that is no smaller than both size_t and uint64_t, and it turns out `-Wconversion` doesn't really matter in preprocessors, so here we go
|
|
2022-05-11 12:25:52
|
I think there is no legal way to do this without at least one such comparison, at least before C23 (where you'd get `inttype_WIDTH` macros)
|
|
|
improver
|
2022-05-11 12:26:36
|
id just manually case it to uint64_t in places where i do checking
|
|
2022-05-11 12:26:47
|
because this feels kinda too hacky
|
|
|
yurume
|
2022-05-11 12:27:28
|
I'm wary of such casting in general
|
|
|
Traneptora
|
2022-05-11 02:34:57
|
the only time you can't just treat both as uint64_t is if the size_t buffer size is greater than UINT64_MAX
|
|
2022-05-11 02:35:38
|
so you can just check for that case and whine
|
|
2022-05-11 02:37:09
|
as far as I'm aware -Wconversion should not whine if you are seamlessly promoting unsigned integers
|
|
2022-05-11 02:37:19
|
in a comparison
|
|
2022-05-11 02:37:27
|
if it does then you can safely ignore it
|
|
|
yurume
|
|
Traneptora
as far as I'm aware -Wconversion should not whine if you are seamlessly promoting unsigned integers
|
|
2022-05-11 02:38:09
|
really? I would have to check this again
|
|
|
Traneptora
|
2022-05-11 02:38:30
|
well the whole point of -Wconversion is to warn about potential loss of precision due to conversion, right?
|
|
2022-05-11 02:40:02
|
```
Warn for implicit conversions that may alter a value.
```
|
|
2022-05-11 02:40:05
|
from the GCC manpage
|
|
2022-05-11 02:40:30
|
which means comparison of unsigned integers with `>` should not cause -Wconversion to fire
|
|
2022-05-11 02:40:45
|
since whichever is smaller will just be promoted upward
|
|
|
yurume
|
2022-05-11 02:42:12
|
indeed, I'm not sure why I had an impression that the warning is fired without a reason
|
|
2022-05-11 02:42:23
|
maybe I have mistaken other warnings
|
|
|
Traneptora
|
2022-05-11 02:42:35
|
did it fire anyway when you tried it?
|
|
|
yurume
|
2022-05-11 02:43:18
|
there was some warning prompted me to work around that, but I don't recall which
|
|
2022-05-11 02:45:28
|
anyway I've removed that workaround type and everything seems fine, so I'm happy
|
|
2022-05-11 02:46:08
|
except for this new one:
```
jxsml.c:121:24: warning: comparison is always true due to limited range of data type [-Wtype-limits]
JXSML__SHOULD(size32 <= SIZE_MAX, "bigg");
```
|
|
|
The_Decryptor
|
2022-05-11 02:46:54
|
Are there any systems where size_t will be larger than uint64_t?
|
|
2022-05-11 02:47:23
|
Even the current 128bit stuff I've seen still uses a 64bit size_t
|
|
|
yurume
|
2022-05-11 02:47:43
|
I doubt
|
|
2022-05-11 02:48:26
|
anyway, that happens because `sizeof(uint32_t) <= sizeof(size_t)` here, which is the case for most current platforms, but the warning is not always true
|
|
|
Traneptora
|
|
yurume
except for this new one:
```
jxsml.c:121:24: warning: comparison is always true due to limited range of data type [-Wtype-limits]
JXSML__SHOULD(size32 <= SIZE_MAX, "bigg");
```
|
|
2022-05-11 03:04:58
|
what's this?
|
|
|
yurume
|
|
Traneptora
what's this?
|
|
2022-05-11 03:11:58
|
that checks for a premature end of the container file, but only makes sense for size_t smaller than u32
|
|
2022-05-11 03:12:41
|
wait, thinking about that I can also get rid of that line
|
|
2022-05-11 03:15:02
|
yes I can totally do that, that code was the step 1 for the EOF check, since the box length was first written to size_t (possible overflow here) and then compared to the provided buffer size, but I don't need the first step anymore
|
|
|
Traneptora
|
2022-05-11 03:21:09
|
better off not writing the box length to a size_t
|
|
2022-05-11 03:21:23
|
if it could possibly overflow
|
|
|
yurume
|
2022-05-11 03:21:49
|
yeah, as said above I originally thought that we need size_t vs. uint64_t comparison is inevitable anyway so I overlooked that line
|
|
|
improver
|
2022-05-11 04:26:10
|
imo u shouldn't limit to something machine dependent like SIZE_MAX
|
|
2022-05-11 04:27:08
|
as that leads to implementation-defined behavior
|
|
2022-05-11 04:28:03
|
if something should be limited to something like SIZE_MAX then it's likely that it'd be better limited to 4GB
|
|
2022-05-11 04:28:18
|
or even less
|
|
2022-05-11 04:28:35
|
but it seems in this case it wasn't exactly for that purpose
|
|
|
yurume
|
2022-05-11 04:48:13
|
I'm aware of that, probably I need to elaborate my current design more accurately
|
|
2022-05-11 04:49:20
|
I do expect that jxsml eventually has to support an on-demand input source, that is, essentially unable to load into the memory beforehand
|
|
2022-05-11 04:50:18
|
but writing that code right now complicates the source code, so I didn't implement that while being aware of the possibility
|
|
2022-05-11 04:51:06
|
that's why this sort of code only occurs in container parsing codes, cause I've been more cautious in the bitreader π
|
|
2022-05-11 04:51:59
|
(I assumed the container parsing code will remain small enough that I can easily fix for other input sources later)
|
|
|
|
Deleted User
|
2022-05-12 05:16:27
|
Is this how DCT works? (10:06-10:42)
https://youtu.be/Q1bSDnuIPbo
|
|
|
|
JendaLinda
|
2022-05-13 11:01:23
|
No wonders, the GIFs are too noisy. You can't recompress that losslessly efiiciently.
|
|
2022-05-13 11:07:28
|
Also, there is a program called GIFSICLE. It's designed for optimize GIFs to the smallest possible file size. It also provides some kind of lossy encoding. That instroduces more noise in the image, but it's also hard to recompress to anything else.
|
|
|
Yari-nyan
|
2022-05-13 07:17:58
|
i want to see a big youtube channel like linus tech tips/tech quickie make a video about modern image formats, maybe video codecs
|
|
|
lonjil
|
2022-05-13 07:21:00
|
they'd probably fuck it up, tbh
|
|
2022-05-13 07:21:18
|
Linus Media Group *sucks* at basic research.
|
|
|
Yari-nyan
|
|
lonjil
|
2022-05-13 07:24:35
|
They misrepresent, probably not maliciously, tech stuff all the time. Since I don't think they're malicious, the only explanation is incompetence.
|
|
|
Yari-nyan
|
2022-05-13 07:25:02
|
it would be great if you gave examples, especially "all the time"
|
|
|
Fraetor
|
2022-05-13 07:30:47
|
There have been a few times. Some of their stuff on colour profiles while covering HDR stuff ifs a little iffy.
|
|
2022-05-13 07:31:17
|
Generally they are OK, given they pump out the content quite fast.
|
|
|
Yari-nyan
|
2022-05-13 07:31:20
|
naturally with hundreds of videos there are bound to be mistakes
|
|
|
Fraetor
|
2022-05-13 07:32:04
|
Most of the cases I have notices are where they miss caveats.
|
|
|
Yari-nyan
|
2022-05-13 07:32:40
|
LMG is good entertainment and makes tech stuff approachable for those who don't care otherwise
|
|
|
Fraetor
|
2022-05-13 07:33:19
|
Yeah, on the whole they are quite fun.
|
|
|
BlueSwordM
|
|
Yari-nyan
i want to see a big youtube channel like linus tech tips/tech quickie make a video about modern image formats, maybe video codecs
|
|
2022-05-13 07:38:20
|
Yeah, but they would need someone like me to be a media consultant for them to check the exactitude of their script and statements <:kekw:808717074305122316>
|
|
|
lonjil
|
2022-05-13 07:48:43
|
> it would be great if you gave examples, especially "all the time"
But then I would have to actually go back thru and find the videos I've watched etc, which would require effort...
One example I remember perfectly though, is when Anthony reviewed one of the recent Mac models (I think the Mac Studio?) he brings up Hector Martin's findings about the poor performance of Apple's SSD solution when flushing to permanent storage. But he completely misunderstands what Hector is saying. He implies that Apple is doing fucky stuff to create false and misleading numbers, but
a) everyone advertises non-sync write perf, not just Apple, it isn't weird.
b) the different behaviour for the fsync command from what most Unices does is annoying, but not some trick Apple cooked up to make their newer home-grown SSD solutions look better. Back in the day, all Unices had that behaviour, and Apple was simply adhering to the norm. They documented that behaviour, created extensions for people who do not want that behaviour (the POSIX standard is rather lacking in this area).
c) Hector literally straight up says right in that tweet chain that Anthony quoted that it was probably just a bug, and that Apple will most likely be able to improve sync-write performance with an update.
So he either didn't understand what he was reading (technical incompetence), or he did but was intentionally misleading (malice), or he just took a quick glance and included it without reading it properly (research incompetence).
Another one I recall quite clearly, but don't know much about myself: I'm in a discord with a lot of FOSS developers, and I remember one time when a dev there vented about how Linus had just released a video covering a project they contribute to, and the video was full of misinformation about the project. Apparently, LMG hadn't even bothered to contact the project devs to ensure accuracy. They just wrote some nonsense and called it good enough.
|
|
|
Yari-nyan
|
2022-05-13 07:52:19
|
i'd like to know which project
|
|
2022-05-13 07:53:38
|
or is that too hard
|
|
|
lonjil
|
2022-05-13 07:54:22
|
TIL people aren't allowed to have opinions on the internet without spending time sourcing everything.
|
|
|
Yari-nyan
|
2022-05-13 07:54:33
|
no i'm curious
|
|
|
lonjil
|
2022-05-13 07:54:47
|
I'll have a look later.
|
|
2022-05-13 07:54:52
|
Shouldn't be too hard.
|
|
|
Yari-nyan
|
2022-05-13 07:55:19
|
TIL i don't allow people to have opinions
|
|
|
_wb_
|
2022-05-13 08:03:51
|
I allow everyone to have opinions but the likelihood that they will influence my opinions is generally proportional to the evidence provided.
|
|
|
lonjil
|
2022-05-13 08:05:29
|
I just find it annoying to have the expectation of sourcing everything for my opinions in casual conversation. It's one thing if we're having a debate, or trying to find the best solution to a problem, but I just wanted to chat, not sway anyone.
|
|
|
_wb_
|
2022-05-13 08:12:29
|
I think that's perfectly fine. Besides, you did give examples. It would also have been fine if you said "no" when asked to give examples :)
|
|
|
Yari-nyan
|
2022-05-13 08:13:01
|
that
|
|
2022-05-13 08:16:11
|
`no, too much effort, i just want to chill`
|
|
|
lonjil
|
2022-05-13 08:16:31
|
sorry, `it would be great if you gave examples, especially "all the time"` felt very strong to me, I might have misread.
|
|
|
Yari-nyan
|
2022-05-13 08:17:24
|
i understand
|
|
2022-05-13 08:19:19
|
tone can be hard over text
|
|
|
lonjil
|
2022-05-13 08:20:12
|
yea
|
|
2022-05-13 08:20:21
|
β€οΈ
|
|
|
w
|
2022-05-13 09:45:24
|
the best stuff that comes out of lmg are the videos where they mess around and do dumb stuff
|
|
2022-05-13 09:46:26
|
Their information videos are often garbage and makes me want to go down to their office and punch someone
|
|
2022-05-13 09:47:05
|
a recent obvious one is their windows android one
|
|
2022-05-13 09:47:16
|
they did 0 research
|
|
2022-05-13 09:48:19
|
I would trust them to do a video on image/video codecs very wrongly
|
|
|
.vulcansphere
|
2022-05-14 03:00:55
|
Yup, their mess-up stuff videos can be great but not so much for informational videos
|
|
|
yurume
|
2022-05-14 04:53:47
|
Today in jxsml: I've found that ANS distribution was decoded properly but decoding into some unexpected symbols. There were two problems:
1. I've mistakenly put `offset` in place of `cutoff`, so some zero-probability symbols were decoded.
2. I've copied clustered distributions back to non-clustered distributions. That meant the initial state was decoded multiple times even when a single clustered distribution (mapped from multiple non-clustered distributions) is used. D'oh.
|
|
2022-05-14 04:54:52
|
not sure if the problem 2 needs a clarification in the spec though
|
|
|
_wb_
|
2022-05-14 05:28:48
|
The ans state is global for the entire ans stream, it's not one state per cluster (let alone per non-clustered distribution)
|
|
|
yurume
|
2022-05-14 05:50:21
|
oh
|
|
2022-05-14 05:51:15
|
the spec definitely sounded like that there are states per each clustered distribution, but in hindsight yeah that's needless
|
|
2022-05-14 05:51:24
|
time to file yet another issue!
|
|
|
_wb_
|
2022-05-14 05:55:38
|
When you are making a spec from an implementation, these things are too obvious to even realize it should maybe be clarified. Only when you actually try make an implementation from the spec it becomes clear that some things can be ambiguous.
|
|
|
yurume
|
2022-05-14 07:45:50
|
fun fact: if my reading of the spec is correct, the largest number of clustered distributions possible is 495 * 2^21 for level 5 and 495 * 2^30 for level 10
|
|
|
_wb_
|
2022-05-14 10:09:23
|
How did you arrive at those numbers?
|
|
2022-05-14 10:16:01
|
You can have at most 2^22 MA tree nodes in either level (depending on the image dimensions), so that's an upper bound on the number of non-clustered distributions
|
|
|
.vulcansphere
|
2022-05-14 12:15:26
|
In case anyone here looking for webcomic artworks as 2D test images with suitable licence, Pepper&Carrot (an excellent FOSS webcomic in my opinion) has a dedicated artworks page, to access source material (in JPG and KRA (Krita) formats) click an artwork and then click `source & license` button (for most original P&C artworks, the licence is CC BY 4.0 with attribution to David Revoy) https://www.peppercarrot.com/en/artworks/artworks.html
|
|
2022-05-14 12:20:27
|
P.S. This wallpaper is what I used as source material in libjxl command-line screenshot in Wikipedia π https://www.peppercarrot.com/en/viewer/wallpapers__2017-12-13_The-micro-dimension_by-David-Revoy.html
|
|
|
yurume
|
|
_wb_
You can have at most 2^22 MA tree nodes in either level (depending on the image dimensions), so that's an upper bound on the number of non-clustered distributions
|
|
2022-05-14 02:18:54
|
HF (AC) coefficient histograms; `495 * num_hf_presets * nb_block_ctx` distributions will be read, where `nb_block_ctx` is bounded by an arbitrary limit (16) but `num_hf_presets` is only bounded by the number of groups which can get very large.
|
|
2022-05-14 02:20:25
|
assuming the minimum `group_dim` of 128, max # groups = max # pixels / 2^14 = 2^14 or 2^26 depending on levels, so that's how I ended up with those numbers
|
|
|
_wb_
|
2022-05-14 02:55:22
|
Ah for vardct hf ctx, I see
|
|
2022-05-14 03:23:13
|
Well group_dim is always 256 when there is vardct
|
|
2022-05-14 03:23:29
|
Only in modular mode it can be changed
|
|
|
yurume
|
2022-05-14 03:23:59
|
ah
|
|
2022-05-14 03:24:30
|
then it'd be 495 * 2^19 or 495 * 2^28 respectively, still quite larger than 2^22 π
|
|
|
_wb_
|
2022-05-14 03:26:14
|
Yes, you do need a quite large image to reach those numbers though :)
|
|
|
yurume
|
2022-05-14 03:27:08
|
it does mean that for a very large image you need a lot of memory upfront even if you are decoding only a very small part of it (well, one group worth of pixels)
|
|
|
_wb_
|
2022-05-14 03:33:36
|
If num_hf_presets is large, yes
|
|
|
yurume
|
2022-05-14 03:33:45
|
you may need, yeah
|
|
|
_wb_
|
2022-05-14 03:34:09
|
In the current libjxl encoder, that number is always 1 iirc π
|
|
|
yurume
|
2022-05-14 03:34:39
|
after that calculation I threw out an idea to pre-permute cluster arrays at all, it's simply not worth
|
|
2022-05-14 03:35:34
|
(pre-permutation meaning shallow-copying alias tables etc. so that you can save one indirection)
|
|
|
lithium
|
|
_wb_
probably more can be done still, this only produces rectangular patches where the four corner pixels have identical colors, so it can replace things like lines or text with Modular when they're on a solid background, but not things like hard edges between two regions of different color, or backgrounds that are not solid but e.g. a gradient
|
|
2022-05-14 03:39:34
|
modular patches can apply VarDCT and XYB?
this behavior conform spec?
I just thinking maybe can apply delta palette(XYB) + modular patches VarDCT(XYB)?
|
|
|
|
veluca
|
|
_wb_
In the current libjxl encoder, that number is always 1 iirc π
|
|
2022-05-14 03:41:34
|
I think at -s 9 it might be >1
|
|
|
_wb_
|
|
lithium
modular patches can apply VarDCT and XYB?
this behavior conform spec?
I just thinking maybe can apply delta palette(XYB) + modular patches VarDCT(XYB)?
|
|
2022-05-14 04:30:06
|
Patches can be encoded in any way, you can just take decoded pixels from an earlier frame, so you can e.g. have one modular frame (of type kReferenceOnly so it is a "hidden" frame) and one vardct frame (of type kRegularFrame) and then use Patches to draw pixels from the modular frame on top of the vardct frame
|
|
2022-05-14 04:32:57
|
Which makes me realize: I should probably try using kReplace patch blending instead of kAdd. Downside is that vardct can no longer correct errors in the modular patch, but advantage is that you can just put some blurry mess in the vardct location that will get patched.
|
|
|
improver
|
2022-05-14 07:44:20
|
btw who manages matrix integration?
|
|
2022-05-14 07:44:28
|
i tried to join on matrix but couldn't :<
|
|
2022-05-14 07:44:41
|
also would be interesting to try making use of spaces
|
|
|
_wb_
|
2022-05-14 07:50:43
|
I set that up at some point but never checked if it still works
|
|
|
improver
|
2022-05-14 07:52:28
|
oh somehow i now joined. matrix is sometimes flaky
|
|
2022-05-14 07:53:33
|
idea would be to make jxl matrix space, then re-create room for each channel in here
|
|
2022-05-14 07:54:03
|
& then link-up bot for each discord channel - matrix room
|
|
2022-05-14 07:55:12
|
i dunno whether one can convert room into space though. or maybe just make something like <#794206170445119489>-space, separate from <#794206170445119489> which would remain standalone room on its own, but also be part of <#794206170445119489>-space
|
|
2022-05-14 07:59:00
|
doesn't seem like one can convert room into space even if technically space is kind of room but that shouldn't be an issue, can just make <#794206170445119489>-space
|
|
|
.vulcansphere
|
2022-05-15 04:43:24
|
That would be neat, sometimes I do use Matrix π
|
|
|
lithium
|
|
_wb_
Which makes me realize: I should probably try using kReplace patch blending instead of kAdd. Downside is that vardct can no longer correct errors in the modular patch, but advantage is that you can just put some blurry mess in the vardct location that will get patched.
|
|
2022-05-15 01:56:46
|
Thank you for your reply π
Look like modular patches is a flexible image codec features.
> Downside is that vardct can no longer correct errors in the modular patch,
> but advantage is that you can just put some blurry mess in the vardct location that will get patched.
I guess probably put some blurry mess behavior(increase appeal) is beneficial for really non-photographic non-photo features?
|
|
|
_wb_
|
2022-05-15 01:58:17
|
the blurry mess would be just what is in the vardct image, since it needs to have _something_ in the image even if there's later going to be a patch that overwrites those pixels
|
|
2022-05-15 01:58:55
|
putting a blurry mess there instead of, say, just a black rectangle, is to avoid border artifacts at the patch boundary
|
|
|
Fox Wizard
|
2022-05-17 08:54:41
|
Is there a recent cjxl.exe build somewhere? All builds after ``2022-02-22T15:54:09Z_057ad6b4559fa69e7b393b4b76d0b8bae45b2d9d/`` here https://artifacts.lucaversari.it/libjxl/libjxl/ don't seem to work for me. Outputs no file with slower speeds <:Cheems:884736660707901470>
|
|
|
|
veluca
|
2022-05-17 09:00:10
|
that seems to be a common issue
|
|
|
Fox Wizard
|
2022-05-17 09:02:53
|
Hoped it would just be the latest build, but got that issue with the 7 latest builds there and also some random ones that come after the working one :/
|
|
|
|
veluca
|
2022-05-17 09:30:28
|
did you bisect the builds?
|
|
2022-05-17 09:31:20
|
I *think* this is the same issue as https://github.com/libjxl/libjxl/issues/1282
|
|
|
Fox Wizard
|
2022-05-17 09:34:26
|
I just took the builds from https://artifacts.lucaversari.it/libjxl/libjxl/ and tried cjxl.exe separately and also in the folder with all other components. Both caused the same issue
|
|
2022-05-17 09:38:27
|
Surprised it didn't cause an error or anything. Got confused at first and thought I somehow lost the file <:KekDog:884736660376535040>
|
|
|
|
veluca
|
2022-05-17 09:41:21
|
that's a segfault
|
|
2022-05-17 09:41:27
|
windows just doesn't say anything xD
|
|
|
Fox Wizard
|
2022-05-17 09:43:15
|
Tbh, no idea what that even means <:KekDog:884736660376535040>
|
|
|
Petr
|
2022-05-18 05:38:01
|
Segfault is an ancronym of segmentation fault. Also known as access violation. It means that the software attempts to access a restricted area of memory.
|
|
|
_wb_
|
2022-05-18 05:47:30
|
Yes, but other stuff can also cause segfault
|
|
2022-05-18 05:48:49
|
Like using simd instructions that the cpu doesn't support
|
|
|
Traneptora
|
|
_wb_
Like using simd instructions that the cpu doesn't support
|
|
2022-05-18 04:32:50
|
that kills with SIGILL, not SIGSEGV
|
|
2022-05-18 04:32:55
|
it's a separate signal
|
|
2022-05-18 04:33:08
|
(On unix, at least)
|
|
|
_wb_
|
2022-05-18 05:17:36
|
Right
|
|
|
spider-mario
|
2022-05-18 08:02:01
|
could it have to do with alignment?
|
|
2022-05-18 08:02:23
|
I have vague memories of getting segfaults when using aligned (well, non-unaligned) loads on unaligned memory
|
|
|
_wb_
|
2022-05-18 08:07:48
|
Yes, that produces segfault too iirc
|
|
|
|
veluca
|
2022-05-18 08:54:50
|
yep, it does
|
|
2022-05-18 08:55:23
|
<@604964375924834314> did you ever get avx2 working on windows?
|
|
|
spider-mario
|
2022-05-18 09:38:41
|
I believe it works on my machine
|
|
2022-05-18 09:38:55
|
but I build with clang on msys2/mingw64
|
|
2022-05-18 09:39:02
|
not sure if it has any impact
|
|
2022-05-18 09:40:10
|
```
$ tools/cjxl bench.png bench.jxl
JPEG XL encoder v0.7.0 a444260b [AVX2,SSE4,SSSE3,Scalar]
Read 500x606 image, 11.7 MP/s
Encoding [VarDCT, d1.000, squirrel], 32 threads.
Compressed to 119663 bytes (3.159 bpp).
500 x 606, 16.53 MP/s [16.53, 16.53], 1 reps, 32 threads.
```
|
|
|
|
veluca
|
2022-05-18 09:41:35
|
can you try the github artefacts? π
|
|
|
spider-mario
|
2022-05-18 09:59:04
|
```
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff7feaa0d91 in cjxl!JxlSignatureCheck ()
(gdb) where
#0 0x00007ff7feaa0d91 in cjxl!JxlSignatureCheck ()
#1 0x00007ff7feaa145b in cjxl!JxlSignatureCheck ()
#2 0x00007ff7feac3c59 in cjxl!JxlSignatureCheck ()
#3 0x00007ff7feb9c2ab in cjxl!JxlSignatureCheck ()
#4 0x00007ff7feac5284 in cjxl!JxlSignatureCheck ()
#5 0x00007ff7fe9ed303 in cjxl!JxlEncoderVersion ()
#6 0x00007ff7fe930252 in ?? ()
#7 0x00007ff7fea0447a in cjxl!JxlEncoderVersion ()
#8 0x00007ff7fea07b36 in cjxl!JxlEncoderVersion ()
#9 0x00007ff7fe941dfc in ?? ()
#10 0x00007ff7fe90c569 in ?? ()
#11 0x00007ff7fe912d3d in ?? ()
#12 0x00007ff7fec1a32c in cjxl!JxlSignatureCheck ()
#13 0x00007ff83d9d7034 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#14 0x00007ff83f242651 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#15 0x0000000000000000 in ?? ()
```
|
|
|
Basketball American
|
2022-05-18 10:03:57
|
i just built with vcpkg and it seems to work too
|
|
|
|
veluca
|
|
spider-mario
```
Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff7feaa0d91 in cjxl!JxlSignatureCheck ()
(gdb) where
#0 0x00007ff7feaa0d91 in cjxl!JxlSignatureCheck ()
#1 0x00007ff7feaa145b in cjxl!JxlSignatureCheck ()
#2 0x00007ff7feac3c59 in cjxl!JxlSignatureCheck ()
#3 0x00007ff7feb9c2ab in cjxl!JxlSignatureCheck ()
#4 0x00007ff7feac5284 in cjxl!JxlSignatureCheck ()
#5 0x00007ff7fe9ed303 in cjxl!JxlEncoderVersion ()
#6 0x00007ff7fe930252 in ?? ()
#7 0x00007ff7fea0447a in cjxl!JxlEncoderVersion ()
#8 0x00007ff7fea07b36 in cjxl!JxlEncoderVersion ()
#9 0x00007ff7fe941dfc in ?? ()
#10 0x00007ff7fe90c569 in ?? ()
#11 0x00007ff7fe912d3d in ?? ()
#12 0x00007ff7fec1a32c in cjxl!JxlSignatureCheck ()
#13 0x00007ff83d9d7034 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#14 0x00007ff83f242651 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#15 0x0000000000000000 in ?? ()
```
|
|
2022-05-18 10:41:06
|
somehow I didn't see this message before... Well, that's interesting.
|
|
2022-05-18 10:41:23
|
so the CI compiler is br0ken?
|
|
|
Traneptora
|
|
veluca
somehow I didn't see this message before... Well, that's interesting.
|
|
2022-05-19 06:14:04
|
ffmpeg devs were getting segfaults on windows too
|
|
2022-05-19 06:15:01
|
I don't remember the details
|
|
|
_wb_
|
2022-05-19 06:49:18
|
weird that it says JxlSignatureCheck - that's a bogus error, right?
|
|
|
|
veluca
|
2022-05-19 08:15:51
|
Unless we did a lot more recursion than we should in that function, it's probably broken debug symbols lol
|
|
2022-05-19 08:16:20
|
Guess we should try and see what's different between CI and Sami's setup
|
|
|
Traneptora
|
2022-05-19 01:48:37
|
does valgrind report the same location as gdb?
|
|
|
spider-mario
|
2022-05-19 03:29:40
|
there is no valgrind on windows, unfortunately
|
|
|
Traneptora
|
|
spider-mario
there is no valgrind on windows, unfortunately
|
|
2022-05-19 05:24:41
|
do you use gdb inside msys?
|
|
|
spider-mario
|
|
Traneptora
|
2022-05-19 05:25:02
|
how do you use gdb to test a binary? i.e. what's the syntax?
|
|
|
spider-mario
|
2022-05-19 05:25:36
|
`gdb --args command arg1 arg2...`
|
|
2022-05-19 05:26:00
|
then `run`
|
|
|
Traneptora
|
2022-05-19 05:26:14
|
so `run` runs it until it exits/crashes, then what?
|
|
2022-05-19 05:26:23
|
then `where` as you typed earlier?
|
|
|
spider-mario
|
2022-05-19 05:26:37
|
yes, that gives you a stack trace
|
|
|
Traneptora
|
2022-05-19 05:26:53
|
thanks, that's what I'm looking for. lemme build it and then see if I can produce one.
|
|
|
spider-mario
|
2022-05-19 05:27:13
|
and you can go to a specific frame with e.g. `frame 4` and then print local variables
|
|
|
_wb_
|
2022-05-19 05:41:12
|
When they're not optimized away that is
|
|
2022-05-20 07:33:37
|
I asked the Midjourney AI to imagine the JPEG XL specification
|
|
2022-05-20 07:33:41
|
|
|
|
w
|
2022-05-20 07:40:29
|
looks about right
|
|
|
_wb_
|
2022-05-20 07:45:34
|
yeah I think we can just send that to ISO and call it the second edition
|
|
|
Nova Aurora
|
2022-05-20 07:46:01
|
It got the formatting right at least
|
|
|
190n
|
2022-05-20 07:48:14
|
wtf
|
|
2022-05-20 07:48:25
|
free jxl spec <:Poggers:805392625934663710>
|
|
|
Nova Aurora
|
2022-05-20 07:49:08
|
If you can't read that it's your own problem
|
|
|
_wb_
|
2022-05-20 07:53:29
|
|
|
2022-05-20 07:53:50
|
this was something I got with the query "next-generation image codec J X L"
|
|
2022-05-20 07:56:50
|
|
|
2022-05-20 07:57:27
|
query was "the battle of the codecs, flemish primitive style"
|
|
2022-05-20 07:57:45
|
that stuff is fun to play with, lol
|
|
2022-05-20 08:44:42
|
I wonder if https://en.wikipedia.org/wiki/Mesopic_vision should be taken into account more β we tend to focus on photopic (daytime) vision, i.e. > 5 nits where the rods are irrelevant and only cones are used
|
|
2022-05-20 08:45:11
|
of course during daytime when using 200+ nits screens, photopic vision is all that matters
|
|
2022-05-20 08:45:36
|
but what about when you use a phone in the dark with its display set to minimum brightness?
|
|
2022-05-20 08:46:27
|
is that still bright enough to make rods irrelevant?
|
|
2022-05-20 08:48:11
|
|
|
2022-05-20 08:50:50
|
in mesopic vision things become more like scotopic vision (night vision), i.e. there is a so-called Purkinje shift towards blue since rods are sensitive to lower wavelengths (more blue) than the greenish L/M cones
|
|
2022-05-20 08:52:13
|
in XYB we model luma as avg(L,M), with X being L-M and B being just S (or in practice typically S-Y)
|
|
2022-05-20 08:55:06
|
I wonder if we shouldn't take R into account somehow too, in dark regions below 5 nits or so
|
|
2022-05-20 09:07:45
|
probably only for very low frequency signal since the fovea does not have any rods
|
|
|
|
Deleted User
|
2022-05-20 09:09:05
|
let's keep that in mind for JXL2 ;)
|
|
|
_wb_
|
2022-05-20 09:13:21
|
well it could perhaps also be taken into account by the encoder somehow, I dunno
|
|
2022-05-20 09:13:37
|
reading up a bit on human perception
|
|
2022-05-20 09:13:42
|
> Peak cone density varies highly between individuals, such that peak values below 100,000 cones/mm2 and above 324,000 cones/mm2 are not uncommon
|
|
2022-05-20 09:14:08
|
I didn't know that "eye megapixels" are that variable between humans
|
|
2022-05-20 09:14:20
|
i mean at the level of cone count
|
|
2022-05-20 09:14:41
|
of course people have all kinds of lens issues too, but that's something else
|
|
|
|
Deleted User
|
2022-05-20 09:16:24
|
but XYB is fixed in the spec?
|
|
|
_wb_
|
2022-05-20 09:24:10
|
XYB is fixed but 1) non-default matrix coefficients can be signaled by the encoder to make it effectively use variants of the default XYB, and 2) an encoder could make decisions differently, like e.g. what adaptive quantization weight to use in dark regions
|
|
|
Traneptora
|
2022-05-20 03:22:26
|
that's what the Opsin Inverse Matrix is, right?
|
|
|
_wb_
|
|
Kleis Auke
|
2022-05-21 11:15:59
|
I think issue <https://github.com/libjxl/libjxl/issues/1432> should probably be closed. That user is deliberately wasting time of maintainers and contributors by involving them in long, contrived and sometimes nonsensical discussions about somewhat trivial but technically valid points, see: <https://github.com/obsproject/obs-studio/issues/4520#issuecomment-819923534>.
|
|
|
Traneptora
|
2022-05-21 11:54:44
|
ugh, we got ValZapod too
|
|
2022-05-21 11:55:06
|
he got banned from the mpv bug tracker
|
|
|
|
veluca
|
2022-05-21 11:55:36
|
seems like someone that feels like being spammy
|
|
|
Traneptora
|
2022-05-21 11:56:08
|
oh, you were referring to Elfring
|
|
|
|
veluca
|
|
Traneptora
|
2022-05-21 11:57:36
|
we haven't been hit by him yet at mpv
|
|
|
lithium
|
2022-05-21 02:02:34
|
> https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=74395&viewfull=1#post74395
> But in general I think rasterization should just be avoided as much as possible for this type of image content,
> just like I think the text on a website should be rendered using html and fonts,
> not raster images. Of course there will be circumstances / use cases when rasterization cannot be avoided
> (e.g. when scanning printed versions of such images), ...
I think only some specific anime type suitable svg,
structure complex anime type(like 2d drawing, manga content),
for those type image, I think the best method is flexible use libjxl features and bitstream,
combine VarDCT, Modular patches, Modular delta palette(XYB implement) in same image.
av1 codec use blurry process(prediction) avoid some artifacts,
I believe jxl can use better method to process those issue. π
|
|
|
_wb_
|
|
lithium
> https://encode.su/threads/3397-JPEG-XL-vs-AVIF?p=74395&viewfull=1#post74395
> But in general I think rasterization should just be avoided as much as possible for this type of image content,
> just like I think the text on a website should be rendered using html and fonts,
> not raster images. Of course there will be circumstances / use cases when rasterization cannot be avoided
> (e.g. when scanning printed versions of such images), ...
I think only some specific anime type suitable svg,
structure complex anime type(like 2d drawing, manga content),
for those type image, I think the best method is flexible use libjxl features and bitstream,
combine VarDCT, Modular patches, Modular delta palette(XYB implement) in same image.
av1 codec use blurry process(prediction) avoid some artifacts,
I believe jxl can use better method to process those issue. π
|
|
2022-05-21 03:19:31
|
Agreed, and of course svg can only be used if the artist used a vector editor in the first place, like Adobe Illustrator
|
|
|
DZgas Π
|
2022-05-22 09:58:11
|
is everything all right here?
|
|
|
yurume
|
2022-05-23 04:23:57
|
today in jxsml: I've implemented most predictors and properties (sans self-correcting ones), and realized that fjxl-encoded images somehow uses alpha channels even though the input image doesn't have ones and I'm yet to implement extra channels
|
|
2022-05-23 04:39:25
|
I'm not sure my observation is entirely correct (the image I tested was indexed, maybe that's why) but I think there is no real performance impact as there is nothing to compress anyway
|
|
2022-05-23 04:40:25
|
well actually, I didn't exactly look at the bit contents of the original PNG file
|
|
2022-05-23 04:42:57
|
uh, so they were not indexed, they were just 8bpp RGB (I misinterpreted an ImageMagick output)
|
|
2022-05-23 04:43:50
|
and that's strange, fjxl apparently detects alpha by counting the number of channels, which should be 3 in this case and should not cause alpha channels but apparently outputs do have them
|
|
2022-05-23 04:46:13
|
ah crap
|
|
2022-05-23 04:46:44
|
fjxl correctly handles PAM, but it always assumes RGBA for PNG
|
|
2022-05-23 04:49:08
|
I guess lodepng (that fjxl uses) actually has no way to determine the input bpp & channel configurations?
|
|
2022-05-23 04:49:29
|
as it was meant to be an one-shot decoder that the caller knows what to want
|
|
2022-05-23 04:50:13
|
for now I'm just going to patch fjxl to avoid alpha channels and proceed
|
|
|
_wb_
|
2022-05-23 05:11:17
|
fjxl assumes rgba input, yes. We never bothered to also do rgb and gray only - in compression, it doesn't cost much at all in jxl to have channels that are all-zeroes...
|
|
|
yurume
|
2022-05-23 05:23:17
|
It does have to check if the alpha channel indeed has nothing to compress, I believe Kotono meant this
|
|
|
_wb_
|
2022-05-23 05:33:56
|
We could add ppm (rgb) input to fjxl so there's nothing to check, I guess...
|
|
2022-05-23 05:36:02
|
Just practical to use rgba buffers because 4 is a nicer number than 3 if you try to do things in chunks of 16
|
|
|
|
veluca
|
|
yurume
I guess lodepng (that fjxl uses) actually has no way to determine the input bpp & channel configurations?
|
|
2022-05-23 08:31:13
|
it does, but it doesn't really have a *convenient* way to do it last I checked
|
|
|
lithium
|
2022-05-23 07:41:02
|
A little curious, what's roadmap for libjxl delta palette improvement?
I read some delta palette comment from Jyrki Alakuijala,
(webp near-lossless limitation, and some delta palette good point),
I think delta palette probably can bring more density and quality improve for PR1395 more patches.
> https://github.com/libjxl/libjxl/pull/1395
> One of the best-case behaviors is when the image is really a 1-bit image (or close to it) with only hard lines.
> In that case the heuristic will just encode the whole frame as one big modular patch
> and obtain way better compression and quality than what vardct can do on such images.
I really like this behavior, I think this behavior can avoid apply DCT for some not suitable DCT features,
and can increase density and quality.
|
|
|
|
paperboyo
|
2022-05-23 08:10:36
|
Hiya. Are there newer versions of the codecs somewhere?
https://storage.googleapis.com/demos.webmproject.org/webp/cmp/index.html
Or is there a reason they are not updated any more?
|
|
|
Fox Wizard
|
2022-05-23 08:23:36
|
Yes, there are much newer versions
|
|
2022-05-23 08:24:35
|
https://artifacts.lucaversari.it/libjxl/libjxl/ for jxl (note that if you're on Windows most if not all of the builds of last few months are broken for lossy transcoding)
|
|
2022-05-23 08:31:08
|
Oh yay, seems like they might actually work now <:thinkies:854271204411572236>
|
|
|
|
paperboyo
|
|
Fox Wizard
Yes, there are much newer versions
|
|
2022-05-23 08:43:55
|
Thanks bunch! I was actually being my usual lazy-canβt-code and mant the nice comparison thingies.
|
|
|
yurume
|
2022-05-24 06:26:53
|
https://github.com/libsdl-org/SDL_image/commit/092cdc9 haha
|
|
|
_wb_
|
2022-05-24 06:44:41
|
(Root mean) square error (i.e. basically the same thing as PSNR) is not very useful as a perceptual metric, so the jxl encoder is not trying at all to optimize for that (e.g. quantizing in XYB will introduce pretty large error in sRGB space, in particular in high freq blue, but since humans basically have no S cones in the fovea, high freq blue is not visually important)
|
|
2022-05-24 06:47:08
|
Other encoders end up basically optimizing for PSNR, which makes them look very good on PSNR plots (and other metrics like VMAF that are not very different from PSNR), but not when you actually look at the images.
|
|
2022-05-24 06:48:26
|
I have seen cases where the simple metrics say jpeg 2000 and heic are great, then webp, then avif, then jpeg, and jxl is the worst of all.
|
|
2022-05-24 06:50:07
|
Then you do a subjective evaluation on the same image, and the results are almost exactly the opposite, e.g. jxl is best, then avif, then heic, then webp and jpeg, then jpeg 2000, or something like that.
|
|
|
Traneptora
|
2022-05-24 06:50:56
|
legacy jpeg beats jpeg2000? that's interesting
|
|
|
_wb_
|
2022-05-24 06:55:48
|
Well not in general
|
|
2022-05-24 06:56:20
|
But mozjpeg can certainly be better than openj2k
|
|
2022-05-24 06:57:04
|
Or than kakadu configured non-optimally
|
|
|
monad
|
2022-05-24 08:28:55
|
Somehow I missed SDL incorporating JXL. <:PepeOK:805388754545934396>
|
|
|
yurume
|
2022-05-24 08:40:53
|
first ever partial image from jxsml (not yet transformed)
|
|
2022-05-24 08:41:51
|
(an fjxl-compressed version of https://upload.wikimedia.org/wikipedia/commons/c/ce/PNG_demo_Banana.png)
|
|
2022-05-24 08:43:55
|
it took me an eon to map out the general code path (how to manage all the data structure and whatnot), and I think there are some edge cases as well
|
|
|
_wb_
|
2022-05-24 09:03:55
|
I suppose you're not doing inverse YCoCg yet, or what are we seeing here?
|
|
2022-05-24 09:04:24
|
And I guess this is just the first group?
|
|
2022-05-24 09:06:22
|
Major milestone though, first pixels being spit out by a non-libjxl jxl decoder!
|
|
|
yurume
|
|
_wb_
I suppose you're not doing inverse YCoCg yet, or what are we seeing here?
|
|
2022-05-25 12:52:02
|
yes, no YCoCg yet, because this was a quick check (I wrote a big chunk of code and it somehow worked fine, so I wanted to see the actual pixels!)
|
|
|
w
|
2022-05-25 01:20:04
|
banana
|
|
2022-05-25 03:00:08
|
here have a spline banana
|
|
|
|
embed
|
2022-05-25 03:00:14
|
https://embed.moe/https://cdn.discordapp.com/attachments/794206087879852106/978854959124709477/banana.jxl
|
|
|
_wb_
|
2022-05-25 05:02:30
|
Lol that has an interesting look
|
|
|
improver
|
2022-05-25 01:20:47
|
is it from some sort of raster to svg vectorizer
|
|
|
yurume
|
2022-05-26 07:39:35
|
yeah, I've got the banana.jxl fully decoded and matching with the original
|
|
2022-05-26 07:40:32
|
jxsml currently prints an uncompressed PNG file in the fixed location, with a lot of assumptions, but at least this is working (for a very small set of fjxl-encoded files of course)
|
|
2022-05-26 07:40:58
|
time to revisit extra channels
|
|
|
_wb_
|
2022-05-26 08:08:56
|
Yay, first image fully decoded with a non-libjxl codec!
|
|
2022-05-26 08:09:11
|
https://c.tenor.com/v4FpeS4fxBUAAAAM/celebration-celebrate.gif
|
|
|
yurume
|
2022-05-26 08:09:34
|
at this point jxsml weighs 2500 lines of code π
|
|
|
_wb_
|
2022-05-26 08:09:57
|
Now of course there's a lot of stuff that still needs to be implemented, but you can add one thing at a time
|
|
2022-05-26 08:12:32
|
Doing the rest of modular shouldn't be that much extra work, it's mainly getting extra chans right, unsqueeze and palette. The channel list changes they introduce may be a bit funky though. Oh and the self-correcting predictor will also be a bit of a pain.
|
|
2022-05-26 08:12:48
|
And then the vardct fun can begin :)
|
|