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

benchmarks

Quackdoc
2024-09-30 06:01:53
sRGB does not define an EOTF persay, only an oetf and a "reference display". note that there are very good historical reasons for the mismatch In encoding that made sense when CRTs where a thing, Because fundamentally sRGB is a great color space for CRTs. It's just retro now.
Demiurge
A homosapien ah colorspace shenanigans, this is why I just encode everything in srgb to eliminate all variables when testing
2024-09-30 06:34:30
but... I DID encode everything in sRGB... I even downloaded the sRGB ICCv4 profile from color.org :(
2024-09-30 06:34:41
I dunno what I did wrong :(
jonnyawsom3
2024-09-30 06:35:52
<#1288790874016190505> Dx
A homosapien
2024-09-30 06:36:02
time for the nuclear option, strip the icc profile
w
and because displays don't signal to the OS what they use
2024-09-30 06:49:23
they dont because you are supposed to calibrate
Kleis Auke
Demiurge `vipsthumbnail -a -t -i srgb -e ./sRGB_v4_ICC_preference.icc -n perceptual -r none -p vsqbs -s 1000x> -o 'tn_%s.jxl[lossless,effort=2,keep=icc]' input.img` The documentation for vipsthumbnail is pretty bad. Here's an explanation. `-a` linear light resize. disables all shrink on load mechanics so it's significantly slower `-t` auto rotate based on exif tag, probably not needed and done by default now `-i srgb` for untagged images, use srgb `-e srgb` export color profile, can also put `srgb` here or a filename. `-n perceptual` profile rendering intent `-r none` no stupid sharpening filter that causes halo `-p vsqbs` new, apparently fast and high quality resampling algorithm instead of the default bilinear method, I haven't really tested it though... `-s 1000x>` resize if more than 1000px wide `-o 'tn_%s.jxl[lossless,effort=2,keep=icc]'` output format template (lossless jxl effort 2 with `tn_` prepended to the filename hope this helps!
2024-09-30 07:44:01
The `-r`, `-t` and `-p` switches are all NOOP/deprecated, see: <https://github.com/libvips/libvips/blob/v8.15.3/tools/vipsthumbnail.c#L220-L222> <https://github.com/libvips/libvips/blob/v8.15.3/tools/vipsthumbnail.c#L202-L204> <https://github.com/libvips/libvips/blob/v8.15.3/tools/vipsthumbnail.c#L217-L219>
2024-09-30 08:20:36
... so with all deprecated options removed, this is what remains: ```console $ vipsthumbnail input.jpg --linear --import-profile srgb --size 1000x --export-profile srgb --intent perceptual -o 'tn_%s.jxl[lossless,effort=2,keep=icc]' ``` PR <https://github.com/libvips/libvips/pull/4175> improves these docs a bit.
Demiurge
2024-09-30 08:52:19
thanks :) I didn't know that... there's no way to specify the resampling algorithm? that's kinda annoying, I wonder what the default is now
2024-09-30 08:53:47
You could replace `-n` with `--intent` to be more specific too. Apparently the `-n` GOption is defined twice.
2024-09-30 08:53:53
idk what the implications of that are
2024-09-30 08:53:56
Seems like a bug
Kleis Auke
Demiurge thanks :) I didn't know that... there's no way to specify the resampling algorithm? that's kinda annoying, I wonder what the default is now
2024-09-30 09:01:23
For reducing, `vipsthumbnail` defaults to lanczos3. For upsizing, it defaults to bicubic. You can use `vips resize` to pick another interpolator, see for example: <https://github.com/libvips/libvips/discussions/3083>.
Demiurge You could replace `-n` with `--intent` to be more specific too. Apparently the `-n` GOption is defined twice.
2024-09-30 09:02:31
Ah, indeed, that `-n` option is defined twice, hopefully it picks the first defined one instead of the deprecated option. I'll investigate.
RaveSteel
Demiurge how can you tell?
2024-09-30 09:46:30
ffprobe
Quackdoc what happens if you `djxl --color_space=RGB_D65_SRG_Per_SRG` repacling whatever is needed?
2024-09-30 09:46:47
Tried that yesterday, but it made no difference
RaveSteel Tried that yesterday, but it made no difference
2024-09-30 10:01:30
No wait, I only tried cjxl, not djxl
lonjil
Demiurge here's a good illustration of the crushed shadows on d=1
2024-09-30 11:28:47
there's a strong brightness shift between the original and the d1 here, that seems odd
_wb_
2024-09-30 11:37:16
2024-09-30 11:38:49
this is just a visualization of what I got from doing benchmark_xl --input=102.png --codec=jxl:4,jxl:5,jxl:6,jxl:7,avif:q82:s3,avif:q82:s4,avif:q82:s5,avif:q82:s6,avif:q82:s7,avif:q82:s3:log2_cols=2:log2_rows=2,avif:q82:s4:log2_cols=2:log2_rows=2,avif:q82:s5:log2_cols=2:log2_rows=2,avif:q82:s6:log2_cols=2:log2_rows=2,avif:q82:s7:log2_cols=2:log2_rows=2,jpeg:q86,jpeg:q86:p1,webp:q91,jpeg:enc-jpegli:dec-jpegli:q86 --encode_reps 10 --decode_reps 30 --inner_threads 6 --num_threads 0
2024-09-30 11:40:24
12 total threads, 18 tasks, 0 threads, 6 inner threads ``` 102.png Encoding kPixels Bytes BPP E MP/s D MP/s Max norm SSIMULACRA2 PSNR pnorm BPP*pnorm QABPP Bugs ----------------------------------------------------------------------------------------------------------------------------------------------------------------- jxl:4 5242 1128406 1.7218109 95.384 225.898 1.63101176 83.09969327 41.63 0.77717746 1.338152630488 2.808 0 jxl:5 5242 1080387 1.6485397 27.448 184.224 1.78047152 82.42861757 41.17 0.68999724 1.137487872987 2.935 0 jxl:6 5242 1082509 1.6517776 14.985 209.996 1.75711005 82.44657201 41.12 0.68662467 1.134151287924 2.902 0 jxl:7 5242 1081703 1.6505478 13.043 199.127 1.75711135 82.41697962 41.13 0.68662136 1.133301363062 2.900 0 avif:q82:s3 5242 1402720 2.1403809 0.620 36.119 1.57402488 84.26423263 44.20 0.70407007 1.506978093773 3.369 0 avif:q82:s4 5242 1394234 2.1274323 1.245 36.231 1.81495374 83.97075599 44.11 0.71672629 1.524786613935 3.861 0 avif:q82:s5 5242 1382879 2.1101059 1.862 37.632 1.82813460 83.70498052 44.00 0.74101071 1.563611059381 3.858 0 avif:q82:s6 5242 1339544 2.0439819 11.321 39.183 1.86672582 82.28488289 43.56 0.81168387 1.659067160046 3.816 0 avif:q82:s7 5242 1316406 2.0086761 15.067 38.712 1.85476755 82.28575566 43.35 0.81660202 1.640288993874 3.726 0 ```
2024-09-30 11:40:31
``` avif:q82:s3:log2_cols=2:log2_rows=2 5242 1400331 2.1367355 0.723 100.492 1.67412488 84.21234765 44.17 0.70739257 1.511510836647 3.577 0 avif:q82:s4:log2_cols=2:log2_rows=2 5242 1392431 2.1246811 1.459 101.384 1.65663747 83.94402059 44.10 0.71619845 1.521693302133 3.520 0 avif:q82:s5:log2_cols=2:log2_rows=2 5242 1380575 2.1065903 2.345 111.030 1.67678352 83.65033903 43.98 0.74074627 1.560448888943 3.532 0 avif:q82:s6:log2_cols=2:log2_rows=2 5242 1340107 2.0448410 16.876 114.731 1.88479123 82.29229785 43.55 0.81171131 1.659820565445 3.854 0 avif:q82:s7:log2_cols=2:log2_rows=2 5242 1319072 2.0127441 22.527 106.265 1.85481300 82.27874745 43.33 0.81703295 1.644478286674 3.733 0 jpeg:q86 5242 1443376 2.2024170 120.301 318.321 2.27509252 82.06020682 40.04 0.85157149 1.875515526893 5.011 0 jpeg:q86:p1 5242 1431826 2.1847931 98.872 257.025 2.27509252 82.06020682 40.04 0.85157149 1.860507514888 4.971 0 webp:q91 5242 1392182 2.1243011 5.290 80.716 1.96516232 82.10737458 42.70 0.78443927 1.666385245030 4.175 0 jpeg:enc-jpegli:dec-jpegli:q86 5242 1037229 1.5826859 65.508 91.129 2.40549511 79.63608754 39.61 0.89569606 1.417605477857 3.807 0 Aggregate: 5242 1289129 1.9670547 9.607 100.423 1.85009735 82.73022769 42.51 0.76443812 1.503691618879 3.639 0 ```
2024-09-30 11:43:23
I only included the effort settings for libjxl and libaom that I think make sense — s8/s9 are faster but give very poor results, s0/s1/s2 give slightly better results but are crazy slow, e3 is faster but results are too poor imo, e8+ is slightly better but not worth it
2024-09-30 11:44:11
for lossless, the speeds look like this:
2024-09-30 11:44:57
(truncated the bar for libjxl e1 with 6 threads since otherwise all the rest would be hard to see)
jonnyawsom3
2024-09-30 11:53:05
6x faster encoding than decoding, that's the power of specialised code paths
spider-mario
2024-09-30 11:54:52
maybe there would be some place for runtime code generation
_wb_
6x faster encoding than decoding, that's the power of specialised code paths
2024-09-30 12:04:22
fundamentally, fast encoding is easier than fast decoding since the encoder knows the entire image from the beginning while the decoder has to reconstruct it, so in terms of data dependencies encoders have a major advantage
2024-09-30 12:05:39
but yes, part of it is also specialized paths for lossless encoding of 8-16 bit images while the decoder is only specialized partially (it still always uses 32-bit sample values)
damian101
w they dont because you are supposed to calibrate
2024-09-30 12:32:14
But to what?
w
2024-09-30 12:33:06
whatever you want
damian101
2024-09-30 12:33:22
ah yes, using display ICC...
w
2024-09-30 12:33:30
?
damian101
2024-09-30 12:33:54
that display ICC profile that you can load in the display color management settings in Windows...
2024-09-30 12:33:57
pretty sure that was a thing...
w
2024-09-30 12:34:03
yeah?
damian101
2024-09-30 12:34:23
I don't think that should be needed
w
2024-09-30 12:34:27
why not?
damian101
2024-09-30 12:34:33
inconvenient
2024-09-30 12:35:03
especially with multiple and removable displays
2024-09-30 12:35:17
or if you want to switch display profiles
w
2024-09-30 12:35:35
the profile is registered to the display
2024-09-30 12:35:53
and you dont need to switch anything
2024-09-30 12:36:09
there's no other way to get proper color without calibrating yourself
damian101
2024-09-30 12:36:21
factory claibration can work very well
w
2024-09-30 12:36:30
sure but they drift after a month
2024-09-30 12:36:41
and that does the same thing
2024-09-30 12:36:48
it's just icc inside the driver that the OS pulls out and does the same
damian101
2024-09-30 12:37:15
driver?
w
2024-09-30 12:37:39
if you have a display that has calibration, on windows, it pulls the ICC from WDF
damian101
2024-09-30 12:38:06
wdf?
w
2024-09-30 12:38:20
windows update downloads the driver
damian101
2024-09-30 12:38:40
huh
w
2024-09-30 12:39:46
and that's the profiling part of calibration
2024-09-30 12:39:59
it has to be paired correctly with the calibrated part of the display
2024-09-30 12:40:16
even more inconvenient
2024-09-30 12:40:34
since you have to use the exact calibration setting on the display for the profile to mean anything
2024-09-30 12:41:32
with manual calibration, you can skip calibration controls and calibrate/profile as-is
2024-09-30 12:41:51
something you have to do for displays that dont have controls or an OSD
damian101
2024-09-30 12:46:44
Afaik Windows has added an option in latest 24H2 Windows version to set display gamut, so stuff that's not color managed is then shown correctly if sRGB/BT.709.
2024-09-30 12:47:33
So, seems like people with DCI-P3 display just see most things oversaturated and with wrong colors currently?
w
2024-09-30 12:48:32
most modern IPS displays are around P3. without color management, it will basically scale everything to that gamut
2024-09-30 12:49:00
but you still need to profile it with color management
spider-mario
2024-09-30 02:08:44
calibration makes it so that the monitor behaves how you want it profiling lets your colour management system (whether it is embedded within apps, as on X11 or old Windows, or system-wide, like on macOS or new Windows) know how the monitor behaves (e.g. sRGB, Display-P3, other), after whatever calibration has been performed (including none if that’s how you roll)
2024-09-30 02:08:49
calibration is neither necessary nor sufficient
2024-09-30 02:09:00
profiling is arguably more important
Oleksii Matiash
So, seems like people with DCI-P3 display just see most things oversaturated and with wrong colors currently?
2024-09-30 02:30:21
If app does not have color management built-in - yes
w
2024-09-30 02:31:04
and if there is no display profile yes
2024-09-30 02:31:22
so if youre not using a mac pretty much
damian101
Oleksii Matiash If app does not have color management built-in - yes
2024-09-30 02:31:31
assumed so... weird how Windows only reacts now to that development that has been happening for years...
Oleksii Matiash
w and if there is no display profile yes
2024-09-30 02:32:31
For high quality monitors it is not so obvious, but in general yes
w
2024-09-30 02:32:34
it's also because the surface has to compete with color work stuff
Oleksii Matiash
2024-09-30 02:33:22
And AFAIK there is a problem with wide gamut monitor calibration
w
2024-09-30 02:34:18
only problem I know of is desktop isnt color managed, but it's solved with ACM
Oleksii Matiash
w only problem I know of is desktop isnt color managed, but it's solved with ACM
2024-09-30 02:35:47
Not only this. I don't remember exactly but it is something about average calibrators are not capable of handling such gamut, or something like this. Read some years ago on displaycal site
w
2024-09-30 02:36:37
there was older colorimeters not being able to handle high brightness but that's like 500 nits+
spider-mario
2024-09-30 02:37:08
some old colorimeters had filters that didn’t perform so well with wide gamut monitors and needed a correction matrix; it’s much less true with current colorimeters
2024-09-30 02:37:14
https://argyllcms.com/doc/WideGamutColmters.html
2024-09-30 02:37:17
> There are three approaches to addressing this problem: > […] > The third approach is to make a colorimeter that has filters that are closer to the standard observer curves, reducing the calibration needed for the instrument, and making it less dependent on the exact type of display technology. The X-Rite i1 DisplayPro, Pantone ColorMunki Display and possibly the Spyder 4 may have such an improvement.
lonjil
Demiurge here's a good illustration of the crushed shadows on d=1
2024-09-30 08:02:12
same concept but without the weird luma shift
2024-09-30 08:03:45
2024-09-30 08:06:01
at 1:1, eyes approximately 1500 pixels from the screen, both the e3 and e7 look pretty good, *but*, in the dark area on the left, the the quantization is very easy to notice with the compare_images tool, while the quantization in the light part in the middle is entirely imperceptible. The quantization is harder to spot in the dark area on the right owing to light adaptation from the surrounding area, but it's still actually visible. edit: sorry, meant e7 not e8. posted the wrong jxl, though the png above was made from the right file. double edit: meant *e*, not *d*, jeez im typoing a lot today.
_wb_
2024-09-30 08:10:00
<@532010383041363969> / <@179701849576833024> is there some adaptive quantization heuristic to bump up the quality in regions that are locally dark (i.e. large enough patch of darkness to allow local adaptation)? Say if the surrounding 3x3 DC values for Y are all below some threshold...
2024-09-30 08:10:36
If not, then I think we should add something like that.
veluca
2024-09-30 08:37:29
not as far as I know but only <@532010383041363969> truly knows
Jyrki Alakuijala
_wb_ <@532010383041363969> / <@179701849576833024> is there some adaptive quantization heuristic to bump up the quality in regions that are locally dark (i.e. large enough patch of darkness to allow local adaptation)? Say if the surrounding 3x3 DC values for Y are all below some threshold...
2024-10-02 03:10:03
there are a few things to consider, like e8 and e9 may counter great heuristics if butteraugli disagrees with the heuristics, IIRC butteraugli iters can make quantization 40 % worse than the original heuristics decided one way forward would be to start by creating a test corpus with 3-10 images where the phenomenon is visible
2024-10-02 03:11:30
also, there is the annoying thing that other codecs don't bother at all with the blacks
2024-10-02 03:12:17
if we want to remain roughly competitive in other areas -- if we spend our bit budgets in black areas -- then those users/reviewers who have their monitors dark or have bright viewing environments are just going to call AVIF the better codec
2024-10-02 03:13:47
last, butteraugli doesn't compensate for the opening of the pupil -- if there are some bright areas or not, it can modulate the pupil to give 4x more light which makes the blacks way more visible
2024-10-02 03:19:11
if someone creates an issue and uploads three images, I will spend 222 minutes trying to fix or mitigate this
lonjil
2024-10-02 03:34:10
I will look for two more test images
yoochan
2024-10-02 04:09:52
222 !
_wb_
2024-10-02 05:08:30
I guess the issue is mostly if there's a large area (or even the whole image) that is dark but still has some detail. If the area is large enough (so you can look at it without getting 'blinded' by neighboring bright areas), brightness adaptation of the HVS does become relevant. This is also what happens if people pixel peep and zoom in on the dark parts (to the point that they no longer have any bright parts on screen).
Demiurge
2024-10-04 11:45:22
I think the main issue at hand is that the color profile I was using was causing libjxl to choke, for some reason.
2024-10-04 11:45:46
Maybe if that issue is fixed, there won't be any problem with retaining detail in dark shadows
2024-10-04 11:46:31
This issue seems to resurface a lot, there's lots of duplicated bug reports that seem to demonstrate the same issue.
2024-10-04 11:47:52
It's hard to determine what else could be wrong until that issue at least is fixed first.
2024-10-04 11:48:13
Maybe it's a combination of issues.
2024-10-04 11:49:24
first, turning srgb images into linear int...
2024-10-04 11:50:06
Maybe if that issue is (actually) fixed (for real this time), the other issues will go away.
spider-mario
Demiurge I think the main issue at hand is that the color profile I was using was causing libjxl to choke, for some reason.
2024-10-04 12:54:29
does it make any difference if you build libjxl with lcms2 instead of skcms?
Demiurge
2024-10-04 01:11:25
Good idea, I'll give it a shot.
2024-10-04 01:42:52
Ugh, why does 0.12 have a different soname...
2024-10-04 01:57:48
latest libjxl git still craps the bed when built with lcms2 on this image.
2024-10-04 02:08:29
Here's what they look like when decoded as so: `djxl --color_space=sRGB d1_wood.{jxl,png}` `djxl --color_space=sRGB source_wood.{jxl,png}` Notice how `d1_` is noticeably darker than `source` despite both being decoded to the same color space and d1 being created by `cjxl source.jxl d1.jxl`
2024-10-04 02:08:35
Something is obviously very wrong here.
2024-10-04 02:08:46
damian101
2024-10-04 02:09:14
A, very good. This means my theory was correct.
Demiurge
2024-10-04 02:10:03
For some reason, firefox shows source_wood.png as being WAY brighter than gwenview...
damian101
Demiurge Here's what they look like when decoded as so: `djxl --color_space=sRGB d1_wood.{jxl,png}` `djxl --color_space=sRGB source_wood.{jxl,png}` Notice how `d1_` is noticeably darker than `source` despite both being decoded to the same color space and d1 being created by `cjxl source.jxl d1.jxl`
2024-10-04 02:11:51
The second set looks identical, though?
Demiurge For some reason, firefox shows source_wood.png as being WAY brighter than gwenview...
2024-10-04 02:12:36
Huh. Last I checked, Firefox converted everything tagged to sRGB, including transfer function. Maybe they changed that to gamma 2.2, then this would make sense.
CrushedAsian255
2024-10-04 02:14:07
im currently downloading a bunch of images from Apple Support website to see how smaller they could be in jxl
_wb_
2024-10-04 02:20:12
there seems to be something wrong with the ICC profile in that original png
CrushedAsian255
2024-10-04 02:20:41
maybe it's one of those incorrect ones that cjxl keeps mentioning
lonjil
2024-10-04 02:21:25
I'm pretty sure this is the actual original file.
2024-10-04 02:22:43
Pashi told me that they re-encoded it using the ICCv4 sRGB profile from color.org
CrushedAsian255
2024-10-04 02:23:06
why wouldn't you just use the cICP sRGB?
2024-10-04 02:23:21
why add an sRGB ICC?
lonjil
2024-10-04 02:23:35
sometimes ICC profiles will be used in the wild so related bugs do need to be fixed
_wb_
2024-10-04 02:25:13
I hadn't seen such a big icc profile yet that is supposed to be sRGB
2024-10-04 02:25:58
something weird happens with it, e.g. imagemagick refuses to extract it from that png for some reason
CrushedAsian255
2024-10-04 02:26:38
are `A2B0` and `B2A0` meant to be 30 kB?
lonjil
2024-10-04 02:26:52
When I had a lossy JXL with that profile attached, djxl decoded it to a PNG with a linear light profile 😄
_wb_
2024-10-04 02:27:02
also cjxl doesn't seem to be able to correctly parse it, it ends up storing the entire icc profile which is something it wouldn't do if it would recognize that it's just sRGB
lonjil
lonjil When I had a lossy JXL with that profile attached, djxl decoded it to a PNG with a linear light profile 😄
2024-10-04 02:27:19
I am going to file an issue for that
CrushedAsian255
_wb_ also cjxl doesn't seem to be able to correctly parse it, it ends up storing the entire icc profile which is something it wouldn't do if it would recognize that it's just sRGB
2024-10-04 02:27:21
how does it recognise colour profiles?
2024-10-04 02:27:30
maybe it's slightly wrong sRGB
_wb_
2024-10-04 02:28:52
in lossy mode, it looks at the primaries and transfer curve and it allows for some wiggle room since not all profiles round stuff the same way, and if it's close enough to something that can be done as an CICP-style enum, it does that
Demiurge
The second set looks identical, though?
2024-10-04 02:34:06
When viewing the two in mpv, they do look identical, save for the d1 image being significantly blurred way too much for d1
lonjil
2024-10-04 02:35:22
``` % cjxl -x icc_pathname=sRGB_v4_ICC_preference.icc -d 1 -e 3 stainedwood.jpg.ppm{,.icc.d1e3.jxl} % jxlinfo stainedwood.jpg.ppm.icc.d1e3.jxl JPEG XL image, 2560x1600, lossy, 8-bit RGB Color space: 60960-byte ICC profile, CMM type: "", color space: "RGB ", rendering intent: 0 % umbrielpng -v stainedwood.jpg.ppm.icc.d1e3.jxl.png PNG signature found: stainedwood.jpg.ppm.icc.d1e3.jxl.png Chunk: IHDR, Size: 25, Offset: 8, CRC32: 3ace8c97 Chunk: gAMA, Size: 16, Offset: 33, CRC32: 31e8965f Chunk: iCCP, Size: 345, Offset: 49, CRC32: 6d1c0317 Chunk: cHRM, Size: 44, Offset: 394, CRC32: 1b1c9a7f Chunk: cICP, Size: 16, Offset: 438, CRC32: 9aa2f9d9 Chunk: IDAT, Size: 8204, Offset: 454, CRC32: cc4f90af Chunk: 215 more IDAT chunks Chunk: IEND, Size: 12, Offset: 1767824, CRC32: ae426082 Size: 2560x1600, Color: 8-bit RGB gAMA: 100000 ICC Profile Length: 536 cHRM: wp: 31270, 32900, r: 64000, 33001, g: 30000, 60000, b: 15000, 6000 cICP: BT709, LinearLight, RGB, Full ```
2024-10-04 02:36:01
(the `-x icc_pathname=` option doesn't appear to work with jpeg input, so I converted to ppm first)
Demiurge
2024-10-04 02:38:44
mpv seems to display both images with the exact same transfer function. But I'm not sure if it's because the color profile support IS broken or NOT broken.
_wb_
2024-10-04 02:41:23
yeah so for some reason cjxl does not recognize the transfer curve to be sRGB, and instead signals it to be linear in its enum colorencoding while putting the whole icc profile in the bitstream. Then when viewing or decoding, it cannot convert the result to the ICC profile space and it converts it to the enum colorencoding, which is a pretty bad idea (8-bit linear is not pretty).
2024-10-04 02:43:12
for some reason if I do `convert source_wood.png profile.icc`, I get ``` convert: no color profile is available `profile.icc' @ error/meta.c/WriteMETAImage/2397. ``` while normally that should just extract the icc profile from the png
CrushedAsian255
2024-10-04 02:43:52
Is the ICC stored correctly within the PNG?
_wb_
2024-10-04 02:44:05
I can extract it with exiftool, and Apple's ColorSync opens that icc profile without complaining
2024-10-04 02:44:22
but _something_ is not happy with it, clearly
CrushedAsian255
_wb_ for some reason if I do `convert source_wood.png profile.icc`, I get ``` convert: no color profile is available `profile.icc' @ error/meta.c/WriteMETAImage/2397. ``` while normally that should just extract the icc profile from the png
2024-10-04 02:44:44
It’s odd it s saying it doesn’t exist instead of saying it’s corrupt
2024-10-04 02:45:03
Does PNG store the ICC verbatim? Or does it do like JXL and compress / modify it
_wb_
2024-10-04 02:46:08
yeah but I've seen it say that before, I think it's what happens if libpng doesn't like the profile (it doesn't return it, so imagemagick thinks there is none)
2024-10-04 02:46:30
I think PNG uses DEFLATE for icc profiles, like it does for most things
Demiurge
2024-10-04 02:48:06
lotsa blur
2024-10-04 02:50:35
At least it's not as bad as discord webp :)
CrushedAsian255
_wb_ I think PNG uses DEFLATE for icc profiles, like it does for most things
2024-10-04 02:50:48
Does it do any ICC specific processing or just generic compression. Otherwise why would libpng need to verify
_wb_
2024-10-04 02:51:14
it doesn't need to, but it just likes to be pedantic
2024-10-04 02:51:29
I'm very confused by this stuff: https://color.org/ICC_White_Paper_26_Using_the_V4_sRGB_ICC_profile.pdf
2024-10-04 02:52:43
I don't get why they feel the need to come up with a 60 KB profile for sRGB that supposedly provides "more pleasing results for most images"
2024-10-04 02:53:39
I for one am not pleased by the results 🙂
CrushedAsian255
2024-10-04 03:01:26
How big is a normal sRGB profile?
jonnyawsom3
2024-10-04 03:36:23
So... It's *not* sRGB
_wb_
CrushedAsian255 How big is a normal sRGB profile?
2024-10-04 03:50:39
500 bytes or so
spider-mario
2024-10-04 03:50:56
as far as I understand, it mainly has to do with the absolute and perceptual rendering intents
2024-10-04 03:51:04
also, > 1. The ICC-absolute and media-relative colorimetric rendering intent transforms are not black point scaled.
_wb_
So... It's *not* sRGB
2024-10-04 03:53:02
I think it is, just one that is bundled with various suggested gamut mappings to convert to and from sRGB in ways that are not just the normal mappings.
2024-10-04 03:53:15
But this is not the kind of thing you want to tag an image with
jonnyawsom3
2024-10-04 03:56:30
Yeah, reading further it seems like it was made to replace multiple v2 icc files with a single v4
spider-mario
lonjil ``` % cjxl -x icc_pathname=sRGB_v4_ICC_preference.icc -d 1 -e 3 stainedwood.jpg.ppm{,.icc.d1e3.jxl} % jxlinfo stainedwood.jpg.ppm.icc.d1e3.jxl JPEG XL image, 2560x1600, lossy, 8-bit RGB Color space: 60960-byte ICC profile, CMM type: "", color space: "RGB ", rendering intent: 0 % umbrielpng -v stainedwood.jpg.ppm.icc.d1e3.jxl.png PNG signature found: stainedwood.jpg.ppm.icc.d1e3.jxl.png Chunk: IHDR, Size: 25, Offset: 8, CRC32: 3ace8c97 Chunk: gAMA, Size: 16, Offset: 33, CRC32: 31e8965f Chunk: iCCP, Size: 345, Offset: 49, CRC32: 6d1c0317 Chunk: cHRM, Size: 44, Offset: 394, CRC32: 1b1c9a7f Chunk: cICP, Size: 16, Offset: 438, CRC32: 9aa2f9d9 Chunk: IDAT, Size: 8204, Offset: 454, CRC32: cc4f90af Chunk: 215 more IDAT chunks Chunk: IEND, Size: 12, Offset: 1767824, CRC32: ae426082 Size: 2560x1600, Color: 8-bit RGB gAMA: 100000 ICC Profile Length: 536 cHRM: wp: 31270, 32900, r: 64000, 33001, g: 30000, 60000, b: 15000, 6000 cICP: BT709, LinearLight, RGB, Full ```
2024-10-04 04:09:38
uh, so we write a linear Rec. 709 CICP for a jxl with a colour space encoded as an ICC profile?
lonjil
2024-10-04 04:10:40
yeah
spider-mario
2024-10-04 04:11:34
doesn’t sound good at all
lonjil
2024-10-04 04:31:16
issue filed https://github.com/libjxl/libjxl/issues/3874
spider-mario
2024-10-04 04:48:42
it seems we didn’t use to add a cICP when decoding a jxl like that, up until a commit titled “Always add cICP chucks to djxl generated pngs if possible.”
2024-10-04 04:48:53
which I suppose makes sense
2024-10-04 04:49:02
(and suggests I did my bisection correctly)
lonjil
2024-10-04 04:55:50
You're not just adding such a cICP tag, the other color tags and the emitted ICC profile are also for linear RGB.
2024-10-04 04:56:36
And the actual image data is of course in linear RGB.
2024-10-04 04:57:26
So convert from linear RGB to sRGB and it'll look correctish, of course with visible artifacts from the fact that 8 bits isn't enough precision for linear RGB.
spider-mario
2024-10-04 04:57:29
right, the cICP thing is maybe just another manifestation of the same underlying problem
2024-10-04 04:58:15
still, the fact seems to be that before that commit, at least as far as cICP was concerned, we “knew” that the image wasn’t really linear sRGB
lonjil
2024-10-04 04:58:41
ah
spider-mario
2024-10-04 04:59:58
so perhaps this points to what might be wrong about the logic elsewhere as well
2024-10-04 05:01:15
hm, it seems to be that before, we only added cICP `if (ppf.icc.empty())`
2024-10-04 05:01:27
now we do it even if it isn’t, which we probably shouldn’t
2024-10-04 05:03:11
and so it’s probably something similar somewhere about using `ppf.color_encoding` despite it having an ICC profile (which points to it _not_ having a sensible enum representation)
_wb_
2024-10-04 05:06:41
decode_oneshot also produces an ICC profile that is synthesized from the color_encoding rather than the big one
spider-mario
2024-10-04 05:06:51
correction: it’s not having an ICC that points to that (as it could be a fallback ICC we generate), but (probably) `primary_color_representation == kIccIsPrimary`
2024-10-04 05:10:02
correction (bis): somehow, when we decode that file, the ppf has `primary_color_representation == kColorEncodingIsPrimary`
2024-10-04 05:10:05
which seems like a bug
_wb_
2024-10-04 05:34:53
Maybe we should add a conformance test case, it's a bit surprising to me that conformance testing didn't catch this...
spider-mario
2024-10-04 07:31:37
do we run all conformance tests at high precision? that would explain it
2024-10-04 07:31:42
it’s fine with 16 bits
_wb_
2024-10-04 08:10:50
Oh, right. Yeah they output float32 even
2024-10-04 08:12:25
But there should also be a test in there checking the ICC profile reconstruction, so that would have caught it too. If there is an example that triggers the buggy behavior, which may not be the case...
lonjil
2024-10-04 08:17:30
has anyone tested with a more typical ICC profile?
2024-10-04 08:17:39
I only tested with that odd profile from color.org
_wb_
2024-10-04 08:19:42
In the typical case, the profile matches an enum space and doesn't get stored explicitly when doing lossy.
Demiurge
2024-10-05 11:43:15
https://github.com/libjxl/libjxl/blob/main/lib/extras/dec/color_description.cc Would be cool if someone added some shortcuts for "adobe" opRGB
2024-10-05 11:44:56
Since it's a very common and popular standard
2024-10-05 11:45:52
And it could be called "opRGB (compatible with Adobe RGB)"
jonnyawsom3
2024-10-09 12:00:22
<@263300458888691714> This site seems pretty good for forming a pixel art corpus. Can't download directly in 1:1 scale, but they do list the original sizes for every image so scaling it back down is simple. https://www.pixilart.com/
monad
<@263300458888691714> This site seems pretty good for forming a pixel art corpus. Can't download directly in 1:1 scale, but they do list the original sizes for every image so scaling it back down is simple. https://www.pixilart.com/
2024-10-12 10:29:28
nice. I like these for 1:1 in the wild: <https://lospec.com/> <https://pixeljoint.com/>
_wb_
2024-10-21 06:53:18
Here is the committee draft for AIC-3 (subjective quality assessment). If you have any comments, feel free to send them to me.
Orum
2024-10-21 07:29:30
it looks like much of this is just a formalization of already established methodology, with the exception that this is really geared toward high fidelity... though I don't necessarily want to wade through all the other standards to see the specifics
A homosapien
2024-10-22 10:15:46
For larger images, distances of 3 or higher __doubles__ encoding times and __triples__ ram usage 💀 ``` wintime64 -- cjxl b.png b.jxl -d 2.9 --disable_output Compressed to 1390.6 kB (0.596 bpp). 5760 x 3240, 8.856 MP/s [8.86, 8.86], , 1 reps, 12 threads. PageFaultCount: 532016 PeakWorkingSetSize: 368.8 MiB QuotaPeakPagedPoolUsage: 33.05 KiB QuotaPeakNonPagedPoolUsage: 19.52 KiB PeakPagefileUsage: 489.1 MiB Creation time 2024/10/22 15:09:29.969 Exit time 2024/10/22 15:09:32.255 Wall time: 00:00:02.285 (2.29 seconds) User time: 00:00:00.984 (0.98 seconds) Kernel time: 00:00:14.531 (14.53 seconds)`````` wintime64 -- cjxl b.png b.jxl -d 3 --disable_output Compressed to 1370.3 kB (0.587 bpp). 5760 x 3240, 4.008 MP/s [4.01, 4.01], , 1 reps, 12 threads. PageFaultCount: 1360046 PeakWorkingSetSize: 1.584 GiB QuotaPeakPagedPoolUsage: 33.05 KiB QuotaPeakNonPagedPoolUsage: 45.02 KiB PeakPagefileUsage: 1.888 GiB Creation time 2024/10/22 15:10:14.812 Exit time 2024/10/22 15:10:19.669 Wall time: 00:00:04.856 (4.86 seconds) User time: 00:00:01.546 (1.55 seconds) Kernel time: 00:00:18.953 (18.95 seconds)```__To avoid this use streaming:__ ``` wintime64 -- cjxl b.png b.jxl -d 3 --disable_output --streaming_input Compressed to 1351.2 kB (0.579 bpp). 5760 x 3240, 8.874 MP/s [8.87, 8.87], , 1 reps, 12 threads. PageFaultCount: 531897 PeakWorkingSetSize: 368.2 MiB QuotaPeakPagedPoolUsage: 35.89 KiB QuotaPeakNonPagedPoolUsage: 19.52 KiB PeakPagefileUsage: 488.3 MiB Creation time 2024/10/22 15:11:10.567 Exit time 2024/10/22 15:11:12.851 Wall time: 0 days, 00:00:02.283 (2.28 seconds) User time: 0 days, 00:00:00.609 (0.61 seconds) Kernel time: 0 days, 00:00:14.968 (14.97 seconds)```
2024-10-22 10:19:28
This doesn't happen on my 1080 screenshots btw
2024-10-22 10:20:54
Implicit streaming until distance 3 at effort 7?
2024-10-22 10:23:06
I hope this isn't a bug...
jonnyawsom3
2024-10-23 04:02:31
Strange that streaming does anything, since PNG streaming isn't supported
A homosapien
2024-10-23 04:17:17
v0.11 added chunked encoding support ~~for non-interlaced pngs~~, the warning the CLI throws out is an outdated lie from 0.10
2024-10-23 04:27:33
Scratch that, chunked encoding supports pngs (interlaced or not) and jpeg inputs (with -j 0). Probably more input types as well.
jonnyawsom3
2024-10-23 04:36:43
Chunked encoding and streamed input are separate things, with streamed adding an even higher density/memory tradeoff
A homosapien
2024-10-23 04:47:41
are they? I forgot the difference
perk
2024-10-23 06:13:07
Got an image that's bigger lossless at effort 3 than 2 or 1 (e2 and e3 are bigger than the original png too). ```JPEG XL encoder v0.12.0 c6355600 [AVX2,SSE4,SSE2] Encoding [Modular, lossless, effort: 1] Compressed to 345.3 kB including container (0.005 bpp). 22800 x 22500, 433.904 MP/s [433.90, 433.90], , 1 reps, 16 threads. Encoding [Modular, lossless, effort: 2] Compressed to 830.9 kB including container (0.013 bpp). Encoding [Modular, lossless, effort: 3] Compressed to 906.9 kB including container (0.014 bpp). Encoding [Modular, lossless, effort: 4] Compressed to 341.7 kB including container (0.005 bpp). ```
RaveSteel
2024-10-23 06:24:56
It happens sometimes
_wb_
2024-10-23 06:34:39
The methods between effort 1 and 4 are quite different so there are no guarantees that higher effort is smaller
2024-10-23 06:35:12
Perhaps we should make higher effort slower and make it try lower efforts too
jonnyawsom3
2024-10-23 06:40:56
Either way, nothing will compare to the speed of e1, so at minimum it could be run
RaveSteel
2024-10-23 06:41:30
e1 is unbeatable for screenshots etc. much faster than PNG too
2024-10-23 06:41:52
And still delivering smaller filesize
Orum
2024-10-24 02:05:23
yeah, e1 is fantastic when you need speed
_wb_ Perhaps we should make higher effort slower and make it try lower efforts too
2024-10-24 02:06:10
honestly it's fine as it is, as long as people understand it's a possibility
monad
2024-10-24 09:58:49
it is a bit unintuitive that e3 performs well only on photo-like stuff. it is not really safe to use in general if you are processing non-photo content, where e2 (and even e1) can be faster and denser. that said, e3 is really great for photo. if there is a smart, fast way for the encoder to decide between e3 or e2 strategies, that would elevate the utility and mitigate unfortunate situations.
perk Got an image that's bigger lossless at effort 3 than 2 or 1 (e2 and e3 are bigger than the original png too). ```JPEG XL encoder v0.12.0 c6355600 [AVX2,SSE4,SSE2] Encoding [Modular, lossless, effort: 1] Compressed to 345.3 kB including container (0.005 bpp). 22800 x 22500, 433.904 MP/s [433.90, 433.90], , 1 reps, 16 threads. Encoding [Modular, lossless, effort: 2] Compressed to 830.9 kB including container (0.013 bpp). Encoding [Modular, lossless, effort: 3] Compressed to 906.9 kB including container (0.014 bpp). Encoding [Modular, lossless, effort: 4] Compressed to 341.7 kB including container (0.005 bpp). ```
2024-10-24 10:34:01
photo film 3d digital_painting vs not
2024-10-24 11:34:04
retime with optimized build
afed
2024-10-25 07:53:22
seems updated and new sets <:FeelsReadingMan:808827102278451241> https://github.com/WangXuan95/Image-Compression-Benchmark
2024-10-25 07:53:38
https://github.com/WangXuan95/NBLI
Orum
2024-10-25 08:06:35
> It can also beat the SOTA JPEG-XL SOTA?
2024-10-25 08:06:46
State of the Art?
2024-10-25 08:07:35
and beat it *how*? If it's just in pure compression efficiency, that's not terribly interesting unless it's at least as fast
jonnyawsom3
2024-10-25 08:07:44
> JPEG-XL v0.9.0 cjxl.exe in.pnm out.jxl -q 100 -e 8 --quiet --num_threads=0 A shame, but still rather good results for a single thread
2024-10-25 08:08:11
Means it's not using chunked encoding
afed
2024-10-25 08:20:24
yeah, it's single-threaded and tuned only for photos, but anyway, photos may compress much faster at pretty high efficiency (like jxl e6-8), as HALIC has also shown
_wb_
2024-10-25 08:58:33
Hardcoding stuff for single-threaded 8-bit RGB does come with some benefits in speed and compression, but I don't think it is an acceptable limitation in 2024 to handle only that.
A homosapien
2024-10-25 10:31:06
> Most of them are Windows executable files (.EXE). I put them in the codec folder. ~~Wait a minute, I hope they aren't using the 0.9 binaries provided on github. They are 2-3 times slower than other releases. MSVC was misconfigured or buggy iirc ~~ nvm, I forgot the performance regression was just affected VarDCT.
CrushedAsian255
2024-10-25 10:40:45
Is it open source? Someone should look at how it works
A homosapien
2024-10-25 10:42:14
https://tenor.com/view/evil-laugh-rub-hands-patrick-star-evil-plan-gif-15072939
2024-10-25 10:42:16
Maybe we can port over some algorithms for 8 bit images
CrushedAsian255
2024-10-25 10:47:19
https://github.com/WangXuan95/NBLI/blob/main/src/NBLI/AdvancedPredictor.h it seems to have a really intricate predictor model
2024-10-25 10:50:06
This is the main file https://github.com/WangXuan95/NBLI/blob/main/src/NBLI/NBLIcodec.h
2024-10-25 10:53:28
They list what they took inspiration at https://github.com/WangXuan95/NBLI/blob/main/src/NBLI/NBLIcodec.h
2024-10-25 10:54:01
` - And of course, Claude E. Shannon.` Nice
afed
2024-10-26 03:55:18
8-bit probably because it's pretty common for images and it's easier to get started same for single threading, easier for further experiments and improvements, while codec can still have big changes, but it's not such big problem to make multithreading later, again HALIC as an example, which later got support for multithreading and even if considering hardcoded 8-bit and and not the most optimal compilers for libjxl, it's sometimes 10x speed difference for the same efficiency
Meow
CrushedAsian255 https://github.com/WangXuan95/NBLI/blob/main/src/NBLI/AdvancedPredictor.h it seems to have a really intricate predictor model
2024-10-26 05:09:48
NBLI = small nb = small awesome (or cow v*lv*)
Orum
2024-10-26 01:00:26
if it eventually handles MT and > 8-bit then I'll be interested
Dejay
2024-11-02 04:23:02
Has anybody done some comparison of packJPG and precomp vs jxl transcode of jpg? From my quick tests it seems packJPG is quite a bit more efficient for archival of jpg
2024-11-02 04:23:29
I've only tested on comic books so that might be different to photos
2024-11-02 04:23:32
``` The Last Human 000-032.cbz │ │ 57897 KB The Last Human 000-032.cbz.pcf │ │ 46034 KB The Last Human 000-032.d0.jxl.cbz │ │ 51485 KB The Last Human 000-032.pjg.7z │ │ 45375 KB ```
2024-11-02 04:24:31
pcf = precomp, pjg.7z = packJPG
CrushedAsian255
2024-11-02 04:27:47
Big thing with JXL is it needs to be 1) still an image not just bytes, 2) really fast to decode
2024-11-02 04:28:09
The others can probably do more fancy things like DC prediction from AC which JXL can’t
2024-11-02 04:28:18
Also try setting higher effort on JXL
2024-11-02 04:28:29
(Yes lossless transcode uses effort as well)
A homosapien
2024-11-02 04:28:51
Not necessarily a fair comparison. packJPG & dropbox's lepton are just that, archival formats. They don't have to worry about being an actual image format with all the responsibilities that come with it.
2024-11-02 04:29:16
Like actually being decoded and displayed for example
Dejay
2024-11-02 04:29:18
Yeah I'm just testing out stuff
2024-11-02 04:29:37
Don't mean to cast shade on jxl 😉
CrushedAsian255
2024-11-02 04:30:04
Try seeing how well lossless AVIF compares lol
A homosapien
2024-11-02 04:30:12
Speaking of jpeg re-packers, the best one so far was lepton I think
2024-11-02 04:30:25
actually, jxl beat lepton in a few edge cases I remember
Dejay
2024-11-02 04:30:42
I would be curious if lossless transcoding of jpg comic books to multi page jxl could make use of some similarities
2024-11-02 04:31:19
I assume no such encoder exists yet, and it would be a pretty rare use case
2024-11-02 04:32:20
Ah cool... so there is packJPG, brunsli and lepton?
A homosapien
2024-11-02 04:32:44
Those are the main ones I am aware of
CrushedAsian255
2024-11-02 04:32:45
Does lossless JPEG even support multi frame images)
2024-11-02 04:33:13
What about just jpegultrascan to optimise the JPEGs
Dejay
CrushedAsian255 Does lossless JPEG even support multi frame images)
2024-11-02 04:33:29
No, that would be comic book jpgs in a zip (or rar) file, converted into a single jxl multi page
CrushedAsian255
2024-11-02 04:34:40
So not being able to restore the original JPEGs?
Dejay
2024-11-02 04:35:19
Well (I imagine) theoretically you could write an encoder that way, to restore the original zip file bitexact from a multi page jxl
afed
2024-11-02 04:36:37
`-e 10 -I 100 -E 3 --brotli_effort=11` can't remember exactly, `-E 3` probably does nothing in newer versions and yeah, jxl is better because it's normal images with all the features, not just an archive
Dejay
2024-11-02 04:36:48
But really there are only two cases: 1. archival to restore zip archives bitexact 2. compress comic book archive visually lossless
2024-11-02 04:38:03
And for 1 it's better to have something like precomp
2024-11-02 04:38:26
I would like to write a comic book reader app though that can just open precomp archives
A homosapien
afed `-e 10 -I 100 -E 3 --brotli_effort=11` can't remember exactly, `-E 3` probably does nothing in newer versions and yeah, jxl is better because it's normal images with all the features, not just an archive
2024-11-02 04:42:46
yes, 0.10 and after `-E 3` does nothing. Also effort 9 is better than effort 10. It's a known issue
2024-11-02 04:43:31
https://github.com/libjxl/libjxl/issues/3888#issuecomment-2450725691
afed
afed `-e 10 -I 100 -E 3 --brotli_effort=11` can't remember exactly, `-E 3` probably does nothing in newer versions and yeah, jxl is better because it's normal images with all the features, not just an archive
2024-11-02 04:50:41
then `-e 10 -I 100 --brotli_effort=11` or `-e 9 -I 100 --brotli_effort=11` and if needed + `--allow_jpeg_reconstruction=0` and + `-x strip=exif` because after tests on some jpegs, `-e 10` can still be better, so `-e 9` is not always best and `-e 11` is not implemented for jpegs, as far as I know
A homosapien
2024-11-02 05:02:21
Yeah effort 11 isn't a thing yet for lossless jpeg reconstruction. I find that effort 9 is usually smaller on average but it doesn't hurt to try both
Dejay
2024-11-02 05:02:59
But --brotli_effort=11 should do something? What is the default? (never mind, default is 9)
afed
2024-11-02 05:03:46
yeah, if there's any metadata
CrushedAsian255
2024-11-02 05:04:06
What is Ben 10 effort
2024-11-02 05:04:09
Brotli effort
A homosapien
2024-11-02 05:04:21
no we are talking about regular encoding effort: `-e 9`. Brotli effort should always be maxed out if you want maximum compression: `brotli_effort 11`
CrushedAsian255
2024-11-02 05:04:54
alias cjxl=“cjxl —brotli_effort 11”
afed
2024-11-02 05:05:08
`--brotli_effort=11` better compression for exif and such
Dejay
2024-11-02 05:05:36
So if I strip metadata anyway it shouldn't make a difference?
CrushedAsian255
2024-11-02 05:05:36
Ah so like xz -1 vs xz -9e ?
2024-11-02 05:05:46
Why strip metadata
A homosapien
Dejay So if I strip metadata anyway it shouldn't make a difference?
2024-11-02 05:06:08
probably, but if you want to archive stuff, don't strip metadata
2024-11-02 05:07:46
ya know, the whole point of bit-exact reconstruction is preservation of the originals and all that
Dejay
2024-11-02 05:08:23
I'm sort of trying to figure out what I want to do lol. If I want to archive stuff, I'd want to be able to restore the containing zip files bitexact (e.g. torrent). So that means precomp. If I cant then I could just as well strip it
afed
2024-11-02 05:08:47
sometimes it's useless data for just viewing images, but if it's needed, then yes, better to keep it
monad
A homosapien no we are talking about regular encoding effort: `-e 9`. Brotli effort should always be maxed out if you want maximum compression: `brotli_effort 11`
2024-11-02 11:58:20
_maximum compression for some threshold of allowed compute_
Dejay Has anybody done some comparison of packJPG and precomp vs jxl transcode of jpg? From my quick tests it seems packJPG is quite a bit more efficient for archival of jpg
2024-11-02 12:02:10
comparison from a couple years ago https://discord.com/channels/794206087879852103/803645746661425173/937627806408523777
Dejay
monad comparison from a couple years ago https://discord.com/channels/794206087879852103/803645746661425173/937627806408523777
2024-11-03 04:22:26
Thanks! It seems web optimized jpg is already less compressible than most "normal" jpgs. (also good to know there isn't much difference with packjpg and lepton)
monad
2024-11-03 08:44:02
in this case, not exactly "web optimized". most images originated from the web, but all subsequently passed through significant local jpeg optimizations.
_wb_
2024-11-03 08:45:41
There is certainly a difference between a camera jpeg which is typically sequential with fixed Huffman tables, and a typical web jpeg, like the output of mozjpeg, which is progressive with optimized Huffman tables.
Dejay
2024-11-03 09:29:31
Is it ever worth it to downscale for "quality per filesize"? Like if you have a 4k image, does it ever make sense to scale down to 1080p or 720p instead of using a worse distance / quality?
2024-11-03 09:30:57
Like if you want to match a filesize of say 100kb for an image
monad
2024-11-03 09:31:59
it can make sense at some threshold and libjxl already implements such judgement
Dejay
2024-11-03 09:34:54
Are there some benchmarks? or a term I can use to search for?
2024-11-03 09:35:27
Or is there a formula, like if I half the resolution of a 4k image, the butteraugli distance increases by 4 or something
2024-11-03 09:37:00
Sorry for the weird questions haha
_wb_
2024-11-03 09:41:29
https://github.com/libjxl/libjxl/blob/adeeccc415f7c18e6a1732d4c9d6d905ed8e2f9b/lib/jxl/enc_frame.cc#L92
2024-11-03 09:41:38
That's what libjxl currently does
2024-11-03 09:42:06
At d20 it instead does d6 on a 2x downscaled image
𐑛𐑦𐑕𐑣𐑸𐑥𐑩𐑯𐑦 | 最不調和の伝播者 | 異議の元素
2024-11-03 09:53:40
https://cdn.discordapp.com/attachments/1156999429782515723/1302549045356527666/lurk.png
2024-11-03 09:53:51
https://cdn.discordapp.com/attachments/1156999429782515723/1302570142655582238/lurk_googly.png
2024-11-03 09:54:09
two instances of `cjxl` failing horribly at SSIMU2 80
_wb_
2024-11-03 09:55:23
How large is the lossless version? Is lossy really useful for an image like this?
𐑛𐑦𐑕𐑣𐑸𐑥𐑩𐑯𐑦 | 最不調和の伝播者 | 異議の元素
2024-11-03 09:55:34
param: `cjxl -j 0 -d 5 -e 7 -p --progressive_dc 1`
_wb_ How large is the lossless version? Is lossy really useful for an image like this?
2024-11-03 09:56:23
419.5 KiB
2024-11-03 09:56:40
currently both WebP and AVIF are more viable
_wb_
2024-11-03 10:00:04
Their lossless version is smaller or what do you mean?
𐑛𐑦𐑕𐑣𐑸𐑥𐑩𐑯𐑦 | 最不調和の伝播者 | 異議の元素
_wb_ Their lossless version is smaller or what do you mean?
2024-11-03 10:00:58
I meat lossy version at SSIMU2 score 80, with WebP at 24.7% and AVIF at 9.95%. JXL is at 37.2%
2024-11-03 10:02:19
the lossless versions in WebP and JPEG XL are on-par, lossless AVIF is still way worse
_wb_
2024-11-03 10:04:44
Ah. Yes, webp and avif have lossy encoders that are better at this kind of image. Libjxl's lossy encoder is suitable for photographic images but for non-photo it isn't really using the available coding tools in a very good way...
jonnyawsom3
2024-11-03 12:34:17
You could give `-m 1` a shot, should result in a different score at least
𐑛𐑦𐑕𐑣𐑸𐑥𐑩𐑯𐑦 | 最不調和の伝播者 | 異議の元素 I meat lossy version at SSIMU2 score 80, with WebP at 24.7% and AVIF at 9.95%. JXL is at 37.2%
2024-11-03 12:36:25
Are those percentages of the original filesize? Just to confirm
𐑛𐑦𐑕𐑣𐑸𐑥𐑩𐑯𐑦 | 最不調和の伝播者 | 異議の元素
2024-11-03 12:36:40
yup
jonnyawsom3
𐑛𐑦𐑕𐑣𐑸𐑥𐑩𐑯𐑦 | 最不調和の伝播者 | 異議の元素 I meat lossy version at SSIMU2 score 80, with WebP at 24.7% and AVIF at 9.95%. JXL is at 37.2%
2024-11-13 04:44:59
Just accidentally clicked the channel and remembered I never did my testing I got SSIMU2 80 at 26% with lossy modular `-m1 -d 3`, a score of 90 at 36% with delta palette`cjxl --lossy-palette --palette=0 -m` (I can only get it working in version 0.6), but the smoothing of WebP and AVIF will win out for smooth images until JXL can take advantage of its splines
Dejay
2024-11-14 05:33:47
Is there an approximate buttergaugli distance / quality where avif becomes better (smaller) than jpegXL? Like is that distance at d=2 or more like d=10?
jonnyawsom3
2024-11-14 06:01:58
If I recall d3 is the highest recommended, although you can probably go to 5 maybe with resampling depending on the image (AVIF does better with lineart and smooth images)
Dejay
If I recall d3 is the highest recommended, although you can probably go to 5 maybe with resampling depending on the image (AVIF does better with lineart and smooth images)
2024-11-14 06:06:48
Thanks. Lineart and smooth gradients seems to apply for comics and webtoons.
jonnyawsom3
2024-11-14 06:11:16
Oh, you could also try lossy modular like I mentioned above. Tends to do well with gradients, but adds some color fringing at edges
Dejay
2024-11-14 06:12:16
Is jxl expected to surpass avif at low bitrate with additional development?
2024-11-14 06:13:04
AV1 is especially good at low bitrate, it becomes less detailed but creates no ugly artifacts so just looks better. Is that a fundamental advantage of avif vs jxl?
A homosapien
Dejay Is jxl expected to surpass avif at low bitrate with additional development?
2024-11-14 07:08:31
In theory yes. The techniques/algorithms used in jxl are more advanced than avif. The current encoder isn't tuned for low bit rate content, especially non-photographic media.
2024-11-14 07:11:24
Also some advanced encoder tools are not being used (like splines) or could be improved (like patches). Patches and splines can really help with encoding artwork, lineart, etc.
2024-11-14 07:11:56
Many people have mentioned this before on this server but Jpeg XL has *HUGE* potential.
2024-11-14 07:13:12
We really are just at the tip of the iceberg honestly.
Dejay
A homosapien In theory yes. The techniques/algorithms used in jxl are more advanced than avif. The current encoder isn't tuned for low bit rate content, especially non-photographic media.
2024-11-14 07:15:58
Awesome, thanks
jonnyawsom3
2024-11-14 07:24:44
Lineart, but with actual lines instead of blurring and DCT artifacts :P
AccessViolation_
2024-11-14 09:47:30
I will say that AVIF's de-ringing is pretty clever
2024-11-14 09:48:16
I'm curious how JXL and AVIF are going to compare when JXL is eventually well optimized/tuned for lower bitrates as well
jonnyawsom3
2024-11-14 09:48:53
In the end, it depends how low you go
CrushedAsian255
A homosapien We really are just at the tip of the iceberg honestly.
2024-11-14 11:13:24
More like we are still travelling to the iceberg
𐑛𐑦𐑕𐑣𐑸𐑥𐑩𐑯𐑦 | 最不調和の伝播者 | 異議の元素
2024-11-15 12:21:52
are there any possibility that improved patches and/or splines will come to JXL encoders soon?
_wb_
2024-11-15 12:25:29
Soon, I doubt. I am not aware of anyone currently working on either of those.
jonnyawsom3
monad
2024-11-15 01:24:01
Patches, maybe. It's been improved before, but the code was accidentally deleted before it could be submitted https://discord.com/channels/794206087879852103/803645746661425173/1280926171835662336 (Ignore my message about decode time underneath, it's unrelated) https://discord.com/channels/794206087879852103/803645746661425173/1247714711777054730
2024-11-15 01:24:29
<@386612331288723469> ^
Dejay
2024-11-15 10:06:32
So currently patches or modular tools are not used in VarDC mode right? What would be great is if patches worked even if they are some distance away, not just when they are perfect. Like with text with slight compression
2024-11-15 10:07:06
But I guess this is basically the same hard problem as OCR
jonnyawsom3
2024-11-15 10:15:27
Patches are used with VarDCT, but only at either effort 10 or images under 2048 in both dimensions. I *think* it allows slight differences too, but I could be wrong on that
A homosapien
2024-11-15 10:25:20
iirc lossy patches are used at e7 or e8, and they are using in a very simple manner, so it could definitely improved
veluca
Patches are used with VarDCT, but only at either effort 10 or images under 2048 in both dimensions. I *think* it allows slight differences too, but I could be wrong on that
2024-11-15 11:00:51
you are indeed correct
Demiurge
Dejay Is jxl expected to surpass avif at low bitrate with additional development?
2024-11-18 09:55:31
jxl bitstream is capable of very efficient compression at low bit rates but the current encoder was designed and optimized for high fidelity and high bitrates. A clever developer could make a low bitrate optimized encoder that is specifically designed for low bitrate and it could easily surpass avif then, but there is no motivation in most developers to write an encoder that is designed to operate at low bitrates that force painful compromises to be made to image fidelity
2024-11-18 09:57:03
Even though extreme compression ratios is exciting, it's also potentially dangerous and uncomfortable to design an encoder that can significantly change what's in the image...
2024-11-18 09:58:16
But personally I expect that to change when people try more clever tricks.
2024-11-18 09:59:39
Eventually someone is going to want to try some of the very clever tricks that are possible in jxl but still unused
2024-11-18 10:02:22
Like spline encoding, layered decomposition, noise replacement, jxl delta palette tricks, perceptual noise shaping, and even near-lossless compression filters and techniques
2024-11-18 10:03:18
All of those have enormous potential to decrease bitrate while maintaining visual fidelity. None of them are available in current jxl encoders
2024-11-18 10:04:21
So basically it's a really future proof and outstandingly clever bitstream format but current jxl encoders like libjxl are still in the neolithic era
2024-11-18 10:05:50
But I expect high fidelity/high speed encoding modes not to use most of those techniques
2024-11-18 10:07:28
(Except noise shaping. That's something useful at all quality and speed levels.)
2024-11-18 10:08:01
Only low bitrate and low speed encoding would bother using most of those techniques that would significantly slow down encode and decode
2024-11-18 10:08:34
Maybe some can be accelerated in hardware someday...
2024-11-18 10:11:40
Noise replacement and perceptual spectral masking are probably the low hanging fruit right now that I would expect libjxl to improve upon next
2024-11-18 10:13:42
The others I would not expect any time soon unless an enthusiast/hobbyist tries making a new super encoder
A homosapien
Demiurge jxl bitstream is capable of very efficient compression at low bit rates but the current encoder was designed and optimized for high fidelity and high bitrates. A clever developer could make a low bitrate optimized encoder that is specifically designed for low bitrate and it could easily surpass avif then, but there is no motivation in most developers to write an encoder that is designed to operate at low bitrates that force painful compromises to be made to image fidelity
2024-11-18 10:14:02
> but there is no motivation in most developers to write an encoder that is designed to operate at low bitrates that force painful compromises to be made to image fidelity I disagree, there is still room to improve low-bitrate performance without comprising image fidelity. Look at svt-av1-psy, the improvements are downright impressive. They took a format we thought was near it's limit when it came to image fidelity and they completely flipped that on it's head. It's at a point where avif is now *beating* Jpeg XL at even medium-high quality encodes. Basically, what I'm saying is that we can have our cake and eat it too. Since Jpeg XL is still in it's infancy, there are plenty of improvements to be made which are __straight upgrades, no compromises necessary__. The more I think about it, <@386612331288723469> was right, we *are* still traveling to the iceberg.
Demiurge
2024-11-18 10:14:14
But I don't have a crystal ball
A homosapien > but there is no motivation in most developers to write an encoder that is designed to operate at low bitrates that force painful compromises to be made to image fidelity I disagree, there is still room to improve low-bitrate performance without comprising image fidelity. Look at svt-av1-psy, the improvements are downright impressive. They took a format we thought was near it's limit when it came to image fidelity and they completely flipped that on it's head. It's at a point where avif is now *beating* Jpeg XL at even medium-high quality encodes. Basically, what I'm saying is that we can have our cake and eat it too. Since Jpeg XL is still in it's infancy, there are plenty of improvements to be made which are __straight upgrades, no compromises necessary__. The more I think about it, <@386612331288723469> was right, we *are* still traveling to the iceberg.
2024-11-18 10:15:32
I agree, but the problem is no one has been brave enough to try bold techniques and optimizations for the low bitrate, low speed (like avif) case.
2024-11-18 10:17:35
Like I said libjxl is still only using stone age techniques when the jxl bitstream format has space age tools sitting on the shelf untouched.
2024-11-18 10:19:09
Maybe someone from the svtav1psy team could "switch teams" ;) I think jxl as a format has a lot more long term viability and potential for obvious reasons.
2024-11-18 10:22:14
tl;dr it's not the format, it's the encoder. jxl is a better designed and more future proof standard in my opinion but the current libjxl encoder is very conservative and limited
A homosapien
2024-11-18 10:22:30
Brave enough? I don't think bravery is the issue. It's just a matter of time. The sheer number of potential pit falls present in writing a complex encoder is insane. Not to mention the large amounts of time spent on testing to catch regressions and minimize edge cases. It's quite a task for a small dev group, let alone one person.
Demiurge
A homosapien Brave enough? I don't think bravery is the issue. It's just a matter of time. The sheer number of potential pit falls present in writing a complex encoder is insane. Not to mention the large amounts of time spent on testing to catch regressions and minimize edge cases. It's quite a task for a small dev group, let alone one person.
2024-11-18 10:23:54
The problem is libjxl is complex in terms of dependencies and c++ spaghetti but it's very conservative and limited when it comes to functionality
_wb_
2024-11-18 10:24:35
It's not easy, but in a way writing an encoder doesn't have to be that hard either. After all, you don't have to use all coding tools available. You could start with just a JPEG encoder (only dct8x8) and then gradually add more stuff to it, for example.
Demiurge
_wb_ It's not easy, but in a way writing an encoder doesn't have to be that hard either. After all, you don't have to use all coding tools available. You could start with just a JPEG encoder (only dct8x8) and then gradually add more stuff to it, for example.
2024-11-18 10:25:43
Yep! That's a great way to start, too. Bootstrapping, you could say
A homosapien
2024-11-18 10:25:55
Nevertheless I agree, jxl is MUCH more future proof. And I think investing the time and effort will payoff a thousand fold.
Demiurge
2024-11-18 10:25:57
Get the basics down right first
2024-11-18 10:26:21
That's the best way to start any project
2024-11-18 10:27:06
Then incremental improvements can always be added later as long as the basic foundation is solid and not monstrously complex
A homosapien
_wb_ It's not easy, but in a way writing an encoder doesn't have to be that hard either. After all, you don't have to use all coding tools available. You could start with just a JPEG encoder (only dct8x8) and then gradually add more stuff to it, for example.
2024-11-18 10:31:40
Reminds me of the development of rav1e, they started off simple and gradually added more codec techniques overtime. Laying a solid foundation helped rav1e to become the best AV1 codec of its time.
2024-11-18 10:31:58
Nowadays it's quite stagnant, I don't know why it's not being developed anymore but I keep hearing about it's potential. It's quite sad. 😔
Demiurge
2024-11-18 10:32:00
It's how it's done
A homosapien Nowadays it's quite stagnant, I don't know why it's not being developed anymore but I keep hearing about it's potential. It's quite sad. 😔
2024-11-18 10:32:12
It's slow, that's why
2024-11-18 10:32:21
It's good quality though.
A homosapien
2024-11-18 10:32:54
I thought there was no more funding or something like that.
Demiurge
2024-11-18 10:32:57
Just very slow and people need to do things that put food on the table
2024-11-18 10:33:06
Yeah probably
2024-11-18 10:33:15
Wasn't it mozilla or xiph?
A homosapien
2024-11-18 10:33:30
Xiph
Demiurge
2024-11-18 10:33:35
Mozilla doesn't spend money on anything worthwhile anymore, they have a strict policy
2024-11-18 10:33:49
Mozilla used to be xiph's main funding source
2024-11-18 10:34:14
Mozilla only spends money on milking the brand to death and being vultures and vampires
2024-11-18 10:34:29
Not engineering anymore
A homosapien
2024-11-18 10:35:25
So I've heard
CrushedAsian255
2024-11-18 10:36:05
How similar are the coding tools in AV1/AVIF to JXL? I’m not that familiar with AV1
A homosapien
CrushedAsian255 How similar are the coding tools in AV1/AVIF to JXL? I’m not that familiar with AV1
2024-11-18 10:38:59
https://discord.com/channels/794206087879852103/794206170445119489/1285283645988409424 and https://discord.com/channels/794206087879852103/794206170445119489/1248537640316174337
Demiurge
2024-11-18 10:38:59
Not very.
2024-11-18 10:50:44
Basically avif has a lot of very strong pre/postprocessing filters built in for smoothing out macroblock artifacts and other DCT artifacts. JXL tries to avoid those artifacts in the first place using clever spec design, and also has multiple diverse tools that are completely different from DCT, for encoding different kinds of content, and they can be layered and combined in creative ways.
2024-11-18 10:51:40
I think jxl is actually capable of a lot more unique and diverse tricks than a boring DCT video intra codec.
CrushedAsian255
2024-11-18 10:52:17
so AVIF is bascially VarDCT * 0.5 + Restoration filters * 9001
Demiurge
2024-11-18 10:52:33
It has more potential tools in the toolbelt. Like I said, space age tools. Libjxl is currently only playing with sticks and stones.
2024-11-18 10:55:04
Someone just needs to make an encoder that plays around with the more advanced tools. Just like how webp has near-lossless mode or gif has gifski, by comparison libjxl is super conservative and plain
CrushedAsian255
2024-11-18 10:55:34
welp, time to fail at writing an encoder! 😄
Demiurge
2024-11-18 10:55:34
The super fast fjxl mode is cool though
2024-11-18 10:55:56
That was very impressive
2024-11-18 10:56:18
Modular mode is actually very impressive too
2024-11-18 10:56:32
Including squeeze
CrushedAsian255
2024-11-18 10:56:49
lossy modular could do some cool stuff
Demiurge
2024-11-18 10:57:07
So much potential there! It has not even been tuned and optimized and it looks as good or better than default DCT mode on average! Wow! That's insane!
2024-11-18 10:57:19
Maybe it should be the new default? Screw DCT!
CrushedAsian255
2024-11-18 10:57:37
add them together \:D
2024-11-18 10:57:42
oh wait, that's called JPEG XL
2024-11-18 10:58:00
some kind of encoder heuristic that tells which one would be better
Demiurge
2024-11-18 10:58:07
That would be even better but also twice as slow if every image is 2 layers
CrushedAsian255
2024-11-18 10:58:33
im thinking like if encoding a screenshot, encoding it in Modular but if it detects a picture, encode that using VarDCT
2024-11-18 10:58:58
because lossless Modular can be smaller than lossy VarDCT in some types of images
Demiurge
CrushedAsian255 some kind of encoder heuristic that tells which one would be better
2024-11-18 10:58:59
Or an image processing kernel that divides the image into a dct "texture" layer and modular "cartoon" layer
CrushedAsian255
2024-11-18 10:59:25
this sounds even cooler than AV1 palette blocks
Demiurge
2024-11-18 10:59:28
Then encodes them in parallel
CrushedAsian255
2024-11-18 10:59:35
now to find someone who can write the code to do this...
2024-11-18 10:59:43
and who has time to
2024-11-18 10:59:45
and wants to
2024-11-18 10:59:50
and has the financial incentive to ..?
Demiurge
2024-11-18 10:59:59
Av1 is a boring dct intra codec made with ancient technology when 4:2:0 was still considered cool, sorry!
CrushedAsian255
2024-11-18 11:00:36
avif is effectively webp++ but without the good lossless mode
Demiurge
2024-11-18 11:00:39
It really doesn’t belong in the same league as jxl!
2024-11-18 11:01:08
Unfortunately you should not judge jxl the format based on the current state of libjxl the encoder
CrushedAsian255
2024-11-18 11:01:23
jpeg xl is next-gen JPEG plus next-gen PNG, squared
Demiurge
2024-11-18 11:02:01
The design of the bitstream is super clever
CrushedAsian255
2024-11-18 11:02:33
still sad that xyb is global instead of per-frame \;(
2024-11-18 11:02:43
=[
Demiurge
2024-11-18 11:02:57
Like Jon says, if jpeg was alien technology from the future (as it has been called before), jxl needs to be the "next gen alien technology from the future."
2024-11-18 11:03:36
And it really looks like that's how the bitstream format was thoughtfully designed
CrushedAsian255
2024-11-18 11:03:48
that's why chrome codec team didn't want to add jpeg xl, they were scared of aliens!
Demiurge
2024-11-18 11:03:58
It was designed with maximum future potential in mind
2024-11-18 11:04:13
With possible untapped improvements looooong into the future
2024-11-18 11:04:42
The future proof design really really stands out compared to all other formats
2024-11-18 11:05:29
Similar to how the original jpeg is still being improved upon today
2024-11-18 11:06:38
It takes everything good about JPEG, learns from it and gives it a few more well known image coding tools to play with and combine together.
2024-11-18 11:07:54
While trying to avoid long established mistakes and ambiguities of the past
CrushedAsian255
2024-11-18 11:08:27
-# *join the jpeg xl revolution*
Fox Wizard
2024-11-18 11:33:22
<:WhiteFoxSalute:689481667412623385> <a:Military:821038589571235850>
Dejay
A homosapien https://discord.com/channels/794206087879852103/794206170445119489/1285283645988409424 and https://discord.com/channels/794206087879852103/794206170445119489/1248537640316174337
2024-11-18 05:27:27
Thanks that was what I was looking for
jonnyawsom3
CrushedAsian255 im thinking like if encoding a screenshot, encoding it in Modular but if it detects a picture, encode that using VarDCT
2024-11-18 06:23:02
https://github.com/libjxl/libjxl/pull/1395
2024-12-12 10:43:36
Made a very dodgy comparison of jpegli for high bitdepth use https://github.com/Beep6581/RawTherapee/issues/7125#issuecomment-2538513015
Oleksii Matiash
Made a very dodgy comparison of jpegli for high bitdepth use https://github.com/Beep6581/RawTherapee/issues/7125#issuecomment-2538513015
2024-12-12 11:06:19
Jpegli is definitely better in color channels, but blurs luma 😦
jonnyawsom3
2024-12-12 11:07:43
The quality was 'only' set to 96 there with 4:2:0 subsampling and AQ enabled, so it's expected that the fine details would be lost regardless
2024-12-12 11:08:14
Piss... I should've re-encoded the JXL at the same quality, that was at -d 0.3
2024-12-12 11:08:36
Ah well, the main point is the decoder difference, not the quality itself
A homosapien
2024-12-12 08:50:29
honestly its soo cool how well jpegli performs
jonnyawsom3
2024-12-13 11:04:58
Added a quality 100 4:4:4 comparison too
A homosapien
2024-12-18 01:01:18
2024-12-18 01:01:19
Working on lossy VarDCT right now. Using a 6.25 MPx, 25 MPx, and 100 MPx image.
jonnyawsom3
2024-12-18 02:01:13
I'd probably do the standard monitor resolutions, 1080, 4K, 8K and then an extreme like 100 MP
A homosapien
2024-12-18 03:43:15
yeah, I'm working with an image with similar dimensions to 4K right now.
2024-12-18 09:13:50
Messy messy graph. Blue = Memory. Green = Time
2024-12-18 09:15:34
gonna switch to excel, google sheets sucks
CrushedAsian255
2024-12-18 10:26:44
maybe they should be on seperate graphs, its kind of hard to read
A homosapien
2024-12-18 09:04:16
CrushedAsian255 maybe they should be on seperate graphs, its kind of hard to read
2024-12-18 11:29:33
2024-12-18 11:40:13
Oh yeah I should mention that I'm using a nightly build, v0.12.0 2368781
Orum
2024-12-23 02:39:16
there any comparisons between fpng, fpnge, and <:JXL:805850130203934781>?
2024-12-23 02:50:37
ah, it looks like there are some old benchmarks on it
Demiurge
2024-12-24 01:45:07
fjxl is the fastest 🎉
Orum
2024-12-24 02:11:32
isn't fjxl rolled into the main encoder now? i.e. its code is used in the lower efforts?
veluca
2024-12-24 02:12:38
for `-d 0 -e 1`, yep
A homosapien
2024-12-25 02:05:53
4371x5828 image, on Windows
2024-12-25 05:03:16
2024-12-25 05:05:24
100 MP will take ages...
2024-12-25 05:05:31
But I won't give up
CrushedAsian255
2024-12-25 06:58:42
Add -e 11 coward
AccessViolation_
2024-12-25 09:13:53
Is that spike in decode time for -e 3 because effort 3 is the one that exclusively uses the self-correcting predictor?
A homosapien
2024-12-25 09:16:33
Probably, the internals of libjxl are an enigma to me
jonnyawsom3
2024-12-25 10:27:41
Hmm... Wonder if effort 3 also has higher quality because of being self correcting
veluca
AccessViolation_ Is that spike in decode time for -e 3 because effort 3 is the one that exclusively uses the self-correcting predictor?
2024-12-25 12:05:24
I guess so yep
2024-12-25 12:05:51
but I wouldn't use lossy modular much tbh 😛
CrushedAsian255
veluca but I wouldn't use lossy modular much tbh 😛
2024-12-25 12:08:36
I use lossy modular for d < 0.15
veluca
2024-12-25 01:04:14
why?
CrushedAsian255
veluca why?
2024-12-25 01:06:15
I treat it like WebP near lossless
veluca
2024-12-25 01:07:15
I'd be surprised if vardct didn't do better
2024-12-25 01:07:26
possibly with slightly modified flags
CrushedAsian255
2024-12-25 01:14:32
I haven’t actually tested it lol
2024-12-25 01:14:48
I guess I’m too used to the quality ceiling that WebP has
2024-12-25 01:15:05
Due to its unfortunate design of being based on VP8
Orum
A homosapien
2024-12-25 02:12:56
any fast decode tuning?
AccessViolation_
Hmm... Wonder if effort 3 also has higher quality because of being self correcting
2024-12-25 02:34:06
My understanding of the self-correcting predictor is that it's a different approach to predicting entirely. On higher effort levels there's a bunch of expensive checks going on to determine which predictor is best on any given section of the image or MA tree leaf. There are no such checks when the self-correcting predictor is used, it just naively uses it everywhere. The idea is that it is generally *good enough* for all image data, but not as good as trying all of the possible predictors and going with the right one (anyone correct me if I'm wrong)
2024-12-25 02:36:15
And being self-correcting is what makes it "good enough on all image data." It'll do an alright job adapting to the image data, but it's possible there was another another predictor that would have done better that wasn't evaluated
veluca
2024-12-25 02:36:34
you can certainly mix the self-correcting predictor with the logic to determine a good predictor, fwiw
AccessViolation_
2024-12-25 02:39:03
For sure, and there's probably some cases where the self-correcting predictor even does better than any other predictor, and I assume in that case it's just another predictor that can be chosen for a certain context
veluca you can certainly mix the self-correcting predictor with the logic to determine a good predictor, fwiw
2024-12-25 02:40:45
Are signals from the self-correcting predictor actually used to inform which of the other predictors to pick? Like are signals from it used to inform predictor selection? Or am I misunderstanding you
2024-12-25 02:41:44
Because that's actually interesting, I don't know how predictor selection works, I thought it just tries them all and goes with the best
veluca
2024-12-25 02:46:33
there's a decision tree that looks at a few things to decide which predictor to use, the decision tree is encoder-decided
AccessViolation_
2024-12-25 02:55:27
If that tree is the MA tree, that matches my understanding. If not I have some more reading up to do :D
veluca
2024-12-25 03:06:34
yep
A homosapien
2024-12-26 10:41:15
Finally, 100 MP is done <:Hypers:808826266060193874> Here are the encode results:
2024-12-26 10:42:31
Here are the decoding results:
2024-12-26 10:44:57
For lossy modular effort 9, my guess would be that it chose a certain predictor which was very easy to decode.
veluca
A homosapien For lossy modular effort 9, my guess would be that it chose a certain predictor which was very easy to decode.
2024-12-26 10:52:03
huh that's very surprising
Orum
2024-12-26 04:58:33
why not put the modular and varDCT on the same graph so they're easy to compare? 🤔
jonnyawsom3
2024-12-26 06:09:40
Because Excel wasn't having it
Orum
2024-12-26 07:35:16
Excel <:PepeGlasses:878298516965982308>
A homosapien
2024-12-26 09:01:01
I decided to have separate graphs for better readability
2024-12-26 09:01:12
I'm too tired to learn Excel atm
2024-12-26 09:04:36
I'll do `faster_decoding` benchmarks, probably with the 25 MP image
Orum any fast decode tuning?
2024-12-28 12:55:40
2024-12-28 12:59:00
There are a few caveats. __Levels that are bit-exact or bugged are represented with a 0.__ 1. VarDCT: levels 2 and 3 are bit-exact. 2. Lossy modular: Levels 2, 3, and 4 are bit-exact. 3. Lossless: Levels 1 and 2 are bugged. Levels 3 and 4 are bit-exact.
2024-12-28 01:01:58
In conclusion faster decoding is a footgun for anything Modular. There seems to be a case to be made for VarDCT, although I think 4 levels is overkill considering the number of bit-identical images. I think just having one level, being `--faster_decoding=2` or `--faster_decoding=4` makes more sense.
CrushedAsian255
2024-12-28 02:01:06
what does it even do for modular?
2024-12-28 02:01:11
disable RCT?
Orum
A homosapien There are a few caveats. __Levels that are bit-exact or bugged are represented with a 0.__ 1. VarDCT: levels 2 and 3 are bit-exact. 2. Lossy modular: Levels 2, 3, and 4 are bit-exact. 3. Lossless: Levels 1 and 2 are bugged. Levels 3 and 4 are bit-exact.
2024-12-28 04:38:05
why does bit-exact get a 0? 🤔
A homosapien
Orum why does bit-exact get a 0? 🤔
2024-12-28 05:05:23
Because it's the exact same result, same BPP/decode speed/etc.
2024-12-28 05:06:18
For example, levels 2 and 3 are bit-exact, so for level 3 just look at level 2.
2024-12-28 05:06:51
It also illustrates how redundant the *four levels* of faster decoding are.
2024-12-28 05:07:05
In my opinion there should only be one *maybe* two levels
jonnyawsom3
2024-12-28 05:36:11
I'm not actually sure what faster decoding does currently. I'd assume disable expensive predictors like weighted, but it's not guaranteed
Quackdoc
2024-12-28 05:41:50
I think all it does now is break things [av1_dogelol](https://cdn.discordapp.com/emojis/867794291652558888.webp?size=48&name=av1_dogelol)
jonnyawsom3
2024-12-28 06:44:31
I'd guess it's literally *just* disabling weighted, so there's no prediction used instead
veluca
2024-12-28 08:28:06
for dct it made some sense - stuff like turning off some filters and/or larger transforms
2024-12-28 08:28:29
not sure why it was 4 levels though