Operator SourceSelector

The operator works as a switch between up to 20 M-Type sources. It can be used to switch between alternative implementations. You can use it, for example, to switch between different camera ports, or between different DMA inputs.

The selection is controlled by parameter SelectSource. The switching between two input ports keeps the granularity of the currently transmitted frame and line, i.e., the current frame being transmitted will be completely transmitted before switching to a new input port. In other words, the operator will not switch to another input while a frame is processed.

The operator acts like a Trash operator for all links which are currently not selected.

Note that all input links must be in the same format except the maximal image width and height.

The source type is specified by the parameter InfiniteSource. Setting it to ENABLED allows the operator to be connected to camera sources. Setting it to DISABLED allows the operator to be used between normal VA operators subsequent to a buffer.

We recommend not to use the SourceSelector operator for switching between sources which are sourced by the same M-type source. In such cases, use the IF or the CASE operator instead since these operators use much less resources than the SourceSelector operator.

Operator Restrictions

  • Empty frames are not supported.
  • Empty lines are not supported.

I/O Properties

Property Value
Operator Type M
Input Links I[0], data input
I[k], data input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I[0] Input Link I[k] Output Link O
Bit Width [1, 64]1 as I[0] as I[0]
Arithmetic {unsigned, signed} as I[0] as I[0]
Parallelism any as I[0] as I[0]
Kernel Columns any as I[0] as I[0]
Kernel Rows any as I[0] as I[0]
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I[0] as I[0]
Color Format any as I[0] as I[0]
Color Flavor any as I[0] as I[0]
Max. Img Width any any auto2
Max. Img Height any any auto3


The range of the input bit width is [1, 64] for unsigned inputs. For signed inputs, the range is [2, 64]. For unsigned color inputs, the range is [3, 63] and for signed color, the range is [6, 63].


The maximum output image width is the maximum of all input widths.


The maximum output image height is the maximum of all input heights.


Type static/dynamic read/write parameter
Default 0
Range [0, 19]

This parameter selects the port and forwards its image data to the output. The data at all other ports is discarded.

Type static parameter

When set to ENABLE, the operator allows its direct connection to infinite sources like Camera operators without the need of a buffer.

Examples of Use

The use of operator SourceSelector is shown in the following examples: