JPEG XL

Info

rules 57
github 35276
reddit 647

JPEG XL

tools 4225
website 1655
adoption 20712
image-compression-forum 0

General chat

welcome 3810
introduce-yourself 291
color 1414
photography 3435
other-codecs 23765
on-topic 24923
off-topic 22701

Voice Channels

General 2147

Archived

bot-spam 4380

jxl-art

surma
2021-03-30 04:59:04
I’d gzip the code first, but `CompressionStream` isn’t supported everywhere
2021-03-30 04:59:10
but maybe I can find a polyfill 🤔
2021-03-30 04:59:39
<@!424295816929345538> Almost Piet-like!
rgba
2021-03-30 05:03:21
Rule 110
Lastrosade
2021-03-30 05:03:48
ooh nice
rgba
2021-03-30 05:04:29
I've implemented https://en.wikipedia.org/wiki/Rule_110. This proves that JXL would be Turing-complete without the 1024x1024 limit.
2021-03-30 05:05:58
Source code: https://www.pouet.net/topic.php?post=568703. You can modify it to implement any elementary cellular automation.
2021-03-30 05:07:11
<@!228116142185512960> Thanks for making the playground!
HellMood
rgba I've implemented https://en.wikipedia.org/wiki/Rule_110. This proves that JXL would be Turing-complete without the 1024x1024 limit.
2021-03-30 05:07:48
Awesome! I was about to do that actually. Good that i waited 😄
surma
2021-03-30 05:07:50
<@722852650655154287> nice!! I wanted to look into cellular automata but you were faster :D
rgba
2021-03-30 05:08:27
Hehe
2021-03-30 05:08:36
Thanks!
surma
2021-03-30 05:08:51
<@179701849576833024> <@794205442175402004> in an image with multiple regions, can the predictor cross group boundaries? Like can `N` get the value of a pixel in the group above?
rgba
2021-03-30 05:09:05
It would be really nice if the playground understood comments
2021-03-30 05:10:16
Here is the source code to my Rule 110. ``` > cat rule-110.txt if y > 0 if N > 0 if NW-N > -1 ; N = 1 if N-NE > 0 ; NW = 1 - Set 1 ; NE = 0 - Set 0 ; NE = 1 - Set 1 ; NW = 1, NE = 0/1 if NW-N > 0 ; N = 0 if N-NE > -1 ; NW = 1 - Set 0 ; NE = 0 - Set 1 ; NE = 1 if N-NE > -1 ; NW = 0 - Set 0 ; NE = 0 - Set 1 ; NE = 1 if x > 1022 - Set 255 - Set 0 > cat Makefile rule-110: rule-110.txt sed 's|\s*;.*$$||;s|t 1|t 255|;s|-1|-255|' $< > $@ ```
2021-03-30 05:12:50
Because it was too difficult to keep track of cell states in my head, I wrote them down as comments and put a sed command in a Makefile to remove the comments
HellMood
2021-03-30 05:13:39
Would there be a systematic way to "cleanly" plot the sierpinski aka rule30? It's not that clear for me 😛 Edit: Rule90 rather!
rgba
2021-03-30 05:15:54
You can take the cell configurations from https://mathworld.wolfram.com/Rule90.html and change Set 0/1 in the source code to match them
2021-03-30 05:16:35
You'd need to shift the starting pixel to the center, too
veluca
surma <@179701849576833024> <@794205442175402004> in an image with multiple regions, can the predictor cross group boundaries? Like can `N` get the value of a pixel in the group above?
2021-03-30 05:19:16
nope, you can't do parallel or cropped decoding otherwise
rgba Because it was too difficult to keep track of cell states in my head, I wrote them down as comments and put a sed command in a Makefile to remove the comments
2021-03-30 05:19:48
I didn't bother with comments in the C++ parser, too complicated 😛 it might be done in JS though...
rgba
2021-03-30 05:21:26
Rule 90
2021-03-30 05:21:35
https://jxl-art.surma.technology/?code=aWYgeSA%2BIDAKICBpZiBOID4gMAogICAgaWYgTlctTiA%2BIC0yNTUKICAgICAgaWYgTi1ORSA%2BIDAKICAgICAgICAtIFNldCAyNTUKICAgICAgICAtIFNldCAwCiAgICAgIGlmIE4tTkUgPiAwCiAgICAgICAgLSBTZXQgMAogICAgICAgIC0gU2V0IDI1NQogICAgaWYgTlctTiA%2BIDAKICAgICAgaWYgTi1ORSA%2BIC0yNTUKICAgICAgICAtIFNldCAyNTUKICAgICAgICAtIFNldCAwCiAgICAgIGlmIE4tTkUgPiAtMjU1CiAgICAgICAgLSBTZXQgMAogICAgICAgIC0gU2V0IDI1NQogIGlmIHggPiA1MTEKICAgIC0gU2V0IDI1NQogICAgLSBTZXQgMAo%3D
HellMood
2021-03-30 05:22:38
you're too fast, and i have to do some RL work at the same time 😛 good to have you! 🙂
2021-03-30 05:23:08
Would be the smallest *clean* sierpinski? i guess not, since this is general purpose, right?
surma
veluca nope, you can't do parallel or cropped decoding otherwise
2021-03-30 05:25:52
Oh of course. Duh
veluca I didn't bother with comments in the C++ parser, too complicated 😛 it might be done in JS though...
2021-03-30 05:26:00
We should totally add comments
2021-03-30 05:27:15
<@179701849576833024> i was actually thinking about adding a special first line like `#tile 8` which would divide the 1024x1024 into 64 squares
rgba
HellMood you're too fast, and i have to do some RL work at the same time 😛 good to have you! 🙂
2021-03-30 05:27:18
Heh. Okay, I see what you mean by "clean". I don't know, but I am pretty sure you can do better than this generic approach.
2021-03-30 05:27:54
If you get really serious about it, you can implement on optimizing compiler
veluca
2021-03-30 05:27:58
(we can only divide in squares of down to 128x128)
rgba
veluca I didn't bother with comments in the C++ parser, too complicated 😛 it might be done in JS though...
2021-03-30 05:28:33
Parsing C++ must not be too fun
veluca
2021-03-30 05:28:36
(ignore that, I can't divide)
surma
veluca (we can only divide in squares of down to 128x128)
2021-03-30 05:28:45
Oh TIL. Well it would be interesting to come up with a notation for an arbitrary dissection of a given image size.
rgba
2021-03-30 05:28:45
*in C++
HellMood
2021-03-30 05:28:59
<@!722852650655154287> well, my supertiny 10 byte thingie isn't clean either, but the variation above is clean enough 🙂 ( https://codegolf.stackexchange.com/questions/6281/draw-a-sierpinski-triangle/95479#95479 )
rgba
2021-03-30 05:29:00
Parsing C++ itself is **hell**
veluca
rgba *in C++
2021-03-30 05:29:24
there are parser generators, but this was a half-day hack so I didn't bother 😛
surma
rgba Parsing C++ must not be too fun
2021-03-30 05:29:26
The parser is actually really simple. The tokenizer is just `file_contents >> next_token` 😅
veluca
2021-03-30 05:30:03
yeah, that makes some thing like "comment until newline" a bit complex though 😛
rgba
HellMood <@!722852650655154287> well, my supertiny 10 byte thingie isn't clean either, but the variation above is clean enough 🙂 ( https://codegolf.stackexchange.com/questions/6281/draw-a-sierpinski-triangle/95479#95479 )
2021-03-30 05:32:04
Neat. Maybe you can use the connection between Sierpinski and binary addition in JXL, too.
HellMood
rgba Neat. Maybe you can use the connection between Sierpinski and binary addition in JXL, too.
2021-03-30 05:42:09
So far, i couldn't wrap my head around it. My first thought was implementing as "Rule xyz" and then look further. It's not the easiest language to directly express calculations 😄
surma
2021-03-30 05:47:58
Well you got NE, N, and NW
2021-03-30 05:48:02
and the rest is... `if` statements 😄
_wb_
2021-03-30 05:49:56
And +-offset
surma
2021-03-30 05:52:03
I just deployed a new version real quick that runs deflate on the code before generating the share URL
2021-03-30 05:52:14
So this: https://jxl-art.surma.technology/?code=aWYgYyA%2BIDEKICBpZiBOID4gMTAKICAgIGlmIFcgPiAxMAogICAgICAtIEF2Z04rTlcgLSAxCiAgICAgIC0gVyArIDEwMAogICAgLSBOICsgMTAwCiAgaWYgYyA%2BIDAKICAgIGlmIE4gPiAxMAogICAgICBpZiBXID4gMTAKICAgICAgICAtIEF2Z1crTlcgLSAxCiAgICAgICAgLSBXICsgMTAwCiAgICAgIC0gTiArIDEwMAogICAgaWYgTiA%2BIDEwCiAgICAgIGlmIFcgPiAxMAogICAgICAgIC0gQXZnTitOVyAtIDEKICAgICAgICAtIFcgKyA5OQogICAgICAtIE4gKyAxMDA%3D Becomes this, which is a lot better 😄 https://jxl-art.surma.technology/?zcode=y0xTSFawUzDk4spMU%2FADsQxArHAIS1fBsSzdT9svXEEXqEQXKKwNFAaJ%2B0FZIMUgAwzwGBBOyACi7LW0ROgCAA%3D%3D
_wb_
2021-03-30 05:54:59
Nice!
2021-03-30 05:55:52
Could also use jxl itself as a compression method, I guess :)
2021-03-30 05:56:11
You'd lose the whitespace and comments though
Scope
2021-03-30 05:57:40
At least Brotli, which is also supported in browsers
_wb_
2021-03-30 05:59:31
Or add a bit of serverside and store stuff so you only need an id. But this is good enough already, I'd say
lvandeve
2021-03-30 06:05:29
The rule 90 above is easy to change into rule 30 (mirrored) https://jxl-art.surma.technology/?code=aWYgeSA%2BIDAKICBpZiBOID4gMAogICAgaWYgTlctTiA%2BIC0yNTUKICAgICAgaWYgTi1ORSA%2BIDAKICAgICAgICAtIFNldCAyNTUKICAgICAgICAtIFNldCAwCiAgICAgIGlmIE4tTkUgPiAwCiAgICAgICAgLSBTZXQgMAogICAgICAgIC0gU2V0IDI1NQogICAgaWYgTlctTiA%2BIDAKICAgICAgaWYgTi1ORSA%2BIC0yNTUKICAgICAgICAtIFNldCAyNTUKICAgICAgICAtIFNldCAwCiAgICAgIGlmIE4tTkUgPiAtMjU1CiAgICAgICAgLSBTZXQgMAogICAgICAgIC0gU2V0IDI1NQogIGlmIHggPiA1MTEKICAgIC0gU2V0IDI1NQogICAgLSBTZXQgMAo%3D&zcode=y0xTqFSwUzDgUlDITFPwgzIhnHBdEF%2FXyNQULAQR1PVzhSsCAV2F4NQSBYQamIgB2XoQVmOaoYupiRirdXErQjUGqKUCqN7U0JAL0waYRgA%3D
surma
Scope At least Brotli, which is also supported in browsers
2021-03-30 06:06:27
The thing is, none of these compressors are exposed to JS. Just recently they started to expose gzip via CompressionStream, but that's in Chrome only.
Scope
2021-03-30 06:06:51
<:SadOrange:806131742636507177>
HellMood
2021-03-30 06:22:56
<@!228116142185512960> Is it possible, that the "zcode" generation only works, if the current URL does not already contain "code"?
surma
2021-03-30 06:26:19
Hm
2021-03-30 06:26:21
Maybe
2021-03-30 06:26:26
Not at laptop right now
2021-03-30 06:26:37
I should remove`code` when adding zcode tbh
HellMood
2021-03-30 06:26:58
It's fine for now, removing the appendix and clicking the button again is not too much of a workaround 🙂
rgba
HellMood Well, the huge Einstein one just uses "if" and "Set", and it's a reminder (for myself at least) that there is no limit, i quickly did that in python : ```python from PIL import Image im = Image.open('onestone.png') pix = im.load() s = "" dim = 256 for x in range(0,dim-1): s = s + "if x > "+ str(x*4) + "\n" for x in range(0,dim): for y in range(0,dim-1): s = s + "if y > "+ str(y*4) + "\n" for y in range(0,dim): s = s + "- Set " +str(pix[x,255-y]*255) + "\n" text_file = open("onestone.txt", "w") text_file.write(s) text_file.close()```
2021-03-30 07:12:45
I've rewritten your script to apply run-length encoding to horizontal lines of pixels. ``` #! /usr/bin/env python3 import sys from PIL import Image def main(path): im = Image.open(path) width, height = im.size if width != height: raise "Image must be square" size = width if not is_pow2(size) or size > 1024: raise f"Image size {size} is not a power of two <= 1024" zoom = 1024 // size pixels = im.load() for y in range(0, size - 1): print(f"if y > {y * zoom}") for y in range(size - 1, -1, -1): changes = [] color = pixels[0, y] prev = color for x in range(0, size): if pixels[x, y] != prev: changes.append(x) prev = pixels[x, y] for x in changes: print(f"if x > {x * zoom}") for x in changes: print(f"- Set {color}") color = 255 - color print(f"- Set {color}") def is_pow2(n): return (n & (n-1) == 0) and n != 0 if __name__ == '__main__': main(sys.argv[1]) ```
2021-03-30 07:13:50
This reduces the black & white Einstein picture to 13K
HellMood
2021-03-30 07:14:58
Impressive. I had some kind of quadtree (or just quads in general) in mind, but again, the time 😦
rgba
2021-03-30 07:15:37
I am too lazy to implement that 🙂
_wb_
2021-03-30 07:20:32
https://jxl-art.surma.technology/?zcode=y0xTqFSwUzDgUlDITFPwgzIhnHBdEF%2FXECwAEdL1c4UrAQFdoBZtFH5wagmcT6oOhKWYJsCdgW4J2MhwJDOJ1APiG5maQjxeAVRtaGBkxIUuh9AJAA%3D%3D
2021-03-30 07:20:55
Avoids big constants, makes the jxl smaller
rgba
_wb_ https://jxl-art.surma.technology/?zcode=y0xTqFSwUzDgUlDITFPwgzIhnHBdEF%2FXECwAEdL1c4UrAQFdoBZtFH5wagmcT6oOhKWYJsCdgW4J2MhwJDOJ1APiG5maQjxeAVRtaGBkxIUuh9AJAA%3D%3D
2021-03-30 07:24:55
Neat
2021-03-30 07:25:32
And you don't need to process `Set 1` into `Set 255`
HellMood
2021-03-30 07:25:40
I still wonder how we could get to the *direct* formula. Or if this thought is actually hindering progress for the CA approach.
_wb_
2021-03-30 07:38:29
https://jxl-art.surma.technology/?code=aWYgeSA%2BIDAKICBpZiBOID4gMAogICAgaWYgTlctTiA%2BIC0yNTUKICAgICAgaWYgTi1ORSA%2BIDAKICAgICAgICAtIFNldCAyNTUKICAgICAgICAtIFNldCAwCiAgICAgIGlmIE4tTkUgPiAwCiAgICAgICAgLSBTZXQgMAogICAgICAgIC0gU2V0IDI1NQogICAgaWYgTlctTiA%2BIDAKICAgICAgaWYgTi1ORSA%2BIC0yNTUKICAgICAgICAtIFNldCAyNTUKICAgICAgICAtIFNldCAwCiAgICAgIGlmIE4tTkUgPiAtMjU1CiAgICAgICAgLSBTZXQgMAogICAgICAgIC0gU2V0IDI1NQogIGlmIHggPiA1MTEKICAgIC0gU2V0IDI1NQogICAgLSBTZXQgMAo%3D&zcode=y0xTqFSwUzDgUlDITFPwgzIhnHBdEF%2FXECwAEdL1cwUKGRlAhRQUdIF6dFEFglNLFAww9KBq0VbArgNhLaYJcIegWwI2MhzJTDx6jExNsZgC1FABVG1qCFGOqhSqDAA%3D
2021-03-30 07:39:22
Can then start using other values besides 0 and 255
2021-03-30 07:39:23
And explore other automata than just the elementary ones
HellMood
_wb_ https://jxl-art.surma.technology/?zcode=y0xTqFSwUzDgUlDITFPwgzIhnHBdEF%2FXECwAEdL1c4UrAQFdoBZtFH5wagmcT6oOhKWYJsCdgW4J2MhwJDOJ1APiG5maQjxeAVRtaGBkxIUuh9AJAA%3D%3D
2021-03-30 08:32:35
From 47 to 41 bytes 🙂 https://jxl-art.surma.technology/?zcode=y0xTqFSwUzDgUlDITFPwgzIhHF0%2FVzhfQUEXKKuNxAtOLcFQq2uIRRqiIFzXD8kwsHHhSObBtBiZmkKcUgFUbWhgZMSFLgc3HAA%3D
2021-03-30 08:42:25
And down to 40 🙂 https://jxl-art.surma.technology/?zcode=U1DITFOoULBTMDQwMuJSAAJdheDUEgUjU1MgDyjnB5QzAEuAOLp%2BrnA%2BSKmfgjYSD6QRXa2uIRZpiIJwXT8kw8DGhSOZh%2BwUAA%3D%3D
2021-03-30 08:42:38
``` if x > 1022 - Set 255 if N > 0 if N-NE > 0 - N + 0 - Set 0 if N-NE > -1 - Set 0 if NW-N > 0 - NW + 0 - Set 255```
rgba
rgba I've rewritten your script to apply run-length encoding to horizontal lines of pixels. ``` #! /usr/bin/env python3 import sys from PIL import Image def main(path): im = Image.open(path) width, height = im.size if width != height: raise "Image must be square" size = width if not is_pow2(size) or size > 1024: raise f"Image size {size} is not a power of two <= 1024" zoom = 1024 // size pixels = im.load() for y in range(0, size - 1): print(f"if y > {y * zoom}") for y in range(size - 1, -1, -1): changes = [] color = pixels[0, y] prev = color for x in range(0, size): if pixels[x, y] != prev: changes.append(x) prev = pixels[x, y] for x in changes: print(f"if x > {x * zoom}") for x in changes: print(f"- Set {color}") color = 255 - color print(f"- Set {color}") def is_pow2(n): return (n & (n-1) == 0) and n != 0 if __name__ == '__main__': main(sys.argv[1]) ```
2021-03-30 08:47:16
The script now supports color. Since it is getting longer, I'm posting a Pastebin link. https://pastebin.com/Jk8gBSSn
2021-03-30 08:48:44
An example
2021-03-30 08:49:03
_wb_
2021-03-30 08:50:17
This is probably the silliest way to 'compress' images, lol
HellMood
2021-03-30 08:52:27
rgba
2021-03-30 08:52:51
Now it's just a matter of implementing a JPEG decoder in Rule 110
Scope
2021-03-30 08:59:02
Surprisingly the size with this method is not that big (but perhaps the decoding speed will be very slow), normal encoding for comparison
HellMood
2021-03-30 09:01:31
I suspect, for this pixelartsy stuff with very low colorcount and large areas, a simple subdivision scheme like mentioned above, will also have okayish results 🙂
rgba
2021-03-30 09:04:50
This is my guess, too
HellMood
2021-03-30 09:05:38
But rn i'm brainstorming about a shorter sierpinski 🧠
rgba
2021-03-30 09:11:31
39 bytes with a horizontal flip. https://jxl-art.surma.technology/?zcode=y0xTqFCwUzDkUlDITFPwAzINgEwIJ1wXxNc1BAsoKOgqBKeWQKVBPD8FbQzFMFmQiK6fK7J2mAFGpqZIIn7hcFNQbYArBgA%3D
2021-03-30 09:21:38
38 with a color inversion https://jxl-art.surma.technology/?zcode=y0xTqFCwUzDkUlDITFPwAzINgEwIJ1wXxNc1BAsoKOgqBKeWKBiZmkL5ICW6fq5wLRA1fuEK2igCIE3oZhrAjfRDUo1sAVQfAA%3D%3D
HellMood
2021-03-30 09:23:36
I wanted to reach 32 first before posting but you're pretty fast. So here is 33 🙂 https://jxl-art.surma.technology/?zcode=y0xTqFCwUzDkUlDITFPwC9f1A%2FJ0QVxkAQMwX0FBVyE4tQSNZ2RqyoUqB2UBAA%3D%3D
rgba
2021-03-30 09:25:23
Wow
HellMood
2021-03-30 09:25:42
Okay, here we go ... 32! 🥳 https://jxl-art.surma.technology/?zcode=y0xTqFCwUzDkUlDITFPwC9f1A%2FJ0QVxkAQMwX0FBVyE4tQSNZ2bMhSoFZQEA
rgba
2021-03-30 09:29:04
"Dimming the lights" like that might be a bit of a cheat If you replace `Set 63` with `Set 10`, you get 31 byte, and the triangle is still sort of visible.
2021-03-30 09:30:00
It's worth trying to achieve 32 bytes with only black & white
HellMood
2021-03-30 09:30:21
Yeah, i'm still pondering. 32 is the *smallest* category on "pouet.net" so that is definitely a milestone, but i'm not entirely happy
rgba
2021-03-30 09:31:09
It's 30 bytes with `Set 1`, but I can't see that even if I tilt my display 😛
HellMood
2021-03-30 09:34:12
Okay, but *NOW* 32 bytes and pure black white 🙂 https://jxl-art.surma.technology/?zcode=y0xTqFCwUzDgUlDITFPwC9f1A%2FJ0DYFcZAEDMF9BQVchOLUEjWdkasqFKgdlAQA%3D
rgba
2021-03-30 09:35:58
Congrats! 🎉
2021-03-30 09:38:32
So it's worth remembering that comparing a value to zero is smaller than comparing it to one
2021-03-30 09:39:02
You should post this Sierpinski in the pouet.net thread to give it some permanence
HellMood
2021-03-30 09:39:13
It may be global value compression, many zeros there
_wb_
2021-03-30 09:39:56
Note that when we sync the dev repo with the public one, and surma updates his thing, everything will likely be 4 bytes smaller
HellMood
2021-03-30 09:40:02
I'm thinking about doing a wild release 🙂 it's a fine wild production in the 32b category. and also, in a few month, it is very possibly just watchable in chrome (at least)
rgba
HellMood I'm thinking about doing a wild release 🙂 it's a fine wild production in the 32b category. and also, in a few month, it is very possibly just watchable in chrome (at least)
2021-03-30 09:41:24
Oh, that's a good idea
_wb_
2021-03-30 09:42:29
We can avoid starting an ANS stream, which costs 4 bytes of initialization, since for singleton histograms, the prefix coding and ANS do the same thing: zero bits per symbol
rgba
HellMood I'm thinking about doing a wild release 🙂 it's a fine wild production in the 32b category. and also, in a few month, it is very possibly just watchable in chrome (at least)
2021-03-30 09:44:25
How do you get pouet.net to add a new platform? They did it for PHP and mIRC scripts!
_wb_
2021-03-30 09:44:28
If you're lucky, the table of contents also becomes shorter by enough bits to save a byte, since it is padded to a byte
HellMood
rgba How do you get pouet.net to add a new platform? They did it for PHP and mIRC scripts!
2021-03-30 09:45:36
well *that* is another issue, and a hard one. Getting TIC-80 accepted was tough. And JXL is "just" an image format, so ... i wouldn't bet on it to become a category.
rgba
2021-03-30 09:47:48
Maybe if someone holds a JPEG XL compo it will seem more legit?
HellMood
2021-03-30 09:50:06
I'm not happy to be the one that casts the doubts, but amongst the sceners, i consider myself to be the open minded one when i comes to new platforms. And still i fear the admins will have none of that.
2021-03-30 09:50:49
The TIC-80 is a full fledged retro computer (but virtual) and still it was quite a fight to get it accepted.
rgba
2021-03-30 09:51:19
I see. Oh well, it's still fun, and there are catch-all categories.
2021-03-30 09:54:14
<@!436097739391107072> By the way, I loved your _Rise of Ramses_ and _Platforms_ for DOS. They inspired me to look into the demoscene again.
HellMood
2021-03-30 09:54:17
As an example, this one got the meteoriks award for "outstanding technical achievement" (it beat my nominated productions fair and square), still, it has no category attached, it is "wild" https://www.pouet.net/prod.php?which=83691
rgba <@!436097739391107072> By the way, I loved your _Rise of Ramses_ and _Platforms_ for DOS. They inspired me to look into the demoscene again.
2021-03-30 09:55:07
Oh thank you 🙂
2021-03-30 09:55:45
... so, even the mighty MatLab is *not* a demoscene platform.
rgba
2021-03-30 10:00:07
That is not just a novelty but a good intro in its own right. Impressive.
2021-03-30 10:01:01
I wonder how far I could get with https://en.wikipedia.org/wiki/Maple_(software) 🤔
HellMood
2021-03-30 10:01:26
Yeah, it felt unfair to be pitted against that mindlowing production for the award. My nominee was some perspective scroller with sound, how was i supposed to beat *that* 😄
rgba
2021-03-30 10:02:46
Clearly, you should be using MATLAB, too 😉
HellMood
2021-03-30 10:02:58
To stay on topic, flipping ( at x=y) the 32b thingie is also an option, but nothing groundbreaking ... i want to make that "extra" pixel go away, but so far, no idea : https://jxl-art.surma.technology/?zcode=y0xTqFSwUzDgUlDITFMI1%2FULB%2FJ0DYFcZAEDMF9BQVchOLUEjWdkasqFKgdlAQA%3D
rgba
2021-03-30 10:03:43
I'll see if I can do it tomorrow. G'night!
HellMood
2021-03-30 10:04:01
Good night 🌛
2021-03-30 10:22:21
Release : https://www.pouet.net/prod.php?which=88495
_wb_
2021-03-30 11:23:24
https://jxl-art.surma.technology/?zcode=y0xTCFewUzDkUlDQVXAsSw%2FX9gsHskD8zDSFZKCUAZAJkgxOLVEwMjVF4RkAAA%3D%3D
2021-03-30 11:23:45
My 32 byte entry for today
2021-03-30 11:24:10
Scope
2021-03-30 11:32:54
Also, there is a discussion going on in demoscene discord about what category JXL can be in and that it is not executable, although I would also like to see a category with a competition of image formats (assuming they're common and supported on some platform)
monad
2021-03-31 06:55:58
For an instant, I skipped an else keyword in Python.
HellMood
_wb_
2021-03-31 07:09:42
Much more beautiful than the pure sierpinski 🙂 I also thought that my 36b thingie would have been prettier, but it's too big 😄
2021-03-31 07:11:56
Anyway, i just caught up on the demoscene discord discussion. Wow. I think i can be glad that the prod hasn't been nuked from pouet as of now 🤪 The fact that there is minishadertoylike tool to create these online in something that is definitely a programming language (on the surface) helped a lot i think 🙂
2021-03-31 07:13:11
But i guess it's best to not flood pouet now with new JXL entries. That might madden the pouet gods 🧙 🧙‍♂️ 🧙‍♀️
surma
2021-03-31 09:33:41
I haven't practiced as much as y'all yet, but i do like the colors :D
2021-03-31 09:33:42
https://jxl-art.surma.technology/?zcode=y0xT8FOwUzDmUlDQVXAsS%2FfT9nMFsoyA%2FMw0hWSglAGQCecYgjkgtcGpJQpGpqZofIhiKM%2FEFAA%3D
2021-03-31 09:33:50
_wb_
2021-03-31 09:56:55
What 'compo categories' would make sense for jxl art?
2021-03-31 09:57:21
Limiting by file size is an obvious and traditional criterion.
2021-03-31 09:57:53
Using powers of two as boundaries is common.
2021-03-31 09:58:51
32 bytes are enough for some things (especially when the 4 byte saving lands)
HellMood
2021-03-31 10:01:19
That's entirely up to the competition (party) organizer. I've seen first hand now that my point of view (wild, procedural graphics) isn't widely shared (it's not globally rejected either). In the next edition of "Lovebyte", where we had a 256 pixel competition, i can totally see a JXL-Art compo. As for the upcoming "Revision", maybe Gargaj is right and they would downright reject it, but they also accept simple *videos* so maybe they would accept a real outstanding killer 256 bytes JXL art, containing stuff that's really impressive.
_wb_
2021-03-31 10:05:11
The current tool does 1024x1024 single frame images, but things could be applied to much larger images and to animations
2021-03-31 10:09:24
2021-03-31 10:10:42
2021-03-31 10:12:02
that one is 2048x2048, in groups of 256x256, not in RGB but in XYB, where Y is just a constant in every group, and X and B make a simple gradient
2021-03-31 10:12:33
I didn't hand-write the tree here though, this is just what it learned, so probably it could be more compact
2021-03-31 10:14:14
in general, doing things in XYB instead of RGB will probably make nicer effects, because you can make smoother gradients that way that evolve in perceptually nicer ways
HellMood
2021-03-31 10:19:34
I like the direction this is going. It's really beautiful already.
surma
2021-03-31 10:22:35
I'd love to augment the syntax to include larger images with smaller groups and other color spaces
_wb_
2021-03-31 10:30:21
currently jxl_from_tree is just a quick hack that produces an image using a tree, then calls the regular encoder with a hook to override tree learning and use a fixed tree instead. To get more expressive, it would be better to skip the image generation, and add a hook to the regular encoder to override looking at the image and just pretend all symbols are zeroes (or even more interestingly, they could be whatever else that lz77 can compress down to nearly nothing, e.g. some short repeating sequence)
2021-03-31 10:30:51
then we can more easily do transforms and different color spaces etc
2021-03-31 10:32:35
we do have some more urgent things to do though, like preparing for the next JPEG meeting and getting jxl support in chrome 🙂
2021-03-31 10:33:41
2021-03-31 10:33:53
most of these are still to be done, ugh
HellMood
_wb_ most of these are still to be done, ugh
2021-03-31 10:43:41
You got this. Hate to say it, but don't let art distract you too much 😉
_wb_
HellMood To stay on topic, flipping ( at x=y) the 32b thingie is also an option, but nothing groundbreaking ... i want to make that "extra" pixel go away, but so far, no idea : https://jxl-art.surma.technology/?zcode=y0xTqFSwUzDgUlDITFMI1%2FULB%2FJ0DYFcZAEDMF9BQVchOLUEjWdkasqFKgdlAQA%3D
2021-03-31 12:23:18
Interestingly, on my dev version, it does make a difference
2021-03-31 12:23:26
2021-03-31 12:23:54
that's the original jpinski
2021-03-31 12:24:04
2021-03-31 12:24:28
that's the one with W-NW
HellMood
2021-03-31 12:24:54
😮 Okay, so i guess we have a new record then 😄
_wb_
2021-03-31 12:27:18
so you are saving something with the W-NW, probably because y and W-NW have a lower index in the tree encoding than x and NW-N
HellMood
2021-03-31 12:31:01
Just by looking at these i have a feeling that *much* smaller and "better" images are possible when coding against the internal API, with all that knowledge
_wb_
2021-03-31 12:32:01
probably
2021-03-31 12:32:25
the current tool is something like commodore basic
2021-03-31 12:33:02
you could do a lot more with direct machine code
surma
2021-03-31 02:00:07
<@794205442175402004> what document are those screenshots from. Is it public?
_wb_
2021-03-31 03:02:50
That's from the spec, and no it's not public
Lastrosade
2021-03-31 03:03:23
Will it ever be ?
veluca
2021-03-31 03:39:52
well, we'll certainly try...
lithium
2021-03-31 03:48:21
maybe we need some super bad hacker leak those spec files? or some file system permission accident(chmod 777)?
_wb_
2021-03-31 03:57:19
i'm going to try to get it discussed at the next jpeg meeting
2021-03-31 03:57:28
2021-03-31 03:57:30
meanwhile
2021-03-31 03:57:39
2021-03-31 03:57:51
this gives me a weird 3D effect
2021-03-31 03:58:49
I see the red sierpinski floating in front of my screen
2021-03-31 03:58:56
anyone else seeing that?
2021-03-31 03:59:44
this was made by allowing prev-channel properties in the tree
2021-03-31 03:59:48
``` if c > 0 if Prev > 50 - Set 0 if N > 254 - Set 255 - N + 1 if y > 0 if W-NW > -1 if W-NW > 0 - Set 255 - Set 0 - Set 255 - Set 255 ```
2021-03-31 04:00:12
i'll make a MR so others can try this too
2021-03-31 04:01:56
being able to access previous channels probably adds quite a bit of expressivity
2021-03-31 04:02:03
``` if c > 0 if c > 1 if PPrevErr > 1 - Set 255 - Set 0 if Prev > 80 if Prev > 85 - Set 50 - Set 255 - Set 0 if N > 3 - AvgN+NW - 1 - Set 255 ```
2021-03-31 04:02:11
2021-03-31 04:02:19
HellMood
2021-03-31 04:07:56
Every degree of freedom is welcome 🙂 And no, i don't see the 3D effect above as strong as you 😉
_wb_
2021-03-31 04:08:44
I don't get it on the discord preview, but I do get it when I open it fullscreen
2021-03-31 04:10:01
it works for me on both my laptop and my phone, but I do need to set brightness high enough to see it
2021-03-31 04:10:35
maybe it's like those magic eye things, I never see those, but here I do see a pretty strong 3D illusion
Deleted User
_wb_
2021-03-31 04:52:17
I also see 3D, and yes, Discord preview doesn't work (so open it in a browser, you can also click to make file pixel and screen pixel match 1:1 for *really* pronounced effect)
monad
2021-03-31 05:59:45
Yep, I too tend to see that effect with red+blue. I saw it in Jon's are better, but not as pronounced as with this pattern.
Pieter
_wb_ That's from the spec, and no it's not public
2021-03-31 06:03:12
Hire someone to write a specification purely by describing the reference implementation, and then calll it ajixel ('alleged jxl') (like RC4/ARCFOUR).
veluca
2021-03-31 06:05:56
IIRC ISO has no copyright whatsoever on JPEG XL itself, just on the specification text, so you wouldn't need to do that
Pieter
2021-03-31 06:06:27
What would "copyright on JPEG XL" mean apart from copyright on the specification text?
2021-03-31 06:09:32
Ah, I see what you're saying. Sure, there is no such thing as a copyright on the ideas behind a specification, so anyone writing a document describing it without copying the actual text (and presumably without calling it JPEG/ISO/...) wouldn't be a copyright infringement, even if they did so by starting from the actual spec.
2021-03-31 06:09:35
(IANAL)
surma
2021-03-31 06:26:17
Oh god just knowing that someone has to care about details like this is giving me anxiety lol
_wb_
2021-03-31 06:26:49
I'm not sure where the boundary is, best to ask people who have more experience with it. But I do feel like taking the "meat" of the spec, stripping the ISO boilerplate, change the layout a bit, and upload it somewhere. Resisting the urge for now because I don't want to endanger the process 🙂
2021-03-31 06:28:11
https://jxl-art.surma.technology/?zcode=y0xTqFSwUzDgUlDITFPwgzIhnHBdEF%2FXECwAEdL1c4UrAQFdheDUEhS%2Bn4I2nI9dB7IKVBMQlmKaAHcG2IhwnGbg1oNFi5GpKcTjFUDVpoYQ5chScLMB
2021-03-31 06:28:25
I like how that one looks
2021-03-31 08:17:15
2021-03-31 08:17:23
``` if c > 0 if c > 1 if PPrev > 0 - Set 1 if N > 0 if N > 1 - N - 4 - Set 240 - Set 0 if PrevAbsErr > 0 - Set 150 if W > 0 - W - 1 - Set 0 if y > 0 if N > 0 if NW-N > -1 if N-NE > 0 - Set 0 - N + 0 if N-NE > 0 - N + 0 - Set 0 if NW-N > 0 if N-NE > -1 - NW + 0 - Set 0 if N-NE > -1 - N + 0 - Set 255 if x > 511 - Set 255 - Set 0 ```
2021-03-31 08:17:32
adding some shadows
2021-03-31 08:17:41
rgba
HellMood Anyway, i just caught up on the demoscene discord discussion. Wow. I think i can be glad that the prod hasn't been nuked from pouet as of now 🤪 The fact that there is minishadertoylike tool to create these online in something that is definitely a programming language (on the surface) helped a lot i think 🙂
2021-03-31 08:23:04
I definitely disagree with "anything under 64b is a waste"
HellMood
2021-03-31 08:27:08
Well that's his opinion. Or not, and he was just grumpy 😄 Either way, I love what we do, and that's what matters 🙂
_wb_
2021-03-31 08:43:52
or how about this 3D-ish sierpinski
2021-03-31 08:44:05
``` if c > 0 if PrevAbsErr > 0 - Set 255 if N > 0 - N - 3 - Set 0 if y > 0 if W-NW > -1 if W-NW > 0 - Set 0 - Set 1 - Set 0 - Set 0 ```
2021-03-31 08:44:10
quite minimalistic
2021-03-31 08:44:20
2021-03-31 08:44:44
34 bytes
2021-03-31 08:44:53
2021-03-31 08:45:22
sierpinski is drawn in the R channel using values 0 and 1, so not visible
2021-03-31 08:46:53
but then G looks for pixels in R that are different from what median(N+W-NW,N,W) would predict, and makes those bright
2021-03-31 08:47:02
fading down vertically
2021-03-31 08:48:02
and then B does the same thing, but its previous channel is G so it gets an additional lighting up when the G gradient ends
Some1NamedNate
2021-03-31 08:49:12
Will the final version of both the JXL reference codec and libjxl contain build material for Windows (x86/x64/ARM64)?
_wb_
2021-03-31 08:49:59
it already does, no?
Some1NamedNate
2021-03-31 08:50:43
Oh wait... I may have seen VS-related files in some folders
2021-03-31 08:51:22
How about modifications to its CMake system?
HellMood
_wb_ 34 bytes
2021-03-31 08:51:32
Very nice, any chance doing that in 32?
veluca
2021-03-31 08:51:40
IIRC it works on windows, at least on mingw
2021-03-31 08:52:02
and I think somebody managed to get it to compile in Visual Studio but don't quote me on that
Some1NamedNate
2021-03-31 08:52:07
Ok
2021-03-31 08:52:24
How about on gcc or clang via cygwin?
veluca
2021-03-31 08:52:44
should work in theory, if it doesn't please file bugs 🙂
Some1NamedNate
2021-03-31 08:52:46
Oh wait, JXL's repo recommends clang
_wb_
HellMood Very nice, any chance doing that in 32?
2021-03-31 08:53:13
No idea. Probably the tree encoding itself is not quite optimal yet, especially for such tiny trees.
veluca
_wb_ No idea. Probably the tree encoding itself is not quite optimal yet, especially for such tiny trees.
2021-03-31 08:53:47
I don't know if we can do much better there tbh 😛
Some1NamedNate
2021-03-31 08:54:18
On Visual Studio you can compile with clang. At least on VS 16 2019
_wb_
veluca I don't know if we can do much better there tbh 😛
2021-03-31 08:56:49
What hybriduint config is used there? Could changing it make it cheaper to use largish constants like 255 repeatedly?
veluca
2021-03-31 09:00:56
ah, it might be that we don't actually try all the options
2021-03-31 09:01:19
that would be an easy improvement (but wouldn't help that specific image)
_wb_
2021-03-31 09:04:44
Or maybe we are spending bits on histograms for a tiny tree and a uniform histogram would be cheaper in total?
2021-03-31 09:05:48
Is an ANS stream started for the tree?
2021-03-31 11:26:19
https://jxl-art.surma.technology/?zcode=y0xT8NP181OwUzDmUlDQVXAsSw%2FX9gMyDIDczDSFcKgMipwRVCA4tUTByNQUAA%3D%3D
2021-03-31 11:26:53
2021-03-31 11:29:13
Change that first 3 to a 5 and you get
2021-03-31 11:29:18
Pieter
2021-03-31 11:33:23
https://jxl-art.surma.technology/?zcode=y0xT8NP181OwUzDlUlDQVXAsSw%2FX9gMyDIDczDSFcKCMMZAJ5iQDOYZgDlSpY04OkGEEFYKqMIByUYwzRBWEaIQI6ioEp5YoGJmaAgA%3D
_wb_
2021-04-01 09:24:51
2021-04-01 09:25:49
``` if c > 0 if Prev > 127 - Set 0 if N > 250 - AvgN+NW - 40 - AvgN+NW + 2 if y > 0 if W-NW > -1 if W-NW > 0 - Set 255 - Set 0 - Set 255 - Set 255 ```
2021-04-01 09:25:58
2021-04-01 01:13:18
2021-04-01 01:14:12
```if c > 0 if PrevAbsErr > 3 - Set 255 if W > 20 - AvgW+N - 10 - Set 0 if N-NN > -1 if W > 238 - Set 238 if W > 2 if W-WW > -1 - AvgN+NE + 1 - W - 3 - Set 3 if N > 6 - AvgN+NW - 1 - Set 0 ```
2021-04-01 01:15:37
"Electric Blues and Reds"
2021-04-01 01:15:47
Deleted User
2021-04-01 01:20:40
**Daft Punk intensifies**
_wb_
2021-04-01 01:40:04
```if c > 0 if PrevAbsErr > 3 - Set 0 if W > 240 - Set 100 - AvgW+N + 6 if N-NN > 3 - AvgW+N - 0 if W > 3 - AvgW+N - 2 - Set 255 ```
2021-04-01 01:40:50
2021-04-01 01:41:11
"The Essence of Pasta"
2021-04-01 01:41:20
2021-04-01 01:41:55
```if c > 0 if PrevAbsErr > 1 - Set 0 if W > 230 - Set 100 - AvgW+N + 10 if N-NN > 5 - AvgW+N - 0 if W > 3 - AvgW+N - 2 - Set 255 ```
2021-04-01 01:42:03
fab
2021-04-01 01:48:22
good very good
_wb_
2021-04-01 01:48:30
"Synthwave meets acoustic"
2021-04-01 01:48:45
2021-04-02 08:51:22
2021-04-02 08:51:30
``` if N > 3 if PrevAbsErr > 190 - N + 0 - AvgN+NW - 2 - Set 255 ```
2021-04-02 08:51:41
"The Discovery of Color"
2021-04-02 08:51:50
2021-04-02 02:38:53
2021-04-02 02:39:34
2021-04-02 02:40:20
now things are getting funky
2021-04-02 02:41:14
bypassing modular channel encoding completely and just letting it emit zero tokens after encoding the tree works
2021-04-02 02:41:44
which simplifies jxl_from_tree and will make it easier to do more stuff
2021-04-02 03:02:29
such as making jxl art in XYB instead of RGB
2021-04-02 03:02:34
``` if c > 0 if c > 1 if x > 0 - W + 2 - Set -1000 if y > 0 - N + 2 - Set -1000 if g > 21 if g > 22 if g > 23 - Set 1500 - Set 900 - Set 500 - Set 100 ```
2021-04-02 03:02:43
2021-04-02 03:02:55
Pieter
2021-04-02 03:42:33
<@794205442175402004> What is the Prev* you started using?
_wb_
2021-04-02 03:42:52
Prev is the pixel value in the previous channel
2021-04-02 03:43:02
of the pixel you're predicting
2021-04-02 03:43:15
for R it is just always 0
2021-04-02 03:43:21
for G it is R
2021-04-02 03:43:23
for B it is G
2021-04-02 03:43:30
in the RGB case
2021-04-02 03:43:52
PPrev is the previous previous channel, so for B that would be R and for the others it is zero
2021-04-02 03:44:26
PrevErr is the difference between clamped-gradient predictor and actual value in the previous channel
Deleted User
_wb_
2021-04-02 03:48:07
Those XYB greens are so surprisingly... satisfying. Especially in the darkest places.
_wb_
2021-04-02 04:47:13
2021-04-02 04:47:20
"Transgender Sierpinski"
2021-04-02 04:47:33
2021-04-02 04:48:35
or let's just call it 'Sierpinska' ?
surma
2021-04-02 06:01:24
That one is _nice_
_wb_
2021-04-02 06:19:33
squeeze is weird
2021-04-02 06:19:38
`- Set 128`
2021-04-02 06:19:43
after doing squeeze
2021-04-02 06:19:45
results in
2021-04-02 06:19:53
2021-04-02 06:20:02
Deleted User
2021-04-02 06:20:28
What does Squeeze do?
_wb_
2021-04-02 06:21:31
Recursively downscales the image
2021-04-02 06:21:50
Turning one channel into two channels of half the size at every step
2021-04-02 06:23:28
The first new channel is a downscale (the 'squeezed' channel), the second are residuals minus a tendency
2021-04-02 06:27:16
It's a nice fractal chessboard you get when just setting everything to a nonzero value
2021-04-02 06:34:14
the single-group version of this is only 21 bytes
2021-04-02 06:34:23
2021-04-02 06:34:31
2021-04-02 06:34:51
Looks the same, due to the fractal nature of this 🙂
Scope
2021-04-02 06:41:14
I think some of this would also be good to add to this thread <https://www.pouet.net/topic.php?which=12091> to maintain interest
2021-04-02 06:46:07
I wonder what other formats can do in sizes smaller than 256 bytes (even excluding the container size)
_wb_
2021-04-02 06:49:40
Besides flif, I doubt there are other codecs that can do this kind of stuff
2021-04-02 06:49:50
But I would be happy to be proven wrong
2021-04-02 06:51:16
21 bytes for a mebipixel, that is 0.000160217285 bpp
2021-04-02 06:52:26
6241 pixels per bit
2021-04-02 06:53:59
Almost a compression ratio of 150,000 to 1
Pieter
2021-04-02 07:05:19
Next up: train a neural network to predict pixels, and then define a codec that encodes every pixel as differences with that prediction.
2021-04-02 07:05:29
0 byte files probably turn into cat pictures
Scope
2021-04-02 07:07:03
_wb_
2021-04-02 07:08:07
😂
Deleted User
2021-04-02 07:09:41
Forced progressive, no sequential to make predictions better (even for an AI it's probably easier to predict high frequencies from lower ones than to predict lower half from upper half of the image). Predictor would be something like HiFiC, but with multiple quality refinement passes for increasing resolutions.
Pieter
Forced progressive, no sequential to make predictions better (even for an AI it's probably easier to predict high frequencies from lower ones than to predict lower half from upper half of the image). Predictor would be something like HiFiC, but with multiple quality refinement passes for increasing resolutions.
2021-04-02 07:33:42
Makes sense.
Deleted User
2021-04-02 07:52:10
There were some plans to predict higher frequencies from lower ones in JPEG XL, but that was abandoned. I'm rethinking this idea... is there a way to encode low bitrate JPEG XL with HiFiC-encoded residuals (in an optional channel, in JPEG XL metadata or, if that's impossible, in a container)? That'd be fun.
2021-04-02 08:40:37
I've just tried downloading HiFiC models. storage.googleapis.com/tensorflow_compression/metagraphs/hific-[lo/mi/hi].metagraph
2021-04-02 08:42:12
693 MB for each model <:ReeCat:806087208678588437> Imagine embedding that monstrosity in encoder and decoder
_wb_
2021-04-02 08:50:57
2021-04-02 08:51:29
```if c > 2 if c > 26 if c > 28 - Set 10 if y > 0 if W-NW > -1 if W-NW > 0 - Set 100 - Set 0 - Set 100 - Set 100 - Set 0 - W + 16 ```
2021-04-02 08:51:35
in RGB, with Squeeze
2021-04-02 08:51:43
"Subpixels"
2021-04-02 08:51:53
2021-04-03 04:45:04
default delta palette
2021-04-03 04:45:09
```if y > 700 - Set -1 if x > 100 - NW + 1 if W > 31 - Set 0 - W + 1 ```
2021-04-03 04:45:19
2021-04-03 04:45:27
2021-04-03 04:46:05
no idea how to tame that beast, but it certainly gives new expressivity for jxl art
2021-04-04 12:16:55
Doing things in YCoCg is also interesting. It's cheaper than XYB because XYB requires to signal scaling multipliers while YCoCg is just an RCT
2021-04-04 12:17:09
2021-04-04 12:17:32
```if c > 1 - Set -50 if N > 0 if WGH > 0 - AvgN+NW + 1 - AvgN+NE - 1 - N + 50 ```
2021-04-04 12:17:50
"The entrance to the rainbow cave"
2021-04-04 12:18:00
2021-04-04 12:18:19
2021-04-04 12:18:50
"Lost in the rainbow cave"
2021-04-04 12:18:58
2021-04-04 12:19:12
2021-04-04 12:19:39
"The center of the rainbow cave"
2021-04-04 12:19:46
2021-04-04 12:21:46
The weighted predictor error (WGH) has a lot of potential for interesting effects
2021-04-04 12:21:59
2021-04-04 12:22:04
```if c > 1 - Set -50 if N > 0 if WGH > 0 - AvgN+NE + 1 - AvgN+NE - 1 - N + 3 ```
2021-04-04 12:22:18
like this smoke/cloud effect
2021-04-04 12:22:26
fab
2021-04-04 12:23:08
but these are done to improve modular and to test modular and demonstrate its potential?
_wb_
2021-04-04 12:23:23
I can imagine an AI codec just sampling some of that and blitting it with Patches on a sky
2021-04-04 12:23:31
these are done strictly for fun
2021-04-04 12:23:43
or for art
fab
2021-04-04 12:24:01
but what you learned on it to improve jxl 0.3.8?
2021-04-04 12:24:11
many things?
2021-04-04 12:24:23
this i was thinking
_wb_
2021-04-04 12:24:29
it is an illustration of the power of the context modeling in modular mode
2021-04-04 12:24:48
for now it is just that, a demo
2021-04-04 12:25:08
doing images like the ones above in less than 100 bytes is just very cool
2021-04-04 12:27:00
maybe at some point it will lead to encoder improvements, e.g. I could imagine using some of these very tiny images and using them as a coding tool in combination with Patches, but that will be very nontrivial
2021-04-04 12:27:40
for now it is just an exploration, a demo, and art
2021-04-04 12:33:04
2021-04-04 12:33:08
``` if c > 1 - Set -50 if N > -255 if WGH > 0 - NW + 1 - NW - 1 - N + 5 ```
2021-04-04 12:33:17
2021-04-04 12:33:49
"Shredded flame"
2021-04-04 02:42:41
OK, adding a bunch of extra things to the jxl_from_tree toy, <@!179701849576833024> please take a look at my merge request 🙂
2021-04-04 02:42:46
``` /* Modular options */ RCT 4 /* Reversible Color Transform number 4 */ Width 800 Height 1000 GroupShift 3 /* Group size: 128 << 3 */ /* Other possible flags: XYB, Squeeze */ /* MA tree */ if c > 0 if PrevAbsErr > 3 - Set 255 if W > 20 - AvgW+N - 10 - Set 0 if N-NN > -1 if W > 238 - Set 238 if W > 2 if W-WW > -1 - AvgN+NE + 1 - W - 3 - Set 3 if N > 6 - AvgN+NW - 1 - Set 0 ```
2021-04-04 02:43:07
that will be a valid input when my MR lands
2021-04-04 02:43:18
veluca
_wb_ ``` /* Modular options */ RCT 4 /* Reversible Color Transform number 4 */ Width 800 Height 1000 GroupShift 3 /* Group size: 128 << 3 */ /* Other possible flags: XYB, Squeeze */ /* MA tree */ if c > 0 if PrevAbsErr > 3 - Set 255 if W > 20 - AvgW+N - 10 - Set 0 if N-NN > -1 if W > 238 - Set 238 if W > 2 if W-WW > -1 - AvgN+NE + 1 - W - 3 - Set 3 if N > 6 - AvgN+NW - 1 - Set 0 ```
2021-04-04 02:43:22
I did that already 😛
_wb_
2021-04-04 02:43:27
2021-04-04 02:43:32
producing this
veluca
2021-04-04 02:43:48
er, looking at your MR, I mean
_wb_
veluca I did that already 😛
2021-04-04 02:43:54
you are quick 🙂
veluca
2021-04-04 02:44:27
did you get other nice results with squeeze? 😄
_wb_
2021-04-04 02:46:06
not really, haven't tried much yet though
2021-04-04 02:46:36
but it's certainly very tricky to do anything other than the fractal chessboards 🙂
2021-04-04 03:21:06
I sent a release email for that image, Fabian
2021-04-04 03:24:22
it requires manual checking by wiki commons people it seems
2021-04-04 03:24:39
I changed the image on the italian wiki page to just use the same image as on the english one
2021-04-04 03:24:53
that also solves it
2021-04-04 03:54:00
yes, <@!416586441058025472> please discuss this on <#794206170445119489>
2021-04-04 03:54:16
2021-04-04 03:54:20
```RCT 1 Width 2048 Height 1024 if c > 0 if Prev > 75 if Prev > 85 if g > 21 - Set -100 /* Second group */ - Set 50 /* First group */ - Set 255 - Set 0 if N > 0 - AvgN+NW - 1 - Set 255 ```
2021-04-04 03:55:01
just having easy RCT makes it possible to do interesting colors much easier
2021-04-04 03:55:24
also not having to worry about negative or >255 values is nice, just let decoder clamping do its thing
2021-04-04 03:55:37
2021-04-04 03:56:09
the group numbering is a bit tricky
2021-04-04 03:56:30
I have no idea why the groups have number 21 and 22 here
2021-04-04 03:58:04
I guess there are 32 AC groups here
2021-04-04 04:03:57
ah no
2021-04-04 04:04:46
it's because there are 17 quantization tables, potentially
2021-04-04 04:05:01
and then 3 dcgroup thingies
2021-04-04 04:05:18
and globalmodular
2021-04-04 04:07:31
so that makes the streamid 0 for the global modular (which would be empty here), 1+k for the k-th modular LF group (those are also empty here), and 21+n for the n-th global HF group
2021-04-04 04:08:09
or rather 18+3*nb_LFgroups+n
2021-04-04 04:08:29
for images larger than 2048x2048
2021-04-04 04:19:46
<@228116142185512960> new things are coming, it would be great if you could put it in the online tool too... 🤞
trupples
2021-04-04 04:24:03
i was wondering - things like `Set -100` aren't currently legal in the online tool, right?
2021-04-04 04:24:49
what do you use to quickly experiment with different predictors?
surma
2021-04-04 04:28:30
<@!794205442175402004> Let me know when it’s in the public repo 🙂
2021-04-04 04:30:06
<@!119417751176609792> afaiu (cc <@!179701849576833024>), `Set -100` is perfectly valid syntactically, but since the current tool only works in RGB, it doesn’t make sense. Once we have way to select different color spaces, that would also be valid semantically.
trupples
2021-04-04 04:30:26
aha
_wb_
2021-04-04 04:30:46
In 8-bit YCoCg, the range for Co and Cg is -255 to 255
2021-04-04 04:31:52
But also: in the new code, out of bounds values are allowed (the decoder will clamp them at the end anyway)
surma
2021-04-04 04:33:43
_nice_
_wb_
2021-04-04 04:34:36
And that can be useful: you can e.g. use 'blacker than black' or 'whiter than white' to let gradient loops behave differently in useful ways
2021-04-04 04:35:16
Or use it to make pixel values that have unusually large impact on e.g. an Avg predictor
surma
2021-04-04 04:36:58
What exactly is `RCT 1` vs `RCT 4`? A predefined set of reversible color transforms?
_wb_
2021-04-04 04:37:39
RCT 0 is just RGB, 1 is YCoCg
2021-04-04 04:37:46
The rest.. uh
2021-04-04 04:38:24
If you subtract 2 and divide by 7, that number determines what permutation of RGB to do
2021-04-04 04:39:28
Then the remainder determines what to do after permutation, but I would need to look it up (on my phone atm)
veluca
2021-04-04 04:43:37
nothing stopping you from (at least in theory) combining RCTs with XYB and YCbCr, btw... I have *no idea* if it makes any sense whatsoever, but you can 😄
surma <@!119417751176609792> afaiu (cc <@!179701849576833024>), `Set -100` is perfectly valid syntactically, but since the current tool only works in RGB, it doesn’t make sense. Once we have way to select different color spaces, that would also be valid semantically.
2021-04-04 04:44:16
that's correct 🙂
_wb_
2021-04-04 04:44:18
We could make a list, I suppose. It's things like R-G, G, B-G, or R, G-(R+B)/2,B-R
2021-04-04 04:44:44
Ah YCbCr, forgot about that, haven't exposed that option yet
2021-04-04 04:45:30
Combining RCTs with XYB/YCbCr could be nice for weird effects
2021-04-04 06:02:36
``` RCT 3 Width 1024 Height 512 if WGH > 0 - NW + 3 - NW - 3 ```
2021-04-04 06:02:45
2021-04-04 06:02:53
25-byte cloud
2021-04-04 06:03:02
2021-04-04 07:48:30
```RCT 1 Width 1024 Height 1024 if c > 1 if N > -255 if N > 50 - N - 1 if N-NN > 0 - N + 1 - N - 1 - N + 1 if y > 0 if x > 0 if WGH > 0 - AvgN+NW + 3 - AvgN+NW - 3 if N > 0 - N - 1 - Set 300 if W > -10 - W - 2 - Set 300 ```
2021-04-04 07:48:42
2021-04-04 07:49:14
2021-04-04 07:50:01
change the +-3 to +-1 and you get
2021-04-04 07:50:10
Deleted User
2021-04-04 08:12:34
And now JXL art actually went *nuts*... What will we have further down the road? Damn.
_wb_
HellMood 175b, sorry if someone has done that before 😄
2021-04-04 09:19:20
``` RCT 0 Width 1024 Height 1024 GroupShift 1 if y > 127 if x > 127 - Set 0 - Set 255 if x > 127 - Set 255 - Set 0 ```
2021-04-04 09:19:32
2021-04-04 09:20:24
``` RCT 1 Width 1024 Height 1024 if y > 0 if y > 666 if WGH > 0 - NE + 1 - NE - 1 if WGH > 0 - AvgN+NW + 1 - AvgN+NW - 1 if c > 1 - Set 0 if W > -200 - W - 2 - Set 300 ```
2021-04-04 09:20:38
2021-04-04 09:20:49
improver
2021-04-04 10:27:40
these are getting more interesting
190n
2021-04-05 12:40:20
that one is my new wallpaper
2021-04-05 12:45:31
alas, until gnome supports jxl wallpapers i do need to store it as a 1.95MB PNG
_wb_
2021-04-05 07:29:42
<@!179701849576833024> is there an easy way to see distributions?
2021-04-05 07:29:52
https://twitter.com/jonsneyers/status/1378971035438055425
2021-04-05 07:31:37
trying to figure out how to do the xor pattern
Pieter
190n alas, until gnome supports jxl wallpapers i do need to store it as a 1.95MB PNG
2021-04-05 07:32:02
This is a great idea.
_wb_
2021-04-05 07:32:56
the encoder doesn't learn offsets, so the debug trees have zeroes there and the offset will be in the distribution
veluca
_wb_ <@!179701849576833024> is there an easy way to see distributions?
2021-04-05 08:40:24
what does "see distributions" mean exactly?
_wb_
2021-04-05 08:40:51
if it's a singleton, what's the value
veluca
2021-04-05 08:41:58
ah - not that I can think of
2021-04-05 08:42:17
it might be easier to put the if in the leaf stage of the tree learning...
_wb_
2021-04-05 08:43:56
``` RCT 1 if W-NW > -1 if NW-N > -1 if N > 254 if c > 1 - Set -127 - Set 0 if W > 0 - W + 1 if c > 0 - W + 3 - W + 1 - NW + 0 - Select + 1 ```
2021-04-05 08:44:06
2021-04-05 08:45:41
"Colorful XOR"
2021-04-05 08:45:50
Crixis
190n alas, until gnome supports jxl wallpapers i do need to store it as a 1.95MB PNG
2021-04-05 08:52:47
I have jxl wallpaper in gnome
2021-04-05 08:53:07
The pixbuf plugin work
190n
2021-04-05 08:55:03
ooh
_wb_
2021-04-05 09:22:46
``` RCT 1 if c > 0 if Prev > 50 if Prev > 200 if Prev > 350 if Prev > 400 - Set 0 - Set -400 - Set 0 - Set 255 - Set 100 if W-NW > -1 if NW-N > -1 if N > 510 - Set 0 - W + 1 - NW + 0 - Select + 1 ```
2021-04-05 09:22:56
2021-04-05 09:23:06
2021-04-05 09:34:20
``` RCT 3 if W-NW > -1 if NW-N > -1 if N > 511 - Set -255 - W + 1 - NW + 0 - Select + 1 ```
2021-04-05 09:34:39
2021-04-05 09:35:36
"The Queen's Exclusive Fractal"
2021-04-05 09:35:45
2021-04-05 09:36:04
add Squeeze to that, and you get
2021-04-05 09:36:16
2021-04-05 09:36:51
"Linnen Collection"
2021-04-05 09:37:03
2021-04-05 01:10:26
``` RCT 15 Height 1020 Width 1020 if c > 0 if c > 1 if y > 0 if N-NN > -1 - N - 1 - N + 0 - Set 255 if x > 0 if W-WW > -1 - W - 1 - W + 0 - Set 255 if W-NW > -1 if NW-N > -1 if N > 253 - Set 1 - W + 1 - NW + 0 - Select + 1 ```
2021-04-05 01:10:36
2021-04-05 01:11:04
"Minor Misalignment"
2021-04-05 01:11:14
surma
2021-04-05 02:46:00
I love these
_wb_
2021-04-05 03:37:41
We don't have xor in MA trees so I thought we couldn't do the xor pattern
2021-04-05 03:38:30
But then I gave a xor pattern to cjxl and with -s 9 -I 1 it did find a tree
2021-04-05 03:39:12
Turns out you don't need xor to implement the xor pattern :)
2021-04-05 06:44:14
finally found the "clean" xor pattern: https://jxl-art.surma.technology/?zcode=y0xTCNf1C1ewU9A15FLITFPwA3KhPDAXyDYyNQFyFHQVglNLFAxATJBMJVAGwgFJhStoKxhCeUDJCpySSKboAi0DygDZIMGc1OQSsDoA
2021-04-05 07:17:20
Perfecting my chessboards
2021-04-05 07:17:24
``` RCT 15 Height 2048 Width 2048 if c > 0 if g > 22 if y > 0 if N-NN > 0 - N + 0 - N + 1 - Set -255 if y > 0 if N-NN > -1 - N - 1 - N + 0 - Set 255 if W-NW > -1 if NW-N > -1 if N > 255 - Set -255 - W + 1 - NW + 0 - Select + 1 ```
2021-04-05 07:17:41
2021-04-05 07:18:33
'The Queen's Ice and Fire'
2021-04-05 07:18:46
Pieter
2021-04-05 07:22:07
trippy
_wb_
2021-04-05 07:26:32
it's 2048x2048 so four groups, because I wanted it to be a full chessboard in a nice resolution
2021-04-05 07:26:59
the black squares are mostly Y < 0, so impossible colors
2021-04-05 07:27:46
they usually clamp to black, but if the chroma is strong enough and the black not deep enough, there is some color still
2021-04-05 07:29:26
it's all impossible colors in the black squares, that you wouldn't get from doing YCoCg on a normal RGB image. Good test image to verify clamping behavior of decoders 🙂
surma
_wb_ finally found the "clean" xor pattern: https://jxl-art.surma.technology/?zcode=y0xTCNf1C1ewU9A15FLITFPwA3KhPDAXyDYyNQFyFHQVglNLFAxATJBMJVAGwgFJhStoKxhCeUDJCpySSKboAi0DygDZIMGc1OQSsDoA
2021-04-05 07:45:38
Oh Nice!
2021-04-05 07:45:50
I didn’t think that was possible with the current iteration of the playground
2021-04-05 07:46:20
I guess “Select” plays a big role here?
2021-04-05 07:46:48
Maybe we can find a better description than “predictor from lossless WebP” 😅
_wb_
2021-04-05 07:48:27
it's either N or W, depending on which is closer to N+W-NW (N if it's a tie)
Deleted User
_wb_ it's either N or W, depending on which is closer to N+W-NW (N if it's a tie)
2021-04-05 08:21:49
Something similar to PNG's Paeth, I guess?
_wb_
2021-04-05 08:22:53
Yes, but slightly simpler and better for compression
spider-mario
2021-04-05 09:10:50
does the board somehow look slanted to anyone else?
2021-04-05 09:11:06
I’m almost sure that it’s not and that it’s just an optical illusion
2021-04-05 09:11:16
but I find it hard to shake off
Pieter
2021-04-05 09:13:55
Yes, I see it too, and I think it's an illusion.
Scope
2021-04-05 09:14:36
Yep, just an illusion (and it's possible to "correct" the slant by changing the angle of view)
_wb_
2021-04-05 09:21:40
``` RCT 21 Height 1024 Width 1024 if y > 350 if WGH > 0 - AvgN+NE + 1 - AvgN+NE - 1 if W-NW > -1 if NW-N > -1 if N > 254 if c > 0 - Set -255 - Set 0 - W + 1 - NW + 0 - Select + 1 ```
2021-04-05 09:22:20
2021-04-05 09:23:15
"Evaporating Queen's Fractal"
2021-04-05 09:23:26
2021-04-05 09:24:09
I should probably orient this one upside down
Deleted User
_wb_
2021-04-05 09:25:35
*Mr. Jon, I don't feel so good...*
_wb_
2021-04-05 09:30:13
It's better oriented differently
2021-04-05 09:30:23
2021-04-05 09:30:33
Deleted User
2021-04-05 09:30:53
https://tenor.com/view/thanos-infinity-gauntlet-snap-finger-snap-gif-12502580
Scope
2021-04-05 09:36:30
https://tenor.com/view/i-dont-feel-so-good-mr-stark-avengers-infinity-war-tony-stark-spiderman-gif-15541848
2021-04-05 09:36:37
veluca
_wb_
2021-04-05 10:35:41
how did you flip it? exif?
surma
_wb_ it's either N or W, depending on which is closer to N+W-NW (N if it's a tie)
2021-04-05 11:36:55
Thanks!
Something similar to PNG's Paeth, I guess?
2021-04-05 11:37:12
TIL PNG also has a couple predictors. Interesting!