问题描述
该题原因是AE init清空m_u4Hbinwidth、m_u4Hbinheight再赋值的过程中,上层下了setAEMeteringArea(),m_u4Hbinwidth、m_u4Hbinheight为0导致Area计算错误,最终AE收敛发生变化的问题。
Its LOG一般可以看到三次的曝光设定差异太大导致的fail:
Running vendor 3A on device
iso: 137, exposure: 19996000, iso*exp: 2739452000
awb_gains [2.21875, 1.0, 1.0, 1.271484] awb_transform [1.892578, -0.929688, 0.037109, -0.205078, 1.429688, -0.224609, -0.001953, -0.542969, 1.544922]
fd 0.0
Running vendor 3A on device
iso: 137, exposure: 19996000, iso*exp: 2739452000
awb_gains [2.203125, 1.0, 1.0, 1.28125] awb_transform [1.892578, -0.929688, 0.037109, -0.205078, 1.429688, -0.224609, -0.001953, -0.542969, 1.544922]
fd 0.0
Running vendor 3A on device
iso: 131, exposure: 29993000, iso*exp: 3929083000
awb_gains [2.193359, 1.0, 1.0, 1.292969] awb_transform [1.892578, -0.929688, 0.037109, -0.205078, 1.429688, -0.224609, -0.001953, -0.542969, 1.544922]
fd 0.0
AE LOG中可以看到输入全屏的框被换算成一个点。
223456 03-19 15:27:44.467661 18991 19719 D ae_mgr : setAEMeteringArea m_isAeMeterAreaEn=1223457 03-19 15:27:44.467684 18991 19719 D ae_mgr : [setAEMeteringArea():New] AE meter area Idx:0 Left:0 Right:1632 Top:0 Bottom:2448 Weight:1223458 03-19 15:27:44.467699 18991 19719 D ae_mgr : [setAEMeteringArea():Modified] AE meter area Idx:0 Left:-1000 Right:-1000 Top:-1000 Bottom:-1000 Weight:1
解决方案
在setAEMeteringArea()中过滤m_u4Hbinwidth和m_u4Hbinheight为0的情况:
ae_mgr.cpp文件MRESULT AeMgr::setAEMeteringArea()函数中:
- if ((sAEMeteringArea->rAreas[i].i4Right > sAEMeteringArea->rAreas[i].i4Left) && (sAEMeteringArea->rAreas[i].i4Bottom > sAEMeteringArea->rAreas[i].i4Top)){
+ if ((sAEMeteringArea->rAreas[i].i4Right > sAEMeteringArea->rAreas[i].i4Left) && (sAEMeteringArea->rAreas[i].i4Bottom > sAEMeteringArea->rAreas[i].i4Top) && ((m_u4Hbinwidth != 0) && (m_u4Hbinheight != 0))){
// Mapping AE region from Hbin size to [-1000,1000]
q0.mp1:申请ALPS05011001