注意(2020-07-20):之前以为这个是MTK的隔行扫描防抖,其实并不是,MTK平台并不支持隔行扫描防抖,下面说的方法,其实是MIPI CSI收到数据之后,传给ISP的过程中,每N(1~8)帧,才传一帧,相当于丢帧,用于“high speed video”场景!
MT6580修改文件: ./vendor/mediatek/proprietary/hardware/mtkcam/legacy/platform/mt6580/hal/sensor/seninf_drv.cpp
int SeninfDrvImp::setTg1ViewFinderMode(
unsigned long spMode
)
{
int ret = 0;
isp_reg_t *pisp = (isp_reg_t *) mpIspHwRegAddr;
LOG_MSG("[setTg1ViewFinderMode] \n");
//
ISP_BITS(pisp, CAM_TG_SEN_MODE, CMOS_EN) = 1;
ISP_BITS(pisp, CAM_TG_SEN_MODE, SOT_MODE) = 1;
ISP_BITS(pisp, CAM_TG_VF_CON, SPDELAY_MODE) = 1;
ISP_BITS(pisp, CAM_TG_VF_CON, SINGLE_MODE) = spMode;
//ISP_BITS(pisp, CAM_TG_VF_CON, SP_DELAY) = spDelay;
//消除隔行扫描抖动
ISP_BITS(pisp, CAM_TG_VF_CON, FR_CON) = 0x01;
return ret;
}
MT6739修改文件: ./vendor/mediatek/proprietary/hardware/mtkcam/drv/src/sensor/mt6739/seninf_drv.cpp
int SeninfDrvImp::setTgViewFinderMode(
unsigned int tgSel, unsigned long spMode
)
{
int ret = 0;
//isp_reg_t *pisp = (isp_reg_t *) mpIspHwRegAddr;
isp_reg_t *pisp = (isp_reg_t *) mpIspHwRegBaseAddr[tgSel];
LOG_MSG("[setTgViewFinderMode](%u) sp mode = %lu\n", tgSel, spMode);
ISP_BITS(pisp, CAM_TG_SEN_MODE, CMOS_EN) = 1;
ISP_BITS(pisp, CAM_TG_SEN_MODE, SOT_MODE) = 1;
ISP_BITS(pisp, CAM_TG_VF_CON, SPDELAY_MODE) = 1;
ISP_BITS(pisp, CAM_TG_VF_CON, SINGLE_MODE) = spMode;
//ISP_BITS(pisp, CAM_TG_VF_CON, SP_DELAY) = spDelay;
//消除隔行扫描抖动
ISP_BITS(pisp, CAM_TG_VF_CON, FR_CON) = 0x01;
return ret;
}
这里设置的寄存器的bits,为如下寄存器: