FUJIFILM F-Gamut / F-Log

Fig. 1: FUJIFILM F-Gamut / F-Log — CIE 1931 xy.
Fig. 2: FUJIFILM F-Gamut / F-Log encoding curve, L = 0.18 × 2^stops.
xy
Red0.70800.2920
Green0.17000.7970
Blue0.13100.0460
White (D65)0.31270.3290

F-Gamut primaries are identical to ITU-R BT.2020.

Transfer function

CurveFujifilm-F-log
Black / white point (10-bit code values)0 / 1023
Linear 0 → code0.0929
18% grey → code0.4593
Linear 1.0 → code0.7050

Encoding: convertFromLinear

vec4 convertFromLinear(vec4 val, int clip)
{
const float a = 0.555556;
const float b = 0.009468;
const float c = 0.344676;
const float d = 0.790453;
const float e = 8.735631;
const float f = 0.092864;
const float t = (0.097813 - f) / e;

val.r = val.r > t ? c*log(a*val.r+b)/log(10.0)+d : e*val.r+f;
val.g = val.g > t ? c*log(a*val.g+b)/log(10.0)+d : e*val.g+f;
val.b = val.b > t ? c*log(a*val.b+b)/log(10.0)+d : e*val.b+f;

return val;
}

Decoding: convertToLinear

vec4 convertToLinear(vec4 val)
{
const float a = 0.555556;
const float b = 0.009468;
const float c = 0.344676;
const float d = 0.790453;
const float e = 8.735631;
const float f = 0.092864;
const float t = 0.097813;

val.r = val.r > t ? (pow(10.0,((val.r - d) / c)) - b) / a :  (val.r - f) / e ;
val.g = val.g > t ? (pow(10.0,((val.g - d) / c)) - b) / a :  (val.g - f) / e ;
val.b = val.b > t ? (pow(10.0,((val.b - d) / c)) - b) / a :  (val.b - f) / e ;

return val;
}

RGB → XYZ matrix

RGB → XYZ
[ 0.636958048301 0.144616903586 0.168880975164 ]
[ 0.262700212011 0.677998071519 0.059301716470 ]
[ 0.000000000000 0.028072693049 1.060985057711 ]

Use this space Gamut compare ↗ Transfer compare ↗

Sources

  1. FUJIFILM: F-Log Data Sheet Ver.1.2 (PDF)