Pages: 1 2 [3] 4 5 ... 9   Go Down

Author Topic: How to convince Sony to do lossless raw on A7RII and others?  (Read 78020 times)

shadowblade

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2839
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #40 on: June 22, 2015, 03:56:33 pm »

Hi,

Jack discusses this here: http://www.strollswithmydog.com/how-many-bits-to-fully-encode-my-image/

My understanding is that Jack means that shot noise masks any possible banding in the sky. Shot noise is natural distribution of photons.

Let's assume 8000 levels (1 stop below saturation)

Shot noise will be 89 levels, meaning that 65% of the pixels will vary within 7911 and 8089. The remaining 35% of the pixels will have even wider variation. At 8000 levels the Sony ARW uses 1 digital number for 16 levels, so the 65% range from 7911 - 8089 will be coded with eleven number. That will give a good representation, and I don't think banding is possible. Sony is far from alone using this type of compression, I guess both Leica and Phase One uses it.

The probable cause of banding that can be observed is more likely colour management issues.

The artefacts below are caused by Colour Profile issues. They go away with original Adobe Standard DCP profile:

Just to say that the above image is coming from a P45+ back used with my usual DNG Colour Profile generated by DNG Profile Editor. Capture One 7.3 has similar issues with that image.

Probably explains why the posterisation looks different depending on which monitor/profile I'm viewing it on.

The shot noise issue probably also explains why posterisation seems to be more apparent when I add/average multiple frames together to reduce noise and improve DR (for an effective ISO 50, 25 or lower) - I suspect the lower shot noise from multiple added exposures brings the random noise below the 16-level limit.
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #41 on: June 22, 2015, 04:02:44 pm »

Hi,

Photoshop is just 15 bits…

Regarding averaging exposures, we have seen a case on GetDPI where banding was caused by lens corrections. The photographer was combining several exposures and we assumed that using lens correction made the raw processor to apply dark frame subtraction in the wrong way. Complex banding was the result.

http://www.getdpi.com/forum/medium-format-systems-and-digital-backs/53149-strange-moire-like-pattern-assistance-requested.html

Best regards
Erik

Probably explains why the posterisation looks different depending on which monitor/profile I'm viewing it on.

The shot noise issue probably also explains why posterisation seems to be more apparent when I add/average multiple frames together to reduce noise and improve DR (for an effective ISO 50, 25 or lower) - I suspect the lower shot noise from multiple added exposures brings the random noise below the 16-level limit.
Logged
Erik Kaffehr
 

shadowblade

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2839
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #42 on: June 22, 2015, 04:07:01 pm »

Hi,

Photoshop is just 15 bits…

Regarding averaging exposures, we have seen a case on GetDPI where banding was caused by lens corrections. The photographer was combining several exposures and we assumed that using lens correction made the raw processor to apply dark frame subtraction in the wrong way. Complex banding was the result.

http://www.getdpi.com/forum/medium-format-systems-and-digital-backs/53149-strange-moire-like-pattern-assistance-requested.html

Best regards
Erik


What do you mean Photoshop is 15 bits?
Logged

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #43 on: June 22, 2015, 04:10:17 pm »



Jack discusses this here: http://www.strollswithmydog.com/how-many-bits-to-fully-encode-my-image/

My understanding is that Jack means that shot noise masks any possible banding in the sky. Shot noise is natural distribution of photons.

Let's assume 8000 levels (1 stop below saturation)

Shot noise will be 89 levels, meaning that 65% of the pixels will vary within 7911 and 8089. The remaining 35% of the pixels will have even wider variation. At 8000 levels the Sony ARW uses 1 digital number for 16 levels, so the 65% range from 7911 - 8089 will be coded with eleven number. That will give a good representation, and I don't think banding is possible. Sony is far from alone using this type of compression, I guess both Leica and Phase One uses it.



I dunno about Phase One, but neither the Leica M240 or M9 show the histogram depopulation that would result from applying an in-camera tone curve.

Nice job distinguishing between Poisson statistics and Gaussian ones, Erik. I bet you though nobody would notice.

Jim

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #44 on: June 22, 2015, 04:13:11 pm »

What do you mean Photoshop is 15 bits?

Photoshop's internel representation is [0,32768]. This gives a midpoint to the range and allows for faster math because they can use bit shifts instead of divides.

Jim

Bernard ODonovan

  • Full Member
  • ***
  • Offline Offline
  • Posts: 220
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #45 on: June 22, 2015, 05:27:14 pm »

(with apologies to Franz Kafka:)

Sony: "We just made the finest 35mm image sensor in the world today"
Me: "Great!"
Sony: "Ok!  You can have images that look just like images from the finest 35mm image sensor in the world today"
Me: "I thought you were going to give me the finest 35mm image sensor in the world?"
Sony: "We totally are...well, we're giving you the next best thing, and you totally can't tell the difference!"
Me: "But...but..."
Sony: "Well, we can't exactly let you use the highest quality setting on the finest 35mm image sensor in the world..."
Me: "But...but..."
Sony: "then you might not think that there was something left that you hadn't tried"



 ;D
Logged

dreed

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1719
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #46 on: June 22, 2015, 05:40:04 pm »

From:

http://www.dpreview.com/articles/0717419525/interview-kimio-maki-of-sony-the-customer-s-voice-is-the-most-important-data-for-me

One of our main criticisms of the a7-series has been raw compression. Is the raw processing of the a7R II the same as previous cameras?

KM: Right now it is the same, yes. We’re still working on it. In the future we may change the software but that’s not completed yet. We have consumers who require 14-bit etc., and we’re considering [how to deal with it].
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #47 on: June 22, 2015, 05:58:06 pm »

Hi,

It would give missing bits, but the number of bits at high counts/digital numbers/collected electrons is enough to correctly describe the signal in presence of the shot noise. Low signals are densely sampled while high signals are sparsely sampled.

This posting by Emil Martinec explains it much better: http://www.openphotographyforums.com/forums/showthread.php?t=5499

Wouldn't the division from 14 bits to 11 bits and subsequent re-inflation to 14 bits will result in missing codes, even without consideration of the delta coding?
Logged
Erik Kaffehr
 

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #48 on: June 22, 2015, 06:02:29 pm »

Hi Jim,

I corrected my posting regarding Leica using tone curve compression.

Regarding the Poisson stuff, it is something I read about back in 1978… I wouldn't mind if you choose to elaborate :-)

Best regards
Erik

I dunno about Phase One, but neither the Leica M240 or M9 show the histogram depopulation that would result from applying an in-camera tone curve.

Nice job distinguishing between Poisson statistics and Gaussian ones, Erik. I bet you though nobody would notice.

Jim
Logged
Erik Kaffehr
 

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #49 on: June 22, 2015, 07:18:56 pm »


I corrected my posting regarding Leica using tone curve compression.

Regarding the Poisson stuff, it is something I read about back in 1978… I wouldn't mind if you choose to elaborate :-)


The Poisson probability density function is a bit different from the Gaussian one until you get near zero where they can be wildly different. I usually ignore those differences, but you didn't, and quoted the correct value of 65% of the samples lying between +/- one sigma, where with the Gaussian distribution, it would be 68%.

I think that's right, anyway.

Jim

labirdman

  • Newbie
  • *
  • Offline Offline
  • Posts: 8
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #50 on: June 22, 2015, 09:42:51 pm »

For those asking for a real world example of posterization caused by Sony's lossy RAW, dpreview made available an A7R raw file here. Raise exposure a little, and look at the arches and the outline of the needle itself. Apparently this wouldn't be an issue in a D810 file.

If you'd prefer to see 100% jpg crops showing same, check the penultimate section of their preview here.

I think Jim is right, though--the bigger problem is the drop from 13 to 12-bit precision when shooting in continuous, silent, and bulb modes. Nobody seems to know about that, and there's been very little discussion.
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #51 on: June 22, 2015, 10:41:26 pm »

Hi,

What we see in that sample may be an effect of the Delta compression. It is a bit similar to the star tracks image, but the signature is not that clear. The good thing is that it is my guess that Sony may be able to disable that easily. Older Sony's used to haw RAW and cRAW, I guess that cRAW may mean Delta compression.

Best regards
Erik

For those asking for a real world example of posterization caused by Sony's lossy RAW, dpreview made available an A7R raw file here. Raise exposure a little, and look at the arches and the outline of the needle itself. Apparently this wouldn't be an issue in a D810 file.

If you'd prefer to see 100% jpg crops showing same, check the penultimate section of their preview here.

I think Jim is right, though--the bigger problem is the drop from 13 to 12-bit precision when shooting in continuous, silent, and bulb modes. Nobody seems to know about that, and there's been very little discussion.
Logged
Erik Kaffehr
 

BrianVS

  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #52 on: June 23, 2015, 08:23:57 am »

Photoshop's internel representation is [0,32768]. This gives a midpoint to the range and allows for faster math because they can use bit shifts instead of divides.

Jim

In the context of the 15-bit internal representation, are you stating this for just the Sony camera or for all cameras?

Photoshop CS2 has 32-bit channel mode, Photoshop 7.0 through 3.0 (in my direct experience) were limited to 16-bits per channel.

How do you know that Photoshop is using 15-bit internal representation? They should use 16-bits (or more) for 16-bits/channel and 32-bits for 32-bit/channel. It's easy enough to move pixel values to the lower 16-bits of a register, perform the operation on all 32-bits, then clip and store the lower 16-bit value. That's what I do. Speed- "not a problem" these days.

Also- 32768 is a 16-bit number, is '8000'x. 32767 is the largest 15-bit value, '7fff'x. EDIT- I have been working with 32-bit assembly for 25 years now. I default to 32-bit in HEX, then save off the lower word.
« Last Edit: June 23, 2015, 11:38:58 am by BrianVS »
Logged

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #53 on: June 23, 2015, 10:35:28 am »

In the context of the 15-bit internal representation, are you stating this for just the Sony camera or for all cameras?

For all cameras.

How do you know that Photoshop is using 15-bit internal representation?

Adobe says so.

https://forums.adobe.com/thread/1790320

They should use 16-bits (or more) for 16-bits/channel and 32-bits for 32-bit/channel. It's easy enough to move pixel values to the lower 16-bits of a register, perform the operation on all 32-bits, then clip and store the lower 16-bit value. That's what I do. Speed- "not a problem" these days.

Tell that to Adobe.

Also- 32768 is a 16-bit number, is '80000000'x. 32767 is the largest 15-bit value, '7fffffff'x.

Precisely. That's why the Adobe encoding is sometimes called "15+1", as in 15 bit encoding with one extra value.

Jim

BrianVS

  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #54 on: June 23, 2015, 11:44:21 am »

The way Adobe does it will lose resolution in the image as you apply processing- collisions will occur with the lost pixel depth. Too bad, with increased bit-depth from the cameras, most everything will require 32-bit integer or floating point to preserve resolution. I wrote code for image segmentation and pattern recognition- so artifacts were an issue. I've modified that software to process DNG files. I like the results.

I will have to see what Lightroom is doing with my 16-bit images, white set to 65535. If they do as they say, it should lose a bit and the white value should change in the new IFD that gets written in the file.

I read the discussion. Lightroom should look up the latest cycle times for the newer processors, 32-bit Integer operations are fast. They should do all of the operations in 32-bit integer, store back as 16-bit. The CPU registers are set up to handle this. It's been this was since the Pentium Pro was out. Which came after Photoshop 3.0. Maybe they have not bothered to rewrite that section of code.
« Last Edit: June 23, 2015, 11:51:43 am by BrianVS »
Logged

Jack Hogan

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 798
    • Hikes -more than strolls- with my dog
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #55 on: June 23, 2015, 11:56:46 am »

Uncompressed files are faster to work with and faster to save and open, since there's no need to compress or decompress the file. Slightly larger file size, but storage space is cheap and high-resolution files already push performance envelopes.

Potentially, this could also translate to higher frame rates or larger buffers in camera, in addition to faster editing.

Actually the opposite is true as far as 'gamma' lossy compression is concerned: about 1/5th the data to move around, process and save.  The actual translation from 'lossy' compressed to uncompressed is just a look up table, an operation that can be performed very quickly by even simple DSPs, never mind the ultra sophisticated ones in our cameras.  On the other hand lossless compression/decompression is a memory and processor (power) intensive operation, which is why early DSLRs could not do it.  I don't think it's an issue with current cameras though.

In general the fastest FPS with Nikon DSLRs are typically obtained in 12-bit crop mode because there is less data to process (e.g. D7200 5 FPS in 14-bit mode, 6 FPS in 12-bit mode, 7 FPS in 12-bit 1.3x mode).

Jack
« Last Edit: June 23, 2015, 11:59:08 am by Jack Hogan »
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
My thoughts on "lossy" raw compression
« Reply #56 on: June 23, 2015, 12:04:42 pm »

Hi,

I have not seen raw conversion artefacts with my Sony cameras. Now, this may depend on either my cameras or my subjects and shooting technique. Older Sony cameras have a choice of RAW vs. cRAW and I have almost exclusively used RAW. My guess is that RAW uses tone curve, which I basically regard to be a sound technique, while cRAW may use the Delta compression which may be loss free under many circumstances but can lead to demonstrable artefacts under some conditions.

It often happens that effects can be demonstrated, I have often issues with colour aliasing on my P45+, for instance. Others may have different subject, aperture usage, exposure times and such and don't have any problems. The Sony A7r shutter vibration is a similar issue. It is clearly measurable, but in most situations it may not be very observable.

As a parallell, there is a guy on GetDPI who shoots a lot of magnificent night pictures on a Pentax 645 and he gets some odd artefacts. Those are probably not coming from his Pentax but from processing. But, the case is that those things may not be a problem for a great majority of users but it is a real problem for Ed because the subjects he shoot take the processing pipeline to it's limits.

So my take is. Be aware there is a problem. If you don't see it on your Sony, be happy. If you shoot high contrast night subjects for living, the Sony may not be the platform of choice, there are others.

Would be nice if Sony made that Delta compression optional.

Personally, I have an A7rII on order, so that lossy compression doesn't scare me away. But I would never use it if it was an option.

Best regards
Erik




Logged
Erik Kaffehr
 

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #57 on: June 23, 2015, 12:53:22 pm »

The way Adobe does it will lose resolution in the image as you apply processing- collisions will occur with the lost pixel depth. Too bad, with increased bit-depth from the cameras, most everything will require 32-bit integer or floating point to preserve resolution. I wrote code for image segmentation and pattern recognition- so artifacts were an issue. I've modified that software to process DNG files. I like the results.


When I'm writing image processing code, I almost always use double-precision floating point with fs = 1.0, so I don't have to worry about rounding buildup, over and underflow, and negative intermediate values. But that code runs in batch mode.

Jim

BrianVS

  • Full Member
  • ***
  • Offline Offline
  • Posts: 164
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #58 on: June 23, 2015, 02:33:28 pm »

I just checked the DNG file as saved by Lightroom 6, after applying some processing on my 16-bit files. The White-Level is set to 'FFFF'x in the new SubIFD. So at least LR6 does not throw away the least significant bit when opening a linear-DNG file with 16-bit pixels.

I used a lot of double-precision on computers with code being ported from the 60-Bit single-precision CDC mainframes. So much that I wrote a FORTRAN-66 code to automatically do most of the source-code to source-code changes for me, including changing all of the constants to double-precision format, and changing Function names. Kind of nice, I get to tell people I earned my way through school be writing atomic structure programs. Some went back to 1957, on the IBM 704. To the 7090, CDC 6600, CDC-7600, then the TI-ASC vector supercomputer that I used. That machine was wonderful for image processing, could process sub-images of a 3-D image with one assembly language instruction. The computer used sets of registers to stream memory through the CPU, could use 3-deep loops to stride through memory. Nothing else ever built like it. Floating point multiply was 1 clock cycle, bit-shift took 1 cycle, floating Divide took 16.
« Last Edit: June 23, 2015, 02:37:20 pm by BrianVS »
Logged

kers

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4433
    • Pieter Kers
Re: How to convince Sony to do lossless raw on A7RII and others?
« Reply #59 on: June 23, 2015, 07:16:27 pm »

From:

http://www.dpreview.com/articles/0717419525/interview-kimio-maki-of-sony-the-customer-s-voice-is-the-most-important-data-for-me

One of our main criticisms of the a7-series has been raw compression. Is the raw processing of the a7R II the same as previous cameras?

KM: Right now it is the same, yes. We’re still working on it. In the future we may change the software but that’s not completed yet. We have consumers who require 14-bit etc., and we’re considering [how to deal with it].


+1 really on topic.
- i read the interview before and asked myself why is this discussion going on for 3 pages..? oh well..
Logged
Pages: 1 2 [3] 4 5 ... 9   Go Up