linear = (pow(10.0, ((code_value - 420.0) / 261.5)) *
(0.18 + 0.01) - 0.01)
else:
linear = (code_value - 95.0) * 0.01125000 / (171.2102946929 - 95.0)
linear = (pow(10.0, ((code_value - 420.0) / 261.5)) *
(0.18 + 0.01) - 0.01)
else:
linear = (code_value - 95.0) * 0.01125000 / (171.2102946929 - 95.0)
cs.to_reference_transforms.append({
'type': 'lutFile',
'path': lut,
'interpolation': 'linear',
cs.to_reference_transforms.append({
'type': 'lutFile',
'path': lut,
'interpolation': 'linear',
elif transfer_function == 'S-Log2':
data = array.array('f', '\0' * lut_resolution_1d * 4)
for c in range(lut_resolution_1d):
elif transfer_function == 'S-Log2':
data = array.array('f', '\0' * lut_resolution_1d * 4)
for c in range(lut_resolution_1d):
cs.to_reference_transforms.append({
'type': 'lutFile',
'path': lut,
'interpolation': 'linear',
cs.to_reference_transforms.append({
'type': 'lutFile',
'path': lut,
'interpolation': 'linear',
elif transfer_function == 'S-Log3':
data = array.array('f', '\0' * lut_resolution_1d * 4)
for c in range(lut_resolution_1d):
elif transfer_function == 'S-Log3':
data = array.array('f', '\0' * lut_resolution_1d * 4)
for c in range(lut_resolution_1d):
cs.to_reference_transforms.append({
'type': 'lutFile',
'path': lut,
'interpolation': 'linear',
cs.to_reference_transforms.append({
'type': 'lutFile',
'path': lut,
'interpolation': 'linear',