|
Traneptora
|
2022-05-17 02:10:55
|
it only makes sense to set `N >= 2` for this
|
|
|
Moritz Firsching
|
2022-05-18 02:15:22
|
Together with Junfeng He, I made a model to calculate good starting point for center first tiling and some scripts to use it together with libjxl: https://github.com/google/attention-center
Feedback welcome!
|
|
|
andentri
|
2022-06-06 01:24:57
|
Hi all.
What is the best tool right now to convert pictures with the latest JXL feature on Windows ?
|
|
|
Traneptora
|
|
andentri
Hi all.
What is the best tool right now to convert pictures with the latest JXL feature on Windows ?
|
|
2022-06-06 05:11:29
|
cjxl, the built-in tool
|
|
|
|
JendaLinda
|
2022-06-09 08:56:55
|
I've downloaded updated tools for Windows from this repository (it's linked on Wikipedia):
https://artifacts.lucaversari.it/libjxl/libjxl/latest/
Is it somehow "official"? I ran to a small problem. Some of the programs, namely jxlinfo and jxl_ng tools, require brotli dlls, but those are not included. I located some brotli dlls in the Gimp installation, so I borrowed them from there and they seem to work. At least the programs don't complain.
|
|
|
|
veluca
|
2022-06-09 11:03:20
|
... I wonder who linked that from wikipedia xD
|
|
2022-06-09 11:03:26
|
they're just the github artefacts
|
|
|
Petr
|
2022-06-10 05:17:50
|
Yup, that's me. I'm pretty sure the link is useful for people who want to try JXL after reading about it on Wikipedia. Orβ¦? π
|
|
|
|
veluca
|
2022-06-10 06:02:13
|
It might be, although I make no promises on uptime or the like :P
|
|
|
Pashi
|
2022-07-06 05:48:23
|
Veluca, cool encoders!
|
|
2022-07-06 05:48:50
|
Superfast lossless coders
|
|
|
BlueSwordM
|
2022-07-27 04:49:53
|
BTW, we never talked about it much, but some of us use a special tool to check out video quality utilizing butteraugli-jxl/ssimulacra:
https://github.com/shssoichiro/butter-video
It may be a bit slow, but it does work quite well.
|
|
|
Traneptora
|
2022-07-27 02:18:40
|
was that a sentence
|
|
|
BlueSwordM
|
|
Traneptora
was that a sentence
|
|
2022-07-27 03:28:15
|
Apparently, no.
|
|
2022-07-27 03:38:17
|
I somehow posted a garbled mess of words and did not notice.
|
|
|
Traneptora
|
2022-07-27 04:46:53
|
huh, noice
|
|
2022-07-27 04:47:04
|
~~--tune butteraugli in x264 when~~
|
|
|
BlueSwordM
|
|
Traneptora
~~--tune butteraugli in x264 when~~
|
|
2022-07-27 05:32:26
|
That would actually be a good, but very heavy compute replacement for the hand made psy metric used lmao.
|
|
|
Traneptora
|
2022-07-27 05:47:59
|
right, butteraugli is slow
|
|
2022-07-27 05:48:08
|
so it would make more sense to use XYB-MSSIM or something
|
|
|
BlueSwordM
|
2022-07-27 06:01:51
|
Yes. It would be better to use SSIMULACRA2.
|
|
2022-07-27 06:02:08
|
In fact, it would be great if butteraugli_jxl and ssimulacra1/2 became available in ffmpeg π³
|
|
|
Traneptora
|
2022-07-27 06:59:59
|
like, as a video filter that took two inputs and outputted frame metadata?
|
|
2022-07-27 07:00:07
|
I'm not entirely sure how useful that would be, to be honest
|
|
2022-07-27 07:00:33
|
ideally XYB would be added as a pixel format first
|
|
2022-07-27 07:01:04
|
(that way, the JXL decoder that lynne is writing will just output XYB data, with a cms filter to turn it into sRGB or whatever)
|
|
|
BlueSwordM
|
|
Traneptora
like, as a video filter that took two inputs and outputted frame metadata?
|
|
2022-07-27 07:10:36
|
Yeah, like libvmaf.
You add it as a video filter that takes a reference input, and then a distorted input and outputted average scores and per frame data.
It'd be very useful to get the metrics to be much more widely used.
|
|
|
|
JendaLinda
|
2022-07-29 03:22:44
|
Is there any overview of tweaks for the best possible lossless compression? -e 9 really doesn't do the best compression. There are so many options and it's all trial and error. It would be nice to have an overview of known good combinations somewhere everyone can find it easily.
|
|
2022-07-29 03:24:02
|
I have a particular picture where jxl is struggling to compete with webp. Lossless jxl produces a bigger file than lossless webp no matter I try.
|
|
|
w
|
2022-07-29 03:24:11
|
-e 9 -E 3 -I 1
|
|
2022-07-29 03:25:01
|
15MP image took me about 40 minutes
|
|
|
|
JendaLinda
|
2022-07-29 03:29:06
|
I will try that, now I'm trying different group sizes if it has any effect.
In recent cjxl versions, the range of -I is 0...100, according to the help. Shouldn't that be 100 then?
|
|
|
w
|
2022-07-29 03:29:42
|
i dunno, i think last i heard of it, it was something like only 1 was implemented
|
|
|
|
JendaLinda
|
2022-07-29 03:37:48
|
What's interesting that lossless webp did very good job in pretty short time. Lossless AVIF on the other hand completely failed, the result was almost two times the size of the PNG.
|
|
|
w
|
2022-07-29 03:38:58
|
makes sense since I think lossless avif is the same as lossy avif
|
|
|
|
JendaLinda
|
2022-07-29 05:45:59
|
"-I 1" makes the compression actually much worse, "-I 100" improved the compression a little, another slight improvement was achieved by adding "-g 0", so the best result was made using "-d 0 -e 9 -E 3 -I 100 -g 0", but it's still far behind WebP. I also tried turn on pacthes with no effect, is there anything else I can try?
|
|
|
_wb_
|
2022-07-29 06:06:28
|
Could be that -I went from float 0..1 to int 0..100 when they switched to _ng
|
|
2022-07-29 06:07:00
|
You can try turning off patches, and -g 3 can sometimes be better
|
|
2022-07-29 06:07:21
|
Also -X 0 and/or -Y 0 can sometimes help
|
|
2022-07-29 06:07:42
|
We should add a more exhaustive -e 10, I guess
|
|
2022-07-29 06:08:50
|
But mostly we need to make -e 4 to -e 7 have better performance without losing too much compression, imo.
|
|
2022-07-29 06:09:51
|
Currently only fjxl and cjxl -e 2,3 have good speed/density trade-offs
|
|
|
|
JendaLinda
|
2022-07-30 09:57:07
|
Trying all possible combinations of settings, the resulting jxl file is still about 25% bigger than webp with default settings. The image is 10000x10000 pixel art. If anybody is interested, search for "Lenser Pixel ART"
|
|
2022-07-30 09:57:26
|
Also cjxl says
WARNING: CPU supports 1800 but software requires 2000000000000000
What does it mean?
|
|
|
yurume
|
2022-07-30 10:00:06
|
https://github.com/google/highway/issues/882 seems that it can be safely ignored
|
|
|
|
JendaLinda
|
2022-07-30 01:41:08
|
I found a suggestion to try -P 0 and that helped a lot. The jxl file is now smaller than the webp.
|
|
|
_wb_
|
2022-07-30 02:19:06
|
The current heuristic to decide whether to use palette or not is the same at the group level as on the image level: if less than N different colors are used, encode it with a palette. Default N is quite high (1024 iirc), which can lead to counterproductive use of palette
|
|
|
|
JendaLinda
|
2022-07-30 02:28:25
|
Tweaking the palette options -X and -Y didn't make much difference, the biggest improvement was achieved by setting the modular predictor to zero.
The picture consists of large areas of solid colors so I guess the zero predictor works the best for this kind of pictures.
|
|
|
_wb_
|
2022-07-30 03:33:16
|
Ah right, -P is predictor, --palette is for palette
|
|
2022-07-30 03:34:01
|
When there are few colors, zero predictor works well
|
|
|
|
JendaLinda
|
2022-07-30 04:02:22
|
The abbreviations can be sometimes confusing, P could stand for either palette, predictor or patches.
Anyway, it seems that zero predictor is equivalent to filter none in PNG. That also works very well for pictures with solid colors.
|
|
2022-07-30 06:47:54
|
Speaking of palette, increasing the number of colors in the palette helped too.
|
|
2022-07-30 06:57:14
|
Is there any maximum number of colors allowed in the palette?The picture has 7286 unique colors.
|
|
|
_wb_
|
2022-07-30 07:55:04
|
No maximum
|
|
2022-07-30 07:57:13
|
Or I guess there is some implicit maximum from the header syntax
|
|
2022-07-30 08:33:53
|
About 70.9k is the maximum number of colors in a palette
|
|
|
|
JendaLinda
|
2022-07-30 08:38:31
|
Yeah I thought about 65536 colors could be a practical maximum.
|
|
|
monad
|
|
JendaLinda
Is there any overview of tweaks for the best possible lossless compression? -e 9 really doesn't do the best compression. There are so many options and it's all trial and error. It would be nice to have an overview of known good combinations somewhere everyone can find it easily.
|
|
2022-07-31 02:14:45
|
In my experience with prior versions, `cjxl -d 0 -e 9 -E 3 -I 1 -g {2|3}` generally produced great results compared to `cwebp -z 9`. g3 tended to be favored over g2 as the number of pixels increased. The two areas where WebP was generally denser were pixel art and text. For pixel art, `cjxl -d 0 -e 9 -I 0 -P 0 -g 3 --patches 0` supplanted WebP. I never landed on a setting that generally supplanted WebP on text, WebP is just really good with highly repetitive content. (Per discussion, I1 should be I100 in latest cjxl.)
|
|
|
w
|
2022-07-31 02:17:37
|
yeah can all these be put into something like cjxl -best
|
|
|
|
JendaLinda
|
2022-07-31 08:16:03
|
In this particular case, to achieve the highest compression, I ended up turning off all the fancy features and used just old plain indexed color.
-d 0 -e 9 -P 0 -I 0 -g 3 --patches=0 --modular_palette_colors=8000
|
|
|
_wb_
|
2022-07-31 09:22:38
|
The -e 9 -I 0 makes it use lz77, which is indeed probably a good idea in those cases where beating webp is hard.
|
|
|
|
JendaLinda
|
2022-07-31 02:23:48
|
I've noticed that the format of JXL files transcoded from JPEG has slightly changed at some point and djxl v0.6.1 is unable to decode those newer files.
|
|
|
_wb_
|
2022-07-31 02:38:47
|
That's not good - can you open an issue about it?
|
|
2022-07-31 02:41:40
|
Modulo bugs, djxl is supposed to decode all valid codestreams since 0.5
|
|
|
|
JendaLinda
|
2022-07-31 03:07:20
|
Yes, I can open the issue.
Looking at the files in hex editor, I see the file structure has changed. Notably the jxlc box was split into two jxlp boxes and the jbrd and Exif boxes were wedged between them. Exif data is now compressed but that's not the problem because even files without Exif won't decode.
|
|
|
_wb_
|
2022-07-31 05:51:58
|
Hm, I guess maybe that's expected then
|
|
2022-07-31 05:52:49
|
Codestream decoder was done in 0.5, but file format was still a bit in flux then
|
|
2022-07-31 05:53:49
|
So maybe not so surprising that it couldn't handle jxlp yet or had trouble with jbrd not being in the beginning
|
|
2022-07-31 05:54:15
|
File format handling was still quite ad hoc before djxl_ng
|
|
|
|
JendaLinda
|
2022-07-31 06:32:21
|
I've already opened the issue so let's see if anybody can tell what's going on.
|
|
|
_wb_
|
2022-07-31 06:34:49
|
I suppose we could add a compatibility mode to cjxl to only produce files that will decode on djxl 0.2
|
|
2022-07-31 06:36:15
|
Though tbh I don't think we already have enough integrations that will not be updated quickly after the 0.7 release to make that a necessity
|
|
|
|
JendaLinda
|
2022-07-31 06:51:34
|
If it's a limitation of the old version of djxl which is hopefully going to be replaced with a new version soon, so be it. I've tried a few programs with jxl support and they load the files just fine.
|
|
2022-07-31 06:56:01
|
The old djxl can't even decode the image to pixels.
|
|
|
_wb_
|
2022-07-31 07:31:12
|
I think the old djxl just doesn't properly implement the box format.
|
|
|
|
JendaLinda
|
2022-07-31 07:40:04
|
Adding a compatibility option would be just confusing. If it's just a problem of djxl, nobody should use old version of djxl anyway.
|
|
2022-07-31 07:41:46
|
I think the problem will be resolvad when v0.6.1 won't be the "latest release"
|
|
|
novomesk
|
2022-07-31 10:02:27
|
I have many JPG images from mobile phone. They have various orientation. I tried newest cjxl from git to covert them to JXL. When I decode them via API, orientation is wrong (images are not rotated).
|
|
|
_wb_
|
2022-08-01 05:58:55
|
Please open an issue. Possibly the new cjxl doesn't inspect the exif to set orientation correctly, that needs to be fixed then
|
|
|
|
JendaLinda
|
2022-08-01 08:15:01
|
I've noticed that different versions of JXL decoder have slightly different output when decoding lossily compressed images. There's nothing wrong about that but I've also noticed that IrfanView has exactly the same output as djxl 0.6.1 so I assume Irfanview uses libjxl 0.6.1. As Irfanview can decode newer jxl files just fine, I believe we don't need to worry about djxl being unable to decode them. The library is apparently working OK.
|
|
2022-08-02 12:08:27
|
I did some testing about this issue
https://github.com/libjxl/libjxl/issues/1657
|
|
2022-08-02 12:10:26
|
If the distance is not specified, cjxl is actually trying to compress images using VarDCT at the distance close to zero. It does so for both GIF and JPEG with -j 0.
|
|
2022-08-03 09:39:58
|
It actually adds DCT artifacts in my GIF image.
|
|
|
Moritz Firsching
|
2022-08-03 09:49:13
|
Thanks for opening the two issues about the GIF and the exif orientation!
|
|
|
novomesk
|
2022-08-04 08:02:08
|
Would it be possible to create uncompressed metadata boxes with the cjxl? Compressed metadata are small but existing support in other project is so far limited mostly to uncompressed metadata.
|
|
|
|
JendaLinda
|
2022-08-04 08:49:29
|
Adding an option is not a bad idea but Exiftool needs to be updated anyway.
|
|
|
Fennsu
|
2022-08-18 11:07:27
|
Hi, is there a way to convert .psd to .jxl and back?
|
|
2022-08-18 12:10:10
|
Is there a way to make multilayered .jxl out of separate images then?
|
|
|
_wb_
|
2022-08-18 03:06:36
|
atm you'll have to write your own encoder to do that
|
|
2022-08-18 03:07:21
|
I have a psd recompression tool that mostly works but I made it on company time and it hasn't been cleared for open sourcing yet
|
|
2022-08-18 03:07:40
|
(it uses libjxl)
|
|
|
BlueSwordM
|
2022-08-18 04:26:47
|
<@794205442175402004> So, when SSIMU2 gets merged into libjxl, do you think there could be a possibility of it getting a separate repository on Github or Gitlab?
|
|
|
_wb_
|
2022-08-18 04:30:25
|
That would probably be useful, it's just a bit annoying to extract it since it uses quite a bit of stuff from the libjxl repo: input file loading, color management, XYB conversion, highway implementations of image operations, etc
|
|
|
BlueSwordM
|
|
_wb_
That would probably be useful, it's just a bit annoying to extract it since it uses quite a bit of stuff from the libjxl repo: input file loading, color management, XYB conversion, highway implementations of image operations, etc
|
|
2022-08-19 04:37:12
|
Yeah, it would be very nice, since some other projects would prefer not having to pull in the full suite of libjxl π
|
|
|
_wb_
|
2022-08-23 12:58:28
|
<@&803357352664891472> Do we have an easy way to get (the libjxl version of) butteraugli, ssimulacra, ssimulacra2 without fetching all of the libjxl repo? I don't think we currently package those or produce compiled versions of them, do we? So the only way atm is to build them from source, for which you need to pull in the whole libjxl repo....
|
|
2022-08-23 01:02:08
|
Extracting them to a minimal separate repo is quite cumbersome since they depend on quite a few different things: image.h, image_ops.h and all that, highway, color management (lcms2 or skcms), the decoders for png/jpg/etc, and so on. You'd end up having to copy quite a lot of stuff...
|
|
2022-08-23 01:06:44
|
could we add a debian package `jxl-metrics` or something? and also include these in the build artifacts?
|
|
2022-08-23 01:13:49
|
Alternatively, I suppose we could make some kind of mini 'image library' that defines an api for basic image loading/saving in various codecs, color management (including XYB), and some image operations like convolutions.
Then we could let all the tools depend on that, which would make cjxl, djxl, benchmark_xl, butteraugli, and ssimulacra(2) have very small binary sizes.
|
|
|
Jyrki Alakuijala
|
2022-08-23 01:35:36
|
I think butteraugli and ssimulacra2 use a different xyb
|
|
2022-08-23 01:36:33
|
butteraugli uses the original version with log, tuned to my eyes %-), and everything else a simplified version with cube root tuned to the butteraugli's xyb
|
|
|
improver
|
2022-08-23 01:45:12
|
for releases id suggest inlining submodules, and deleting `.git` dirs of these
|
|
2022-08-23 01:45:40
|
so that one could fully compile the library just from a single tarball which wouldn't be too large
|
|
|
_wb_
|
|
BlueSwordM
<@794205442175402004> So, when SSIMU2 gets merged into libjxl, do you think there could be a possibility of it getting a separate repository on Github or Gitlab?
|
|
2022-08-29 02:08:21
|
https://github.com/cloudinary/ssimulacra2
|
|
2022-08-29 02:09:23
|
not particularly elegant but I just trimmed the libjxl code to remove stuff that is not needed (like encoding and decoding jxl :))
|
|
|
BlueSwordM
|
|
_wb_
https://github.com/cloudinary/ssimulacra2
|
|
2022-08-29 03:39:15
|
Nice nice, very nice π
|
|
|
|
fredomondi
|
2022-09-01 02:29:06
|
Does benchmark_xl work on windows?
|
|
|
spider-mario
|
2022-09-02 08:49:03
|
yes, but the `custom` codec does not
|
|
|
|
fredomondi
|
|
spider-mario
yes, but the `custom` codec does not
|
|
2022-09-02 10:05:09
|
Thanks! I have been trying to run it without success, I get "Illegal instruction" error message despite using sample command from the documentation. Am i missing something?
|
|
|
spider-mario
|
|
fredomondi
Thanks! I have been trying to run it without success, I get "Illegal instruction" error message despite using sample command from the documentation. Am i missing something?
|
|
2022-09-02 10:19:26
|
in our codebase, βillegal instructionβ often means a failed assertion; maybe rebuilding with `-DJXL_DEBUG_ON_ERROR=1` added to `CXXFLAGS` (or even `JXL_DEBUG_ON_ALL_ERROR`) would shed some light on what is going on
|
|
2022-09-02 10:19:36
|
or with debug symbols and then running through gdb
|
|
|
|
fredomondi
|
|
spider-mario
in our codebase, βillegal instructionβ often means a failed assertion; maybe rebuilding with `-DJXL_DEBUG_ON_ERROR=1` added to `CXXFLAGS` (or even `JXL_DEBUG_ON_ALL_ERROR`) would shed some light on what is going on
|
|
2022-09-02 10:20:18
|
Thank you very much! will try so shortly
|
|
|
_wb_
|
2022-09-02 04:34:39
|
https://github.com/libjxl/libjxl/pull/1727 that should be fun for applications that ignore icc profiles
|
|
|
diskorduser
|
2022-09-02 04:40:49
|
So, Does it decode and convert to standard sRGB and send it to image viewing apps?
|
|
|
_wb_
|
2022-09-02 04:59:49
|
No, it saves png and jpg in XYB (using an icc profile that describes XYB, so viewers should display the image correctly IF they actually do color management)
|
|
2022-09-02 05:00:30
|
E.g. discord is stupid when creating preview images, so that should be fun
|
|
2022-09-02 05:02:49
|
<@987371399867945100> could you share an example png/jpg image here?
|
|
|
|
JendaLinda
|
2022-09-02 06:35:16
|
What's the purpose of that and is it optional?
|
|
|
|
szabadka
|
2022-09-02 06:47:05
|
It is entirely optional, you have to pass the --color_space XYB_Per magic flag to trigger it.
|
|
2022-09-02 06:48:04
|
Oops, it seems that discord is indeed ignoring ICC profile (just like Imagemagic display)
|
|
|
|
veluca
|
2022-09-02 06:48:23
|
pretty amazing that π
|
|
|
|
JendaLinda
|
2022-09-02 06:48:53
|
So you will get nonsense if displayed RAW.
|
|
|
|
szabadka
|
2022-09-02 06:50:35
|
Yes, if you display it by ignoring the embedded profile, you get this greenish version.
|
|
|
|
JendaLinda
|
2022-09-02 06:50:47
|
Firefox displays nonsense as well.
|
|
|
|
veluca
|
2022-09-02 06:50:57
|
now *that* is bad
|
|
|
_wb_
|
2022-09-02 06:56:03
|
Images like that are a good stick to hit lazy devs who think color management is optional and just assuming everything is sRGB is "good enough"
|
|
|
JendaLinda
Firefox displays nonsense as well.
|
|
2022-09-02 06:57:01
|
If you open the original? The discord preview is nonsense but that's purely discord's fault
|
|
|
|
JendaLinda
|
2022-09-02 06:58:15
|
Yes I've downloaded the file. It looks OK in Chromium.
|
|
|
_wb_
|
2022-09-02 07:00:27
|
But not in firefox? That is weird, I thought firefox handled ICC profiles fine, just handles untagged images incorrectly by default iirc.
|
|
|
|
JendaLinda
|
2022-09-02 07:01:41
|
In Firefox, it looks wrong.
|
|
2022-09-02 07:13:46
|
Perhaps FF only supports RGB profiles? Just guessing.
|
|
|
|
veluca
|
2022-09-02 07:14:33
|
it might not support LUT based profiles
|
|
2022-09-02 07:15:24
|
or some such -- that XYB profile does some fairly uncommon things
|
|
|
_wb_
|
2022-09-02 07:15:44
|
my firefox (on MacOS) displays it correctly
|
|
|
|
szabadka
|
2022-09-02 07:16:28
|
I tried it on an older tablet, and it is looks wrong there too, even in the Google Photos app
|
|
|
|
JendaLinda
|
2022-09-02 07:17:28
|
Windows Photos app displays OK.
|
|
2022-09-02 07:22:04
|
Gnome Image viewer looks OK too
|
|
2022-09-02 07:22:48
|
But Firefox on Debian is wrong.
|
|
|
_wb_
|
2022-09-02 07:23:57
|
the problem with how icc profiles have been used so far (mostly only for describing sRGB, Adobe98, and DisplayP3) is that most of the profiles used in practice are not sufficiently different to make people complain when their viewer ignores them β instead they'll think it's just their display being a bit off, or the image being a bit dull or oversaturated
|
|
2022-09-02 07:24:19
|
which is annoying because it causes bugs to not get fixed
|
|
|
|
veluca
|
2022-09-02 07:27:58
|
HDR says hi π€£
|
|
|
_wb_
|
2022-09-02 07:35:13
|
yeah HDR will make things noticeable, that's for sure
|
|
2022-09-02 07:36:02
|
it reminds me a bit of the days before sRGB became the norm, when Apple was doing gamma 1.8 and the rest of the world was doing gamma 2.2
|
|
2022-09-02 07:36:09
|
that was also pretty noticeable
|
|
|
|
JendaLinda
|
2022-09-02 07:45:47
|
That reminds me that there seem to exist two variants of PFM format. If I try to encode this PFM image using cjxl, the resulting image is very dark.
http://www.pauldebevec.com/Research/HDR/PFM/
|
|
2022-09-02 07:46:10
|
The original PFM looks OK in Gimp, though.
|
|
2022-09-02 07:53:27
|
And any JXL image decoded to PFM using djxl looks too bright in Gimp.
|
|
|
_wb_
|
2022-09-02 07:59:23
|
PFM has no colorspace info, so cjxl assumes it is in linear sRGB
|
|
2022-09-02 07:59:48
|
Presumably Gimp makes a different assumption, possibly that it's nonlinear sRGB
|
|
2022-09-02 08:00:35
|
you can tell cjxl that it needs to interpret the PFM differently
|
|
|
|
JendaLinda
|
2022-09-02 08:05:52
|
OK, so that's good. I juts need to know what the values are supposed to mean.
|
|
2022-09-02 08:07:07
|
JXL uses 32 bit float internally, right? So it won't do 32 int, I suppose.
|
|
|
DuxVitae
|
|
szabadka
Oops, it seems that discord is indeed ignoring ICC profile (just like Imagemagic display)
|
|
2022-09-02 09:10:10
|
The Discord app (Android) is even weirder: The embedded preview is incorrect, but the full preview is correct.
|
|
|
username
|
2022-09-02 09:12:55
|
same thing happens on desktop
|
|
2022-09-02 09:14:12
|
it's because the embed is a lower quality image generated by discord while the full preview is the actual original image
|
|
|
Fraetor
|
2022-09-02 09:57:33
|
I find it interesting that Eye of GNOME generates a correct image, while the preview you get by pressing space (GNOME Sushi IIRC) is incorrect. They both use gdk-pixbuf.
|
|
|
_wb_
|
2022-09-02 10:08:05
|
Some viewers will give a Flash Of Non-colormanaged Image, that's also nice
|
|
|
The_Decryptor
|
2022-09-03 12:41:46
|
I think it's the v4 setting, iirc it's only enabled by default in dev builds and on macOS
|
|
|
diskorduser
|
2022-09-03 02:23:08
|
gthumb and vivaldi works fine.
|
|
2022-09-03 02:41:06
|
yes. v4 setting fixes it.
|
|
|
w
|
2022-09-03 02:49:03
|
hmm, chrome color management no longer works at all on d3d9,
it used to be that d3d9 - images working and video working, also
opengl - images working, video working
d3d11 - images working, video not working
and chrome is still slightly wrong
|
|
2022-09-03 02:50:16
|
and chrome still does not support cLUT properly, but interesting to see that it is saved in jxl
|
|
|
Kleis Auke
|
|
szabadka
It is entirely optional, you have to pass the --color_space XYB_Per magic flag to trigger it.
|
|
2022-09-05 03:25:53
|
Is this image licensed? This image caught a bug in `vipsthumbnail`'s ICC profile handling, and I would like to make a regression test for it.
|
|
|
|
szabadka
|
2022-09-05 03:56:43
|
IIRC it was publicly available somewhere at some point, but I could not find the license now, maybe <@532010383041363969> who took the image can help with that. But now that the PR that generated this image is merged, you can create such jpegs from any image you like, by first compressing it with (lossy) cjxl and then decompressing it to jpg with the --color_space XYB_Per flag. (The ICC profiles that libjxl attaches have "CC-BY-SA 3.0 Unported" licenses themselves.)
|
|
|
Jyrki Alakuijala
|
|
szabadka
It is entirely optional, you have to pass the --color_space XYB_Per magic flag to trigger it.
|
|
2022-09-05 04:16:57
|
I live in this village, just behind all the nice terrace houses π
|
|
|
Kleis Auke
Is this image licensed? This image caught a bug in `vipsthumbnail`'s ICC profile handling, and I would like to make a regression test for it.
|
|
2022-09-05 04:18:31
|
I have taken this photo and I have licensed it for CC0: https://drive.google.com/drive/folders/0B0w_eoSgaBLXY1JlYUVOMzM5VFk?resourcekey=0-NN9Ocbh5zx9bPxhGf5CDkw&usp=sharing
LICENSE.txt:
"""
I, Jyrki Alakuijala, have taken and processed the photos in this directory and license them under CC0 1.0 Universal.
https://creativecommons.org/publicdomain/zero/1.0/legalcode
"""
|
|
2022-09-05 04:21:34
|
I'll be very happy if you use my photo π
|
|
|
|
fredomondi
|
2022-09-06 01:12:05
|
What's the best tool out there to render JXL HDR images? Chrome seems to be having problems rendering FP images correctly when the JXL file embeds an ICC profile?
|
|
|
novomesk
|
|
fredomondi
What's the best tool out there to render JXL HDR images? Chrome seems to be having problems rendering FP images correctly when the JXL file embeds an ICC profile?
|
|
2022-09-06 01:16:14
|
I would try Krita.
|
|
|
spider-mario
|
|
fredomondi
What's the best tool out there to render JXL HDR images? Chrome seems to be having problems rendering FP images correctly when the JXL file embeds an ICC profile?
|
|
2022-09-07 12:55:19
|
what ICC profile is that? HDR images should not have one (ICC cannot represent HDR)
|
|
|
|
JendaLinda
|
2022-09-15 09:53:14
|
For some reason, --resampling=2 doesn't seem to work in cjxl. Other values like 4 or 8 do work. Am I missing something?
|
|
|
Moritz Firsching
|
2022-09-15 06:38:42
|
`--resampling=2` should work in principle, can you give a example file where it goes wrong? Either here or open an issue on github..
|
|
|
|
JendaLinda
|
2022-09-15 07:30:46
|
Any PNG file I try with --resampling=2 will fail with message:
Invalid flag value for --resampling: Valid values are {-1, 1, 2, 4, 8}.
|
|
|
|
Deleted User
|
2022-09-19 12:48:43
|
hey everyone
|
|
2022-09-19 12:48:56
|
just found out about jpeg xl a week ago
|
|
2022-09-19 12:49:12
|
i want to talk about microscopy images π
|
|
2022-09-19 12:49:57
|
anyone here has tested different settings for lossless / near lossless compression with cjxl?
|
|
2022-09-19 12:50:15
|
with microsocopy images i mean
|
|
2022-09-19 12:50:38
|
i want to compare notes
|
|
|
_wb_
|
2022-09-19 02:08:22
|
what kind of images do you have? plain 8-bit RGB, visual? or are we talking weird microscopes?
|
|
|
|
JendaLinda
|
|
Moritz Firsching
`--resampling=2` should work in principle, can you give a example file where it goes wrong? Either here or open an issue on github..
|
|
2022-09-19 02:32:07
|
The bug is now fixed.
|
|
|
Moritz Firsching
|
2022-09-19 02:33:11
|
Yes, I fixed it this morning and didn't remember to mention it here....
|
|
|
|
JendaLinda
|
2022-09-19 02:34:08
|
No problem. I just felt like it should be cleared out here as well.
|
|
|
|
Deleted User
|
|
_wb_
what kind of images do you have? plain 8-bit RGB, visual? or are we talking weird microscopes?
|
|
2022-09-19 02:55:35
|
its confocal microscopy but i am interested in anything that is relevant
|
|
2022-09-19 02:56:19
|
so the images have something from 1 to 4 channels 16 bit linear
|
|
2022-09-19 02:56:43
|
integer
|
|
2022-09-19 02:57:09
|
and since its all false colour no colour profiles
|
|
|
_wb_
|
2022-09-19 02:59:06
|
then maybe just start with default lossless at various speed settings
|
|
|
|
Deleted User
|
2022-09-19 02:59:16
|
yeah i tried -d 0.0
|
|
2022-09-19 02:59:22
|
which is nice
|
|
2022-09-19 02:59:43
|
but its the same compression as flif
|
|
2022-09-19 03:00:14
|
i have a few settings i tested with lots of images
|
|
2022-09-19 03:00:25
|
d 0.0 and d 0.001 among them
|
|
2022-09-19 03:00:50
|
i was wondering if there is something like a middle ground between the two when it comes to 16 bit images
|
|
2022-09-19 03:01:11
|
0.001 seems to be the lowest setting possible with near lossless
|
|
|
_wb_
|
2022-09-19 03:02:18
|
if your image is not really visual, then probably you shouldn't use the normal lossy stuff since it will convert the image to XYB and encode it perceptually
|
|
|
|
Deleted User
|
2022-09-19 03:02:45
|
i guess that is what makes this use case tricky for jxl π
|
|
2022-09-19 03:03:07
|
since all the data is outside of human perception
|
|
|
_wb_
|
2022-09-19 03:03:26
|
we don't have the option anymore in current cjxl to skip xyb but do lossy modular without assuming things about the colors
|
|
|
|
Deleted User
|
2022-09-19 03:03:27
|
or almost all of it
|
|
2022-09-19 03:03:40
|
wht is lossy modular?
|
|
2022-09-19 03:03:51
|
sry i dont know much about the codec yet
|
|
|
_wb_
|
2022-09-19 03:04:31
|
cjxl -m 1 -q 95 would do a lossy encode without using dct
|
|
2022-09-19 03:04:50
|
but it will still convert to xyb to do it in that space instead of rgb/ycocg
|
|
2022-09-19 03:06:45
|
i'm assuming you want to be able to view the image with various false colors later, so compress with similar loss in the whole range of sample values, without making assumptions about transfer curves and all that, right?
|
|
2022-09-19 03:08:11
|
`cjxl -m -c 1 -C 0 -q 95` would do that in the old cjxl as it was in 0.6.1, but we didn't bother to add that `-c` option in the current cjxl since it's a bit niche
|
|
|
|
Deleted User
|
2022-09-19 03:09:27
|
so would it make sense for me to build a separate tool for this specific type of image file?
|
|
2022-09-19 03:09:54
|
cjxl seems to be very centered around human perception
|
|
2022-09-19 03:10:13
|
and it still does an amazing job for science data
|
|
2022-09-19 03:10:21
|
but maybe there is more to gain
|
|
|
_wb_
|
2022-09-19 03:11:43
|
yeah, that could make sense
|
|
2022-09-19 03:16:01
|
vardct mode in libjxl is pretty much designed to work in XYB and to be perceptual β in principle you could also make a vardct encoder that doesn't try to be perceptual and just aims to preserve the numbers as well as possible (minimizing MSE or something), but we don't really have that atm
|
|
2022-09-19 03:16:50
|
modular mode was mostly made for lossless; when it does lossy it does it exactly in a "just preserve the numbers" way
|
|
|
|
Deleted User
|
2022-09-19 03:17:19
|
could a stack of images work better?
|
|
2022-09-19 03:17:28
|
one with a lossy image and one lossless
|
|
2022-09-19 03:17:50
|
and the lossless only contains the photon noise features
|
|
|
_wb_
|
2022-09-19 03:18:26
|
but in current cjxl, modular will be fed with XYB data instead of the original colorspace as soon as you go non-lossless β that is a good idea when aiming for perception, but not when aiming for number preservation
|
|
|
|
Deleted User
|
2022-09-19 03:18:44
|
even when only using one channel?
|
|
|
_wb_
|
2022-09-19 03:19:02
|
even then it will still adjust the transfer curve
|
|
|
|
Deleted User
|
|
_wb_
|
2022-09-19 03:19:47
|
so if your input is linear (and marked as such), it will basically allocate way more bits to the darks than to the brights
|
|
2022-09-19 03:20:25
|
one workaround I guess is to give the input as ppm and tell cjxl that it's in XYB space already
|
|
2022-09-19 03:20:35
|
no idea if that will work but it should in principle
|
|
2022-09-19 03:21:10
|
<@604964375924834314> do you have a magic command line for doing that?
|
|
2022-09-19 03:23:02
|
(of course the image will look pretty weird then and different from how normal viewers would show the ppm, which is interpreting it as sRGB, and you would have to decode it back to an XYB ppm or else it will do the inverse XYB transform on your data)
|
|
|
|
Deleted User
|
2022-09-19 03:23:25
|
decoding back is no problem
|
|
2022-09-19 03:23:55
|
this would be mostly a tech demonstrator anyway since all the software we have here does not support anything besides tiff π
|
|
2022-09-19 03:24:20
|
which is unfortunately still normal in the world of microscopy
|
|
|
spider-mario
|
|
_wb_
<@604964375924834314> do you have a magic command line for doing that?
|
|
2022-09-19 03:24:38
|
Iβm not completely sureβ―ββ―`-x color_space=XYB_Per` might do it but I havenβt tried
|
|
|
which is unfortunately still normal in the world of microscopy
|
|
2022-09-19 03:25:01
|
out of curiosity, may I ask what it is that you make confocal micrographs of?
|
|
|
|
Deleted User
|
2022-09-19 03:25:15
|
i can give you some example images if you like
|
|
2022-09-19 03:25:58
|
i can not tell you much about the content because its classified but its biological tissue
|
|
2022-09-19 03:26:12
|
one sec
|
|
2022-09-19 03:26:46
|
|
|
2022-09-19 03:27:02
|
its hard to see stuff because its not very well exposed
|
|
2022-09-19 03:27:15
|
and its 16bit
|
|
|
spider-mario
|
2022-09-19 03:27:45
|
thanks, thatβs quite interesting
|
|
2022-09-19 03:28:29
|
tev lets me view it a bit brighter, although there seems to be a bit of banding
|
|
|
|
Deleted User
|
2022-09-19 03:29:01
|
if you increase exposure to sensible levels there will be banding yeah
|
|
2022-09-19 03:29:42
|
which is another reason why tiff is so silly for this
|
|
2022-09-19 03:30:06
|
the compression is really terrible for images that only use a small dynamic range
|
|
2022-09-19 03:30:25
|
i got 12bpp
|
|
2022-09-19 03:30:48
|
1 channel 16 bit
|
|
2022-09-19 03:31:26
|
and most of it is black π’
|
|
2022-09-19 04:16:43
|
just got sent a nice article about compressing these kinds of images:
https://www.nature.com/articles/s41467-018-07390-9
|
|
|
Demez
|
2022-09-20 07:54:58
|
seems like the jpegxl encoder doesn't like having `-` characters at the start of filenames lol
|
|
|
yurume
|
2022-09-20 07:56:00
|
that's a common thing with unix-style options, use `--` or `.\-steven is looking good!.png` to work around that
|
|
|
Demez
|
2022-09-20 07:56:32
|
oh yeah i could do `.\`, forgot about that
|
|
|
username
|
2022-09-20 08:15:45
|
seems like with newer commits benchmark_xl.exe flat out doesn't work at all
|
|
2022-09-20 08:16:08
|
i've been wanting to mess around with xyb jpegs but haven't been able to due to this
|
|
2022-09-20 08:16:48
|
binaries I used are from here: https://artifacts.lucaversari.it/libjxl/libjxl/latest/
|
|
|
Demez
|
2022-09-21 03:11:25
|
same here, doesn't seem to work for me
|
|
|
Pashi
|
2022-09-25 08:16:48
|
what's the best way to play with the encoder on Windows or WSL?
|
|
2022-09-25 08:17:21
|
0.7 or newer, not old ancient crap I mean
|
|
2022-09-25 10:16:28
|
also jxl-winthumb does not seem to do anything on windows 11
|
|
2022-09-25 10:17:38
|
no thumbnails and no opening files "appears to be damaged, corrupted, or too large"
|
|
|
The_Decryptor
|
|
Pashi
what's the best way to play with the encoder on Windows or WSL?
|
|
2022-09-25 10:40:19
|
Click on the latest entry here, https://github.com/libjxl/libjxl/actions/workflows/release.yaml and then grab the "jxl-x64-windows-static" zip
|
|
|
Pashi
|
|
The_Decryptor
Click on the latest entry here, https://github.com/libjxl/libjxl/actions/workflows/release.yaml and then grab the "jxl-x64-windows-static" zip
|
|
2022-09-25 10:10:27
|
That's what I thought and that's what I was playing with so far
|
|
2022-09-25 10:11:22
|
Is there no wic codec that actually works?
|
|
|
The_Decryptor
|
2022-09-25 11:48:04
|
jxl-winthumb is the only one I know of, I'd expect it to still work (Has it's own copy of libjxl, and WIC hasn't changed)
|
|
2022-09-25 11:48:22
|
That being said, with https://github.com/saschanaz/jxl-winthumb/releases/tag/v0.1.19 I'm not seeing thumbnails in explorer either
|
|
2022-09-25 11:49:11
|
I can still open JXL files in a WIC image viewer though (The old "Windows Photo Viewer")
|
|
2022-09-26 03:20:34
|
A restart fixed it so ignore everything I said π
|
|
|
Pashi
|
2022-09-26 07:19:15
|
A restart hmm?
|
|
2022-09-26 07:19:26
|
Didn't realize I need to restart...
|
|
|
BlueSwordM
|
2022-10-02 05:51:09
|
<@794205442175402004> Suggestion for ssimulacra2 improvement: add in a low luma performance penalty.
Most encoders perform fine in high brightness situations. The situation changes a lot when brightness drops.
|
|
|
_wb_
|
2022-10-02 06:34:27
|
Do you have any examples where ssimulacra2 gets it wrong?
|
|
2022-10-02 06:35:23
|
I can basically just add more images to my tuning set
|
|
2022-10-02 06:37:56
|
It should be able to find issues in the darks quite well, since the Y of XYB should have a transfer curve that sufficiently stretches the darks
|
|
2022-10-02 06:39:18
|
(it might have a problem when applied to HDR, since it uses the cube from jxl's XYB and not the log from butteraugli's XYB, so it might see too much detail in the brights compared to what our eyes can see)
|
|
|
Traneptora
|
|
BlueSwordM
<@794205442175402004> Suggestion for ssimulacra2 improvement: add in a low luma performance penalty.
Most encoders perform fine in high brightness situations. The situation changes a lot when brightness drops.
|
|
2022-10-02 06:58:33
|
this sounds like an issue with transfer curve more than anything else
|
|
|
_wb_
|
2022-10-02 07:01:39
|
8-bit just doesn't have enough precision no matter what transfer curve you use, I think.
|
|
2022-10-02 07:03:34
|
Especially when using tv range YCbCr, which effectively turns things into ~6-bit when there is a slow gradient with non-constant chroma
|
|
2022-10-02 07:08:14
|
For an 80-nit display, 8-bit sRGB is just enough to avoid banding, but many current SDR devices do >300 nits and/or have a way darker black level than the displays from 20 years ago
|
|
2022-10-02 07:15:02
|
So you already need dithering to avoid visible banding when using the 16m colors of 8-bit RGB. When using full range 8-bit YCbCr, you have only 4m colors, when using tv range it's only 2.7m or so.
|
|
2022-10-02 07:19:47
|
Does avif use tv range or full range?
|
|
2022-10-02 07:21:54
|
~~If my math is right, tv-range 10-bit YCbCr actually only represents about 22 million different colors~~
My math was wrong, this was for 9-bit
|
|
|
Traneptora
|
2022-10-02 07:35:27
|
all YUV-based video codecs use TV range and AV1 is not an exception
|
|
|
_wb_
|
2022-10-02 08:22:06
|
8-bit RGB are 16.7m distinct colors.
8-bit tv-range YCbCr are 2.8m distinct colors.
10-bit RGB are 1073m distinct colors.
10-bit tv-range YCbCr are 178m distinct colors.
|
|
|
BlueSwordM
|
|
_wb_
Does avif use tv range or full range?
|
|
2022-10-02 02:09:59
|
In video, mostly limited range.
In Images, whatever the source has.
|
|
|
_wb_
|
2022-10-02 02:12:16
|
Ah cool, so avifenc will do full range when the source is a png?
|
|
2022-10-02 02:12:44
|
Not like webp where tv range is obligatory (unless of course you use lossless)
|
|
|
BlueSwordM
|
|
_wb_
Ah cool, so avifenc will do full range when the source is a png?
|
|
2022-10-02 03:34:30
|
Yes.
|
|
|
Traneptora
this sounds like an issue with transfer curve more than anything else
|
|
2022-10-02 03:37:10
|
Not all of it. It's also a lack of deeper psy opts in many encoders at lower luma.
But yes, wb makes a good point: in SDR, it should be fine.
|
|
|
spider-mario
|
|
Traneptora
all YUV-based video codecs use TV range and AV1 is not an exception
|
|
2022-10-02 10:21:02
|
donβt most of them support both, as long as itβs properly signalled?
|
|
|
improver
|
2022-10-02 10:36:31
|
```
--container=0|1
0 = Do not encode using container format (strip Exif/XMP/JPEG bitstream reconstruction data).1 = Force using container format
(default: use only if needed).
--jpeg_store_metadata=0|1
If --lossless_jpeg=1, store JPEG reconstruction metadata in the JPEG XL container (for lossless reconstruction of the JPEG codestream).(default: 1)
```
what's exactly the difference?
|
|
|
spider-mario
|
2022-10-02 10:41:01
|
I havenβt checked the code but my interpretation of that excerpt would be that container=0 is incompatible with jpeg_store_metadata=1
|
|
2022-10-02 10:41:22
|
and that other combinations should work
|
|
2022-10-02 10:42:23
|
with only βboth to 1β (or left to default) resulting in lossless jpeg reconstruction
|
|
|
Traneptora
|
|
improver
```
--container=0|1
0 = Do not encode using container format (strip Exif/XMP/JPEG bitstream reconstruction data).1 = Force using container format
(default: use only if needed).
--jpeg_store_metadata=0|1
If --lossless_jpeg=1, store JPEG reconstruction metadata in the JPEG XL container (for lossless reconstruction of the JPEG codestream).(default: 1)
```
what's exactly the difference?
|
|
2022-10-03 01:45:25
|
`--container` determines whether to use a raw JXL codestream, or the ISOBMFF-like container-format
|
|
2022-10-03 01:45:54
|
one thing stored in the container format is the JBRD metadata, which lets you reconstruct the original JPEG file
|
|
2022-10-03 01:46:12
|
the container stores other metadata too like Exif, and it's required for level>5 for example
|
|
|
|
JendaLinda
|
2022-10-03 07:15:55
|
--container=1 allows you to enforce using container even it's not needed, for plain JXL image with no metadata.
|
|
2022-10-03 09:39:26
|
However, setting --container=0 alone won't prevent cjxl to store JPEG reconstruction data, thus use the container.
|
|
2022-10-03 09:51:02
|
I think there should be individual options for enabling/disabling exif, xmp and jbrd.
|
|
|
improver
|
|
JendaLinda
However, setting --container=0 alone won't prevent cjxl to store JPEG reconstruction data, thus use the container.
|
|
2022-10-03 12:19:28
|
but it says in description that it'll strip. so `--container=0` should imply `--jpeg_store_metadata=0`, and `--jpeg_store_metadata=1` should imply `--container=1` incase it's jpeg being converted
|
|
2022-10-03 12:22:17
|
just kinda unsure of practical implications, which one should i use if i just wanna convert some jpegs but don't care about reconstruction data, yet i care about how they are displayed, and have experience that some exif data can actually change how some jpegs are displayed
|
|
2022-10-03 12:25:37
|
if i skip only reconstruction data, can these jpegs be converted to jpeg again, even if it ends up as a bit different representation?
|
|
2022-10-03 12:27:14
|
iirc jbrd-less reconstruction was kinda discussed before but i fotgot...
|
|
2022-10-03 12:28:40
|
i guess i'll probably avoid these flags for now until i understand implications better
|
|
|
spider-mario
|
2022-10-03 12:29:20
|
does forgoing the jbrd even save that much space to begin with?
|
|
|
improver
|
2022-10-03 12:30:16
|
i'll try running a test on my jpegs
|
|
2022-10-03 12:30:52
|
id expect it to save some but unsure if it'll be much
|
|
|
|
JendaLinda
|
2022-10-03 12:42:38
|
The size of jbrd may vary depending on the source file.
|
|
|
improver
but it says in description that it'll strip. so `--container=0` should imply `--jpeg_store_metadata=0`, and `--jpeg_store_metadata=1` should imply `--container=1` incase it's jpeg being converted
|
|
2022-10-03 12:44:31
|
Yes, that's kinda confusing.
|
|
2022-10-03 12:46:44
|
I would also expect disabling the container will disable it altogether.
|
|
|
Traneptora
|
|
spider-mario
does forgoing the jbrd even save that much space to begin with?
|
|
2022-10-03 01:24:02
|
not really
|
|
|
improver
but it says in description that it'll strip. so `--container=0` should imply `--jpeg_store_metadata=0`, and `--jpeg_store_metadata=1` should imply `--container=1` incase it's jpeg being converted
|
|
2022-10-03 01:25:17
|
I'd rather figure that `--container=0` should error out unless you explicitly set `--jpeg_store_metadata=0` to prevent accidentally stripping when you didn't intend
|
|
|
|
JendaLinda
|
2022-10-03 04:48:58
|
What is the purpose of --already_downsampled flag in cjxl and how to use it? Do I understand correctly that the picture would be enlarged by the factor of --resamplig=X when decoded?
|
|
|
_wb_
|
2022-10-03 05:00:37
|
Yes
|
|
2022-10-03 05:04:12
|
It's useful if you want to make a 2x image but you don't have a higher res source image. The jxl upsampler should be a bit nicer than most other upsamplers, and this way you don't pay for pixels you don't have anyway
|
|
|
improver
just kinda unsure of practical implications, which one should i use if i just wanna convert some jpegs but don't care about reconstruction data, yet i care about how they are displayed, and have experience that some exif data can actually change how some jpegs are displayed
|
|
2022-10-03 05:05:22
|
Exif orientation should get copied into the jxl codestream so you don't need explicit Exif for it.
|
|
|
improver
if i skip only reconstruction data, can these jpegs be converted to jpeg again, even if it ends up as a bit different representation?
|
|
2022-10-03 05:07:56
|
Theoretically yes, you could produce some kind of canonical jpeg bitstream if you know it's a recompressed jpeg (part of the role of the jbrd box is to signal that the data is an ex-jpeg)
|
|
|
|
JendaLinda
|
|
_wb_
It's useful if you want to make a 2x image but you don't have a higher res source image. The jxl upsampler should be a bit nicer than most other upsamplers, and this way you don't pay for pixels you don't have anyway
|
|
2022-10-03 05:15:45
|
I can't figure out how to make it work. My attempts are failing with error.
|
|
2022-10-03 05:16:28
|
I used --resampling=2 --already_downsampled
|
|
|
improver
|
|
improver
i'll try running a test on my jpegs
|
|
2022-10-03 05:52:14
|
it's still running >_<
|
|
|
|
JendaLinda
|
2022-10-04 05:08:24
|
I let encoding bunch of images run overnight.
|
|
|
JendaLinda
I can't figure out how to make it work. My attempts are failing with error.
|
|
2022-10-04 05:08:53
|
Any suggestion what I'm doing wrong?
|
|
|
The_Decryptor
|
2022-10-04 05:17:48
|
Doesn't seem to work for me either, I thought it might need a `--resampling` value supplied too, but no luck
|
|
|
_wb_
|
2022-10-04 07:41:57
|
Could be just broken in the new cjxl, maybe open an issue
|
|
|
|
JendaLinda
|
2022-10-04 08:27:51
|
I thought that might be a bug. I will open the issue.
|
|
2022-10-04 08:30:16
|
Anyway. There are many ways to upscale an image. What algorithm is JXL using and it there a way to choose a different one?
|
|
|
_wb_
|
2022-10-04 10:38:44
|
it's using a nonseparable filter, the weights can be signalled but atm we just always use the default ones
|
|
|
|
JendaLinda
|
2022-10-04 10:53:14
|
Would it be possible to set the filter weights so it will just duplicate the pixels? In some kinds of pictures, especially pixel graphics, it's desirable the picture is displayed with doubled pixels.
|
|
|
_wb_
|
2022-10-04 11:09:25
|
Yes, that should be possible, that's just setting the weights to all zeroes except the nearest neighbor
|
|
2022-10-04 11:12:15
|
however we haven't exposed a way yet in the encode api to set custom upsampling weights, so we'll need to do that first
|
|
|
improver
|
2022-10-04 12:39:10
|
>script is done
>it had a bug so didn't count stuff right
epic
|
|
2022-10-04 12:45:50
|
discovered some jpegs that didn't convert right though
|
|
2022-10-04 12:47:09
|
most of these are actually failed downloads with html inside lol
|
|
2022-10-04 12:47:16
|
one cymk
|
|
2022-10-04 12:47:22
|
one normal-looking jpeg though
|
|
2022-10-04 12:59:17
|
cjxl's error reporting is pretty awful tbh
|
|
2022-10-04 12:59:28
|
```
% cjxl -v -v Downloads/failed/v4esrgb.jpg v4esrgb.jxl
JPEG XL encoder v0.7.0 f95da131 [AVX2,SSE4,SSSE3,Unknown]
Read JPEG image with 27972 bytes.
Encoding [Container | JPEG, lossless transcode, effort: 7 | JPEG reconstruction data],
Note: Implicit-default for JPEG is lossless-transcoding. To silence this message, set --lossless_jpeg=(1|0).
JxlEncoderAddJPEGFrame() failed.
```
|
|
|
Traneptora
|
2022-10-04 01:00:13
|
it definitely could use some work
|
|
2022-10-04 01:00:20
|
like an error string of "why" it failed
|
|
|
|
JendaLinda
|
2022-10-04 01:02:22
|
Part of my workflow is passing all jpegs through lossless JPEG transformations in IrfanView - autorotate and optimize. There's also an option to remove unneeded metadata. All jpegs written by IrfanView worked alright in cjxl so far.
|
|
|
improver
|
2022-10-04 01:05:50
|
|
|
2022-10-04 01:06:09
|
looks kinda like a test image for something yet i can't exactly see what can be wrong with it
|
|
2022-10-04 01:06:30
|
running thru `jpegtran -copy all` doesn't help
|
|
2022-10-04 01:06:38
|
i'll fill a bug report
|
|
2022-10-04 01:07:10
|
seems like could have something to do with weird profiles
|
|
|
|
JendaLinda
|
2022-10-04 01:11:57
|
Yeah, IrfanView didn't help this time either. It works if I strip metadata but then the colors are washed out.
|
|
|
improver
|
2022-10-04 01:19:29
|
reported <https://github.com/libjxl/libjxl/issues/1810>
|
|
|
|
JendaLinda
|
2022-10-04 01:26:31
|
Have you tried Gimp? It identifies the color profile but colors are wrong after loading the image.
|
|
|
improver
|
2022-10-04 01:27:19
|
it's a bit weird jpeg no doubt
|
|
2022-10-04 01:28:37
|
https://www.color.org/version4html.xalter something something probably this
|
|
|
spider-mario
|
2022-10-04 01:29:44
|
> e-sRGB is an early, primitive and basically failed attempt at a wide gamut specification. It is long obsolete and today we use AdobeRGB or ProPhoto.
|
|
2022-10-04 01:29:45
|
harsh
|
|
|
improver
|
|
JendaLinda
Have you tried Gimp? It identifies the color profile but colors are wrong after loading the image.
|
|
2022-10-04 01:37:24
|
apparently depends on rendering intent
|
|
|
|
JendaLinda
|
2022-10-04 01:38:31
|
The image just looks like loaded without any profile applied.
|
|
|
improver
|
2022-10-04 01:41:12
|
if you pick perceptual rendering intent or really anything else other than relative colorimetric, it corrects things right
|
|
2022-10-04 01:42:09
|
this reminded me to enable gfx.color_management.enablev4 on firefox
|
|
|
|
JendaLinda
|
2022-10-04 01:50:05
|
Sigh, I know why I don't use any color profiles in my own stuff.
|
|
|
improver
|
|
improver
>script is done
>it had a bug so didn't count stuff right
epic
|
|
2022-10-05 06:41:56
|
```
sums:
* count: 9782
* srcsum: 6152075340
* jxlsum: 4987347916
* jxl2sum: 4980610212
```
so additional savings of stripping metadata are... around 6MiB, when the general savings of compressing 5.73GiB downto 4.64GiB are 1.08GiB
|
|
2022-10-05 06:42:23
|
it's, well, something, i guess, but yes not worth caring about
|
|
|
ExpedientFalcon
|
2022-10-08 03:20:20
|
Hey, I was wondering if someone knew a CLI tool for either converting from YUV or RGB to XYB or for decoding a JXL image as raw XYB data?
|
|
|
_wb_
|
2022-10-08 06:16:52
|
Raw XYB only makes sense if you use floats, since it isn't designed to fit in uint types (X in particular is a small signed value close to 0)
|
|
2022-10-08 06:18:02
|
But I suppose there is a djxl flag to produce a pfm in xyb? <@604964375924834314> what would be the magic colorspace string for that?
|
|
|
spider-mario
|
2022-10-08 07:13:55
|
if there is such a string then that would probably be XYB_Per
|
|
|
ExpedientFalcon
|
2022-10-09 02:17:38
|
Looks like that works to ppm π not to pfm but hey I'll take it
|
|
2022-10-09 02:18:32
|
to be clear I want this for development purposes mainly, I want a reference output I can test against, so this much is perfect
|
|
|
The_Decryptor
|
2022-10-09 02:23:52
|
It seems to work for me
|
|
|
ExpedientFalcon
|
2022-10-09 02:24:30
|
Interesting, I get "Encode failed" when going to pfm, but success when going to ppm
|
|
|
The_Decryptor
|
2022-10-09 02:26:13
|
I'm using a pretty recent build from github, commit f38074f
|
|
|
ExpedientFalcon
|
2022-10-09 02:37:39
|
Turns out mine actually did not work going into ppm either... it produced output but it's in an integer format. Hmm.
|
|
2022-10-09 02:38:56
|
If I add `--bits_per_sample=32` then it looks like it tries to output float but the encode fails. Maybe I'll make sure I'm on the latest git version...
|
|
2022-10-09 02:44:25
|
All right, yep, updating to latest git fixed it π
|
|
|
Traneptora
|
2022-10-10 06:00:20
|
Can djxl take a JPEG as input and output a PNG while skipping the jxl conversion first?
|
|
2022-10-10 06:00:56
|
so you can use it as jpeg decoder
|
|
2022-10-10 06:01:23
|
and can libjxl do this?
|
|
|
Fraetor
|
|
Traneptora
Can djxl take a JPEG as input and output a PNG while skipping the jxl conversion first?
|
|
2022-10-10 06:44:00
|
Not currently, but it was mentioned as a feature that would be good to have:
https://github.com/libjxl/libjxl/issues/455
|
|
|
_wb_
|
|
Traneptora
Can djxl take a JPEG as input and output a PNG while skipping the jxl conversion first?
|
|
2022-10-10 06:49:21
|
This was recently added to benchmark_xl, long term plan is to have it in libjxl too but probably not before 1.0
|
|
2022-10-10 06:50:47
|
See https://github.com/libjxl/libjxl/pull/1798
|
|
|
BlueSwordM
|
2022-10-20 12:40:42
|
<@853026420792360980> So, now that RGB32A support is in ffmpeg, how long do you think it would take to get ssimulacra2 and butteraugli_jxl into ffmpeg?
|
|
|
Traneptora
|
|
BlueSwordM
<@853026420792360980> So, now that RGB32A support is in ffmpeg, how long do you think it would take to get ssimulacra2 and butteraugli_jxl into ffmpeg?
|
|
2022-10-20 02:32:56
|
probably never
|
|
|
BlueSwordM
|
|
Traneptora
probably never
|
|
2022-10-20 02:33:16
|
Oof. How come?
|
|
2022-10-20 02:33:22
|
Nobody really working on integration?
|
|
|
Traneptora
|
2022-10-20 02:33:43
|
metrics in a color space that FFmpeg doesn't even support
|
|
|
BlueSwordM
|
2022-10-20 02:35:55
|
Oh.
|
|
2022-10-20 02:36:02
|
That poses a slight problem.
|
|
|
_wb_
|
2022-10-20 05:08:40
|
Does ffmpeg support linear RGB? The rest can be considered "part of the metric", no?
|
|
|
Traneptora
|
|
_wb_
Does ffmpeg support linear RGB? The rest can be considered "part of the metric", no?
|
|
2022-10-20 05:27:57
|
it does, although Lynne wants to add XYB as its own pixel format
|
|
2022-10-20 05:28:16
|
the problem with adding metric is they don't really coincide with ffmpeg's goals tho
|
|
2022-10-20 05:29:28
|
I can easily see the suggestion getting met by "but why? who needs this in FFmpeg" followed by "just implement the metric with a specialized tool that links to libavcodec"
|
|
|
_wb_
|
2022-10-20 05:43:18
|
Yeah that's a fair point tbh. But then again, it already does have some metrics, right?
|
|
|
BlueSwordM
|
|
_wb_
Yeah that's a fair point tbh. But then again, it already does have some metrics, right?
|
|
2022-10-20 06:50:11
|
Yeah, like through libvmaf and PSNR/SSIM.
|
|
2022-10-20 06:50:36
|
bombzen makes a good point however: it would be better to have a libjxl-metrics package within ffmpeg instead of metrics directly integrated.
|
|
2022-10-20 06:50:47
|
Currently, ssimulacra2 as a separate package I guess could be implemented?
|
|
|
_wb_
|
2022-10-20 07:35:54
|
yeah, it's still a bit of a WIP though, I'm still experimenting a little bit to tweak some shortcomings (in particular the conceptual SSIM bug Jyrki discovered, and doing multi-scale downscaling in linear color instead of gamma-compressed, as suggested by Kornel)
|
|
2022-10-20 07:38:01
|
retuning takes some time so it's basically trying a slightly adjusted metric, waiting a day or two to see how it performs after tuning, trying something else, waiting a day or two, etc.
|
|
|
VcSaJen
|
|
szabadka
Oops, it seems that discord is indeed ignoring ICC profile (just like Imagemagic display)
|
|
2022-10-24 04:35:36
|
It seems some old sites are just deleting color profile on upload, without any conversion. Making it green on all browsers and devices due to missing profile
|
|
|
The_Decryptor
|
2022-10-24 04:40:15
|
A lot of tools treat things like colour profiles and orientation as unimportant metadata so just silently strip them, completely wrong but as long as you only deal with "sRGB like" content it flies under the radar
|
|
|
Fraetor
|
2022-10-26 07:41:28
|
A lot of them strip metadata as a privacy measure, to remove things like geotagging. This is where I think jxl really made the right move in ensuring everything that affects rendering is in the main codestream.
|
|
|
BlueSwordM
|
2022-11-01 09:34:06
|
<@794205442175402004> Do you have a specific script for computing butteraugli and ssimulacra2 BD-rates in the libjxl repo? It seems like I'm blind in this regard.
|
|
2022-11-01 09:35:14
|
I essentially want a BD-rate script because I'd like to say stuff like "Encoder is X% more efficient in SSIMU2 and butteraugli".
|
|
|
_wb_
|
2022-11-01 09:53:17
|
Uh, nothing in the repo afaik
|
|
2022-11-01 09:53:41
|
I wrote some pyplot scripts to make various plots
|
|
2022-11-01 09:54:17
|
They are somewhat hacky but I can share it if you want
|
|
|
BlueSwordM
|
|
_wb_
They are somewhat hacky but I can share it if you want
|
|
2022-11-01 09:55:53
|
Eh, if they work, I'm not refusing.
|
|
|
_wb_
|
2022-11-01 09:58:10
|
https://jon-cld.s3.amazonaws.com/test/plot.py-gain-avg-moz
|
|
2022-11-01 09:58:25
|
https://jon-cld.s3.amazonaws.com/test/plot.py-gain-avg-moz-qauto
|
|
2022-11-01 09:58:45
|
first one aggregates things per encode setting, the second one per metric result
|
|
2022-11-01 09:59:55
|
`results2.csv` is one big csv file it takes as input that has all the metric results
|
|
2022-11-01 10:00:15
|
```
image,encoder,effort,quality,ssimulacra1,ssimulacra2-B,bpp,MPx/s,butteraugli,psnr_y,psnr_cb,psnr_cr,psnr_hvs_y,psnr_hvs_cb,psnr_hvs_cr,psnr_hvs,float_ssim,float_ms_ssim,ciede2000,vmaf,aimos,ssimulacra2-D
images/001.png,avif 444,s6,q1,0.00320952,92.73001073,5.34928268486077816706,.24933333333333333333,3-norm: 0.254147,0.00006562,53.003059,53.653564,53.950561,54.130895,51.398969,51.608721,53.462715,0.999716,0.999611,51.860649,96.258077,0.8644,98.06922025
images/001.png,avif 444,s6,q3,0.00532715,91.23095873,3.34074128711045546745,.37143835616438356164,3-norm: 0.342703,0.00012787,50.880798,52.100634,52.072439,52.418161,49.820971,49.824750,51.760323,0.999492,0.999329,49.232069,96.008621,0.8632,95.55174596
images/001.png,avif 444,s6,q5,0.00683009,89.47879958,2.50115434261478886225,.42869565217391304347,3-norm: 0.412035,0.00019964,49.441843,51.080607,50.897431,51.288430,48.778079,48.663369,50.639078,0.999236,0.999055,47.947825,95.744301,0.8613,92.32850954
images/001.png,avif 444,s6,q7,0.00802754,87.67982422,2.05590263691683569979,.51160377358490566037,3-norm: 0.485539,0.00029196,48.140296,50.362565,50.043732,50.161570,47.895052,47.647279,49.566185,0.998901,0.998721,47.049107,95.366444,0.8602,90.19840423
...
```
|
|
2022-11-01 10:00:54
|
so you'll have to replace that part appropriately to let it process your own data
|
|
|
BlueSwordM
|
2022-11-01 11:11:21
|
Thank you.
|
|
|
sklwmp
|
2022-11-02 04:09:50
|
I don't know if this is the right place to ask, but, why does Chrome display JXL images correctly when in an `img` element, but if I try to open the image in a new tab, it makes me download it instead of viewing it directly?
|
|
2022-11-02 04:14:40
|
Actually, nevermind, why does it only happen on https://jpegxl.info/ ?
|
|
|
_wb_
|
2022-11-02 06:34:09
|
That will happen whenever a server is too dumb to recognize it is sending a jxl, so it doesn't send a response header with image/jxl in it but one with a generic media type
|
|
2022-11-02 06:34:31
|
Like github, which is hosting jpegxl.info
|
|
2022-11-02 06:35:51
|
For older image formats like jpeg and png, chrome will sniff the first few bytes and still show it as an image even if it has the wrong media type
|
|
2022-11-02 06:36:26
|
But for jxl they didn't want that for "security reasons" that seem rather far-fetched to me.
|
|
|
|
Hello71
|
|
_wb_
But for jxl they didn't want that for "security reasons" that seem rather far-fetched to me.
|
|
2022-11-02 10:54:00
|
aiui the logic is "sniffing html (with scripts) is insecure, and sniffing is a dubious idea to begin with, but we can't get rid of sniffing due to backwards compat, so we'll just disable sniffing for new formats, even if they aren't executable"
|
|
|
_wb_
|
2022-11-03 08:05:42
|
Yeah, I can see the reasoning, but it's exactly new formats where dumb hosts are most likely to get the media type wrong in their response headers. It might encourage people to rename the file to a different extension just so the dumb host will think it's a jpeg or png, send that media type in the response header, and cause the image to get displayed after all (since once it's in the image decode path, it will likely just look at the bitstream to see what decoder to dispatch).
|
|
|
Traneptora
|
2022-11-03 12:31:40
|
I ran into an issue where nginx was sending woff2 fonts as application/octet-stream
|
|
2022-11-03 12:31:54
|
I had to add an exception in my own nginx config
|
|
2022-11-03 12:32:53
|
ah wait nvm it was wasm
|
|
2022-11-03 12:33:03
|
er both?
|
|
2022-11-03 12:33:12
|
```nginx
location ~ ^/fonts/.*\.woff2$ {
types {
font/woff2 woff2;
}
}
location ~ ^/js/.*\.(wasm|js)$ {
types {
application/wasm wasm;
text/javascript js;
}
}```
|
|
2022-11-03 12:33:27
|
this is in my config
|
|
|
Fraetor
|
|
_wb_
Yeah, I can see the reasoning, but it's exactly new formats where dumb hosts are most likely to get the media type wrong in their response headers. It might encourage people to rename the file to a different extension just so the dumb host will think it's a jpeg or png, send that media type in the response header, and cause the image to get displayed after all (since once it's in the image decode path, it will likely just look at the bitstream to see what decoder to dispatch).
|
|
2022-11-04 07:58:28
|
I guess the idea is that by not making it work, it forces these "dumb" web servers to actually get fixed. It does however mean that you manually need to add it for server installations that predate the format existing.
|
|
|
Jim
|
|
Traneptora
I ran into an issue where nginx was sending woff2 fonts as application/octet-stream
|
|
2022-11-04 08:05:03
|
What issue?
|
|
|
|
Deleted User
|
|
_wb_
This was recently added to benchmark_xl, long term plan is to have it in libjxl too but probably not before 1.0
|
|
2022-11-04 08:47:22
|
What is the command for benchmark_xl to decode a JPEG and save the output?
|
|
|
Traneptora
|
|
Jim
What issue?
|
|
2022-11-04 09:01:35
|
the issue was that nginx was sending woff2 fonts as application/octet-stream
|
|
|
_wb_
|
|
What is the command for benchmark_xl to decode a JPEG and save the output?
|
|
2022-11-04 09:11:32
|
I don't know that by heart, but <@987371399867945100> will know
|
|
|
Traneptora
|
2022-11-09 06:59:58
|
are there tools for testing decoder output?
|
|
2022-11-09 07:00:20
|
i.e. take the difference of two images and compare if they meet tolerance per pixel difference
|
|
2022-11-09 07:00:21
|
etc.
|
|
|
_wb_
|
2022-11-09 07:43:32
|
https://github.com/libjxl/conformance
|
|
|
Traneptora
|
2022-11-09 07:49:37
|
this requires a test.json
|
|
2022-11-09 07:49:42
|
I'm just trying to compare output
|
|
2022-11-09 07:50:26
|
since it's not bit-exact identical
|
|
|
Fraetor
|
2022-11-09 08:41:05
|
Imagemagick can.
|
|
|
Traneptora
I'm just trying to compare output
|
|
2022-11-09 08:50:02
|
```
$ compare -verbose -metric mse gradient_8x8.png gradient_8x8.jpg difference.png
gradient_8x8.png PNG 8x8 8x8+0+0 8-bit Gray 256c 120B 0.000u 0:00.000
gradient_8x8.jpg JPEG 8x8 8x8+0+0 8-bit Gray 256c 181B 0.000u 0:00.000
Image: gradient_8x8.png
Channel distortion: MSE
gray: 1.57475 (2.40292e-05)
all: 1.57475 (2.40292e-05)
gradient_8x8.png=>difference.png PNG 8x8 8-bit Gray 37c 484B 0.000u 0:00.004
```
You can pick a different metric than mean squared error if you want, but it should be good enough for differences in decoder output.
|
|
|
_wb_
|
2022-11-09 08:50:50
|
in conformance we basically look at `-verbose -metric rmse` and `-verbose -metric pae`
|
|
|
Traneptora
|
|
Fraetor
```
$ compare -verbose -metric mse gradient_8x8.png gradient_8x8.jpg difference.png
gradient_8x8.png PNG 8x8 8x8+0+0 8-bit Gray 256c 120B 0.000u 0:00.000
gradient_8x8.jpg JPEG 8x8 8x8+0+0 8-bit Gray 256c 181B 0.000u 0:00.000
Image: gradient_8x8.png
Channel distortion: MSE
gray: 1.57475 (2.40292e-05)
all: 1.57475 (2.40292e-05)
gradient_8x8.png=>difference.png PNG 8x8 8-bit Gray 37c 484B 0.000u 0:00.004
```
You can pick a different metric than mean squared error if you want, but it should be good enough for differences in decoder output.
|
|
2022-11-09 10:30:05
|
thanks
|
|
2022-11-09 10:32:09
|
what's considered acceptible tolerance?
|
|
|
_wb_
|
2022-11-09 10:39:47
|
for level 5 conformance the tolerances are larger than for level 10
|
|
|
Traneptora
|
2022-11-09 10:41:18
|
ah I see that's in the levels annex
|
|
|
_wb_
|
2022-11-09 10:43:22
|
no that defines what are valid bitstream in the levels, the tolerances are in 18181-3
|
|
2022-11-09 10:43:51
|
these are the typical values but the actual values are in the json and may differ per test case
|
|
2022-11-09 10:44:32
|
that's with sample values between 0.0 and 1.0 so multiply by 255 if you're looking at 8-bit values
|
|
|
Traneptora
|
2022-11-09 10:45:58
|
why is modular 16-bit not permitted in level5?
|
|
2022-11-09 10:46:17
|
is that because you have to use 32-bit buffers?
|
|
|
_wb_
|
|
Traneptora
|
2022-11-10 11:10:34
|
is 32-bit integer arithmetic actually that much slower than 16-bit arithmetic on modern CPUs?
|
|
2022-11-10 11:10:56
|
I'm wondering if it's potentially worth it to duplicate code for shorts instead of int
|
|
|
lonjil
|
2022-11-10 11:10:57
|
No
|
|
2022-11-10 11:11:03
|
faster probably
|
|
|
Traneptora
|
2022-11-10 11:11:08
|
but I'm thinking I'll just stick with 32-bit integer arithmetic
|
|
2022-11-10 11:11:48
|
modular mode has no cyclic rotations or other things that *require* 16-bit buffers, as far as I know
|
|
|
lonjil
|
2022-11-10 11:12:16
|
16 bit buffers could still be used with 32 bit math
|
|
|
Traneptora
|
2022-11-10 11:12:33
|
I don't particularly care about memory usage, I care more about decode speed
|
|
2022-11-10 11:12:47
|
and 16-bit buffers with 32-bit math just requires clamping and unclamping
|
|
|
lonjil
|
2022-11-10 11:12:57
|
16 bit means twice as much buffer in cache!
|
|
2022-11-10 11:13:06
|
may or may not make a difference depending on access patterns
|
|
|
Traneptora
|
2022-11-10 11:13:11
|
I'm targeting the JVM
|
|
2022-11-10 11:13:17
|
so I doubt that I'm actually leveraging cpu cache
|
|
|
lonjil
|
2022-11-10 11:13:55
|
you definitely are in one way or another, the jvm is quite good at optimizing the machine code it generates.
|
|
2022-11-10 11:14:09
|
whether java makes it easy to write cache friendly code is another question
|
|
|
Traneptora
|
2022-11-10 11:14:26
|
huh, in that case, would having `short[][]` actually be faster than `int[][]`
|
|
2022-11-10 11:14:46
|
for a typical 256x256 group
|
|
|
lonjil
|
2022-11-10 11:15:00
|
again, would depend on the access patterns. I haven't gotten to that stuff yet so I have no idea
|
|
2022-11-10 11:15:09
|
For purely linear access, probably zero difference
|
|
2022-11-10 11:15:27
|
Any sort of referring back to earlier stuff, yes it would make a difference. But I have no idea how big that difference would be.
|
|
|
Traneptora
|
2022-11-10 11:15:42
|
I buffer with `buffer[c][y][x]` and I iterate over x on the inside
|
|
2022-11-10 11:16:06
|
that way buffer[c][y] is a row, not a column
|
|
2022-11-10 11:16:37
|
I could probably optimize the weighted predictor though, as I don't actually need to hang onto values way in the past
|
|
|
lonjil
|
|
Traneptora
|
2022-11-10 11:17:16
|
not sure if that would actually save speed or just ram tho
|
|
2022-11-10 11:18:14
|
either way beyond basic multithreading I'm not planning on digging into optimization until I finish VarDCT
|
|
|
|
veluca
|
|
lonjil
For purely linear access, probably zero difference
|
|
2022-11-11 01:04:05
|
you may be surprised, jxl *can* be memory bandwidth limited
|
|
2022-11-11 01:04:42
|
the advantage of shorts is that (if you are extremely lucky) it may get SIMDfied and then be faster
|
|
|
β
γ³γγ
|
2022-11-11 02:14:32
|
hello
|
|
2022-11-11 02:14:48
|
i would like to know how to increase the number of progressive 'steps' if such a thing is possible
|
|
2022-11-11 02:15:45
|
e.g. consider this output truncated to 2MB
|
|
2022-11-11 02:15:50
|
it has a very obvious border. it seems to go right from 8x resampled to 1x reampled.
|
|
2022-11-11 02:17:27
|
it's more obvious if i more severely cut it.
|
|
2022-11-11 02:18:57
|
```bash
cjxl --group_order=1 -d 0.000001 -p copypaste1-commission-no14-1-with-signature1920x.png me1920x.jxl
cp !$ !$.trunc && truncate -s 256KB !$.trunc && mv !$.trunc me1920x.trunc.jxl
gimp -a !$
```
|
|
2022-11-11 02:20:46
|
output JPEG XL
|
|
2022-11-11 02:25:51
|
lossless WebP if it helps. also i realize that that's a very silly value for `-d`. i was naively trying to get more progessive steps. a more sane value such as 0.5 results in a JXL of only 517KB, also attached.
|
|
|
_wb_
|
2022-11-11 02:27:10
|
Distance shouldn't matter, the number of passes is not affected by that
|
|
2022-11-11 02:28:44
|
But not sure which progressive events are triggered by default, could be that only 1:8 and 1:1 are shown even if there are passes for 1:4 and 1:2 in the jxl
|
|
|
β
γ³γγ
|
2022-11-11 02:29:22
|
ohh really
|
|
2022-11-11 02:29:36
|
i wrote (most of) the (current) gimp plugin <@794205442175402004> is there an api cal i'm supposed to be using
|
|
2022-11-11 02:29:43
|
to enable all the progerssive steps that are there
|
|
2022-11-11 02:30:32
|
i'd like to show users the best case progressive output obviously
|
|
2022-11-11 02:32:44
|
yeah `JxlDecoderSetProgressiveDetail` i think
|
|
|
_wb_
|
2022-11-11 02:33:30
|
Yes that is it
|
|
|
β
γ³γγ
|
2022-11-11 02:33:37
|
well im gonna try setting it to `kGroups` and see what happens
|
|
2022-11-11 02:33:40
|
wow im glad i asked about this lol
|
|
2022-11-11 02:33:49
|
as my patch is "wrong"
|
|
|
Moritz Firsching
|
2022-11-11 02:39:33
|
currently `kGroups` is not implemented: https://github.com/libjxl/libjxl/blob/f927401bde3840802f9b93ffd36480de4e0563ad/lib/include/jxl/types.h#L156
|
|
|
_wb_
|
2022-11-11 02:40:11
|
Doesn't hurt to set it to that though, will just start to show more steps once it's implemented
|
|
|
β
γ³γγ
|
2022-11-11 02:53:46
|
doesn't seem to do anything anyway
|
|
2022-11-11 02:53:54
|
at least for this input maybe i need to try more difficult one
|
|
2022-11-11 02:54:25
|
and then i still don't know if the 2x / 4x are even in ther
|
|
2022-11-11 02:54:40
|
is there a way to get cjxl to always include them?
|
|
2022-11-11 02:56:15
|
hmm
|
|
2022-11-11 02:56:18
|
```
box: type: "JXL " size: 12
JPEG XL file format container (ISO/IEC 18181-2)
box: type: "ftyp" size: 20
box: type: "jxlp" size: 23
JPEG XL image, 1920x1080, lossy, 8-bit RGB
num_color_channels: 3
num_extra_channels: 0
have_preview: 0
have_animation: 0
Intrinsic dimensions: 1920x1080
Orientation: 1 (Normal)
Color space: RGB, D65, sRGB primaries, gamma(0.454550) transfer function, rendering intent: Perceptual
box: type: "brob" size: 699
Brotli-compressed xml metadata: 699 compressed bytes
box: type: "jxlp" size: 516802
```
|
|
|
_wb_
|
2022-11-11 02:56:47
|
Jxlinfo will not know
|
|