本讲是Camera Sensor驱动专题的第18讲,我们介绍Camera Sensor点亮之PDAF点亮详解。
更多资源:
资源 | 描述 |
---|---|
在线课程 | 极客笔记在线课程 |
知识星球 | 星球名称:深入浅出Android Camera 星球ID: 17296815 |
极客笔记圈 |
什么是 PDAF
PDAF: Phase Detection Auto Focus
Sensor PD TYPE
Camera PDAF XML 配置
OTP配置 – eeprom/cat24c64_imx586_eeprom.xml
Sensor配置 – sensor/imx586/imx586_sensor.xml
PDAF配置 – sensor/imx586/imx586_pdaf.xml
项目 | 内容 | 备注 |
---|---|---|
<PDCommonInfo> |
||
PDAFName | imx586_pdaf | pdaf 驱动名称 |
PDOrientation | DEFAULT | mirror/flip/both |
PDDefocusConfidenceThreshold | 200 | |
</PDCommonInfo> |
||
<PDModeInfo> |
||
PDSensorMode | 0 | 对应sensor resolution idx |
PDType | PDType2 | type 1 2 3 |
PDAFLibraryName | com.qti.stats.pdlib | pd 算法库 |
<PDSensorNativePatternInfo> |
||
PDNativeBufferFormat | MIPI10 | pd 数据格式 |
PDBlockCountHorizontal | 248 | width,单位block |
PDBlockCountVertical | 186 | height, 单位block |
<PDBlockPattern> |
||
PDPixelCount | 32 | 一个block里pd点数量,包括左右pd |
<PDPixelCoordinates> |
||
PDXCoordinate | 19 | x坐标 |
PDYCoordinate | 13 | y坐标 |
PDPixelShieldInformation | RIGHTSHIELDED | LEFT pd,屏蔽右半部 |
</PDPixelCoordinates> |
||
<PDBlockDimensions> |
||
width | 16 | Block分辨率 |
height | 16 | Block分辨率 |
</PDBlockDimensions> |
||
PDOffsetHorizontal | 17 | Block 第一个pixel偏移 |
PDOffsetVertical | 12 | Block 第一个pixel偏移 |
</PDBlockPattern> |
||
<PDCropRegion> |
||
xStart | 0 | x坐标 |
yStart | 0 | y坐标 |
width | 4000 | frame 宽 |
height | 3000 | frame 高 |
</PDCropRegion> |
||
PDDownscaleFactorHorizontal | 1 | 水平下采样 |
PDDownscaleFactorVertical | 1 | 垂直下采样 |
</PDSensorNativePatternInfo> |
||
<PDBufferBlockPatternInfo> |
||
PDStride | 1984 | pd stats 行buffer大小 |
PDBufferFormat | UNPACKED16 | 一个pd占16个bit |
<PDBlockPattern> |
||
PDPixelCount | 32 | pd像素个数 |
<PDPixelCoordinates> |
||
PDXCoordinate | 0 | x坐标 |
PDYCoordinate | 0 | y坐标 |
PDPixelShieldInformation | RIGHTSHIELDED | left pd |
… | ||
</PDPixelCoordinates> |
||
<PDBlockDimensions> |
||
width | 4 | pd宽(block) |
height | 8 | pd高(block) |
</PDBlockDimensions> |
||
PDOffsetHorizontal | 0 | Block 第一个pixel偏移 |
PDOffsetVertical | 0 | Block 第一个pixel偏移 |
</PDBlockPattern> |
||
</PDBufferBlockPatternInfo> |
||
</PDModeInfo> |
Camera PDAF Verify
echo “enablePDLibDump=1” >> /vendor/etc/camera/camxoverridesettings.txt
adb shell killall android.hardware.camera.provider@2.4-service_64
Open camera and focus
adb pull /data/vendor/camera/pdaf_input_single.raw