22// <ACESuserName>ACES 1.3 Look - Gamut Compress</ACESuserName>
33
44//
5- // "LMT" for compressing out of gamut scene-referred values into AP1.
6- //
7- // Input and output are ACES2065-1 .
5+ // Gamut compression algorithm to bring out-of-gamut scene-referred values into AP1
86//
97
8+ //
9+ // Usage:
10+ // This transform is intended to be applied to AP0 data, immediately after the IDT, so
11+ // that all grading or compositing operations are downstream of the compression, and
12+ // therefore work only with positive AP1 values.
13+ //
14+ // Note:
15+ // It is not recommended to bake the compression into VFX pulls, as it may be beneficial
16+ // for compositors to have access to the unmodified image data.
1017//
1118// Direction:
12- // By default this transform operates in the forward direction (compressing the gamut).
13- // If instead an inverse operation is needed (undoing a prior gamut compression), there
14- // is a runtime flag to do this. In ctlrender, this can be achieved by appending
15- // '-param1 invert 1' after the '-ctl gamut_compress.ctl' string.
19+ // By default this transform operates in the forward direction, i.e. compressing the
20+ // gamut. If instead an inverse operation is needed, i.e. undoing a prior gamut
21+ // compression, there is a runtime flag available. In ctlrender, this can be achieved by
22+ // appending '-param1 invert 1' after the '-ctl gamut_compress.ctl' string.
23+ //
24+ // Input and output: ACES2065-1
1625//
1726
1827
@@ -23,16 +32,19 @@ import "ACESlib.Transform_Common";
2332
2433/* --- Gamut Compress Parameters --- */
2534// Distance from achromatic which will be compressed to the gamut boundary
35+ // Values calculated to encompass the encoding gamuts of common digital cinema cameras
2636const float LIM_CYAN = 1.147 ;
2737const float LIM_MAGENTA = 1.264 ;
2838const float LIM_YELLOW = 1.312 ;
2939
3040// Percentage of the core gamut to protect
41+ // Values calculated to protect all the colors of the ColorChecker Classic 24 as given by
42+ // ISO 17321 -1 and Ohta (1997 )
3143const float THR_CYAN = 0.815 ;
3244const float THR_MAGENTA = 0.803 ;
3345const float THR_YELLOW = 0.880 ;
3446
35- // Agressiveness of the compression curve
47+ // Aggressiveness of the compression curve
3648const float PWR = 1.2 ;
3749
3850
0 commit comments