Jump to content

DNG compressed!


eritho

Recommended Posts

Advertisement (gone after registration)

As an answer to my question how the compression in camera corresponded to the

lossless compression carried out by importing to Lightroom I received this answer today:

Dear Mr. Thomsen,

 

DNG files are anyway lossless compressed, through the camera too.

 

Mit freundlichen Gruessen / kind regards

 

Konstantin Eisner

 

Leica Camera AG

Informationsservice Software Support

Gewerbepark 8 / D-35606 Solms / Germany

www.leica-camera.com / software-support@leica-camera.com

Telephone +49(0)6442-208-108 / Fax +49(0)6442-208-490

I have seen this discussed here and thought this was not the case?

What is the benefit of using non compessed DNG in camera if this is through?

 

Now, what happens if you imports a in camera compressed file to Lightroom using "lossless" compression once again? Will it still be lossless?

Link to post
Share on other sites

Yes, Leica was selling the M8 as an 16-bits camera originally as well and always claimed it was lossless. Not so, even LFI explained the difference. In actual results it is nearly or even totally impossible to see a difference, so lossless must be interpreted in that sense. However, users that do extensive postprocessing have always found a difference in the robustness of M8 files and real 16-bits files as produced by the DMR. The M9 uses the same compression as the M8 and for that reason I prefer uncompressed. Why would Leica even provide uncompressed if there is no difference at all:confused:. I think I get better PS results and the files are more futureproof. I do not see any real downside to saving uncompressed. The LR lossless compression is said to be really lossless.

Link to post
Share on other sites

Yes, Leica was selling the M8 as an 16-bits camera originally as well and always claimed it was lossless. Not so, even LFI explained the difference. In actual results it is nearly or even totally impossible to see a difference, so lossless must be interpreted in that sense. However, users that do extensive postprocessing have always found a difference in the robustness of M8 files and real 16-bits files as produced by the DMR. The M9 uses the same compression as the M8 and for that reason I prefer uncompressed. Why would Leica even provide uncompressed if there is no difference at all:confused:. I think I get better PS results and the files are more futureproof. I do not see any real downside to saving uncompressed. The LR lossless compression is said to be really lossless.

 

Thank you for your quick answer.

Is there any way to prove that the in camera compressed DNG files are lossless or not?

To me it looks very strange if Leica claims they are lossless compressed and they are not!

Actually if this is really the case I'm a little upset reading his answer to my question :mad:

Link to post
Share on other sites

Erik there are different types of compression being talked about here. Within the M8 the original file is processed with non-linear compression, that is the highlights are compressed differently to the darks. This is in part done because of different sensitivities that our eyes have but also the brightest stops contain MANY more values than the darker ones (in fact the first stop contains half of all of the recorded values). Without getting into more technicalities the resultant file uses 8 bits to represent the original 14 bits (the two darkest bits are noise contaminated and are discarded in the A/D conversion). It is NOT the same as just recording an 8 bit file originally. When you open the file in your raw convertor, it is again "re-inflated' to a high bit file. The loss in that process is said to be negligible in practice. This was done for file storage and processing speed. The original prototype M8s could actually keep the file in its original 14 bit form, Leica's stated position was that the negigible loss of quality was outweighed by the benefits of faster processing and smaller files.

 

The M9 offers the same method however the original file is larger since the sensor is 18mp not 10mp of course. The 'uncompressed' mode preserves the full 14 bit file, at the expense of it being much larger (~35MB). Some members here have reported that they detect no difference in the IQ of the compressed vs. non-compressed files at any but the lowest ISO settings.

Completely separate to those in-camera processes, Adobe raw converters can losslessly compress ANY of those files when you import them. Yes it is truly lossless. It is simply more efficient. I only shoot the uncompressed DNGs in my M9 and the files typically compress to maybe 17MB, dependant on the content of the images. Once again, this stage is truly lossless. The only penalty for this lossless compression is some more time during the import process.

Link to post
Share on other sites

Advertisement (gone after registration)

The data is from a Bayer matrix, so its one sample per pixel, not three or four.

 

For the M9 in-camera formats:

 

a) Uncompressed - 14 bit data from the analog to digital converter stored in a 16 bit word, so 2 bytes per pixel gives 36Mb

 

B) Compressed - 14 bit data from the analog to digital converter, level compressed to 8 bits and stored in an 8 bit byte, so one byte per pixel gives18 Mb.

 

The level compression is lossy.

 

Sandy

Link to post
Share on other sites

All of my M9 uncompressed DNG's are exactly the same sze, which is compelling evidence that no compression is taking place. Any true lossless compression ( like zip ) would have at least slight differences in output size because each individual data stream is different. Lossy compressions can ( but usually does not ) force a common size by selectively sacrificing quality but true lossless compression cannot. Try zipping different files of the same type and size, the resulting sizes will differ.

 

While I am not certain, Lightroom most likely uses a variant of the zip type algorithm's, as they are public and there is no joy in re-inventing them.

 

A point that Jaap has made repeatedly in various posts, and with which I completely agree, is that we should not sacrifice any data, (translate to image quality ) however slight, given the trouble and expense we have already gone to. Even if we don't use or see it today, our future software capabilities and our own standards will change.

 

In any context that applies to Leica users, data storage is so cheap as to be fundamentally free.

 

With my Nikon's, which do offer a lossless Raw compression option, I use it.

 

This ( lossless Raw compression option ) might be a useful firmware upgrade for Leica, but it is frankly not near the top of my list.

 

Regards and happy holidays ... Harold

Link to post
Share on other sites

Thank you all of you.

 

Sorry, maybe it's just me, but I'm not much clevere now than before :o

 

Two questions are still unanswered:

 

  • So the gentleman at Leica simply has it wrong....:rolleyes:

 

  • What happens if you import an in camera compressed file to Lightroom using "lossless" compression once again? Will it still be lossless?

Link to post
Share on other sites

  • So the gentleman at Leica simply has it wrong....:rolleyes:

 

Unless your definition of lossless is "not lossy enough to be easily noticed", then yes, the gentleman at Leica got it wrong.

 

  • What happens if you import an in camera compressed file to Lightroom using "lossless" compression once again? Will it still be lossless?

 

The data from the in-camera DNG will be perfectly recreated, losses from the in-camera compression and all. In other words, the only losses in data you get are those from the original in-camera lossy compression

 

Sandy

Link to post
Share on other sites

Thanks for the explanations. But I am still confused. Isn't it so that the "compressed DNG" in Leica sense and the "compressed DNG" in Lightroom means different things. The Leica files are not compressed/uncompressed, but they are either 16(14) or 8 bit files. Which means either more or less registered data, not compression of data? In this case the gentelman from Leica is right, but the word "compressed" is not correctly used by Leica?

 

Tom

Link to post
Share on other sites

The original 16/14 bit file is compressed to an 8 bit file using a logarithmic algorithm. this file is then written to a LUT,which explaims the constant size. On expansion the file is in general similar to a 12 bits file with most information lost in the lighter values which corresponds to response of our eyes. It does not correspond to the response of our computer, showing up during extensive postprocessing.

Link to post
Share on other sites

Tom, during the compression of the DNG while recording the image, data is discarded.

 

When you import to LR, and use lossless compression, you don't lose anything. When you use the file, the exact data that was *imported* will be reconstituted.

 

Compression in the M9 throws away data while LR does not. It's easy to do magic when you've got a real computer available. It's amazing what the M8 and M9 can do with a toy computer in there.

Link to post
Share on other sites

Thank you all of you.

 

Sorry, maybe it's just me, but I'm not much clevere now than before :o

 

Two questions are still unanswered:

 

  • So the gentleman at Leica simply has it wrong....:rolleyes:

  • What happens if you import an in camera compressed file to Lightroom using "lossless" compression once again? Will it still be lossless?

Sandy of course has the maths perfect in these matters:) and is much more skilled there than this amateur.

By the technical defintions of lossy and lossless the in-camera compression, when applied, is lossy. If you lose ANY data in the compression it is lossy. However, see my comments that Leica considers the loss negligible.

Yes again the compression optionally applied by the Adobe Raw convertor to the DNG files on import is TRULY lossless.

 

If you want to read the detail on the compression within the M8 and optionally within the M9, LFI magazine published a detailed article in Feb 2007 when this was one of the hotly debated topics in this forum and elsewhere. You can probably get it as a back issue I imagine. Maybe a small partial quote would be acceptable for review.

 

"out of 16 bits.....the finest gradations are contaminated by noise....simply crossed out....The processor of the M8 now multiplies the 14 bit number of every pixel with 4 and extracts the integral square root from that sum.The resulting values are somewhere between 0 and 255 and can be written with 8 bits. By squaring them and dividing them by 4 we again achieve the values of the 14 bit tonal spectrum"

 

The practical result is that the compressed DNG is most accurate in the darks where our eyes are most sensitive to subtle tonal differences and less so in the lights.

 

Keep in mind it is easy to captivated by the theory but the only things that count for photography (not maths) are the practical results. The resultant files are much more robust and contain much more tonal information than the alternative, which is jpg compression.

 

Whew! clear as mud?

Link to post
Share on other sites

Considering the loss negligible is nonsense. To coin an old cliche, one cannot be slightly pregnant. The camera compression is lossy, plain and simple, and there is no need for using it. The files are less robust in postprocessing than full 16/14 bit files, albeit a lot better than real 8-bit files.

Link to post
Share on other sites

Jaap we already had the 'lossy' definition debated;)

Still thousands of M8 photographers, including us, were perfectly happy with the results.

ps, yes I now only shoot everything uncompressed as well:D

Link to post
Share on other sites

I think the point is, that with the M8, we had no choice, the only comparison for IQ was between M8 and other camera / lens combinations. I do not have a DMR, and comparisons in this respect to Nikon were meaningless, since other differences dwarfed the impact of output truncation or compression.

 

With the M9, we have a choce, either it's best, or it's 'not best'. Since the only cost associated with the 'best' is some storage, for me this is what we call a 'no brainer'.

 

I rarely fill a 16gb card (equivalent to 12 rolls of 36 exp. film) in a day of 'touristing', and it costs about $ USD $ 60 for sandisk ext. III. It is also re-usable ( after upload ) the next day. This cost is trivial compared to any other cost in this hobby or profession.

 

I cannot make choices for others, buy I am sending more time posting on this issue than I ever spent deciding for myself what to do, once I had a choice.

 

Regards ... Harold

Link to post
Share on other sites

The Leica guy is definitely wrong. Leica's own instruction manual for the M9 clearly states that its not a lossless compression. On page 125, it clearly states this:

 

"The Compressed format includes a slight compression, which

– causes only a negligible deterioration in quality

– provides full scope for subsequent processing of the picture data

– allows faster saving

– takes up less memory space."

 

Take note of that first bullet point, which I have highlighted.

 

Jeff

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...