Comments (3)
Could we take advantage of the current set of properties? What if the host sets kOfxImageEffectPropPreMultiplication on the output clip to specify its desired premul output. The plugin can read this and obey it, but is still allowed to change it.
from openfx.
This is meant as a global flag sort of.
TRUE there is a read-write for output in doc in kOfxImageEffectActionGetClipPreferences
During render these properties are read-only
"This should be called once after creation of an instance, each time an input clip is changed, and whenever a parameter named in the kOfxImageEffectPropClipPreferencesSlaveParam has its value changed. "
//
This is meant even when we create instance, now I have a premult boolean checkbox in many tools, would check if TRUE or FALSE based on this flag and even hide the checkbox if this property is supported.
Unless I was putting a bunch of code to calculate this in clip preferences action I would likely just set output if input is Opaque to DesiredPremult. There could be a doc note added for ClipPreferences about that, yes.
from openfx.
Ok here's my suggestion
We add a cross reference in doc/comments for the ClipPreferences kOfxImageEffectPropPreMultiplication the premultiplication of the output clip
whereby if DesiredPremult prop is supported (status == 0) then host is expected to set DesiredPremult on output clip. Plugin can over-write back to Opaque. Only in that circumstance then an host can safely carry-on Opaque further down than direct imported source images or conversion from 3 channels to 4 for plugin. This way it's safe, does not potentially break anything (turns undefined into a bug) as there is conditional on a new property being supported.
Nothing in the API specs envision an host would be responsible to convert a plugin setting Straight to Premult... i.e. Plugins are expected to handle both cases. We are just making sure which case is perfectly clear.
Pierre
from openfx.
Related Issues (20)
- CMakeLists.txt should have a package target that packages all headers, libs, and samples
- CI should build with and without -DOFX_SUPPORTS_OPENGLRENDER HOT 1
- Submit Conan recipe to conancenter
- Add VFX Platform 2023 to CI build matrix
- Clarify why OfxMemorySuiteV1 should be used HOT 8
- Consider adding a "LUT Generator" rendering path: NoSpatialAwareness HOT 4
- New Icons need to replace old one
- Add `OfxParamTypeStrChoice`, a string-backed enum of choices HOT 21
- Conan & cmake build fails on second build on Windows HOT 2
- Deprecate MacOS-x86_64 install folder HOT 1
- Clip and Image Metadata HOT 21
- 1.5 Release Status
- Binary data property type (Paul?) HOT 1
- Binary data Parameters HOT 39
- Support/Plugins/ChoiceParams has a couple of errors HOT 4
- update install instrution and package opencl HOT 9
- Color Managed Color Parameter
- Deprecate kOfxParamHostPropSupportsBooleanAnimation
- Windows ARM64 and ARM64EC support HOT 1
- Deterministic per-frame RNG HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfx.