camera_tuning_para_ov16880mipiraw.cpp(附解析笔记)
#include <utils/Log.h>
#include <fcntl.h>
#include <math.h>
#include "camera_custom_nvram.h"
#include "camera_custom_sensor.h"
#include "image_sensor.h"
#include "kd_imgsensor_define.h"
#include "camera_AE_PLineTable_ov16880mipiraw.h"
#include "camera_info_ov16880mipiraw.h"
#include "camera_custom_AEPlinetable.h"
#include "camera_custom_tsf_tbl.h"
const NVRAM_CAMERA_ISP_PARAM_STRUCT CAMERA_ISP_DEFAULT_VALUE =
{{
//Version
Version: NVRAM_CAMERA_PARA_FILE_VERSION,
//SensorId
SensorId: SENSOR_ID,
ISPComm:{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
}
},
ISPPca: {
#include INCLUDE_FILENAME_ISP_PCA_PARAM
},
ISPRegs:{
#include INCLUDE_FILENAME_ISP_REGS_PARAM
},
ISPMfbMixer:{{
0x01FF0001, // MIX3_CTRL_0
0x00FF0000, // MIX3_CTRL_1
0xFFFF0000 // MIX3_SPARE
}},
ISPMulitCCM:{ //smooth CCM(Muti CCM)
Poly22:{
85925, // i4R_AVG
20916, // i4R_STD
90950, // i4B_AVG
18763, // i4B_STD
0, // i4R_MAX
0, // i4R_MIN
0, // i4G_MAX
0, // i4G_MIN
0, // i4B_MAX
0, // i4B_MIN
{ // i4P00[9]
7810000, -3092500, 400000, -917500, 6692500, -647500, -72500, -5242500, 10440000
},
{ // i4P10[9]
2585566, -3610605, 1056375, -292778, -555212, 853912, 354160, 1925435, -2290132
},
{ // i4P01[9]
958729, -1758478, 826983, -663936, -897969, 1564094, -83346, 1780727, -1711826
},
{ // i4P20[9]
0, 0, 0, 0, 0, 0, 0, 0, 0
},
{ // i4P11[9]
0, 0, 0, 0, 0, 0, 0, 0, 0
},
{ // i4P02[9]
0, 0, 0, 0, 0, 0, 0, 0, 0
}
},
AWBGain:{
// Strobe
{
512, // i4R
512, // i4G
512 // i4B
},
// A
{
619, // i4R
512, // i4G
1105 // i4B
},
// TL84
{
802, // i4R
512, // i4G
918 // i4B
},
// CWF
{
894, // i4R
512, // i4G
960 // i4B
},
// D65
{
1122, // i4R
512, // i4G
655 // i4B
},
// Reserved 1
{
512, // i4R
512, // i4G
512 // i4B
},
// Reserved 2
{
512, // i4R
512, // i4G
512 // i4B
},
// Reserved 3
{
512, // i4R
512, // i4G
512 // i4B
}
},
Weight:{
1, // Strobe
1, // A
1, // TL84
1, // CWF
1, // D65
1, // Reserved 1
1, // Reserved 2
1 // Reserved 3
}
},
MDPMulitCCM:{
Poly22:{
125225, // i4R_AVG
32141, // i4R_STD
165675, // i4B_AVG
30249, // i4B_STD
646, // i4R_MAX
527, // i4R_MIN
789, // i4G_MAX
670, // i4G_MIN
856, // i4B_MAX
721, // i4B_MIN
{ // i4P00[9]
5995000, -505000, -370000, -1387500, 7165000, -657500, -532500, -2045000, 7697500
},
{ // i4P10[9]
725905, -1081879, 355974, 627096, -389018, -238079, 626246, -86040, -540207
},
{ // i4P01[9]
257857, -576218, 318361, -96902, -138571, 235473, 24959, 193148, -218107
},
{ // i4P20[9]
0, 0, 0, 0, 0, 0, 0, 0, 0
},
{ // i4P11[9]
0, 0, 0, 0, 0, 0, 0, 0, 0
},
{ // i4P02[9]
0, 0, 0, 0, 0, 0, 0, 0, 0
}
},
AWBGain:{
// Strobe
{
512, // i4R
512, // i4G
512 // i4B
},
// A
{
623, // i4R
512, // i4G
1109 // i4B
},
// TL84
{
802, // i4R
512, // i4G
918 // i4B
},
// CWF
{
890, // i4R
512, // i4G
949 // i4B
},
// D65
{
1123, // i4R
512, // i4G
657 // i4B
},
// Reserved 1
{
512, // i4R
512, // i4G
512 // i4B
},
// Reserved 2
{
512, // i4R
512, // i4G
512 // i4B
},
// Reserved 3
{
512, // i4R
512, // i4G
512 // i4B
}
},
Weight:{
1, // Strobe
1, // A
1, // TL84
1, // CWF
1, // D65
1, // Reserved 1
1, // Reserved 2
1 // Reserved 3
}
},
isp_ccm_ratio: 1.000000,
//bInvokeSmoothCCM
bInvokeSmoothCCM: MTRUE,
DngMetadata:{
0, // i4RefereceIlluminant1
3, // i4RefereceIlluminant2
rNoiseProfile:{
{
S:{
0.000004, // a
0.000336 // b
},
O:{
0.000000, // a
-0.000234 // b
}
},
{
S:{
0.000004, // a
0.000336 // b
},
O:{
0.000000, // a
-0.000234 // b
}
},
{
S:{
0.000004, // a
0.000336 // b
},
O:{
0.000000, // a
-0.000234 // b
}
},
{
S:{
0.000004, // a
0.000336 // b
},
O:{
0.000000, // a
-0.000234 // b
}
}
}
},
ANR_TBL:
{0}
}};
const NVRAM_CAMERA_3A_STRUCT CAMERA_3A_NVRAM_DEFAULT_VALUE =
{
NVRAM_CAMERA_3A_FILE_VERSION, // u4Version
SENSOR_ID, // SensorId
// AE NVRAM
{
// rDevicesInfo
{
1136, // u4MinGain, 1024 base = 1x
15872, // u4MaxGain, 16x
60, // u4MiniISOGain, ISOxx
64, // u4GainStepUnit, 1x/8
8723, // u4PreExpUnit
30, // u4PreMaxFrameRate
8723, // u4VideoExpUnit
30, // u4VideoMaxFrameRate
1024, // u4Video2PreRatio, 1024 base = 1x
8723, // u4CapExpUnit
29, // u4CapMaxFrameRate
1024, // u4Cap2PreRatio, 1024 base = 1x
8723, // u4Video1ExpUnit
120, // u4Video1MaxFrameRate
1024, // u4Video12PreRatio, 1024 base = 1x
8723, // u4Video2ExpUnit
30, // u4Video2MaxFrameRate
1024, // u4Video22PreRatio, 1024 base = 1x
8723, // u4Custom1ExpUnit
30, // u4Custom1MaxFrameRate
1024, // u4Custom12PreRatio, 1024 base = 1x
8723, // u4Custom2ExpUnit
30, // u4Custom2MaxFrameRate
1024, // u4Custom22PreRatio, 1024 base = 1x
8723, // u4Custom3ExpUnit
30, // u4Custom3MaxFrameRate
1024, // u4Custom32PreRatio, 1024 base = 1x
8723, // u4Custom4ExpUnit
30, // u4Custom4MaxFrameRate
1024, // u4Custom42PreRatio, 1024 base = 1x
8723, // u4Custom5ExpUnit
30, // u4Custom5MaxFrameRate
1024, // u4Custom52PreRatio, 1024 base = 1x
20, // u4LensFno, Fno = 2.8
357 // u4FocusLength_100x
},
// rHistConfig
{
4, // u4HistHighThres
40, // u4HistLowThres
2, // u4MostBrightRatio
1, // u4MostDarkRatio
160, // u4CentralHighBound
20, // u4CentralLowBound
{240, 230, 220, 210, 200}, // u4OverExpThres[AE_CCT_STRENGTH_NUM]
{62, 70, 82, 108, 141}, // u4HistStretchThres[AE_CCT_STRENGTH_NUM]
{18, 22, 26, 30, 34} // u4BlackLightThres[AE_CCT_STRENGTH_NUM]
},
// rCCTConfig
{
TRUE, // bEnableBlackLight
TRUE, // bEnableHistStretch
TRUE, // bEnableAntiOverExposure
TRUE, // bEnableTimeLPF
TRUE, // bEnableCaptureThres //置TRUE时,使用u4CaptureFlareThres的动态范围,否者使用u4CaptureFlareOffset的设定固定值
TRUE, // bEnableVideoThres
TRUE, // bEnableVideo1Thres
TRUE, // bEnableVideo2Thres
TRUE, // bEnableCustom1Thres
TRUE, // bEnableCustom2Thres
TRUE, // bEnableCustom3Thres
TRUE, // bEnableCustom4Thres
TRUE, // bEnableCustom5Thres
TRUE, // bEnableStrobeThres
68, // u4AETarget 整体画面加权亮度目标;画面比预期暗 u4AETarget↑ 画面比预期亮 u4AETarget↓
66, // u4StrobeAETarget No Used
50, // u4InitIndex 初始AE P-Line作用于照相机首次打开
4, // u4BackLightWeight
32, // u4HistStretchWeight
4, // u4AntiOverExpWeight
2, // u4BlackLightStrengthIndex
2, // u4HistStretchStrengthIndex
2, // u4AntiOverExpStrengthIndex
2, // u4TimeLPFStrengthIndex
{1, 3, 5, 7, 8}, // u4LPFConvergeTable[AE_CCT_STRENGTH_NUM]
90, // u4InDoorEV = 9.0, 10 base
-30, // i4BVOffset delta BV = value/10
64, // u4PreviewFlareOffset
64, // u4CaptureFlareOffset //Range:0~4096 默认64(12bit)
3, // u4CaptureFlareThres //Range:0~1000 默认3(3%)
64, // u4VideoFlareOffset
3, // u4VideoFlareThres
64, // u4CustomFlareOffset
3, // u4CustomFlareThres
64, // u4StrobeFlareOffset
3, // u4StrobeFlareThres
160, // u4PrvMaxFlareThres
0, // u4PrvMinFlareThres
160, // u4VideoMaxFlareThres
0, // u4VideoMinFlareThres
18, // u4FlatnessThres // 10 base for flatness condition.
75, // u4FlatnessStrength
//rMeteringSpec
{
//rHS_Spec //HS final AE target计算结果>=AE target
{
TRUE,//bEnableHistStretch // enable histogram stretch HS使能开关
1024,//u4HistStretchWeight // Histogram weighting value HS权重
40,//u4Pcent //0~1000 40=4% 亮到暗有4%区域像素参与HS Target计算
165,//u4Thd // 0~255 亮部的亮度(高对比场景)值↑高对比场景亮度↑
75, //74,//u4FlatThd // 0~255 亮部的亮度(低对比场景)值↓低对比场景亮度↓
120,//u4FlatBrightPcent //0~1000 画面中亮部参与计算EV diff的像素比例 EV diff:画面中亮部与暗部的关系
120,//u4FlatDarkPcent //0~1000 画面中暗部参与计算EV diff的像素比例 EV diff越小画面亮度越平坦(对比度越小)
//sFlatRatio //使Flat在低对比度Flat Target和高对比度HS Target之间得到最终的Finer Target混合比例中占比调整 值↑Flat所占比例↑
若亮部=暗部 亮部/暗部=1(画面无差异,低对比度Flat为主→对应EV diff=0 →对应最大y1=1024
若亮部X2→很大值(横轴上跑的很远) 亮部/暗部=很大值→对应EV diff=很大值,→对应最小y2=0
y1/Base=1024/1024=1=P_Flat
把P_Flat代入Final HS计算公式Final HS=(1-P_Flat)*u4Thd+P_Flat*u4FlatThd推得(1-1)*u4Thd+1*u4FlatThd=u4FlatThd(Flat所占概率100%)
y2/Base=0/1024=0=P_Flat
把P_Flat代入Final HS计算公式Final HS=(1-P_Flat)*u4Thd+P_Flat*u4FlatThd推得 (1-0)*u4Thd+0*u4FlatThd=u4Thd(Flat所占概率0%,不参与计算)
1000, //i4X1
1024, //i4Y1
2400, //i4X2
0 //i4Y2
},
TRUE, //bEnableGreyTextEnhance //报纸景(HS-Flat占主导地位,亮度不是很好且黑白分明的)使能开关
1800, //u4GreyTextFlatStart, > sFlatRatio.i4X1, < sFlatRatio.i4X2 //值↓ Flat weight所占比例增高
{ //sGreyTextRatio不建议修改
10, //i4X1
1024, //i4Y1
80, //i4X2
0 //i4Y2
} ///////////////////////////////Final HS = (1 - P_Flat) * u4Thd + P_Flat * u4FlatThd/////////////////
},
//rAOE_Spec //AOE AE Final target计算结果<AE target
{
TRUE, //bEnableAntiOverExposure
1024, //u4AntiOverExpWeight
10, //u4Pcent //5~100 过曝光区域面积 画面中亮部有多少比例的像素参与计算AOE target
222, //u4Thd //180~240 过曝光区域的亮度 值↓亮度↓ u4Pcent所框定的画面像素要达到的目标亮度
TRUE, //bEnableCOEP 画面中心过曝光区域亮度控制使能开关
1, //u4COEPcent //1 ~ 1000
102, //u4COEThd //100~110 值↓中心区域亮度↓ 画面中心过曝光区域亮度
0, //u4BVCompRatio
//sCOEYRatio; // the outer y ratio 图像周围越暗,中心过曝光概率越大
{
23, //i4X1
1024, //i4Y1
47, //i4X2
0 //i4Y2
},
//sCOEDiffRatio; // inner/outer y difference ratio 中心和四周的差异越大,中心过曝光概率越大
{
1500, //i4X1
0, //i4Y1
2100, //i4X2
1024 //i4Y2
}/////////////////////////////////////Target AOE = TargetOE * (1-P_COE) + TargetCOE * P_COE//////////////////
}, /////////////////////////////////////P_COE=sCOEYRatio+sCOEdiffRatio//////////////////
//rABL_Spec
{
TRUE,//bEnableBlackLight
1024,//u4BackLightWeight
400,//u4Pcent //整张画面中暗部有多少比例的像素参与计算 Rang: 0 ~ 1000(0 ~ 100%) (从暗到亮)不建议修改幅度很大 过曝光区域的面积
5,//u4Thd //所框定的画面像素要达到的目标亮度target. Rang: 0~255 值↑亮度↑ 背光主体的亮度
255, // center luminance //背光场景,画面中心亮度的上界(BackLightWeight) 保持系统默认default值 AE_ATG_ABL_STS_LIMITBL==1时画面仍很暗,可增加此值↑ 防止主体亮度提高,但背景亮度过曝光
256, // final target limitation, 256/128 = 2x //背光场景,画面中心亮度的上界(TargetStrength) 128=1X 值↑ABL能力↑ base=128 AE_ATG_ABL_STS_LIMITBL==2时画面仍很暗,可增加此值↑ 防止主体亮度提高,但背景亮度过曝光
//sFgBgEVRatio ABL_STS_FINALPROB太小,可以调试sFgBgEVRatio、sBVRatio来增加
{
2200, //i4X1
0, //i4Y1
4000, //i4X2
1024 //i4Y2
},
//sBVRatio
{
3800, //i4X1
0, //i4Y1
5000, //i4X2
1024 //i4Y2
}/////////////////////////////////Final ABL AE target = ABL AE target * P_ABL + (1 - P_ABL) * AE target////////////
}, /////////////////////////////////P_ABL=sFgBgEVRatio Mix sBVRatio////////////P_ABL 较暗的前景/背景时,更相信ABL sFgBgEVRatio ; P_ABL 较亮的环境时,更相信ABL sBVRatio
//rNS_Spec
{
TRUE, // bEnableNightScene
50,//u4FlatBrightPcent
300,//u4FlatDarkPcent
//sFlatRatio
{
1200, //i4X1
1024, //i4Y1
2400, //i4X2
0 //i4Y2
},
//sBVRatio
{
-500, //i4X1
1024, //i4Y1
2000, //i4X2
0 //i4Y2
},
TRUE, // bEnableNightSkySuppresion //天空侦测机制,当侦测到天空时,降低亮度
//sSkyBVRatio
{
-4000, //i4X1 //X轴=BV值
1024, //i4Y1
-2000, //i4X2 //Y轴=P概率 (建议保持default值)
0 //i4Y2
}
},
// rTOUCHFD_Spec
{
40, //uMeteringYLowBound; //uMeteringYLowBound < Touch Y < uMeteringYHighBound 亮度正常
50, //uMeteringYHighBound;
45, //uFaceYLowBound; //uFaceYLowBound < Face Y < uFaceYHighBound 亮度正常
55, //uFaceYHighBound;
3, //uFaceCentralWeight; //脸中央的权重,值↑中心权重越↑ 约中心25%区域
120, //u4MeteringStableMax; \ Touch AE后,亮度改变多少,才会重新Trigger (切回到normal模式) 当前亮度/Touch时的亮度>u4MeteringStableMa Rang: >100 (default 120%)
80, //u4MeteringStableMin; / 当前亮度/Touch时的亮度>u4MeteringStableMin Rang: <100 (default 80%) 当前Touch环境中不需要触发的太敏感,可调大u4MeteringStableMax和 u4MeteringStableMin之间的范围
} //////////////(u4AE target*u4MinYLowBound/128) < Final AE target < (u4AE target*u4MaxYHighBound/128)//////////// 限制最后整体画面亮度(MTK6755/MTK6750)
}, //End rMeteringSpec
// rFlareSpec
{
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //uPrvFlareWeightArr[16]; //Rang:0~5 (default 1) 收敛快,但较不顺畅{1,1,1,1……,2,3,4} 收敛慢,但较顺畅{1,1,1,1……,1,1,1}
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //uVideoFlareWeightArr[16];
96, //u4FlareStdThrHigh;
48, //u4FlareStdThrLow;
0, //u4PrvCapFlareDiff; //Rang:0~4096 (default 0) 值越大preview与capture的允许容差越大,且capture的自动对比度会不起作用 防止由于flare而引起preview和capture亮度不一致,建议设置成0
4, //u4FlareMaxStepGap_Fast; //Rang:0~4096 (default 4) 亮度稳定时,自动对比收敛速度,值↓ 越顺畅但越慢
0, //u4FlareMaxStepGap_Slow; //Rang:0~4096 (default 0) 亮度不稳定时,自动对比收敛速度,值↓ 越顺畅但越慢
1800, //u4FlarMaxStepGapLimitBV; //启用亮度阈值,小于此值,启用防闪烁机制,收敛速度会变慢
0, //u4FlareAEStableCount; //Rang: >0 (default 0) 亮度稳定几帧后,开始快速收敛对比度
},
//rAEMoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
190, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
70, //u4B2TStart
60, //u4D2TEnd
90, //u4D2TStart
},
//rAEVideoMoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
150, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
40, //u4B2TStart
40, //u4D2TEnd
90, //u4D2TStart
},
//rAEVideo1MoveRatio = //
{ //
100, //u4SpeedUpRatio // Rang: >0(Base 100, 建议设置不要大于100)
100, //u4GlobalRatio // Rang: >0 default:100 u4GlobalRatio>100 faster 上图斜线向下平移,更快到达Target ; u4GlobalRatio<100 smoother 上图斜线向上平移,更慢到达target,更smooth;
150, //u4Bright2TargetEnd // Rang: > m_u4Target default:190
20, //u4Dark2TargetStart // Rang: < m_u4Target default:20
90, //u4B2TEnd // Rang: > =u4B2TStart; <= 100 default:90
40, //u4B2TStart // Rang: 0~100 default:70
30, //u4D2TEnd // Rang: 0~100 default:60
90, //u4D2TStart // Rang: > u4D2TEnd; <=100 default:90
},
//rAEVideo2MoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
150, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
40, //u4B2TStart
40, //u4D2TEnd
90, //u4D2TStart
},
//rAECustom1MoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
150, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
40, //u4B2TStart
40, //u4D2TEnd
90, //u4D2TStart
},
//rAECustom2MoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
150, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
40, //u4B2TStart
40, //u4D2TEnd
90, //u4D2TStart
},
//rAECustom3MoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
150, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
40, //u4B2TStart
40, //u4D2TEnd
90, //u4D2TStart
},
//rAECustom4MoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
150, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
40, //u4B2TStart
40, //u4D2TEnd
90, //u4D2TStart
},
//rAECustom5MoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
150, //u4Bright2TargetEnd
20, //u4Dark2TargetStart
90, //u4B2TEnd
40, //u4B2TStart
40, //u4D2TEnd
90, //u4D2TStart
},
//rAEFaceMoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
190, //u4Bright2TargetEnd
10, //u4Dark2TargetStart
80, //u4B2TEnd
40, //u4B2TStart
30, //u4D2TEnd
60, //u4D2TStart
},
//rAETrackingMoveRatio =
{
100, //u4SpeedUpRatio
100, //u4GlobalRatio
190, //u4Bright2TargetEnd
10, //u4Dark2TargetStart
80, //u4B2TEnd
40, //u4B2TStart
30, //u4D2TEnd
60, //u4D2TStart
},
//rAEAOENVRAMParam =
{
1, // i4AOEStrengthIdx: 0 / 1 / 2
130, // u4BVCompRatio
{//rAEAOEAlgParam
{//rAEAOEAlgParam[0]
47, //u4Y_Target
10, //u4AOE_OE_percent
160, //u4AOE_OEBound
10, //u4AOE_DarkBound
950, //u4AOE_LowlightPrecent
1, //u4AOE_LowlightBound
135, //u4AOESceneLV_L
170, //u4AOESceneLV_H
40, //u4AOE_SWHdrLE_Bound
},
{//rAEAOEAlgParam[1]
47, //u4Y_Target
10, //u4AOE_OE_percent
180, //u4AOE_OEBound
15, //u4AOE_DarkBound
950, //u4AOE_LowlightPrecent
3, //u4AOE_LowlightBound
135, //u4AOESceneLV_L
170, //u4AOESceneLV_H
40, //u4AOE_SWHdrLE_Bound
},
{//rAEAOEAlgParam[2]
47, //u4Y_Target
10, //u4AOE_OE_percent
200, //u4AOE_OEBound
25, //u4AOE_DarkBound
950, //u4AOE_LowlightPrecent
8, //u4AOE_LowlightBound
135, //u4AOESceneLV_L
170, //u4AOESceneLV_H
40, //u4AOE_SWHdrLE_Bound
}
}
}
}
},
// AWB NVRAM
AWB_NVRAM_START
{
{
{
// AWB calibration data //AWB unit gain & golden gain=0时,AWB OTP gain才会正常使用 建议保持默认
{
// rUnitGain (unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rGoldenGain (golden sample gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rUnitGain TL84 (unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rGoldenGain TL84 (golden sample gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rUnitGain Alight (unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rGoldenGain Alight (golden sample gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rTuningUnitGain (Tuning sample unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rD65Gain (D65 WB gain: 1.0 = 512) //calibration得到,所有光源gain,都会去align此gain 建议保持默认 Gain of all color temperature * AWB Gain Base=Final Gain 建议保持默认
{
1148, // D65Gain_R
512, // D65Gain_G
641 // D65Gain_B
}
},
// Original XY coordinate of AWB light source 各色温基准点坐标 建议保持默认
{
// Strobe
{
0, // i4X
0 // i4Y
},
// Horizon
{
-332, // OriX_Hor
-333 // OriY_Hor
},
// A
{
-193, // OriX_A
-357 // OriY_A
},
// TL84
{
-44, // OriX_TL84
-371 // OriY_TL84
},
// CWF
{
-15, // OriX_CWF
-412 // OriY_CWF
},
// DNP
{
52, // OriX_DNP
-391 // OriY_DNP
},
// D65
{
215, // OriX_D65
-381 // OriY_D65
},
// DF
{
121, // OriX_DF
-443 // OriY_DF
}
},
// Rotated XY coordinate of AWB light source 平均白点的坐标值,只在AWB算法中调用参考 建议保持默认
{
// Strobe
{
0, // i4X
0 // i4Y
},
// Horizon
{
-307, // RotX_Hor
-355 // RotY_Hor
},
// A
{
-167, // RotX_A
-369 // RotY_A
},
// TL84
{
-18, // RotX_TL84
-373 // RotY_TL84
},
// CWF
{
14, // RotX_CWF
-411 // RotY_CWF
},
// DNP
{
79, // RotX_DNP
-386 // RotY_DNP
},
// D65
{
241, // RotX_D65
-364 // RotY_D65
},
// DF
{
152, // RotX_DF
-433 // RotY_DF
}
},
// AWB gain of AWB light source //Calibration后得到的Default Gain 建议保持默认
{
// Strobe
{
512, // i4R
512, // i4G
512 // i4B
},
// Horizon
{
512, // AWBGAIN_HOR_R
512, // AWBGAIN_HOR_G
1261 // AWBGAIN_HOR_B
},
// A
{
639, // AWBGAIN_A_R
512, // AWBGAIN_A_G
1078 // AWBGAIN_A_B
},
// TL84
{
797, // AWBGAIN_TL84_R
512, // AWBGAIN_TL84_G
897 // AWBGAIN_TL84_B
},
// CWF
{
876, // AWBGAIN_CWF_R
512, // AWBGAIN_CWF_G
913 // AWBGAIN_CWF_B
},
// DNP
{
934, // AWBGAIN_DNP_R
512, // AWBGAIN_DNP_G
810 // AWBGAIN_DNP_B
},
// D65
{
1148, // AWBGAIN_D65_R
512, // AWBGAIN_D65_G
641 // AWBGAIN_D65_B
},
// DF
{
1099, // AWBGAIN_DF_R
512, // AWBGAIN_DF_G
793 // AWBGAIN_DF_B
}
},
// Rotation matrix parameter //算法坐标转换中使用 建议保持默认
{
-4, // RotationAngle
255, // Cos
-18 // Sin
},
// Daylight locus parameter //算法坐标转换中使用 建议保持默认
{
-111, // i4SlopeNumerator
128 // i4SlopeDenominator
},
// Predictor gain ////当Temporal有效帧统计不足四帧时,使用default temporal作为temporal gain方式:
{
945, // i4R
512, // i4G
757 // i4B
},
// Temporal General //当前LV<i4InitLVThr_L 【无白点场景默认Gain】
{ temporal和Spatial gain混合
1148, // i4R
512, // i4G
641 // i4B
},
// AWB LSC Gain //不再使用
{
877, // i4R
512, // i4G
808 // i4B
}
},
// AWB light area // //AWB框 P0 光源白点个数,个数越多,此数值越高 Statistic Gain
{
// Strobe:FIXME
{
0, // i4RightBound
0, // i4LeftBound
0, // i4UpperBound
0 // i4LowerBound
},
// Tungsten
{
-78, // TungRightBound
-707, // TungLeftBound
-300, // TungUpperBound
-371 // TungLowerBound
},
// Warm fluorescent
{
-78, // WFluoRightBound
-707, // WFluoLeftBound
-371, // WFluoUpperBound
-501 // WFluoLowerBound
},
// Fluorescent
{
75, // FluoRightBound
-78, // FluoLeftBound
-304, // FluoUpperBound
-392 // FluoLowerBound
},
// CWF
{
75, // CWFRightBound
-78, // CWFLeftBound
-392, // CWFUpperBound
-466 // CWFLowerBound
},
// Daylight
{
271, // DayRightBound
75, // DayLeftBound
-300, // DayUpperBound
-420 // DayLowerBound
},
// Shade
{
601, // ShadeRightBound
271, // ShadeLeftBound
-304, // ShadeUpperBound
-433 // ShadeLowerBound
},
// Daylight Fluorescent
{
271, // DFRightBound
75, // DFLeftBound
-420, // DFUpperBound
-501 // DFLowerBound
}
},
// PWB light area
{
// Reference area
{
601, // PRefRightBound
-707, // PRefLeftBound
0, // PRefUpperBound
-501 // PRefLowerBound
},
// Daylight
{
296, // PDayRightBound
75, // PDayLeftBound
-300, // PDayUpperBound
-420 // PDayLowerBound
},
// Cloudy daylight
{
396, // PCloudyRightBound
221, // PCloudyLeftBound
-300, // PCloudyUpperBound
-420 // PCloudyLowerBound
},
// Shade
{
496, // PShadeRightBound
221, // PShadeLeftBound
-300, // PShadeUpperBound
-420 // PShadeLowerBound
},
// Twilight
{
75, // PTwiRightBound
-85, // PTwiLeftBound
-300, // PTwiUpperBound
-420 // PTwiLowerBound
},
// Fluorescent
{
291, // PFluoRightBound
-118, // PFluoLeftBound
-314, // PFluoUpperBound
-461 // PFluoLowerBound
},
// Warm fluorescent
{
-67, // PWFluoRightBound
-267, // PWFluoLeftBound
-314, // PWFluoUpperBound
-461 // PWFluoLowerBound
},
// Incandescent
{
-67, // PIncaRightBound
-267, // PIncaLeftBound
-300, // PIncaUpperBound
-420 // PIncaLowerBound
},
// Gray World
{
5000, // PGWRightBound
-5000, // PGWLeftBound
5000, // PGWUpperBound
-5000 // PGWLowerBound
}
},
// PWB default gain
{
// Daylight
{
1053, // PWB_Day_R
512, // PWB_Day_G
683 // PWB_Day_B
},
// Cloudy daylight
{
1258, // PWB_Cloudy_R
512, // PWB_Cloudy_G
585 // PWB_Cloudy_B
},
// Shade
{
1353, // PWB_Shade_R
512, // PWB_Shade_G
549 // PWB_Shade_B
},
// Twilight
{
799, // PWB_Twi_R
512, // PWB_Twi_G
868 // PWB_Twi_B
},
// Fluorescent
{
944, // PWB_Fluo_R
512, // PWB_Fluo_G
805 // PWB_Fluo_B
},
// Warm fluorescent
{
654, // PWB_WFluo_R
512, // PWB_WFluo_G
1107 // PWB_WFluo_B
},
// Incandescent
{
632, // PWB_Inca_R
512, // PWB_Inca_G
1064 // PWB_Inca_B
},
// Gray World
{
512, // PWB_GW_R
512, // PWB_GW_G
512 // PWB_GW_B
}
},
// AWB preference color //Offset值越大越白平衡,越小越偏色。 slider已不用
{
// Tungsten
{
50, // TUNG_SLIDER //修改此值力度不明显 映射CCT工具Preference ColorFine-tuning 中的滑块
5950 // TUNG_OFFS //修改此值力度明显
},
// Warm fluorescent
{
50, // WFluo_SLIDER
5750 // WFluo_OFFS
},
// Shade
{
50, // Shade_SLIDER
410 // Shade_OFFS
},
// Sunset Area //AWB小框
{
103, // i4Sunset_BoundXr_Thr //X左边为小框区域
-386 // i4Sunset_BoundYr_Thr //不使用,y轴不起作用是因daylight框里小框是从上到下一直到底的
},
// Shade F Area //(X,Y)点右下角区域为TL84小框区域
{
-78, // i4BoundXrThr
-382 // i4BoundYrThr
},
// Shade F Vertex //TL84小框中心点坐标
{
-16, // i4BoundXrThr
-385 // i4BoundYrThr
},
// Shade CWF Area //(X,Y)点右下角区域为CWF小框区域
{
-78, // i4BoundXrThr
-440 // i4BoundYrThr
},
// Shade CWF Vertex // CWF小框中心点坐标
{
-2, // i4BoundXrThr
-441 // i4BoundYrThr
},
},
// CCT estimation //各色温默认值
{
// CCT
{
2300, // i4CCT[0]
2850, // i4CCT[1]
3750, // i4CCT[2]
5100, // i4CCT[3]
6500 // i4CCT[4]
},
// Rotated X coordinate //各色温平均白点落点,计算AWB色温时作为参考 建议保持默认
{
-548, // i4RotatedXCoordinate[0]
-408, // i4RotatedXCoordinate[1]
-259, // i4RotatedXCoordinate[2]
-162, // i4RotatedXCoordinate[3]
0 // i4RotatedXCoordinate[4]
}
}
},
// Algorithm Tuning Parameter
{
// AWB Backup Enable //重新进入camera,AWB是否由上次离开Camera的Gain开始收敛,置0 重新开始收 建议保持默认
0,
// Daylight locus offset LUTs for tungsten
{
21, // i4Size: LUT dimension
{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000}, // i4LUTIn
{0, 350, 800, 1222, 1444, 1667, 1889, 2111, 2333, 2556, 2778, 3000, 3222, 3444, 3667, 3889, 4111, 4333, 4556, 4778, 5000} // i4LUTOut
},
// Daylight locus offset LUTs for WF
{
21, // i4Size: LUT dimension
{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000}, // i4LUTIn
{0, 350, 700, 1000, 1444, 1667, 1889, 2111, 2333, 2556, 2778, 3000, 3222, 3444, 3667, 3889, 4111, 4333, 4556, 4778, 5000} // i4LUTOut
},
// Daylight locus offset LUTs for Shade
{
21, // i4Size: LUT dimension
{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000}, // i4LUTIn
{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000} // i4LUTOut
},
// Preference gain for each light source //AWB算法会乘以此R、G、B gain 从而改变R、G、B的比
{
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // STROBE
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // TUNGSTEN
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {506, 512, 512}, {506, 512, 515}, {506, 512, 515}, {506, 512, 515}, {506, 512, 515}, {512, 512, 512}, {512, 512, 512}
}, // WARM F
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {506, 512, 518}, {506, 512, 518}, {506, 512, 518}, {512, 512, 512}, {512, 512, 512}
}, // F
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {506, 512, 512}, {506, 512, 512}, {506, 512, 515}, {506, 512, 515}, {506, 512, 515}, {506, 512, 515}, {512, 512, 512}, {512, 512, 512}
}, // CWF
{
{508, 512, 512}, {508, 512, 512}, {504, 512, 512}, {504, 512, 512}, {512, 512, 512}, {516, 512, 512}, {516, 512, 512}, {516, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {516, 512, 512}, {516, 512, 512}, {510, 512, 515}, {510, 512, 515}, {510, 512, 515}, {510, 512, 515}, {512, 512, 512}, {512, 512, 512}
}, // DAYLIGHT
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // SHADE
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 506}, {512, 512, 506}, {512, 512, 506}, {512, 512, 506},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
} // DAYLIGHT F
},
// Parent block weight parameter //建议保持默认
{
1, // bEnable
6 // i4ScalingFactor: [6] 1~12, [7] 1~6, [8] 1~3, [9] 1~2, [>=10]: 1 此值最大时,一个暗的pixel和一个亮的pixel的权重是一样的;此值越小时,两者差别越大,亮度会对其权重有影响; 建议保持默认
},
// AWB LV threshold for predictor //LV阈值,控制调用DaylightLocus_L 或是 DaylightLocus_H
{
115, // i4InitLVThr_L //i4InitLVThr_L LV小于11 调用DaylightLocus_L 在CCT里直接修改rAlgoTuningParam.rPredictorLVThr_L
155, // i4InitLVThr_H //i4InitLVThr_H LV大于15 调用DaylightLocus_H LV在两值之间,DaylightLocus_L与DaylightLocus_H插值后调用 在CCT里直接修改rAlgoTuningParam.rPredictorLVThr_H
100 // i4EnqueueLVThr //不使用
},
// AWB number threshold for temporal predictor
{
65, // i4Neutral_ParentBlk_Thr //通过记录前面有白点帧的awb gain作为temporal gain方式【(1)和(2)需同时满足】:(1)当前帧白点的总数大于此值时,才会记录AWB gain; 在CCT里直接修改rAlgoTuningParam.rTemporalEnqueueThr.i4Neutral_ParentBlk_Thr[]
//LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 50, 25, 2, 2, 2, 2, 2, 2, 2} // (%) i4CWFDF_LUTThr //(2)同时满足DF和CWF光源的白点个数要小于Thr值;例:LV10=50,则DF和CWF光源的白点个数要<50%*432时的白点个数,即大block的个数 在CCT里直接修改rAlgoTuningParam.rTemporalEnqueueThr.i4CWFDF_LUTThr[]
},
// AWB light neutral noise reduction for outdoor //CCT里直接修改rAlgoTuningParam.rNeturalBlkTHr.m_i4光源【】
{
//LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// Non neutral // //例:当前所有光源白点的个数<432*5%时的白点数,使用temporal和spatial gain混合 (432=24*18 AWB大block)白点越少,使用越多temporal和spatial gain混合结果
},
// AWB feature detection //小框是否启用的条件
{
// Sunset Prop
// Shade F Detection
{
1, // i4Enable
50, // i4LVThr_L \ //决定当前亮度小框的作用强弱,具有smooth效果
90, // i4LVThr_H /
128 // i4DaylightProb (偏色值)决定小框作用最强强度,值越大,小框作用越弱越白平衡;越小越偏色
},
// Shade CWF Detection
{
1, // i4Enable
50, // i4LVThr_L
90, // i4LVThr_H
192 // i4DaylightProb
},
},
// AWB non-neutral probability for spatial and temporal weighting look-up table (Max: 100; Min: 0) //当temporal和spatial gain混合时,混多少Temporal gain 值越大越趋向于temporal gian 在CCT里直接修改rAlgoTuningParam.rNonNeutralProb.i4LUT[]
{
//LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ 0, 33, 66, 100, 100, 100, 100, 100, 100, 100, 100, 70, 30, 20, 10, 0, 0, 0, 0}
},
// AWB daylight locus probability look-up table (Max: 100; Min: 0) //决定各混多少statistic gian和spatial gain 值越大越趋向于statistic gian 在CCT里直接修改rAlgoTuningParam.rDatlightLocusProb[0-7].i4LUT[]
{ //LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 50, 25, 0, 0, 0, 0}, // Strobe
{ 90, 90, 90, 90, 90, 85, 85, 85, 85, 85, 85, 85, 85, 75, 50, 25, 0, 0, 0}, // Tungsten
{ 90, 90, 90, 90, 90, 85, 85, 85, 85, 85, 85, 75, 50, 50, 50, 50, 25, 0, 0}, // Warm fluorescent
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 95, 75, 50, 25, 25, 25, 0, 0, 0}, // Fluorescent
{ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 80, 55, 30, 30, 30, 30, 0, 0, 0}, // CWF
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 75, 50, 40, 30, 20}, // Daylight
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 75, 50, 25, 0, 0, 0, 0}, // Shade
{ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 80, 55, 30, 30, 30, 30, 0, 0, 0} // Daylight fluorescent
},
// AWB tuning information
{
6735,// project code
5588,// model
20150624,// date
0,// reserved 0
1,// reserved 1
2,// reserved 2
3,// reserved 3
4,// reserved 4
}
}
},
{
{
// AWB calibration data
{
// rUnitGain (unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rGoldenGain (golden sample gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rUnitGain TL84 (unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rGoldenGain TL84 (golden sample gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rUnitGain Alight (unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rGoldenGain Alight (golden sample gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rTuningUnitGain (Tuning sample unit gain: 1.0 = 512)
{
0, // i4R
0, // i4G
0 // i4B
},
// rD65Gain (D65 WB gain: 1.0 = 512)
{
1095, // D65Gain_R
512, // D65Gain_G
736 // D65Gain_B
}
},
// Original XY coordinate of AWB light source
{
// Strobe
{
0, // i4X
0 // i4Y
},
// Horizon
{
-425, // OriX_Hor
-449 // OriY_Hor
},
// A
{
-278, // OriX_A
-462 // OriY_A
},
// TL84
{
-78, // OriX_TL84
-493 // OriY_TL84
},
// CWF
{
-37, // OriX_CWF
-530 // OriY_CWF
},
// DNP
{
23, // OriX_DNP
-487 // OriY_DNP
},
// D65
{
188, // OriX_D65
-442 // OriY_D65
},
// DF
{
168, // OriX_DF
-527 // OriY_DF
}
},
// Rotated XY coordinate of AWB light source
{
// Strobe
{
0, // i4X
0 // i4Y
},
// Horizon
{
-441, // RotX_Hor
-434 // RotY_Hor
},
// A
{
-294, // RotX_A
-452 // RotY_A
},
// TL84
{
-56, // RotX_TL84
-529 // RotY_TL84
},
// CWF
{
-56, // RotX_CWF
-529 // RotY_CWF
},
// DNP
{
6, // RotX_DNP
-488 // RotY_DNP
},
// D65
{
172, // RotX_D65
-449 // RotY_D65
},
// DF
{
149, // RotX_DF
-533 // RotY_DF
}
},
// AWB gain of AWB light source
{
// Strobe
{
512, // i4R
512, // i4G
512 // i4B
},
// Horizon
{
529, // AWBGAIN_HOR_R
512, // AWBGAIN_HOR_G
1671 // AWBGAIN_HOR_B
},
// A
{
656, // AWBGAIN_A_R
512, // AWBGAIN_A_G
1394 // AWBGAIN_A_B
},
// TL84
{
898, // AWBGAIN_TL84_R
512, // AWBGAIN_TL84_G
855 // AWBGAIN_TL84_B
},
// CWF
{
766, // AWBGAIN_CWF_R
512, // AWBGAIN_CWF_G
949 // AWBGAIN_CWF_B
},
// DNP
{
770, // AWBGAIN_DNP_R
512, // AWBGAIN_DNP_G
755 // AWBGAIN_DNP_B
},
// D65
{
872, // AWBGAIN_D65_R
512, // AWBGAIN_D65_G
579 // AWBGAIN_D65_B
},
// DF
{
935, // AWBGAIN_DF_R
512, // AWBGAIN_DF_G
688 // AWBGAIN_DF_B
}
},
// Rotation matrix parameter
{
1, // RotationAngle
256, // Cos
9 // Sin
},
// Daylight locus parameter
{
-138, // i4SlopeNumerator
128 // i4SlopeDenominator
},
// Predictor gain
{
101, // i4PrefRatio100
// DaylightLocus_L
1233, // i4R
512, // i4G
703 // i4B
},
// DaylightLocus_H
{
899, // i4R
512, // i4G
986 // i4B
},
// Temporal General
{
1233, // i4R
512, // i4G
703 // i4B
},
// AWB LSC Gain
{
938, // i4R
512, // i4G
943 // i4B
}
},
// AWB light area
{
// Strobe:FIXME
{
0, // i4RightBound
0, // i4LeftBound
0, // i4UpperBound
0 // i4LowerBound
},
// Tungsten
{
-195, // TungRightBound
-841, // TungLeftBound
-399, // TungUpperBound
-471 // TungLowerBound
},
// Warm fluorescent
{
-195, // WFluoRightBound
-841, // WFluoLeftBound
-471, // WFluoUpperBound
-529 // WFluoLowerBound
},
// Fluorescent
{
-19, // FluoRightBound
-195, // FluoLeftBound
-417, // FluoUpperBound
-514 // FluoLowerBound
},
// CWF
{
26, // CWFRightBound
-170, // CWFLeftBound
-514, // CWFUpperBound
-574 // CWFLowerBound
},
// Daylight
{
202, // DayRightBound
-19, // DayLeftBound
-417, // DayUpperBound
-514 // DayLowerBound
},
// Shade
{
532, // ShadeRightBound
202, // ShadeLeftBound
-417, // ShadeUpperBound
-481 // ShadeLowerBound
},
// Daylight Fluorescent
{
202, // DFRightBound
26, // DFLeftBound
-514, // DFUpperBound
-574 // DFLowerBound
}
},
// PWB light area // Statistic Gain
{
// Reference area
{
532, // PRefRightBound
-841, // PRefLeftBound
-374, // PRefUpperBound
-574 // PRefLowerBound
},
// Daylight
{
227, // PDayRightBound
-19, // PDayLeftBound
-417, // PDayUpperBound
-514 // PDayLowerBound
},
// Cloudy daylight
{
327, // PCloudyRightBound
152, // PCloudyLeftBound
-417, // PCloudyUpperBound
-514 // PCloudyLowerBound
},
// Shade
{
427, // PShadeRightBound
152, // PShadeLeftBound
-417, // PShadeUpperBound
-514 // PShadeLowerBound
},
// Twilight
{
-19, // PTwiRightBound
-179, // PTwiLeftBound
-417, // PTwiUpperBound
-514 // PTwiLowerBound
},
// Fluorescent
{
222, // PFluoRightBound
-195, // PFluoLeftBound
-399, // PFluoUpperBound
-579 // PFluoLowerBound
},
// Warm fluorescent
{
-194, // PWFluoRightBound
-394, // PWFluoLeftBound
-399, // PWFluoUpperBound
-579 // PWFluoLowerBound
},
// Incandescent
{
-194, // PIncaRightBound
-394, // PIncaLeftBound
-417, // PIncaUpperBound
-514 // PIncaLowerBound
},
// Gray World
{
5000, // PGWRightBound
-5000, // PGWLeftBound
5000, // PGWUpperBound
-5000 // PGWLowerBound
}
},
// PWB default gain // Statistic Gain
{
// Daylight
{
1125, // PWB_Day_R
512, // PWB_Day_G
812 // PWB_Day_B
},
// Cloudy daylight
{
1343, // PWB_Cloudy_R
512, // PWB_Cloudy_G
672 // PWB_Cloudy_B
},
// Shade
{
1433, // PWB_Shade_R
512, // PWB_Shade_G
627 // PWB_Shade_B
},
// Twilight
{
863, // PWB_Twi_R
512, // PWB_Twi_G
1079 // PWB_Twi_B
},
// Fluorescent
{
1033, // PWB_Fluo_R
512, // PWB_Fluo_G
951 // PWB_Fluo_B
},
// Warm fluorescent
{
692, // PWB_WFluo_R
512, // PWB_WFluo_G
1462 // PWB_WFluo_B
},
// Incandescent
{
669, // PWB_Inca_R
512, // PWB_Inca_G
1418 // PWB_Inca_B
},
// Gray World
{
512, // PWB_GW_R
512, // PWB_GW_G
512 // PWB_GW_B
}
},
// AWB preference color
{
// Tungsten
{
100, // TUNG_SLIDER
4004 // TUNG_OFFS
},
// Warm fluorescent
{
100, // WFluo_SLIDER
4004 // WFluo_OFFS
},
// Shade
{
50, // Shade_SLIDER
909 // Shade_OFFS
},
// Sunset Area
{
19, // i4Sunset_BoundXr_Thr
-488 // i4Sunset_BoundYr_Thr
},
// Shade F Area
{
-70, // i4BoundXrThr
-449 // i4BoundYrThr
},
// Shade F Vertex
{
-70, // i4BoundXrThr
-449 // i4BoundYrThr
},
// Shade CWF Area
{
-56, // i4BoundXrThr
-529 // i4BoundYrThr
},
// Shade CWF Vertex
{
-56, // i4BoundXrThr
-529 // i4BoundYrThr
},
},
// CCT estimation
{
// CCT
{
2300, // i4CCT[0]
2850, // i4CCT[1]
3750, // i4CCT[2]
5100, // i4CCT[3]
6500 // i4CCT[4]
},
// Rotated X coordinate
{
-547, // i4RotatedXCoordinate[0]
-423, // i4RotatedXCoordinate[1]
-271, // i4RotatedXCoordinate[2]
-104, // i4RotatedXCoordinate[3]
0 // i4RotatedXCoordinate[4]
}
}
},
// Algorithm Tuning Parameter
{
// AWB Backup Enable
0,
// Daylight locus offset LUTs for tungsten
{
21, // i4Size: LUT dimension
{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000}, // i4LUTIn
{0, 350, 800, 1222, 1444, 1667, 1889, 2111, 2333, 2556, 2778, 3000, 3222, 3444, 3667, 3889, 4111, 4333, 4556, 4778, 5000} // i4LUTOut
},
// Daylight locus offset LUTs for WF
{
21, // i4Size: LUT dimension
{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000}, // i4LUTIn
{0, 350, 700, 850, 1200, 1667, 1889, 2111, 2333, 2556, 2778, 3000, 3222, 3444, 3667, 3889, 4111, 4333, 4556, 4778, 5000} // i4LUTOut
},
// Daylight locus offset LUTs for Shade
{
21, // i4Size: LUT dimension
{0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000}, // i4LUTIn
{0, 500, 1000, 1500, 2500, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8000, 8000, 8500, 9000, 9500, 10000} // i4LUTOut
},
// Preference gain for each light source
{
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // STROBE
{
{530, 530, 480}, {530, 530, 480}, {530, 530, 480}, {530, 530, 480}, {530, 530, 480}, {520, 520, 496}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // TUNGSTEN
{
{512, 512, 508}, {512, 512, 508}, {512, 512, 508}, {512, 512, 508}, {512, 512, 508}, {512, 512, 508}, {512, 512, 508}, {512, 512, 508}, {512, 512, 508}, {512, 512, 508},
{512, 512, 508}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // WARM F
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {502, 512, 512}, {502, 512, 512}, {502, 512, 512}, {502, 512, 512}, {502, 512, 512}
}, // F
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // CWF
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {502, 512, 512}, {502, 512, 512}, {502, 512, 512}, {502, 512, 512}, {502, 512, 512}
}, // DAYLIGHT
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
}, // SHADE
{
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512},
{512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}, {512, 512, 512}
} // DAYLIGHT F
},
// Parent block weight parameter
{
1, // bEnable
6 // i4ScalingFactor: [6] 1~12, [7] 1~6, [8] 1~3, [9] 1~2, [>=10]: 1
},
// AWB LV threshold for predictor
{
115, // i4InitLVThr_L
155, // i4InitLVThr_H
100 // i4EnqueueLVThr
},
// AWB number threshold for temporal predictor
{
65, // i4Neutral_ParentBlk_Thr
//LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 50, 25, 2, 2, 2, 2, 2, 2, 2} // (%) i4CWFDF_LUTThr
},
// AWB light neutral noise reduction for outdoor
{
//LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// Non neutral
{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 10, 10, 10, 10, 10, 10, 10, 10}, // (%)
// Flurescent
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 10, 10, 10, 10, 10, 10, 10, 10}, // (%)
// CWF
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 10, 10, 10, 10, 10, 10, 10, 10}, // (%)
// Daylight
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2}, // (%)
// DF
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 10, 10, 10, 10, 10, 10, 10, 10}, // (%)
},
// AWB feature detection
{
// Sunset Prop
{
1, // i4Enable
120, // i4LVThr_L
130, // i4LVThr_H
10, // i4SunsetCountThr
0, // i4SunsetCountRatio_L
171 // i4SunsetCountRatio_H
},
// Shade F Detection
{
1, // i4Enable
0, // i4LVThr_L
1, // i4LVThr_H
96 // i4DaylightProb
},
// Shade CWF Detection
{
1, // i4Enable
0, // i4LVThr_L
1, // i4LVThr_H
208 // i4DaylightProb
},
},
// AWB non-neutral probability for spatial and temporal weighting look-up table (Max: 100; Min: 0)
{
//LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 50, 30, 20, 10, 0, 0, 0, 0}
},
// AWB daylight locus probability look-up table (Max: 100; Min: 0)
{ //LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 50, 25, 0, 0, 0, 0}, // Strobe
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 75, 50, 25, 25, 25, 0, 0, 0}, // Tungsten
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 75, 50, 25, 25, 25, 0, 0, 0}, // Warm fluorescent
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 95, 95, 70, 50, 25, 25, 25, 0, 0, 0}, // Fluorescent
{ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 80, 55, 30, 30, 30, 30, 0, 0, 0}, // CWF
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 75, 50, 40, 30, 20}, // Daylight
{ 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 75, 50, 25, 0, 0, 0, 0}, // Shade
{ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 80, 55, 30, 30, 30, 30, 0, 0, 0} // Daylight fluorescent
},
// AWB tuning information
{
6735,// project code
5588,// model
20150624,// date
0,// reserved 0
1,// reserved 1
2,// reserved 2
3,// reserved 3
4,// reserved 4
}
}
}
},
// Flash AWB NVRAM
{
#include INCLUDE_FILENAME_FLASH_AWB_PARA
},
{0}
};
#include INCLUDE_FILENAME_ISP_LSC_PARAM
//}; // namespace
const CAMERA_TSF_TBL_STRUCT CAMERA_TSF_DEFAULT_VALUE =
{
{
1, // isTsfEn
2, // tsfCtIdx
{20, 2000, -110, -110, 512, 512, 512, 0} // rAWBInput[8]
},
#include INCLUDE_FILENAME_TSF_PARA
#include INCLUDE_FILENAME_TSF_DATA
};
const NVRAM_CAMERA_FEATURE_STRUCT CAMERA_FEATURE_DEFAULT_VALUE =
{
#include INCLUDE_FILENAME_FEATURE_PARA
};
typedef NSFeature::RAWSensorInfo<SENSOR_ID> SensorInfoSingleton_T;
namespace NSFeature {
template <>
UINT32
SensorInfoSingleton_T::
impGetDefaultData(CAMERA_DATA_TYPE_ENUM const CameraDataType, VOID*const pDataBuf, UINT32 const size) const
{
UINT32 dataSize[CAMERA_DATA_TYPE_NUM] = {sizeof(NVRAM_CAMERA_ISP_PARAM_STRUCT),
sizeof(NVRAM_CAMERA_3A_STRUCT),
sizeof(NVRAM_CAMERA_SHADING_STRUCT),
sizeof(NVRAM_LENS_PARA_STRUCT),
sizeof(AE_PLINETABLE_T),
0,
sizeof(CAMERA_TSF_TBL_STRUCT),
0,
sizeof(NVRAM_CAMERA_FEATURE_STRUCT)
};
if (CameraDataType > CAMERA_NVRAM_DATA_FEATURE || NULL == pDataBuf || (size < dataSize[CameraDataType]))
{
return 1;
}
switch(CameraDataType)
{
case CAMERA_NVRAM_DATA_ISP:
memcpy(pDataBuf,&CAMERA_ISP_DEFAULT_VALUE,sizeof(NVRAM_CAMERA_ISP_PARAM_STRUCT));
break;
case CAMERA_NVRAM_DATA_3A:
memcpy(pDataBuf,&CAMERA_3A_NVRAM_DEFAULT_VALUE,sizeof(NVRAM_CAMERA_3A_STRUCT));
break;
case CAMERA_NVRAM_DATA_SHADING:
memcpy(pDataBuf,&CAMERA_SHADING_DEFAULT_VALUE,sizeof(NVRAM_CAMERA_SHADING_STRUCT));
break;
case CAMERA_DATA_AE_PLINETABLE:
memcpy(pDataBuf,&g_PlineTableMapping,sizeof(AE_PLINETABLE_T));
break;
case CAMERA_DATA_TSF_TABLE:
memcpy(pDataBuf,&CAMERA_TSF_DEFAULT_VALUE,sizeof(CAMERA_TSF_TBL_STRUCT));
break;
case CAMERA_NVRAM_DATA_FEATURE:
memcpy(pDataBuf,&CAMERA_FEATURE_DEFAULT_VALUE,sizeof(NVRAM_CAMERA_FEATURE_STRUCT));
break;
default:
break;
}
return 0;
}}; // NSFeature