Commit 79e7b7b
* Adsk Contrib - Issues #1968 (mirrored builtins) and #1992 (LUT-free builtins Pt.1)
For issue #1992 - "Make LUT-free implementations of certain built-in transforms"
- Adding fixed-functions PQ_TO_LINEAR and LINEAR_TO_PQ. These will be used to handle following built-in transforms if the LUT support is turned off:
-- CURVE - ST-2084_to_LINEAR
-- CURVE - LINEAR_to_ST-2084
-- DISPLAY - CIE-XYZ-D65_to_REC.2100-PQ
-- DISPLAY - CIE-XYZ-D65_to_ST2084-P3-D65
- Implemented CPU renderers for scalar, SSE2 (with fastPower) and SSE2 (with Intel SVML) intrinsics targets for the new fixed-function.
- Implemented GPU shader generator for the new fixed-function
- Remaining fixed-functions will be implemented in an upcoming PR.
For issue #1968 - "Make display EOTFs in built-in transforms mirrored and unclamped to preserve sub-black and super-white"
- Existing LUT-based HLG curve is now unclamped at both ends and mirrored around origin.
- Both the existing LUT-based and the new LUT-free implementations of the PQ curve are now unclamped at both ends and mirrored around origin.
Aux Changes
- GetFixedFunctionCPURenderer() now takes a new bool parameter fastLogExpPow.
- Added a stand-in OCIO_LUT_SUPPORT preprocessor macro in preparation for ocio-lite where the lut support can be turned off.
- Added util functions to Config_tests.cpp to help creating configs with arbitrary version.
- Added ability to test fixed-function cpu renderers with and without fastLogExpPow.
- Added capability to specify custom extended ranges in the GPU unit tests. Default value is [-1.0,2.0] same as the previously hard-coded range.
- Fixed a bug in the GPU unit tests where the computed domain values would overshoot.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Renderer_PQ_TO_LINEAR_SSE high precision implementation is now limited to MSVC 2019+ compiler as it has the built-in intel _mm_pow_ps() SVML implementation.
- LUT-based PQ to Linear implementation now uses half-domain LUT to handle extended range. Linear to PQ direction was alredy using half-domain lut (probably due to normal input range being 0 to 100.
- BT_2100 namespace is renamed to HLG
- In BuiltinTransform_tests it's now possible (and necessary) to specify the error threshold for each built-in transform. This was needed as the hard-coded 1e-6 threshold was too tight for the PQ curve which uses nested power functions and thus numerical stability was depending on the implantation flavor.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Reversing the forward direction of the PQ curve, now the forward direction is linear -> PQ . Changed the enum names accordinly, updated the tests etc.
- Adding a new Hybrid Log Gamma fixed function. Similar to the PQ curve, the forward direction is linear -> HLG. SIMD implementation is currently missing, can be done in the future.
- minor fixes in the PQ cpu op
- some adjustments to the CPU test values and thresholds.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Ah! gcc and clang being more picky about the unused variable bit me again.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Completed outstanding to-do items.
- Code beautification.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Adding few missing pieces I noticed for PQ and HLG fixed functions
- Since we changed the default direction of the PQ and HLG fixed functions, I moved the order of the functions in the source files so that forward becomes before inverse.
- Adding the first cut of the FIXED_FUNCTION_LINEAR_TO_DOUBLE_LOG_AFFINE fixed function. This is still in WIP, needs some optimizations and tests implemented. Also to be able to handle the Apple Camera curve, it needs to be extended a bit. But currently it can handle the Canon CLog2 and CLog3 curves with all tests passing.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - unbreak gcc and clang compilers
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Adding GpuShaderText::floatXGreaterThanEqual() functions which are needed for precise break-point handling in non-continuous piecewise functions.
- changes for double log gamma fixed function
-- Fixed couple of bugs
-- Added basic parameter validation
-- implemented fwd and inv gpu shaders
-- Fixed CLog2 and CLog3 double log gamma constants.
-- implemented cpu and gpu shaders
Signed-off-by: cuneyt.ozdas <[email protected]>
* - HLG fixed-function is now parametrized and the previously hard-coded Rec.2100 HLG curve parameters are now passed to the fixed-function by the built-in transforms and by some of the test suites.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Adding a new parameter to the HLG fixed-function to control the point mirroring is applied. Below the mirror point the input values will be mirrored around that point and the output sign will be flipped. Although this does not guarantee by itself a monotonously increasing (thus invertible) and a continuous function, when the parameters are proper these properties will be achieved.
- Both the Rec.2100 HLG curve and Apple camera curve are now implemented by the HLG fixed-function when the LUT-support is turned off.
for now checking-in with LUT_SUPPORT turned off to run the CI tests on the implementation. I'll turn it on later.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Unlike msvc, gcc and clang could not auto-determine the template parameter for the base class. I'm making it explicit, hope that it'll unbreak the builds.
- minor comment fix :)
Signed-off-by: cuneyt.ozdas <[email protected]>
* - gcc and clang are still failing. Removing the template for the HLG, hope this will un-confuse the compilers.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - handling the unused variable warning/error when the LUT-support is turned off.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - Fighting with more unused variable warning turned into error. At this stage I'm not sure that turning this warning on the compilers is a good idea or not. Almost all cases are simple unused variabled due to different cmake switches and will be happily optimized out by the compiler without any side-effect. I'm curious to see if that compiler flag helped anyone to catch a bug early on at all.
Signed-off-by: cuneyt.ozdas <[email protected]>
* silencing more unused vars.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - now that all the compiler are happy when the lut-support is turned off, turning it back on.
Signed-off-by: cuneyt.ozdas <[email protected]>
* - minor fixes, mostly formatting.
Signed-off-by: cuneyt.ozdas <[email protected]>
* Refine enums
Signed-off-by: Doug Walker <[email protected]>
* Add opdata test
Signed-off-by: Doug Walker <[email protected]>
* Add hlg oetf builtin
Signed-off-by: Doug Walker <[email protected]>
* Update CTF version
Signed-off-by: Doug Walker <[email protected]>
* Add builtin version tests
Signed-off-by: Doug Walker <[email protected]>
* Fix typo
Signed-off-by: Doug Walker <[email protected]>
---------
Signed-off-by: cuneyt.ozdas <[email protected]>
Signed-off-by: Doug Walker <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
1 parent 5c80c0b commit 79e7b7b
File tree
28 files changed
+2597
-259
lines changed- docs/api/python/frozen
- include/OpenColorIO
- src
- OpenColorIO
- fileformats/ctf
- ops/fixedfunction
- transforms/builtins
- bindings/python
- tests
- cpu
- fileformats
- ops/fixedfunction
- transforms
- builtins
- gpu
28 files changed
+2597
-259
lines changedLines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
107 | 125 | | |
108 | 126 | | |
109 | 127 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
493 | | - | |
| 496 | + | |
494 | 497 | | |
495 | 498 | | |
496 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5234 | 5234 | | |
5235 | 5235 | | |
5236 | 5236 | | |
| 5237 | + | |
| 5238 | + | |
5237 | 5239 | | |
5238 | 5240 | | |
5239 | 5241 | | |
| |||
5333 | 5335 | | |
5334 | 5336 | | |
5335 | 5337 | | |
| 5338 | + | |
5336 | 5339 | | |
5337 | 5340 | | |
5338 | 5341 | | |
5339 | 5342 | | |
5340 | 5343 | | |
5341 | 5344 | | |
5342 | | - | |
| 5345 | + | |
5343 | 5346 | | |
5344 | 5347 | | |
5345 | 5348 | | |
5346 | 5349 | | |
5347 | 5350 | | |
5348 | | - | |
| 5351 | + | |
5349 | 5352 | | |
5350 | | - | |
5351 | | - | |
5352 | | - | |
5353 | | - | |
5354 | | - | |
5355 | | - | |
5356 | | - | |
5357 | | - | |
5358 | | - | |
5359 | | - | |
5360 | | - | |
5361 | | - | |
5362 | | - | |
5363 | | - | |
5364 | | - | |
5365 | | - | |
5366 | | - | |
5367 | | - | |
5368 | | - | |
5369 | | - | |
| 5353 | + | |
| 5354 | + | |
| 5355 | + | |
| 5356 | + | |
| 5357 | + | |
| 5358 | + | |
| 5359 | + | |
| 5360 | + | |
| 5361 | + | |
| 5362 | + | |
| 5363 | + | |
| 5364 | + | |
| 5365 | + | |
5370 | 5366 | | |
5371 | 5367 | | |
5372 | 5368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1158 | 1237 | | |
1159 | 1238 | | |
1160 | 1239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
222 | 227 | | |
223 | 228 | | |
224 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
371 | 374 | | |
372 | 375 | | |
373 | 376 | | |
| |||
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
402 | 408 | | |
403 | 409 | | |
404 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
259 | 265 | | |
260 | 266 | | |
261 | 267 | | |
262 | 268 | | |
263 | 269 | | |
264 | 270 | | |
265 | | - | |
| 271 | + | |
266 | 272 | | |
267 | 273 | | |
268 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments