diglloyd

Welcome to diglloyd.com
In-depth review coverage is by subscription.
Also by Lloyd: MacPerformanceGuide.com and WindInMyFace.com
First-time visitor
Lloyd gets credit via these or any site ads/links... thank you!
Trusted computing vendor MacSales.com
B&H DAILY DEAL   B&H Deals by brand/category/discount
Wish lists: Sony | NIKON | ZEISS | Canon | Pentax K | M4/3 | Fujifilm | Leica M | Leica SL | Macs
Buy anything at Amazon.com
In Motion There is Great Potential
Performance Package for Mac Pro or iMac 5K
For iMac 5K or For 2013 Mac Pro
Recommended by diglloyd as ideal for photographers and videographers

Sony’s 11+7-bit Delta Compression, Posterization in Some Situations

Order the Sony Vario-Tessar T* FE 24-70mm f/4 ZA OSS Lens at B&H Photo.

As discussed in some detail in the review of the Sony A7R, the Sony A7 and A7R and other Sony cameras all use an 11 + 7-bit lossy compression scheme: 11-bit range with 7-bit delta values from 14-bit pipeline (8 bits per pixel in effect). Compare that to a Nikon 14-bit lossless image file. There is a difference, and I am certain it explains some of the not-so-great pixel quality I’ve seen in field images (in localized areas, not in totality), but it has been hard to pin down.

Alex Tutabalin of RawDigger has posted an essay on the posterization effects that can be observed with Sony ARW raw files due to the 7-bit delta compression. You can read it in Russian or in the Google translation.

RawDigger is the only tool to display areas that might be subject to posterization due to Sony lossy compression. Great tool, highly recommended. On my to do list is exploring these new Sony-specific features, which appeared just recently.

According to Alex:

1) In each 32 pixel block we have 16 pixels of single color.

2) For the 16 pixels of each color:
- two 11-bit values ('base pixels') are stored exactly. The minimum and maximum values in block
- two 4-bit coordinates of min/max pixels in block are stored too.
- and 14 7-bit deltas for remaining 14 pixels.

= 11 + 4 + 11 + 4 + 14 * 7 = 128 bits for 16 pixels = 8 bits per byte

3) 'delta' pixel value is calculated from delta, minimum and maximum:

step = (maximum - minimum)_rounded_to_the_nearest_largest_power_of_two / 128. This 'step' is the same for all 'delta' pixels in block
(smallest integer power of two (1,2,4....) such that step*128 > max-min)

pixel value = minimum + delta_recorded_for_this_pixel * step.

So, if data range within 16 pixels is too wide, then “step size” of each transition increases, so posterization occurs.

  • The effective stepping can be around 3.4% which is very much discernible by the eye., the figure of around 1% can be considered just discernible.
  • The general “internet rejection” of this stepping delta idea relies on the premise that photon noise exceeds the stepping. But as Alex points out, probabilities tend to result in clumping (non randomness) in visible effects, an idea I fully support in seeing some coarseness in tonal transitions, an effect I immediately detected (by eye), and immediately commented up on in my review when first shooting the A7R. Since then I have seen this effect in many images (in localized areas), and as I stated way back in my first reaction, it is an image quality defect that I have not seen over the years of shooting my Nikon D800/D800E. Its significance is mainly a niggle more than a major flaw, but it exists.
  • Posterization can increase when doing the “right thing” for image quality: optimizing exposure via ETTR. This follows from the above.

Although I have some images I think are caused by the Sony compression, I’ll be seeking out some obvious examples in the field. Much of my recent shooting has been with dark/rich tones not having the rapid tonal transitions.

Sony tonal curve (A7 / A7R)* Image courtesy of Alex Tutubalin of RawDigger.com
Sony tonal curve (A7 / A7R)*
Image courtesy of Alex Tutubalin of RawDigger.com

Notes on the graph above from Alex Tutubalin:

The RAW values in Sony cRAW (before decompression tone curve applied) is 11 bit, so the data range is 0..2047. These values are multiplied by two, then passed to curve (4096 elements), then the black level subtracted.

In my calculations in blog post the multiplication and tone curve are merged together, so on tone curve graph the X-axis is 0..2047 range and Y-axis is 0...16k range.

Please note, that RawDigger display in 'Delta only relative to zero' is different: the displayed values are multiplied by two (to match Tone Curve dump via File -> Dump RAW Curve), so the range is 0..4095 .

This is a bit complicated, but this is 'Sony style' :)

Example

Star trails should provide a good example, because the brightness range (dynamic range) can be high. This is as severe an artifacting effect as I’ve ever seen. In the color image and green-channel image the vertical lines surround the star trail at left; the blue channel shows a similar effect in the bright star trail cutting through the branches.

Moreover, dynamic range has to be lost due to the compression (the camera cannot record the full range): 14-bit in, 11 bit out. Even the sensor noise is not enough to mask the artifacts (disproving the noise theory).

Notice the short length of the lines: measured, they are 32 pixels which is precisely the “32 pixel block” that Alex notes above.

Thanks to reader Matt K for sending this example (Sony A7).

Star Trails with Sony Alpha A7 showing compression artifacts
Star Trails with Sony Alpha A7 showing compression artifacts

Star Trails with Sony Alpha A7 showing compression artifacts
Star Trails with Sony Alpha A7 showing compression artifacts

High level view—what is the Sony gestalt?

Context: the Sony A7R is a $2200 camera that with a few lenses is a $4000 system; it is not a $500 Sony RX100 and thus expectations are necessarily higher. While under the majority of situations, image quality of the A7/A7R is outstanding, it’s unclear why one should have to have this compromise in place with no alternative (e.g., a lossless-compressed 14-bit raw, or perhaps a 10 bit delta value instead of 7 bits).

from store.sony.com
from store.sony.com

Sony claims “14-bit RAW recording”:

Full Frame 36.4MP resolution with 14-bit RAW recording.

Readers can decide for themselves whether a file stored as lossy-compressed 11-base + 7-bit offset is “14-bit RAW recording”. By comparison, Nikon offers uncompressed or lossless compressed 14-bit raw.

The use of 11+7-bit lossy compression in the context of damaging shutter vibration along with a convoluted design usability (menus) along with the absence of a Nikon/Canon style professional network tell us something about the state of photography understanding at Sony in terms of the professional market. There is surely room for improvement on all counts and at least the first three are not exactly difficult challenges to address.

MacPerformanceGuide.com

diglloyd Inc. | FTC Disclosure | PRIVACY POLICY | Trademarks | Terms of Use
Contact | About Lloyd Chambers | Consulting | Photo Tours
RSS Feeds | Twitter
Copyright © 2008-2016 diglloyd Inc, all rights reserved.