Operator InsertPixel

Operator Library: Synchronization

Library: Synchronization

The operator InsertPixel inserts arbitrary pixel from the image on input link I1 into the image on I0 and outputs the combined image at O.

The insertion is controlled using the binary input link Ins. If Ins = 1 for a specific pixel, the value at I1 is inserted into the image at I0. Thus the output line length is increased by the number of inserted pixel. For example if Ins == 1 for all pixel, the line length at O be doubled compared to the input line length. All output pixels at even pixel coordinates are originated from I0 and all odd pixel are from I1. If Ins == 0 for all pixels, the output image at O is equal to the image at I0.

All input links have to be synchronous i.e. they have to be sourced by the same M-type operator through an arbitrary network of O type operators.

The operator doubles the parallelism to avoid bandwidth limitations. Please note: It is possible that the number of inserted pixels is not a multiple of the parallelism. In this case, the operator has to add dummy pixels at the end of the line. The value of these dummy pixels is undefined. During VA simulation dummy pixels are set to zero for better visibility.

I/O Properties

Property Value
Operator Type P
Input Links I0, data input
I1, data input
Ins, control input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I0 Input Link I1 Input Link Ins Output Link O
Bit Width [1, 64]1 as I0 1 as I0
Arithmetic {unsigned, signed} as I0 unsigned as I0
Parallelism any as I0 as I0 2 * I0
Kernel Columns any as I0 1 as I0
Kernel Rows any as I0 1 as I0
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I0 as I0 as I0
Color Format any as I0 VAF_GRAY as I0
Color Flavor any as I0 FL_NONE as I0
Max. Img Width any as I0 as I0 2 * I02
Max. Img Height any as I0 as I0 as I0


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 output image width must not exceed 2^31 - 1.

Synchronous and Asynchronous Inputs

  • All inputs are synchronous to each other i.e. they have to be sourced by the same M-type operator through an arbitrary network of O-type operators.



Examples of Use

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