Even Sony is confusing whether the lossless compression is the same, that's enough difference for me to continue using uncompressed until I need to save space or improve performance.
"Lossless compressed RAW:
Lossless compression is a format that allows you to reduce image size without compromising on quality. A lossless compressed image is processed by post-processing software and the data is decompressed like a ZIP file. Decompression allows you to expand the compressed file back to its original size.
This is a popular format that occupies less space with
minimal quality loss.
Lossless Compressed Raw is recommended when you want to record content in a higher image quality equivalent to uncompressed RAW in a smaller file size format."
https://www.sony.co.uk/electronics/support/articles/00257081
Oh we went through this multiple times in the past. They're literally contradicting themselves in the previous 3 sentences - "
Without compromising on quality".
Exactly. No where is there proof that this is truly lossless. My best idea to prove this is to extract the lossless *.arw file and it should be the EXACT same size and hex values as an uncompressed file.
I actually started testing this, buy using the remote camera app to take an uncompressed picture, then taking another one in the compressed format. This takes about 10 seconds to do and the camera and lighting conditions don't change.
I was actually playing with rawwork and libraw and exiffile trying to find a way to decompress the files on my windows machine, but as I don't have a c compiler, I will need to build a VM and use the linux to compile and write a program to decompress the *.arw file.
Anyways the lossless compressed raw is using Lossless JPEG (ljpeg92), which lo and behold actually is lossless. They didn't do any 14+7 lossy compression. If you don't believe, here's how Rawtherapee handles it: note the inclusion of the
LibRaw_LjpegDecompressor function.
https://github.com/Beep6581/RawTherapee/blob/dev/rtengine/libraw/src/decoders/sonycc.cpp
So you are saying a predictive compression algorithm is going to successfully
compute an exact copy of a file 100% of the time?
From Wikipedia:
https://en.wikipedia.org/wiki/Lossless_JPEG
"This is a model in which
predictions of the sample values are
estimated from the neighboring samples that are already coded in the image. Most predictors take the average of the samples immediately above and to the left of the target sample. DPCM encodes the differences between the
predicted samples instead of encoding each sample independently. The differences from one sample to the next are usually close to zero."
Actually this language explains Sony waffling. They can't say it is 100% lossless, but a best effort lossless that is better than the prior form of compression.
You're free to use whatever format you want, but I find it hilarious that you care about that perceived image quality loss when you're using lenses such as the 24-240............
I really expect better from you than a comment like that. The 24-240 is a special purpose lens. That's like expecting a tilt shift lens to give you the same quality as GM. I appreciate all glass for what it can do.
That's not what predictive compression is at all.
All it means is that the amount of compression differs based on the content. Zip files use exactly the same principle albeit more tailored for general data structures - don't think you'd accuse zipped files of being lossy despite it also using predictive encoding. Predictive compression is dependent on a concept called entropy, and it's why very noisy images do not compress as well as clean images. You can very easily test that out.
Also, that part you highlighted doesn't mean what you think it means. The initial prediction will have errors, and the errors are essentially what are being encoded to correct it.
Here's an example: say I have 5 numbers: 100, 101, 102, 103 and 104. If uncompressed, each number requires 7 bits, making this sequence 35 bits long. If I use a predictive algorithm, I initially predict each number in the 4 is 100. That means I have an error of 0, 1, 2, 3, 4 and 5. But if I encode 0, 1, 2, 3, 4 and 5 I only need:
- 1 bit for 0
- 1 bit for 1
- 2 bits for 2
- 2 bits for 3
- 3 bits for 4
- 3 bits for 5
So, if I compress this I'd need 7 bits for the 100, followed by 1+1+2+2+3+3 for a total of 19 bits - almost 50% reduction from 35 bits. Reality is a bit more complicated, but that's the basic principle. This is what the comment above means - the differences are close to zero, therefore the bits needed to represent them are much smaller.
You can also see where the algorithm becomes less efficient the more chaotic (or entropic) the samples get. Eventually, it'll approach the same efficiency as non-compressed data.