Camera resolution alignment issue

Hi,

I am currently porting the IMX219 camera to run on the HSB.

I am encountering image anomalies when configuring it for a resolution of 3280x2464.

The image appears normal when using 1920x1080 resolution.

We suspect that the FPGA requires the resolution to be aligned according to specific requirements.

Could you provide more details of your setup? Which platform are you running on, which OS + version, confirm which HSB board & FW, holoscan-sensor-bridge SDK version for tracing, and which bit depth for the modes?

To address your suspicion, yes there’s an alignment requirement – at least 8-byte alignment is generally require but possibly more depending on the answers to the above.

Hi, jbonde

Here are the details of my runtime environment:

Platform: Jetson Thor

OS: JetPack 7.2

HSB FPGA: Lattice CertusPro NX (custom FPGA firmware)

SDK Version: holoscan-sensor-bridge [2.5.0]

Bit Depth: RAW10

Thanks for the information.

On this platform, if you are using the Linux*ReceiverOps, You should only need to have 8-byte alignment per image/CSI-2 row (pad up to 8-byte alignment) and this is largely enforced in the mainline FPGA image. If your custom FW is also affecting the frame metadata, note that it must be on a 128-byte alignment in order for the receivers to properly interpret the frames (mostly sizes/frame strides). If you are attempting to use the accelerated frameworks on this platform (Sipl/Fusa operators), you will additionally have to have each line be 64-byte aligned instead of the 8-byte. That might be related to your other question.

As an aside, there were quite a few changes both on the HSB SDK side 2.5.0 and from JP7.1–>JP7.2 and I highly recommend moving to 2.7.0.

Hi, jbonde

When testing the IMX219, I did not enable the HSB packetizer, so the FPGA outputs data in the standard CSI-2 RAW10 format.

The 3280x2464 resolution is not 8-bit aligned and requires padding to achieve 8-bit alignment. Does this type of resolution—requiring padding—necessitate special handling at the receiving end?

Thank you for the suggestion, I will test it again using HSB SDK version 2.7.0.

Does this type of resolution—requiring padding—necessitate special handling at the receiving end?

Generally, yes. You will need to make sure the CsiToBayerOp, PackedFormatConverter, or custom operators are aware of the pitch in the image lines affected by whether the packetizer is enabled or not.