Live data from Hacker News

QOI – The “Quite OK Image Format” for fast, lossless image compression

github.com

11–20 of 105 posts

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#11

Earlier quoted context omitted.

ALAC? FLAC? What is the problem with these?

FLAC is limited to 24 bit depth. I was thinking of intermediate format suitable for use in DAWs and samplers that also supports floating point to avoid clipping.

24-bit integer and 32-bit float have the same dynamic range available, so you are not losing any fidelity.

However, frankly, if you're working professionally with audio like that, the best solution is simply to have sufficient disk space available to work with raw audio.

Use FLAC to compress the final product, when you are done.

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#12
Seems like they benchmarked it against libpng which shows anywhere from 3-5x faster decompression and 30-50x compression. That's pretty impressive and even though libpng isn't the most performant of the png libraries, it's by far the most common.

I think the rust png library is ~4x faster than libpng which could erase the decompression advantage but that 50x faster compression speed is extremely impressive.

Can anybody tell if there's any significant feature differentials that might explain the difference (color space, pixel formats, .. etc)?

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#14

Earlier quoted context omitted.

FLAC is limited to 24 bit depth. I was thinking of intermediate format suitable for use in DAWs and samplers that also supports floating point to avoid clipping.

24-bit integer and 32-bit float have the same dynamic range available, so you are not losing any fidelity. However, frankly, if you're working professionally with audio like that, the best solution is simply to have sufficient disk space available to work with raw audio. Use FLAC to compress the final product, when you are done.

With 24-bit integer you are at risk of clipping.

EDIT: Floating point is useful while you are working to avoid any accidental clipping. As an intermediate format, like a ProRes for video. FLAC is great as a final format.

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#15

Earlier quoted context omitted.

FLAC is limited to 24 bit depth. I was thinking of intermediate format suitable for use in DAWs and samplers that also supports floating point to avoid clipping.

24-bit integer and 32-bit float have the same dynamic range available, so you are not losing any fidelity. However, frankly, if you're working professionally with audio like that, the best solution is simply to have sufficient disk space available to work with raw audio. Use FLAC to compress the final product, when you are done.

They have the same precision but float has vastly larger dynamic range due to the 8-bit exponent. When normalized and quantized for output this does result in roughly the same effective dynamic range (depending on how much of the integer range was originally used).

The issue is audio is typically mixed close to maximum so any processing steps can easily lead to clipping. One solution is to use float or larger integers internally during each processing step and normalize/convert back to 24-bit integer to write to disk. Another (better imo) option would be to do all intermediate steps and disk saves in a floating point format and only normalize/quantize for output once.

I haven't worked with professional audio in over 25 years (before everything went fully digital) but I would be surprised if floating point formats were not an option for encoding and intermediate workflows. Many quantization steps seems like a bad idea.

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#16

Earlier quoted context omitted.

ALAC? FLAC? What is the problem with these?

FLAC is limited to 24 bit depth. I was thinking of intermediate format suitable for use in DAWs and samplers that also supports floating point to avoid clipping.

check WavPack (32pcm, floats etc) but it's slower(not much) than flac, offering slighty beter compresion.

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#17
post #15

Earlier quoted context omitted.

24-bit integer and 32-bit float have the same dynamic range available, so you are not losing any fidelity. However, frankly, if you're working professionally with audio like that, the best solution is simply to have sufficient disk space available to work with raw audio. Use FLAC to compress the final product, when you are done.

They have the same precision but float has vastly larger dynamic range due to the 8-bit exponent. When normalized and quantized for output this does result in roughly the same effective dynamic range (depending on how much of the integer range was originally used). The issue is audio is typically mixed close to maximum so any processing steps can easily lead to clipping. One solution is to use float or larger integer…

Most DAWs and plugins and audio interfaces nowadays use floating point internally.

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#18
post #15

Earlier quoted context omitted.

24-bit integer and 32-bit float have the same dynamic range available, so you are not losing any fidelity. However, frankly, if you're working professionally with audio like that, the best solution is simply to have sufficient disk space available to work with raw audio. Use FLAC to compress the final product, when you are done.

They have the same precision but float has vastly larger dynamic range due to the 8-bit exponent. When normalized and quantized for output this does result in roughly the same effective dynamic range (depending on how much of the integer range was originally used). The issue is audio is typically mixed close to maximum so any processing steps can easily lead to clipping. One solution is to use float or larger integer…

> I would be surprised if floating point formats were not an option for encoding and intermediate workflows.

For bouncing tracks to disk, uncompressed 32-bit floating point formats are avaliable, but I am not aware of any fast losslessly compressed 32-bit floating point format.

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#19
post #12

Seems like they benchmarked it against libpng which shows anywhere from 3-5x faster decompression and 30-50x compression. That's pretty impressive and even though libpng isn't the most performant of the png libraries, it's by far the most common. I think the rust png library is ~4x faster than libpng which could erase the decompression advantage but that 50x faster compression speed is extremely impressive. Can anybo…

I think fundamentally it’s faster just because it’s dead simple. It’s just a mash of RLE, dictionary encoding, and delta encoding, and it does it all in a single pass. PNG has to break things into chunks, apply a filter, deflate, etc.

Re: QOI – The “Quite OK Image Format” for fast, lossless image compression

#20

Is there any open source audio compression format like that? Lossless and very fast. I haven't found any yet. EDIT: I'm thinking about a format that would be suitable as a replacement for uncompressed WAV files in DAWs. Rendered tracks often have large sections of silence and uncompressed WAVs have always seemed wasteful to me.

WavPack might fit the bill. It has decent software support. Not sure if DAWs can use it natively, they might unpack it to a temp folder.

https://www.wavpack.com/

Post reply on HN