Skip to content

Commit ddbbedb

Browse files
committed
Merge branch 'fix/add_tline_info_in_cam_drivers' into 'master'
fix: add tline in cam drivers Closes AEG-2706 See merge request espressif/esp-video-components!319
2 parents 5c451a3 + 5d9ba9d commit ddbbedb

File tree

5 files changed

+54
-29
lines changed

5 files changed

+54
-29
lines changed

esp_cam_sensor/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- Added line exposure time info in camera drivers.
6+
37
## 1.3.0
48
- Changed YUV422 sequence for SC030IOT, SC101IOT, GC0308, and BF3A03 sensors to depend on CONFIG_CAMERA_SENSOR_SWAP_PIXEL_BYTE_ORDER
59
- Fixed OV2640 JPEG compression quality calculation issue.

esp_cam_sensor/include/esp_cam_sensor_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ typedef struct {
318318
int vts; /*!< VTS = V_Size + V_Blank, also known as vmax */
319319
uint32_t exp_def; /*!< Exposure default */
320320
uint32_t gain_def; /*!< Gain default */
321+
uint32_t tline_ns; /*!< One line exposure time in ns */
321322
esp_cam_sensor_bayer_pattern_t bayer_type;
322323
} esp_cam_sensor_isp_info_v1_t;
323324

esp_cam_sensor/sensors/sc035hgs/sc035hgs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ static const esp_cam_sensor_isp_info_t sc035hgs_isp_info_mipi[] = {
261261
.pclk = 50056704,
262262
.vts = 0x394,
263263
.hts = 0x470,
264+
.tline_ns = 1421,
264265
.gain_def = 0,
265266
.exp_def = 0x18f,
266267
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
@@ -272,6 +273,7 @@ static const esp_cam_sensor_isp_info_t sc035hgs_isp_info_mipi[] = {
272273
.pclk = 45000000,
273274
.vts = 0x210,
274275
.hts = 0x554,
276+
.tline_ns = 986,
275277
.gain_def = 0,
276278
.exp_def = 0x18f,
277279
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
@@ -283,6 +285,7 @@ static const esp_cam_sensor_isp_info_t sc035hgs_isp_info_mipi[] = {
283285
.pclk = 72000000,
284286
.vts = 0x4f3,
285287
.hts = 0x470,
288+
.tline_ns = 986,
286289
.gain_def = 0,
287290
.exp_def = 0x18f,
288291
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
@@ -294,6 +297,7 @@ static const esp_cam_sensor_isp_info_t sc035hgs_isp_info_mipi[] = {
294297
.pclk = 72000000,
295298
.vts = 0x27a,
296299
.hts = 0x470,
300+
.tline_ns = 986,
297301
.gain_def = 0,
298302
.exp_def = 0x18f,
299303
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,

esp_cam_sensor/sensors/sc202cs/sc202cs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,7 @@ static const esp_cam_sensor_isp_info_t sc202cs_isp_info[] = {
874874
.pclk = 72000000,
875875
.vts = 1250,
876876
.hts = 1920,
877+
.tline_ns = 26666,
877878
.gain_def = 0, // gain index, depend on {0x3e06, 0x3e07, 0x3e09}, since these registers are not set in format reg_list, the default values ​​are used here.
878879
.exp_def = 0x4dc, // depend on {0x3e00, 0x3e01, 0x3e02}, see format_reg_list to get the default value.
879880
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
@@ -885,6 +886,7 @@ static const esp_cam_sensor_isp_info_t sc202cs_isp_info[] = {
885886
.pclk = 72000000,
886887
.vts = 1250,
887888
.hts = 1920,
889+
.tline_ns = 26666,
888890
.gain_def = 0, // gain index, depend on {0x3e06, 0x3e07, 0x3e09}, since these registers are not set in format reg_list, the default values ​​are used here.
889891
.exp_def = 0x4dc, // depend on {0x3e00, 0x3e01, 0x3e02}, see format_reg_list to get the default value.
890892
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
@@ -896,6 +898,7 @@ static const esp_cam_sensor_isp_info_t sc202cs_isp_info[] = {
896898
.pclk = 72000000,
897899
.vts = 1250,
898900
.hts = 1920,
901+
.tline_ns = 26666,
899902
.gain_def = 0, // gain index, depend on {0x3e06, 0x3e07, 0x3e09}, since these registers are not set in format reg_list, the default values ​​are used here.
900903
.exp_def = 0x4dc, // depend on {0x3e00, 0x3e01, 0x3e02}, see format_reg_list to get the default value.
901904
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
@@ -907,6 +910,7 @@ static const esp_cam_sensor_isp_info_t sc202cs_isp_info[] = {
907910
.pclk = 72000000,
908911
.vts = 1250,
909912
.hts = 1920,
913+
.tline_ns = 26666,
910914
.gain_def = 0, // gain index, depend on {0x3e06, 0x3e07, 0x3e09}, since these registers are not set in format reg_list, the default values ​​are used here.
911915
.exp_def = 0x4dc, // depend on {0x3e00, 0x3e01, 0x3e02}, see format_reg_list to get the default value.
912916
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,

esp_cam_sensor/sensors/sc2336/sc2336.c

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -956,132 +956,144 @@ static const sc2336_gain_t sc2336_gain_map[] = {
956956
static const esp_cam_sensor_isp_info_t sc2336_isp_info_mipi[] = {
957957
/* For MIPI */
958958
{
959-
.isp_v1_info = {
959+
.isp_v1_info = { //0
960960
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
961961
.pclk = 81000000,
962-
.vts = 1500,
962+
.vts = 1500, // 0x05dc
963963
.hts = 1800,
964+
.tline_ns = 22222,
964965
.gain_def = 0, // gain index, depend on {0x3e06, 0x3e07, 0x3e09}, since these registers are not set in format reg_list, the default values ​​are used here.
965966
.exp_def = 0x5d6, // depend on {0x3e00, 0x3e01, 0x3e02}, see format_reg_list to get the default value.
966967
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
967968
}
968969
},
969970
{
970-
.isp_v1_info = {
971+
.isp_v1_info = { //1
971972
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
972973
.pclk = 81000000,
973-
.vts = 1800,
974-
.hts = 900,
974+
.vts = 900, //0x0384
975+
.hts = 1800,
976+
.tline_ns = 22222,
975977
.gain_def = 0,
976978
.exp_def = 0x37e,
977979
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
978980
},
979981
},
980982
{
981-
.isp_v1_info = {
983+
.isp_v1_info = { //2
982984
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
983985
.pclk = 81000000,
984-
.vts = 1800,
985-
.hts = 750,
986+
.vts = 750, //0x02ee
987+
.hts = 1800,
988+
.tline_ns = 22222,
986989
.gain_def = 0,
987990
.exp_def = 0x2e8,
988991
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
989992
},
990993
},
991994
{
992-
.isp_v1_info = {
995+
.isp_v1_info = { //3
993996
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
994997
.pclk = 81000000,
995-
.vts = 1125,
996-
.hts = 1200,
998+
.vts = 1200, //0x04b0
999+
.hts = 1125,
1000+
.tline_ns = 33333,
9971001
.gain_def = 0,
9981002
.exp_def = 0x4af,
9991003
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10001004
},
10011005
},
10021006
{
1003-
.isp_v1_info = {
1007+
.isp_v1_info = { //4
10041008
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10051009
.pclk = 66000000,
1006-
.vts = 2250,
1007-
.hts = 1200,
1010+
.vts = 1200, //0x04b0
1011+
.hts = 2250,
1012+
.tline_ns = 33333,
10081013
.gain_def = 0,
10091014
.exp_def = 0x4af,
10101015
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10111016
},
10121017
},
10131018
{
1014-
.isp_v1_info = {
1019+
.isp_v1_info = { //5
10151020
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10161021
.pclk = 81000000,
1017-
.vts = 2250,
1018-
.hts = 1200,
1022+
.vts = 1200, //0x04b0
1023+
.hts = 2250,
1024+
.tline_ns = 27777,
10191025
.gain_def = 0,
10201026
.exp_def = 0x4aa,
10211027
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10221028
},
10231029
},
10241030
{
1025-
.isp_v1_info = {
1031+
.isp_v1_info = { //6
10261032
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10271033
.pclk = 49500000,
1028-
.vts = 2200,
1034+
.vts = 1000, //0x03e8
10291035
.hts = 750,
1036+
.tline_ns = 33333,
10301037
.gain_def = 0,
10311038
.exp_def = 0x3e2,
10321039
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10331040
}
10341041
},
10351042
{
1036-
.isp_v1_info = {
1043+
.isp_v1_info = { //7
10371044
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10381045
.pclk = 67200000,
1039-
.vts = 1000,
1046+
.vts = 1250, //0x04e2
10401047
.hts = 2240,
1048+
.tline_ns = 16000,
10411049
.gain_def = 0,
10421050
.exp_def = 0x207,
10431051
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10441052
}
10451053
},
10461054
{
1047-
.isp_v1_info = {
1055+
.isp_v1_info = { //8
10481056
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10491057
.pclk = 84000000,
1050-
.vts = 1250,
1058+
.vts = 1250, //0x04e2
10511059
.hts = 2240,
1060+
.tline_ns = 26666,
10521061
.gain_def = 0,
10531062
.exp_def = 0x4dc,
10541063
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10551064
}
10561065
},
10571066
{
1058-
.isp_v1_info = {
1067+
.isp_v1_info = { //9
10591068
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10601069
.pclk = 84000000,
1061-
.vts = 1250,
1070+
.vts = 1250, //0x04e2
10621071
.hts = 2240,
1072+
.tline_ns = 26666,
10631073
.gain_def = 0,
10641074
.exp_def = 0x4dc,
10651075
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10661076
}
10671077
},
10681078
{
1069-
.isp_v1_info = {
1079+
.isp_v1_info = { //10
10701080
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10711081
.pclk = 84000000,
1072-
.vts = 1250,
1082+
.vts = 1250, //0x04e2
10731083
.hts = 2240,
1084+
.tline_ns = 26666,
10741085
.gain_def = 0,
10751086
.exp_def = 0x4dc,
10761087
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,
10771088
}
10781089
},
10791090
{
1080-
.isp_v1_info = {
1091+
.isp_v1_info = { //11
10811092
.version = SENSOR_ISP_INFO_VERSION_DEFAULT,
10821093
.pclk = 84000000,
1083-
.vts = 1000,
1094+
.vts = 1000, //0x03e8
10841095
.hts = 2400,
1096+
.tline_ns = 33333,
10851097
.gain_def = 0,
10861098
.exp_def = 0x3e2,
10871099
.bayer_type = ESP_CAM_SENSOR_BAYER_BGGR,

0 commit comments

Comments
 (0)