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.

a problem about dm368 h3a module

when i change the winWidth and winHeight of h3a dynamicly, the h3a ae module stop working randomly.  The brightness of image calculated by the ti AE codec is not updated.  when the h3a module is working after the changing of widwidth and winHeight, the brightness of image calculeted by the ti AE codec is unormal which is over 0xFF.

so i wonder how to change the winwidth and winHeight of h3a dynamicly. Thank you

 

  • the following is the code. is there something wrong? Please  

     

    DRV_h3aEnable(DRV_H3A_MOD_AF, 0);
      DRV_h3aEnable(DRV_H3A_MOD_AEWB, 0);
      gDRV_h3aObj.aewbConfig.winStartH = strcDm368BrightParam.ui32H3AStartx;
      gDRV_h3aObj.aewbConfig.winStartV = strcDm368BrightParam.ui32H3AStarty;  

      if((gDRV_h3aObj.aewbConfig.winStartH%2)==0)
      {
       gDRV_h3aObj.aewbConfig.winStartH+=1;
      }
      if((gDRV_h3aObj.aewbConfig.winStartV%2)==0)
      {
       gDRV_h3aObj.aewbConfig.winStartV+=1;
      } 

    gDRV_h3aObj.aewbConfig.winWidth = strcDm368BrightParam.ui32H3AWidth/gDRV_h3aObj.aewbConfig.winNumH;
      gDRV_h3aObj.aewbConfig.winHeight= strcDm368BrightParam.ui32H3AHeight/gDRV_h3aObj.aewbConfig.winNumV;

      gDRV_h3aObj.aewbConfig.winWidth =OSA_align(gDRV_h3aObj.aewbConfig.winWidth,2);
      gDRV_h3aObj.aewbConfig.winHeight =OSA_align(gDRV_h3aObj.aewbConfig.winHeight,2);

      inc_H3a= 2 + OSA_align( (gDRV_h3aObj.aewbConfig.winWidth*gDRV_h3aObj.aewbConfig.winHeight)/(256*2), 2);
      
      if(inc_H3a > 32) inc_H3a =32; // hack to get 5MP working, need to have proper tune fix in 2A
      
      gDRV_h3aObj.aewbConfig.winIncH = inc_H3a;
      gDRV_h3aObj.aewbConfig.winIncV = inc_H3a;
      

      gDRV_h3aObj.info.aewbNumSamplesPerColorInWin =
         ((gDRV_h3aObj.aewbConfig.winWidth  + gDRV_h3aObj.aewbConfig.winIncH - 1)/gDRV_h3aObj.aewbConfig.winIncH) *
         ((gDRV_h3aObj.aewbConfig.winHeight + gDRV_h3aObj.aewbConfig.winIncV - 1)/gDRV_h3aObj.aewbConfig.winIncV);
      
      DRV_h3aSetParams();
      DRV_h3aEnable(DRV_H3A_MOD_AEWB, 1);
      DRV_h3aEnable(DRV_H3A_MOD_AF, 1);