import math
import os
+import PyOpenColorIO as ocio
+
import aces_ocio.generate_lut as genlut
from aces_ocio.utilities import ColorSpace, mat44_from_mat33, sanitize
name = '%s (EI%s) - %s' % (transfer_function, exposure_index, gamut)
if transfer_function == '':
- name = 'Linear - %s' % gamut
+ name = 'Linear - ARRI %s' % gamut
if gamut == '':
name = '%s (EI%s)' % (transfer_function, exposure_index)
cs.description = name
cs.aliases = aliases
cs.equality_group = ''
- cs.family = 'ARRI'
+ cs.family = 'Input/ARRI'
cs.is_data = False
+ # A linear space needs allocation variables
+ if transfer_function == '':
+ cs.allocation_type = ocio.Constants.ALLOCATION_LG2
+ cs.allocation_vars = [-8, 5, 0.00390625]
+
# Globals.
IDT_maker_version = '0.08'
'e': e,
'f': f}
- def log_c_to_linear(code_value, exposure_index):
+ def normalized_log_c_to_linear(code_value, exposure_index):
p = log_c_inverse_parameters_for_EI(exposure_index)
breakpoint = p['e'] * p['cut'] + p['f']
if code_value > breakpoint:
- linear = ((pow(10, (code_value / 1023 - p['d']) / p['c']) -
+ linear = ((pow(10, (code_value - p['d']) / p['c']) -
p['b']) / p['a'])
else:
- linear = (code_value / 1023 - p['f']) / p['e']
+ linear = (code_value - p['f']) / p['e']
return linear
cs.to_reference_transforms = []
if transfer_function == 'V3 LogC':
data = array.array('f', '\0' * lut_resolution_1d * 4)
for c in range(lut_resolution_1d):
- data[c] = log_c_to_linear(1023 * c / (lut_resolution_1d - 1),
- int(exposure_index))
+ data[c] = normalized_log_c_to_linear(c / (lut_resolution_1d - 1),
+ int(exposure_index))
lut = '%s_to_linear.spi1d' % (
'%s_%s' % (transfer_function, exposure_index))