FAQ |   |   |  Register |  Login |

The consolidated CRAW compression thread

Page  <1234 7>
Author
springtide View Drop Down
Senior Member
Senior Member


Joined: 29 October 2007
Location: United Kingdom
Online Status: Offline
Posts: 243
Post Options Post Options   Quote springtide Quote  Post ReplyReply Direct Link To This Post Topic: The consolidated CRAW compression thread
    Posted: 09 November 2007 at 14:49
Originally posted by pegelli

Originally posted by gm4jjj

Be careful - bit depth and dynamic range are not the same thing.



Exactly !: Dynamic range is the difference between the darkest part that gives the smallest signal and the brightest part before it "blows out". Bit depth is how many levels this range between darkest and lightest is devided into.

Also be carefull to say that compression allways throws away data. There are compression algorithms which are scientifically proven to be lossless (eg. LZW compression of Tiff files).


Sorry, yes I can see how this can be. I asm still not any wiser whether the compression is lossless (like ZIP etc) or lossy (like Jpeg).

Had a reply from David to my question...

"DK replies - it is definitely 8-bit. Sony describe it as ‘lossless bit depth compression’. I do not understand that fully, but maybe it works like ATRAC and their audio technologies by using perceptual algorithms - compressing insignificant information only. I can see no difference in practical use, because when opened, the 8-bit compression is restored to 12-bit range."

ATRAC is from what I know is not lossless. Will admit I don't really understand much about compression (a little), but I thought that Jpeg compression was also considered (when used on high quality) to just compress the "insignificant information only".

Think I'll just switch to standard RAW and forget that I asked this question.
Back to Top
chmod007 View Drop Down
Senior Member
Senior Member


Joined: 12 March 2007
Location: United States
Online Status: Offline
Posts: 621
Post Options Post Options   Quote chmod007 Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 14:49
Are the pixel groups along lines, columns or in square matrices? I guess lines…
Back to Top
jakobdam View Drop Down
Groupie
Groupie


Joined: 13 November 2006
Location: Denmark
Online Status: Offline
Posts: 136
Post Options Post Options   Quote jakobdam Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 14:56
I am shocked.

I must admit at the same time, that I have't found any difference while peeping at RAW and cRAW, but I WASN'T LOOKING for this kind of difference either. I was looking at highlight and shadow clipping, noise patterns, the like. No difference there.

But difference in bits/channel IS noticeable, and something I'm pretty annoyed with. Having 8 bits per channel, gives you 256 gradients per channel. In a monochrome graduation, this means 256 different gradients in total.

12bit/channel is 4096, and in larger prints, this is noticeable without any further ado.


But when you post process, the problem with the limited bitresolution becomes even more evident.


Why didn't they just do a normal ZIP-like compression? Why a fix-length 8-bit conversion? YEAH, sure it LOOKS like the 12-bit version - but when manipulating, it doesn't behave that way!

Luckily I've only shot in cRAW the past 6 days. Before that, I used plain RAW. Which I will now do again.

*sigh*
Sony Alpha A700 & Konica Minolta DYNAX 5D // www.fotostart.dk
Back to Top
jakobdam View Drop Down
Groupie
Groupie


Joined: 13 November 2006
Location: Denmark
Online Status: Offline
Posts: 136
Post Options Post Options   Quote jakobdam Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 14:59
I don't understand this talk about "restored to 12-bit". If the file is stored in 8bit depth per channel, then 12-bit can only be a result of interpolating.

Like fx. the TN/TN+ flatscreen panels does; 6bit interpolated to 8bit (per channel), trying to extend color gamut. But not really succeeding.


Ok, just making clear - I didn't miss the point about how this downscale to 8bit/channel (per 16 pixel group) is made. I may also overexaggerate the problem, as cRAW still cannot be compared with the JPEG 8bit/channel - as the cRAW does 8bit/channel per 16 pixel group. But still...

Edited by jakobdam - 09 November 2007 at 15:12
Sony Alpha A700 & Konica Minolta DYNAX 5D // www.fotostart.dk
Back to Top
gm4jjj View Drop Down
Senior Member
Senior Member


Joined: 20 August 2005
Location: Scotland
Online Status: Offline
Posts: 659
Post Options Post Options   Quote gm4jjj Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 15:27
Gabriel, thanks for the explanation of how exactly this compression is achieved, most interesting and at the same time disappointing that Sony took this lossy approach. I'm now undecided whether to continue with cRAW + JPG.

I used to be indecisive, but now I'm not so sure
-- David
Back to Top
Gabriel View Drop Down
Emeritus group
Emeritus group

Honorary member

Joined: 05 December 2006
Location: France
Online Status: Offline
Posts: 1788
Post Options Post Options   Quote Gabriel Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 16:24
Originally posted by chmod007

Are the pixel groups along lines, columns or in square matrices? I guess lines…

Grouped in lines, which is a lot easier to handle than squares.

Originally posted by jakobdam


Why didn't they just do a normal ZIP-like compression?

Because this would be slow, silicon-expensive, and inneficient. Try zipping a regular raw file, in most cases you won't save much space.

Edited by Gabriel - 09 November 2007 at 17:09
Back to Top
EgonVLC View Drop Down
Newbie
Newbie


Joined: 31 May 2007
Location: Spain
Online Status: Offline
Posts: 14
Post Options Post Options   Quote EgonVLC Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 18:22
Don't be that picky... I work as a imaging engineer, and that's a very common way of compressing data. In each line, you save the first value, and then save only the diference to next pixels. Since from one pixel to the next you can't have a whole 12bit jump, you won't suffer at all from this compression scheme. A lens can't resolve one pixel as "4096" value and next as "0", because of the antialias filter, the bayer pattern... In the extrange case when it really is a level jump which can not be represented in 8 bits, you can do two things: put a flag and start the sequence again (put the real value and not the difference and go on...) or saturate the 8 bit difference, because it will probably corrected by the next pixel.

Let's make all this clear with a numeric example:

Imagine we have this sequence coming from sensor:

120 - 250 - 324 - 400

We can represent it as:

(120) 0 - 130 - 74 - 176

With no loss at all.

If we had something like that:

120 - 300 - 800 - 830 - 880

it would be compressed as:

(120) 0 - 180 - 256 - 256 - 68

which will be decompressed as:

120 - 300 - 556 - 812 - 880

Which will be a matemathical loss, but in a very extrange case and with minimal visible loss. Even if we apply special processing to saturated level, we could average saturation, and have this result:

120 - 300 - 749 - 846 - 880

Which will be almost lossless, or if we want really lossless:

(120) 0 - 300 - (800) 0 - 30 - 50

Not all compression are as destructive as JPEG ;)
Back to Top
gian View Drop Down
Senior Member
Senior Member


Joined: 23 October 2005
Location: Italy
Online Status: Offline
Posts: 1952
Post Options Post Options   Quote gian Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 18:34
I like your explanation a lot, thank you very much EgonVLC
::: Gianluca ::: Gallery ::: Life is once, forever - Henri Cartier-Bresson
Back to Top
Sanjuro View Drop Down
Emeritus group
Emeritus group

Administrator emeritus

Joined: 19 September 2005
Location: Sweden
Online Status: Offline
Posts: 5360
Post Options Post Options   Quote Sanjuro Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 18:47
So, ok cRAW is fine, so why do we have RAW?
Rgds
Sanjuro

"I paint objects as I think them, not as I see them."
Pablo Picasso
Back to Top
madcat207 View Drop Down
Senior Member
Senior Member


Joined: 26 January 2007
Location: United States
Online Status: Offline
Posts: 1530
Post Options Post Options   Quote madcat207 Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 18:54
Originally posted by Sanjuro

So, ok cRAW is fine, so why do we have RAW?

Old habits die hard?
People like options?

Now, for "mission critical", i would say RAW is still the way to go. Even if cRAW is 99% lossless, why take a chance?
Back to Top
analytical View Drop Down
Senior Member
Senior Member


Joined: 30 January 2007
Location: United States
Online Status: Offline
Posts: 701
Post Options Post Options   Quote analytical Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 19:22
"cRAW compressed format uses 8-bit depth????"

I think someone said this already, in more abbreviated format, but there appears to be some inconsistency of use of the term bit depth. Color bit depth as used referring to jpeg or tiff or computer monitors isn't necessarily the same the same as assigned bits used in data storage and compression. The usage i the original article is not clear to me.     

Talking about color bit depth of a raw file makes no sense. Raw files have not been demosaiced, so are inherently monochrome. Each sensor pixel records only a brightness level. Yes, sensor pixels have different color filters in a Bayer array, but each pixel records only the brightness through its individual filter.    

Color for each pixel location is calculated in the demosaic process using the intensity recorded for that pixel plus intensity from surrounding pixels combined with the known location and color filter of each pixel. For raw files that happens in the computer, not the camera.

I have posted this before but here is a good summary from Adobe.
http://www.adobe.com/products/photoshop/pdfs/understanding_digitalrawcapture.pdf


          
12mi sw of Glen Rose,TX
photos
equipment list
Back to Top
Shaocaholica View Drop Down
Senior Member
Senior Member


Joined: 14 July 2006
Location: United States
Online Status: Offline
Posts: 1880
Post Options Post Options   Quote Shaocaholica Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 19:57
People need to realize that if you have a 16mb/16bit file and you lossy/losslessly compress it into a 8mb file with and average of 8bits/pixel, it does not mean that the file has lost bit depth due to the compression. The whole point of compression is to reduce file size. Don't read the size reduction as a 1:1 decrease in IQ. The compression algorithm should be the only point of discussion, not the average bits/pixel in the compressed file.

Edited by Shaocaholica - 09 November 2007 at 20:00
Back to Top
gm4jjj View Drop Down
Senior Member
Senior Member


Joined: 20 August 2005
Location: Scotland
Online Status: Offline
Posts: 659
Post Options Post Options   Quote gm4jjj Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 20:05
EgonVLC - many thanks for your excellent explanation with example, all makes much more sense to me now.

-- David
Back to Top
Shaocaholica View Drop Down
Senior Member
Senior Member


Joined: 14 July 2006
Location: United States
Online Status: Offline
Posts: 1880
Post Options Post Options   Quote Shaocaholica Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 20:17
An interesting point is that Adobe DNG lossless compression produces files the same size as cRAW but is lossless. Perhaps the Sony cRAW compression is a compromise since there is only so much processing power on the camera and a more efficient/lossless compression might bring the fps down in cRAW mode but I also have the suspicion that the programmers at Sony aren't fully utilizing the hardware either.
Back to Top
Dyxum main page >  Forum Home > Equipment forums > Camera Talk > a700 Page  <1234 7>

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,172 seconds.

Monitor calibration strip

Dyxum.com - Home of the Minolta / Alpha-mount dSLR photographer.

Feel free to contact us if needed. You can support future development by making a donation.