Skip to content
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

Enhance ociochecklut to print the output after each step in a multi-t… #1925

Conversation

pennelee
Copy link
Contributor

@pennelee pennelee commented Jan 4, 2024

…ransform LUT

-s option will print the output after each step in the transform.

Tested with single RGB input as well as -t predefined RGB values.
Tested with various CLF files from OpenColorIO\tests\data\files\clf that have one, two and multiple operations.
Tested with --inv, --gpu, --gpulegacy

For cases with multiple operations, there are some differences in ouptut due to precision. For example:

Example with 2 Transforms:

ociochecklut.exe lut1d_comp.clf 0.18 0.18 0.18 -v

OCIO Version: 2.4.0dev

Input [R G B]: [ 0.18 0.18 0.18]
Output [R G B]: [0.5528838 0.525246 0.4975982]

ociochecklut.exe lut1d_comp.clf 0.18 0.18 0.18 -v -s

OCIO Version: 2.4.0dev

Transform 0:
Input [R G B]: [ 0.18 0.18 0.18]
Output [R G B]: [0.3441569 0.3441569 0.3441569]
Transform 1:
Input [R G B]: [0.3441569 0.3441569 0.3441569]
Output [R G B]: [0.5528837 0.525246 0.4975982]

Example with 9 Transforms:

ociochecklut.exe multiple_ops.clf 0.18 0.18 0.18 -v

OCIO Version: 2.4.0dev

Input [R G B]: [ 0.18 0.18 0.18]
Output [R G B]: [0.2754872 0.3039555 -0.06960445]

ociochecklut.exe multiple_ops.clf 0.18 0.18 0.18 -v -s

OCIO Version: 2.4.0dev

Transform 0:
Input [R G B]: [ 0.18 0.18 0.18]
Output [R G B]: [0.1866483 0.2251173 0.08405399]
Transform 1:
Input [R G B]: [0.1866483 0.2251173 0.08405399]
Output [R G B]: [0.2978297 0.394014 0.01335724]
Transform 2:
Input [R G B]: [0.2978297 0.394014 0.01335724]
Output [R G B]: [0.3367588 0.4664171 -0.04671562]
Transform 3:
Input [R G B]: [0.3367588 0.4664171 -0.04671562]
Output [R G B]: [0.3179022 0.4337091 -0.01955034]
Transform 4:
Input [R G B]: [0.3179022 0.4337091 -0.01955034]
Output [R G B]: [0.2819128 0.3884552 -0.01955034]
Transform 5:
Input [R G B]: [0.2819128 0.3884552 -0.01955034]
Output [R G B]: [0.6754353 0.760067 -0.05077279]
Transform 6:
Input [R G B]: [0.6754353 0.760067 -0.05077279]
Output [R G B]: [0.6506769 0.6723613 -0.08869568]
Transform 7:
Input [R G B]: [0.6506769 0.6723613 -0.08869568]
Output [R G B]: [0.2754877 0.3039553 -0.0006977472]
Transform 8:
Input [R G B]: [0.2754877 0.3039553 -0.0006977472]
Output [R G B]: [0.2754877 0.3039553 -0.06960447]

Copy link
Collaborator

@remia remia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @pennelee, this looks good to me. A minor suggestion could be to enable the print of the transforms list when using the -s flag, could be done updating line 275 to include stepInfo.

@pennelee
Copy link
Contributor Author

Thank you @remia for the review and feedback! I added your suggestion to the changes.

Copy link
Collaborator

@doug-walker doug-walker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @pennelee !

src/apps/ociochecklut/main.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@doug-walker doug-walker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @pennelee ! This will be very useful for a lot of us!

@doug-walker doug-walker merged commit aadf595 into AcademySoftwareFoundation:main Jan 23, 2024
23 checks passed
doug-walker added a commit to autodesk-forks/OpenColorIO that referenced this pull request Jan 29, 2024
AcademySoftwareFoundation#1925)

* Enhance ociochecklut to print the output after each step in a multi-transform LUT

Signed-off-by: pylee <[email protected]>

* Review feedback to enable printe of transforms list when using -s flag.

Signed-off-by: pylee <[email protected]>

* Print transform description for each step instead.

Signed-off-by: pylee <[email protected]>

---------

Signed-off-by: pylee <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
(cherry picked from commit aadf595)
Signed-off-by: Doug Walker <[email protected]>
doug-walker added a commit that referenced this pull request Jan 30, 2024
* Fix ssse3 detection typo (#1929)

Signed-off-by: Mark Reid <[email protected]>
(cherry picked from commit 003b6a1)
Signed-off-by: Doug Walker <[email protected]>

* fix: use system `include pystring.h` for `ConfigUtils.cpp` (#1921)

Signed-off-by: Rui Chen <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
(cherry picked from commit e747e9c)
Signed-off-by: Doug Walker <[email protected]>

* Fix narrowing conversion error on riscv64 (#1924)

Signed-off-by: phancb <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
(cherry picked from commit a95febc)
Signed-off-by: Doug Walker <[email protected]>

* Add manylinux_2_28 Python wheels (#1933)

Signed-off-by: Rémi Achard <[email protected]>
Co-authored-by: Michael Dolan <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
(cherry picked from commit f925099)
Signed-off-by: Doug Walker <[email protected]>

* Enhance ociochecklut to print the output after each step in a multi-t… (#1925)

* Enhance ociochecklut to print the output after each step in a multi-transform LUT

Signed-off-by: pylee <[email protected]>

* Review feedback to enable printe of transforms list when using -s flag.

Signed-off-by: pylee <[email protected]>

* Print transform description for each step instead.

Signed-off-by: pylee <[email protected]>

---------

Signed-off-by: pylee <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
(cherry picked from commit aadf595)
Signed-off-by: Doug Walker <[email protected]>

* Fix AVX instructions used on CPUs that don't support them (#1935)

* Fix AVX instructions used on CPUs that don't support them

It's supposed to check all bits are enabled, not just one of them.
This causes a crash using OpenColorIO on older CPUs.

Thanks to Ray Molenkamp for help tracking this down.

Signed-off-by: Brecht Van Lommel <[email protected]>

* Fix another case pointed out in review

Signed-off-by: Brecht Van Lommel <[email protected]>

---------

Signed-off-by: Brecht Van Lommel <[email protected]>
(cherry picked from commit 0c90ded)
Signed-off-by: Doug Walker <[email protected]>

* Increment library version to 2.3.2

Signed-off-by: Doug Walker <[email protected]>

---------

Signed-off-by: Mark Reid <[email protected]>
Signed-off-by: Doug Walker <[email protected]>
Signed-off-by: Rui Chen <[email protected]>
Signed-off-by: phancb <[email protected]>
Signed-off-by: Rémi Achard <[email protected]>
Signed-off-by: pylee <[email protected]>
Signed-off-by: Brecht Van Lommel <[email protected]>
Co-authored-by: Mark Reid <[email protected]>
Co-authored-by: Rui Chen <[email protected]>
Co-authored-by: phanium <[email protected]>
Co-authored-by: Rémi Achard <[email protected]>
Co-authored-by: Michael Dolan <[email protected]>
Co-authored-by: PenneLee <[email protected]>
Co-authored-by: Brecht Van Lommel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance ociochecklut to print the output after each step in a multi-transform LUT
3 participants