jit.op
Description
The jit.op object applies either a binary operator to two input matrices, or a unary operator to the left input matrix. A different operator may be specified for each plane, or a scalar may be specified via the val attribute as an alternate to using a second matrix.
Examples

Matrix Operator
Name | IOProc | Planelink | Typelink | Dimlink | Plane | Dim | Type |
---|---|---|---|---|---|---|---|
in2 | resamp | 1 | 1 | 1 | 1 | 1 | char long float32 float64 |
out | n/a | 1 | 1 | 1 | 1 | 1 | char long float32 float64 |
More about Matrix Operators
The Jitter MOP
MOP Arguments
MOP Attributes
MOP Messages
Attributes
op [32 symbols]
The operator to be used (default = pass) If one operator is specified, it is applied to all planes. If multiple operators are specified, they are applied on a plane by plane basis.
Arithmetic Operators:= pass left input, no operator
= multiplication (also )
= division (also )
= addition (also )
= subtraction (also )
= addition modulo (char only) (also )
= subtraction modulo (char only) (also )
= modulo (also )
= minimum
= maximum
= absolute value (unary)
= average
= absolute value of difference
= folding/mirrored modulo (float only)
= wrapping/positive modulo (float only)
= pass right input, no operator
= right input divided by left input (flipped)
= right input minus left input (flipped)
= right input modulo left input (flipped)
= leave previous output value
Trigonometric Operators: (float32/float64 only, unary except atan2)
= sine
= cosine
= tangent
= arcsine
= arccosine
= arctangent
= arctangent (binary)
= hyperbolic sine
= hyperbolic cosine
= hyperbolic tangent
= hyperbolic arcsine
= hyperbolic arccosine
= hyperbolic arctangent
Bitwise Operators: (long/char only)
= bitwise and
= bitwise or
= bitwise xor
= bitwise compliment (unary)
= right shift
= left shift
Logical operators
= logical and
= logical or
= logical not (unary)
= greater than
= less than
= greater than or equal to
= less than or equal to
= equal
= not equal
= greater than (pass)
= less than (pass)
= greater than or equal to (pass)
= less than or equal to (pass)
= equal (pass)
not equal (pass)
Exponential/Logarithmic/Other: (float32/float64 only, unary except hypot and pow)
= e to the x
= 2 to the x
= log base e
= log base 2
= log base 10
= hypotenuse (binary)
= x to the y (binary)
= square root
= integer ceiling
= integer floor
= round to nearest integer
= truncate to integer
Possible values:
'*'
'/'
'+'
'sub'
'!/'
'!-'
'+m'
'-m'
'%'
'!%'
'min'
'max'
'avg'
'abs'
'absdiff'
'pass'
'!pass'
'fold'
'wrap'
'&'
'|'
'^'
'~'
'>>'
'<<'
'&&'
'||'
'!'
'>'
'<'
'>='
'<='
'=='
'!='
'>p'
'<p'
'>=p'
'<=p'
'==p'
'!=p'
'sin'
'cos'
'tan'
'asin'
'acos'
'atan'
'atan2'
'sinh'
'cosh'
'tanh'
'asinh'
'acosh'
'atanh'
'exp'
'exp2'
'ln'
'log'
'log2'
'log10'
'hypot'
'pow'
'sqrt'
'ceil'
'floor'
'round'
'trunc'
val [32 atoms]
The value to use as right hand operand instead of a matrix (default = 0) If one value is specified it applies to all planes. If multiple values are specified they are applied on a plane by plane basis. IMPORTANT : If the incoming matrix data has type , then integers in the range 0-255 are mapped to the floating point data range 0.- .996 (A value of 1. (char 255) is not really 1. That value is not representable in 8-bit fixed point, since it would be 256. Thus, floating point values greater than 1. become 1.0 - 1/256.0, or 0.996).
Common Box Attributes
Messages
int
float
list
See Also
Name | Description |
---|---|
Working with Video in Jitter | Working with Video in Jitter |
expr | |
jit.expr | |
jit.dimop | |
jit.planeop | |
vexpr | |
Tutorial 3: Math Operations on a Matrix | Tutorial 3: Math Operations on a Matrix |
Tutorial 5: ARGB Color | Tutorial 5: ARGB Color |
Tutorial 9: More Mixing | Tutorial 9: More Mixing |
Tutorial 18: Iterative Processes and Matrix Re-Sampling | Tutorial 18: Iterative Processes and Matrix Re-Sampling |
Tutorial 45: Introduction to using Jitter within JavaScript | Tutorial 45: Introduction to using Jitter within JavaScript |