Commit c8d13a93 authored by linwenjin's avatar linwenjin

[UPDATE]SDK 2.5.0.7.0

parent 19c41439
...@@ -1069,7 +1069,7 @@ CONFIG_BSP_USING_I2C0=y ...@@ -1069,7 +1069,7 @@ CONFIG_BSP_USING_I2C0=y
CONFIG_BSP_USING_I2C1=y CONFIG_BSP_USING_I2C1=y
CONFIG_BSP_USING_I2C2=y CONFIG_BSP_USING_I2C2=y
CONFIG_BSP_USING_I2C3=y CONFIG_BSP_USING_I2C3=y
# CONFIG_SA_I2C_TEST is not set CONFIG_SA_I2C_TEST=y
# CONFIG_BSP_USING_ANNE is not set # CONFIG_BSP_USING_ANNE is not set
# CONFIG_BSP_USING_AUDIO_ALG is not set # CONFIG_BSP_USING_AUDIO_ALG is not set
# CONFIG_BSP_USING_AUDIO is not set # CONFIG_BSP_USING_AUDIO is not set
......
# 2.5.0.7.0版本0.0
## 发布日期:2025年03月06日
### 更新内容
1. PQTOOL更新,增加手动控制场景,增加json文件批量转bin
2. 取消blc场景支持,解决拍照画面偏红问题
3. heif增加osd叠加
4. 减少SD识别的场景个数,从9个减少到6个
# 2.5.0.6.9版本0.0 # 2.5.0.6.9版本0.0
## 发布日期:2025年2月27日 ## 发布日期:2025年2月27日
......
{
"doc": "media",
"version": "1.0.0.1",
"#note": [
"scene: capture,record,captureaddrecord,visual"
],
"scene": "captureaddrecord",
"video": {
"#note0": [
"SensorType 0:4d10,1:4a10,2:2n10,3:imx681,4:5l10,5:sc535,6:4j10,7:4l10",
"SensorMode 0:linear,1:hdr"
],
"SensorType": 3, "SensorMode": 0,
"#note1": [
"Rotation 0:0,1:90,2:180,3:270",
"FilterColor 0:off,1:pink,2:blue,3:cowboy,4:cyantone,5:prettypure,6:moody"
],
"ViDev": 0, "MaxFps": 15.0, "MinFps": 15.0, "Mirror": 0, "Flip": 0, "Rotation": 0, "PyrOff": 0,
"Gdc": 0, "FilterColor": 0,
"IspFile": [ "/acme/conf/681/imx681_capture_Color_Outdoor.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_capture_Color_Indoor_diff.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin","","","","","","/acme/conf/681/imx681_capture_Color_Blc_diff.bin"],
"AinrFile": "/acme/conf/681/imx681_v01_001_800_rtl.bin",
"ProEnable": 0, "ISO": 100, "AWBCt": 5000, "SportEnable": 0, "MaxIntTime": 30000,
"venc": [
{
"#note-capture channel": [
"SmartEncoder 0:none,1:roi,2:qp"
],
"Width": 4032, "Height": 3024, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0,
"region": [
{
"#note": [
"Type 0:image,1:timestamp,2:timestamp+mode,3:timestamp+week,4:timestamp+week(EN)"
],
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp"
},
{
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp"
}
]
},
{
"#note-record channel": [
"CodeType 0:h264,1:h265,2:jpeg",
"RcMode 0:QP,1:cbr,2:vbr,3:low latency,4:capped vbr,5:adaptive vbr,7:min br,63:bypass,64:jpeg fxiQP",
"SmartEncoder 0:none,1:roi,2:QP"
],
"CodeType": 1, "Qfactor": 80, "RcMode": 1,
"Width": 960, "Height": 688, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0,
"region": [
{
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp"
},
{
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp"
}
]
}
],
"sd":
{
"#note": [
"SdMode 0:auto,1:manual",
"SceneType 0:outdoor,1:indoor,2:ainr,8:backlight",
"WdrMode 0:linear,1:hdr,2:auto",
"StrategyMode 0:normal,1:blc,2:hs"
],
"SdMode": 0, "SceneType": 0, "WdrMode": 0,
"MaxInttimeEnable": 0, "IntTimeMax": 30000,
"RoiEnable": 0, "X": 0, "Y": 0, "Width": 1920, "Height": 1080,
"StrategyMode": 0, "Strength": 100,
"FlickerEnable": 0, "Frequency": 50
}
},
"capture":
{
"#note": [
"SaveFormat 0:jpeg,1:heif"
],
"BokehEnable": 0, "MFNREnable": 0, "HDREnable": 0, "ZSLEnable": 0,
"BeautyEnable": 0, "Strength": 50,
"SaveEnable": 1, "SaveFormat": 0, "SaveFilePath": "/mnt/sdcard"
},
"record":
{
"EISMode": 0,
"audio":
{
"#note": [
"SampleRate 8000 16000 32000 48000",
"SoundMode 1:mono,2:stereo",
"EncType 0:lcaac,1:g711a,2:g711u,3:pcm"
],
"AudioEnable": 0,
"SampleRate": 16000,
"SoundMode": 1,
"EncType": 0,
"VqeEnable": 0,"VqeParamFile": "/acme/bin/vqe.bin"
},
"#note": [
"SaveFormat 0:mp4,1:h265,2:h264,3:jpg"
],
"SaveEnable": 1, "SaveFormat": 1, "SaveFilePath": "/mnt/sdcard"
},
"svp":
{
"OCREnable": 0,
"QRCodeEnable": 0,
"FaceDetEnable": 0,
"PeopleDetEnable": 0,
"SmartAeEnable": 0
}
}
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
], ],
"ViDev": 0, "MaxFps": 15.0, "MinFps": 15.0, "Mirror": 0, "Flip": 0, "Rotation": 0, "PyrOff": 0, "ViDev": 0, "MaxFps": 15.0, "MinFps": 15.0, "Mirror": 0, "Flip": 0, "Rotation": 0, "PyrOff": 0,
"Gdc": 0, "FilterColor": 0, "Gdc": 0, "FilterColor": 0,
"IspFile": [ "/acme/conf/681/imx681_capture_Color_Outdoor.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_capture_Color_Indoor_diff.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin","","","","","","/acme/conf/681/imx681_capture_Color_Blc_diff.bin"], "IspFile": [ "/acme/conf/imx681/bin/12M_linear_Outdoor.bin",
"AinrFile": "/acme/conf/681/imx681_v01_001_800_rtl.bin", "/acme/conf/imx681/bin/12M_linear_Indoor_diff.bin","","","",
""],
"AinrFile": "/acme/conf/imx681/imx681_v01_001_800_rtl.bin",
"ProEnable": 0, "ISO": 100, "AWBCt": 5000, "SportEnable": 0, "MaxIntTime": 30000, "ProEnable": 0, "ISO": 100, "AWBCt": 5000, "SportEnable": 0, "MaxIntTime": 30000,
"venc": [ "venc": [
{ {
...@@ -26,21 +28,21 @@ ...@@ -26,21 +28,21 @@
"SmartEncoder 0:none,1:roi,2:qp" "SmartEncoder 0:none,1:roi,2:qp"
], ],
"Width": 4032, "Height": 3024, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0, "Width": 4032, "Height": 3024, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0,
"#note-record region": [
"Type 0:image,1:time,2:time and debug info"
],
"region": [ "region": [
{ {
"#note": [ "Enable": 0, "Type": 0,
"Type 0:image,1:timestamp,2:timestamp+mode,3:timestamp+week,4:timestamp+week(EN)"
],
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp"
},
{
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": "/acme/bin/logo256x128.bgra"
},
{
"Enable": 1, "Type": 2,
"X":32, "Y": 2896, "Width": 1888, "Height": 48,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": ""
} }
] ]
}, },
...@@ -52,18 +54,21 @@ ...@@ -52,18 +54,21 @@
], ],
"CodeType": 1, "Qfactor": 80, "RcMode": 1, "CodeType": 1, "Qfactor": 80, "RcMode": 1,
"Width": 1920, "Height": 1080, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0, "Width": 1920, "Height": 1080, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0,
"#note-record region": [
"Type 0:image,1:time,2:time and debug info"
],
"region": [ "region": [
{ {
"Enable": 0, "Type": 0, "Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": "/acme/bin/logo256x128.bgra"
}, },
{ {
"Enable": 0, "Type": 0, "Enable": 1, "Type": 2,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X":32, "Y": 1000, "Width": 1888, "Height": 48,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": ""
} }
] ]
} }
...@@ -90,7 +95,7 @@ ...@@ -90,7 +95,7 @@
], ],
"BokehEnable": 0, "MFNREnable": 0, "HDREnable": 0, "ZSLEnable": 0, "BokehEnable": 0, "MFNREnable": 0, "HDREnable": 0, "ZSLEnable": 0,
"BeautyEnable": 0, "Strength": 50, "BeautyEnable": 0, "Strength": 50,
"SaveEnable": 1, "SaveFormat": 0, "SaveFilePath": "/mnt/sdcard" "SaveEnable": 1, "SaveFormat": 1, "SaveFilePath": "/mnt/sdcard"
}, },
"record": "record":
{ {
......
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
], ],
"ViDev": 0, "MaxFps": 30.0, "MinFps": 30.0, "Mirror": 0, "Flip": 0, "Rotation": 0, "PyrOff": 0, "ViDev": 0, "MaxFps": 30.0, "MinFps": 30.0, "Mirror": 0, "Flip": 0, "Rotation": 0, "PyrOff": 0,
"Gdc": 0, "FilterColor": 0, "Gdc": 0, "FilterColor": 0,
"IspFile": [ "/acme/conf/681/imx681_video_Color_Outdoor.bin","/acme/conf/681/imx681_video_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_video_Color_Indoor_diff.bin","/acme/conf/681/imx681_video_Color_Outdoor_diff.bin","","","","","","/acme/conf/681/imx681_video_Color_Blc_diff.bin"], "IspFile": [ "/acme/conf/imx681/bin/3M_linear_Outdoor.bin",
"AinrFile": "/acme/conf/681/imx681_v01_001_800_rtl.bin", "/acme/conf/imx681/bin/3M_linear_Indoor_diff.bin","","","",
""],
"AinrFile": "/acme/conf/imx681/imx681_v01_001_800_rtl.bin",
"ProEnable": 0, "ISO": 100, "AWBCt": 5000, "SportEnable": 0, "MaxIntTime": 30000, "ProEnable": 0, "ISO": 100, "AWBCt": 5000, "SportEnable": 0, "MaxIntTime": 30000,
"venc": [ "venc": [
{ {
...@@ -51,19 +53,22 @@ ...@@ -51,19 +53,22 @@
"SmartEncoder 0:none,1:roi,2:QP" "SmartEncoder 0:none,1:roi,2:QP"
], ],
"CodeType": 1, "Qfactor": 80, "RcMode": 1, "CodeType": 1, "Qfactor": 80, "RcMode": 1,
"Width": 1920, "Height": 1080, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0, "Width": 2016, "Height": 1512, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0,
"#note-record region": [
"Type 0:image,1:time,2:time and debug info"
],
"region": [ "region": [
{ {
"Enable": 0, "Type": 0, "Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": "/acme/bin/logo256x128.bgra"
}, },
{ {
"Enable": 0, "Type": 0, "Enable": 1, "Type": 2,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X":32, "Y": 1360, "Width": 1888, "Height": 48,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": ""
} }
] ]
} }
......
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
], ],
"ViDev": 0, "MaxFps": 15.0, "MinFps": 15.0, "Mirror": 0, "Flip": 0, "Rotation": 0, "PyrOff": 1, "ViDev": 0, "MaxFps": 15.0, "MinFps": 15.0, "Mirror": 0, "Flip": 0, "Rotation": 0, "PyrOff": 1,
"Gdc": 0, "FilterColor": 0, "Gdc": 0, "FilterColor": 0,
"IspFile": [ "/acme/conf/681/imx681_video_Color_Outdoor.bin","/acme/conf/681/imx681_video_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_video_Color_Indoor_diff.bin","/acme/conf/681/imx681_video_Color_Outdoor_diff.bin","","","","","","/acme/conf/681/imx681_video_Color_Blc_diff.bin"], "IspFile": [ "/acme/conf/imx681/bin/12M_linear_Outdoor.bin",
"AinrFile": "/acme/conf/681/imx681_v01_001_800_rtl.bin", "/acme/conf/imx681/bin/12M_linear_Indoor_diff.bin","","","",
""],
"AinrFile": "/acme/conf/imx681/imx681_v01_001_800_rtl.bin",
"ProEnable": 0, "ISO": 100, "AWBCt": 5000, "SportEnable": 0, "MaxIntTime": 30000, "ProEnable": 0, "ISO": 100, "AWBCt": 5000, "SportEnable": 0, "MaxIntTime": 30000,
"venc": [ "venc": [
{ {
...@@ -26,21 +28,21 @@ ...@@ -26,21 +28,21 @@
"SmartEncoder 0:none,1:roi,2:qp" "SmartEncoder 0:none,1:roi,2:qp"
], ],
"Width": 4032, "Height": 3024, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0, "Width": 4032, "Height": 3024, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0,
"#note-record region": [
"Type 0:image,1:time,2:time and debug info"
],
"region": [ "region": [
{ {
"#note": [ "Enable": 0, "Type": 0,
"Type 0:image,1:timestamp,2:timestamp+mode,3:timestamp+week,4:timestamp+week(EN)"
],
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp"
},
{
"Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": "/acme/bin/logo256x128.bgra"
},
{
"Enable": 1, "Type": 2,
"X":32, "Y": 2896, "Width": 1888, "Height": 48,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": ""
} }
] ]
}, },
...@@ -51,19 +53,22 @@ ...@@ -51,19 +53,22 @@
"SmartEncoder 0:none,1:roi,2:QP" "SmartEncoder 0:none,1:roi,2:QP"
], ],
"CodeType": 1, "Qfactor": 80, "RcMode": 1, "CodeType": 1, "Qfactor": 80, "RcMode": 1,
"Width": 1920, "Height": 1080, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0, "Width": 1920, "Height": 1440, "Bitrate": 2048000, "SmartEncoder": 0, "SmartSEI": 0,
"#note-record region": [
"Type 0:image,1:time,2:time and debug info"
],
"region": [ "region": [
{ {
"Enable": 0, "Type": 0, "Enable": 0, "Type": 0,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X": 32, "Y": 32, "Width": 256, "Height": 128,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": "/acme/bin/logo256x128.bgra"
}, },
{ {
"Enable": 0, "Type": 0, "Enable": 1, "Type": 2,
"X": 32, "Y": 32, "Width": 256, "Height": 128, "X":32, "Y": 1360, "Width": 1888, "Height": 48,
"Color0": 16777215, "Color1": 6171602, "Color2": 16745541, "Color0": 16777215, "Color1": 6171602, "Color2": 16745541,
"ImageFile": "/acme/bin/logo256x128.2bpp" "ImageFile": ""
} }
] ]
} }
...@@ -90,7 +95,7 @@ ...@@ -90,7 +95,7 @@
], ],
"BokehEnable": 0, "MFNREnable": 0, "HDREnable": 0, "ZSLEnable": 0, "BokehEnable": 0, "MFNREnable": 0, "HDREnable": 0, "ZSLEnable": 0,
"BeautyEnable": 0, "Strength": 50, "BeautyEnable": 0, "Strength": 50,
"SaveEnable": 1, "SaveFormat": 0, "SaveFilePath": "/mnt/sdcard" "SaveEnable": 1, "SaveFormat": 1, "SaveFilePath": "/mnt/sdcard"
}, },
"record": "record":
{ {
......
{
"doc": "user",
"version": "2.0.16.0",
"#module": "ENUM: 0 - isp, 1 - filter",
"#alwayson": "ENUM: 0 - disable, 1 - AOR, 2 - DEEP",
"module": 0,
"#top": "BOOL: 0 - OFF, 1 - ON",
"top": {
"hdmi": 0,
"vi": 0,
"ispm": 0,
"ispd": 1,
"savelog": 0,
"savestream": 0,
"alwayson": 0,
"is4K": 1
},
"sensor": {
"#img_mode": "ENUM: 0 - MIPI_LINEAR_MAXRES, 1 - MIPI_HDR_MAXRES, 2 - SPI_MAXRES, 3 - DVP_MAXRES, 4 - MIPI_LINEAR_BINNING, 5 - MODE_EXT1",
"#fps": "NUM: 0 - use default, otherwise - actual fps",
"support": [
{ "lib": "libsns_imx681_soc.so", "device": 0, "img_mode": 0, "fps": 14.29, "mirror": 0,"flip": 0, "obj": "g_stSnsImx681Obj" }
]
},
"config": {
"#ispfile": "0: color_out; 1:color_in_diff; 2:aisp; 3: DN_out; 4:DN_in_diff; 5:DN_night;6:wdr_out; 7:wdr_in_diff;",
"ispfile": [ "/acme/conf/681/imx681_capture_Color_Outdoor.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_capture_Color_Indoor_diff.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin","","","","","","/acme/conf/681/imx681_capture_Color_Blc_diff.bin"],
"algfile": "/acme/conf/681/imx681_v01_001_800_rtl.bin"
},
"filter": {
"ispm_fps": 15,
"ispd_fps": 15,
"jpeg_depth": 3,
"vnne_depth": 3,
"crop": { "x": 96, "y": 144, "width": 3840, "height": 2736 },
"binning": { "width": 1920, "height": 1080 },
"scale": { "width": 960, "height": 540 }
},
"vi": {
"src_fps": 15, "dst_fps": 15, "depth": 0, "mdscale": 1, "rotation": 0,
"gating": { "enable": 0, "vi": 1, "isp": 1, "vpu": 1 },
"crop": { "x": 96, "y": 144, "width": 3840, "height": 2736 },
"pipe": { "bayer": "RGGB" },
"tpg": { "enable": 0, "pattern": "V", "bayer": "BGGR", "motion": 0 },
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
},
"yuv": { "enable": 0, "channel": 0, "mode": 2, "depth": 0, "record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 } },
"svp": [
{
"enable": 0, "channel": 2, "mode": 1, "detect": "trigger",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"modefile": "/acme/conf/facial_feature_extraction_1M_klasym-a8w8.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "npu",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"lib": "libsvp_yolox.so", "intf": "SA_SVP_Postprocess_YOLOX", "modefile": "/acme/conf/object-detection-nas075_person_face_car.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "vnne",
"confthreshold": [0.6, 0.6], "outsel": 0, "filterparams": [0,0,0,0,0,0,0,0,0],
"lib": "libsvp_vnne.so", "intf": "SA_SVP_Postprocess_VNNE", "modefile": "/acme/conf/object-detection_vnne_qat-w6a8-mmdet_superacme_person_pytorch.bin"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "md",
"delay": 0,
"roi": [
{ "valid": 1, "sensi": 6, "x0": 0, "y0": 0, "x1": 480, "y1": 0, "x2": 480, "y2": 270, "x3": 0, "y3": 270 }
]
}
],
"osd": {
"#align": "left-top, right-top, right-bottom, left-bottom, center",
"#full": "enable--ENUM:, 1 - vpss, 2 - YUV(only work on manual mode)",
"workmode": "D",
"font": { "family": "/acme/bin/simhei.ttf", "size": 32 },
"logo": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/x_venc_logo_256_128.bgra" } ],
"mark": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/logo256x128.2bpp" } ],
"text": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 600, "height": 64 },
"point": { "x": 0, "y": 0 },
"align": "right-bottom",
"invert": { "enable": 0, "rect": { "x": 0, "y": 0, "width": 600, "height": 64 } } } ],
"full":[ { "enable": 0,
"channel": 1,
"type": 1 } ]
},
"#wakeup/mode": "ENUM: 0 - isplite, 1 - raw",
"wakeup": {
"mode": 1, "memlen": 50331648,
"totaltime": 1000, "maxtime": 600,
"lerance": 20, "firstlevel": 0, "secondlevel": 0,
"lampdownfreqlmit":10, "lampupfreqlmit":10,
"exptime": 20000, "again": 1024, "dgain": 1024, "ispgain": 1024,
"autotarget": 1, "target": 64, "range": 10,
"isotarget": [ 64, 64, 64, 64, 65, 66, 69, 72, 75, 75, 75, 75, 75, 75, 75, 75 ]
},
"#format": "1 - aac(frmlen=1024,bitrate=32000), 2 - g711(frmlen=160,bitrate=8000)",
"audio": {
"devid": 0,
"ai": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"ao": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"aenc": { "enable": 0, "rtsp": 1, "format": 2, "ps": 0, "samplerate": 16000, "bitwidth": 16, "soundmode": 1, "bitrate": 8000 },
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
},
"jpeg": [
{
"enable": 1, "rtsp": 1, "dump": 1,
"source": { "mode": 2, "channel": 2 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "qp": 80 }, "#encode/profile": "0 - BaseLine",
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"h264": [
{
"enable": 0, "rtsp": 0, "sei": 0, "ps": 0,
"source": { "mode": 2, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 2, "width": 3840, "height": 2736, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - BaseLine, 1 - MP, 2 - HP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 2048000, "max": 3072000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
}
],
"h265": [
{
"enable": 0, "rtsp": 1, "sei": 0, "ps": 0,
"source": { "mode": 2, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "width": 4032, "height": 3024, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - MP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 6144000, "max": 9216000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"vpss": [
{ "channel": 0, "src_fps": 15, "dest_fps": 15, "depth": 2, "crop": { "x": 96, "y": 144, "width": 3840, "height": 2736 } },
{ "channel": 1, "src_fps": 15, "dest_fps": 15, "depth": 2, "scale": { "width": 3840, "height": 2736 } },
{ "channel": 2, "src_fps": 15, "dest_fps": 15, "depth": 2, "scale": { "width": 3840, "height": 2736 } },
{ "channel": 3, "src_fps": 15, "dest_fps": 15, "depth": 2, "scale": { "width": 640, "height": 384 } }
],
"app_isp": {
"sysmaxgain": [2457600, 2457600, 2457600, 2457600, 38, 36],
"aetarget": [46, 46, 43, 41, 39, 38, 36, 34, 32, 32, 32, 32, 30, 30, 30, 30],
"aetargetblack": [38, 38, 38, 38, 38, 36, 34, 32, 30, 30, 30, 30, 30, 30, 30, 30],
"aetargetwdr": [53, 53, 51, 49, 46, 44, 42, 40, 38, 38, 38, 38, 35, 35, 35, 35],
"aetargethdr": [42, 42, 40, 39, 38, 36, 34, 32, 30, 30, 30, 30, 28, 28, 28, 28],
"SnsStartRoute":0,
"adjStep":14,
"StartGainNode":1025,
"StartShutMax":1000000,
"maxIntimeEnable":1,
"maxIntimeAo":1000000,
"maxIntimeNor":200000,
"SenceSwitch":1,
"sd": {
"u8LogLevel":0,
"enOpType":0,
"stManual":{
"u8SceneCoarse":1,
"u8Scene":4,
"f32SceneBlend":0
},
"stAuto":{
"s32SundayThresh":10000,
"s32CloudyMinThresh":3432,
"s32CloudyMaxThresh":9000,
"s32IndoorMinThresh":-1568,
"s32IndoorMaxThresh":-568,
"s32IndoorMinCloudyThresh":6600,
"s32IndoorMaxCloudyThresh":7000,
"s32LowLumIndoorThresh":-2100,
"s32LowLumThresh":-2200,
"s32AeShutterLowThresh":2,
"s32AeShutterHighThresh":1,
"s32B2dLowThresh":460,
"s32B2dHighThresh":10000,
"s32FarDistanceThresh":500,
"s32NearDistanceThresh":500,
"s32TempLowThresh":500,
"s32TempHighThresh":500,
"u8BacklightEn":1,
"f32BacklightB2mBvK":-6,
"u32BacklightB2mBvB":25000,
"s32BacklightM2dThd":1500,
"u16TFrame":1,
"u8InitCount":3,
"u8InitScene":4,
"f32InitSceneBlend":0,
"u8InitSceneCoarse":1
},
"enAinrOpType":0,
"stAinrManual":{},
"stAinrAuto":{
"u32AinrOnIsoThr":102400,
"u32AinrOffIsoThr":102400
},
"stWdrAttr":{
"bEnable":0,
"u32WdrToLinearThr":60,
"u32LinearToWdrThr":100,
"u32EvDiffThr":9,
"u32DrDiffThr":4,
"u32WdrEnvLumaThr":11400,
"u32LinearEnvLumaThr":11400
}
} ,
"icr": {
"u16IrRGgain":276,
"u16IrBGgain":266,
"u16MaxGainDistance":350,
"stLumaParam":{
"u16MinVisibleRatio":250,
"astThrParam":[
{
"u32C2bLumaThr":536400,
"u32B2cLumaThr":39000,
"u32B2cNightLumaThr":7,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":564000,
"u32B2cLumaThr":39300,
"u32B2cNightLumaThr":5,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":591000,
"u32B2cLumaThr":39600,
"u32B2cNightLumaThr":3,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
}
]
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"lamp": {
"stlampIr":{
"u32DiffTolerance":2,
"u16OffRatio":820,
"astStepLut":[
{
"u32Diff":1,
"s32Step":10
},
{
"u32Diff":20,
"s32Step":50
},
{
"u32Diff":40,
"s32Step":100
},
{
"u32Diff":80,
"s32Step":300
}
],
"astThrParam":[
{
"u32OnISO":29000,
"u32OffISO":6500,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":30000,
"u32OffISO":6800,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":31000,
"u32OffISO":7100,
"u32TargetISO":22800,
"u16EVOff":130
}
]
},
"stlampWl":{
"u32DiffTolerance":1,
"u16OffRatio":980,
"astStepLut":[
{
"u32Diff":1,
"s32Step":15
},
{
"u32Diff":10,
"s32Step":100
},
{
"u32Diff":40,
"s32Step":500
},
{
"u32Diff":80,
"s32Step":1000
}
],
"astThrParam":[
{
"u32OnISO":53200,
"u32OffISO":8000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":56200,
"u32OffISO":11000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":59200,
"u32OffISO":14000,
"u32TargetISO":25600,
"u16EVOff":130
}
]
},
"u8RunInterval":7,
"stEnvCompareParam":{
"bEnvCompare":0,
"u16HistBinRatioOn":1014,
"u16StdRatioOn":973,
"u16HistBinRatioOff":1014,
"u16StdRatioOff":973,
"s32RecordValidPeriod":7200
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"#nightMode": "0 - day, 1 - auto(day/night)",
"#lightOff": "0 - open lamp, 1 - close lamp",
"#lightFrqWl": "wl max [0~100]",
"#lightFrqIR": "ir max [0~100]",
"stLedCtlParam":{
"wdrMode":0,
"wdrSwitchMode":0,
"sensitivity":1,
"nightMode":0,
"lightOff":0,
"lightFrqWl":100,
"lightFrqIR":100,
"lightDownFrqWl":0,
"lightDownFrqIR":0,
"icrLampMode":0,
"icrEn":0,
"lampType":0,
"lampLuma":0
},
"stIspTest":{
"enable":0,
"index":1,
"skipnum":5
}
},
"debug": {
"hdr": 0,
"gdc": 0,
"#iso": "0 - AUTO, otherwise - Manual. Range 100 - 3276800",
"iso": 0,
"#ct": "0 - AUTO, otherwise - Manual. Range 1000 - 10000",
"ct": 0,
"#hdr_gain": "0 - AUTO, otherwise - Manual. Range 32 - 1024",
"hdr_gain": 0,
"#ctrl": "0 -AUTO, 1 - Manual",
"ctrl": 0,
"fe": {
"bypass_crop": 1,
"bypass_rcrop": 1,
"bypass_fpn": 1,
"bypass_linear": 1,
"bypass_blc": 0,
"bypass_dg": 1,
"bypass_raw2l": 1,
"bypass_raw2l_binning": 0,
"bypass_raw2l_bayer2l": 1,
"bypass_binning": 1,
"bypass_lsc": 1
},
"be": {
"bypass_raw2y": 1,
"bypass_hdr": 1,
"bypass_grgb": 0,
"bypass_blc": 0,
"bypass_md": 1,
"bypass_dg": 0,
"bypass_lsc": 0,
"bypass_wb": 0,
"bypass_cfa": 0,
"bypass_pfc": 0,
"bypass_fcs": 0,
"bypass_ccm": 0,
"bypass_gtm": 1,
"bypass_lut2d": 1,
"bypass_de": 0,
"bypass_gamma": 0,
"bypass_rgb2yuv": 0,
"bypass_gme": 1,
"bypass_aiisp_pre": 1,
"bypass_aiisp_post": 1,
"bypass_aiisp": 1,
"bypass_rawnf": 0,
"bypass_dpc0": 0,
"bypass_dpc1": 1,
"bypass_ltm": 1,
"bypass_cds": 1,
"bypass_obc": 1
},
"pe": {
"bypass_preee": 1,
"bypass_tnr": 0,
"bypass_yuvnf": 0,
"bypass_postee": 0,
"bypass_texstat": 1,
"bypass_yuvlut2d": 1,
"bypass_pyrrec": 1,
"bypass_pyrdec": 1,
"bypass_petop": 0
}
}
}
\ No newline at end of file
{
"doc": "user",
"version": "2.0.16.0",
"#module": "ENUM: 0 - isp, 1 - filter",
"#alwayson": "ENUM: 0 - disable, 1 - AOR, 2 - DEEP",
"module": 0,
"#top": "BOOL: 0 - OFF, 1 - ON",
"top": {
"hdmi": 0,
"vi": 0,
"ispm": 0,
"ispd": 1,
"savelog": 0,
"savestream": 0,
"alwayson": 0,
"is4K": 0
},
"sensor": {
"#img_mode": "ENUM: 0 - MIPI_LINEAR_MAXRES, 1 - MIPI_HDR_MAXRES, 2 - SPI_MAXRES, 3 - DVP_MAXRES, 4 - MIPI_LINEAR_BINNING, 5 - MODE_EXT1",
"#fps": "NUM: 0 - use default, otherwise - actual fps",
"support": [
{ "lib": "libsns_imx681_soc.so", "device": 0, "img_mode": 4, "fps": 30.0, "mirror": 0,"flip": 0, "obj": "g_stSnsImx681Obj" }
]
},
"config": {
"#ispfile": "0: color_out; 1:color_in_diff; 2:aisp; 3: DN_out; 4:DN_in_diff; 5:DN_night;6:wdr_out; 7:wdr_in_diff;",
"ispfile": [ "/acme/conf/681/imx681_capture_Color_Outdoor.bin","/acme/conf/681/imx681_video_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_video_Color_Indoor_diff.bin", "/acme/conf/681/imx681_video_Color_Indoor_Aisp_diff.bin","","","","","","/acme/conf/681/imx681_video_Color_Blc_diff.bin"],
"algfile": "/acme/conf/681/imx681_v01_001_800_rtl.bin"
},
"filter": {
"ispm_fps": 15,
"ispd_fps": 15,
"jpeg_depth": 3,
"vnne_depth": 3,
"crop": { "x": 0, "y": 0, "width": 2016, "height": 1512 },
"binning": { "width": 2016, "height": 1512 },
"scale": { "width": 960, "height": 540 }
},
"vi": {
"src_fps": 30, "dst_fps": 30, "depth": 0, "mdscale": 2, "rotation": 1,
"gating": { "enable": 0, "vi": 1, "isp": 1, "vpu": 1 },
"crop": { "x": 0, "y": 0, "width": 2016, "height": 1512 },
"pipe": { "bayer": "RGGB" },
"tpg": { "enable": 0, "pattern": "V", "bayer": "BGGR", "motion": 0 },
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
},
"yuv": { "enable": 0, "channel": 0, "mode": 2, "depth": 0, "record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 } },
"svp": [
{
"enable": 0, "channel": 2, "mode": 1, "detect": "trigger",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"modefile": "/acme/conf/facial_feature_extraction_1M_klasym-a8w8.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "npu",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"lib": "libsvp_yolox.so", "intf": "SA_SVP_Postprocess_YOLOX", "modefile": "/acme/conf/object-detection-nas075_person_face_car.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "vnne",
"confthreshold": [0.6, 0.6], "outsel": 0, "filterparams": [0,0,0,0,0,0,0,0,0],
"lib": "libsvp_vnne.so", "intf": "SA_SVP_Postprocess_VNNE", "modefile": "/acme/conf/object-detection_vnne_qat-w6a8-mmdet_superacme_person_pytorch.bin"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "md",
"delay": 0,
"roi": [
{ "valid": 1, "sensi": 6, "x0": 0, "y0": 0, "x1": 320, "y1": 0, "x2": 320, "y2": 180, "x3": 0, "y3": 180 }
]
}
],
"osd": {
"#align": "left-top, right-top, right-bottom, left-bottom, center",
"#full": "enable--ENUM:, 1 - vpss, 2 - YUV(only work on manual mode)",
"workmode": "D",
"font": { "family": "/acme/bin/simhei.ttf", "size": 32 },
"logo": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/x_venc_logo_256_128.bgra" } ],
"mark": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/logo256x128.2bpp" } ],
"text": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 600, "height": 64 },
"point": { "x": 0, "y": 0 },
"align": "right-bottom",
"invert": { "enable": 0, "rect": { "x": 0, "y": 0, "width": 600, "height": 64 } } } ],
"full":[ { "enable": 0,
"channel": 1,
"type": 1 } ]
},
"#wakeup/mode": "ENUM: 0 - isplite, 1 - raw",
"wakeup": {
"mode": 1, "memlen": 50331648,
"totaltime": 1000, "maxtime": 600,
"lerance": 20, "firstlevel": 0, "secondlevel": 0,
"lampdownfreqlmit":10, "lampupfreqlmit":10,
"exptime": 20000, "again": 1024, "dgain": 1024, "ispgain": 1024,
"autotarget": 1, "target": 64, "range": 10,
"isotarget": [ 64, 64, 64, 64, 65, 66, 69, 72, 75, 75, 75, 75, 75, 75, 75, 75 ]
},
"#format": "1 - aac(frmlen=1024,bitrate=32000), 2 - g711(frmlen=160,bitrate=8000)",
"audio": {
"devid": 0,
"ai": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"ao": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"aenc": { "enable": 0, "rtsp": 1, "format": 2, "ps": 0, "samplerate": 16000, "bitwidth": 16, "soundmode": 1, "bitrate": 8000 },
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
},
"jpeg": [
{
"enable": 0, "rtsp": 0, "dump": 0,
"source": { "mode": 0, "channel": 2 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "qp": 80 }, "#encode/profile": "0 - BaseLine",
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"h264": [
{
"enable": 0, "rtsp": 0, "sei": 0, "ps": 0,
"source": { "mode": 0, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 2, "width": 1512, "height": 2016, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - BaseLine, 1 - MP, 2 - HP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 2048000, "max": 3072000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
}
],
"h265": [
{
"enable": 1, "rtsp": 1, "sei": 0, "ps": 0,
"source": { "mode": 0, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "width": 1512, "height": 2016, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - MP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 15360000, "max": 23040000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"vpss": [
{ "channel": 0, "src_fps": 30, "dest_fps": 30, "depth": 3, "crop": { "x": 0, "y": 0, "width": 1512, "height": 2016 } },
{ "channel": 1, "src_fps": 30, "dest_fps": 30, "depth": 3, "scale": { "width": 1512, "height": 2016 } },
{ "channel": 2, "src_fps": 30, "dest_fps": 30, "depth": 3, "scale": { "width": 1512, "height": 2016 } },
{ "channel": 3, "src_fps": 30, "dest_fps": 30, "depth": 3, "scale": { "width": 416, "height": 416 } }
],
"app_isp": {
"sysmaxgain": [2457600, 2457600, 2457600, 2457600, 38, 36],
"aetarget": [46, 46, 43, 41, 39, 38, 36, 34, 32, 32, 32, 32, 30, 30, 30, 30],
"aetargetblack": [38, 38, 38, 38, 38, 36, 34, 32, 30, 30, 30, 30, 30, 30, 30, 30],
"aetargetwdr": [53, 53, 51, 49, 46, 44, 42, 40, 38, 38, 38, 38, 35, 35, 35, 35],
"aetargethdr": [42, 42, 40, 39, 38, 36, 34, 32, 30, 30, 30, 30, 28, 28, 28, 28],
"SnsStartRoute":0,
"adjStep":14,
"StartGainNode":1025,
"StartShutMax":1000000,
"maxIntimeEnable":1,
"maxIntimeAo":1000000,
"maxIntimeNor":200000,
"SenceSwitch":1,
"sd": {
"u8LogLevel":0,
"enOpType":0,
"stManual":{
"u8SceneCoarse":1,
"u8Scene":4,
"f32SceneBlend":0
},
"stAuto":{
"s32SundayThresh":10000,
"s32CloudyMinThresh":3432,
"s32CloudyMaxThresh":9000,
"s32IndoorMinThresh":-1568,
"s32IndoorMaxThresh":-568,
"s32IndoorMinCloudyThresh":6600,
"s32IndoorMaxCloudyThresh":7000,
"s32LowLumIndoorThresh":-2100,
"s32LowLumThresh":-2200,
"s32AeShutterLowThresh":2,
"s32AeShutterHighThresh":1,
"s32B2dLowThresh":460,
"s32B2dHighThresh":10000,
"s32FarDistanceThresh":500,
"s32NearDistanceThresh":500,
"s32TempLowThresh":500,
"s32TempHighThresh":500,
"u8BacklightEn":1,
"f32BacklightB2mBvK":-6,
"u32BacklightB2mBvB":25000,
"s32BacklightM2dThd":1500,
"u16TFrame":1,
"u8InitCount":3,
"u8InitScene":4,
"f32InitSceneBlend":0,
"u8InitSceneCoarse":1
},
"enAinrOpType":0,
"stAinrManual":{},
"stAinrAuto":{
"u32AinrOnIsoThr":102400,
"u32AinrOffIsoThr":102400
},
"stWdrAttr":{
"bEnable":0,
"u32WdrToLinearThr":60,
"u32LinearToWdrThr":100,
"u32EvDiffThr":9,
"u32DrDiffThr":4,
"u32WdrEnvLumaThr":11400,
"u32LinearEnvLumaThr":11400
}
} ,
"icr": {
"u16IrRGgain":276,
"u16IrBGgain":266,
"u16MaxGainDistance":350,
"stLumaParam":{
"u16MinVisibleRatio":250,
"astThrParam":[
{
"u32C2bLumaThr":536400,
"u32B2cLumaThr":39000,
"u32B2cNightLumaThr":7,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":564000,
"u32B2cLumaThr":39300,
"u32B2cNightLumaThr":5,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":591000,
"u32B2cLumaThr":39600,
"u32B2cNightLumaThr":3,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
}
]
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"lamp": {
"stlampIr":{
"u32DiffTolerance":2,
"u16OffRatio":820,
"astStepLut":[
{
"u32Diff":1,
"s32Step":10
},
{
"u32Diff":20,
"s32Step":50
},
{
"u32Diff":40,
"s32Step":100
},
{
"u32Diff":80,
"s32Step":300
}
],
"astThrParam":[
{
"u32OnISO":29000,
"u32OffISO":6500,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":30000,
"u32OffISO":6800,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":31000,
"u32OffISO":7100,
"u32TargetISO":22800,
"u16EVOff":130
}
]
},
"stlampWl":{
"u32DiffTolerance":1,
"u16OffRatio":980,
"astStepLut":[
{
"u32Diff":1,
"s32Step":15
},
{
"u32Diff":10,
"s32Step":100
},
{
"u32Diff":40,
"s32Step":500
},
{
"u32Diff":80,
"s32Step":1000
}
],
"astThrParam":[
{
"u32OnISO":53200,
"u32OffISO":8000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":56200,
"u32OffISO":11000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":59200,
"u32OffISO":14000,
"u32TargetISO":25600,
"u16EVOff":130
}
]
},
"u8RunInterval":7,
"stEnvCompareParam":{
"bEnvCompare":0,
"u16HistBinRatioOn":1014,
"u16StdRatioOn":973,
"u16HistBinRatioOff":1014,
"u16StdRatioOff":973,
"s32RecordValidPeriod":7200
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"#nightMode": "0 - day, 1 - auto(day/night)",
"#lightOff": "0 - open lamp, 1 - close lamp",
"#lightFrqWl": "wl max [0~100]",
"#lightFrqIR": "ir max [0~100]",
"stLedCtlParam":{
"wdrMode":0,
"wdrSwitchMode":0,
"sensitivity":1,
"nightMode":0,
"lightOff":0,
"lightFrqWl":100,
"lightFrqIR":100,
"lightDownFrqWl":0,
"lightDownFrqIR":0,
"icrLampMode":0,
"icrEn":0,
"lampType":0,
"lampLuma":0
},
"stIspTest":{
"enable":0,
"index":1,
"skipnum":5
}
},
"debug": {
"hdr": 0,
"gdc": 0,
"#iso": "0 - AUTO, otherwise - Manual. Range 100 - 3276800",
"iso": 0,
"#ct": "0 - AUTO, otherwise - Manual. Range 1000 - 10000",
"ct": 0,
"#hdr_gain": "0 - AUTO, otherwise - Manual. Range 32 - 1024",
"hdr_gain": 0,
"#ctrl": "0 -AUTO, 1 - Manual",
"ctrl": 0,
"fe": {
"bypass_crop": 1,
"bypass_rcrop": 1,
"bypass_fpn": 1,
"bypass_linear": 1,
"bypass_blc": 0,
"bypass_dg": 1,
"bypass_raw2l": 1,
"bypass_raw2l_binning": 0,
"bypass_raw2l_bayer2l": 1,
"bypass_binning": 1,
"bypass_lsc": 1
},
"be": {
"bypass_raw2y": 1,
"bypass_hdr": 1,
"bypass_grgb": 0,
"bypass_blc": 0,
"bypass_md": 1,
"bypass_dg": 0,
"bypass_lsc": 0,
"bypass_wb": 0,
"bypass_cfa": 0,
"bypass_pfc": 0,
"bypass_fcs": 0,
"bypass_ccm": 0,
"bypass_gtm": 1,
"bypass_lut2d": 1,
"bypass_de": 0,
"bypass_gamma": 0,
"bypass_rgb2yuv": 0,
"bypass_gme": 1,
"bypass_aiisp_pre": 1,
"bypass_aiisp_post": 1,
"bypass_aiisp": 1,
"bypass_rawnf": 0,
"bypass_dpc0": 0,
"bypass_dpc1": 1,
"bypass_ltm": 0,
"bypass_cds": 1,
"bypass_obc": 1
},
"pe": {
"bypass_preee": 1,
"bypass_tnr": 0,
"bypass_yuvnf": 0,
"bypass_postee": 0,
"bypass_texstat": 1,
"bypass_yuvlut2d": 1,
"bypass_pyrrec": 0,
"bypass_pyrdec": 0,
"bypass_petop": 0
}
}
}
{
"build_rule": {
"list": [
{ "base": "12M_linear_Outdoor.bin", "origin": "12M_linear_Indoor.bin", "diff":"12M_linear_Indoor_diff.bin"},
{ "base": "12M_linear_Indoor.bin", "origin": "12M_linear_Aisp.bin", "diff":"12M_linear_Aisp_diff.bin"},
{ "base": "12M_linear_Aisp.bin", "origin": "12M_linear_Aisp_Ligth.bin", "diff":"12M_linear_Aisp_Ligth_diff.bin"},
{ "base": "12M_linear_Indoor.bin", "origin": "12M_linear_Blc.bin", "diff":"12M_linear_Blc_diff.bin"},
{ "base": "12M_linear_Indoor.bin", "origin": "12M_linear_Mono.bin", "diff":"12M_linear_Mono_diff.bin"},
{ "base": "3M_linear_Outdoor.bin", "origin": "3M_linear_Indoor.bin", "diff":"3M_linear_Indoor_diff.bin"},
{ "base": "3M_linear_Indoor.bin", "origin": "3M_linear_Aisp.bin", "diff":"3M_linear_Aisp_diff.bin"},
{ "base": "3M_linear_Aisp.bin", "origin": "3M_linear_Aisp_Ligth.bin", "diff":"3M_linear_Aisp_Ligth_diff.bin"},
{ "base": "3M_linear_Indoor.bin", "origin": "3M_linear_Blc.bin", "diff":"3M_linear_Blc_diff.bin"},
{ "base": "3M_linear_Indoor.bin", "origin": "3M_linear_Mono.bin", "diff":"3M_linear_Mono_diff.bin"},
{ "base": "12M_wdr_Outdoor.bin", "origin": "12M_wdr_Indoor.bin", "diff":"12M_wdr_Indoor_diff.bin"},
{ "base": "12M_wdr_Indoor.bin", "origin": "12M_wdr_Aisp.bin", "diff":"12M_wdr_Aisp_diff.bin"},
{ "base": "12M_wdr_Aisp.bin", "origin": "12M_wdr_Aisp_Ligth.bin", "diff":"12M_wdr_Aisp_Ligth_diff.bin"},
{ "base": "12M_wdr_Indoor.bin", "origin": "12M_wdr_Blc.bin", "diff":"12M_wdr_Blc_diff.bin"},
{ "base": "12M_wdr_Indoor.bin", "origin": "12M_wdr_Mono.bin", "diff":"12M_wdr_Mono_diff.bin"},
{ "base": "3M_wdr_Outdoor.bin", "origin": "3M_wdr_Indoor.bin", "diff":"3M_wdr_Indoor_diff.bin"},
{ "base": "3M_wdr_Indoor.bin", "origin": "3M_wdr_Aisp.bin", "diff":"3M_wdr_Aisp_diff.bin"},
{ "base": "3M_wdr_Aisp.bin", "origin": "3M_wdr_Aisp_Ligth.bin", "diff":"3M_wdr_Aisp_Ligth_diff.bin"},
{ "base": "3M_wdr_Indoor.bin", "origin": "3M_wdr_Blc.bin", "diff":"3M_wdr_Blc_diff.bin"},
{ "base": "3M_wdr_Indoor.bin", "origin": "3M_wdr_Mono.bin", "diff":"3M_wdr_Mono_diff.bin"}
]
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -42,23 +42,21 @@ rootfs_copy_file() { ...@@ -42,23 +42,21 @@ rootfs_copy_file() {
rm system_temp/lib/modules/isp*.ko rm system_temp/lib/modules/isp*.ko
rm system_temp/lib/modules/vpss.ko rm system_temp/lib/modules/vpss.ko
rm system_temp/lib/modules/sa6920-i2c.dtbo rm system_temp/lib/modules/sa6920-i2c.dtbo
mkdir system_temp/conf/681/ -p
cp common/modules/sa6920-i2c.dtbo system_temp/lib/modules/ cp common/modules/sa6920-i2c.dtbo system_temp/lib/modules/
cp common/conf/681/* system_temp/conf/681/ cp common/* system_temp/ -rf
cp common/bin/lite_imx681* system_temp/bin/ cp common/bin/lite_imx681* system_temp/bin/
cp common/script/load_glasses_all.sh system_temp/scripts/ cp common/script/load_glasses_all.sh system_temp/scripts/
cp sdk/lib/modules/isp_all.ko system_temp/lib/modules/ cp sdk/lib/modules/isp_all.ko system_temp/lib/modules/
fi fi
if [ "$type" == "emmc" ];then if [ "$type" == "emmc" ];then
mkdir system_temp/conf/681/ -p
cp common/conf/681/* system_temp/conf/681/
cp common/bin/lite_imx681* system_temp/bin/ cp common/bin/lite_imx681* system_temp/bin/
cp sdk/bin/streamer system_temp/bin/ cp sdk/bin/streamer system_temp/bin/
cp sdk/bin/user_imx681* system_temp/bin/ cp sdk/bin/user_imx681* system_temp/bin/
cp sdk/bin/user_os04d10_normal.json system_temp/bin/ cp sdk/bin/user_os04d10_normal.json system_temp/bin/
cp sdk/lib/libsvp_*.so system_temp/lib/ cp sdk/lib/libsvp_*.so system_temp/lib/
cp sdk/conf system_temp/ -r cp sdk/conf system_temp/ -r
cp common/conf/* system_temp/conf/ -rf
fi fi
if [ "$type" == "qa" ];then if [ "$type" == "qa" ];then
...@@ -295,6 +293,7 @@ copy_files "$1" ...@@ -295,6 +293,7 @@ copy_files "$1"
cp sdk/bin/controller system_temp/bin/ cp sdk/bin/controller system_temp/bin/
cp sdk/bin/HeronTest system_temp/bin/ cp sdk/bin/HeronTest system_temp/bin/
cp sdk/bin/logo256x128.2bpp system_temp/bin/ cp sdk/bin/logo256x128.2bpp system_temp/bin/
cp sdk/bin/logo256x128.bgra system_temp/bin/
cp sdk/bin/sample_cli system_temp/bin/ cp sdk/bin/sample_cli system_temp/bin/
cp sdk/bin/simhei.ttf system_temp/bin/ cp sdk/bin/simhei.ttf system_temp/bin/
cp sdk/bin/tzc400 system_temp/bin/ cp sdk/bin/tzc400 system_temp/bin/
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
{
"doc": "user",
"version": "2.0.16.0",
"#module": "ENUM: 0 - isp, 1 - filter",
"#alwayson": "ENUM: 0 - disable, 1 - AOR, 2 - DEEP",
"module": 0,
"#top": "BOOL: 0 - OFF, 1 - ON",
"top": {
"hdmi": 0,
"vi": 0,
"ispm": 0,
"ispd": 1,
"savelog": 0,
"savestream": 0,
"alwayson": 0,
"is4K": 1
},
"sensor": {
"#img_mode": "ENUM: 0 - MIPI_LINEAR_MAXRES, 1 - MIPI_HDR_MAXRES, 2 - SPI_MAXRES, 3 - DVP_MAXRES, 4 - MIPI_LINEAR_BINNING, 5 - MODE_EXT1",
"#fps": "NUM: 0 - use default, otherwise - actual fps",
"support": [
{ "lib": "libsns_imx681_soc.so", "device": 0, "img_mode": 0, "fps": 14.29, "mirror": 0,"flip": 0, "obj": "g_stSnsImx681Obj" }
]
},
"config": {
"#ispfile": "0: color_out; 1:color_in_diff; 2:aisp; 3: DN_out; 4:DN_in_diff; 5:DN_night;6:wdr_out; 7:wdr_in_diff;",
"ispfile": [ "/acme/conf/681/imx681_capture_Color_Outdoor.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_capture_Color_Indoor_diff.bin","/acme/conf/681/imx681_capture_Color_Outdoor_diff.bin","","","","","","/acme/conf/681/imx681_capture_Color_Blc_diff.bin"],
"algfile": "/acme/conf/681/imx681_v01_001_800_rtl.bin"
},
"filter": {
"ispm_fps": 15,
"ispd_fps": 15,
"jpeg_depth": 3,
"vnne_depth": 3,
"crop": { "x": 96, "y": 144, "width": 3840, "height": 2736 },
"binning": { "width": 1920, "height": 1080 },
"scale": { "width": 960, "height": 540 }
},
"vi": {
"src_fps": 15, "dst_fps": 15, "depth": 0, "mdscale": 1, "rotation": 0,
"gating": { "enable": 0, "vi": 1, "isp": 1, "vpu": 1 },
"crop": { "x": 96, "y": 144, "width": 3840, "height": 2736 },
"pipe": { "bayer": "RGGB" },
"tpg": { "enable": 0, "pattern": "V", "bayer": "BGGR", "motion": 0 },
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
},
"yuv": { "enable": 0, "channel": 0, "mode": 2, "depth": 0, "record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 } },
"svp": [
{
"enable": 0, "channel": 2, "mode": 1, "detect": "trigger",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"modefile": "/acme/conf/facial_feature_extraction_1M_klasym-a8w8.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "npu",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"lib": "libsvp_yolox.so", "intf": "SA_SVP_Postprocess_YOLOX", "modefile": "/acme/conf/object-detection-nas075_person_face_car.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "vnne",
"confthreshold": [0.6, 0.6], "outsel": 0, "filterparams": [0,0,0,0,0,0,0,0,0],
"lib": "libsvp_vnne.so", "intf": "SA_SVP_Postprocess_VNNE", "modefile": "/acme/conf/object-detection_vnne_qat-w6a8-mmdet_superacme_person_pytorch.bin"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "md",
"delay": 0,
"roi": [
{ "valid": 1, "sensi": 6, "x0": 0, "y0": 0, "x1": 480, "y1": 0, "x2": 480, "y2": 270, "x3": 0, "y3": 270 }
]
}
],
"osd": {
"#align": "left-top, right-top, right-bottom, left-bottom, center",
"#full": "enable--ENUM:, 1 - vpss, 2 - YUV(only work on manual mode)",
"workmode": "D",
"font": { "family": "/acme/bin/simhei.ttf", "size": 32 },
"logo": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/x_venc_logo_256_128.bgra" } ],
"mark": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/logo256x128.2bpp" } ],
"text": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 600, "height": 64 },
"point": { "x": 0, "y": 0 },
"align": "right-bottom",
"invert": { "enable": 0, "rect": { "x": 0, "y": 0, "width": 600, "height": 64 } } } ],
"full":[ { "enable": 0,
"channel": 1,
"type": 1 } ]
},
"#wakeup/mode": "ENUM: 0 - isplite, 1 - raw",
"wakeup": {
"mode": 1, "memlen": 50331648,
"totaltime": 1000, "maxtime": 600,
"lerance": 20, "firstlevel": 0, "secondlevel": 0,
"exptime": 20000, "again": 1024, "dgain": 1024, "ispgain": 1024,
"autotarget": 1, "target": 64, "range": 10,
"isotarget": [ 64, 64, 64, 64, 65, 66, 69, 72, 75, 75, 75, 75, 75, 75, 75, 75 ]
},
"#format": "1 - aac(frmlen=1024,bitrate=32000), 2 - g711(frmlen=160,bitrate=8000)",
"audio": {
"devid": 0,
"ai": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"ao": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"aenc": { "enable": 0, "rtsp": 1, "format": 2, "ps": 0, "samplerate": 16000, "bitwidth": 16, "soundmode": 1, "bitrate": 8000 },
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
},
"jpeg": [
{
"enable": 1, "rtsp": 1, "dump": 0,
"source": { "mode": 2, "channel": 2 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "qp": 80 }, "#encode/profile": "0 - BaseLine",
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"h264": [
{
"enable": 0, "rtsp": 0, "sei": 0, "ps": 0,
"source": { "mode": 2, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 2, "width": 3840, "height": 2736, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - BaseLine, 1 - MP, 2 - HP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 2048000, "max": 3072000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
}
],
"h265": [
{
"enable": 0, "rtsp": 1, "sei": 0, "ps": 0,
"source": { "mode": 2, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "width": 4032, "height": 3024, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - MP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 6144000, "max": 9216000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"vpss": [
{ "channel": 0, "src_fps": 15, "dest_fps": 15, "depth": 2, "crop": { "x": 96, "y": 144, "width": 3840, "height": 2736 } },
{ "channel": 1, "src_fps": 15, "dest_fps": 15, "depth": 2, "scale": { "width": 3840, "height": 2736 } },
{ "channel": 2, "src_fps": 15, "dest_fps": 15, "depth": 2, "scale": { "width": 3840, "height": 2736 } },
{ "channel": 3, "src_fps": 15, "dest_fps": 15, "depth": 2, "scale": { "width": 640, "height": 384 } }
],
"app_isp": {
"sysmaxgain": [2457600, 2457600, 2457600, 2457600, 38, 36],
"aetarget": [46, 46, 43, 41, 39, 38, 36, 34, 32, 32, 32, 32, 30, 30, 30, 30],
"aetargetblack": [38, 38, 38, 38, 38, 36, 34, 32, 30, 30, 30, 30, 30, 30, 30, 30],
"aetargetwdr": [53, 53, 51, 49, 46, 44, 42, 40, 38, 38, 38, 38, 35, 35, 35, 35],
"aetargethdr": [42, 42, 40, 39, 38, 36, 34, 32, 30, 30, 30, 30, 28, 28, 28, 28],
"SnsStartRoute":0,
"adjStep":14,
"StartGainNode":1025,
"StartShutMax":1000000,
"maxIntimeEnable":1,
"maxIntimeAo":1000000,
"maxIntimeNor":200000,
"SenceSwitch":1,
"sd": {
"u8LogLevel":0,
"enOpType":0,
"stManual":{
"u8SceneCoarse":1,
"u8Scene":4,
"f32SceneBlend":0
},
"stAuto":{
"s32SundayThresh":10000,
"s32CloudyMinThresh":3432,
"s32CloudyMaxThresh":9000,
"s32IndoorMinThresh":-1568,
"s32IndoorMaxThresh":-568,
"s32IndoorMinCloudyThresh":6600,
"s32IndoorMaxCloudyThresh":7000,
"s32LowLumIndoorThresh":-2100,
"s32LowLumThresh":-2200,
"s32AeShutterLowThresh":2,
"s32AeShutterHighThresh":1,
"s32B2dLowThresh":460,
"s32B2dHighThresh":10000,
"s32FarDistanceThresh":500,
"s32NearDistanceThresh":500,
"s32TempLowThresh":500,
"s32TempHighThresh":500,
"u8BacklightEn":1,
"f32BacklightB2mBvK":-6,
"u32BacklightB2mBvB":25000,
"s32BacklightM2dThd":1500,
"u16TFrame":1,
"u8InitCount":3,
"u8InitScene":4,
"f32InitSceneBlend":0,
"u8InitSceneCoarse":1
},
"enAinrOpType":0,
"stAinrManual":{},
"stAinrAuto":{
"u32AinrOnIsoThr":102400,
"u32AinrOffIsoThr":102400
},
"stWdrAttr":{
"bEnable":0,
"u32WdrToLinearThr":60,
"u32LinearToWdrThr":100,
"u32EvDiffThr":9,
"u32DrDiffThr":4,
"u32WdrEnvLumaThr":11400,
"u32LinearEnvLumaThr":11400
}
} ,
"icr": {
"u16IrRGgain":276,
"u16IrBGgain":266,
"u16MaxGainDistance":350,
"stLumaParam":{
"u16MinVisibleRatio":250,
"astThrParam":[
{
"u32C2bLumaThr":536400,
"u32B2cLumaThr":39000,
"u32B2cNightLumaThr":7,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":564000,
"u32B2cLumaThr":39300,
"u32B2cNightLumaThr":5,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":591000,
"u32B2cLumaThr":39600,
"u32B2cNightLumaThr":3,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
}
]
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"lamp": {
"stlampIr":{
"u32DiffTolerance":2,
"u16OffRatio":820,
"astStepLut":[
{
"u32Diff":1,
"s32Step":10
},
{
"u32Diff":20,
"s32Step":50
},
{
"u32Diff":40,
"s32Step":100
},
{
"u32Diff":80,
"s32Step":300
}
],
"astThrParam":[
{
"u32OnISO":29000,
"u32OffISO":6500,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":30000,
"u32OffISO":6800,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":31000,
"u32OffISO":7100,
"u32TargetISO":22800,
"u16EVOff":130
}
]
},
"stlampWl":{
"u32DiffTolerance":1,
"u16OffRatio":980,
"astStepLut":[
{
"u32Diff":1,
"s32Step":15
},
{
"u32Diff":10,
"s32Step":100
},
{
"u32Diff":40,
"s32Step":500
},
{
"u32Diff":80,
"s32Step":1000
}
],
"astThrParam":[
{
"u32OnISO":53200,
"u32OffISO":8000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":56200,
"u32OffISO":11000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":59200,
"u32OffISO":14000,
"u32TargetISO":25600,
"u16EVOff":130
}
]
},
"u8RunInterval":7,
"stEnvCompareParam":{
"bEnvCompare":0,
"u16HistBinRatioOn":1014,
"u16StdRatioOn":973,
"u16HistBinRatioOff":1014,
"u16StdRatioOff":973,
"s32RecordValidPeriod":7200
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"#nightMode": "0 - day, 1 - auto(day/night)",
"#lightOff": "0 - open lamp, 1 - close lamp",
"#lightFrqWl": "wl max [0~100]",
"#lightFrqIR": "ir max [0~100]",
"stLedCtlParam":{
"wdrMode":0,
"wdrSwitchMode":0,
"sensitivity":1,
"nightMode":0,
"lightOff":0,
"lightFrqWl":100,
"lightFrqIR":100,
"icrLampMode":0,
"icrEn":0,
"lampType":0,
"lampLuma":0
},
"stIspTest":{
"enable":0,
"index":1,
"skipnum":5
}
},
"debug": {
"hdr": 0,
"gdc": 0,
"#iso": "0 - AUTO, otherwise - Manual. Range 100 - 3276800",
"iso": 0,
"#ct": "0 - AUTO, otherwise - Manual. Range 1000 - 10000",
"ct": 0,
"#hdr_gain": "0 - AUTO, otherwise - Manual. Range 32 - 1024",
"hdr_gain": 0,
"#ctrl": "0 -AUTO, 1 - Manual",
"ctrl": 0,
"fe": {
"bypass_crop": 1,
"bypass_rcrop": 1,
"bypass_fpn": 1,
"bypass_linear": 1,
"bypass_blc": 0,
"bypass_dg": 1,
"bypass_raw2l": 1,
"bypass_raw2l_binning": 0,
"bypass_raw2l_bayer2l": 1,
"bypass_binning": 1,
"bypass_lsc": 1
},
"be": {
"bypass_raw2y": 1,
"bypass_hdr": 1,
"bypass_grgb": 0,
"bypass_blc": 0,
"bypass_md": 1,
"bypass_dg": 0,
"bypass_lsc": 0,
"bypass_wb": 0,
"bypass_cfa": 0,
"bypass_pfc": 0,
"bypass_fcs": 0,
"bypass_ccm": 0,
"bypass_gtm": 1,
"bypass_lut2d": 1,
"bypass_de": 0,
"bypass_gamma": 0,
"bypass_rgb2yuv": 0,
"bypass_gme": 1,
"bypass_aiisp_pre": 1,
"bypass_aiisp_post": 1,
"bypass_aiisp": 1,
"bypass_rawnf": 0,
"bypass_dpc0": 0,
"bypass_dpc1": 1,
"bypass_ltm": 1,
"bypass_cds": 1,
"bypass_obc": 1
},
"pe": {
"bypass_preee": 1,
"bypass_tnr": 0,
"bypass_yuvnf": 0,
"bypass_postee": 0,
"bypass_texstat": 1,
"bypass_yuvlut2d": 1,
"bypass_pyrrec": 1,
"bypass_pyrdec": 1,
"bypass_petop": 0
}
}
}
\ No newline at end of file
{
"doc": "user",
"version": "2.0.16.0",
"#module": "ENUM: 0 - isp, 1 - filter",
"#alwayson": "ENUM: 0 - disable, 1 - AOR, 2 - DEEP",
"module": 0,
"#top": "BOOL: 0 - OFF, 1 - ON",
"top": {
"hdmi": 0,
"vi": 0,
"ispm": 0,
"ispd": 1,
"savelog": 0,
"savestream": 0,
"alwayson": 0,
"is4K": 0
},
"sensor": {
"#img_mode": "ENUM: 0 - MIPI_LINEAR_MAXRES, 1 - MIPI_HDR_MAXRES, 2 - SPI_MAXRES, 3 - DVP_MAXRES, 4 - MIPI_LINEAR_BINNING, 5 - MODE_EXT1",
"#fps": "NUM: 0 - use default, otherwise - actual fps",
"support": [
{ "lib": "libsns_imx681_soc.so", "device": 0, "img_mode": 4, "fps": 30.0, "mirror": 0,"flip": 0, "obj": "g_stSnsImx681Obj" }
]
},
"config": {
"#ispfile": "0: color_out; 1:color_in_diff; 2:aisp; 3: DN_out; 4:DN_in_diff; 5:DN_night;6:wdr_out; 7:wdr_in_diff;",
"ispfile": [ "/acme/conf/681/imx681_capture_Color_Outdoor.bin","/acme/conf/681/imx681_video_Color_Outdoor_diff.bin", "/acme/conf/681/imx681_video_Color_Indoor_diff.bin", "/acme/conf/681/imx681_video_Color_Indoor_Aisp_diff.bin","","","","","","/acme/conf/681/imx681_video_Color_Blc_diff.bin"],
"algfile": "/acme/conf/681/imx681_v01_001_800_rtl.bin"
},
"filter": {
"ispm_fps": 15,
"ispd_fps": 15,
"jpeg_depth": 3,
"vnne_depth": 3,
"crop": { "x": 0, "y": 0, "width": 2016, "height": 1512 },
"binning": { "width": 2016, "height": 1512 },
"scale": { "width": 960, "height": 540 }
},
"vi": {
"src_fps": 30, "dst_fps": 30, "depth": 0, "mdscale": 2, "rotation": 1,
"gating": { "enable": 0, "vi": 1, "isp": 1, "vpu": 1 },
"crop": { "x": 0, "y": 0, "width": 2016, "height": 1512 },
"pipe": { "bayer": "RGGB" },
"tpg": { "enable": 0, "pattern": "V", "bayer": "BGGR", "motion": 0 },
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
},
"yuv": { "enable": 0, "channel": 0, "mode": 2, "depth": 0, "record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 } },
"svp": [
{
"enable": 0, "channel": 2, "mode": 1, "detect": "trigger",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"modefile": "/acme/conf/facial_feature_extraction_1M_klasym-a8w8.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "npu",
"confthreshold": [0.6, 0.6, 0.6, 0.6],
"lib": "libsvp_yolox.so", "intf": "SA_SVP_Postprocess_YOLOX", "modefile": "/acme/conf/object-detection-nas075_person_face_car.hir"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "vnne",
"confthreshold": [0.6, 0.6], "outsel": 0, "filterparams": [0,0,0,0,0,0,0,0,0],
"lib": "libsvp_vnne.so", "intf": "SA_SVP_Postprocess_VNNE", "modefile": "/acme/conf/object-detection_vnne_qat-w6a8-mmdet_superacme_person_pytorch.bin"
},
{
"enable": 0, "channel": 3, "mode": 1, "detect": "md",
"delay": 0,
"roi": [
{ "valid": 1, "sensi": 6, "x0": 0, "y0": 0, "x1": 320, "y1": 0, "x2": 320, "y2": 180, "x3": 0, "y3": 180 }
]
}
],
"osd": {
"#align": "left-top, right-top, right-bottom, left-bottom, center",
"#full": "enable--ENUM:, 1 - vpss, 2 - YUV(only work on manual mode)",
"workmode": "D",
"font": { "family": "/acme/bin/simhei.ttf", "size": 32 },
"logo": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/x_venc_logo_256_128.bgra" } ],
"mark": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 256, "height": 128 },
"point": { "x": 0, "y": 0 },
"align": "left-top",
"file": "/acme/bin/logo256x128.2bpp" } ],
"text": [ { "enable": 0,
"channel": 1,
"rect": { "x": 16, "y": 16, "width": 600, "height": 64 },
"point": { "x": 0, "y": 0 },
"align": "right-bottom",
"invert": { "enable": 0, "rect": { "x": 0, "y": 0, "width": 600, "height": 64 } } } ],
"full":[ { "enable": 0,
"channel": 1,
"type": 1 } ]
},
"#wakeup/mode": "ENUM: 0 - isplite, 1 - raw",
"wakeup": {
"mode": 1, "memlen": 50331648,
"totaltime": 1000, "maxtime": 600,
"lerance": 20, "firstlevel": 0, "secondlevel": 0,
"exptime": 20000, "again": 1024, "dgain": 1024, "ispgain": 1024,
"autotarget": 1, "target": 64, "range": 10,
"isotarget": [ 64, 64, 64, 64, 65, 66, 69, 72, 75, 75, 75, 75, 75, 75, 75, 75 ]
},
"#format": "1 - aac(frmlen=1024,bitrate=32000), 2 - g711(frmlen=160,bitrate=8000)",
"audio": {
"devid": 0,
"ai": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"ao": { "enable": 0, "frmlen": 160, "samplerate": 16000, "bitwidth": 16, "soundmode": 1 },
"aenc": { "enable": 0, "rtsp": 1, "format": 2, "ps": 0, "samplerate": 16000, "bitwidth": 16, "soundmode": 1, "bitrate": 8000 },
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
},
"jpeg": [
{
"enable": 0, "rtsp": 0, "dump": 0,
"source": { "mode": 0, "channel": 2 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "qp": 80 }, "#encode/profile": "0 - BaseLine",
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"h264": [
{
"enable": 0, "rtsp": 0, "sei": 0, "ps": 0,
"source": { "mode": 0, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 2, "width": 1512, "height": 2016, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - BaseLine, 1 - MP, 2 - HP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 2048000, "max": 3072000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100, "segment": 0 }
}
],
"h265": [
{
"enable": 1, "rtsp": 1, "sei": 0, "ps": 0,
"source": { "mode": 0, "channel": 1, "sync": 0 }, "#source/mode": "0 - online, 1 - manual, 2 - offline",
"encode": { "profile": 0, "width": 1512, "height": 2016, "skip_enable": 0, "forceIDR": 0 }, "#encode/profile": "0 - MP",
"gop": { "mode": 0, "numb": 0, "length": 60, "layer": 2, "drop": 2, "ltrc": 0 }, "#gop/mode": "0 - default, 1 - pyramidal, 2 - lowdelayP, 3 - lowdelayB, 4 - adaptive, 5 - svc-t(effect on layer & drop)",
"#bitrate/mode": "0 - constQP, 1 - CBR, 2 - VBR, 5 - AVBR",
"bitrate": {
"mode": 2, "avg": 15360000, "max": 23040000, "maxframe": 2048000,
"initQP": 30, "minPQP": 10, "maxPQP": 45, "minIQP": 10, "maxIQP": 45,
"maxPicBits": 0, "maxIPicBits": 0, "mvPercent": [ 2, 6, 30 ], "brCoef": [ 50, 70, 100, 120 ]
},
"record": { "enable": 0, "frames": 0, "size": 100 , "segment": 0 }
}
],
"vpss": [
{ "channel": 0, "src_fps": 30, "dest_fps": 30, "depth": 3, "crop": { "x": 0, "y": 0, "width": 1512, "height": 2016 } },
{ "channel": 1, "src_fps": 30, "dest_fps": 30, "depth": 3, "scale": { "width": 1512, "height": 2016 } },
{ "channel": 2, "src_fps": 30, "dest_fps": 30, "depth": 3, "scale": { "width": 1512, "height": 2016 } },
{ "channel": 3, "src_fps": 30, "dest_fps": 30, "depth": 3, "scale": { "width": 416, "height": 416 } }
],
"app_isp": {
"sysmaxgain": [2457600, 2457600, 2457600, 2457600, 38, 36],
"aetarget": [46, 46, 43, 41, 39, 38, 36, 34, 32, 32, 32, 32, 30, 30, 30, 30],
"aetargetblack": [38, 38, 38, 38, 38, 36, 34, 32, 30, 30, 30, 30, 30, 30, 30, 30],
"aetargetwdr": [53, 53, 51, 49, 46, 44, 42, 40, 38, 38, 38, 38, 35, 35, 35, 35],
"aetargethdr": [42, 42, 40, 39, 38, 36, 34, 32, 30, 30, 30, 30, 28, 28, 28, 28],
"SnsStartRoute":0,
"adjStep":14,
"StartGainNode":1025,
"StartShutMax":1000000,
"maxIntimeEnable":1,
"maxIntimeAo":1000000,
"maxIntimeNor":200000,
"SenceSwitch":1,
"sd": {
"u8LogLevel":0,
"enOpType":0,
"stManual":{
"u8SceneCoarse":1,
"u8Scene":4,
"f32SceneBlend":0
},
"stAuto":{
"s32SundayThresh":10000,
"s32CloudyMinThresh":3432,
"s32CloudyMaxThresh":9000,
"s32IndoorMinThresh":-1568,
"s32IndoorMaxThresh":-568,
"s32IndoorMinCloudyThresh":6600,
"s32IndoorMaxCloudyThresh":7000,
"s32LowLumIndoorThresh":-2100,
"s32LowLumThresh":-2200,
"s32AeShutterLowThresh":2,
"s32AeShutterHighThresh":1,
"s32B2dLowThresh":460,
"s32B2dHighThresh":10000,
"s32FarDistanceThresh":500,
"s32NearDistanceThresh":500,
"s32TempLowThresh":500,
"s32TempHighThresh":500,
"u8BacklightEn":1,
"f32BacklightB2mBvK":-6,
"u32BacklightB2mBvB":25000,
"s32BacklightM2dThd":1500,
"u16TFrame":1,
"u8InitCount":3,
"u8InitScene":4,
"f32InitSceneBlend":0,
"u8InitSceneCoarse":1
},
"enAinrOpType":0,
"stAinrManual":{},
"stAinrAuto":{
"u32AinrOnIsoThr":102400,
"u32AinrOffIsoThr":102400
},
"stWdrAttr":{
"bEnable":0,
"u32WdrToLinearThr":60,
"u32LinearToWdrThr":100,
"u32EvDiffThr":9,
"u32DrDiffThr":4,
"u32WdrEnvLumaThr":11400,
"u32LinearEnvLumaThr":11400
}
} ,
"icr": {
"u16IrRGgain":276,
"u16IrBGgain":266,
"u16MaxGainDistance":350,
"stLumaParam":{
"u16MinVisibleRatio":250,
"astThrParam":[
{
"u32C2bLumaThr":536400,
"u32B2cLumaThr":39000,
"u32B2cNightLumaThr":7,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":564000,
"u32B2cLumaThr":39300,
"u32B2cNightLumaThr":5,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
},
{
"u32C2bLumaThr":591000,
"u32B2cLumaThr":39600,
"u32B2cNightLumaThr":3,
"u32B2cLumaRatio":1331,
"u32B2cMaxLumaRatio":716,
"u32MaxExpTime":200000
}
]
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"lamp": {
"stlampIr":{
"u32DiffTolerance":2,
"u16OffRatio":820,
"astStepLut":[
{
"u32Diff":1,
"s32Step":10
},
{
"u32Diff":20,
"s32Step":50
},
{
"u32Diff":40,
"s32Step":100
},
{
"u32Diff":80,
"s32Step":300
}
],
"astThrParam":[
{
"u32OnISO":29000,
"u32OffISO":6500,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":30000,
"u32OffISO":6800,
"u32TargetISO":22800,
"u16EVOff":130
},
{
"u32OnISO":31000,
"u32OffISO":7100,
"u32TargetISO":22800,
"u16EVOff":130
}
]
},
"stlampWl":{
"u32DiffTolerance":1,
"u16OffRatio":980,
"astStepLut":[
{
"u32Diff":1,
"s32Step":15
},
{
"u32Diff":10,
"s32Step":100
},
{
"u32Diff":40,
"s32Step":500
},
{
"u32Diff":80,
"s32Step":1000
}
],
"astThrParam":[
{
"u32OnISO":53200,
"u32OffISO":8000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":56200,
"u32OffISO":11000,
"u32TargetISO":25600,
"u16EVOff":130
},
{
"u32OnISO":59200,
"u32OffISO":14000,
"u32TargetISO":25600,
"u16EVOff":130
}
]
},
"u8RunInterval":7,
"stEnvCompareParam":{
"bEnvCompare":0,
"u16HistBinRatioOn":1014,
"u16StdRatioOn":973,
"u16HistBinRatioOff":1014,
"u16StdRatioOff":973,
"s32RecordValidPeriod":7200
},
"stDebugParam":{
"u16PrintInterval":0
}
},
"#nightMode": "0 - day, 1 - auto(day/night)",
"#lightOff": "0 - open lamp, 1 - close lamp",
"#lightFrqWl": "wl max [0~100]",
"#lightFrqIR": "ir max [0~100]",
"stLedCtlParam":{
"wdrMode":0,
"wdrSwitchMode":0,
"sensitivity":1,
"nightMode":0,
"lightOff":0,
"lightFrqWl":100,
"lightFrqIR":100,
"icrLampMode":0,
"icrEn":0,
"lampType":0,
"lampLuma":0
},
"stIspTest":{
"enable":0,
"index":1,
"skipnum":5
}
},
"debug": {
"hdr": 0,
"gdc": 0,
"#iso": "0 - AUTO, otherwise - Manual. Range 100 - 3276800",
"iso": 0,
"#ct": "0 - AUTO, otherwise - Manual. Range 1000 - 10000",
"ct": 0,
"#hdr_gain": "0 - AUTO, otherwise - Manual. Range 32 - 1024",
"hdr_gain": 0,
"#ctrl": "0 -AUTO, 1 - Manual",
"ctrl": 0,
"fe": {
"bypass_crop": 1,
"bypass_rcrop": 1,
"bypass_fpn": 1,
"bypass_linear": 1,
"bypass_blc": 0,
"bypass_dg": 1,
"bypass_raw2l": 1,
"bypass_raw2l_binning": 0,
"bypass_raw2l_bayer2l": 1,
"bypass_binning": 1,
"bypass_lsc": 1
},
"be": {
"bypass_raw2y": 1,
"bypass_hdr": 1,
"bypass_grgb": 0,
"bypass_blc": 0,
"bypass_md": 1,
"bypass_dg": 0,
"bypass_lsc": 0,
"bypass_wb": 0,
"bypass_cfa": 0,
"bypass_pfc": 0,
"bypass_fcs": 0,
"bypass_ccm": 0,
"bypass_gtm": 1,
"bypass_lut2d": 1,
"bypass_de": 0,
"bypass_gamma": 0,
"bypass_rgb2yuv": 0,
"bypass_gme": 1,
"bypass_aiisp_pre": 1,
"bypass_aiisp_post": 1,
"bypass_aiisp": 1,
"bypass_rawnf": 0,
"bypass_dpc0": 0,
"bypass_dpc1": 1,
"bypass_ltm": 0,
"bypass_cds": 1,
"bypass_obc": 1
},
"pe": {
"bypass_preee": 1,
"bypass_tnr": 0,
"bypass_yuvnf": 0,
"bypass_postee": 0,
"bypass_texstat": 1,
"bypass_yuvlut2d": 1,
"bypass_pyrrec": 0,
"bypass_pyrdec": 0,
"bypass_petop": 0
}
}
}
...@@ -106,6 +106,7 @@ typedef struct saGDC_WARP_PARAM_S { ...@@ -106,6 +106,7 @@ typedef struct saGDC_WARP_PARAM_S {
SA_FLOAT f32FovScale; SA_FLOAT f32FovScale;
SA_FLOAT f32CameraK[3][3]; SA_FLOAT f32CameraK[3][3];
SA_FLOAT f32UndistortCoefs[14]; SA_FLOAT f32UndistortCoefs[14];
SA_FLOAT f32UndistortScale;
} GDC_WARP_PARAM_S; } GDC_WARP_PARAM_S;
typedef struct saGDC_ROTATION_PARAM_S { typedef struct saGDC_ROTATION_PARAM_S {
......
libispalg.so.2.5.0.6.9 libispalg.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libive.so.2.5.0.6.9 libive.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
liblapi.so.2.5.0.7.0
\ No newline at end of file
libmapi.so.2.5.0.6.9 libmapi.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
No preview for this file type
libvqe.so.2.5.0.6.9 libvqe.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -81,6 +81,12 @@ typedef enum{ ...@@ -81,6 +81,12 @@ typedef enum{
SENSITIVITY_HIGH, SENSITIVITY_HIGH,
}SA_ISPSCENE_ICR_SENSITIVITY_E; }SA_ISPSCENE_ICR_SENSITIVITY_E;
typedef enum{
ICR_STATE_COLOR = 0, //彩色
ICR_STATE_BLACK, //黑白
ICR_STATE_NUM,
}SA_ISPSCENE_ICR_STATE_E;
typedef enum{ typedef enum{
LAMPPOWER_LOW = 0, //AO模式下不开灯 LAMPPOWER_LOW = 0, //AO模式下不开灯
LAMPPOWER_MIDDLE, //AO模式下不开白光灯 LAMPPOWER_MIDDLE, //AO模式下不开白光灯
...@@ -101,7 +107,7 @@ typedef struct { ...@@ -101,7 +107,7 @@ typedef struct {
typedef struct typedef struct
{ {
SA_U32 u32OnISO; /* 开灯ISO,单位倍数*100,1倍为100 */ SA_U32 u32OnISO; /* 开灯ISO,单位倍数*100,1倍为100 */
SA_U32 u32OffISO; /* 灯ISO,单位倍数*100,1倍为100 */ SA_U32 u32OffISO; /* 灯ISO,单位倍数*100,1倍为100 */
SA_U32 u32TargetISO; /* 目标ISO,单位倍数*100, 1倍为100。开灯后灯光朝着这个ISO调节过去 */ SA_U32 u32TargetISO; /* 目标ISO,单位倍数*100, 1倍为100。开灯后灯光朝着这个ISO调节过去 */
SA_U16 u16EVOff; /* 关灯的ev阈值 */ SA_U16 u16EVOff; /* 关灯的ev阈值 */
} SA_ISPSCENE_LAMP_THR_S; } SA_ISPSCENE_LAMP_THR_S;
...@@ -195,6 +201,22 @@ typedef struct { ...@@ -195,6 +201,22 @@ typedef struct {
WDR_MODE_E enAnlyResult; //AO/Normal/Night场景分析之后结果 WDR_MODE_E enAnlyResult; //AO/Normal/Night场景分析之后结果
WDR_MODE_E enSdResult; //反馈sd实际检测结果,用于AO->模式切换时指定初始模式 WDR_MODE_E enSdResult; //反馈sd实际检测结果,用于AO->模式切换时指定初始模式
}SA_ISPSCENE_WDR_RESULT_S; }SA_ISPSCENE_WDR_RESULT_S;
typedef struct {
SA_U32 u32IntTime;
SA_U32 u32Iso;
SA_U32 u32AeTarget;
SA_U32 u32Curluma;
SA_S32 s32RealBv;
SA_U32 u32ExpRatio;
SA_U32 u32Ct;
SA_U32 au32WbGain[4];
SA_U32 u32FrameId;
SA_U32 u32SceneType;
SA_ISPSCENE_ICR_STATE_E enIrcut;
SA_U32 u32IrLampFrq;
SA_U32 u32WhiteLampFrq;
} SA_ISPSCENE_INFO_S;
/****************************************************************************** /******************************************************************************
* ERR Code * ERR Code
******************************************************************************/ ******************************************************************************/
......
...@@ -49,7 +49,7 @@ extern "C" { ...@@ -49,7 +49,7 @@ extern "C" {
#define SA_MEDIA_SVP_TARGET_MAX (8) #define SA_MEDIA_SVP_TARGET_MAX (8)
#define MEDIA_LTM_SIZE_WIDTH_MAX (3840) #define MEDIA_LTM_SIZE_WIDTH_MAX (3648)
#define MEDIA_LTM_SIZE_HEIGHT_MAX (2736) #define MEDIA_LTM_SIZE_HEIGHT_MAX (2736)
#define MEDIA_GTM_SIZE_WIDTH_ONLINE_MAX (2880) #define MEDIA_GTM_SIZE_WIDTH_ONLINE_MAX (2880)
#define MEDIA_GTM_SIZE_HEIGHT_ONLINE_MAX (1660) #define MEDIA_GTM_SIZE_HEIGHT_ONLINE_MAX (1660)
...@@ -80,13 +80,9 @@ typedef enum { ...@@ -80,13 +80,9 @@ typedef enum {
} SA_MEDIA_SNS_MODE_E; } SA_MEDIA_SNS_MODE_E;
typedef enum { typedef enum {
SA_MEDIA_RGN_TYPE_IMAGE = 0, // 图片 SA_MEDIA_RGN_TYPE_IMAGE = 0, // 图片
SA_MEDIA_RGN_TYPE_TIMESTAMP = 1, // 1970-01-01 00:00:00 时间戳 SA_MEDIA_RGN_TYPE_TIMESTAMP = 1, // 1970-01-01 00:00:00 时间戳
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_MODE = 2, // 1970-01-01 00:00:00 AOR 时间(模式) SA_MEDIA_RGN_TYPE_TIMESTAMP_DEBUG = 2, // 1970-01-01 00:00:00 时间戳+ISP Info
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_WEEK = 3, // 星期一 1970-01-01 00:00:00 时间(星期)
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_WEEK_EN = 4, // Mon 1970-01-01 00:00:00 时间(星期)英文
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_MODE_WEEK = 5, // 星期一 1970-01-01 00:00:00 AOR 时间(星期+模式)
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_MODE_WEEK_EN = 6, // Mon 1970-01-01 00:00:00 AOR 时间(星期+模式)英文
SA_MEDIA_RGN_TYPE_NUM SA_MEDIA_RGN_TYPE_NUM
} SA_MEDIA_RGN_TYPE_E; } SA_MEDIA_RGN_TYPE_E;
...@@ -94,7 +90,7 @@ typedef struct { ...@@ -94,7 +90,7 @@ typedef struct {
SA_BOOL bEnable; SA_BOOL bEnable;
SA_MEDIA_RGN_TYPE_E enType; SA_MEDIA_RGN_TYPE_E enType;
SA_CHAR astrImageFile[128]; SA_CHAR astrImageFile[128];
RECT_S stRect; RECT_S stRect;
SA_U32 u32RgbColor[3]; SA_U32 u32RgbColor[3];
} SA_MEDIA_RGN_CONFIG_S; } SA_MEDIA_RGN_CONFIG_S;
...@@ -121,10 +117,7 @@ typedef enum { ...@@ -121,10 +117,7 @@ typedef enum {
SA_MEDIA_SD_COLOR_INDOOR, SA_MEDIA_SD_COLOR_INDOOR,
SA_MEDIA_SD_COLOR_AISP, SA_MEDIA_SD_COLOR_AISP,
SA_MEDIA_SD_DN_NIGHT, SA_MEDIA_SD_DN_NIGHT,
SA_MEDIA_SD_COLOR_LAMP, SA_MEDIA_SD_COLOR_LAMP,
SA_MEDIA_SD_WDR_OUTDOOR,
SA_MEDIA_SD_WDR_INDOOR,
SA_MEDIA_SD_WDR_NIGHT,
SA_MEDIA_SD_BACKLIGHT, SA_MEDIA_SD_BACKLIGHT,
SA_MEDIA_SD_TYPE_NUM, SA_MEDIA_SD_TYPE_NUM,
} SA_MEDIA_SD_TYPE_E; } SA_MEDIA_SD_TYPE_E;
...@@ -188,16 +181,12 @@ typedef struct { ...@@ -188,16 +181,12 @@ typedef struct {
} SA_MEDIA_SD_CONFIG_S; } SA_MEDIA_SD_CONFIG_S;
typedef enum { typedef enum {
SA_MEDIA_ISP_BIN_PATH_BASE = 0, SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR = 0,
SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR = 1, SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR = 1,
SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR = 2, SA_MEDIA_ISP_BIN_PATH_COLOR_AISP = 2,
SA_MEDIA_ISP_BIN_PATH_COLOR_AISP = 3, SA_MEDIA_ISP_BIN_PATH_DN_NIGHT = 3,
SA_MEDIA_ISP_BIN_PATH_DN_NIGHT = 4, SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP = 4,
SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP = 5, SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT = 5,
SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR = 6,
SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR = 7,
SA_MEDIA_ISP_BIN_PATH_WDR_NIGHT = 8,
SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT = 9,
SA_MEDIA_ISP_BIN_PATH_NUM SA_MEDIA_ISP_BIN_PATH_NUM
} SA_MEDIA_ISP_BIN_PATH_E; } SA_MEDIA_ISP_BIN_PATH_E;
...@@ -435,8 +424,8 @@ typedef struct { ...@@ -435,8 +424,8 @@ typedef struct {
SA_BOOL bEnable; SA_BOOL bEnable;
RGN_HANDLE u32HandleId; RGN_HANDLE u32HandleId;
MPP_CHN_S stSrc; MPP_CHN_S stSrc;
RGN_ATTR_S stAttr; RECT_S stRect;
RGN_CHN_ATTR_S stChnAttr; SA_U32 u32FontSize;
SA_MEDIA_RGN_TYPE_E enType; SA_MEDIA_RGN_TYPE_E enType;
SA_CHAR astrImageFile[128]; SA_CHAR astrImageFile[128];
} SA_MEDIA_RGN_CHN_ATTR_S; } SA_MEDIA_RGN_CHN_ATTR_S;
...@@ -590,12 +579,30 @@ typedef struct saHEIF_FRAME_INFO_S ...@@ -590,12 +579,30 @@ typedef struct saHEIF_FRAME_INFO_S
SA_U32 u32DataLen; SA_U32 u32DataLen;
} HEIF_FRAME_INFO_S; } HEIF_FRAME_INFO_S;
typedef enum {
SA_MEDIA_SD_DYN_GET,
SA_MEDIA_SD_DYN_SET,
} SA_MEDIA_SD_DYN_E;
typedef enum { typedef enum {
SA_MEDIA_DUMP_YUV, SA_MEDIA_DUMP_YUV,
SA_MEDIA_DUMP_RAW, SA_MEDIA_DUMP_RAW,
SA_MEDIA_DUMP_MAX SA_MEDIA_DUMP_MAX
} SA_MEDIA_DUMP_E; } SA_MEDIA_DUMP_E;
typedef struct {
SA_U32 u32IntTime;
SA_U32 u32Iso;
SA_U32 u32AeTarget;
SA_U32 u32Curluma;
SA_S32 s32RealBv;
SA_U32 u32ExpRatio;
SA_U32 u32Ct;
SA_U32 au32WbGain[4];
SA_U32 u32FrameId;
SA_MEDIA_ISP_BIN_PATH_E enSceneType;
} SA_MEDIA_SD_INFO_S;
typedef SA_VOID (*SA_HAPI_DUMPCALLBACK)(SA_MEDIA_DUMP_E, VIDEO_FRAME_INFO_S*); typedef SA_VOID (*SA_HAPI_DUMPCALLBACK)(SA_MEDIA_DUMP_E, VIDEO_FRAME_INFO_S*);
SA_S32 SA_HAPI_MEDIA_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_CONFIG_S *pstSceneConfig, SA_MEDIA_ATTR_S *pstMediaAttr); SA_S32 SA_HAPI_MEDIA_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_CONFIG_S *pstSceneConfig, SA_MEDIA_ATTR_S *pstMediaAttr);
...@@ -609,6 +616,7 @@ SA_S32 SA_HAPI_MEDIA_GetAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream, SA_S32 s ...@@ -609,6 +616,7 @@ SA_S32 SA_HAPI_MEDIA_GetAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream, SA_S32 s
SA_S32 SA_HAPI_MEDIA_ReleaseAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream); SA_S32 SA_HAPI_MEDIA_ReleaseAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream);
SA_S32 SA_HAPI_MEDIA_StartDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType, SA_HAPI_DUMPCALLBACK pFrameCallback); SA_S32 SA_HAPI_MEDIA_StartDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType, SA_HAPI_DUMPCALLBACK pFrameCallback);
SA_VOID SA_HAPI_MEDIA_StopDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType); SA_VOID SA_HAPI_MEDIA_StopDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType);
SA_S32 SA_HAPI_MEDIA_SdDynCtrAttr(SA_MEDIA_SD_DYN_E enDynMode, SA_MEDIA_SD_MODE_E *enSdMode, SA_MEDIA_SD_TYPE_E *enSdType);
#ifdef __linux__ #ifdef __linux__
#define HAPI_MEDIA_MALLOC malloc #define HAPI_MEDIA_MALLOC malloc
#define HAPI_MEDIA_CALLOC calloc #define HAPI_MEDIA_CALLOC calloc
......
...@@ -18,7 +18,16 @@ extern "C" { ...@@ -18,7 +18,16 @@ extern "C" {
#include "sa_comm_type.h" #include "sa_comm_type.h"
SA_S32 COMM_Register_Dump(SA_VOID *fpnStartDump, SA_VOID *fpnStopDump, SA_VOID *fpnCaptureDump); typedef enum _COMM_CALLBACK_E
{
COMM_CALLBACK_START_DUMP,
COMM_CALLBACK_STOP_DUMP,
COMM_CALLBACK_CAPTURE,
COMM_CALLBACK_SD_DYNATTR,
COMM_CALLBACK_BUTT
} COMM_CALLBACK_E;
SA_S32 COMM_Register_Callback(COMM_CALLBACK_E enCallback, SA_VOID *fpnCallback);
SA_S32 COMM_Send_Data(SA_U8 *pu8Data, SA_U32 u32Len); SA_S32 COMM_Send_Data(SA_U8 *pu8Data, SA_U32 u32Len);
SA_VOID COMM_Server_Deinit(SA_VOID); SA_VOID COMM_Server_Deinit(SA_VOID);
SA_VOID COMM_Server_Init(SA_VOID); SA_VOID COMM_Server_Init(SA_VOID);
......
libdisplay_open.so.2.5.0.6.9 libdisplay_open.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libhapi_open.so.2.5.0.6.9 libhapi_open.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libimu_open.so.2.5.0.6.9 libimu_open.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libjson_open.so.2.5.0.6.9 libjson_open.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
liblens_open.so.2.5.0.6.9 liblens_open.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
librtsp_open.so.2.5.0.6.9 librtsp_open.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_gc4103_soc.so.2.5.0.6.9 libsns_gc4103_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_imx327_soc.so.2.5.0.6.9 libsns_imx327_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_imx681_soc.so.2.5.0.6.9 libsns_imx681_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os02n10_soc.so.2.5.0.6.9 libsns_os02n10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os04a10_soc.so.2.5.0.6.9 libsns_os04a10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os04d10_soc.so.2.5.0.6.9 libsns_os04d10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os04d10_soc13.so.2.5.0.6.9 libsns_os04d10_soc13.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os04d10_soc30.so.2.5.0.6.9 libsns_os04d10_soc30.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os04j10_soc.so.2.5.0.6.9 libsns_os04j10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os04l10_soc.so.2.5.0.6.9 libsns_os04l10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os05l10_soc.so.2.5.0.6.9 libsns_os05l10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os08a10_soc.so.2.5.0.6.9 libsns_os08a10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_os08d10_soc.so.2.5.0.6.9 libsns_os08d10_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_sc465sl_soc.so.2.5.0.6.9 libsns_sc465sl_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_sc535_soc.so.2.5.0.6.9 libsns_sc535_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
libsns_sc8238_soc.so.2.5.0.6.9 libsns_sc8238_soc.so.2.5.0.7.0
\ No newline at end of file \ No newline at end of file
No preview for this file type
...@@ -49,7 +49,7 @@ extern "C" { ...@@ -49,7 +49,7 @@ extern "C" {
#define SA_MEDIA_SVP_TARGET_MAX (8) #define SA_MEDIA_SVP_TARGET_MAX (8)
#define MEDIA_LTM_SIZE_WIDTH_MAX (3840) #define MEDIA_LTM_SIZE_WIDTH_MAX (3648)
#define MEDIA_LTM_SIZE_HEIGHT_MAX (2736) #define MEDIA_LTM_SIZE_HEIGHT_MAX (2736)
#define MEDIA_GTM_SIZE_WIDTH_ONLINE_MAX (2880) #define MEDIA_GTM_SIZE_WIDTH_ONLINE_MAX (2880)
#define MEDIA_GTM_SIZE_HEIGHT_ONLINE_MAX (1660) #define MEDIA_GTM_SIZE_HEIGHT_ONLINE_MAX (1660)
...@@ -80,13 +80,9 @@ typedef enum { ...@@ -80,13 +80,9 @@ typedef enum {
} SA_MEDIA_SNS_MODE_E; } SA_MEDIA_SNS_MODE_E;
typedef enum { typedef enum {
SA_MEDIA_RGN_TYPE_IMAGE = 0, // 图片 SA_MEDIA_RGN_TYPE_IMAGE = 0, // 图片
SA_MEDIA_RGN_TYPE_TIMESTAMP = 1, // 1970-01-01 00:00:00 时间戳 SA_MEDIA_RGN_TYPE_TIMESTAMP = 1, // 1970-01-01 00:00:00 时间戳
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_MODE = 2, // 1970-01-01 00:00:00 AOR 时间(模式) SA_MEDIA_RGN_TYPE_TIMESTAMP_DEBUG = 2, // 1970-01-01 00:00:00 时间戳+ISP Info
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_WEEK = 3, // 星期一 1970-01-01 00:00:00 时间(星期)
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_WEEK_EN = 4, // Mon 1970-01-01 00:00:00 时间(星期)英文
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_MODE_WEEK = 5, // 星期一 1970-01-01 00:00:00 AOR 时间(星期+模式)
SA_MEDIA_RGN_TYPE_TIMESTAMP_WITH_MODE_WEEK_EN = 6, // Mon 1970-01-01 00:00:00 AOR 时间(星期+模式)英文
SA_MEDIA_RGN_TYPE_NUM SA_MEDIA_RGN_TYPE_NUM
} SA_MEDIA_RGN_TYPE_E; } SA_MEDIA_RGN_TYPE_E;
...@@ -94,7 +90,7 @@ typedef struct { ...@@ -94,7 +90,7 @@ typedef struct {
SA_BOOL bEnable; SA_BOOL bEnable;
SA_MEDIA_RGN_TYPE_E enType; SA_MEDIA_RGN_TYPE_E enType;
SA_CHAR astrImageFile[128]; SA_CHAR astrImageFile[128];
RECT_S stRect; RECT_S stRect;
SA_U32 u32RgbColor[3]; SA_U32 u32RgbColor[3];
} SA_MEDIA_RGN_CONFIG_S; } SA_MEDIA_RGN_CONFIG_S;
...@@ -121,10 +117,7 @@ typedef enum { ...@@ -121,10 +117,7 @@ typedef enum {
SA_MEDIA_SD_COLOR_INDOOR, SA_MEDIA_SD_COLOR_INDOOR,
SA_MEDIA_SD_COLOR_AISP, SA_MEDIA_SD_COLOR_AISP,
SA_MEDIA_SD_DN_NIGHT, SA_MEDIA_SD_DN_NIGHT,
SA_MEDIA_SD_COLOR_LAMP, SA_MEDIA_SD_COLOR_LAMP,
SA_MEDIA_SD_WDR_OUTDOOR,
SA_MEDIA_SD_WDR_INDOOR,
SA_MEDIA_SD_WDR_NIGHT,
SA_MEDIA_SD_BACKLIGHT, SA_MEDIA_SD_BACKLIGHT,
SA_MEDIA_SD_TYPE_NUM, SA_MEDIA_SD_TYPE_NUM,
} SA_MEDIA_SD_TYPE_E; } SA_MEDIA_SD_TYPE_E;
...@@ -188,16 +181,12 @@ typedef struct { ...@@ -188,16 +181,12 @@ typedef struct {
} SA_MEDIA_SD_CONFIG_S; } SA_MEDIA_SD_CONFIG_S;
typedef enum { typedef enum {
SA_MEDIA_ISP_BIN_PATH_BASE = 0, SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR = 0,
SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR = 1, SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR = 1,
SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR = 2, SA_MEDIA_ISP_BIN_PATH_COLOR_AISP = 2,
SA_MEDIA_ISP_BIN_PATH_COLOR_AISP = 3, SA_MEDIA_ISP_BIN_PATH_DN_NIGHT = 3,
SA_MEDIA_ISP_BIN_PATH_DN_NIGHT = 4, SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP = 4,
SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP = 5, SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT = 5,
SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR = 6,
SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR = 7,
SA_MEDIA_ISP_BIN_PATH_WDR_NIGHT = 8,
SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT = 9,
SA_MEDIA_ISP_BIN_PATH_NUM SA_MEDIA_ISP_BIN_PATH_NUM
} SA_MEDIA_ISP_BIN_PATH_E; } SA_MEDIA_ISP_BIN_PATH_E;
...@@ -435,8 +424,8 @@ typedef struct { ...@@ -435,8 +424,8 @@ typedef struct {
SA_BOOL bEnable; SA_BOOL bEnable;
RGN_HANDLE u32HandleId; RGN_HANDLE u32HandleId;
MPP_CHN_S stSrc; MPP_CHN_S stSrc;
RGN_ATTR_S stAttr; RECT_S stRect;
RGN_CHN_ATTR_S stChnAttr; SA_U32 u32FontSize;
SA_MEDIA_RGN_TYPE_E enType; SA_MEDIA_RGN_TYPE_E enType;
SA_CHAR astrImageFile[128]; SA_CHAR astrImageFile[128];
} SA_MEDIA_RGN_CHN_ATTR_S; } SA_MEDIA_RGN_CHN_ATTR_S;
...@@ -590,12 +579,30 @@ typedef struct saHEIF_FRAME_INFO_S ...@@ -590,12 +579,30 @@ typedef struct saHEIF_FRAME_INFO_S
SA_U32 u32DataLen; SA_U32 u32DataLen;
} HEIF_FRAME_INFO_S; } HEIF_FRAME_INFO_S;
typedef enum {
SA_MEDIA_SD_DYN_GET,
SA_MEDIA_SD_DYN_SET,
} SA_MEDIA_SD_DYN_E;
typedef enum { typedef enum {
SA_MEDIA_DUMP_YUV, SA_MEDIA_DUMP_YUV,
SA_MEDIA_DUMP_RAW, SA_MEDIA_DUMP_RAW,
SA_MEDIA_DUMP_MAX SA_MEDIA_DUMP_MAX
} SA_MEDIA_DUMP_E; } SA_MEDIA_DUMP_E;
typedef struct {
SA_U32 u32IntTime;
SA_U32 u32Iso;
SA_U32 u32AeTarget;
SA_U32 u32Curluma;
SA_S32 s32RealBv;
SA_U32 u32ExpRatio;
SA_U32 u32Ct;
SA_U32 au32WbGain[4];
SA_U32 u32FrameId;
SA_MEDIA_ISP_BIN_PATH_E enSceneType;
} SA_MEDIA_SD_INFO_S;
typedef SA_VOID (*SA_HAPI_DUMPCALLBACK)(SA_MEDIA_DUMP_E, VIDEO_FRAME_INFO_S*); typedef SA_VOID (*SA_HAPI_DUMPCALLBACK)(SA_MEDIA_DUMP_E, VIDEO_FRAME_INFO_S*);
SA_S32 SA_HAPI_MEDIA_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_CONFIG_S *pstSceneConfig, SA_MEDIA_ATTR_S *pstMediaAttr); SA_S32 SA_HAPI_MEDIA_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_CONFIG_S *pstSceneConfig, SA_MEDIA_ATTR_S *pstMediaAttr);
...@@ -609,6 +616,7 @@ SA_S32 SA_HAPI_MEDIA_GetAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream, SA_S32 s ...@@ -609,6 +616,7 @@ SA_S32 SA_HAPI_MEDIA_GetAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream, SA_S32 s
SA_S32 SA_HAPI_MEDIA_ReleaseAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream); SA_S32 SA_HAPI_MEDIA_ReleaseAudioStream(SA_MEDIA_AUDIO_STREAM_S *pstStream);
SA_S32 SA_HAPI_MEDIA_StartDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType, SA_HAPI_DUMPCALLBACK pFrameCallback); SA_S32 SA_HAPI_MEDIA_StartDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType, SA_HAPI_DUMPCALLBACK pFrameCallback);
SA_VOID SA_HAPI_MEDIA_StopDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType); SA_VOID SA_HAPI_MEDIA_StopDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType);
SA_S32 SA_HAPI_MEDIA_SdDynCtrAttr(SA_MEDIA_SD_DYN_E enDynMode, SA_MEDIA_SD_MODE_E *enSdMode, SA_MEDIA_SD_TYPE_E *enSdType);
#ifdef __linux__ #ifdef __linux__
#define HAPI_MEDIA_MALLOC malloc #define HAPI_MEDIA_MALLOC malloc
#define HAPI_MEDIA_CALLOC calloc #define HAPI_MEDIA_CALLOC calloc
......
#ifndef __SA_INNER_MEDIA_RGN_H__
#define __SA_INNER_MEDIA_RGN_H__
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* End of #ifdef __cplusplus */
#include "sa_hapi_media.h"
SA_S32 INNER_MEDIA_RGN_GetConfig(SA_MEDIA_VIDEO_CONFIG_S *pstSceneConfig, SA_MEDIA_VENC_ATTR_S *pstVencAttr, SA_MEDIA_RGN_ATTR_S* pstRgnAttr);
SA_S32 INNER_MEDIA_RGN_Start(SA_MEDIA_RGN_ATTR_S* pstRgnAttr);
SA_S32 INNER_MEDIA_RGN_Stop(SA_MEDIA_RGN_ATTR_S* pstRgnAttr);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* End of #ifdef __cplusplus */
#endif /* End of #ifdef __SA_INNER_MEDIA_RGN_H__ */
...@@ -30,7 +30,9 @@ SA_S32 SA_INNER_MEDIA_SD_GetAttr(SA_MEDIA_VIDEO_CONFIG_S *pstSceneConfig, SA_MED ...@@ -30,7 +30,9 @@ SA_S32 SA_INNER_MEDIA_SD_GetAttr(SA_MEDIA_VIDEO_CONFIG_S *pstSceneConfig, SA_MED
SA_S32 SA_INNER_MEDIA_SD_Start(SA_MEDIA_ATTR_S *pstMediaAttr); SA_S32 SA_INNER_MEDIA_SD_Start(SA_MEDIA_ATTR_S *pstMediaAttr);
SA_S32 SA_INNER_MEDIA_SD_Stop(SA_MEDIA_ATTR_S *pstMediaAttr); SA_S32 SA_INNER_MEDIA_SD_Stop(SA_MEDIA_ATTR_S *pstMediaAttr);
SA_S32 SA_INNER_HAPI_SD_SetExpAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_EXP_INTTIMEMAX_S *pstIntTimeAttr); SA_S32 SA_INNER_HAPI_SD_SetExpAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_EXP_INTTIMEMAX_S *pstIntTimeAttr);
SA_S32 SA_INNER_HAPI_SD_SetSdDynAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_MODE_E *enMode, SA_MEDIA_SD_TYPE_E *enSdType);
SA_S32 SA_INNER_HAPI_SD_GetSdDynAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_MODE_E *enMode, SA_MEDIA_SD_TYPE_E *enSdType);
SA_S32 SA_INNER_MEDIA_SD_GetInfo(SA_U32 u32IspPipe, SA_MEDIA_SD_INFO_S *pstInfo);
#ifdef __cplusplus #ifdef __cplusplus
#if __cplusplus #if __cplusplus
} }
......
...@@ -1150,6 +1150,20 @@ SA_VOID SA_HAPI_MEDIA_StopDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType) ...@@ -1150,6 +1150,20 @@ SA_VOID SA_HAPI_MEDIA_StopDump(VI_DEV s32DevId, SA_MEDIA_DUMP_E enDumpType)
} }
} }
SA_S32 SA_HAPI_MEDIA_SdDynCtrAttr(SA_MEDIA_SD_DYN_E enDynMode, SA_MEDIA_SD_MODE_E *enSdMode, SA_MEDIA_SD_TYPE_E *enSdType)
{
HAPI_MEDIA_CHECK_PTR(enSdMode);
HAPI_MEDIA_CHECK_PTR(enSdType);
SA_S32 s32Ret = SA_SUCCESS;
if (SA_MEDIA_SD_DYN_SET == enDynMode) {
s32Ret = SA_INNER_HAPI_SD_SetSdDynAttr(g_stMediaAttr.stVin.stIspAttr.u32IspPipeId, enSdMode, enSdType);
} else {
s32Ret = SA_INNER_HAPI_SD_GetSdDynAttr(g_stMediaAttr.stVin.stIspAttr.u32IspPipeId, enSdMode, enSdType);
}
return s32Ret;
}
#ifdef __cplusplus #ifdef __cplusplus
#if __cplusplus #if __cplusplus
} }
......
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* End of #ifdef __cplusplus */
#include "sa_inner_hapi_media_rgn.h"
#include "sa_inner_hapi_media_sd.h"
#include "sa_mapi_sys.h"
#include "sa_mapi_region.h"
#include <ft2build.h>
#include <freetype/freetype.h>
#include <freetype/ftglyph.h>
typedef unsigned short wchar;
#define RET_SHIFT_ILSEQ(n) (-1-2*(n))
#define RET_ILSEQ RET_SHIFT_ILSEQ(0)
#define RET_TOOFEW(n) (-2-2*(n))
typedef unsigned int ucs4_t;
#define RGN_MAX_STR_LEN 1024
#define RGB_2_Y(r, g, b) ((int)(0.2126 * r + 0.7154 * g + 0.072 * b))
#define RGB_2_U(r, g, b) ((int)(-0.1145 * r - 0.3855 * g + 0.500 * b + 128))
#define RGB_2_V(r, g, b) ((int)(0.500 * r - 0.4543 * g - 0.0457 * b + 128))
#define RGB_2_YUV(r, g, b) (RGB_2_Y(r, g, b) | RGB_2_U(r, g, b) << 8 | RGB_2_V(r, g, b) << 16)
static HAPI_MEDIA_THREAD_T g_stRgnUpdateTimeTh = {0};
static SA_BOOL gbRgnUpdateThrQuit = SA_FALSE;
static SA_BOOL g_bUpdateTimeThRun = SA_FALSE;
typedef struct _SA_INNER_MEDIA_RGN_CHAR_MAP {
FT_ULong c;
SA_U32 fontSize;
SA_BOOL enable;
FT_Glyph glyph;
FT_BitmapGlyph bitmap_glyph;
SA_U32 topOffset;
SA_U32 leftOffset;
} SA_INNER_MEDIA_RGN_CHAR_MAP;
static FT_Library gFtLibrary = NULL;
static FT_Face gFtFace = NULL;
static HAPI_MEDIA_MUTEX_T *plock = NULL;
static SA_INNER_MEDIA_RGN_CHAR_MAP g_timeCharMaps[22];
static SA_U8 *gBitmapBuf = NULL;
static HAPI_SEM_T g_UpdateTimeSem = {0};
static int SA_INNER_MEDIA_RGN_utf8_mbtowc(ucs4_t *pwc, const unsigned char *s, int n)
{
unsigned char c = s[0];
if (c < 0x80) {
*pwc = c;
return 1;
} else if (c < 0xc2) {
return RET_ILSEQ;
} else if (c < 0xe0) {
if (n < 2) {
return RET_TOOFEW(0);
}
if (!((s[1] ^ 0x80) < 0x40)) {
return RET_ILSEQ;
}
*pwc = ((ucs4_t)(c & 0x1f) << 6)
| (ucs4_t)(s[1] ^ 0x80);
return 2;
} else if (c < 0xf0) {
if (n < 3) {
return RET_TOOFEW(0);
}
if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (c >= 0xe1 || s[1] >= 0xa0))) {
return RET_ILSEQ;
}
*pwc = ((ucs4_t)(c & 0x0f) << 12)
| ((ucs4_t)(s[1] ^ 0x80) << 6)
| (ucs4_t)(s[2] ^ 0x80);
return 3;
} else if (c < 0xf8 && sizeof(ucs4_t) * 8 >= 32) {
if (n < 4) {
return RET_TOOFEW(0);
}
if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (s[3] ^ 0x80) < 0x40
&& (c >= 0xf1 || s[1] >= 0x90))) {
return RET_ILSEQ;
}
*pwc = ((ucs4_t)(c & 0x07) << 18)
| ((ucs4_t)(s[1] ^ 0x80) << 12)
| ((ucs4_t)(s[2] ^ 0x80) << 6)
| (ucs4_t)(s[3] ^ 0x80);
return 4;
} else if (c < 0xfc && sizeof(ucs4_t) * 8 >= 32) {
if (n < 5) {
return RET_TOOFEW(0);
}
if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (s[3] ^ 0x80) < 0x40 && (s[4] ^ 0x80) < 0x40
&& (c >= 0xf9 || s[1] >= 0x88))) {
return RET_ILSEQ;
}
*pwc = ((ucs4_t)(c & 0x03) << 24)
| ((ucs4_t)(s[1] ^ 0x80) << 18)
| ((ucs4_t)(s[2] ^ 0x80) << 12)
| ((ucs4_t)(s[3] ^ 0x80) << 6)
| (ucs4_t)(s[4] ^ 0x80);
return 5;
} else if (c < 0xfe && sizeof(ucs4_t) * 8 >= 32) {
if (n < 6) {
return RET_TOOFEW(0);
}
if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40
&& (s[3] ^ 0x80) < 0x40 && (s[4] ^ 0x80) < 0x40
&& (s[5] ^ 0x80) < 0x40
&& (c >= 0xfd || s[1] >= 0x84))) {
return RET_ILSEQ;
}
*pwc = ((ucs4_t)(c & 0x01) << 30)
| ((ucs4_t)(s[1] ^ 0x80) << 24)
| ((ucs4_t)(s[2] ^ 0x80) << 18)
| ((ucs4_t)(s[3] ^ 0x80) << 12)
| ((ucs4_t)(s[4] ^ 0x80) << 6)
| (ucs4_t)(s[5] ^ 0x80);
return 6;
} else {
return RET_ILSEQ;
}
}
static int SA_INNER_MEDIA_RGN_utf8_to_unicode(const signed char *utf8str, int slen, wchar *outbuf, int osize)
{
int ret = -1;
const unsigned char *p = (const unsigned char *)utf8str;
int i = 0, cnt = 0, cb;
wchar *op = outbuf;
ucs4_t wc;
do {
if (0 == utf8str) {
break;
}
if (slen < 0) {
slen = 0;
while (*p++) {
++slen;
}
p = (const unsigned char *)utf8str;
}
for (i = 0; i < slen;) {
cb = SA_INNER_MEDIA_RGN_utf8_mbtowc(&wc, p, slen - i);
if (cb <= 0) {
break;
}
i += cb;
p += cb;
if (op) {
if (cnt + 2 <= osize) {
*op++ = (wchar)wc;
} else {
break;
}
}
cnt += 2;
}
ret = cnt;
} while (0);
return ret;
}
SA_S32 SA_INNER_MEDIA_RGN_TEXT2BITMAP_Init(const char* fontFile)
{
static char pTimeChars[64] = {"星期一二三四五六日1234567890:- "};
SA_U32 i = 0;
wchar unicodeStr[128] = {0};
if (gFtFace != NULL)
return SA_SUCCESS;
SA_S32 error = FT_Init_FreeType(&gFtLibrary);
if (error) {
HAPI_MEDIA_LOG_E("can not init free type library!\n");
return SA_FAILURE;
}
error = FT_New_Face(gFtLibrary, fontFile, 0, &gFtFace);
if (error) {
HAPI_MEDIA_LOG_E("Find Font ttf Failed!\n");
return SA_FAILURE;
}
plock = HAPI_MEDIA_MALLOC(sizeof(HAPI_MEDIA_MUTEX_T));
HAPI_MEDIA_MUTEX_INIT(plock);
SA_INNER_MEDIA_RGN_utf8_to_unicode((signed char*)pTimeChars, -1, (wchar *)&unicodeStr, 128);
for (i = 0; i < 22; i++) {
g_timeCharMaps[i].c = unicodeStr[i];
}
HAPI_MEDIA_LOG_I("Load font %s success.\n", fontFile);
return SA_SUCCESS;
}
SA_S32 SA_INNER_MEDIA_RGN_TEXT2BITMAP_DeInit()
{
SA_U32 i;
for (i = 0; i < 22; i++) {
if (SA_TRUE == g_timeCharMaps[i].enable) {
FT_Done_Glyph(g_timeCharMaps[i].glyph);
g_timeCharMaps[i].enable = SA_FALSE;
}
}
if (NULL != plock) {
HAPI_MEDIA_MUTEX_DEINIT(plock);
HAPI_MEDIA_FREE(plock);
plock = NULL;
}
if (gFtFace != NULL) {
FT_Done_Face(gFtFace);
gFtFace = NULL;
}
if (gFtLibrary != NULL) {
FT_Done_FreeType(gFtLibrary);
gFtLibrary = NULL;
}
return SA_SUCCESS;
}
SA_S32 SA_INNER_MEDIA_RGN_TEXT2BITMAP_Convert(PIXEL_FORMAT_E enPixelFmt, POINT_S point, const SA_S8* u8Text, SA_U8* u8Data, SA_U32 u32FontSize, SA_U32 u32BitmapWidth, SA_U32 u32BitmapHeight, SA_U32 u32ColorIndex)
{
FT_Glyph glyph = SA_NULL;
FT_BitmapGlyph bitmap_glyph=NULL;
FT_Int32 flags = FT_LOAD_DEFAULT | FT_LOAD_RENDER | FT_LOAD_TARGET_NORMAL;
SA_U32 offset = 0, index = 0;
SA_U32 i, j, h, w, xOffset=0, yOffset=0, pOffset, unicodeLen;
FT_ULong c = 0;
SA_U8* p = NULL;
SA_U32 u32ByteOffset, u32BitOffset;
SA_BOOL bFindC = SA_FALSE;
wchar unicodeStr[128] = {0};
SA_U32* p4Pixel = SA_NULL;
if (gFtFace == NULL)
return SA_FAILURE;
unicodeLen = SA_INNER_MEDIA_RGN_utf8_to_unicode(u8Text, -1, unicodeStr, RGN_MAX_STR_LEN);
// memset(u8Data, 0, u32BitmapWidth * u32BitmapHeight / 4);
HAPI_MEDIA_MUTEX_LOCK(plock);
FT_Set_Pixel_Sizes(gFtFace, u32FontSize, u32FontSize);
for(i = 0; i < unicodeLen / 2; i++) {
c = unicodeStr[i];
if (c == L' ') {
offset += u32FontSize / 2;
continue;
}
bFindC = SA_FALSE;
glyph = SA_NULL;
for (j = 0; j < 22; j++) {
if (g_timeCharMaps[j].c == c) {
if (SA_TRUE == g_timeCharMaps[j].enable) {
if (g_timeCharMaps[j].fontSize == u32FontSize) { // find c
bitmap_glyph = g_timeCharMaps[j].bitmap_glyph;
yOffset = g_timeCharMaps[j].topOffset;
xOffset = g_timeCharMaps[j].leftOffset;
bFindC = SA_TRUE;
} else { // find c but size error
bFindC = SA_FALSE;
}
} else { // add c
if (!FT_Load_Char(gFtFace, c, flags)) {
FT_Get_Glyph(gFtFace->glyph, &glyph);
FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_MONO, 0, 0);
g_timeCharMaps[j].glyph = glyph;
g_timeCharMaps[j].bitmap_glyph = (FT_BitmapGlyph)glyph;
g_timeCharMaps[j].topOffset = yOffset = gFtFace->glyph->face->ascender * u32FontSize / (gFtFace->glyph->face->ascender - gFtFace->glyph->face->descender) - gFtFace->glyph->metrics.horiBearingY / 64;
g_timeCharMaps[j].leftOffset = gFtFace->glyph->metrics.horiBearingX / 64;
g_timeCharMaps[j].fontSize = u32FontSize;
g_timeCharMaps[j].enable = SA_TRUE;
bitmap_glyph = g_timeCharMaps[j].bitmap_glyph;
yOffset = g_timeCharMaps[j].topOffset;
xOffset = g_timeCharMaps[j].leftOffset;
bFindC = SA_TRUE;
}
}
break;
}
}
// if (SA_FALSE == bFindC)
if (SA_TRUE != bFindC) {
if (!FT_Load_Char(gFtFace, c, flags)) {
FT_Get_Glyph(gFtFace->glyph, &glyph);
FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_MONO, 0, 0);
bitmap_glyph = (FT_BitmapGlyph)glyph;
yOffset = gFtFace->glyph->face->ascender * u32FontSize / (gFtFace->glyph->face->ascender - gFtFace->glyph->face->descender) - gFtFace->glyph->metrics.horiBearingY / 64;
xOffset = gFtFace->glyph->metrics.horiBearingX / 64;
}
}
if (NULL != bitmap_glyph) {
h = bitmap_glyph->bitmap.rows;
w = bitmap_glyph->bitmap.width;
p = bitmap_glyph->bitmap.buffer;
if (point.s32X + offset + w > u32BitmapWidth)
continue;
for (j = 0; j < h; j++) {
pOffset = (point.s32Y + j + yOffset) * u32BitmapWidth + point.s32X + offset + xOffset;
if (pOffset + w > u32BitmapWidth * u32BitmapHeight)
continue;
if (PIXEL_FORMAT_ARGB_2BPP == enPixelFmt) {
for (int k = 0; k < w; k++) {
if (p[j * w + k] != 0) {
index = pOffset + k;
u32ByteOffset = (index * 2) / 8;
u32BitOffset = (index * 2) % 8;
u8Data[u32ByteOffset] |= (u32ColorIndex << u32BitOffset);
}
}
} else {
for (int k = 0; k < w; k++) {
if (p[j * w + k] != 0) {
p4Pixel = (SA_U32*)(u8Data + (pOffset + k) * 4);
*p4Pixel = 0xFFFFFFFF;
}
}
}
}
offset += w + xOffset * 2;
}
if (SA_TRUE != bFindC && SA_NULL != glyph) {
FT_Done_Glyph(glyph);
}
}
HAPI_MEDIA_MUTEX_UNLOCK(plock);
return offset;
}
SA_U32 SA_INNER_MEDIA_RGN_GetTime(SA_MEDIA_RGN_TYPE_E enType, SA_VOID* strText, SA_BOOL bTest)
{
time_t stTime;
struct tm *pstTm;
static char* wstrWeek[7] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
SA_MEDIA_SD_INFO_S stInfo = {0};
stTime = time(SA_NULL);
pstTm = localtime(&stTime);
switch (enType)
{
case SA_MEDIA_RGN_TYPE_TIMESTAMP:
sprintf((char *)strText, "%s %04d-%02d-%02d %02d:%02d:%02d", wstrWeek[pstTm->tm_wday], pstTm->tm_year + 1900, pstTm->tm_mon + 1, pstTm->tm_mday, pstTm->tm_hour, pstTm->tm_min, pstTm->tm_sec);
break;
case SA_MEDIA_RGN_TYPE_TIMESTAMP_DEBUG:
SA_INNER_MEDIA_SD_GetInfo(0, &stInfo);
if (SA_TRUE == bTest) {
strcpy((char *)strText, "Int 00000/ISO 000000/TarAE 0000/Bv 00000/Luma 0000/Scene 0/CT 0000/AWB Gain 0000 0000 0000 0000/FrameID 0000/ 2000-00-00 00:00:00");
} else {
sprintf((char *)strText, "Int %d/ISO %d/TarAE %d/Luma %d/Bv %d/Scene %d/CT %d/AWB Gain %d %d %d %d/FrameID %d/ %04d-%02d-%02d %02d:%02d:%02d",
stInfo.u32IntTime,
stInfo.u32Iso,
stInfo.u32AeTarget,
stInfo.u32Curluma,
stInfo.s32RealBv,
stInfo.enSceneType,
stInfo.u32Ct,
stInfo.au32WbGain[0],
stInfo.au32WbGain[1],
stInfo.au32WbGain[2],
stInfo.au32WbGain[3],
stInfo.u32FrameId,
pstTm->tm_year + 1900,
pstTm->tm_mon + 1,
pstTm->tm_mday,
pstTm->tm_hour,
pstTm->tm_min,
pstTm->tm_sec);
}
break;
default:
break;
}
return stTime;
}
SA_S32 SA_INNER_MEDIA_RGN_UpdateImage(SA_MEDIA_RGN_CHN_ATTR_S * pstRgnChnAttr)
{
SA_S32 s32Ret = SA_SUCCESS;
SA_U32 u32BitmapSize = 0;
BITMAP_S stBitmap;
stBitmap.u32Width = pstRgnChnAttr->stRect.u32Width;
stBitmap.u32Height = pstRgnChnAttr->stRect.u32Height;
if (pstRgnChnAttr->stSrc.enModId == SA_ID_VPSS) {
stBitmap.enPixelFormat = PIXEL_FORMAT_ARGB_2BPP;
u32BitmapSize = stBitmap.u32Width * stBitmap.u32Height / 4;
} else {
stBitmap.enPixelFormat = PIXEL_FORMAT_BGRA_8888;
u32BitmapSize = stBitmap.u32Width * stBitmap.u32Height * 4;
}
stBitmap.pData = (SA_U8*)HAPI_MEDIA_CALLOC(1, u32BitmapSize);
FILE* pFile = fopen(pstRgnChnAttr->astrImageFile, "rb");
if (NULL == pFile) {
HAPI_MEDIA_LOG_E("SA_INNER_MEDIA_RGN_UpdateImage open %s failed!\n", pstRgnChnAttr->astrImageFile);
return -1;
}
fread(stBitmap.pData, 1, u32BitmapSize, pFile);
fclose(pFile);
s32Ret = SA_MAPI_VRGN_SetBitMap(pstRgnChnAttr->u32HandleId, &stBitmap);
HAPI_MEDIA_FREE(stBitmap.pData);
return s32Ret;
}
SA_S32 SA_INNER_MEDIA_RGN_UpdateTime(SA_MEDIA_RGN_CHN_ATTR_S *pstChannel, const SA_S8* strTime)
{
SA_S32 s32Ret = SA_SUCCESS;
BITMAP_S stBitmap;
POINT_S point;
stBitmap.u32Width = pstChannel->stRect.u32Width;
stBitmap.u32Height = pstChannel->stRect.u32Height;
stBitmap.pData = gBitmapBuf;
point.s32X = 0;
point.s32Y = (stBitmap.u32Height - pstChannel->u32FontSize) / 2;
if (pstChannel->stSrc.enModId == SA_ID_VPSS) {
stBitmap.enPixelFormat = PIXEL_FORMAT_ARGB_2BPP;
memset(stBitmap.pData, 0, stBitmap.u32Width * stBitmap.u32Height / 4);
} else {
stBitmap.enPixelFormat = PIXEL_FORMAT_BGRA_8888;
memset(stBitmap.pData, 0, stBitmap.u32Width * stBitmap.u32Height * 4);
}
SA_INNER_MEDIA_RGN_TEXT2BITMAP_Convert(stBitmap.enPixelFormat, point, strTime, stBitmap.pData, pstChannel->u32FontSize, stBitmap.u32Width, stBitmap.u32Height, 1);
s32Ret = SA_MAPI_VRGN_SetBitMap(pstChannel->u32HandleId, &stBitmap);
return s32Ret;
}
SA_VOID* SA_INNER_MEDIA_RGN_UpdateTimeThread(SA_VOID *p)
{
SA_S32 s32Ret = SA_SUCCESS;
SA_MEDIA_RGN_ATTR_S* pstRgnAttr = (SA_MEDIA_RGN_ATTR_S*)p;
SA_U32 i;
SA_MEDIA_RGN_CHN_ATTR_S *pstRgnChn = SA_NULL;
SA_U32 u32WaitTimeMs = 500;
time_t u32LastTime = 0;
time_t u32NewTime = 0;
SIZE_S stMaxSize = {0};
MOD_ID_E enModId = SA_ID_VPSS;
SA_U32 u32ImgSize = 0;
POINT_S stPoint = {0};
SA_S8 strText[RGN_MAX_STR_LEN] = {0};
gbRgnUpdateThrQuit = SA_FALSE;
// 获取最大通道
for (i = 0; i < SA_MEDIA_RGN_CHN_MAX; i++) {
pstRgnChn = &pstRgnAttr->astChannel[i];
if (SA_TRUE == pstRgnChn->bEnable) {
if (pstRgnChn->enType >= SA_MEDIA_RGN_TYPE_TIMESTAMP) {
if (pstRgnChn->stRect.u32Width * pstRgnChn->stRect.u32Height > stMaxSize.u32Width * stMaxSize.u32Height) {
stMaxSize.u32Width = pstRgnChn->stRect.u32Width;
stMaxSize.u32Height = pstRgnChn->stRect.u32Height;
enModId = pstRgnChn->stSrc.enModId;
}
}
}
}
// 分配内存
if (stMaxSize.u32Width * stMaxSize.u32Height > 0) {
if (enModId == SA_ID_VPSS) {
gBitmapBuf = (SA_U8*)HAPI_MEDIA_CALLOC(1, stMaxSize.u32Width * stMaxSize.u32Height / 4);
} else {
gBitmapBuf = (SA_U8*)HAPI_MEDIA_CALLOC(1, stMaxSize.u32Width * stMaxSize.u32Height * 4);
}
}
// 计算每个通道的字体大小
for (i = 0; i < SA_MEDIA_RGN_CHN_MAX; i++) {
pstRgnChn = &pstRgnAttr->astChannel[i];
if (SA_TRUE == pstRgnChn->bEnable) {
if (pstRgnChn->enType >= SA_MEDIA_RGN_TYPE_TIMESTAMP) {
memset(strText, 0, RGN_MAX_STR_LEN);
SA_INNER_MEDIA_RGN_GetTime(pstRgnChn->enType, strText, SA_TRUE);
pstRgnChn->u32FontSize = pstRgnChn->stRect.u32Height;
do {
pstRgnChn->u32FontSize -= 2; //pixel]
if (enModId == SA_ID_VPSS) {
u32ImgSize = SA_INNER_MEDIA_RGN_TEXT2BITMAP_Convert(PIXEL_FORMAT_ARGB_2BPP, stPoint, strText, gBitmapBuf, pstRgnChn->u32FontSize, pstRgnChn->stRect.u32Width, pstRgnChn->stRect.u32Height, 1);
} else {
u32ImgSize = SA_INNER_MEDIA_RGN_TEXT2BITMAP_Convert(PIXEL_FORMAT_BGRA_8888, stPoint, strText, gBitmapBuf, pstRgnChn->u32FontSize, pstRgnChn->stRect.u32Width, pstRgnChn->stRect.u32Height, 1);
}
u32ImgSize = (u32ImgSize + 31) / 32 * 32; //ALIGN UP(32)
HAPI_MEDIA_LOG_I("RGN Test font size %d, osd width %d, rect width %d\n", pstRgnChn->u32FontSize, u32ImgSize, pstRgnChn->stRect.u32Width);
} while(u32ImgSize > pstRgnChn->stRect.u32Width);
}
}
}
while (SA_FALSE == gbRgnUpdateThrQuit) {
u32NewTime = time(0);
if (u32LastTime != u32NewTime) {
u32LastTime = u32NewTime;
for (i = 0; i < SA_MEDIA_RGN_CHN_MAX; i++) {
pstRgnChn = &pstRgnAttr->astChannel[i];
if (SA_TRUE == pstRgnChn->bEnable && pstRgnChn->enType >= SA_MEDIA_RGN_TYPE_TIMESTAMP) {
memset(strText, 0, RGN_MAX_STR_LEN);
SA_INNER_MEDIA_RGN_GetTime(pstRgnChn->enType, strText, SA_FALSE);
s32Ret = SA_INNER_MEDIA_RGN_UpdateTime(pstRgnChn, strText);
if (s32Ret != SA_SUCCESS) {
HAPI_MEDIA_LOG_W("SA_INNER_MEDIA_RGN_UpdateTime failed with %#x\n", s32Ret);
}
}
}
}
HAPI_MEDIA_SEM_WAIT(&g_UpdateTimeSem, u32WaitTimeMs);
}
return SA_NULL;
}
SA_S32 INNER_MEDIA_RGN_GetConfig(SA_MEDIA_VIDEO_CONFIG_S *pstSceneConfig, SA_MEDIA_VENC_ATTR_S *pstVencAttr, SA_MEDIA_RGN_ATTR_S* pstRgnAttr)
{
SA_U32 i, j;
SA_U32 u32RgnId = 0;
// SA_BOOL bVencValid = SA_FALSE;
// SA_BOOL bOsdValid = SA_FALSE;
// SA_VIDEO_VENC_CONFIG_S *pstVencCfg = SA_NULL;
// SA_VIDEO_VENC_CHN_ATTR_S *pstVencChnAttr = SA_NULL;
SA_MEDIA_VENC_CONFIG_S *pstVencConfig = SA_NULL;
SA_MEDIA_VENC_CHN_ATTR_S *pstVencChnAttr = SA_NULL;
SA_MEDIA_RGN_CONFIG_S *pstRegion = SA_NULL;
if (SA_NULL == pstSceneConfig) {
HAPI_MEDIA_LOG_E("pstSceneConfig is null pointer!\n");
return SA_ERR_HAPI_MEDIA_NULL_PTR;
}
if (SA_NULL == pstRgnAttr) {
HAPI_MEDIA_LOG_E("pstMediaAttr is null pointer!\n");
return SA_ERR_HAPI_MEDIA_NULL_PTR;
}
for (i = 0; i < SA_MEDIA_SCENE_CAPTURE_RECORD; i++) {
pstVencConfig = &pstSceneConfig->astVencConfig[i];
pstVencChnAttr = &pstVencAttr->astChannel[i];
if (SA_TRUE == pstVencChnAttr->bEnable) {
for (j = 0; j < SA_MEDIA_RGN_CHN_MAX; j++) {
pstRegion = &pstVencConfig->astRegion[j];
if (SA_TRUE == pstRegion->bEnable) {
pstRgnAttr->astChannel[u32RgnId].bEnable = SA_TRUE;
pstRgnAttr->astChannel[u32RgnId].u32HandleId = u32RgnId;
pstRgnAttr->astChannel[u32RgnId].stRect = pstRegion->stRect;
pstRgnAttr->astChannel[u32RgnId].enType = pstRegion->enType;
pstRgnAttr->astChannel[u32RgnId].stSrc.enModId = SA_ID_VENC;
pstRgnAttr->astChannel[u32RgnId].stSrc.s32DevId = 0;
pstRgnAttr->astChannel[u32RgnId].stSrc.s32ChnId = pstVencChnAttr->u32ChnId;
strcpy(pstRgnAttr->astChannel[u32RgnId].astrImageFile, pstRegion->astrImageFile);
HAPI_MEDIA_LOG_I("RGN %d On VENC Chn %d\n", u32RgnId, pstVencChnAttr->u32ChnId);
u32RgnId++;
}
}
}
}
return SA_SUCCESS;
}
SA_S32 INNER_MEDIA_RGN_Start(SA_MEDIA_RGN_ATTR_S *pstRgnAttr)
{
SA_S32 s32Ret = SA_SUCCESS;
SA_U32 i;
SA_BOOL bNeedUpdateTime = SA_FALSE;
if (SA_NULL == pstRgnAttr) {
HAPI_MEDIA_LOG_E("rgn attr is null pointer!\n");
return SA_ERR_HAPI_MEDIA_NULL_PTR;
}
for (i = 0; i < SA_MEDIA_RGN_NUM_MAX; i++) {
if (SA_TRUE == pstRgnAttr->astChannel[i].bEnable) {
s32Ret = SA_MAPI_VRGN_Create(pstRgnAttr->astChannel[i].u32HandleId, pstRgnAttr->astChannel[i].stSrc.s32ChnId, &pstRgnAttr->astChannel[i].stRect);
if (s32Ret != SA_SUCCESS) {
HAPI_MEDIA_LOG_E("SA_MAPI_VRGN_Create failed with %#x\n", s32Ret);
return s32Ret;
}
if (pstRgnAttr->astChannel[i].enType >= SA_MEDIA_RGN_TYPE_TIMESTAMP) {
bNeedUpdateTime = SA_TRUE;
} else {
// update image
SA_INNER_MEDIA_RGN_UpdateImage(&(pstRgnAttr->astChannel[i]));
}
}
}
// update time thread
if (bNeedUpdateTime) {
s32Ret = SA_INNER_MEDIA_RGN_TEXT2BITMAP_Init("/acme/bin/simhei.ttf");
if (s32Ret != SA_SUCCESS) {
HAPI_MEDIA_LOG_E("SA_INNER_MEDIA_RGN_TEXT2BITMAP_Init failed!\n");
return SA_FAILURE;
}
HAPI_MEDIA_THREAD_INIT(&g_stRgnUpdateTimeTh, "RGNTIME", SA_INNER_MEDIA_RGN_UpdateTimeThread, pstRgnAttr);
HAPI_MEDIA_SEM_INIT(&g_UpdateTimeSem, 0);
g_bUpdateTimeThRun = SA_TRUE;
}
return SA_SUCCESS;
}
SA_S32 INNER_MEDIA_RGN_Stop(SA_MEDIA_RGN_ATTR_S* pstRgnAttr)
{
SA_U32 i;
SA_BOOL bNeedUpdateTime = SA_FALSE;
if (SA_NULL == pstRgnAttr) {
HAPI_MEDIA_LOG_E("rgn attr is null pointer!\n");
return SA_ERR_HAPI_MEDIA_NULL_PTR;
}
if (SA_TRUE == g_bUpdateTimeThRun) {
gbRgnUpdateThrQuit = SA_TRUE;
HAPI_MEDIA_SEM_SIGNAL(&g_UpdateTimeSem);
HAPI_MEDIA_THREAD_DEINIT(g_stRgnUpdateTimeTh);
HAPI_MEDIA_SEM_DEINIT(&g_UpdateTimeSem);
}
for (i = 0; i < SA_MEDIA_RGN_NUM_MAX; i++) {
if (SA_TRUE == pstRgnAttr->astChannel[i].bEnable) {
SA_MAPI_VRGN_Destroy(pstRgnAttr->astChannel[i].u32HandleId);
if (pstRgnAttr->astChannel[i].enType >= SA_MEDIA_RGN_TYPE_TIMESTAMP) {
bNeedUpdateTime = SA_TRUE;
}
}
}
if (bNeedUpdateTime) {
SA_INNER_MEDIA_RGN_TEXT2BITMAP_DeInit();
HAPI_MEDIA_FREE(gBitmapBuf);
}
return SA_SUCCESS;
}
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* End of #ifdef __cplusplus */
\ No newline at end of file
...@@ -281,70 +281,39 @@ static SA_S32 INNER_HAPI_SD_LoadIspCfgExt(char *pBinBuff, SA_U32 u32BinSize, cha ...@@ -281,70 +281,39 @@ static SA_S32 INNER_HAPI_SD_LoadIspCfgExt(char *pBinBuff, SA_U32 u32BinSize, cha
return SA_SUCCESS; return SA_SUCCESS;
} }
//通过 pfile 指定linear/wdr
static SA_S32 INNER_HAPI_SD_LoadIspBin(char *pBinBuff, SA_U32 u32BinSize, SA_MEDIA_ISP_BIN_PATH_E eIspBinPath, char pfile[][128]) static SA_S32 INNER_HAPI_SD_LoadIspBin(char *pBinBuff, SA_U32 u32BinSize, SA_MEDIA_ISP_BIN_PATH_E eIspBinPath, char pfile[][128])
{ {
int iret = SA_SUCCESS ; int iret = SA_SUCCESS ;
iret = INNER_HAPI_SD_LoadIspCfg(pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_BASE]); iret = INNER_HAPI_SD_LoadIspCfg(pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]);
if(SA_SUCCESS == iret){ if(SA_SUCCESS == iret){
if(SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR == eIspBinPath ) { if(SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]);
} else if(SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]);
if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]);
}
} else if(SA_MEDIA_ISP_BIN_PATH_COLOR_AISP == eIspBinPath){ } else if(SA_MEDIA_ISP_BIN_PATH_COLOR_AISP == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]);
if(SA_SUCCESS == iret) { if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_AISP]);
if(SA_SUCCESS == iret) { }
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_AISP]);
}
}
} else if(SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP == eIspBinPath){ } else if(SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]);
if(SA_SUCCESS == iret) { if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_AISP]);
if(SA_SUCCESS == iret) { if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_AISP]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP]);
if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP]);
}
} }
} }
} else if(SA_MEDIA_ISP_BIN_PATH_DN_NIGHT == eIspBinPath){ } else if(SA_MEDIA_ISP_BIN_PATH_DN_NIGHT == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]);
if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]);
if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_DN_NIGHT]);
}
}
} else if(SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]);
if(SA_SUCCESS == iret) { if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_DN_NIGHT]);
}
} else if(SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]);
if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR]);
if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR]);
}
} }
} else if(SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT == eIspBinPath){ } else if(SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT == eIspBinPath){
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]);
if(SA_SUCCESS == iret) { if(SA_SUCCESS == iret) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_INDOOR]); iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT]);
if(SA_SUCCESS == iret) { }
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[SA_MEDIA_ISP_BIN_PATH_COLOR_BACKLIGHT]);
}
}
} else if( SA_MEDIA_ISP_BIN_PATH_WDR_NIGHT == eIspBinPath ) {
iret =INNER_HAPI_SD_LoadIspCfgExt((char*)pBinBuff, u32BinSize, pfile[eIspBinPath]);
} else { } else {
HAPI_MEDIA_LOG_W("INNER_HAPI_SD_LoadIspBin:Load binpath[%d] fail\n",eIspBinPath); HAPI_MEDIA_LOG_I("INNER_HAPI_SD_LoadIspBin:Load binpath[%d] ok\n",eIspBinPath);
} }
} else { } else {
HAPI_MEDIA_LOG_W("INNER_HAPI_SD_LoadIspBin:Load Base binpath fail\n"); HAPI_MEDIA_LOG_W("INNER_HAPI_SD_LoadIspBin:Load Base binpath fail\n");
...@@ -364,9 +333,9 @@ SA_S32 SA_INNER_MEDIA_SD_LoadISPPara(SA_U32 u32IspPipe, SA_CHAR* pIspBinBuff, SA ...@@ -364,9 +333,9 @@ SA_S32 SA_INNER_MEDIA_SD_LoadISPPara(SA_U32 u32IspPipe, SA_CHAR* pIspBinBuff, SA
} }
// 模式切时增加参数合法性校验 // 模式切时增加参数合法性校验
if(WDR_MODE_2To1_LINE == g_enCurSDWdrMode[u32IspPipe]) { if(WDR_MODE_2To1_LINE == g_enCurSDWdrMode[u32IspPipe]) {
if(SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR != eIspBinPath && SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR != eIspBinPath){ // if(SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR != eIspBinPath && SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR != eIspBinPath){
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR; // eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR;
} // }
} else { } else {
if(SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP < eIspBinPath ){ if(SA_MEDIA_ISP_BIN_PATH_COLOR_LAMP < eIspBinPath ){
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR; eIspBinPath = SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR;
...@@ -477,16 +446,16 @@ static SA_S32 INNER_HAPI_SD_Switch(SA_U32 isp_pipe, char pfile[][128]) ...@@ -477,16 +446,16 @@ static SA_S32 INNER_HAPI_SD_Switch(SA_U32 isp_pipe, char pfile[][128])
enSceneMode = g_stSdDefault[isp_pipe].enSdMode; enSceneMode = g_stSdDefault[isp_pipe].enSdMode;
enSceneType = g_stSdDefault[isp_pipe].enSceneType; enSceneType = g_stSdDefault[isp_pipe].enSceneType;
//SD_WDR_OUTDOOR // //SD_WDR_OUTDOOR
if (SA_MEDIA_SD_WDR_OUTDOOR == enSceneType && SA_MEDIA_SD_MANUAL == enSceneMode) { // if (SA_MEDIA_SD_WDR_OUTDOOR == enSceneType && SA_MEDIA_SD_MANUAL == enSceneMode) {
g_stSdResult[isp_pipe].enWdrMode = SD_MODE_WDR; // g_stSdResult[isp_pipe].enWdrMode = SD_MODE_WDR;
g_stSdResult[isp_pipe].enSceneCoarse = SCENE_COARSE_OUTDOOR; // g_stSdResult[isp_pipe].enSceneCoarse = SCENE_COARSE_OUTDOOR;
} // }
//SD_WDR_INDOOR // //SD_WDR_INDOOR
if (SA_MEDIA_SD_WDR_INDOOR == enSceneType && SA_MEDIA_SD_MANUAL == enSceneMode) { // if (SA_MEDIA_SD_WDR_INDOOR == enSceneType && SA_MEDIA_SD_MANUAL == enSceneMode) {
g_stSdResult[isp_pipe].enWdrMode = SD_MODE_WDR; // g_stSdResult[isp_pipe].enWdrMode = SD_MODE_WDR;
g_stSdResult[isp_pipe].enSceneCoarse = SCENE_COARSE_INDOOR; // g_stSdResult[isp_pipe].enSceneCoarse = SCENE_COARSE_INDOOR;
} // }
//SD_COLOR_AISP //SD_COLOR_AISP
if (SA_MEDIA_SD_COLOR_AISP == enSceneType && SA_MEDIA_SD_MANUAL == enSceneMode) { if (SA_MEDIA_SD_COLOR_AISP == enSceneType && SA_MEDIA_SD_MANUAL == enSceneMode) {
g_stSdResult[isp_pipe].enWdrMode = SD_MODE_LINEAR; g_stSdResult[isp_pipe].enWdrMode = SD_MODE_LINEAR;
...@@ -568,11 +537,11 @@ static SA_S32 INNER_HAPI_SD_Switch(SA_U32 isp_pipe, char pfile[][128]) ...@@ -568,11 +537,11 @@ static SA_S32 INNER_HAPI_SD_Switch(SA_U32 isp_pipe, char pfile[][128])
} }
if(WDR_MODE_2To1_LINE == g_enPreSDWdrMode[isp_pipe]) { if(WDR_MODE_2To1_LINE == g_enPreSDWdrMode[isp_pipe]) {
if(SCENE_COARSE_OUTDOOR == g_InUseSenceId[isp_pipe]) { // if(SCENE_COARSE_OUTDOOR == g_InUseSenceId[isp_pipe]) {
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR; // eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR;
} else { // } else {
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR; // eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR;
} // }
} else { } else {
if (1 == bSdPreAinrOn[isp_pipe]) { if (1 == bSdPreAinrOn[isp_pipe]) {
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_COLOR_AISP; eIspBinPath = SA_MEDIA_ISP_BIN_PATH_COLOR_AISP;
...@@ -857,8 +826,46 @@ static SA_S32 INNER_HAPI_SD_StatParamInit(SA_U32 u32IspPipe, SA_MEDIA_SD_ATTR_S ...@@ -857,8 +826,46 @@ static SA_S32 INNER_HAPI_SD_StatParamInit(SA_U32 u32IspPipe, SA_MEDIA_SD_ATTR_S
return SA_SUCCESS; return SA_SUCCESS;
} }
SA_S32 SA_INNER_HAPI_SD_SetSdDynAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_MODE_E *enMode, SA_MEDIA_SD_TYPE_E *enSdType)
{
HAPI_MEDIA_CHECK_PIPE(u32IspPipe);
HAPI_MEDIA_CHECK_PTR(enMode);
HAPI_MEDIA_CHECK_PTR(enSdType);
SA_S32 s32Ret = SA_SUCCESS;
if ((*enMode != SA_MEDIA_SD_AUTO) && (*enMode != SA_MEDIA_SD_MANUAL)) {
HAPI_MEDIA_LOG_E("SA_INNER_HAPI_SD_SetSdDynAttr enMode illegal\n");
return SA_ERR_HAPI_MEDIA_ILLEGAL_PARAM;
}
if ((*enSdType < SA_MEDIA_SD_COLOR_OUTDOOR) || (*enSdType >= SA_MEDIA_SD_TYPE_NUM)) {
HAPI_MEDIA_LOG_E("SA_INNER_HAPI_SD_SetSdDynAttr enSdType illegal\n");
return SA_ERR_HAPI_MEDIA_ILLEGAL_PARAM;
}
g_stSdDefault[u32IspPipe].enSdMode = *enMode;
g_stSdDefault[u32IspPipe].enSceneType = *enSdType;
HAPI_MEDIA_LOG_I("set sd mode:%d,type:%d\n",*enMode, *enSdType);
return s32Ret;
}
SA_S32 SA_INNER_HAPI_SD_GetSdDynAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_MODE_E *enMode, SA_MEDIA_SD_TYPE_E *enSdType)
{
HAPI_MEDIA_CHECK_PIPE(u32IspPipe);
HAPI_MEDIA_CHECK_PTR(enMode);
HAPI_MEDIA_CHECK_PTR(enSdType);
SA_S32 s32Ret = SA_SUCCESS;
*enMode = g_stSdDefault[u32IspPipe].enSdMode;
if (SA_MEDIA_SD_AUTO == *enMode) {
*enSdType = g_enPreIspBinPath[u32IspPipe];
} else {
*enSdType = g_stSdDefault[u32IspPipe].enSceneType;
}
return s32Ret;
}
SA_S32 SA_INNER_HAPI_SD_SetExpAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_EXP_INTTIMEMAX_S *pstIntTimeAttr) SA_S32 SA_INNER_HAPI_SD_SetExpAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_EXP_INTTIMEMAX_S *pstIntTimeAttr)
{ {
HAPI_MEDIA_CHECK_PIPE(u32IspPipe);
HAPI_MEDIA_CHECK_PTR(pstIntTimeAttr); HAPI_MEDIA_CHECK_PTR(pstIntTimeAttr);
if (SA_TRUE == g_stSdDefault[u32IspPipe].stExpAttr.stIntTimeAttr.bEnable) { if (SA_TRUE == g_stSdDefault[u32IspPipe].stExpAttr.stIntTimeAttr.bEnable) {
if (g_stSdDefault[u32IspPipe].stExpAttr.stIntTimeAttr.u32IntTimeMax < pstIntTimeAttr->u32IntTimeMax) { if (g_stSdDefault[u32IspPipe].stExpAttr.stIntTimeAttr.u32IntTimeMax < pstIntTimeAttr->u32IntTimeMax) {
...@@ -872,6 +879,7 @@ SA_S32 SA_INNER_HAPI_SD_SetExpAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_EXP_INTTIMEMAX ...@@ -872,6 +879,7 @@ SA_S32 SA_INNER_HAPI_SD_SetExpAttr(SA_U32 u32IspPipe, SA_MEDIA_SD_EXP_INTTIMEMAX
SA_S32 SA_INNER_MEDIA_SD_SetInitAttr(SA_U32 u32IspPipe, MEDIA_SD_RESULT_S* pstAttr) SA_S32 SA_INNER_MEDIA_SD_SetInitAttr(SA_U32 u32IspPipe, MEDIA_SD_RESULT_S* pstAttr)
{ {
HAPI_MEDIA_CHECK_PIPE(u32IspPipe);
SA_MEDIA_ISP_BIN_PATH_E eIspBinPath = SA_MEDIA_ISP_BIN_PATH_NUM; SA_MEDIA_ISP_BIN_PATH_E eIspBinPath = SA_MEDIA_ISP_BIN_PATH_NUM;
g_InUseSenceId[u32IspPipe] = pstAttr->enSceneCoarse; g_InUseSenceId[u32IspPipe] = pstAttr->enSceneCoarse;
...@@ -880,11 +888,11 @@ SA_S32 SA_INNER_MEDIA_SD_SetInitAttr(SA_U32 u32IspPipe, MEDIA_SD_RESULT_S* pstAt ...@@ -880,11 +888,11 @@ SA_S32 SA_INNER_MEDIA_SD_SetInitAttr(SA_U32 u32IspPipe, MEDIA_SD_RESULT_S* pstAt
g_astSdlibAttr[u32IspPipe].stAuto.u8InitSceneCoarse = pstAttr->enSceneCoarse; g_astSdlibAttr[u32IspPipe].stAuto.u8InitSceneCoarse = pstAttr->enSceneCoarse;
if(WDR_MODE_2To1_LINE == g_enCurSDWdrMode[u32IspPipe]) { if(WDR_MODE_2To1_LINE == g_enCurSDWdrMode[u32IspPipe]) {
if(SCENE_COARSE_OUTDOOR == g_InUseSenceId[u32IspPipe]) { // if(SCENE_COARSE_OUTDOOR == g_InUseSenceId[u32IspPipe]) {
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR; // eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR;
} else { // } else {
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR; // eIspBinPath = SA_MEDIA_ISP_BIN_PATH_WDR_INDOOR;
} // }
} else { } else {
if (1 == g_enCurSDWdrMode[u32IspPipe]) { if (1 == g_enCurSDWdrMode[u32IspPipe]) {
eIspBinPath = SA_MEDIA_ISP_BIN_PATH_COLOR_AISP; eIspBinPath = SA_MEDIA_ISP_BIN_PATH_COLOR_AISP;
...@@ -937,6 +945,33 @@ SA_S32 SA_INNER_MEDIA_SD_Stop(SA_MEDIA_ATTR_S *pstMediaAttr) ...@@ -937,6 +945,33 @@ SA_S32 SA_INNER_MEDIA_SD_Stop(SA_MEDIA_ATTR_S *pstMediaAttr)
return s32Ret; return s32Ret;
} }
SA_S32 SA_INNER_MEDIA_SD_GetInfo(SA_U32 u32IspPipe, SA_MEDIA_SD_INFO_S *pstInfo)
{
HAPI_MEDIA_CHECK_PIPE(u32IspPipe);
HAPI_MEDIA_CHECK_PTR(pstInfo);
SA_S32 s32Ret = SA_SUCCESS;
AE_EXP_INFO_S stAeInfo = {0};
AWB_WB_INFO_S stAwbInfo = {0};
SA_MAPI_ISP_GetExposureInfo(u32IspPipe, &stAeInfo);
SA_MAPI_ISP_QueryWBInfo(u32IspPipe, &stAwbInfo);
pstInfo->u32IntTime = stAeInfo.au32ExpTime[0];
pstInfo->u32Iso = stAeInfo.au32ISO[0];
pstInfo->u32AeTarget = stAeInfo.u16CurrAeTarget;
pstInfo->u32Curluma = stAeInfo.s32CurrEffY;
pstInfo->s32RealBv = stAeInfo.s32RealBv;
pstInfo->u32ExpRatio = stAeInfo.u32RefExpRatio;
pstInfo->u32FrameId = stAeInfo.u32FrameId;
pstInfo->u32Ct = stAwbInfo.u16ColorTemp;
pstInfo->au32WbGain[0] = stAwbInfo.u16Rgain;
pstInfo->au32WbGain[1] = stAwbInfo.u16Grgain;
pstInfo->au32WbGain[2] = stAwbInfo.u16Gbgain;
pstInfo->au32WbGain[3] = stAwbInfo.u16Bgain;
pstInfo->enSceneType = g_enPreIspBinPath[u32IspPipe];
return s32Ret;
}
#ifdef __cplusplus #ifdef __cplusplus
#if __cplusplus #if __cplusplus
} }
......
...@@ -9,6 +9,7 @@ extern "C" { ...@@ -9,6 +9,7 @@ extern "C" {
#endif #endif
#include "sa_hapi_media.h" #include "sa_hapi_media.h"
#include "sa_inner_hapi_media_video.h" #include "sa_inner_hapi_media_video.h"
#include "sa_inner_hapi_media_rgn.h"
#include "sa_mapi_sys.h" #include "sa_mapi_sys.h"
#include "sa_mapi_sns.h" #include "sa_mapi_sns.h"
#include "sa_mapi_vi.h" #include "sa_mapi_vi.h"
...@@ -859,16 +860,16 @@ static SA_S32 INNER_HAPI_VIN_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_VIDEO_CO ...@@ -859,16 +860,16 @@ static SA_S32 INNER_HAPI_VIN_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_VIDEO_CO
SA_U32 u32BufSize = sizeof(ISP_ATTR_ALL_S)+sizeof(AE_ATTR_ALL_S)+sizeof(AWB_ATTR_ALL_S); SA_U32 u32BufSize = sizeof(ISP_ATTR_ALL_S)+sizeof(AE_ATTR_ALL_S)+sizeof(AWB_ATTR_ALL_S);
pBinBuff = (SA_CHAR*)HAPI_MEDIA_MALLOC(u32BufSize); pBinBuff = (SA_CHAR*)HAPI_MEDIA_MALLOC(u32BufSize);
if (SA_MEDIA_SNS_MODE_HDR == pstSceneConfig->enSensorMode) { if (SA_MEDIA_SNS_MODE_HDR == pstSceneConfig->enSensorMode) {
s32Ret = SA_INNER_MEDIA_SD_LoadISPPara(pstVinAttr->stIspAttr.u32IspPipeId, pBinBuff, SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR, pstVinAttr->stIspAttr.astrIspFile[pstVinAttr->stIspAttr.u32IspPipeId]); // s32Ret = SA_INNER_MEDIA_SD_LoadISPPara(pstVinAttr->stIspAttr.u32IspPipeId, pBinBuff, SA_MEDIA_ISP_BIN_PATH_WDR_OUTDOOR, pstVinAttr->stIspAttr.astrIspFile[pstVinAttr->stIspAttr.u32IspPipeId]);
if (SA_SUCCESS == s32Ret) { // if (SA_SUCCESS == s32Ret) {
memcpy(&pstVinAttr->stIspAttr.stIspAttrAll, pBinBuff, sizeof(ISP_ATTR_ALL_S)); // memcpy(&pstVinAttr->stIspAttr.stIspAttrAll, pBinBuff, sizeof(ISP_ATTR_ALL_S));
memcpy(&pstVinAttr->stIspAttr.stAeAttrAll, (pBinBuff+sizeof(ISP_ATTR_ALL_S)), sizeof(AE_ATTR_ALL_S)); // memcpy(&pstVinAttr->stIspAttr.stAeAttrAll, (pBinBuff+sizeof(ISP_ATTR_ALL_S)), sizeof(AE_ATTR_ALL_S));
memcpy(&pstVinAttr->stIspAttr.stAwbAttrAll, (pBinBuff+sizeof(ISP_ATTR_ALL_S)+sizeof(AE_ATTR_ALL_S)), sizeof(AWB_ATTR_ALL_S)); // memcpy(&pstVinAttr->stIspAttr.stAwbAttrAll, (pBinBuff+sizeof(ISP_ATTR_ALL_S)+sizeof(AE_ATTR_ALL_S)), sizeof(AWB_ATTR_ALL_S));
} else { // } else {
memcpy(&pstVinAttr->stIspAttr.stIspAttrAll, g_isp_def_data, sizeof(ISP_ATTR_ALL_S)); // memcpy(&pstVinAttr->stIspAttr.stIspAttrAll, g_isp_def_data, sizeof(ISP_ATTR_ALL_S));
memcpy(&pstVinAttr->stIspAttr.stAeAttrAll, (g_isp_def_data+sizeof(ISP_ATTR_ALL_S)), sizeof(AE_ATTR_ALL_S)); // memcpy(&pstVinAttr->stIspAttr.stAeAttrAll, (g_isp_def_data+sizeof(ISP_ATTR_ALL_S)), sizeof(AE_ATTR_ALL_S));
memcpy(&pstVinAttr->stIspAttr.stAwbAttrAll, (g_isp_def_data+sizeof(ISP_ATTR_ALL_S)+sizeof(AE_ATTR_ALL_S)), sizeof(AWB_ATTR_ALL_S)); // memcpy(&pstVinAttr->stIspAttr.stAwbAttrAll, (g_isp_def_data+sizeof(ISP_ATTR_ALL_S)+sizeof(AE_ATTR_ALL_S)), sizeof(AWB_ATTR_ALL_S));
} // }
} else { } else {
s32Ret = SA_INNER_MEDIA_SD_LoadISPPara(pstVinAttr->stIspAttr.u32IspPipeId, pBinBuff, SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR, pstVinAttr->stIspAttr.astrIspFile[pstVinAttr->stIspAttr.u32IspPipeId]); s32Ret = SA_INNER_MEDIA_SD_LoadISPPara(pstVinAttr->stIspAttr.u32IspPipeId, pBinBuff, SA_MEDIA_ISP_BIN_PATH_COLOR_OUTDOOR, pstVinAttr->stIspAttr.astrIspFile[pstVinAttr->stIspAttr.u32IspPipeId]);
if (SA_SUCCESS == s32Ret) { if (SA_SUCCESS == s32Ret) {
...@@ -975,7 +976,7 @@ static SA_S32 INNER_HAPI_VENC_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_VIDEO_C ...@@ -975,7 +976,7 @@ static SA_S32 INNER_HAPI_VENC_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_VIDEO_C
pstVenAttr->astChannel[1].bEnable = SA_TRUE; pstVenAttr->astChannel[1].bEnable = SA_TRUE;
g_bMediaVencSmartSEI = pstSceneConfig->astVencConfig[1].bSmartSEI; g_bMediaVencSmartSEI = pstSceneConfig->astVencConfig[1].bSmartSEI;
g_enMediaVencSmartEncoder = pstSceneConfig->astVencConfig[1].enSmartEncoder; g_enMediaVencSmartEncoder = pstSceneConfig->astVencConfig[1].enSmartEncoder;
if (SA_TRUE == g_bMediaVencSmartSEI || SA_MEDIA_SMART_ENCODER_NONE == g_enMediaVencSmartEncoder) { if (SA_TRUE == g_bMediaVencSmartSEI || SA_MEDIA_SMART_ENCODER_NONE != g_enMediaVencSmartEncoder) {
eWorkMode = VENC_WORK_MODE_OFFLINE_SEND; eWorkMode = VENC_WORK_MODE_OFFLINE_SEND;
} else { } else {
eWorkMode = VENC_WORK_MODE_ONLINE; eWorkMode = VENC_WORK_MODE_ONLINE;
...@@ -2000,6 +2001,12 @@ SA_S32 SA_INNER_MEDIA_VIDEO_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_VIDEO_CON ...@@ -2000,6 +2001,12 @@ SA_S32 SA_INNER_MEDIA_VIDEO_GetAttr(SA_MEDIA_SCENE_E enScene, SA_MEDIA_VIDEO_CON
return s32Ret; return s32Ret;
} }
s32Ret = INNER_MEDIA_RGN_GetConfig(pstSceneConfig, &pstMediaAttr->stVenc, &pstMediaAttr->stRgn);
if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("SA_INNER_MEDIA_RGN_GetConfig failed with %#x!\n", s32Ret);
return s32Ret;
}
if (g_stViPipeSize.u32Width > 2592) { if (g_stViPipeSize.u32Width > 2592) {
if (SA_MEDIA_SNS_MODE_HDR == pstSceneConfig->enSensorMode) { if (SA_MEDIA_SNS_MODE_HDR == pstSceneConfig->enSensorMode) {
enNormalMode = SA_SYS_WORKMODE_NORMAL_4K_HDR; enNormalMode = SA_SYS_WORKMODE_NORMAL_4K_HDR;
...@@ -2040,16 +2047,15 @@ SA_S32 SA_INNER_MEDIA_VIDEO_Start(SA_MEDIA_ATTR_S *pstMediaAttr) ...@@ -2040,16 +2047,15 @@ SA_S32 SA_INNER_MEDIA_VIDEO_Start(SA_MEDIA_ATTR_S *pstMediaAttr)
HAPI_MEDIA_LOG_E("INNER_HAPI_VPSS_Create failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("INNER_HAPI_VPSS_Create failed with %#x!\n", s32Ret);
goto VIDEO_CREATE_VIN_FAIL; goto VIDEO_CREATE_VIN_FAIL;
} }
// s32Ret = SA_INNER_MEDIA_RGN_Start(pstVideoAttr->enScene, pstRgnAttr);
// if (SA_SUCCESS != s32Ret) {
// HAPI_MEDIA_LOG_E("SA_INNER_MEDIA_RGN_Start failed with %#x!\n", s32Ret);
// goto VIDEO_CREATE_VPSS_FAIL;
// }
s32Ret = INNER_HAPI_VENC_Start(&pstMediaAttr->stVenc); s32Ret = INNER_HAPI_VENC_Start(&pstMediaAttr->stVenc);
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("INNER_HAPI_VENC_Start failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("INNER_HAPI_VENC_Start failed with %#x!\n", s32Ret);
goto VIDEO_START_RGN_FAIL;
}
s32Ret = INNER_MEDIA_RGN_Start(&pstMediaAttr->stRgn);
if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("INNER_MEDIA_RGN_Start failed with %#x!\n", s32Ret);
goto VIDEO_CREATE_VPSS_FAIL; goto VIDEO_CREATE_VPSS_FAIL;
} }
...@@ -2111,11 +2117,11 @@ VIDEO_START_VENC_FAIL: ...@@ -2111,11 +2117,11 @@ VIDEO_START_VENC_FAIL:
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("INNER_HAPI_VENC_Stop failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("INNER_HAPI_VENC_Stop failed with %#x!\n", s32Ret);
} }
// VIDEO_START_RGN_FAIL: VIDEO_START_RGN_FAIL:
// s32Ret = SA_INNER_MEDIA_RGN_Stop(pstRgnAttr); s32Ret = INNER_MEDIA_RGN_Stop(&pstMediaAttr->stRgn);
// if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
// HAPI_MEDIA_LOG_E("SA_INNER_MEDIA_RGN_Stop failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("INNER_MEDIA_RGN_Stop failed with %#x!\n", s32Ret);
// } }
VIDEO_CREATE_VPSS_FAIL: VIDEO_CREATE_VPSS_FAIL:
s32Ret = INNER_HAPI_VPSS_Destory(&pstMediaAttr->stVpss); s32Ret = INNER_HAPI_VPSS_Destory(&pstMediaAttr->stVpss);
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
...@@ -2147,6 +2153,12 @@ SA_S32 SA_INNER_MEDIA_VIDEO_Stop(SA_MEDIA_ATTR_S *pstMediaAttr) ...@@ -2147,6 +2153,12 @@ SA_S32 SA_INNER_MEDIA_VIDEO_Stop(SA_MEDIA_ATTR_S *pstMediaAttr)
// goto VIDEO_STOP_FAIL; // goto VIDEO_STOP_FAIL;
// } // }
s32Ret = INNER_MEDIA_RGN_Stop(&pstMediaAttr->stRgn);
if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("INNER_MEDIA_RGN_Stop failed with %#x!\n", s32Ret);
goto VIDEO_STOP_FAIL;
}
s32Ret = INNER_HAPI_VPSS_Stop(&pstMediaAttr->stVpss); s32Ret = INNER_HAPI_VPSS_Stop(&pstMediaAttr->stVpss);
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("INNER_HAPI_VPSS_Stop failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("INNER_HAPI_VPSS_Stop failed with %#x!\n", s32Ret);
...@@ -2159,12 +2171,6 @@ SA_S32 SA_INNER_MEDIA_VIDEO_Stop(SA_MEDIA_ATTR_S *pstMediaAttr) ...@@ -2159,12 +2171,6 @@ SA_S32 SA_INNER_MEDIA_VIDEO_Stop(SA_MEDIA_ATTR_S *pstMediaAttr)
goto VIDEO_STOP_FAIL; goto VIDEO_STOP_FAIL;
} }
// s32Ret = SA_INNER_MEDIA_RGN_Stop(pstRgnAttr);
// if (SA_SUCCESS != s32Ret) {
// HAPI_MEDIA_LOG_E("SA_INNER_MEDIA_RGN_Stop failed with %#x!\n", s32Ret);
// goto VIDEO_STOP_FAIL;
// }
s32Ret = INNER_HAPI_VPSS_Destory(&pstMediaAttr->stVpss); s32Ret = INNER_HAPI_VPSS_Destory(&pstMediaAttr->stVpss);
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("INNER_HAPI_VPSS_Destory failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("INNER_HAPI_VPSS_Destory failed with %#x!\n", s32Ret);
......
...@@ -111,4 +111,5 @@ SA_S32 SA_INNER_HAPI_SD_ProcDeinit(SA_U32 u32IspPipe);//debug ...@@ -111,4 +111,5 @@ SA_S32 SA_INNER_HAPI_SD_ProcDeinit(SA_U32 u32IspPipe);//debug
SA_S32 SA_INNER_HAPI_SD_FaceDetected(SA_U32 u32IspPipe, SA_U32 u32Detected); SA_S32 SA_INNER_HAPI_SD_FaceDetected(SA_U32 u32IspPipe, SA_U32 u32Detected);
SA_S32 SA_INNER_HAPI_IspSceneIntTimeMax(SA_U32 u32IspPipe, SA_U32 u32IntTimeMax); SA_S32 SA_INNER_HAPI_IspSceneIntTimeMax(SA_U32 u32IspPipe, SA_U32 u32IntTimeMax);
SA_S32 SA_INNER_HAPI_SD_GetSnsInfo(SA_U32 u32IspPipe, SA_U32 u32SnsType, SA_U32 u32SnsId); SA_S32 SA_INNER_HAPI_SD_GetSnsInfo(SA_U32 u32IspPipe, SA_U32 u32SnsType, SA_U32 u32SnsId);
SA_S32 SA_INNER_HAPI_SD_GetInfo(SA_U32 u32IspPipe, SA_ISPSCENE_INFO_S *pstInfo);
#endif #endif
\ No newline at end of file
...@@ -3602,6 +3602,35 @@ SA_S32 SA_INNER_HAPI_SD_ProcDeinit(SA_U32 u32IspPipe) ...@@ -3602,6 +3602,35 @@ SA_S32 SA_INNER_HAPI_SD_ProcDeinit(SA_U32 u32IspPipe)
return 0; return 0;
} }
SA_S32 SA_INNER_HAPI_SD_GetInfo(SA_U32 u32IspPipe, SA_ISPSCENE_INFO_S *pstInfo)
{
HAPI_ISPSCENE_CHECK_ISPPIPE(u32IspPipe);
HAPI_ISPSCENE_CHECK_PTR(pstInfo);
SA_S32 s32Ret = SA_SUCCESS;
AE_EXP_INFO_S stAeInfo = {0};
AWB_WB_INFO_S stAwbInfo = {0};
SA_MAPI_ISP_GetExposureInfo(u32IspPipe, &stAeInfo);
SA_MAPI_ISP_QueryWBInfo(u32IspPipe, &stAwbInfo);
pstInfo->u32IntTime = stAeInfo.au32ExpTime[0];
pstInfo->u32Iso = stAeInfo.au32ISO[0];
pstInfo->u32AeTarget = stAeInfo.u16CurrAeTarget;
pstInfo->u32Curluma = stAeInfo.s32CurrEffY;
pstInfo->s32RealBv = stAeInfo.s32RealBv;
pstInfo->u32ExpRatio = stAeInfo.u32RefExpRatio;
pstInfo->u32FrameId = stAeInfo.u32FrameId;
pstInfo->u32Ct = stAwbInfo.u16ColorTemp;
pstInfo->au32WbGain[0] = stAwbInfo.u16Rgain;
pstInfo->au32WbGain[1] = stAwbInfo.u16Grgain;
pstInfo->au32WbGain[2] = stAwbInfo.u16Gbgain;
pstInfo->au32WbGain[3] = stAwbInfo.u16Bgain;
pstInfo->u32SceneType = g_preIspBinPath[u32IspPipe];
pstInfo->enIrcut = g_curIcrStatus[u32IspPipe];
pstInfo->u32IrLampFrq = g_led_frqs[u32IspPipe][LAMP_IR];
pstInfo->u32WhiteLampFrq = g_led_frqs[u32IspPipe][LAMP_WL];
return s32Ret;
}
#ifdef __cplusplus #ifdef __cplusplus
#if __cplusplus #if __cplusplus
} }
......
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -189,10 +189,8 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = { ...@@ -189,10 +189,8 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = {
}, },
.astrIspFile = { .astrIspFile = {
"/acme/conf/681/imx681_video_Color_Outdoor.bin", "/acme/conf/681/imx681_video_Color_Outdoor.bin",
"/acme/conf/681/imx681_video_Color_Outdoor_diff.bin",
"/acme/conf/681/imx681_video_Color_Indoor_diff.bin", "/acme/conf/681/imx681_video_Color_Indoor_diff.bin",
"/acme/conf/681/imx681_video_Color_Outdoor_diff.bin", "","","",
"","","","","",
"/acme/conf/681/imx681_video_Color_Blc_diff.bin" "/acme/conf/681/imx681_video_Color_Blc_diff.bin"
}, },
.astrAinrFile = {"/acme/conf/681/imx681_v01_001_800_rtl.bin",}, .astrAinrFile = {"/acme/conf/681/imx681_v01_001_800_rtl.bin",},
...@@ -448,7 +446,7 @@ static void SAMPLE_MEDIA_Help(char* sAppName) ...@@ -448,7 +446,7 @@ static void SAMPLE_MEDIA_Help(char* sAppName)
HAPI_MEDIA_LOG_I("-c [capture] capture frames num\n"); HAPI_MEDIA_LOG_I("-c [capture] capture frames num\n");
HAPI_MEDIA_LOG_I("-r [record] record duration\n"); HAPI_MEDIA_LOG_I("-r [record] record duration\n");
HAPI_MEDIA_LOG_I("-d [drop frames]\n"); HAPI_MEDIA_LOG_I("-d [drop frames]\n");
HAPI_MEDIA_LOG_I("-g [rtsp]\n"); HAPI_MEDIA_LOG_I("-g [rtsp&dump&tunning]\n");
HAPI_MEDIA_LOG_I("-j [load json]\n"); HAPI_MEDIA_LOG_I("-j [load json]\n");
} }
...@@ -882,7 +880,7 @@ SA_VOID SAMPLE_MEDIA_VencProc(SA_VOID *p) ...@@ -882,7 +880,7 @@ SA_VOID SAMPLE_MEDIA_VencProc(SA_VOID *p)
s32OffsetChn = 0; s32OffsetChn = 0;
} }
s32Ret = RTSP_SendFrame(s32OffsetChn, pstPack->pu8Addr, pstPack->u32Len, pstPack->u64PTS / 1000); s32Ret = RTSP_SendFrame(pstVencChnAttr->u32ChnId * MAX_ENCODE_CHANNEL + s32OffsetChn, pstPack->pu8Addr, pstPack->u32Len, pstPack->u64PTS / 1000);
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_W("RTSP_SendFrame failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_W("RTSP_SendFrame failed with %#x!\n", s32Ret);
break; break;
...@@ -1047,7 +1045,10 @@ void SAMPLE_MEDIA_Work(void *p) ...@@ -1047,7 +1045,10 @@ void SAMPLE_MEDIA_Work(void *p)
g_stViSize.u32Width = stMediaAttr.stVin.stViAttr.stViPipeAttr.u32Width; g_stViSize.u32Width = stMediaAttr.stVin.stViAttr.stViPipeAttr.u32Width;
g_stViSize.u32Height = stMediaAttr.stVin.stViAttr.stViPipeAttr.u32Height; g_stViSize.u32Height = stMediaAttr.stVin.stViAttr.stViPipeAttr.u32Height;
CAPTURE_SERVER_Init(g_stViSize); CAPTURE_SERVER_Init(g_stViSize);
COMM_Register_Dump(SA_HAPI_MEDIA_StartDump, SA_HAPI_MEDIA_StopDump,SA_HAPI_MEDIA_Capture); COMM_Register_Callback(COMM_CALLBACK_START_DUMP, SA_HAPI_MEDIA_StartDump);
COMM_Register_Callback(COMM_CALLBACK_STOP_DUMP, SA_HAPI_MEDIA_StopDump);
COMM_Register_Callback(COMM_CALLBACK_CAPTURE, SA_HAPI_MEDIA_Capture);
COMM_Register_Callback(COMM_CALLBACK_SD_DYNATTR, SA_HAPI_MEDIA_SdDynCtrAttr);
} }
} }
......
...@@ -1218,7 +1218,8 @@ int streamer_ipc(int argc,char **argv) ...@@ -1218,7 +1218,8 @@ int streamer_ipc(int argc,char **argv)
if (SA_TRUE == pstSceneEntry->bVideoEnable) { if (SA_TRUE == pstSceneEntry->bVideoEnable) {
CAPTURE_SERVER_Init(g_stViSize); CAPTURE_SERVER_Init(g_stViSize);
COMM_Register_Dump(SA_HAPI_VIDEO_StartDump, SA_HAPI_VIDEO_StopDump, SA_NULL); COMM_Register_Callback(COMM_CALLBACK_START_DUMP, SA_HAPI_VIDEO_StartDump);
COMM_Register_Callback(COMM_CALLBACK_STOP_DUMP, SA_HAPI_VIDEO_StopDump);
} }
g_bHapiRun = SA_TRUE; g_bHapiRun = SA_TRUE;
......
...@@ -82,8 +82,8 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = { ...@@ -82,8 +82,8 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = {
.enSensorType = SA_MEDIA_SNS_TYPE_IMX681, .enSensorType = SA_MEDIA_SNS_TYPE_IMX681,
.enSensorMode = SA_MEDIA_SNS_MODE_LINEAR, .enSensorMode = SA_MEDIA_SNS_MODE_LINEAR,
.s32ViDev = 0, .s32ViDev = 0,
.f32MaxFps = 15.0, .f32MaxFps = 10.0,
.f32MinFps = 5.0, .f32MinFps = 10.0,
.bMirror = 0, .bMirror = 0,
.bFlip = 0, .bFlip = 0,
.enRotation = VI_GDC_ROTATE_0, .enRotation = VI_GDC_ROTATE_0,
...@@ -137,13 +137,13 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = { ...@@ -137,13 +137,13 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = {
}, },
{ {
.enEncodeType = VENC_ENCODE_TYPE_H265, .enEncodeType = VENC_ENCODE_TYPE_H265,
.u8Qfactor = 80, .u8Qfactor = 10,
.stResolution = { .stResolution = {
.u32Width = 1920, .u32Width = 1280,
.u32Height = 1080 .u32Height = 720
}, },
.enRcMode = VENC_RC_MODE_CBR, .enRcMode = VENC_RC_MODE_CBR,
.u32Bitrate = 2048000, .u32Bitrate = 128000,
.astRegion = { .astRegion = {
{ {
.bEnable = SA_FALSE, .bEnable = SA_FALSE,
...@@ -169,8 +169,8 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = { ...@@ -169,8 +169,8 @@ static SA_MEDIA_CONFIG_S g_stMediaCfg = {
.u32RgbColor = { 0xFFFFFF, 0x5E2BD2, 0xFF8445 } .u32RgbColor = { 0xFFFFFF, 0x5E2BD2, 0xFF8445 }
} }
}, },
.enSmartEncoder = SA_MEDIA_SMART_ENCODER_ROI, .enSmartEncoder = SA_MEDIA_SMART_ENCODER_NONE,
.bSmartSEI = SA_TRUE .bSmartSEI = SA_FALSE
} }
}, },
.stSdConfig = { .stSdConfig = {
...@@ -603,6 +603,7 @@ static void printHex(const unsigned char *data, size_t length) { ...@@ -603,6 +603,7 @@ static void printHex(const unsigned char *data, size_t length) {
static SA_S32 rpc_media_spi_getstream(SA_MEDIA_ATTR_S *pstMediaAttr, VENC_STREAM_S *pstStream, SA_S32 rpmsg_fd, SA_MEDIA_SCENE_E stScene, SA_S32 fdStream) { static SA_S32 rpc_media_spi_getstream(SA_MEDIA_ATTR_S *pstMediaAttr, VENC_STREAM_S *pstStream, SA_S32 rpmsg_fd, SA_MEDIA_SCENE_E stScene, SA_S32 fdStream) {
SA_S32 s32Ret = SA_SUCCESS; SA_S32 s32Ret = SA_SUCCESS;
SA_U32 u32ChnId; SA_U32 u32ChnId;
SA_U64 u64Pts;
if (!pstStream) if (!pstStream)
return -1; return -1;
...@@ -621,24 +622,34 @@ static SA_S32 rpc_media_spi_getstream(SA_MEDIA_ATTR_S *pstMediaAttr, VENC_STREAM ...@@ -621,24 +622,34 @@ static SA_S32 rpc_media_spi_getstream(SA_MEDIA_ATTR_S *pstMediaAttr, VENC_STREAM
for (SA_U32 u32Index = 0; u32Index < pstStream->u32PackCount; u32Index++) { for (SA_U32 u32Index = 0; u32Index < pstStream->u32PackCount; u32Index++) {
VENC_PACK_S *pstPack = &pstStream->pstPack[u32Index]; VENC_PACK_S *pstPack = &pstStream->pstPack[u32Index];
printf("=====get packet %d, %llu, %d, total %d\n", pstStream->u32Seq, pstPack->u64PTS, pstPack->u32Len, 12 + pstPack->u32Len);
if (SA_NULL != pstPack->pu8Addr && pstPack->u32Len > 0) { if (SA_NULL != pstPack->pu8Addr && pstPack->u32Len > 0) {
if (fdStream != -1) { // if (fdStream != -1) {
s32Ret = write(fdStream, pstPack->pu8Addr, pstPack->u32Len); // s32Ret = write(fdStream, pstPack->pu8Addr, pstPack->u32Len);
if (s32Ret < 0) { // if (s32Ret < 0) {
HAPI_MEDIA_LOG_E("%s: write record file fail.\n", __func__); // HAPI_MEDIA_LOG_E("%s: write record file fail.\n", __func__);
return -1; // return -1;
// }
// }
if (rpmsg_fd != -1) {
static unsigned char* tmp = NULL;
if (tmp == NULL)
{
tmp = malloc(1024 * 1024);
} }
} memcpy(tmp, &(pstStream->u32Seq), 4);
memcpy(tmp + 4, &(pstPack->u64PTS), 8);
if (rpmsg_fd != -1) { memcpy(tmp + 12, pstPack->pu8Addr, pstPack->u32Len);
rpc_media_cmd_t cmd_data = {0}; rpc_media_cmd_t cmd_data = {0};
int pack_len = pstPack->u32Len; int pack_len = 12 + pstPack->u32Len;
int cmd_len = sizeof(rpc_media_cmd_t); int cmd_len = sizeof(rpc_media_cmd_t);
int max_send_len = 12*1024 - 16 - cmd_len - 32; int max_send_len = 10 * 1024;
int send_data_len; unsigned int send_data_len;
int next_data_size = 0; int next_data_size = 0;
void *buf = (void *)HAPI_MEDIA_MALLOC(12*1024); void *buf = (void *)HAPI_MEDIA_MALLOC(12*1024);
unsigned char *pack_buf = pstPack->pu8Addr; unsigned char *pack_buf = tmp;
while (pack_len) { while (pack_len) {
if (pack_len > max_send_len) { if (pack_len > max_send_len) {
...@@ -653,10 +664,11 @@ static SA_S32 rpc_media_spi_getstream(SA_MEDIA_ATTR_S *pstMediaAttr, VENC_STREAM ...@@ -653,10 +664,11 @@ static SA_S32 rpc_media_spi_getstream(SA_MEDIA_ATTR_S *pstMediaAttr, VENC_STREAM
cmd_data.pack_info.total_size = pack_len; cmd_data.pack_info.total_size = pack_len;
cmd_data.pack_info.next_data_size = next_data_size; cmd_data.pack_info.next_data_size = next_data_size;
memcpy(buf, &cmd_data, cmd_len); memcpy(buf, &cmd_data, cmd_len);
memcpy(buf + cmd_len, pack_buf, send_data_len); memcpy(buf + cmd_len, &send_data_len, 4);
HAPI_MEDIA_LOG_I("%s, %d: send_data_len = %d, pack_len = %d.\n", __func__, __LINE__, send_data_len, pack_len); memcpy(buf + cmd_len + 4, pack_buf, send_data_len);
printHex(pack_buf, 64); HAPI_MEDIA_LOG_I("%s, %d: cmd_len %d, send_data_len = %d, pack_len = %d.\n", __func__, __LINE__, cmd_len, send_data_len, pack_len);
s32Ret = write(rpmsg_fd, buf, send_data_len + cmd_len); printHex(pack_buf, 32);
s32Ret = write(rpmsg_fd, buf, send_data_len + cmd_len + 4);
if (s32Ret < 0) { if (s32Ret < 0) {
HAPI_MEDIA_LOG_E("%s: write record file fail.\n", __func__); HAPI_MEDIA_LOG_E("%s: write record file fail.\n", __func__);
HAPI_MEDIA_FREE(buf); HAPI_MEDIA_FREE(buf);
...@@ -736,6 +748,8 @@ static void media_init(SA_MEDIA_SCENE_E stScene) ...@@ -736,6 +748,8 @@ static void media_init(SA_MEDIA_SCENE_E stScene)
} }
g_stMediaAttr.stVin.stIspAttr.s8DropFramesNum = g_s8DropFrame; g_stMediaAttr.stVin.stIspAttr.s8DropFramesNum = g_s8DropFrame;
g_stMediaAttr.stVenc.astChannel[1].stChnAttr.stGopAttr.stDefaultGop.u16GopLen = 20;
g_stMediaAttr.stVenc.astChannel[1].stChnAttr.stGopAttr.stDefaultGop.u16FreqIDR = 20;
s32Ret = SA_HAPI_MEDIA_Start(&g_stMediaAttr); s32Ret = SA_HAPI_MEDIA_Start(&g_stMediaAttr);
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("SA_HAPI_MEDIA_Start failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("SA_HAPI_MEDIA_Start failed with %#x!\n", s32Ret);
...@@ -976,6 +990,8 @@ re_read: ...@@ -976,6 +990,8 @@ re_read:
g_enSampleScene = SA_MEDIA_SCENE_RECORD; g_enSampleScene = SA_MEDIA_SCENE_RECORD;
else else
g_enSampleScene = SA_MEDIA_SCENE_CAPTURE; g_enSampleScene = SA_MEDIA_SCENE_CAPTURE;
g_enSampleScene = SA_MEDIA_SCENE_RECORD;
s32Ret = SA_HAPI_SYS_Init(); s32Ret = SA_HAPI_SYS_Init();
if (SA_SUCCESS != s32Ret) { if (SA_SUCCESS != s32Ret) {
HAPI_MEDIA_LOG_E("SA_HAPI_SYS_Init failed with %#x!\n", s32Ret); HAPI_MEDIA_LOG_E("SA_HAPI_SYS_Init failed with %#x!\n", s32Ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment