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.

TDA2PXEVM: De-companding 12bit to 16/20bit for HDR sensor

Part Number: TDA2PXEVM

Hi,

I'd like to implement de-companding 12bit to 16bit for HDR sensor which has output of companded 12bit.
But the de-companding LUT works for only 12bit to 12bit not 12 to 16.
The related parameters are following.

pUcObj->IssM2mIspPrm.channelParams[0].operatingMode = ISSM2MISP_LINK_OPMODE_1PASS_WDR;
pUcObj->IssM2mIspPrm.channelParams[0].inBpp =SYSTEM_BPP_BITS12;
pUcObj->IssM2mIspPrm.channelParams[0].decmpBpp = SYSTEM_BPP_BITS16;

My questions are
1) what's the difference between 1PASS_WDR and 2PASS_WDR
    1PASS_WDR is for one-the-fly mode? mem2mem isp should use 2PASS_WDR?

2) When LUT values were changed to 0x000 and 0xfff, the yuv outbut were 0x00 (black) and 0xff (white)
   And bigger than 0xfff (12bit) was the same as 0xfff.
   Is it right that if decmpBpp = SYSTEM_BPP_BITS16, then LUT value can have max. 16bit (0xffff)?

Regards,
HJ Kim

  • 1. Both 1PASS_WDR and 2PASS_WDR are Mem-Mem. The difference between them is how 20->12 bit mapping is done. For sake of simplicity you may ignore 2PASS_WDR and focus on 1PASS_WDR

    2. I don't understand why you are setting all the LUT values to 0x000 and 0xfff. I would suggest working with an experienced 3rd party to help you with WDR tuning
  • The LUT values to 0x000 and 0xfff is not for WDR but for de-companding of IPIPEIF. And the default parameters are used for WDR.

    I can understand the de-companding mechanism by https://e2e.ti.com/support/processors/f/791/t/781815
    When LUT is used for de-companding, it's just 12bit to 12bit conversion and there's no room for 16 or 20bit conversion.
    "decmpBpp" may be unnecessary parameter and I couldn't find it in the source codes of vision SDK and TI driver.
    Can you confirm one?

  • IPIPEIF LUT can do 12->16 or 12->20 conversion too. However, imaging IP blocks can process only 12 bit data. Therefore 16/20 bit data needs to be converted to 12 bit. There are 2 dataflows:

    1-Pass WDR : In this dataflow, the decompanding to 16/20 bits and global tone mapping back to 12 bits in done in 1 shot, using IPIPEIF LUT

    2-Pass WDR : In this dataflow, decompanded 16/20 bits is split into a LONG EXPOSURE (lower 12 bits) and SHORT EXPOSURE (upper 12 bits). Each image is processed separately, combined on IPIPEIF and tone mapped to 12 bits.
  • 1-Pass WDR :
    I think de-companding is just 12-12bit conversion because it doesn't have internal 12-16/20bit conversion which may be necessary for HDR processing.

    2-Pass WDR :
    It didn't work in spite of changing as following. The output image was all black.
    The result was all the same after enabling some commented codes using ISSM2MISP_LINK_OPMODE_2PASS_WDR in vision sdk.
    IssM2mIspPrm.channelParams[0].operatingMode = ISSM2MISP_LINK_OPMODE_2PASS_WDR;
    IssM2mIspPrm.channelParams[0].inBpp = SYSTEM_BPP_BITS12;
    IssM2mIspPrm.channelParams[0].decmpBpp = SYSTEM_BPP_BITS16; /* decmpBpp wasn't used in vision sdk. Is it unimplemented yet? */

    How can I enable 2-Pass WDR?
    I couldn't find reference usecase using 2-Pass WDR in vision sdk. Is it compatible with Onsemi HDR sensors? I'm evaluating one with Onsemi AR0323 and it may have same functionality with AR0231/AR0233 except resolution.
  • 12->12 conversion in 1-PASS WDR does an internal 16/20 bit conversion and then applies a tone map back to 12-bit. Therefore, it is HDR ready.

    You may select 2-Pass WDR by going to ISS settings in UART menu.

  • The result was same after setting it in UART menu. I think UART setting was same with pUcObj->IssM2mIspPrm.channelParams[0].operatingMode = ISSM2MISP_LINK_OPMODE_1/2PASS_WDR;

    De-companding lut was effective with 12bit not 16/20bit, so I assume there are some issues in supporting 16/20bit.

    I opened a new thread, please refer to it.

    https://e2e.ti.com/support/processors/f/791/t/800287