iMXRT1176 MIPI-CSI2 to UVC reducing the frame buffer's size

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

iMXRT1176 MIPI-CSI2 to UVC reducing the frame buffer's size

跳至解决方案
8,913 次查看
Abisheikv2
Contributor III

Hi,

I'm trying to develop a UVC device with RT1176 processor. While developing we saw that the CSI was using a frame buffer double the size than required. i.e, frame_height*frame_width*4 instead of the required 2. This was to use 24bit Parallel bus. We can't afford frame buffers of that size in our design. So we reduced the bus width to 16 bit and bits per pixel to 2 in CSI receiver's setting (the example source we are using is evkmimxrt1170_csi_mipi_yuv_cm7).

Bits per pixel of camera receiverBits per pixel of camera receiverChanging Databus widthChanging Databus width

When I observe the data, The frames are not proper and UV component is missing.

The one in left is how the actual data looks and the one in right is how we receive in RT1170.

Actual data of a Black frameActual data of a Black frame     Data received in RT1170Data received in RT1170

 

 I tried changing the data format as well but no improvement. I'm not sure what we are missing here. Can someone pls shed some light?

 

Setting MIPI data formatSetting MIPI data format

标记 (4)
1 解答
6,602 次查看
Abisheikv2
Contributor III

Thanks for the support @jeremyzhou. Please add these problems to the reference manual/ Errata. This is not just a limitation but a bug in MIPI-CSI2 pipeline which makes MIPI not useable for almost all formats except two. It can practically support only two formats RGB565 and UYVY type package in YUV422. These two data types have to be received as XRGB8888 and XYUV8888 which requires double the buffer size. We can use PXP to get RGB565 back and YUV422 has to be retrieved using software algorithms which in turn is time consuming and can't use the max potential of the camera.

 

Regards,

Abisheik S.

在原帖中查看解决方案

27 回复数
1,839 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1. The video mux can give out only 24 bits of data so the MIPI-CSI block converts any input data into 24-bit format. Is my understanding right?
-- No, videomux only output 24bit format, not the MIPI-CSI.
2. I can see that MIPI-CSI is not just repacking the data but there is change in value. Can you get me the algorithm or the process happening in MIPI-CSI during conversion ?
-- Unfortunately, the IP is confidential, even to me.

In this case, I think extending the buffer to store 32 bits for a pixel just as csi_mipi_yuv_cm7 demo shows is as workaround to videomux module.
Have a great day.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
1,837 次查看
Abisheikv2
Contributor III

Hi, 

1) That's confusing. As per readme of csi_mipi_yuv_cm7, MIPI_CSI converts YUV422 to YUV888. but according to your message VIDEO MUX converts. Do you mean that the pixel formatting block in the screenshot below does the YUV422 to YUV888 conversion?

Abisheikv2_0-1637228758653.png

2) You've missed the query regarding MJPEG. Pls confirm that also.

 

Regards,

Abisheik.

0 项奖励
回复
1,827 次查看
jeremyzhou
NXP Employee
NXP Employee
Hi, Sorry for my reply late. 1) Do you mean that the pixel formatting block in the screenshot below does the YUV422 to YUV888 conversion? -- Yes. 2) Since MIPI-CSI repacks and converts every data. Is MJPEG possible? If so how to configure it? -- Frankly, I don't know. Have a great day, TIC ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "Mark Correct" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. -------------------------------------------------------------------------------
0 项奖励
回复
1,819 次查看
Abisheikv2
Contributor III

Thanks for the confirmation @jeremyzhou.

1) Do we have any control over the pixel formatting block? I can't find any control registers/explanation in the reference manual? 

2)When I use the CFG_DT_DISABLE register in the Video Mux I can see that it identifies the data type and disables it. Does pixel formatting block do this?

 

Regards,

Abisheik

0 项奖励
回复
1,800 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Do we have any control over the pixel formatting block?
-- No.
2) When I use the CFG_DT_DISABLE register in the Video Mux I can see that it identifies the data type and disables it. Does pixel formatting block do this?
-- I don't think the CFG_DT_DISABLE register can affect the pixel formatting.
Have a great day.
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
6,603 次查看
Abisheikv2
Contributor III

Thanks for the support @jeremyzhou. Please add these problems to the reference manual/ Errata. This is not just a limitation but a bug in MIPI-CSI2 pipeline which makes MIPI not useable for almost all formats except two. It can practically support only two formats RGB565 and UYVY type package in YUV422. These two data types have to be received as XRGB8888 and XYUV8888 which requires double the buffer size. We can use PXP to get RGB565 back and YUV422 has to be retrieved using software algorithms which in turn is time consuming and can't use the max potential of the camera.

 

Regards,

Abisheik S.

1,765 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,
Yes, I'll transfer your advice to the AE team.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复