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

oiiotool: Improve guessing about output format based on inputs #2717

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Sep 19, 2020

What data format does oiiotool write for its outputs? The ones
specified by -d, if supplied, but otherwise it will make a guess based
on the types of inputs it has seen.

This patches makes several improvements:

  • Multi-subimage files were getting very confused because different
    subimages may want different data formats, and it was at best
    remembering data formats overall and by channel name, but not taking
    subimages into consideration. Make this much more specific by
    remembering both raw channel names (for all subimages), as well as
    specific channels of named subimages.

  • The way the input data formats were remembered had repeaded (and
    non-matching) code depending on whether the input was read
    immediately or lazily. That is now cleared up, with the logic
    refactored and expressed only once.

  • The -d directive can specify a type (for all channels), a type for a
    particular channel name (channel=type), and -- this part is new --
    a type for all channels of a named subimage (specified as
    subimage.*=type) or just one channel of a specific subimage
    (subimage.channel=type).

Fixes #2710

Signed-off-by: Larry Gritz lg@larrygritz.com

@lgritz
Copy link
Collaborator Author

lgritz commented Sep 22, 2020

Is this what passes for spam these days?

What data format does oiiotool write for its outputs? The ones
specified by -d, if supplied, but otherwise it will make a guess based
on the types of inputs it has seen.

This patches makes several improvements:

* Multi-subimage files were getting very confused because different
  subimages may want different data formats, and it was at best
  remembering data formats overall and by channel name, but not taking
  subimages into consideration. Make this much more specific by
  remembering both raw channel names (for all subimages), as well as
  specific channels of named subimages.

* The way the input data formats were remembered had repeaded (and
  non-matching) code depending on whether the input was read
  immediately or lazily.  That is now cleared up, with the logic
  refactored and expressed only once.

* The -d directive can specify a type (for all channels), a type for a
  particular channel name (`channel=type`), and -- this part is new --
  a type for all channels of a named subimage (specified as
  `subimage.*=type`) or just one channel of a specific subimage
  (`subimage.channel=type`).

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz merged commit a43dbfc into AcademySoftwareFoundation:master Oct 1, 2020
@lgritz lgritz deleted the lg-chanformat branch October 4, 2020 05:59
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Oct 21, 2020
…mySoftwareFoundation#2717)

What data format does oiiotool write for its outputs? The ones
specified by -d, if supplied, but otherwise it will make a guess based
on the types of inputs it has seen.

This patch makes several improvements:

* Multi-subimage files were getting very confused because different
  subimages may want different data formats, and it was at best
  remembering data formats overall and by channel name, but not taking
  subimages into consideration. Make this much more specific by
  remembering both raw channel names (for all subimages), as well as
  specific channels of named subimages.

* The way the input data formats were remembered had repeated (and
  non-matching) code depending on whether the input was read
  immediately or lazily.  That is now cleared up, with the logic
  refactored and expressed only once.

* The -d directive can specify a type (for all channels), a type for a
  particular channel name (`channel=type`), and -- this part is new --
  a type for all channels of a named subimage (specified as
  `subimage.*=type`) or just one channel of a specific subimage
  (`subimage.channel=type`).

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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.

oiiotool multiple bit depths channel syntax [HELP]
1 participant