After the recent thread here on sky banding and the occasional Sony banding/posterization reports in previous threads I decided to do a deeper dive into the technical aspects that relate to the issue.
The first issue is how Sony implements their vignetting correction, which they call "Shading Comp". It's been known for a while that Sony implements this correction on the actual raw data, rather than a simple metadata tag to tell post-processing software to apply corrections. What was also recently discovered is how Sony's current cameras (and/or newer firmware versions) apply a small amount of vignetting correction even when the option is turned off in the camera (link). The problem with Sony's method is that the correction is rather coarse and angular, revealing polygon-shapes at the boundaries of correction, and also color shifts/casts at those same boundaries that reveal themselves during PP, esp during shadow raising.
So the first step is to fully characterize and visualize what effect this correction has on the raw data, both in the shadows and midtones, and for both 14-bit uncompressed and 12-bit/compressed raws.
Below is an animated GIF that sequences through 4 photos. Each photo is of the same sheet of paper illuminated with an LED light, with only the camera settings changed for each. All were taken on an A7rIII + 28mm FE @ f/2.
Photo #1: Lens contacts taped, so that the camera can't recognize the lens attached
Photo #2: Camera Vignetting Correction Disabled
Photo #3: Camera Vignetting Correction Enabled
Photo #4: Same as Photo #3 but using Sony Compressed RAW instead of uncompressed used in Photos #1-#3
Here is the GIF. These were shot -6EV underexposed and raised 5EV in post. No other PP was performed. All are downsampled using PS Preserve Details 2.0:
Observations:
Note how #2 exhibits some measure of vignetting correction even when the correction is disabled on the camera
Note the green/magenta color casts for #3, which are introduced when enabling the camera's vignetting correction
Note how much worse the color casts and polygon shape boundaries become in #4 when using Sony's compressed raws
That last point is important because it's not just compressed raws that aggravate the vignetting correction but any camera setting which causes the camera to drop from 14-bit encoding to 12-bit. This occurs on the A7II/A7rII when for several scenarios, including continuous shooting, electronic shutter, bulb mode, LENR,e tc... On newer bodies like the A7rIII the drop to 12-bit occurs only for LENR and bulb shooting, or shooting continuous with compressed raws.
Finally, note how even #1 [no vignetting correction at all] exhibits some amount of visual banding. Due to a combination of optical vignetting at this large aperture and natural vignetting from cosine 4 law (excellent reference for both), there will be an inherent amount of light fall-off from the center to edge/corners of the frame. How noticeable this banding will be will depend on a combination of noise levels and post-processing.
Moving on, here's another set of 4 photos, same as above but this time exposed properly, and with heavy PP applied to the images:
Observations:
The effect of the vignetting correction is less obtrtusive on the higher tones, even with significant post-processing.
Next up is a demonstration of how the banding is made visually worse when downsampling. This is because the diffuse bands across the image get pulled closer together, and because the downsampled noise is less noticeable against the gradients, reducing the amount of dithering that would otherwise obscure the boundaries of the banding:
Lastly, here's something I discovered today in evaluating the files in Photoshop/Lightroom - when using Adobe's lens correction profiles, which includes vignetting correction, Adobe isn't detecting/aware that the Sony raw has had vignetting correction already applied, meaning two levels of correction are applied when you use Adobe's correction profiles. Here's a matrix of the camera lens vignetting correction and Adobe profile correction to demonstrate:
There's a lot more to this subject, including some deeper analysis of raw data and also implications of JPEG encoding, which I plan to post over the coming week. I'll also cover the built-in geometric correction profiles Sony embeds into their raws and which Adobe applies unconditionally.
I did not have 2.0 at the time so I could test difference before and after upgrade.
I took several images significantly underexposed on purpose while changing setting of Shading Comp.
Details: A7iii with 24-105 G OSS in RAW uncompressed in single shot drive and mechanical shutter. ISO 100, 68mm and 69mm, f/8, 1/50s. I have converted them using Adobe DNG tool to import them into my LR 5.7 (I don't have any newer). I pushed them to the max using exposure, shadows and vibrance sliders (+5 exposure, +100 shadows, +100 vibrance, no aberration correction).
Outcome is that there is a color noise/cast in deep shadows at ISO 100 in raws when Shading Comp. is turned on, there is none when turned off. Firmware 2.0 might have slightly increase the cast effect, but difference is not very big.
I know this is an old thread, but in case anyone searching finds it, I may know why there is shading correction applied in the first test even when it is turned off (and not applied when the contacts are taped). If those images were shot at a large aperture, the angle of light is severe and the sensor receives less light because of its design so light falloff is extreme. The camera firmware secretly adds ISO to compensate (without recording it as increased ISO) so that the exposure looks appropriately brighter as the user expects. The way to see it in action is exactly as you tested: shoot a shot at max aperture with the contacts taped and not taped. Light falloff seems to become an issue wider than f2.8, and that's around where the compensation begins, though it may vary by lens.
Why the secrecy? I suspect people would be unhappy to discover that the more expensive "fast" lens they bought to shoot in lower light isn't helping to shoot in lower light at all (though you do still get the DOF benefit).
Wow, nice find with the polygonal (#4) approximation. It does seem to be quite destructive in the sense that it is maybe hard to fix after the fact using software that doesn't take this shortcut. Seems like they are dividing the frame into 16 polygons?
On the other hand, I don't think this would be noticeable except that the banding is so severe with the 12-bit image. So in absolute error terms, it's a "pretty good" approximation, it just definitely shows up in cases like these.
Also, I think we should think that "fixing vignetting" always comes at the expense of dynamic range/noise. So a 14-bit sensor with a lens that exhibits 4 stops of vignette is really.... a 10-bit sensor.
mudnut wrote:
So for someone who mainly shoots JPEGs, is it better to turn in-camera shading compensation on or off?
Ideally off, and correct vignetting after the fact. If you have it on and aren't seeing an issue, I wouldn't worry about it. In certain kinds of light it can be obvious but otherwise only appears if the image is pushed.
I am just the most casual hobbyist who shoot JPEGs and spend as little time editing as possible. Though fairly rare, I will work with RAWs of images that I really like that need pushing. Nonetheless, I have not seen this banding issue in either format - with my style/skill level of shooting anyway, so I'll keep this option on. Thanks.
stateless_ wrote: mudnut wroteSo for someone who mainly shoots JPEGs, is it better to turn in-camera shading compensation on or off?Ideally off, and correct vignetting after the fact. If you have it on and aren't seeing an issue, I wouldn't worry about it. In certain kinds of light it can be obvious but otherwise only appears if the image is pushed.