高通相关网址:Createpoint: https://createpoint.qti.qualcomm.com(可下载文档,Release Note,Case,文档,工具等等)Chipcode: https://chipcode.qti.qualcomm.com(下载私有代码)开源代码: https://www.codeaurora.org/xwiki/bin/QAEP/release(下载开源代码)Case: https://support-qualcomm.force.com/(高通Case)
高通网站 image 转换工具: https://cap.qti.qualcomm.com/default.aspx
调试平台信息:【SDM845/670】
以下为参考用例,具体请以 sdm845_cafvendorqcomproprietarycamxsrccorecamxsettings.xml 为准!!!
Log信息相关
代码语言:javascript复制--AF相关LOG控制--
例: setprop persist.vendor.camera.logInfoMask 0x8000000 //AF info level log
setprop persist.vendor.camera.logVerboseMask 0x8000000 //AF verbose level log
adb shell "echo logInfoMask=0x8000000 >> /vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo logVerboseMask=0x8000000 >> /vendor/etc/camera/camxoverridesettings.txt"
Mask值对应如下:(1 << 27)=0x8000000 即对应AF模块
// The group tag for a given debug print message
typedef UINT32 CamxLogGroup;
static const CamxLogGroup CamxLogGroupNone = (1 << 0); ///< Generic group
static const CamxLogGroup CamxLogGroupSensor = (1 << 1); ///< Sensor
static const CamxLogGroup CamxLogGroupIFace = (1 << 2); ///< IFace
static const CamxLogGroup CamxLogGroupISP = (1 << 3); ///< ISP
static const CamxLogGroup CamxLogGroupPProc = (1 << 4); ///< Post Processor
static const CamxLogGroup CamxLogGroupImgLib = (1 << 5); ///< Image Lib
static const CamxLogGroup CamxLogGroupCPP = (1 << 6); ///< CPP
static const CamxLogGroup CamxLogGroupHAL = (1 << 7); ///< HAL
static const CamxLogGroup CamxLogGroupJPEG = (1 << 8); ///< JPEG
static const CamxLogGroup CamxLogGroupStats = (1 << 9); ///< Stats
static const CamxLogGroup CamxLogGroupCSL = (1 << 10); ///< CSL
static const CamxLogGroup CamxLogGroupApp = (1 << 11); ///< Application
static const CamxLogGroup CamxLogGroupUtils = (1 << 12); ///< Utilities
static const CamxLogGroup CamxLogGroupSync = (1 << 13); ///< Sync
static const CamxLogGroup CamxLogGroupMemSpy = (1 << 14); ///< MemSpy
static const CamxLogGroup CamxLogGroupAssert = (1 << 15); ///< Asserts
static const CamxLogGroup CamxLogGroupCore = (1 << 16); ///< Core
static const CamxLogGroup CamxLogGroupHWL = (1 << 17); ///< HWL
static const CamxLogGroup CamxLogGroupChi = (1 << 18); ///< CHI
static const CamxLogGroup CamxLogGroupDRQ = (1 << 19); ///< DRQ
static const CamxLogGroup CamxLogGroupFD = (1 << 20); ///< FD
static const CamxLogGroup CamxLogGroupIQMod = (1 << 21); ///< IQ module
static const CamxLogGroup CamxLogGroupLRME = (1 << 22); ///< LRME
static const CamxLogGroup CamxLogGroupNCS = (1 << 23); ///< NCS
static const CamxLogGroup CamxLogGroupMeta = (1 << 24); ///< Metadata
static const CamxLogGroup CamxLogGroupAEC = (1 << 25); ///< AEC //0x2000000
static const CamxLogGroup CamxLogGroupAWB = (1 << 26); ///< AWB //0x4000000
static const CamxLogGroup CamxLogGroupAF = (1 << 27); ///< AF //0x8000000
--禁用深度焦点指示--
setprop persist.vendor.camera.af.depthfocus 1
disableFocusIndication=1
--关闭 PDAF--
setprop persist.vendor.camera.disablePDAF 1
disablePDAF=1
--开启PDLib log--
setprop persist.camera.pdaf_logging 1
--开启PDAF performance log--
setprop persist.camera.pdaf_profiling 1
--开启 AF debug log--
setprop persist.camera.stats.af.debug 5
setprop persist.camera.stats.haf.debug 5
--设置 fullsweep 模式--
afFullsweep=0 //fullsweep off
afFullsweep=1 //far to near
afFullsweep=2 //near to far
afFullsweep=3 //both
--Dump EEPROM 保存OTP数据至 /data/misc/camera/ --
dumpSensorEEPROMData=1
--3A调试 exif信息--
debugDataSizeAEC=6000
debugDataSizeAWB=550000
debugDataSizeAF=70000
--CHI Override log--
persist.vendor.camera.logInfoMask 0x40080 //default:0x0
persist.vendor.camera.logVerboseMask 0x40000 //default:0x0
vendor.debug.camera.overrideLogLevels 0x1F //default:1
<Help>Bitmask of log levels, bit 0 - error, bit 1 - warning, bit 2 - info, bit 3 - debug</Help>
--Assert--
persist.vendor.camera.assertMask
assertMask=0x2
--Warning log--
persist.vendor.camera.logWarningMask
logWarningMask=0x2
--Info log--
persist.vendor.camera.logInfoMask
logInfoMask=0x2
--Perf Info log--
persist.vendor.camera.logPerfInfoMask
logPerfInfoMask=0x2
--Verbose Info log--
persist.vendor.camera.logVerboseMask
logVerboseMask=0x2
--Entry/Exit log--
persist.vendor.camera.logEntryExitMask
logEntryExitMask=0x2
--DRQ Log--
persist.vendor.camera.logDRQEnable
logDRQEnable=TRUE
--System Log Enable--
persist.vendor.camera.systemLogEnable
systemLogEnable=FALSE
--Log filename--
persist.vendor.camera.debugLogFilename
debugLogFilename=cameralog
--Trace group--
persist.vendor.camera.traceGroupsEnable
traceGroupsEnable=0x2
--Enable FPS Logs--
persist.vendor.camera.enableFPSLog
enableFPSLog=TRUE
ChiOverride 设置
(1)开关ZSL
代码语言:javascript复制vendor.debug.camera.overrideDisableZSL
adb shell "echo overrideDisableZSL=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(2)开关MFNR
代码语言:javascript复制vendor.debug.camera.overrideEnableMFNR
adb shell "echo overrideEnableMFNR=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(3)强制选择一个usecase
代码语言:javascript复制vendor.debug.camera.overrideForceUsecaseId
adb shell "echo overrideForceUsecaseId=8 >> /vendor/etc/camera/camxoverridesettings.txt”
(4)强制选择一个sensor mode
代码语言:javascript复制vendor.debug.camera.overrideForceSensorMode
adb shell "echo overrideForceSensorMode=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(5)启用GPU Node Rotation Usecase
代码语言:javascript复制vendor.debug.camera.overrideGPURotationUsecase
adb shell "echo overrideGPURotationUsecase=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(6)强制使用不带3A的HFR Usecase
代码语言:javascript复制vendor.debug.camera.overrideHFRNo3AUseCase
adb shell "echo overrideHFRNo3AUseCase=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(7)允许使用AdvancedCameraUsecase
代码语言:javascript复制vendor.debug.camera.overrideUseAdvancedUsecase
adb shell "echo overrideUseAdvancedUsecase=0 >> /vendor/etc/camera/camxoverridesettings.txt"
(8)开启 EIS V2/V3
代码语言:javascript复制vendor.debug.camera.eisv2enable
adb shell "echo EISV2Enable=1 >> /vendor/etc/camera/camxoverridesettings.txt"
vendor.debug.camera.eisv3enable
adb shell "echo EISV3Enable=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(9) EIS V2/V3 Margin
代码语言:javascript复制vendor.debug.camera.eisv2margin
adb shell "echo EISV2Margin=0.4 >> /vendor/etc/camera/camxoverridesettings.txt"
vendor.debug.camera.eisv3margin
adb shell "echo EISV3Margin=0.4 >> /vendor/etc/camera/camxoverridesettings.txt"
(10)EIS V2/V3 Frame Delay
代码语言:javascript复制vendor.debug.camera.eisv2framedelay
adb shell "echo EISV2FrameDelay=1 >> /vendor/etc/camera/camxoverridesettings.txt"
vendor.debug.camera.eisv3framedelay
adb shell "echo EISV3FrameDelay=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(11)Number of PCRs before stream on
代码语言:javascript复制vendor.debug.camera.numPCRsBeforeStreamOn
adb shell "echo numPCRsBeforeStreamOn=1 >> /vendor/etc/camera/camxoverridesettings.txt"
(12)图像 Buffer Count Override (初始化期间分配的图像buffer计数,默认值8)
代码语言:javascript复制vendor.debug.camera.overrideImageBufferCount
adb shell "echo overrideImageBufferCount=7 >> /vendor/etc/camera/camxoverridesettings.txt"
(13)Stats Frame Skipping 【0: invalid. <default 1: No Skip.> 2: skip 1 frame. 3: skip 2 frames】
代码语言:javascript复制vendor.debug.camera.statsProcessingSkipCount
adb shell "echo statsProcessingSkipFactor=2 >> /vendor/etc/camera/camxoverridesettings.txt
获取raw和metadata用于ISP调试
(1) Enable Dump
代码语言:javascript复制adb shell setprop persist.vendor.camera.imageDumpMask 6 ->No dumps = 0x0
->All output ports for IFE = 0x1
->All output ports for IPE = 0x2
->All output ports for BPS = 0x4
adb shell setprop persist.vendor.camera.offlineImageDumpOnly 1
adb shell setprop persist.vendor.camera.reprocessDump 1
adb shell setprop persist.vendor.camera.autoImageDump 1
adb shell setprop persist.vendor.camera.autoImageDumpIPEoutputPortMask 0x100
<Help>
Output port mask for IPE:
IPEOutputPortDisplay = 0x100;
IPEOutputPortVideo = 0x200;
IPEOutputPortFullRef = 0x400;
IPEOutputPortDS4Ref = 0x800;
IPEOutputPortDS16Ref = 0x1000;
IPEOutputPortDS64Ref = 0x2000;
ALLports = 0x3F00
</Help>
adb shell setprop persist.vendor.camera.autoImageDumpIPEInstanceMask 12
<Help>
IPEInstanceName0 = 0x1;
IPEInstanceName1 = 0x2;
IPEInstanceName2 = 0x4;
IPEInstanceName3 = 0x8;
IPEInstanceName4 = 0x10;
IPEInstanceName5 = 0x20;
IPEInstanceName6 = 0x40;
IPEInstanceName7 = 0x80;
IPEInstanceName8 = 0x100;
IPEInstanceName9 = 0x200;
IPEInstanceName10 = 0x400;
IPEInstanceName11 = 0x800;
IPEInstanceName12 = 0x1000;
IPEInstanceName13 = 0x2000;
IPEInstanceName14 = 0x4000;
IPEInstanceName15 = 0x8000;
IPEInstanceName16 = 0x10000;
IPEInstanceName17 = 0x20000;
IPEInstanceName18 = 0x40000;
IPEInstanceName19 = 0x80000;
IPEInstanceName20 = 0x100000;
IPEInstanceName21 = 0x200000;
AllInstances = 0xFFFFFFFF
</Help>
adb shell setprop persist.vendor.camera.autoImageDumpIFEoutputPortMask 0x100
<Help>
Output port mask:
IFE:
IFEOutputPortFull = 0x1;
IFEOutputPortDS4 = 0x2;
IFEOutputPortDS16 = 0x4;
IFEOutputPortCAMIFRaw = 0x8;
IFEOutputPortLSCRaw = 0x10;
IFEOutputPortGTMRaw = 0x20;
IFEOutputPortFD = 0x40;
IFEOutputPortPDAF = 0x80;
IFEOutputPortRDI0 = 0x100;
IFEOutputPortRDI1 = 0x200;
IFEOutputPortRDI2 = 0x400;
IFEOutputPortRDI3 = 0x800;
IFEOutputPortStatsRS = 0x1000;
IFEOutputPortStatsCS = 0x2000;
IFEOutputPortStatsIHIST = 0x8000;
IFEOutputPortStatsBHIST = 0x10000;
IFEOutputPortStatsHDRBE = 0x20000;
IFEOutputPortStatsHDRBHIST = 0x40000;
IFEOutputPortStatsTLBG = 0x80000;
IFEOutputPortStatsBF = 0x100000;
IFEOutputPortStatsAWBBG = 0x200000;
IFEOutputPortDisplayFull = 0x400000;
IFEOutputPortDisplayDS4 = 0x800000;
IFEOutputPortDisplayDS16 = 0x1000000;
IFEOutputPortStatsDualPD = 0x2000000;
ALLports = 0x3FFBFFF
AllPixelOutput = 0x1C00047
AllRawOutput = 0xFB8
AllRDIOutput = 0xF00
AllStatsOutput = 0x3FB000
</Help>
adb shell setprop persist.vendor.camera.autoImageDumpIFEInstanceMask 0x7
<Help>
Instance mask:
IFE:
IFEInstanceName0 = 0x1;
IFEInstanceName1 = 0x2;
IFEInstanceName2 = 0x4;
AllInstances = 0x7
</Help>
或
代码语言:javascript复制adb shell "echo autoImageDumpMask=6>>/vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo offlineImageDumpOnly=TRUE>>/vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo reprocessDump=TRUE >>/vendor/etc/camera/camxoverridesettings.txt"
adb shell "echo autoImageDump=TRUE>>/vendor/etc/camera/camxoverridesettings.txt"
...
生成路径: data/misc/camera/ 或 data/vendor/camera/
使用Chromatix 工具查看:
① *.RAWMIPI → rename to *.RAW, *.YUV420NV21 → Rename to *.YUV
② RAW → BPP 10, pack: mipi pattern: RGGB YUV → BPP 8, Sub-sample: Ycbcr420, Format: Semi-Planar
开启dump后预览会比较卡,可以修改dump部分代码(/src/utils/camximagedump.cpp b/src/utils/camximagedump.cpp),过滤特定格式缓解卡顿:
代码语言:javascript复制#include "camximagedump.h"
#include "camximagebuffer.h"
#include "camximageformatutils.h"
#include <cutils/properties.h>
CAMX_NAMESPACE_BEGIN
@@ -99,6 100,28 @@ VOID ImageDump::Dump(
OsUtils::SNPrintF(suffix, sizeof(suffix), "ERROR");
break;
}
// add format mask
char value[100] = "