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: TDA4VM: ISP Digital Gain Support for AE Control on TDA4VM

Part Number: TDA4VM

Hi TI Team,

We are currently working on an upcoming onsemi sensor with the TI TDA4VM platform and are facing an issue related to AE exposure control.

Our requirement is to operate the sensor using only two exposure times 10 and 20 ms with no intermediate values. But, one limitation we are encountering is that sensor gain control is fixed based on the sensor settings.

So for now our expoosure table looks like this

//exposure range 1 -- 10 msec integration time
p_ae_dynPrms->exposureTimeRange[count].min = 10000;
p_ae_dynPrms->exposureTimeRange[count].max = 10000;
p_ae_dynPrms->analogGainRange[count].min = 1024;  //1024 => 1x
p_ae_dynPrms->analogGainRange[count].max = 2047;  //2x

p_ae_dynPrms->digitalGainRange[count].min = 256;
p_ae_dynPrms->digitalGainRange[count].max = 256;
count++;

//exposure range 2 -- 20 msec integration time
p_ae_dynPrms->exposureTimeRange[count].min = 20000;
p_ae_dynPrms->exposureTimeRange[count].max = 20000;
p_ae_dynPrms->analogGainRange[count].min = 1024;
p_ae_dynPrms->analogGainRange[count].max = 1024;

p_ae_dynPrms->digitalGainRange[count].min = 256;
p_ae_dynPrms->digitalGainRange[count].max = 256;
count++;
    

In the first entry, we apply gain up to 2x to ensure a smooth transition between 10 ms and 20 ms. Since sensor-side gain control is not available, we want to confirm whether TDA4 ISP provides an option for digital gain. If so, how this can be utilized.

Thank you for your support.

Thanks

  • Hi,

    Kindly expect a delay in response due to the regional holiday on 16th Feb.

    Best Regards,
    Sudheer

  • Hi Anurag,

    Our requirement is to operate the sensor using only two exposure times 10 and 20 ms with no intermediate values. But, one limitation we are encountering is that sensor gain control is fixed based on the sensor settings.

    It looks like your sensor can only support either 1x or 2x gains and not anything in between.
    Do you have in-sensor AWB gains?
    That might be used as in-sensor digital gains if you apply AWB gains in TDA4 ISP.

    we want to confirm whether TDA4 ISP provides an option for digital gain. If so, how this can be utilized.

    From the H/W perspective, TDA4 VISS can support digital gain.
    But, as most sensors support digital gain, TDA4 SDK does not have the S/W and driver for using the digital gain in VISS.

    The simplest digital gains you may use is the AWB gains after NSF4 in VISS.
    If you apply AWB gains in your sensor supports in-sensor AWB gains, then you may use NSF4-AWB gains for digital gain.

    This is how AEWB kernel sends out the gain values to VISS kernel.

    https://git.ti.com/cgit/processor-sdk/imaging/tree/kernels/aewb/arm/vx_aewb_target.c?h=main#n928

    If you don't have in-sensor AWB gains either, then it is possible to combined both the digital gains and AWB gains together.
    But, there is a limitation of the max gain of 8.0x by default that we can apply at NSF4-AWB.
    That might not be enough for AWB and 2x AE combined together under some lights.

  • Hi Gang,

    For now, the sensor supports only 1x gain—not even 2x. The exposure table referenced above reflects our requirement, as we need a smooth transition between 10 and 20 ms exp time.

    That said, we do have sensor-side white-balance gains, which we plan to use for WB. For digital gain, we will rely on the ISP white-balance gain.

    This raises one additional question. When we dump a raw image, digital gain is not applied, since digital gain comes later in the ISP during the AWB stage. If we simulate a raw image on TDA4 HW by feeding it into VISS, how should this digital gain be applied in that processing flow?

    Thanks
    Anurag

  • Hi Anurag,

    That said, we do have sensor-side white-balance gains, which we plan to use for WB. For digital gain, we will rely on the ISP white-balance gain.

    That sounds good to me and should work.

    This raises one additional question. When we dump a raw image, digital gain is not applied, since digital gain comes later in the ISP during the AWB stage. If we simulate a raw image on TDA4 HW by feeding it into VISS, how should this digital gain be applied in that processing flow?

    Which application do you use for that simulation?

    For the openvx VISS kernel, there is a "ae_awb_result" input for AWB gains.

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-j722s/latest/exports/docs/tiovx/docs/user_guide/group__group__vision__function__vpac__viss.html#gaaa4e6e4ce0061cb6522c2bbb474c5a8a

    If you use the single-cam app, you may manually change the AWB output gains in AEWB kernel code for simplicity.