FUJIFILM F-Gamut C / F-Log2 C

Fig. 1: FUJIFILM F-Gamut C / F-Log2 C — CIE 1931 xy.
Fig. 2: FUJIFILM F-Gamut C / F-Log2 C encoding curve, L = 0.18 × 2^stops.
xy
Red0.73470.2653
Green0.02630.9737
Blue0.1173-0.0224
White (D65)0.31270.3290

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

Transfer function

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

Encoding: convertFromLinear

vec4 convertFromLinear(vec4 val, int clip)
{

const float a = 5.555556;
const float b = 0.064829;
const float c = 0.245281;
const float d = 0.384316;
const float e = 8.799461;
const float f = 0.092864;

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

    return vec4(val.rgb, val.a);
}

Decoding: convertToLinear

vec4 convertToLinear(vec4 val)
{
const float a = 5.555556;
const float b = 0.064829;
const float c = 0.245281;
const float d = 0.384316;
const float e = 8.799461;
const float f = 0.092864;

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

    return vec4(val.rgb, val.a);
}

RGB → XYZ matrix

RGB → XYZ
[ 0.789274967789 0.020040229880 0.141140729383 ]
[ 0.285007008241 0.741945697114 -0.026952705355 ]
[ 0.000000000000 0.000000000000 1.089057750760 ]

Use this space Gamut compare ↗ Transfer compare ↗

Sources

  1. FUJIFILM: F-Log2 C Data Sheet Ver.1.0 (PDF)