-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lut-free built-ins #18
base: main
Are you sure you want to change the base?
Conversation
cozdas
commented
Jul 20, 2024
- WIP Fixed-function for PQ<->Linear function. Doesn't have the GPU implementation yet and the rest may need tweaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to review more thoroughly, but you're on the right track.
There's a lot more to adding a new FixedFunction though. CTF support and Python support are required. Version checks must be updated to not allow the additions in config versions lower than 2.4. Unit tests must be added to test all of that.
Some of the other PRs that might be a useful reference are AcademySoftwareFoundation#1404, AcademySoftwareFoundation#1814, and AcademySoftwareFoundation#896.
33cdc83
to
11d7e17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update tests/cpu/Config_tests.cpp, fixed_function_serialization, around line 4795 to validate Yaml serialization. Then add a check (there are other examples in that test) that an exception will be thrown on validation if the version is less than 2.4.
Please update tests/cpu/fileformats/FileFormatCTF_tests.cpp, ff_load_save_ctf, around line 3841 to validate CTF serialization.
I'm realizing that we have not been as rigorous on CTF versioning as we have on config versioning. Given that we are adding a lot for 2.4 we should bump the CTF version. This could be done in a follow-up.
…mplementation yet and the rest may need tweaks. Signed-off-by: cuneyt.ozdas <[email protected]>
- Python: Added docs - Python: added the builtin function style - Simplified the CPU code, it's still a prototype anyhow. Will optimize later. - Style->OpData now takes the direction into account. - Preliminary GPU implementation. This still clamps negative values. - Added GPU tests. Signed-off-by: cuneyt.ozdas <[email protected]>
- Added symmetry to the PQ curve both in CPU and GPU implementations - Added version check for the FIXED_FUNCTION_PQ_TO_LINEAR transform. - Adjusting the GPU test threshold as GPU and CPU (32f) are showing mismatch more than the distance each have to the ground truth. - Adding fixed function OP tests - Temporary change to the PQ curve CPU code for quickly switching between single and double precision floating point for error analysis. Signed-off-by: cuneyt.ozdas <[email protected]>
Signed-off-by: cuneyt.ozdas <[email protected]>
17f0783
to
a2e5459
Compare
…unction - minor fixes Signed-off-by: cuneyt.ozdas <[email protected]>
…unction - implemented SSE versions of the PQ curve in both directions with and without fastPower - restored the old LUT-based PQ curve implementation that's used in the ST2084 Display builtin transform - added custom range options to gpu unit tests - changed the PQ curve test ranges to [-0.1, 1.1] in forward and [-0.1, 1001.1] in reverse directions Signed-off-by: cuneyt.ozdas <[email protected]>
Signed-off-by: cuneyt.ozdas <[email protected]>
…anoseconds, this is optional, so the existing clients don't need to change. - HLG curve in CIE_XYZ_D65_to_REC2100_HLG_1000nit_Functor is pulled into its own function to be reused later on. - HLG curve is no longer clipping at 0, it mirrors instead. clipping at 1 is currently untouched, may need to remove that too. - fine-tuned the unit test thresholds for PQ curve so that they pass in all build/use situations. Signed-off-by: cuneyt.ozdas <[email protected]>
…gcc and clang will keep on failing as I realized that those compilers don't have the _mm_pow_ps() SVML library implementation as msvc does. Will need to change the logic a bit. Signed-off-by: cuneyt.ozdas <[email protected]>
Signed-off-by: cuneyt.ozdas <[email protected]>
…her use the fast-SSE or scalar implementation, while Windows will be able to use the precise-SSE implementation too if needed. Fingers crossed. Signed-off-by: cuneyt.ozdas <[email protected]>
…t which should be available since GL version 3.3 according to Khronos. Joy of cross-platform development :) Therefore removing the GPU render timing code from this PR. This is probably why GPU performance was not implemented in ocioperf already.
…dea to try to make all the compiler warning levels same/similar, some platforms being more picky about the same code than the others does not make much sense from the project's point of view, just frustration. Signed-off-by: cuneyt.ozdas <[email protected]>
Signed-off-by: cuneyt.ozdas <[email protected]>
Signed-off-by: cuneyt.ozdas <[email protected]>
…ate more. Signed-off-by: cuneyt.ozdas <[email protected]>
…er code review discussion - BT_2100 HGL clamp at 1 is removed. - Fixed function tests can now ask for fast math on or off explicitly. - Fixed function PQ curve tests are now performed both with and without fast math. With fast math on, the thresholds are increased to accommodate the accumulated error during roundtrip. Signed-off-by: cuneyt.ozdas <[email protected]>