1 2 Previous Next 16 Replies Latest reply on Aug 11, 2020 10:12 PM by HemanthR_06

    CX3: Issue in streaming 4912x3684 YUV2 at 5FPS

    GaK_4661021

      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?

        • 1. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
          HemanthR_06

          Hi,

           

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

           

          Regards,

          Hemanth

          • 2. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
            GaK_4661021

            Hi,

             

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

            • 3. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
              GaK_4661021

              Hi,

               

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

              • 4. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                HemanthR_06

                Hi,

                 

                The above configuration is wrong. Please try below:

                 

                Regards,

                Hemanth

                • 5. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                  GaK_4661021

                  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?

                  • 6. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                    HemanthR_06

                    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

                    • 7. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                      GaK_4661021

                      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?

                      • 8. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                        HemanthR_06

                        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

                        • 9. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                          GaK_4661021

                          Sure. I understood it.

                           

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

                          • 10. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                            GaK_4661021

                            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?

                            • 11. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                              GaK_4661021

                              Hi,

                               

                              Can you please help with above questions?

                              • 12. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                                HemanthR_06

                                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

                                • 13. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                                  GaK_4661021

                                  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?

                                  • 14. Re: CX3: Issue in streaming 4912x3684 YUV2 at 5FPS
                                    HemanthR_06

                                    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

                                    1 2 Previous Next