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

Features/spatial format_WIP #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

revisionfx
Copy link
Contributor

We add a new action to compute the format of the output clip, kOfxImageEffectActionGetImageFormat, which would ask the effect to set the appropriate properties on the outArgs.

kOfxImageEffectImageFormatResolution a 2D integer indicating the resolution in pixels of the output image, this is always full res with no render scale applied,
kOfxImageEffectImageFormatAspectRatio ( Type - double X 1). If not set assumed to be 1.0

For Generator we also add:

kOfxImageEffectPropGeneratorType - a string property that takes one of two values:

kOfxImageEffectGeneratorFormatMaster
kOfxImageEffectGeneratorFormatSlave

A generator of type kOfxImageEffectGeneratorFormatMaster will have the kOfxImageEffectActionGetImageFormat action called to determine the format of the clip being created, while a kOfxImageEffectGeneratorFormatSlave will not. A slave will have the format determined for it by the host and the relevant properties available on the output clip.

Generators that do not set this property will be defaulted to FormatSlave - the current behaviour (with spatial format inherited from kOfxImageEffectPropProject* )
kOfxImageEffectActionGetImageFormat
kOfxImageEffectPropSupportsImageFormat

An entry for a spatial format parameter is created here for discussion.

Adds better handling of spatial format

We add a new action to compute the format of the output clip, kOfxImageEffectActionGetImageFormat, which would ask the effect to set the appropriate properties on the outArgs.

    kOfxImageEffectImageFormatResolution a 2D integer indicating the resolution in pixels of the output image, this is always full res with no render scale applied,
    kOfxImageEffectImageFormatAspectRatio  ( Type - double X 1).  If not set assumed to be 1.0

For Generator we also add

kOfxImageEffectPropGeneratorType -  a string property that takes one of two values:

    kOfxImageEffectGeneratorFormatMaster
    kOfxImageEffectGeneratorFormatSlave

A generator of type kOfxImageEffectGeneratorFormatMaster will have the kOfxImageEffectActionGetImageFormat action called to determine the format of the clip being created, while a kOfxImageEffectGeneratorFormatSlave will not. A slave will have the format determined for it by the host and the relevant properties available on the output clip.

Generators that do not set this property will be defaulted to FormatSlave - the current behaviour (with spatial format inherited from  kOfxImageEffectPropProject* )
kOfxImageEffectActionGetImageFormat
 kOfxImageEffectPropSupportsImageFormat
This is a placeholder, for Spatial Format parameter is optional and  to be populated/managed by host and the purpose of it as a parameter is to be placed in UI by plug-in a logical location in parameter list.  There can only be one spatial format parameter per plug-in.
@revisionfx revisionfx changed the title Features/spatial format Features/spatial format_WIP Apr 27, 2020
@revisionfx revisionfx mentioned this pull request May 1, 2020
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants