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

libjxl

_wb_
2021-01-28 12:37:35
sorting out and cleaning up the public gitlab issues a bit, adding some labels
yllan
2021-01-29 02:43:17
Is there any example on how to use libjxl to decode progressively?
lvandeve
2021-01-29 02:45:10
not yet, the closest probably is the DCTest under decode_test.cc. Currently getting the DC image, 8x8 downsampled, is the only form of progressive, more will be added later
yllan
2021-02-01 03:50:41
I tried JXL_DEC_DC_IMAGE, however it seems get black image only
2021-02-01 03:52:50
2021-02-01 03:55:46
Is there anything I could have done wrong?
_wb_
2021-02-01 06:25:52
It could be an image without DC. Only VarDCT mode has DC. In Modular mode there is only DC if Squeeze is done (not by default)
yllan
2021-02-01 06:41:36
I thought the image has DC though. I got both `JXL_DEC_NEED_DC_OUT_BUFFER` and `JXL_DEC_DC_IMAGE` event.
2021-02-01 06:44:50
Here is my code and my test image. Basically just add some lines to `decode_oneshot.cc` https://gist.github.com/yllan/0da653b9898090bb5173bbd32eb15201#file-decode_oneshot-cc-L121-L146
_wb_
2021-02-01 06:49:56
<@768090355546587137> can you check?
2021-02-01 11:36:02
the image does indeed have DC
2021-02-05 07:46:51
When are we pushing the 0.3.1 release? When all open bugs are fixed?
veluca
2021-02-05 08:43:11
I think we could push it now, I'll ask
_wb_
2021-02-05 08:54:54
Maybe would be good to get this one fixed first: https://gitlab.com/wg1/jpeg-xl/-/issues/135
Deleted User
2021-02-06 06:41:22
Yeah, let's wait a bit, don't rush things, 0.3.1 deserves being stable
_wb_
2021-02-06 07:22:13
Zero dot odd dot odd sounds like the opposite of a stable version to me but yes, as stable as possible 😅
BlueSwordM
2021-02-06 06:02:31
Hmm, interesting.
2021-02-06 06:02:46
It seems like the QT JPEG-XL plugin isn't working for displaying thumbnails anymore. 🤔
2021-02-06 06:02:48
Quite strange.
2021-02-06 06:02:51
Let's reinstall it.
Pieter
2021-02-06 06:23:09
<@794205442175402004> Bitcoin Core just had its latest stable release: 0.21.0. And for some reason we've referring to our version numbers as 0.MAJOR.MINOR even. For the next release we're finally going to drop the redundant 0 up front, but that was pretty controversial among contributors even. 0.3.1 isn't too bad ;)
Scope
2021-02-06 06:30:49
Or when 7zip changed the version number simply to the year of release (no matter how much change there was between versions)
2021-02-06 06:32:10
Pieter
2021-02-06 06:34:53
Yeah, time based releases are popular these days. Ubuntu has those too, and Firefox, and Chrome.
Scope
2021-02-06 06:39:45
For browsers or OS it's fine (because there are always so many changes), but when a small application has corrected a few typos in the documentation and the version number changes significantly (because several years have passed), I'm not a fan of that
_wb_
2021-02-06 06:43:23
For a library, the convention is as in https://semver.org/
2021-02-06 06:43:42
First number changes if you break the api
2021-02-06 06:43:58
Second number changes if you add stuff in a bw-compatible way
2021-02-06 06:44:24
Third number is just bugfixes and minor stuff
Pieter
2021-02-06 06:45:40
Yeah, that's a pretty common one too.
_wb_
2021-02-06 06:45:58
That's more useful than a time based version number, so applications that use the library know what to expect and how to define its dependencies
Pieter
2021-02-06 06:49:31
Yes, absolutely for libraries.
Master Of Zen
BlueSwordM It seems like the QT JPEG-XL plugin isn't working for displaying thumbnails anymore. 🤔
2021-02-06 07:19:29
You need to add `image/jxl` to thumbnails.desktop
2021-02-06 07:19:43
And update mime database
BlueSwordM
Master Of Zen You need to add `image/jxl` to thumbnails.desktop
2021-02-06 07:26:50
Thank you. It looks like a KDE stuff update removed the .avif and .jxl stuff. 👍
Nova Aurora
2021-02-08 02:41:40
How many people use KDE in this server?
Pieter
2021-02-08 02:49:45
I recently started trying it again, after 12 years of xmonad.
lonjil
2021-02-08 02:56:35
I use KDE Plasma on my laptop. No DE on my desktop but use a lot of KDE apps.
Pieter
2021-02-08 03:03:02
And my reason is rather silly. I wanted to use my Bluetooth headphones with my desktop, and was too lazy to figure out how to do it with command-line tools (or other configuration that worked without actual desktop environment). In Plasma it just worked...
Nova Aurora
2021-02-08 03:03:29
My reason for still using a full DE pretty much
lonjil
2021-02-08 06:30:38
Question: what kind of stuff do I need to compile JXL on Windows? I'm having to use Windows for school reasons but I'd like to be able to still use JXL. But not used to doing dev on this platform.
Nova Aurora
2021-02-08 06:31:32
https://gitlab.com/wg1/jpeg-xl/-/blob/master/doc/developing_in_windows.md
2021-02-08 06:32:34
Can't help you after that, I honestly don't know how to use MSVC 😅
_wb_
2021-02-08 06:55:02
I try to stay as far away from Windows as possible. Successfully, for the past 23 years.
Nova Aurora
2021-02-08 06:57:35
Achieving everyone's dream
Pieter
2021-02-08 06:57:59
I stopped using it as my main OS somewhere around april 2000, I believe. I've used it occasionally as gaming-only OS since, though.
Nova Aurora
2021-02-08 06:58:02
I only achieve about 90% away from Windows
Pieter I stopped using it as my main OS somewhere around april 2000, I believe. I've used it occasionally as gaming-only OS since, though.
2021-02-08 06:59:03
I'm late to the party, November 23rd, 2019 is when I re partitioned my hard drive
Pieter
2021-02-08 06:59:29
It's never too late to come to the Light side.
2021-02-08 06:59:44
(Use the source, Luke!)
lonjil
2021-02-08 07:00:00
Install Microsoft's Visual Studio C compiler thingy. Install Microsoft's package manager. Do "install". "Error, file not found." Amazing. Such quality. Wow.
_wb_
2021-02-08 07:02:06
After Windows 95, I briefly used Windows NT 4 before doing the dual boot thing in 1997 and permanently switching to only GNU/Linux in 1998.
Pieter
2021-02-08 07:02:27
I made it as far as Windows ME. That was enough.
2021-02-08 07:04:20
Though, I think it's unfair to compare our Windoss experiences in the late 90s with what current Windows platforms are like (in either direction) - I really have no clue.
2021-02-08 07:04:40
Microsoft is also a very different company now.
Nova Aurora
2021-02-08 07:04:53
Windows 10 is pretty good, they're trying to shore up their weaknesses
2021-02-08 07:05:21
powershell, new terminal, WSL2, winget, Powertoys 10, chromium edge
lonjil
2021-02-08 07:05:34
I dual booted Windows and Linux since I was a small child. Then at some point it stopped working and I was stuck on Windows. Then a bit older and a second family PC ran Ubuntu. At some point dad gave me his old computer, and then I had two, one with Windows and one Linux. During all this I also had a MacBook. Eventually in 2017 I deleted Windows and installed Linux on my main PC because Windows was doing a "bluescreens every day only fix is full reinstall" thing. Then in 2018 I installed Linux on my MacBook because Apple was doing a "make macos unusable" thing.
2021-02-08 07:06:29
So I have basically as much experience as anyone with many versions of macos, windows, and linux.
2021-02-08 07:06:40
So far, for my use cases anyway, Linux is the closest to "just works".
2021-02-08 07:07:20
Drivers pre-installed in the kernel. Tooling made by the same people who have to use it everyday (= actually works).
2021-02-08 07:08:01
Anyway, guess I'll just go for some pre-compiled binaries or something.
2021-02-08 07:08:23
Does anyone have an up to date link?
Deleted User
_wb_ Zero dot odd dot odd sounds like the opposite of a stable version to me but yes, as stable as possible 😅
2021-02-09 01:06:39
libopus 1.3.1 is odd dot odd dot odd, yet it's been stable for almost 2 years 😜
spider-mario
lonjil Question: what kind of stuff do I need to compile JXL on Windows? I'm having to use Windows for school reasons but I'd like to be able to still use JXL. But not used to doing dev on this platform.
2021-02-09 04:25:17
I build it successfully with msys2
2021-02-09 04:26:25
something along these lines should do: ``` pacman -S mingw-w64-x86_64-{cmake,ninja,clang} # from build dir in MinGW64 shell: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G Ninja $jxl_source_dir ninja ```
2021-02-09 04:29:20
after 4 years on Ubuntu followed by 10 years on Arch Linux, I actually made Windows my main OS again recently
2021-02-09 04:29:25
it’s not as painful as it used to be
Deleted User
2021-02-09 05:24:58
Literally everything changed A LOT since Win95
2021-02-09 05:25:04
It's a completely different OS
spider-mario
2021-02-09 05:41:19
true, though Windows 8 was still very painful
2021-02-09 05:41:26
but admittedly, Windows 7, not as much
Deleted User
2021-02-09 05:42:05
Oh god, those tiles, Win10 is actually usable, but still Win8 was step in the right direction in terms of flat design
spider-mario
2021-02-09 05:42:19
I think I rate Windows 8 below Vista
Deleted User
2021-02-09 05:42:21
I hate those cringy shadows and flares from Win7
spider-mario
2021-02-09 05:42:50
visually, I kind of liked Aero from Vista/7
Deleted User
2021-02-09 05:43:22
I like it only for nostalgia, but as a daily driver? No way
2021-02-09 05:43:41
Things have to look flat
spider-mario
2021-02-09 05:44:00
nah, I don’t really like flat
_wb_
2021-02-09 05:44:16
Flat is still hip
spider-mario
2021-02-09 05:44:24
I also loved Apple’s Aqua up to OS X 10.5 (inclusive)
2021-02-09 05:44:37
if that tells you anything about my tastes 😄
Nova Aurora
2021-02-09 05:44:53
I prefer apple 10.16 lol
2021-02-09 05:45:46
after that is seems they want to make MacOS IOS
_wb_
2021-02-09 05:47:00
UI fashion is weird
2021-02-09 05:48:11
Always alternates between flat, 3D, and glossy/semitransparent
VEG
2021-02-09 06:00:27
Windows Classic is the best 🙂
_wb_
2021-02-09 06:13:23
2021-02-09 06:13:45
I liked the aesthetics of GEM
2021-02-09 06:14:59
2021-02-09 06:15:07
Also this
2021-02-09 06:16:09
GEM and Amiga were nice GUIs
2021-02-09 06:16:29
It went downhill afterwards
Crixis
2021-02-09 06:30:12
I love total minimal, i simply felt so more relaxed
_wb_
2021-02-09 06:48:37
Anyway, back to the channel topic
2021-02-09 06:48:59
I'm ready for 0.3.1
spider-mario
2021-02-09 06:49:06
http://toastytech.com/guis/ is a site I love, and so is http://www.therestartpage.com/
2021-02-09 06:49:19
it feeds my nostalgia
Deleted User
_wb_ I'm ready for 0.3.1
2021-02-09 06:51:49
No more crucial fixes?
_wb_
2021-02-09 06:52:21
Can do a 0.3.2 if we forgot something, right?
Deleted User
2021-02-09 06:52:35
OK 🙂
Dr. Taco
2021-02-09 07:53:22
XP = Trash XP SP1 = Good XP SP2 or 3 = <:Chrisgasm:277833264331358209> Vista = Good ideas, bad execution, very bad luck 7 = Exact same good ideas, great execution, good luck 8 = Complete garbage ideas, shit execution 10 = Same garbage ideas, but dialed back and with good execution
2021-02-09 07:54:30
Windows 8 is the only OS I rate worse than OSX/MacOS
Nova Aurora
2021-02-09 07:56:18
So what I learned today is that there's pretty much no concensus
Dr. Taco
2021-02-09 07:57:28
I like Zorin 🙂 It's Ubuntu pretending to be Windows 7. And I like the *idea* of ReactOS, though I don't know if it will ever become usable in a more practical sense. But it's interesting
Nova Aurora
Dr. Taco I like Zorin 🙂 It's Ubuntu pretending to be Windows 7. And I like the *idea* of ReactOS, though I don't know if it will ever become usable in a more practical sense. But it's interesting
2021-02-09 07:59:12
It's only been in Alpha for the past 30 years, at this rate we'll see a 1.0 release in time for windows 10 to become public domain
Dr. Taco
2021-02-09 08:00:36
open source meh > closed source public domain, because one can keep being improved upon. Also ReactOS just did a big release recently
_wb_
2021-02-09 10:17:12
dev repo is at 0.3.1, I suppose sync to public repo will happen soon now
BlueSwordM
2021-02-10 01:37:20
Oh, interesting.
2021-02-10 01:37:34
I already found a bug with the QT-JPEG-XL plugin.
2021-02-10 01:37:36
Fun.
2021-02-10 01:37:50
Now, time to try and solve it.
Scope
2021-02-10 01:39:32
<:FeelsReadingMan:808827102278451241>
2021-02-11 08:37:53
<https://github.com/GoogleChromeLabs/squoosh/commit/029c2ebb83651fbf854fa7fd689a571a0338394e> `Bump jxl version and remove workaround for enc memory usage.` <:Hypers:808826266060193874>
Nova Aurora
2021-02-11 08:45:07
Noice
2021-02-11 08:45:31
https://tenor.com/view/noice-nice-click-gif-8843762
veluca
Nova Aurora https://tenor.com/view/noice-nice-click-gif-8843762
2021-02-11 09:08:38
thanks 😛
Scope
2021-02-11 10:21:16
https://github.com/phoronix-test-suite/test-profiles/issues/186
2021-02-11 10:24:21
https://openbenchmarking.org/test/pts/jpegxl
2021-02-11 10:36:05
Perhaps it would be helpful to add lossless modes to the test profiles as well or any adjustments for speeds and options? Because openbenchmarking can have a lot of data over time with a wide variety of hardware
2021-02-11 10:36:50
(but it's up to the devs)
veluca
2021-02-12 01:11:54
oh, it's testing lossless jpeg recompression
2021-02-12 01:11:59
that explains why it's so fast...
Scope
2021-02-12 01:44:50
> `but any improvements are welcome either through GitHub merge requests or simple patches` Oh, that's good, it might also be worth adding another more complex test image(s) if such a thing is allowed, as well as the most necessary speeds for each mode (I would be interested in how the CPUs differ for these modes, including the slowest)
Deleted User
2021-02-12 02:09:29
I've updated to 3.0.1 and through trial and error applied https://github.com/tbonfort/gdal/commit/119e1771d21f2bb476eab2e2fef724f1b35e654b . on my single channel 16 bit lossless testcase , the output size went from 133M to 54M , and the result is lossy. Is there any doc about how to use libjxl for this use case, or should I just wait for it to stabilise ?
veluca
2021-02-12 02:39:22
I think there are explicit flags to set for lossless encoding but I don't really know
Deleted User
2021-02-12 02:45:32
well, the lossless compression worked correctly with that code with the previous version of libjxl
BlueSwordM
2021-02-12 02:45:55
Can you share the image?
Deleted User
2021-02-12 02:48:09
yes sure, its public : https://storage.cloud.google.com/gcp-public-data-sentinel-2/tiles/31/T/DH/S2A_MSIL1C_20210211T104151_N0209_R008_T31TDH_20210211T125423.SAFE/GRANULE/L1C_T31TDH_A029463_20210211T104437/IMG_DATA/T31TDH_20210211T104151_B08.jp2
veluca
2021-02-12 02:49:32
Could you perhaps file a bug?
2021-02-12 02:50:12
it might be that this is perhaps totally intended behaviour, but at least it would allow me to point the correct person at it 🙂
Deleted User
2021-02-12 02:50:29
sure if it's a bug, I'm just wondering if the exposed api in libjxl is just not ready yet for this use-case
veluca
2021-02-12 02:50:51
I don't know, but no harm in adding an issue 🙂
Deleted User
2021-02-12 02:51:56
I've been able to losslessly encode 1 channel and 4 channel images, but documentation always refers to srgb, which my test cases was definitely not
2021-02-12 02:52:09
I'll open an issue asap
Scope
2021-02-12 04:22:11
<https://github.com/phoronix-test-suite/test-profiles/pull/187> Have the lossless encoding/decoding modes been added here? I think that would be more important than JPEG recompression
_wb_
2021-02-12 04:26:52
lossy from pixel is the most important in practice imo
2021-02-12 04:27:06
for the web at least
2021-02-12 04:27:21
lossless enc/dec is interesting too
2021-02-12 04:29:26
lossy from pixel encoding has been added in the 1.1.0 one it seems
2021-02-12 04:29:56
he'll add decoding he said, I hope both lossy and lossless
2021-02-12 04:31:02
lossless encoding is maybe a bit early to add there, I think we can still improve the speed/density tradeoffs
Scope
2021-02-12 04:32:18
Yep, lossless speed would also be interesting (as it can be noticeably different from lossy) and for the web as well (and server CPUs)
_wb_
2021-02-12 04:52:32
For web, I think you mostly want lossless for small images like UI elements, emojis, logos etc. Maybe for some infographics too, those can get larger (but maybe good lossy is also ok for those, as long as the text does not get dct artifacts)
2021-02-12 04:53:32
Big image lossless is mostly for authoring workflows imo, like when saving/loading an image you're photoshopping
2021-02-12 04:53:52
So also relevant, but not so much for the web
Scope
2021-02-12 04:55:48
Mostly yes, but for example my test set contains popular PNG images, some of which are viewed millions of times, so even for large images on the Web, especially Art/Manga/Comix and such, this is not uncommon
_wb_
2021-02-12 05:01:45
Right, but I guess that's mostly because currently PNG is the only universally available codec that is useful for such images (lossless WebP can start replacing it though). JPEG will just give either worse compression than PNG or ugly artifacts.
2021-02-12 05:05:22
With `-d 1` lossy jxl encoding, and maybe patches for the text and other stuff for which lossless works better – patches is effectively the lossless codec, but only for a smaller image (the patch spritesheet), and used with quantized colors (you don't need 256 shades of gray to render black on white text nicely), so that should be cheaper than full-image full-lossless encode/decode
2021-02-12 05:05:52
it may be good enough for the web
Scope
2021-02-12 05:20:18
Lossy JXL still has problems with sharp lines and ringing in Art or b&w manga images (but AVIF and the like are good at that), maybe in the future this will improve noticeably, but I don't think that many sites that currently have PNG images like various boards, reddit, online manga/comics/art will convert this to lossy formats (especially if the lossless JXL can also noticeably reduce size by 30-70% without fear of possible artifacts)
2021-02-12 05:23:12
They usually have lossless full images and lossy previews (btw, reddit has also started replacing previews with webp)
_wb_
2021-02-12 05:29:44
hmyes, I guess. Well, the more things we can benchmark and test, the better, of course.
Scope
2021-02-12 05:40:03
The main problem (apart from support everywhere) can be heavily increased CPU load when converting to lossless JXL (although there are faster modes) and also slower decoding speed for clients (to me it is already sufficient, however, people can have much slower hardware and view a very large image), but not the fear of lossless images sizes compared to lossy (given that they already use less efficient, often unoptimized PNG images)
veluca
2021-02-12 05:52:23
one of the things on our todo list is a mode that compresses a few types of content "fast and well enough" but more importantly is significantly faster to decompress
_wb_
2021-02-12 05:53:20
you may have noted that -s 3 encoded images also decode faster
Scope
2021-02-12 05:57:15
Yep, practical modes of encoding and decoding speed with good efficiency are also needed. And however, all I said does not apply to photographic images, they can rarely be found in lossless format for normal web viewing (unless they are memes mixed with text or small images or mistakenly converted Jpeg) and for them also lossless makes much less sense (except for archival storage or use for further editing)
veluca
2021-02-12 05:59:15
-I 0 images also decode very fast (and encode decently fast with -s 8)
Scope
2021-02-12 06:05:47
But, it is also necessary that these modes have a noticeable higher average efficiency than PNG (otherwise there will be no reason to change the more supported format)
2021-02-12 06:10:51
Which is almost true even for `-s 3`, if improving efficiency for pixelart content
_wb_ you may have noted that -s 3 encoded images also decode faster
2021-02-12 06:18:34
This is also why I would like to see lossless encoding/decoding speeds on different generations of CPUs, with different support for SIMD and other things and how they differ between the fastest and slowest modes
lithium
Scope Lossy JXL still has problems with sharp lines and ringing in Art or b&w manga images (but AVIF and the like are good at that), maybe in the future this will improve noticeably, but I don't think that many sites that currently have PNG images like various boards, reddit, online manga/comics/art will convert this to lossy formats (especially if the lossless JXL can also noticeably reduce size by 30-70% without fear of possible artifacts)
2021-02-12 06:19:55
Hello Scope, Could you teach me about this situation? (Lossy JXL still has problems with sharp lines and ringing in Art or b&w manga images), my target image is non-photographic, i very worry those problems...
Scope
2021-02-12 06:23:53
I can't teach a solution to this problem (except increase the quality of encoding), at the moment this is how JXL works and in this it is worse than for example AVIF, but Jyrki planned some improvements in this direction
lithium
2021-02-12 06:29:27
I get some issue in non-photographic image, https://gitlab.com/wg1/jpeg-xl/-/issues/147 situation is similar your description, -s 3 is better than -s 7, but that area still look bad, and this area is worse than avif.
2021-02-12 07:41:17
A little curious, in your test set this situation will happen in vardct -d 1.0 and -d 0.5?
2021-02-12 07:43:33
or this situation will happen in lower quality, like -q 85 -q 80?
Scope
2021-02-12 07:45:47
It was with -d 1.0, I have not tested -d 0.5, instead I use -d 0.3 (and there it is quite rare, but also the size becomes much larger) and I have not done tests on new builds
lithium
2021-02-12 07:51:30
Thank you very much, hope we can get encoder improvement about this issue in next release. 🙂
fab
2021-02-13 02:51:28
what is that commit?
2021-02-13 02:51:29
https://gitlab.com/wg1/jpeg-xl/-/commit/e2b1e60f5fda02f5fb395b0b6113f64d33cbb91d
2021-02-13 02:52:11
ah fix to that
2021-02-13 02:52:12
https://gitlab.com/wg1/jpeg-xl/-/issues/149
2021-02-13 02:52:17
maybe
Deleted User
2021-02-13 02:54:53
Look at the commit list, there were two commits in a short time, one with a bugfix and after an hour another one that bumps the version to 0.3.2
fab
2021-02-13 03:04:12
Thanks
BlueSwordM
2021-02-15 10:47:46
No problemo.
_wb_
2021-02-25 01:30:54
Has anyone looked into this one? https://gitlab.com/wg1/jpeg-xl/-/issues/151
BlueSwordM
2021-03-02 06:42:35
I have not.
2021-03-02 06:44:00
Anyway, I still seem to have the issue of progressive images not being able to be decoded. Is that normal? Here is my build process(with clang of course): ```git clone https://gitlab.com/wg1/jpeg-xl.git --recursive cd jpeg-xl mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Release -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_ENABLE_DEVTOOLS=ON -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTING=OFF -DJPEGXL_WARNINGS_AS_ERRORS=OFF -DJPEGXL_ENABLE_SJPEG=OFF .. cmake --build . -- -j 16 sudo make install```
2021-03-02 06:46:41
I have followed everything down to the latter starting from number 2: https://github.com/novomesk/qt-jpegxl-image-plugin I wonder why progressive images would cause such a problem on my end. 🤔
_wb_
2021-03-02 06:47:06
What kind of progressive images do not decode? And in what sense do they not decode? Not at all, not progressively?
2021-03-02 06:47:27
Is it vardct, modular, both?
BlueSwordM
2021-03-02 06:48:57
It does not decode the progressive image at D3, and it uses VARDCT. I have not tested modular.
2021-03-02 06:51:15
2021-03-02 06:51:15
2021-03-02 06:51:52
Here is the error that I am getting: ```nomacs '/home/bluezakm/Pictures/Dark/Low BPP/D3.jxl' [INFO] Hi there [INFO] plugins dir set to: "/usr/lib64/nomacs-plugins" [INFO] local client created in: 2 ms [INFO] theme loaded from "/usr/local/share/nomacs/Image Lounge/themes/Light-Theme.css" [INFO] CSS loaded from: ":/nomacs/stylesheet.css" [INFO] Initialization takes: 78 ms [INFO] [DkImageLoader] 5 containers created in 0 ms [INFO] [DkImageLoader] after sorting: 0 ms [WARNING] Unexpected event 1024 instead of JXL_DEC_NEED_IMAGE_OUT_BUFFER [WARNING] Unexpected event 1024 instead of JXL_DEC_NEED_IMAGE_OUT_BUFFER [WARNING] [Basic Loader] could not load "/home/bluezakm/Pictures/Dark/Low BPP/D3.jxl"```
Nova Aurora
2021-03-02 06:51:55
does it open in gwenveiw?
BlueSwordM
Nova Aurora does it open in gwenveiw?
2021-03-02 06:52:01
No.
Nova Aurora
2021-03-02 06:52:29
could havew the file?
BlueSwordM
Nova Aurora could havew the file?
2021-03-02 06:52:59
Here they are.
Nova Aurora
2021-03-02 06:53:41
all of them open for me in gwenview and qview
2021-03-02 06:54:20
although I'm not on the latest qt jxl since compiling the new one fails for me
BlueSwordM
2021-03-02 06:58:42
Yeah, I'd like to fix this as quickly as possible as I need to do a lot of testing for both JPEG-XL and AVIf libaom-av1/rav1e to see what they can do.
_wb_
2021-03-02 07:08:15
https://gitlab.com/wg1/jpeg-xl/-/blob/master/lib/include/jxl/decode.h#L205
BlueSwordM
2021-03-02 07:19:04
Ah, so instead of calling the JXL_DEC_FRAME function, it's doing something else. It must be related to the plugin then 🤔
_wb_
2021-03-02 07:24:52
Seems to me like that application is subscribing to all decode events (see https://gitlab.com/wg1/jpeg-xl/-/blob/master/lib/include/jxl/decode.h#L285) but then throws warnings when it doesn't understand some of them. No idea if that's what causes the problem though
2021-03-02 07:35:28
I think the problem might be that the plugin expects events to happen in a specific order, which is not necessarily true
2021-03-02 07:36:11
https://github.com/novomesk/qt-jpegxl-image-plugin/blob/main/src/qjpegxlhandler.cpp#L282
BlueSwordM
2021-03-02 07:39:42
Thank you for the small investigation. I will open an issue in the QT-JXL repo.
_wb_
2021-03-02 07:41:12
With progressive images, the order could be different, maybe.
2021-03-02 07:44:41
I mean, it could also be a libjxl issue, but I think the application is not using libjxl in a correct way here: you shouldn't expect the decode status events to happen in exactly the same way for all input images. I think. <@768090355546587137> knows better though.
BlueSwordM
2021-03-03 08:48:19
<:megapog:816773962884972565>
2021-03-03 08:48:34
The QT-JXL plugin bug has been fixed in regards to progressive images by doing something funky.
Nova Aurora
BlueSwordM <:megapog:816773962884972565>
2021-03-03 08:49:17
you added that demon spawn to this server?
improver
BlueSwordM The QT-JXL plugin bug has been fixed in regards to progressive images by doing something funky.
2021-03-03 10:04:55
https://github.com/novomesk/qt-jpegxl-image-plugin/commit/5394e0c9dd17faedef9d07d27623ddb198b9a675 that's still not the right way to do it eh..
2021-03-03 10:28:46
on the other hand, docs of relevant event really do tell that it it supposed to occur once per frame, before pixel data
2021-03-03 10:29:32
but other events aren't so clearly defined so it still seems wrong to me, how it's done right now
2021-03-03 10:33:57
should have decoder randomize event order to fuzz library users at some point >:^^DDD
_wb_
2021-03-05 05:25:46
ugh, just noticed that the gdk-pixbuf plugin we have is ignoring ICC profiles
veluca
2021-03-05 05:29:07
that's not good
Crixis
_wb_ ugh, just noticed that the gdk-pixbuf plugin we have is ignoring ICC profiles
2021-03-05 05:32:39
uh, is a bug from 0.3.2
2021-03-05 05:33:43
in 0.3 it worked, on jpg lossless work
BlueSwordM
2021-03-05 07:03:43
So, is it possible to output the butteraugli_main statistics to a text file? I could read the score from the command line, but that would be a bit harder to make a program in. 😛
veluca
2021-03-05 07:13:49
well, at least on linux you can just use `./butteraugli_main img1 img2 > textfile`, I think there is some equivalent on windows...
spider-mario
2021-03-05 08:22:52
the same thing if it has been built
2021-03-05 08:24:03
``` $ ls -l tools/butteraugli_main.exe -rwxr-xr-x 1 Sami Aucun 3779728 5 mars 21:22 tools/butteraugli_main.exe* ```
BlueSwordM
2021-03-05 08:41:46
Yeah, I think I should be able to do pooled butteraugli scores by next week for video.
Scope
2021-03-05 08:42:06
Yep ```butteraugli_main.exe img1 img2 > textfile.txt```
Jim
2021-03-06 02:23:15
Seeing a couple vulnerabilities being reported on Twitter.
_wb_
2021-03-06 02:46:00
That doesn't seem to be the best platform to report fuzzerbugs on... Have a link?
Jim
2021-03-06 03:05:10
https://twitter.com/www_sesin_at/status/1368152063478235137 https://twitter.com/threatintelctr/status/1367847089225531399 https://twitter.com/threatintelctr/status/1367945212497174536
_wb_
2021-03-06 03:11:06
It's good that security researchers are scrutinizing the implementation
chuni
2021-03-06 04:30:10
What's the best documentation for the bitstream right now, is it just libjxl source? Thinking about writing a decoder in some other language than C++
Crixis
2021-03-06 04:31:06
Rust!!!
2021-03-06 04:31:46
Yup, code is actualy best way
chuni
2021-03-06 04:45:34
Gotcha. And dumb question, but what is the box format container vs the alternative?
Crixis
2021-03-06 05:01:32
I think is becouse the container is not mandatory but I'm not sure
bobadingo
Crixis Rust!!!
2021-03-06 05:31:54
Second that, prevents silly things like these at compile time: https://gitlab.com/wg1/jpeg-xl/-/blob/65825c8629f181dbe8bdd432b15576735af29701/examples/jxlinfo.c#L130-131
Crixis
2021-03-06 05:34:42
yep
_wb_
2021-03-06 05:46:57
<@805471712451100672> if you are interested in writing a new decoder, it would actually be great to do it from spec and not from existing code
2021-03-06 05:47:09
Best way to find spec bugs
chuni
2021-03-06 05:51:12
Is that publicly available, <@!794205442175402004> ?
veluca
bobadingo Second that, prevents silly things like these at compile time: https://gitlab.com/wg1/jpeg-xl/-/blob/65825c8629f181dbe8bdd432b15576735af29701/examples/jxlinfo.c#L130-131
2021-03-06 05:52:23
wait, why did we even write that in C instead of C++? (in C++ linters will usually complain about that kind of things anyway...)
chuni
2021-03-06 05:52:30
I found the whitepaper but have yet to find a longer form document
veluca
chuni Is that publicly available, <@!794205442175402004> ?
2021-03-06 05:53:09
it's not - for what it's worth, it's not even published officially (the FDIS might be but I don't know if that's something you can get your hands on, even by paying)
BlueSwordM
veluca wait, why did we even write that in C instead of C++? (in C++ linters will usually complain about that kind of things anyway...)
2021-03-06 05:53:41
Because declaring variables inside of loops is bad. <:kekw:808717074305122316> Sorry for the joke, I've been learning more C++ these days. 😛
2021-03-06 05:54:31
I now understand why some people like using it, while others don't.
veluca
2021-03-06 05:55:09
I guess we wanted to have an example of using the API from C? oh well...
2021-03-06 05:56:05
unless I forgot something basically everything in our codebase is C++ except the header files of the API
2021-03-06 05:56:54
if somebody wants to implement a new en/decoder, well, that's nice - certainly want to wish them good luck though 😛
2021-03-06 05:57:22
it might be simpler to make a decoder that doesn't need to be super fast
_wb_
2021-03-06 05:57:34
It's certainly going to be more work than making a jpeg decoder
2021-03-06 05:58:40
But if speed doesn't matter much, just decoding correctly, it might not be _that_ hard
2021-03-06 05:58:59
The spec is about 100 pages
2021-03-06 06:00:00
A bit less if you only count the actual meat
veluca
2021-03-06 06:02:32
well, for the codestream...
_wb_
2021-03-06 06:07:08
I'd start with writing a header parser, then do the modular sub-bitstream without any transforms and without MA trees. Then you have something that you can already test (on outputs of `cjxl -m -I 0 -X 0 -Y 0 -C 0 --palette 0`). Then you can make modular more complete, and then start on VarDCT. The stuff like filters, patches, splines you can do at the very end.
chuni
2021-03-06 06:18:39
Is this the most up to date spec <@!794205442175402004> ? https://arxiv.org/ftp/arxiv/papers/1908/1908.03565.pdf
veluca
2021-03-06 06:19:12
hah, no
2021-03-06 06:19:16
by a lot
chuni
2021-03-06 06:20:28
Oh, is it https://www.iso.org/standard/77977.html and https://www.iso.org/standard/80617.html ?
2021-03-06 06:20:48
The preview at least says 2020 this time
veluca
2021-03-06 06:22:38
not quite the latest either, but significantly more recent, at least
chuni
2021-03-06 06:23:31
Gotcha. Well in any case, I appreciate the tips for where to start for a simple decoder. I think headers, then modular, then VarDCT makes sense as a good approach
veluca
2021-03-06 06:23:46
I don't know exactly how the IP policy of ISO works - I know we can't make DIS or FDIS public, it might be possible to share it with specific people under appropriate agreements - <@!794205442175402004> do you have an idea?
chuni
2021-03-06 06:24:31
Worst case, I can just take a look at existing decoder and put together a mental model of what the spec might be
veluca
2021-03-06 06:24:50
(spoiler: that's how we wrote the spec :P)
2021-03-06 06:25:17
it's likely easier for you to write a decoder out of the existing C++ code than out of the spec
2021-03-06 06:25:35
but writing one out of the spec would help detecting issues, at least...
2021-03-06 06:28:24
there are some tricks that could make modular mode faster to decode that we don't do - such as doing some form of just-in-time compilation of the MA tree to machine code - because they would make security people twitchy 😛 it might be possible to do that in an independent implementation that doesn't get integrated in browsers
chuni
2021-03-06 06:30:11
Well, if you can translate the MS tree code to JS, then you can just use the browser's JIT 😉
veluca
2021-03-06 06:30:52
true, but that's likely going to be slower overall than traversing the tree manually 😛
2021-03-06 06:31:10
depends on image size of course, but it would take some rather big images
Pieter
2021-03-06 06:31:47
What's the performance of libjxl-compiled-to-wasm like?
veluca
2021-03-06 06:32:30
I don't remember exact numbers, but not that great without wasm+simd for sure... with wasm+simd, I think it's not too far from native
Pieter
2021-03-06 06:33:15
Yeah, makes sense.
veluca
2021-03-06 06:34:06
and I don't think wasm+simd is enabled by default anywhere
BlueSwordM
2021-03-06 07:10:36
<@!532010383041363969> So, last week we talked about how XYB is great, yes?
2021-03-06 07:11:04
Well, do you think you can point me to some resources to how I could implement usage of the XYB color space in encoders?
veluca
2021-03-06 07:12:47
I can give you an overview
2021-03-06 07:14:40
from the decoder side, it ought to be enough to give the image an ICC profile (you might have seen an XYB JPEG going around in this server at some point...)
BlueSwordM
2021-03-06 07:16:14
Yes.
veluca
2021-03-06 07:17:21
if you can use the C++ code from libjxl, then it's relatively easy - assuming you can't, you need to parse it 😛 let me see if I can find some equivalent simpler-to-digest description...
BlueSwordM
veluca if you can use the C++ code from libjxl, then it's relatively easy - assuming you can't, you need to parse it 😛 let me see if I can find some equivalent simpler-to-digest description...
2021-03-06 07:18:36
I can't because of Rust obviously. 😛 That means I might have to convert this myself: https://gitlab.com/wg1/jpeg-xl/-/blob/master/tools/xyb_range.cc
veluca
2021-03-06 07:19:48
the problem is more this part: https://gitlab.com/wg1/jpeg-xl/-/blob/master/lib/jxl/enc_xyb.cc#L142
2021-03-06 07:28:14
linear RGB to XYB conversion
2021-03-06 07:28:31
that's the first part of the trick
2021-03-06 07:28:44
(I hope I didn't make typos)
2021-03-06 07:29:43
then you need some extra trickery: ``` x' = (x + 0.015386134) * 22.995788804; y' = y * 1.183000077; b' = ((b-y) + 0.27770459) * 1.502141333; ```
2021-03-06 07:30:14
2021-03-06 07:30:35
after you did that, you get "RGB" pixels that should be displayed correctly if you use that ICC profile
2021-03-06 07:31:04
(everything here assumes 0-1 range, btw)
_wb_
veluca I don't know exactly how the IP policy of ISO works - I know we can't make DIS or FDIS public, it might be possible to share it with specific people under appropriate agreements - <@!794205442175402004> do you have an idea?
2021-03-06 07:35:46
I don't really know, redistribution is not allowed because ISO has copyright, but one might make the argument that it's not a secret/NDA type of document either, and it is a case of "fair use" for JPEG experts to share the spec with others for the purpose of catching typos, unclear parts, or validating the spec with an independent decoder implementation.
2021-03-06 07:39:08
Probably there are code of conducts or other ISO 'regulations' that can be interpreted in various ways as allowing it or not allowing it.
2021-03-06 07:39:40
What is clearly not allowed is putting the spec on some public website.
2021-03-06 07:40:16
What is allowed in terms of private sharing is not fully clear to me.
BlueSwordM
veluca linear RGB to XYB conversion
2021-03-06 10:31:20
What does the M variable mean exactly?
2021-03-06 10:33:37
OH, eyes.
2021-03-06 10:34:05
Long, Medium, Short.
Jyrki Alakuijala
veluca (spoiler: that's how we wrote the spec :P)
2021-03-06 10:36:57
we can very likely find an arrangement if someone wants to write a decoder out of the spec
veluca
BlueSwordM OH, eyes.
2021-03-06 10:38:17
Uh, no, M was just for Matrix, B is for Bias
BlueSwordM
2021-03-06 10:38:30
Oh, I was worried that it was going to be much more complicated than that. 😛
veluca
2021-03-06 10:38:52
Lrgb is linear RGB - so you need to convert to that somehow
Jyrki Alakuijala
2021-03-06 10:38:59
everyone at ISO and in JPEG XL effort (that I know of) would be very happy to have a verification effort for the spec
2021-03-06 10:39:49
how to get the access within the rulebook of ISO is an issue, but I'm pretty sure we will be able to find a way
2021-03-06 10:40:03
Mark Adler wrote the verification decoder for Brotli 🙂
2021-03-06 10:40:43
from zlib/Adler32 fame, also a lead for some of Mars rover missions
spider-mario
2021-03-07 07:58:55
for what it's worth, Swiss copyright law lists a few exceptions :p https://www.fedlex.admin.ch/eli/cc/1993/1798_1798_1798/en#tit_2/chap_5
2021-03-07 07:59:43
but best to clarify this with ISO directly
Jim
2021-03-07 01:20:45
Any help getting it compiled on Windows? Seems to be a real pain. The latest working version I have is 0.3. There were numerous errors I ran into including missing Gmock. It seems to be pointed to the right directory but tells me gmock.lib does not exist. I instead pointed it to the gmock files in googletest (which is a dependency that is not listed, it complains about it when you try to compile, so I downloaded it manually). That seems to work (maybe?), it no longer complains it can't find it. At this point I can get it to compile without any errors but produces an exe that is 1/3 the size it should be and obviously does not work. Running it, it immediately exits with no message.
_wb_
2021-03-07 01:21:21
Ouch
2021-03-07 01:26:09
I can't help with Windows building. I would expect the build to be without tests if you don't have that dependency.
2021-03-07 01:27:34
I saw some reported build issues on GitLab, I suspect that some are already fixed but still need to be synced to the public repo
Jim
2021-03-07 01:28:06
You mean gmock? The compile fails when it can't find it. I could try disabling it but I suspect the exe wouldn't be any different. Not sure why the tests would be the cause of an incorrect compile.
2021-03-07 01:28:28
There are quite a few warnings, mostly about missing functions that relate to testing.
2021-03-07 01:29:41
I applied the newest patch that was suggested since I had the same issue, the incorrect function parameters. Would think that would cause any build to fail, not just windows.
veluca
2021-03-07 01:32:13
you mean the one with JXL_RESTRICT? I *think* that happens to not change the ABI on some platforms, where it just ends up working...
Jim
2021-03-07 01:50:52
I forced the GMOCK_INCLUDE_DIR into the json file and it seems to have fixed that, but still making a bad exe.
spider-mario
Jim Any help getting it compiled on Windows? Seems to be a real pain. The latest working version I have is 0.3. There were numerous errors I ran into including missing Gmock. It seems to be pointed to the right directory but tells me gmock.lib does not exist. I instead pointed it to the gmock files in googletest (which is a dependency that is not listed, it complains about it when you try to compile, so I downloaded it manually). That seems to work (maybe?), it no longer complains it can't find it. At this point I can get it to compile without any errors but produces an exe that is 1/3 the size it should be and obviously does not work. Running it, it immediately exits with no message.
2021-03-07 01:52:52
are you building with MSVC?
2021-03-07 01:53:00
for me, it works with MSYS2 / MinGW-w64
Jim
2021-03-07 01:53:23
Yes, using MSVC with Clang
2021-03-07 01:54:05
I went through all the warnings and they are all about unused functions, use of deprecated functions, and disabling AVX due to issues with 32-bit MSVC.
2021-03-07 01:55:53
I will try MSYS2
2021-03-07 02:57:12
Seems to have failed as well. Ended with this...
2021-03-07 02:57:45
`C:\msys64\home\jimbo\downloads\jpeg-xl-2021-03-06\lib\jxl\modular\encoding\enc_encoding.cc(274): message : see reference to function template instantiation 'jxl::pixel_type_w jxl::weighted::State::Predict<true>(size_t,size_t,size_t,jxl::pixel_type_w,jxl::pixel_type_w,jxl::pixel_type_w,jxl::pixel_type_w,jxl::pixel_type_w,jxl::Properties *,size_t)' being compiled [C:\msys64\home\jimbo\downloads\jpeg-xl-2021-03-06\build\lib\jxl_enc-obj.vcxproj] Generating Code...`
2021-03-07 02:58:07
It seems to just halt after that with no other messages.
_wb_
2021-03-07 02:58:45
Weird
spider-mario
2021-03-07 03:06:23
vcxproj? with msys2?
Jim
2021-03-07 03:07:50
It is using, from what I can tell, the same MSVC package that MSVC was using. Do you have specific steps you go through with a different compiler?
2021-03-07 03:25:10
Ah, the `-G` option. I am trying with that.
veluca
2021-03-07 03:26:02
wait, you're saying that you don't get a working compile with MSVC?
Jim
2021-03-07 03:26:37
Nope, and not with MSYS2/MingW64 with MSVC package as default either.
2021-03-07 03:30:46
Ming is done compiling. The file size looks much more promising.
veluca
2021-03-07 03:30:54
ok, that's useful to know and probably something we should fix. Do you think you could file an issue for that, and maybe with more information about the problems you have?
Jim
2021-03-07 03:33:46
Drat, this file doesn't work either.
2021-03-07 03:33:57
Just exits back to the command prompt.
veluca
2021-03-07 03:34:42
<@!604964375924834314> do you have the same problem?
Jim
2021-03-07 03:36:40
I will later, not sure how it will help though. Like I said, using the MSVC interface it shows a lot of warnings about deprecated functions and such but no errors. Just produces a faulty exe (~2.5mb). Ming/MSYS with MSVC package gets the dependancies and appears to start compiling but stops and drops to the command line part way through. Ming/MSYS with it's own libraries completes compiling but also with a faulty exe (~5MB).
veluca
2021-03-07 03:37:26
just for our own tracking 🙂
2021-03-07 03:37:53
both sizes are kinda reasonable actually
2021-03-07 03:38:06
how are you compiling exactly?
Jim
2021-03-07 03:38:26
The working 0.3 I have is 6MB. Not sure how 2.5 is. 5 is much more reasonable.
veluca
2021-03-07 03:38:44
there should be some option to not remove error messages that should perhaps give you more information (not sure how to get that on windows)
2021-03-07 03:39:43
a fully working `djxl` binary for me is 1.7 mb on Linux
Jim
veluca how are you compiling exactly?
2021-03-07 03:41:28
With the MSVC interface I follow: https://gitlab.com/wg1/jpeg-xl/-/blob/master/doc/developing_in_windows.md However I have to download dependencies manually (not sure why deps.sh keeps failing partway through). Also have to apply patch here: https://gitlab.com/wg1/jpeg-xl/-/issues/166
2021-03-07 03:42:57
With Ming I installed the development packages according to the site then followed install according to: https://gitlab.com/wg1/jpeg-xl Replaced the dependency installs with msys/ming package commands.
spider-mario
2021-03-07 03:43:57
with MSYS2, I do this in a MinGW shell with `mingw-w64-x86_64-{cmake,ninja,clang}` installed: ``` cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -G Ninja $source_dir ninja ```
veluca
2021-03-07 03:44:02
ok, can you try `cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..` instead?
2021-03-07 03:44:45
(i.e. replace `Release` with `RelWithDebInfo` - should give you some error messages)
Jim
2021-03-07 03:49:25
I am trying with that now. I used -G "MinGW Makefiles" to not use the Windows installer. If I don't it uses MSVC package by default.
2021-03-07 03:49:51
<@!604964375924834314> I will try after but that seems like the same setup as when I used the interface.
spider-mario
2021-03-07 03:50:20
I think MinGW Makefiles should have been fine as well
Jim
2021-03-07 03:51:36
Like I said, using -G "MinGW Makefiles" or the interface completes compiling but exes don't work. Using default MSVC packages (no -G) fails part way.
2021-03-07 03:52:21
Oh, and I used RelWithDebInfo on when using the interface.
veluca
2021-03-07 03:53:03
RelWithDebInfo should only help once you have actual binaries I believe
2021-03-07 03:53:36
(but if you can give more information on the error message with the interface, that would be really helpful)
Jim
2021-03-07 03:53:57
There is no error message. Just a bunch of warnings.
2021-03-07 03:56:44
<@!179701849576833024> Compile is done. Made a 122MB file. 👀
veluca
2021-03-07 03:57:20
yeah, that happens 😄 lots of debug info...
Jim
2021-03-07 03:59:51
Another dud.
veluca
2021-03-07 04:02:40
and no error whatsoever... that's interesting, if a bit weird
Jim
2021-03-07 04:02:44
<@!604964375924834314> I will try yours but need to find the ninja executable. I think it's buried in the MSVC path...
veluca
2021-03-07 04:02:58
I don't think that makes a difference
spider-mario
2021-03-07 04:03:08
it should be in the path if you install mingw-w64-$arch-ninja
veluca
2021-03-07 04:03:16
I kinda hope it doesn't...
2021-03-07 04:03:39
is this w32 or w64?
Jim
2021-03-07 04:03:48
I assume it will be the same as using the interface cause it uses Clang and ninja to compile.
spider-mario
2021-03-07 04:03:49
and you run it from the mingw shell
Jim
2021-03-07 04:04:05
w64
veluca
2021-03-07 04:04:29
I wonder what's different about your setup...
Jim
spider-mario it should be in the path if you install mingw-w64-$arch-ninja
2021-03-07 04:05:39
What is $source_dir ? I thought you wanted me to replace that with the ninja path.
spider-mario
2021-03-07 04:05:53
oh, that’s jpeg xl’s root directory
2021-03-07 04:06:09
so just `..` if building from a build directory directly in it
Jim
2021-03-07 04:07:13
Ah, got it.
2021-03-07 04:11:18
It is compiling. The output looks exactly like the interface.
2021-03-07 04:12:01
Though all warnings are not showing.
2021-03-07 04:15:20
Another dud, but the file size is very close to the working 0.3 I have.
_wb_
2021-03-07 04:17:21
This is very strange
2021-03-07 04:18:07
Never seen a cjxl/djxl that just goes silent
veluca
2021-03-07 04:18:17
is there such a thing as a return code on windows, and how can you get it?
2021-03-07 04:18:36
it *could* be that it doesn't find some dll it needs and just doesn't even start
2021-03-07 04:18:55
you'd get a message for that on Linux but I dunno about windows
_wb_
2021-03-07 04:19:28
I have no clue but I would expect dynamic loading fails not to be silent
Jim
2021-03-07 04:19:48
Exit code?
_wb_
2021-03-07 04:20:17
That is a funny number
Jim
2021-03-07 04:21:57
Very odd, here is my 0.3 exit code.
veluca
2021-03-07 04:23:31
that exit code is 0xC0000135, possibly not completely random
_wb_
2021-03-07 04:23:46
Is there something like `ldd` in windows?
spider-mario
2021-03-07 04:24:18
there is in msys2
veluca
2021-03-07 04:24:19
`0xC0000135 == STATUS_DLL_NOT_FOUND`
2021-03-07 04:24:37
well, it's apparently silent then
_wb_
2021-03-07 04:24:46
Ugh
spider-mario
2021-03-07 04:25:11
a mingw shell should have everything needed in the $PATH, maybe try running it there instead of PowerShell?
Jim
2021-03-07 04:25:12
Seems like there is a similar command in ming. I could try that.
_wb_
2021-03-07 04:25:12
Silent errors are annoying. Well at least it sets an exit code
Jim
2021-03-07 04:25:42
What DLL would it be looking for is the question?
veluca
2021-03-07 04:25:56
one of the dependencies I guess - libpng/libjpeg/...
spider-mario
2021-03-07 04:26:05
libgcc_s, libpng, things like that
Jim
2021-03-07 04:26:26
I know when I ran the initial setup it did say it couldn't find the avif library, not sure why that would be required.
spider-mario
2021-03-07 04:26:37
it’s not
Jim
2021-03-07 04:27:06
Let me re-run the setup and paste the output. Might give a clue...
_wb_
2021-03-07 04:27:08
That's for benchmark_xl, and should not be a problem if not found
Jim
2021-03-07 04:28:52
Too big to paste, uploaded. This is from the clang/ninja setup.
veluca
2021-03-07 04:30:23
so if I had to guess, openexr might be the issue - you could try disabling it, or copying the openexr DLL(s) to your build directory
2021-03-07 04:30:30
(possibly also webp and avif)
_wb_
2021-03-07 04:35:52
Webp/avif should not get linked in cjxl/djxl
2021-03-07 04:36:00
But openexr might, if enabled
Jim
2021-03-07 04:36:44
I uninstalled it. Setup says this now: `-- Checking for module 'OpenEXR' -- Package 'OpenEXR', required by 'virtual:world', not found`
2021-03-07 04:37:08
If I remember correctly, the interface wouldn't let me compile without it. I think that was something I had to install manually.
_wb_
2021-03-07 04:42:31
Oh. It's supposed to be an optional dependency. Maybe open an issue? If you don't need to do EXR input/output, it should be possible to build a cjxl/djxl that just doesn't support that.
Jim
2021-03-07 04:43:13
Same problem ☹️
_wb_
2021-03-07 04:44:19
Could also be libjpeg or libpng
Jim
2021-03-07 04:45:32
I installed the latest ming jpg, png, gif libraries. With the MSVC interface, I downloaded the versions it was expecting. Both produced duds.
2021-03-07 04:46:59
Wish it said something like "Cannot find xyz.dll" - would be more helpful.
veluca
Jim Seems like there is a similar command in ming. I could try that.
2021-03-07 04:48:38
got anything out of that?
Jim
2021-03-07 04:50:59
Haven't tried it yet. I am retrying with ming makefiles to see if it makes a difference without openexr, but doubt it.
veluca
2021-03-07 04:51:54
the problem is not the binary itself, but it's that windows doesn't know how to find some of the dependencies... I am not sure why it would find them during compilation but not during runtime though
Jim
2021-03-07 04:53:09
Not sure what external dlls it would be looking for that don't exist. I assumed it has some dlls embedded in the exe that it could not find.
veluca
2021-03-07 04:54:04
I'm relatively convinced the problem is external dlls, but I'm not certain (didn't use windows seriously in more than 10 years...)
Jim
2021-03-07 04:58:26
Duds again
2021-03-07 04:58:38
I will try to object dump
2021-03-07 05:00:12
Hm, that package doesn't seem to exist. Maybe not maintained?
2021-03-07 05:03:50
Here is the output from a program called Dependency Walker. You were right, it can't seem to find a bunch of Windows related stuff. No idea why...
_wb_
2021-03-07 05:06:39
Oh boy. How can it not find all of that and still you have a terminal running? Must be somehow not looking in the right places...
Jim
2021-03-07 05:07:10
Maybe it's compiling for some older version of Windows? Is there some way to tell it to target a specific version?
2021-03-07 05:10:11
Man this thing is giving me a headache. Gonna go grab some lunch and will try to figure out something when I get back.
veluca
2021-03-07 05:48:51
it doesn't find [ ? ] LIBGIF-7.DLL [ ? ] LIBJPEG-8.DLL in particular, which *might* explain it
2021-03-07 05:49:15
everything else is nested, which might have other explanations
_wb_
2021-03-07 05:57:59
KERNEL32.DLL is a 64-bit module? That sounds weird
2021-03-07 06:03:48
It would probably be useful to build statically linked windows binaries to reduce these kind of headaches...
spider-mario
2021-03-07 06:13:31
this has its own headaches :p
2021-03-07 06:14:05
I’m not surprised by kernel32 being 64 bits, there is probably a lot of stuff that is still named *32 for compatibility
2021-03-07 06:14:38
let’s remember that one of the parameters of WinMain was last useful in 16-bit versions of Windows
2021-03-07 06:15:10
https://devblogs.microsoft.com/oldnewthing/20040615-00/?p=38873
2021-03-07 06:17:32
<@!172952901075992586> does it work if you run the tools from the same shell from which you build them?
2021-03-07 06:18:19
specifically, a shell started from e.g. the entry “MSYS2 MinGW (32|64)-bit” in the start menu
2021-03-07 06:18:40
it should have everything needed in the $PATH
Jim
2021-03-07 06:44:06
I am only running MSYS MinGW 64-bit
spider-mario
2021-03-07 06:45:18
what confuses me, then, is that your screenshots show PowerShell
Jim
2021-03-07 06:46:00
Once it compiles I copy the exes to that directory
2021-03-07 06:46:53
Oh you mean to run them directly from MSYS? I can try it but don't know why running a 64-bit app from a 32-bit console would even matter.
spider-mario
2021-03-07 06:48:44
it’s not so much the fact that it’s 64- or 32-bit but more that the MSYS MinGW shell has the PATH variable properly set up
2021-03-07 06:49:49
it contains the directories that have all the “system” libraries required by the executables
2021-03-07 06:50:17
copying all those dlls to the output directory should also work but it’s more work
Jim
2021-03-07 06:50:24
Now I'm confused...
2021-03-07 06:52:12
Why would the older 0.3 work and not 0.3.3 when I have the same system/user PATH?
spider-mario
2021-03-07 06:52:55
were they built in the same way?
Jim
2021-03-07 06:53:15
No, downloaded. Though I believe it was made on MinGW.
2021-03-07 06:58:29
Still doesn't explain why its looking in the wrong places for Windows. Same happens when I build in the MSVC gui (not MinGW)
2021-03-07 07:01:26
I tried running it from the 32-bit Powershell and same issue: nothing happens.
spider-mario
2021-03-07 07:01:49
if you run `echo $PATH` in the MinGW shell, you will see many more entries than if you run `echo $env:PATH` in PowerShell
2021-03-07 07:02:20
and that’s because the MinGW init script adds those entries but just locally
Jim
2021-03-07 07:03:04
Opposite happens. PowerShell has many more entries.
spider-mario
2021-03-07 07:03:22
sorry, yes, I just tried and it’s not “more”, it’s an entirely different set
2021-03-07 07:03:57
but the point is that some of those entries are not in PowerShell, and it’s them that make it work
2021-03-07 07:04:29
well, more specifically, `/mingw64/bin` is probably doing all the work
2021-03-07 07:04:50
that would be `C:\msys64\mingw64\bin` on your disk, I believe
Jim
2021-03-07 07:09:06
So how do I get the compiled program to look in the default Windows location rather than mingw or visual studio framework in MSVC?
spider-mario
2021-03-07 07:09:42
it already does, it’s just that the dlls are not there
2021-03-07 07:10:09
I got it to work in PowerShell by copying the following dlls to the directory of the executables: https://pastebin.com/raw/TCXj3xYC
2021-03-07 07:10:40
if some of those are absent from your system, they are probably not needed
2021-03-07 07:10:51
for example the Ilm* dlls are from OpenEXR
2021-03-07 07:11:13
if you don’t have it installed, then your `cjxl`/`djxl` are built without support for it anyway and won’t require it
2021-03-07 07:27:02
using `ldd cjxl.exe` from the MinGW shell can also tell you the list
Jim
2021-03-07 07:28:00
Ok, I think I got it now. I only copied the libjpeg, libgif, and libpng into the directory and it is working in Powershell now. I assume the person who compiled the other version figured out how to get it to hook into Windows' own image library so they wouldn't be required. I need to see if I can find out how to do that.
_wb_
2021-03-07 07:33:01
Maybe if those dlls are also elsewhere, you can hide the mingw ones and change your path in mingw to look at the system path when compiling things
Jim
2021-03-07 07:34:50
They are not, I already looked. But I ran the dependency walker on the older version and it is not even looking for libjpeg, libgif, libpng. All the other weird Windows core stuff was there so I guess those do not matter, possibly for older/other versions of Windows.
veluca
2021-03-07 07:41:08
might have used a static version of those libs
Jim
2021-03-07 08:28:42
In any case, 0.3.3 is a bit faster, wobbles on file size (+-1KB), and has noticeably less artifacts around edges vs 0.3.
2021-03-07 08:40:52
Still a number of images that fail to lossless jpeg transcode.
_wb_
2021-03-07 08:45:16
which ones?
2021-03-07 08:45:28
CMYK is a known limitation, we cannot do those
2021-03-07 08:45:44
(we can do CMYK, but not with VarDCT so not as lossless transcoded jpeg)
2021-03-07 08:46:42
other jpegs that fail: please open issues for them, it's probably a bug that can be fixed
Jim
2021-03-07 08:52:27
I tried a few that were reported a bit back and still same issue. Also downloaded some of my own and tried and they either fail to encode or appear to complete encoding but end up being nothing but a black bar. I checked, they are RGB.
2021-03-07 09:02:29
Ok, will create an issue. I will also go back through older images from different cameras and see if the same issue occurs. Maybe it's just something strange this camera is doing.
2021-03-08 12:14:17
Created issue 170: https://gitlab.com/wg1/jpeg-xl/-/issues/170
lonjil
_wb_ KERNEL32.DLL is a 64-bit module? That sounds weird
2021-03-08 04:00:42
everything win32 is 64-bit on 64-bit windows. WoW64 on the other hand is 32 bit stuff.
Pieter
2021-03-08 05:00:29
Because that makes sense, or something.
Ringo
2021-03-08 05:30:23
iirc WoW meant Windows on Windows
2021-03-08 05:31:24
originally it's so that 16-bit Windows stuff can run on 32-bit Windows
2021-03-08 05:32:16
and then WoW64, which is for 32-bit apps on 64-bit Windows
2021-03-08 05:32:59
it is kinda confusing, though
lonjil
2021-03-08 05:36:16
Yep
_wb_
Jim I tried a few that were reported a bit back and still same issue. Also downloaded some of my own and tried and they either fail to encode or appear to complete encoding but end up being nothing but a black bar. I checked, they are RGB.
2021-03-08 05:47:59
I think the black bar is an application issue in XnView. Could you check what happens if you decode them with `djxl` ?
Jim
2021-03-08 06:28:09
It works fine in djxl but Squoosh is also not able to open any lossless transcoded jxls (non lossless works fine).
2021-03-08 06:30:21
I get the large file restriction, figured that could be an issue.
_wb_
2021-03-08 06:39:39
I wonder if it's the isobmff container that causes trouble
2021-03-08 06:40:07
Maybe they don't know it's a jxl because it doesn't start with 0xFF0A
Scope
2021-03-11 08:58:23
Eh, it still doesn't work with SIMD enabled and people keep using GCC to compile JXL via m-ab-s <:PepeSad:815718285877444619> https://gitlab.com/wg1/jpeg-xl/-/issues/62
2021-03-11 09:00:40
```if [[ ${CC##* } = gcc ]]; then do_simple_print -p "${orange}Warning: JPEG-XL compiled with GCC will not use SIMD optimizations!$reset" extra_cxxflags+=('-DHWY_COMPILE_ONLY_SCALAR') fi```
veluca
Scope ```if [[ ${CC##* } = gcc ]]; then do_simple_print -p "${orange}Warning: JPEG-XL compiled with GCC will not use SIMD optimizations!$reset" extra_cxxflags+=('-DHWY_COMPILE_ONLY_SCALAR') fi```
2021-03-11 09:22:25
that's because it's buggy, right?
2021-03-11 09:22:33
I mean, sounds pretty much like a compiler bug to me...
2021-03-11 09:23:28
wouldn't be the first time, or even the tenth time xD
Scope
2021-03-11 09:24:41
Yep, encoding does not work without disabling SIMD
veluca
2021-03-11 09:25:58
I remember it working on linux
2021-03-11 09:26:06
so platform-specific gcc bug apparently
2021-03-11 09:26:08
#yay
2021-03-11 09:27:02
although if I recall correctly from the code, there's not a lot of reasons for the compiler to spill variables onto the stack...
_wb_
2021-03-11 09:27:46
I don't think it's a good idea to just disable SIMD, which basically means people will get something that works but very slowly
2021-03-11 09:28:22
(and then when the compiler bug gets fixed we may forget to remove that from the build script)
2021-03-11 09:31:10
if there's a known bug in gcc on certain platforms, we should 1) report the bug, 2) maybe detect this case in our build script and just exit with a message saying: either use a different compiler, or compile without SIMD but know that speed will suffer, or try anyway (maybe you have a fixed gcc) and know that maybe it will crash due to a compiler bug.
Scope
2021-03-11 09:33:10
Yep, that's why I mentioned this bug again, because m-ab-s is used by many people to easily and automatically build ffmpeg and other things under Windows <https://github.com/m-ab-s/media-autobuild_suite/commit/af2a73183192147fccec747fe905b74a02633456>
_wb_
2021-03-11 09:35:29
Disable SIMD, enable benchmark tool <:Thonk:805904896879493180>
2021-03-11 09:36:12
let's benchmark with crippled builds! yay
Scope
2021-03-11 09:36:16
Also <https://github.com/m-ab-s/media-autobuild_suite/commit/53ce5a94673637584b2d36769ac4c53a10747170>
spider-mario
Scope Yep, that's why I mentioned this bug again, because m-ab-s is used by many people to easily and automatically build ffmpeg and other things under Windows <https://github.com/m-ab-s/media-autobuild_suite/commit/af2a73183192147fccec747fe905b74a02633456>
2021-03-11 09:37:39
to be frank, I don’t really see the point of using it, it doesn’t really look much easier than building those projects oneself
Scope
2021-03-11 09:40:35
Other things maybe, but ffmpeg includes many libraries and not everyone has time to keep track of all the changes, m-ab-s also includes various patches and fixes to build correctly under Windows
Deleted User
_wb_ (and then when the compiler bug gets fixed we may forget to remove that from the build script)
2021-03-11 09:40:48
I agree.. this kind of legacy quick fix commonly causes problems in the future (ex. one was just removed from LAME in 3.101) so it’s better to detect the problem and act from there instead of disabling features on compilers unconditionally due to issues we can’t control
spider-mario
Scope Other things maybe, but ffmpeg includes many libraries and not everyone has time to keep track of all the changes, m-ab-s also includes various patches and fixes to build correctly under Windows
2021-03-11 09:41:23
well msys2 itself has a PKGBUILD for it, it’s presumably just as easy to build from it (I’ve done it many times to build with fdk_aac support)