Operator Library: Synchronization
The operator Overflow decouples a non-stoppable ingoing 2D data stream from a subsequent image processing pipeline which may be blocked sometimes. It identifies an overflow situation when an internal small buffer runs full as outgoing data is blocked. In case of an overflow, an ongoing frame is cut by immediately appending an end-of-line and end-of-frame marker. The corresponding frame is considered as corrupted and an event is generated accordingly. When new frames enter input I while blocking of the output remains full, frames are skipped. Then an event about a lost frame is generated.
Overflow Causes Non-rectangular Frames | |
---|---|
When an ingoing frame is cut because of an overflow situation, the last line of the outgoing frame is typically shorter than the other lines. Make sure that the subsequent image processing pipeline can deal with that. |
For each corrupted or lost frame an overflow event is generated. The overflow events transport a data payload consisting of the frame number and the type of overflow. The event payload is provided as three 16-bit data words. The first two represent a 32-bit value for the frame number where the least significant bits are stored in the first word. The third 16-bit word provides an overflow mask where the mask bits are defined as follows:
-
[0]: frame corrupted
-
[1]: frame lost
-
[2]: event loss occurred before
-
[3]: frame ok
-
[4] .. [15]: reserved
Note that the frame number is reset on acquisition start. Also note that the first frame will have frame number zero, while a DMA transfer starts with frame number one. The frame number is a 32-bit value. If it's maximum is reached, it will start from zero again. On a 64-bit target runtime, the DMA transfer number will be a 64-bit value. If the frame corrupted is set, the frame with the frame number in the event is corrupted i.e. it will not have it's full length so subsequent processing may produce invalid results. If the frame lost flag is set, the frame with the frame number in the event was fully discarded so the subsequent processing pipeline did not receive any data from the frame. The corrupted frame flag and the frame lost flag will never occur for the same event. The flag event loss occured before is an additional security mechanism. It means that an event has been lost. This can only happen at very high event rates and should not happen under normal conditions.
Property | Value |
---|---|
Operator Type | M |
Input Link | I, non-stoppable data input |
Output Link | O, data output |
Link Parameter | Input Link I | Output Link O |
---|---|---|
Bit Width | [1, 64] | as I |
Arithmetic | {unsigned, signed} | as I |
Parallelism | any | as I |
Kernel Columns | any | as I |
Kernel Rows | any | as I |
Img Protocol | VALT_IMAGE2D | VALT_IMAGE2D |
Color Format | any | as I |
Color Flavor | any | as I |
Max. Img Width | any | as I |
Max. Img Height | any | as I |
EventsForSuccessfulFrame | |
---|---|
Type | dynamic read/write parameter |
Default | OFF |
Range | [OFF, ON] |
Defines whether an event for any passing frame shall be generated. |
OverflowOccurred | |
---|---|
Type | dynamic read parameter |
Default | 0 |
Range | [0, 1] |
Notifies if an overflow event occurred. This parameter is reset after read access so it shows whether an overflow situation occurred between the prevous read access and the current read access. |
The use of operator Overflow is shown in the following examples:
-
'Functional Example for Specific Operators of Library Synchronization, Base and Filter'
Examples - Demonstration of how to use the operator