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.

TDA3XEVM: Capture upper 8-bits of monochrome RAW10 as U8

Part Number: TDA3XEVM
Hi,

We have some questions about the capture module of the TDA3.
 
We are using a monochrome image sensor using CSI2. These sensors work at RAW10.
 
We got a capture-CSI2-display-HDMI loopback example to work on the TDA3EVM but the captured image is stored in U16 format (i.e. stored in 10 bit LSB. upper 6 bits are 0)
 
Because our algorithm is optimized for working in U8. We would like to capture these monochrome images as RAW8 (i.e. shift right two bits) and store it in U8 format.
 
What we've tried:
  1. We've tried to store these as U8 by setting the packing to U8 in the CAL module but the lower 8-bits of the RAW10 are stored and there is no shift by 2. We might be able to compensate for this by lowering the gain in the sensor by 1/4 but we have not tried this.
  2. Use the ISP to convert it to YUV402 and use the Y component as this is stored as U8. However we do not understand the implication of the Bayer RGGB conversion forced upon the IPIPE module. We do not know how much quality degradation this will give us in the end.

We have the following questions:
  1. Is there a simple way of capture monochrome RAW10 directly from sensor and store these as U8 shifted right by 2. Would it be possible to configure a DMA to do this conversion?
  2. Is there a way of treating the incoming monochrome RAW10 without the Bayer filtering?
  3. How is the Bayer filtering affect our monochrome input?
  4. Is there any other recommended way of handling this?
Thanks in advance
Jean
  • Hi Jean,

    Please find answers to your questions below.

    1, Not possible from the capture. Capture cannot right shift the input and store it in 8bit format.

    2, there is another way. You could use ISP to just convert 10bit data to 8bit format. You could bypass all processing in ISP and just enable shift in either ISIF or IPIPEIF. this is not tested, but i think it should be possible.

    Rgds,

    Brijesh

  • Hi Brijech,

    Thanks for your support.

    Chapter 7.3.3.9.16 in the Technical References Manual shows the different formats that can be outputted from the ISIF module.

    When browsing through the fvid2 (vpshal_issisif.h) it seems that there is no driver for this.

    Is there any driver or example (pseudo code, etc.) available for the ISIF module that covers this area ? I do not mind if there is anything untested.

    I'll start experimenting with the module to see if I can get a dump to the SDRAM.

    Thanks

    Jean

  • Hi Jean,

    ISIF write path is not recommended to be used. 

    You could bypass functionalities in IPIPE and Resizer and get the output from Resizer.

    Rgds,

    Brijesh

  • Hi Brihesh,

    I managed to get the ISIF to dump my RAW picture and it seems to work. Is there any major drawbacks with this solution?

    We use the IPIPE and Resizer to get a simultaneous debug view of our sensor out to the HDMI at the moment.

    Thanks

    Jean

  • Hi Jean,

    It will work in normal case, but in high DDR bandwidth usecase, it is not recommended to enable ISIF output.

    When simultaneous output, do you enable any ISIF functionality or IPIPEIF functionality? Because they can potentially change the pixel values and you might not get the original 8bit value.

    Rgds,

    Brijesh

  • Hi Brijesh.

    I believe I have IPIPEIF and ISIF function turned off.

    I use the pattern generated in the sensor itself to compare the the RAW10 U16 captured from the CAL module with the U8 stored image from the ISIF. It seems to be equal when I do a memory compare and when I view the dumped image on the PC.

    I think that I'll keep this config for now and use this for our development.

    Thanks

    Jean