J40: Independent, self-contained JPEG XL decoder
github.com
github.com
As you can see it is only mature in the sense that it implements a large subset of the specification, and it has tons of rough edges (I know, I know, proper tests and fuzzing are in progress). I also didn't expect this to weigh more than 5K LoC, so my hope is to produce a parallel Rust version in the future.
Looking at the code example, I was wondering if the 'oops' error check wouldn't be doable at a frame level, or even have some recoverable errors for within a frame?
When loading that kind of objects (image, vidéos,...) It is always annoying when libs have an all of nothing behavior.
At the very bottom the entropy coding uses a hybrid of LZ77, Huffman coding and multi-symbol rANS. This is complemented with context modeling which should be pretty familiar to anyone knows Brotli.
For the lossless (modular) mode the main strategy involves finding a good decision tree to compute a prediction for each pixel, which can be learned for each instance (thus named "meta-adaptive"). This mode allows for a number of additional transformations, some of which also function as a progressive encoding.
For the lossy (VarDCT) mode the actual transformation is a (vast) superset of the original JPEG, but a lot of more transformations---mostly related to DCT---are available and there are tons of contexts for each coefficient that can be exploited. Not exactly specific to JPEG XL, but libjxl also features a very good psychovisual model to optimize the resulting visual quality.
Besides from those main modes, there are additional whole-image transformations, color transformations (images can use an absolute color space named XYB when they are allowed to be lossy) and image features. Lastly, images can have multiple frames, some of which are animated and some of which can be merged together when the frame duration is zero, with fully configurable blending modes.
https://en.wikipedia.org/wiki/File:JPEG_XL_codec_architectur...
...and I say this as someone who has written PNG, GIF, and JPEG (baseline sequential) decoders, and didn't think J2K would fit in 5kLoC either.
> Crop retangles are currently ignored and can reveal a frame larger than the actual image.
People unaware of lossless cropping may end up posting images that still contain private information they wanted to cut off. If JPEG XL ever makes it to browsers, I hope they won't support cropping, so that people will spot the problem right away, rather later when trolls find it.
Your point still stands in the sense that, if those rectangles exceed the canvas extent, the surplus will be indeed discarded. I believe the current libjxl doesn't produce such image anyway (why do you keep a portion of image to be discarded?) but it is still something to note.
I can't speak to the context of the feature in JXL, but this is very very common in mobile image editor metadata formats, so that users can later "undo" a crop they did, because no data is actually lost. Both iOS and Android support this for all images cropped on device.
Seriously though, this is going to be HUGE for image editors. A format that finally supports both layers and animation.
So you get to use LibJXL as long as you have a working DLL file.
(For non-Windows, substitute the appropriate file type for libraries)
“JPEG XL, next generation image compression standard with 60% better compression efficiency than JPEG. The draft predicts that the standard will outperform the still image compression performance shown by HEVC HM, Daala and WebP and unlike previous attempts to replace JPEG, it provides transport options and more efficient lossless recompression storage for traditional images.”
> outperform the still image compression performance shown by HEVC HM, Daala and WebP
Naw, the real competitor is AVIF which recently got desktop and iOS Safari support. Chrome and Firefox have supported AVIF since forever and Safari was the final holdout.
AVIF does very well in almost-lossless encoding of the kinds of images you'd use lossless formats for. You can beat any lossless format with imperceptibly small amount of loss.
True lossless is needed for authoring, but not for typical Web distribution. People think lossy can't be used for icon-like images, because they associate lossy with JPEG-like distortions, but it's possible to do lossy compression using other methods that preserve razor-sharp edges.
Examples? I've never seen lossy compressed icons that didn't look like crap, but what you describe should be possible in theory.
[1] https://twitter.com/jonsneyers/status/1526598054685642753
1. Weren't "ideas" not supposed to be patentable, but only actual implementations? Given that, how can an algorithm be patented?
2. Wasn't prior art supposed to invalidate a patent? If the algorithm was already used in JPEG-XL, then clearly Microsoft isn't the first to discover it, and hence should not be able to patent it, right? Or if the algorithm in JPEG-XL is considered different, then there's no infringement by definition, right? So what's the issue?
Also that's mostly US. By contrast, in Europe, software is generally not patentable.
I can buy a car engine, modify it and sell my modification.
Supplimentary documentation, and schematics are a separate matter - but engine itself is not protected. Software itself is protected, you can do nothing..
https://encode.su/threads/3863-RANS-Microsoft-wins-data-enco...
2. In the US prior 2013 that was often the case. In 2013 US switched from first-to-invent to first-to-file system to be more compatible with the rest of the world.
First-to-file is mostly about simplifying the complicated litigation edge cases where two people claim to have invented, but not disclosed, the same thing during the (US-specific) one-year grace period they have to file a patent on it.
Prior art may still not invalidate the patent, though. Usually the patent holder will argue that their patent differs from the prior art in some respect (you can often find these arguments in the patent's file wrapper at http://patentcenter.uspto.gov/). But that narrows the scope of the patent, and being your own prior art is a pretty good defense against infringement.
That was a US filed in 1999, decided 2005 patent case over mid 90s use of discrete wavelet transforms in image storage, and the progressive loading of very large images rather than the prior full scanline by scanline loading of the dialup era ...
[0] https://en.wikipedia.org/wiki/LizardTech,_Inc._v._Earth_Reso....
Court cases over patents on mathematical techiques and their implemantations really pisses me off .. being called as an expert witness even more so - it's more excruciating than teaching first year engineering students linear algebra . . . (I'll let myself out).
[1] https://twitter.com/jonsneyers/status/1420765059739914243
Public post-based discussion is moving to quick chats in private servers. It started out with Slack spaces but has moved to Discord because of Slack's inferior UX/UI/business model.
This makes taking part in a community a lot easier as you can actually talk to the people working on the stuff you're excited about, like you could with good ol' IRC except you don't need to log in at the exact right time to send them a message. Some open source projects opt to use Matrix rather than Discord or Slack, which is an open standard but the problems still remain.
Especially, finding a solution to an obscure error message can be a real challenge if you don't want to join some random chat room full of existing conversations to ask the question yourself, even if ten or twenty people before you already did the same. I much prefer the forums for this type of stuff but most of the world seems to disagree.
Having never used Slack, this statement astonishes me. It is difficult for me to imagine a worse UX/UI than Discord is.
This is particularly bad for projects with a high-traffic general chat, and low-traffic chats which are topic-oriented, because the 10k limit is per 'server' not per chat, anything low traffic ends up having little to no history visible.
Discord copied the channel system Slack uses but allows for fast and easy switching between workspaces. Slack lacks that, there's a dropdown somewhere but every workspace asks me to create a separate account rather than giving me the option to reuse an existing one, even when I enter the same email address I've used elsewhere.
Slack got off to a good start but it's like they stopped innovating at some point. I don't remember any new feature they've added that other chat apps don't already have.
Discord is also free with paid features per account (that most people don't really need imo) whereas Slack keeps your messages hostage if you don't pay (you van only scroll back a certain number of messages but once you start paying you can read them again).
Their model is clearly oriented at businesses paying subscription costs per user within their organisation. Discord's allows for much more organic server creation because anyone can join for free and only those who need the extra features need to pay.
One benefit of Slack is that it gives some kind of guarantee in regards to data processing. Discord isn't business oriented so its setup isn't great for companies who don't want their data to leak. Last time I checked, Slack's guarantees were a lot stronger than Discord's.
This can lead to pretty funny hybrid use. I've seen people have digital meetings over Discord (because Discord's voice and video channels are excellent) with Slack open for sharing text, documents, and all other kinds of attachments. Using Discord is probably against company policy (mandating stuff like Google Meet or Zoom) but the Discord UX is so much easier than many competitors. Its performance is also pretty good! During COVID lockdown my university gave some lectures over Discord when the dedicated video lecturing system (set up for a few small lectures a week rather than hundreds of people joining tens of lectures around the clock during working hours) got overloaded and went down hard. It took the university weeks to get enough capacity for their streaming setup and switching to Discord took one suggestion and an hour or so of setting up for every teacher.
I think the difference between Discord and all other companies is that Discord is clearly targeting normal user adoption, luring people in with easy to use features and tools, whereas its competitors target corporate contracts, locking down a whole group of users at once that don't really have a say in their messaging platforms.
I don't think Discord cares much about the business market but with a few small adjustments (i.e. only accepting accounts with a certain email suffix into a certain server, allowing an organisation to pay for Discord for all users within a guild) I bet they could start competing with Slack quite easily.