Curious about how the Fuji X series camera actually stores in the RAW (RAF) file, and how Fuji's DR mode affects the RAW file, I decided to dig into the RAW file a bit to see what I could discover. My tests here were produced using my FujiFilm XE-1, but the results should be identical to the other Fuji X cameras including the X-Pro1, X100, and X100s. The measured values and histograms were produced using RawDigger.
Below is a composite of 16 histograms generated by RawDigger of a standard gray card exposed across 16 stops, from 1/4000' to 8', with 1/2' being the properly metered exposure:
A few notes about the chart:
- The values and histogram are from the green raw channel, with 255 subtracted out. In the RAW format, black starts at the value of 255. In this particular exposure sequence using shaded sunlight the Red and Blue channel lagged about a stop behind in the values shown here for the green channel.
- Clearly, the 8 second exposure is clipped against the RAW upper limit, values indicate clipping occurs about 1/3 of a stop above the 4' exposure.
- For each exposure I have noted the shutter speed followed by the average green value from RawDigger, the tick mark lines up with where that average actually falls on the logarithmic scale.
- I have noted where the JPG (OOC) went completely to black (RGB Black) and white (RGB White), and the properly metered exposure (METERED 0 EV).
- I am using whole stop increments, so don't get too hung up where exactly the RGB clipping is occurring. Pure white occurs somewhere within one stop below the point for which I have labeled "RGB White". Within one stop above the point I have labeled for black.
- The "knee" that occurs on the left side of the graph is not caused by an applied curve, but rather, the fact that more and more pixels are clipping to 0 with each diminished stop of light, causing the average to diminish at a decelerating rate (as there are no negative values to work with).
An important observation here is that even though stops of light are logarithmic (one stop is a doubling of light) the CMOS sensor measure light in a linear fashion and the RAW file records those values in a linear value scale. The effect is that tones in the upper-most stop of light can be described by nearly 1500 different variations, whereas tones in the lowest measured stop of light can only be described by two possible values - on or off. Because there are so many variations in the upper stops of light they can be described as "creamy" with smooth transitions from one color to another, whereas colors deep in the shadows with few variations can be describe as "crunchy."
To validate the test I shot a sequence at ISO 800 as well (with aperture closed down two stops to compensate):
As expected, numerically it's just about the same as the ISO 200 sequence. The ISO gain is being applied before the RAW file is written and the metered center gray stays at the same point in the scale. There is some noise at the extreme lower end which is causing some confusion around the averaging of green values, oddly 1/4000 actually has a higher average than 1/2000. (Also note that I missing a value for the 1/250 exposure, I inadvertently missed taking that particular shot).
Dynamic Range (DR) Mode
But what about DR mode? This is where things get a bit interesting, same exposure sequence as above, only now the DR 400 is activated. Note the two stop downward shift in the meter's 0EV point, from a value of 400 to a value of 100…
The camera is metering the scene at the selected ISO, but then at the time of exposure shifting ISO down two stops, purposely underexposing the scene. In DR mode, even the 8 second exposure is well below the white clipping, I didn't make a 16 second exposure, but it looks that even that would have been below the RAW clipping point as well. The JPG engine / RAW converter then pushes the exposure back up two stops while also applying an aggressive "recovery" to the one or two stops of extra bright tones. (DR 200 acts similarly, but underexposes by one stop and then pushes in post by one stop)
To further test DR's affect on RAW I shot a test sequence using my (freshly washed and waxed!) motorcycle. Here it is properly exposed at ISO 200, 1/1000, f/2:
The RAW green channel histogram looks like this:
As would be expected, each increase in ISO without compensation by aperture or shutter slides the histogram values upward, overexposing the image….
But, activating DR 200 effectively underexposes the RAW by one stop, and DR 400 by two stops. If the shutter speed and aperture are kept the same, an ISO 200 DR 100 RAW is exposed identically to an ISO 400 DR 200 RAW, which in turn is exposed identical to an ISO 800 DR 400 RAW. Rather than a stepped overexposure as would be expected in these scenarios, the RAW reveals identical exposures:
Then, in JPG development / RAW conversion the results are pushed back up a stop or two (DR 200 and DR 400 respectively) to effect the ISO equivalent the exposure was metered at, and the bright tones are "recovered" by the same amount. (In my example above, since there was no aperture/shutter compensation when ISO was increased, the DR 200 shot would now appear one stop overexposed, and the DR 400 would appear two stops overexposed, even though they are identical in RAW format.)
This process would be the same as a photographer purposely underexposing by two stops, using the Exposure slider in Lightroom or Aperture to add back two stops of exposure, then using the "Recovery" slider to compress the brights back down into the final image.
DR mode is about mitigating highlights while sacrificing exposure of mid-tones and shadows. The tradeoff is that mid-tones are shifted further down in the histogram and have fewer tones to describe each stop of light: Zone V now has only 50 shades of differential, as opposed to 200 shades in a non-DR exposure. And dark details will be even crunchier, with far fewer tones. Recovering an underexposed DR mode image would produce a far crunchier result than recovering an underexposed non-DR image.
OK, one last comparison. My first motorcycle image was shot at ISO 200, DR 100, 1/1000s, f/2. Here's the same scene shot at ISO 800, DR 400, 1/4000s, f/2. Mid-tones are identical, but now now the blue sky is reflected in the rear fender, rather than clipped whites. And there is texture in the bright spots of concrete below the bike. That's the result of the DR mode's recovery of highlights:
Here are the signatures of the two RAW files for the first and second motorcycle example, images who's mid-tone values are nearly identical in the JPG, but separated by two stops in the RAW file:
(Interesting to note, that even though the exposure in the second example has two full stops of headroom due to DR mode, there is still a tiny amount of white clipping.)
I definitely welcome feedback on the tests I have done here, so please do share comments and suggestions on this topic.
By Adriel Henderson
You may also be interested in my other topics on the Fuji X-E1: