AR0231 GMSL Camera RAW format memory layout

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.5.0.7774
other

Host Machine Version
native Ubuntu 18.04
other

We want to test some software ISP on Drive AGX, first step is to get raw image from nvmedia ICP. We can get raw image of AR0231 sensor on Sekonix SF3324 Camera module using nvmipp_raw with --save-raw flag on.

Step 1, we remove top embedded lines from raw buffer to get pixel data only.
Step 2, we right shift each pixel data (16 bit) to remove 4 zero padding bits because AR0231 is raw12 bit data type. But diff from original pixel value and right shift value is slightly different (please see our debug code).

So my question is:

  • In theory, I think diff value must be zero, is that correct?
  • Right shift 4 bit is enough or we need another bit operation (flip, …) to decode raw image buffer?

I have attach raw buffer and our debug code
test_raw_desay.py (1.5 KB)
new_test.raw (4.4 MB)

I also view below topic, but it not help:

Dear @v.vuongct12,
We will check internally and update you soon

Hi @SivaRamaKrishnaNV,
Any update from your team?

Dear @v.vuongct12,
AFAIK, The output of VI in this case is stored in the lower 12 bits so I think there is no need to right shift.
I am confirming the same internally and waiting for an update. I will update you as soon as possible.

Dear @v.vuongct12,
right shift 4 bits should be fine.
when save RAW12 the 4 LSBs are not 0 padding, they are replicate of MSBs.

Thank you @SivaRamaKrishnaNV .

1 Like