Jump to content

New M DNG compression


stevegoldenberg

Recommended Posts

Advertisement (gone after registration)

Lossless JPEG compression is so simple and light that it can be implemented on very low power general purpose processors.

A DSP is overkill (but it's there anyway, so there are really no excuses).

 

Umm, well, please send me the code for that implementation - cos I haven't seen any implementations that I'd class as simple and light. :D

 

Sandy

Link to post
Share on other sites

  • Replies 75
  • Created
  • Last Reply
Says who?

Says anyone whoe knows how the M8 and M9 work. It was talked about in great depth and width on the Internet and in the Leica literature when the M8 was new, and then again when the M9 came out.

 

 

I am talking about DCT-JPEG ...

Yes, you are. I am not. Please read more carefully.

Link to post
Share on other sites

Says anyone whoe knows how the M8 and M9 work. It was talked about in great depth and width on the Internet and in the Leica literature when the M8 was new, and then again when the M9 came out.

 

You read it around the Internet, written by people like you, who love their cameras and know how to take great pictures, but clearly don't know much about DSP.

 

Can you please point us to Leica literature talking about this in "great depth" ? And keep in mind that manufacturers marketing "literature" may contain lies to hide engineering flaws. I was not born yesterday.

 

About DCT-JPEG vs lossless JPEG, you still fail to understand my point which is: a DSP able to compress DCT-JPEG (high computational cost) is also able to compress lossless JPEG (low computational cost). Can you please stick to this, and let us know why you do not agree ?

Link to post
Share on other sites

About DCT-JPEG vs lossless JPEG, you still fail to understand my point which is: a DSP able to compress DCT-JPEG (high computational cost) is also able to compress lossless JPEG (low computational cost). Can you please stick to this, and let us know why you do not agree ?

 

How does this relate to the "New M DNG compression" which appears to be this thread's topic?

Link to post
Share on other sites

Advertisement (gone after registration)

01AF is right. The M8/9 compression consists of a simple mathematical transformation and a LUT.

 

Indeed. But this is not my point.

 

As a matter of fact, M8/M9 can perform DCT-JPEG compression. Hope you guys agree on this.

DCT-JPEG is a much more complex computation than the one you and 01af are talking about (for no apparent reason).

 

In fact, M8/M9 contains an ADSP-BF561 programmable DSP to handle DCT-JPEG. Since it can handle DCT-JPEG, that chip can easily handle also lossless JPEG, as lossless JPEG consists of simple mathematical transformations and a Huffman phase (the latter also present in DCT-JPG).

Link to post
Share on other sites

How does this relate to the "New M DNG compression" which appears to be this thread's topic?

 

"New M DNG compression" is lossless JPEG.

 

I have explained why you should enable it without worries on your new M, but instead of people giving me thanks, the thread has changed to a personal attack because I dare say Leica firmware is not ideal.

 

Does this answer your question ? :)

Link to post
Share on other sites

In fact, the lossy compression method used in the M8 and M9 has absolutely nothing to do with JPEG.

About DCT-JPEG vs lossless JPEG, you still fail to understand my point ...

No, it's you who fails to understand my point. So I shall re-word it:

 

The lossy DNG compression method used in the M8 and M9 has absolutely nothing to do with JPEG whatsoever.

 

Clearer now?

 

 

... my point which is: a DSP able to compress DCT-JPEG (high computational cost) is also able to compress lossless JPEG (low computational cost).

I guess this statement is technically correct. Still it is not what the M8 or M9 do for DNG compression.

Link to post
Share on other sites

Indeed. But this is not my point.

 

As a matter of fact, M8/M9 can perform DCT-JPEG compression. Hope you guys agree on this.

DCT-JPEG is a much more complex computation than the one you and 01af are talking about (for no apparent reason).

 

In that case your point is quite obscure, as it makes no sense to discuss what the camera could do instead of what it actually does. Maybe it could sit on its hind legs and whistle passages from Rheingold. But that would not be very relevant, don't you agree?

Link to post
Share on other sites

"New M DNG compression" is lossless JPEG.

 

I have explained why you should enable it without worries on your new M, but instead of people giving me thanks, the thread has changed to a personal attack because I dare say Leica firmware is not ideal.

 

Does this answer your question ? :)

 

Not quite. Are you telling us that DNG is the same as JPEG?

Link to post
Share on other sites

Not quite. Are you telling us that DNG is the same as JPEG?

 

No.

DNG is a container, and it can contain multiple images in various formats (such as JPEG), along with other useful information about your photo.

Link to post
Share on other sites

In that case your point is quite obscure, as it makes no sense to discuss what the camera could do instead of what it actually does. Maybe it could sit on its hind legs and whistle passages from Rheingold. But that would not be very relevant, don't you agree?

 

No. I do not agree.

Raising customers awareness about what a product could and should do, will eventually make the manufacturer match expectations and create better products.

Link to post
Share on other sites

LFI, February 2007 if memory serves

 

Just finished reading "The Nuts and Bolts" article, describing Leica's 8 bits reduction (the algorithm 01af is talking about).

 

The article, with some errata, describes the rationale behind that compression method which "is yet to be fully appreciated".

 

But there is no mention at all about computational limitations of the M8, and this is for the obvious reasons I have discussed in this thread.

 

After 6 years, that compression remains "yet to be fully appreciated", so much that even Leica realized why, and silently replaced it with lossless JPEG which usually gives the same or lower file size without impacting a bit (pun intended ;)) on original raw image quality.

Link to post
Share on other sites

  • 2 weeks later...
How are you going to create identical DNGs?

 

Sorry it's taken a while to come back on this but I have been concentrating on the 'M Deliveries' (or lack of -) thread.

 

I guess the simple answer is - I don't know until I start researching the problem. I guess from your response that it is not possible to take a compressed DNG and get a hash value then open it in a decent editor and save it out in in it's decompressed state as an uncompressed DNG? To be honest I have never tried as I only work with RAW uncompressed files.

 

In 'Aperture' I have an M9P - 18MB file shot as a compressed DNG. If I export out the original from Aperture it remains an 18MB file. If I export out as a 'Full Size DNG' the file is nearly 37MB. Am I completely wrong in assuming I have opened a compressed DNG and saved it out in it's uncompressed state? This may well be my ignorance but would love to know why this occurs.

 

To be honest a more interesting test would be to set up a camera in a studio situation whereby a Compressed and an uncompressed image could be taken in near identical conditions and analyse both the files. Lets face it, the only thing that is really going to matter is whether or not both files are as good as each other and offer the same amount of control in post process.

Link to post
Share on other sites

You're missing the point. Comparison of compressed vs. uncompressed done by Aperture is irrelevant. Visual comparison of images for 'quality' differences is irrelevant, and really only makes sense when comparing an uncompressed file against one that's been compressed using a lossy algorithm (i.e., one that has been compressed using a form of perceptual encoding).

 

To verify Leica's lossless compression, you'd need to get the camera to save the exact same image data both ways, and there is no way to get the camera to do that.

 

-robert

 

Sorry it's taken a while to come back on this but I have been concentrating on the 'M Deliveries' (or lack of -) thread.

 

I guess the simple answer is - I don't know until I start researching the problem. I guess from your response that it is not possible to take a compressed DNG and get a hash value then open it in a decent editor and save it out in in it's decompressed state as an uncompressed DNG? To be honest I have never tried as I only work with RAW uncompressed files.

 

In 'Aperture' I have an M9P - 18MB file shot as a compressed DNG. If I export out the original from Aperture it remains an 18MB file. If I export out as a 'Full Size DNG' the file is nearly 37MB. Am I completely wrong in assuming I have opened a compressed DNG and saved it out in it's uncompressed state? This may well be my ignorance but would love to know why this occurs.

 

To be honest a more interesting test would be to set up a camera in a studio situation whereby a Compressed and an uncompressed image could be taken in near identical conditions and analyse both the files. Lets face it, the only thing that is really going to matter is whether or not both files are as good as each other and offer the same amount of control in post process.

Link to post
Share on other sites

This was posted on a M240 Facebook Page:

Zalman Stern (I am the former tech lead on Camera Raw at Adobe.)

 

The M Type 240 implements DNG Lossless Compression, which is in fact lossless. (The method used is Lossless JPEG as in many vendor proprietary raw formats.) I do not know why Leica left in the option for Uncompressed DNG. Perhaps they use it in debugging or there is a customer built workflow tool that required uncompressed DNG. I would be in favor of the option being removed, especially if DNG Proxy format support is added in the future. (DNG Proxy allows for lossy compressed and subsampled raw files, similar to e.g. mRAW and sRAW on Canon cameras, though significantly better in quality for a given file size.)

 

Compressed DNG on the M8, M9, and M-E series of cameras is lossy, though it is hard to make a case that it is visually detectable. The method used transforms the linear raw data via a perceptual curve and quantizes to 8-bit. Hence the constant output size and minimal visual degradation.

 

One can take Uncompressed DNGs from any M and reconvert them with the Adobe DNG Converter to get approximately a factor of 2 smaller file with no loss of visual information or metadata. Even if one wants to preserve exactly the bits from the camera in one's permanent archive, this is extremely useful for keeping more files on a laptop or for extra backup copies.

 

Slightly related to the discussion, if one has lens detection turned on for cameras before the Type 240, vignette correction is done destructively to the raw data. I do not know of a way to have lens metadata written to the file without vignette correction being applied. Ideally this would be done by writing DNG lens correction metadata (opcodes) to the DNG file instead of via modifying the raw samples themselves. Perhaps it is done this way in the M Type 240. I have not had an opportunity to investigate.

Link to post
Share on other sites

Lossless Compression is just that: compression.

 

So far no one can answer for me this simple question.

 

If it's a no brainer to use lossless compression then why give us the choice? Why even have the line item with 2 choices?

I came exactly to the same question

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...