imx8qm mipi csi raw12 Data Storage Problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8qm mipi csi raw12 Data Storage Problem

2,642件の閲覧回数
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?

 

ラベル(1)
0 件の賞賛
返信
7 返答(返信)

2,628件の閲覧回数
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 件の賞賛
返信

2,626件の閲覧回数
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 件の賞賛
返信

2,104件の閲覧回数
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 件の賞賛
返信

2,619件の閲覧回数
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 件の賞賛
返信

2,617件の閲覧回数
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 件の賞賛
返信

2,559件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

2,477件の閲覧回数
zoro_li
Contributor I

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

0 件の賞賛
返信