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

fix(oiiotool): --autocc bugfix and color config inventory cleanup #4060

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Nov 23, 2023

The important bug fix is in oiiotool image input when autocc is used, where we reversed the sense of a test and did the autocc-upon-input if the file's color space was equivalent to the scene_linear space (pointlessly), and skipped the conversion if they were different (oh no, big bug!).

Along the way:

  • Add missing try/catch around OCIO call that should have had it.

  • Some very ugly SPI-specific recognize-by-name color space heuristics. I hate this, sorry, but it solves a really important problem for me.

  • A bunch of additional debugging messages during color space inventory, enabled only when debugging, so nobody should see these but me.

  • A couple places where we canonicalize the spelling of "oiio:ColorSpace".

Note that there is still an issue with the color space classification using OCIO 2.3+'s identification of built-in equivalents by name. These are shockingly expensive. I will return to this later.

The important bug fix is in oiiotool image input when autocc is used,
where we reversed the sense of a test and did the autocc-upon-input if
the file's color space was equivalent to the scene_linear space
(pointlessly), and skipped the conversion if they were different (oh
no, big bug!).

Along the way:

* Add missing try/catch around OCIO call that should have had it.

* Some very ugly SPI-specific recognize-by-name color space heuristics.
  I hate this, sorry, but it solves a really important problem for me.

* A bunch of additional debugging messages during color space inventory,
  enabled only when debugging, so nobody should see these but me.

* A couple places where we canonicalize the spelling of "oiio:ColorSpace".

Note that there is still an issue with the color space classification
using OCIO 2.3+'s identification of built-in equivalents by
name. These are shockingly expensive. I will return to this later.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz changed the title fix(oiiotool): --autocc bugfix xand color config inventory cleanup fix(oiiotool): --autocc bugfix and color config inventory cleanup Nov 23, 2023
Copy link
Contributor

@jessey-git jessey-git left a comment

Choose a reason for hiding this comment

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

Just noticed one minor item.

@@ -698,26 +726,36 @@ void
ColorConfig::Impl::identify_builtin_equivalents()
{
#if OCIO_VERSION_HEX >= MAKE_OCIO_VERSION_HEX(2, 3, 0)
Timer timer;
Copy link
Contributor

Choose a reason for hiding this comment

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

OIIO_MAYBE_UNUSED Timer timer;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is that needed? I'm not seeing any build errors on CI. I think that the constructor of the timer itself "does something", so it's not unused.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unsure if it's really needed but another method a little below this used that pattern.

@lgritz lgritz merged commit b8723ec into AcademySoftwareFoundation:master Nov 24, 2023
25 checks passed
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Nov 24, 2023
…ademySoftwareFoundation#4060)

The important bug fix is in oiiotool image input when autocc is used,
where we reversed the sense of a test and did the autocc-upon-input if
the file's color space was equivalent to the scene_linear space
(pointlessly), and skipped the conversion if they were different (oh no,
big bug!).

Along the way:

* Add missing try/catch around OCIO call that should have had it.

* Some very ugly SPI-specific recognize-by-name color space heuristics.
I hate this, sorry, but it solves a really important problem for me.

* A bunch of additional debugging messages during color space inventory,
enabled only when debugging, so nobody should see these but me.

* A couple places where we canonicalize the spelling of
"oiio:ColorSpace".

Note that there is still an issue with the color space classification
using OCIO 2.3+'s identification of built-in equivalents by name. These
are shockingly expensive. I will return to this later.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz deleted the lg-autocc branch November 24, 2023 04:00
1div0 pushed a commit to 1div0/OpenImageIO that referenced this pull request Feb 24, 2024
…ademySoftwareFoundation#4060)

The important bug fix is in oiiotool image input when autocc is used,
where we reversed the sense of a test and did the autocc-upon-input if
the file's color space was equivalent to the scene_linear space
(pointlessly), and skipped the conversion if they were different (oh no,
big bug!).

Along the way:

* Add missing try/catch around OCIO call that should have had it.

* Some very ugly SPI-specific recognize-by-name color space heuristics.
I hate this, sorry, but it solves a really important problem for me.

* A bunch of additional debugging messages during color space inventory,
enabled only when debugging, so nobody should see these but me.

* A couple places where we canonicalize the spelling of
"oiio:ColorSpace".

Note that there is still an issue with the color space classification
using OCIO 2.3+'s identification of built-in equivalents by name. These
are shockingly expensive. I will return to this later.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Signed-off-by: Peter Kovář <peter.kovar@reflexion.tv>
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.

2 participants