Standard version: 1.5
Entered by Pierre Jasmin
In V 1.2: We reviewed if kOfxImageEffectPropPreMultiplication should be deprecated - this was withdrawn
Bruno Nicoletti asked: "Is the kOfxImageEffectPropPreMultiplication flag used by anyone to do anything useful with? If not should we just kill it?"
GaryO, PierreJ, and ShinK said NO, so we kept it. However all that was resolved is not deprecating.
The short form is GaryO thought kOfxImageOpaque was useful and PierreJ said we need to know that because some hosts are Straight (including historically the first host RE:Vision supported "Toxik").
In retrospect this should probably have been that Premult or UnPremult should have been a Project Property. And Opaque a Clip Property.
Historical Note: I believe it became a Clip Property because someone like 11 years ago mentioned that such host is possible (e.g. someone mentioned Cyborg - that would be life before Assimilate and SpeedSix for those that were not born yet).
Practical Issue: Let's say one passes you kOfxImageOpaque and you are a keyer, are you supposed to premult or not the output... More examples can be provided but that might do. Net effect is for tools including any spatial transform, warp that reveals the source frame edges we need to add a checkbox at the end [x] HostIsPremult which defaults to true for unknown hosts as it's the dominant state.
Pragmatic Issue: Although in theory we could fix this by splitting it, it might be easier to edit that property instead of breaking it in two.
Current options for this:
(revised feb 1, 2017): current proposal
-> Proposal: DescribeInContext property so plug-in can say what premult states is supports. kOfxPreMultiplicationSupported (multi-dimensional string, can return kOfxImagePreMultiplied and/or kOfxImageUnPreMultiplied). RGB-only plugins don’t need to set this.
-> Proposal: DescribeInContext integer property so plug-in can say whether it can generate alpha. kOfxCanGenerateAlpha, 0=No, 1=Yes.
-> For plug-ins that generate alpha and input clip is Opaque, they need a way to find out what host premult is desired. Proposal is a new string property set on a plug-in instance: kOfxImageEffectHostDesiredPremult (value can be kOfxImagePreMultiplied or kOfxImageUnPreMultiplied).
Revised: (jan 10, 2017)
Option 1: Define a Project Property (the word project is used but from the stand-point of effect it's no difference if the host defines this at a comp, sequence or whatever organisational structure they may use). This only inform plugin of host preference.
Option 2: Document that host sets Output clip to Premult or Unmult by default, and plugin who receives Opaque can always set that back to Opaque if they don't deal with alpha. To not set Opaque has very tiny performance effect and no effect on image down the line.
Option 2 has the advantage of not adding anything other than documenting expected behavior. And allowing an host to do more fine-grain management if they so desire.
Options not mutually exclusive, but one of them seems necessary as it's ambiguous right now.