├── fonts ├── common ├── font_ardu.png ├── font_btfl.png ├── font_inav.png ├── font_ardu_hd.png ├── font_btfl_hd.png ├── font_inav_hd.png ├── UbuntuMono-Regular.ttf └── original │ ├── inav │ ├── font.png │ └── font_hd.png │ └── betaflight │ ├── font.png │ └── font_hd.png ├── msposd_x ├── pics ├── AHI_OSD.png ├── diag_1.png ├── vtxmenu.png ├── inav_review.png └── OSD_Variable_font.jpg ├── osd ├── net │ ├── network.o │ ├── network.h │ ├── serial.h │ ├── data_protocol.h │ └── network.c ├── util │ ├── fs_util.h │ ├── debug.h │ ├── settings.h │ ├── subtitle.h │ ├── display_info.h │ ├── time_util.h │ ├── interface.h │ ├── fs_util.c │ ├── ini_parser.h │ └── settings.c ├── msp │ ├── vtxmenu.h │ ├── msp_displayport.h │ └── msp.h └── font │ └── font.h ├── msposd.h ├── osd.h ├── .clang-format ├── run_desktop.sh ├── 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 ├── hi3516ev300 │ └── include │ │ ├── hi_comm_ai.h │ │ ├── hi_comm_ao.h │ │ ├── hi_isp_debug.h │ │ ├── mpi_region.h │ │ ├── hi_i2c.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 └── infinity6 │ └── include │ └── mi_rgn.h ├── safeboot.sh ├── .gitignore ├── 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 ├── bmp ├── symbols.h ├── config.h ├── star │ ├── i6c_hal.h │ ├── i6c_common.h │ └── i6c_common copy.h ├── text.h ├── region.h ├── lib │ ├── LICENSE │ └── schrift.h ├── types.h └── macros.h ├── .vscode ├── tasks.json ├── c_cpp_properties.json └── settings.json ├── compat.c ├── .github └── workflows │ ├── firmware.yml │ └── build.yml ├── majestic.yaml ├── Makefile └── develepment_notes.txt /fonts/common: -------------------------------------------------------------------------------- 1 | betaflight -------------------------------------------------------------------------------- /msposd_x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/msposd_x -------------------------------------------------------------------------------- /pics/AHI_OSD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/pics/AHI_OSD.png -------------------------------------------------------------------------------- /pics/diag_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/pics/diag_1.png -------------------------------------------------------------------------------- /pics/vtxmenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/pics/vtxmenu.png -------------------------------------------------------------------------------- /fonts/font_ardu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/font_ardu.png -------------------------------------------------------------------------------- /fonts/font_btfl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/font_btfl.png -------------------------------------------------------------------------------- /fonts/font_inav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/font_inav.png -------------------------------------------------------------------------------- /osd/net/network.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/osd/net/network.o -------------------------------------------------------------------------------- /msposd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | uint64_t get_current_time_ms(); 5 | -------------------------------------------------------------------------------- /pics/inav_review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/pics/inav_review.png -------------------------------------------------------------------------------- /fonts/font_ardu_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/font_ardu_hd.png -------------------------------------------------------------------------------- /fonts/font_btfl_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/font_btfl_hd.png -------------------------------------------------------------------------------- /fonts/font_inav_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/font_inav_hd.png -------------------------------------------------------------------------------- /pics/OSD_Variable_font.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/pics/OSD_Variable_font.jpg -------------------------------------------------------------------------------- /fonts/UbuntuMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/UbuntuMono-Regular.ttf -------------------------------------------------------------------------------- /fonts/original/inav/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/original/inav/font.png -------------------------------------------------------------------------------- /fonts/original/inav/font_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/original/inav/font_hd.png -------------------------------------------------------------------------------- /fonts/original/betaflight/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/original/betaflight/font.png -------------------------------------------------------------------------------- /osd.h: -------------------------------------------------------------------------------- 1 | #define MAX_STATUS_MSG_LEN 500 2 | 3 | extern char current_fc_identifier[4]; 4 | 5 | uint64_t get_time_ms(); -------------------------------------------------------------------------------- /osd/net/network.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int connect_to_server(char *address, int port); 4 | int bind_socket(int port); -------------------------------------------------------------------------------- /fonts/original/betaflight/font_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenIPC/msposd/main/fonts/original/betaflight/font_hd.png -------------------------------------------------------------------------------- /osd/util/fs_util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | int32_t get_int_from_fs(char *); 6 | void *open_dict(int, int *); -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | UseTab: Always 3 | IndentWidth: 4 4 | TabWidth: 4 5 | AlignAfterOpenBracket: DontAlign 6 | ColumnLimit: 100 7 | -------------------------------------------------------------------------------- /osd/util/debug.h: -------------------------------------------------------------------------------- 1 | // #pragma once 2 | 3 | #ifdef DEBUG_ 4 | #define DEBUG_PRINT(fmt, args...) fprintf(stderr, fmt, ##args) 5 | #else 6 | #define DEBUG_PRINT(fmt, args...) 7 | #endif -------------------------------------------------------------------------------- /run_desktop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Define the command with all the options 4 | CMD="/home/home/src/msposd/msposd --master 127.0.0.1:14550 --baudrate 115200 --osd -r 50 --ahi 3 --matrix 11 -v" 5 | 6 | # Execute the command 7 | $CMD 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /safeboot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cp /etc/wfb.conf /etc/wfb.conf_before_safeboot 4 | cp /etc/majestic.yaml /etc/majestic.yaml_before_safeboot 5 | cp /etc/wfb.conf_safeboot /etc/wfb.conf 6 | cp /etc/majestic.yaml_safeboot /etc/majestic.yaml 7 | reboot -------------------------------------------------------------------------------- /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/util/settings.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define MAX_LINE_LENGTH 256 5 | 6 | char *read_setting(const char *filename, char *key); 7 | int write_setting(const char *filename, const char *key, const char *new_value); 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/net/serial.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | int open_serial_port(const char *device, speed_t baudrate); 6 | int open_pty(const char **pty_name); 7 | #ifdef __ANDROID__ 8 | int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp); 9 | #endif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | mavfwd 2 | tmp/** 3 | toolchain/ 4 | /*.png 5 | majestic.yaml 6 | /msposd 7 | firmware/ 8 | release/ 9 | aarch64/ 10 | disk.raw 11 | msposd_goke 12 | msposd_hisi 13 | msposd_star6b0 14 | msposd_star6e 15 | msposd_star6c 16 | msposd 17 | msposd_rockchip 18 | version.h 19 | serial_monitor.c 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/util/subtitle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "../../osd.h" 4 | 5 | #define HEADER_BYTES 40 6 | #define FC_TYPE_BYTES 4 7 | #define MAX_OSD_WIDTH 54 8 | #define MAX_OSD_HEIGHT 20 9 | 10 | void write_srt_file(); 11 | void handle_osd_out(); 12 | void inotify_callback(evutil_socket_t fd, short events, void* arg); 13 | void check_recoding_file(); 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/util/display_info.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #define NUM_CHARS 256 6 | #define NUM_FONT_PAGES 4 7 | 8 | typedef struct display_info_s { 9 | uint8_t char_width; 10 | uint8_t char_height; 11 | uint8_t font_width; 12 | uint8_t font_height; 13 | uint16_t x_offset; 14 | uint16_t y_offset; 15 | void *fonts[NUM_FONT_PAGES]; 16 | } display_info_t; -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 "Sat Jul 15 2023" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /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 "Sat Jul 15 2023" 11 | #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0" 12 | #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22 13 | 14 | #endif // MAVLINK_VERSION_H 15 | -------------------------------------------------------------------------------- /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 "Sat Jul 15 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_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 | -------------------------------------------------------------------------------- /bmp/symbols.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "macros.h" 7 | 8 | static void inline *hal_symbol_load(const char *module, void *handle, const char *symbol) { 9 | void *function = dlsym(handle, symbol); 10 | if (!function) { 11 | HAL_DANGER(module, "Failed to acquire symbol %s!\n", symbol); 12 | return (void*)0; 13 | } 14 | return function; 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 | -------------------------------------------------------------------------------- /osd/msp/vtxmenu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../util/ini_parser.h" 3 | #include "msp_displayport.h" 4 | #include 5 | 6 | #define OSD_HD_COLS 53 7 | #define OSD_HD_ROWS 20 8 | #define MAX_VTX_MENU_COLS 30 9 | 10 | void display_menu(displayport_vtable_t *display_driver, MenuSection *section, int selected_option); 11 | void clear_vtx_menu(); 12 | void doreboot(); 13 | void exitVTXMenu(); 14 | void runCustomCommand(); 15 | void safeboot(); 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/net/data_protocol.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef struct packet_data_s { 4 | uint16_t tx_temperature; 5 | uint16_t version_specifier; // Used to be bitrate! Danger! 0xFFFF means V2 6 | // (no bitrate) for now. 7 | uint16_t tx_voltage; 8 | char fc_variant[4]; 9 | } __attribute__((packed)) packet_data_t; 10 | 11 | typedef struct compressed_data_header_s { 12 | uint16_t version; 13 | uint16_t hd_options; 14 | } __attribute__((packed)) compressed_data_header_t; -------------------------------------------------------------------------------- /bmp/config.h: -------------------------------------------------------------------------------- 1 | // Good for ARGB8888 360x360 and ARGB1555 512x512 2 | #define BUF_SIZE (512 * 1024) 3 | // OpenIPC font must be replaced for Unicode support 4 | #define DEF_FONT "UbuntuMono-Regular" 5 | #define DEF_POSX 16 6 | #define DEF_POSY 16 7 | #define DEF_SIZE 32.0f 8 | #define DEF_TIMEFMT "%Y/%m/%d %H:%M:%S" 9 | #define MAX_CONN 16 10 | // get two more than osd-tool in order not to interfere with it 11 | #define MAX_OSD 10 12 | #define PORT "9000" 13 | #define QUEUE_SIZE 1000000 14 | #define SUPP_UTF32 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bmp/star/i6c_hal.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef I6C_HAL_H 3 | #define I6C_HAL_H 4 | 5 | #pragma once 6 | 7 | #include "i6c_common.h" 8 | #include "i6c_rgn.h" 9 | #include "i6c_sys.h" 10 | 11 | #include 12 | #include 13 | 14 | 15 | extern char keepRunning; 16 | 17 | void i6c_hal_deinit(void); 18 | int i6c_hal_init(void); 19 | 20 | int i6c_region_create(char handle, hal_rect rect, short opacity); 21 | void i6c_region_deinit(void); 22 | void i6c_region_destroy(char handle); 23 | int i6c_region_init(i6c_rgn_pal *palette); 24 | int i6c_region_setbitmap(int handle, hal_bitmap *bitmap); 25 | 26 | void i6c_system_deinit(void); 27 | int i6c_system_init(void); 28 | #endif -------------------------------------------------------------------------------- /bmp/text.h: -------------------------------------------------------------------------------- 1 | #ifndef TEXT_H_ 2 | #define TEXT_H_ 3 | 4 | #ifdef __cplusplus 5 | #if __cplusplus 6 | extern "C" { 7 | #endif 8 | #endif 9 | 10 | #include "lib/schrift.h" 11 | 12 | #include "common.h" 13 | 14 | static SFT sft; 15 | static char last_font_name[256] = ""; 16 | static double last_font_size=0; 17 | static SFT_Image canvas; 18 | static SFT_LMetrics lmtx; 19 | static BITMAP bitmap; 20 | 21 | RECT measure_text(const char *font, double size, const char *text); 22 | BITMAP raster_text(const char *font, double size, const char *text, uint16_t color); 23 | 24 | int FreeCachedFont(); 25 | 26 | #ifdef __cplusplus 27 | #if __cplusplus 28 | } 29 | #endif 30 | #endif 31 | #endif -------------------------------------------------------------------------------- /osd/util/time_util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #define NSEC_PER_SEC 1000000000 7 | #define MSEC_PER_SEC 1000 8 | 9 | static inline void timespec_subtract( 10 | struct timespec *res, const struct timespec *a, const struct timespec *b) { 11 | res->tv_sec = a->tv_sec - b->tv_sec; 12 | res->tv_nsec = a->tv_nsec - b->tv_nsec; 13 | if (res->tv_nsec < 0) { 14 | res->tv_sec--; 15 | res->tv_nsec += NSEC_PER_SEC; 16 | } 17 | } 18 | 19 | static inline int64_t timespec_subtract_ns(const struct timespec *a, const struct timespec *b) { 20 | struct timespec res; 21 | timespec_subtract(&res, a, b); 22 | return (int64_t)res.tv_sec * NSEC_PER_SEC + res.tv_nsec; 23 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 -7157248543085918260 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 | -------------------------------------------------------------------------------- /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 5090287056522390184 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 | -------------------------------------------------------------------------------- /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 7747193470092757787 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 | -------------------------------------------------------------------------------- /osd/util/interface.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../msp/msp.h" 3 | #include 4 | 5 | #define MAX_ENTRIES 100 // Maximum number of frequency-channel pairs to store 6 | 7 | extern uint8_t channelFreqLabel[FREQ_TABLE_SIZE]; 8 | extern uint8_t bandLetter[BAND_COUNT]; 9 | extern uint16_t channelFreqTable[FREQ_TABLE_SIZE]; 10 | 11 | // Structure to hold frequency and channel 12 | typedef struct { 13 | int frequency; 14 | int channel; 15 | } FrequencyChannel; 16 | 17 | // Function to extract frequency and channel from a line 18 | void parse_line(char *line, FrequencyChannel *fc, int *count); 19 | 20 | int query_interface_for_available_frequencies(); 21 | 22 | void set_frequency(char *interface, int channel); 23 | 24 | int read_current_freq_from_interface(char *interface); 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/font/font.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "../util/display_info.h" 6 | 7 | #define FALLBACK_FONT_PATH "/blackbox/font" 8 | #define ENTWARE_FONT_PATH "/opt/fonts/font" 9 | #define SDCARD_FONT_PATH "/storage/sdcard0/font" 10 | 11 | #define FALLBACK_FONT NULL 12 | 13 | typedef enum { 14 | FONT_VARIANT_GENERIC, 15 | FONT_VARIANT_BETAFLIGHT, 16 | FONT_VARIANT_INAV, 17 | FONT_VARIANT_ARDUPILOT, 18 | FONT_VARIANT_KISS_ULTRA, 19 | FONT_VARIANT_QUICKSILVER, 20 | FONT_VARIANT_COUNT 21 | } font_variant_e; 22 | 23 | void load_font(display_info_t *display_info, const char *font_variant); 24 | void close_font(display_info_t *display_info); 25 | void get_font_path_with_extension(char *font_path_dest, const char *font_path, 26 | const char *extension, uint8_t len, uint8_t is_hd, const char *font_variant); 27 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "gcc build", 6 | "type": "shell", 7 | "command": "./build.sh native", 8 | "args": [], 9 | "group": { 10 | "kind": "build", 11 | "isDefault": true 12 | }, 13 | "problemMatcher": [ 14 | "$gcc" 15 | ], 16 | "detail": "Build project using Makefile" 17 | }, 18 | { 19 | "label": "copy msposd", 20 | "type": "shell", 21 | "command": "cp", 22 | "args": [ 23 | "-f", 24 | "${workspaceFolder}/msposd", 25 | "${workspaceFolder}/msposd_x" 26 | ], 27 | "problemMatcher": [], 28 | "detail": "Copy msposd to workspace folder", 29 | "dependsOn": "gcc build" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /compat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | int __ctype_b; 19 | int __stdin; 20 | 21 | #if __INFINITY6C__ 22 | int __assert; 23 | int _MI_PRINT_GetDebugLevel; 24 | 25 | void backtrace(void) {} 26 | 27 | void backtrace_symbols(void) {} 28 | #endif 29 | 30 | #if !defined(_x86) && !defined(__ROCKCHIP__) 31 | int __fgetc_unlocked(FILE *stream) { return fgetc(stream); } 32 | 33 | size_t _stdlib_mb_cur_max(void) { return 0; } 34 | 35 | void *mmap(void *start, size_t len, int prot, int flags, int fd, uint32_t off) { 36 | return (void *)syscall(SYS_mmap2, start, len, prot, flags, fd, off >> 12); 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bmp/region.h: -------------------------------------------------------------------------------- 1 | #ifndef OSD_H_ 2 | #define OSD_H_ 3 | 4 | #ifdef __cplusplus 5 | #if __cplusplus 6 | extern "C" { 7 | #endif 8 | #endif 9 | 10 | //#define PIXEL_FORMAT_DEFAULT E_MI_RGN_PIXEL_FORMAT_I8 11 | #include "bitmap.h" 12 | #include "common.h" 13 | 14 | int create_region(int *handle, int x, int y, int width, int height); 15 | int prepare_bitmap( 16 | const char *filename, BITMAP *bitmap, int bFil, unsigned int u16FilColor, int enPixelFmt); 17 | int set_bitmap(int handle, BITMAP *bitmap); 18 | unsigned long set_bitmapEx(int handle, BITMAP *bitmap, int BitsPerPixel); 19 | int unload_region(int *handle); 20 | void *get_directBMP(int handle); 21 | int InitRGN_SigmaStar(); 22 | #ifdef __SIGMASTAR__ 23 | int GetCanvas(int handle, MI_RGN_CanvasInfo_t *stCanvasInfo); 24 | uint32_t ST_OSD_DrawPoint( 25 | MI_U16 *pDst, MI_U32 u32Stride, uint32_t u32X, uint32_t u32Y, MI_U32 u32Color); 26 | #endif 27 | 28 | #ifdef __cplusplus 29 | #if __cplusplus 30 | } 31 | #endif 32 | #endif 33 | #endif 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bmp/lib/LICENSE: -------------------------------------------------------------------------------- 1 | The following software is included in this product: @tomolt/libschrift. 2 | A copy of the original source code may be downloaded from git+https://github.com/tomolt/libschrift. 3 | It contains the following license and notice below: 4 | 5 | ISC License 6 | 7 | © 2019-2022 Thomas Oltmann and contributors 8 | 9 | Permission to use, copy, modify, and/or distribute this software for any 10 | purpose with or without fee is hereby granted, provided that the above 11 | copyright notice and this permission notice appear in all copies. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 14 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 16 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 18 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 19 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 | 21 | --- -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.github/workflows/firmware.yml: -------------------------------------------------------------------------------- 1 | name: Testbuild of OpenIPC 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | buildroot: 10 | if: github.repository == 'openipc/msposd' 11 | name: Firmware 12 | runs-on: ubuntu-latest 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | platform: 17 | # Sigmastar [I6E] 18 | - ssc30kq_lite 19 | - ssc338q_lite 20 | 21 | # Hisilicon [HI3516EV200] 22 | - hi3516ev200_lite 23 | - hi3516ev300_lite 24 | 25 | # Hisilicon [HI3536DV100] 26 | - hi3536dv100_lite 27 | 28 | # Goke [GK7205V200] 29 | - gk7205v200_lite 30 | - gk7205v210_lite 31 | - gk7205v300_lite 32 | steps: 33 | - name: Build OpenIPC 34 | env: 35 | MSPOSD_VERSION: ${{ github.sha }} 36 | run: | 37 | git clone https://github.com/openipc/firmware --depth=1 38 | cd firmware 39 | make BOARD=${{matrix.platform}}_${{matrix.release}} MSPOSD_VERSION=${MSPOSD_VERSION} br-msposd 40 | -------------------------------------------------------------------------------- /bmp/types.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "macros.h" 4 | 5 | #ifndef ALIGN_BACK 6 | #define ALIGN_BACK(x, a) (((x) / (a)) * (a)) 7 | #endif 8 | #ifndef ALIGN_UP 9 | #define ALIGN_UP(x, a) ((((x) + ((a)-1)) / a) * a) 10 | #endif 11 | #ifndef CEILING_2_POWER 12 | #define CEILING_2_POWER(x, a) (((x) + ((a)-1)) & (~((a) - 1))) 13 | #endif 14 | #ifndef MIN 15 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) 16 | #endif 17 | #ifndef MAX 18 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) 19 | #endif 20 | 21 | typedef enum { 22 | HAL_PLATFORM_UNK, 23 | HAL_PLATFORM_I6, 24 | HAL_PLATFORM_I6C, 25 | HAL_PLATFORM_M6, 26 | HAL_PLATFORM_V1, 27 | HAL_PLATFORM_V2, 28 | HAL_PLATFORM_V3, 29 | HAL_PLATFORM_V4 30 | } hal_platform; 31 | 32 | typedef enum { 33 | OP_READ = 0b1, 34 | OP_WRITE = 0b10, 35 | OP_MODIFY = 0b11 36 | } hal_register_op; 37 | 38 | typedef struct { 39 | unsigned short width, height; 40 | } hal_dim; 41 | 42 | typedef struct { 43 | hal_dim dim; 44 | void *data; 45 | } hal_bitmap; 46 | 47 | typedef struct { 48 | unsigned short x, y, width, height; 49 | } hal_rect; -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/util/fs_util.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "fs_util.h" 11 | 12 | #define DICTIONARY_PATH "/opt/mspdictionaries" 13 | 14 | int32_t get_int_from_fs(char *path) { 15 | int32_t val; 16 | char read_buffer[32]; 17 | memset(read_buffer, 0, 32); 18 | int fd = open(path, O_RDONLY, 0); 19 | if (fd < 0) { 20 | return -1; 21 | } 22 | int read_count = read(fd, read_buffer, 32); 23 | if (read_count > 0) { 24 | val = atoi(read_buffer); 25 | } 26 | close(fd); 27 | return val; 28 | } 29 | 30 | void *open_dict(int dict_version, int *size) { 31 | char file_path[255]; 32 | snprintf(file_path, 255, "%s/dictionary_%d.bin", DICTIONARY_PATH, dict_version); 33 | struct stat st; 34 | memset(&st, 0, sizeof(st)); 35 | stat(file_path, &st); 36 | size_t filesize = st.st_size; 37 | int fd = open(file_path, O_RDONLY, 0); 38 | if (!fd) { 39 | return NULL; 40 | } 41 | void *dict = malloc(filesize); 42 | void *mmappedData = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE, fd, 0); 43 | *size = filesize; 44 | memcpy(dict, mmappedData, filesize); 45 | close(fd); 46 | munmap(mmappedData, filesize); 47 | return dict; 48 | } 49 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /majestic.yaml: -------------------------------------------------------------------------------- 1 | system: 2 | webAdmin: enabled 3 | buffer: 1024 4 | image: 5 | mirror: false 6 | flip: false 7 | rotate: none 8 | contrast: 70 9 | hue: 50 10 | saturation: 50 11 | luminance: 50 12 | osd: 13 | enabled: false 14 | template: "%a %e %B %Y %H:%M:%S %Z" 15 | nightMode: 16 | enabled: false 17 | records: 18 | enabled: false 19 | path: /mnt/mmcblk0p1/%F/%H.mp4 20 | maxUsage: 95 21 | video0: 22 | enabled: true 23 | bitrate: 14000 24 | codec: h265 25 | # size: 1920x1080 26 | size: 1280x720 27 | # size: 3840x2160 28 | # size: 1920x1080 29 | # size: 2944x1656 30 | rcMode: cbr 31 | gopSize: 1.5 32 | fps: 60 33 | video1: 34 | enabled: false 35 | jpeg: 36 | enabled: false 37 | mjpeg: 38 | size: 640x360 39 | fps: 5 40 | bitrate: 1024 41 | audio: 42 | enabled: false 43 | volume: auto 44 | srate: 8000 45 | rtsp: 46 | enabled: true 47 | port: 554 48 | hls: 49 | enabled: false 50 | youtube: 51 | enabled: false 52 | motionDetect: 53 | enabled: false 54 | visualize: true 55 | debug: true 56 | ipeye: 57 | enabled: false 58 | watchdog: 59 | enabled: true 60 | timeout: 10 61 | isp: 62 | slowShutter: disabled 63 | overrideShutter: 60 64 | drc: 350 65 | IPQPDelta: -8 66 | exposure: 12 67 | ! 'exposure:': 9 68 | netip: 69 | enabled: false 70 | outgoing: 71 | - udp://127.0.0.1:5600 72 | #- udp://192.168.1.20:5600 73 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bmp/macros.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #define HAL_DANGER(mod, x, ...) \ 7 | do { \ 8 | fprintf(stderr, "[%s] \033[31m", (mod)); \ 9 | fprintf(stderr, (x), ##__VA_ARGS__); \ 10 | fprintf(stderr, "\033[0m"); \ 11 | } while (0) 12 | 13 | #define HAL_ERROR(mod, x, ...) \ 14 | do { \ 15 | fprintf(stderr, "[%s] \033[31m", (mod)); \ 16 | fprintf(stderr, (x), ##__VA_ARGS__); \ 17 | fprintf(stderr, "\033[0m"); \ 18 | return EXIT_FAILURE; \ 19 | } while (0) 20 | 21 | #define HAL_INFO(mod, x, ...) \ 22 | do { \ 23 | fprintf(stderr, "[%s] ", (mod)); \ 24 | fprintf(stderr, (x), ##__VA_ARGS__); \ 25 | } while (0) 26 | 27 | #define HAL_WARNING(mod, x, ...) \ 28 | do { \ 29 | fprintf(stderr, "[%s] \033[33m", (mod)); \ 30 | fprintf(stderr, (x), ##__VA_ARGS__); \ 31 | fprintf(stderr, "\033[0m"); \ 32 | } while (0) 33 | 34 | #ifndef CEILING 35 | #define CEILING_POS(X) ((X-(int)(X)) > 0 ? (int)(X+1) : (int)(X)) 36 | #define CEILING_NEG(X) (int)(X) 37 | #define CEILING(X) ( ((X) > 0) ? CEILING_POS(X) : CEILING_NEG(X) ) 38 | #endif 39 | 40 | #define EMPTY(x) (x[0] == '\0') 41 | #define ENDS_WITH(a, b) \ 42 | ((strlen(a) > strlen(b)) && !strcmp(a + strlen(a) - strlen(b), b)) 43 | #define EQUALS(a, b) !strcmp(a, b) 44 | #define EQUALS_CASE(a, b) !strcasecmp(a, b) 45 | #define STARTS_WITH(a, b) !strncmp(a, b, strlen(b)) -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/msp/msp_displayport.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "msp.h" 3 | #include 4 | #include 5 | 6 | typedef enum { 7 | MSP_DISPLAYPORT_KEEPALIVE, 8 | MSP_DISPLAYPORT_CLOSE, 9 | MSP_DISPLAYPORT_CLEAR, 10 | MSP_DISPLAYPORT_DRAW_STRING, 11 | MSP_DISPLAYPORT_DRAW_SCREEN, 12 | MSP_DISPLAYPORT_SET_OPTIONS, 13 | MSP_DISPLAYPORT_DRAW_SYSTEM, 14 | MSP_DISPLAYPORT_INFO_MSG // custom type added for sending status text 15 | } msp_displayport_cmd_e; 16 | 17 | typedef enum { 18 | MSP_SD_OPTION_30_16, 19 | MSP_HD_OPTION_50_18, 20 | MSP_HD_OPTION_30_16, 21 | MSP_HD_OPTION_60_22 22 | } msp_hd_options_e; 23 | 24 | typedef void (*draw_character_func)(uint32_t x, uint32_t y, uint16_t c); 25 | typedef void (*set_options_func)(uint8_t font, msp_hd_options_e is_hd); 26 | typedef void (*clear_screen_func)(); 27 | typedef void (*draw_complete_func)(); 28 | 29 | typedef struct displayport_vtable_s { 30 | draw_character_func draw_character; 31 | clear_screen_func clear_screen; 32 | draw_complete_func draw_complete; 33 | set_options_func set_options; 34 | } displayport_vtable_t; 35 | 36 | int displayport_process_message(displayport_vtable_t *display_driver, msp_msg_t *msg); 37 | 38 | bool init_state_manager(); 39 | int get_current_selection(); 40 | const char *get_option(int index); 41 | void move_selection(int direction); 42 | void change_option(int direction); 43 | void print_current_state(displayport_vtable_t *display_driver); 44 | void handle_stickcommands(uint16_t channels[18]); 45 | -------------------------------------------------------------------------------- /osd/net/network.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "network.h" 9 | 10 | int connect_to_server(char *address, int port) { 11 | int sockfd; 12 | struct sockaddr_in servaddr; 13 | 14 | // socket create and verification 15 | sockfd = socket(AF_INET, SOCK_DGRAM, 0); 16 | if (sockfd == -1) { 17 | printf("socket failed!\n"); 18 | return -1; 19 | } 20 | 21 | memset(&servaddr, 0, sizeof(servaddr)); 22 | 23 | // assign IP, PORT 24 | servaddr.sin_family = AF_INET; 25 | servaddr.sin_addr.s_addr = inet_addr(address); 26 | servaddr.sin_port = htons(port); 27 | 28 | if (connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) != 0) { 29 | printf("connection failed!\n"); 30 | return -1; 31 | } 32 | 33 | fcntl(sockfd, F_SETFL, O_NONBLOCK); 34 | return sockfd; 35 | } 36 | 37 | int bind_socket(int port) { 38 | struct sockaddr_in si_me; 39 | int s; 40 | if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { 41 | printf("Failed to get socket!\n"); 42 | return -1; 43 | } 44 | 45 | memset((char *)&si_me, 0, sizeof(si_me)); 46 | 47 | si_me.sin_family = AF_INET; 48 | si_me.sin_port = htons(port); 49 | si_me.sin_addr.s_addr = htonl(INADDR_ANY); 50 | 51 | // bind socket to port 52 | if (bind(s, (struct sockaddr *)&si_me, sizeof(si_me)) == -1) { 53 | printf("Failed to get bound!\n"); 54 | return -1; 55 | } 56 | return s; 57 | } 58 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 7747193470092757787 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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - main 6 | tags: 7 | - '*' 8 | pull_request: 9 | branches: 10 | - main 11 | workflow_dispatch: 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | 20 | - name: Build 21 | run: | 22 | sudo apt-get update 23 | DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get -y install git make wget gcc libevent-dev libcsfml-dev file g++ cpio unzip rsync bc bzip2 libcairo-dev 24 | ./build.sh goke 25 | ./build.sh hisi 26 | ./build.sh star6b0 27 | ./build.sh star6e 28 | ./build.sh native 29 | ./build.sh rockchip 30 | 31 | - name: Upload binary 32 | uses: actions/upload-artifact@v4 33 | with: 34 | path: | 35 | msposd_goke 36 | msposd_hisi 37 | msposd_star6b0 38 | msposd_star6e 39 | msposd 40 | msposd_rockchip 41 | 42 | - name: Versioned release 43 | if: startsWith(github.ref, 'refs/tags/') 44 | uses: softprops/action-gh-release@v2 45 | with: 46 | files: | 47 | msposd_goke 48 | msposd_hisi 49 | msposd_star6b0 50 | msposd_star6e 51 | msposd 52 | msposd_rockchip 53 | 54 | - name: Upload latest 55 | if: github.ref == 'refs/heads/main' && github.event_name == 'push' 56 | uses: softprops/action-gh-release@v2 57 | with: 58 | tag_name: latest 59 | files: | 60 | msposd_goke 61 | msposd_hisi 62 | msposd_star6b0 63 | msposd_star6e 64 | msposd 65 | msposd_rockchip 66 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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/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/infinity6/include/mi_rgn.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2018-2019 Sigmastar Technology Corp. 2 | All rights reserved. 3 | 4 | Unless otherwise stipulated in writing, any and all information contained 5 | herein regardless in any format shall remain the sole proprietary of 6 | Sigmastar Technology Corp. and be kept in strict confidence 7 | (��Sigmastar Confidential Information��) by the recipient. 8 | Any unauthorized act including without limitation unauthorized disclosure, 9 | copying, use, reproduction, sale, distribution, modification, disassembling, 10 | reverse engineering and compiling of the contents of Sigmastar Confidential 11 | Information is unlawful and strictly prohibited. Sigmastar hereby reserves the 12 | rights to any and all damages, losses, costs and expenses resulting therefrom. 13 | */ 14 | #ifndef _MI_RGN_H_ 15 | #define _MI_RGN_H_ 16 | 17 | #include "mi_common_datatype.h" 18 | #include "mi_rgn_datatype.h" 19 | 20 | #if __INFINITY6C__ 21 | MI_S32 MI_SYS_Init(MI_U16 u16SocId); 22 | #define DEV 0, 23 | #define SOC MI_U16 u16SocId, 24 | #define DEV2 0 25 | #define SOC2 MI_U16 u16SocId 26 | #else 27 | #define DEV 28 | #define SOC 29 | #define DEV2 30 | #define SOC2 31 | #endif 32 | 33 | MI_S32 MI_RGN_Init(SOC MI_RGN_PaletteTable_t *pstPaletteTable); 34 | MI_S32 MI_RGN_DeInit(SOC2); 35 | MI_S32 MI_RGN_Create(SOC MI_RGN_HANDLE hHandle, MI_RGN_Attr_t *pstRegion); 36 | MI_S32 MI_RGN_Destroy(SOC MI_RGN_HANDLE hHandle); 37 | MI_S32 MI_RGN_GetAttr(SOC MI_RGN_HANDLE hHandle, MI_RGN_Attr_t *pstRegion); 38 | MI_S32 MI_RGN_SetBitMap(SOC MI_RGN_HANDLE hHandle, MI_RGN_Bitmap_t *pstBitmap); 39 | MI_S32 MI_RGN_AttachToChn(SOC MI_RGN_HANDLE hHandle, MI_RGN_ChnPort_t* pstChnPort, MI_RGN_ChnPortParam_t *pstChnAttr); 40 | MI_S32 MI_RGN_DetachFromChn(SOC MI_RGN_HANDLE hHandle, MI_RGN_ChnPort_t *pstChnPort); 41 | MI_S32 MI_RGN_GetDisplayAttr(SOC MI_RGN_HANDLE hHandle, MI_RGN_ChnPort_t *pstChnPort, MI_RGN_ChnPortParam_t *pstChnPortAttr); 42 | MI_S32 MI_RGN_GetCanvasInfo(SOC MI_RGN_HANDLE hHandle, MI_RGN_CanvasInfo_t* pstCanvasInfo); 43 | MI_S32 MI_RGN_UpdateCanvas(SOC MI_RGN_HANDLE hHandle); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/util/ini_parser.h: -------------------------------------------------------------------------------- 1 | #ifndef INI_PARSER_H 2 | #define INI_PARSER_H 3 | 4 | #define MAX_OPTIONS 50 5 | #define MAX_SECTIONS 20 6 | #define MAX_VALUE_LENGTH 500 7 | #define MAX_NAME_LENGTH 50 8 | #define MAX_LABLE_LENGTH 50 9 | #define MAX_LINE_LENGTH MAX_VALUE_LENGTH * 3 + MAX_NAME_LENGTH + MAX_LABLE_LENGTH 10 | #define MAX_VALUE_LIST_ITEMS 50 11 | 12 | typedef enum { 13 | MENU_OPTION_LIST, // For list options 14 | MENU_OPTION_RANGE, // For range options 15 | MENU_OPTION_FLOATRANGE, // For range with floating point precision 16 | MENU_OPTION_SUBMENU, // For linking to a submenu 17 | MENU_OPTION_COMMAND // For executing a command when selected 18 | } MenuOptionType; 19 | 20 | typedef struct { 21 | char name[MAX_NAME_LENGTH]; 22 | char lable[MAX_LABLE_LENGTH]; 23 | char values[MAX_VALUE_LENGTH]; // Possible values for list/range 24 | MenuOptionType type; // Holds the type of option (list, range, submenu, or command) 25 | int min; // Min value for range 26 | int max; // Max value for range 27 | char read_command[MAX_VALUE_LENGTH]; // Command to read current system value 28 | char save_command[MAX_VALUE_LENGTH]; // Command to save current system value 29 | // Only used for MENU_OPTION_COMMAND to execute a function 30 | void (*command_function)(void *); // Function pointer for command execution 31 | // (modified to take void*) 32 | } MenuOption; 33 | 34 | typedef struct { 35 | char name[MAX_NAME_LENGTH]; 36 | char lable[MAX_LABLE_LENGTH]; 37 | int option_count; 38 | MenuOption options[MAX_OPTIONS]; 39 | int current_value_index[MAX_OPTIONS]; // Add this array to store the current 40 | // value index for each option in this 41 | // section 42 | } MenuSection; 43 | 44 | typedef struct { 45 | MenuSection sections[MAX_SECTIONS]; 46 | int section_count; 47 | } MenuSystem; 48 | 49 | // Function to parse the INI file 50 | void split_values( 51 | const char *values, char value_list[MAX_VALUE_LIST_ITEMS][MAX_VALUE_LENGTH], int *value_count); 52 | int parse_ini(const char *filename, MenuSystem *menu_system); 53 | void print_menu_system_state(MenuSystem *menu_system); 54 | void run_command(const char *command, char *output, int output_size); 55 | 56 | #endif // INI_PARSER_H 57 | -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Star6E", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [ 9 | "__SIGMASTAR__", 10 | "__INFINITY6__" 11 | ], 12 | "compilerPath": "/usr/bin/gcc", 13 | "cStandard": "c11", 14 | "cppStandard": "c++17", 15 | "intelliSenseMode": "gcc-x64" 16 | }, 17 | { 18 | "name": "Star6C", 19 | "includePath": [ 20 | "${workspaceFolder}/**" 21 | ], 22 | "defines": [ 23 | "__SIGMASTAR__", 24 | "__INFINITY6__", 25 | "__INFINITY6C__" 26 | ], 27 | "compilerPath": "/usr/bin/gcc", 28 | "cStandard": "c11", 29 | "cppStandard": "c++17", 30 | "intelliSenseMode": "gcc-x64" 31 | }, 32 | { 33 | "name": "native(x86)", 34 | "includePath": [ 35 | "${workspaceFolder}/**" 36 | ], 37 | "defines": [ 38 | "_x86" 39 | ], 40 | "compilerPath": "/usr/bin/gcc", 41 | "cStandard": "c11", 42 | "cppStandard": "c++17", 43 | "intelliSenseMode": "gcc-x64" 44 | }, 45 | { 46 | "name": "sigmastar-infinity6c", 47 | "compilerPath": "/home/home/src/msposd/toolchain/sigmastar-infinity6c/bin/arm-linux-gcc", 48 | "intelliSenseMode": "linux-gcc-arm", 49 | "cStandard": "c11", 50 | "includePath": [ 51 | "/home/home/src/msposd", 52 | "/home/home/src/msposd/sdk/infinity6/include", 53 | "/home/home/src/msposd/toolchain/sigmastar-infinity6c/usr/include" 54 | ], 55 | "defines": [ 56 | "__SIGMASTAR__", 57 | "__INFINITY6__", 58 | "__INFINITY6C__" 59 | ], 60 | "compilerArgs": [ 61 | "-Wno-address-of-packed-member" 62 | ] 63 | } 64 | ], 65 | "version": 4 66 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/msp/msp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #define MSP_CMD_API_VERSION 1 5 | #define MSP_CMD_FC_VARIANT 2 6 | #define MSP_CMD_FC_VERSION 3 7 | #define MSP_CMD_NAME 10 8 | #define MSP_CMD_FILTER_CONFIG 92 9 | #define MSP_CMD_PID_ADVANCED 94 10 | #define MSP_CMD_STATUS 101 11 | #define MSP_CMD_RC 105 12 | 13 | #define MSP_COMP_GPS 107 14 | #define MSP_ATTITUDE 108 15 | #define MSP_RC 105 16 | 17 | #define MSP_CMD_ANALOG 110 18 | #define MSP_CMD_RC_TUNING 111 19 | #define MSP_CMD_PID 112 20 | #define MSP_CMD_BATTERY_STATE 130 21 | #define MSP_CMD_STATUS_EX 150 22 | #define MSP_CMD_DISPLAYPORT 182 23 | #define MSP_CMD_SET_OSD_CANVAS 188 24 | 25 | #define MSP_GET_VTX_CONFIG 0x58 // 88 //out message 26 | #define MSP_SET_VTX_CONFIG 0x59 // 89 // in message 27 | #define MSP_SET_VTXTABLE_BAND \ 28 | 227 // in message set vtxTable band/channel data (one band at a 29 | // time) 30 | #define MSP_SET_VTXTABLE_POWERLEVEL \ 31 | 228 // in message set vtxTable powerLevel data (one powerLevel at a 32 | // time) 33 | 34 | #define BAND_NAME_LENGTH 8 35 | #define POWER_LEVEL_LABEL_LENGTH 3 36 | #define NUM_POWER_LEVELS \ 37 | 8 // betaflight has max 8 powerlevels, will remove 40 from the default 38 | // wfb-ng list 39 | 40 | #define CHANNEL_COUNT 8 41 | #define BAND_COUNT 8 42 | #define IS_FACTORY_BAND 0 43 | #define FREQ_TABLE_SIZE 64 44 | #define FREQ_LABEL_SIZE 64 45 | 46 | #define MSP_REBOOT 68 // in message reboot settings 47 | 48 | typedef enum { MSP_ERR_NONE, MSP_ERR_HDR, MSP_ERR_LEN, MSP_ERR_CKS } msp_error_e; 49 | 50 | typedef enum { 51 | MSP_IDLE, 52 | MSP_VERSION, 53 | MSP_DIRECTION, 54 | MSP_SIZE, 55 | MSP_CMD, 56 | MSP_PAYLOAD, 57 | MSP_CHECKSUM, 58 | } msp_state_machine_e; 59 | 60 | typedef enum { MSP_INBOUND, MSP_OUTBOUND } msp_direction_e; 61 | 62 | typedef struct msp_msg_s { 63 | uint8_t checksum; 64 | uint8_t cmd; 65 | uint8_t size; 66 | msp_direction_e direction; 67 | uint8_t payload[256]; 68 | } msp_msg_t; 69 | 70 | typedef void (*msp_msg_callback)(msp_msg_t *); 71 | 72 | typedef struct msp_state_s { 73 | msp_msg_callback cb; 74 | msp_state_machine_e state; 75 | uint8_t buf_ptr; 76 | msp_msg_t message; 77 | } msp_state_t; 78 | 79 | uint16_t msp_data_from_msg(uint8_t message_buffer[], msp_msg_t *msg); 80 | msp_error_e construct_msp_command(uint8_t message_buffer[], uint8_t command, uint8_t payload[], 81 | uint8_t size, msp_direction_e direction); 82 | msp_error_e msp_process_data(msp_state_t *msp_state, uint8_t dat); 83 | void msp_set_vtx_config(int serial_fd); 84 | -------------------------------------------------------------------------------- /bmp/lib/schrift.h: -------------------------------------------------------------------------------- 1 | /* This file is part of libschrift. 2 | * 3 | * © 2019-2022 Thomas Oltmann and contributors 4 | * 5 | * Permission to use, copy, modify, and/or distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ 16 | 17 | #ifndef SCHRIFT_H 18 | #define SCHRIFT_H 1 19 | 20 | #include /* size_t */ 21 | #include /* uint_fast32_t, uint_least32_t */ 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | #define SFT_DOWNWARD_Y 0x01 28 | 29 | typedef struct SFT SFT; 30 | typedef struct SFT_Font SFT_Font; 31 | typedef uint_least32_t SFT_UChar; /* Guaranteed to be compatible with char32_t. */ 32 | typedef uint_fast32_t SFT_Glyph; 33 | typedef struct SFT_LMetrics SFT_LMetrics; 34 | typedef struct SFT_GMetrics SFT_GMetrics; 35 | typedef struct SFT_Kerning SFT_Kerning; 36 | typedef struct SFT_Image SFT_Image; 37 | 38 | struct SFT { 39 | SFT_Font *font; 40 | double xScale; 41 | double yScale; 42 | double xOffset; 43 | double yOffset; 44 | int flags; 45 | }; 46 | 47 | struct SFT_LMetrics { 48 | double ascender; 49 | double descender; 50 | double lineGap; 51 | }; 52 | 53 | struct SFT_GMetrics { 54 | double advanceWidth; 55 | double leftSideBearing; 56 | int yOffset; 57 | int minWidth; 58 | int minHeight; 59 | }; 60 | 61 | struct SFT_Kerning { 62 | double xShift; 63 | double yShift; 64 | }; 65 | 66 | struct SFT_Image { 67 | void *pixels; 68 | int width; 69 | int height; 70 | }; 71 | 72 | const char *sft_version(void); 73 | 74 | SFT_Font *sft_loadmem(const void *mem, size_t size); 75 | SFT_Font *sft_loadfile(const char *filename); 76 | int sft_freefont(SFT_Font *font); 77 | 78 | int sft_lmetrics(const SFT *sft, SFT_LMetrics *metrics); 79 | int sft_lookup(const SFT *sft, SFT_UChar codepoint, SFT_Glyph *glyph); 80 | int sft_gmetrics(const SFT *sft, SFT_Glyph glyph, SFT_GMetrics *metrics); 81 | int sft_kerning(const SFT *sft, SFT_Glyph leftGlyph, SFT_Glyph rightGlyph, SFT_Kerning *kerning); 82 | int sft_render(const SFT *sft, SFT_Glyph glyph, SFT_Image image); 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | 88 | #endif 89 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /osd/util/settings.c: -------------------------------------------------------------------------------- 1 | #include "settings.h" 2 | #include 3 | #include 4 | 5 | // Function to read a value for a given key from the config file (dynamically 6 | // allocate memory) 7 | char *read_setting(const char *filename, char *key) { 8 | FILE *file = fopen(filename, "r"); 9 | if (file == NULL) { 10 | printf("Error: Could not open file %s\n", filename); 11 | return NULL; 12 | } 13 | 14 | char line[MAX_LINE_LENGTH]; 15 | char *value = NULL; 16 | 17 | while (fgets(line, sizeof(line), file)) { 18 | // Ignore comment lines starting with '#' 19 | if (line[0] == '#') { 20 | continue; 21 | } 22 | 23 | char file_key[MAX_LINE_LENGTH]; 24 | char file_value[MAX_LINE_LENGTH]; 25 | 26 | // Parse key=value pairs from the file 27 | if (sscanf(line, "%[^=]=%s", file_key, file_value) == 2) { 28 | // Check if the key matches 29 | if (strcmp(file_key, key) == 0) { 30 | // Dynamically allocate memory for the value 31 | value = strdup(file_value); // or custom memory allocation 32 | fclose(file); 33 | return value; 34 | } 35 | } 36 | } 37 | 38 | fclose(file); 39 | printf("Error: Key %s not found in file\n", key); 40 | return NULL; 41 | } 42 | 43 | // Function to update or add a key-value pair in the config file 44 | int write_setting(const char *filename, const char *key, const char *new_value) { 45 | 46 | // Create a temp file in the same directory as the original file 47 | char temp_filename[MAX_LINE_LENGTH]; 48 | snprintf(temp_filename, sizeof(temp_filename), "%s.tmp", filename); 49 | 50 | FILE *file = fopen(filename, "r"); 51 | FILE *temp_file = fopen(temp_filename, "w"); 52 | 53 | if (file == NULL || temp_file == NULL) { 54 | printf("Error: Could not open file\n"); 55 | return -1; 56 | } 57 | 58 | char line[MAX_LINE_LENGTH]; 59 | int found_key = 0; 60 | 61 | while (fgets(line, sizeof(line), file)) { 62 | char file_key[MAX_LINE_LENGTH]; 63 | char file_value[MAX_LINE_LENGTH]; 64 | 65 | // If it's a key=value line, check if the key matches 66 | if (sscanf(line, "%[^=]=%s", file_key, file_value) == 2) { 67 | if (strcmp(file_key, key) == 0) { 68 | // Write the updated key=value pair 69 | fprintf(temp_file, "%s=%s\n", key, new_value); 70 | found_key = 1; 71 | } else { 72 | // Otherwise, copy the line as is 73 | fprintf(temp_file, "%s", line); 74 | } 75 | } else { 76 | // Copy comments and other non key-value lines 77 | fprintf(temp_file, "%s", line); 78 | } 79 | } 80 | 81 | // If key was not found, append it at the end 82 | if (!found_key) { 83 | fprintf(temp_file, "%s=%s\n", key, new_value); 84 | } 85 | 86 | fclose(file); 87 | fclose(temp_file); 88 | 89 | // Replace original file with updated file 90 | remove(filename); 91 | rename(temp_filename, filename); 92 | 93 | return 0; 94 | } 95 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Get the current date and time in the format YYYYMMDD_HHMMSS 2 | VERSION_STRING := $(shell date +"%Y%m%d_%H%M%S") 3 | CFLAGS ?= 4 | CFLAGS += -Wno-address-of-packed-member -DVERSION_STRING="\"$(VERSION_STRING)\"" 5 | 6 | SRCS := compat.c msposd.c bmp/bitmap.c bmp/region.c bmp/lib/schrift.c bmp/text.c osd/net/network.c osd/msp/msp.c osd/msp/msp_displayport.c libpng/lodepng.c osd/util/interface.c osd/util/settings.c osd/util/ini_parser.c osd/msp/vtxmenu.c osd/util/subtitle.c 7 | OUTPUT ?= $(PWD) 8 | BUILD = $(CC) $(SRCS) -I $(SDK)/include -I$(TOOLCHAIN)/usr/include -I$(PWD) -L$(DRV) $(CFLAGS) $(LIB) -levent_core -Os -s $(CFLAGS) -o $(OUTPUT) 9 | 10 | VERSION := $(shell git describe --always --dirty) 11 | 12 | version.h: 13 | echo "Git version: $(VERSION)" 14 | echo "#ifndef VERSION_H" > version.h 15 | echo "#define VERSION_H" >> version.h 16 | echo "#define GIT_VERSION \"$(VERSION)\"" >> version.h 17 | echo "#endif // VERSION_H" >> version.h 18 | 19 | all: version.h 20 | 21 | clean: 22 | rm -f *.o msposd msposd_goke msposd_hisi msposd_star6b0 msposd_star6e msposd_rockchip 23 | 24 | goke: version.h 25 | $(eval SDK = ./sdk/gk7205v300) 26 | $(eval CFLAGS += -D__GOKE__) 27 | $(eval LIB = -ldl -ldnvqe -lgk_api -lhi_mpi -lsecurec -lupvqe -lvoice_engine -ldnvqe) 28 | $(BUILD) 29 | 30 | hisi: version.h 31 | $(eval SDK = ./sdk/hi3516ev300) 32 | $(eval CFLAGS += -D__GOKE__) 33 | $(eval LIB = -ldnvqe -lmpi -lsecurec -lupvqe -lVoiceEngine) 34 | $(BUILD) 35 | 36 | hi3536: version.h 37 | $(eval SDK = ./sdk/hi3536dv100) 38 | $(eval CFLAGS += -D__GOKE__ -D__HI3536__) 39 | $(eval LIB = -lm -ldnvqe -lmpi -ljpeg -lupvqe -lVoiceEngine) 40 | $(BUILD) 41 | 42 | star6b0: version.h 43 | $(eval SDK = ./sdk/infinity6) 44 | $(eval CFLAGS += -D__SIGMASTAR__ -D__INFINITY6__ -D__INFINITY6B0__) 45 | $(eval LIB = -lcam_os_wrapper -lm -lmi_rgn -lmi_sys) 46 | $(BUILD) 47 | 48 | star6c: version.h 49 | $(eval SDK = ./sdk/infinity6) 50 | $(eval CFLAGS += -D__SIGMASTAR__ -D__INFINITY6__ -D__INFINITY6C__) 51 | $(eval LIB = -lcam_os_wrapper -lmi_rgn -lmi_sys) 52 | $(BUILD) 53 | 54 | star6e: version.h 55 | $(eval SDK = ./sdk/infinity6) 56 | $(eval CFLAGS += -D__SIGMASTAR__ -D__INFINITY6__ -D__INFINITY6E__) 57 | $(eval LIB = -lcam_os_wrapper -lm -lmi_rgn -lmi_sys) 58 | $(BUILD) 59 | 60 | native: version.h 61 | $(eval SDK = ./sdk/gk7205v300) 62 | $(eval CFLAGS += -D_x86) 63 | $(eval LIB = -lcsfml-graphics -lcsfml-window -lcsfml-system `pkg-config --libs cairo x11` -lm) 64 | $(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT)) 65 | $(BUILD) 66 | 67 | rockchip: version.h 68 | $(eval SDK = ./sdk/gk7205v300) 69 | $(eval CFLAGS += -D__ROCKCHIP__) 70 | $(eval LIB = `pkg-config --libs cairo x11` -lm -lrt) 71 | $(eval BUILD = $(CC) $(SRCS) -I $(SDK)/include -L $(DRV) $(CFLAGS) $(LIB) -levent_core -O0 -g -o $(OUTPUT)) 72 | $(BUILD) 73 | -------------------------------------------------------------------------------- /bmp/star/i6c_common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "../symbols.h" 8 | #include "../types.h" 9 | 10 | #define I6C_VENC_CHN_NUM 12 11 | 12 | typedef enum { 13 | I6C_BAYER_RG, 14 | I6C_BAYER_GR, 15 | I6C_BAYER_BG, 16 | I6C_BAYER_GB, 17 | I6C_BAYER_R0, 18 | I6C_BAYER_G0, 19 | I6C_BAYER_B0, 20 | I6C_BAYER_G1, 21 | I6C_BAYER_G2, 22 | I6C_BAYER_I0, 23 | I6C_BAYER_G3, 24 | I6C_BAYER_I1, 25 | I6C_BAYER_END 26 | } i6c_common_bayer; 27 | 28 | typedef enum { 29 | I6C_COMPR_NONE, 30 | I6C_COMPR_SEG, 31 | I6C_COMPR_LINE, 32 | I6C_COMPR_FRAME, 33 | I6C_COMPR_8BIT, 34 | I6C_COMPR_6BIT, 35 | I6C_COMPR_IFC, 36 | I6C_COMPR_SFBC0, 37 | I6C_COMPR_SFBC1, 38 | I6C_COMPR_SFBC2, 39 | I6C_COMPR_END 40 | } i6c_common_compr; 41 | 42 | typedef enum { 43 | I6C_EDGE_SINGLE_UP, 44 | I6C_EDGE_SINGLE_DOWN, 45 | I6C_EDGE_DOUBLE, 46 | I6C_EDGE_END 47 | } i6c_common_edge; 48 | 49 | typedef enum { 50 | I6C_HDR_OFF, 51 | I6C_HDR_VC, 52 | I6C_HDR_DOL, 53 | I6C_HDR_EMBED, 54 | I6C_HDR_LI, 55 | I6C_HDR_END 56 | } i6c_common_hdr; 57 | 58 | typedef enum { 59 | I6C_INTF_BT656, 60 | I6C_INTF_DIGITAL_CAMERA, 61 | I6C_INTF_BT1120_STANDARD, 62 | I6C_INTF_BT1120_INTERLEAVED, 63 | I6C_INTF_MIPI, 64 | I6C_INTF_LVDS, 65 | I6C_INTF_END 66 | } i6c_common_intf; 67 | 68 | typedef enum { 69 | I6C_PREC_8BPP, 70 | I6C_PREC_10BPP, 71 | I6C_PREC_12BPP, 72 | I6C_PREC_14BPP, 73 | I6C_PREC_16BPP, 74 | I6C_PREC_END 75 | } i6c_common_prec; 76 | 77 | typedef enum { 78 | I6C_PIXFMT_YUV422_YUYV, 79 | I6C_PIXFMT_ARGB8888, 80 | I6C_PIXFMT_ABGR8888, 81 | I6C_PIXFMT_BGRA8888, 82 | I6C_PIXFMT_RGB565, 83 | I6C_PIXFMT_ARGB1555, 84 | I6C_PIXFMT_ARGB4444, 85 | I6C_PIXFMT_I2, 86 | I6C_PIXFMT_I4, 87 | I6C_PIXFMT_I8, 88 | I6C_PIXFMT_YUV422SP, 89 | I6C_PIXFMT_YUV420SP, 90 | I6C_PIXFMT_YUV420SP_NV21, 91 | I6C_PIXFMT_YUV420_TILE, 92 | I6C_PIXFMT_YUV422_UYVY, 93 | I6C_PIXFMT_YUV422_YVYU, 94 | I6C_PIXFMT_YUV422_VYUY, 95 | I6C_PIXFMT_YUV422P, 96 | I6C_PIXFMT_YUV420P, 97 | I6C_PIXFMT_YUV420_FBC, 98 | I6C_PIXFMT_RGB_BAYER, 99 | I6C_PIXFMT_RGB_BAYER_END = 100 | I6C_PIXFMT_RGB_BAYER + I6C_PREC_END * I6C_BAYER_END - 1, 101 | I6C_PIXFMT_RGB888, 102 | I6C_PIXFMT_BGR888, 103 | I6C_PIXFMT_GRAY8, 104 | I6C_PIXFMT_RGB101010, 105 | I6C_PIXFMT_RGB888P, 106 | I6C_PIXFMT_END 107 | } i6c_common_pixfmt; 108 | 109 | typedef struct { 110 | unsigned short width; 111 | unsigned short height; 112 | } i6c_common_dim; 113 | 114 | typedef struct { 115 | unsigned short x; 116 | unsigned short y; 117 | unsigned short width; 118 | unsigned short height; 119 | } i6c_common_rect; -------------------------------------------------------------------------------- /bmp/star/i6c_common copy.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "../symbols.h" 8 | #include "../types.h" 9 | 10 | #define I6C_VENC_CHN_NUM 12 11 | 12 | typedef enum { 13 | I6C_BAYER_RG, 14 | I6C_BAYER_GR, 15 | I6C_BAYER_BG, 16 | I6C_BAYER_GB, 17 | I6C_BAYER_R0, 18 | I6C_BAYER_G0, 19 | I6C_BAYER_B0, 20 | I6C_BAYER_G1, 21 | I6C_BAYER_G2, 22 | I6C_BAYER_I0, 23 | I6C_BAYER_G3, 24 | I6C_BAYER_I1, 25 | I6C_BAYER_END 26 | } i6c_common_bayer; 27 | 28 | typedef enum { 29 | I6C_COMPR_NONE, 30 | I6C_COMPR_SEG, 31 | I6C_COMPR_LINE, 32 | I6C_COMPR_FRAME, 33 | I6C_COMPR_8BIT, 34 | I6C_COMPR_6BIT, 35 | I6C_COMPR_IFC, 36 | I6C_COMPR_SFBC0, 37 | I6C_COMPR_SFBC1, 38 | I6C_COMPR_SFBC2, 39 | I6C_COMPR_END 40 | } i6c_common_compr; 41 | 42 | typedef enum { 43 | I6C_EDGE_SINGLE_UP, 44 | I6C_EDGE_SINGLE_DOWN, 45 | I6C_EDGE_DOUBLE, 46 | I6C_EDGE_END 47 | } i6c_common_edge; 48 | 49 | typedef enum { 50 | I6C_HDR_OFF, 51 | I6C_HDR_VC, 52 | I6C_HDR_DOL, 53 | I6C_HDR_EMBED, 54 | I6C_HDR_LI, 55 | I6C_HDR_END 56 | } i6c_common_hdr; 57 | 58 | typedef enum { 59 | I6C_INTF_BT656, 60 | I6C_INTF_DIGITAL_CAMERA, 61 | I6C_INTF_BT1120_STANDARD, 62 | I6C_INTF_BT1120_INTERLEAVED, 63 | I6C_INTF_MIPI, 64 | I6C_INTF_LVDS, 65 | I6C_INTF_END 66 | } i6c_common_intf; 67 | 68 | typedef enum { 69 | I6C_PREC_8BPP, 70 | I6C_PREC_10BPP, 71 | I6C_PREC_12BPP, 72 | I6C_PREC_14BPP, 73 | I6C_PREC_16BPP, 74 | I6C_PREC_END 75 | } i6c_common_prec; 76 | 77 | typedef enum { 78 | I6C_PIXFMT_YUV422_YUYV, 79 | I6C_PIXFMT_ARGB8888, 80 | I6C_PIXFMT_ABGR8888, 81 | I6C_PIXFMT_BGRA8888, 82 | I6C_PIXFMT_RGB565, 83 | I6C_PIXFMT_ARGB1555, 84 | I6C_PIXFMT_ARGB4444, 85 | I6C_PIXFMT_I2, 86 | I6C_PIXFMT_I4, 87 | I6C_PIXFMT_I8, 88 | I6C_PIXFMT_YUV422SP, 89 | I6C_PIXFMT_YUV420SP, 90 | I6C_PIXFMT_YUV420SP_NV21, 91 | I6C_PIXFMT_YUV420_TILE, 92 | I6C_PIXFMT_YUV422_UYVY, 93 | I6C_PIXFMT_YUV422_YVYU, 94 | I6C_PIXFMT_YUV422_VYUY, 95 | I6C_PIXFMT_YUV422P, 96 | I6C_PIXFMT_YUV420P, 97 | I6C_PIXFMT_YUV420_FBC, 98 | I6C_PIXFMT_RGB_BAYER, 99 | I6C_PIXFMT_RGB_BAYER_END = 100 | I6C_PIXFMT_RGB_BAYER + I6C_PREC_END * I6C_BAYER_END - 1, 101 | I6C_PIXFMT_RGB888, 102 | I6C_PIXFMT_BGR888, 103 | I6C_PIXFMT_GRAY8, 104 | I6C_PIXFMT_RGB101010, 105 | I6C_PIXFMT_RGB888P, 106 | I6C_PIXFMT_END 107 | } i6c_common_pixfmt; 108 | 109 | typedef struct { 110 | unsigned short width; 111 | unsigned short height; 112 | } i6c_common_dim; 113 | 114 | typedef struct { 115 | unsigned short x; 116 | unsigned short y; 117 | unsigned short width; 118 | unsigned short height; 119 | } i6c_common_rect; -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "workbench.colorTheme": "Visual Studio Dark - C++", 3 | 4 | "editor.formatOnSave": false, 5 | "editor.formatOnType": false, 6 | "editor.formatOnPaste": false, 7 | 8 | "C_Cpp.clang_format_path": "/usr/bin/clang-format", 9 | "C_Cpp.clang_format_style": "file", 10 | 11 | "C_Cpp.intelliSenseEngine": "Default", 12 | "C_Cpp.enhancedColorization": "Enabled", 13 | "C_Cpp.dimInactiveRegions": true, 14 | "C_Cpp.inactiveRegionOpacity": 0.5, 15 | 16 | "[c]": { "editor.semanticHighlighting.enabled": true }, 17 | "[cpp]":{ "editor.semanticHighlighting.enabled": true }, 18 | 19 | "files.associations": { 20 | "mavlink.h": "c", 21 | "system_error": "c", 22 | "chrono": "c", 23 | "common.h": "c", 24 | "array": "c", 25 | "string": "c", 26 | "string_view": "c", 27 | "msp_displayport.h": "c", 28 | "msp.h": "c", 29 | "graphics.h": "c", 30 | "thread": "c", 31 | "mi_rgn.h": "c", 32 | "mi_common.h": "c", 33 | "bitmap.h": "c", 34 | "random": "c", 35 | "format": "c", 36 | "compare": "c", 37 | "cstdint": "c", 38 | "functional": "c", 39 | "rope": "c", 40 | "ranges": "c", 41 | "variant": "c", 42 | "lodepng.h": "c", 43 | "any": "c", 44 | "expected": "c", 45 | "fstream": "c", 46 | "future": "c", 47 | "optional": "c", 48 | "shared_mutex": "c", 49 | "spanstream": "c", 50 | "stacktrace": "c", 51 | "stop_token": "c", 52 | "syncstream": "c", 53 | "tuple": "c", 54 | "string.h": "c", 55 | "mi_vpe.h": "c", 56 | "bitset": "c", 57 | "slist": "c", 58 | "initializer_list": "c", 59 | "span": "c", 60 | "regex": "c", 61 | "utility": "c", 62 | "*.tcc": "c", 63 | "iomanip": "c", 64 | "istream": "c", 65 | "streambuf": "c", 66 | "*.def": "c", 67 | "iterator": "c", 68 | "charconv": "c", 69 | "ratio": "c", 70 | "type_traits": "c", 71 | "hi_math.h": "c", 72 | "cstdlib": "c", 73 | "xlib.h": "c", 74 | "stdbool.h": "c", 75 | "xutil.h": "c", 76 | "xatom.h": "c", 77 | "region.h": "c", 78 | "cairo-xlib.h": "c", 79 | "stdint-uintn.h": "c", 80 | "interface.h": "c", 81 | "valarray": "c", 82 | "complex": "c", 83 | "source_location": "c", 84 | "atomic": "c", 85 | "bit": "c", 86 | "deque": "c", 87 | "forward_list": "c", 88 | "list": "c", 89 | "unordered_map": "c", 90 | "unordered_set": "c", 91 | "vector": "c", 92 | "algorithm": "c", 93 | "memory_resource": "c", 94 | "memory": "c", 95 | "sstream": "c", 96 | "stdexcept": "c", 97 | "types.h": "c", 98 | "i6c_hal.h": "c", 99 | "select.h": "c" 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /develepment_notes.txt: -------------------------------------------------------------------------------- 1 | # to compile for desktop 2 | sudo apt-get update 3 | sudo apt-get install libevent-dev 4 | make 5 | sudo apt-get install gdb 6 | 7 | # on desktop test, enable USB to serial 8 | sudo systemctl stop brltty 9 | sudo systemctl disable --now brltty brltty-udev 10 | sudo systemctl mask brltty brltty-udev 11 | 12 | sudo chmod 666 /dev/ttyUSB3 13 | msposd --channels 7 --master /dev/ttyUSB0 --baudrate 115200 --out 127.0.0.1:14550 -a 9 -f /tmp -t --osd 14 | 15 | #msp needs two-way communication 16 | 17 | make osd-x86 VERBOSE=1 18 | 19 | ./build.sh star6e 20 | ./build.sh x86 21 | 22 | cc msposd.c -I ./include -L/usr/lib/x86_64-linux-gnu/ -lcsfml-graphics -lcsfml-window -lcsfml-system -O1 -g -fsanitize=address -fno-omit-frame-pointer -Wall -Wextra -D_x86 -g -fsanitize=address -levent_core -o msposd 23 | 24 | #copy on cam 25 | 26 | scp -O ./msposd_star6e root@192.168.1.88:/usr/bin/msposd 27 | 28 | on the camera 29 | msposd --channels 7 --master /dev/ttyS2 --baudrate 115200 --osd --matrix 11 --ahi 3 -r 30 30 | 31 | #show text 32 | echo "Custom Message... &L04 &F22 CPU:&C &B temp:&T" >/tmp/MSPOSD.msg 33 | echo "Custom Message... &L03 &F28 CPU:&C &B temp:&T" >./MSPOSD.msg 34 | echo "40fps/MCS3/15Mb imx415_tipo.bin qpDelta:-6 &L05 &F22 CPU:&C &B temp:&T &p" >./MSPOSD.msg 35 | 36 | #test 37 | echo "1586 packets dropped" > ./wfb.log 38 | 39 | #betaflight fonts download 40 | curl -L -o /usr/bin/font.png https://raw.githubusercontent.com/openipc/msposd/main/fonts/betaflight/font.png 41 | curl -L -o /usr/bin/font_hd.png https://raw.githubusercontent.com/openipc/msposd/main/fonts/betaflight/font_hd.png 42 | 43 | --matrix 11 44 | will enable second font size - small font for FHD mode. 45 | Will Line 1,2, 10,11, 19,20 will be Large font, the rest will be small, and aligned to the adjacent corner. 46 | 47 | --ahi 3 48 | Enhanced AHI ladder, home indicator on the main AHI line 49 | --on PC read serial 50 | msposd --channels 7 --master /dev/ttyUSB0 --baudrate 115200 --osd --matrix 11 --ahi 3 -r 30 -v 51 | 52 | --on PC read serial and forward to test air no OSD mode 53 | msposd_x86 --channels 7 --master /dev/ttyUSB0 --baudrate 115200 --out 127.0.0.1:14550 --matrix 11 --ahi 3 -r 50 -v 54 | 55 | 56 | --on CAM read serial and forward via mavlink port 57 | msposd --channels 7 --master /dev/ttyS2 --baudrate 115200 --out 127.0.0.1:14550 --matrix 11 --ahi 3 -r 30 58 | 59 | --on PC render 60 | /home/home/src/msposd/msposd --master 127.0.0.1:14550 --osd -r 50 --ahi 3 --matrix 11 -v 61 | 62 | -- obsolete, copy binaries to release folser 63 | ./build.sh x86 64 | cp ./msposd_x86 ./release/x86/msposd 65 | cp ./msposd_star6e ./release/star6e/msposd 66 | cp ./msposd_goke ./release/goke/msposd 67 | cp ./msposd_hisi ./release/hisi/msposd 68 | 69 | -- Test different color and size per line 70 | echo -e "LINE1 Purple font 24 &L52 &F24\nLINE2 Red font size 20 &L32 &F20 \nLine3 bluish size 28 &L42 &F28 " > ./MSPOSD.msg 71 | echo -e "&G8 0 - White &L02&F28\n 1 - Black &L12\n 2 - Red &L22\n 3 - Green &L32\n 4 - Blue &L42\n 5 - Yellow &L52\n 6 - Magenta &L62\n 7 - Cyan &L72\n 8 - Orchid &L82\n 9 - DarkRed &L92" > /tmp/MSPOSD.msg -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------