Added support for the RED DRAGONcolor2 and REDcolor4 as well as support for convertin...
authorHaarm-Pieter Duiker <hpd1@duikerresearch.com>
Tue, 13 Jan 2015 17:39:25 +0000 (09:39 -0800)
committerHaarm-Pieter Duiker <hpd1@duikerresearch.com>
Tue, 13 Jan 2015 17:39:25 +0000 (09:39 -0800)
aces_1.0.0/config.ocio
aces_1.0.0/nuke_config.ocio
aces_1.0.0/python/create_aces_config.py

index 96e557b..5c6768c 100644 (file)
@@ -184,6 +184,21 @@ colorspaces:
         - !<MatrixTransform> {matrix: [0.532279, 0.376648, 0.091073, 0, 0.046344, 0.974513, -0.02086, 0, -0.053976, -0.00032, 1.05427, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: REDlogFilm - DRAGONcolor2
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      REDlogFilm - DRAGONcolor2
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<GroupTransform>
+      children:
+        - !<FileTransform> {src: CineonLog_to_linear.spi1d, interpolation: linear}
+        - !<MatrixTransform> {matrix: [0.468452, 0.331484, 0.200064, 0, 0.040787, 0.857658, 0.101553, 0, -0.047504, -0.000282, 1.04776, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: REDlogFilm - REDcolor2
     family: RED
     equalitygroup: ""
@@ -214,6 +229,21 @@ colorspaces:
         - !<MatrixTransform> {matrix: [0.512136, 0.36037, 0.127494, 0, 0.070377, 0.903884, 0.025737, 0, -0.020824, 0.017671, 1.00312, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: REDlogFilm - REDcolor4
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      REDlogFilm - REDcolor4
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<GroupTransform>
+      children:
+        - !<FileTransform> {src: CineonLog_to_linear.spi1d, interpolation: linear}
+        - !<MatrixTransform> {matrix: [0.474202, 0.333677, 0.192121, 0, 0.065164, 0.836932, 0.097901, 0, -0.019281, 0.016362, 1.00289, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: REDlogFilm
     family: RED
     equalitygroup: ""
@@ -238,6 +268,18 @@ colorspaces:
     to_reference: !<MatrixTransform> {matrix: [0.532279, 0.376648, 0.091073, 0, 0.046344, 0.974513, -0.02086, 0, -0.053976, -0.00032, 1.05427, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: Linear - DRAGONcolor2
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      Linear - DRAGONcolor2
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<MatrixTransform> {matrix: [0.468452, 0.331484, 0.200064, 0, 0.040787, 0.857658, 0.101553, 0, -0.047504, -0.000282, 1.04776, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: Linear - REDcolor2
     family: RED
     equalitygroup: ""
@@ -262,6 +304,18 @@ colorspaces:
     to_reference: !<MatrixTransform> {matrix: [0.512136, 0.36037, 0.127494, 0, 0.070377, 0.903884, 0.025737, 0, -0.020824, 0.017671, 1.00312, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: Linear - REDcolor4
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      Linear - REDcolor4
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<MatrixTransform> {matrix: [0.474202, 0.333677, 0.192121, 0, 0.065164, 0.836932, 0.097901, 0, -0.019281, 0.016362, 1.00289, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: Canon-Log - Rec. 709 Daylight
     family: Canon
     equalitygroup: ""
@@ -1224,3 +1278,63 @@ colorspaces:
     allocation: uniform
     allocationvars: [0, 1]
     to_reference: !<MatrixTransform> {matrix: [0.695452, 0.140679, 0.163869, 0, 0.0447946, 0.859671, 0.0955343, 0, -0.00552588, 0.00402521, 1.0015, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - P3-D60
+    family: Utility
+    equalitygroup: Linear - P3-D60
+    bitdepth: 32f
+    description: |
+      The Linear - P3-D60 color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [2.40274, -0.897484, -0.388053, 0, -0.83258, 1.76923, 0.0237127, 0, 0.0388234, -0.0824997, 1.03637, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - P3-DCI
+    family: Utility
+    equalitygroup: Linear - P3-DCI
+    bitdepth: 32f
+    description: |
+      The Linear - P3-DCI color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [2.72539, -1.018, -0.440163, 0, -0.795168, 1.68973, 0.0226472, 0, 0.0412419, -0.087639, 1.10093, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - Rec.709
+    family: Utility
+    equalitygroup: Linear - Rec.709
+    bitdepth: 32f
+    description: |
+      The Linear - Rec.709 color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [3.24097, -1.53738, -0.498611, 0, -0.969244, 1.87597, 0.0415551, 0, 0.0556301, -0.203977, 1.05697, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - Rec.2020
+    family: Utility
+    equalitygroup: Linear - Rec.2020
+    bitdepth: 32f
+    description: |
+      The Linear - Rec.2020 color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [1.71665, -0.355671, -0.253366, 0, -0.666684, 1.61648, 0.0157685, 0, 0.0176399, -0.0427706, 0.942103, 0, 0, 0, 0, 1]}
index bf59024..cdcc3f9 100644 (file)
@@ -160,6 +160,21 @@ colorspaces:
         - !<MatrixTransform> {matrix: [0.532279, 0.376648, 0.091073, 0, 0.046344, 0.974513, -0.02086, 0, -0.053976, -0.00032, 1.05427, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: REDlogFilm - DRAGONcolor2
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      REDlogFilm - DRAGONcolor2
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<GroupTransform>
+      children:
+        - !<FileTransform> {src: CineonLog_to_linear.spi1d, interpolation: linear}
+        - !<MatrixTransform> {matrix: [0.468452, 0.331484, 0.200064, 0, 0.040787, 0.857658, 0.101553, 0, -0.047504, -0.000282, 1.04776, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: REDlogFilm - REDcolor2
     family: RED
     equalitygroup: ""
@@ -190,6 +205,21 @@ colorspaces:
         - !<MatrixTransform> {matrix: [0.512136, 0.36037, 0.127494, 0, 0.070377, 0.903884, 0.025737, 0, -0.020824, 0.017671, 1.00312, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: REDlogFilm - REDcolor4
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      REDlogFilm - REDcolor4
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<GroupTransform>
+      children:
+        - !<FileTransform> {src: CineonLog_to_linear.spi1d, interpolation: linear}
+        - !<MatrixTransform> {matrix: [0.474202, 0.333677, 0.192121, 0, 0.065164, 0.836932, 0.097901, 0, -0.019281, 0.016362, 1.00289, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: REDlogFilm
     family: RED
     equalitygroup: ""
@@ -214,6 +244,18 @@ colorspaces:
     to_reference: !<MatrixTransform> {matrix: [0.532279, 0.376648, 0.091073, 0, 0.046344, 0.974513, -0.02086, 0, -0.053976, -0.00032, 1.05427, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: Linear - DRAGONcolor2
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      Linear - DRAGONcolor2
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<MatrixTransform> {matrix: [0.468452, 0.331484, 0.200064, 0, 0.040787, 0.857658, 0.101553, 0, -0.047504, -0.000282, 1.04776, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: Linear - REDcolor2
     family: RED
     equalitygroup: ""
@@ -238,6 +280,18 @@ colorspaces:
     to_reference: !<MatrixTransform> {matrix: [0.512136, 0.36037, 0.127494, 0, 0.070377, 0.903884, 0.025737, 0, -0.020824, 0.017671, 1.00312, 0, 0, 0, 0, 1]}
 
   - !<ColorSpace>
+    name: Linear - REDcolor4
+    family: RED
+    equalitygroup: ""
+    bitdepth: 32f
+    description: |
+      Linear - REDcolor4
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    to_reference: !<MatrixTransform> {matrix: [0.474202, 0.333677, 0.192121, 0, 0.065164, 0.836932, 0.097901, 0, -0.019281, 0.016362, 1.00289, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
     name: Canon-Log - Rec. 709 Daylight
     family: Canon
     equalitygroup: ""
@@ -1200,3 +1254,63 @@ colorspaces:
     allocation: uniform
     allocationvars: [0, 1]
     to_reference: !<MatrixTransform> {matrix: [0.695452, 0.140679, 0.163869, 0, 0.0447946, 0.859671, 0.0955343, 0, -0.00552588, 0.00402521, 1.0015, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - P3-D60
+    family: Utility
+    equalitygroup: Linear - P3-D60
+    bitdepth: 32f
+    description: |
+      The Linear - P3-D60 color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [2.40274, -0.897484, -0.388053, 0, -0.83258, 1.76923, 0.0237127, 0, 0.0388234, -0.0824997, 1.03637, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - P3-DCI
+    family: Utility
+    equalitygroup: Linear - P3-DCI
+    bitdepth: 32f
+    description: |
+      The Linear - P3-DCI color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [2.72539, -1.018, -0.440163, 0, -0.795168, 1.68973, 0.0226472, 0, 0.0412419, -0.087639, 1.10093, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - Rec.709
+    family: Utility
+    equalitygroup: Linear - Rec.709
+    bitdepth: 32f
+    description: |
+      The Linear - Rec.709 color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [3.24097, -1.53738, -0.498611, 0, -0.969244, 1.87597, 0.0415551, 0, 0.0556301, -0.203977, 1.05697, 0, 0, 0, 0, 1]}
+
+  - !<ColorSpace>
+    name: Linear - Rec.2020
+    family: Utility
+    equalitygroup: Linear - Rec.2020
+    bitdepth: 32f
+    description: |
+      The Linear - Rec.2020 color space
+    isdata: false
+    allocation: uniform
+    allocationvars: [0, 1]
+    from_reference: !<GroupTransform>
+      children:
+        - !<MatrixTransform> {matrix: [0.952552, 0, 9.36786e-05, 0, 0.343966, 0.728166, -0.0721325, 0, 0, 0, 1.00883, 0, 0, 0, 0, 1]}
+        - !<MatrixTransform> {matrix: [1.71665, -0.355671, -0.253366, 0, -0.666684, 1.61648, 0.0157685, 0, 0.0176399, -0.0427706, 0.942103, 0, 0, 0, 0, 1]}
index 29e3f8d..88701f0 100755 (executable)
@@ -905,17 +905,17 @@ def generateLUTs(odtInfo, lmtInfo, shaperName, acesCTLReleaseDir, lutDir, lutRes
         if gamut == 'DRAGONcolor':
             cs.toReferenceTransforms.append( {
                 'type':'matrix',
-                'matrix':mat44FromMat33([0.532279, 0.376648, 0.091073, 
-                                        0.046344, 0.974513, -0.020860, 
+                'matrix':mat44FromMat33([0.532279,  0.376648,  0.091073, 
+                                         0.046344,  0.974513, -0.020860, 
                                         -0.053976, -0.000320, 1.054267]),
                 'direction':'forward'
             })
-        elif gamut == 'REDcolor3':
+        elif gamut == 'DRAGONcolor2':
             cs.toReferenceTransforms.append( {
                 'type':'matrix',
-                'matrix':mat44FromMat33([0.512136, 0.360370, 0.127494, 
-                                        0.070377, 0.903884, 0.025737
-                                        -0.020824, 0.017671, 1.003123]),
+                'matrix':mat44FromMat33([0.468452,  0.331484,  0.200064, 
+                                         0.040787,  0.857658,  0.101553
+                                        -0.047504, -0.000282, 1.047756]),
                 'direction':'forward'
             })
         elif gamut == 'REDcolor2':
@@ -926,6 +926,22 @@ def generateLUTs(odtInfo, lmtInfo, shaperName, acesCTLReleaseDir, lutDir, lutRes
                                         -0.105257, 0.025320, 1.079907]),
                 'direction':'forward'
             })
+        elif gamut == 'REDcolor3':
+            cs.toReferenceTransforms.append( {
+                'type':'matrix',
+                'matrix':mat44FromMat33([0.512136, 0.360370, 0.127494, 
+                                         0.070377, 0.903884, 0.025737, 
+                                        -0.020824, 0.017671, 1.003123]),
+                'direction':'forward'
+            })
+        elif gamut == 'REDcolor4':
+            cs.toReferenceTransforms.append( {
+                'type':'matrix',
+                'matrix':mat44FromMat33([0.474202, 0.333677, 0.192121, 
+                                         0.065164, 0.836932, 0.097901, 
+                                        -0.019281, 0.016362, 1.002889]),
+                'direction':'forward'
+            })
 
         cs.fromReferenceTransforms = []
         return cs
@@ -934,12 +950,18 @@ def generateLUTs(odtInfo, lmtInfo, shaperName, acesCTLReleaseDir, lutDir, lutRes
     REDlogFilmDRAGON = createREDlogFilm("DRAGONcolor", "REDlogFilm", name="REDlogFilm")
     configData['colorSpaces'].append(REDlogFilmDRAGON)
 
+    REDlogFilmDRAGON2 = createREDlogFilm("DRAGONcolor2", "REDlogFilm", name="REDlogFilm")
+    configData['colorSpaces'].append(REDlogFilmDRAGON2)
+
     REDlogFilmREDcolor2 = createREDlogFilm("REDcolor2", "REDlogFilm", name="REDlogFilm")
     configData['colorSpaces'].append(REDlogFilmREDcolor2)
 
     REDlogFilmREDcolor3 = createREDlogFilm("REDcolor3", "REDlogFilm", name="REDlogFilm")
     configData['colorSpaces'].append(REDlogFilmREDcolor3)
 
+    REDlogFilmREDcolor4 = createREDlogFilm("REDcolor4", "REDlogFilm", name="REDlogFilm")
+    configData['colorSpaces'].append(REDlogFilmREDcolor4)
+
     # Linearization only
     REDlogFilmDRAGON = createREDlogFilm("", "REDlogFilm", name="REDlogFilm")
     configData['colorSpaces'].append(REDlogFilmDRAGON)
@@ -948,12 +970,18 @@ def generateLUTs(odtInfo, lmtInfo, shaperName, acesCTLReleaseDir, lutDir, lutRes
     REDlogFilmDRAGON = createREDlogFilm("DRAGONcolor", "", name="REDlogFilm")
     configData['colorSpaces'].append(REDlogFilmDRAGON)
 
+    REDlogFilmDRAGON2 = createREDlogFilm("DRAGONcolor2", "", name="REDlogFilm")
+    configData['colorSpaces'].append(REDlogFilmDRAGON2)
+
     REDlogFilmREDcolor2 = createREDlogFilm("REDcolor2", "", name="REDlogFilm")
     configData['colorSpaces'].append(REDlogFilmREDcolor2)
 
     REDlogFilmREDcolor3 = createREDlogFilm("REDcolor3", "", name="REDlogFilm")
     configData['colorSpaces'].append(REDlogFilmREDcolor3)
 
+    REDlogFilmREDcolor4 = createREDlogFilm("REDcolor4", "", name="REDlogFilm")
+    configData['colorSpaces'].append(REDlogFilmREDcolor4)
+
     #
     # Canon-Log to ACES
     #
@@ -1911,26 +1939,60 @@ def generateLUTs(odtInfo, lmtInfo, shaperName, acesCTLReleaseDir, lutDir, lutRes
 
         cs.toReferenceTransforms = []
         if toReferenceValues != []:
-            cs.toReferenceTransforms.append( {
-                'type':'matrix',
-                'matrix':mat44FromMat33(toReferenceValues),
-                'direction':'forward'
-            })
+            for matrix in toReferenceValues:
+                cs.toReferenceTransforms.append( {
+                    'type':'matrix',
+                    'matrix':mat44FromMat33(matrix),
+                    'direction':'forward'
+                })
 
         cs.fromReferenceTransforms = []
         if fromReferenceValues != []:
-            cs.fromReferenceTransforms.append( {
-                'type':'matrix',
-                'matrix':mat44FromMat33(fromReferenceValues),
-                'direction':'forward'
-            })
+            for matrix in fromReferenceValues:
+                cs.fromReferenceTransforms.append( {
+                    'type':'matrix',
+                    'matrix':mat44FromMat33(matrix),
+                    'direction':'forward'
+                })
 
         return cs
 
-    cs = createGenericMatrix('XYZ', fromReferenceValues=acesAP0toXYZ)
+    cs = createGenericMatrix('XYZ', fromReferenceValues=[acesAP0toXYZ])
     configData['colorSpaces'].append(cs)   
 
-    cs = createGenericMatrix('Linear - AP1', toReferenceValues=acesAP1toAP0)
+    cs = createGenericMatrix('Linear - AP1', toReferenceValues=[acesAP1toAP0])
+    configData['colorSpaces'].append(cs)   
+
+    # ACES to Linear, P3D60 primaries
+    xyzToP3D60 = [ 2.4027414142, -0.8974841639, -0.3880533700,
+                  -0.8325796487,  1.7692317536,  0.0237127115,
+                   0.0388233815, -0.0824996856,  1.0363685997]
+
+    cs = createGenericMatrix('Linear - P3-D60', fromReferenceValues=[acesAP0toXYZ, xyzToP3D60])
+    configData['colorSpaces'].append(cs)   
+
+    # ACES to Linear, P3D60 primaries
+    xyzToP3DCI = [ 2.7253940305, -1.0180030062, -0.4401631952,
+                  -0.7951680258,  1.6897320548,  0.0226471906,
+                   0.0412418914, -0.0876390192,  1.1009293786]
+
+    cs = createGenericMatrix('Linear - P3-DCI', fromReferenceValues=[acesAP0toXYZ, xyzToP3DCI])
+    configData['colorSpaces'].append(cs)   
+
+    # ACES to Linear, Rec 709 primaries
+    xyzToRec709 = [ 3.2409699419, -1.5373831776, -0.4986107603,
+                   -0.9692436363,  1.8759675015,  0.0415550574,
+                    0.0556300797, -0.2039769589,  1.0569715142]
+
+    cs = createGenericMatrix('Linear - Rec.709', fromReferenceValues=[acesAP0toXYZ, xyzToRec709])
+    configData['colorSpaces'].append(cs)   
+
+    # ACES to Linear, Rec 2020 primaries
+    xyzToRec2020 = [ 1.7166511880, -0.3556707838, -0.2533662814,
+                    -0.6666843518,  1.6164812366,  0.0157685458,
+                     0.0176398574, -0.0427706133,  0.9421031212]
+
+    cs = createGenericMatrix('Linear - Rec.2020', fromReferenceValues=[acesAP0toXYZ, xyzToRec2020])
     configData['colorSpaces'].append(cs)   
 
     print( "generateLUTs - end" )