Those 14 bits (part 2)

Started Jan 19, 2014 | Discussions thread
Flat view
Horshack Veteran Member • Posts: 8,680
Those 14 bits (part 2)

Continuing from Part 1.

The original thread had a good discussion about the technical details of Sony's tonal compression, which Iliah provided (here here here and Source Code Example). Some people have reported artifacts in their A7/A7r images and would like to know if those artifacts are caused by Sony's compression - either from the 11-bit encoding of each 14-bit raw channel or from Sony's lossy tonal compression that Iliah discussed. Of the two, the latter seems more significant in terms of potential effects on IQ, so I'd like to focus on that initially.

Per Iliah's discussion and source example, the tonal compression is dynamic, creating coarser tonal representation when 16x2 blocks of adjacent pixels have large jumps in tonal values. The tonal representation becomes coarse in tiers, based on the maximum difference between the lowest and highest tonal values of a 16x2 block of pixels - those tiers are 128 (lossless), 256, 512, and 1024, in raw units, with the worst being 1024.

To help correlate the coarse representation of lossy tonal tiers with any observed image artifacts, I have written a program that uses Iliah's LibRaw libary which will create a PNG image overlay describing all pixels whose tonal representation is "coarse" ...I've set that threshold initially to the worst tier (1024), since that has the highest probability of impacting perceived IQ. This PNG overlay can then be used to visually correlate the artifact areas (or more precisely in Photoshop as a layer or layer mask), to quickly associate any perceived artifacts with the compression.

Here's an example, using this raw from Imaging Resource. First the raw converted to JPEG in CS6:

And the PNG overlay my utility created to map out the pixels using the coarsest representation in Sony's tonal compression:

The overlay may be off by a few pixels because the LibRaw-processed raw has slightly different dimensions than that produced by CS6 (LibRaw 7368x4920 vs CS6 7360x4912)...I need to check if these are just extra pixels on the right/bottom (which would mean the common pixels are aligned) or if they're instead on the left/top (meaning there would be shift). Either way they're close enough for the purpose of this exercise, as can seen if you overlay the above PNG with the JPEG.

Right now my utility is hacked into an app and PHP script so it's not in a deliverable form. In the meantime, if anyone has a raw image with artifacts that they would like others to examine against an overlay, please post the link to your raw in this thread and I'll generate the overlay and post it back to the thread. You can use to generate a downloadable link to your raw (no account registration required).

Sony a7
If you believe there are incorrect tags, please send us this post using our feedback form.
Flat view
Post (hide subjects) Posted by
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow