Skip to content

Commit d95d555

Browse files
committed
Better handling of ISP dependencies between different hisi-v4(a) platforms
1 parent 194a254 commit d95d555

File tree

3 files changed

+23
-25
lines changed

3 files changed

+23
-25
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ In spite of these design choices, Divinus boasts numerous features that cater to
4141
| infinity6e[^15] | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
4242
| infinity6c[^16] | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
4343
| mercury6[^17] | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
44+
| sun8iw21p1[^18] ||||||
4445

4546
_✔️ - supported, ↻ - in development, ✗ - unsupported, ⁿ/ₐ - not supported by hardware_
4647

@@ -61,8 +62,9 @@ _* At the moment, text, RGB or bitfield bitmaps and PNG overlays are handled, mo
6162
[^13]: SSC323, SSC325\(D/DE\) and SSC327\(D/DE/Q\)
6263
[^14]: SSC33\[3/5/7\]\(DE\)
6364
[^15]: SSC30K\[D/Q\], SSC336\[D/Q\], SSC338\[D/G/Q\] and SSC339G
64-
[^16]: SSC377\(D/DE/QE\) or SSC378\[DE/QE\]
65+
[^16]: SSC377\(D/DE/QE\) and SSC378\[DE/QE\]
6566
[^17]: SSC359G
67+
[^18]: V851S\(E\) and V853
6668

6769

6870
### Documentation

doc/config.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ This document describes the fields that can be found within a configuration file
7878

7979
## MP4 section
8080

81-
- **enable**: Boolean to activate or deactivate MP4 encoding.
81+
- **enable**: Boolean to activate MP4 output (required by live streams and RTSP).
8282
- **codec**: Codec used for encoding (H.264 or H.265).
8383
- **mode**: Encoding mode.
8484
- **width**: Video width in pixels.
@@ -104,14 +104,14 @@ This document describes the fields that can be found within a configuration file
104104

105105
## JPEG section
106106

107-
- **enable**: Boolean to activate or deactivate JPEG encoding.
107+
- **enable**: Boolean to activate JPEG output.
108108
- **width**: Image width in pixels.
109109
- **height**: Image height in pixels.
110110
- **qfactor**: JPEG compression quality factor.
111111

112112
## MJPEG section
113113

114-
- **enable**: Boolean to activate or deactivate MJPEG encoding.
114+
- **enable**: Boolean to activate MJPEG output.
115115
- **mode**: Encoding mode.
116116
- **width**: Video width in pixels.
117117
- **height**: Video height in pixels.
@@ -120,8 +120,8 @@ This document describes the fields that can be found within a configuration file
120120

121121
## HTTP POST section
122122

123-
- **enable**: Boolean to activate or deactivate HTTP POST requests.
124-
- **host**: Host for HTTP POST requests.
123+
- **enable**: Boolean to activate HTTP POST snapshots.
124+
- **host**: Hostname for HTTP POST requests.
125125
- **url**: URL for HTTP POST requests.
126126
- **login**: Login for HTTP POST authentication.
127127
- **password**: Password for HTTP POST authentication.

src/hal/hisi/v4_isp.h

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ typedef struct {
4949
} v4_isp_impl;
5050

5151
static int v4_isp_load(v4_isp_impl *isp_lib) {
52-
if ((isp_lib->handleCalcFlick = dlopen("lib_hicalcflicker.so", RTLD_LAZY | RTLD_GLOBAL)) &&
53-
(isp_lib->handle = dlopen("libisp.so", RTLD_LAZY | RTLD_GLOBAL)) &&
52+
isp_lib->handleCalcFlick = dlopen("lib_hicalcflicker.so", RTLD_LAZY | RTLD_GLOBAL);
53+
54+
if ((isp_lib->handle = dlopen("libisp.so", RTLD_LAZY | RTLD_GLOBAL)) &&
5455
(isp_lib->handleAe = dlopen("lib_hiae.so", RTLD_LAZY | RTLD_GLOBAL)) &&
5556
(isp_lib->handleAwb = dlopen("lib_hiawb.so", RTLD_LAZY | RTLD_GLOBAL)) &&
5657
(isp_lib->handleIrAuto = dlopen("lib_hiir_auto.so", RTLD_LAZY | RTLD_GLOBAL)) &&
5758
(isp_lib->handleLdci = dlopen("lib_hildci.so", RTLD_LAZY | RTLD_GLOBAL)) &&
5859
(isp_lib->handleDehaze = dlopen("lib_hidehaze.so", RTLD_LAZY | RTLD_GLOBAL)) &&
59-
(isp_lib->handleDrc = dlopen("lib_hidrc.so", RTLD_LAZY | RTLD_GLOBAL)) &&
60-
(isp_lib->handleAcs = dlopen("lib_hiacs.so", RTLD_LAZY | RTLD_GLOBAL)))
60+
(isp_lib->handleDrc = dlopen("lib_hidrc.so", RTLD_LAZY | RTLD_GLOBAL)))
6161
goto loaded;
6262

6363
if ((isp_lib->handleGoke = dlopen("libgk_isp.so", RTLD_LAZY | RTLD_GLOBAL)) &&
@@ -75,30 +75,26 @@ static int v4_isp_load(v4_isp_impl *isp_lib) {
7575
HAL_ERROR("v4_isp", "Failed to load library!\nError: %s\n", dlerror());
7676

7777
loaded:
78+
isp_lib->handleAcs = dlopen("lib_hiacs.so", RTLD_LAZY | RTLD_GLOBAL);
79+
7880
if (!isp_lib->handleGoke) {
79-
if (!(fnIsp_Malloc = (void*(*)(unsigned long))
80-
hal_symbol_load("v4_isp", isp_lib->handle, "isp_malloc")))
81-
return EXIT_FAILURE;
81+
hal_symbol_load("v4_isp", isp_lib->handle, "isp_malloc");
8282

8383
if (!(fnISP_AlgRegisterAcs = (int(*)(int))
8484
hal_symbol_load("v4_isp", isp_lib->handleAcs, "isp_alg_register_acs")))
8585
return EXIT_FAILURE;
8686

87-
if (!(fnISP_AlgRegisterDehaze = (int(*)(int))
88-
hal_symbol_load("v4_isp", isp_lib->handleDehaze, "isp_alg_register_dehaze")))
89-
return EXIT_FAILURE;
87+
if (!(fnISP_AlgRegisterDehaze = (int(*)(int))hal_symbol_load("v4_isp", isp_lib->handleDehaze, "ISP_AlgRegisterDehaze")))
88+
fnISP_AlgRegisterDehaze = (int(*)(int))hal_symbol_load("v4_isp", isp_lib->handleDehaze, "isp_alg_register_dehaze");
9089

91-
if (!(fnISP_AlgRegisterDrc = (int(*)(int))
92-
hal_symbol_load("v4_isp", isp_lib->handleDrc, "isp_alg_register_drc")))
93-
return EXIT_FAILURE;
90+
if (!(fnISP_AlgRegisterDrc = (int(*)(int))hal_symbol_load("v4_isp", isp_lib->handleDrc, "ISP_AlgRegisterDrc")))
91+
fnISP_AlgRegisterDrc = (int(*)(int))hal_symbol_load("v4_isp", isp_lib->handleDrc, "isp_alg_register_drc");
9492

95-
if (!(fnISP_AlgRegisterLdci = (int(*)(int))
96-
hal_symbol_load("v4_isp", isp_lib->handleLdci, "isp_alg_register_ldci")))
97-
return EXIT_FAILURE;
93+
if (!(fnISP_AlgRegisterLdci = (int(*)(int))hal_symbol_load("v4_isp", isp_lib->handleLdci, "ISP_AlgRegisterLdci")))
94+
fnISP_AlgRegisterLdci = (int(*)(int))hal_symbol_load("v4_isp", isp_lib->handleLdci, "isp_alg_register_ldci");
9895

99-
if (!(fnMPI_ISP_IrAutoRunOnce = (int(*)(int, void*))
100-
hal_symbol_load("v4_isp", isp_lib->handleIrAuto, "isp_ir_auto_run_once")))
101-
return EXIT_FAILURE;
96+
if (!(fnMPI_ISP_IrAutoRunOnce = (int(*)(int, void*))hal_symbol_load("v4_isp", isp_lib->handleIrAuto, "HI_MPI_ISP_IrAutoRunOnce")))
97+
fnMPI_ISP_IrAutoRunOnce = (int(*)(int, void*))hal_symbol_load("v4_isp", isp_lib->handleIrAuto, "isp_ir_auto_run_once");
10298
} else {
10399
if (!(fnISP_AlgRegisterDehaze = (int(*)(int))
104100
hal_symbol_load("v4_isp", isp_lib->handleDehaze, "ISP_AlgRegisterDehaze")))

0 commit comments

Comments
 (0)