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.

DM385: IPNC 3.8 TI2A alg GBCE/GAMMA sample code

Part Number: DM385

Hi,

We are using custom DM385 + ipnc 3.8 rdk.

When we apply TI2A alg in IssAlg_capt2AProcessTI() function below sample code is commanded.

#if 0
            /*GBCE/GAMMA adjustment Sample Code*/
            output_params.iss_drv_config->ipipe_cfg.gbce_params = (ipipe_gbce_cfg_t* )&gbce_iss_default_params;
            output_params.iss_drv_config->ipipe_cfg.filter_flag |= (IPIPE_GBCE_FLAG);

            static ipipe_gamma_cfg_t gamma_cfg =
            {IPIPE_GAMMA_TBL_512, 0, IPIPE_GAMMA_BYPASS_DISABLE, IPIPE_GAMMA_BYPASS_DISABLE, IPIPE_GAMMA_BYPASS_DISABLE, NULL, NULL, NULL};
            gamma_cfg.red_table = gamma_cfg.green_table = gamma_cfg.blue_table = (int16 *)gamma_iss_default_table;
            ipipe_config_gamma(&gamma_cfg);
#endif

Why its commanded?

Regards,

RAJ M

  • Hello,

    I will notify the IPNC team for help.

    Meanwhile you could search in the e2e for similar issue.

    BR
    Margarita
  • Hello,

    In IPNC RDK 3.8 by default, Gamma table will be updated from DCC binary file and GBCE module is disable (You can verify this by reading the corresponding ISP registers ).

    Using above code, you can override the parameters set from DCC binary file. So to modify GBCE and GAMMA parameters, you can either update the DCC binary or override the settings set by dcc_update function using above code.

    Regards
    Nithin Varghese
  • Hi Nithin Varghese,

    Thanks for your reply.

    We are using AR0330 camera.

    I checked(diff) the DCC binary for both ipnc 3.5 and 3.8. There is no differ (compare).

    When i enable below code snippet there is no change in image?

    #if 0
    /*GBCE/GAMMA adjustment Sample Code*/
    output_params.iss_drv_config->ipipe_cfg.gbce_params = (ipipe_gbce_cfg_t* )&gbce_iss_default_params;
    output_params.iss_drv_config->ipipe_cfg.filter_flag |= (IPIPE_GBCE_FLAG);

    static ipipe_gamma_cfg_t gamma_cfg =
    {IPIPE_GAMMA_TBL_512, 0, IPIPE_GAMMA_BYPASS_DISABLE, IPIPE_GAMMA_BYPASS_DISABLE, IPIPE_GAMMA_BYPASS_DISABLE, NULL, NULL, NULL};
    gamma_cfg.red_table = gamma_cfg.green_table = gamma_cfg.blue_table = (int16 *)gamma_iss_default_table;
    ipipe_config_gamma(&gamma_cfg);
    #endif

    Regards,
    RAJ M
  • Hello,

    Can you please set the enable flag in gbce_iss_default_params structure ? Also you can modify gbce_iss_default_table to some extreme values to see some visible changes in the output.

    Regarding gamma settings,  the sample code simply re-assigns the table address to the structure object which is already modified by the dcc_update in the same function. To verify it is modifying the gamma settings you can set  MSP_IPIPE_GAMMA_BYPASS_ENABLE for all three colour channels or update the the gamma_iss_default_table contents (maybe set first 50 elements to zero).

    Best Regards

    Nithin Varghese

  • Hi,

    Can you please set the enable flag in gbce_iss_default_params structure ? 

    Yes, its disabled by default. Now i tried with enable the flag.

    I have one more clarification on image_partially_over_exposed.

    Is there any specific IPIPE cfg to resolve this?

    Regards,

    RAJ M

  • Hi Raj,

    Sorry for the late reply!.

    First of all you have to verify AE target, and make sure it is not too high. Also you can change the AE metering mode to give more preference to center of the frame. If the pixel is already saturated from senor you can't recover it by ISP processing.

    From SOC side you can try GLBCE module. It can improve the dynamic range of a scene by adaptive tone mapping such that the contents in both the dark and bright regions are visible. One more option is to use data from histogram module and dynamically change GAMMA/GBCE curves to adapt to high dynamic scenes.

    Best Regards

    Nithin Varghese

    Pathpartner Technology

  • Hi Nithin Varghese,

    Thanks for your reply,

    First of all you have to verify AE target, and make sure it is not too high. Also you can change the AE metering mode to give more preference to center of the frame. If the pixel is already saturated from senor you can't recover it by ISP processing.
    

    Sorry we didn't get it. AE target, AE metering mode, where to check.

    1. We are setting min max expo and gain for our sensor

    #ifdef IMGS_MICRON_AR0330
      gTi2aControlParams.aGainMax         = 8000;
      gTi2aControlParams.minExposure    = 100;   
      gTi2aControlParams.stepSize            =  50;    
      gTi2aControlParams.aGainMin          = 1000;  
      gTi2aControlParams.maxExposure   = 33333;

    2. What is this below parameter

    gTi2aControlParams.targetBrightnessMin = 30;

    gTi2aControlParams.targetBrightnessMax = 50;

    gTi2aControlParams.targetBrightness = 40;

    For brightness,contrast,saturation,sharpness we are setting 128 as blow call

    Vcam_setDynamicParamChn(0, &params, VCAM_BRIGHTNESS);

    What is the difference targetBrightness and  VCAM_BRIGHTNESS?

    Regards,
    RAJ M

  • Hi Raj,

    gTi2aControlParams.targetBrightness is the target set for AE and it is used for calculating exposure,gain and digital gain for the scene.
    min and max values defines the convergence region for the stable operation AE algorithm.

    Changing VCAM_BRIGHTNESS simply adds a dc value to the Y channel in ISP.

    Best Regards
    Nithin Varghese