What are you looking for?

Stream Control

Line Padding

The LineWidth and LinePitch features control the line padding.

When LinePitch > LineWidth, the line padding is enabled: the DMA engine leaves LinePitch - LineWidth bytes of padding at the end of each image line.

The values of LineWidth and LinePitch can only be changed when the data stream doesn't own any buffer (i.e., before announcing any buffer, or after all announced buffers have been revoked).

LinePitch can be set to 0 to disable padding after lines.

Stripe padding

Stripes are groups of adjacent lines. A stripe of height 1 is a line.

The StripeHeight and StripePitch features control the stripe padding.

When StripePitch > StripeHeight, the stripe padding is enabled: the DMA engine leaves StripePitch - StripeHeight lines of padding at the end of each stripe.

The values of StripeHeight and StripePitch can only be changed when the data stream doesn't own any buffer (i.e., before announcing any buffer, or after all announced buffers have been revoked).

StripePitch can be set to 0 to disable padding after lines.

Vertical Image Flip

The vertical image flip is controlled by the StripeArrangement feature of the data Stream module.

By default, StripeArrangement is set to 1X_1Y: the vertical image flip is disabled.

When StripeArrangement is set to 1X_1YE, the driver determines the position of the first image line in the buffer by using this formula: BufferBase + (BufferSize + LinePitch - LineWidth) / LinePitch * LinePitch - LinePitch.

As a result:

  • if the buffer is too small, it is the bottom part of the image (as given by the camera) that will be lost;
  • lines will start at BufferBase + n * LinePitch;
  • only complete lines are transferred;
  • if the buffer size is not a multiple of LinePitch bytes, some bytes at the end of the buffer will be left unchanged.

When evaluating the above formula, if LinePitch is equal to zero, LineWidth will be used instead. Similarly, if StripeHeight is zero, 1 will be used instead.