• site home
  • blog home
  • galleries
  • contact
  • underwater
  • the bleeding edge

the last word

Photography meets digital computer technology. Photography wins -- most of the time.

You are here: Home / The Last Word / Speculating on Sony’s raw compression

Speculating on Sony’s raw compression

February 16, 2014 JimK 3 Comments

Hans van Driest has posted a possible explanation of why Sony uses the tone compression algorithm that it does. It’s speculation, to be sure, but, if true, might explain a lot. Here is is post, lightly edited for clarity.

Sony uses column conversion, meaning they use a lot of ADCs in parallel. This, in combination with some other tricks, seems to get rid of most of the pattern noise and allows low read noise, resulting in the great dynamic range of Sony sensors. With so many ADCs, they have to be simple, and simple they are. Sony uses the most basic analog to digital converters, the slope ADC, which compares a voltage ramp with the voltage out of the sensor and stops a counter when the two are equal. This is not the fastest way to make a conversion. For 14 bits, such an ADC needs 2^14 clock cycles for each conversion. When using, say, a 400MHz clock, this means 41us per conversion. Sounds fast, but they must perform over 6,000 of such a conversions for each image, stretching the conversion time to a bit more than 0.25 sec. This is a bit slow for high frame rates, and also for live view.

The shape of the voltage ramp going into the comparator does not have to be linear. Sony uses a variation of an exponential slope (thus the compression). This cuts the conversion time down by a factor of eight (2^11 instead of 2^14). Now the total conversion time is slightly over 0.03 sec. Great for live view.

It might very well be that this explains why Nikon live view is as poor as it is (line skipping to reduce conversion time), compared to that of Sony.

The elegant thing is that this compression is not really costing much, if anything.  14 bits are needed for the dynamic range. But signal to noise ratio, when light is hitting the sensor, is not only determined by the ADC and read noise, but also by a property of the light itself; shot noise. Say the a7R sensor has a full well capacity of 60000 (optimistic). Such a full well capacity means that at maximum illumination, the SNR is the square root of 60,000  or approximately 245, which can easily be resolved with an 8 bit ADC. So with 11 bits, there is room to spare. Shot noise goes up with the signal, not just as fast, but it goes up. So the 14 bits are needed for the deep shadows, but once there is enough light on a pixel, you do not need them anymore.

There’s something that bothers me about the above. The tone curve chosen by Sony, with its linear sections of slopes increasing by a binary order of magnitude each time, seems chosen for digital-to-digital implementation. If I were an engineer with the ability to have any monotonic tone curve I wanted just by controlling the shape of the ramp, I’d go all the way and use a LUT-driven DAC to generate the ramp and encode directly with a gamma of 2.2 (or 1.8, if I were feeling Apple-ish).

The Last Word

← Removing the delta modulation component from Sony raw compression Can you see the Sony raw compression artifacts? →

Comments

  1. Bernie says

    February 17, 2014 at 5:37 am

    Some 3 or so years ago, hell froze and Apple changed native Gamma from 1.8 to 2.2 with Mac OS X 10.6.

    Reply
  2. Iliah Borg says

    February 17, 2014 at 6:43 pm

    > If I were an engineer with the ability to have any monotonic tone curve I wanted just by controlling the shape of the ramp, I’d go all the way and use a LUT-driven DAC to generate the ramp and encode directly with a gamma of …

    L* might be a good choice. Broken line characteristics are not typical for ADCs. Not to mention I do not see any artifacts in the regions of kinks.

    Reply
    • Jim says

      February 18, 2014 at 9:52 am

      Iliah, when I was working for IBM in the early 90s, I did some research on whether discontinuities in slope were easily visible the way that discontinuities in value are. My conclusion, never published because the sample size was too small, was that slope discontinuities are hard to spot, unlike value discontinuities.T he human vision system seems to be tuned to discover luminance value discontinuities, and chroma discontinuities to a lesser degree.

      Jim

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

May 2025
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031
« Apr    

Articles

  • About
    • Patents and papers about color
    • Who am I?
  • How to…
    • Backing up photographic images
    • How to change email providers
    • How to shoot slanted edge images for me
  • Lens screening testing
    • Equipment and Software
    • Examples
      • Bad and OK 200-600 at 600
      • Excellent 180-400 zoom
      • Fair 14-30mm zoom
      • Good 100-200 mm MF zoom
      • Good 100-400 zoom
      • Good 100mm lens on P1 P45+
      • Good 120mm MF lens
      • Good 18mm FF lens
      • Good 24-105 mm FF lens
      • Good 24-70 FF zoom
      • Good 35 mm FF lens
      • Good 35-70 MF lens
      • Good 60 mm lens on IQ3-100
      • Good 63 mm MF lens
      • Good 65 mm FF lens
      • Good 85 mm FF lens
      • Good and bad 25mm FF lenses
      • Good zoom at 24 mm
      • Marginal 18mm lens
      • Marginal 35mm FF lens
      • Mildly problematic 55 mm FF lens
      • OK 16-35mm zoom
      • OK 60mm lens on P1 P45+
      • OK Sony 600mm f/4
      • Pretty good 16-35 FF zoom
      • Pretty good 90mm FF lens
      • Problematic 400 mm FF lens
      • Tilted 20 mm f/1.8 FF lens
      • Tilted 30 mm MF lens
      • Tilted 50 mm FF lens
      • Two 15mm FF lenses
    • Found a problem – now what?
    • Goals for this test
    • Minimum target distances
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Printable Siemens Star targets
    • Target size on sensor
      • MFT
      • APS-C
      • Full frame
      • Small medium format
    • Test instructions — postproduction
    • Test instructions — reading the images
    • Test instructions – capture
    • Theory of the test
    • What’s wrong with conventional lens screening?
  • Previsualization heresy
  • Privacy Policy
  • Recommended photographic web sites
  • Using in-camera histograms for ETTR
    • Acknowledgments
    • Why ETTR?
    • Normal in-camera histograms
    • Image processing for in-camera histograms
    • Making the in-camera histogram closely represent the raw histogram
    • Shortcuts to UniWB
    • Preparing for monitor-based UniWB
    • A one-step UniWB procedure
    • The math behind the one-step method
    • Iteration using Newton’s Method

Category List

Recent Comments

  • bob lozano on The 16-Bit Fallacy: Why More Isn’t Always Better in Medium Format Cameras
  • JimK on Goldilocks and the three flashes
  • DC Wedding Photographer on Goldilocks and the three flashes
  • Wedding Photographer in DC on The 16-Bit Fallacy: Why More Isn’t Always Better in Medium Format Cameras
  • JimK on Fujifilm GFX 100S II precision
  • Renjie Zhu on Fujifilm GFX 100S II precision
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • Ivo de Man on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF
  • JimK on Fuji 20-35/4 landscape field curvature at 23mm vs 23/4 GF

Archives

Copyright © 2025 · Daily Dish Pro On Genesis Framework · WordPress · Log in

Unless otherwise noted, all images copyright Jim Kasson.