This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM365 Continuous mode output color problem

Hi all,

i am getting the output as looks like in the image attached in continuous mode where as in one-shot mode getting true color.

i believe the YCbCr values are swapped or some thing like this, i played with various RSZ and IPIPE registers but no result.

As one shot mode i am getting true color, so there must not be any issues with the sensor.

      yuv656-8 bit data

ccdc -------------------> Dm365

  • looks like previewer color pattern is set wrongly.  Similar issue is being discussed upon here, going through the post might help for you.

  • Sujit,

    As discussed offline, the problem is with the few settings that we had in the register configurations. I am listing them here for completion. Please add any more information that might be missed out.

     

    1. IPIPEIF.CFG2 register has to be configured for 8bit/pixel clock input mode. In your configuration, it was set to 16 bit/pixel clock which was causing luma data to be all zeros. the sensor input is 8bit/pixel clock BT656 signalling.

    2. Polarity has to be kept as positive as the sensor is giving HD and VD in positive polarity

    3. Sensor output configuration is YUYV where as DM365 expects it to be UYVY. For this, you need to change the Y8POS bit in IPIPEIF.CFG2 for swapping the Y and CbCr data. Otherwise, you can change the output sequence from your sensor.

    4. Please keep padded resolution coming from the sensor. If you want 1280x1024 output from RSZ, it is better you have 1344x1056  (1280+64)x(1024+32) resolution from the sensor. It gives you flexibility to change your start position from 0,0 to something else also.

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • In addition to Anshuman's suggestions, make sure that IPIPE.SRC_FMT is set properly.

  • Thanks Anshuman,

    i was about to summerize the details of our discussion and close this thread.

    But you have mentioned very clearly what we discussed and implemented from our side.

    In step 3 we followed the second idea of changing the output sequence from our sensor.

  • Hi Anshuman,

    i have come accross similar issue we had discussed in this thread.

    This time the Sensor data is RawBayer 12 bit format. ( IMX 035 Bayer Sensor )

    My out put image is as attached. i tried the suggestions given you last time, but there is no changes in the image.

    How ever i have made the following changes for the RAW BAYER data configuarion.

    1. IMX035 sensor setting has been done via SPI communication.

    2. In User applkication side Resizer setting for resizer single shot configuration i have tried sevarel input and output combinations

                    rszSSConfig.input.pix_fmt = IPIPE_BAYER;          //  IPIPE_BAYER_8BIT_PACK_DPCM; // IPIPE_BAYER_8BIT_PACK_ALAW; // IPIPE_BAYER_16BIT_PACK

                    rszSSConfig.output1.pix_fmt  =  IPIPE_UYVY; //IPIPE_YUV420SP

                    rszSSConfig.output2.pix_fmt = IPIPE_UYVY; //IPIPE_YUV420SP

    3. in DVSDK side i have tried with V4L2_PIX_FMT_SBGGR8 and   V4L2_PIX_FMT_SBGGR16 

                     fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR8;             // V4L2_PIX_FMT_SBGGR16 //V4L2_PIX_FMT_UYVY;

    4.  Kernel side

    Davinci_vpfe.c

                    vid_capture_interface_type  if_type = INTERFACE_TYPE_RAW

                    ccdc_hw_if_type     vpfe_if =  CCDC_RAW_BAYER;

                    ccdc_hw_if-> set_hw_if_type(CCDC_RAW_BAYER);

    Ccdc_Dm365.c

                    static enum ccdc_data_pack data_pack = CCDC_DATA_PACK12;   //CCDC_DATA_PACK12 // CCDC_DATA_PACK8

                    ccdc_module_params ccdc_module_defaults   .corr_shft = CCDC_4BIT_SHIFT,    //CCDC_NO_SHIFT,

                    .compress = {
                     .alg = CCDC_ALAW, // CCDC_DPCM, //CCDC_NO_COMPRESSION,  }

                    VDINT0 = 0;

    Dm365_ipipe.c       

                   at ipipe_process_pix_fmts() my  data path format comes inside

                                              ipipe_dpaths_fmt = IPIPE_RAW2YUV

                  inside calculate_line_length() i have modified the folling as i was getting error

                                             //if ((pix == IPIPE_UYVY) || (pix == IPIPE_BAYER))
                                             if ((pix == IPIPE_UYVY) || (pix == IPIPE_BAYER) || (pix == IPIPE_BAYER_8BIT_PACK)
                                                  || (pix == IPIPE_BAYER_8BIT_PACK_ALAW) || (pix == IPIPE_BAYER_8BIT_PACK_DPCM)
                                                  || (pix == IPIPE_BAYER_12BIT_PACK))

                 in rsz_validate_input_image_format()

                                            //if (pix != IPIPE_UYVY && pix != IPIPE_420SP_Y && pix != IPIPE_420SP_C) {
                                              if (pix != IPIPE_UYVY
                                                  && pix != IPIPE_420SP_Y
                                                  && pix != IPIPE_420SP_C
                                                  && pix != IPIPE_YUV420SP
                                                  && pix != IPIPE_BAYER
                                                  && pix != IPIPE_BAYER_8BIT_PACK
                                                  && pix != IPIPE_BAYER_8BIT_PACK_ALAW
                                                  && pix != IPIPE_BAYER_8BIT_PACK_DPCM
                                                  && pix != IPIPE_BAYER_12BIT_PACK) {

               inside   configure_resizer_in_ss_mode() 

                                                 ipipeif_param.source = SDRAM_RAW;  /* SDRAM_YUV; */

                                                 ipipe_dpaths_fmt = IPIPE_RAW2YUV;   /* IPIPE_YUV2YUV; */

    please suggest me where i went wrong.

  • Anshuman,

    I met the same problem as Sujit when I using continuous mode to capture BT656/8bit signal. The color  of image that get from resize is whole red. But under the one-shot mode(ISIF->DDR), I can get perfect UYVY images from DDR.

    I think If the sensor output is YUYV, in one-shot mode, the output data of ISIF should be YUYV too. But actually the image data is UYVY. Does that mean the sensor output data is UYVY. Thanks.

    Regards,

    zhou