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

on-topic

Whatever else

GlassGhost
2022-11-29 09:56:53
I'm not the best at finding sources, also I believe one of you might know off the top of your head: I assume there is little to none degradation in DCT compression vs the full DFT compression Do any of you know any papers comparing the 2?(besides the extra performance of just doing half the dft for the dct)
Traneptora
GlassGhost I'm not the best at finding sources, also I believe one of you might know off the top of your head: I assume there is little to none degradation in DCT compression vs the full DFT compression Do any of you know any papers comparing the 2?(besides the extra performance of just doing half the dft for the dct)
2022-11-29 11:33:25
dft is unnecessary
2022-11-29 11:34:17
dct is closer to a fourer series decomposition than a true fourier transformation
GlassGhost
2022-11-29 11:34:33
Even the phase information information is useless?
Traneptora
2022-11-29 11:35:21
well think of dct as a decomposition into cosines
2022-11-29 11:35:44
where fft is a decomposition into complex exponentials
2022-11-29 11:36:27
phase information is determined by the leading coefficients
2022-11-29 11:36:36
of the cosines
2022-11-29 11:37:03
for real signals, the cosines provide that phase info
2022-11-29 11:39:01
since these are discrete sampled signals there's no even vs odd component to throw away
2022-11-29 11:39:44
you don't need to perfectly reconstruct the original. it just has to agree at the samples
GlassGhost
2022-11-29 11:39:51
We agreee Phase is the direction of the complex number, and magnitude the absolute value or root of cos^2 + sin^2. I was just wondering if there was any information in there or the idft just throws the phase info away I still never read anything on the idft
2022-11-29 11:41:10
Idft throws away phase info ?
Traneptora
2022-11-29 11:41:35
phase info isn't needed because a sum of aligned cosines can reconstruct the original
2022-11-29 11:41:58
do note that idct is a real value only operation
2022-11-29 11:42:08
it inverts the real dct
2022-11-29 11:42:32
idft needs that phase info but idct doesn't
GlassGhost
2022-11-29 11:43:21
So the phase info is indeed completely useless as far as compression is concerned?
Traneptora
2022-11-29 11:43:44
it's not useless per se, it's just redundant
2022-11-29 11:44:29
DCT decomposes a block into a sum of cosines which have zero phase
2022-11-29 11:45:03
so there is no phase info to encode
2022-11-29 11:45:26
think of it like a sum of cosines, not like a real fft
GlassGhost
2022-11-29 11:45:39
I believe we are in agreement, I just want to push that no one has recovered a single extra bit using it correct?
Traneptora
2022-11-29 11:46:10
it's N samples in and N samples out
2022-11-29 11:46:19
and mathematically invertible
2022-11-29 11:46:46
on a fixed size block, DCT is a linear transformation
2022-11-29 11:47:20
ie you can write it as say an 8x8 matrix for n=8
2022-11-29 11:48:34
because it's linear and maps from R8 to R8
2022-11-29 11:49:22
so indeed there's nothing to recover
2022-11-29 11:49:59
the loss comes from writing higher frequency coefficients with lower precision
2022-11-29 11:50:27
not from the transformation itself
GlassGhost
2022-11-29 11:54:31
I will take that as a very detailed yes no one has got a single bit from it and even if they did they would need more than 1 bit.
2022-11-29 11:54:57
Thank you.
2022-11-29 11:57:48
I just knew the info was there and wanted confirmation it was redundant, thanks again.
2022-11-30 12:01:46
I mean I guess it would make sense that the phase would spin by the same frequency as as the sine and cosine waves, which we would know regardless when we encoded it.
2022-11-30 12:05:07
And since from the frequency of the wave and the current point we could calculate the current phase, and with the current phase and cosine value we could calculate the sine value.
afed
2022-11-30 12:48:23
yeah, I tried, but it would be easier to use for me and also if there was non xyb-mode encoding
sklwmp
2022-11-30 05:48:40
oh that's painful
2022-11-30 05:49:44
at 0.3bpp i think AVIF performs better than JXL, but that is still way too low imo
diskorduser
2022-11-30 07:27:42
Avif can beat jxl at 0.3 but it needs slower encoding preset.
novomesk
Jim False positives happen all the time. If someone reported it I am sure they are correcting it.
2022-11-30 07:53:11
Dear Sir/Madam, Thank you for contacting us. We have reviewed your submission for whitelisting of your software and the submitted files have been Whitelisted. Regards, McAfee Data Submission Team
joppuyo
2022-11-30 08:28:08
I think this is one of the few cases where lossy webp works well. JPEG at the same BPP would be blocky mess
2022-11-30 08:28:54
Still, it doesn’t look particularly nice. Maybe they are optimizing for mobile phone use case with really low bandwidth?
afed
2022-11-30 02:16:50
about color spaces, from the video and image compression perspective and also metrics accuracy, will LUV be better than LAB and how much different from XYB (if not considering performance)?
Traneptora
2022-11-30 02:18:55
what is LUV in this context?
afed
2022-11-30 02:19:47
I think this: <https://en.wikipedia.org/wiki/CIELUV>
spider-mario
afed about color spaces, from the video and image compression perspective and also metrics accuracy, will LUV be better than LAB and how much different from XYB (if not considering performance)?
2022-11-30 02:22:49
the author of “Color Appearance Models” thinks it’s worse: https://www.dpreview.com/forums/post/66160798
afed
2022-11-30 02:23:08
It's just that for some metric calculations there is sometimes a choice of LUV or YUV (or for L or Y respectively), I was curious which of these would be more accurate
Traneptora
2022-11-30 02:23:19
YUV is very different from LUV
2022-11-30 02:23:27
YUV is a common abbreviation for YCbCr
2022-11-30 02:23:55
which is just RGB but matrix transformed
afed
2022-11-30 02:25:49
found also something <:FeelsReadingMan:808827102278451241> https://gist.github.com/Myndex/47c793f8a054041bd2b52caa7ad5271c
Traneptora YUV is very different from LUV
2022-11-30 02:39:37
yeah, i understand, i meant that for example i have a choice to compare either Y (from YUV) or L (from LUV) on the video or image, using some metrics (say SSIM or MS-SSIM) and which will theoretically be more accurate (for human perception)
Traneptora
2022-11-30 02:40:00
ah, you want to do a grayscale comparison
2022-11-30 02:40:14
L* from LAB and LUV are identical btw
2022-11-30 02:40:37
at least according to the wikipedia article you linked
afed
2022-11-30 02:40:50
something like that, for very fast comparisons by metrics
Traneptora
2022-11-30 02:40:54
You could also consider Y from CIEXYZ
2022-11-30 02:41:38
if you want a super fast comparison from RGB you could use the BT.709 matrix which is just a linear combination of R, G, and B to produce Y
2022-11-30 02:42:03
the fastest one I'm familiar with is YCoCg's Y, which is `0.25 * (R + B) + 0.5 * G`
2022-11-30 02:42:20
and it's more relevant than RGB
2022-11-30 02:42:32
but less relevant than the other ones
2022-11-30 02:42:42
honestly you could probably just straight up extract the green plane if you want superduper fast
afed
2022-11-30 02:48:26
fast, but still with good accuracy for human perception, something balanced
veluca
2022-11-30 02:56:40
that's very hard to give recommendations for without knowing what balance you're looking for
afed
2022-11-30 03:08:51
as an example of calculating quality with metrics and when I can choose: compare all Y and U and V, but it will be slower, but I can also compare only Y as the most important or I can also choose L from LUV, and which would theoretically be better for comparison in terms of human perception (Y or L)
veluca
2022-11-30 03:40:41
eh, I'd do 6/8 MSE-Y + 1/8 (MSE-U + MSE-V) as seems to be a reasonable standard if you're limited to MSE... but SIMDfied, so it's faster 😛
afed
2022-11-30 04:05:41
because according to various research, for most metrics, only Y component has almost the same correlation with visual quality as YUV sum with coefficients (and usually something like 10:1:1 is also better), so calculating only Y is reasonable (and faster) but, I thought maybe L would be somewhat better (besides, it's been added to some metrics for some reason)
Traneptora
2022-11-30 04:30:16
if you're working with integers then 6/8 and 1/8 are very fast
2022-11-30 04:30:57
as they're just `((x << 1) + x) >> 2` and `x >> 3` respectively
veluca
2022-11-30 04:33:34
(you can also write (x*3)/4 and presumably your compiler will do the right thing)
Traneptora
2022-11-30 04:37:25
yea, true, lol
2022-11-30 04:37:51
if you have unsigned integers then `x >> 2` and `x / 4` are equivalent
2022-11-30 04:38:27
if you have negative integers it's complicated because `x >> 2` for negative `x` is, UB but usually on x86 it behaves `floor(x / 4.0)`
2022-11-30 04:38:42
and `x / 4` is `ceil(x / 4.0)` for negative `x`
2022-11-30 04:39:13
so the compiler can't necessarily make that optimization unless it knows the integers are positive, e.g. if they are unsigned
sklwmp
2022-12-01 02:23:09
if ~1.0 is visually lossless for butteraugli, what's visually lossless for ssimulacra2? 90?
BlueSwordM
sklwmp if ~1.0 is visually lossless for butteraugli, what's visually lossless for ssimulacra2? 90?
2022-12-01 03:25:39
I'd say 92.
Jyrki Alakuijala
2022-12-01 10:47:11
1.0 used to be lossless for the original butteraugli
2022-12-01 10:48:06
I made a calibration mistake at one stage leading to 0.95 being lossless, I decided not to correct for it later when I noticed it, so that moved the level (this mistake was around 2019 when we were already working towards JPEG XL)
2022-12-01 10:48:47
then we changed butteraugli to work better with jpeg xl compression and even more to work better with neural compression
2022-12-01 10:49:18
I consider that those changes made butteraugli's previous 1.0 to be available somewhere around 0.7 to 0.8
2022-12-01 10:50:59
then finally, the viewing distance is an issue
2022-12-01 10:51:46
to benefit from butteraugli's calibration, you need to be 900 pixels away from the image
2022-12-01 10:52:17
if you are closer, you will be able to see loss -- especially in yellow-blue colors
2022-12-01 10:54:43
if you are further, say 1800 pixels away, a higher value will usually work to indicate visually losslessness, but not always 4x since some of the calculations are related to scale
2022-12-01 11:17:14
correct -- 15.6 * 2.5/ (1920*1920+1080*1080)**0.5*900==15.93 cm
2022-12-01 11:17:41
or you can zoom the image with 500 % and be ~80 cm away
2022-12-01 11:18:39
in modern times the screen resolutions and image resolutions have diverged, especially so in mobile
diskorduser
2022-12-02 02:19:47
so, it does not work on anime images or is it depend on encoding process?
joppuyo
2022-12-02 02:26:05
it probably works best with images that have one clear focal point like portraits but less successfully with images that don't have one, like images of landscapes
diskorduser
2022-12-02 02:30:25
not working well with pikachu <:SadCat:805389277247701002>
2022-12-02 02:31:23
pikachu pics matter
afed
2022-12-02 02:31:25
it must be encoded with this tool `The flags and arguments for --center_x, --center_y and --group_order are automatically injected.` <https://github.com/google/attention-center>
diskorduser
2022-12-02 02:32:19
Oh. yeah. I already guessed it somewhat
Moritz Firsching
2022-12-02 03:46:42
Yeah, by default it starts on the top left and goes in scanline order. When you pass `--group_order=1` it starts in the geometric center of the image and spirals out in squares from there. . When you also pass `--center_x` and/or `--center_y` it will start at with the tile that contains the (x, y) coordinate and spirals out in squares from there.
2022-12-02 03:49:25
I would hope that the attention center model is able to find something close to the center of the face of pikachu
Jyrki Alakuijala
diskorduser pikachu pics matter
2022-12-02 07:43:20
don't you look at the tail first??!?!? more seriously, feel free to file bugs -- there is a dedicated researcher for this problem and they will be happy to receive counterexamples and they will study them.
joppuyo
2022-12-02 08:52:19
ok, this might be a dumb question but how does one calculate image file size from bits per pixel?
2022-12-02 08:52:40
if I have a 1920x1080 image at 1 bpp, how large is it gonna be?
Fraetor
2022-12-02 08:57:40
The number if pixels will be 1920 times 1080, so 2073600.
Traneptora
joppuyo if I have a 1920x1080 image at 1 bpp, how large is it gonna be?
2022-12-02 08:57:51
well you calculate the number of pixels, and then you do `bits/pixel * pixels = bits`
Fraetor
2022-12-02 08:58:19
Therefore 1 bit per pixel will be 2.07 Mb
Traneptora
2022-12-02 08:58:54
2.07 Mb, which is 259200 Bytes
2022-12-02 08:58:57
or ~259 kB
joppuyo
2022-12-02 09:01:48
thank you, got it 👍
_wb_
2022-12-02 09:14:38
For a 1 megapixel image, 0.1 bpp means 12.5 kb. For most images, that is way too small to be usable.
sklwmp
2022-12-03 09:56:00
What exactly does Chrome/those in the Chromium team stand to gain by blocking JPEG XL adoption in favor of AVIF? I can't figure out what exactly they're getting other than simply propagating the use of AVIF.
2022-12-03 09:56:24
They don't exactly earn more money by people using AVIF instead of JPEG XL.
_wb_
2022-12-03 10:06:27
My hypothesis: 1) some kind of paternalistic concept that web devs will get "confused" if there are two state-of-the-art formats, whatever that means 2) AVIF is "their baby" so they want it to be successful. JXL is likely actually a threat to the success of AVIF, at least for still images. 3) if they can kill JXL, there might be more focus on making encoder improvements and general tooling/support improvement for AVIF.
Jim
2022-12-03 01:30:19
I think it's a combination of 2 and 3. Possibly also 4) Google is reviewing many projects and looking for returns
_wb_
2022-12-03 01:55:48
(btw 1 is not something I invented, this is what Chrome people have recently said in a private meeting with Cloudinary people as being one of the reasons for removing jxl)
Jim
2022-12-03 02:05:25
I see 1 as one of the those misguided ever-changing reasons that are used when you have no good excuse for something. It started as "this format is not good these other people have aspirations to use it for other things in the future." Then it morphed into "we don't need an all-in-one image format" (as if a video and image codec isn't the same thing). Then it became "well the web doesn't need all these web features that have been used for decades." Then it came back around to "we don't need 20 image formats" (even though there are fewer modern formats than originals). This also includes the "people will get confused" argument. It's just scrambling for anything to try to squash a competitor by throwing one argument after another even when they keep getting debunked one after another.
_wb_
2022-12-03 02:18:28
You are probably right. It seems to be mostly an already-made conclusion in search for a justification
2022-12-03 02:23:39
There might be some genuine feeling amongst avif proponents that jxl really does not bring sufficient improvement, or that they will be able to improve avif to "bridge the gap", e.g. by making faster and better encoders.
sklwmp
_wb_ (btw 1 is not something I invented, this is what Chrome people have recently said in a private meeting with Cloudinary people as being one of the reasons for removing jxl)
2022-12-03 02:24:21
oh, so there are also private discussions about this? i mean, i don't know why i am surprised, but good to know google isn't completely silent on this front
_wb_
2022-12-03 02:25:06
They weren't very useful so far, but yes.
2022-12-03 02:25:55
Mostly they wanted to know what we were missing in avif so they can put it in avif2...
sklwmp
2022-12-03 02:26:14
so instead of webp2, we get avif2...
_wb_
2022-12-03 02:26:51
Since somehow they want to reduce the confusion of too many formats but having an avif2 is not an issue
sklwmp
_wb_ Since somehow they want to reduce the confusion of too many formats but having an avif2 is not an issue
2022-12-03 02:27:11
¯\_(ツ)_/¯
Jim
2022-12-03 02:28:33
Wow, that's even worse... "We're going to kill your format but let us know what we can do down the road to not get so much hate for being authoritarian, monopolistic, and anti-competitive."
2022-12-03 02:28:38
<:PepeGlasses:878298516965982308>
2022-12-03 02:29:24
Suddenly the antitrust lawsuits going after AOM are starting to make sense.
sklwmp
_wb_ Since somehow they want to reduce the confusion of too many formats but having an avif2 is not an issue
2022-12-03 02:30:28
WebP and WebP2 JPEG and JPEG XL AVIF and AVIF2 well that's just great
_wb_
2022-12-03 02:30:53
WebP2 is likely not going to happen afaiu
sklwmp
2022-12-03 02:31:12
oh right, forgot about that
Jim
2022-12-03 02:31:26
WebP2 is already dead. From what I heard some of them went into AVIF and are likely working on AVIF2.
sklwmp
2022-12-03 02:31:31
well, i guess of the three "successor" formats Chrome wants only one to survive 🙂
_wb_
2022-12-03 02:32:00
Yeah I guess they want everyone to work on av2/avif2
2022-12-03 02:33:31
Or on av1/avif improvements, I dunno
Jim
2022-12-03 02:34:25
I know there are issues taken out for adding some of the jxl features to avif but most of the discussion ended last year. Seems they punted to avif2.
2022-12-03 02:34:52
Though who knows when avif2 would even see the light of day.
sklwmp
2022-12-03 02:35:35
So instead of adopting a format with the improvements people want now, they want to create a new format that'll probably be ready a few years in the future, probably with less features? I really cannot understand it, but hey, Google can do what they want.
Jim
2022-12-03 02:36:22
Pretty much
2022-12-03 02:36:57
Google did drop their "Do no evil" slogan recently (not that it did much good prior).
sklwmp
2022-12-03 07:35:25
From the tracking bug for the Merge Request fixing decode speed in M109: https://bugs.chromium.org/p/chromium/issues/detail?id=1392656#c14 > <@795684063032901642>, out of curiosity, why work on improving JPEG-XL if Chrome is going to remove it? I want to make sure that the decoding of JPEG XL files in chrome works as intended, which includes fixing bugs concerning decoding speed. This way users will have the best experience trying it out while it is still in chrome behind a flag.
2022-12-03 07:38:17
It's a little annoying to see a fix come in that will only be active for one, just ***ONE*** version (M109) before it is due to be removed (M110).
2022-12-03 07:39:52
I understand if the flag was only to be *deprecated* in M110, as the original coverage told us: https://www.phoronix.com/news/Chrome-Deprecating-JPEG-XL However, as of now they plan to *remove* it outright: https://chromium.googlesource.com/chromium/src/+/ec4bd43806b882b9faf155e413814aa0f809edcb
2022-12-03 07:40:41
So the impact of this fix is quite minimal, although I appreciate it trying to give us the best experience while it still can.
_wb_
2022-12-03 08:36:45
We have no idea what exactly they will do in M110
2022-12-03 08:39:23
They can just expire the flag at M110 instead of M115 — that would mean you can still use it in M110-111 (I think), but first you need to enable the flag to unexpire flags that have expired.
2022-12-03 08:40:13
They can also actually remove the flag and/or code.
2022-12-03 08:41:03
They could theoretically also just do nothing and have a note in the flag description that doesn't correspond to reality
uis
Jim Suddenly the antitrust lawsuits going after AOM are starting to make sense.
2022-12-04 09:15:54
Nah. That lawsuits are by -LA patent trolls.
_wb_
2022-12-05 08:06:37
2022-12-05 08:08:33
2022-12-05 08:11:10
it produces quite nice output but of course it has no idea what it means. Lossless with target quality < 90, what?
diskorduser
2022-12-05 08:13:02
What is this? Ai based wiki?
_wb_
2022-12-05 08:13:44
2022-12-05 08:13:51
https://chat.openai.com/
2022-12-05 08:14:04
2022-12-05 08:14:38
2022-12-05 08:15:39
2022-12-05 08:16:52
2022-12-05 08:19:40
2022-12-05 08:21:25
2022-12-05 08:23:35
2022-12-05 08:23:51
Kleis Auke
2022-12-05 08:32:08
FWIW, ChatGPT hasn't been trained on data after 2021.
w
2022-12-10 11:11:26
maybe
afed
2022-12-13 07:45:22
XYB JPEGs <:PepeGlasses:878298516965982308> `Firefox now supports properly color correcting images tagged with ICCv4 profiles.` https://www.mozilla.org/en-US/firefox/108.0/releasenotes/
BlueSwordM
afed XYB JPEGs <:PepeGlasses:878298516965982308> `Firefox now supports properly color correcting images tagged with ICCv4 profiles.` https://www.mozilla.org/en-US/firefox/108.0/releasenotes/
2022-12-13 07:59:38
Bro, they should really support JPEG-XL at this point if they support ICCv4.
pandakekok9
2022-12-14 02:33:25
<@288069412857315328> Reddit doesn't seem to like the PNG fallback generated by embed.moe, i.e. Reddit doesn't generate a larger thumbnail in the comments page. Is there a way around this? https://old.reddit.com/r/touhoutest/comments/zlep03/jpegxl_test_png_fallback/
2022-12-14 02:33:45
Compare to https://old.reddit.com/r/polandball/comments/s7wr0a/forward_kinking/ which is also a PNG outside of Reddit
w
2022-12-14 03:01:33
if you can figure out the headers that Reddit sends when displaying/generating the image
2022-12-14 03:01:45
I'm away for a couple of weeks so I can't test it
veluca
afed XYB JPEGs <:PepeGlasses:878298516965982308> `Firefox now supports properly color correcting images tagged with ICCv4 profiles.` https://www.mozilla.org/en-US/firefox/108.0/releasenotes/
2022-12-14 10:18:39
About darn time...
pandakekok9
2022-12-14 11:54:39
I think that article you linked just deals with the small thumbnail that is beside the title to the left (which is generated correctly in my case), what I need is the larger thumbnail below the title of the post but above the comments
2022-12-14 11:58:08
Also oEmbed seems to be meant for generating thumbnails for link posts that lead to webpages, my case deals with direct links to images themselves
sklwmp
2022-12-14 03:00:55
i guess mozjpeg's djpeg doesn't yet work with jpegli from git master... or maybe i'm doing something wrong, probably that one because i know nothing about this
_wb_
2022-12-14 03:10:57
I suppose it doesn't have ABI compatibility yet? only partial API compatibility?
veluca
2022-12-14 03:33:02
it *should* have ABI compatibility AFAIU
szabadka
sklwmp i guess mozjpeg's djpeg doesn't yet work with jpegli from git master... or maybe i'm doing something wrong, probably that one because i know nothing about this
2022-12-14 04:00:04
interesting, the same thing works for me, I think the issue might be that the system jconfig.h that was used to compile jpegli is different from mozjpeg's jconfig.h, specifically the JPEG_LIB_VERSION macro, which can change the size of the jpeg_decompress_struct, so I will have to make sure that at jpegli-compile time we set JPEG_LIB_VERSION to 62
diskorduser
2022-12-14 04:11:35
Image not loading on Firefox
2022-12-14 04:11:43
2022-12-14 04:12:00
<@794205442175402004>
_wb_
2022-12-14 04:13:36
hm, are you using non-nightly firefox with jxl enabled maybe?
2022-12-14 04:14:44
I think the cloudinary blog will send jxl images to browsers which say they can decode jxl — like firefox does when you enable the flag, even if it doesn't actually have a jxl decoder if you're not on nightly...
diskorduser
2022-12-14 04:16:44
Oh. I'm using Firefox beta
_wb_
2022-12-14 04:24:12
just disable the jxl flag on firefoxes that are not nightly
sklwmp
szabadka interesting, the same thing works for me, I think the issue might be that the system jconfig.h that was used to compile jpegli is different from mozjpeg's jconfig.h, specifically the JPEG_LIB_VERSION macro, which can change the size of the jpeg_decompress_struct, so I will have to make sure that at jpegli-compile time we set JPEG_LIB_VERSION to 62
2022-12-14 11:40:33
okay, so slight wrinkle: i *do* have mozjpeg installed via the AUR, but it compiles with -DWITH_JPEG8=TRUE see ldd output even with LD_PRELOAD: ``` ❯ LD_PRELOAD="$HOME/dev/libjxl/build/lib/jpegli/libjpeg.so.62" ldd $(which djpeg) linux-vdso.so.1 (0x00007ffc96d9f000) /home/louie/dev/libjxl/build/lib/jpegli/libjpeg.so.62 (0x00007fbd34e75000) libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007fbd34da0000) libc.so.6 => /usr/lib/libc.so.6 (0x00007fbd34bb9000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fbd34982000) libm.so.6 => /usr/lib/libm.so.6 (0x00007fbd3489a000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fbd3487a000) /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fbd34e9b000) ``` what exactly is the difference between jpeg8 and jpeg62 that the AUR package compiles mozjpeg with that?
afed
2022-12-15 02:58:08
https://www.macrumors.com/2022/12/14/apple-considering-non-webkit-iphone-browsers/
szabadka
sklwmp okay, so slight wrinkle: i *do* have mozjpeg installed via the AUR, but it compiles with -DWITH_JPEG8=TRUE see ldd output even with LD_PRELOAD: ``` ❯ LD_PRELOAD="$HOME/dev/libjxl/build/lib/jpegli/libjpeg.so.62" ldd $(which djpeg) linux-vdso.so.1 (0x00007ffc96d9f000) /home/louie/dev/libjxl/build/lib/jpegli/libjpeg.so.62 (0x00007fbd34e75000) libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007fbd34da0000) libc.so.6 => /usr/lib/libc.so.6 (0x00007fbd34bb9000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fbd34982000) libm.so.6 => /usr/lib/libm.so.6 (0x00007fbd3489a000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fbd3487a000) /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fbd34e9b000) ``` what exactly is the difference between jpeg8 and jpeg62 that the AUR package compiles mozjpeg with that?
2022-12-15 09:18:22
There are some new API functions in jpeg8 and some new fields in the compressor and decompressor objects that some applications might use. Versions 6.2, 7 and 8 are mutually ABI-incompatible, so probably jpegli will have to provide all 3 versions, or 1 depending on some compile-time flag.
2022-12-15 10:47:31
Right now it uses the system jpeglib.h without any modification so it will be fundamentally compatible with whatever version is installed, but note that not even all of the 6.2 library functions/features are implemented yet.
_wb_
2022-12-15 01:10:50
later today, I'll be doing this: https://www.headlesscreator.com/upcoming-live-streams
2022-12-15 01:11:19
https://www.headlesscreator.com/an-overview-to-image-compression
2022-12-15 01:13:19
Here are my slides from the previous one I did in that series: https://docs.google.com/presentation/d/1ZEXaI7Hy6jRn94VMdxAOS1sKSWfC5qHr-6ihHc9N_mY/edit?usp=sharing
Jim
2022-12-15 05:03:48
New AI image-based 3D object creation uses progressive image loading to generate objects that get finer detail as the images are downloaded & rendered: https://youtu.be/aQctoORQwLE Would JXL be a good fit?
paperboyo
_wb_ https://www.headlesscreator.com/an-overview-to-image-compression
2022-12-15 06:12:06
Thank you, enjoyed the presentation! Two qs regarding this slide: 1. I didn’t know that at higher qualities, mozjpeg will produce bigger size for the same quality as libjpeg! (am I reading the graph correctly?) 2. [similarly to how I was surprised to read AVIF encoding is faster than JXL in Google’s paper] I’m surprised the graph is not showing commonly agreed benefit of AVIF over JXL at lower qualities. Is it that you omitted those qualities from the graph or…?
_wb_
2022-12-15 06:19:32
1. Yes, at some point mozjpeg seems to start getting worse than libjpeg. This happens around q87 or so. Could be that its default quant tables are tuned for the 'web quality' range and start to get worse at the higher end, I dunno. 2. As you may have guessed, the vertical axis here is ssimulacra2. Note that I'm only showing results here for ssimulacra2 above 40, and I'm using the avifenc default regarding chroma subsampling (which is 4:4:4 when using png input), while at the low end, avif with 4:2:0 does a little better.
2022-12-15 06:19:43
https://storage.googleapis.com/avif-comparison/images/subset1/rateplots/subset1_avif-jxl_t-8_avif-s7_jxl-s6_ssimulacra2__bpp-0.1-3.0.png
2022-12-15 06:22:31
the avif team comparison plot was made with a version of libjxl that doesn't have the fix yet for the discontinuity around 0.5 bpp
2022-12-15 06:22:48
current libjxl is in blue, the one they tested is in red
Peter Samuels
2022-12-15 06:23:23
By current do you mean the release build 0.7.0 or the current development build?
_wb_
2022-12-15 06:23:43
that basically pushes down the crossover point between avif and jxl into the very silly low bitrates
2022-12-15 06:24:07
Current means what is on git now
Peter Samuels
2022-12-15 06:24:16
oh ok
_wb_
2022-12-15 06:25:11
or more exactly: after this was merged: https://github.com/libjxl/libjxl/pull/1825
2022-12-15 06:27:49
here are the slides I used, by the way: https://docs.google.com/presentation/d/1w6HA4WrPU9JlFokABtwKYNnb-H6Ydk9VHjLfn2ybwSQ/edit?usp=sharing
paperboyo
_wb_ or more exactly: after this was merged: https://github.com/libjxl/libjxl/pull/1825
2022-12-15 06:39:59
So not available at https://storage.googleapis.com/demos.webmproject.org/webp/cmp/index.html 😢. (yeah, I still find these comparisons useful when I quickly explain stuff to people. and to myself)
_wb_
2022-12-15 06:41:34
As things are now, I would estimate the crossover between avif and jxl to happen below 0.2 bpp / ssimulacra2=20 at the 'useful' speed settings, and around 0.35 bpp / ssimulacra2=50 when allowing extremely slow avif encoding.
2022-12-15 06:44:22
libjpeg-turbo q40 gets an average ssimulacra2 score of 58.7, to give you an indication of what that means
2022-12-15 06:45:00
libjpeg-turbo q16 gets an average ssimulacra2 score of 24.2
2022-12-15 06:46:16
so I don't think this crossover point is still worth mentioning — who cares about qualities lower than libjpeg-turbo q20?
2022-12-15 06:49:44
this crossover point used to be significantly higher 2 years ago, but it changed over time as avif encoders got faster (default speed is now a lot faster in libaom but also somewhat worse) and libjxl got better
paperboyo So not available at https://storage.googleapis.com/demos.webmproject.org/webp/cmp/index.html 😢. (yeah, I still find these comparisons useful when I quickly explain stuff to people. and to myself)
2022-12-15 06:50:50
not yet, but I hope they'll at some point do a new one with updated version of everything.
2022-12-15 06:52:00
I also find that comparison page useful, even though they're doing slowest avif against default jxl which is not quite fair, it makes the point even better when the jxl has better fidelity 🙂
paperboyo
2022-12-15 06:59:34
OK. So, a) allowing for maximum of good will on G part (I’m tad too old for all conspiracy theories and righteous anger) and b) forgetting all “operational” reasons (we already have one, choice between one is easier than between two, smaller attack surface, spec is paid etc; which I agree do play a role! some role at least), what do you think G thinks are **real-world, tangible** benefits of AVIF over JXL? Because I’m bad at reading graphs and, try as I might, I haven’t seen a human-readable description of those by Google… 1. the fact that at insanely slow speed and at insanely low qualities (and this is coming from someone who thinks only those qualities matter on the web; to him, anyway), AVIF produces more pleasing artifacts? 2. weird encoding speed differences which nullify pt. 1? Like, really, what?
2022-12-15 07:00:24
Animation?
_wb_
2022-12-15 07:18:31
Well for animation av1 is clearly better than any 'animated' intra-only still image format (though I would have done that by just allowing video formats in the img tag)
2022-12-15 07:24:52
If you look at the main page of the avif team comparison, they do seem to think that 1) avif decode is faster than jxl, 2) avif encoding is fast, 3) lossy avif compression is better than jxl. And if that's the case, and jxl is only better in lossless (and you ignore things like progressive and jpeg recompressions), then sure, it would make sense to conclude that jxl does not bring enough advantages to justify adding it to the web platform.
2022-12-15 07:26:26
In the 'maximum of good will' interpretation, they actually believe points 1-3 based on the numbers they obtained, and it was just an honest mistake to compute those numbers the way they did.
2022-12-15 07:28:02
In that case, I hope my blog post will help to improve the way they do comparisons so they will look at more relevant metrics and quality ranges, see the value jxl brings, and reconsider their assessment and decision.
2022-12-15 07:29:18
The alternative explanation, which I very much hope is wrong, is that they did the comparison in bad faith to make avif look better than it really is, and in that case they'll likely just ignore my blog post completely.
2022-12-15 07:32:44
Only time will tell. I very much hope for the interpretation where they just made honest mistakes in their evaluation methodology. Mistakes can be learned from and corrected, so that could lead to a good outcome.
2022-12-15 07:35:53
The ball is now in their court, I think. Chrome's reaction to my blogpost will be revealing, one way or the other. They have a chance now to show that they're actually data-driven decision makers who try to do the right thing based on the info they have, or they can essentially admit that they're not interested in doing the right thing. I am extremely curious what will happen next.
2022-12-15 08:39:21
https://youtu.be/0NBjObx13rs
2022-12-15 08:39:57
<:Agree:805404376658608138> Youtube recording in case you missed the live one
Jyrki Alakuijala
_wb_ The ball is now in their court, I think. Chrome's reaction to my blogpost will be revealing, one way or the other. They have a chance now to show that they're actually data-driven decision makers who try to do the right thing based on the info they have, or they can essentially admit that they're not interested in doing the right thing. I am extremely curious what will happen next.
2022-12-16 07:48:26
why would they react, they gave their data -- their data is clear to them (even when it uses old versions of JPEG XL)
2022-12-16 07:48:42
they can just observe the blog post as your interpretation without reaction
2022-12-16 07:49:36
I think they wrote only one of the 300 responses in the bug, they are not exactly chatty about JPEG XL
2022-12-16 07:50:46
if they wanted to get it right, they would have included someone from JPEG XL devs to get the tests done properly -- they did it alone by themselves
_wb_
2022-12-16 09:43:32
You may very well be right, but my point remains: their reaction (or lack thereof) will be revealing. Not reacting (just ignoring it) is certainly one option, but it will be widely seen as an admission of guilt. They claim the decision was based on data, and they claim they're open to feedback and suggestions on how to improve the data. They can keep silent for a few days, maybe even more by blaming the holidays, but at some point they will have to reveal whether those claims are true or not.
yoochan
2022-12-16 10:16:32
I tend to agree that even if it shows no immediate effect it is good to continue to apply pressure on every fronts 😄
Jim
_wb_ You may very well be right, but my point remains: their reaction (or lack thereof) will be revealing. Not reacting (just ignoring it) is certainly one option, but it will be widely seen as an admission of guilt. They claim the decision was based on data, and they claim they're open to feedback and suggestions on how to improve the data. They can keep silent for a few days, maybe even more by blaming the holidays, but at some point they will have to reveal whether those claims are true or not.
2022-12-16 11:27:29
For most people, the admission of guilt was when they acted to remove jxl in the first place, waited until late on a Sunday to respond using clearly inaccurate data, then doubled down by moving faster than they ever seem to move on getting rid of the code even as many, including large companies, put their support behind it. All the other stuff is just pouring excess icing on a cake. It's now smothered.
_wb_
2022-12-16 12:21:00
I don't think the data was "clearly inaccurate". From the point of view of a non-expert (and why would high-level decision makers in a browser organization be experts in image compression?), the data the avif team produced can very well look like they thoroughly and objectively examined several aspects and concluded that jxl only brings slightly better lossless compression, so it is not really worth keeping around in Chrome.
2022-12-16 12:23:39
It's indeed suspicious that they want to remove it so quickly just now others like Adobe and Serif start supporting it, but it is still a possibility that they acted in good faith in the best interest of the web platform, if they really thought avif is better than jxl on all fronts relevant to the web.
Jim
2022-12-16 12:42:42
> From the point of view of a non-expert (and why would high-level decision makers in a browser organization be experts in image compression?), the data the avif team... Because it wasn't, you said it in your own statement. It wasn't done by the Chrome team, but the AVIF team - who should be experts. At the very least highly knowledgeable. Which means they are either incompetent or designed the data so that non-experts would simply gloss over it as acceptable. I remember years ago when people would be laughed off the internet for posting biased or questionable data and benchmarks. Today it seems to happen fairly often and in some cases done in order to trick the average person into believing it was done well.
2022-12-16 12:44:43
> examined several aspects and concluded that jxl only brings slightly better lossless compression I wouldn't accept that even if it were lossy compression. Lossy is closer than lossless when it comes to jxl vs avif. However, they need to be comparing jxl vs jpg and jxl vs png and jxl vs gif. Not jxl vs avif. I'm sure they didn't compare avif to a new format.
_wb_
2022-12-16 01:23:18
Their reasoning is that new formats need to be compared to everything that is already in the browser, which makes sense.
2022-12-16 01:24:08
AVIF is there now, so JXL has to beat it. I don't entirely agree with that reasoning but it mostly makes sense.
Jim
2022-12-16 01:57:59
Exactly. That reason means JXL is already obsolete and they will never accept it. Except AVIF was designed for an entirely different purpose and they are ignoring that.
_wb_
2022-12-16 01:59:17
It is a problem that they completely rely on their own codec team to provide the data to make decisions. They made mistakes when evaluating WebP (grossly overestimating how much gains it brought, claiming it was 41% better than JPEG, see https://developers.google.com/speed/webp/docs/c_study?csw=1), they made the same mistakes when evaluating AVIF (see e.g. https://web.dev/compress-images-avif/ where they claim "50% better than JPEG", based on how things look at ultra low bitrates), and they simply ignore others (e.g. http://muizelaar.blogspot.com/2011/04/webp.html) and get their way anyway.
2022-12-16 02:02:40
It's one thing to use bad data to push your own thing even though the gains are not that big — at least there are some gains, and you're not really forcing any web dev to actually use your thing. It's another thing though to use bad data to block others' new things — that does mean you're forcing web devs to use inferior solutions.
Jim
2022-12-16 02:07:51
I don't agree with doing either one of those, but that they did it twice is even worse. They complained about a single format doing everything, but are pushing a format that was meant for one thing as if it should be used for everything.
2022-12-16 02:09:45
When people complain about it the response is: just use WebP.
Kleis Auke
2022-12-16 02:10:25
Has anyone already mentioned that libheif/libaom is much larger than libjxl? For example, on the draft PR in wasm-vips I see this: ``` $ ls -lh lib/*.wasm | awk '{print $5,$9}' 4.9M lib/vips-heif.wasm 2.0M lib/vips-jxl.wasm 5.2M lib/vips.wasm ``` 😅
2022-12-16 02:10:34
That is with `-O3`, both dynamic modules have full support (decode/encode).
_wb_
2022-12-16 02:12:07
for decoder-only, I suspect the difference is even larger. A lot of the libjxl code complexity is in the perceptual encoding...
joppuyo
2022-12-16 02:15:33
google literally does force developers to use webp or avif. if you use the pagespeed insights tool, it will complain if you don't use one of those formats
Kleis Auke
_wb_ for decoder-only, I suspect the difference is even larger. A lot of the libjxl code complexity is in the perceptual encoding...
2022-12-16 02:15:42
I suspect that the size of `vips-jxl.wasm` would also decrease when building from <https://github.com/libjxl/libjxl/commit/1d2225c252ce5fd906d3a12ee0dbed92e577076d>.
2022-12-16 02:15:49
Forgot to mention, the `vips-jxl.wasm` also contains a static build of brotli and highway. lcms2 resides in `vips.wasm`.
joppuyo
2022-12-16 02:16:20
the pagespeed score is a meaningless number anyway, but web site owners are still encouraged to follow whatever it spits out to "make number go up"
_wb_
2022-12-16 02:17:07
yeah it is actually a big problem, since these are not just meaningless numbers, they can affect your pagerank...
2022-12-16 02:18:24
so your website literally becomes harder to find if you don't respect the perf metrics Google/Chrome come up with
joppuyo
_wb_ yeah it is actually a big problem, since these are not just meaningless numbers, they can affect your pagerank...
2022-12-16 02:18:49
I think the pagespeed score is based entirely on "lab data" and not not affect ranking. the "Core Web Vitals Assessment" is what contributes to the ranking. if you have enough traffic it's actually based on real RUM traffic from chrome users using something called "CRUX"
Jim
2022-12-16 02:20:40
By how much is the question. Annoying ads/popups/popovers were supposed to lower you rank. Care to guess how many sites are in the top 5 that have an ever increasing amount of annoying ads, popovers, and in some cases popups? I bet it's fairly high considering what I've seen. It's either not very strong of a signal or it's bs considering their only metric for this is people backtracking to the search engine within a a certain amount of time (likely just a few seconds).
_wb_
2022-12-16 02:20:43
yeah, I don't know exactly which metric is used for what, but I do now that LCP plays a role in pagerank, and LCP currently ignores progressive loading and just looks at the time for the final image, which makes avif look better than it actually is compared to jpeg or even webp
2022-12-16 02:23:35
e.g. as far as LCP is concerned, in this cat example: https://cloudinary.com/blog/contemplating-codec-comparisons#progressive_rendering, it will say the avif is slightly better than the jxl in terms of the user experience of loading the page — which is nonsense of course
Jim
2022-12-16 02:29:10
They started having a discussion about how progressive rendering was going to work with LCP but last I saw, talks stopped. Likely because they didn't want it negatively affecting AVIF. Web.dev still incorrectly states that AVIF supports progressive rendering when it doesn't.
_wb_
2022-12-16 02:50:13
It does have an option to add embedded previews, which I guess is a kind of progressive rendering
2022-12-16 02:51:19
Not sure if it already works though, haven't seen a demo of it yet
Jim
2022-12-16 02:51:38
The encoder doesn't actually even support it. It was meant for cameras to add a preview so it wouldn't have to regenerate it each time for display.
_wb_
2022-12-16 02:52:35
You could claim WebP supports progressive too, since it can contain Exif and Exif can contain a thumbnail
Jim
2022-12-16 02:57:00
I think it does, but only the top-down rendering that really isn't used anymore.
_wb_
2022-12-16 03:00:13
Top-down rendering I usually call incremental or sequential decode.
2022-12-16 03:00:53
'Progressive' I prefer to reserve for rendering that gives full-image previews
Jim
2022-12-16 03:01:58
I call it progressive since everyone did back in the 90s when the actual progressive added too many extra bytes.
_wb_
2022-12-16 03:03:11
And yes, WebP does support top-down rendering and this is one of the reasons why libwebp is not just a wrapper for libvpx (the lossless codec is of course another reason).
2022-12-16 03:08:02
It was a significant pain to make libvpx do incremental decoding, since video codec libraries rarely need that (ultra-low-latency codecs being the exception). I wonder if they will do this with dav1d too, or if they will just define it to be not an issue.
Jim
2022-12-16 03:11:46
I highly doubt for the current spec. Devs have said that it supports it, but there is little interest in making it reality. Possibly for AVIF2, but no word.
_wb_
2022-12-16 03:12:07
In principle avif could be decoded incrementally too, but not really if the reasoning is "we get it for free with the video codec"
Jim
2022-12-16 03:13:41
Right now they are of the mindset that everyone should just lower the quality of the images to the point where it loads quickly just because the file size is so small you wouldn't notice a difference if it had progressive rendering.
_wb_
2022-12-16 03:15:59
Yeah, it's a strange mindset. If you care that little about images, you can also just give people the advice to make text-only websites. That will be even faster!
Jim
2022-12-16 03:19:53
I get the mentality since a few years back there was this mass push to make the web usable in developing nations where internet is shaky at best... but it shouldn't be at the expense of everywhere else. If you have a CDN that can lower the quality of images for slow connections, fine. But doing so in the browser is just not practical.
afed
2022-12-16 03:21:02
or txt2img, like txt2vid https://youtu.be/9fU5SN_OR2M
_wb_
Jim I get the mentality since a few years back there was this mass push to make the web usable in developing nations where internet is shaky at best... but it shouldn't be at the expense of everywhere else. If you have a CDN that can lower the quality of images for slow connections, fine. But doing so in the browser is just not practical.
2022-12-16 03:25:04
I think progressive rendering is a better solution to that than just lowering quality. Maybe combined with a browser option to only load the first N kb of every image until you explicitly ask to fully load it.
paperboyo
_wb_ 'Progressive' I prefer to reserve for rendering that gives full-image previews
2022-12-16 03:30:01
Isn’t JPEG progressive both? First it’s top-down and then progressive (with increasing resolution)? I know (at least?) Firefox (not sure about Chrome) decided to throw away some default mozjpeg scans, but would they not – it would be both, right?
Jim
2022-12-16 03:30:58
No, it's one or the other. You pick. Technically the non-progressive version is top-down.
afed or txt2img, like txt2vid https://youtu.be/9fU5SN_OR2M
2022-12-16 03:32:04
That is using AI to generate a your face. There is a lot of research going into that but is still a while away and will likely be questionable given people already trying to pretend to be present. However, that will only work for presentations, not any video.
_wb_
2022-12-16 03:32:34
Well every scan is top-down in jpeg, and either you have just a single scan, or you have more (at least 4 then)
2022-12-16 03:33:29
So a randomly truncated progressive jpeg has more detail in the top than in the bottom
afed
Jim That is using AI to generate a your face. There is a lot of research going into that but is still a while away and will likely be questionable given people already trying to pretend to be present. However, that will only work for presentations, not any video.
2022-12-16 03:39:51
yeah, this is just an example, there are a lot of more advanced researches
joppuyo
afed yeah, this is just an example, there are a lot of more advanced researches
2022-12-16 05:05:22
lol someone has already created what you are talking about https://towardsai.net/p/l/stable-diffusion-based-image-compresssion
2022-12-16 05:05:36
I think it's not a such good idea tbh
2022-12-16 05:07:58
I mean, who needs to able to read text, anyway? https://cdn-images-1.medium.com/max/512/1*RCG7lcPNGAUnpkeSsYGGbg.png
_wb_
2022-12-16 05:19:03
If they improve it more, they will produce readable text
2022-12-16 05:19:38
It will just not be the same text as in the input 🙂
paperboyo
2022-12-16 05:20:58
Who doesn’t want sunnier weather?
Jim
2022-12-16 08:00:57
Or it will make it's own alien language.
DZgas Ж
2022-12-16 11:31:27
18 kb jpeg guetzli and jxl
daniilmaks
DZgas Ж 18 kb jpeg guetzli and jxl
2022-12-17 04:53:17
you should add xyb jpeg too just because
DZgas Ж
you should add xyb jpeg too just because
2022-12-17 07:46:15
What? What for?
daniilmaks
2022-12-17 09:03:16
to the comparison
yoochan
joppuyo lol someone has already created what you are talking about https://towardsai.net/p/l/stable-diffusion-based-image-compresssion
2022-12-17 06:06:49
if you accept to have a decoder of a few Gb 😅
_wb_
2022-12-17 07:36:05
I just now heard about Ladybird and SerenityOS. Quite an ambitious project!
2022-12-17 07:36:58
https://github.com/SerenityOS/serenity/tree/master/Userland/Libraries/LibGfx
2022-12-17 07:38:01
Maybe we should get jxl in there — one concern though is they don't want third party libraries, they want to do everything from scratch
yurume
2022-12-18 05:05:11
they do implement brotli (decompression only)
_wb_ Maybe we should get jxl in there — one concern though is they don't want third party libraries, they want to do everything from scratch
2022-12-18 05:06:12
on jxl on serenity: I think you should wait for (or convince) someone to implement it for that reason.
Jyrki Alakuijala
joppuyo I think the pagespeed score is based entirely on "lab data" and not not affect ranking. the "Core Web Vitals Assessment" is what contributes to the ranking. if you have enough traffic it's actually based on real RUM traffic from chrome users using something called "CRUX"
2022-12-19 07:56:10
Core Web Vitals does not reward progressive or even streaming decoding. Streaming decoding feels 2x faster than static. Progressive feels still 2-3x faster than streaming.
DZgas Ж 18 kb jpeg guetzli and jxl
2022-12-19 07:59:41
let's aim at 2.0-3.0 bpp for comparison -- those look like 0.53 or something -- you cannot make poor quality compression and then learn about high quality about it
joppuyo lol someone has already created what you are talking about https://towardsai.net/p/l/stable-diffusion-based-image-compresssion
2022-12-19 08:02:31
there can be a need for such things -- however, methods that make things look plausible and more average are not great for verification and validation, legal use, photo for insurance claims, medical imaging, prints, art, body positivity, etc. Also, no one has found out how to properly create value (that would justify the massive codec sizes and decoding costs) with these while delivering relatively high quality images
DZgas Ж
Jyrki Alakuijala let's aim at 2.0-3.0 bpp for comparison -- those look like 0.53 or something -- you cannot make poor quality compression and then learn about high quality about it
2022-12-19 08:26:14
simple to say that Jpeg XL is just 2 times better
Jyrki Alakuijala
2022-12-19 10:49:15
yes, that is expected at 0.5 BPP
2022-12-19 10:49:46
I'm expecting jpegli to perform better than AVIF in the 3-5 BPP range, roughly same in 2-3 BPP
2022-12-19 10:50:38
jpegli will always be slightly worse than jpeg xl -- possibly 15 % worse at highest quality
DZgas Ж
Jyrki Alakuijala jpegli will always be slightly worse than jpeg xl -- possibly 15 % worse at highest quality
2022-12-19 11:43:14
I don't think it makes sense to compare photos by BPP, as for me this is an outdated practice that no longer has anything to do with the real state of things. why should compare jpeg XL 3 bpp and jpeg 3 bpp if 1 bpp jpeg xl looks exactly the same as jpeg 3 bpp
Jyrki Alakuijala I'm expecting jpegli to perform better than AVIF in the 3-5 BPP range, roughly same in 2-3 BPP
2022-12-19 11:52:14
despite all the math and entropy, sometimes something just works much better. for example, LZMA compresses better than ZIP and ZSTD - and there's nothing you can do about itand there's nothing you can do about it, it's just power so why not show the inability of JPEG to compress low-quality images well, moreover, when the same problem is inherent in Jpeg XL in comparison with AVIF one can only wonder how many unnecessary things were in the photo that can be simplified by another 2-3 times and absolutely not notice it in any way no, I do not think that JPEG is worthy of being compared with any quality between JPEG XL on a serious basis, well, he is also ridiculous, JPEG XL can compression every pixel without loss if use modular at the moment when JPEG will demonstrate same file size use lossy q95-q100
2022-12-19 11:59:28
yes, I meant Deflate, I just always forget this name, ZIP was created with this algorithm
Jyrki Alakuijala
2022-12-19 02:36:07
Deflate can be better than lzma for the shortest files I think
2022-12-19 02:36:51
similarly jpegli can be better than avif for reasonable quality files (say q93) even if it is worse in q75 or q85
DZgas Ж despite all the math and entropy, sometimes something just works much better. for example, LZMA compresses better than ZIP and ZSTD - and there's nothing you can do about itand there's nothing you can do about it, it's just power so why not show the inability of JPEG to compress low-quality images well, moreover, when the same problem is inherent in Jpeg XL in comparison with AVIF one can only wonder how many unnecessary things were in the photo that can be simplified by another 2-3 times and absolutely not notice it in any way no, I do not think that JPEG is worthy of being compared with any quality between JPEG XL on a serious basis, well, he is also ridiculous, JPEG XL can compression every pixel without loss if use modular at the moment when JPEG will demonstrate same file size use lossy q95-q100
2022-12-19 02:50:44
because the new encoder wasn't built to do any of that -- it was built for the normal use case -- it doesn't perform well for low quality
2022-12-19 02:51:24
the same like LZMA usually compresses 0.6 % better than Brotli for very long data, but can be 100 % more for the very short data
2022-12-19 02:51:49
you cannot extrapolate much, it is better to measure measure measure
DZgas Ж
2022-12-19 03:04:22
🧐
fab
2022-12-19 03:04:28
Jpegli is . jpg?
afed
2022-12-19 03:06:29
speaking about lower quality, it would be nice to adopt some MozJpeg tricks to make Jpegli better without exception https://cdn.discordapp.com/attachments/1020724883241574472/1020755005315235970/Screen_Shot_2022-09-17_at_7.55.26_PM.png
Jyrki Alakuijala
fab Jpegli is . jpg?
2022-12-19 03:17:33
jpegli is like mozjpeg, libjpeg, libjpeg-turbo or guetzli -- jpegli will contain both encoder and decoder in libjpeg(-turbo) compatible ABI, but also include an incompatible extension for 16 bits per component frame buffers (you'll only see 8 bits per component if you use the compatible version)
HLBG007
Jyrki Alakuijala jpegli is like mozjpeg, libjpeg, libjpeg-turbo or guetzli -- jpegli will contain both encoder and decoder in libjpeg(-turbo) compatible ABI, but also include an incompatible extension for 16 bits per component frame buffers (you'll only see 8 bits per component if you use the compatible version)
2022-12-19 03:54:13
I need a main file to can execute jpegli
_wb_
2022-12-20 08:10:10
Here is an improved visualization of all the sRGB colors mapped into XYB (where each macroblock is one Y value, increasing in scanline order, and within each macroblock the horizontal axis is X and the vertical one is B)
2022-12-20 08:13:02
(and the ranges are stretched linearly with global constants to maximally use the available space without exceeding it)
Jyrki Alakuijala
2022-12-20 10:11:53
nice
2022-12-20 10:12:18
I have an improvement for anime
2022-12-20 10:12:24
line drawings etc.
2022-12-20 10:12:31
about 2x-3x less artefacts
_wb_
2022-12-20 10:40:41
Here's a video version of the XYB visualization: https://youtu.be/GrhFJzX1DV4
2022-12-20 10:41:37
actually here's what I uploaded to YouTube, probably better quality
2022-12-20 10:42:50
it has a rather interesting shape
spider-mario
2022-12-20 11:25:56
it feels like the bouncing DVD logo
diskorduser
2022-12-20 12:03:42
<@461421345302118401>
lithium
2022-12-20 01:15:02
🥳
Jyrki Alakuijala
2022-12-20 05:18:02
https://github.com/libjxl/libjxl/pull/1987
afed
2022-12-20 06:18:04
<@794205442175402004> benchmark_xl has no option for encode to exact size? it would be useful to compare changes and in addition to d1, d2, d3, also encode to the sizes of the old encodings and maybe even encode in metric score, something like --target_ssimulacra2=88.72
_wb_
2022-12-20 06:41:23
I am not interested in same bpp per image, but in same bpp per corpus. That's a bit hard to implement without doing lots of encodes though
2022-12-20 06:43:28
This reminds me: we should add stdev of ssimulacra2 and butteraugli to benchmark_xl, since improving encoder consistency (lowering variance) is valuable too.
afed
2022-12-20 06:55:37
but it would still be usable for a more accurate single images (and different formats) comparison or like: d1, d2, d3, then manually specified size352560, size253077, size206726 (after changes) ```Encoding kPixels Bytes BPP E MP/s D MP/s Max norm pnorm BPP*pnorm Bugs ------------------------------------------------------------------------------------------------------------ jxl:d1 4945 352560 0.5703479 1.127 10.134 1.71980071 0.40719574 0.232243242920 0 jxl:d2 4945 253077 0.4094110 1.208 8.889 2.89177322 0.74157528 0.303609077277 0 jxl:d3 4945 206726 0.3344275 1.251 8.815 3.95514226 0.93876976 0.313950384872 0 Aggregate: 4945 264217 0.4274321 1.194 9.260 2.69940567 0.65690997 0.280784385535 0```
_wb_
2022-12-20 09:52:55
https://youtu.be/rvhf6feXw7w
2022-12-20 09:53:52
I was using an older version of the XYB transform, this is what jxl actually uses (also I subtracted Y from B to mimick what default Chroma-from-Luma does)
2022-12-20 10:02:11
afed
2022-12-21 12:40:23
<https://github.com/libjxl/libjxl/pull/1987> ```Before: Encoding kPixels Bytes BPP E MP/s D MP/s Max norm SSIMULACRA2 pnorm PSNR --------------------------------------------------------------------------------------------------------- Aggregate: 18611 1719389 0.7390519 1.723 15.180 4.71785347 75.65518621 1.17961303 35.82``` ```After: Encoding kPixels Bytes BPP E MP/s D MP/s Max norm SSIMULACRA2 pnorm PSNR --------------------------------------------------------------------------------------------------------- Aggregate: 18611 1737532 0.7468500 1.724 15.293 4.16149002 59.43491435 1.17162667 36.04``` SSIMULACRA2 59.43491435 <:Thonk:805904896879493180>
Jyrki Alakuijala
2022-12-21 12:43:45
those scores are calculated with a geometric average
2022-12-21 12:44:41
If any value in the data set is zero, the geometric mean is zero
2022-12-21 12:45:08
there is a near zero in ssimulacra2 scores, so geometric mean is meaningless
2022-12-21 12:45:48
ssimulacra2 scores are not derived from error or first principles but have their own scale and it is not applicable to geometric averaging
2022-12-21 12:45:58
look at the individual scores instead
_wb_
2022-12-21 12:46:36
We should probably just use arithmetic averaging for ssimulacra2, geomean indeed does not make sense
Jyrki Alakuijala
2022-12-21 12:47:27
it would be great to have a more invariant score * BPP
2022-12-21 12:48:13
like in butteraugli we get a somewhat invariant norm * BPP across a range of qualities
2022-12-21 12:48:52
that way it is easy to use automated optimization on the score * BPP instead of searching for exactly same BPP within the automated optimization (20x faster)
afed
2022-12-21 12:49:58
yeah, score * BPP for ssimulacra2 would be nice
_wb_
2022-12-21 12:53:03
ssimulacra2/(1+bpp)² or something like that could work, maybe
2022-12-21 12:54:33
I have conflicting opinions on using ssimulacra2 to optimize for — it might lead to better compression, but it will also make ssimulacra2 less useful as a metric...
afed
2022-12-21 01:00:28
if it's not cheating, like preprocessing for vmaf for some video encoders (which gives ~200% better results, without visual improvements), then there's nothing wrong with it if there are actual visual improvements, and not blindly following only metrics scores besides, now there will be at least two good metrics
_wb_
2022-12-21 01:26:08
Vmaf is messed up by having this concept that changing an image can make it better than the original. Conflating reference-based fidelity metrics with no-reference image quality assessment leads to weird situations where things like smoothing away fine texture is considered to be an 'enhancement' (noise removal) that makes the compressed image better than the original.
2022-12-21 01:29:26
Human test subjects do behave like that, especially in side-by-side comparisons without a reference image and given vague instructions like 'which one looks better' rather than 'which is closest to the original'. And of course there are cases where the smoothing of the compression happens to reduce some capturing artifacts — but trying to do two things in one metric is a bad idea.
Jyrki Alakuijala
_wb_ I have conflicting opinions on using ssimulacra2 to optimize for — it might lead to better compression, but it will also make ssimulacra2 less useful as a metric...
2022-12-22 02:05:11
some decisions are difficult to optimize on BPP*pnorm with butteraugli
2022-12-22 02:05:21
like ac_strategy is really difficult, and masking, too
2022-12-22 02:05:33
they easily lead to poor performance a high distances
Demiurge
_wb_ It will just not be the same text as in the input 🙂
2022-12-23 12:23:48
Patches is a dangerous feature to have for this reason. A similar problem happened before with another image codec that caused the codec to get banned from use in legal documents.
2022-12-23 12:24:16
https://en.wikipedia.org/wiki/JBIG2#Disadvantages
Jyrki Alakuijala
2022-12-23 12:40:02
patches can be used without fuzzy matching, too
2022-12-23 12:40:24
for example only matching the number 7 to other numbers of 7, and not to number 3
2022-12-23 12:40:40
(sorry for making it a caricature, but it can be made)
yurume
2022-12-23 01:05:50
also note that the Xerox controversy is an isolated incident; it was never repeated.
2022-12-23 01:07:55
generally it's well known that lossy compression can create a non-existent information out of the thin air, patches are no different---their failure modes just happen to be less understood by laypersons.
2022-12-23 01:09:06
say, if the image was scanned with a high enough dpi, bad patches couldn't possibly happen (if you assume a good enough encoder), they are sufficiently different
2022-12-23 01:10:06
but as you lower dpi, your chance to meet bad patches also increases, probably exponentially
2022-12-23 01:10:55
so people should be trained to scan images with high enough dpi to avoid that failure mode, which should be trained in some way
2022-12-23 01:11:21
either by accident or word of mouth
afed
2022-12-23 01:30:03
this could still happen again when ai codecs become common (for now only audio/voice are really used, but there are big plans for images and video as well)
_wb_
2022-12-23 06:14:18
For legal or medical images, I would either avoid lossy compression or use it only at 'safe' settings (e.g. d0.5 for jxl)
yurume
2022-12-23 10:31:08
in case of JBIG2 the problem typically occurred at 200 dpi but there was also some occurrence at 300 dpi (which _should_ be safe, barring from bugs)
Demiurge
2022-12-23 11:31:37
Well a codec like JXL is probably not going to be used for scanned documents anyways... at least, not at first. Technically JXL seems to have most of the features of DJVU... (aside from multi-page support of course.)
2022-12-23 11:32:16
There's no reason JXL couldn't be used as an efficient lossy bi-level image codec.
2022-12-23 11:32:57
But lossy bi-level image codecs with patches is a risky idea.
2022-12-23 11:33:28
lossy bi-level codecs being used for legal documents is a bad idea in general.
2022-12-23 11:40:53
I imagine it will be fairly uncommon at first but there is no technical reason why JXL would not be a good codec for document scans. Especially converting existing JPEG scans to JXL.
lithium
2022-12-23 02:17:02
Hello <@532010383041363969> Thank you for your work, I really appreciate all your effort 🙂 1.This PR reduce those smooth area tiny ringing, and let those area look better, but I think red smooth area still have some tiny ringing. I really like allocates more bits in the proximity of smooth areas, I mean if I input d 1.0~0.5 e 8~9 this target distance and effort, I would expect better quality, maybe can depend effort to decide lossy strategy? * effort e8~9 quality first and enabled another lossy algorithm for DCT worst case. * effort e7~ lower bpp and encoder faster. > For make sure input image is pure png and don't have generation loss, > I unpack those sample image from game asset package. 2. I think if libjxl have heuristic to switch different method for different input, that will be very useful. like pingo will detect if output file size larger than input file size, maybe can do some fast DCT test and fast palette sort test to decide which method is near best? > varDCT, lossy palette, jpeg_lossless 3. Look like djxl embed a wrong icc profile on output png, original png use Adobe RGB (1998), but djxl embed RGB_D65_SRG_Rel_Lin, Is this expected behavior? > Adobe RGB (1998)-Copyright 1999 Adobe Systems Incorporated > RGB_D65_SRG_Rel_Lin 4. A little curious, different non-photo type(2d-art, 3d-game-screenshot) will need different artifacts reduce strategy? or all non-photo type can use the same artifacts reduce strategy?
2022-12-23 02:17:11
2022-12-23 02:17:22
2d-art
2022-12-23 02:17:27
3d-game-screenshot
diskorduser
2022-12-27 03:00:52
https://github.com/saschanaz/jxl-winthumb Is there any updated fork exist?
Jyrki Alakuijala
lithium Hello <@532010383041363969> Thank you for your work, I really appreciate all your effort 🙂 1.This PR reduce those smooth area tiny ringing, and let those area look better, but I think red smooth area still have some tiny ringing. I really like allocates more bits in the proximity of smooth areas, I mean if I input d 1.0~0.5 e 8~9 this target distance and effort, I would expect better quality, maybe can depend effort to decide lossy strategy? * effort e8~9 quality first and enabled another lossy algorithm for DCT worst case. * effort e7~ lower bpp and encoder faster. > For make sure input image is pure png and don't have generation loss, > I unpack those sample image from game asset package. 2. I think if libjxl have heuristic to switch different method for different input, that will be very useful. like pingo will detect if output file size larger than input file size, maybe can do some fast DCT test and fast palette sort test to decide which method is near best? > varDCT, lossy palette, jpeg_lossless 3. Look like djxl embed a wrong icc profile on output png, original png use Adobe RGB (1998), but djxl embed RGB_D65_SRG_Rel_Lin, Is this expected behavior? > Adobe RGB (1998)-Copyright 1999 Adobe Systems Incorporated > RGB_D65_SRG_Rel_Lin 4. A little curious, different non-photo type(2d-art, 3d-game-screenshot) will need different artifacts reduce strategy? or all non-photo type can use the same artifacts reduce strategy?
2022-12-27 11:07:46
Thank you for your kind words and continued guidance. Your previous advice and examples are still helping me in being motivated to find and debug such improvements 🙂
Demiurge Well a codec like JXL is probably not going to be used for scanned documents anyways... at least, not at first. Technically JXL seems to have most of the features of DJVU... (aside from multi-page support of course.)
2022-12-27 11:10:34
DJVU was a very good design for its time
lithium Hello <@532010383041363969> Thank you for your work, I really appreciate all your effort 🙂 1.This PR reduce those smooth area tiny ringing, and let those area look better, but I think red smooth area still have some tiny ringing. I really like allocates more bits in the proximity of smooth areas, I mean if I input d 1.0~0.5 e 8~9 this target distance and effort, I would expect better quality, maybe can depend effort to decide lossy strategy? * effort e8~9 quality first and enabled another lossy algorithm for DCT worst case. * effort e7~ lower bpp and encoder faster. > For make sure input image is pure png and don't have generation loss, > I unpack those sample image from game asset package. 2. I think if libjxl have heuristic to switch different method for different input, that will be very useful. like pingo will detect if output file size larger than input file size, maybe can do some fast DCT test and fast palette sort test to decide which method is near best? > varDCT, lossy palette, jpeg_lossless 3. Look like djxl embed a wrong icc profile on output png, original png use Adobe RGB (1998), but djxl embed RGB_D65_SRG_Rel_Lin, Is this expected behavior? > Adobe RGB (1998)-Copyright 1999 Adobe Systems Incorporated > RGB_D65_SRG_Rel_Lin 4. A little curious, different non-photo type(2d-art, 3d-game-screenshot) will need different artifacts reduce strategy? or all non-photo type can use the same artifacts reduce strategy?
2022-12-27 11:12:48
> different method for different input It is always possible to create an image with half the other input and half the other kind of input (half anime, half photograph) -- because of it things should just work robustly in any case For optimal size, of course we would explore a combination, too, but all these quickly start to contribute to the encoding (and possibly also decoding) times
lithium Hello <@532010383041363969> Thank you for your work, I really appreciate all your effort 🙂 1.This PR reduce those smooth area tiny ringing, and let those area look better, but I think red smooth area still have some tiny ringing. I really like allocates more bits in the proximity of smooth areas, I mean if I input d 1.0~0.5 e 8~9 this target distance and effort, I would expect better quality, maybe can depend effort to decide lossy strategy? * effort e8~9 quality first and enabled another lossy algorithm for DCT worst case. * effort e7~ lower bpp and encoder faster. > For make sure input image is pure png and don't have generation loss, > I unpack those sample image from game asset package. 2. I think if libjxl have heuristic to switch different method for different input, that will be very useful. like pingo will detect if output file size larger than input file size, maybe can do some fast DCT test and fast palette sort test to decide which method is near best? > varDCT, lossy palette, jpeg_lossless 3. Look like djxl embed a wrong icc profile on output png, original png use Adobe RGB (1998), but djxl embed RGB_D65_SRG_Rel_Lin, Is this expected behavior? > Adobe RGB (1998)-Copyright 1999 Adobe Systems Incorporated > RGB_D65_SRG_Rel_Lin 4. A little curious, different non-photo type(2d-art, 3d-game-screenshot) will need different artifacts reduce strategy? or all non-photo type can use the same artifacts reduce strategy?
2022-12-27 11:13:59
> * effort e8~9 quality first and enabled another lossy algorithm for DCT worst case. > * effort e7~ lower bpp and encoder faster. I'm still optimizing e7 only, e8-e9 go with butteraugli (which is not so great with anime)
ator
Jyrki Alakuijala DJVU was a very good design for its time
2022-12-27 11:57:01
In more than one way! Both JB2 and IW44 look very much like precursors to JBIG2 and JPEG2000, and the text block compression uses the burrows-wheeler transform. Shame about the patent issues that prevented it from taking hold. And the ideas of segmenting into layers still exists today, there are tools around that create PDF files with the same basic structure: JPEG/JPEG2000 encoded background and foreground color images with a JBIG2/G4-fax monochrome selector mask.
Demiurge
2022-12-27 12:09:18
djvu had patent issues? I thought it was a free format.
2022-12-27 12:10:35
There just weren't any free encoders that could create good multi-layer djvu files that take maximum advantage of all its features.
2022-12-27 12:11:20
And a single-layer djvu file from a basic-bitch free encoder is hardly any better than plain JPEG
ator In more than one way! Both JB2 and IW44 look very much like precursors to JBIG2 and JPEG2000, and the text block compression uses the burrows-wheeler transform. Shame about the patent issues that prevented it from taking hold. And the ideas of segmenting into layers still exists today, there are tools around that create PDF files with the same basic structure: JPEG/JPEG2000 encoded background and foreground color images with a JBIG2/G4-fax monochrome selector mask.
2022-12-27 12:12:55
Are such tools free to use?
2022-12-27 12:14:39
I am sure DJVU would have been used more often for scanned images, if there was any software or hardware tools for people to actually take advantage of it.
2022-12-27 12:15:14
But the free tools for djvu are no better than a JPEG encoder.
2022-12-27 12:15:31
That's the true reason why the format did not take off.
ator
Demiurge djvu had patent issues? I thought it was a free format.
2022-12-27 12:46:55
Yeah, the arithmetic coding was under patent and prevented free software implementations for the longest time.
Demiurge There just weren't any free encoders that could create good multi-layer djvu files that take maximum advantage of all its features.
2022-12-27 12:47:43
I believe (but don't quote me) that the original DjVu compressors used neural networks to do the segmenting into layers (AI before it was hot).
Jyrki Alakuijala
2022-12-27 01:27:43
if I understood correctly, DjVu was inherently 300 dpi, connected 1:1 to the best printing tech in its time -- when 600 dpi printing came, it was immediately and completely outdated
Demiurge
2022-12-27 02:05:34
I thought it had several layers that could be at different DPI layers and the most common scheme was 100 for the background layer and 300 for the foreground bilevel image. Also 300dpi scans are not "immediately and completely outdated," it's a pretty good sweet spot where small details are nice and sharp and you aren't wasting bits saving anything smaller than you can see.
2022-12-27 02:06:34
For practical purposes when it comes to human eyes reading a document and looking at manga, you don't need to save details that are smaller than 1/300th of an inch.
2022-12-27 02:06:57
Really...
2022-12-27 02:08:47
I would be really surprised if DJVU has a DPI limitation considering how flexible it seems to be. But even if it did have a 300dpi limitation, it's absolutely laughable to think that's the reason it didn't gain popularity...
2022-12-27 02:09:00
Tooling is the most important thing when it comes to formats.
2022-12-27 02:11:13
If JXL is to become popular it needs good tooling too. Good authoring tools, which seems to be effortlessly happening already, but also good tooling for viewing them as well, which is also happening pretty naturally too, aside from the strange Chrome exception, which didn't seem very natural at all...
2022-12-27 02:13:41
But another thing that would help with tooling, is a conversion tool so people can convert existing images. Ideally it will support lossless mode, lossless-JPEG mode, image preview, and batch/mass-conversion. If it supports lossless transformations like jpegtran, that's even better.
2022-12-27 02:18:06
I haven't used a Mac in a long time so I'm not sure how convenient it is to view JXL images on a Mac... But right now it's pretty inconvenient on Windows, the most-used PC OS.
2022-12-27 02:18:48
You have to really go out of your way, a lot, in order to use JXL if you're on Windows. It's a real pain in the neck inconvenience.
2022-12-27 02:19:47
The winthumb software seems to completely stop working on it's own after a while, like it has an expiration date or something.
2022-12-27 02:20:18
That's even assuming the user is tech savvy enough to install it in the first place, which is another laughable concept.
2022-12-27 02:23:13
JXL would start to catch on a lot faster if it was easier for Windows users to experience the utility and genuine usefulness of libjxl
_wb_
2022-12-27 02:24:15
Most users will only interact with libjxl via its integrations in gimp, krita, darktable etc.
Demiurge
2022-12-27 02:25:04
Yep, because winthumb and the WIC codec are not ready for prime time.
2022-12-27 02:26:59
Ideally there should be an .exe or .msi package that enables thumbnail integration, and ideally added support to the built in photo viewer tooling on Windows too.
2022-12-27 02:27:36
Especially if there aren't any performance or API limitations with libjxl being used in such a context.
2022-12-27 02:28:50
Which would probably involve a lot of short-lived processes calling libJXL rapidly as a user scrolls through a folder filled with images.
2022-12-27 02:32:58
And if there was a converter that could losslessly convert back and forth between JXL and PNG as well as lossless JPEG conversion, automatically transfer exif tags and other metadata as well, then it would be very easy to demonstrate the usefulness of JXL to Windows users.
2022-12-27 02:35:34
I would expect a large boon to adoption after that, but that would be a lot of work.
2022-12-27 02:35:48
And worst of all it would be Windows work :(
2022-12-27 02:36:21
I don't have the patience to read Microsoft documentation
w
2022-12-27 02:38:32
microsoft documentation is good
2022-12-27 02:39:01
the problem is that jpeg xl is still something you need to know of to care about
2022-12-27 02:39:12
nobody knows what jpeg xl is so nobody cares
Demiurge
2022-12-27 02:39:15
Well, their documentation is better than their design and implementation, that is for sure.
2022-12-27 02:39:59
But their documentation is not as good as, say, the Open Group Base Specifications, or the OpenBSD manual
2022-12-27 02:40:24
But yeah, much worse than their documentation is their bad ideas
2022-12-27 02:40:56
Their documentation is not bad compared to the atrocity it's documenting
w
2022-12-27 02:40:56
i'd argue their "bad ideas" are not their fault
joppuyo
2022-12-27 02:41:09
https://github.com/yllan/JXLook this app makes is it pretty easy to preview and view jxl files on a mac even if it’s not been updated in a while
Demiurge
2022-12-27 02:41:41
Yeah, that does look cool. I wonder if that means it works in Preview.app too if it works with quicklook...
Jyrki Alakuijala
Demiurge I thought it had several layers that could be at different DPI layers and the most common scheme was 100 for the background layer and 300 for the foreground bilevel image. Also 300dpi scans are not "immediately and completely outdated," it's a pretty good sweet spot where small details are nice and sharp and you aren't wasting bits saving anything smaller than you can see.
2022-12-27 02:42:54
I think the original tooling would make fonts render at 300 dpi -- there would be no 600/1200 dpi rendering of them that we are already used to, and reading 300 dpi binary text on paper would be an unusual experience for a modern person of course if it would have taken on, the tooling would have sifted to 2x and 4x resolutions or something like that
joppuyo
2022-12-27 02:42:55
I’m pretty sure it does not. But if you double click a jxl file, the app will open it in its own window
w
2022-12-27 02:44:43
oh yeah quicklook for windows supports jxl
Jyrki Alakuijala
joppuyo https://github.com/yllan/JXLook this app makes is it pretty easy to preview and view jxl files on a mac even if it’s not been updated in a while
2022-12-27 02:46:03
the bulk of the code in jxlook is in https://github.com/yllan/JXLook/blob/main/JXLook/JXL.swift if someone has interest how it looks like
Demiurge
2022-12-27 02:49:35
What's quicklook for windows?
w
2022-12-27 02:51:11
<https://github.com/QL-Win/QuickLook>
afed
2022-12-28 02:10:01
<:Poggers:805392625934663710> <:Stonks:806137886726553651> https://github.com/libjxl/libjxl/pull/1999
2022-12-28 02:10:09
is the api for group size change not added yet?
2022-12-28 02:15:10
seems that 16-bit png is also sometimes needed (and for some reason only fpng is mentioned, there is a fast decoder, but still pretty limited) https://github.com/AuburnSounds/gamut/issues/33
veluca
2022-12-28 02:24:31
fpnge sure can 😉
afed
2022-12-28 02:30:05
<@179701849576833024> maybe also add a small README.md for fast_lossless and for supported features? <https://github.com/libjxl/libjxl/tree/main/experimental/fast_lossless>
veluca
2022-12-28 02:42:08
maybe I should...
2022-12-28 03:05:53
https://github.com/libjxl/libjxl/pull/2003
afed
2022-12-28 03:11:39
for fpnge it would also be nice to clarify that it supports 8/16 bit, hdr encoding, etc.
veluca
2022-12-28 03:15:11
It supports 8 and 16 bit content, 1 to 4 channels; it can also emit [cICP chunks](https://www.w3.org/TR/png/#cICP-chunk) for signaling that the content should be interpreted as HDR.
2022-12-28 03:15:14
how about this?
2022-12-28 03:16:06
done, thanks 🙂
sklwmp
veluca It supports 8 and 16 bit content, 1 to 4 channels; it can also emit [cICP chunks](https://www.w3.org/TR/png/#cICP-chunk) for signaling that the content should be interpreted as HDR.
2022-12-30 05:04:37
The PNG file format specification is surprisingly easy to follow... it's enjoyable writing a decoder (except for the actual image data, that's a bit painful) I wonder if someone could do the same for JPEG XL, a standards document or explanation that explains at least the file format if not the compression methods (because that's *really* complicated) in a simpler way that doesn't need to conform to "standard terminology", because that's really a bit difficult and overcomplicated at times.
yurume
2022-12-30 05:20:31
should I try this?
_wb_
2022-12-30 05:44:33
The more info available, the better. Feel free to start a repo for this, perhaps using asciidoc/metanorma like the spec itself. I will review and maybe contribute too. This is a good way to have an unofficial but good and freely available spec.
veluca
sklwmp The PNG file format specification is surprisingly easy to follow... it's enjoyable writing a decoder (except for the actual image data, that's a bit painful) I wonder if someone could do the same for JPEG XL, a standards document or explanation that explains at least the file format if not the compression methods (because that's *really* complicated) in a simpler way that doesn't need to conform to "standard terminology", because that's really a bit difficult and overcomplicated at times.
2022-12-30 10:38:01
Yeah it's pretty good! OTOH PNG is about as simple as it gets for an image format, so there's that
Jyrki Alakuijala
2022-12-30 10:44:34
PNG as a format made a few strange mistakes: filter bytes are mixed with the image data, low bytes and high bytes are coded with the same entropy code, RGBA channels are all coded with the same entropy code, LZ77 is used as byte indexed, not pixel indexed -- these are pretty severe mistakes from a format design viewpoint and having had them right would have given another 20 % in density without adverse effects
sklwmp
2022-12-30 11:45:49
Well, as the saying goes, hindsight is 20/20
2022-12-30 11:46:06
Though that does make me a bit sad thinking about how PNG could have been 20% better...
yurume
2022-12-30 11:57:14
I like to think that PNG is an attempt to make an extensible format with stock algorithms, not necessarily good ones
2022-12-30 11:57:54
there is a good argument that this was necessary, as they didn't want to risk patent concerns from novel algorithms
2022-12-30 11:58:46
at that time DEFLATE was considered patent-free (or more accurately speaking, there was a widespread strategy to produce a patent-free DEFLATE implementation) so that's where the stock algorithm came from
2022-12-30 11:59:46
and many forms of arithmetic coding are considered to have patent issues (the same reason JPEG with AC didn't catch on)
2022-12-30 12:01:01
corollary: you can change this history significantly by travelling back in time and spread the knowledge of ANS 😉
veluca
2022-12-30 12:59:45
to be fair, they could *at least* have specified predictor arithmetic to happen on 16 bits instead of 8 if you have a 16-bit PNG...
2022-12-30 01:01:13
everything else I could see reason to, but this one is... eh
2022-12-30 01:01:36
(well, ok, there is a reason - it's simpler to implement - but still...)
2022-12-30 01:02:08
another thing I wouldn't have minded is if they specified it so that IDAT chunks wouldn't need a checksum, we already have the adler deflate checksum...
_wb_
2022-12-30 01:05:08
Checksums on all chunks is kind of silly overhead
2022-12-30 01:15:07
Predictor arithmetic also doesn't make sense for 1/2/4 bit images
yurume
_wb_ Checksums on all chunks is kind of silly overhead
2022-12-30 01:15:57
more accurately, *double* checksums are silly overhead
2022-12-30 01:16:08
(IDAT requires a chunk checksum AND zlib checksum)
Jyrki Alakuijala
veluca to be fair, they could *at least* have specified predictor arithmetic to happen on 16 bits instead of 8 if you have a 16-bit PNG...
2022-12-30 01:23:43
yes, Paeth can predict the high byte from a different pixel than the low byte, it is almost funny
_wb_
2022-12-30 01:23:45
Yes, but also checksums on header chunks and the end marker chunk etc is just not very useful. It's not a file format's task to catch transfer errors / bit rot. That's a confusion of application layer...
veluca
_wb_ Yes, but also checksums on header chunks and the end marker chunk etc is just not very useful. It's not a file format's task to catch transfer errors / bit rot. That's a confusion of application layer...
2022-12-30 01:25:59
then again, at those times it feels like the idea was that more checksums are always better looking at the wire formats that got designed then xD
_wb_
2022-12-30 01:28:03
I guess the N in PNG means it can detect bad transfer
lithium
Jyrki Alakuijala > different method for different input It is always possible to create an image with half the other input and half the other kind of input (half anime, half photograph) -- because of it things should just work robustly in any case For optimal size, of course we would explore a combination, too, but all these quickly start to contribute to the encoding (and possibly also decoding) times
2022-12-30 03:32:35
Thank you for your reply 🙂 Probably can add a new parameter to control heuristic and strategy? > --preprocessing_level=0~6 similar cwebp -m, if specify large value, the encoder will spend more time inspecting additional encoding possibilities, > -m int > Specify the compression method to use. > This parameter controls the trade off between encoding speed and the compressed file size and quality. > Possible values range from 0 to 6. Default value is 4. When higher values are used, > the encoder will spend more time inspecting additional encoding possibilities and decide on the quality gain. > Lower value can result in faster processing time at the expense of larger file size and lower compression quality. * fast DCT:true, palette sort:true * fast DCT:true, palette sort:False > apply varDCT. * fast DCT:False, palette sort:true > apply lossy palette or apply Jon patches PR. * fast DCT:False, palette sort:False > apply Modular lossless. * fast DCT:False, palette sort:False, and input format is jpeg > apply jpeg lossless.
Traneptora
sklwmp The PNG file format specification is surprisingly easy to follow... it's enjoyable writing a decoder (except for the actual image data, that's a bit painful) I wonder if someone could do the same for JPEG XL, a standards document or explanation that explains at least the file format if not the compression methods (because that's *really* complicated) in a simpler way that doesn't need to conform to "standard terminology", because that's really a bit difficult and overcomplicated at times.
2022-12-31 02:57:21
there is a jxl overview page in the libjxl repo
2022-12-31 02:57:29
format_overview.md or something
joppuyo
2023-01-01 04:51:19
this is more related to video than photos but does anyone know what's the difference between 60 fps video and 59.94 fps video in practice, when talking about digital? I know the 59.94 fps comes from some weird analog quirk but you still see this in many digital video files, same with 29.97 fps and 23.98 when compared to 30 fps and 24 fps respectively.
2023-01-01 04:51:33
What I'm mostly interested in is that what happens if you play back a 59.94 fps video on a 60 fps screen. does the video player drop a frame every 16.66 seconds. or can you just play back the video at 60 frames, making it 0.1% faster (presumably this would cause the audio to go eventually out of sync if it's not taken into account)
2023-01-01 04:53:23
when talking about a TV, you could presumably run the panel at 59.94 hz or 60 hz refresh rate depending on the content but it's a bit more involved if you play back a file on a computer because if the operating system runs at 60, the video will have to play back in a 60 fps "container"
2023-01-01 04:57:16
I am familiar with conversions between 60 and 50 when talking about PAL and NTSC and 24 to 60 when converting from film to video but the fractional frame rates confuse me because how can you play back a partial frame 🤔
improver
2023-01-01 04:57:18
depends on the player. for example you can configure mpv w `--speed=1.001` to correct framerate. at the expense of some tiny pitch chance of the sound
2023-01-01 04:57:47
(if u dont disable pitch correction which u tbh should)
2023-01-01 04:58:45
there are also some monitors with VRR (variable refresh rate) support (marketing names like freesync)
2023-01-01 04:59:19
which when things are configured correctly will adjust panel's framerate to match content
2023-01-01 05:00:44
i personally use wayland w swaywm and freesync monitor and have enabled sway's VRR support & enabled frame doubling mpv filter because my monitor can do freesync only down to 40fps
joppuyo
2023-01-01 05:02:35
yeah, the VRR thing is interesting but I don't know how well it works with desktop apps, I think games mostly run in exclusive full screen or borderless full screen where the content takes up the whole screen
2023-01-01 05:03:01
or is there some kind of API that allows different parts of the screen update at different frame rate?
improver
2023-01-01 05:03:02
there is also something called interpolation, a class of algorithms that can smooth out transitions and kinda convert content to higher framerate that way (eg 23.94 to 60 fps or more)
2023-01-01 05:03:37
afaik VRR support works for fullscreen applications
2023-01-01 05:03:57
but that matches how i watch content with mpv at least
2023-01-01 05:04:50
if you wanna windowed the best you could do is manually adjusting monitor's mode oldschool way (if its supported) or use interpolation
joppuyo
improver depends on the player. for example you can configure mpv w `--speed=1.001` to correct framerate. at the expense of some tiny pitch chance of the sound
2023-01-01 05:06:00
so is the default behavior to drop frames every so often?
improver
2023-01-01 05:06:07
in my experience something like mpv's oversample is pretty good, though one may find more fitting ones depending on viewer's taste and content type
joppuyo so is the default behavior to drop frames every so often?
2023-01-01 05:06:21
usually yes
2023-01-01 05:06:30
u dont drop frames
2023-01-01 05:06:44
u miss frames
2023-01-01 05:07:05
as in showing some one frame as 2 frames once in a while
joppuyo
2023-01-01 05:07:24
ah
2023-01-01 05:07:25
https://github.com/mpv-player/mpv/wiki/Display-synchronization
2023-01-01 05:07:27
reading this atm
improver
2023-01-01 05:08:14
personally very noticeable w 23.94/24 fps to 60 fps content, especially with smooth screen/scenery scrolls
2023-01-01 05:09:07
i dont think the frame duplication would happen often enough w 59.98 to 60fps conversion for many to notice
joppuyo
improver personally very noticeable w 23.94/24 fps to 60 fps content, especially with smooth screen/scenery scrolls
2023-01-01 05:10:39
yeah, I agree. if I want to watch a movie from my laptop on my TV, I will go to the laptop display settings and force the operating system to output 24 fps which will make the motion much smoother
afed
Jyrki Alakuijala PNG as a format made a few strange mistakes: filter bytes are mixed with the image data, low bytes and high bytes are coded with the same entropy code, RGBA channels are all coded with the same entropy code, LZ77 is used as byte indexed, not pixel indexed -- these are pretty severe mistakes from a format design viewpoint and having had them right would have given another 20 % in density without adverse effects
2023-01-03 01:56:15
what would a proper png in jxl format look like? i mean something fast but more properly used, would it be something like e4? judging by this description, it would be great to have fast lossless up to e4, at least for 8-bit or maybe make something simpler but with similar efficiency? <https://www.reddit.com/r/jpegxl/comments/10157np/analysis_of_effort_settings/> ```Modular (lossless): e1: fast-lossless, fixed YCoCg RCT, fixed ClampedGradient predictor, simple palette detection, no MA tree (one context for everything), Huffman, simple rle-only lz77 e2+: try global channel palette e2: fixed YCoCg RCT, fixed ClampedGradient predictor, fixed MA tree (context based on Gradient-error), ANS e3: fixed YCoCg RCT, fixed Weighed predictor, fixed MA tree (context based on WP-error), ANS e4+: try both ClampedGradient and Weighted predictor, try global palette e5+: detect patches, try local palette / local channel palette e5-9: try more and more local RCTs e8-9: try more Weighted predictor parameters e6-9: use more properties when learning MA trees e9: try all predictors```
veluca
2023-01-03 02:02:25
weighted predictor is *really hard* to make fast
2023-01-03 02:04:14
but I do agree that one could make a much faster e4-level encoder
afed
2023-01-03 02:08:06
and ClampedGradient is better than a brute force (like in fpnge) of simpler (and faster) filters or maybe ClampedGradient + simple filters will be faster and not much worse than using weighted predictor after some optimizations?
2023-01-03 02:11:30
or different filters are not something that gives any noticeable gain on fast modes?
_wb_
2023-01-03 02:31:50
Select is probably a good predictor for nonphoto
2023-01-03 02:32:10
ClampedGradient is the best general-purpose predictor imo
2023-01-03 02:32:20
Weighed is the best for photo
afed
2023-01-03 02:34:03
what about `e2: fixed YCoCg RCT, fixed ClampedGradient predictor, fixed MA tree (context based on Gradient-error), ANS` + `try global palette` or maybe even + `try local palette / local channel palette` or is it slow stuff?