├── osd ├── items │ ├── CMakeLists.txt │ └── horizon │ │ ├── horizon.h │ │ └── CMakeLists.txt ├── ui │ ├── README.md │ ├── ui_events.h │ ├── components │ │ ├── ui_comp_hook.c │ │ ├── ui_comp_hook.h │ │ ├── ui_comp_itemimgtext.h │ │ ├── ui_comp_itemtexttext.h │ │ ├── ui_comp.h │ │ ├── ui_comp.c │ │ ├── ui_comp_itemimgtext.c │ │ └── ui_comp_itemtexttext.c │ ├── filelist.txt │ ├── CMakeLists.txt │ └── ui.h ├── osd.h ├── util.h ├── display_fbdev.h ├── CMakeLists.txt ├── queue.c ├── queue.h ├── mavlink_parser.h ├── osd.c └── util.c ├── .gitignore ├── sdk ├── gk7205v300 │ └── include │ │ ├── hi_adc.h │ │ ├── hi_isp_debug.h │ │ ├── hi_i2c.h │ │ ├── hi_spi.h │ │ ├── hi_ssp.h │ │ ├── hi_md.h │ │ ├── hi_comm_ai.h │ │ ├── hi_comm_ao.h │ │ ├── comm_ai.h │ │ ├── comm_ao.h │ │ ├── hi_math.h │ │ ├── acodec.h │ │ ├── hi_ive.h │ │ ├── hi_tde_type.h │ │ ├── hi_isp_bin.h │ │ ├── hi_comm_rc.h │ │ ├── hi_sns_ctrl.h │ │ ├── hi_af_comm.h │ │ ├── hi_errno.h │ │ ├── hi_awb_comm.h │ │ ├── hi_securec.h │ │ ├── af_comm.h │ │ ├── hi_comm_3a.h │ │ ├── hi_comm_sns.h │ │ ├── hi_ae_comm.h │ │ ├── hi_defines.h │ │ ├── hi_comm_snap.h │ │ ├── hi_comm_video.h │ │ ├── hi_buffer.h │ │ ├── ssp.h │ │ ├── aacdec.h │ │ ├── hi_types.h │ │ ├── vou_exp.h │ │ ├── gk_aacdec.h │ │ ├── gk_aacenc.h │ │ ├── ivs_qr.h │ │ ├── gk_ivs_qr.h │ │ ├── isp_bin.h │ │ ├── isp_debug.h │ │ ├── i2c.h │ │ ├── types.h │ │ ├── md.h │ │ ├── gk_resampler_api.h │ │ ├── gk_audio_bcd.h │ │ ├── hi_comm_vgs.h │ │ ├── hi_comm_sys.h │ │ ├── tde_errcode.h │ │ ├── hi_comm_vb.h │ │ ├── ivs_md.h │ │ ├── gk_ivs_md.h │ │ ├── adc.h │ │ ├── vqe_register_api.h │ │ ├── gk_vqe_register_api.h │ │ ├── hi_comm_dis.h │ │ ├── hi_comm_gdc.h │ │ ├── hi_audio_bcd.h │ │ ├── hi_common_qr.h │ │ ├── mpi_snap.h │ │ ├── aacenc.h │ │ ├── gk_api_snap.h │ │ ├── hi_vqe_register_api.h │ │ ├── hi_resampler_api.h │ │ ├── hi_comm_adec.h │ │ ├── hi_comm_aenc.h │ │ ├── hi_comm_venc.h │ │ ├── watchdog.h │ │ ├── audio_bcd.h │ │ ├── hi_comm_region.h │ │ ├── hicompat.h │ │ ├── mpi_region.h │ │ ├── common_qr.h │ │ ├── resampler_api.h │ │ ├── hi_tde_errcode.h │ │ ├── errcode.h │ │ ├── hi_mipi.h │ │ ├── gk_api_region.h │ │ ├── mpi_vb.h │ │ ├── spi.h │ │ ├── gk_api_vb.h │ │ ├── hi_comm_vpss.h │ │ ├── hi_comm_vi.h │ │ ├── gk_ivp.h │ │ ├── comm_snap.h │ │ ├── hi_debug.h │ │ ├── gk_api_vgs.h │ │ ├── mpi_vgs.h │ │ ├── hi_comm_aio.h │ │ ├── type.h │ │ ├── hi_ivs_qr.h │ │ ├── mpi_awb.h │ │ ├── gk_api_awb.h │ │ ├── hi_common_cipher.h │ │ ├── gk_api_awb_natura.h │ │ ├── comm_dis.h │ │ ├── mpi_ae.h │ │ └── comm_aenc.h ├── hi3516ev300 │ └── include │ │ ├── hi_comm_ai.h │ │ ├── hi_comm_ao.h │ │ ├── hi_isp_debug.h │ │ ├── hi_i2c.h │ │ ├── mpi_region.h │ │ ├── mpi_vb.h │ │ ├── mpi_vgs.h │ │ └── mpi_awb.h └── hi3536dv100 │ └── include │ ├── hi_comm_ai.h │ ├── hi_comm_ao.h │ ├── jconfig.h │ ├── mpi_adec.h │ ├── mpi_vda.h │ ├── mpi_aenc.h │ ├── mpi_region.h │ ├── mpi_vb.h │ ├── hi_tde_errcode.h │ ├── hi_type.h │ ├── mpi_hdmi.h │ ├── acodec.h │ ├── hi_io.h │ └── mpi_ai.h ├── venc ├── README.md ├── compat.c ├── Makefile └── main.h ├── vdec ├── Makefile ├── mavlink │ ├── common │ │ ├── version.h │ │ └── mavlink.h │ ├── minimal │ │ ├── version.h │ │ └── mavlink.h │ ├── standard │ │ ├── version.h │ │ ├── mavlink.h │ │ ├── testsuite.h │ │ └── standard.h │ ├── mavlink_get_info.h │ └── checksum.h ├── recorder.h ├── udp_stream.c ├── fbg_fbdev.h └── main.h ├── LICENSE ├── .github └── workflows │ └── main.yml └── README.md /osd/items/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(horizon) -------------------------------------------------------------------------------- /osd/ui/README.md: -------------------------------------------------------------------------------- 1 | Add the exported UI files here. 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | osd/build 2 | firmware 3 | toolchain 4 | vdec/vdec 5 | venc/venc 6 | .vscode/tasks.json 7 | .vscode/settings.json 8 | -------------------------------------------------------------------------------- /osd/osd.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "display_fbdev.h" -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_adc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_ADC_H__ 6 | #define __HI_ADC_H__ 7 | 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | } 12 | #endif 13 | #endif 14 | #endif /* __HI_ADC_H__ */ 15 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_isp_debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_ISP_DEBUG_H__ 6 | #define __HI_ISP_DEBUG_H__ 7 | 8 | #include "hi_debug.h" 9 | #include "isp_debug.h" 10 | 11 | 12 | #endif /* __HI_ISP_DEBUG_H__ */ 13 | -------------------------------------------------------------------------------- /osd/items/horizon/horizon.h: -------------------------------------------------------------------------------- 1 | #include "lvgl.h" 2 | 3 | lv_obj_t * horizon_create(); 4 | 5 | void horizon_setRoll(lv_obj_t * horizon, float angle); 6 | 7 | void horizon_setPitch(lv_obj_t* horizon, float angle); 8 | 9 | void horizon_demo(lv_obj_t* horizon); -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_i2c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_I2C_H__ 6 | #define __HI_I2C_H__ 7 | 8 | #include "i2c.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | } 13 | #endif 14 | #endif 15 | #endif /* __HI_I2C_H__ */ 16 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_spi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_SPI_H__ 6 | #define __HI_SPI_H__ 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | } 13 | #endif 14 | #endif 15 | #endif /* __HI_SPI_H__ */ 16 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_ssp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_SSP_H__ 6 | #define __HI_SSP_H__ 7 | 8 | #include "ssp.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | } 13 | #endif 14 | #endif 15 | #endif /* __HI_SSP_H__ */ 16 | -------------------------------------------------------------------------------- /venc/README.md: -------------------------------------------------------------------------------- 1 | ![OpenIPC logo][logo] 2 | 3 | ## Open streamer for FPV on Goke SoC's 4 | 5 | [![Telegram](https://openipc.org/images/telegram_button.svg)][telegram] 6 | 7 | [logo]: https://openipc.org/assets/openipc-logo-black.svg 8 | [telegram]: https://openipc.org/our-channels 9 | -------------------------------------------------------------------------------- /osd/ui/ui_events.h: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #ifndef _UI_EVENTS_H 5 | #define _UI_EVENTS_H 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #ifdef __cplusplus 12 | } /*extern "C"*/ 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp_hook.c: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #include "../ui.h" 5 | 6 | void ui_comp_itemImgText_create_hook( lv_obj_t * comp) 7 | { 8 | } 9 | 10 | void ui_comp_itemTextText_create_hook( lv_obj_t * comp) 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /osd/items/horizon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME "osd-item-horizon") 2 | 3 | add_library(${NAME} 4 | horizon.c 5 | ) 6 | 7 | target_include_directories(${NAME} 8 | PUBLIC 9 | ${CMAKE_CURRENT_LIST_DIR} 10 | ) 11 | 12 | target_link_libraries(${NAME} 13 | PUBLIC 14 | lvgl 15 | ) 16 | 17 | unset(NAME) -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_md.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_MD_H__ 6 | #define __HI_MD_H__ 7 | 8 | #include "md.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | 17 | #ifdef __cplusplus 18 | #if __cplusplus 19 | } 20 | #endif 21 | #endif 22 | #endif /* __HI_MD_H__ */ 23 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_ai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_AI_H__ 6 | #define __HI_COMM_AI_H__ 7 | 8 | #include "comm_ai.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | 17 | #ifdef __cplusplus 18 | #if __cplusplus 19 | } 20 | #endif 21 | #endif 22 | #endif /* __HI_COMM_AI_H__ */ 23 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_ao.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_AO_H__ 6 | #define __HI_COMM_AO_H__ 7 | 8 | #include "comm_ao.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | 17 | #ifdef __cplusplus 18 | #if __cplusplus 19 | } 20 | #endif 21 | #endif 22 | #endif /* __HI_COMM_AO_H__ */ 23 | -------------------------------------------------------------------------------- /vdec/Makefile: -------------------------------------------------------------------------------- 1 | VDEC := main.c udp_stream.c vo.c recorder.c \ 2 | fbg_fbdev.c fbgraphics.c font_16x16.c lodepng/lodepng.c nanojpeg/nanojpeg.c 3 | LIB := -lmpi -lhdmi -ljpeg -ldnvqe -lupvqe -lVoiceEngine -lm 4 | 5 | FLAG := -Wno-address-of-packed-member -Os -s 6 | SDK := ../sdk/hi3536dv100 7 | 8 | vdec: 9 | $(CC) $(VDEC) -I $(SDK)/include -L $(DRV) $(LIB) $(FLAG) -o $@ 10 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/comm_ai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __COMM_AI_H__ 6 | #define __COMM_AI_H__ 7 | 8 | #ifdef __cplusplus 9 | #if __cplusplus 10 | extern "C" { 11 | #endif 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | } 17 | #endif 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/comm_ao.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __COMM_AO_H__ 6 | #define __COMM_AO_H__ 7 | 8 | #ifdef __cplusplus 9 | #if __cplusplus 10 | extern "C" { 11 | #endif 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | } 17 | #endif 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_math.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_MATH_H__ 6 | #define __HI_MATH_H__ 7 | 8 | #include "hi_type.h" 9 | #include "math_fun.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | 18 | #ifdef __cplusplus 19 | #if __cplusplus 20 | } 21 | #endif 22 | #endif 23 | #endif /* __HI_MATH_H__ */ 24 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/acodec.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c), 2001-2021, CHANGJIANG Tech. Co., Ltd. 3 | */ 4 | 5 | #ifndef __ACODEC_H__ 6 | #define __ACODEC_H__ 7 | 8 | #include "audio_acodec.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | #ifdef __cplusplus 17 | #if __cplusplus 18 | } 19 | #endif 20 | #endif 21 | #endif /* __ACODEC_H__ */ 22 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_ive.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_IVE_H__ 6 | #define __HI_IVE_H__ 7 | 8 | #include "hi_comm_ive.h" 9 | #include "hi_common.h" 10 | #include "ive.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif 24 | #endif /* __HI_IVE_H__ */ 25 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_tde_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_TDE_TYPE_H__ 6 | #define __HI_TDE_TYPE_H__ 7 | 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | #include "hi_tde_errcode.h" 16 | #include "tde_type.h" 17 | 18 | #ifdef __cplusplus 19 | #if __cplusplus 20 | } 21 | #endif 22 | #endif 23 | #endif /* __HI_TDE_TYPE_H__ */ 24 | -------------------------------------------------------------------------------- /venc/compat.c: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | #include 3 | 4 | int __ctype_b; 5 | 6 | int __fgetc_unlocked(FILE *stream) { 7 | return fgetc(stream); 8 | } 9 | 10 | size_t _stdlib_mb_cur_max(void) { 11 | return 0; 12 | } 13 | 14 | void* mmap(void *start, size_t len, int prot, int flags, int fd, uint32_t off) { 15 | return (void *)syscall(SYS_mmap2, start, len, prot, flags, fd, off >> 12); 16 | } 17 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_isp_bin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_ISP_BIN_H__ 6 | #define __HI_ISP_BIN_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_comm_isp.h" 10 | #include "isp_bin.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif 24 | #endif /* __HI_ISP_BIN_H__ */ 25 | -------------------------------------------------------------------------------- /vdec/mavlink/common/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from common.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Wed Sep 27 2023" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /vdec/mavlink/minimal/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from minimal.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Wed Sep 27 2023" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /vdec/mavlink/standard/version.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from standard.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | 7 | #ifndef MAVLINK_VERSION_H 8 | #define MAVLINK_VERSION_H 9 | 10 | #define MAVLINK_BUILD_DATE "Wed Sep 27 2023" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_rc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_RC_H__ 6 | #define __HI_COMM_RC_H__ 7 | 8 | #include "hi_defines.h" 9 | #include "comm_rc.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | #define HI_FR32 GK_FR32 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif 24 | #endif /* __HI_COMM_RC_H__ */ 25 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_sns_ctrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_SNS_CTRL_H__ 6 | #define __HI_SNS_CTRL_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_comm_3a.h" 10 | #include "sns_ctrl.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif 24 | #endif /* __HI_SNS_CTRL_H__ */ 25 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_af_comm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_AF_COMM_H__ 6 | #define __HI_AF_COMM_H__ 7 | 8 | #include "hi_type.h" 9 | #include "af_comm.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | #define HI_AF_LIB_NAME "af_lib" 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif 24 | #endif /* __HI_AF_COMM_H__ */ 25 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_errno.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #ifndef __HI_ERRNO_H__ 5 | #define __HI_ERRNO_H__ 6 | 7 | #include "errcode.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C"{ 12 | #endif 13 | #endif /* End of #ifdef __cplusplus */ 14 | 15 | 16 | 17 | 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif /* __cplusplus */ 24 | 25 | #endif /* __HI_ERRNO_H__ */ 26 | 27 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_awb_comm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_AWB_COMM_H__ 6 | #define __HI_AWB_COMM_H__ 7 | 8 | #include "hi_type.h" 9 | #include "awb_comm.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | #define HI_AWB_LIB_NAME "awb_lib" 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif 24 | #endif /* __HI_AWB_COMM_H__ */ 25 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_securec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_SECUREC_H__ 6 | #define __HI_SECUREC_H__ 7 | 8 | #include "securectype.h" /*lint !e537*/ 9 | #include "securec.h" 10 | #include 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif 24 | #endif /* __HI_SECUREC_H__ */ 25 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/af_comm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __ISP_AF_COMM_H__ 5 | #define __ISP_AF_COMM_H__ 6 | 7 | #include "type.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | #define ISP_AF_LIB_NAME "af_lib" 16 | 17 | #ifdef __cplusplus 18 | #if __cplusplus 19 | } 20 | #endif 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_3a.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_3A_H__ 6 | #define __HI_COMM_3A_H__ 7 | 8 | #include "hi_common.h" 9 | #include "hi_comm_isp.h" 10 | #include "hi_comm_sns.h" 11 | #include "comm_3a.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | 20 | #ifdef __cplusplus 21 | #if __cplusplus 22 | } 23 | #endif 24 | #endif 25 | #endif /* __HI_COMM_3A_H__ */ 26 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_sns.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_SNS_H__ 6 | #define __HI_COMM_SNS_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_comm_isp.h" 11 | #include "comm_sns.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | 20 | #ifdef __cplusplus 21 | #if __cplusplus 22 | } 23 | #endif 24 | #endif 25 | #endif /* __HI_COMM_SNS_H__ */ 26 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_ae_comm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_AE_COMM_H__ 6 | #define __HI_AE_COMM_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_comm_isp.h" 10 | #include "ae_comm.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | #define HI_AE_LIB_NAME "ae_lib" 19 | 20 | #ifdef __cplusplus 21 | #if __cplusplus 22 | } 23 | #endif 24 | #endif 25 | #endif /* __HI_AE_COMM_H__ */ 26 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_defines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_DEFINES_H__ 6 | #define __HI_DEFINES_H__ 7 | 8 | #include "defines.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif /* __cplusplus */ 15 | 16 | #define HISI_MAX_SENSOR_NUM 2 17 | 18 | #ifdef __cplusplus 19 | #if __cplusplus 20 | } 21 | #endif 22 | #endif /* __cplusplus */ 23 | 24 | #endif /* __HI_DEFINES_H__ */ 25 | 26 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_snap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_SNAP_H__ 6 | #define __HI_COMM_SNAP_H__ 7 | 8 | #include "hi_common.h" 9 | #include "hi_comm_video.h" 10 | #include "hi_comm_isp.h" 11 | #include "comm_snap.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | 20 | #ifdef __cplusplus 21 | #if __cplusplus 22 | } 23 | #endif 24 | #endif 25 | #endif /* __HI_COMM_SNAP_H__ */ 26 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp_hook.h: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #ifndef _SQUARELINE_PROJECT_UI_COMP_HOOK_H 5 | #define _SQUARELINE_PROJECT_UI_COMP_HOOK_H 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | void ui_comp_itemImgText_create_hook( lv_obj_t *comp ); 12 | void ui_comp_itemTextText_create_hook( lv_obj_t *comp ); 13 | 14 | #ifdef __cplusplus 15 | } /*extern "C"*/ 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_video.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_VIDEO_H__ 6 | #define __HI_COMM_VIDEO_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "comm_video.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif /* __cplusplus */ 17 | 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | } 22 | #endif 23 | #endif /* __cplusplus */ 24 | 25 | #endif /* _HI_COMM_VIDEO_H_ */ 26 | 27 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_BUFFER_H__ 6 | #define __HI_BUFFER_H__ 7 | 8 | #include "hi_math.h" 9 | #include "hi_type.h" 10 | #include "hi_common.h" 11 | #include "hi_comm_video.h" 12 | #include "buffer.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_MAXINUM_LIMIT MAXINUM_LIMIT 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | } 25 | #endif 26 | #endif 27 | #endif /* __HI_BUFFER_H__ */ 28 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/ssp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __SSP_H__ 6 | #define __SSP_H__ 7 | 8 | #define SSP_READ_ALT 0x1 9 | #define SSP_WRITE_ALT 0X3 10 | 11 | typedef struct SPI_DATA_S { 12 | unsigned int spi_no; 13 | unsigned char dev_addr; 14 | unsigned int dev_byte_num; 15 | unsigned int reg_addr; 16 | unsigned int addr_byte_num; 17 | unsigned int data; 18 | unsigned int data_byte_num; 19 | } SPI_DATA_S; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/aacdec.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c), 2001-2021, CHANGJIANG Tech. Co., Ltd. 3 | */ 4 | 5 | #ifndef __AACDEC_H__ 6 | #define __AACDEC_H__ 7 | 8 | #include "hi_type.h" 9 | #include "audio_aacdec.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | HI_S32 HI_AACDEC_GetVersion(AACDEC_VERSION_S *pVersion); 18 | 19 | HI_VOID *HI_AAC_SBRDEC_GetHandle(HI_VOID); 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | } 24 | #endif 25 | #endif 26 | #endif /* __AACDEC_H__ */ 27 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_TYPES_H__ 6 | #define __HI_TYPES_H__ 7 | 8 | #include "hi_type.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | #define HI_HANDLE_MAKEHANDLE HANDLE_MAKEHANDLE 17 | #define HI_HANDLE_GET_MODID HANDLE_GET_MODID 18 | #define HI_HANDLE_GET_PriDATA HANDLE_GET_PriDATA 19 | #define HI_HANDLE_GET_CHNID HANDLE_GET_CHNID 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | } 24 | #endif 25 | #endif 26 | #endif /* __HI_TYPES_H__ */ 27 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/vou_exp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #include "common.h" 5 | 6 | #ifndef __VOU_EXP_H__ 7 | #define __VOU_EXP_H__ 8 | 9 | typedef struct VOU_EXPORT_CALLBACK_S { 10 | void (*pfnVoNotify)(int module_id, int vodev); 11 | } VOU_EXPORT_CALLBACK_S; 12 | 13 | typedef GK_S32 14 | FN_VO_RegisterExternCallback(VOU_EXPORT_CALLBACK_S *pstExpCallback); 15 | 16 | typedef struct VOU_EXPORT_SYMBOL_S { 17 | FN_VO_RegisterExternCallback *pfnVoRegisterExpCallback; 18 | } VOU_EXPORT_SYMBOL_S; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp_itemimgtext.h: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #ifndef _UI_COMP_ITEMIMGTEXT_H 5 | #define _UI_COMP_ITEMIMGTEXT_H 6 | 7 | #include "../ui.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | // COMPONENT itemImgText 14 | #define UI_COMP_ITEMIMGTEXT_ITEMIMGTEXT 0 15 | #define UI_COMP_ITEMIMGTEXT_IMAGE4 1 16 | #define UI_COMP_ITEMIMGTEXT_LABEL2 2 17 | #define _UI_COMP_ITEMIMGTEXT_NUM 3 18 | lv_obj_t *ui_itemImgText_create(lv_obj_t *comp_parent); 19 | 20 | #ifdef __cplusplus 21 | } /*extern "C"*/ 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_aacdec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_AACDEC_H__ 6 | #define __GK_AACDEC_H__ 7 | 8 | #include "type.h" 9 | #include "common.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif /* __cplusplus */ 16 | 17 | GK_S32 GK_AACDEC_GetVersion(AACDEC_VERSION_S *pVersion); 18 | 19 | GK_VOID *GK_AAC_SBRDEC_GetHandle(GK_VOID); 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | } 24 | #endif 25 | #endif /* __cplusplus */ 26 | 27 | #endif /* __GK_AACDEC_H__ */ 28 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_aacenc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_AACENC_H__ 6 | #define __GK_AACENC_H__ 7 | 8 | #include "type.h" 9 | #include "common.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif /* __cplusplus */ 16 | 17 | GK_S32 GK_AACENC_GetVersion(AACENC_VERSION_S *pVersion); 18 | 19 | GK_VOID *GK_AAC_SBRENC_GetHandle(GK_VOID); 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | } 24 | #endif 25 | #endif /* __cplusplus */ 26 | 27 | #endif /* __GK_AACENC_H__ */ 28 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp_itemtexttext.h: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #ifndef _UI_COMP_ITEMTEXTTEXT_H 5 | #define _UI_COMP_ITEMTEXTTEXT_H 6 | 7 | #include "../ui.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | // COMPONENT itemTextText 14 | #define UI_COMP_ITEMTEXTTEXT_ITEMTEXTTEXT 0 15 | #define UI_COMP_ITEMTEXTTEXT_LABEL4 1 16 | #define UI_COMP_ITEMTEXTTEXT_LABEL1 2 17 | #define _UI_COMP_ITEMTEXTTEXT_NUM 3 18 | lv_obj_t *ui_itemTextText_create(lv_obj_t *comp_parent); 19 | 20 | #ifdef __cplusplus 21 | } /*extern "C"*/ 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp.h: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #ifndef _UI_COMP__H 5 | #define _UI_COMP__H 6 | 7 | #include "../ui.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | void get_component_child_event_cb(lv_event_t* e); 14 | void del_component_child_event_cb(lv_event_t* e); 15 | 16 | lv_obj_t * ui_comp_get_child(lv_obj_t *comp, uint32_t child_idx); 17 | extern uint32_t LV_EVENT_GET_COMP_CHILD; 18 | #include "ui_comp_itemimgtext.h" 19 | #include "ui_comp_itemtexttext.h" 20 | 21 | #ifdef __cplusplus 22 | } /*extern "C"*/ 23 | #endif 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /osd/ui/filelist.txt: -------------------------------------------------------------------------------- 1 | components/ui_comp_itemimgtext.c 2 | components/ui_comp_itemtexttext.c 3 | components/ui_comp.c 4 | screens/ui_mainOSD1.c 5 | ui.c 6 | components/ui_comp_hook.c 7 | ui_helpers.c 8 | images/ui_img_icon_crosshair_png.c 9 | images/ui_img_icon_gps_png.c 10 | images/ui_img_icon_home_png.c 11 | images/ui_img_icon_battery_png.c 12 | images/ui_img_icon_speed_png.c 13 | images/ui_img_icon_thermometer_png.c 14 | images/ui_img_icon_signal_png.c 15 | images/ui_img_icon_arrow_png.c 16 | images/ui_img_icon_clock_png.c 17 | images/ui_img_icon_arrow_left_png.c 18 | images/ui_img_ico_record_png.c 19 | images/ui_img_logo_png.c 20 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/ivs_qr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef _IVS_QR_H_ 5 | #define _IVS_QR_H_ 6 | 7 | #include "common_qr.h" 8 | #include "comm_video.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | gk_s32 ivs_qr_init(gk_void); 17 | 18 | gk_s32 ivs_qr_get_buf_size(gk_u32 max_img_width, gk_u32 max_img_height, 19 | gk_u32 *size); 20 | 21 | gk_s32 ivs_qr_proc(VIDEO_FRAME_INFO_S *src_frame, qr_mem_info *buf, 22 | qr_info *qr_info); 23 | 24 | gk_s32 ivs_qr_deinit(gk_void); 25 | 26 | #ifdef __cplusplus 27 | #if __cplusplus 28 | } 29 | #endif 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_ivs_qr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef _GK_IVS_QR_H_ 5 | #define _GK_IVS_QR_H_ 6 | 7 | #include "common_qr.h" 8 | #include "comm_video.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | gk_s32 gk_ivs_qr_init(gk_void); 17 | 18 | gk_s32 gk_ivs_qr_get_buf_size(gk_u32 max_img_width, gk_u32 max_img_height, 19 | gk_u32 *size); 20 | 21 | gk_s32 gk_ivs_qr_proc(VIDEO_FRAME_INFO_S *src_frame, qr_mem_info *buf, 22 | qr_info *qr_info); 23 | 24 | gk_s32 gk_ivs_qr_deinit(gk_void); 25 | 26 | #ifdef __cplusplus 27 | #if __cplusplus 28 | } 29 | #endif 30 | #endif 31 | #endif 32 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/isp_bin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __ISP_BIN_H__ 6 | #define __ISP_BIN_H__ 7 | 8 | #include "type.h" 9 | #include "comm_isp.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | #define MAX_BIN_REG_NUM 5 18 | 19 | typedef struct ISP_BIN_REG_ATTR_S { 20 | GK_U32 u32Addr; 21 | GK_U8 u8StartBit; 22 | GK_U8 u8EndBit; 23 | } ISP_BIN_REG_ATTR_S; 24 | 25 | ISP_BIN_REG_ATTR_S g_astIspBinRegAttr[ISP_MAX_PIPE_NUM][MAX_BIN_REG_NUM] = { 26 | [0 ...(ISP_MAX_PIPE_NUM - 1)] = { 0 } 27 | }; 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/isp_debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __ISP_DEBUG_H__ 6 | #define __ISP_DEBUG_H__ 7 | 8 | #include "mpp_debug.h" 9 | #define ISP_TRACE(level, fmt, ...) \ 10 | do { \ 11 | MODULE_TRACE(level, MOD_ID_ISP, \ 12 | "[Func]:%s [Line]:%d [Info]:" fmt, __FUNCTION__, \ 13 | __LINE__, ##__VA_ARGS__); \ 14 | } while (0) 15 | 16 | #define DIV_0_TO_1(a) (((a) == 0) ? 1 : (a)) 17 | #define DIV_0_TO_1_FLOAT(a) ((((a) < 1E-10) && ((a) > -1E-10)) ? 1 : (a)) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/i2c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef _I2C_H 5 | #define _I2C_H 6 | 7 | #define I2C_RETRIES 0x0701 8 | #define I2C_TIMEOUT 0x0702 9 | 10 | #define I2C_SLAVE 0x0703 11 | #define I2C_SLAVE_FORCE 0x0706 12 | #define I2C_TENBIT 0x0704 13 | 14 | #define I2C_FUNCS 0x0705 15 | 16 | #define I2C_RDWR 0x0707 17 | 18 | #define I2C_PEC 0x0708 19 | #define I2C_SMBUS 0x0720 20 | #define I2C_16BIT_REG 0x0709 21 | #define I2C_16BIT_DATA 0x070a 22 | 23 | typedef struct I2C_DATA_S { 24 | unsigned char dev_addr; 25 | unsigned int reg_addr; 26 | unsigned int addr_byte_num; 27 | unsigned int data; 28 | unsigned int data_byte_num; 29 | } I2C_DATA_S; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /venc/Makefile: -------------------------------------------------------------------------------- 1 | VENC := main.c common.c compat.c isp_profiles.c mipi_profiles.c vi_profiles.c 2 | SENSOR = $(SDK)/sensor/imx307_2l_cmos.c $(SDK)/sensor/imx307_2l_sensor_ctl.c \ 3 | $(SDK)/sensor/imx335_cmos.c $(SDK)/sensor/imx335_sensor_ctl.c 4 | BUILD = $(CC) $(VENC) $(SENSOR) -I $(SDK)/include -L $(DRV) $(LIB) -Os -s -o venc 5 | 6 | venc-goke: 7 | $(eval SDK = ../sdk/gk7205v300) 8 | $(eval LIB = -lhi_mpi -lhi_isp -lhi_ae -lhi_awb -lgk_api -lgk_isp -lgk_ae -lgk_awb \ 9 | -ldehaze -ldrc -lldci -lir_auto -ldnvqe -lupvqe -lvoice_engine -lsecurec) 10 | $(BUILD) 11 | 12 | venc-hisi: 13 | $(eval SDK = ../sdk/hi3516ev300) 14 | $(eval LIB = -lisp -lmpi -ldnvqe -lupvqe -l_hiae -l_hiawb \ 15 | -l_hildci -l_hidrc -l_hidehaze -lVoiceEngine -lsecurec) 16 | $(BUILD) 17 | -------------------------------------------------------------------------------- /vdec/mavlink/common/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from common.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_HASH -6444967149487557671 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "common.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /vdec/mavlink/minimal/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from minimal.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_HASH 7866375523044912686 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "minimal.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /vdec/mavlink/standard/mavlink.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol built from standard.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_H 7 | #define MAVLINK_H 8 | 9 | #define MAVLINK_PRIMARY_XML_HASH 2262899478281782564 10 | 11 | #ifndef MAVLINK_STX 12 | #define MAVLINK_STX 253 13 | #endif 14 | 15 | #ifndef MAVLINK_ENDIAN 16 | #define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN 17 | #endif 18 | 19 | #ifndef MAVLINK_ALIGNED_FIELDS 20 | #define MAVLINK_ALIGNED_FIELDS 1 21 | #endif 22 | 23 | #ifndef MAVLINK_CRC_EXTRA 24 | #define MAVLINK_CRC_EXTRA 1 25 | #endif 26 | 27 | #ifndef MAVLINK_COMMAND_24BIT 28 | #define MAVLINK_COMMAND_24BIT 1 29 | #endif 30 | 31 | #include "version.h" 32 | #include "standard.h" 33 | 34 | #endif // MAVLINK_H 35 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __TYPES_H__ 5 | #define __TYPES_H__ 6 | 7 | #include "type.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | #define GK_HANDLE_MAKEHANDLE(mod, privatedata, chnid) \ 16 | (gk_handle)((((mod)&0xffff) << 16) | ((((privatedata)&0xff) << 8)) | \ 17 | (((chnid)&0xff))) 18 | 19 | #define GK_HANDLE_GET_MODID(handle) (((handle) >> 16) & 0xffff) 20 | #define GK_HANDLE_GET_PriDATA(handle) (((handle) >> 8) & 0xff) 21 | #define GK_HANDLE_GET_CHNID(handle) (((handle)) & 0xff) 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | } 26 | #endif 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/md.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef _MD_H_ 5 | #define _MD_H_ 6 | 7 | #include "ive.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | typedef enum MD_ALG_MODE_E { 15 | MD_ALG_MODE_BG = 0x0, 16 | MD_ALG_MODE_REF = 0x1, 17 | 18 | MD_ALG_MODE_BUTT 19 | } MD_ALG_MODE_E; 20 | typedef struct MD_ATTR_S { 21 | MD_ALG_MODE_E enAlgMode; 22 | IVE_SAD_MODE_E enSadMode; 23 | IVE_SAD_OUT_CTRL_E enSadOutCtrl; 24 | GK_U32 u32Width; 25 | GK_U32 u32Height; 26 | GK_U16 u16SadThr; 27 | IVE_CCL_CTRL_S stCclCtrl; 28 | IVE_ADD_CTRL_S stAddCtrl; 29 | } MD_ATTR_S; 30 | 31 | #ifdef __cplusplus 32 | #if __cplusplus 33 | } 34 | #endif 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_resampler_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_RESAMPLER_API_H__ 6 | #define __GK_RESAMPLER_API_H__ 7 | 8 | #include "type.h" 9 | #include "common.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | GK_VOID *GK_AUDIO_Resampler_Create(GK_S32 s32Inrate, GK_S32 s32Outrate, 18 | GK_S32 s32Chans); 19 | 20 | GK_S32 GK_AUDIO_Resampler_Process(GK_VOID *inst, GK_S16 *s16Inbuf, 21 | GK_S32 s32Insamps, GK_S16 *s16Outbuf); 22 | 23 | GK_VOID GK_AUDIO_Resampler_Destroy(GK_VOID *inst); 24 | 25 | GK_S32 GK_AUDIO_Resampler_GetMaxOutputNum(GK_VOID *inst, GK_S32 s32Insamps); 26 | 27 | #ifdef __cplusplus 28 | #if __cplusplus 29 | } 30 | #endif 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /vdec/recorder.h: -------------------------------------------------------------------------------- 1 | /**************************DVR made by Dinh Cong Bang from VietNam***************************/ 2 | #ifndef __RECORDER_H__ 3 | #define __RECORDER_H__ 4 | 5 | #include "hi_type.h" 6 | #include "hi_comm_vdec.h" 7 | 8 | #define RINGBUFFER_SIZE 100 9 | #define BUFFER_SIZE 512*1024 10 | 11 | typedef struct { 12 | HI_U8* pData; // Pointer to 1MB memory block 13 | HI_U32 size; 14 | } Data; 15 | 16 | typedef struct { 17 | Data buffer[RINGBUFFER_SIZE]; 18 | int head; 19 | int tail; 20 | int count; 21 | pthread_mutex_t lock; 22 | pthread_cond_t not_full; 23 | pthread_cond_t not_empty; 24 | } RingBuffer; 25 | 26 | void recorder_int(const char* pPath); 27 | void recorder_input_data(const VDEC_STREAM_S *pStream); 28 | void* recorder_save_file_thread(void* arg); 29 | void recorder_stop(); 30 | 31 | #endif -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_audio_bcd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_AUDIO_BCD_H__ 6 | #define __GK_AUDIO_BCD_H__ 7 | 8 | #include "type.h" 9 | #include "common.h" 10 | 11 | #include "audio_bcd.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | gk_s32 gk_audio_baby_crying_detection_init(bcd_handle *bcd, gk_s32 sample_rate, 20 | const audio_bcd_config *bcd_config); 21 | 22 | gk_s32 23 | gk_audio_baby_crying_detection_process(bcd_handle bcd, 24 | audio_bcd_process_data *input_data, 25 | audio_bcd_process_data *output_data); 26 | 27 | gk_s32 gk_audio_baby_crying_detection_deinit(bcd_handle bcd); 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /osd/ui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(SOURCES components/ui_comp_itemimgtext.c 2 | components/ui_comp_itemtexttext.c 3 | components/ui_comp.c 4 | screens/ui_mainOSD1.c 5 | ui.c 6 | components/ui_comp_hook.c 7 | ui_helpers.c 8 | images/ui_img_icon_home_png.c 9 | images/ui_img_icon_battery_png.c 10 | images/ui_img_icon_speed_png.c 11 | images/ui_img_icon_thermometer_png.c 12 | images/ui_img_icon_signal_png.c 13 | images/ui_img_iconnavi_png.c 14 | images/ui_img_icon_clock_png.c 15 | images/ui_img_icon_arrow_left_png.c 16 | images/ui_img_ico_record_png.c 17 | images/ui_img_logo_png.c 18 | images/ui_img_icon_gps_png.c 19 | images/ui_img_arhorizon_png.c 20 | images/ui_img_icon_vertical_png.c 21 | images/ui_img_icon_crosshair_png.c 22 | images/ui_img_icon_throttle_png.c 23 | images/ui_img_icon_altw_png.c) 24 | 25 | add_library(ui ${SOURCES}) 26 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp.c: -------------------------------------------------------------------------------- 1 | /// Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #include "../ui.h" 5 | #include "../ui_helpers.h" 6 | #include "ui_comp.h" 7 | 8 | uint32_t LV_EVENT_GET_COMP_CHILD; 9 | 10 | typedef struct { 11 | uint32_t child_idx; 12 | lv_obj_t* child; 13 | } ui_comp_get_child_t; 14 | 15 | lv_obj_t * ui_comp_get_child(lv_obj_t *comp, uint32_t child_idx) { 16 | ui_comp_get_child_t info; 17 | info.child = NULL; 18 | info.child_idx = child_idx; 19 | lv_event_send(comp, LV_EVENT_GET_COMP_CHILD, &info); 20 | return info.child; 21 | } 22 | 23 | void get_component_child_event_cb(lv_event_t* e) { 24 | lv_obj_t** c = lv_event_get_user_data(e); 25 | ui_comp_get_child_t* info = lv_event_get_param(e); 26 | info->child = c[info->child_idx]; 27 | } 28 | 29 | void del_component_child_event_cb(lv_event_t* e) { 30 | lv_obj_t** c = lv_event_get_user_data(e); 31 | lv_mem_free(c); 32 | } 33 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_vgs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_VGS_H__ 6 | #define __HI_COMM_VGS_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_errno.h" 11 | #include "hi_comm_video.h" 12 | #include "comm_vgs.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_ERR_VGS_NOBUF ERR_CODE_VGS_NOBUF 21 | #define HI_ERR_VGS_BUF_EMPTY ERR_CODE_VGS_BUF_EMPTY 22 | #define HI_ERR_VGS_NULL_PTR ERR_CODE_VGS_NULL_PTR 23 | #define HI_ERR_VGS_ILLEGAL_PARAM ERR_CODE_VGS_ILLEGAL_PARAM 24 | #define HI_ERR_VGS_BUF_FULL ERR_CODE_VGS_BUF_FULL 25 | #define HI_ERR_VGS_SYS_NOTREADY ERR_CODE_VGS_SYS_NOTREADY 26 | #define HI_ERR_VGS_NOT_SUPPORT ERR_CODE_VGS_NOT_SUPPORT 27 | #define HI_ERR_VGS_NOT_PERMITTED ERR_CODE_VGS_NOT_PERMITTED 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif 34 | #endif /* __HI_COMM_VGS_H__ */ 35 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_sys.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_SYS_H__ 6 | #define __HI_COMM_SYS_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_errno.h" 10 | #include "hi_debug.h" 11 | #include "hi_comm_video.h" 12 | #include "comm_sys.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_UNIQUE_ID_NUM UNIQUE_ID_NUM 21 | #define HI_TRACE_SYS TRACE_SYS 22 | #define HI_UNIQUE_ID_S UNIQUE_ID_S 23 | #define HI_ERR_SYS_NULL_PTR ERR_CODE_SYS_NULL_PTR 24 | #define HI_ERR_SYS_NOTREADY ERR_CODE_SYS_NOTREADY 25 | #define HI_ERR_SYS_NOT_PERM ERR_CODE_SYS_NOT_PERM 26 | #define HI_ERR_SYS_NOMEM ERR_CODE_SYS_NOMEM 27 | #define HI_ERR_SYS_ILLEGAL_PARAM ERR_CODE_SYS_ILLEGAL_PARAM 28 | #define HI_ERR_SYS_BUSY ERR_CODE_SYS_BUSY 29 | #define HI_ERR_SYS_NOT_SUPPORT ERR_CODE_SYS_NOT_SUPPORT 30 | 31 | #ifdef __cplusplus 32 | #if __cplusplus 33 | } 34 | #endif 35 | #endif 36 | #endif /* __HI_COMM_SYS_H__ */ 37 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/tde_errcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __TDE_ERRCODE_H__ 5 | #define __TDE_ERRCODE_H__ 6 | 7 | #include "type.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | #define ERR_CODE_TDE_BASE \ 16 | ((GK_S32)(((0x80UL + 0x20UL) << 24) | (100 << 16) | (4 << 13) | 1)) 17 | 18 | enum { 19 | ERR_CODE_TDE_DEV_NOT_OPEN = ERR_CODE_TDE_BASE, 20 | ERR_CODE_TDE_DEV_OPEN_FAILED, 21 | ERR_CODE_TDE_NULL_PTR, 22 | ERR_CODE_TDE_NO_MEM, 23 | ERR_CODE_TDE_INVALID_HANDLE, 24 | ERR_CODE_TDE_INVALID_PARA, 25 | ERR_CODE_TDE_NOT_ALIGNED, 26 | ERR_CODE_TDE_MINIFICATION, 27 | ERR_CODE_TDE_CLIP_AREA, 28 | ERR_CODE_TDE_JOB_TIMEOUT, 29 | ERR_CODE_TDE_UNSUPPORTED_OPERATION, 30 | ERR_CODE_TDE_QUERY_TIMEOUT, 31 | ERR_CODE_TDE_INTERRUPT 32 | }; 33 | 34 | #ifdef __cplusplus 35 | #if __cplusplus 36 | } 37 | #endif 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /osd/util.h: -------------------------------------------------------------------------------- 1 | #ifndef _UTIL_H 2 | #define _UTIL_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | uint16_t mapu32(uint16_t x, uint16_t in_min, uint16_t in_max, uint16_t out_min, uint16_t out_max); 13 | float mapf(float x, float in_min, float in_max, float out_min, float out_max); 14 | float Rad2Deg(float x); 15 | double deg2rad(double degrees) ; 16 | void uint16ToByteArray(float value, signed char* byteArray); 17 | void floatToByteArray(float value, signed char* byteArray); 18 | void doubleToByteArray(double value, unsigned char* byteArray); 19 | float byteArrayToFloat(const signed char* byteArray); 20 | double byteArrayToDouble(const unsigned char* byteArray); 21 | uint16_t byteArrayToUint16(const signed char* byteArray); 22 | double calculateDistance(double lat1, double lon1, double lat2, double lon2); 23 | 24 | #ifdef __cplusplus 25 | } /*extern "C"*/ 26 | #endif 27 | 28 | #endif -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_vb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_VB_H__ 6 | #define __HI_COMM_VB_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_errno.h" 10 | #include "hi_debug.h" 11 | #include "comm_vb.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | #define HI_ERR_VB_NULL_PTR ERR_CODE_VB_NULL_PTR 20 | #define HI_ERR_VB_NOMEM ERR_CODE_VB_NOMEM 21 | #define HI_ERR_VB_NOBUF ERR_CODE_VB_NOBUF 22 | #define HI_ERR_VB_UNEXIST ERR_CODE_VB_UNEXIST 23 | #define HI_ERR_VB_ILLEGAL_PARAM ERR_CODE_VB_ILLEGAL_PARAM 24 | #define HI_ERR_VB_NOTREADY ERR_CODE_VB_NOTREADY 25 | #define HI_ERR_VB_BUSY ERR_CODE_VB_BUSY 26 | #define HI_ERR_VB_NOT_PERM ERR_CODE_VB_NOT_PERM 27 | #define HI_ERR_VB_SIZE_NOT_ENOUGH ERR_CODE_VB_SIZE_NOT_ENOUGH 28 | #define HI_ERR_VB_2MPOOLS ERR_CODE_VB_2MPOOLS 29 | #define HI_TRACE_VB TRACE_VB 30 | 31 | #ifdef __cplusplus 32 | #if __cplusplus 33 | } 34 | #endif 35 | #endif 36 | #endif /* __HI_COMM_VB_H__ */ 37 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/ivs_md.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef _HI_IVS_MD_H_ 6 | #define _HI_IVS_MD_H_ 7 | 8 | #include "md.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif /* End of #ifdef __cplusplus */ 15 | 16 | 17 | HI_S32 HI_IVS_MD_Init(HI_VOID); 18 | 19 | 20 | HI_S32 HI_IVS_MD_Exit(HI_VOID); 21 | 22 | 23 | HI_S32 HI_IVS_MD_CreateChn(MD_CHN MdChn, MD_ATTR_S *pstMdAttr); 24 | 25 | 26 | HI_S32 HI_IVS_MD_DestroyChn(MD_CHN MdChn); 27 | 28 | 29 | HI_S32 HI_IVS_MD_SetChnAttr(MD_CHN MdChn, MD_ATTR_S *pstMdAttr); 30 | 31 | 32 | HI_S32 HI_IVS_MD_GetChnAttr(MD_CHN MdChn, MD_ATTR_S *pstMdAttr); 33 | 34 | 35 | HI_S32 HI_IVS_MD_GetBg(MD_CHN MdChn, IVE_DST_IMAGE_S *pstBg); 36 | 37 | 38 | HI_S32 HI_IVS_MD_Process(MD_CHN MdChn, IVE_SRC_IMAGE_S *pstCur, IVE_SRC_IMAGE_S *pstRef,IVE_DST_IMAGE_S *pstSad, IVE_DST_MEM_INFO_S *pstBlob); 39 | 40 | #ifdef __cplusplus 41 | #if __cplusplus 42 | } 43 | #endif 44 | #endif 45 | #endif /* _HI_IVS_MD_H_ */ -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_ivs_md.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef _GK_IVS_MD_H_ 6 | #define _GK_IVS_MD_H_ 7 | 8 | #include "md.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | GK_S32 GK_IVS_MD_Init(GK_VOID); 17 | 18 | GK_S32 GK_IVS_MD_Exit(GK_VOID); 19 | 20 | GK_S32 GK_IVS_MD_CreateChn(MD_CHN MdChn, MD_ATTR_S *pstMdAttr); 21 | 22 | GK_S32 GK_IVS_MD_DestroyChn(MD_CHN MdChn); 23 | 24 | GK_S32 GK_IVS_MD_SetChnAttr(MD_CHN MdChn, MD_ATTR_S *pstMdAttr); 25 | 26 | GK_S32 GK_IVS_MD_GetChnAttr(MD_CHN MdChn, MD_ATTR_S *pstMdAttr); 27 | 28 | GK_S32 GK_IVS_MD_GetBg(MD_CHN MdChn, IVE_DST_IMAGE_S *pstBg); 29 | 30 | GK_S32 GK_IVS_MD_Process(MD_CHN MdChn, IVE_SRC_IMAGE_S *pstCur, 31 | IVE_SRC_IMAGE_S *pstRef, IVE_DST_IMAGE_S *pstSad, 32 | IVE_DST_MEM_INFO_S *pstBlob); 33 | 34 | #ifdef __cplusplus 35 | #if __cplusplus 36 | } 37 | #endif 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/adc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __ADC_H__ 6 | #define __ADC_H__ 7 | 8 | #define LSADC_IOCTL_BASE 'A' 9 | 10 | typedef enum IOC_NR_LSADC_E { 11 | IOC_NR_LSADC_MODEL_SEL = 0, 12 | IOC_NR_LSADC_CHN_ENABLE, 13 | IOC_NR_LSADC_CHN_DISABLE, 14 | IOC_NR_LSADC_START, 15 | IOC_NR_LSADC_STOP, 16 | IOC_NR_LSADC_GET_CHNVAL, 17 | IOC_NR_LSADC_BUTT 18 | } IOC_NR_LSADC_E; 19 | 20 | #define LSADC_IOC_MODEL_SEL _IOWR(LSADC_IOCTL_BASE, IOC_NR_LSADC_MODEL_SEL, int) 21 | #define LSADC_IOC_CHN_ENABLE \ 22 | _IOW(LSADC_IOCTL_BASE, IOC_NR_LSADC_CHN_ENABLE, int) 23 | #define LSADC_IOC_CHN_DISABLE \ 24 | _IOW(LSADC_IOCTL_BASE, IOC_NR_LSADC_CHN_DISABLE, int) 25 | #define LSADC_IOC_START _IO(LSADC_IOCTL_BASE, IOC_NR_LSADC_START) 26 | #define LSADC_IOC_STOP _IO(LSADC_IOCTL_BASE, IOC_NR_LSADC_STOP) 27 | #define LSADC_IOC_GET_CHNVAL \ 28 | _IOWR(LSADC_IOCTL_BASE, IOC_NR_LSADC_GET_CHNVAL, int) 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/vqe_register_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __VQE_REGISTER_API_H__ 5 | #define __VQE_REGISTER_API_H__ 6 | 7 | #include "type.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | GK_VOID *VQE_RECORD_GetHandle(GK_VOID); 16 | GK_VOID *VQE_HPF_GetHandle(GK_VOID); 17 | GK_VOID *VQE_AEC_GetHandle(GK_VOID); 18 | GK_VOID *VQE_ANR_GetHandle(GK_VOID); 19 | GK_VOID *VQE_RNR_GetHandle(GK_VOID); 20 | GK_VOID *VQE_HDR_GetHandle(GK_VOID); 21 | GK_VOID *VQE_DRC_GetHandle(GK_VOID); 22 | GK_VOID *VQE_PEQ_GetHandle(GK_VOID); 23 | GK_VOID *VQE_AGC_GetHandle(GK_VOID); 24 | GK_VOID *VQE_EQ_GetHandle(GK_VOID); 25 | GK_VOID *VQE_RESAMPLE_GetHandle(GK_VOID); 26 | GK_VOID *VQE_GAIN_GetHandle(GK_VOID); 27 | GK_VOID *VQE_TALKV2_GetHandle(GK_VOID); 28 | GK_VOID *VQE_WNR_GetHandle(GK_VOID); 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /osd/display_fbdev.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file fbdev.h 3 | * 4 | */ 5 | 6 | #ifndef FBDEV_H 7 | #define FBDEV_H 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /********************* 13 | * INCLUDES 14 | *********************/ 15 | #include "lvgl.h" 16 | 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | void fbdev_init(void); 30 | void fbdev_exit(void); 31 | void fbdev_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p); 32 | void fbdev_get_sizes(uint16_t *width, uint16_t *height, uint16_t *dpi); 33 | /** 34 | * Set the X and Y offset in the variable framebuffer info. 35 | * @param xoffset horizontal offset 36 | * @param yoffset vertical offset 37 | */ 38 | void fbdev_set_offset(uint32_t xoffset, uint32_t yoffset); 39 | 40 | #ifdef __cplusplus 41 | } /* extern "C" */ 42 | #endif 43 | 44 | #endif /*FBDEV_H*/ 45 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/hi_comm_ai.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ai.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AI_H__ 19 | #define __HI_COMM_AI_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif /* End of #ifdef __cplusplus */ 34 | 35 | #endif /* End of #ifndef __HI_COMM_AI_H__ */ 36 | 37 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/hi_comm_ai.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ai.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AI_H__ 19 | #define __HI_COMM_AI_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C" { 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif /* End of #ifdef __cplusplus */ 34 | 35 | #endif /* End of #ifndef __HI_COMM_AI_H__ */ 36 | 37 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/hi_comm_ao.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ao.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AO_H__ 19 | #define __HI_COMM_AO_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif /* End of #ifdef __cplusplus */ 35 | 36 | #endif /* End of #ifndef __HI_COMM_AO_H__ */ 37 | 38 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/hi_comm_ao.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ao.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AO_H__ 19 | #define __HI_COMM_AO_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C" { 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif /* End of #ifdef __cplusplus */ 35 | 36 | #endif /* End of #ifndef __HI_COMM_AO_H__ */ 37 | 38 | -------------------------------------------------------------------------------- /vdec/mavlink/standard/testsuite.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol testsuite generated from standard.xml 3 | * @see https://mavlink.io/en/ 4 | */ 5 | #pragma once 6 | #ifndef STANDARD_TESTSUITE_H 7 | #define STANDARD_TESTSUITE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #ifndef MAVLINK_TEST_ALL 14 | #define MAVLINK_TEST_ALL 15 | static void mavlink_test_minimal(uint8_t, uint8_t, mavlink_message_t *last_msg); 16 | static void mavlink_test_standard(uint8_t, uint8_t, mavlink_message_t *last_msg); 17 | 18 | static void mavlink_test_all(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) 19 | { 20 | mavlink_test_minimal(system_id, component_id, last_msg); 21 | mavlink_test_standard(system_id, component_id, last_msg); 22 | } 23 | #endif 24 | 25 | #include "../minimal/testsuite.h" 26 | 27 | 28 | 29 | static void mavlink_test_standard(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg) 30 | { 31 | 32 | } 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif // __cplusplus 37 | #endif // STANDARD_TESTSUITE_H 38 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_vqe_register_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_VQE_REGISTER_API_H__ 6 | #define __GK_VQE_REGISTER_API_H__ 7 | 8 | #include "type.h" 9 | #include "common.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | GK_VOID *GK_VQE_RECORD_GetHandle(GK_VOID); 18 | GK_VOID *GK_VQE_HPF_GetHandle(GK_VOID); 19 | GK_VOID *GK_VQE_AEC_GetHandle(GK_VOID); 20 | GK_VOID *GK_VQE_ANR_GetHandle(GK_VOID); 21 | GK_VOID *GK_VQE_RNR_GetHandle(GK_VOID); 22 | GK_VOID *GK_VQE_HDR_GetHandle(GK_VOID); 23 | GK_VOID *GK_VQE_DRC_GetHandle(GK_VOID); 24 | GK_VOID *GK_VQE_PEQ_GetHandle(GK_VOID); 25 | GK_VOID *GK_VQE_AGC_GetHandle(GK_VOID); 26 | GK_VOID *GK_VQE_EQ_GetHandle(GK_VOID); 27 | GK_VOID *GK_VQE_RESAMPLE_GetHandle(GK_VOID); 28 | GK_VOID *GK_VQE_GAIN_GetHandle(GK_VOID); 29 | GK_VOID *GK_VQE_TALKV2_GetHandle(GK_VOID); 30 | GK_VOID *GK_VQE_WNR_GetHandle(GK_VOID); 31 | 32 | #ifdef __cplusplus 33 | #if __cplusplus 34 | } 35 | #endif 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_dis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_DIS_H__ 6 | #define __HI_COMM_DIS_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_errno.h" 11 | #include "hi_comm_video.h" 12 | #include "comm_dis.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_ERR_DIS_NOBUF ERR_CODE_DIS_NOBUF 21 | #define HI_ERR_DIS_BUF_EMPTY ERR_CODE_DIS_BUF_EMPTY 22 | #define HI_ERR_DIS_NULL_PTR ERR_CODE_DIS_NULL_PTR 23 | #define HI_ERR_DIS_ILLEGAL_PARAM ERR_CODE_DIS_ILLEGAL_PARAM 24 | #define HI_ERR_DIS_BUF_FULL ERR_CODE_DIS_BUF_FULL 25 | #define HI_ERR_DIS_SYS_NOTREADY ERR_CODE_DIS_SYS_NOTREADY 26 | #define HI_ERR_DIS_NOT_SUPPORT ERR_CODE_DIS_NOT_SUPPORT 27 | #define HI_ERR_DIS_NOT_PERMITTED ERR_CODE_DIS_NOT_PERMITTED 28 | #define HI_ERR_DIS_BUSY ERR_CODE_DIS_BUSY 29 | #define HI_ERR_DIS_INVALID_CHNID ERR_CODE_DIS_INVALID_CHNID 30 | #define HI_ERR_DIS_CHN_UNEXIST ERR_CODE_DIS_CHN_UNEXIST 31 | 32 | #ifdef __cplusplus 33 | #if __cplusplus 34 | } 35 | #endif 36 | #endif 37 | #endif /* __HI_COMM_DIS_H__ */ 38 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_gdc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_GDC_H__ 6 | #define __HI_COMM_GDC_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_errno.h" 11 | #include "hi_comm_video.h" 12 | #include "comm_gdc.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_ERR_GDC_NOBUF ERR_CODE_GDC_NOBUF 21 | #define HI_ERR_GDC_BUF_EMPTY ERR_CODE_GDC_BUF_EMPTY 22 | #define HI_ERR_GDC_NULL_PTR ERR_CODE_GDC_NULL_PTR 23 | #define HI_ERR_GDC_ILLEGAL_PARAM ERR_CODE_GDC_ILLEGAL_PARAM 24 | #define HI_ERR_GDC_BUF_FULL ERR_CODE_GDC_BUF_FULL 25 | #define HI_ERR_GDC_SYS_NOTREADY ERR_CODE_GDC_SYS_NOTREADY 26 | #define HI_ERR_GDC_NOT_SUPPORT ERR_CODE_GDC_NOT_SUPPORT 27 | #define HI_ERR_GDC_NOT_PERMITTED ERR_CODE_GDC_NOT_PERMITTED 28 | #define HI_ERR_GDC_BUSY ERR_CODE_GDC_BUSY 29 | #define HI_ERR_GDC_INVALID_CHNID ERR_CODE_GDC_INVALID_CHNID 30 | #define HI_ERR_GDC_CHN_UNEXIST ERR_CODE_GDC_CHN_UNEXIST 31 | 32 | #ifdef __cplusplus 33 | #if __cplusplus 34 | } 35 | #endif 36 | #endif 37 | #endif /* __HI_COMM_GDC_H__ */ 38 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_audio_bcd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_AUDIO_BCD_H__ 6 | #define __HI_AUDIO_BCD_H__ 7 | 8 | #include "hi_type.h" 9 | #include "audio_bcd.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | #define HI_ERR_BCD_INVALID_HANDLE ERR_CODE_BCD_INVALID_HANDLE 18 | #define HI_ERR_BCD_MEMORY_ERROR ERR_CODE_BCD_MEMORY_ERROR 19 | #define HI_ERR_BCD_ILLEGAL_PARAM ERR_CODE_BCD_ILLEGAL_PARAM 20 | #define HI_ERR_BCD_NULL_PTR ERR_CODE_BCD_NULL_PTR 21 | #define HI_ERR_BCD_NOT_PERM ERR_CODE_BCD_NOT_PERM 22 | 23 | typedef audio_bcd_config hi_bcd_config; 24 | typedef audio_bcd_process_data hi_bcd_process_data; 25 | 26 | hi_s32 hi_baby_crying_detection_init(bcd_handle *bcd, hi_s32 sample_rate, const hi_bcd_config *bcd_config); 27 | 28 | hi_s32 hi_baby_crying_detection_process(bcd_handle bcd, hi_bcd_process_data *input_data, 29 | hi_bcd_process_data *output_data); 30 | 31 | hi_s32 hi_baby_crying_detection_deinit(bcd_handle bcd); 32 | 33 | #ifdef __cplusplus 34 | #if __cplusplus 35 | } 36 | #endif 37 | #endif 38 | #endif /* __HI_AUDIO_BCD_H__ */ 39 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_common_qr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMMON_QR_H__ 6 | #define __HI_COMMON_QR_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_errno.h" 10 | #include "common_qr.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | #define HI_QR_MAX_PAYLOAD_LEN QR_MAX_PAYLOAD_LEN 19 | #define HI_QR_STATE_DECODE_SUCCESS QR_STATE_DECODE_SUCCESS 20 | #define HI_QR_STATE_NON_EXISTENT QR_STATE_NON_EXISTENT 21 | #define HI_QR_STATE_DECODE_FAIL QR_STATE_DECODE_FAIL 22 | #define HI_QR_STATE_DATA_OVERFLOW QR_STATE_DATA_OVERFLOW 23 | #define HI_QR_STATE_BUTT QR_STATE_BUTT 24 | typedef qr_decode_state hi_qr_decode_state; 25 | #define HI_ERR_QR_ILLEGAL_PARAM ERR_CODE_QR_ILLEGAL_PARAM 26 | #define HI_ERR_QR_EXIST ERR_CODE_QR_EXIST 27 | #define HI_ERR_QR_NULL_PTR ERR_CODE_QR_NULL_PTR 28 | #define HI_ERR_QR_NO_MEM ERR_CODE_QR_NO_MEM 29 | #define HI_ERR_QR_NOT_READY ERR_CODE_QR_NOT_READY 30 | typedef qr_info hi_qr_info; 31 | typedef qr_mem_info hi_qr_mem_info; 32 | 33 | #ifdef __cplusplus 34 | #if __cplusplus 35 | } 36 | #endif 37 | #endif 38 | #endif /* __HI_COMMON_QR_H__ */ 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 OpenIPC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/hi_isp_debug.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_isp_debug.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2010/08/30 10 | Description : 11 | History : 12 | 1.Date : 2010/08/30 13 | Author : 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | 18 | #ifndef __HI_ISP_DEBUG_H__ 19 | #define __HI_ISP_DEBUG_H__ 20 | 21 | #include "hi_debug.h" 22 | #define ISP_TRACE(level, fmt, ...)\ 23 | do{ \ 24 | HI_TRACE(level, HI_ID_ISP,"[Func]:%s [Line]:%d [Info]:"fmt,__FUNCTION__, __LINE__,##__VA_ARGS__);\ 25 | }while(0) 26 | 27 | /* To avoid divide-0 exception in code. */ 28 | #define DIV_0_TO_1(a) ( ((a) == 0) ? 1 : (a) ) 29 | #define DIV_0_TO_1_FLOAT(a) ((((a) < 1E-10) && ((a) > -1E-10)) ? 1 : (a)) 30 | 31 | #endif /* __HI_ISP_DEBUG_H__ */ 32 | -------------------------------------------------------------------------------- /osd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12.4) 2 | project(osd) 3 | 4 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Os -s -Wno-address-of-packed-member") 5 | 6 | include_directories( 7 | ${CMAKE_CURRENT_LIST_DIR} 8 | ) 9 | 10 | FILE(GLOB_RECURSE UI_Sources CONFIGURE_DEPENDS ui/*.c) 11 | 12 | add_executable(osd 13 | osd.c 14 | display_fbdev.c 15 | queue.c 16 | mavlink_parser.c 17 | util.c 18 | ${UI_Sources} 19 | ) 20 | 21 | target_include_directories(osd 22 | PUBLIC 23 | ${LVGL_ROOT_DIR} 24 | ${CMAKE_CURRENT_LIST_DIR} 25 | ${CMAKE_CURRENT_LIST_DIR}/ui 26 | ${CMAKE_CURRENT_LIST_DIR}/components 27 | ${CMAKE_SOURCE_DIR}/../sdk/hi3536dv100/include 28 | ${CMAKE_SOURCE_DIR}/../vdec 29 | ${CMAKE_SOURCE_DIR} 30 | ) 31 | 32 | target_link_libraries(osd 33 | PUBLIC 34 | lvgl 35 | m 36 | osd-item-horizon 37 | pthread 38 | ) 39 | 40 | add_subdirectory(items) 41 | 42 | include(FetchContent) 43 | FetchContent_Declare( 44 | lvgl 45 | URL https://github.com/lvgl/lvgl/archive/refs/tags/v8.3.10.tar.gz 46 | ) 47 | 48 | FetchContent_MakeAvailable(lvgl) 49 | target_include_directories(lvgl PUBLIC "${CMAKE_CURRENT_LIST_DIR}") 50 | -------------------------------------------------------------------------------- /osd/queue.c: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | #include 3 | 4 | void initQueue(Queue* queue) { 5 | queue->front = 0; 6 | queue->rear = -1; 7 | queue->size = 0; 8 | pthread_mutex_init(&queue->mutex, NULL); 9 | pthread_cond_init(&queue->cond, NULL); 10 | } 11 | 12 | void enqueue(Queue* queue, Data item) { 13 | pthread_mutex_lock(&queue->mutex); 14 | 15 | while (queue->size == MAX_QUEUE_SIZE) { 16 | pthread_cond_wait(&queue->cond, &queue->mutex); 17 | } 18 | 19 | queue->rear = (queue->rear + 1) % MAX_QUEUE_SIZE; 20 | queue->data[queue->rear] = item; 21 | queue->size++; 22 | 23 | pthread_cond_signal(&queue->cond); 24 | pthread_mutex_unlock(&queue->mutex); 25 | } 26 | 27 | Data dequeue(Queue* queue) { 28 | pthread_mutex_lock(&queue->mutex); 29 | 30 | while (queue->size == 0) { 31 | pthread_cond_wait(&queue->cond, &queue->mutex); 32 | } 33 | 34 | Data item = queue->data[queue->front]; 35 | queue->front = (queue->front + 1) % MAX_QUEUE_SIZE; 36 | queue->size--; 37 | 38 | pthread_cond_signal(&queue->cond); 39 | pthread_mutex_unlock(&queue->mutex); 40 | 41 | return item; 42 | } -------------------------------------------------------------------------------- /sdk/gk7205v300/include/mpi_snap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_MPI_SNAP_H__ 6 | #define __HI_MPI_SNAP_H__ 7 | 8 | #include "hi_comm_video.h" 9 | #include "hi_comm_snap.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif /* __cplusplus */ 16 | 17 | HI_S32 HI_MPI_SNAP_SetPipeAttr(VI_PIPE ViPipe, const SNAP_ATTR_S *pstSnapAttr); 18 | HI_S32 HI_MPI_SNAP_GetPipeAttr(VI_PIPE ViPipe, SNAP_ATTR_S *pstSnapAttr); 19 | HI_S32 HI_MPI_SNAP_EnablePipe(VI_PIPE ViPipe); 20 | HI_S32 HI_MPI_SNAP_DisablePipe(VI_PIPE ViPipe); 21 | HI_S32 HI_MPI_SNAP_TriggerPipe(VI_PIPE ViPipe); 22 | 23 | HI_S32 HI_MPI_SNAP_MultiTrigger(VI_STITCH_GRP StitchGrp); 24 | 25 | /* HDR */ 26 | HI_S32 HI_MPI_SNAP_SetProSharpenParam(VI_PIPE ViPipe, const ISP_PRO_SHARPEN_PARAM_S *pstIspShpParam); 27 | HI_S32 HI_MPI_SNAP_GetProSharpenParam(VI_PIPE ViPipe, ISP_PRO_SHARPEN_PARAM_S *pstIspShpParam); 28 | HI_S32 HI_MPI_SNAP_SetProBNRParam(VI_PIPE ViPipe, const ISP_PRO_BNR_PARAM_S *pstNrParma); 29 | HI_S32 HI_MPI_SNAP_GetProBNRParam(VI_PIPE ViPipe, ISP_PRO_BNR_PARAM_S *pstNrParma); 30 | 31 | #ifdef __cplusplus 32 | #if __cplusplus 33 | } 34 | #endif 35 | #endif /* __cplusplus */ 36 | 37 | #endif /* __HI_MPI_SNAP_H__ */ 38 | 39 | 40 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/aacenc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c), 2001-2021, CHANGJIANG Tech. Co., Ltd. 3 | */ 4 | 5 | #ifndef __AACENC_H__ 6 | #define __AACENC_H__ 7 | 8 | #include "hi_type.h" 9 | #include "audio_aacenc.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | #define HI_AACENC_OK AACENC_CODE_OK 18 | #define HI_AACENC_INVALID_HANDLE AACENC_CODE_INVALID_HANDLE 19 | #define HI_AACENC_MEMORY_ERROR AACENC_CODE_MEMORY_ERROR 20 | #define HI_AACENC_UNSUPPORTED_PARAMETER AACENC_CODE_UNSUPPORTED_PARAMETER 21 | #define HI_AACENC_INVALID_CONFIG AACENC_CODE_INVALID_CONFIG 22 | #define HI_AACENC_INIT_ERROR AACENC_CODE_INIT_ERROR 23 | #define HI_AACENC_INIT_AAC_ERROR AACENC_CODE_INIT_AAC_ERROR 24 | #define HI_AACENC_INIT_SBR_ERROR AACENC_CODE_INIT_SBR_ERROR 25 | #define HI_AACENC_INIT_TP_ERROR AACENC_CODE_INIT_TP_ERROR 26 | #define HI_AACENC_INIT_META_ERROR AACENC_CODE_INIT_META_ERROR 27 | #define HI_AACENC_ENCODE_ERROR AACENC_CODE_ENCODE_ERROR 28 | #define HI_AACENC_ENCODE_EOF AACENC_CODE_ENCODE_EOF 29 | 30 | HI_S32 HI_AACENC_GetVersion(AACENC_VERSION_S *pVersion); 31 | 32 | HI_VOID *HI_AAC_SBRENC_GetHandle(HI_VOID); 33 | 34 | #ifdef __cplusplus 35 | #if __cplusplus 36 | } 37 | #endif 38 | #endif 39 | #endif /* __AACENC_H__ */ 40 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_api_snap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_API_SNAP_H__ 6 | #define __GK_API_SNAP_H__ 7 | 8 | #include "comm_video.h" 9 | #include "comm_snap.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | GK_S32 GK_API_SNAP_SetPipeAttr(VI_PIPE ViPipe, const SNAP_ATTR_S *pstSnapAttr); 18 | GK_S32 GK_API_SNAP_GetPipeAttr(VI_PIPE ViPipe, SNAP_ATTR_S *pstSnapAttr); 19 | GK_S32 GK_API_SNAP_EnablePipe(VI_PIPE ViPipe); 20 | GK_S32 GK_API_SNAP_DisablePipe(VI_PIPE ViPipe); 21 | GK_S32 GK_API_SNAP_TriggerPipe(VI_PIPE ViPipe); 22 | 23 | GK_S32 GK_API_SNAP_MultiTrigger(VI_STITCH_GRP StitchGrp); 24 | 25 | GK_S32 26 | GK_API_SNAP_SetProSharpenParam(VI_PIPE ViPipe, 27 | const ISP_PRO_SHARPEN_PARAM_S *pstIspShpParam); 28 | GK_S32 GK_API_SNAP_GetProSharpenParam(VI_PIPE ViPipe, 29 | ISP_PRO_SHARPEN_PARAM_S *pstIspShpParam); 30 | GK_S32 GK_API_SNAP_SetProBNRParam(VI_PIPE ViPipe, 31 | const ISP_PRO_BNR_PARAM_S *pstNrParma); 32 | GK_S32 GK_API_SNAP_GetProBNRParam(VI_PIPE ViPipe, 33 | ISP_PRO_BNR_PARAM_S *pstNrParma); 34 | 35 | #ifdef __cplusplus 36 | #if __cplusplus 37 | } 38 | #endif 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_vqe_register_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_VQE_REGISTER_API_H__ 6 | #define __HI_VQE_REGISTER_API_H__ 7 | 8 | #include "hi_type.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | /* VQE module function api, return pointer to handle of VQE module */ 17 | /* record */ 18 | HI_VOID *HI_VQE_RECORD_GetHandle(HI_VOID); 19 | /* HPF */ 20 | HI_VOID *HI_VQE_HPF_GetHandle(HI_VOID); 21 | /* AEC */ 22 | HI_VOID *HI_VQE_AEC_GetHandle(HI_VOID); 23 | /* ANR */ 24 | HI_VOID *HI_VQE_ANR_GetHandle(HI_VOID); 25 | /* RNR */ 26 | HI_VOID *HI_VQE_RNR_GetHandle(HI_VOID); 27 | /* HDR */ 28 | HI_VOID *HI_VQE_HDR_GetHandle(HI_VOID); 29 | /* DRC */ 30 | HI_VOID *HI_VQE_DRC_GetHandle(HI_VOID); 31 | /* PEQ */ 32 | HI_VOID *HI_VQE_PEQ_GetHandle(HI_VOID); 33 | /* AGC */ 34 | HI_VOID *HI_VQE_AGC_GetHandle(HI_VOID); 35 | /* EQ */ 36 | HI_VOID *HI_VQE_EQ_GetHandle(HI_VOID); 37 | /* RESAMPLE */ 38 | HI_VOID *HI_VQE_RESAMPLE_GetHandle(HI_VOID); 39 | /* GAIN */ 40 | HI_VOID *HI_VQE_GAIN_GetHandle(HI_VOID); 41 | /* TALKV2 */ 42 | HI_VOID *HI_VQE_TALKV2_GetHandle(HI_VOID); 43 | /* WNR */ 44 | HI_VOID *HI_VQE_WNR_GetHandle(HI_VOID); 45 | 46 | #ifdef __cplusplus 47 | #if __cplusplus 48 | } 49 | #endif 50 | #endif 51 | #endif /* __HI_VQE_REGISTER_API_H__ */ 52 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_resampler_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_RESAMPLER_API_H__ 6 | #define __HI_RESAMPLER_API_H__ 7 | 8 | #include "hi_type.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | #define HI_ERR_RESAMPLE_PREFIX ERR_RESAMPLE_PREFIX 17 | #define HI_ERR_RESAMPLE_HANDLE ERR_CODE_RESAMPLE_HANDLE 18 | #define HI_ERR_RESAMPLE_PCMBUF ERR_CODE_RESAMPLE_PCMBUF 19 | #define HI_ERR_RESAMPLE_SAMPLE_NUMBER ERR_CODE_RESAMPLE_SAMPLE_NUMBER 20 | #define HI_ERR_RESAMPLE_OUTPCM_SPACE ERR_CODE_RESAMPLE_OUTPCM_SPACE 21 | #define HI_ERR_PCM_CHANNEL ERR_CODE_PCM_CHANNEL 22 | #define HI_ERR_PCM_FORMAT ERR_CODE_PCM_FORMAT 23 | #define HI_ERR_INVALID_BYPASSFLAG ERR_CODE_INVALID_BYPASSFLAG 24 | #define HI_ERR_UNKNOWN ERR_CODE_UNKNOWN 25 | #define HI_ERR_INPUT_EMPTY_POINTER ERR_CODE_INPUT_EMPTY_POINTER 26 | 27 | HI_VOID *HI_Resampler_Create(HI_S32 s32Inrate, HI_S32 s32Outrate, HI_S32 s32Chans); 28 | 29 | HI_S32 HI_Resampler_Process(HI_VOID *inst, HI_S16 *s16Inbuf, HI_S32 s32Insamps, HI_S16 *s16Outbuf); 30 | 31 | HI_VOID HI_Resampler_Destroy(HI_VOID *inst); 32 | 33 | HI_S32 HI_Resampler_GetMaxOutputNum(HI_VOID *inst, HI_S32 s32Insamps); 34 | 35 | #ifdef __cplusplus 36 | #if __cplusplus 37 | } 38 | #endif 39 | #endif 40 | #endif /* __HI_RESAMPLER_API_H__ */ 41 | -------------------------------------------------------------------------------- /osd/queue.h: -------------------------------------------------------------------------------- 1 | #ifndef _QUEUE_H 2 | #define _QUEUE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | // Author: Dinh Cong Bang from Viet Nam 8 | #include 9 | #include 10 | #include 11 | 12 | #define MAX_QUEUE_SIZE 10 13 | #define MAX_DATA_LENGTH 100 14 | 15 | typedef enum { 16 | E_MPU = 1, 17 | E_BATTERY, 18 | E_CELL, 19 | E_CURRENT, 20 | E_CURRENT_CONSUMED, 21 | E_GPS_HDG, 22 | E_GPS_DISTANCE, 23 | E_GPS_CORDINATE, 24 | E_SATS, 25 | E_GSPEED, 26 | E_HDG, 27 | E_RSSI, 28 | E_THROTTLE, 29 | E_ARMED, 30 | E_STATUS_TEXT, 31 | E_TEMP, 32 | E_FLY_MODE 33 | } MSG_TYPE; 34 | 35 | typedef struct 36 | { 37 | float roll; 38 | float pitch; 39 | } MPUData; 40 | 41 | typedef struct 42 | { 43 | float alt; 44 | double lat; 45 | double lon; 46 | }GPSCordinates; 47 | 48 | typedef struct { 49 | MSG_TYPE id; 50 | void* data; 51 | } Data; 52 | 53 | typedef struct { 54 | Data data[MAX_QUEUE_SIZE]; 55 | int front; 56 | int rear; 57 | int size; 58 | pthread_mutex_t mutex; 59 | pthread_cond_t cond; 60 | } Queue; 61 | 62 | // Function prototypes 63 | void initQueue(Queue* queue); 64 | void enqueue(Queue* queue, Data item); 65 | Data dequeue(Queue* queue); 66 | 67 | #ifdef __cplusplus 68 | } /*extern "C"*/ 69 | #endif 70 | 71 | #endif -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_adec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_ADEC_H__ 6 | #define __HI_COMM_ADEC_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_comm_aio.h" 11 | #include "comm_adec.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | #define HI_ERR_ADEC_INVALID_DEVID ERR_CODE_ADEC_INVALID_DEVID 20 | #define HI_ERR_ADEC_INVALID_CHNID ERR_CODE_ADEC_INVALID_CHNID 21 | #define HI_ERR_ADEC_ILLEGAL_PARAM ERR_CODE_ADEC_ILLEGAL_PARAM 22 | #define HI_ERR_ADEC_EXIST ERR_CODE_ADEC_EXIST 23 | #define HI_ERR_ADEC_UNEXIST ERR_CODE_ADEC_UNEXIST 24 | #define HI_ERR_ADEC_NULL_PTR ERR_CODE_ADEC_NULL_PTR 25 | #define HI_ERR_ADEC_NOT_CONFIG ERR_CODE_ADEC_NOT_CONFIG 26 | #define HI_ERR_ADEC_NOT_SUPPORT ERR_CODE_ADEC_NOT_SUPPORT 27 | #define HI_ERR_ADEC_NOT_PERM ERR_CODE_ADEC_NOT_PERM 28 | #define HI_ERR_ADEC_NOMEM ERR_CODE_ADEC_NOMEM 29 | #define HI_ERR_ADEC_NOBUF ERR_CODE_ADEC_NOBUF 30 | #define HI_ERR_ADEC_BUF_EMPTY ERR_CODE_ADEC_BUF_EMPTY 31 | #define HI_ERR_ADEC_BUF_FULL ERR_CODE_ADEC_BUF_FULL 32 | #define HI_ERR_ADEC_SYS_NOTREADY ERR_CODE_ADEC_SYS_NOTREADY 33 | #define HI_ERR_ADEC_DECODER_ERR ERR_CODE_ADEC_DECODER_ERR 34 | #define HI_ERR_ADEC_BUF_LACK ERR_CODE_ADEC_BUF_LACK 35 | 36 | #ifdef __cplusplus 37 | #if __cplusplus 38 | } 39 | #endif 40 | #endif 41 | #endif /* __HI_COMM_ADEC_H__ */ 42 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_aenc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_AENC_H__ 6 | #define __HI_COMM_AENC_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_comm_aio.h" 11 | #include "comm_aenc.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | #define HI_ERR_AENC_INVALID_DEVID ERR_CODE_AENC_INVALID_DEVID 20 | #define HI_ERR_AENC_INVALID_CHNID ERR_CODE_AENC_INVALID_CHNID 21 | #define HI_ERR_AENC_ILLEGAL_PARAM ERR_CODE_AENC_ILLEGAL_PARAM 22 | #define HI_ERR_AENC_EXIST ERR_CODE_AENC_EXIST 23 | #define HI_ERR_AENC_UNEXIST ERR_CODE_AENC_UNEXIST 24 | #define HI_ERR_AENC_NULL_PTR ERR_CODE_AENC_NULL_PTR 25 | #define HI_ERR_AENC_NOT_CONFIG ERR_CODE_AENC_NOT_CONFIG 26 | #define HI_ERR_AENC_NOT_SUPPORT ERR_CODE_AENC_NOT_SUPPORT 27 | #define HI_ERR_AENC_NOT_PERM ERR_CODE_AENC_NOT_PERM 28 | #define HI_ERR_AENC_NOMEM ERR_CODE_AENC_NOMEM 29 | #define HI_ERR_AENC_NOBUF ERR_CODE_AENC_NOBUF 30 | #define HI_ERR_AENC_BUF_EMPTY ERR_CODE_AENC_BUF_EMPTY 31 | #define HI_ERR_AENC_BUF_FULL ERR_CODE_AENC_BUF_FULL 32 | #define HI_ERR_AENC_SYS_NOTREADY ERR_CODE_AENC_SYS_NOTREADY 33 | #define HI_ERR_AENC_ENCODER_ERR ERR_CODE_AENC_ENCODER_ERR 34 | #define HI_ERR_AENC_VQE_ERR ERR_CODE_AENC_VQE_ERR 35 | 36 | #ifdef __cplusplus 37 | #if __cplusplus 38 | } 39 | #endif 40 | #endif 41 | #endif /* __HI_COMM_AENC_H__ */ 42 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_venc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_VENC_H__ 6 | #define __HI_COMM_VENC_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_errno.h" 11 | #include "hi_comm_video.h" 12 | #include "hi_comm_rc.h" 13 | #include "hi_comm_vb.h" 14 | #include "comm_venc.h" 15 | 16 | #ifdef __cplusplus 17 | #if __cplusplus 18 | extern "C" { 19 | #endif 20 | #endif 21 | 22 | #define HI_ERR_VENC_INVALID_CHNID ERR_CODE_VENC_INVALID_CHNID 23 | #define HI_ERR_VENC_ILLEGAL_PARAM ERR_CODE_VENC_ILLEGAL_PARAM 24 | #define HI_ERR_VENC_EXIST ERR_CODE_VENC_EXIST 25 | #define HI_ERR_VENC_UNEXIST ERR_CODE_VENC_UNEXIST 26 | #define HI_ERR_VENC_NULL_PTR ERR_CODE_VENC_NULL_PTR 27 | #define HI_ERR_VENC_NOT_CONFIG ERR_CODE_VENC_NOT_CONFIG 28 | #define HI_ERR_VENC_NOT_SUPPORT ERR_CODE_VENC_NOT_SUPPORT 29 | #define HI_ERR_VENC_NOT_PERM ERR_CODE_VENC_NOT_PERM 30 | #define HI_ERR_VENC_NOMEM ERR_CODE_VENC_NOMEM 31 | #define HI_ERR_VENC_NOBUF ERR_CODE_VENC_NOBUF 32 | #define HI_ERR_VENC_BUF_EMPTY ERR_CODE_VENC_BUF_EMPTY 33 | #define HI_ERR_VENC_BUF_FULL ERR_CODE_VENC_BUF_FULL 34 | #define HI_ERR_VENC_SYS_NOTREADY ERR_CODE_VENC_SYS_NOTREADY 35 | #define HI_ERR_VENC_BUSY ERR_CODE_VENC_BUSY 36 | #define HI_VENC_MAX_SVC_RECT_NUM VENC_MAX_SVC_RECT_NUM 37 | 38 | #ifdef __cplusplus 39 | #if __cplusplus 40 | } 41 | #endif 42 | #endif 43 | #endif /* __HI_COMM_VENC_H__ */ 44 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/watchdog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef _LINUX_WATCHDOG_H 6 | #define _LINUX_WATCHDOG_H 7 | 8 | #define WATCHDOG_IOCTL_BASE 'W' 9 | 10 | struct watchdog_info { 11 | unsigned int options; 12 | unsigned int firmware_version; 13 | unsigned char identity[32]; 14 | }; 15 | 16 | #define WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info) 17 | #define WDIOC_GETSTATUS _IOR(WATCHDOG_IOCTL_BASE, 1, int) 18 | #define WDIOC_GETBOOTSTATUS _IOR(WATCHDOG_IOCTL_BASE, 2, int) 19 | #define WDIOC_SETOPTIONS _IOWR(WATCHDOG_IOCTL_BASE, 4, int) 20 | #define WDIOC_KEEPALIVE _IO(WATCHDOG_IOCTL_BASE, 5) 21 | #define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) 22 | #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) 23 | 24 | #define WDIOF_UNKNOWN -1 25 | #define WDIOS_UNKNOWN -1 26 | 27 | #define WDIOF_OVERHEAT 0x0001 28 | #define WDIOF_FANFAULT 0x0002 29 | #define WDIOF_EXTERN1 0x0004 30 | #define WDIOF_EXTERN2 0x0008 31 | #define WDIOF_POWERUNDER 0x0010 32 | #define WDIOF_CARDRESET 0x0020 33 | #define WDIOF_POWEROVER 0x0040 34 | #define WDIOF_SETTIMEOUT 0x0080 35 | #define WDIOF_MAGICCLOSE 0x0100 36 | #define WDIOF_PRETIMEOUT 0x0200 37 | #define WDIOF_KEEPALIVEPING 0x8000 38 | 39 | #define WDIOS_DISABLECARD 0x0001 40 | #define WDIOS_ENABLECARD 0x0002 41 | #define WDIOS_TEMPPANIC 0x0004 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/audio_bcd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __AUDIO_BCD_H__ 6 | #define __AUDIO_BCD_H__ 7 | 8 | #include "type.h" 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #define ERR_CODE_BCD_INVALID_HANDLE (gk_u32)(0xA0148100) 15 | #define ERR_CODE_BCD_MEMORY_ERROR (gk_u32)(0xA0148101) 16 | #define ERR_CODE_BCD_ILLEGAL_PARAM (gk_u32)(0xA0148102) 17 | #define ERR_CODE_BCD_NULL_PTR (gk_u32)(0xA0148103) 18 | #define ERR_CODE_BCD_NOT_PERM (gk_u32)(0xA0148104) 19 | 20 | typedef gk_void *bcd_handle; 21 | typedef gk_s32 (*fn_bcd_callback)(gk_void *); 22 | 23 | typedef struct { 24 | gk_bool usr_mode; 25 | gk_bool bypass; 26 | gk_u32 alarm_threshold; 27 | gk_u32 time_limit; 28 | gk_u32 time_limit_threshold_count; 29 | gk_u32 interval_time; 30 | fn_bcd_callback callback; 31 | } audio_bcd_config; 32 | 33 | typedef struct { 34 | gk_s16 *data; 35 | gk_s32 data_size; 36 | } audio_bcd_process_data; 37 | 38 | gk_s32 audio_baby_crying_detection_init(bcd_handle *bcd, gk_s32 sample_rate, 39 | const audio_bcd_config *bcd_config); 40 | 41 | gk_s32 audio_baby_crying_detection_process(bcd_handle bcd, 42 | audio_bcd_process_data *input_data, 43 | audio_bcd_process_data *output_data); 44 | 45 | gk_s32 audio_baby_crying_detection_deinit(bcd_handle bcd); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | #endif -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_region.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_REGION_H__ 6 | #define __HI_COMM_REGION_H__ 7 | 8 | #include "hi_common.h" 9 | #include "hi_comm_video.h" 10 | #include "hi_errno.h" 11 | #include "hi_defines.h" 12 | #include "comm_region.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_NOTICE_RGN_BUFFER_CHANGE NOTICE_RGN_BUFFER_CHANGE 21 | #define HI_ERR_RGN_INVALID_DEVID ERR_CODE_RGN_INVALID_DEVID 22 | #define HI_ERR_RGN_INVALID_CHNID ERR_CODE_RGN_INVALID_CHNID 23 | #define HI_ERR_RGN_ILLEGAL_PARAM ERR_CODE_RGN_ILLEGAL_PARAM 24 | #define HI_ERR_RGN_EXIST ERR_CODE_RGN_EXIST 25 | #define HI_ERR_RGN_UNEXIST ERR_CODE_RGN_UNEXIST 26 | #define HI_ERR_RGN_NULL_PTR ERR_CODE_RGN_NULL_PTR 27 | #define HI_ERR_RGN_NOT_CONFIG ERR_CODE_RGN_NOT_CONFIG 28 | #define HI_ERR_RGN_NOT_SUPPORT ERR_CODE_RGN_NOT_SUPPORT 29 | #define HI_ERR_RGN_NOT_PERM ERR_CODE_RGN_NOT_PERM 30 | #define HI_ERR_RGN_NOMEM ERR_CODE_RGN_NOMEM 31 | #define HI_ERR_RGN_NOBUF ERR_CODE_RGN_NOBUF 32 | #define HI_ERR_RGN_BUF_EMPTY ERR_CODE_RGN_BUF_EMPTY 33 | #define HI_ERR_RGN_BUF_FULL ERR_CODE_RGN_BUF_FULL 34 | #define HI_ERR_RGN_BADADDR ERR_CODE_RGN_BADADDR 35 | #define HI_ERR_RGN_BUSY ERR_CODE_RGN_BUSY 36 | #define HI_ERR_RGN_NOTREADY ERR_CODE_RGN_NOTREADY 37 | 38 | #ifdef __cplusplus 39 | #if __cplusplus 40 | } 41 | #endif 42 | #endif 43 | #endif /* __HI_COMM_REGION_H__ */ 44 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hicompat.h: -------------------------------------------------------------------------------- 1 | #ifndef HICOMPAT_H 2 | #define HICOMPAT_H 3 | 4 | #ifdef SDK_CODE 5 | #if SDK_CODE == 0x3516E200 6 | #define GK_API_ISP_SensorRegCallBack HI_MPI_ISP_SensorRegCallBack 7 | #define GK_API_ISP_SensorUnRegCallBack HI_MPI_ISP_SensorUnRegCallBack 8 | #define GK_API_AE_SensorRegCallBack HI_MPI_AE_SensorRegCallBack 9 | #define GK_API_AE_SensorUnRegCallBack HI_MPI_AE_SensorUnRegCallBack 10 | #define GK_API_AWB_SensorRegCallBack HI_MPI_AWB_SensorRegCallBack 11 | #define GK_API_AWB_SensorUnRegCallBack HI_MPI_AWB_SensorUnRegCallBack 12 | #endif 13 | 14 | GK_S32 GK_API_ISP_SensorRegCallBack(VI_PIPE ViPipe, 15 | ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 16 | ISP_SENSOR_REGISTER_S *pstRegister); 17 | GK_S32 GK_API_ISP_SensorUnRegCallBack(VI_PIPE ViPipe, SENSOR_ID SensorId); 18 | 19 | GK_S32 GK_API_AE_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, 20 | ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 21 | AE_SENSOR_REGISTER_S *pstRegister); 22 | GK_S32 GK_API_AE_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, 23 | SENSOR_ID SensorId); 24 | 25 | GK_S32 GK_API_AWB_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, 26 | ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 27 | AWB_SENSOR_REGISTER_S *pstRegister); 28 | GK_S32 GK_API_AWB_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, 29 | SENSOR_ID SensorId); 30 | #endif 31 | 32 | #endif /* HICOMPAT_H */ 33 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.h. Generated automatically by configure. */ 2 | /* jconfig.cfg --- source file edited by configure script */ 3 | /* see jconfig.doc for explanations */ 4 | 5 | #define HAVE_PROTOTYPES 6 | #define HAVE_UNSIGNED_CHAR 7 | #define HAVE_UNSIGNED_SHORT 8 | #undef void 9 | #undef const 10 | #undef CHAR_IS_UNSIGNED 11 | #define HAVE_STDDEF_H 12 | #define HAVE_STDLIB_H 13 | #undef NEED_BSD_STRINGS 14 | #undef NEED_SYS_TYPES_H 15 | #undef NEED_FAR_POINTERS 16 | #undef NEED_SHORT_EXTERNAL_NAMES 17 | /* Define this if you get warnings about undefined structures. */ 18 | #undef INCOMPLETE_TYPES_BROKEN 19 | 20 | #ifdef JPEG_INTERNALS 21 | 22 | #undef RIGHT_SHIFT_IS_UNSIGNED 23 | #define INLINE __inline__ 24 | /* These are for configuring the JPEG memory manager. */ 25 | #undef DEFAULT_MAX_MEM 26 | #undef NO_MKTEMP 27 | 28 | #endif /* JPEG_INTERNALS */ 29 | 30 | #ifdef JPEG_CJPEG_DJPEG 31 | 32 | #define BMP_SUPPORTED /* BMP image file format */ 33 | #define GIF_SUPPORTED /* GIF image file format */ 34 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 35 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 36 | #define TARGA_SUPPORTED /* Targa image file format */ 37 | 38 | #undef TWO_FILE_COMMANDLINE 39 | #undef NEED_SIGNAL_CATCHER 40 | #undef DONT_USE_B_MODE 41 | 42 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 43 | #undef PROGRESS_REPORT 44 | 45 | #endif /* JPEG_CJPEG_DJPEG */ 46 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/mpi_region.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #ifndef __HI_MPI_REGION_H__ 5 | #define __HI_MPI_REGION_H__ 6 | 7 | #include "hi_comm_region.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | HI_S32 HI_MPI_RGN_Create(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 16 | HI_S32 HI_MPI_RGN_Destroy(RGN_HANDLE Handle); 17 | 18 | HI_S32 HI_MPI_RGN_GetAttr(RGN_HANDLE Handle, RGN_ATTR_S *pstRegion); 19 | HI_S32 HI_MPI_RGN_SetAttr(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 20 | 21 | HI_S32 HI_MPI_RGN_SetBitMap(RGN_HANDLE Handle, const BITMAP_S *pstBitmap); 22 | 23 | HI_S32 HI_MPI_RGN_AttachToChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 24 | HI_S32 HI_MPI_RGN_DetachFromChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn); 25 | 26 | HI_S32 HI_MPI_RGN_SetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 27 | HI_S32 HI_MPI_RGN_GetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, RGN_CHN_ATTR_S *pstChnAttr); 28 | 29 | HI_S32 HI_MPI_RGN_GetCanvasInfo(RGN_HANDLE Handle, RGN_CANVAS_INFO_S *pstCanvasInfo); 30 | HI_S32 HI_MPI_RGN_UpdateCanvas(RGN_HANDLE Handle); 31 | 32 | HI_S32 HI_MPI_RGN_BatchBegin(RGN_HANDLEGROUP *pu32Group, HI_U32 u32Num, const RGN_HANDLE handle[]); 33 | HI_S32 HI_MPI_RGN_BatchEnd(RGN_HANDLEGROUP u32Group); 34 | 35 | HI_S32 HI_MPI_RGN_GetFd(HI_VOID); 36 | 37 | #ifdef __cplusplus 38 | #if __cplusplus 39 | } 40 | #endif 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/common_qr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef _COMMOM_QR_H_ 5 | #define _COMMOM_QR_H_ 6 | 7 | #include "type.h" 8 | #include "errcode.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | #define QR_MAX_PAYLOAD_LEN 256 17 | 18 | typedef enum { 19 | QR_STATE_DECODE_SUCCESS = 0x00, 20 | QR_STATE_NON_EXISTENT = 0x01, 21 | QR_STATE_DECODE_FAIL = 0x02, 22 | QR_STATE_DATA_OVERFLOW = 0x03, 23 | QR_STATE_BUTT 24 | } qr_decode_state; 25 | 26 | #define ERR_CODE_QR_ILLEGAL_PARAM \ 27 | DEFINE_ERR_CODE(MOD_ID_QR, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 28 | #define ERR_CODE_QR_EXIST \ 29 | DEFINE_ERR_CODE(MOD_ID_QR, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST) 30 | #define ERR_CODE_QR_NULL_PTR \ 31 | DEFINE_ERR_CODE(MOD_ID_QR, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 32 | #define ERR_CODE_QR_NO_MEM \ 33 | DEFINE_ERR_CODE(MOD_ID_QR, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM) 34 | #define ERR_CODE_QR_NOT_READY \ 35 | DEFINE_ERR_CODE(MOD_ID_QR, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 36 | 37 | typedef struct { 38 | qr_decode_state state; 39 | gk_s32 version; 40 | gk_s32 ecc_level; 41 | gk_s32 mask; 42 | gk_s32 data_type; 43 | gk_s32 payload_len; 44 | gk_u32 eci; 45 | gk_u8 payload[QR_MAX_PAYLOAD_LEN]; 46 | } qr_info; 47 | 48 | typedef struct { 49 | gk_u64 phys_addr; 50 | gk_u64 virt_addr; 51 | gk_u32 mem_size; 52 | } qr_mem_info; 53 | 54 | #ifdef __cplusplus 55 | #if __cplusplus 56 | } 57 | #endif 58 | #endif 59 | #endif 60 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/resampler_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef _RESAMPLER_API_H_ 5 | #define _RESAMPLER_API_H_ 6 | 7 | #include "type.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define MAXFRAMESIZE 2048 14 | 15 | #ifndef ERR_CODE_RESAMPLE_PREFIX 16 | #define ERR_CODE_RESAMPLE_PREFIX 0x80000000 17 | #endif 18 | 19 | #define ERR_CODE_RESAMPLE_HANDLE (ERR_CODE_RESAMPLE_PREFIX | 0x0001) 20 | 21 | #define ERR_CODE_RESAMPLE_PCMBUF (ERR_CODE_RESAMPLE_PREFIX | 0x0002) 22 | 23 | #define ERR_CODE_RESAMPLE_SAMPLE_NUMBER (ERR_CODE_RESAMPLE_PREFIX | 0x0003) 24 | 25 | #define ERR_CODE_RESAMPLE_OUTPCM_SPACE (ERR_CODE_RESAMPLE_PREFIX | 0x0004) 26 | 27 | #define ERR_CODE_PCM_CHANNEL (ERR_CODE_RESAMPLE_PREFIX | 0x0005) 28 | 29 | #define ERR_CODE_PCM_FORMAT (ERR_CODE_RESAMPLE_PREFIX | 0x0006) 30 | 31 | #define ERR_CODE_INVALID_BYPASSFLAG (ERR_CODE_RESAMPLE_PREFIX | 0x0007) 32 | 33 | #define ERR_CODE_UNKNOWN (ERR_CODE_RESAMPLE_PREFIX | 0x0008) 34 | 35 | #define ERR_CODE_INPUT_EMPTY_POINTER (ERR_CODE_RESAMPLE_PREFIX | 0x0009) 36 | 37 | GK_VOID *AUDIO_Resampler_Create(GK_S32 s32Inrate, GK_S32 s32Outrate, 38 | GK_S32 s32Chans); 39 | 40 | GK_S32 AUDIO_Resampler_Process(GK_VOID *inst, GK_S16 *s16Inbuf, 41 | GK_S32 s32Insamps, GK_S16 *s16Outbuf); 42 | 43 | GK_VOID AUDIO_Resampler_Destroy(GK_VOID *inst); 44 | 45 | GK_S32 AUDIO_Resampler_GetMaxOutputNum(GK_VOID *inst, GK_S32 s32Insamps); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_tde_errcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_TDE_ERRCODE_H__ 6 | #define __HI_TDE_ERRCODE_H__ 7 | 8 | #include "hi_type.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | #define HI_ERR_TDE_BASE ERR_CODE_TDE_BASE 17 | 18 | #define HI_ERR_TDE_DEV_NOT_OPEN ERR_CODE_TDE_DEV_NOT_OPEN 19 | #define HI_ERR_TDE_DEV_OPEN_FAILED ERR_CODE_TDE_DEV_OPEN_FAILED 20 | #define HI_ERR_TDE_NULL_PTR ERR_CODE_TDE_NULL_PTR 21 | #define HI_ERR_TDE_NO_MEM ERR_CODE_TDE_NO_MEM 22 | #define HI_ERR_TDE_INVALID_HANDLE ERR_CODE_TDE_INVALID_HANDLE 23 | #define HI_ERR_TDE_INVALID_PARA ERR_CODE_TDE_INVALID_PARA 24 | #define HI_ERR_TDE_NOT_ALIGNED ERR_CODE_TDE_NOT_ALIGNED 25 | #define HI_ERR_TDE_MINIFICATION ERR_CODE_TDE_MINIFICATION 26 | #define HI_ERR_TDE_CLIP_AREA ERR_CODE_TDE_CLIP_AREA 27 | #define HI_ERR_TDE_JOB_TIMEOUT ERR_CODE_TDE_JOB_TIMEOUT 28 | #define HI_ERR_TDE_UNSUPPORTED_OPERATION ERR_CODE_TDE_UNSUPPORTED_OPERATION 29 | #define HI_ERR_TDE_QUERY_TIMEOUT ERR_CODE_TDE_QUERY_TIMEOUT 30 | #define HI_ERR_TDE_INTERRUPT ERR_CODE_TDE_INTERRUPT 31 | 32 | #ifdef __cplusplus 33 | #if __cplusplus 34 | } 35 | #endif 36 | #endif 37 | #endif /* __HI_TDE_ERRCODE_H__ */ 38 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/errcode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __ERRNO_H__ 5 | #define __ERRNO_H__ 6 | 7 | #include "mpp_debug.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | #define ERR_CODE_APPID (0x80000000L + 0x20000000L) 16 | 17 | typedef enum ERR_LEVEL_E { 18 | EN_ERR_LEVEL_DEBUG = 0, 19 | EN_ERR_LEVEL_INFO, 20 | EN_ERR_LEVEL_NOTICE, 21 | EN_ERR_LEVEL_WARNING, 22 | EN_ERR_LEVEL_ERROR, 23 | EN_ERR_LEVEL_CRIT, 24 | EN_ERR_LEVEL_ALERT, 25 | EN_ERR_LEVEL_FATAL, 26 | EN_ERR_LEVEL_BUTT 27 | } ERR_LEVEL_E; 28 | 29 | #define DEFINE_ERR_CODE(module, level, errid) \ 30 | ((GK_S32)((ERR_CODE_APPID) | ((module) << 16) | ((level) << 13) | \ 31 | (errid))) 32 | 33 | typedef enum EN_ERR_CODE_E { 34 | EN_ERR_INVALID_DEVID = 1, 35 | EN_ERR_INVALID_CHNID = 2, 36 | EN_ERR_ILLEGAL_PARAM = 3, 37 | EN_ERR_EXIST = 4, 38 | EN_ERR_UNEXIST = 5, 39 | 40 | EN_ERR_NULL_PTR = 6, 41 | 42 | EN_ERR_NOT_CONFIG = 7, 43 | 44 | EN_ERR_NOT_SUPPORT = 8, 45 | EN_ERR_NOT_PERM = 9, 46 | EN_ERR_INVALID_PIPEID = 10, 47 | EN_ERR_INVALID_STITCHGRPID = 11, 48 | 49 | EN_ERR_NOMEM = 12, 50 | EN_ERR_NOBUF = 13, 51 | 52 | EN_ERR_BUF_EMPTY = 14, 53 | EN_ERR_BUF_FULL = 15, 54 | 55 | EN_ERR_SYS_NOTREADY = 16, 56 | 57 | EN_ERR_BADADDR = 17, 58 | 59 | EN_ERR_BUSY = 18, 60 | EN_ERR_SIZE_NOT_ENOUGH = 19, 61 | 62 | EN_ERR_BUTT = 63, 63 | } EN_ERR_CODE_E; 64 | 65 | #ifdef __cplusplus 66 | #if __cplusplus 67 | } 68 | #endif 69 | #endif 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_mipi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_MIPI_H__ 6 | #define __HI_MIPI_H__ 7 | #include "mipi.h" 8 | 9 | #define HI_MSG MSG 10 | #define HI_ERR ERR 11 | #define HI_MIPI_WDR_MODE_NONE MIPI_WDR_MODE_NONE 12 | #define HI_MIPI_WDR_MODE_VC MIPI_WDR_MODE_VC 13 | #define HI_MIPI_WDR_MODE_DT MIPI_WDR_MODE_DT 14 | #define HI_MIPI_WDR_MODE_DOL MIPI_WDR_MODE_DOL 15 | #define HI_WDR_MODE_NONE WDR_MODE_NONE 16 | #define HI_WDR_MODE_2F IN_WDR_MODE_2F 17 | #define HI_WDR_MODE_3F IN_WDR_MODE_3F 18 | #define HI_WDR_MODE_4F IN_WDR_MODE_4F 19 | #define HI_WDR_MODE_DOL_2F IN_WDR_MODE_DOL_2F 20 | #define HI_WDR_MODE_DOL_3F IN_WDR_MODE_DOL_3F 21 | #define HI_WDR_MODE_DOL_4F IN_WDR_MODE_DOL_4F 22 | #define HI_MIPI_IOC_MAGIC MIPI_IOC_MAGIC 23 | #define HI_MIPI_SET_DEV_ATTR MIPI_SET_DEV_ATTR 24 | #define HI_MIPI_SET_PHY_CMVMODE MIPI_SET_PHY_CMVMODE 25 | #define HI_MIPI_RESET_SENSOR MIPI_RESET_SENSOR 26 | #define HI_MIPI_UNRESET_SENSOR MIPI_UNRESET_SENSOR 27 | #define HI_MIPI_RESET_MIPI MIPI_RESET_MIPI 28 | #define HI_MIPI_UNRESET_MIPI MIPI_UNRESET_MIPI 29 | #define HI_MIPI_RESET_SLVS MIPI_RESET_SLVS 30 | #define HI_MIPI_UNRESET_SLVS MIPI_UNRESET_SLVS 31 | #define HI_MIPI_SET_HS_MODE MIPI_SET_HS_MODE 32 | #define HI_MIPI_ENABLE_MIPI_CLOCK MIPI_ENABLE_MIPI_CLOCK 33 | #define HI_MIPI_DISABLE_MIPI_CLOCK MIPI_DISABLE_MIPI_CLOCK 34 | #define HI_MIPI_ENABLE_SLVS_CLOCK MIPI_ENABLE_SLVS_CLOCK 35 | #define HI_MIPI_DISABLE_SLVS_CLOCK MIPI_DISABLE_SLVS_CLOCK 36 | #define HI_MIPI_ENABLE_SENSOR_CLOCK MIPI_ENABLE_SENSOR_CLOCK 37 | #define HI_MIPI_DISABLE_SENSOR_CLOCK MIPI_DISABLE_SENSOR_CLOCK 38 | 39 | #endif /* __HI_MIPI_H__ */ 40 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_api_region.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __GK_API_REGION_H__ 5 | #define __GK_API_REGION_H__ 6 | 7 | #include "comm_region.h" 8 | 9 | #ifdef __cplusplus 10 | #if __cplusplus 11 | extern "C" { 12 | #endif 13 | #endif 14 | 15 | GK_S32 GK_API_RGN_Create(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 16 | GK_S32 GK_API_RGN_Destroy(RGN_HANDLE Handle); 17 | 18 | GK_S32 GK_API_RGN_GetAttr(RGN_HANDLE Handle, RGN_ATTR_S *pstRegion); 19 | GK_S32 GK_API_RGN_SetAttr(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 20 | 21 | GK_S32 GK_API_RGN_SetBitMap(RGN_HANDLE Handle, const BITMAP_S *pstBitmap); 22 | 23 | GK_S32 GK_API_RGN_AttachToChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, 24 | const RGN_CHN_ATTR_S *pstChnAttr); 25 | GK_S32 GK_API_RGN_DetachFromChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn); 26 | 27 | GK_S32 GK_API_RGN_SetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, 28 | const RGN_CHN_ATTR_S *pstChnAttr); 29 | GK_S32 GK_API_RGN_GetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, 30 | RGN_CHN_ATTR_S *pstChnAttr); 31 | 32 | GK_S32 GK_API_RGN_GetCanvasInfo(RGN_HANDLE Handle, 33 | RGN_CANVAS_INFO_S *pstCanvasInfo); 34 | GK_S32 GK_API_RGN_UpdateCanvas(RGN_HANDLE Handle); 35 | 36 | GK_S32 GK_API_RGN_BatchBegin(RGN_HANDLEGROUP *pu32Group, GK_U32 u32Num, 37 | const RGN_HANDLE handle[]); 38 | GK_S32 GK_API_RGN_BatchEnd(RGN_HANDLEGROUP u32Group); 39 | 40 | GK_S32 GK_API_RGN_GetFd(GK_VOID); 41 | 42 | #ifdef __cplusplus 43 | #if __cplusplus 44 | } 45 | #endif 46 | #endif 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/hi_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef _HI_I2C_H 2 | #define _HI_I2C_H 3 | 4 | 5 | 6 | /* /dev/i2c-X ioctl commands. The ioctl's parameter is always an 7 | * unsigned long, except for: 8 | * - I2C_FUNCS, takes pointer to an unsigned long 9 | * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data 10 | * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data 11 | */ 12 | #define I2C_RETRIES 0x0701 /* number of times a device address should 13 | be polled when not acknowledging */ 14 | #define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ 15 | 16 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses 17 | * are NOT supported! (due to code brokenness) 18 | */ 19 | #define I2C_SLAVE 0x0703 /* Use this slave address */ 20 | #define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it 21 | is already in use by a driver! */ 22 | #define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ 23 | 24 | #define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */ 25 | 26 | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */ 27 | 28 | #define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */ 29 | #define I2C_SMBUS 0x0720 /* SMBus transfer */ 30 | #define I2C_16BIT_REG 0x0709 /* 16BIT REG WIDTH */ 31 | #define I2C_16BIT_DATA 0x070a /* 16BIT DATA WIDTH */ 32 | 33 | typedef struct hiI2C_DATA_S 34 | { 35 | unsigned char dev_addr; 36 | unsigned int reg_addr; 37 | unsigned int addr_byte_num; 38 | unsigned int data; 39 | unsigned int data_byte_num; 40 | }I2C_DATA_S; 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/mpi_region.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Hisilicon Technologies Co., Ltd. 2016-2019. All rights reserved. 3 | * Description: mpi_region.h 4 | * Author: 5 | * Create: 2016-11-15 6 | */ 7 | #ifndef __MPI_REGION_H__ 8 | #define __MPI_REGION_H__ 9 | 10 | #include "hi_comm_region.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | HI_S32 HI_MPI_RGN_Create(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 19 | HI_S32 HI_MPI_RGN_Destroy(RGN_HANDLE Handle); 20 | 21 | HI_S32 HI_MPI_RGN_GetAttr(RGN_HANDLE Handle, RGN_ATTR_S *pstRegion); 22 | HI_S32 HI_MPI_RGN_SetAttr(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 23 | 24 | HI_S32 HI_MPI_RGN_SetBitMap(RGN_HANDLE Handle, const BITMAP_S *pstBitmap); 25 | 26 | HI_S32 HI_MPI_RGN_AttachToChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 27 | HI_S32 HI_MPI_RGN_DetachFromChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn); 28 | 29 | HI_S32 HI_MPI_RGN_SetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 30 | HI_S32 HI_MPI_RGN_GetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, RGN_CHN_ATTR_S *pstChnAttr); 31 | 32 | HI_S32 HI_MPI_RGN_GetCanvasInfo(RGN_HANDLE Handle, RGN_CANVAS_INFO_S *pstCanvasInfo); 33 | HI_S32 HI_MPI_RGN_UpdateCanvas(RGN_HANDLE Handle); 34 | 35 | HI_S32 HI_MPI_RGN_BatchBegin(RGN_HANDLEGROUP *pu32Group, HI_U32 u32Num, const RGN_HANDLE handle[]); 36 | HI_S32 HI_MPI_RGN_BatchEnd(RGN_HANDLEGROUP u32Group); 37 | 38 | HI_S32 HI_MPI_RGN_GetFd(HI_VOID); 39 | 40 | #ifdef __cplusplus 41 | #if __cplusplus 42 | } 43 | #endif 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /vdec/mavlink/standard/standard.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | * @brief MAVLink comm protocol generated from standard.xml 3 | * @see http://mavlink.org 4 | */ 5 | #pragma once 6 | #ifndef MAVLINK_STANDARD_H 7 | #define MAVLINK_STANDARD_H 8 | 9 | #ifndef MAVLINK_H 10 | #error Wrong include order: MAVLINK_STANDARD.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call. 11 | #endif 12 | 13 | #define MAVLINK_STANDARD_XML_HASH 2262899478281782564 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | // MESSAGE LENGTHS AND CRCS 20 | 21 | #ifndef MAVLINK_MESSAGE_LENGTHS 22 | #define MAVLINK_MESSAGE_LENGTHS {} 23 | #endif 24 | 25 | #ifndef MAVLINK_MESSAGE_CRCS 26 | #define MAVLINK_MESSAGE_CRCS {{0, 50, 9, 9, 0, 0, 0}, {300, 217, 22, 22, 0, 0, 0}} 27 | #endif 28 | 29 | #include "../protocol.h" 30 | 31 | #define MAVLINK_ENABLED_STANDARD 32 | 33 | // ENUM DEFINITIONS 34 | 35 | 36 | 37 | // MAVLINK VERSION 38 | 39 | #ifndef MAVLINK_VERSION 40 | #define MAVLINK_VERSION 2 41 | #endif 42 | 43 | #if (MAVLINK_VERSION == 0) 44 | #undef MAVLINK_VERSION 45 | #define MAVLINK_VERSION 2 46 | #endif 47 | 48 | // MESSAGE DEFINITIONS 49 | 50 | 51 | // base include 52 | #include "../minimal/minimal.h" 53 | 54 | 55 | #if MAVLINK_STANDARD_XML_HASH == MAVLINK_PRIMARY_XML_HASH 56 | # define MAVLINK_MESSAGE_INFO {MAVLINK_MESSAGE_INFO_HEARTBEAT, MAVLINK_MESSAGE_INFO_PROTOCOL_VERSION} 57 | # define MAVLINK_MESSAGE_NAMES {{ "HEARTBEAT", 0 }, { "PROTOCOL_VERSION", 300 }} 58 | # if MAVLINK_COMMAND_24BIT 59 | # include "../mavlink_get_info.h" 60 | # endif 61 | #endif 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif // __cplusplus 66 | #endif // MAVLINK_STANDARD_H 67 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/mpi_vb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | 6 | #ifndef __HI_MPI_VB_H__ 7 | #define __HI_MPI_VB_H__ 8 | 9 | #include "hi_comm_vb.h" 10 | #include "hi_comm_video.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | VB_POOL HI_MPI_VB_CreatePool(VB_POOL_CONFIG_S *pstVbPoolCfg); 19 | HI_S32 HI_MPI_VB_DestroyPool(VB_POOL Pool); 20 | 21 | VB_BLK HI_MPI_VB_GetBlock(VB_POOL Pool, HI_U64 u64BlkSize, const HI_CHAR *pcMmzName); 22 | HI_S32 HI_MPI_VB_ReleaseBlock(VB_BLK Block); 23 | 24 | VB_BLK HI_MPI_VB_PhysAddr2Handle(HI_U64 u64PhyAddr); 25 | HI_U64 HI_MPI_VB_Handle2PhysAddr(VB_BLK Block); 26 | VB_POOL HI_MPI_VB_Handle2PoolId(VB_BLK Block); 27 | 28 | HI_S32 HI_MPI_VB_InquireUserCnt(VB_BLK Block); 29 | 30 | HI_S32 HI_MPI_VB_GetSupplementAddr(VB_BLK Block, VIDEO_SUPPLEMENT_S *pstSupplement); 31 | HI_S32 HI_MPI_VB_SetSupplementConfig(const VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 32 | HI_S32 HI_MPI_VB_GetSupplementConfig(VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 33 | 34 | HI_S32 HI_MPI_VB_Init(HI_VOID); 35 | HI_S32 HI_MPI_VB_Exit(HI_VOID); 36 | HI_S32 HI_MPI_VB_SetConfig(const VB_CONFIG_S *pstVbConfig); 37 | HI_S32 HI_MPI_VB_GetConfig(VB_CONFIG_S *pstVbConfig); 38 | 39 | HI_S32 HI_MPI_VB_MmapPool(VB_POOL Pool); 40 | HI_S32 HI_MPI_VB_MunmapPool(VB_POOL Pool); 41 | 42 | HI_S32 HI_MPI_VB_GetBlockVirAddr(VB_POOL Pool, HI_U64 u64PhyAddr, HI_VOID **ppVirAddr); 43 | 44 | HI_S32 HI_MPI_VB_InitModCommPool(VB_UID_E enVbUid); 45 | HI_S32 HI_MPI_VB_ExitModCommPool(VB_UID_E enVbUid); 46 | 47 | HI_S32 HI_MPI_VB_SetModPoolConfig(VB_UID_E enVbUid, const VB_CONFIG_S *pstVbConfig); 48 | HI_S32 HI_MPI_VB_GetModPoolConfig(VB_UID_E enVbUid, VB_CONFIG_S *pstVbConfig); 49 | 50 | #ifdef __cplusplus 51 | #if __cplusplus 52 | } 53 | #endif 54 | #endif 55 | 56 | #endif /* __HI_MPI_VI_H__ */ 57 | 58 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/mpi_adec.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : ai.c 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/6/15 10 | Description : 11 | History : 12 | 1.Date : 2009/6/19 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_ADEC_H__ 17 | #define __MPI_ADEC_H__ 18 | 19 | #include "hi_common.h" 20 | #include "hi_comm_aio.h" 21 | #include "hi_comm_adec.h" 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | #endif /* __cplusplus */ 29 | 30 | HI_S32 HI_MPI_ADEC_CreateChn(ADEC_CHN AdChn, ADEC_CHN_ATTR_S* pstAttr); 31 | HI_S32 HI_MPI_ADEC_DestroyChn(ADEC_CHN AdChn); 32 | 33 | HI_S32 HI_MPI_ADEC_SendStream(ADEC_CHN AdChn, const AUDIO_STREAM_S* pstStream, HI_BOOL bBlock); 34 | 35 | HI_S32 HI_MPI_ADEC_ClearChnBuf(ADEC_CHN AdChn); 36 | 37 | HI_S32 HI_MPI_ADEC_RegeisterDecoder(HI_S32* ps32Handle, ADEC_DECODER_S* pstDecoder); 38 | HI_S32 HI_MPI_ADEC_UnRegisterDecoder(HI_S32 s32Handle); 39 | 40 | HI_S32 HI_MPI_ADEC_GetFrame(ADEC_CHN AdChn, AUDIO_FRAME_INFO_S* pstFrmInfo, HI_BOOL bBlock); 41 | HI_S32 HI_MPI_ADEC_ReleaseFrame(ADEC_CHN AdChn, AUDIO_FRAME_INFO_S* pstFrmInfo); 42 | HI_S32 HI_MPI_ADEC_SendEndOfStream(ADEC_CHN AdChn, HI_BOOL bInstant); 43 | 44 | 45 | 46 | #ifdef __cplusplus 47 | #if __cplusplus 48 | } 49 | #endif 50 | #endif /* __cplusplus */ 51 | 52 | #endif /* __MPI_ADEC_H__ */ 53 | 54 | -------------------------------------------------------------------------------- /osd/mavlink_parser.h: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | #ifndef _MAVLINK_PARSER_H 3 | #define _MAVLINK_PARSER_H 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | typedef enum COPTER_MODE 13 | { 14 | COPTER_MODE_STABILIZE=0, 15 | COPTER_MODE_ACRO=1, 16 | COPTER_MODE_ALT_HOLD=2, 17 | COPTER_MODE_AUTO=3, 18 | COPTER_MODE_GUIDED=4, 19 | COPTER_MODE_LOITER=5, 20 | COPTER_MODE_RTL=6, 21 | COPTER_MODE_CIRCLE=7, 22 | COPTER_MODE_LAND=9, 23 | COPTER_MODE_DRIFT=11, 24 | COPTER_MODE_SPORT=13, 25 | COPTER_MODE_FLIP=14, 26 | COPTER_MODE_AUTOTUNE=15, 27 | COPTER_MODE_POSHOLD=16, 28 | COPTER_MODE_BRAKE=17, 29 | COPTER_MODE_THROW=18, 30 | COPTER_MODE_AVOID_ADSB=19, 31 | COPTER_MODE_GUIDED_NOGPS=20, 32 | COPTER_MODE_SMART_RTL=21, 33 | COPTER_MODE_ENUM_END=22 34 | } COPTER_MODE; 35 | 36 | typedef enum PLANE_MODE 37 | { 38 | PLANE_MODE_MANUAL=0, 39 | PLANE_MODE_CIRCLE=1, 40 | PLANE_MODE_STABILIZE=2, 41 | PLANE_MODE_TRAINING=3, 42 | PLANE_MODE_ACRO=4, 43 | PLANE_MODE_FLY_BY_WIRE_A=5, 44 | PLANE_MODE_FLY_BY_WIRE_B=6, 45 | PLANE_MODE_CRUISE=7, 46 | PLANE_MODE_AUTOTUNE=8, 47 | PLANE_MODE_AUTO=10, 48 | PLANE_MODE_RTL=11, 49 | PLANE_MODE_LOITER=12, 50 | PLANE_MODE_TAKEOFF=13, 51 | PLANE_MODE_AVOID_ADSB=14, 52 | PLANE_MODE_GUIDED=15, 53 | PLANE_MODE_INITIALIZING=16, 54 | PLANE_MODE_QSTABILIZE=17, 55 | PLANE_MODE_QHOVER=18, 56 | PLANE_MODE_QLOITER=19, 57 | PLANE_MODE_QLAND=20, 58 | PLANE_MODE_QRTL=21, 59 | PLANE_MODE_QAUTOTUNE=22, 60 | PLANE_MODE_ENUM_END=23, 61 | } PLANE_MODE; 62 | 63 | void* mavlink_handler(void* arg); 64 | 65 | #ifdef __cplusplus 66 | } /*extern "C"*/ 67 | #endif 68 | 69 | #endif -------------------------------------------------------------------------------- /sdk/gk7205v300/include/spi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __SPI_H__ 5 | #define __SPI_H__ 6 | 7 | typedef unsigned long long __u64; 8 | typedef unsigned int __u32; 9 | typedef unsigned short __u16; 10 | typedef unsigned char __u8; 11 | 12 | #ifdef __LITEOS__ 13 | #include 14 | #else 15 | 16 | #define SPI_CPHA 0x01 17 | #define SPI_CPOL 0x02 18 | 19 | #define SPI_MODE_0 (0 | 0) 20 | #define SPI_MODE_1 (0 | SPI_CPHA) 21 | #define SPI_MODE_2 (SPI_CPOL | 0) 22 | #define SPI_MODE_3 (SPI_CPOL | SPI_CPHA) 23 | 24 | #define SPI_CS_HIGH 0x04 25 | #define SPI_LSB_FIRST 0x08 26 | #define SPI_3WIRE 0x10 27 | #define SPI_LOOP 0x20 28 | #define SPI_NO_CS 0x40 29 | #define SPI_READY 0x80 30 | 31 | #define SPI_IOC_MAGIC 'k' 32 | 33 | struct spi_ioc_transfer { 34 | __u64 tx_buf; 35 | __u64 rx_buf; 36 | 37 | __u32 len; 38 | __u32 speed_hz; 39 | 40 | __u16 delay_usecs; 41 | __u8 bits_per_word; 42 | __u8 cs_change; 43 | __u32 pad; 44 | }; 45 | 46 | #define SPI_MSGSIZE(N) \ 47 | ((((N) * (sizeof(struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) ? \ 48 | ((N) * (sizeof(struct spi_ioc_transfer))) : \ 49 | 0) 50 | #define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)]) 51 | 52 | #define SPI_IOC_RD_MODE _IOR(SPI_IOC_MAGIC, 1, __u8) 53 | #define SPI_IOC_WR_MODE _IOW(SPI_IOC_MAGIC, 1, __u8) 54 | 55 | #define SPI_IOC_RD_LSB_FIRST _IOR(SPI_IOC_MAGIC, 2, __u8) 56 | #define SPI_IOC_WR_LSB_FIRST _IOW(SPI_IOC_MAGIC, 2, __u8) 57 | 58 | #define SPI_IOC_RD_BITS_PER_WORD _IOR(SPI_IOC_MAGIC, 3, __u8) 59 | #define SPI_IOC_WR_BITS_PER_WORD _IOW(SPI_IOC_MAGIC, 3, __u8) 60 | 61 | #define SPI_IOC_RD_MAX_SPEED_HZ _IOR(SPI_IOC_MAGIC, 4, __u32) 62 | #define SPI_IOC_WR_MAX_SPEED_HZ _IOW(SPI_IOC_MAGIC, 4, __u32) 63 | 64 | #endif 65 | #endif 66 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_api_vb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_API_VB_H__ 6 | #define __GK_API_VB_H__ 7 | 8 | #include "comm_vb.h" 9 | #include "comm_video.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | VB_POOL GK_API_VB_CreatePool(VB_POOL_CONFIG_S *pstVbPoolCfg); 18 | GK_S32 GK_API_VB_DestroyPool(VB_POOL Pool); 19 | 20 | VB_BLK GK_API_VB_GetBlock(VB_POOL Pool, GK_U64 u64BlkSize, 21 | const GK_CHAR *pcMmzName); 22 | GK_S32 GK_API_VB_ReleaseBlock(VB_BLK Block); 23 | 24 | VB_BLK GK_API_VB_PhysAddr2Handle(GK_U64 u64PhyAddr); 25 | GK_U64 GK_API_VB_Handle2PhysAddr(VB_BLK Block); 26 | VB_POOL GK_API_VB_Handle2PoolId(VB_BLK Block); 27 | 28 | GK_S32 GK_API_VB_InquireUserCnt(VB_BLK Block); 29 | 30 | GK_S32 GK_API_VB_GetSupplementAddr(VB_BLK Block, 31 | VIDEO_SUPPLEMENT_S *pstSupplement); 32 | GK_S32 GK_API_VB_SetSupplementConfig( 33 | const VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 34 | GK_S32 35 | GK_API_VB_GetSupplementConfig(VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 36 | 37 | GK_S32 GK_API_VB_Init(GK_VOID); 38 | GK_S32 GK_API_VB_Exit(GK_VOID); 39 | GK_S32 GK_API_VB_SetConfig(const VB_CONFIG_S *pstVbConfig); 40 | GK_S32 GK_API_VB_GetConfig(VB_CONFIG_S *pstVbConfig); 41 | 42 | GK_S32 GK_API_VB_MmapPool(VB_POOL Pool); 43 | GK_S32 GK_API_VB_MunmapPool(VB_POOL Pool); 44 | 45 | GK_S32 GK_API_VB_GetBlockVirAddr(VB_POOL Pool, GK_U64 u64PhyAddr, 46 | GK_VOID **ppVirAddr); 47 | 48 | GK_S32 GK_API_VB_InitModCommPool(VB_UID_E enVbUid); 49 | GK_S32 GK_API_VB_ExitModCommPool(VB_UID_E enVbUid); 50 | 51 | GK_S32 GK_API_VB_SetModPoolConfig(VB_UID_E enVbUid, 52 | const VB_CONFIG_S *pstVbConfig); 53 | GK_S32 GK_API_VB_GetModPoolConfig(VB_UID_E enVbUid, VB_CONFIG_S *pstVbConfig); 54 | 55 | #ifdef __cplusplus 56 | #if __cplusplus 57 | } 58 | #endif 59 | #endif 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_vpss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_VPSS_H__ 6 | #define __HI_COMM_VPSS_H__ 7 | 8 | #include "hi_type.h" 9 | #include "hi_common.h" 10 | #include "hi_errno.h" 11 | #include "hi_comm_video.h" 12 | #include "comm_vpss.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_ERR_VPSS_NULL_PTR ERR_CODE_VPSS_NULL_PTR 21 | #define HI_ERR_VPSS_NOTREADY ERR_CODE_VPSS_NOTREADY 22 | #define HI_ERR_VPSS_INVALID_DEVID ERR_CODE_VPSS_INVALID_DEVID 23 | #define HI_ERR_VPSS_INVALID_CHNID ERR_CODE_VPSS_INVALID_CHNID 24 | #define HI_ERR_VPSS_EXIST ERR_CODE_VPSS_EXIST 25 | #define HI_ERR_VPSS_UNEXIST ERR_CODE_VPSS_UNEXIST 26 | #define HI_ERR_VPSS_NOT_SUPPORT ERR_CODE_VPSS_NOT_SUPPORT 27 | #define HI_ERR_VPSS_NOT_PERM ERR_CODE_VPSS_NOT_PERM 28 | #define HI_ERR_VPSS_NOMEM ERR_CODE_VPSS_NOMEM 29 | #define HI_ERR_VPSS_NOBUF ERR_CODE_VPSS_NOBUF 30 | #define HI_ERR_VPSS_SIZE_NOT_ENOUGH ERR_CODE_VPSS_SIZE_NOT_ENOUGH 31 | #define HI_ERR_VPSS_ILLEGAL_PARAM ERR_CODE_VPSS_ILLEGAL_PARAM 32 | #define HI_ERR_VPSS_BUSY ERR_CODE_VPSS_BUSY 33 | #define HI_ERR_VPSS_BUF_EMPTY ERR_CODE_VPSS_BUF_EMPTY 34 | 35 | typedef tV1IEy tV56aIEy; 36 | typedef tV1SFy tV56aSFy; 37 | typedef tV1MDy tV56aMDy; 38 | typedef tV1TFy tV56aTFy; 39 | typedef tV1NRc tV56aNRc; 40 | 41 | typedef tV2_VPSS_IEy tV500_VPSS_IEy; 42 | typedef tV2_VPSS_SFy tV500_VPSS_SFy; 43 | typedef tV2_VPSS_MDy tV500_VPSS_MDy; 44 | typedef tV2_VPSS_RFs tV500_VPSS_RFs; 45 | typedef tV2_VPSS_TFy tV500_VPSS_TFy; 46 | typedef tV2_VPSS_pNRc tV500_VPSS_pNRc; 47 | typedef tV2_VPSS_NRc tV500_VPSS_NRc; 48 | 49 | typedef tV3_VPSS_IEy tV200_VPSS_IEy; 50 | typedef tV3_VPSS_SFy tV200_VPSS_SFy; 51 | typedef tV3_VPSS_MDy tV200_VPSS_MDy; 52 | typedef tV3_VPSS_TFy tV200_VPSS_TFy; 53 | typedef tV3_VPSS_NRc tV200_VPSS_NRc; 54 | 55 | #ifdef __cplusplus 56 | #if __cplusplus 57 | } 58 | #endif 59 | #endif 60 | #endif /* __HI_COMM_VPSS_H__ */ 61 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_vi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_VI_H__ 6 | #define __HI_COMM_VI_H__ 7 | 8 | #include "hi_common.h" 9 | #include "hi_errno.h" 10 | #include "hi_comm_video.h" 11 | #include "hi_comm_gdc.h" 12 | #include "comm_vi.h" 13 | 14 | #ifdef __cplusplus 15 | #if __cplusplus 16 | extern "C" { 17 | #endif 18 | #endif 19 | 20 | #define HI_ERR_VI_INVALID_PARA ERR_CODE_VI_INVALID_PARA 21 | #define HI_ERR_VI_INVALID_DEVID ERR_CODE_VI_INVALID_DEVID 22 | #define HI_ERR_VI_INVALID_PIPEID ERR_CODE_VI_INVALID_PIPEID 23 | #define HI_ERR_VI_INVALID_STITCHGRPID ERR_CODE_VI_INVALID_STITCHGRPID 24 | #define HI_ERR_VI_INVALID_CHNID ERR_CODE_VI_INVALID_CHNID 25 | #define HI_ERR_VI_INVALID_NULL_PTR ERR_CODE_VI_INVALID_NULL_PTR 26 | #define HI_ERR_VI_FAILED_NOTCONFIG ERR_CODE_VI_FAILED_NOTCONFIG 27 | #define HI_ERR_VI_SYS_NOTREADY ERR_CODE_VI_SYS_NOTREADY 28 | #define HI_ERR_VI_BUF_EMPTY ERR_CODE_VI_BUF_EMPTY 29 | #define HI_ERR_VI_BUF_FULL ERR_CODE_VI_BUF_FULL 30 | #define HI_ERR_VI_NOMEM ERR_CODE_VI_NOMEM 31 | #define HI_ERR_VI_NOT_SUPPORT ERR_CODE_VI_NOT_SUPPORT 32 | #define HI_ERR_VI_BUSY ERR_CODE_VI_BUSY 33 | #define HI_ERR_VI_NOT_PERM ERR_CODE_VI_NOT_PERM 34 | #define HI_ERR_VI_FAILED_NOTENABLE ERR_CODE_VI_FAILED_NOTENABLE 35 | #define HI_ERR_VI_FAILED_NOTDISABLE ERR_CODE_VI_FAILED_NOTDISABLE 36 | #define HI_ERR_VI_FAILED_CHNOTDISABLE ERR_CODE_VI_FAILED_CHNOTDISABLE 37 | #define HI_ERR_VI_CFG_TIMEOUT ERR_CODE_VI_CFG_TIMEOUT 38 | #define HI_ERR_VI_NORM_UNMATCH ERR_CODE_VI_NORM_UNMATCH 39 | #define HI_ERR_VI_INVALID_WAYID ERR_CODE_VI_INVALID_WAYID 40 | #define HI_ERR_VI_INVALID_PHYCHNID ERR_CODE_VI_INVALID_PHYCHNID 41 | #define HI_ERR_VI_FAILED_NOTBIND ERR_CODE_VI_FAILED_NOTBIND 42 | #define HI_ERR_VI_FAILED_BINDED ERR_CODE_VI_FAILED_BINDED 43 | #define HI_ERR_VI_PIPE_EXIST ERR_CODE_VI_PIPE_EXIST 44 | #define HI_ERR_VI_PIPE_UNEXIST ERR_CODE_VI_PIPE_UNEXIST 45 | 46 | #ifdef __cplusplus 47 | #if __cplusplus 48 | } 49 | #endif 50 | #endif 51 | #endif /* __HI_COMM_VI_H__ */ 52 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/mpi_vb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2019. All rights reserved. 3 | * Description: 4 | * Author: Hisilicon multimedia software group 5 | * Create: 2011/06/28 6 | */ 7 | 8 | 9 | #ifndef __MPI_VB_H__ 10 | #define __MPI_VB_H__ 11 | 12 | #include "hi_comm_vb.h" 13 | #include "hi_comm_video.h" 14 | 15 | #ifdef __cplusplus 16 | #if __cplusplus 17 | extern "C" { 18 | #endif 19 | #endif 20 | 21 | VB_POOL HI_MPI_VB_CreatePool(VB_POOL_CONFIG_S *pstVbPoolCfg); 22 | HI_S32 HI_MPI_VB_DestroyPool(VB_POOL Pool); 23 | 24 | VB_BLK HI_MPI_VB_GetBlock(VB_POOL Pool, HI_U64 u64BlkSize, const HI_CHAR *pcMmzName); 25 | HI_S32 HI_MPI_VB_ReleaseBlock(VB_BLK Block); 26 | 27 | VB_BLK HI_MPI_VB_PhysAddr2Handle(HI_U64 u64PhyAddr); 28 | HI_U64 HI_MPI_VB_Handle2PhysAddr(VB_BLK Block); 29 | VB_POOL HI_MPI_VB_Handle2PoolId(VB_BLK Block); 30 | 31 | HI_S32 HI_MPI_VB_InquireUserCnt(VB_BLK Block); 32 | 33 | HI_S32 HI_MPI_VB_GetSupplementAddr(VB_BLK Block, VIDEO_SUPPLEMENT_S *pstSupplement); 34 | HI_S32 HI_MPI_VB_SetSupplementConfig(const VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 35 | HI_S32 HI_MPI_VB_GetSupplementConfig(VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 36 | 37 | HI_S32 HI_MPI_VB_Init(HI_VOID); 38 | HI_S32 HI_MPI_VB_Exit(HI_VOID); 39 | HI_S32 HI_MPI_VB_SetConfig(const VB_CONFIG_S *pstVbConfig); 40 | HI_S32 HI_MPI_VB_GetConfig(VB_CONFIG_S *pstVbConfig); 41 | 42 | HI_S32 HI_MPI_VB_MmapPool(VB_POOL Pool); 43 | HI_S32 HI_MPI_VB_MunmapPool(VB_POOL Pool); 44 | 45 | HI_S32 HI_MPI_VB_GetBlockVirAddr(VB_POOL Pool, HI_U64 u64PhyAddr, HI_VOID **ppVirAddr); 46 | 47 | HI_S32 HI_MPI_VB_InitModCommPool(VB_UID_E enVbUid); 48 | HI_S32 HI_MPI_VB_ExitModCommPool(VB_UID_E enVbUid); 49 | 50 | HI_S32 HI_MPI_VB_SetModPoolConfig(VB_UID_E enVbUid, const VB_CONFIG_S *pstVbConfig); 51 | HI_S32 HI_MPI_VB_GetModPoolConfig(VB_UID_E enVbUid, VB_CONFIG_S *pstVbConfig); 52 | 53 | #ifdef __cplusplus 54 | #if __cplusplus 55 | } 56 | #endif 57 | #endif 58 | 59 | #endif /* __MPI_VI_H__ */ 60 | 61 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | pull_request: 4 | branches: 5 | - master 6 | push: 7 | branches: 8 | - master 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout source 16 | uses: actions/checkout@v4 17 | 18 | - name: Build venc/vdec 19 | run: | 20 | bash build.sh vdec 21 | bash build.sh venc-goke 22 | mv venc/venc venc/venc-goke 23 | bash build.sh venc-hisi 24 | mv venc/venc venc/venc-hisi 25 | 26 | - name: Build sample 27 | run: | 28 | sudo apt-get update 29 | sudo apt-get install musl-dev 30 | x86_64-linux-musl-gcc sample/vdec-sample.c -o vdec-sample -s -static 31 | 32 | - name: Build osd 33 | run: | 34 | bash build.sh osd 35 | 36 | - name: Upload binaries 37 | if: github.event_name != 'pull_request' 38 | uses: softprops/action-gh-release@v2 39 | with: 40 | tag_name: latest 41 | files: | 42 | vdec-sample 43 | vdec/vdec 44 | venc/venc-goke 45 | venc/venc-hisi 46 | osd/build/osd 47 | 48 | - name: Send binaries 49 | if: github.event_name != 'pull_request' 50 | run: | 51 | TG1=${{secrets.TELEGRAM_TOKEN_BOT_OPENIPC}} 52 | TG2=${{secrets.TELEGRAM_CHANNEL_OPENIPC_DEV}} 53 | SHA=$(git rev-parse --short ${GITHUB_SHA}) 54 | TGM="Commit: ${SHA}\nBranch: ${GITHUB_REF_NAME}\n\n\xE2\x9C\x85 GitHub Actions" 55 | CMD="https://api.telegram.org/bot${TG1}/sendDocument -F chat_id=${TG2}" 56 | curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@vdec/vdec 57 | curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@venc/venc-goke 58 | curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@venc/venc-hisi 59 | curl ${CMD} -F caption="$(echo -e ${TGM})" -F document=@osd/build/osd 60 | -------------------------------------------------------------------------------- /osd/osd.c: -------------------------------------------------------------------------------- 1 | #include "osd.h" 2 | #include "horizon.h" 3 | #include "ui.h" 4 | #include "queue.h" 5 | #include "mavlink_parser.h" 6 | 7 | // - Temporary buffer for LVGL 8 | #define DISPLAY_BUFFER_SIZE (1024 * 1024) 9 | lv_color_t display_buffer[DISPLAY_BUFFER_SIZE]; 10 | 11 | Queue queue; 12 | 13 | /** 14 | * @brief Entry point 15 | * @param argc - Argument count 16 | * @param argv - Array of arguments 17 | */ 18 | int main(int argc, const char* argv[]) { 19 | // - Init LVGL 20 | lv_init(); 21 | 22 | // - Initialize famebuffer 23 | fbdev_init(); 24 | 25 | // - Initialize descriptor for display buffer 26 | lv_disp_draw_buf_t display_buffer_descriptor; 27 | lv_disp_draw_buf_init(&display_buffer_descriptor, display_buffer, NULL, DISPLAY_BUFFER_SIZE); 28 | 29 | // - Initialize display driver 30 | lv_disp_drv_t display_driver; 31 | lv_disp_drv_init(&display_driver); 32 | 33 | // - Request display size 34 | fbdev_get_sizes(&display_driver.hor_res, &display_driver.ver_res, NULL); 35 | 36 | // - Register display driver 37 | display_driver.draw_buf = &display_buffer_descriptor; 38 | display_driver.flush_cb = fbdev_flush; 39 | lv_disp_drv_register(&display_driver); 40 | 41 | // - Enable transparent background 42 | lv_obj_set_style_bg_opa(lv_scr_act(), LV_OPA_TRANSP, LV_PART_MAIN); 43 | lv_disp_set_bg_opa(NULL, LV_OPA_TRANSP); 44 | 45 | 46 | initQueue(&queue); 47 | 48 | ui_init(); 49 | 50 | pthread_t ui_thread; 51 | pthread_t mavlink_thread; 52 | 53 | pthread_create(&ui_thread, NULL, ui_updating_thread, 0); 54 | pthread_create(&mavlink_thread, NULL, mavlink_handler, 0); 55 | 56 | // - Run display service in tickless mode 57 | while(1) { 58 | lv_timer_handler(); 59 | usleep(1); 60 | } 61 | 62 | return 0; 63 | } 64 | 65 | 66 | /*Set in lv_conf.h as `LV_TICK_CUSTOM_SYS_TIME_EXPR`*/ 67 | uint32_t custom_tick_get(void) { 68 | struct timespec ts; 69 | clock_gettime(CLOCK_MONOTONIC_COARSE, &ts); 70 | 71 | return ts.tv_sec * 1000 + ts.tv_nsec / 1000000; 72 | } -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_ivp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef _GK_IVP_H_ 5 | #define _GK_IVP_H_ 6 | 7 | #include "type.h" 8 | #include "errcode.h" 9 | #include "common.h" 10 | #include "comm_video.h" 11 | #include "ivp.h" 12 | 13 | #ifdef __cplusplus 14 | #if __cplusplus 15 | extern "C" { 16 | #endif 17 | #endif 18 | 19 | gk_s32 gk_ivp_init(gk_void); 20 | 21 | gk_s32 gk_ivp_deinit(gk_void); 22 | 23 | gk_s32 gk_ivp_load_resource_from_memory(const ivp_mem_info *ivp_file_mem_info, 24 | gk_s32 *ivp_handle); 25 | 26 | gk_s32 gk_ivp_unload_resource(gk_s32 ivp_handle); 27 | 28 | gk_s32 gk_ivp_set_ctrl_attr(gk_s32 ivp_handle, 29 | const ivp_ctrl_attr *_ivp_ctrl_attr); 30 | 31 | gk_s32 gk_ivp_get_ctrl_attr(gk_s32 ivp_handle, ivp_ctrl_attr *_ivp_ctrl_attr); 32 | 33 | gk_s32 gk_ivp_set_fd_ctrl_attr(gk_s32 ivp_handle, 34 | const ivp_ctrl_attr *_ivp_ctrl_attr); 35 | 36 | gk_s32 gk_ivp_get_fd_ctrl_attr(gk_s32 ivp_handle, 37 | ivp_ctrl_attr *_ivp_ctrl_attr); 38 | 39 | gk_s32 gk_ivp_set_venc_low_bitrate(gk_s32 ivp_handle, gk_s32 venc_chn, 40 | gk_bool enable); 41 | 42 | gk_s32 gk_ivp_get_venc_low_bitrate(gk_s32 ivp_handle, gk_s32 venc_chn, 43 | gk_bool *enable); 44 | 45 | gk_s32 gk_ivp_set_advance_isp(gk_s32 ivp_handle, gk_s32 vi_pipe, 46 | gk_bool enable); 47 | 48 | gk_s32 gk_ivp_get_advance_isp(gk_s32 ivp_handle, gk_s32 vi_pipe, 49 | gk_bool *enable); 50 | 51 | gk_s32 gk_ivp_set_roi_attr(gk_s32 ivp_handle, const ivp_roi_attr *roi_attr); 52 | 53 | gk_s32 gk_ivp_get_roi_attr(gk_s32 ivp_handle, ivp_roi_attr *roi_attr); 54 | 55 | gk_s32 gk_ivp_set_roi_map(gk_s32 ivp_handle, const ivp_roi_map *roi_map); 56 | 57 | gk_s32 gk_ivp_process(gk_s32 ivp_handle, const VIDEO_FRAME_INFO_S *src_frame, 58 | gk_bool *obj_alarm); 59 | 60 | gk_s32 gk_ivp_process_ex(gk_s32 ivp_handle, const VIDEO_FRAME_INFO_S *src_frame, 61 | ivp_obj_array *obj_array); 62 | 63 | #ifdef __cplusplus 64 | #if __cplusplus 65 | } 66 | #endif 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/mpi_vda.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_vda.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2013/05/09 10 | Description : 11 | History : 12 | 1.Date : 2013/05/09 13 | Author : x00100808 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_VDA_H__ 18 | #define __MPI_VDA_H__ 19 | 20 | #include "hi_comm_vda.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C"{ 25 | #endif 26 | #endif /* End of #ifdef __cplusplus */ 27 | 28 | HI_S32 HI_MPI_VDA_CreateChn(VDA_CHN VdaChn, const VDA_CHN_ATTR_S *pstAttr); 29 | HI_S32 HI_MPI_VDA_DestroyChn(VDA_CHN VdaChn); 30 | 31 | HI_S32 HI_MPI_VDA_GetChnAttr(VDA_CHN VdaChn, VDA_CHN_ATTR_S *pstAttr); 32 | HI_S32 HI_MPI_VDA_SetChnAttr(VDA_CHN VdaChn, const VDA_CHN_ATTR_S *pstAttr); 33 | 34 | HI_S32 HI_MPI_VDA_StartRecvPic(VDA_CHN VdaChn); 35 | HI_S32 HI_MPI_VDA_StopRecvPic(VDA_CHN VdaChn); 36 | 37 | HI_S32 HI_MPI_VDA_GetData(VDA_CHN VdaChn, VDA_DATA_S *pstVdaData, HI_S32 s32MilliSec); 38 | HI_S32 HI_MPI_VDA_ReleaseData(VDA_CHN VdaChn, const VDA_DATA_S* pstVdaData); 39 | 40 | HI_S32 HI_MPI_VDA_ResetOdRegion(VDA_CHN VdaChn, HI_S32 s32RgnIndex); 41 | 42 | HI_S32 HI_MPI_VDA_Query(VDA_CHN VdaChn, VDA_CHN_STAT_S *pstChnStat); 43 | 44 | HI_S32 HI_MPI_VDA_GetFd(VDA_CHN VdaChn); 45 | 46 | HI_S32 HI_MPI_VDA_UpdateRef(VDA_CHN VdaChn, const VIDEO_FRAME_INFO_S *pstRefFrame); 47 | 48 | HI_S32 HI_MPI_VDA_SendPic(VDA_CHN VdaChn, const VIDEO_FRAME_INFO_S *pstUserFrame, HI_S32 s32MilliSec); 49 | 50 | 51 | #ifdef __cplusplus 52 | #if __cplusplus 53 | } 54 | #endif 55 | #endif /* End of #ifdef __cplusplus */ 56 | 57 | #endif /* End of #ifndef __MPI_VDA_H__ */ 58 | 59 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/comm_snap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __COMM_SNAP_H__ 6 | #define __COMM_SNAP_H__ 7 | 8 | #include "common.h" 9 | #include "comm_video.h" 10 | #include "comm_isp.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | typedef enum SNAP_TYPE_E { 19 | SNAP_TYPE_NORMAL, 20 | SNAP_TYPE_PRO, 21 | SNAP_TYPE_BUTT 22 | } SNAP_TYPE_E; 23 | 24 | typedef struct SNAP_PRO_MANUAL_PARAM_S { 25 | GK_U32 au32ManExpTime[PRO_MAX_FRAME_NUM]; 26 | GK_U32 au32ManSysgain[PRO_MAX_FRAME_NUM]; 27 | } SNAP_PRO_MANUAL_PARAM_S; 28 | 29 | typedef struct SNAP_PRO_AUTO_PARAM_S { 30 | GK_U16 au16ProExpStep[PRO_MAX_FRAME_NUM]; 31 | } SNAP_PRO_AUTO_PARAM_S; 32 | 33 | typedef struct SNAP_PRO_PARAM_S { 34 | OPERATION_MODE_E enOperationMode; 35 | SNAP_PRO_AUTO_PARAM_S stAutoParam; 36 | SNAP_PRO_MANUAL_PARAM_S stManualParam; 37 | } SNAP_PRO_PARAM_S; 38 | 39 | typedef struct SNAP_NORMAL_ATTR_S { 40 | GK_U32 u32FrameCnt; 41 | GK_U32 u32RepeatSendTimes; 42 | 43 | GK_BOOL bZSL; 44 | GK_U32 u32FrameDepth; 45 | GK_U32 u32RollbackMs; 46 | GK_U32 u32Interval; 47 | } SNAP_NORMAL_ATTR_S; 48 | 49 | typedef struct SNAP_PRO_ATTR_S { 50 | GK_U32 u32FrameCnt; 51 | GK_U32 u32RepeatSendTimes; 52 | SNAP_PRO_PARAM_S stProParam; 53 | } SNAP_PRO_ATTR_S; 54 | 55 | typedef struct SNAP_USER_ATTR_S { 56 | GK_U32 u32FrameDepth; 57 | } SNAP_USER_ATTR_S; 58 | 59 | typedef struct SNAP_ATTR_S { 60 | SNAP_TYPE_E enSnapType; 61 | GK_BOOL bLoadCCM; 62 | union { 63 | SNAP_NORMAL_ATTR_S stNormalAttr; 64 | SNAP_PRO_ATTR_S stProAttr; 65 | }; 66 | } SNAP_ATTR_S; 67 | 68 | typedef struct ISP_PRO_BNR_PARAM_S { 69 | GK_BOOL bEnable; 70 | GK_U32 u32ParamNum; 71 | ISP_NR_AUTO_ATTR_S *pastNrAttr; 72 | } ISP_PRO_BNR_PARAM_S; 73 | 74 | typedef struct ISP_PRO_SHARPEN_PARAM_S { 75 | GK_BOOL bEnable; 76 | GK_U32 u32ParamNum; 77 | ISP_SHARPEN_AUTO_ATTR_S *pastShpAttr; 78 | } ISP_PRO_SHARPEN_PARAM_S; 79 | 80 | #ifdef __cplusplus 81 | #if __cplusplus 82 | } 83 | #endif 84 | #endif 85 | 86 | #endif 87 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/mpi_aenc.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : ai.c 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/6/15 10 | Description : 11 | History : 12 | 1.Date : 2009/6/15 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_AENC_H__ 17 | #define __MPI_AENC_H__ 18 | 19 | #include "hi_common.h" 20 | #include "hi_comm_aio.h" 21 | #include "hi_comm_aenc.h" 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | #endif /* __cplusplus */ 29 | 30 | #define AENC_ADAPT_MAGIC 0Xfcfcfcfc 31 | 32 | HI_S32 HI_MPI_AENC_CreateChn(AENC_CHN AeChn, const AENC_CHN_ATTR_S* pstAttr); 33 | HI_S32 HI_MPI_AENC_DestroyChn(AENC_CHN AeChn); 34 | 35 | HI_S32 HI_MPI_AENC_SendFrame(AENC_CHN AeChn, const AUDIO_FRAME_S* pstFrm, const AEC_FRAME_S* pstAecFrm); 36 | 37 | HI_S32 HI_MPI_AENC_GetStream(AENC_CHN AeChn, AUDIO_STREAM_S* pstStream, HI_S32 s32MilliSec); 38 | HI_S32 HI_MPI_AENC_ReleaseStream(AENC_CHN AeChn, const AUDIO_STREAM_S* pstStream); 39 | 40 | HI_S32 HI_MPI_AENC_GetFd(AENC_CHN AeChn); 41 | 42 | HI_S32 HI_MPI_AENC_RegeisterEncoder(HI_S32* ps32Handle, AENC_ENCODER_S* pstEncoder); 43 | HI_S32 HI_MPI_AENC_UnRegisterEncoder(HI_S32 s32Handle); 44 | 45 | HI_S32 HI_MPI_AENC_SaveFile(AENC_CHN AeChn, AUDIO_SAVE_FILE_INFO_S* pstSaveFileInfo); 46 | HI_S32 HI_MPI_AENC_QueryFileStatus(AENC_CHN AeChn, AUDIO_FILE_STATUS_S* pstFileStatus); 47 | 48 | HI_S32 HI_MPI_AENC_GetStreamBufInfo(AENC_CHN AeChn, HI_U32* pu32PhysAddr, HI_U32* pu32Size); 49 | 50 | 51 | #ifdef __cplusplus 52 | #if __cplusplus 53 | } 54 | #endif 55 | #endif /* __cplusplus */ 56 | 57 | #endif /* __MPI_AENC_H__ */ 58 | 59 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #ifndef __HI_DEBUG_H__ 5 | #define __HI_DEBUG_H__ 6 | 7 | #ifndef __KERNEL__ 8 | #include 9 | #include 10 | #endif 11 | 12 | #include "hi_type.h" 13 | #include "hi_common.h" 14 | #include "mpp_debug.h" 15 | 16 | #ifdef __cplusplus 17 | #if __cplusplus 18 | extern "C"{ 19 | #endif 20 | #endif /* __cplusplus */ 21 | 22 | #define HI_DBG_EMERG 0 /* system is unusable */ 23 | #define HI_DBG_ALERT 1 /* action must be taken immediately */ 24 | #define HI_DBG_CRIT 2 /* critical conditions */ 25 | #define HI_DBG_ERR 3 /* error conditions */ 26 | #define HI_DBG_WARN 4 /* warning conditions */ 27 | #define HI_DBG_NOTICE 5 /* normal but significant condition */ 28 | #define HI_DBG_INFO 6 /* informational */ 29 | #define HI_DBG_DEBUG 7 /* debug-level messages */ 30 | 31 | #ifndef __KERNEL__ 32 | /****************************************************************************** 33 | ** For User Mode : HI_PRINT, HI_ASSERT, HI_TRACE 34 | ******************************************************************************/ 35 | 36 | #define HI_PRINT GK_PRINT 37 | #define HI_ASSERT GK_ASSERT 38 | 39 | #define HI_TRACE MODULE_TRACE 40 | /* #ifdef HI_DEBUG */ 41 | 42 | 43 | #else 44 | /****************************************************************************** 45 | ** For Linux Kernel : HI_PRINT, HI_ASSERT, HI_TRACE 46 | ******************************************************************************/ 47 | //#include "hi_osal.h" 48 | #define HI_PRINT GK_PRINT 49 | #ifdef CONFIG_LOG_TRACE_SUPPORT 50 | #define HI_ASSERT GK_ASSERT 51 | 52 | #define HI_TRACE LOG 53 | #else 54 | #define HI_ASSERT(expr) 55 | #define HI_TRACE(level, enModId, fmt...) 56 | #endif 57 | 58 | 59 | #endif /* end of __KERNEL__ */ 60 | 61 | 62 | #define HI_PRINT_BLOCK GK_PRINT_BLOCK 63 | 64 | 65 | 66 | #ifdef __cplusplus 67 | #if __cplusplus 68 | } 69 | #endif 70 | #endif /* __cplusplus */ 71 | 72 | #endif /* __HI_DEBUG_H__ */ 73 | 74 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_api_vgs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __GK_API_VGS_H__ 6 | #define __GK_API_VGS_H__ 7 | 8 | #include "common.h" 9 | #include "comm_video.h" 10 | #include "comm_vgs.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | GK_S32 GK_API_VGS_BeginJob(VGS_HANDLE *phHandle); 19 | 20 | GK_S32 GK_API_VGS_EndJob(VGS_HANDLE hHandle); 21 | 22 | GK_S32 GK_API_VGS_CancelJob(VGS_HANDLE hHandle); 23 | 24 | GK_S32 GK_API_VGS_AddScaleTask(VGS_HANDLE hHandle, 25 | const VGS_TASK_ATTR_S *pstTask, 26 | VGS_SCLCOEF_MODE_E enScaleCoefMode); 27 | 28 | GK_S32 GK_API_VGS_AddDrawLineTask(VGS_HANDLE hHandle, 29 | const VGS_TASK_ATTR_S *pstTask, 30 | const VGS_DRAW_LINE_S *pstVgsDrawLine); 31 | 32 | GK_S32 GK_API_VGS_AddCoverTask(VGS_HANDLE hHandle, 33 | const VGS_TASK_ATTR_S *pstTask, 34 | const VGS_ADD_COVER_S *pstVgsAddCover); 35 | 36 | GK_S32 GK_API_VGS_AddOsdTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 37 | const VGS_ADD_OSD_S *pstVgsAddOsd); 38 | 39 | GK_S32 GK_API_VGS_AddDrawLineTaskArray(VGS_HANDLE hHandle, 40 | const VGS_TASK_ATTR_S *pstTask, 41 | const VGS_DRAW_LINE_S astVgsDrawLine[], 42 | GK_U32 u32ArraySize); 43 | 44 | GK_S32 GK_API_VGS_AddCoverTaskArray(VGS_HANDLE hHandle, 45 | const VGS_TASK_ATTR_S *pstTask, 46 | const VGS_ADD_COVER_S astVgsAddCover[], 47 | GK_U32 u32ArraySize); 48 | 49 | GK_S32 GK_API_VGS_AddOsdTaskArray(VGS_HANDLE hHandle, 50 | const VGS_TASK_ATTR_S *pstTask, 51 | const VGS_ADD_OSD_S astVgsAddOsd[], 52 | GK_U32 u32ArraySize); 53 | 54 | GK_S32 GK_API_VGS_AddRotationTask(VGS_HANDLE hHandle, 55 | const VGS_TASK_ATTR_S *pstTask, 56 | ROTATION_E enRotationAngle); 57 | 58 | GK_S32 GK_API_VGS_AddLumaTaskArray(VGS_HANDLE hHandle, VGS_TASK_ATTR_S *pstTask, 59 | const RECT_S astVgsLumaRect[], 60 | GK_U32 u32ArraySize, GK_U64 au64LumaData[]); 61 | 62 | #ifdef __cplusplus 63 | #if __cplusplus 64 | } 65 | #endif 66 | #endif 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /vdec/udp_stream.c: -------------------------------------------------------------------------------- 1 | #include "main.h" 2 | 3 | uint32_t frames_received = 0; 4 | static uint32_t in_nal_size = 0; 5 | 6 | uint8_t* decode_frame(uint8_t* rx_buffer, uint32_t rx_size, 7 | uint32_t header_size, uint8_t* nal_buffer, uint32_t* out_nal_size) { 8 | rx_buffer += header_size; 9 | rx_size -= header_size; 10 | 11 | // Get NAL type 12 | uint8_t fragment_type_avc = rx_buffer[0] & 0x1F; 13 | uint8_t fragment_type_hevc = (rx_buffer[0] >> 1) & 0x3F; 14 | 15 | uint8_t start_bit = 0; 16 | uint8_t end_bit = 0; 17 | uint8_t copy_size = 4; 18 | 19 | if (fragment_type_avc == 28 || fragment_type_hevc == 49) { 20 | if (fragment_type_avc == 28) { 21 | start_bit = rx_buffer[1] & 0x80; 22 | end_bit = rx_buffer[1] & 0x40; 23 | nal_buffer[4] = (rx_buffer[0] & 0xE0) | (rx_buffer[1] & 0x1F); 24 | } else { 25 | start_bit = rx_buffer[2] & 0x80; 26 | end_bit = rx_buffer[2] & 0x40; 27 | nal_buffer[4] = (rx_buffer[0] & 0x81) | (rx_buffer[2] & 0x3F) << 1; 28 | nal_buffer[5] = 1; 29 | copy_size++; 30 | rx_buffer++; 31 | rx_size--; 32 | } 33 | 34 | rx_buffer++; 35 | rx_size--; 36 | 37 | if (start_bit) { 38 | // Write NAL header 39 | nal_buffer[0] = 0; 40 | nal_buffer[1] = 0; 41 | nal_buffer[2] = 0; 42 | nal_buffer[3] = 1; 43 | 44 | // Copy data 45 | memcpy(nal_buffer + copy_size, rx_buffer, rx_size); 46 | in_nal_size = rx_size + copy_size; 47 | } else { 48 | rx_buffer++; 49 | rx_size--; 50 | memcpy(nal_buffer + in_nal_size, rx_buffer, rx_size); 51 | in_nal_size += rx_size; 52 | 53 | if (end_bit) { 54 | *out_nal_size = in_nal_size; 55 | in_nal_size = 0; 56 | frames_received++; 57 | return nal_buffer; 58 | } 59 | } 60 | 61 | return NULL; 62 | } else { 63 | // Create frame prefix 64 | rx_buffer[-4] = 0; 65 | rx_buffer[-3] = 0; 66 | rx_buffer[-2] = 0; 67 | rx_buffer[-1] = 1; 68 | 69 | *out_nal_size = rx_size + copy_size; 70 | in_nal_size = 0; 71 | 72 | // Return NAL 73 | frames_received++; 74 | return rx_buffer - copy_size; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/mpi_vgs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_MPI_VGS_H__ 6 | #define __HI_MPI_VGS_H__ 7 | 8 | #include "hi_common.h" 9 | #include "hi_comm_video.h" 10 | #include "hi_comm_vgs.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif /* __cplusplus */ 17 | 18 | HI_S32 HI_MPI_VGS_BeginJob(VGS_HANDLE *phHandle); 19 | 20 | HI_S32 HI_MPI_VGS_EndJob(VGS_HANDLE hHandle); 21 | 22 | HI_S32 HI_MPI_VGS_CancelJob(VGS_HANDLE hHandle); 23 | 24 | HI_S32 HI_MPI_VGS_AddScaleTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 25 | VGS_SCLCOEF_MODE_E enScaleCoefMode); 26 | 27 | HI_S32 HI_MPI_VGS_AddDrawLineTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 28 | const VGS_DRAW_LINE_S *pstVgsDrawLine); 29 | 30 | HI_S32 HI_MPI_VGS_AddCoverTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 31 | const VGS_ADD_COVER_S *pstVgsAddCover); 32 | 33 | HI_S32 HI_MPI_VGS_AddOsdTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 34 | const VGS_ADD_OSD_S *pstVgsAddOsd); 35 | 36 | HI_S32 HI_MPI_VGS_AddDrawLineTaskArray(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 37 | const VGS_DRAW_LINE_S astVgsDrawLine[], HI_U32 u32ArraySize); 38 | 39 | HI_S32 HI_MPI_VGS_AddCoverTaskArray(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 40 | const VGS_ADD_COVER_S astVgsAddCover[], HI_U32 u32ArraySize); 41 | 42 | HI_S32 HI_MPI_VGS_AddOsdTaskArray(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 43 | const VGS_ADD_OSD_S astVgsAddOsd[], HI_U32 u32ArraySize); 44 | 45 | HI_S32 HI_MPI_VGS_AddRotationTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, ROTATION_E enRotationAngle); 46 | 47 | HI_S32 HI_MPI_VGS_AddLumaTaskArray(VGS_HANDLE hHandle, VGS_TASK_ATTR_S *pstTask, const RECT_S astVgsLumaRect[], 48 | HI_U32 u32ArraySize, HI_U64 au64LumaData[]); 49 | 50 | #ifdef __cplusplus 51 | #if __cplusplus 52 | } 53 | #endif 54 | #endif /* __cplusplus */ 55 | 56 | #endif /* end of __HI_MPI_VGS_H__ */ 57 | 58 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/mpi_region.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_region.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2013/05/07 10 | Description : 11 | History : 12 | 1.Date : 2013/05/07 13 | Author : c00191088 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_REGION_H__ 18 | #define __MPI_REGION_H__ 19 | 20 | #include "hi_comm_region.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C"{ 25 | #endif 26 | #endif /* End of #ifdef __cplusplus */ 27 | 28 | HI_S32 HI_MPI_RGN_Create(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 29 | HI_S32 HI_MPI_RGN_Destroy(RGN_HANDLE Handle); 30 | 31 | HI_S32 HI_MPI_RGN_GetAttr(RGN_HANDLE Handle, RGN_ATTR_S *pstRegion); 32 | HI_S32 HI_MPI_RGN_SetAttr(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 33 | 34 | HI_S32 HI_MPI_RGN_SetBitMap(RGN_HANDLE Handle, const BITMAP_S *pstBitmap); 35 | 36 | HI_S32 HI_MPI_RGN_AttachToChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 37 | HI_S32 HI_MPI_RGN_DetachFromChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn); 38 | 39 | HI_S32 HI_MPI_RGN_SetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 40 | HI_S32 HI_MPI_RGN_GetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, RGN_CHN_ATTR_S *pstChnAttr); 41 | 42 | HI_S32 HI_MPI_RGN_SetAttachField(RGN_HANDLE Handle, VIDEO_FIELD_E enAttachField); 43 | HI_S32 HI_MPI_RGN_GetAttachField(RGN_HANDLE Handle, VIDEO_FIELD_E *penAttachField); 44 | 45 | HI_S32 HI_MPI_RGN_GetCanvasInfo(RGN_HANDLE Handle, RGN_CANVAS_INFO_S *pstCanvasInfo); 46 | HI_S32 HI_MPI_RGN_UpdateCanvas(RGN_HANDLE Handle); 47 | 48 | 49 | #ifdef __cplusplus 50 | #if __cplusplus 51 | } 52 | #endif 53 | #endif /* End of #ifdef __cplusplus */ 54 | 55 | #endif /* End of #ifndef __MPI_REGION_H__ */ 56 | 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![OpenIPC logo][logo] 2 | 3 | ## Simple FPV 4 | [![Telegram](https://openipc.org/images/telegram_button.svg)][telegram_fpv] 5 | 6 | [logo]: https://openipc.org/assets/openipc-logo-black.svg 7 | [telegram_fpv]: https://t.me/+BMyMoolVOpkzNWUy 8 | 9 | ## Encoder 10 | 11 | Here is an example of getting video from a GK7205V300 board using only HiMPP low level API. 12 | 13 | This example is configured and tested on an IP camera using IMX335 image sensor. 14 | If your module has another sensor, you need to adjust board configuration profile in the source code. 15 | This example includes profiles for most popular sensors. 16 | 17 | Video output format is H.264 over UDP with NAL fragmentation like in RTP, although NAL prefixes are omitted. 18 | Keep in mind that this is not a valid RTP stream! 19 | To receive and display video stream extra coding is needed. 20 | The NAL defragmentation algorithm is described in **vdec-sample.c**. 21 | 22 | ## How to build 23 | Build script usage: 24 | ```bash 25 | ./build.sh venc-goke 26 | ./build.sh venc-hisi 27 | ./build.sh vdec 28 | ``` 29 | 30 | Upload the compiled binary onto your camera: 31 | ```bash 32 | scp -O venc/venc root@192.168.1.10:/tmp 33 | ``` 34 | 35 | Stop majestic (pre-packaged streamer) and start venc: 36 | ```sh 37 | killall majestic 38 | /tmp/venc 39 | ``` 40 | 41 | ## Extra OSD 42 | 43 | | Element | Description | 44 | |-----------|-------------------| 45 | | osd_ele1 | # ALT | 46 | | osd_ele2 | # SPD | 47 | | osd_ele3 | $ VSPD | 48 | | osd_ele4 | # BATT | 49 | | osd_ele5 | # CONS | 50 | | osd_ele6 | # CURR | 51 | | osd_ele7 | # THR | 52 | | osd_ele8 | # SATS | 53 | | osd_ele9 | # HDG | 54 | | osd_ele10 | # LAT | 55 | | osd_ele11 | # LON | 56 | | osd_ele12 | # DIST | 57 | | osd_ele13 | # RSSI | 58 | | osd_ele14 | # OpenIPC Image | 59 | | osd_ele15 | # RX Packets | 60 | | osd_ele16 | # RATE | 61 | | osd_ele17 | # TIME | 62 | | osd_ele18 | # HOR | 63 | | osd_ele19 | # TEMP | 64 | 65 | 66 | 67 | ### Links 68 | * https://github.com/svpcom/wfb-ng-osd 69 | * https://github.com/grz0zrg/fbg 70 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_comm_aio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMM_AIO_H__ 6 | #define __HI_COMM_AIO_H__ 7 | 8 | #include "hi_common.h" 9 | #include "hi_errno.h" 10 | #include "comm_aio.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | #define HI_ERR_AIO_ILLEGAL_PARAM ERR_CODE_AIO_ILLEGAL_PARAM 19 | #define HI_ERR_AIO_NULL_PTR ERR_CODE_AIO_NULL_PTR 20 | #define HI_ERR_AIO_NOT_PERM ERR_CODE_AIO_NOT_PERM 21 | #define HI_ERR_AIO_REGISTER_ERR ERR_CODE_AIO_REGISTER_ERR 22 | #define HI_ERR_AI_INVALID_DEVID ERR_CODE_AI_INVALID_DEVID 23 | #define HI_ERR_AI_INVALID_CHNID ERR_CODE_AI_INVALID_CHNID 24 | #define HI_ERR_AI_ILLEGAL_PARAM ERR_CODE_AI_ILLEGAL_PARAM 25 | #define HI_ERR_AI_NULL_PTR ERR_CODE_AI_NULL_PTR 26 | #define HI_ERR_AI_NOT_CONFIG ERR_CODE_AI_NOT_CONFIG 27 | #define HI_ERR_AI_NOT_SUPPORT ERR_CODE_AI_NOT_SUPPORT 28 | #define HI_ERR_AI_NOT_PERM ERR_CODE_AI_NOT_PERM 29 | #define HI_ERR_AI_NOT_ENABLED ERR_CODE_AI_NOT_ENABLED 30 | #define HI_ERR_AI_NOMEM ERR_CODE_AI_NOMEM 31 | #define HI_ERR_AI_NOBUF ERR_CODE_AI_NOBUF 32 | #define HI_ERR_AI_BUF_EMPTY ERR_CODE_AI_BUF_EMPTY 33 | #define HI_ERR_AI_BUF_FULL ERR_CODE_AI_BUF_FULL 34 | #define HI_ERR_AI_SYS_NOTREADY ERR_CODE_AI_SYS_NOTREADY 35 | #define HI_ERR_AI_BUSY ERR_CODE_AI_BUSY 36 | #define HI_ERR_AI_VQE_ERR ERR_CODE_AI_VQE_ERR 37 | #define HI_ERR_AO_INVALID_DEVID ERR_CODE_AO_INVALID_DEVID 38 | #define HI_ERR_AO_INVALID_CHNID ERR_CODE_AO_INVALID_CHNID 39 | #define HI_ERR_AO_ILLEGAL_PARAM ERR_CODE_AO_ILLEGAL_PARAM 40 | #define HI_ERR_AO_NULL_PTR ERR_CODE_AO_NULL_PTR 41 | #define HI_ERR_AO_NOT_CONFIG ERR_CODE_AO_NOT_CONFIG 42 | #define HI_ERR_AO_NOT_SUPPORT ERR_CODE_AO_NOT_SUPPORT 43 | #define HI_ERR_AO_NOT_PERM ERR_CODE_AO_NOT_PERM 44 | #define HI_ERR_AO_NOT_ENABLED ERR_CODE_AO_NOT_ENABLED 45 | #define HI_ERR_AO_NOMEM ERR_CODE_AO_NOMEM 46 | #define HI_ERR_AO_NOBUF ERR_CODE_AO_NOBUF 47 | #define HI_ERR_AO_BUF_EMPTY ERR_CODE_AO_BUF_EMPTY 48 | #define HI_ERR_AO_BUF_FULL ERR_CODE_AO_BUF_FULL 49 | #define HI_ERR_AO_SYS_NOTREADY ERR_CODE_AO_SYS_NOTREADY 50 | #define HI_ERR_AO_BUSY ERR_CODE_AO_BUSY 51 | #define HI_ERR_AO_VQE_ERR ERR_CODE_AO_VQE_ERR 52 | 53 | #ifdef __cplusplus 54 | #if __cplusplus 55 | } 56 | #endif 57 | #endif 58 | #endif /* __HI_COMM_AIO_H__ */ 59 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/mpi_vb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_vb.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2007/10/15 10 | Description : 11 | History : 12 | 1.Date : 2007/10/15 13 | Author : c42025 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_VB_H__ 17 | #define __MPI_VB_H__ 18 | 19 | #include "hi_comm_vb.h" 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | VB_POOL HI_MPI_VB_CreatePool(HI_U32 u32BlkSize,HI_U32 u32BlkCnt,const HI_CHAR *pcMmzName); 28 | HI_S32 HI_MPI_VB_DestroyPool(VB_POOL Pool); 29 | 30 | VB_BLK HI_MPI_VB_GetBlock(VB_POOL Pool, HI_U32 u32BlkSize,const HI_CHAR *pcMmzName); 31 | HI_S32 HI_MPI_VB_ReleaseBlock(VB_BLK Block); 32 | 33 | HI_U32 HI_MPI_VB_Handle2PhysAddr(VB_BLK Block); 34 | VB_POOL HI_MPI_VB_Handle2PoolId(VB_BLK Block); 35 | HI_S32 HI_MPI_VB_InquireUserCnt(VB_BLK Block); 36 | 37 | HI_S32 HI_MPI_VB_Init(HI_VOID); 38 | HI_S32 HI_MPI_VB_Exit(HI_VOID); 39 | HI_S32 HI_MPI_VB_SetConf(const VB_CONF_S *pstVbConf); 40 | HI_S32 HI_MPI_VB_GetConf(VB_CONF_S *pstVbConf); 41 | 42 | HI_S32 HI_MPI_VB_MmapPool(VB_POOL Pool); 43 | HI_S32 HI_MPI_VB_MunmapPool(VB_POOL Pool); 44 | 45 | HI_S32 HI_MPI_VB_GetBlkVirAddr(VB_POOL Pool, HI_U32 u32PhyAddr, HI_VOID **ppVirAddr); 46 | 47 | HI_S32 HI_MPI_VB_InitModCommPool(VB_UID_E enVbUid); 48 | HI_S32 HI_MPI_VB_ExitModCommPool(VB_UID_E enVbUid); 49 | 50 | HI_S32 HI_MPI_VB_SetModPoolConf(VB_UID_E enVbUid, const VB_CONF_S *pstVbConf); 51 | HI_S32 HI_MPI_VB_GetModPoolConf(VB_UID_E enVbUid, VB_CONF_S *pstVbConf); 52 | 53 | VB_POOL HI_MPI_VB_CreateVirtualVbPool(HI_U32 u32BlkCnt, const HI_CHAR *pcMmzName); 54 | VB_BLK HI_MPI_VB_AddBlock(VB_POOL Pool , HI_U32 u32PhyAddr, HI_U32 u32Size); 55 | 56 | #ifdef __cplusplus 57 | #if __cplusplus 58 | } 59 | #endif 60 | #endif /* End of #ifdef __cplusplus */ 61 | 62 | #endif /*__MPI_VI_H__ */ 63 | 64 | -------------------------------------------------------------------------------- /osd/util.c: -------------------------------------------------------------------------------- 1 | #include "util.h" 2 | #include 3 | 4 | #define EARTH_RADIUS 6371000 // Earth radius in meters 5 | 6 | uint16_t mapu32(uint16_t x, uint16_t in_min, uint16_t in_max, uint16_t out_min, uint16_t out_max) 7 | { 8 | return ((x - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min; 9 | } 10 | 11 | float mapf(float x, float in_min, float in_max, float out_min, float out_max) 12 | { 13 | return ((x - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min; 14 | } 15 | 16 | float Rad2Deg(float x) 17 | { 18 | return x * (180.0F / M_PI); 19 | } 20 | 21 | double deg2rad(double degrees) { 22 | return degrees * M_PI / 180.0; 23 | } 24 | 25 | double calculateDistance(double lat1, double lon1, double lat2, double lon2) { 26 | // Convert degrees to radians 27 | double radLat1 = deg2rad(lat1); 28 | double radLon1 = deg2rad(lon1); 29 | double radLat2 = deg2rad(lat2); 30 | double radLon2 = deg2rad(lon2); 31 | 32 | // Calculate differences in latitude and longitude 33 | double deltaLat = radLat2 - radLat1; 34 | double deltaLon = radLon2 - radLon1; 35 | 36 | // Haversine formula 37 | double a = sin(deltaLat / 2) * sin(deltaLat / 2) + 38 | cos(radLat1) * cos(radLat2) * 39 | sin(deltaLon / 2) * sin(deltaLon / 2); 40 | double c = 2 * atan2(sqrt(a), sqrt(1 - a)); 41 | double distance = EARTH_RADIUS * c; 42 | 43 | return distance; 44 | } 45 | void uint16ToByteArray(float value, signed char* byteArray) { 46 | memcpy(byteArray, &value, sizeof(uint16_t)); 47 | } 48 | 49 | void floatToByteArray(float value, signed char* byteArray) { 50 | memcpy(byteArray, &value, sizeof(float)); 51 | } 52 | 53 | void doubleToByteArray(double value, unsigned char* byteArray) { 54 | memcpy(byteArray, &value, sizeof(double)); 55 | } 56 | 57 | float byteArrayToFloat(const signed char* byteArray) { 58 | float result; 59 | memcpy(&result, byteArray, sizeof(float)); 60 | return result; 61 | } 62 | 63 | double byteArrayToDouble(const unsigned char* byteArray) { 64 | double result; 65 | memcpy(&result, byteArray, sizeof(double)); 66 | return result; 67 | } 68 | 69 | uint16_t byteArrayToUint16(const signed char* byteArray) { 70 | uint16_t result; 71 | memcpy(&result, byteArray, sizeof(uint16_t)); 72 | return result; 73 | } -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/hi_tde_errcode.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : tde_errcode.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 2005/4/23 8 | Last Modified : 9 | Description : err code define 10 | Function List : 11 | History : May modify the code to errcode.h FOR hi3110 12 | ******************************************************************************/ 13 | #ifndef __TDE_ERRCODE_H__ 14 | #define __TDE_ERRCODE_H__ 15 | 16 | //#include "hi_debug.h" 17 | #include "hi_type.h" 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | extern "C"{ 22 | #endif 23 | #endif /* __cplusplus */ 24 | 25 | //#define HI_ID_TDE 100 26 | /* tde start err no. */ 27 | #define HI_ERR_TDE_BASE ((HI_S32)( ((0x80UL + 0x20UL)<<24) | (100 << 16 ) | (4 << 13) | 1 )) 28 | 29 | enum 30 | { 31 | HI_ERR_TDE_DEV_NOT_OPEN = HI_ERR_TDE_BASE, /**< tde device not open yet */ 32 | HI_ERR_TDE_DEV_OPEN_FAILED, /**< open tde device failed */ 33 | HI_ERR_TDE_NULL_PTR, /**< input parameters contain null ptr */ 34 | HI_ERR_TDE_NO_MEM, /**< malloc failed */ 35 | HI_ERR_TDE_INVALID_HANDLE, /**< invalid job handle */ 36 | HI_ERR_TDE_INVALID_PARA, /**< invalid parameter */ 37 | HI_ERR_TDE_NOT_ALIGNED, /**< aligned error for position, stride, width */ 38 | HI_ERR_TDE_MINIFICATION, /**< invalid minification */ 39 | HI_ERR_TDE_CLIP_AREA, /**< clip area and operation area have no intersection */ 40 | HI_ERR_TDE_JOB_TIMEOUT, /**< blocked job wait timeout */ 41 | HI_ERR_TDE_UNSUPPORTED_OPERATION, /**< unsupported operation */ 42 | HI_ERR_TDE_QUERY_TIMEOUT, /**< query time out */ 43 | HI_ERR_TDE_INTERRUPT /**< blocked job was interrupted */ 44 | }; 45 | 46 | 47 | #ifdef __cplusplus 48 | #if __cplusplus 49 | } 50 | #endif 51 | #endif /* __cplusplus */ 52 | 53 | #endif /* __TDE_ERRCODE_H__*/ 54 | 55 | 56 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/type.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __TYPE_H__ 6 | #define __TYPE_H__ 7 | 8 | #ifdef __KERNEL__ 9 | 10 | #include 11 | #else 12 | 13 | #include 14 | #endif 15 | 16 | #ifdef __cplusplus 17 | #if __cplusplus 18 | extern "C" { 19 | #endif 20 | #endif 21 | 22 | typedef unsigned char GK_UCHAR; 23 | typedef unsigned char GK_U8; 24 | typedef unsigned short GK_U16; 25 | typedef unsigned int GK_U32; 26 | typedef unsigned long GK_UL; 27 | typedef uintptr_t GK_UINTPTR_T; 28 | 29 | typedef char GK_CHAR; 30 | typedef signed char GK_S8; 31 | typedef short GK_S16; 32 | typedef int GK_S32; 33 | typedef long GK_SL; 34 | 35 | typedef float GK_FLOAT; 36 | typedef double GK_DOUBLE; 37 | 38 | #ifndef _M_IX86 39 | typedef unsigned long long GK_U64; 40 | typedef long long GK_S64; 41 | #else 42 | typedef unsigned __int64 GK_U64; 43 | typedef __int64 GK_S64; 44 | #endif 45 | 46 | typedef unsigned long GK_SIZE_T; 47 | typedef unsigned long GK_LENGTH_T; 48 | typedef long int GK_PHYS_ADDR_T; 49 | 50 | typedef unsigned int GK_HANDLE; 51 | 52 | typedef enum { 53 | GK_FALSE = 0, 54 | GK_TRUE = 1, 55 | } GK_BOOL; 56 | 57 | #ifndef NULL 58 | #define NULL 0L 59 | #endif 60 | 61 | #ifndef FALSE 62 | #define FALSE 0 63 | #endif 64 | 65 | #ifndef TRUE 66 | #define TRUE 1 67 | #endif 68 | 69 | #define GK_NULL 0L 70 | #define GK_SUCCESS 0 71 | #define GK_FAILURE (-1) 72 | 73 | #define GK_VOID void 74 | 75 | typedef unsigned char gk_uchar; 76 | typedef unsigned char gk_u8; 77 | typedef unsigned short gk_u16; 78 | typedef unsigned int gk_u32; 79 | typedef unsigned long long gk_u64; 80 | typedef unsigned long gk_ulong; 81 | 82 | typedef char gk_char; 83 | typedef signed char gk_s8; 84 | typedef short gk_s16; 85 | typedef int gk_s32; 86 | typedef long long gk_s64; 87 | typedef long gk_slong; 88 | 89 | typedef float gk_float; 90 | typedef double gk_double; 91 | 92 | typedef void gk_void; 93 | 94 | typedef unsigned long gk_size_t; 95 | typedef unsigned long gk_length_t; 96 | 97 | typedef gk_u32 gk_handle; 98 | 99 | typedef GK_BOOL gk_bool; 100 | typedef GK_UINTPTR_T gk_uintptr_t; 101 | 102 | #ifdef __cplusplus 103 | #if __cplusplus 104 | } 105 | #endif 106 | #endif 107 | 108 | #endif 109 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/mpi_vgs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Hisilicon Technologies Co., Ltd. 2016-2019. All rights reserved. 3 | * Description: mpi functions declaration 4 | * Author: Hisilicon multimedia software group 5 | * Create: 2016-07-24 6 | */ 7 | 8 | #ifndef __MPI_VGS_H__ 9 | #define __MPI_VGS_H__ 10 | 11 | #include "hi_common.h" 12 | #include "hi_comm_video.h" 13 | #include "hi_comm_vgs.h" 14 | 15 | #ifdef __cplusplus 16 | #if __cplusplus 17 | extern "C" { 18 | #endif 19 | #endif /* __cplusplus */ 20 | 21 | HI_S32 HI_MPI_VGS_BeginJob(VGS_HANDLE *phHandle); 22 | 23 | HI_S32 HI_MPI_VGS_EndJob(VGS_HANDLE hHandle); 24 | 25 | HI_S32 HI_MPI_VGS_CancelJob(VGS_HANDLE hHandle); 26 | 27 | HI_S32 HI_MPI_VGS_AddScaleTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 28 | VGS_SCLCOEF_MODE_E enScaleCoefMode); 29 | 30 | HI_S32 HI_MPI_VGS_AddDrawLineTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 31 | const VGS_DRAW_LINE_S *pstVgsDrawLine); 32 | 33 | HI_S32 HI_MPI_VGS_AddCoverTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 34 | const VGS_ADD_COVER_S *pstVgsAddCover); 35 | 36 | HI_S32 HI_MPI_VGS_AddOsdTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 37 | const VGS_ADD_OSD_S *pstVgsAddOsd); 38 | 39 | HI_S32 HI_MPI_VGS_AddDrawLineTaskArray(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 40 | const VGS_DRAW_LINE_S astVgsDrawLine[], HI_U32 u32ArraySize); 41 | 42 | HI_S32 HI_MPI_VGS_AddCoverTaskArray(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 43 | const VGS_ADD_COVER_S astVgsAddCover[], HI_U32 u32ArraySize); 44 | 45 | HI_S32 HI_MPI_VGS_AddOsdTaskArray(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, 46 | const VGS_ADD_OSD_S astVgsAddOsd[], HI_U32 u32ArraySize); 47 | 48 | HI_S32 HI_MPI_VGS_AddRotationTask(VGS_HANDLE hHandle, const VGS_TASK_ATTR_S *pstTask, ROTATION_E enRotationAngle); 49 | 50 | HI_S32 HI_MPI_VGS_AddLumaTaskArray(VGS_HANDLE hHandle, VGS_TASK_ATTR_S *pstTask, const RECT_S astVgsLumaRect[], 51 | HI_U32 u32ArraySize, HI_U64 au64LumaData[]); 52 | 53 | #ifdef __cplusplus 54 | #if __cplusplus 55 | } 56 | #endif 57 | #endif /* __cplusplus */ 58 | 59 | #endif /* end of __MPI_VGS_H__ */ 60 | 61 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_ivs_qr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #ifndef _HI_IVS_QR_H_ 5 | #define _HI_IVS_QR_H_ 6 | 7 | #include "common_qr.h" 8 | #include "hi_type.h" 9 | #include "comm_video.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C"{ 14 | #endif 15 | #endif /* End of #ifdef __cplusplus */ 16 | 17 | /* 18 | * Prototype : ivs_qr_init 19 | * Description : qr init context. 20 | * Parameters : void 21 | * Return Value : GK_SUCCESS: Success;Error codes: Failure. 22 | * Spec : 23 | * History: 24 | * 1. Date : 2019/09/02 25 | * Author : 26 | * Modification : Created function 27 | */ 28 | hi_s32 hi_ivs_qr_init(hi_void); 29 | 30 | /* 31 | * Prototype : ivs_qr_get_buf_size 32 | * Description : get qr buf size. 33 | * Parameters : hi_u32 max_img_width Max input image width 34 | * hi_u32 max_img_height Max input image height 35 | * hi_u32 *size output buffer size 36 | * Return Value : GK_SUCCESS: Success;Error codes: Failure. 37 | * Spec : 38 | * History: 39 | * 1. Date : 2019/09/02 40 | * Author : 41 | * Modification : Created function 42 | */ 43 | hi_s32 hi_ivs_qr_get_buf_size(hi_u32 max_img_width, hi_u32 max_img_height, hi_u32 *size); 44 | 45 | /* 46 | * Prototype : ivs_qr_proc 47 | * Description : qr process. 48 | * Parameters : VIDEO_FRAME_INFO_S *src_frame input frame 49 | * qr_mem_info *buf buffer 50 | * qr_info *qr_info output QR info 51 | * Return Value : GK_SUCCESS: Success;Error codes: Failure. 52 | * Spec : 53 | * History: 54 | * 1. Date : 2019/09/02 55 | * Author : 56 | * Modification : Created function 57 | */ 58 | hi_s32 hi_ivs_qr_proc(VIDEO_FRAME_INFO_S *src_frame, qr_mem_info *buf, qr_info *qr_info); 59 | 60 | /* 61 | * Prototype : ivs_qr_deinit 62 | * Description : qr deinit. 63 | * Parameters : void 64 | * Return Value : GK_SUCCESS: Success;Error codes: Failure. 65 | * Spec : 66 | * History: 67 | * 1. Date : 2019/09/02 68 | * Author : 69 | * Modification : Created function 70 | */ 71 | hi_s32 hi_ivs_qr_deinit(hi_void); 72 | 73 | #ifdef __cplusplus 74 | #if __cplusplus 75 | } 76 | #endif 77 | #endif 78 | #endif /* _HI_IVS_QR_H_ */ 79 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/mpi_awb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #ifndef __HI_MPI_AWB_H__ 5 | #define __HI_MPI_AWB_H__ 6 | 7 | #include "hi_comm_isp.h" 8 | #include "hi_comm_3a.h" 9 | #include "hi_awb_comm.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif /* End of #ifdef __cplusplus */ 16 | 17 | /* The interface of awb lib register to isp. */ 18 | HI_S32 HI_MPI_AWB_Register(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 19 | HI_S32 HI_MPI_AWB_UnRegister(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 20 | 21 | /* The callback function of sensor register to awb lib. */ 22 | HI_S32 HI_MPI_AWB_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 23 | AWB_SENSOR_REGISTER_S *pstRegister); 24 | HI_S32 HI_MPI_AWB_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, SENSOR_ID SensorId); 25 | 26 | HI_S32 HI_MPI_ISP_SetWBAttr(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr); 27 | HI_S32 HI_MPI_ISP_GetWBAttr(VI_PIPE ViPipe, ISP_WB_ATTR_S *pstWBAttr); 28 | 29 | HI_S32 HI_MPI_ISP_SetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 30 | HI_S32 HI_MPI_ISP_GetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 31 | 32 | HI_S32 HI_MPI_ISP_SetCCMAttr(VI_PIPE ViPipe, const ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 33 | HI_S32 HI_MPI_ISP_GetCCMAttr(VI_PIPE ViPipe, ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 34 | 35 | HI_S32 HI_MPI_ISP_SetSaturationAttr(VI_PIPE ViPipe, const ISP_SATURATION_ATTR_S *pstSatAttr); 36 | HI_S32 HI_MPI_ISP_GetSaturationAttr(VI_PIPE ViPipe, ISP_SATURATION_ATTR_S *pstSatAttr); 37 | 38 | HI_S32 HI_MPI_ISP_QueryWBInfo(VI_PIPE ViPipe, ISP_WB_INFO_S *pstWBInfo); 39 | HI_S32 HI_MPI_ISP_CalGainByTemp(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr, HI_U16 u16ColorTemp, HI_S16 s16Shift, HI_U16 *pu16AWBGain); 40 | HI_S32 HI_MPI_ISP_SetSpecAwbAttr(VI_PIPE ViPipe, const ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 41 | HI_S32 HI_MPI_ISP_SetCaaControlAttr(VI_PIPE ViPipe, const ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 42 | HI_S32 HI_MPI_ISP_GetCaaControlAttr(VI_PIPE ViPipe, ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 43 | HI_S32 HI_MPI_ISP_GetSpecAwbAttr(VI_PIPE ViPipe, ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 44 | HI_S32 HI_MPI_ISP_SetSpecAwbControlAttr(VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 45 | HI_S32 HI_MPI_ISP_GetSpecAwbControlAttr(VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 46 | 47 | #ifdef __cplusplus 48 | #if __cplusplus 49 | } 50 | #endif 51 | #endif /* End of #ifdef __cplusplus */ 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_api_awb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __GK_API_AWB_H__ 5 | #define __GK_API_AWB_H__ 6 | 7 | #include "comm_isp.h" 8 | #include "comm_3a.h" 9 | #include "awb_comm.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif 16 | 17 | GK_S32 GK_API_AWB_Register(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 18 | GK_S32 GK_API_AWB_UnRegister(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 19 | 20 | GK_S32 GK_API_AWB_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, 21 | ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 22 | AWB_SENSOR_REGISTER_S *pstRegister); 23 | GK_S32 GK_API_AWB_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, 24 | SENSOR_ID SensorId); 25 | 26 | GK_S32 GK_API_ISP_SetWBAttr(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr); 27 | GK_S32 GK_API_ISP_GetWBAttr(VI_PIPE ViPipe, ISP_WB_ATTR_S *pstWBAttr); 28 | 29 | GK_S32 GK_API_ISP_SetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 30 | GK_S32 GK_API_ISP_GetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 31 | 32 | GK_S32 GK_API_ISP_SetCCMAttr(VI_PIPE ViPipe, 33 | const ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 34 | GK_S32 GK_API_ISP_GetCCMAttr(VI_PIPE ViPipe, 35 | ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 36 | 37 | GK_S32 GK_API_ISP_SetSaturationAttr(VI_PIPE ViPipe, 38 | const ISP_SATURATION_ATTR_S *pstSatAttr); 39 | GK_S32 GK_API_ISP_GetSaturationAttr(VI_PIPE ViPipe, 40 | ISP_SATURATION_ATTR_S *pstSatAttr); 41 | 42 | GK_S32 GK_API_ISP_QueryWBInfo(VI_PIPE ViPipe, ISP_WB_INFO_S *pstWBInfo); 43 | GK_S32 GK_API_ISP_CalGainByTemp(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr, 44 | GK_U16 u16ColorTemp, GK_S16 s16Shift, 45 | GK_U16 *pu16AWBGain); 46 | GK_S32 GK_API_ISP_SetSpecAwbAttr(VI_PIPE ViPipe, 47 | const ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 48 | GK_S32 GK_API_ISP_SetCaaControlAttr( 49 | VI_PIPE ViPipe, const ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 50 | GK_S32 51 | GK_API_ISP_GetCaaControlAttr(VI_PIPE ViPipe, 52 | ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 53 | GK_S32 GK_API_ISP_GetSpecAwbAttr(VI_PIPE ViPipe, 54 | ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 55 | GK_S32 GK_API_ISP_SetSpecAwbControlAttr( 56 | VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 57 | GK_S32 GK_API_ISP_GetSpecAwbControlAttr( 58 | VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 59 | 60 | #ifdef __cplusplus 61 | #if __cplusplus 62 | } 63 | #endif 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /vdec/mavlink/mavlink_get_info.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef MAVLINK_USE_MESSAGE_INFO 4 | #define MAVLINK_HAVE_GET_MESSAGE_INFO 5 | 6 | /* 7 | return the message_info struct for a message 8 | */ 9 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info_by_id(uint32_t msgid) 10 | { 11 | static const mavlink_message_info_t mavlink_message_info[] = MAVLINK_MESSAGE_INFO; 12 | /* 13 | use a bisection search to find the right entry. A perfect hash may be better 14 | Note that this assumes the table is sorted with primary key msgid 15 | */ 16 | const uint32_t count = sizeof(mavlink_message_info)/sizeof(mavlink_message_info[0]); 17 | if (count == 0) { 18 | return NULL; 19 | } 20 | uint32_t low=0, high=count-1; 21 | while (low < high) { 22 | uint32_t mid = (low+high)/2; 23 | if (msgid < mavlink_message_info[mid].msgid) { 24 | high = mid; 25 | continue; 26 | } 27 | if (msgid > mavlink_message_info[mid].msgid) { 28 | low = mid+1; 29 | continue; 30 | } 31 | return &mavlink_message_info[mid]; 32 | } 33 | if (mavlink_message_info[low].msgid == msgid) { 34 | return &mavlink_message_info[low]; 35 | } 36 | return NULL; 37 | } 38 | 39 | /* 40 | return the message_info struct for a message 41 | */ 42 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info(const mavlink_message_t *msg) 43 | { 44 | return mavlink_get_message_info_by_id(msg->msgid); 45 | } 46 | 47 | /* 48 | return the message_info struct for a message 49 | */ 50 | MAVLINK_HELPER const mavlink_message_info_t *mavlink_get_message_info_by_name(const char *name) 51 | { 52 | static const struct { const char *name; uint32_t msgid; } mavlink_message_names[] = MAVLINK_MESSAGE_NAMES; 53 | /* 54 | use a bisection search to find the right entry. A perfect hash may be better 55 | Note that this assumes the table is sorted with primary key name 56 | */ 57 | const uint32_t count = sizeof(mavlink_message_names)/sizeof(mavlink_message_names[0]); 58 | if (count == 0) { 59 | return NULL; 60 | } 61 | uint32_t low=0, high=count-1; 62 | while (low < high) { 63 | uint32_t mid = (low+high)/2; 64 | int cmp = strcmp(mavlink_message_names[mid].name, name); 65 | if (cmp > 0) { 66 | high = mid; 67 | continue; 68 | } 69 | if (cmp < 0) { 70 | low = mid+1; 71 | continue; 72 | } 73 | low = mid; 74 | break; 75 | } 76 | if (strcmp(mavlink_message_names[low].name, name) == 0) { 77 | return mavlink_get_message_info_by_id(mavlink_message_names[low].msgid); 78 | } 79 | return NULL; 80 | } 81 | #endif // MAVLINK_USE_MESSAGE_INFO 82 | 83 | 84 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/hi_common_cipher.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef __HI_COMMON_CIPHER_H__ 6 | #define __HI_COMMON_CIPHER_H__ 7 | 8 | #include "common_cipher.h" 9 | 10 | #ifdef __cplusplus 11 | #if __cplusplus 12 | extern "C" { 13 | #endif 14 | #endif 15 | 16 | #define HI_ERR_CIPHER_NOT_INIT ERR_CIPHER_NOT_INIT 17 | #define HI_ERR_CIPHER_INVALID_HANDLE ERR_CIPHER_INVALID_HANDLE 18 | #define HI_ERR_CIPHER_INVALID_POINT ERR_CIPHER_INVALID_POINT 19 | #define HI_ERR_CIPHER_INVALID_PARA ERR_CIPHER_INVALID_PARA 20 | #define HI_ERR_CIPHER_FAILED_INIT ERR_CIPHER_FAILED_INIT 21 | #define HI_ERR_CIPHER_FAILED_GETHANDLE ERR_CIPHER_FAILED_GETHANDLE 22 | #define HI_ERR_CIPHER_FAILED_RELEASEHANDLE ERR_CIPHER_FAILED_RELEASEHANDLE 23 | #define HI_ERR_CIPHER_FAILED_CONFIGAES ERR_CIPHER_FAILED_CONFIGAES 24 | #define HI_ERR_CIPHER_FAILED_CONFIGDES ERR_CIPHER_FAILED_CONFIGDES 25 | #define HI_ERR_CIPHER_FAILED_ENCRYPT ERR_CIPHER_FAILED_ENCRYPT 26 | #define HI_ERR_CIPHER_FAILED_DECRYPT ERR_CIPHER_FAILED_DECRYPT 27 | #define HI_ERR_CIPHER_BUSY ERR_CIPHER_BUSY 28 | #define HI_ERR_CIPHER_NO_AVAILABLE_RNG ERR_CIPHER_NO_AVAILABLE_RNG 29 | #define HI_ERR_CIPHER_FAILED_MEM ERR_CIPHER_FAILED_MEM 30 | #define HI_ERR_CIPHER_UNAVAILABLE ERR_CIPHER_UNAVAILABLE 31 | #define HI_ERR_CIPHER_OVERFLOW ERR_CIPHER_OVERFLOW 32 | #define HI_ERR_CIPHER_HARD_STATUS ERR_CIPHER_HARD_STATUS 33 | #define HI_ERR_CIPHER_TIMEOUT ERR_CIPHER_TIMEOUT 34 | #define HI_ERR_CIPHER_UNSUPPORTED ERR_CIPHER_UNSUPPORTED 35 | #define HI_ERR_CIPHER_REGISTER_IRQ ERR_CIPHER_REGISTER_IRQ 36 | #define HI_ERR_CIPHER_ILLEGAL_UUID ERR_CIPHER_ILLEGAL_UUID 37 | #define HI_ERR_CIPHER_ILLEGAL_KEY ERR_CIPHER_ILLEGAL_KEY 38 | #define HI_ERR_CIPHER_INVALID_ADDR ERR_CIPHER_INVALID_ADDR 39 | #define HI_ERR_CIPHER_INVALID_LENGTH ERR_CIPHER_INVALID_LENGTH 40 | #define HI_ERR_CIPHER_ILLEGAL_DATA ERR_CIPHER_ILLEGAL_DATA 41 | #define HI_ERR_CIPHER_RSA_SIGN ERR_CIPHER_RSA_SIGN 42 | #define HI_ERR_CIPHER_RSA_VERIFY ERR_CIPHER_RSA_VERIFY 43 | #define HI_ERR_CIPHER_MEMSET_S_FAILED ERR_CIPHER_MEMSET_S_FAILED 44 | #define HI_ERR_CIPHER_MEMCPY_S_FAILED ERR_CIPHER_MEMCPY_S_FAILED 45 | #define HI_ERR_CIPHER_RSA_CRYPT_FAILED ERR_CIPHER_RSA_CRYPT_FAILED 46 | 47 | #ifdef __cplusplus 48 | #if __cplusplus 49 | } 50 | #endif 51 | #endif 52 | #endif /* __HI_COMMON_CIPHER_H__ */ 53 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/hi_type.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : hi_type.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 2005/4/23 8 | Last Modified : 9 | Description : The common data type defination 10 | Function List : 11 | History : 12 | 1.Date : 2008/06/28 13 | Author : c42025 14 | Modification: modified definition for HI_S8 15 | 16 | 2.Date : 2008/10/31 17 | Author : z44949 18 | Modification: Translate the chinese comment 19 | 20 | 3.Date : 2010/11/03 21 | Author : z44949 22 | Modification: Remove some unnecessary typedef 23 | 24 | 4.Date : 2011/01/05 25 | Author : p00123320 26 | Modification: Modify definition of HI_VOID, avoid C++ compiler warning. 27 | 28 | 29 | ******************************************************************************/ 30 | #ifndef __HI_TYPE_H__ 31 | #define __HI_TYPE_H__ 32 | 33 | 34 | #ifdef __cplusplus 35 | #if __cplusplus 36 | extern "C"{ 37 | #endif 38 | #endif /* __cplusplus */ 39 | 40 | /*----------------------------------------------* 41 | * The common data type, will be used in the whole project.* 42 | *----------------------------------------------*/ 43 | 44 | typedef unsigned char HI_U8; 45 | typedef unsigned short HI_U16; 46 | typedef unsigned int HI_U32; 47 | typedef float HI_FLOAT; 48 | typedef double HI_DOUBLE; 49 | typedef signed char HI_S8; 50 | typedef short HI_S16; 51 | typedef int HI_S32; 52 | 53 | 54 | #ifndef _M_IX86 55 | typedef unsigned long long HI_U64; 56 | typedef long long HI_S64; 57 | #else 58 | typedef __int64 HI_U64; 59 | typedef __int64 HI_S64; 60 | #endif 61 | 62 | typedef char HI_CHAR; 63 | #define HI_VOID void 64 | 65 | /*----------------------------------------------* 66 | * const defination * 67 | *----------------------------------------------*/ 68 | typedef enum { 69 | HI_FALSE = 0, 70 | HI_TRUE = 1, 71 | } HI_BOOL; 72 | 73 | #ifndef NULL 74 | #define NULL 0L 75 | #endif 76 | 77 | #define HI_NULL 0L 78 | #define HI_SUCCESS 0 79 | #define HI_FAILURE (-1) 80 | 81 | 82 | #ifdef __cplusplus 83 | #if __cplusplus 84 | } 85 | #endif 86 | #endif /* __cplusplus */ 87 | 88 | #endif /* __HI_TYPE_H__ */ 89 | 90 | -------------------------------------------------------------------------------- /vdec/fbg_fbdev.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2019, 2020 Julien Verneuil 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of the organization nor the 13 | names of its contributors may be used to endorse or promote products 14 | derived from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL Julien Verneuil BE LIABLE FOR ANY DIRECT, 20 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef FB_GRAPHICS_FBDEV_H 29 | #define FB_GRAPHICS_FBDEV_H 30 | 31 | #include "fbgraphics.h" 32 | #include 33 | 34 | //! fbdev wrapper data structure 35 | struct _fbg_fbdev_context { 36 | //! Framebuffer device file descriptor 37 | int fd; 38 | 39 | //! Memory-mapped framebuffer 40 | unsigned char* buffer; 41 | 42 | //! Framebuffer device var. informations 43 | struct fb_var_screeninfo vinfo; 44 | //! Framebuffer device fix. informations 45 | struct fb_fix_screeninfo finfo; 46 | 47 | //! Flag indicating that page flipping is enabled 48 | int page_flipping; 49 | }; 50 | 51 | //! initialize a FB Graphics context (framebuffer) 52 | /*! 53 | \param fb_device framebuffer device (example : /dev/fb0) 54 | \param page_flipping wether to use page flipping mechanism for double 55 | buffering (slow on some devices) \return _fbg structure pointer to pass to any 56 | FBG library functions 57 | */ 58 | extern struct _fbg* fbg_fbdevSetup(char* fb_device, int page_flipping, 59 | uint16_t screen_width, uint16_t screen_height); 60 | #endif 61 | -------------------------------------------------------------------------------- /vdec/mavlink/checksum.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(MAVLINK_USE_CXX_NAMESPACE) 4 | namespace mavlink { 5 | #elif defined(__cplusplus) 6 | extern "C" { 7 | #endif 8 | 9 | // Visual Studio versions before 2010 don't have stdint.h, so we just error out. 10 | #if (defined _MSC_VER) && (_MSC_VER < 1600) 11 | #error "The C-MAVLink implementation requires Visual Studio 2010 or greater" 12 | #endif 13 | 14 | #include 15 | 16 | /** 17 | * 18 | * CALCULATE THE CHECKSUM 19 | * 20 | */ 21 | 22 | #define X25_INIT_CRC 0xffff 23 | #define X25_VALIDATE_CRC 0xf0b8 24 | 25 | #ifndef HAVE_CRC_ACCUMULATE 26 | /** 27 | * @brief Accumulate the CRC16_MCRF4XX checksum by adding one char at a time. 28 | * 29 | * The checksum function adds the hash of one char at a time to the 30 | * 16 bit checksum (uint16_t). 31 | * 32 | * @param data new char to hash 33 | * @param crcAccum the already accumulated checksum 34 | **/ 35 | static inline void crc_accumulate(uint8_t data, uint16_t *crcAccum) 36 | { 37 | /*Accumulate one byte of data into the CRC*/ 38 | uint8_t tmp; 39 | 40 | tmp = data ^ (uint8_t)(*crcAccum &0xff); 41 | tmp ^= (tmp<<4); 42 | *crcAccum = (*crcAccum>>8) ^ (tmp<<8) ^ (tmp <<3) ^ (tmp>>4); 43 | } 44 | #endif 45 | 46 | 47 | /** 48 | * @brief Initialize the buffer for the MCRF4XX CRC16 49 | * 50 | * @param crcAccum the 16 bit MCRF4XX CRC16 51 | */ 52 | static inline void crc_init(uint16_t* crcAccum) 53 | { 54 | *crcAccum = X25_INIT_CRC; 55 | } 56 | 57 | 58 | /** 59 | * @brief Calculates the CRC16_MCRF4XX checksum on a byte buffer 60 | * 61 | * @param pBuffer buffer containing the byte array to hash 62 | * @param length length of the byte array 63 | * @return the checksum over the buffer bytes 64 | **/ 65 | static inline uint16_t crc_calculate(const uint8_t* pBuffer, uint16_t length) 66 | { 67 | uint16_t crcTmp; 68 | crc_init(&crcTmp); 69 | while (length--) { 70 | crc_accumulate(*pBuffer++, &crcTmp); 71 | } 72 | return crcTmp; 73 | } 74 | 75 | 76 | /** 77 | * @brief Accumulate the MCRF4XX CRC16 by adding an array of bytes 78 | * 79 | * The checksum function adds the hash of one char at a time to the 80 | * 16 bit checksum (uint16_t). 81 | * 82 | * @param data new bytes to hash 83 | * @param crcAccum the already accumulated checksum 84 | **/ 85 | static inline void crc_accumulate_buffer(uint16_t *crcAccum, const char *pBuffer, uint16_t length) 86 | { 87 | const uint8_t *p = (const uint8_t *)pBuffer; 88 | while (length--) { 89 | crc_accumulate(*p++, crcAccum); 90 | } 91 | } 92 | 93 | #if defined(MAVLINK_USE_CXX_NAMESPACE) || defined(__cplusplus) 94 | } 95 | #endif 96 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/mpi_hdmi.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_hdmi.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2011/12/28 10 | Description : 11 | History : 12 | 1.Date : 2011/12/28 13 | Author : 14 | Modification: Created file 15 | 2.Date : 2015/01/13 16 | Author : 17 | Modification: 1)change HI_MPI_HDMI_Init param 18 | 2)change HI_MPI_HDMI_Open param 19 | 3)add HI_MPI_HDMI_RegCallbackFunc 20 | 4)add HI_MPI_HDMI_UnRegCallbackFunc 21 | 22 | ******************************************************************************/ 23 | 24 | #ifndef __MPI_HDMI_H__ 25 | #define __MPI_HDMI_H__ 26 | 27 | #include "hi_comm_hdmi.h" 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | extern "C"{ 32 | #endif 33 | #endif /* End of #ifdef __cplusplus */ 34 | 35 | 36 | HI_S32 HI_MPI_HDMI_Init(HI_VOID); 37 | HI_S32 HI_MPI_HDMI_DeInit(HI_VOID); 38 | 39 | HI_S32 HI_MPI_HDMI_Open(HI_HDMI_ID_E enHdmi); 40 | HI_S32 HI_MPI_HDMI_Close(HI_HDMI_ID_E enHdmi); 41 | HI_S32 HI_MPI_HDMI_GetSinkCapability(HI_HDMI_ID_E enHdmi, HI_HDMI_SINK_CAPABILITY_S *pstSinkCap); 42 | HI_S32 HI_MPI_HDMI_SetAttr(HI_HDMI_ID_E enHdmi, HI_HDMI_ATTR_S *pstAttr); 43 | HI_S32 HI_MPI_HDMI_GetAttr(HI_HDMI_ID_E enHdmi, HI_HDMI_ATTR_S *pstAttr); 44 | HI_S32 HI_MPI_HDMI_Start(HI_HDMI_ID_E enHdmi); 45 | HI_S32 HI_MPI_HDMI_Stop(HI_HDMI_ID_E enHdmi); 46 | HI_S32 HI_MPI_HDMI_SetAVMute(HI_HDMI_ID_E enHdmi, HI_BOOL bAvMute); 47 | HI_S32 HI_MPI_HDMI_Force_GetEDID(HI_HDMI_ID_E enHdmi, HI_HDMI_EDID_S *pstEdidData); 48 | HI_S32 HI_MPI_HDMI_RegCallbackFunc(HI_HDMI_ID_E enHdmi, HI_HDMI_CALLBACK_FUNC_S *pstCallbackFunc); 49 | HI_S32 HI_MPI_HDMI_UnRegCallbackFunc(HI_HDMI_ID_E enHdmi, HI_HDMI_CALLBACK_FUNC_S *pstCallbackFunc); 50 | 51 | /* Normally, these functions are not necessary */ 52 | HI_S32 HI_MPI_HDMI_SetDeepColor(HI_HDMI_ID_E enHdmi, HI_HDMI_DEEP_COLOR_E enDeepColor); 53 | HI_S32 HI_MPI_HDMI_GetDeepColor(HI_HDMI_ID_E enHdmi, HI_HDMI_DEEP_COLOR_E *penDeepColor); 54 | 55 | HI_S32 HI_MPI_HDMI_SetInfoFrame(HI_HDMI_ID_E enHdmi, HI_HDMI_INFOFRAME_S *pstInfoFrame); 56 | HI_S32 HI_MPI_HDMI_GetInfoFrame(HI_HDMI_ID_E enHdmi, HI_HDMI_INFOFRAME_TYPE_E enInfoFrameType, HI_HDMI_INFOFRAME_S *pstInfoFrame); 57 | 58 | 59 | 60 | 61 | #ifdef __cplusplus 62 | #if __cplusplus 63 | } 64 | #endif 65 | #endif /* End of #ifdef __cplusplus */ 66 | 67 | #endif /*__MPI_HDMI_H__ */ 68 | 69 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/gk_api_awb_natura.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #ifndef __GK_API_AWB_NATRUA_H__ 5 | #define __GK_API_AWB_NATRUA_H__ 6 | 7 | #include "comm_isp.h" 8 | #include "comm_3a.h" 9 | #include "awb_comm.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif /* End of #ifdef __cplusplus */ 16 | 17 | /* The interface of awb lib register to isp. */ 18 | GK_S32 GK_API_AWB_Register(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 19 | GK_S32 GK_API_AWB_UnRegister(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 20 | 21 | /* The callback function of sensor register to awb lib. */ 22 | GK_S32 GK_API_AWB_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, 23 | ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 24 | AWB_SENSOR_REGISTER_S *pstRegister); 25 | GK_S32 GK_API_AWB_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, 26 | SENSOR_ID SensorId); 27 | 28 | GK_S32 GK_API_ISP_SetWBAttr(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr); 29 | GK_S32 GK_API_ISP_GetWBAttr(VI_PIPE ViPipe, ISP_WB_ATTR_S *pstWBAttr); 30 | 31 | GK_S32 GK_API_ISP_SetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 32 | GK_S32 GK_API_ISP_GetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 33 | 34 | GK_S32 GK_API_ISP_SetCCMAttr(VI_PIPE ViPipe, 35 | const ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 36 | GK_S32 GK_API_ISP_GetCCMAttr(VI_PIPE ViPipe, 37 | ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 38 | 39 | GK_S32 GK_API_ISP_SetSaturationAttr(VI_PIPE ViPipe, 40 | const ISP_SATURATION_ATTR_S *pstSatAttr); 41 | GK_S32 GK_API_ISP_GetSaturationAttr(VI_PIPE ViPipe, 42 | ISP_SATURATION_ATTR_S *pstSatAttr); 43 | 44 | GK_S32 GK_API_ISP_QueryWBInfo(VI_PIPE ViPipe, ISP_WB_INFO_S *pstWBInfo); 45 | GK_S32 GK_API_ISP_CalGainByTemp(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr, 46 | GK_U16 u16ColorTemp, GK_S16 s16Shift, 47 | GK_U16 *pu16AWBGain); 48 | GK_S32 GK_API_ISP_SetSpecAwbAttr(VI_PIPE ViPipe, 49 | const ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 50 | GK_S32 GK_API_ISP_SetCaaControlAttr( 51 | VI_PIPE ViPipe, const ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 52 | GK_S32 53 | GK_API_ISP_GetCaaControlAttr(VI_PIPE ViPipe, 54 | ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 55 | GK_S32 GK_API_ISP_GetSpecAwbAttr(VI_PIPE ViPipe, 56 | ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 57 | GK_S32 GK_API_ISP_SetSpecAwbControlAttr( 58 | VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 59 | GK_S32 GK_API_ISP_GetSpecAwbControlAttr( 60 | VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 61 | 62 | #ifdef __cplusplus 63 | #if __cplusplus 64 | } 65 | #endif 66 | #endif /* End of #ifdef __cplusplus */ 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/comm_dis.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | #include "type.h" 5 | #include "common.h" 6 | #include "errcode.h" 7 | #include "comm_video.h" 8 | 9 | #ifndef __COMM_DIS_H__ 10 | #define __COMM_DIS_H__ 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | #define ERR_CODE_DIS_NOBUF \ 19 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF) 20 | #define ERR_CODE_DIS_BUF_EMPTY \ 21 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY) 22 | #define ERR_CODE_DIS_NULL_PTR \ 23 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 24 | #define ERR_CODE_DIS_ILLEGAL_PARAM \ 25 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 26 | #define ERR_CODE_DIS_BUF_FULL \ 27 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL) 28 | #define ERR_CODE_DIS_SYS_NOTREADY \ 29 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 30 | #define ERR_CODE_DIS_NOT_SUPPORT \ 31 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) 32 | #define ERR_CODE_DIS_NOT_PERMITTED \ 33 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 34 | #define ERR_CODE_DIS_BUSY \ 35 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY) 36 | #define ERR_CODE_DIS_INVALID_CHNID \ 37 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID) 38 | #define ERR_CODE_DIS_CHN_UNEXIST \ 39 | DEFINE_ERR_CODE(MOD_ID_DIS, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST) 40 | 41 | typedef enum DIS_MODE_E { 42 | DIS_MODE_4_DOF_GME = 0, 43 | DIS_MODE_6_DOF_GME, 44 | DIS_MODE_GYRO, 45 | DIS_MODE_DOF_BUTT, 46 | } DIS_MODE_E; 47 | 48 | typedef enum DIS_MOTION_LEVEL_E { 49 | DIS_MOTION_LEVEL_LOW = 0, 50 | DIS_MOTION_LEVEL_NORMAL, 51 | DIS_MOTION_LEVEL_HIGH, 52 | DIS_MOTION_LEVEL_BUTT 53 | } DIS_MOTION_LEVEL_E; 54 | 55 | typedef enum DIS_PDT_TYPE_E { 56 | DIS_PDT_TYPE_IPC = 0, 57 | DIS_PDT_TYPE_DV, 58 | DIS_PDT_TYPE_DRONE, 59 | DIS_PDT_TYPE_BUTT 60 | } DIS_PDT_TYPE_E; 61 | 62 | typedef struct DIS_ATTR_S { 63 | GK_BOOL bEnable; 64 | GK_BOOL bGdcBypass; 65 | GK_U32 u32MovingSubjectLevel; 66 | GK_S32 s32RollingShutterCoef; 67 | GK_S32 s32Timelag; 68 | GK_U32 u32ViewAngle; 69 | GK_U32 u32HorizontalLimit; 70 | GK_U32 u32VerticalLimit; 71 | GK_BOOL bStillCrop; 72 | } DIS_ATTR_S; 73 | 74 | typedef struct DIS_CONFIG_S { 75 | DIS_MODE_E enMode; 76 | DIS_MOTION_LEVEL_E enMotionLevel; 77 | DIS_PDT_TYPE_E enPdtType; 78 | GK_U32 u32BufNum; 79 | GK_U32 u32CropRatio; 80 | GK_U32 u32FrameRate; 81 | GK_U32 u32GyroOutputRange; 82 | GK_U32 u32GyroDataBitWidth; 83 | GK_BOOL bCameraSteady; 84 | GK_BOOL bScale; 85 | } DIS_CONFIG_S; 86 | 87 | #ifdef __cplusplus 88 | #if __cplusplus 89 | } 90 | #endif 91 | #endif 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp_itemimgtext.c: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #include "../ui.h" 5 | 6 | 7 | // COMPONENT itemImgText 8 | 9 | lv_obj_t *ui_itemImgText_create(lv_obj_t *comp_parent) { 10 | 11 | lv_obj_t *cui_itemImgText; 12 | cui_itemImgText = lv_obj_create(comp_parent); 13 | lv_obj_set_width( cui_itemImgText, lv_pct(20)); 14 | lv_obj_set_height( cui_itemImgText, lv_pct(9)); 15 | lv_obj_set_x( cui_itemImgText, lv_pct(-39) ); 16 | lv_obj_set_y( cui_itemImgText, lv_pct(-44) ); 17 | lv_obj_set_align( cui_itemImgText, LV_ALIGN_CENTER ); 18 | lv_obj_clear_flag( cui_itemImgText, LV_OBJ_FLAG_SCROLLABLE ); /// Flags 19 | lv_obj_set_style_radius(cui_itemImgText, 0, LV_PART_MAIN| LV_STATE_DEFAULT); 20 | lv_obj_set_style_bg_color(cui_itemImgText, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT ); 21 | lv_obj_set_style_bg_opa(cui_itemImgText, 0, LV_PART_MAIN| LV_STATE_DEFAULT); 22 | lv_obj_set_style_border_color(cui_itemImgText, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT ); 23 | lv_obj_set_style_border_opa(cui_itemImgText, 0, LV_PART_MAIN| LV_STATE_DEFAULT); 24 | 25 | lv_obj_t *cui_Image4; 26 | cui_Image4 = lv_img_create(cui_itemImgText); 27 | lv_obj_set_width( cui_Image4, LV_SIZE_CONTENT); /// 1 28 | lv_obj_set_height( cui_Image4, LV_SIZE_CONTENT); /// 1 29 | lv_obj_set_x( cui_Image4, -104 ); 30 | lv_obj_set_y( cui_Image4, 0 ); 31 | lv_obj_set_align( cui_Image4, LV_ALIGN_CENTER ); 32 | lv_obj_add_flag( cui_Image4, LV_OBJ_FLAG_ADV_HITTEST ); /// Flags 33 | lv_obj_clear_flag( cui_Image4, LV_OBJ_FLAG_SCROLLABLE ); /// Flags 34 | lv_img_set_zoom(cui_Image4,160); 35 | 36 | lv_obj_t *cui_Label2; 37 | cui_Label2 = lv_label_create(cui_itemImgText); 38 | lv_obj_set_width( cui_Label2, LV_SIZE_CONTENT); /// 1 39 | lv_obj_set_height( cui_Label2, LV_SIZE_CONTENT); /// 1 40 | lv_obj_set_x( cui_Label2, 31 ); 41 | lv_obj_set_y( cui_Label2, -3 ); 42 | lv_obj_set_style_text_color(cui_Label2, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT ); 43 | lv_obj_set_style_text_opa(cui_Label2, 255, LV_PART_MAIN| LV_STATE_DEFAULT); 44 | lv_obj_set_style_text_align(cui_Label2, LV_TEXT_ALIGN_RIGHT, LV_PART_MAIN| LV_STATE_DEFAULT); 45 | lv_obj_set_style_text_font(cui_Label2, &lv_font_montserrat_28, LV_PART_MAIN| LV_STATE_DEFAULT); 46 | 47 | lv_obj_t ** children = lv_mem_alloc(sizeof(lv_obj_t *) * _UI_COMP_ITEMIMGTEXT_NUM); 48 | children[UI_COMP_ITEMIMGTEXT_ITEMIMGTEXT] = cui_itemImgText; 49 | children[UI_COMP_ITEMIMGTEXT_IMAGE4] = cui_Image4; 50 | children[UI_COMP_ITEMIMGTEXT_LABEL2] = cui_Label2; 51 | lv_obj_add_event_cb(cui_itemImgText, get_component_child_event_cb, LV_EVENT_GET_COMP_CHILD, children); 52 | lv_obj_add_event_cb(cui_itemImgText, del_component_child_event_cb, LV_EVENT_DELETE, children); 53 | ui_comp_itemImgText_create_hook(cui_itemImgText); 54 | return cui_itemImgText; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /osd/ui/ui.h: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #ifndef _SQUARELINE_PROJECT_UI_H 5 | #define _SQUARELINE_PROJECT_UI_H 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include "lvgl.h" 12 | #include "ui_helpers.h" 13 | #include "components/ui_comp.h" 14 | #include "components/ui_comp_hook.h" 15 | #include "ui_events.h" 16 | 17 | // SCREEN: ui_mainOSD1 18 | void ui_mainOSD1_screen_init(void); 19 | extern lv_obj_t *ui_mainOSD1; 20 | extern lv_obj_t *ui_Home; 21 | extern lv_obj_t *ui_TotalVolt; 22 | extern lv_obj_t *ui_CellVolt; 23 | extern lv_obj_t *ui_Current; 24 | extern lv_obj_t *ui_Speed; 25 | extern lv_obj_t *ui_Thermo; 26 | extern lv_obj_t *ui_WifiSignal; 27 | extern lv_obj_t *ui_Navigation; 28 | extern lv_obj_t *ui_Time; 29 | extern lv_obj_t *ui_BitRate; 30 | extern lv_obj_t *ui_Long; 31 | extern lv_obj_t *ui_Lat; 32 | extern lv_obj_t *ui_RCSignal; 33 | extern lv_obj_t *ui_Record; 34 | extern lv_obj_t *ui_logo; 35 | extern lv_obj_t *ui_GPS; 36 | extern lv_obj_t *ui_flyMode; 37 | extern lv_obj_t *ui_imgHorizon; 38 | extern lv_obj_t *ui_imgVertical; 39 | extern lv_obj_t *ui_imgCross; 40 | extern lv_obj_t *ui_StatusText; 41 | extern lv_obj_t *ui_Throttle; 42 | extern lv_obj_t *ui_Altitude; 43 | extern lv_obj_t *ui____initial_actions0; 44 | 45 | LV_IMG_DECLARE( ui_img_icon_home_png); // assets\icon_home.png 46 | LV_IMG_DECLARE( ui_img_icon_battery_png); // assets\icon_battery.png 47 | LV_IMG_DECLARE( ui_img_icon_speed_png); // assets\icon_speed.png 48 | LV_IMG_DECLARE( ui_img_icon_thermometer_png); // assets\icon_thermometer.png 49 | LV_IMG_DECLARE( ui_img_icon_signal_png); // assets\icon_signal.png 50 | LV_IMG_DECLARE( ui_img_iconnavi_png); // assets\iconnavi.png 51 | LV_IMG_DECLARE( ui_img_icon_clock_png); // assets\icon_clock.png 52 | LV_IMG_DECLARE( ui_img_icon_arrow_left_png); // assets\icon_arrow_left.png 53 | LV_IMG_DECLARE( ui_img_ico_record_png); // assets\ico_record.png 54 | LV_IMG_DECLARE( ui_img_logo_png); // assets\logo.png 55 | LV_IMG_DECLARE( ui_img_icon_gps_png); // assets\icon_gps.png 56 | LV_IMG_DECLARE( ui_img_arhorizon_png); // assets\arhorizon.png 57 | LV_IMG_DECLARE( ui_img_icon_vertical_png); // assets\icon_vertical.png 58 | LV_IMG_DECLARE( ui_img_icon_crosshair_png); // assets\icon_crosshair.png 59 | LV_IMG_DECLARE( ui_img_icon_throttle_png); // assets\icon_throttle.png 60 | LV_IMG_DECLARE( ui_img_icon_altw_png); // assets\icon_altw.png 61 | 62 | 63 | 64 | void ui_init(void); 65 | void* ui_updating_thread (void* arg); 66 | void set_arrow_to_home(uint16_t hdg, bool hasGPS); 67 | void set_fly_time(int mins, int seconds); 68 | void set_text(lv_obj_t* object, const char* text1); 69 | void set_texttext(lv_obj_t* object, const char* text1, const char* text2); 70 | void set_imgtext(lv_obj_t* object, const char* text1, const char* text2); 71 | 72 | #ifdef __cplusplus 73 | } /*extern "C"*/ 74 | #endif 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /venc/main.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define _POSIX_TIMERS 3 | #define _REENTRANT 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "hi_buffer.h" 21 | #include "hi_comm_adec.h" 22 | #include "hi_comm_aenc.h" 23 | #include "hi_comm_ai.h" 24 | #include "hi_comm_aio.h" 25 | #include "hi_comm_ao.h" 26 | #include "hi_comm_isp.h" 27 | #include "hi_comm_region.h" 28 | #include "hi_comm_sys.h" 29 | #include "hi_comm_vb.h" 30 | #include "hi_comm_venc.h" 31 | #include "hi_comm_vgs.h" 32 | #include "hi_comm_vi.h" 33 | #include "hi_comm_vo.h" 34 | #include "hi_comm_vpss.h" 35 | #include "hi_common.h" 36 | #include "hi_defines.h" 37 | #include "hi_mipi.h" 38 | 39 | #include "hi_math.h" 40 | #include "hi_sns_ctrl.h" 41 | #include "mpi_ae.h" 42 | #include "mpi_audio.h" 43 | #include "mpi_awb.h" 44 | #include "mpi_isp.h" 45 | #include "mpi_region.h" 46 | #include "mpi_sys.h" 47 | #include "mpi_vb.h" 48 | #include "mpi_venc.h" 49 | #include "mpi_vgs.h" 50 | #include "mpi_vi.h" 51 | #include "mpi_vo.h" 52 | #include "mpi_vpss.h" 53 | 54 | typedef enum SensorType { 55 | IMX307 = 0, 56 | IMX335 = 1 57 | } SensorType; 58 | 59 | #pragma pack(push, 1) 60 | struct RTPHeader { 61 | uint8_t version; 62 | uint8_t payload_type; 63 | uint16_t sequence; 64 | uint32_t timestamp; 65 | uint32_t ssrc_id; 66 | }; 67 | #pragma pack(pop) 68 | 69 | void* __ISP_THREAD__(void* param); 70 | int processStream(VENC_CHN channel_id, int socket_handle, 71 | struct sockaddr* dst_address, uint16_t max_frame_size); 72 | void sendPacket(uint8_t* pack_data, uint32_t pack_size, int socket_handle, 73 | struct sockaddr* dst_address, uint32_t max_size); 74 | HI_S32 getGOPAttributes(VENC_GOP_MODE_E enGopMode, VENC_GOP_ATTR_S* pstGopAttr); 75 | 76 | int mipi_set_hs_mode(int device, lane_divide_mode_t mode); 77 | int mipi_enable_clock(int device, uint32_t device_id, int enable); 78 | int mipi_set_reset(int device, uint32_t device_id, int enable); 79 | int mipi_enable_sensor_clock( 80 | int device, sns_clk_source_t sensor_id, int enable); 81 | int mipi_set_sensor_reset(int device, sns_clk_source_t sensor_id, int enable); 82 | int mipi_configure(int device, combo_dev_attr_t* config); 83 | 84 | /* --- Console arguments parser --- */ 85 | #define __BeginParseConsoleArguments__(printHelpFunction) if (argc < 2 \ 86 | || (argc == 2 && (!strcmp(argv[1], "--help") || !strcmp( argv[ 1 ], "/?" ) \ 87 | || !strcmp( argv[1], "/h" )))) { printHelpFunction(); return 1; } \ 88 | for (int ArgID = 1; ArgID < argc; ArgID++) {const char* Arg = argv[ArgID]; 89 | 90 | #define __EndParseConsoleArguments__ \ 91 | else { printf("ERROR: Unknown argument\n"); return 1; } } 92 | 93 | #define __OnArgument(Name) if(!strcmp(Arg, Name)) 94 | #define __ArgValue (argc > ArgID + 1 ? argv[++ArgID] : "") 95 | -------------------------------------------------------------------------------- /osd/ui/components/ui_comp_itemtexttext.c: -------------------------------------------------------------------------------- 1 | // Author: Dinh Cong Bang from Viet Nam 2 | // LVGL version: 8.2.0 3 | 4 | #include "../ui.h" 5 | 6 | 7 | // COMPONENT itemTextText 8 | 9 | lv_obj_t *ui_itemTextText_create(lv_obj_t *comp_parent) { 10 | 11 | lv_obj_t *cui_itemTextText; 12 | cui_itemTextText = lv_obj_create(comp_parent); 13 | lv_obj_set_width( cui_itemTextText, lv_pct(14)); 14 | lv_obj_set_height( cui_itemTextText, lv_pct(9)); 15 | lv_obj_set_x( cui_itemTextText, lv_pct(-9) ); 16 | lv_obj_set_y( cui_itemTextText, lv_pct(41) ); 17 | lv_obj_set_align( cui_itemTextText, LV_ALIGN_CENTER ); 18 | lv_obj_clear_flag( cui_itemTextText, LV_OBJ_FLAG_SCROLLABLE ); /// Flags 19 | lv_obj_set_style_radius(cui_itemTextText, 0, LV_PART_MAIN| LV_STATE_DEFAULT); 20 | lv_obj_set_style_bg_color(cui_itemTextText, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT ); 21 | lv_obj_set_style_bg_opa(cui_itemTextText, 0, LV_PART_MAIN| LV_STATE_DEFAULT); 22 | lv_obj_set_style_border_color(cui_itemTextText, lv_color_hex(0x000000), LV_PART_MAIN | LV_STATE_DEFAULT ); 23 | lv_obj_set_style_border_opa(cui_itemTextText, 0, LV_PART_MAIN| LV_STATE_DEFAULT); 24 | 25 | lv_obj_t *cui_Label4; 26 | cui_Label4 = lv_label_create(cui_itemTextText); 27 | lv_obj_set_width( cui_Label4, LV_SIZE_CONTENT); /// 1 28 | lv_obj_set_height( cui_Label4, LV_SIZE_CONTENT); /// 1 29 | lv_obj_set_x( cui_Label4, -62 ); 30 | lv_obj_set_y( cui_Label4, 0 ); 31 | lv_obj_set_align( cui_Label4, LV_ALIGN_TOP_RIGHT ); 32 | lv_obj_set_style_text_color(cui_Label4, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT ); 33 | lv_obj_set_style_text_opa(cui_Label4, 255, LV_PART_MAIN| LV_STATE_DEFAULT); 34 | lv_obj_set_style_text_align(cui_Label4, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN| LV_STATE_DEFAULT); 35 | lv_obj_set_style_text_font(cui_Label4, &lv_font_montserrat_28, LV_PART_MAIN| LV_STATE_DEFAULT); 36 | 37 | lv_obj_t *cui_Label1; 38 | cui_Label1 = lv_label_create(cui_itemTextText); 39 | lv_obj_set_width( cui_Label1, LV_SIZE_CONTENT); /// 1 40 | lv_obj_set_height( cui_Label1, LV_SIZE_CONTENT); /// 1 41 | lv_obj_set_x( cui_Label1, 75 ); 42 | lv_obj_set_y( cui_Label1, 0 ); 43 | lv_obj_set_style_text_color(cui_Label1, lv_color_hex(0xFFFFFF), LV_PART_MAIN | LV_STATE_DEFAULT ); 44 | lv_obj_set_style_text_opa(cui_Label1, 255, LV_PART_MAIN| LV_STATE_DEFAULT); 45 | lv_obj_set_style_text_align(cui_Label1, LV_TEXT_ALIGN_LEFT, LV_PART_MAIN| LV_STATE_DEFAULT); 46 | lv_obj_set_style_text_font(cui_Label1, &lv_font_montserrat_28, LV_PART_MAIN| LV_STATE_DEFAULT); 47 | 48 | lv_obj_t ** children = lv_mem_alloc(sizeof(lv_obj_t *) * _UI_COMP_ITEMTEXTTEXT_NUM); 49 | children[UI_COMP_ITEMTEXTTEXT_ITEMTEXTTEXT] = cui_itemTextText; 50 | children[UI_COMP_ITEMTEXTTEXT_LABEL4] = cui_Label4; 51 | children[UI_COMP_ITEMTEXTTEXT_LABEL1] = cui_Label1; 52 | lv_obj_add_event_cb(cui_itemTextText, get_component_child_event_cb, LV_EVENT_GET_COMP_CHILD, children); 53 | lv_obj_add_event_cb(cui_itemTextText, del_component_child_event_cb, LV_EVENT_DELETE, children); 54 | ui_comp_itemTextText_create_hook(cui_itemTextText); 55 | return cui_itemTextText; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/acodec.h: -------------------------------------------------------------------------------- 1 | #ifndef _ACODEC_H_ 2 | #define _ACODEC_H_ 3 | 4 | #define IOC_TYPE_ACODEC 'A' 5 | 6 | typedef enum hiACODEC_FS_E 7 | { 8 | ACODEC_FS_48000 = 0x2, 9 | ACODEC_FS_24000 = 0x1, 10 | ACODEC_FS_12000 = 0x0, 11 | 12 | ACODEC_FS_44100 = 0x2, 13 | ACODEC_FS_22050 = 0x1, 14 | ACODEC_FS_11025 = 0x0, 15 | 16 | ACODEC_FS_32000 = 0x2, 17 | ACODEC_FS_16000 = 0x1, 18 | ACODEC_FS_8000 = 0x0, 19 | 20 | ACODEC_FS_64000 = 0x3, 21 | 22 | ACODEC_FS_96000 = 0x3, 23 | 24 | ACODEC_FS_BUTT = 0x5, 25 | } ACODEC_FS_E; 26 | 27 | typedef struct 28 | { 29 | int vol_ctrl; 30 | unsigned int vol_ctrl_mute; 31 | } ACODEC_VOL_CTRL; 32 | 33 | typedef enum hiACODEC_IOCTL_E 34 | { 35 | IOC_NR_SOFT_RESET_CTRL = 0x0, 36 | IOC_NR_SET_OUTPUT_VOL, 37 | IOC_NR_GET_OUTPUT_VOL, 38 | /***********************/ 39 | IOC_NR_SET_I2S1_FS, 40 | 41 | IOC_NR_SET_DACL_VOL, 42 | IOC_NR_SET_DACR_VOL, 43 | 44 | IOC_NR_SET_DACL_MUTE, 45 | IOC_NR_SET_DACR_MUTE, 46 | 47 | IOC_NR_GET_DACL_VOL, 48 | IOC_NR_GET_DACR_VOL, 49 | 50 | IOC_NR_SET_PD_DACL, 51 | IOC_NR_SET_PD_DACR, 52 | } ACODEC_IOCTL_E; 53 | 54 | /*reset the audio code to the default config*/ 55 | #define ACODEC_SOFT_RESET_CTRL \ 56 | _IO(IOC_TYPE_ACODEC, IOC_NR_SOFT_RESET_CTRL) 57 | /*ACODEC_FS_E*/ 58 | #define ACODEC_SET_I2S1_FS \ 59 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_I2S1_FS, unsigned int) 60 | 61 | /*Output volume control(left channel) ACODEC_VOL_CTRL*/ 62 | #define ACODEC_SET_DACL_VOL \ 63 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_DACL_VOL, ACODEC_VOL_CTRL) 64 | /*Output volume control(right channel) ACODEC_VOL_CTRL*/ 65 | #define ACODEC_SET_DACR_VOL \ 66 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_DACR_VOL, ACODEC_VOL_CTRL) 67 | 68 | /*Output mute control(left channel), 1:mute, 0:unmute*/ 69 | #define ACODEC_SET_DACL_MUTE \ 70 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_DACL_MUTE, unsigned int) 71 | /*Output mute control(right channel), 1:mute, 0:unmute*/ 72 | #define ACODEC_SET_DACR_MUTE \ 73 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_DACR_MUTE, unsigned int) 74 | 75 | #define ACODEC_GET_DACL_VOL \ 76 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_GET_DACL_VOL, ACODEC_VOL_CTRL) 77 | #define ACODEC_GET_DACR_VOL \ 78 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_GET_DACR_VOL, ACODEC_VOL_CTRL) 79 | 80 | /*set adcl power, 0: power up, 1: power down*/ 81 | #define ACODEC_SET_PD_DACL \ 82 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_PD_DACL, unsigned int) 83 | /*set adcr power, 0: power up, 1: power down*/ 84 | #define ACODEC_SET_PD_DACR \ 85 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_PD_DACR, unsigned int) 86 | 87 | /* Don't need to set, the driver will set a default value */ 88 | /*clock of dac and adc is reverse or obverse*/ 89 | #define ACODEC_SET_OUTPUT_VOL \ 90 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_SET_OUTPUT_VOL, unsigned int) 91 | #define ACODEC_GET_OUTPUT_VOL \ 92 | _IOWR(IOC_TYPE_ACODEC, IOC_NR_GET_OUTPUT_VOL, unsigned int) 93 | 94 | 95 | #endif /* End of #ifndef _ACODEC_H_ */ 96 | -------------------------------------------------------------------------------- /sdk/hi3516ev300/include/mpi_awb.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_awb.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2012/12/19 10 | Description : 11 | History : 12 | 1.Date : 2012/12/19 13 | Author : 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __MPI_AWB_H__ 18 | #define __MPI_AWB_H__ 19 | 20 | #include "hi_comm_isp.h" 21 | #include "hi_comm_3a.h" 22 | #include "hi_awb_comm.h" 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus 26 | extern "C" { 27 | #endif 28 | #endif /* End of #ifdef __cplusplus */ 29 | 30 | /* The interface of awb lib register to isp. */ 31 | HI_S32 HI_MPI_AWB_Register(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 32 | HI_S32 HI_MPI_AWB_UnRegister(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib); 33 | 34 | /* The callback function of sensor register to awb lib. */ 35 | HI_S32 HI_MPI_AWB_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 36 | AWB_SENSOR_REGISTER_S *pstRegister); 37 | HI_S32 HI_MPI_AWB_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAwbLib, SENSOR_ID SensorId); 38 | 39 | HI_S32 HI_MPI_ISP_SetWBAttr(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr); 40 | HI_S32 HI_MPI_ISP_GetWBAttr(VI_PIPE ViPipe, ISP_WB_ATTR_S *pstWBAttr); 41 | 42 | HI_S32 HI_MPI_ISP_SetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 43 | HI_S32 HI_MPI_ISP_GetAWBAttrEx(VI_PIPE ViPipe, ISP_AWB_ATTR_EX_S *pstAWBAttrEx); 44 | 45 | HI_S32 HI_MPI_ISP_SetCCMAttr(VI_PIPE ViPipe, const ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 46 | HI_S32 HI_MPI_ISP_GetCCMAttr(VI_PIPE ViPipe, ISP_COLORMATRIX_ATTR_S *pstCCMAttr); 47 | 48 | HI_S32 HI_MPI_ISP_SetSaturationAttr(VI_PIPE ViPipe, const ISP_SATURATION_ATTR_S *pstSatAttr); 49 | HI_S32 HI_MPI_ISP_GetSaturationAttr(VI_PIPE ViPipe, ISP_SATURATION_ATTR_S *pstSatAttr); 50 | 51 | HI_S32 HI_MPI_ISP_QueryWBInfo(VI_PIPE ViPipe, ISP_WB_INFO_S *pstWBInfo); 52 | HI_S32 HI_MPI_ISP_CalGainByTemp(VI_PIPE ViPipe, const ISP_WB_ATTR_S *pstWBAttr, HI_U16 u16ColorTemp, HI_S16 s16Shift, HI_U16 *pu16AWBGain); 53 | HI_S32 HI_MPI_ISP_SetSpecAwbAttr(VI_PIPE ViPipe, const ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 54 | HI_S32 HI_MPI_ISP_SetCaaControlAttr(VI_PIPE ViPipe, const ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 55 | HI_S32 HI_MPI_ISP_GetCaaControlAttr(VI_PIPE ViPipe, ISP_SPECAWB_CAA_CONTROl_S *pstSpecAwbCaaAttr); 56 | HI_S32 HI_MPI_ISP_GetSpecAwbAttr(VI_PIPE ViPipe, ISP_SPECAWB_ATTR_S *pstSpecAwbAttr); 57 | HI_S32 HI_MPI_ISP_SetSpecAwbControlAttr(VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 58 | HI_S32 HI_MPI_ISP_GetSpecAwbControlAttr(VI_PIPE ViPipe, ISP_SPECAWB_CONTROL_ATTR_S *pstSpecAwbControlAttr); 59 | 60 | #ifdef __cplusplus 61 | #if __cplusplus 62 | } 63 | #endif 64 | #endif /* End of #ifdef __cplusplus */ 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/mpi_ae.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | #ifndef __HI_MPI_AE_H__ 5 | #define __HI_MPI_AE_H__ 6 | 7 | #include "hi_comm_isp.h" 8 | #include "hi_comm_3a.h" 9 | #include "hi_ae_comm.h" 10 | 11 | #ifdef __cplusplus 12 | #if __cplusplus 13 | extern "C" { 14 | #endif 15 | #endif /* End of #ifdef __cplusplus */ 16 | 17 | 18 | /* The interface of ae lib register to isp. */ 19 | HI_S32 HI_MPI_AE_Register(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib); 20 | HI_S32 HI_MPI_AE_UnRegister(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib); 21 | 22 | /* The callback function of sensor register to ae lib. */ 23 | HI_S32 HI_MPI_AE_SensorRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, ISP_SNS_ATTR_INFO_S *pstSnsAttrInfo, 24 | AE_SENSOR_REGISTER_S *pstRegister); 25 | HI_S32 HI_MPI_AE_SensorUnRegCallBack(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, SENSOR_ID SensorId); 26 | 27 | HI_S32 HI_MPI_ISP_SetExposureAttr(VI_PIPE ViPipe, const ISP_EXPOSURE_ATTR_S *pstExpAttr); 28 | HI_S32 HI_MPI_ISP_GetExposureAttr(VI_PIPE ViPipe, ISP_EXPOSURE_ATTR_S *pstExpAttr); 29 | 30 | HI_S32 HI_MPI_ISP_SetWDRExposureAttr(VI_PIPE ViPipe, const ISP_WDR_EXPOSURE_ATTR_S *pstWDRExpAttr); 31 | HI_S32 HI_MPI_ISP_GetWDRExposureAttr(VI_PIPE ViPipe, ISP_WDR_EXPOSURE_ATTR_S *pstWDRExpAttr); 32 | 33 | HI_S32 HI_MPI_ISP_SetHDRExposureAttr(VI_PIPE ViPipe, const ISP_HDR_EXPOSURE_ATTR_S *pstHDRExpAttr); 34 | HI_S32 HI_MPI_ISP_GetHDRExposureAttr(VI_PIPE ViPipe, ISP_HDR_EXPOSURE_ATTR_S *pstHDRExpAttr); 35 | 36 | HI_S32 HI_MPI_ISP_SetAERouteAttr(VI_PIPE ViPipe, const ISP_AE_ROUTE_S *pstAERouteAttr); 37 | HI_S32 HI_MPI_ISP_GetAERouteAttr(VI_PIPE ViPipe, ISP_AE_ROUTE_S *pstAERouteAttr); 38 | 39 | HI_S32 HI_MPI_ISP_SetAERouteSFAttr(VI_PIPE ViPipe, const ISP_AE_ROUTE_S *pstAERouteSFAttr); 40 | HI_S32 HI_MPI_ISP_GetAERouteSFAttr(VI_PIPE ViPipe, ISP_AE_ROUTE_S *pstAERouteSFAttr); 41 | 42 | HI_S32 HI_MPI_ISP_QueryExposureInfo(VI_PIPE ViPipe, ISP_EXP_INFO_S *pstExpInfo); 43 | 44 | HI_S32 HI_MPI_ISP_SetIrisAttr(VI_PIPE ViPipe, const ISP_IRIS_ATTR_S *pstIrisAttr); 45 | HI_S32 HI_MPI_ISP_GetIrisAttr(VI_PIPE ViPipe, ISP_IRIS_ATTR_S *pstIrisAttr); 46 | 47 | HI_S32 HI_MPI_ISP_SetDcirisAttr(VI_PIPE ViPipe, const ISP_DCIRIS_ATTR_S *pstDcirisAttr); 48 | HI_S32 HI_MPI_ISP_GetDcirisAttr(VI_PIPE ViPipe, ISP_DCIRIS_ATTR_S *pstDcirisAttr); 49 | 50 | HI_S32 HI_MPI_ISP_SetPirisAttr(VI_PIPE ViPipe, const ISP_PIRIS_ATTR_S *pstPirisAttr); 51 | HI_S32 HI_MPI_ISP_GetPirisAttr(VI_PIPE ViPipe, ISP_PIRIS_ATTR_S *pstPirisAttr); 52 | 53 | HI_S32 HI_MPI_ISP_SetAERouteAttrEx(VI_PIPE ViPipe, const ISP_AE_ROUTE_EX_S *pstAERouteAttrEx); 54 | HI_S32 HI_MPI_ISP_GetAERouteAttrEx(VI_PIPE ViPipe, ISP_AE_ROUTE_EX_S *pstAERouteAttrEx); 55 | 56 | HI_S32 HI_MPI_ISP_SetAERouteSFAttrEx(VI_PIPE ViPipe, const ISP_AE_ROUTE_EX_S *pstAERouteSFAttrEx); 57 | HI_S32 HI_MPI_ISP_GetAERouteSFAttrEx(VI_PIPE ViPipe, ISP_AE_ROUTE_EX_S *pstAERouteSFAttrEx); 58 | 59 | HI_S32 HI_MPI_ISP_SetSmartExposureAttr(VI_PIPE ViPipe, const ISP_SMART_EXPOSURE_ATTR_S *pstSmartExpAttr); 60 | HI_S32 HI_MPI_ISP_GetSmartExposureAttr(VI_PIPE ViPipe, ISP_SMART_EXPOSURE_ATTR_S *pstSmartExpAttr); 61 | 62 | 63 | #ifdef __cplusplus 64 | #if __cplusplus 65 | } 66 | #endif 67 | #endif /* End of #ifdef __cplusplus */ 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/hi_io.h: -------------------------------------------------------------------------------- 1 | #ifndef __HI_IO_H__ 2 | #define __HI_IO_H__ 3 | 4 | #include "hi_type.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" 8 | { 9 | #endif /* __cplusplus */ 10 | 11 | /* user and kernel are different. */ 12 | HI_U8 IO_READ8(HI_U32 u32Addr); 13 | HI_S32 IO_WRITE8(HI_U32 u32Addr, HI_U32 u32Value); 14 | HI_U16 IO_READ16(HI_U32 u32Addr); 15 | HI_S32 IO_WRITE16(HI_U32 u32Addr, HI_U32 u32Value); 16 | HI_U32 IO_READ32(HI_U32 u32Addr); 17 | HI_S32 IO_WRITE32(HI_U32 u32Addr, HI_U32 u32Value); 18 | HI_U32 ISP_Mmap(void); 19 | HI_U32 ISP_Munmap(void); 20 | HI_U32 ISP_GetExtRegAddr(void); 21 | 22 | #define REG_ACCESS_WIDTH 0 // 1: 16bit 2: 8bit 23 | #define EXT_REG_BASE 0x10200 24 | #define ISP_REG_BASE_ADDR 0x205a0000 25 | 26 | #define EXT_REG_BASE_ISP 0x8000 27 | #define EXT_REG_BASE_VIU 0x8400 28 | #define EXT_REG_BASE_VPP 0x8600 29 | #define EXT_REG_BASE_VEDU 0x8800 30 | #define EXT_REG_BASE_VOU 0x8A00 31 | 32 | /* Dynamic bus access functions, 4 byte align access */ 33 | //TODO: allocate dev addr (such as ISP_REG_BASE_ADDR) according to devId. 34 | #define __IO_CALC_ADDRESS_DYNAMIC(BASE, OFFSET) ((HI_U32)(((BASE >= EXT_REG_BASE)? 0 : ISP_REG_BASE_ADDR) + ((((BASE >= EXT_REG_BASE)? (BASE - EXT_REG_BASE) : BASE) + OFFSET)< 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "hi_comm_adec.h" 20 | #include "hi_comm_aenc.h" 21 | #include "hi_comm_ai.h" 22 | #include "hi_comm_aio.h" 23 | #include "hi_comm_ao.h" 24 | #include "hi_comm_hdmi.h" 25 | #include "hi_comm_region.h" 26 | #include "hi_comm_sys.h" 27 | #include "hi_comm_vb.h" 28 | #include "hi_comm_vdec.h" 29 | #include "hi_comm_venc.h" 30 | #include "hi_comm_vi.h" 31 | #include "hi_comm_vo.h" 32 | #include "hi_comm_vpss.h" 33 | #include "hi_common.h" 34 | #include "hi_defines.h" 35 | #include 36 | #include 37 | 38 | #include "mpi_adec.h" 39 | #include "mpi_aenc.h" 40 | #include "mpi_ai.h" 41 | #include "mpi_ao.h" 42 | #include "mpi_hdmi.h" 43 | #include "mpi_region.h" 44 | #include "mpi_sys.h" 45 | #include "mpi_vb.h" 46 | #include "mpi_vdec.h" 47 | #include "mpi_venc.h" 48 | #include "mpi_vi.h" 49 | #include "mpi_vo.h" 50 | #include "mpi_vpss.h" 51 | 52 | #define ALIGN_UP(x, a) ((x + a - 1) & (~(a - 1))) 53 | #define ALIGN_BACK(x, a) ((a) * (((x) / (a)))) 54 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) 55 | 56 | #include "fbg_fbdev.h" 57 | #include "fbgraphics.h" 58 | #include "mavlink/common/mavlink.h" 59 | 60 | /** 61 | * @brief Initialize VO device 62 | * @param device_id - Device identifier 63 | * @param interface_type - Interface type 64 | * @param interface_mode - Interface sync mode 65 | * @param background_color - Background color 66 | */ 67 | int VO_init(VO_DEV device_id, VO_INTF_TYPE_E interface_type, 68 | VO_INTF_SYNC_E interface_mode, uint32_t framerate, 69 | uint32_t background_color); 70 | 71 | /** 72 | * @brief 73 | * @param device_id 74 | * @param interface_mode 75 | * @return 76 | */ 77 | int VO_HDMI_init(HI_HDMI_ID_E device_id, VO_INTF_SYNC_E interface_mode); 78 | 79 | /** 80 | * @brief 81 | * @param rx_buffer - UDP data 82 | * @param rx_size - Size of UDP data 83 | * @param header_size - Size of data before payload 84 | * @param nal_buffer - Buffer for NAL reassembly 85 | * @param out_nal_size 86 | */ 87 | uint8_t* decode_frame(uint8_t* rx_buffer, uint32_t rx_size, 88 | uint32_t header_size, uint8_t* nal_buffer, uint32_t* out_nal_size); 89 | 90 | /* --- Console arguments parser --- */ 91 | #define __BeginParseConsoleArguments__(printHelpFunction) \ 92 | if (argc < 2 || (argc == 2 && (!strcmp(argv[1], "--help") || !strcmp(argv[1], "/?") \ 93 | || !strcmp(argv[1], "/h")))) { printHelpFunction(); return 1; } \ 94 | for (int ArgID = 1; ArgID < argc; ArgID++) { const char* Arg = argv[ArgID]; 95 | 96 | #define __OnArgument(Name) if (!strcmp(Arg, Name)) 97 | #define __ArgValue (argc > ArgID + 1 ? argv[++ArgID] : "") 98 | #define __EndParseConsoleArguments__ \ 99 | else { printf("ERROR: Unknown argument\n"); return 1; } } 100 | 101 | void* __OSD_THREAD__(void*); 102 | void* __MAVLINK_THREAD__(void*); 103 | -------------------------------------------------------------------------------- /sdk/hi3536dv100/include/mpi_ai.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_ai.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | #ifndef __MPI_AI_H__ 17 | #define __MPI_AI_H__ 18 | 19 | #include "hi_type.h" 20 | #include "hi_common.h" 21 | #include "hi_comm_aio.h" 22 | 23 | #ifdef __cplusplus 24 | #if __cplusplus 25 | extern "C" 26 | { 27 | #endif 28 | #endif /* __cplusplus */ 29 | 30 | HI_S32 HI_MPI_AI_SetPubAttr(AUDIO_DEV AiDevId, const AIO_ATTR_S* pstAttr); 31 | HI_S32 HI_MPI_AI_GetPubAttr(AUDIO_DEV AiDevId, AIO_ATTR_S* pstAttr); 32 | 33 | HI_S32 HI_MPI_AI_Enable(AUDIO_DEV AiDevId); 34 | HI_S32 HI_MPI_AI_Disable(AUDIO_DEV AiDevId); 35 | 36 | HI_S32 HI_MPI_AI_EnableChn(AUDIO_DEV AiDevId, AI_CHN AiChn); 37 | HI_S32 HI_MPI_AI_DisableChn(AUDIO_DEV AiDevId, AI_CHN AiChn); 38 | 39 | HI_S32 HI_MPI_AI_GetFrame(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_FRAME_S* pstFrm, AEC_FRAME_S* pstAecFrm, HI_S32 s32MilliSec); 40 | HI_S32 HI_MPI_AI_ReleaseFrame(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_FRAME_S* pstFrm, AEC_FRAME_S* pstAecFrm); 41 | 42 | HI_S32 HI_MPI_AI_SetChnParam(AUDIO_DEV AiDevId, AI_CHN AiChn, AI_CHN_PARAM_S* pstChnParam); 43 | HI_S32 HI_MPI_AI_GetChnParam(AUDIO_DEV AiDevId, AI_CHN AiChn, AI_CHN_PARAM_S* pstChnParam); 44 | 45 | HI_S32 HI_MPI_AI_SetVqeAttr(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_DEV AoDevId, AO_CHN AoChn, AI_VQE_CONFIG_S* pstVqeConfig); 46 | HI_S32 HI_MPI_AI_GetVqeAttr(AUDIO_DEV AiDevId, AI_CHN AiChn, AI_VQE_CONFIG_S* pstVqeConfig); 47 | HI_S32 HI_MPI_AI_EnableVqe(AUDIO_DEV AiDevId, AI_CHN AiChn); 48 | HI_S32 HI_MPI_AI_DisableVqe(AUDIO_DEV AiDevId, AI_CHN AiChn); 49 | 50 | HI_S32 HI_MPI_AI_EnableReSmp(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_SAMPLE_RATE_E enOutSampleRate); 51 | HI_S32 HI_MPI_AI_DisableReSmp(AUDIO_DEV AiDevId, AI_CHN AiChn); 52 | 53 | HI_S32 HI_MPI_AI_SetTrackMode(AUDIO_DEV AiDevId, AUDIO_TRACK_MODE_E enTrackMode); 54 | HI_S32 HI_MPI_AI_GetTrackMode(AUDIO_DEV AiDevId, AUDIO_TRACK_MODE_E* penTrackMode); 55 | HI_S32 HI_MPI_AI_SaveFile(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_SAVE_FILE_INFO_S* pstSaveFileInfo); 56 | HI_S32 HI_MPI_AI_QueryFileStatus(AUDIO_DEV AiDevId, AI_CHN AiChn, AUDIO_FILE_STATUS_S* pstFileStatus); 57 | 58 | HI_S32 HI_MPI_AI_ClrPubAttr(AUDIO_DEV AiDevId); 59 | 60 | HI_S32 HI_MPI_AI_GetFd(AUDIO_DEV AiDevId, AI_CHN AiChn); 61 | 62 | HI_S32 HI_MPI_AI_SetVqeVolume(AUDIO_DEV AiDevId, AI_CHN AiChn, HI_S32 s32VolumeDb); 63 | HI_S32 HI_MPI_AI_GetVqeVolume(AUDIO_DEV AiDevId, AI_CHN AiChn, HI_S32* ps32VolumeDb); 64 | 65 | 66 | 67 | 68 | #ifdef __cplusplus 69 | #if __cplusplus 70 | } 71 | #endif 72 | #endif /* __cplusplus */ 73 | 74 | #endif /* __MPI_AI_H__ */ 75 | 76 | -------------------------------------------------------------------------------- /sdk/gk7205v300/include/comm_aenc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Hunan Goke,Chengdu Goke,Shandong Goke. 2021. All rights reserved. 3 | */ 4 | 5 | #ifndef __COMM_AENC_H__ 6 | #define __COMM_AENC_H__ 7 | 8 | #include "type.h" 9 | #include "common.h" 10 | #include "comm_aio.h" 11 | 12 | #ifdef __cplusplus 13 | #if __cplusplus 14 | extern "C" { 15 | #endif 16 | #endif 17 | 18 | typedef struct AENC_ATTR_G711_S { 19 | GK_U32 resv; 20 | } AENC_ATTR_G711_S; 21 | 22 | typedef struct AENC_ATTR_G726_S { 23 | G726_BPS_E enG726bps; 24 | } AENC_ATTR_G726_S; 25 | 26 | typedef struct AENC_ATTR_ADPCM_S { 27 | ADPCM_TYPE_E enADPCMType; 28 | } AENC_ATTR_ADPCM_S; 29 | 30 | typedef struct AENC_ATTR_LPCM_S { 31 | GK_U32 resv; 32 | } AENC_ATTR_LPCM_S; 33 | 34 | typedef struct AENC_ENCODER_S { 35 | PAYLOAD_TYPE_E enType; 36 | GK_U32 u32MaxFrmLen; 37 | GK_CHAR aszName[17]; 38 | GK_S32 (*pfnOpenEncoder)(GK_VOID *pEncoderAttr, GK_VOID **ppEncoder); 39 | GK_S32 (*pfnEncodeFrm) 40 | (GK_VOID *pEncoder, const AUDIO_FRAME_S *pstData, GK_U8 *pu8Outbuf, 41 | GK_U32 *pu32OutLen); 42 | GK_S32 (*pfnCloseEncoder)(GK_VOID *pEncoder); 43 | } AENC_ENCODER_S; 44 | 45 | typedef struct AENC_CHN_ATTR_S { 46 | PAYLOAD_TYPE_E enType; 47 | GK_U32 u32PtNumPerFrm; 48 | GK_U32 u32BufSize; 49 | GK_VOID ATTRIBUTE *pValue; 50 | } AENC_CHN_ATTR_S; 51 | 52 | typedef enum EN_AENC_ERR_CODE_E { 53 | AENC_ERR_ENCODER_ERR = 64, 54 | AENC_ERR_VQE_ERR = 65, 55 | } EN_AENC_ERR_CODE_E; 56 | 57 | #define ERR_CODE_AENC_INVALID_DEVID \ 58 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID) 59 | #define ERR_CODE_AENC_INVALID_CHNID \ 60 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID) 61 | #define ERR_CODE_AENC_ILLEGAL_PARAM \ 62 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 63 | #define ERR_CODE_AENC_EXIST \ 64 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST) 65 | #define ERR_CODE_AENC_UNEXIST \ 66 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST) 67 | #define ERR_CODE_AENC_NULL_PTR \ 68 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 69 | #define ERR_CODE_AENC_NOT_CONFIG \ 70 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_CONFIG) 71 | #define ERR_CODE_AENC_NOT_SUPPORT \ 72 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) 73 | #define ERR_CODE_AENC_NOT_PERM \ 74 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 75 | #define ERR_CODE_AENC_NOMEM \ 76 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM) 77 | #define ERR_CODE_AENC_NOBUF \ 78 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF) 79 | #define ERR_CODE_AENC_BUF_EMPTY \ 80 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY) 81 | #define ERR_CODE_AENC_BUF_FULL \ 82 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL) 83 | #define ERR_CODE_AENC_SYS_NOTREADY \ 84 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 85 | #define ERR_CODE_AENC_ENCODER_ERR \ 86 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, AENC_ERR_ENCODER_ERR) 87 | #define ERR_CODE_AENC_VQE_ERR \ 88 | DEFINE_ERR_CODE(MOD_ID_AENC, EN_ERR_LEVEL_ERROR, AENC_ERR_VQE_ERR) 89 | 90 | #ifdef __cplusplus 91 | #if __cplusplus 92 | } 93 | #endif 94 | #endif 95 | 96 | #endif 97 | --------------------------------------------------------------------------------