CX3: Issue in streaming 4912x3684 YUV2 at 5FPS

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GaK_4661021
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

Hi,

We want to stream the 4912x3684 RAW12 data stream from CX3. We are currently using 5FPS for streaming. We are transmitting data to the host system in YUV2 format by updating the required descriptor as suggested in Option A of Streaming RAW10 Format Input Data to 16/24-bit Output Format in CX3 MIPI CSI-2 - KBA224387.

But we are facing issues that on the host side we receive variable framerate sometimes we get 2FPS and sometime 1FPS and sometimes even 0FPS. We are validating streaming using the e-CamView application(We are not able to see clear streaming as actual data is in RAW12 instead of YUV2 but we get the idea that streaming is working or not as we are able to see distorted frames ).

Below is the MIPI configuration structure we are using,

CyU3PMipicsiCfg_t custom_4912_3684 =

{

CY_U3P_CSI_DF_YUV422_8_2 ,  /* CyU3PMipicsiDataFormat_t dataFormat */

    4,                          /* uint8_t numDataLanes */

    2, /* uint8_t pllPrd */

    89, /* uint16_t pllFbd */

    CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */ 

    CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

    CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t parClkDiv */

    0,                 /* uint16_t mClkCtl */

    CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

    4912,         /* uint16_t hResolution */

    50                         /* uint16_t fifoDelay */

};

Below is the Class-specific Uncompressed VS Frame Descriptor in Superspeed descriptor,

0x1E,

CX3_CS_INTRFC_DESCR,

0x05,              

0x01,              

0x00,              

0x64,0x0E,

0x64,0x0E,         

0x00,0x35,0xB7,0x40,

0x00,0x35,0xB7,0x40,

0x20,0x2E,0x9E,0x01,

0x80,0x84,0x1e,0x00,

0x01,              

0x80,0x84,0x1e,0x00,

Can you please help us with the issue? Are we missing anything in the MIPI configuration of CX3?

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

The above configuration is wrong. Please try below:

pastedImage_0.png

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
16 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Please share snippet of 'CX3 receiver configuration' tab of Cx3 configuration tool.

Regards,

Hemanth

Hemanth
0 Likes

Hi,

Thanks for the response. Please find attached screenshot as requested,pastedImage_0.png

0 Likes

Hi,

Is above configuration proper for our requirement? Can you please update on this issue?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

The above configuration is wrong. Please try below:

pastedImage_0.png

Regards,

Hemanth

Hemanth
0 Likes

Thanks for your response.

I have below questions on your suggestion,

1. Are you saying to configure input as YUY2? In our case we have camera that is giving output in RAW12 format.

2. Are you suggesting output configuration as 24bit? In this case do we need to change video descriptor for the same? Do we also need to make sure that host application supports same format?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

1. No, I did not mean to change the input format. As it was YUY2 in the image you shared, I retained the same. If the input format that the sensor streams in your case is RAW12, change the input format in the configuration that I have shared and it will still be valid.

2. Yes output format can be 24 bit. But this does not mean that you should change your video descriptors. Currently can you let me know what format is reported in video descriptors?

Regards,

Hemanth

Hemanth
0 Likes

Currently, we are using YUV2 format for output as we are using 16bit output only. Below is the configuration descriptor for the same,

CyU3PMipicsiCfg_t custom_4912_3684 =

{

CY_U3P_CSI_DF_YUV422_8_2 ,  /* CyU3PMipicsiDataFormat_t dataFormat */

    4,                          /* uint8_t numDataLanes */

    2, /* uint8_t pllPrd */

    89, /* uint16_t pllFbd */

    CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */

    CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

    CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t parClkDiv */

    0,                 /* uint16_t mClkCtl */

    CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

    4912,         /* uint16_t hResolution */

    50                         /* uint16_t fifoDelay */

};

Is it required to change to a 24bit output format for 4K resolution streaming?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

For the resolution you are trying to stream, 24 bit output is necessary. Please note 'output format' means that MIPI block of CX3 will output 3 bytes per PCLK to GPIF block of CX3. It has nothing to do with video format RGB24.

But if you want UVC player to display the video, you need to report YUY2 in the video descriptor instead of RAW12. In that case, you can report the following resolution - 3684 * 3684 * 16 (which is equivalent to 4192 * 3684 * 12).

Regards,

Hemanth

Hemanth
0 Likes

Sure. I understood it.

Will try your suggested configuration and let you know the result.

0 Likes

Hi,

You suggested configuration generated MIPI CSI configuration structure as below,

CyU3PMipicsiCfg_t null_RAW12_Full_12 = 

{

    CY_U3P_CSI_DF_RAW12,  /* CyU3PMipicsiDataFormat_t dataFormat */

    4,                          /* uint8_t numDataLanes */

    2, /* uint8_t pllPrd */

    121, /* uint16_t pllFbd */

    CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */ 

    CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

    CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t parClkDiv */

    0,                 /* uint16_t mClkCtl */

    CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

    4912,         /* uint16_t hResolution */

    50                         /* uint16_t fifoDelay */

};

It indicates output format RAW12 where windows host does not support RAW12 streaming so we might need to replace it with equivalent 24bit output format and I can find CY_U3P_CSI_DF_RGB888 appropriate as per my understanding. Is it correct?

If we use CY_U3P_CSI_DF_RGB888 for output then as per my understanding we need to change below GUID for RGB24 or RGB888. Currently it has below GUID,

/* GUID, globally unique identifier used to identify streaming-encoding format: YUY2  */

0x59, 0x55, 0x59, 0x32, /*MEDIASUBTYPE_YUY2 GUID: 32595559-0000-0010-8000-00AA00389B71 */

0x00, 0x00, 0x10, 0x00,

0x80, 0x00, 0x00, 0xAA,

0x00, 0x38, 0x9B, 0x71,

Can you please suggest appropriate GUID to stream 24bit data?

0 Likes

Hi,

Can you please help with above questions?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

The first member of CyU3PMipicsiCfg_t changed to CY_U3P_CSI_DF_RAW12 as you have changed output format instead of input format. Please keep output format to 24 bit and input format to RAW12.

And in the video descriptor you can mention YUY2 having resolution 3684 * 3684.

Regards,

Hemanth

Hemanth
0 Likes

Hi,

In the above configuration, you have mentioned H-Blanking 408 and V-Blanking 70. As per my understanding, it should come from a camera sensor configuration. So Do I need to update it as per my camera configuration? How does it affect in CX3 MIPI configuration?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Yes I have changed the vertical blanking from 8346 to 70 to get a configuration which can work. You will have to configure the sensor accordingly to have this blanking setting - For configuring the blanking you will have to get inputs from image sensor vendor.

Regards,

Hemanth

Hemanth
0 Likes

Hi,

Can you please help us with above questions?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Please check my previous post.

Regards,

Hemanth

Hemanth
0 Likes