FAQ FAQ  Forum Search   Events   Register Register  Login Login

The consolidated CRAW compression thread

Page  123 7>
Author
springtide View Drop Down
Senior Member
Senior Member

Joined: 29 October 2007
Location: United Kingdom
Status: Offline
Posts: 253
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 10:29

Has everybody read this...

http://photoclubalpha.com/2007/11/08/nikon-d300-and-sony-a700-sensor-similarity/

This was the bit that caught my eye....

"Sony’s .ARW2 file format, uncompressed, is 12-bit. Their cRAW compressed format uses 8-bit depth......"

This seems to be saying that the dynamic range is reduced for cRAW. Is this right?

{edited by ab012 - merged with the other ongoing CRAW compression thread)

Edited by ab012 - 01 May 2008 at 14:25
Simon
 



Back to Top
Gabriel View Drop Down
Senior Member
Senior Member
Emeritus Member

Joined: 05 December 2006
Location: France
Status: Offline
Posts: 1931
Post Options Post Options   Quote Gabriel Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 10:40
I'm a bit surprised.

I thought that the only difference between Sony's uncompressed raw and compressed raw was the filesize and processing speed. In other words, I thought that cRaw was using a lossless compression.
After all, a100 is also using a lossless compression for its raw files.

Anyhow, I'd be interested by a test of this.
Back to Top
gm4jjj View Drop Down
Senior Member
Senior Member

Joined: 20 August 2005
Location: Scotland
Status: Offline
Posts: 660
Post Options Post Options   Quote gm4jjj Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 12:01
I don't think that is true at all, certainly it isn't even hinted at in the Sony FAQ on cRAW v RAW.

-- David
Back to Top
vnatchu View Drop Down
Newbie
Newbie

Joined: 02 March 2007
Location: United States
Status: Offline
Posts: 13
Post Options Post Options   Quote vnatchu Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 12:18
cRAW is most certainly lossy.
it uses a fixed length 8-bit compression of the 12-bit data.
"most" data in "most" cases should be preserved, but the compression scheme is complicated and can be lossy in certain cases.

If you are looking for proof that the scheme uses a fixed 8-bit compression or the scheme itself look at Dave Coffins dcraw.c
it has the code for this and will likely be used in a variety of converters.

vishnu
Back to Top
springtide View Drop Down
Senior Member
Senior Member

Joined: 29 October 2007
Location: United Kingdom
Status: Offline
Posts: 253
Post Options Post Options   Quote springtide Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 12:38

OK, no more cRAW then!

Back to Top
gm4jjj View Drop Down
Senior Member
Senior Member

Joined: 20 August 2005
Location: Scotland
Status: Offline
Posts: 660
Post Options Post Options   Quote gm4jjj Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 12:47
That's most interesting, so do we still get 12 bit data when it is uncompressed from cRAW?
-- David
 



Back to Top
springtide View Drop Down
Senior Member
Senior Member

Joined: 29 October 2007
Location: United Kingdom
Status: Offline
Posts: 253
Post Options Post Options   Quote springtide Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 12:51

I assume once you've thrown away that data, it's gone.

Back to Top
Sanjuro View Drop Down
Emeritus group
Emeritus group
Administrator emeritus

Joined: 19 September 2005
Country: United Kingdom
Location: Sweden
Status: Offline
Posts: 5849
Post Options Post Options   Quote Sanjuro Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 12:57
I always wondered why Sony offers these 2 formats, and If I would have a A700 I would NOT shoot in cRAW.
It has to be something that is why it is called compressed and compressed for me doesn't sound good.

So this finally has given an answer.
Sounds very logical to me, so the Dynamic range in certain kind of images could be reduced even more in cRAW.
Rgds
Sanjuro

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

Joined: 20 August 2005
Location: Scotland
Status: Offline
Posts: 660
Post Options Post Options   Quote gm4jjj Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 13:06
Be careful - bit depth and dynamic range are not the same thing.


-- David
Back to Top
pegelli View Drop Down
Admin Group
Admin Group
Dyxum Administrator

Joined: 02 June 2007
Country: Belgium
Location: Schilde
Status: Offline
Posts: 33676
Post Options Post Options   Quote pegelli Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 13:57
Originally posted by gm4jjj gm4jjj wrote:

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

Edited by pegelli - 09 November 2007 at 14:01
You can see the April Foolishness 2021 exhibition here Another great show of the talent we have on Dyxum
Back to Top
gm4jjj View Drop Down
Senior Member
Senior Member

Joined: 20 August 2005
Location: Scotland
Status: Offline
Posts: 660
Post Options Post Options   Quote gm4jjj Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 13:59
In another thread on Dyxum Frank summed this up:

see this page

Originally posted by my-spot my-spot wrote:

Technically speaking... cRAW is not Lossless. One clue to this is that it is a "fixed" length format. 16 (12 bit) pixels are always stored in 16 pixel/16 byte packets that use a very "different" compression algorithm. It is decompressed into 12 bit data (16 pixels = 24 bytes).

However, From what I can tell, the compression used will, in fact, be Lossless 99.9% of the time, and in the 0.01% that it is lossy, you will never see the difference. CMS conversion, Bayer demosiacing, conversion to 8 bit formats, and (if used) jpeg compression, will have a MUCH bigger effect on the final output then cRAW compression would ever have.


I will stick to cRaw as I have never seen any difference in output between the it and RAW and it has the advantage that it takes less memory card space and it allows faster frame rates.

Sony's FAQ is very well crafted to avoid the answer as to whether it is lossy or not.
-- David
Back to Top
pegelli View Drop Down
Admin Group
Admin Group
Dyxum Administrator

Joined: 02 June 2007
Country: Belgium
Location: Schilde
Status: Offline
Posts: 33676
Post Options Post Options   Quote pegelli Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 14:07
Originally posted by gm4jjj gm4jjj wrote:

Sony's FAQ is very well crafted to avoid the answer as to whether it is lossy or not.


I can't be angry about this. Probably if they would word it differently a lot of people will discard it for the theoretical reasons mentioned in this and other threads while as you say in practice you cannot tell the difference. Probably even pixel peeping at high magnification won't show you what it does, so no way a print will be influenced
You can see the April Foolishness 2021 exhibition here Another great show of the talent we have on Dyxum
Back to Top
gm4jjj View Drop Down
Senior Member
Senior Member

Joined: 20 August 2005
Location: Scotland
Status: Offline
Posts: 660
Post Options Post Options   Quote gm4jjj Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 14:11
Yes perhaps angry was a bit strong, just perplexed by their evasion.

I think the main thing to appreciate is that Camera dynamic range is not compromised by cRAW and it does not produce 8 bit depth output when uncompressed.
-- David
Back to Top
Gabriel View Drop Down
Senior Member
Senior Member
Emeritus Member

Joined: 05 December 2006
Location: France
Status: Offline
Posts: 1931
Post Options Post Options   Quote Gabriel Quote  Post ReplyReply Direct Link To This Post Posted: 09 November 2007 at 14:37
Originally posted by vnatchu vnatchu wrote:


If you are looking for proof that the scheme uses a fixed 8-bit compression or the scheme itself look at Dave Coffins dcraw.c
it has the code for this and will likely be used in a variety of converters.


After a quick look at dcraw, cRaw is indeed lossy, and using 8 bits.
It seems that at each group of 16 bayer pixels, it stores the max value, and then the following 16 pixels will be stored using 8 bits with values that can go up to this max value.
So overall dynamic range is preserved, but you only have 8bits of dynamic per 16 pixels.

This is a very simple scheme, and for sure it could have been a bit more efficient, but overall it's not that bad.
Back to Top
Dyxum main page >  Forum Home > Equipment forums > Camera Talk > A-mount APS-C Page  123 7>

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.

Monitor calibration strip

Dyxum.com - Home of the alpha system photographer

In memory of Cameron Hill - brettania

Feel free to contact us if needed.