[MPEG-OTSPEC] Note on VARC conditions and condition set negation

Behdad Esfahbod behdad at behdad.org
Thu Apr 11 21:34:41 CEST 2024


On Thu, Apr 11, 2024 at 1:17 PM Laurence Penney <lorp at lorp.org> wrote:

> Personally I like this a lot. Each node on the condition tree can be very
> cheaply cached once evaluated, too.
>
> I like the idea of if..else on top of this, since, as Skef noted
> elsewhere, it is a common case to include one component on true, and a
> different component on false. Or is it sufficient that, for the else
> branch, we use a negate condition and point to the (cached result of the)
> just-evaluated node?
>

Note that caching is unlikely to be of significant value here, since each
component is at a different point in the designspace, so you cannot reuse
the cached value really.



> - L
>
> > On 11 Apr 2024, at 16:44, Behdad Esfahbod via mpeg-otspec <
> mpeg-otspec at lists.aau.at> wrote:
> >
> > Thanks Skef.
> >
> > I think I found the right approach for this (taking ideas from COLRv1
> paint tree / graph). Ignoring your other proposals, we add these:
> >
> > We add new Condition's that implement AND of a bunch of Conditions (like
> the current ConditionSet does), another for OR, and another for NEGATE:
> >
> > struct ConditionAnd
> > {
> >   uint16 format; // 2
> >   uint16 conditionCount; // Number of conditions for this conjunction
> expression.
> >   Offset32To<Condition> conditionOffsets[conditionCount];
> > }
> >
> > struct ConditionOr
> > {
> >   uint16 format; // 3
> >   uint16 conditionCount; // Number of conditions for this disjunction
> expression.
> >   Offset32To<Condition> conditionOffsets[conditionCount];
> > }
> >
> > struct ConditionNegate
> > {
> >   uint16 format; // 4
> >   Offset32To<Condition> condition;
> > }
> >
> > WDYT?behdad
> > http://behdad.org/
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20240411/fe3cf2f1/attachment.htm>


More information about the mpeg-otspec mailing list