Jump to content

8 bits versus 16 bits


t024484

Recommended Posts

Advertisement (gone after registration)

Hello!

When the analog signals are converted into digital bits after the A/D, the DSP will do a series of pre-processing, such as demosaic, matrix, gamma correction, sharpening, etc ... before it reaches the point of constructing a RAW file whether compressed or not.

I assume, the DSP is not involved when saving as RAW. Of course, there is no demosaic, no colormatrix, no sharpening and no gamma correction. It is all the job of the CPU to save the data to the memory card. Only exemption is M8, where a lookup table driven 14 bit to 8 bit conversion (in case of lens detection ON a second lookup table is used) is done.

The DMR file are pre-processed and optimized with 16 bit output intended,
I doubt...
the M8 files must be pre-processed with the 8 bit compression in mind to guarantee minimal artifact.

M8 RAW preprocession is simply a job of the CPU which is also doing the storage. The DSPs main job is calculation of exposure according the environment and doing the JPEG compression (and decompression while play back).

You don't know what type of pre-processing, what the amount of such pre-processing is applied to the DMR files and/or the M8 files before it's compressed or uncompressed. All this experiment does is to show what 16-bit to 8 bit compression with this particular method could do to a "cooked" DMR DNG file.
We do not realy know, what the components do in detail, but we have a 99% approximation what they have to do.
If you want to prove that 8 bit compression does harm to the quality of M8 DNG, you have to either get hold of the sensor dump, or at least a 16 bit M8 file before the compression. The M8 files may very well be pre-processed to offset the loss due to compression and minimize its artifacts. Who knows?

It was often "proved" that the 8 bit intermediat storage format is lossy. But the degree of lossiness is neglectable for the viewer. The tests on DMR RAW files is something more, because it includes the loss of 2 bits of dynamic and the loss of 8 bit of resolution if done in the same way like the M8 does it.

M8's lossy compression preserves the 14 bit dynamic, but looses 6 bit of color resolution in a single pixel. Not more and not less.

The chosen way via SQRT is much more than geniuos and not worth to be discussed further.

Link to post
Share on other sites

  • Replies 71
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

M8 RAW preprocession is simply a job of the CPU which is also doing the storage. The DSPs main job is calculation of exposure according the environment and doing the JPEG compression ...

 

To another expert ... the camera's CPU is also its DSP, ok? class dismissed. :D

Link to post
Share on other sites

To another expert ... the camera's CPU is also its DSP, ok? class dismissed. :D
From another expert:

 

From the back, you can see the Digital Signal Processing board protruding up into the top of the camera including the Analog Devices Black Fin DSP and 4 of the 5 Samsung memory chips which form the RAW data buffer.

 

Running along the top of the camera is the main control board of the camera. This is part of the camera which meters the scene, detects the lens in use and fires the shutter. It’s an M16C processor from Renesas, formerly Mitsubishi, who are the world’s largest supplier of microcontrollers. This processor, type M30624FGPGP, has 256k of Flash EPROM program memory and 20k bytes of RAM.

Link to post
Share on other sites

When the analog signals are converted into digital bits after the A/D, the DSP will do a series of pre-processing, such as demosaic, matrix, gamma correction, sharpening, etc ... before it reaches the point of constructing a RAW file whether compressed or not.

I would have thought that “raw” meant these processing steps were left to the raw converter, no? Some cameras apply some basic noise reduction (the M8 probably doesn’t) and we know for certain that the M8 corrects for cyan corners, if possible, but that’s about it.

Link to post
Share on other sites

I would have thought that “raw” meant these processing steps were left to the raw converter, no? Some cameras apply some basic noise reduction (the M8 probably doesn’t) and we know for certain that the M8 corrects for cyan corners, if possible, but that’s about it.

 

FWIW, I only tried to name a number of things which can be done in the DSP (for example). What has been done, or has NOT been done - before a RAW file is constructed, I don't know, and you are not sure.

 

The reason why I'm looking at this thread is because I am also looking for answers, but I don't think this particular experiment is anywhere close to be useful because:

 

1. The DMR's and M8's sensors are not identical;

2. The firmware of DMR and M8 were written by two different companies and we have enough reasons to believe that the approaches they have adopted are different as well.

 

So my point is, all this experiment does by far can only demonstrate how this particular method could do in converting a cooked 16bit DMR DNG into a 8bit DMR DNG. I can try similar thing by one click in photoshop.

 

From what I've seen from the DMR and M8 files, the M8 files hold up pretty good and are definitely among some of the best camera RAW files which can sustain a huge amount of abuse and torturing, if I would give any slightest preferences to the DMR files, that would be for its color profile come with the Flexcolor converter.

 

I believe what you've said that the visual differences between a 16 bit M8 constructed from the sensor dump and a 8 bit DNG is trivial and negligible. Unless the "fact" is otherwise which we don't know?

Link to post
Share on other sites

Guys, can we leave the flaming out? It's a good thread to know secrets of our M8s for some flaming ...;)

 

 

Michael and Holger Sparr have played with a 16 bit prototype and both agree that the differences are trivial and insignificant (to say the least). And I believe what they say.

 

searching about that I found this post: http://www.l-camera-forum.com/leica-forum/leica-m8-forum/33282-lfi-exposed.html#post349523

Link to post
Share on other sites

It strikes me that this comparison is similar to trying to evaluate two scanners (8 bit and 16 bit perhaps) by scanning and identical image but shot on different films (Velvia and Provia perhaps). At the end of the day it might be an interesting exercise but what will it actually achieve? Would the 8 bit scan off the Velvia slide be different to the 16 bit scan off the Provia slide? Is one better? Is the whole idea actually a valid comparison or is it fundamentally flawed?

 

The question that the thread seems to be trying to answer equates to whether an 16 bit scan off Velvia is better than an 8 bit scan also off Velvia, but since we can effectively only use a different film in each scanner we have no way of telling. Or am I wrong?

Link to post
Share on other sites

FWIW, I only tried to name a number of things which can be done in the DSP (for example). What has been done, or has NOT been done - before a RAW file is constructed, I don't know, and you are not sure.

I am sure that none of the processing steps you mentioned are performed. Take demosaicing, for example: that would result in full RGB values, and obviously, the M8 doesn’t store full RGB values in its DNG files.

Link to post
Share on other sites

 

So my point is, all this experiment does by far can only demonstrate how this particular method could do in converting a cooked 16bit DMR DNG into a 8bit DMR DNG. I can try similar thing by one click in photoshop.

No you cannot because that compression is totally different from what Rob (and the M8) are doing.

Link to post
Share on other sites

No you cannot because that compression is totally different from what Rob (and the M8) are doing.

 

The keyword is "similar", of course, the way Photoshop handles it is different.

 

All in all, my point is, you can't prove the M8 8 bit DNG would have any significant difference from a would-be 16 bit M8 DNG, do you agree with that?

 

Some may find the experiment interesting but it's a useless exercise (for its purpose).

Link to post
Share on other sites

Why isn't LSB dithering discussed?

In audio it has a severe impact to the audio that lands on a CD, if there was used dither when going from 24bit or higher down to 16bit and what kind was used. A truncated signal is often rough and flat.

 

I know that I must consider that everything doesn't relate to audio, but still I'm interested in how dither will affect the result.

 

Let me try to answer your question.

 

When digitizing an analog signal, the original signal alway has a noise floor.

In the case of audio, very small signals can be burried in noise, but are still modulating the noise. Although these small signals seem to be lost in noise, they still can be detected by the human ear, as well as by measuring equipment when the signal is filtered in narrow frequency bands.

 

So because noise can be carrying information, one should use an A/D converter that has a dynamic range large enough to capture the largest signal, as well as the noise.

The dynamic range of a converter is determined by the amount of bits.

The more bits, the higher the dynamic range.

As an optimum, the most senstive 2 bits should be lying within the level of the noise, more bits are not needed to detect signals burried in this noise.

 

Now if you have a converter with less bits, the information content lying in the noise gets completely lost. To prevent loss of information, you can raise the noise level by adding noise before digitizing.

Now, although the noise floor is higher, you are again able to filter information from noise.

 

If digitizing has been done with the correct amount of bits, but the number of bits are reduced at a later stage, you better raise the noise floor again, but this time by adding digital noise or dither to keep as much information as possible.

 

So adding noise, can prevent information getting lost although at first sight this may seem as a contradiction.

 

Now back to the M8 sensor, which is also producing noise. Also for this application enough bits have to be be used to also capture some noise. You can safely assume that the 14 bit A/D convertor has enough bits to capture he noise, so adding some analog noise does not bring any benefit.

Here we do have the situation that the number of bits are reduced directly after digitizing from 14 to 8 bits, but by using a non linear compression scheme, causing the lower bits still representing the noise level. So dark levels are represented in small steps and very light areas in much larger steps, more or less folowing the (logarithmic) sensitivity of your eye.

 

For both Audio and M8, all the calculation steps after digitizing are adding errors to the final result.

So to have as little errors as possible, all calculations should be done with the longest possible word lenghts, preferably much longer than the word lenght of the final result. A picture represented in 8 bits, after all processing has been done, seems to be fully adequate, but before truncating to 8 bits all the steps before should have at least 16 bits precision, to only add a marginal error to the final result.

 

Hans

Link to post
Share on other sites

I have finalized my work on Jaaps picture.

I produced 9 different versions including the original, being:

 

The original, the original truncated to 14 bits and the original truncated to 12 bits.

From these three versions I made an 8 bit SQRT compression/decompression, as well as an 8 bit logaritmic compression/decompression.

 

I will post these pictures on a host site for download, after I have made meticulous tests to see if no errors have been made.

In the first posting in this thread with crops, I mentioned that everything was not yet fully checked, and indeed I found an error causing the conversion looking worse than it it really should be, but the whole process was rather complex.

 

Since I can do the same conversion now relatively fast for a second picture, I could do the conversion for a high quality 16 bit picture of a face, if someone is willing to provide me with such a picture.

Faces are very unforgiving to small errors, and could give us the final answer to 8 bits.

 

Hans

Link to post
Share on other sites

So, on a totally non scientific point, can someone please tell me why after makeing the DMR 16 bit, Leica decided to make the M8 8-bit?

 

A good non scientific answer is "because 8 are less than 16 and the M8 is smaller than the R9+DMR combo... less space for bits" :D

Apart joking... and a little more scientific, dealing with 8 bit strings instead of 16 allows a lot of simplifications / economies / power savings... in any digital data processing system, be it audio, picture, videogame, home & appliance control system... some Leica designer could give us a number of precise reasons... my idea is that they surely started testing 16 bits, than evaluated how much advantages they should have gained opting for 8 bit : circuitry, memory, processing speed, power/battery life, software debugging (an issue heavily related to market introduction schedule : the M8 software is not an adaption of DMR's , developed from scratch, from another company) , they evaluated that the IQ loss could be kept minimal/acceptable , and decision was made.

Any industrial product involves similar decisions during the developing process.

Link to post
Share on other sites

because it is more practical?

why do you listen to mp3s, using an ipod instead CDs?

 

Because unless I rip my own CD's, I often don't always havemuch of a choice.

MP3 sounds like crap compared to the real thing.

;-)

Link to post
Share on other sites

Because unless I rip my own CD's, I often don't always havemuch of a choice.

MP3 sounds like crap compared to the real thing.

;-)

 

As much as I, would like to believe this, I tried on my own using a pair of in ear monitor plugs (etymotics ER4), and couldnt tell the difference. Mp3 source was itunes, or converted from a CD source, CD was a fine tellard recording. So, maybe your ears are sensitive?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...