MTK平台修改双摄遮挡阈值

这段逻辑的code在
/vendor/mediatek/proprietary/hardware/mtkcam/aaa/source/mt6757/wrapper/Hal3ARawImp.cpp

 

rResult.i4StereoWarning = 0;
#if CAM3_STEREO_FEATURE_EN
if (ISync3AMgr::getInstance()->isActive())
{
MINT32 i4Master = ISync3AMgr::getInstance()->getMasterDev();
MINT32 i4Slave = ISync3AMgr::getInstance()->getSlaveDev();
if(i4Master == m_i4SensorDev)
{
// large lv diff
MINT32 i4LvMaster = IAeMgr::getInstance().getLVvalue(i4Master, MTRUE);
MINT32 i4LvSlave = IAeMgr::getInstance().getLVvalue(i4Slave, MTRUE);
rResult.i4StereoWarning |= ((abs(i4LvMaster - i4LvSlave) > 50) ? 0x1 : 0);
// low light
rResult.i4StereoWarning |= ((max(i4LvMaster, i4LvSlave) < 10) ? 0x2 : 0);
// close shot
MINT32 i4FocusDistance = IAfMgr::getInstance().getAFBestPos(i4Master);
MINT32 i4MaxFocusDistance = IAfMgr::getInstance().getMaxLensPos(i4Master);
MINT32 i4MinFocusDistance = IAfMgr::getInstance().getMinLensPos(i4Master);
if(i4FocusDistance > (i4MaxFocusDistance - (i4MaxFocusDistance - i4MinFocusDistance) / 5))
rResult.i4StereoWarning |= 0x4;

CAM_LOGD_IF(m_3ALogEnable,
"[%s] warning(%d) lv(%d,%d), fd(%d,%d,%d)", __FUNCTION__, rResult.i4StereoWarning, i4LvMaster, i4LvSlave, i4FocusDistance, i4MaxFocusDistance, i4MinFocusDistance);
}
}
#endif

 

你可能感兴趣的:(camera)