Operator IsLastPixel

Operator IsLastPixel marks the last pixel of a line (in line mode) / of a frame (in frame mode). The operator can also be used to mark empty lines (in line mode) or empty frames (in frame mode).

The operator has 1 input port and 2 - 3 output ports:

  • Input port I,
  • Output port O,
  • ouput port IsLastO, and
  • (optionally) output port IsEmptyO.

General Operator Functionality

Operator IsLastPixel always holds the current pixel value. As soon as a new pixel value comes in on input port I, the previous pixel value is put out on output port O. The pixel values received on input port I are not interpreted.

The last pixel of a line (in line mode) or of a frame (in frame mode) is marked with 1 on output port IsLastO:

  • Line Mode: For each EndOfLine (EOL) tag that operator IsLastPixel receives, the operator outputs a 1 on its output port IsLastO.

  • Frame Mode: For each EndOfFrame (EOF) tag that operator IsLastPixel receives, the operator outputs a 1 on its output port IsLastO.

End of Line / End of Frame information is always put out on IsLastO with a delay of one or more clock cycles (in accordance to the gap between the last incoming pixel and the incoming end-of-line tag; it's always the number of clock cycles of the gap + 1 additional clock cycle).

[Warning] No Empty Lines/Frames allowed

As long as you do not use IsEmptyO (see below):

  • In frame mode, the last line must not be empty.

  • In line mode, empty lines are not allowed at all.

Marking Empty Lines or Frames (Activating IsEmptyO)

In addition, you can get a marker for each empty line / each empty frame. The marker will be output on the additional output port IsEmptyO.

Output port IsEmptyO is de-activated by default.

To activate output port IsEmptyO:

  1. When instantiating the operator, set the value for Output (IsEmptyO) to 1.

When output port IsEmptyO is activated:

  • Line Mode: For each empty line that operator IsLastPixel receives, the operator outputs
    • parallelism x zeros on its output port O*, and
    • a 1 on on its output port IsEmptyO.
  • Frame Mode: For each empty frame that operator IsLastPixel receives, the operator outputs
    • parallelism x zeros on its output port O, and
    • a 1 on on its output port IsEmptyO.

In all other cases, output port IsEmptyO is 0.

*Example: If you work in line mode with a parallelism of 6, on output port O six pixel are inserted for each empty line.

[Important] Pixel Stops only at Start of New Pixel or End-of-Line Tag

Operator IsLastPixel outputs a pixel only an the moment the operator receives the next pixel or an end-of-line tag (EOL). This is of special importance in cases where the end-of-line tag is not received directly after the last pixel.

Example (parameter Mode = Line) with activated output port IsEmptyO:

The red pixel on output port O is the dummy pixel with the value 0 that has been inserted for the empty line.

On output port IsLastO, the empty line gets a 1, that is, the empty line looks the same as the fourth line of the example which contains one pixel already when incoming on input port I. Thus, when output port IsEmptyO is activated, the output on port IsLastO can only be interpreted in conjunction with the output on port IsEmptyO.

In the example above, port IsLastO outputs a 1 for line 4 and for line 8. The 0 for line 4 in IsEmptyO tells us that the incoming line was NOT empty and therefore contained 1 pixel. The 1 for line 8 in IsEmptyO tells us that the incoming line WAS empty, i.e., contained 0 pixel.

[Note] Parallelism > 1

If parallelism > 1, only the last pixel within the parallelism (highest bit) is marked with a 1 on outpot port IsLastO. All other pixels of the parallelism are 0.

Example: When Parallelism=4, at the last parallel word the output port IsLastO is 0x8, but in all other cases 0:

I/O Properties

Property Value
Operator Type M
Input Link I, image data input
Output Links O, image data output
IsLastO, output of 1 for last pixel in line/frame and 0 for all other pixels
IsEmptyO, output of 1 for each empty line/frame and 0 for lines/frames containing image data

Supported Link Format

Link Parameter Input Link I Output Link O Output Link IsLastO Output Link IsEmptyO
Bit Width [1:63] as I 1 1
Arithmetic {unsigned, signed} as I unsigned unsigned
Parallelism any as I as I as I
Kernel Columns any as I 1 1
Kernel Rows any as I 1 1
Img Protocol {VALT_LINE1D, VALT_IMAGE2D} as I as I as I
Color Format {VAF_COLOR, VAF_GRAY} as I VAF_GRAY VAF_GRAY
Color Flavor any as I FL_NONE FL_NONE
Max. Img Width any1 as I as I as I
Max. Img Height any as I as I as I

1

The maximum image width must be divisible by the parallelism.

Parameters

Mode
Type static or dynamic write parameter
Default Frame
Range {Line, Frame}

If set to "Line", the operator marks the first pixel in a line. The operator outputs a 1 on its output port IsFirstO for each first pixel of a line.

If set to "Frame", the operator marks the first pixel in a frame. The operator outputs a 1 on its output port IsFirstO for each first pixel of a frame.

This parameter you can set to static or dynamic. When you use the parameter as a dynamic parameter: A shadow register is implemented, and the change is taken over between

  • two images (when I is VALT_IMAGE2D),

  • two lines (when I is I is VALT_ LINE1D),

  • directly (when I is I is VALT_ PIXEL0D),

and always at reset. Until then, the old value is used.