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.

TDA4VM: DCC Tuning Tool Issue

Part Number: TDA4VM

Tool/software:

Hi Team,

We are integrating IMX662 in TDA4VM in Linux SDK 9_00_02 for our customer and we are in the process of tuning the ISP/VPAC. We have been granted access to the DCC tool. We tried installing the application and faced "MSVCP110.dll" missing error.

We installed all the necessary applications ie. MS Visual Code Redistributable and Matlab r2015b yet the issue persisted. We had to manually copy the files to DCC folder to launch the application. Even then, few plugins ie Color Correction, EE, CFAI+WDR which are necessary for tuning the ISP/VPAC did not launch and throw the below error message.

Can you help us resolve this issue. We have an customer request dependent on this

  • Hi Yoosuf,

    That looks like problem with MCR.
    We are not able to reproduce that issue on our side.

    Could you please check if you have installed all the dependencies below?

    1. MATLAB Compiler Runtime version 9.0 (64-bit) [LINK]
    2. Microsoft Visual C++ 2010 Redistributable Package (x64) [LINK]
    3. Visual C++ Redistributable for Visual Studio 2012 Update 4 (x64) [LINK]
  • If you have trouble with V3.2, could you please try installing V3.1 to confirm if the issue persists in your system?

  • Hi ,

    Could you please check if you have installed all the dependencies below?

    Yes, we have installed all the dependencies. 

    If you have trouble with V3.2, could you please try installing V3.1 to confirm if the issue persists in your system?

    We installed v3.1 also and the issue persisted. 

  • Thanks for the confirmation!

    Copying my friend for her attention.

  • Hi Yoosuf,

    It looks like an issue of loading Matlab runtime properly in your system.

    Could you please check if path is set up correctly for Matlab runtime?

  • Hi ,

    I have verified the path variables, but nothing seems to help and still we are at the same point. 

    Do you have any steps/methods to resolve this? It would be really very much helpful if you could. 

  • Hi Yoosuf,

    This looks like an issue about Matlab and Windows and we don't understand why it happens.
    On the Windows PCs we have at TI, we have not been able to reproduce this behavior.

    Is it possible for to try on a different PC?
    BTW, which Windows version do you have?

  • Hi ,

    Is it possible for to try on a different PC?

    We checked with 2 Windows PC we have and we face similar problem in both the PCs

    BTW, which Windows version do you have?

    We two systems running. One Windows 8.1 and another running 10pro

  • Hi Yoosuf,

    One Windows 8.1 and another running 10pro

    Thanks for the information!
    We only have 10pro at TI.

    My friend is looking at this issue now.
    It is a weird problem which we have not experienced previously with other customers.
    We are not sure yet if it is due to Matlab, Windows upgrade, installation, or any other dependencies.

  • Hi Yoosuf,

    may share with you some debug installer for you to try on your PCs.
    I would recommend trying the new installer and install the tool under your Windows account home folder rather than the default "c:\ti\DCC\".
    Let's see if that makes the tool working properly in your system.

    Please private message Chau to get the debug installer.

  • Hi ,

    I have sent you a request to connect. Can you please share the installer?

  • Hi Yoosuf,

    We shall be able to share the installer with you today.

    Please try installing it under your Windows account folder and let us know if it resolves the Matlab issue.

  • Hi Yoosuf,

    I would like to follow up with you on this topic.

    Are you able to download the test installer and get it to work properly on your PCs?

  • Hi ,

    Sorry for the delay. I was out of office for past few days and was unable to test the application.

    We tried installing the latest tool under "Windows" folder and we are not even able to access the tool properly. It closes as soon as we open a project and provide the sensor details.

    Also we tried installing it under "Program Files" and faced the previously reported "Matlab Runtime" issue.

    We also verified this behavior on two different PCs running Windows 10 pro and Windows 11 pro.

  • Hi Yoosuf,

    We tried installing the latest tool under "Windows" folder and we are not even able to access the tool properly.

    That sounds like a Windows user account issue.

    Could you please install the tool under your own user account?
    That is typically under "C:\Users\your_name\".

    Be default, it is installed at "C:\ti\" and most customers are fine with that.
    If you have any access issue, installing it under your own Windows user account folder may be better.

  • BTW, I have tested both options on my home PC running Windows 10 Home (without any company firewall).
    Both worked OK for me.

  • Hi ,

    We have working on tuning the ISP for the past week. And the here's our observation. The H3A block always sets the exposure and gain to minimum level. And the color reproduction is also little dull.

    Attached the H3A isp patch for reference

    diff --git a/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c b/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c
    index e815cf3..9ce3521 100644
    --- a/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c
    +++ b/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c
    @@ -657,6 +657,8 @@ static int32_t get_ov2312_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms);
     
     static int32_t get_ox05b1s_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms);
     
    +static int32_t get_imx662_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms);                            
    +
     static void gst_tiovx_isp_map_2A_values (GstTIOVXISP * self, int exposure_time,
         int analog_gain, gint32 * exposure_time_mapped,
         gint32 * analog_gain_mapped);
    @@ -706,7 +708,8 @@ gst_tiovx_isp_class_init (GstTIOVXISPClass * klass)
               "                                   SENSOR_ONSEMI_AR0233_UB953_MARS\n"
               "                                   SENSOR_SONY_IMX219_RPI\n"
               "                                   SENSOR_OX05B1S\n"
    -          "                                   SENSOR_OV2312_UB953_LI",
    +          "                                   SENSOR_OV2312_UB953_LI\n"
    +	  "				      SENSOR_SONY_IMX662",
               NULL,
               G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
               GST_PARAM_MUTABLE_READY));
    @@ -1854,6 +1857,8 @@ gst_tiovx_isp_postprocess (GstTIOVXMiso * miso)
           get_ov2312_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);
         } else if (g_strcmp0 (self->sensor_name, "SENSOR_OX05B1S") == 0) {
           get_ox05b1s_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);
    +    } else if (g_strcmp0 (self->sensor_name, "SENSOR_SONY_IMX662") == 0) {             
    +      get_imx662_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);            
         } else {
           get_imx219_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);
         }
    @@ -2066,6 +2071,34 @@ get_ox05b1s_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms)
       return status;
     }
     
    +static int32_t                                                                                
    +get_imx662_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms)                                  
    +{                                                                                             
    +  int32_t status = -1;                                                                        
    +  uint8_t count = 0;                                                                          
    +                                                                                              
    +  g_return_val_if_fail (p_ae_dynPrms, status);                                                
    +                                                                                              
    +  p_ae_dynPrms->targetBrightnessRange.min = 40;                                               
    +  p_ae_dynPrms->targetBrightnessRange.max = 50;                                               
    +  p_ae_dynPrms->targetBrightness = 45;                                                        
    +  p_ae_dynPrms->threshold = 1;                                                                
    +  p_ae_dynPrms->enableBlc = 1;                                                                
    +  p_ae_dynPrms->exposureTimeStepSize = 1;                                                     
    +                                                                                              
    +  p_ae_dynPrms->exposureTimeRange[count].min = 8000;                                           
    +  p_ae_dynPrms->exposureTimeRange[count].max = 16600;                                         
    +  p_ae_dynPrms->analogGainRange[count].min = 0;                                            
    +  p_ae_dynPrms->analogGainRange[count].max = 300;                                            
    +  p_ae_dynPrms->digitalGainRange[count].min = 256;                                            
    +  p_ae_dynPrms->digitalGainRange[count].max = 256;                                            
    +  count++;                                                                                    
    +                                                                                              
    +  p_ae_dynPrms->numAeDynParams = count;                                                       
    +  status = 0;                                                                                 
    +  return status;                                                                              
    +}
    +
     static void
     gst_tiovx_isp_map_2A_values (GstTIOVXISP * self, int exposure_time,
         int analog_gain, gint32 * exposure_time_mapped, gint32 * analog_gain_mapped)
    @@ -2105,6 +2138,9 @@ gst_tiovx_isp_map_2A_values (GstTIOVXISP * self, int exposure_time,
     } else if (g_strcmp0 (self->sensor_name, "SENSOR_OX05B1S") == 0) {
         *exposure_time_mapped = (int) ((double)exposure_time * 2128 * 60 / 1000000 + 0.5);
         *analog_gain_mapped = analog_gain / 64;
    +  }  else if (g_strcmp0 (self->sensor_name, "SENSOR_SONY_IMX662") == 0) {                            
    +      *exposure_time_mapped = exposure_time;
    +      *analog_gain_mapped = analog_gain;                                                   
       } else {
         GST_ERROR_OBJECT (self, "Unknown sensor: %s", self->sensor_name);
       }
    diff --git a/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c b/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c
    index 447fcaf..ffb8e64 100644
    --- a/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c
    +++ b/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c
    @@ -450,6 +450,10 @@ vx_status tiovx_init_sensor(SensorObj *sensorObj, char *objName)
         {
             sensorObj->sensorParams.dccId=5;
         }
    +    else if(strcmp(sensorObj->sensor_name, "SENSOR_SONY_IMX662") == 0)
    +    {                                                                                 
    +        sensorObj->sensorParams.dccId=662;
    +    }  
         else
         {
             TIOVX_MODULE_ERROR("[SENSOR-MODULE] Invalid sensor name\n");

    Also attaching sample image for reference.

  • Hi Yoosuf,

    The H3A block always sets the exposure and gain to minimum level.

    H3A is only for collecting some statistics for AE/AWB.
    It does not set exposure and gain.

    And the color reproduction is also little dull.

    You will need to tune color under various light conditions.

    We are integrating IMX662

    Is your IMX662 working on linear or WDR mode?

    You may follow links below for tuning and AE setup.

    https://www.ti.com/lit/pdf/sprad86

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1304287/faq-am62a7-how-to-use-the-isp-on-am62a

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1331426/faq-am62a7-how-to-modify-and-rebuild-ti-s-2a-algorithm-for-am6xa-processor-sdk-linux

  • Also attaching sample image for reference.

    BTW, the image is not inserted properly for me to see.

  • Hi ,

    Our sensor supports analog gain from 0dB to 30dB which is passed to the sensor in multiples of 10s ie 0 for 0db 10 for 1dB and 300 for 30dB. Similarly the exposure ranges from 60us to 16.6ms and is passed to sensor in us ie 60us to 16600us. We have mapped the values accordingly in get_imx662_ae_dyn_params() in gsttiovxisp.c. Attaching the patch for reference.

    diff --git a/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c b/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c
    index e815cf3..9ce3521 100644
    --- a/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c
    +++ b/opt/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c
    @@ -657,6 +657,8 @@ static int32_t get_ov2312_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms);
     
     static int32_t get_ox05b1s_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms);
     
    +static int32_t get_imx662_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms);                            
    +
     static void gst_tiovx_isp_map_2A_values (GstTIOVXISP * self, int exposure_time,
         int analog_gain, gint32 * exposure_time_mapped,
         gint32 * analog_gain_mapped);
    @@ -706,7 +708,8 @@ gst_tiovx_isp_class_init (GstTIOVXISPClass * klass)
               "                                   SENSOR_ONSEMI_AR0233_UB953_MARS\n"
               "                                   SENSOR_SONY_IMX219_RPI\n"
               "                                   SENSOR_OX05B1S\n"
    -          "                                   SENSOR_OV2312_UB953_LI",
    +          "                                   SENSOR_OV2312_UB953_LI\n"
    +	  "				      SENSOR_SONY_IMX662",
               NULL,
               G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
               GST_PARAM_MUTABLE_READY));
    @@ -1854,6 +1857,8 @@ gst_tiovx_isp_postprocess (GstTIOVXMiso * miso)
           get_ov2312_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);
         } else if (g_strcmp0 (self->sensor_name, "SENSOR_OX05B1S") == 0) {
           get_ox05b1s_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);
    +    } else if (g_strcmp0 (self->sensor_name, "SENSOR_SONY_IMX662") == 0) {             
    +      get_imx662_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);            
         } else {
           get_imx219_ae_dyn_params (&sink_pad->sensor_in_data.ae_dynPrms);
         }
    @@ -2066,6 +2071,34 @@ get_ox05b1s_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms)
       return status;
     }
     
    +static int32_t                                                                                
    +get_imx662_ae_dyn_params (IssAeDynamicParams * p_ae_dynPrms)                                  
    +{                                                                                             
    +  int32_t status = -1;                                                                        
    +  uint8_t count = 0;                                                                          
    +                                                                                              
    +  g_return_val_if_fail (p_ae_dynPrms, status);                                                
    +                                                                                              
    +  p_ae_dynPrms->targetBrightnessRange.min = 40;                                               
    +  p_ae_dynPrms->targetBrightnessRange.max = 50;                                               
    +  p_ae_dynPrms->targetBrightness = 45;                                                        
    +  p_ae_dynPrms->threshold = 1;                                                                
    +  p_ae_dynPrms->enableBlc = 1;                                                                
    +  p_ae_dynPrms->exposureTimeStepSize = 1;                                                     
    +                                                                                              
    +  p_ae_dynPrms->exposureTimeRange[count].min = 8000;                                           
    +  p_ae_dynPrms->exposureTimeRange[count].max = 16600;                                         
    +  p_ae_dynPrms->analogGainRange[count].min = 0;                                            
    +  p_ae_dynPrms->analogGainRange[count].max = 300;                                            
    +  p_ae_dynPrms->digitalGainRange[count].min = 256;                                            
    +  p_ae_dynPrms->digitalGainRange[count].max = 256;                                            
    +  count++;                                                                                    
    +                                                                                              
    +  p_ae_dynPrms->numAeDynParams = count;                                                       
    +  status = 0;                                                                                 
    +  return status;                                                                              
    +}
    +
     static void
     gst_tiovx_isp_map_2A_values (GstTIOVXISP * self, int exposure_time,
         int analog_gain, gint32 * exposure_time_mapped, gint32 * analog_gain_mapped)
    @@ -2105,6 +2138,9 @@ gst_tiovx_isp_map_2A_values (GstTIOVXISP * self, int exposure_time,
     } else if (g_strcmp0 (self->sensor_name, "SENSOR_OX05B1S") == 0) {
         *exposure_time_mapped = (int) ((double)exposure_time * 2128 * 60 / 1000000 + 0.5);
         *analog_gain_mapped = analog_gain / 64;
    +  }  else if (g_strcmp0 (self->sensor_name, "SENSOR_SONY_IMX662") == 0) {                            
    +      *exposure_time_mapped = exposure_time;
    +      *analog_gain_mapped = analog_gain;                                                   
       } else {
         GST_ERROR_OBJECT (self, "Unknown sensor: %s", self->sensor_name);
       }
    diff --git a/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c b/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c
    index 447fcaf..ffb8e64 100644
    --- a/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c
    +++ b/opt/edgeai-tiovx-modules/src/tiovx_sensor_module.c
    @@ -450,6 +450,10 @@ vx_status tiovx_init_sensor(SensorObj *sensorObj, char *objName)
         {
             sensorObj->sensorParams.dccId=5;
         }
    +    else if(strcmp(sensorObj->sensor_name, "SENSOR_SONY_IMX662") == 0)
    +    {                                                                                 
    +        sensorObj->sensorParams.dccId=662;
    +    }  
         else
         {
             TIOVX_MODULE_ERROR("[SENSOR-MODULE] Invalid sensor name\n");

    You will need to tune color under various light conditions.

    We have tuned it under A, D65, D50, CWF, U30, TL84 and Hz color temperature and still the color chart looks dull.

    Is your IMX662 working on linear or WDR mode?

    Our sensor IMX662 is currently working in linear mode.

    You can also have a look at our imx662_properties.txt for refernece.

    SENSOR_ID 662
    PRJ_DIR ../imx662_output
    SENSOR_NAME imx662
    SENSOR_DCC_NAME SENSOR_SONY_IMX662
    
    SENSOR_WIDTH 1920
    SENSOR_HEIGHT 1080
    
    # 0=RGGB; 1=GRBG; 2=GBRG; 3=BGGR, 4=MONO
    COLOR_PATTERN 0
    
    # sensor mode: 0 for linear (no decompanding), 1 for WDR (decompanding)
    WDR_MODE 0
    
    # raw sensor image BIT_DEPTH: it may be 8, 10, or 12 for linear sensors; typically 12 for WDR mode because of companding
    BIT_DEPTH 10
    
    # WDR BIT_DEPTH: WDR raw sensor image bitdepth after decompanding, typically 20 or 24
    WDR_BIT_DEPTH 20
    
    # WDR decompanding knee points (comma separated without spaces in between)
    WDR_KNEE_X 0,512,1408,2176,4095,65535
    WDR_KNEE_Y 0,2048,16384,65536,1048063,1048063
    
    # Sensor black level to subtract before decompanding (for linear sensors only and some Sony WDR sensors)
    BLACK_PRE  50
    
    # Sensor black level to subtract after decompanding (for most WDR sensors and all linear sensors)
    BLACK_POST  0
    
    # GAMMA value for compressing 20/24-bit WDR raw to 16-bit ISP internal
    # typically around 50 (0.5) for 24-bit WDR sensors and 70 (0.7) for 20-bit sensors
    GAMMA_PRE 0
    
    # LSB location for H3A input bit range (from bit-H3A_INPUT_LSB to bit-H3A_INPUT_LSB+9) 
    H3A_INPUT_LSB 15

    We have tested the H3A input LSB between 0 to 26 and still the behavior remains same.

    Can you give us any suggestions for improving the color reproduction. Also let us know if you need any more details from our end

    Thanks.

  • We have tuned it under A, D65, D50, CWF, U30, TL84 and Hz color temperature and still the color chart looks dull.

    The color looks good to me.
    It is just dark.
    White balance is not perfect.

    Our sensor IMX662 is currently working in linear mode.

    Thanks for the confirmation!

    We have tested the H3A input LSB between 0 to 26 and still the behavior remains same.

    Can you give us any suggestions for improving the color reproduction.

    I am not sure if AE is working properly in your system.
    Do you AE changes sensor exposure according to scene brightness?

  • BTW, I suppose your original DCC tuning tool issue is resolved by now.
    I would like to close this thread if that is the case.

    Please start a new thread with proper title for any new issues.

  • Closing this thread for tuning tool installation issue.

    Continuing the discussion about AE/AWB in a new thread.

    e2e.ti.com/.../tda4vm-ae-awb-settling-issue-in-vpac