Camera代码疑问
时间:10-02
整理:3721RD
点击:
以mt9p017为例:
在MT9P017GetInfo里面:
...
switch (ScenarioId)
{
case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
case MSDK_SCENARIO_ID_VIDEO_CAPTURE_MPEG4:
psensorInfo->SensorClockFreq=26;
pSensorInfo->SensorClockDividCount= 3;
pSensorInfo->SensorClockRisingCount= 0;
pSensorInfo->SensorClockFallingCount= 2;
pSensorInfo->SensorPixelClockCount= 3;
pSensorInfo->SensorDataLatchCount= 2;
CMMCLK为26,PCLK为多少?26*3=78?
CMMCLK除了设置为26外,还可以设置哪些?是从哪个source分频得到的?
平台为6577.
在MT9P017_preview_setting里面:
...
MT9P017_write_cmos_sensor(0x0300, 0x08); //vt_pix_clk_div = 8
MT9P017_write_cmos_sensor(0x0302, 0x01); //vt_sys_clk_div = 1
MT9P017_write_cmos_sensor(0x0304, 0x02); //pre_pll_clk_div = 2
MT9P017_write_cmos_sensor(0x0306, 0X20); //pll_multiplier = 32
MT9P017_write_cmos_sensor(0x0308, 0x08); //op_pix_clk_div = 8
MT9P017_write_cmos_sensor(0x030A, 0x01); //op_sys_clk_div = 1
preview时,CMMCLK是26,PCLK通过计算为52(从sensor的规格书上推算出来),那么就有一个问题:GetInfo应该是设置ISP的寄存器的,preview_setting是设置sensor的寄存器的,而pclk却不同?为什么?
在MT9P017GetInfo里面:
...
switch (ScenarioId)
{
case MSDK_SCENARIO_ID_CAMERA_PREVIEW:
case MSDK_SCENARIO_ID_VIDEO_PREVIEW:
case MSDK_SCENARIO_ID_VIDEO_CAPTURE_MPEG4:
psensorInfo->SensorClockFreq=26;
pSensorInfo->SensorClockDividCount= 3;
pSensorInfo->SensorClockRisingCount= 0;
pSensorInfo->SensorClockFallingCount= 2;
pSensorInfo->SensorPixelClockCount= 3;
pSensorInfo->SensorDataLatchCount= 2;
CMMCLK为26,PCLK为多少?26*3=78?
CMMCLK除了设置为26外,还可以设置哪些?是从哪个source分频得到的?
平台为6577.
在MT9P017_preview_setting里面:
...
MT9P017_write_cmos_sensor(0x0300, 0x08); //vt_pix_clk_div = 8
MT9P017_write_cmos_sensor(0x0302, 0x01); //vt_sys_clk_div = 1
MT9P017_write_cmos_sensor(0x0304, 0x02); //pre_pll_clk_div = 2
MT9P017_write_cmos_sensor(0x0306, 0X20); //pll_multiplier = 32
MT9P017_write_cmos_sensor(0x0308, 0x08); //op_pix_clk_div = 8
MT9P017_write_cmos_sensor(0x030A, 0x01); //op_sys_clk_div = 1
preview时,CMMCLK是26,PCLK通过计算为52(从sensor的规格书上推算出来),那么就有一个问题:GetInfo应该是设置ISP的寄存器的,preview_setting是设置sensor的寄存器的,而pclk却不同?为什么?
因为是raw架构的原因,处理端是在后端的ISP上面,所以sensor只需输出合适大小的raw数据流而已,那么preview_setting是写sensor的reg。