imx8qm mipi csi raw12 Data Storage Problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx8qm mipi csi raw12 Data Storage Problem

3,943 次查看
zoro_li
Contributor I

Now I can get the RAW12 data on IMX8QM

Use this way : sensor -> mipi csi (raw12) -> isi (raw16) -> user

But I found that data seems to have problems.

For example, Sensor raw data is 0x1234, but I get 0x3412,higher and low bytes have an interchange。

How can I modify to solve this problem?

 

0 项奖励
回复
7 回复数

3,929 次查看
joanxie
NXP TechSupport
NXP TechSupport

for imx8qm ISI, you need to shift,

• RAW10 {valid_data, 4’b0} . After right shift 4 bits, you will get the correct image.
• RAW12 {valid_data, 2'b0} . After right shift 2 bits, you will get the correct image.

 

0 项奖励
回复

3,927 次查看
zoro_li
Contributor I

hi  joanxie:

      Thanks for your replay.

      Now my way is to swap high and low bytes and then right shift 2 bits to get correct image.

      I don't know why I need to exchange high and low bytes of data here.

      I feel that there are some problems here.

0 项奖励
回复

3,405 次查看
chendd14
Contributor II

hi zoro_li,

I swaped the high and low bytes, and right shifted 2 bits, then I applied debayering with OpenCV cvtColor(..., ..., cv::COLOR_BayerBG2BGR). After that, I got a gray image., not a colorful one.

Would you please help me find out the problem?

Sensor: IMX577

0 项奖励
回复

3,920 次查看
joanxie
NXP TechSupport
NXP TechSupport

you need to set 16bits as format, then shift two bits to get correct data, ISI doesn't have exchange issue, you need check your source code

 

 

0 项奖励
回复

3,918 次查看
zoro_li
Contributor I

hi:

   My input and output configuration is as follows, is there any problem?

output:

 

 

       {
+               .name           = "SBGGR12",
+               .fourcc         = V4L2_PIX_FMT_SBGGR12,
+               .depth          = { 16 },
+               .color          = MXC_ISI_OUT_FMT_RAW16,
+               .memplanes      = 1,
+               .colplanes      = 1,
+               .mbus_code      = MEDIA_BUS_FMT_SBGGR12_1X12,
        }

 

 

input:

 

 

{
+ .name = "SBGGR12",
+ .fourcc = V4L2_PIX_FMT_SBGGR12,
+ .depth = { 16 },
+ .memplanes = 1,
+ .colplanes = 1,
}

 

 

 

0 项奖励
回复

3,860 次查看
joanxie
NXP TechSupport
NXP TechSupport

which file did you set this? is it the ISI file?

0 项奖励
回复

3,778 次查看
zoro_li
Contributor I

drivers/staging/media/imx/imx8-isi-cap.c

0 项奖励
回复