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

Laurence Penney lorp at lorp.org
Thu Apr 11 21:17:30 CEST 2024


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?

- 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/
> 
> 



More information about the mpeg-otspec mailing list