mRaw and sRaw are Raw, but...

My friend Iliah Borg sent me a message about the D850 medium and small mode raw files and how he thinks they’re created. I have to admit, I hadn’t yet gotten around to looking at anything other than full size images. After all, I’ve got my hands full trying to figure out some basic things about the D850.

My apologies to Nikon. I was wrong when I wrote on launch that they were still using the old “near JPEG” style of smaller raw images pioneered by Canon. It’s clear that Nikon is now doing something different, but it’s also clear that something isn’t quite as we expected.

Visually, the smaller raw sizes just don’t look like they have the “right” acuity. At the pixel peeping level there’s a roughness to them I wasn’t expecting. 

So here’s what seems to happen in the D850: the camera is doing a double re-sampling. And using more pixels than the large size uses! This actually may be the source of the 45.7mp number (45,749,760 is the actual calculation of the total pixels generated initially).

Normally when you shoot at NEF (RAW) Large you get 8256 x 5504 pixel images. When you shoot in NEF though, the camera actually generates 8288 x 5520 pixels. Interesting. 

Okay, so what happens with those 45.7mp pixels when you shoot smaller NEF (RAW) sizes?

A double resampling, that’s what. 8288 x 5520 appears to be resampled to get 7104 x 4728 data, then resampled again to get 6192 x 4128 pixels for NEF (RAW) Medium. For Small, 8288 x 5520 becomes 6216 x 4136 then 4128 x 2752 on the second resample. So we get a 1.15x division followed by a 1.15x division (though the rounding is different for each, so they’re not perfectly equal). This results in a 1.32 reduction in file size: 41.5MB > 30MB > 21.9MB. 

This leads me to something I hadn’t caught before: if you choose Medium and Small for raw images, you will be switched to 12-bit Lossless Compressed; you have no choice of bit depth or compression. 

Quite obviously, someone has discovered an interesting mathematical formula you can apply to data that can get you something akin to new 12-bit Bayer data at a different size. What that is I can’t yet find a patent or description for. 

The strange thing is that the data generated is back in Bayer form, not the double reduction. It’s not clear to me yet if it stayed Bayer all the time (doubtful), or that it was demosaiced into intermediary pixels, then remosaiced back to Bayer in the final pass. There’s some strange resampling routines going on in the camera I haven’t seen or heard of before.

But it also explains why the first time I looked closely at a NEF (RAW) Medium image it seemed just a bit odd to me. Edge acuity changed in some way I can’t yet describe. It just looks a bit fuzzier than I’d expect. I also haven’t yet managed to do enough testing to determine whether white balance coefficients are used at any step in the process.  

I’m sure Iliah is doing more testing. As will I. This is a very interesting discovery, and something we haven’t seem before from anyone else.

Now, the question is whether you’d rather have a 25.6mp 12-bit lossless compressed image that’s 30MB in size or a 45.4mp 12-bit compressed image that’s 34.2MB in size. First approximation: the latter, especially since your buffer just got cut in half. But I need to do much more testing...

text and images © 2018 Thom Hogan
portions Copyright 1999-2017 Thom Hogan-- All Rights Reserved
Follow us on Twitter: @bythom, hashtags #bythom, #dslrbodies