Image Data Unscrambling
The DMA engine provides the capability to unscramble images having particular geometries along the Y-axis.
When StripeArrangement is set to Geometry_1X_2Y, the driver determines the destination of the second line output by the camera (Line 2 in the above drawing) by using this formula:
BufferBase + (BufferSize + LinePitch - LineWidth) /( 2 * LinePitch) * LinePitch
NOTE: | this is the address of the first line in the second half of the buffer large enough to receive one complete line. |
As a result:
● | If the buffer is too small, the last lines output by the camera (i.e., the bottom part of each half of the image) will be lost; the application is responsible for avoiding this, |
● | Lines will start at |
BufferBase + n * LinePitch,
● | Only complete lines are transferred. (When evaluating the above formula, if LinePitch is equal to 0, LineWidth will be used instead. Similarly, if StripeHeight is 0, 1 will be used instead.) |
● | StripeHeight and StripePitch cannot be set to values greater than 1. |
When StripeArrangement is set to Geometry_1X_3Y, the driver determines the destination of the second line and third lines (Line 2 and Line 3 in the above drawing) by using these formulae:
BufferBase + (BufferSize + LinePitch - LineWidth) /( 3 * LinePitch) * LinePitch
BufferBase + (BufferSize + LinePitch - LineWidth) /( 3 * LinePitch) * LinePitch*2
NOTE: | these arethe addresses of the first line in the second and third regions of the buffer large enough to receive one complete line. |
As a result:
● | If the buffer is too small, the last lines output by the camera (i.e., the bottom part of each region of the image) will be lost; the application is responsible for avoiding this, |
● | Lines will start at |
BufferBase + n * LinePitch,
● | Only complete lines are transferred. (When evaluating the above formula, if LinePitch is equal to 0, LineWidth will be used instead. Similarly, if StripeHeight is 0, 1 will be used instead.) |
● | StripeHeight and StripePitch cannot be set to values greater than 1. |
When StripeArrangement is set to Geometry_1X_2YE, the driver determines the destination of the second line output by the camera (i.e., the position of last image line in the buffer) by using this formula:
BufferBase + (BufferSize + LinePitch - LineWidth) / LinePitch * LinePitch - LinePitch
NOTE: | this is the address of the last line in the buffer large enough to receive one complete line. |
As a result:
● | If the buffer is too small, the last lines output by the camera (i.e., the middle part of the image) will be lost; the application is responsible for avoiding this, |
● | Lines will start at |
BufferBase + n * LinePitch,
● | Only complete lines are transferred. (When evaluating the above formula, if LinePitch is equal to 0, LineWidth will be used instead. Similarly, if StripeHeight is 0, 1 will be used instead.) |
● | StripeHeight and StripePitch cannot be set to values greater than 1. |
See also: Transmission Methods of 1X_2YE Images (Coaxlink series)
● | In the following figures, line numbers and block numbers sent by the device are in white, line numbers and block numbers received by the host are in black. |
● | The values of StripePitch, StripeHeight and StripeOffset must be multiple of BlockHeight value! |
1X_2YM camera delivering lines by blocks of 2
1X_2YM camera delivering lines by blocks of 4
1X_2YM camera delivering lines by blocks of 4 to two hosts