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.

Does TI or Appro 2A library support SONY IMX122?

Hi all:

    We got Appro IPNC_DM368_IMX122_2.6_Release20130417 software package.But when we compile and  test it.

we found error result.

And when the ipnc display black and white color video, it displays right.

So what's wrong with it?

thank you very much.

  • I think you have Y/C swapped, there is a register for it (YCINSWAP) and also for moving the MSB of the input data.

  • Thank you for your quick reply.We tried and found that when we disable 2A function of TI or Appro,the video is ok.If we enable 2A function, the color of video is wrrong.

    So whether does  2A library of TI or Appro support sony imx122?

  • It sounds like you just need to dig through the settings in the software when 2A is enabled to see what data format the 2A is expecting - I cannot tell you the exact thing to edit as there is so much undocumented code in the SDK, but if you search/grep for things like "YUV" or "format" in the code you will find lots of different variables to change. Just remember to change one at a time & make a note of the original / working values in the code!

  • Hi,

         2A generally deals with raw rgb data not with YUV data. But from your case I suppose you are dealing with raw rgb only. Kindly check. If that is the case kindly tune the external parameters of the sensor with the 2a algorithm/library. You can find the details in alg_aweb.c

    Regards

    Faizel

  • thank you for your advice.we will try it.

  • Hi,

        Recently we test IMX122 sensor  .We found that R、G、B color in the dark place can display separate correctly.But the color of bright place  appears wrong,such as pink color. And we changed some variables about RGB gain  in the alg_aewb.c file,such as:

     Aew_ext_parameter.EngineerCfg.AwbCfg.IsUpdateCal = 1;

     Aew_ext_parameter.EngineerCfg.AwbCfg.LDegree = 2800;

     Aew_ext_parameter.EngineerCfg.AwbCfg.LRgain = 203;  

    Aew_ext_parameter.EngineerCfg.AwbCfg.LBgain = 408;  

    Aew_ext_parameter.EngineerCfg.AwbCfg.HDegree = 6000; //6500

     Aew_ext_parameter.EngineerCfg.AwbCfg.HRgain = 323;

     Aew_ext_parameter.EngineerCfg.AwbCfg.HBgain = 198;

     Aew_ext_parameter.EngineerCfg.AwbCfg.Global_Rgain = 100;

     Aew_ext_parameter.EngineerCfg.AwbCfg.Global_Ggain = 100; 

     Aew_ext_parameter.EngineerCfg.AwbCfg.Global_Bgain = 100; 

     But the color still appears wrong.I guessed the IMX122 overexposure.

    So what variable or what file should be changed?

    Thank you very much

  • Hi,

         This is not due to over exposure. I don't have any experience with DM368 and the reference design mentioned. Still I would like to know the some of the details which might be useful in this with my experience on DM365. 

    1. When you tell low light the image is correct. Is the video black and white there?

    2. Kindly check your compilation rules to properly include the selected sensor and other options in the compilation?

    3. If we disable the AEWB algorithm, how is the video quality?.

    Regards

    Faizel K B

  • Zhang lei -  I'm sure your problem is to do with the order of the bits in your YUV data, there are many ways it can be different: 8/10/12/16-bit, compressed, MSB/LSB in different places, etc... I found many references to it (not very well explained / documented) in the SDK source code.

    A few examples:

    inDataConfig.inDataType = CSL_CCDC_IN_DATA_TYPE_YUV16 in drv_isif.c

    gDRV_ipipeObj.ipipeSetup.dataPath = CSL_IPIPE_IPIPE_DATA_PATH_YCBCR_IN_YCBCR_RGB_OUT in  drv_ipipe.c

    If you grep through the source code for "YUV" you will find lots of references, also in the data sheets.

  • Hi,

     Today we captured one picture from our ipnc,

    in this picture, black ,red and blue color displays correctly.Green color are wrong.

    So we guessed that something about aewb is wrong .But we wonder what registers of imx122 or what variables in the alg_aewb.c file should be modified?

    Thank you very much.

  • AEWB is Auto Exposure + White Balance, I really don't think it's related to your problems.