X-Git-Url: http://users.mur.at/ms/git/gitweb/?a=blobdiff_plain;f=aces_1.0.0%2Fpython%2Faces_ocio%2Fcolorspaces%2Fsony.py;h=981b6875ffec343413fd740653f970f716118c98;hb=008ab628a49b703cd1141a39b7963947adce9e99;hp=50a4b41681fcfee995436072bb654acb324726b0;hpb=e567a3894cb97877de4bb60ab4d0a9cc98a11a83;p=OpenColorIO-Configs.git diff --git a/aces_1.0.0/python/aces_ocio/colorspaces/sony.py b/aces_1.0.0/python/aces_ocio/colorspaces/sony.py index 50a4b41..981b687 100644 --- a/aces_1.0.0/python/aces_ocio/colorspaces/sony.py +++ b/aces_1.0.0/python/aces_ocio/colorspaces/sony.py @@ -22,29 +22,37 @@ __maintainer__ = 'ACES Developers' __email__ = 'aces@oscars.org' __status__ = 'Production' -__all__ = ['create_S_Log', +__all__ = ['create_s_log', 'create_colorspaces'] -def create_S_Log(gamut, +def create_s_log(gamut, transfer_function, lut_directory, lut_resolution_1d, aliases): """ - Object description. - - SLog to ACES. + Creates colorspace covering the conversion from Sony spaces to ACES, with various + transfer functions and encoding gamuts covered Parameters ---------- - parameter : type - Parameter description. + gamut : str + The name of the encoding gamut to use. + transfer_function : str + The name of the transfer function to use + lut_directory : str or unicode + The directory to use when generating LUTs + lut_resolution_1d : int + The resolution of generated 1D LUTs + aliases : list of str + Aliases for this colorspace Returns ------- - type - Return value description. + ColorSpace + A ColorSpace container class referencing the LUTs, matrices and identifying + information for the requested colorspace. """ name = '%s - %s' % (transfer_function, gamut) @@ -65,7 +73,7 @@ def create_S_Log(gamut, transfer_function.replace('-', ''), gamut.replace('-', '').replace(' ', '_')) - # A linear space needs allocation variables + # A linear space needs allocation variables. if transfer_function == '': cs.allocation_type = ocio.Constants.ALLOCATION_LG2 cs.allocation_vars = [-8, 5, 0.00390625] @@ -220,19 +228,21 @@ def create_colorspaces(lut_directory, lut_resolution_1d): Parameters ---------- - parameter : type - Parameter description. + lut_directory : str or unicode + The directory to use when generating LUTs + lut_resolution_1d : int + The resolution of generated 1D LUTs Returns ------- - type - Return value description. + list + A list of colorspaces for Sony cameras and encodings """ colorspaces = [] # *S-Log1* - s_log1_s_gamut = create_S_Log( + s_log1_s_gamut = create_s_log( 'S-Gamut', 'S-Log1', lut_directory, @@ -241,7 +251,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): colorspaces.append(s_log1_s_gamut) # *S-Log2* - s_log2_s_gamut = create_S_Log( + s_log2_s_gamut = create_s_log( 'S-Gamut', 'S-Log2', lut_directory, @@ -249,7 +259,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['slog2_sgamut']) colorspaces.append(s_log2_s_gamut) - s_log2_s_gamut_daylight = create_S_Log( + s_log2_s_gamut_daylight = create_s_log( 'S-Gamut Daylight', 'S-Log2', lut_directory, @@ -257,7 +267,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['slog2_sgamutday']) colorspaces.append(s_log2_s_gamut_daylight) - s_log2_s_gamut_tungsten = create_S_Log( + s_log2_s_gamut_tungsten = create_s_log( 'S-Gamut Tungsten', 'S-Log2', lut_directory, @@ -266,7 +276,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): colorspaces.append(s_log2_s_gamut_tungsten) # *S-Log3* - s_log3_s_gamut3Cine = create_S_Log( + s_log3_s_gamut3Cine = create_s_log( 'S-Gamut3.Cine', 'S-Log3', lut_directory, @@ -274,7 +284,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['slog3_sgamutcine']) colorspaces.append(s_log3_s_gamut3Cine) - s_log3_s_gamut3 = create_S_Log( + s_log3_s_gamut3 = create_s_log( 'S-Gamut3', 'S-Log3', lut_directory, @@ -283,7 +293,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): colorspaces.append(s_log3_s_gamut3) # Linearization Only - s_log1 = create_S_Log( + s_log1 = create_s_log( '', 'S-Log1', lut_directory, @@ -291,7 +301,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['crv_slog1']) colorspaces.append(s_log1) - s_log2 = create_S_Log( + s_log2 = create_s_log( '', 'S-Log2', lut_directory, @@ -299,7 +309,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['crv_slog2']) colorspaces.append(s_log2) - s_log3 = create_S_Log( + s_log3 = create_s_log( '', 'S-Log3', lut_directory, @@ -308,7 +318,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): colorspaces.append(s_log3) # Primaries Only - s_gamut = create_S_Log( + s_gamut = create_s_log( 'S-Gamut', '', lut_directory, @@ -316,7 +326,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['lin_sgamut']) colorspaces.append(s_gamut) - s_gamut_daylight = create_S_Log( + s_gamut_daylight = create_s_log( 'S-Gamut Daylight', '', lut_directory, @@ -324,7 +334,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['lin_sgamutday']) colorspaces.append(s_gamut_daylight) - s_gamut_tungsten = create_S_Log( + s_gamut_tungsten = create_s_log( 'S-Gamut Tungsten', '', lut_directory, @@ -332,7 +342,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['lin_sgamuttung']) colorspaces.append(s_gamut_tungsten) - s_gamut3Cine = create_S_Log( + s_gamut3Cine = create_s_log( 'S-Gamut3.Cine', '', lut_directory, @@ -340,7 +350,7 @@ def create_colorspaces(lut_directory, lut_resolution_1d): ['lin_sgamut3cine']) colorspaces.append(s_gamut3Cine) - s_gamut3 = create_S_Log( + s_gamut3 = create_s_log( 'S-Gamut3', '', lut_directory,