Hello again,
Going deeper in the IPNC application driver customisation for my YUV422 camera, i am struggling to get resizer output nice images.
The drv_resz.c code takes a VGA yuv image in input from sdram (stored as 8 bits per pixel clock, one component per clock, in the order Y, U, Y, V) and sends it through the IPIPEIF and then to the RESIZER for resizing in two pipes : one is a test for 1:1 resizing and the second is a QVGA resizing.
There are many parameters to play with and it appears that my images are not proper in output viewer.
First of all, if I try to set the IPIPEIf correctly :
gDRV_reszObj.inSrcConfig.inputSource2 = CSL_IPIPEIF_INPUT_SOURCE_SDRAM_YUV;
gDRV_reszObj.inSrcConfig.isifInType = CSL_IPIPEIF_ISIF_INPUT_TYPE_YUV;
since inType==DRV_DATA_FORMAT_YUV I set :
gDRV_reszObj.inConfig.inputDataPath = CSL_RSZ_INPUT_DATA_PATH_IPIPEIF; //Data is to be passed through IPIPEIF to RSZ
I still have concerns with the following parameters. Unpack Mode and rawDataShift. It looks like that the application is only waiting for YUV420 or pure RAW bayer sensors.
I have the default parameters :
gDRV_reszObj.ddrInConfig.rawUnpackMode = CSL_IPIPEIF_SDRAM_IN_RAW_UNPACK_MODE_NORMAL_16;
gDRV_reszObj.ddrInConfig.rawDataShift = CSL_IPIPEIF_SDRAM_IN_DATASHIFT_BITS_11_0;
What to put in them ?
Since a pixel is the equivalent of 2bytes do i need to keep the unpackmode16 ?
For the second parameter it looks like there will be a truncating of data. So do I need to put CSL_IPIPEIF_SDRAM_IN_DATASHIFT_BITS_7_0 if we consider 8bits per pixel clock is the reference, or is this parameter will be set apart by the hardware since input format is yuv ? I have not found the CSL_IPIPEIF_SDRAM_IN_DATASHIFT_BITS_NOBITS to keep the 16 bits (if pixels are 16bits packed and processed) ?
There is also a problematic info. It is in the datasheet VPFE sprufg8a.pdf. At the page of ImagePipeIF and modes. Paragraph 4.6.5: SDRAM YCbCr4:2:2 Input Mode.
"When the input source is YCbCr4:2:2 data from the SDRAM read buffer interface, the data is expected to be stored as 16bits in memory, so there is no shifting or other preprocessing done".
So what do we need to do with this info. In this sentence what means data ? a whole pixel (16bits Y+U or Y+V) , or only a 8bits pixel component stored on 16bits(Y, or, U, or V?).
And how to get rid of the shifting ?
For test I input a YUV8 4:2:2 colour bar captured by the drv_isif example program.
Thank you for your help.