diff --git a/br-ext-chip-hisilicon/configs/unknown_unknown_hi3516ev300_openipc_defconfig b/br-ext-chip-hisilicon/configs/unknown_unknown_hi3516ev300_openipc_defconfig index b9fa7306..8e7dbd2f 100644 --- a/br-ext-chip-hisilicon/configs/unknown_unknown_hi3516ev300_openipc_defconfig +++ b/br-ext-chip-hisilicon/configs/unknown_unknown_hi3516ev300_openipc_defconfig @@ -17,7 +17,7 @@ BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_USES_MUSL=y BR2_TOOLCHAIN_BUILDROOT_MUSL=y BR2_TOOLCHAIN_BUILDROOT_LIBC="musl" -# BR2_TOOLCHAIN_BUILDROOT_CXX is not set +BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_TOOLCHAIN_BUILDROOT_LOCALE=y BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/aacdec.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/aacdec.h deleted file mode 100644 index 05652ee9..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/aacdec.h +++ /dev/null @@ -1,291 +0,0 @@ -/***************************************************************************** -* Copyright 2004 - 2050, Hisilicon Tech. Co., Ltd. -* ALL RIGHTS RESERVED -* FileName: aacdec.h -* Description: -* -* History: -* Version Date Author DefectNum Description -* 0.01 2006-11-01 z40717 NULL Create this file. -* -*****************************************************************************/ -/** - * \file - * \brief Describes the information about AACDEC. - */ - -#ifndef _AACDEC_H -#define _AACDEC_H - -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif /* __cpluscplus */ -#endif /* __cpluscplus */ - -#include "hi_type.h" - - -/********************************Macro Definition********************************/ -/** \addtogroup AACDEC */ -/** @{ */ /** <--7bits----><----8bits---><--3bits---><------13bits------->| -******************************************************************************/ - -#define HI_DEF_ERR( module, level, errid) \ - ((HI_S32)( (HI_ERR_APPID) | ((module) << 16 ) | ((level)<<13) | (errid) )) - -/* NOTE! the following defined all common error code, -** all module must reserved 0~63 for their common error code -*/ -typedef enum hiEN_ERR_CODE_E -{ - EN_ERR_INVALID_DEVID = 1, /* invlalid device ID */ - EN_ERR_INVALID_CHNID = 2, /* invlalid channel ID */ - EN_ERR_ILLEGAL_PARAM = 3, /* at lease one parameter is illagal - * eg, an illegal enumeration value */ - EN_ERR_EXIST = 4, /* resource exists */ - EN_ERR_UNEXIST = 5, /* resource unexists */ - - EN_ERR_NULL_PTR = 6, /* using a NULL point */ - - EN_ERR_NOT_CONFIG = 7, /* try to enable or initialize system, device - ** or channel, before configing attribute */ - - EN_ERR_NOT_SUPPORT = 8, /* operation or type is not supported by NOW */ - EN_ERR_NOT_PERM = 9, /* operation is not permitted - ** eg, try to change static attribute */ - EN_ERR_INVALID_PIPEID = 10, /* invlalid pipe ID */ - EN_ERR_INVALID_STITCHGRPID = 11, /* invlalid stitch group ID */ - - EN_ERR_NOMEM = 12,/* failure caused by malloc memory */ - EN_ERR_NOBUF = 13,/* failure caused by malloc buffer */ - - EN_ERR_BUF_EMPTY = 14,/* no data in buffer */ - EN_ERR_BUF_FULL = 15,/* no buffer for new data */ - - EN_ERR_SYS_NOTREADY = 16,/* System is not ready,maybe not initialed or - ** loaded. Returning the error code when opening - ** a device file failed. */ - - EN_ERR_BADADDR = 17,/* bad address, - ** eg. used for copy_from_user & copy_to_user */ - - EN_ERR_BUSY = 18,/* resource is busy, - ** eg. destroy a venc chn without unregister it */ - EN_ERR_SIZE_NOT_ENOUGH = 19, /* buffer size is smaller than the actual size required */ - - EN_ERR_BUTT = 63,/* maxium code, private error code of all modules - ** must be greater than it */ -}EN_ERR_CODE_E; - - - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif /* __cplusplus */ - -#endif /* __HI_ERRNO_H__ */ - diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_i2c.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_i2c.h deleted file mode 100644 index b1bfbbeb..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_i2c.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _HI_I2C_H -#define _HI_I2C_H - - - -/* /dev/i2c-X ioctl commands. The ioctl's parameter is always an - * unsigned long, except for: - * - I2C_FUNCS, takes pointer to an unsigned long - * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data - * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data - */ -#define I2C_RETRIES 0x0701 /* number of times a device address should - be polled when not acknowledging */ -#define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ - -/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses - * are NOT supported! (due to code brokenness) - */ -#define I2C_SLAVE 0x0703 /* Use this slave address */ -#define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it - is already in use by a driver! */ -#define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ - -#define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */ - -#define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */ - -#define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */ -#define I2C_SMBUS 0x0720 /* SMBus transfer */ -#define I2C_16BIT_REG 0x0709 /* 16BIT REG WIDTH */ -#define I2C_16BIT_DATA 0x070a /* 16BIT DATA WIDTH */ - -typedef struct hiI2C_DATA_S -{ - unsigned char dev_addr; - unsigned int reg_addr; - unsigned int addr_byte_num; - unsigned int data; - unsigned int data_byte_num; -}I2C_DATA_S; - -#endif - diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_bin.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_bin.h deleted file mode 100644 index a10f85e4..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_bin.h +++ /dev/null @@ -1,62 +0,0 @@ -/****************************************************************************** - - Copyright (C), 2016, Hisilicon Tech. Co., Ltd. - - ****************************************************************************** - File Name : hi_isp_bin.h - Version : Initial Draft - Author : Hisilicon multimedia software group - Created : 2015/01/14 - Description : - History : - 1.Date : 2015/01/14 - Author : - Modification: Created file - -******************************************************************************/ - -#ifndef __HI_ISP_BIN_H__ -#define __HI_ISP_BIN_H__ - -#include "hi_type.h" -#include "hi_comm_isp.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif -#endif /* End of #ifdef __cplusplus */ - -/**************************************************************************** - * MACRO DEFINITION * - ****************************************************************************/ -#define MAX_BIN_REG_NUM 5 - -/**************************************************************************** - * GENERAL STRUCTURES * - ****************************************************************************/ -typedef struct hiISP_BIN_REG_ATTR_S { - HI_U32 u32Addr; /* register addr */ - HI_U8 u8StartBit; /* start bit of register addr */ - HI_U8 u8EndBit; /* end bit of register addr */ -} ISP_BIN_REG_ATTR_S; - -/* -------------------------------------------* - The base addr of ISP logic register - The base addr of ISP ext register - The base addr of Hisi AE ext register - The base addr of Hisi AWB ext register -* ------------------------------------------- */ - -ISP_BIN_REG_ATTR_S g_astIspBinRegAttr[ISP_MAX_PIPE_NUM][MAX_BIN_REG_NUM] = { - [0 ...(ISP_MAX_PIPE_NUM - 1)] = {0} -}; - - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif /* End of #ifdef __cplusplus */ - -#endif /* __HI_ISP_BIN_H__ */ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_debug.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_debug.h deleted file mode 100644 index 473fd393..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_debug.h +++ /dev/null @@ -1,31 +0,0 @@ -/****************************************************************************** - - Copyright (C), 2016, Hisilicon Tech. Co., Ltd. - - ****************************************************************************** - File Name : hi_isp_debug.h - Version : Initial Draft - Author : Hisilicon multimedia software group - Created : 2010/08/30 - Description : - History : - 1.Date : 2010/08/30 - Author : - Modification: Created file - -******************************************************************************/ - -#ifndef __HI_ISP_DEBUG_H__ -#define __HI_ISP_DEBUG_H__ - -#include "hi_debug.h" -#define ISP_TRACE(level, fmt, ...)\ - do{ \ - HI_TRACE(level, HI_ID_ISP,"[Func]:%s [Line]:%d [Info]:"fmt,__FUNCTION__, __LINE__,##__VA_ARGS__);\ - }while(0) - -/* To avoid divide-0 exception in code. */ -#define DIV_0_TO_1(a) ( ((a) == 0) ? 1 : (a) ) -#define DIV_0_TO_1_FLOAT(a) ((((a) < 1E-10) && ((a) > -1E-10)) ? 1 : (a)) - -#endif /* __HI_ISP_DEBUG_H__ */ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_defines.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_defines.h deleted file mode 100644 index 101132be..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_isp_defines.h +++ /dev/null @@ -1,184 +0,0 @@ - -/****************************************************************************** - - Copyright (C), 2016, Hisilicon Tech. Co., Ltd. - - ****************************************************************************** - File Name : hi_isp_defines.h - - Version : Initial Draft - Author : Hisilicon multimedia software group - Created : 2013/11/07 - Description : - History : - 1.Date : 2013/11/07 - Author : - Modification: Created file - -******************************************************************************/ -#ifndef __HI_ISP_DEFINES_H__ -#define __HI_ISP_DEFINES_H__ - -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif -#endif /* End of #ifdef __cplusplus */ - -/* isp sys part */ -#define ISP_STRIPING_MAX_NUM (2) -#define ISP_NORMAL_BLOCK_NUM (1) -#define ISP_DEFAULT_BLOCK_NUM (2) -#define ISP_SBS_BLOCK_NUM (2) - -#define ISP_BE0_PIPE_ID (0) -#define ISP_BE1_PIPE_ID (8) -#define ISP_MAX_BE_NUM (1) -#define ISP_MAX_STITCH_NUM (1) - -#define ISP_MAX_PHY_PIPE_NUM (2) -#define ISP_MAX_VIR_PIPE_NUM (0) -#define ISP_MAX_PIPE_NUM (ISP_MAX_PHY_PIPE_NUM + ISP_MAX_VIR_PIPE_NUM) - -#define ISP_STRIPING_OVERLAP_DEFAULT (256) - -#define ISP_WDR_CHN_MAX (2) -#define ISP_SUPPORT_DE_MODULE (1) - -#define SENSOR_RES_WIDTH_MAX 3072 -#define SENSOR_RES_HEIGHT_MAX 3072 -#define ISP_RES_WIDTH_MAX 3072,3072 // need change when pipe num is change -#define ISP_RES_HEIGHT_MAX 3072,3072 // need change when pipe num is change - -extern HI_U16 g_au16ResWMax[ISP_MAX_PIPE_NUM]; -extern HI_U16 g_au16ResHMax[ISP_MAX_PIPE_NUM]; - -/* isp alg part */ -#define HI_ISP_CLUT_LUT_LENGTH (5508) -#define HI_ISP_CA_YRATIO_LUT_LENGTH (128) - - -#define STATIC_DP_COUNT_NORMAL (2048) -#define STATIC_DP_COUNT_MAX (STATIC_DP_COUNT_NORMAL * ISP_STRIPING_MAX_NUM) -#define ISP_SUPPORT_OFFLINE_DPC_CALIBRATION (1) - -#define HI_ISP_SPECAWB_FACT_ELEMENT_LUT0 (4096) -#define HI_ISP_SPECAWB_FACT_ELEMENT_LUT1 (4096) -#define HI_ISP_SPECAWB_FACT_ELEMENT_LUT2 (4096) -#define HI_ISP_SPECAWB_FACT_ELEMENT_LUT3 (4096) -#define HI_ISP_SPECAWB_FACT_ELEMENT_LUT4 (4096) -#define HI_ISP_SPECAWB_FACT_ELEMENT_LUT5 (4096) -#define HI_ISP_SPECAWB_FACT_ELEMENT_LUT6 (4096) -#define HI_ISP_SPECAWB_WB_CNVTBL_LUT (16384) -#define HI_ISP_SPECAWB_KELDBB_LUT (16384) -#define HI_ISP_SPECAWB_BBL_LUT (240) -#define HI_ISP_SPECAWB_CAA_LUT1 (16384) -#define HI_ISP_SPECAWB_CAA_LUT2 (16384) -#define HI_ISP_SPECAWB_CAA_LUT3 (16384) -#define ISP_SPECAWB_BUF_SIZE (110832) - -#define AWB_ZONE_BIN (1) -#define AWB_LIB_NUM (ISP_MAX_PHY_PIPE_NUM) -#define AE_LIB_NUM (ISP_MAX_PHY_PIPE_NUM) - - -#define HI_ISP_SHARPEN_RGAIN (31) -#define HI_ISP_SHARPEN_RGAIN_MAX (31) -#define HI_ISP_SHARPEN_RGAIN_BIT (31) -#define HI_ISP_SHARPEN_GGAIN (32) -#define HI_ISP_SHARPEN_GGAIN_MAX (255) -#define HI_ISP_SHARPEN_GGAIN_BIT (255) -#define HI_ISP_SHARPEN_BGAIN (31) -#define HI_ISP_SHARPEN_BGAIN_MAX (31) -#define HI_ISP_SHARPEN_BGAIN_BIT (31) -#define HI_ISP_SHARPEN_LUMAWGT (31) -#define HI_ISP_SHARPEN_LUMAWGT_MAX (31) -#define HI_ISP_SHARPEN_LUMAWGT_BIT (31) -#define HI_ISP_SHARPEN_EdgeFiltMaxCap (18) -#define HI_ISP_SHARPEN_EdgeFiltMaxCap_MAX (47) -#define HI_ISP_SHARPEN_EdgeFiltMaxCap_BIT (63) - -#define GAMMA_REG_NODE_NUM (257) -#define GAMMA_OUTSEG_NUM (8) - -#define HI_ISP_DRC_STRENGTH_MAX (1023) -#define HI_ISP_DRC_SPA_FLT_COEF_MAX (5) - -#define HI_ISP_DEMOSAIC_DETAIL_SMOOTH_RANGE_MAX (7) -#define HI_ISP_DEMOSAIC_DETAIL_SMOOTH_RANGE_MIN (1) -#define HI_ISP_DEMOSAIC_NONDIR_MFDETALEHC_STR_MAX (127) - -#define HI_ISP_LDCI_HEPOSWGT_MAX (255) -#define HI_ISP_LDCI_HENEGWGT_MAX (255) -#define HI_ISP_PREGAMMA_LUT_MAX (0xFFFFF) - -#define EXPANDER_NODE_NUM (129) - -#define HI_ISP_CR_SLOPE_MAX (16) -#define HI_ISP_CR_THR_MAX (65535) -#define HI_ISP_CR_NPOFFSET_MAX (65535) -#define HI_ISP_CR_NPOFFSET_MIN (8192) -#define HI_ISP_LSC_MESHSTR_MAX (1023) -#define HI_ISP_LSC_DEFAULT_MESH_STRENGTH (256) -#define HI_ISP_LSC_DEFAULT_WEIGHT (256) -#define HI_ISP_LSC_GRID_COL (17) -#define HI_ISP_LSC_GRID_ROW (17) -#define HI_ISP_LSC_GRID_POINTS (HI_ISP_LSC_GRID_COL * HI_ISP_LSC_GRID_ROW) -#define HI_ISP_LSC_DEFAULT_MESH_SCALE (4) // 0.10bit -#define HI_ISP_LSC_XGRID_WIDTH_MAX(x) (255) -#define HI_ISP_LSC_YGRID_WIDTH_MAX(x) (255) - -#define DEFOG_ZONE_ROW (24) -#define DEFOG_ZONE_COLUMN (16) -#define DEFOG_ZONE_NUM (384) -#define DEFOG_MAX_ZONE_NUM (384) - -#define HI_ISP_CCM_RECOVER_EN_DEFAULT (1) -#define HI_ISP_CCM_LUMA_COEFR_DEFAULT (8) -#define HI_ISP_CCM_LUMA_COEFB_DEFAULT (4) -#define HI_ISP_CCM_DARKPREV_DEFAULT (14) -#define HI_ISP_CCM_LUMA_COEFR_UP_DEFAULT (10) -#define HI_ISP_CCM_LUMA_COEFB_UP_DEFAULT (10) -#define HI_ISP_CCM_SOFT_CLIP0_STEP_DEFAULT (10) -#define HI_ISP_CCM_SOFT_CLIP1_STEP_DEFAULT (14) -#define HI_ISP_CCM_PEAKSUPP_SAT_DEFAULT (110) -#define HI_ISP_CCM_PEAKSUPP_MAX_DEFAULT (255) -#define HI_ISP_CCM_DARK_RANGE_MAX (15) - - -#define HI_ISP_BAYERNR_LUT_EVEN_LENGTH (17) -#define HI_ISP_BAYERNR_LUT_ODD_LENGTH (16) -#define HI_ISP_BAYERNR_LMTLUT_EVEN_NUM (65) -#define HI_ISP_BAYERNR_LMTLUT_ODD_NUM (64) - - -#define HI_ISP_BAYERNR_WINDOW_SIZE_SEL_DEFAULT (4) -#define HI_ISP_BAYERNR_PATTERN_NOISE_REDUCTION_DEFAULT (1) -#define HI_ISP_BAYERNR_GAIN_SAD_DEFAULT (0x40) -#define HI_ISP_BAYERNR_IMPLS_NR_ENABLE1_DEFAULT (1 ) -#define HI_ISP_BAYERNR_IMPLS_NR_ENABLE2_DEFAULT (1 ) -#define HI_ISP_BAYERNR_IMPLS_NR_ENABLE3_DEFAULT (1 ) -#define HI_ISP_BAYERNR_IMPLS_NR_STRENGTH_DEFAULT (0x20) -#define HI_ISP_BAYERNR_SYMMSAD_DEFAULT (1) -#define HI_ISP_BAYERNR_ENABLE_POST_PROC_DEFAULT (3) -#define HI_ISP_BAYERNR_BILATERAL_ENABLE_DEFAULT (2) -#define HI_ISP_BAYERNR_NLIMIT_GAIN_BLT_DEFAULT (200) - -#define AF_GAMMA_VALUE_MAX (1) -#define HI_EXT_SYSTEM_MANUAL_DEHAZE_HBLK_DEFAULT (24) -#define HI_EXT_SYSTEM_MANUAL_DEHAZE_VBLK_DEFAULT (16) - -#define HI_ISP_FE_AF_SUPPORT 0 -#define HI_ISP_BE_AF_SUPPORT 1 -#define HI_ISP_AF_ENABLE_MASK ((HI_ISP_BE_AF_SUPPORT << 1) + HI_ISP_FE_AF_SUPPORT) - - -// #define HI_ISP_CCM_RECOVER_EN_DEFAULT (0x1) - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif /* End of #ifdef __cplusplus */ - -#endif /* __HI_ISP_DEFINES_H__ */ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ive.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ive.h deleted file mode 100644 index 0e8183a3..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ive.h +++ /dev/null @@ -1,1053 +0,0 @@ -/****************************************************************************** - - Copyright (C), 2001-2014, Hisilicon Tech. Co., Ltd. - - ****************************************************************************** - File Name : hi_comm_ive.h - Version : Initial Draft - Author : Hisilicon multimedia software (IVE) group - Created : 2014/08/05 - Description : - 1.Date : 2013/07/01~2014/08/05 - Modification: Created file -******************************************************************************/ -#ifndef _HI_IVE_H_ -#define _HI_IVE_H_ - -#include "hi_comm_ive.h" -// if sdk environment,include hi_common.h,else typedef HI_S32 IVE_HANDLE -#include "hi_common.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C"{ -#endif -#endif - -#define IVE_HIST_NUM 256 -#define IVE_MAP_NUM 256 -#define IVE_MAX_REGION_NUM 254 -#define IVE_ST_MAX_CORNER_NUM 500 - -/* -* DMA mode ,created by Chen Quanfu 2013-07-19 -*/ -typedef enum hiIVE_DMA_MODE_E { - IVE_DMA_MODE_DIRECT_COPY = 0x0, - IVE_DMA_MODE_INTERVAL_COPY = 0x1, - IVE_DMA_MODE_SET_3BYTE = 0x2, - IVE_DMA_MODE_SET_8BYTE = 0x3, - IVE_DMA_MODE_BUTT -} IVE_DMA_MODE_E; - -/* -* DMA control parameter ,created by Chen Quanfu 2013-07-19 -*/ -typedef struct hiIVE_DMA_CTRL_S { - IVE_DMA_MODE_E enMode; - HI_U64 u64Val; /* Used in memset mode */ - HI_U8 u8HorSegSize; /* Used in interval-copy mode, every row was segmented by u8HorSegSize bytes, - restricted in values of 2,3,4,8,16 */ - HI_U8 u8ElemSize; /* Used in interval-copy mode, the valid bytes copied in front of every segment - in a valid row, which 0 lowThr, dstVal = maxVal. */ - IVE_THRESH_MODE_TRUNC = 0x1, /* srcVal <= lowThr, dstVal = srcVal; srcVal > lowThr, dstVal = maxVal. */ - IVE_THRESH_MODE_TO_MINVAL = 0x2, /* srcVal <= lowThr, dstVal = minVal; srcVal > lowThr, dstVal = srcVal. */ - - IVE_THRESH_MODE_MIN_MID_MAX = 0x3, /* srcVal <= lowThr, dstVal = minVal; lowThr < srcVal <= highThr, - dstVal = midVal; srcVal > highThr, dstVal = maxVal. */ - IVE_THRESH_MODE_ORI_MID_MAX = 0x4, /* srcVal <= lowThr, dstVal = srcVal; lowThr < srcVal <= highThr, - dstVal = midVal; srcVal > highThr, dstVal = maxVal. */ - IVE_THRESH_MODE_MIN_MID_ORI = 0x5, /* srcVal <= lowThr, dstVal = minVal; lowThr < srcVal <= highThr, - dstVal = midVal; srcVal > highThr, dstVal = srcVal. */ - IVE_THRESH_MODE_MIN_ORI_MAX = 0x6, /* srcVal <= lowThr, dstVal = minVal; lowThr < srcVal <= highThr, - dstVal = srcVal; srcVal > highThr, dstVal = maxVal. */ - IVE_THRESH_MODE_ORI_MID_ORI = 0x7, /* srcVal <= lowThr, dstVal = srcVal; lowThr < srcVal <= highThr, - dstVal = midVal; srcVal > highThr, dstVal = srcVal. */ - - IVE_THRESH_MODE_BUTT -} IVE_THRESH_MODE_E; - -/* -* Thresh control parameters. -* Modified by Tan Bing, 2013-7-22 -*/ -typedef struct hiIVE_THRESH_CTRL_S { - IVE_THRESH_MODE_E enMode; - HI_U8 u8LowThr; /* user-defined threshold, 0<=u8LowThr<=255 */ - HI_U8 u8HighThr; /* user-defined threshold, if enMode0' and 'label = ArrayIndex+1' */ -} IVE_CCBLOB_S; - -/* -* Type of the CCL -*/ -typedef enum hiIVE_CCL_MODE_E { - IVE_CCL_MODE_4C = 0x0, /* 4-connected */ - IVE_CCL_MODE_8C = 0x1, /* 8-connected */ - - IVE_CCL_MODE_BUTT -} IVE_CCL_MODE_E; -/* -* CCL control struct -*/ -typedef struct hiIVE_CCL_CTRL_S { - IVE_CCL_MODE_E enMode; /* Mode */ - HI_U16 u16InitAreaThr; /* Init threshold of region area */ - HI_U16 u16Step; /* Increase area step for once */ -} IVE_CCL_CTRL_S; - -/* -* GMM control struct -*/ -typedef struct hiIVE_GMM_CTRL_S { - HI_U22Q10 u22q10NoiseVar; /* Initial noise Variance */ - HI_U22Q10 u22q10MaxVar; /* Max Variance */ - HI_U22Q10 u22q10MinVar; /* Min Variance */ - HI_U0Q16 u0q16LearnRate; /* Learning rate */ - HI_U0Q16 u0q16BgRatio; /* Background ratio */ - HI_U8Q8 u8q8VarThr; /* Variance Threshold */ - HI_U0Q16 u0q16InitWeight; /* Initial Weight */ - HI_U8 u8ModelNum; /* Model number: 3 or 5 */ -} IVE_GMM_CTRL_S; - -/* -* Type of the GMM2 sensitivity factor mode -*/ -typedef enum hiIVE_GMM2_SNS_FACTOR_MODE_E { - IVE_GMM2_SNS_FACTOR_MODE_GLB = 0x0, /* Global sensitivity factor mode */ - IVE_GMM2_SNS_FACTOR_MODE_PIX = 0x1, /* Pixel sensitivity factor mode */ - - IVE_GMM2_SNS_FACTOR_MODE_BUTT -} IVE_GMM2_SNS_FACTOR_MODE_E; - -/* -* Type of the GMM2 life update factor mode -*/ -typedef enum hiIVE_GMM2_LIFE_UPDATE_FACTOR_MODE_E { - IVE_GMM2_LIFE_UPDATE_FACTOR_MODE_GLB = 0x0, /* Global life update factor mode */ - IVE_GMM2_LIFE_UPDATE_FACTOR_MODE_PIX = 0x1, /* Pixel life update factor mode */ - - IVE_GMM2_LIFE_UPDATE_FACTOR_MODE_BUTT -} IVE_GMM2_LIFE_UPDATE_FACTOR_MODE_E; - -/* -* GMM2 control struct -*/ -typedef struct hiIVE_GMM2_CTRL_S { - IVE_GMM2_SNS_FACTOR_MODE_E enSnsFactorMode; /* Sensitivity factor mode */ - IVE_GMM2_LIFE_UPDATE_FACTOR_MODE_E enLifeUpdateFactorMode; /* Life update factor mode */ - HI_U16 u16GlbLifeUpdateFactor; /* Global life update factor (default: 4) */ - HI_U16 u16LifeThr; /* Life threshold (default: 5000) */ - HI_U16 u16FreqInitVal; /* Initial frequency (default: 20000) */ - HI_U16 u16FreqReduFactor; /* Frequency reduction factor (default: 0xFF00) */ - HI_U16 u16FreqAddFactor; /* Frequency adding factor (default: 0xEF) */ - HI_U16 u16FreqThr; /* Frequency threshold (default: 12000) */ - HI_U16 u16VarRate; /* Variation update rate (default: 1) */ - HI_U9Q7 u9q7MaxVar; /* Max variation (default: (16 * 16)<<7) */ - HI_U9Q7 u9q7MinVar; /* Min variation (default: ( 8 * 8)<<7) */ - HI_U8 u8GlbSnsFactor; /* Global sensitivity factor (default: 8) */ - HI_U8 u8ModelNum; /* Model number (range: 1~5, default: 3) */ -} IVE_GMM2_CTRL_S; - -/* -* CannyHysEdge control struct -*/ -typedef struct hiIVE_CANNY_HYS_EDGE_CTRL_S { - IVE_MEM_INFO_S stMem; - HI_U16 u16LowThr; - HI_U16 u16HighThr; - HI_S8 as8Mask[25]; -} IVE_CANNY_HYS_EDGE_CTRL_S; - -/* -* Canny stack size struct -*/ -typedef struct hiIVE_CANNY_STACK_SIZE_S { - HI_U32 u32StackSize; /* Stack size for output */ - HI_U8 u8Reserved[12]; /* For 16 byte align */ -} IVE_CANNY_STACK_SIZE_S; - -/* -* LBP compare mode -*/ -typedef enum hiIVE_LBP_CMP_MODE_E { - IVE_LBP_CMP_MODE_NORMAL = 0x0, /* P(x)-P(center)>= un8BitThr.s8Val, s(x)=1; else s(x)=0; */ - IVE_LBP_CMP_MODE_ABS = 0x1, /* Abs(P(x)-P(center))>=un8BitThr.u8Val, s(x)=1; else s(x)=0; */ - - IVE_LBP_CMP_MODE_BUTT -} IVE_LBP_CMP_MODE_E; - -/* -* LBP control struct -*/ -typedef struct hiIVE_LBP_CTRL_S { - IVE_LBP_CMP_MODE_E enMode; - IVE_8BIT_U un8BitThr; -} IVE_LBP_CTRL_S; - -/* -* Type of the GradientFilter output format -*/ -typedef enum hiIVE_NORM_GRAD_OUT_CTRL_E { - IVE_NORM_GRAD_OUT_CTRL_HOR_AND_VER = 0x0, - IVE_NORM_GRAD_OUT_CTRL_HOR = 0x1, - IVE_NORM_GRAD_OUT_CTRL_VER = 0x2, - IVE_NORM_GRAD_OUT_CTRL_COMBINE = 0x3, - - IVE_NORM_GRAD_OUT_CTRL_BUTT -} IVE_NORM_GRAD_OUT_CTRL_E; - -/* -* GradientFilter control parameters -*/ -typedef struct hiIVE_NORM_GRAD_CTRL_S { - IVE_NORM_GRAD_OUT_CTRL_E enOutCtrl; - HI_S8 as8Mask[25]; - HI_U8 u8Norm; -} IVE_NORM_GRAD_CTRL_S; - -/* -* LKOpticalFlowPyr output mode -*/ -typedef enum hiIVE_LK_OPTICAL_FLOW_PYR_OUT_MODE_E { - IVE_LK_OPTICAL_FLOW_PYR_OUT_MODE_NONE = 0, /* Output none */ - IVE_LK_OPTICAL_FLOW_PYR_OUT_MODE_STATUS = 1, /* Output status */ - IVE_LK_OPTICAL_FLOW_PYR_OUT_MODE_BOTH = 2, /* Output status and err */ - - IVE_LK_OPTICAL_FLOW_PYR_OUT_MODE_BUTT -} IVE_LK_OPTICAL_FLOW_PYR_OUT_MODE_E; - -/* -* LKOpticalFlowPyr control parameters -*/ -typedef struct hiIVE_LK_OPTICAL_FLOW_PYR_CTRL_S { - IVE_LK_OPTICAL_FLOW_PYR_OUT_MODE_E enOutMode; - HI_BOOL bUseInitFlow; /* where to use initial flow */ - HI_U16 u16PtsNum; /* Number of the feature points,<=500 */ - HI_U8 u8MaxLevel; /* 0<=u8MaxLevel<=3 */ - HI_U0Q8 u0q8MinEigThr; /* Minimum eigenvalue threshold */ - HI_U8 u8IterCnt; /* Maximum iteration times, <=20 */ - HI_U0Q8 u0q8Eps; /* Used for exit criteria: dx^2 + dy^2 < u0q8Eps */ -} IVE_LK_OPTICAL_FLOW_PYR_CTRL_S; - -/* -* Shi-Tomasi maximum eigenvalue -*/ -typedef struct hiIVE_ST_MAX_EIG_S { - HI_U16 u16MaxEig; /* Shi-Tomasi second step output MaxEig */ - HI_U8 u8Reserved[14]; /* For 16 byte align */ -} IVE_ST_MAX_EIG_S; - -/* -* ShiTomasi control parameters -*/ -typedef struct hiIVE_ST_CANDI_CORNER_CTRL_S { - IVE_MEM_INFO_S stMem; - HI_U0Q8 u0q8QualityLevel; -} IVE_ST_CANDI_CORNER_CTRL_S; - -typedef struct hiIVE_ST_CORNER_INFO_S { - HI_U16 u16CornerNum; - IVE_POINT_U16_S astCorner[IVE_ST_MAX_CORNER_NUM]; -} IVE_ST_CORNER_INFO_S; - -typedef struct hiIVE_ST_CORNER_CTRL_S { - HI_U16 u16MaxCornerNum; - HI_U16 u16MinDist; -} IVE_ST_CORNER_CTRL_S; - -/* -* GradFg mode enum -*/ -typedef enum hiIVE_GRAD_FG_MODE_E { - IVE_GRAD_FG_MODE_USE_CUR_GRAD = 0x0, - IVE_GRAD_FG_MODE_FIND_MIN_GRAD = 0x1, - - IVE_GRAD_FG_MODE_BUTT -} IVE_GRAD_FG_MODE_E; - -/* -* GradFg ctrl struct -*/ -typedef struct hiIVE_GRAD_FG_CTRL_S { - IVE_GRAD_FG_MODE_E enMode; /* Calculation mode */ - HI_U16 u16EdwFactor; /* Edge width adjustment factor (range: 500 to 2000; default: 1000) */ - HI_U8 u8CrlCoefThr; /* Gradient vector correlation coefficient threshold - (ranges: 50 to 100; default: 80) */ - HI_U8 u8MagCrlThr; /* Gradient amplitude threshold (range: 0 to 20; default: 4) */ - HI_U8 u8MinMagDiff; /* Gradient magnitude difference threshold (range: 2 to 8; default: 2) */ - HI_U8 u8NoiseVal; /* Gradient amplitude noise threshold (range: 1 to 8; default: 1) */ - HI_U8 u8EdwDark; /* Black pixels enable flag (range: 0 (no), 1 (yes); default: 1) */ -} IVE_GRAD_FG_CTRL_S; - -typedef struct hiIVE_CANDI_BG_PIX_S { - HI_U8Q4F4 u8q4f4Mean; /* Candidate background grays value */ - HI_U16 u16StartTime; /* Candidate Background start time */ - HI_U16 u16SumAccessTime; /* Candidate Background cumulative access time */ - HI_U16 u16ShortKeepTime; /* Candidate background short hold time */ - HI_U8 u8ChgCond; /* Time condition for candidate background into the changing state */ - HI_U8 u8PotenBgLife; /* Potential background cumulative access time */ -} IVE_CANDI_BG_PIX_S; - -typedef struct hiIVE_WORK_BG_PIX_S { - HI_U8Q4F4 u8q4f4Mean; /* 0# background grays value */ - HI_U16 u16AccTime; /* Background cumulative access time */ - HI_U8 u8PreGray; /* Gray value of last pixel */ - HI_U5Q3 u5q3DiffThr; /* Differential threshold */ - HI_U8 u8AccFlag; /* Background access flag */ - HI_U8 u8BgGray[3]; /* 1# ~ 3# background grays value */ -} IVE_WORK_BG_PIX_S; - -typedef struct hiIVE_BG_LIFE_S { - HI_U8 u8WorkBgLife[3]; /* 1# ~ 3# background vitality */ - HI_U8 u8CandiBgLife; /* Candidate background vitality */ -} IVE_BG_LIFE_S; - -typedef struct hiIVE_BG_MODEL_PIX_S { - IVE_WORK_BG_PIX_S stWorkBgPixel; /* Working background */ - IVE_CANDI_BG_PIX_S stCandiPixel; /* Candidate background */ - IVE_BG_LIFE_S stBgLife; /* Background vitality */ -} IVE_BG_MODEL_PIX_S; - -typedef struct hiIVE_FG_STAT_DATA_S { - HI_U32 u32PixNum; - HI_U32 u32SumLum; - HI_U8 u8Reserved[8]; -} IVE_FG_STAT_DATA_S; - -typedef struct hiIVE_BG_STAT_DATA_S { - HI_U32 u32PixNum; - HI_U32 u32SumLum; - HI_U8 u8Reserved[8]; -} IVE_BG_STAT_DATA_S; - -typedef struct hiIVE_MATCH_BG_MODEL_CTRL_S { - HI_U32 u32CurFrmNum; /* Current frame timestamp, in frame units */ - HI_U32 u32PreFrmNum; /* Previous frame timestamp, in frame units */ - HI_U16 u16TimeThr; /* Potential background replacement time threshold - (range: 2 to 100 frames; default: 20) */ - - HI_U8 u8DiffThrCrlCoef; /* Correlation coefficients between differential threshold and gray value - (range: 0 to 5; default: 0) */ - HI_U8 u8DiffMaxThr; /* Maximum of background differential threshold (range: 3 to 15; default: 6) */ - HI_U8 u8DiffMinThr; /* Minimum of background differential threshold (range: 3 to 15; default: 4) */ - HI_U8 u8DiffThrInc; /* Dynamic Background differential threshold increment - (range: 0 to 6; default: 0) */ - HI_U8 u8FastLearnRate; /* Quick background learning rate (range: 0 to 4; default: 2) */ - HI_U8 u8DetChgRegion; /* Whether to detect change region (range: 0 (no), 1 (yes); default: 0) */ -} IVE_MATCH_BG_MODEL_CTRL_S; - -typedef struct hiIVE_UPDATE_BG_MODEL_CTRL_S { - HI_U32 u32CurFrmNum; /* Current frame timestamp, in frame units */ - HI_U32 u32PreChkTime; /* The last time when background status is checked */ - HI_U32 u32FrmChkPeriod; /* Background status checking period (range: 0 to 2000 frames; default: 50) */ - - HI_U32 u32InitMinTime; /* Background initialization shortest time - (range: 20 to 6000 frames; default: 100) */ - HI_U32 u32StyBgMinBlendTime; /* Steady background integration shortest time - (range: 20 to 6000 frames; default: 200) */ - HI_U32 u32StyBgMaxBlendTime; /* Steady background integration longest time - (range: 20 to 40000 frames; default: 1500) */ - HI_U32 u32DynBgMinBlendTime; /* Dynamic background integration shortest time - (range: 0 to 6000 frames; default: 0) */ - HI_U32 u32StaticDetMinTime; /* Still detection shortest time (range: 20 to 6000 frames; default: 80) */ - HI_U16 u16FgMaxFadeTime; /* Foreground disappearing longest time - (range: 1 to 255 seconds; default: 15) */ - HI_U16 u16BgMaxFadeTime; /* Background disappearing longest time - (range: 1 to 255 seconds ; default: 60) */ - - HI_U8 u8StyBgAccTimeRateThr; /* Steady background access time ratio threshold - (range: 10 to 100; default: 80) */ - HI_U8 u8ChgBgAccTimeRateThr; /* Change background access time ratio threshold - (range: 10 to 100; default: 60) */ - HI_U8 u8DynBgAccTimeThr; /* Dynamic background access time ratio threshold - (range: 0 to 50; default: 0) */ - HI_U8 u8DynBgDepth; /* Dynamic background depth (range: 0 to 3; default: 3) */ - HI_U8 u8BgEffStaRateThr; /* Background state time ratio threshold when initializing - (range: 90 to 100; default: 90) */ - - HI_U8 u8AcceBgLearn; /* Whether to accelerate background learning (range: 0 (no), 1 (yes); default: 0) */ - HI_U8 u8DetChgRegion; /* Whether to detect change region (range: 0 (no), 1 (yes); default: 0) */ -} IVE_UPDATE_BG_MODEL_CTRL_S; - -typedef enum hiIVE_ANN_MLP_ACTIV_FUNC_E { - IVE_ANN_MLP_ACTIV_FUNC_IDENTITY = 0x0, - IVE_ANN_MLP_ACTIV_FUNC_SIGMOID_SYM = 0x1, - IVE_ANN_MLP_ACTIV_FUNC_GAUSSIAN = 0x2, - - IVE_ANN_MLP_ACTIV_FUNC_BUTT -} IVE_ANN_MLP_ACTIV_FUNC_E; -typedef enum hiIVE_ANN_MLP_ACCURATE_E { - IVE_ANN_MLP_ACCURATE_SRC16_WGT16 = 0x0, /* input decimals' accurate 16 bit, weight 16bit */ - IVE_ANN_MLP_ACCURATE_SRC14_WGT20 = 0x1, /* input decimals' accurate 14 bit, weight 20bit */ - - IVE_ANN_MLP_ACCURATE_BUTT -} IVE_ANN_MLP_ACCURATE_E; - -typedef struct hiIVE_ANN_MLP_MODEL_S { - IVE_ANN_MLP_ACTIV_FUNC_E enActivFunc; - IVE_ANN_MLP_ACCURATE_E enAccurate; - IVE_MEM_INFO_S stWeight; - HI_U32 u32TotalWeightSize; - - HI_U16 au16LayerCount[8]; /* 8 layers, including input and output layer */ - HI_U16 u16MaxCount; /* MaxCount<=1024 */ - HI_U8 u8LayerNum; /* 2 u16Thr, dstVal = maxVal. */ - HI_U8 u8MinVal; /* Min value */ - HI_U8 u8MaxVal; /* Max value */ -} IVE_SAD_CTRL_S; - -/* -* Resize zoom mode -*/ -typedef enum hiIVE_RESIZE_MODE_E { - IVE_RESIZE_MODE_LINEAR = 0x0, /* Bilinear interpolation */ - IVE_RESIZE_MODE_AREA = 0x1, /* Area-based (or super) interpolation */ - - IVE_RESIZE_MODE_BUTT -} IVE_RESIZE_MODE_E; - -/* -* Resize ctrl param -*/ -typedef struct hiIVE_RESIZE_CTRL_S { - IVE_RESIZE_MODE_E enMode; - IVE_MEM_INFO_S stMem; - HI_U16 u16Num; -} IVE_RESIZE_CTRL_S; - -/* -* CNN active function mode -*/ -typedef enum hiIVE_CNN_ACTIV_FUNC_E { - IVE_CNN_ACTIV_FUNC_NONE = 0x0, /* Do not taking a activation, equivalent f(x)=x */ - IVE_CNN_ACTIV_FUNC_RELU = 0x1, /* f(x)=max(0, x) */ - IVE_CNN_ACTIV_FUNC_SIGMOID = 0x2, /* f(x)=1/(1+exp(-x)), not support */ - - IVE_CNN_ACTIV_FUNC_BUTT -} IVE_CNN_ACTIV_FUNC_E; - -/* -* CNN pooling mode -*/ -typedef enum hiIVE_CNN_POOLING_E { - IVE_CNN_POOLING_NONE = 0x0, /* Do not taking a pooling action */ - IVE_CNN_POOLING_MAX = 0x1, /* Using max value of every pooling area */ - IVE_CNN_POOLING_AVG = 0x2, /* Using average value of every pooling area */ - - IVE_CNN_POOLING_BUTT -} IVE_CNN_POOLING_E; - -/* -* CNN Conv-ReLU-Pooling layer control parameters -*/ -typedef struct hiIVE_CNN_CONV_POOLING_S { - IVE_CNN_ACTIV_FUNC_E enActivFunc; /* Type of activation function */ - IVE_CNN_POOLING_E enPooling; /* Mode of pooling method */ - - HI_U8 u8FeatureMapNum; /* Number of feature maps */ - HI_U8 u8KernelSize; /* Kernel size, only support 3 currently */ - HI_U8 u8ConvStep; /* Convolution step, only support 1 currently */ - - HI_U8 u8PoolSize; /* Pooling size, only support 2 currently */ - HI_U8 u8PoolStep; /* Pooling step, only support 2 currently */ - HI_U8 u8Reserved[3]; - -} IVE_CNN_CONV_POOLING_S; - -/* -* CNN fully connected layer control parameters -*/ -typedef struct hiIVE_CNN_FULL_CONNECT_S { - HI_U16 au16LayerCnt[8]; /* Neuron number of every fully connected layers */ - HI_U16 u16MaxCnt; /* Max neuron number in all fully connected layers */ - HI_U8 u8LayerNum; /* Number of fully connected layer */ - HI_U8 u8Reserved; -} IVE_CNN_FULL_CONNECT_S; - -/* -* CNN model info -*/ -typedef struct hiIVE_CNN_MODEL_S { - IVE_CNN_CONV_POOLING_S astConvPool[8]; /* Conv-ReLU-Pooling layers info */ - IVE_CNN_FULL_CONNECT_S stFullConnect; /* Fully connected layers info */ - - IVE_MEM_INFO_S stConvKernelBias; /* Conv-ReLU-Pooling layers' kernels and bias */ - HI_U32 u32ConvKernelBiasSize; /* Size of Conv-ReLU-Pooling layer' kernels and bias */ - - IVE_MEM_INFO_S stFCLWgtBias; /* Fully Connection Layers' weights and bias */ - HI_U32 u32FCLWgtBiasSize; /* Size of fully connection layers weights and bias */ - - HI_U32 u32TotalMemSize; /* Total memory size of all kernels, weights, bias */ - - IVE_IMAGE_TYPE_E enType; /* Image type used for the CNN model */ - HI_U32 u32Width; /* Image width used for the model */ - HI_U32 u32Height; /* Image height used for the model */ - - HI_U16 u16ClassCount; /* Number of classes */ - HI_U8 u8ConvPoolLayerNum; /* Number of Conv-ReLU-Pooling layers */ - HI_U8 u8Reserved; -} IVE_CNN_MODEL_S; - -/* -* CNN ctrl param -*/ -typedef struct hiIVE_CNN_CTRL_S { - IVE_MEM_INFO_S stMem; /* Assist memory */ - HI_U32 u32Num; /* Input image number */ -} IVE_CNN_CTRL_S; - -/* -* CNN result struct -*/ -typedef struct hiIVE_CNN_RESULT_S { - HI_S32 s32ClassIdx; /* The most possible index of the classification */ - HI_S32 s32Confidence; /* The confidence of the classification */ -} IVE_CNN_RESULT_S; - -/* -* Perspective transform algorithm mode -*/ -typedef enum hiIVE_PERSP_TRANS_ALG_MODE_E { - IVE_PERSP_TRANS_ALG_MODE_NR_SIM = 0x0, /* Non-reflective similarity transform mode */ - IVE_PERSP_TRANS_ALG_MODE_SIM = 0x1, /* Reflective similarity transform mode */ - IVE_PERSP_TRANS_ALG_MODE_AFFINE = 0x2, /* Affine transform mode */ - - IVE_PERSP_TRANS_ALG_MODE_BUTT -} IVE_PERSP_TRANS_ALG_MODE_E; - -/* -* Point pair -*/ -typedef struct hiIVE_PERSP_TRANS_POINT_PAIR_S { - IVE_POINT_U14Q2_S stSrcPoint; /* Source point */ - IVE_POINT_U14Q2_S stDstPoint; /* Destination point */ -} IVE_PERSP_TRANS_POINT_PAIR_S; - -/* -* Perspective transform csc mode -*/ -typedef enum hiIVE_PERSP_TRANS_CSC_MODE_E { - IVE_PERSP_TRANS_CSC_MODE_NONE = 0x0, /* No do csc */ - IVE_PERSP_TRANS_CSC_MODE_VIDEO_BT601_YUV2RGB = 0x1, /* CSC: YUV2RGB, video transfer mode, - RGB value range [16, 235] */ - IVE_PERSP_TRANS_CSC_MODE_VIDEO_BT709_YUV2RGB = 0x2, /* CSC: YUV2RGB, video transfer mode, - RGB value range [16, 235] */ - IVE_PERSP_TRANS_CSC_MODE_PIC_BT601_YUV2RGB = 0x3, /* CSC: YUV2RGB, picture transfer mode, - RGB value range [0, 255] */ - IVE_PERSP_TRANS_CSC_MODE_PIC_BT709_YUV2RGB = 0x4, /* CSC: YUV2RGB, picture transfer mode, - RGB value range [0, 255] */ - - IVE_PERSP_TRANS_CSC_MODE_BUTT -} IVE_PERSP_TRANS_CSC_MODE_E; - -/* -* Perspective transform ctrl -*/ -typedef struct hiIVE_PERSP_TRANS_CTRL_S { - IVE_PERSP_TRANS_ALG_MODE_E enAlgMode; /* Alg mode */ - IVE_PERSP_TRANS_CSC_MODE_E enCscMode; /* CSC mode */ - HI_U16 u16RoiNum; /* Roi number */ - HI_U16 u16PointPairNum; /* Point pair number */ -} IVE_PERSP_TRANS_CTRL_S; - -typedef struct hiIVE_ROI_INFO_S { - IVE_RECT_S24Q8_S stRoi; - HI_U32 u32RoiId; -} IVE_ROI_INFO_S; - -/* Kcf ctrl param */ -typedef struct hiIVE_KCF_PRO_CTRL_S { - IVE_CSC_MODE_E enCscMode; /* Only support: - IVE_CSC_MODE_VIDEO_BT601_YUV2RGB CSC: YUV2RGB, video transfer mode, - RGB value range [16, 235] - IVE_CSC_MODE_VIDEO_BT709_YUV2RGB CSC: YUV2RGB, video transfer mode, - RGB value range [16, 235] - IVE_CSC_MODE_PIC_BT601_YUV2RGB CSC: YUV2RGB, picture transfer mode, - RGB value range [0, 255] - IVE_CSC_MODE_PIC_BT709_YUV2RGB CSC: YUV2RGB, picture transfer mode, - RGB value range [0, 255] - */ - IVE_MEM_INFO_S stTmpBuf; - HI_U1Q15 u1q15InterFactor; /* Blend coefficient. [0, 32768] */ - HI_U0Q16 u0q16Lamda; /* The regularization coefficient. [0, 65535] */ - HI_U4Q12 u4q12TrancAlfa; /* The normalization thresh. [0, 4095] */ - HI_U0Q8 u0q8Sigma; /* The gaussian kernel bandwidth. [0, 255] */ - HI_U8 u8RespThr; -} IVE_KCF_PRO_CTRL_S; - -typedef struct hiIVE_KCF_OBJ_S { - IVE_ROI_INFO_S stRoiInfo; - IVE_MEM_INFO_S stCosWinX; - IVE_MEM_INFO_S stCosWinY; - IVE_MEM_INFO_S stGaussPeak; - IVE_MEM_INFO_S stHogFeature; - IVE_MEM_INFO_S stAlpha; - IVE_MEM_INFO_S stDst; - HI_U3Q5 u3q5Padding; /* [48, 160] */ - HI_U8 au8Reserved[3]; -} IVE_KCF_OBJ_S; - -typedef struct hiIVE_LIST_HEAD_S { - struct hiIVE_LIST_HEAD_S *pstNext, *pstPrev; -} IVE_LIST_HEAD_S; - -typedef struct hiIVE_KCF_OBJ_NODE_S { - IVE_LIST_HEAD_S stList; - IVE_KCF_OBJ_S stKcfObj; -} IVE_KCF_OBJ_NODE_S; - -typedef enum hiIVE_KCF_LIST_STATE_E { - IVE_KCF_LIST_STATE_CREATE = 0x1, - IVE_KCF_LIST_STATE_DESTORY = 0x2, - IVE_KCF_LIST_STATE_BUTT -} IVE_KCF_LIST_STATE_E; - -typedef struct hiIVE_KCF_OBJ_LIST_S { - IVE_KCF_OBJ_NODE_S *pstObjNodeBuf; /* The object list node address */ - IVE_LIST_HEAD_S stFreeObjList; /* The free list of object list */ - IVE_LIST_HEAD_S stTrainObjList; /* The training list of object list */ - IVE_LIST_HEAD_S stTrackObjList; /* The tracking list of object list */ - - HI_U32 u32FreeObjNum; /* The numbers of free list */ - HI_U32 u32TrainObjNum; /* The numbers of training list */ - HI_U32 u32TrackObjNum; /* The numbers of tracking list */ - HI_U32 u32MaxObjNum; /* The maximum numbers of object list */ - IVE_KCF_LIST_STATE_E enListState; /* The object list state */ - HI_U8 *pu8TmpBuf; /* Assist buffer */ -} IVE_KCF_OBJ_LIST_S; - -typedef struct hiIVE_KCF_BBOX_S { - IVE_KCF_OBJ_NODE_S *pstNode; - HI_S32 s32Response; /* Bbox Response value. */ - - IVE_ROI_INFO_S stRoiInfo; - HI_BOOL bTrackOk; - HI_BOOL bRoiRefresh; -} IVE_KCF_BBOX_S; - -typedef struct hiIVE_KCF_BBOX_CTRL_S { - HI_U32 u32MaxBboxNum; /* The member numbers of Bbox Array. */ - HI_S32 s32RespThr; /* Select Bbox when Bbox'Response value is greater than or equal to RespThr. */ -} IVE_KCF_BBOX_CTRL_S; - -typedef enum hiIVE_HOG_MODE_E { - IVE_HOG_MODE_VERTICAL_TANGENT_PLANE = 0x1, - IVE_HOG_MODE_HORIZONTAL_TANGENT_PLANE = 0x2, - IVE_HOG_MODE_BUTT -} IVE_HOG_MODE_E; - -typedef struct hiIVE_HOG_CTRL_S { - IVE_CSC_MODE_E enCscMode; /* Only support: - IVE_CSC_MODE_VIDEO_BT601_YUV2RGB CSC: YUV2RGB, video transfer mode, - RGB value range [16, 235] - IVE_CSC_MODE_VIDEO_BT709_YUV2RGB CSC: YUV2RGB, video transfer mode, - RGB value range [16, 235] - IVE_CSC_MODE_PIC_BT601_YUV2RGB CSC: YUV2RGB, picture transfer mode, - RGB value range [0, 255] - IVE_CSC_MODE_PIC_BT709_YUV2RGB CSC: YUV2RGB, picture transfer mode, - RGB value range [0, 255] */ - IVE_HOG_MODE_E enHogMode; /* Hog mode */ - HI_U32 u32RoiNum; /* Roi number. [1, 64] */ - HI_U4Q12 u4q12TrancAlfa; /* The normalization thresh. [0, 4095] */ - HI_U8 au8Rsv[2]; -} IVE_HOG_CTRL_S; - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif -#endif/*_HI_IVE_H_*/ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ivp.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ivp.h deleted file mode 100644 index 88f65f32..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ivp.h +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (C) Hisilicon Technologies Co., Ltd. 2018-2019. All rights reserved. - * Description: defination of hi_ivp.h - * Author: Hisilicon multimedia software (SVP) group - * Create: 2018/10/26 - */ -#ifndef _HI_IVP_H_ -#define _HI_IVP_H_ - -#include "hi_type.h" -#include "hi_errno.h" -#include "hi_common.h" -#include "hi_comm_video.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C"{ -#endif -#endif - -#define HI_IVP_MAX_VENC_CHN_NUM 16 -#define HI_IVP_MAX_VIPIPE_NUM 2 -#define HI_IVP_MAX_CLASS 2 -#define HI_IVP_CLASS_NAME_LEN 32 - -typedef struct{ - hi_u64 physical_addr; /* RW;The physical address of the memory */ - hi_u64 virtual_addr; /* RW;The virtual address of the memory */ - hi_u32 memory_size; /* RW;The size of memory */ -}hi_ivp_mem_info; - -typedef struct{ - hi_float threshold; -}hi_ivp_ctrl_attr; - -typedef struct{ - hi_s32 x; - hi_s32 y; - hi_u32 width; - hi_u32 height; -}hi_ivp_rect; - -typedef struct{ - hi_ivp_rect rect; - hi_float quality; -}hi_ivp_obj; - -typedef struct{ - hi_char class_name[HI_IVP_CLASS_NAME_LEN]; - hi_u32 rect_num; - hi_u32 rect_capcity; - hi_ivp_obj *objs; -}hi_ivp_obj_of_one_class; - -typedef struct{ - hi_s32 class_num; - hi_ivp_obj_of_one_class obj_class[HI_IVP_MAX_CLASS]; -}hi_ivp_obj_array; - -typedef struct{ - hi_bool enable; - hi_u32 threshold; /* RW;Range: [1,1024] */ -}hi_ivp_roi_attr; - -typedef enum{ - HI_IVP_ROI_MB_MODE_4X4, - HI_IVP_ROI_MB_MODE_8X8, - HI_IVP_ROI_MB_MODE_16X16, - HI_IVP_ROI_MB_MODE_BUTT -}hi_ivp_roi_mb_mode; - -typedef struct{ - hi_ivp_roi_mb_mode roi_mb_mode; - hi_u32 img_width; /* equal to the width of processing frame */ - hi_u32 img_height; /* equal to the height of processing frame */ - hi_u8 *mb_map; /* for 4x4 mb mode, alloc (DIV_UP(img_width,4))*(DIV_UP(img_height,4)) bytes */ -}hi_ivp_roi_map; - -/***************************************************************************** -* Prototype : hi_ivp_init -* Description : Intelligent Video Process(IVP) initialization. -* Parameters : HI_VOID -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_init(hi_void); - -/***************************************************************************** -* Prototype : hi_ivp_deinit -* Description : Intelligent Video Process(IVP) exit. -* Parameters : HI_VOID. -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_deinit(hi_void); - -/***************************************************************************** -* Prototype : hi_ivp_load_resource_from_memory -* Description : Load resource from memory. -* Parameters : const hi_ivp_mem_info *ivp_file_mem_info:Input - hi_s32 *ivp_handle:Output -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_load_resource_from_memory(const hi_ivp_mem_info *ivp_file_mem_info, hi_s32 *ivp_handle); - -/***************************************************************************** -* Prototype : hi_ivp_unload_resource -* Description : Unload resource. -* Parameters : hi_s32 ivp_handle:Input -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_unload_resource(hi_s32 ivp_handle); - -/***************************************************************************** -* Prototype : hi_ivp_set_ctrl_attr -* Description : Set ctrl param,include SMD threshold. -* Parameters : hi_s32 ivp_handle:Input - const hi_ivp_ctrl_attr *ivp_ctrl_attr:input -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_set_ctrl_attr(hi_s32 ivp_handle, const hi_ivp_ctrl_attr *ivp_ctrl_attr); - -/***************************************************************************** -* Prototype : hi_ivp_get_ctrl_attr -* Description : Get ctrl param,include SMD threshold. -* Parameters : hi_s32 ivp_handle:Input - hi_ivp_ctrl_attr *ivp_ctrl_attr:Output -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_get_ctrl_attr(hi_s32 ivp_handle, hi_ivp_ctrl_attr *ivp_ctrl_attr); - -/***************************************************************************** -* Prototype : hi_ivp_set_fd_ctrl_attr -* Description : Set FD ctrl param,include FD threshold. Only Hi3518EV300 support. -* Parameters : hi_s32 ivp_handle:Input - const hi_ivp_ctrl_attr *ivp_ctrl_attr:input -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2019/05/22 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_set_fd_ctrl_attr(hi_s32 ivp_handle, const hi_ivp_ctrl_attr *ivp_ctrl_attr); - -/***************************************************************************** -* Prototype : hi_ivp_get_fd_ctrl_attr -* Description : Get FD ctrl param,include FD threshold. Only Hi3518EV300 support. -* Parameters : hi_s32 ivp_handle:Input - hi_ivp_ctrl_attr *ivp_ctrl_attr:Output -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2019/05/22 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_get_fd_ctrl_attr(hi_s32 ivp_handle, hi_ivp_ctrl_attr *ivp_ctrl_attr); - -/***************************************************************************** -* Prototype : hi_ivp_set_venc_low_bitrate -* Description : Enable or disable venc low bitrate. -* Parameters : hi_s32 ivp_handle:Input - hi_s32 venc_chn:Input - hi_bool enable:Input -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_set_venc_low_bitrate(hi_s32 ivp_handle, hi_s32 venc_chn, hi_bool enable); - -/***************************************************************************** -* Prototype : hi_ivp_get_venc_low_bitrate -* Description : Get status of venc low bitrate. -* Parameters : hi_s32 ivp_handle:Input - hi_s32 venc_chn:Input - hi_bool *enable:Output -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_get_venc_low_bitrate(hi_s32 ivp_handle, hi_s32 venc_chn, hi_bool *enable); - -/***************************************************************************** -* Prototype : hi_ivp_set_advance_isp -* Description : Enable or disable advance Isp Attr. -* Parameters : hi_s32 ivp_handle:Input - hi_s32 vi_pipe:Input - hi_bool enable:Input -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_set_advance_isp(hi_s32 ivp_handle, hi_s32 vi_pipe, hi_bool enable); - -/***************************************************************************** -* Prototype : hi_ivp_get_advance_isp -* Description : Get status of advance ISP attr. -* Parameters : hi_s32 ivp_handle:Input - hi_s32 vi_pipe:Input - hi_bool *enable:Output -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_get_advance_isp(hi_s32 ivp_handle, hi_s32 vi_pipe, hi_bool *enable); - -/***************************************************************************** -* Prototype : hi_ivp_set_roi_attr -* Description : Set ROI Attr. -* Parameters : hi_s32 ivp_handle:Input - const hi_ivp_roi_attr *roi_attr:Input -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2019/3/6 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_set_roi_attr(hi_s32 ivp_handle, const hi_ivp_roi_attr *roi_attr); - -/***************************************************************************** -* Prototype : hi_ivp_get_roi_attr -* Description : Get ROI Attr. -* Parameters : hi_s32 ivp_handle:Input - hi_ivp_roi_attr *roi_attr:Output -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2019/3/6 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_get_roi_attr(hi_s32 ivp_handle, hi_ivp_roi_attr *roi_attr); - -/***************************************************************************** -* Prototype : hi_ivp_set_roi_map -* Description : Set ROI Map. -* Parameters : hi_s32 ivp_handle:Input - const hi_ivp_roi_map *roi_map:Input -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2019/3/6 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_set_roi_map(hi_s32 ivp_handle, const hi_ivp_roi_map *roi_map); - -/***************************************************************************** -* Prototype : hi_ivp_process -* Description : Process. -* Parameters : hi_s32 ivp_handle:Input - const VIDEO_FRAME_INFO_S *src_frame:Input - hi_bool *obj_alarm:Output,alarm info. -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_process(hi_s32 ivp_handle, const VIDEO_FRAME_INFO_S *src_frame, hi_bool *obj_alarm); - -/***************************************************************************** -* Prototype : hi_ivp_process_ex -* Description : Process. -* Parameters : hi_s32 ivp_handle:Input - const VIDEO_FRAME_INFO_S *src_frame:Input - hi_ivp_obj_array *obj_array:Output -* -* Return Value : HI_SUCCESS: Success;Error codes: Failure. -* Spec : -* History: -* -* 1. Date : 2018/10/26 -* Author : -* Modification : Created function -* -*****************************************************************************/ -hi_s32 hi_ivp_process_ex(hi_s32 ivp_handle, const VIDEO_FRAME_INFO_S *src_frame, hi_ivp_obj_array *obj_array); - -/* Error Code */ -typedef enum hiEN_IVP_ERR_CODE_E { - ERR_IVP_READ_FILE = 0x41, /* IVP read file error */ - ERR_IVP_OPERATE_FILE = 0x42, /* IVP operate file error */ - ERR_IVP_PROCESS_ERR = 0x43, - ERR_IVP_INIT_FAIL = 0x44, /* IVP init fail */ - ERR_IVP_EXIT_FAIL = 0x45, /* IVP exit fail */ - ERR_IVP_LOAD_RESOURCE_FAIL = 0x46, - - ERR_IVP_BUTT -}EN_IVP_ERR_CODE_E; - -/************************************************IVP error code ***********************************/ -#define HI_ERR_IVP_NULL_PTR HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) -#define HI_ERR_IVP_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) -#define HI_ERR_IVP_NOT_SURPPORT HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) -#define HI_ERR_IVP_INIT_FAIL HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, ERR_IVP_INIT_FAIL) -#define HI_ERR_IVP_EXIT_FAIL HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, ERR_IVP_EXIT_FAIL) -#define HI_ERR_IVP_NOMEM HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM) -#define HI_ERR_IVP_EXIST HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST) -#define HI_ERR_IVP_UNEXIST HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST) -#define HI_ERR_IVP_READ_FILE HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, ERR_IVP_READ_FILE) -#define HI_ERR_IVP_OPERATE_FILE HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, ERR_IVP_OPERATE_FILE) -#define HI_ERR_IVP_PROCESS_ERR HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, ERR_IVP_PROCESS_ERR) -#define HI_ERR_IVP_LOAD_RESOURCE_FAIL HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, ERR_IVP_LOAD_RESOURCE_FAIL) -#define HI_ERR_IVP_BUSY HI_DEF_ERR(HI_ID_IVP, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY) -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif - -#endif/*_HI_IVP_H_*/ - diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ivs_qr.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ivs_qr.h deleted file mode 100644 index 6873c9ba..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ivs_qr.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) Hisilicon Technologies Co., Ltd. 2019. All rights reserved. - * Description: definition of hi_ivs_qr.h - * Author: Hisilicon multimedia software (SVP) group - * Create: 2019-09-02 - */ -#ifndef _HI_IVS_QR_H_ -#define _HI_IVS_QR_H_ - -#include "hi_common_qr.h" -#include "hi_comm_video.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C"{ -#endif -#endif /* End of #ifdef __cplusplus */ - -/* - * Prototype : hi_ivs_qr_init - * Description : qr init context. - * Parameters : void - * Return Value : HI_SUCCESS: Success;Error codes: Failure. - * Spec : - * History: - * 1. Date : 2019/09/02 - * Author : - * Modification : Created function - */ -hi_s32 hi_ivs_qr_init(hi_void); - -/* - * Prototype : hi_ivs_qr_get_buf_size - * Description : get qr buf size. - * Parameters : hi_u32 max_img_width Max input image width - * hi_u32 max_img_height Max input image height - * hi_u32 *size output buffer size - * Return Value : HI_SUCCESS: Success;Error codes: Failure. - * Spec : - * History: - * 1. Date : 2019/09/02 - * Author : - * Modification : Created function - */ -hi_s32 hi_ivs_qr_get_buf_size(hi_u32 max_img_width, hi_u32 max_img_height, hi_u32 *size); - -/* - * Prototype : hi_ivs_qr_proc - * Description : qr process. - * Parameters : VIDEO_FRAME_INFO_S *src_frame input frame - * hi_qr_mem_info *buf buffer - * hi_qr_info *qr_info output QR info - * Return Value : HI_SUCCESS: Success;Error codes: Failure. - * Spec : - * History: - * 1. Date : 2019/09/02 - * Author : - * Modification : Created function - */ -hi_s32 hi_ivs_qr_proc(VIDEO_FRAME_INFO_S *src_frame, hi_qr_mem_info *buf, hi_qr_info *qr_info); - -/* - * Prototype : hi_ivs_qr_deinit - * Description : qr deinit. - * Parameters : void - * Return Value : HI_SUCCESS: Success;Error codes: Failure. - * Spec : - * History: - * 1. Date : 2019/09/02 - * Author : - * Modification : Created function - */ -hi_s32 hi_ivs_qr_deinit(hi_void); - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif -#endif /* _HI_IVS_QR_H_ */ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_math.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_math.h deleted file mode 100644 index 6148ba6c..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_math.h +++ /dev/null @@ -1,338 +0,0 @@ -/****************************************************************************** - - Copyright (C), 2016, Huawei Tech. Co., Ltd. - - ****************************************************************************** - File Name : hi_math.h - Version : Initial Draft - Author : Hisilicon multimedia software group - Created : 2016/07/15 - Last Modified : - Description : mathematical functions. - Function List : -******************************************************************************/ -#ifndef __HI_MATH_H__ -#define __HI_MATH_H__ - -#include "hi_type.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C"{ -#endif -#endif /* __cplusplus */ - -/****************************************************************************** -** ABS(x) absolute value of x -** SIGN(x) sign of x -** CMP(x,y) 0 if x==y; 1 if x>y; -1 if x= 0 ? (x) : (-(x)) ) -#define _SIGN(x) ( (x) >= 0 ? 1 : -1 ) -#define CMP(x,y) (((x) == (y)) ? 0 : (((x) > (y)) ? 1 : -1)) - -/****************************************************************************** -** MAX2(x,y) maximum of x and y -** MIN2(x,y) minimum of x and y -** MAX3(x,y,z) maximum of x, y and z -** MIN3(x,y,z) minimun of x, y and z -** MEDIAN(x,y,z) median of x,y,z -** MEAN2(x,y) mean of x,y -******************************************************************************/ -#define MAX2(x,y) ( (x)>(y) ? (x):(y) ) -#define MIN2(x,y) ( (x)<(y) ? (x):(y) ) -#define MAX3(x,y,z) ( (x)>(y) ? MAX2(x,z) : MAX2(y,z) ) -#define MIN3(x,y,z) ( (x)<(y) ? MIN2(x,z) : MIN2(y,z) ) -#define MEDIAN(x,y,z) (((x)+(y)+(z) - MAX3(x,y,z)) - MIN3(x,y,z) ) -#define MEAN2(x,y) (((x)+(y)) >> 1 ) - -/****************************************************************************** -** CLIP3(x,min,max) clip x within [min,max] -** WRAP_MAX(x,max,min) wrap to min if x equal max -** WRAP_MIN(x,min,max) wrap to max if x equal min -** VALUE_BETWEEN(x,min.max) True if x is between [min,max] inclusively. -******************************************************************************/ -#define CLIP_MIN(x,min) (((x) >= min) ? (x) : min) -#define CLIP3(x,min,max) ( (x)< (min) ? (min) : ((x)>(max)?(max):(x)) ) -#define CLIP_MAX(x,max) ((x)>(max)?(max):(x)) -#define WRAP_MAX(x,max,min) ( (x)>=(max) ? (min) : (x) ) -#define WRAP_MIN(x,min,max) ( (x)<=(min) ? (max) : (x) ) -#define VALUE_BETWEEN(x,min,max) (((x)>=(min)) && ((x) <= (max))) - -/****************************************************************************** -** MULTI_OF_2_POWER(x,a) whether x is multiple of a(a must be power of 2) -** ALIGN_DOWN(x,a) floor x to multiple of a(a must be power of 2) -** ALIGN_UP(x, a) align x to multiple of a -** -** Example: -** ALIGN_UP(5,4) = 8 -** ALIGN_DOWN(5,4) = 4 -******************************************************************************/ -#define MULTI_OF_2_POWER(x,a) (!((x) & ((a) - 1) ) ) -#define HICEILING(x, a) (((x)+(a)-1)/(a)) - -#define ALIGN_UP(x, a) ( ( ((x) + ((a) - 1) ) / a ) * a ) -#define ALIGN_DOWN(x, a) ( ( (x) / (a)) * (a) ) - -#define DIV_UP(x, a) ( ((x) + ((a) - 1) ) / a ) - -/****************************************************************************** -** Get the span between two unsinged number, such as -** SPAN(HI_U32, 100, 200) is 200 - 100 = 100 -** SPAN(HI_U32, 200, 100) is 0xFFFFFFFF - 200 + 100 -** SPAN(HI_U64, 200, 100) is 0xFFFFFFFFFFFFFFFF - 200 + 100 -******************************************************************************/ -#define SPAN(type, begin, end)\ -({ \ - type b = (begin); \ - type e = (end); \ - (type)((b >= e) ? (b - e) : (b + ((~((type)0))-e))); \ -}) - -/****************************************************************************** -** ENDIAN32(x,y) little endian <---> big endian -** IS_LITTLE_END() whether the system is little end mode -******************************************************************************/ -#define ENDIAN32( x ) \ - ( ( (x) << 24 ) | \ - ( ( (x) & 0x0000ff00 ) << 8 ) | \ - ( ( (x) & 0x00ff0000 ) >> 8 ) | \ - ( ( (x) >> 24 ) & 0x000000ff ) ) - - - -/****************************************************************************** -** ENDIAN16(x,y) little endian <---> big endian -** IS_LITTLE_END() whether the system is little end mode -******************************************************************************/ -#define ENDIAN16( x ) ( (((x) << 8) & 0xff00) | (((x) >> 8) & 255) ) - - - -__inline static HI_BOOL IS_LITTLE_END(void) -{ - union unEND_TEST_U - { - HI_CHAR cTest[4]; - HI_U32 u32Test; - } unEndTest; - - unEndTest.cTest[0] = 0x01; - unEndTest.cTest[1] = 0x02; - unEndTest.cTest[2] = 0x03; - unEndTest.cTest[3] = 0x04; - - return (unEndTest.u32Test > 0x01020304) ? (HI_TRUE) : (HI_FALSE); -} - - -/****************************************************************************** -** FRACTION32(de,nu) fraction: nu(minator) / de(nominator). -** NUMERATOR32(x) of x(x is fraction) -** DENOMINATOR32(x) Denominator of x(x is fraction) - -** represent fraction in 32 bit. LSB 16 is numerator, MSB 16 is denominator -** It is integer if denominator is 0. -******************************************************************************/ -#define FRACTION32(de,nu) ( ((de) << 16) | (nu) ) -#define NUMERATOR32(x) ( (x) & 0xffff) -#define DENOMINATOR32(x) ( (x) >> 16 ) - -/****************************************************************************** -** RGB(r,g,b) assemble the r,g,b to 24bit color -** RGB_R(c) get RED from 24bit color -** RGB_G(c) get GREEN from 24bit color -** RGB_B(c) get BLUE from 24bit color -******************************************************************************/ -#define RGB(r,g,b) ((((r) & 0xff) << 16) | (((g) & 0xff) << 8) | ((b) & 0xff)) -#define RGB_R(c) ( ((c) & 0xff0000) >> 16) -#define RGB_G(c) ( ((c) & 0xff00) >> 8) -#define RGB_B(c) ( (c) & 0xff) - -/****************************************************************************** -** YUV(y,u,v) assemble the y,u,v to 30bit color -** YUV_Y(c) get Y from 30bit color -** YUV_U(c) get U from 30bit color -** YUV_V(c) get V from 30bit color -******************************************************************************/ -#define YUV(y,u,v) ((((y) & 0x03ff) << 20) | (((u) & 0x03ff) << 10) | ((v) & 0x03ff)) -#define YUV_Y(c) ( ((c) & 0x3ff00000) >> 20) -#define YUV_U(c) ( ((c) & 0x000ffc00) >> 10) -#define YUV_V(c) ( (c) & 0x000003ff) - -/****************************************************************************** -** YUV_8BIT(y,u,v) assemble the y,u,v to 24bit color -** YUV_8BIT_Y(c) get Y from 24bit color -** YUV_8BIT_U(c) get U from 24bit color -** YUV_8BIT_V(c) get V from 24bit color -******************************************************************************/ -#define YUV_8BIT(y,u,v) ((((y) & 0xff) << 16) | (((u) & 0xff) << 8) | ((v) & 0xff)) -#define YUV_8BIT_Y(c) ( ((c) & 0xff0000) >> 16) -#define YUV_8BIT_U(c) ( ((c) & 0xff00) >> 8) -#define YUV_8BIT_V(c) ( (c) & 0xff) - -/****************************************************************************** -** Rgb2Yc(r, g, b, *y, *u, *u) convert r,g,b to y,u,v -** Rgb2Yuv(rgb) convert rgb to yuv -******************************************************************************/ -__inline static HI_VOID Rgb2Yc(HI_U16 r, HI_U16 g, HI_U16 b, HI_U16 * py, HI_U16 * pcb, HI_U16 * pcr) -{ - /* Y */ - *py = (HI_U16)((((r*66+g*129+b*25) >> 8) + 16) << 2); - - /* Cb */ - *pcb = (HI_U16)(((((b*112-r*38)-g*74) >> 8) + 128) << 2); - - /* Cr */ - *pcr = (HI_U16)(((((r*112-g*94)-b*18) >> 8) + 128) << 2); -} - -__inline static HI_U32 Rgb2Yuv(HI_U32 u32Rgb) -{ - HI_U16 y,u,v; - - Rgb2Yc(RGB_R(u32Rgb), RGB_G(u32Rgb), RGB_B(u32Rgb), &y, &u, &v); - - return YUV(y,u,v); -} - - -__inline static HI_VOID Rgb2Yc_full(HI_U16 r, HI_U16 g, HI_U16 b, HI_U16 *py, HI_U16 *pcb, HI_U16 *pcr) -{ - HI_U16 py_temp, pcb_temp, pcr_temp; - - py_temp = (HI_U16)(((r*76 + g*150 + b*29)>>8) * 4); - pcb_temp = (HI_U16)(CLIP_MIN(((((b*130 - r*44 ) - g*86) >> 8)+128),0) * 4); - pcr_temp = (HI_U16)(CLIP_MIN(((((r*130 - g*109) - b*21) >> 8)+128),0) * 4); - - *py = MAX2(MIN2(py_temp, 1023), 0); - *pcb = MAX2(MIN2(pcb_temp, 1023), 0); - *pcr = MAX2(MIN2(pcr_temp, 1023), 0); -} - -__inline static HI_U32 Rgb2Yuv_full(HI_U32 u32Rgb) -{ - HI_U16 y,u,v; - - Rgb2Yc_full(RGB_R(u32Rgb), RGB_G(u32Rgb), RGB_B(u32Rgb), &y, &u, &v); - - return YUV(y,u,v); -} - -/****************************************************************************** -** Rgb2Yc_8BIT(r, g, b, *y, *u, *u) convert r,g,b to y,u,v -** Rgb2Yuv_8BIT(rgb) convert rgb to yuv -******************************************************************************/ -__inline static HI_VOID Rgb2Yc_8BIT(HI_U8 r, HI_U8 g, HI_U8 b, HI_U8 *py, HI_U8 *pcb, HI_U8 *pcr) -{ - /* Y */ - *py = (HI_U8)(((r*66+g*129+b*25) >> 8) + 16); - - /* Cb */ - *pcb = (HI_U8)((((b*112-r*38)-g*74) >> 8) + 128); - - /* Cr */ - *pcr = (HI_U8)((((r*112-g*94)-b*18) >> 8) + 128); -} - -__inline static HI_U32 Rgb2Yuv_8BIT(HI_U32 u32Rgb) -{ - HI_U8 y,u,v; - - Rgb2Yc_8BIT(RGB_R(u32Rgb), RGB_G(u32Rgb), RGB_B(u32Rgb), &y, &u, &v); - - return YUV_8BIT(y,u,v); -} - -__inline static HI_VOID Rgb2Yc_full_8BIT(HI_U8 r, HI_U8 g, HI_U8 b, HI_U8 *py, HI_U8 *pcb, HI_U8 *pcr) -{ - HI_S16 py_temp, pcb_temp, pcr_temp; - - py_temp = (r*76 + g*150 + b*29)>>8; - pcb_temp = (((b*130 - r*44) - g*86) >> 8)+128; - pcr_temp = (((r*130 - g*109) - b*21) >> 8)+128; - - *py = MAX2(MIN2(py_temp, 255), 0); - *pcb = MAX2(MIN2(pcb_temp, 255), 0); - *pcr = MAX2(MIN2(pcr_temp, 255), 0); -} - -__inline static HI_U32 Rgb2Yuv_full_8BIT(HI_U32 u32Rgb) -{ - HI_U8 y,u,v; - - Rgb2Yc_full_8BIT(RGB_R(u32Rgb), RGB_G(u32Rgb), RGB_B(u32Rgb), &y, &u, &v); - - return YUV_8BIT(y,u,v); -} - -/******************************************************************************* -** FpsControl Useing Sample: -** FPS_CTRL_S g_stFpsCtrl; -** -** Take 12 frame uniform in 25. -** InitFps(&g_stFpsCtrl, 25, 12); -** -** { -** if(FpsControl(&g_stFpsCtrl)) printf("Yes, this frmae should be token"); -** } -** -*******************************************************************************/ -typedef struct hiFPS_CTRL_S -{ - HI_U32 u32Ffps; /* Full frame rate */ - HI_U32 u32Tfps; /* Target frame rate */ - HI_U32 u32FrmKey; /* update key frame */ -} FPS_CTRL_S; - -__inline static HI_VOID InitFps(FPS_CTRL_S *pFrmCtrl, HI_U32 u32FullFps, - HI_U32 u32TagFps) -{ - pFrmCtrl->u32Ffps = u32FullFps; - pFrmCtrl->u32Tfps = u32TagFps; - pFrmCtrl->u32FrmKey = 0; -} - -__inline static HI_BOOL FpsControl(FPS_CTRL_S *pFrmCtrl) -{ - HI_BOOL bReturn = HI_FALSE; - - pFrmCtrl->u32FrmKey += pFrmCtrl->u32Tfps; - if (pFrmCtrl->u32FrmKey >= pFrmCtrl->u32Ffps) - { - pFrmCtrl->u32FrmKey -= pFrmCtrl->u32Ffps; - bReturn = HI_TRUE; - } - - return bReturn; -} - - -__inline static HI_U32 GetLowAddr(HI_U64 u64Phyaddr) -{ - return (HI_U32)u64Phyaddr; -} - - -__inline static HI_U32 GetHighAddr(HI_U64 u64Phyaddr) -{ - return (HI_U32)(u64Phyaddr>>32); -} - - - - -#define hi_usleep(usec) \ -do { \ - usleep(usec); \ -} while (0) - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif /* __cplusplus */ - - -#endif /* __HI_MATH_H__ */ - diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_md.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_md.h deleted file mode 100644 index 93a393cb..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_md.h +++ /dev/null @@ -1,58 +0,0 @@ -/****************************************************************************** - - Copyright (C), 2001-2015, Hisilicon Tech. Co., Ltd. - - ****************************************************************************** - File Name : hi_md.h - Version : Initial Draft - Author : Hisilicon multimedia software (IVE) group - Created : 2014/11/10 - Description : - History : - 1.Date : 2014/11/10 - Author : - Modification: Created file - 2.Date : 2015/11/24 - Author : - Modification: Modify MD_ATTR_S -******************************************************************************/ -#ifndef _HI_MD_H_ -#define _HI_MD_H_ - -#include "hi_ive.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif -#endif -/* -* Definition md algorithm mode -*/ -typedef enum hiMD_ALG_MODE_E { - MD_ALG_MODE_BG = 0x0, /* Base on background image */ - MD_ALG_MODE_REF = 0x1, /* Base on reference image */ - - MD_ALG_MODE_BUTT -} MD_ALG_MODE_E; -/* -* Definition of md attribute -*/ -typedef struct hiMD_ATTR_S { - MD_ALG_MODE_E enAlgMode; /* Md algorithm mode */ - IVE_SAD_MODE_E enSadMode; /* Sad mode */ - IVE_SAD_OUT_CTRL_E enSadOutCtrl; /* Sad output ctrl */ - HI_U32 u32Width; /* Image width */ - HI_U32 u32Height; /* Image height */ - HI_U16 u16SadThr; /* Sad thresh */ - IVE_CCL_CTRL_S stCclCtrl; /* Ccl ctrl */ - IVE_ADD_CTRL_S stAddCtrl; /* Add ctrl */ -} MD_ATTR_S; - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif - -#endif /* _HI_MD_H_ */ \ No newline at end of file diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_mipi.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_mipi.h deleted file mode 100644 index 76c71653..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_mipi.h +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Copyright (C) Hisilicon Technologies Co., Ltd. 2016-2019. All rights reserved. - * Description: hi_mipi.h - * Author: - * Create: 2016-10-07 - */ - -#ifndef __HI_MIPI_RX_H__ -#define __HI_MIPI_RX_H__ - -typedef unsigned int combo_dev_t; -typedef unsigned int sns_rst_source_t; -typedef unsigned int sns_clk_source_t; - - -#define MIPI_LANE_NUM 4 -#define LVDS_LANE_NUM 4 - -#define WDR_VC_NUM 2 -#define SYNC_CODE_NUM 4 - -#define MIPI_RX_MAX_DEV_NUM 1 -#define CMOS_MAX_DEV_NUM 1 - -#define SNS_MAX_CLK_SOURCE_NUM 1 -#define SNS_MAX_RST_SOURCE_NUM 1 - - -#ifdef HI_MIPI_DEBUG -#define HI_MSG(x...) \ - do { \ - osal_printk("%s->%d: ", __FUNCTION__, __LINE__); \ - osal_printk(x); \ - osal_printk("\n"); \ - } while (0) -#else -#define HI_MSG(args...) do { } while (0) -#endif - -#define HI_ERR(x...) \ - do { \ - osal_printk("%s(%d): ", __FUNCTION__, __LINE__); \ - osal_printk(x); \ - } while (0) - -#define MIPIRX_CHECK_NULL_PTR(ptr)\ - do{\ - if((ptr) == NULL)\ - {\ - HI_ERR("NULL point \r\n");\ - return HI_FAILURE;\ - }\ - } while (0) - - -typedef enum { - LANE_DIVIDE_MODE_0 = 0, - LANE_DIVIDE_MODE_BUTT -} lane_divide_mode_t; - -typedef enum { - WORK_MODE_LVDS = 0x0, - WORK_MODE_MIPI = 0x1, - WORK_MODE_CMOS = 0x2, - WORK_MODE_BT1120 = 0x3, - WORK_MODE_SLVS = 0x4, - WORK_MODE_BUTT -} work_mode_t; - -typedef enum { - INPUT_MODE_MIPI = 0x0, /* mipi */ - INPUT_MODE_SUBLVDS = 0x1, /* SUB_LVDS */ - INPUT_MODE_LVDS = 0x2, /* LVDS */ - INPUT_MODE_HISPI = 0x3, /* HISPI */ - INPUT_MODE_CMOS = 0x4, /* CMOS */ - INPUT_MODE_BT601 = 0x5, /* BT601 */ - INPUT_MODE_BT656 = 0x6, /* BT656 */ - INPUT_MODE_BT1120 = 0x7, /* BT1120 */ - INPUT_MODE_BYPASS = 0x8, /* MIPI Bypass */ - INPUT_MODE_BUTT -} input_mode_t; - -typedef enum { - MIPI_DATA_RATE_X1 = 0, /* output 1 pixel per clock */ - MIPI_DATA_RATE_X2 = 1, /* output 2 pixel per clock */ - - MIPI_DATA_RATE_BUTT -} mipi_data_rate_t; - -typedef struct { - int x; - int y; - unsigned int width; - unsigned int height; -} img_rect_t; - -typedef struct { - unsigned int width; - unsigned int height; -} img_size_t; - -typedef enum { - DATA_TYPE_RAW_8BIT = 0, - DATA_TYPE_RAW_10BIT, - DATA_TYPE_RAW_12BIT, - DATA_TYPE_RAW_14BIT, - DATA_TYPE_RAW_16BIT, - DATA_TYPE_YUV420_8BIT_NORMAL, - DATA_TYPE_YUV420_8BIT_LEGACY, - DATA_TYPE_YUV422_8BIT, - DATA_TYPE_BUTT -} data_type_t; - -/* MIPI D_PHY WDR MODE defines */ -typedef enum { - HI_MIPI_WDR_MODE_NONE = 0x0, - HI_MIPI_WDR_MODE_VC = 0x1, /* Virtual Channel */ - HI_MIPI_WDR_MODE_DT = 0x2, /* Data Type */ - HI_MIPI_WDR_MODE_DOL = 0x3, /* DOL Mode */ - HI_MIPI_WDR_MODE_BUTT -} mipi_wdr_mode_t; - - - -typedef struct { - data_type_t input_data_type; /* data type: 8/10/12/14/16 bit */ - mipi_wdr_mode_t wdr_mode; /* MIPI WDR mode */ - short lane_id[MIPI_LANE_NUM]; /* lane_id: -1 - disable */ - - union { - short data_type[WDR_VC_NUM]; /* used by the HI_MIPI_WDR_MODE_DT */ - }; -} mipi_dev_attr_t; - -typedef enum { - HI_WDR_MODE_NONE = 0x0, - HI_WDR_MODE_2F = 0x1, - HI_WDR_MODE_3F = 0x2, - HI_WDR_MODE_4F = 0x3, - HI_WDR_MODE_DOL_2F = 0x4, - HI_WDR_MODE_DOL_3F = 0x5, - HI_WDR_MODE_DOL_4F = 0x6, - HI_WDR_MODE_BUTT -} wdr_mode_t; - -typedef enum { - LVDS_SYNC_MODE_SOF = 0, /* sensor SOL, EOL, SOF, EOF */ - LVDS_SYNC_MODE_SAV, /* SAV, EAV */ - LVDS_SYNC_MODE_BUTT -} lvds_sync_mode_t; - -typedef enum { - LVDS_VSYNC_NORMAL = 0x00, - LVDS_VSYNC_SHARE = 0x01, - LVDS_VSYNC_HCONNECT = 0x02, - LVDS_VSYNC_BUTT -} lvds_vsync_type_t; - -typedef struct { - lvds_vsync_type_t sync_type; - - /* hconnect vsync blanking len, valid when the sync_type is LVDS_VSYNC_HCONNECT */ - unsigned short hblank1; - unsigned short hblank2; -} lvds_vsync_attr_t; - -typedef enum { - LVDS_FID_NONE = 0x00, - LVDS_FID_IN_SAV = 0x01, /* frame identification id in SAV 4th */ - LVDS_FID_IN_DATA = 0x02, /* frame identification id in first data */ - LVDS_FID_BUTT -} lvds_fid_type_t; - -typedef struct { - lvds_fid_type_t fid_type; - - /* Sony DOL has the Frame Information Line, in DOL H-Connection mode, - should configure this flag as false to disable output the Frame Information Line */ - unsigned char output_fil; -} lvds_fid_attr_t; - -typedef enum { - LVDS_ENDIAN_LITTLE = 0x0, - LVDS_ENDIAN_BIG = 0x1, - LVDS_ENDIAN_BUTT -} lvds_bit_endian_t; - - -typedef struct { - data_type_t input_data_type; /* data type: 8/10/12/14 bit */ - wdr_mode_t wdr_mode; /* WDR mode */ - - lvds_sync_mode_t sync_mode; /* sync mode: SOF, SAV */ - lvds_vsync_attr_t vsync_attr; /* normal, share, hconnect */ - lvds_fid_attr_t fid_attr; /* frame identification code */ - - lvds_bit_endian_t data_endian; /* data endian: little/big */ - lvds_bit_endian_t sync_code_endian; /* sync code endian: little/big */ - short lane_id[LVDS_LANE_NUM]; /* lane_id: -1 - disable */ - - /* each vc has 4 params, sync_code[i]: - sync_mode is SYNC_MODE_SOF: SOF, EOF, SOL, EOL - sync_mode is SYNC_MODE_SAV: invalid sav, invalid eav, valid sav, valid eav */ - unsigned short sync_code[LVDS_LANE_NUM][WDR_VC_NUM][SYNC_CODE_NUM]; -} lvds_dev_attr_t; - -typedef struct { - combo_dev_t devno; /* device number */ - input_mode_t input_mode; /* input mode: MIPI/LVDS/SUBLVDS/HISPI/DC */ - mipi_data_rate_t data_rate; - /* MIPI Rx device crop area (corresponding to the oringnal sensor input image size) */ - img_rect_t img_rect; - - union { - mipi_dev_attr_t mipi_attr; - lvds_dev_attr_t lvds_attr; - }; -} combo_dev_attr_t; - -typedef enum { - PHY_CMV_GE1200MV = 0x00, - PHY_CMV_LT1200MV = 0x01, - PHY_CMV_BUTT -} phy_cmv_mode_t; - -typedef struct { - combo_dev_t devno; - phy_cmv_mode_t cmv_mode; -} phy_cmv_t; - - -#define HI_MIPI_IOC_MAGIC 'm' - -/* init data lane, input mode, data type */ -#define HI_MIPI_SET_DEV_ATTR _IOW(HI_MIPI_IOC_MAGIC, 0x01, combo_dev_attr_t) - -/* set phy common mode voltage mode */ -#define HI_MIPI_SET_PHY_CMVMODE _IOW(HI_MIPI_IOC_MAGIC, 0x04, phy_cmv_t) - -/* reset sensor */ -#define HI_MIPI_RESET_SENSOR _IOW(HI_MIPI_IOC_MAGIC, 0x05, sns_rst_source_t) - -/* unreset sensor */ -#define HI_MIPI_UNRESET_SENSOR _IOW(HI_MIPI_IOC_MAGIC, 0x06, sns_rst_source_t) - -/* reset mipi */ -#define HI_MIPI_RESET_MIPI _IOW(HI_MIPI_IOC_MAGIC, 0x07, combo_dev_t) - -/* unreset mipi */ -#define HI_MIPI_UNRESET_MIPI _IOW(HI_MIPI_IOC_MAGIC, 0x08, combo_dev_t) - -/* reset slvs */ -#define HI_MIPI_RESET_SLVS _IOW(HI_MIPI_IOC_MAGIC, 0x09, combo_dev_t) - -/* unreset slvs */ -#define HI_MIPI_UNRESET_SLVS _IOW(HI_MIPI_IOC_MAGIC, 0x0a, combo_dev_t) - -/* set mipi hs_mode */ -#define HI_MIPI_SET_HS_MODE _IOW(HI_MIPI_IOC_MAGIC, 0x0b, lane_divide_mode_t) - -/* enable mipi clock */ -#define HI_MIPI_ENABLE_MIPI_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0c, combo_dev_t) - -/* disable mipi clock */ -#define HI_MIPI_DISABLE_MIPI_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0d, combo_dev_t) - -/* enable slvs clock */ -#define HI_MIPI_ENABLE_SLVS_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0e, combo_dev_t) - -/* disable slvs clock */ -#define HI_MIPI_DISABLE_SLVS_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0f, combo_dev_t) - -/* enable sensor clock */ -#define HI_MIPI_ENABLE_SENSOR_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x10, sns_clk_source_t) - -/* disable sensor clock */ -#define HI_MIPI_DISABLE_SENSOR_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x11, sns_clk_source_t) - -#endif /* __HI_MIPI_RX_H__ */ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_resampler_api.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_resampler_api.h deleted file mode 100644 index 0ad2bfa1..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_resampler_api.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef _HI_RESAMPLER_API_H_ -#define _HI_RESAMPLER_API_H_ - -#include "hi_type.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAXFRAMESIZE 2048 - -#ifndef HI_ERR_RESAMPLE_PREFIX - #define HI_ERR_RESAMPLE_PREFIX 0x80000000 -#endif - -/* input handle is invalid */ -#define HI_ERR_RESAMPLE_HANDLE (HI_ERR_RESAMPLE_PREFIX | 0x0001) - -/* pcm circ buffer state is invalid */ -#define HI_ERR_RESAMPLE_PCMBUF (HI_ERR_RESAMPLE_PREFIX | 0x0002) - -/* input sample number is more than MAXFRAMESIZE or input buffer size - , or input sample number is not invalid (eg. even)*/ -#define HI_ERR_RESAMPLE_SAMPLE_NUMBER (HI_ERR_RESAMPLE_PREFIX | 0x0003) - -/* output pcm buffer space is not enough */ -#define HI_ERR_RESAMPLE_OUTPCM_SPACE (HI_ERR_RESAMPLE_PREFIX | 0x0004) - -/* the channels of input pcm is invalid */ -#define HI_ERR_PCM_CHANNEL (HI_ERR_RESAMPLE_PREFIX | 0x0005) - -/* the bit width of input pcm is invalid */ -#define HI_ERR_PCM_FORMAT (HI_ERR_RESAMPLE_PREFIX | 0x0006) - -/* invalid bypass flag */ -#define HI_ERR_INVALID_BYPASSFLAG (HI_ERR_RESAMPLE_PREFIX | 0x0007) - -/* error unknown */ -#define HI_ERR_UNKNOWN (HI_ERR_RESAMPLE_PREFIX | 0x0008) - -/* input Empty pointer*/ -#define HI_ERR_INPUT_EMPTY_POINTER (HI_ERR_RESAMPLE_PREFIX | 0x0009) - -/************************************************************************************** - * Function: HI_Resampler_Create - * - * Description: allocate memory for platform-specific data - * clear all the user-accessible fields - * - * Inputs: inrate: 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 - * outrate: 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 - * chans: 1 or 2 - * Outputs: none - * - * Return: handle to Resampler instance, 0 if malloc fails - **************************************************************************************/ -HI_VOID* HI_Resampler_Create(HI_S32 s32Inrate, HI_S32 s32Outrate, HI_S32 s32Chans); - - -/************************************************************************************** - * Function: HI_Resampler_Process - * - * Description: Resample pcm data to specific samplerate, only for interlaced format - * - * Inputs: inst: valid Resampler instance pointer (HResampler) - * inbuf: pointer to inputbuf - * insamps: input number of sample pointers - * Outputs: outbuf: pointer to outputbuf - * - * Return: output sample number per-channel - * Notes: sure insamps < MAXFRAMESIZE - - - **************************************************************************************/ -HI_S32 HI_Resampler_Process(HI_VOID* inst, HI_S16* s16Inbuf, HI_S32 s32Insamps, HI_S16* s16Outbuf); - - -/************************************************************************************** - * Function: HI_Resampler_Destroy - * - * Description: free platform-specific data allocated by ResamplerCreate - * - * Inputs: valid Resampler instance pointer (HResampler) - * Outputs: none - * - * Return: none - **************************************************************************************/ -HI_VOID HI_Resampler_Destroy(HI_VOID* inst); - - -/******************************************************************************* - * Function: HI_Resampler_GetMaxOutputNum - * - * Description: Caculate max output number at specific input number - * - * Inputs: inst: valid Resampler instance pointer (HI_HANDLE) - * insamps: input data number per-channel, insamps must be even - * Outputs: none - * Return: >=0: Success, return the max output number per-channel - * other: Fail, return error code - * Notes: - * 1 if stereo(chans==2), sure insamps%2 == 0 - ******************************************************************************/ -HI_S32 HI_Resampler_GetMaxOutputNum(HI_VOID* inst, HI_S32 s32Insamps); - - -#ifdef __cplusplus -} -#endif - - - -#endif diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_securec.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_securec.h deleted file mode 100644 index 1977c161..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_securec.h +++ /dev/null @@ -1,327 +0,0 @@ -/******************************************************************************* -* Copyright @ Huawei Technologies Co., Ltd. 1998-2014. All rights reserved. -* File name: securec.h -* Decription: -* the user of this secure c library should include this header file -* in you source code. This header file declare all supported API -* prototype of the library, such as memcpy_s, strcpy_s, wcscpy_s, -* strcat_s, strncat_s, sprintf_s, scanf_s, and so on. -* History: -* 1. Date: -* Author: -* Modification: -******************************************************************************** -*/ - -#ifndef __HI_SECUREC_H__5D13A042_DC3F_4ED9_A8D1_882811274C27 -#define __HI_SECUREC_H__5D13A042_DC3F_4ED9_A8D1_882811274C27 - -/* If you need high performance, enable the WITH_PERFORMANCE_ADDONS macro! */ -//#define WITH_PERFORMANCE_ADDONS - -#include "securectype.h" /*lint !e537*/ -#include "securec.h" - -#include - -/*if you need export the function of this library in Win32 dll, use __declspec(dllexport) */ - -#ifdef __cplusplus -extern "C" -{ -#endif - - /** - * @Description:The wmemcpy_s function copies n successive wide characters from the object pointed to by src into the object pointed to by dest. - * @param dest - destination address - * @param destMax -The maximum length of destination buffer - * @param src -source address - * @param count -copies count wide characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_wmemcpy(wchar_t* dest, size_t destMax, const wchar_t* src, size_t count) - { - return wmemcpy_s(dest, destMax, src, count); - } - - /** - * @Description:The memmove_s function copies n characters from the object pointed to by src into the object pointed to by dest. - * @param dest - destination address - * @param destMax -The maximum length of destination buffer - * @param src -source address - * @param count -copies count wide characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_memmove(void* dest, size_t destMax, const void* src, size_t count) - { - return memmove_s(dest, destMax, src, count); - } - - /** - * @Description:The wmemmove_s function copies n successive wide characters from the object pointed to by src into the object pointed to by dest. - * @param dest - destination address - * @param destMax -The maximum length of destination buffer - * @param src -source address - * @param count -copies count wide characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_wmemmove(wchar_t* dest, size_t destMax, const wchar_t* src, size_t count) - { - return wmemmove_s(dest, destMax, src, count); - } - - /** - * @Description:The wcscpy_s function copies the wide string pointed to by strSrc (including theterminating null wide character) into the array pointed to by strDest - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer - * @param strSrc -source address - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_wcscpy(wchar_t* strDest, size_t destMax, const wchar_t* strSrc) - { - return wcscpy_s(strDest, destMax, strSrc); - } - - /** - * @Description:The wcsncpy_s function copies not more than n successive wide characters (not including the terminating null wide character) - * from the array pointed to by strSrc to the array pointed to by strDest - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer(including the terminating wide character) - * @param strSrc -source address - * @param count -copies count wide characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_wcsncpy(wchar_t* strDest, size_t destMax, const wchar_t* strSrc, size_t count) - { - return wcsncpy_s(strDest, destMax, strSrc, count); - } - - /** - * @Description:The wcscat_s function appends a copy of the wide string pointed to by strSrc (including the terminating null wide character) - * to the end of the wide string pointed to by strDest - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer(including the terminating wide character) - * @param strSrc -source address - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_wcscat(wchar_t* strDest, size_t destMax, const wchar_t* strSrc) - { - return wcscat_s(strDest, destMax, strSrc); - } - - /** - * @Description:The wcsncat_s function appends not more than n successive wide characters (not including the terminating null wide character) - * from the array pointed to by strSrc to the end of the wide string pointed to by strDest. - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer(including the terminating wide character) - * @param strSrc -source address - * @param count -copies count wide characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_wcsncat(wchar_t* strDest, size_t destMax, const wchar_t* strSrc, size_t count) - { - return wcsncat_s(strDest, destMax, strSrc, count); - } - - /** - * @Description: The strtok_s function parses a string into a sequence of tokens,On the first call to strtok_s the string to be parsed should be specified in strToken. - * In each subsequent call that should parse the same string, strToken should be NULL - * @param strToken - the string to be delimited - * @param strDelimit -specifies a set of characters that delimit the tokens in the parsed string - * @param context -is a pointer to a char * variable that is used internally by strtok_s function - * @return:returns a pointer to the first character of a token, or a null pointer if there is no token or there is a runtime-constraint violation. - */ - static inline char* hi_strtok(char* strToken, const char* strDelimit, char** context) - { - return strtok_s(strToken, strDelimit, context); - } - - /** - * @Description: The wcstok_s function is the wide-character equivalent of the strtok_s function - * @param strToken - the string to be delimited - * @param strDelimit -specifies a set of characters that delimit the tokens in the parsed string - * @param context -is a pointer to a char * variable that is used internally by strtok_s function - * @return:returns a pointer to the first character of a token, or a null pointer if there is no token or there is a runtime-constraint violation. - */ - #define hi_wcstok(strToken, strDelimit, context) \ - wcstok_s(strToken, strDelimit, context) - - /** - * @Description: The sprintf_s function is equivalent to the sprintf function except for the parameter destMax and the explicit runtime-constraints violation - * @param strDest - produce output according to a format ,write to the character string strDest - * @param destMax - The maximum length of destination buffer(including the terminating null byte ('\0')) - * @param format - fromat string - * @return:success the number of characters printed(not including the terminating null byte ('\0')), If an error occurred return -1. - */ - #define hi_sprintf(strDest, destMax, format, ...) \ - sprintf_s(strDest, destMax, format, ##__VA_ARGS__) - - /** - * @Description: The swprintf_s function is the wide-character equivalent of the sprintf_s function - * @param strDest - produce output according to a format ,write to the character string strDest - * @param destMax - The maximum length of destination buffer(including the terminating null ) - * @param format - fromat string - * @return:success the number of characters printed(not including the terminating null wide characte), If an error occurred return -1. - */ - #define hi_swprintf(strDest, destMax, format, ...) \ - swprintf_s(strDest, destMax, format, ##__VA_ARGS__) - - - /** - * @Description: The snprintf_s function is equivalent to the snprintf function except for the parameter destMax/count and the explicit runtime-constraints violation - * @param strDest - produce output according to a format ,write to the character string strDest - * @param destMax - The maximum length of destination buffer(including the terminating null byte ('\0')) - * @param count - do not write more than count bytes to strDest(not including the terminating null byte ('\0')) - * @param format - fromat string - * @param argptr - instead of a variable number of arguments - * @return:return the number of characters printed(not including the terminating null byte ('\0')), If an error occurred return -1. - */ - #define hi_snprintf(strDest, destMax, count, format, ...) \ - snprintf_s(strDest, destMax, count, format, ##__VA_ARGS__) - - /** - * @Description: The scanf_s function is equivalent to fscanf_s with the argument stdin interposed before the arguments to scanf_s - * @param format - fromat string - * @return:returns the number of input items assigned, If an error occurred return -1. - */ - #define hi_scanf(format, ...) scanf_s(format, ##__VA_ARGS__) - - /** - * @Description: The wscanf_s function is the wide-character equivalent of the scanf_s function - * @param format - fromat string - * @return:returns the number of input items assigned, If an error occurred return -1. - */ - #define hi_wscanf(format, ...) wscanf_s(format, ##__VA_ARGS__) - - - /** - * @Description: The fscanf_s function is equivalent to fscanf except that the c, s, and [ conversion specifiers apply to a pair of arguments (unless assignment suppression is indicated by a*) - * @param stream - stdio file stream - * @param format - fromat string - * @return:returns the number of input items assigned, If an error occurred return -1. - */ - #define hi_fscanf(stream, format, ...) fscanf_s(stream, format, ##__VA_ARGS__) - - /** - * @Description: The fwscanf_s function is the wide-character equivalent of the fscanf_s function - * @param stream - stdio file stream - * @param format - fromat string - * @return:returns the number of input items assigned, If an error occurred return -1. - */ - #define hi_fwscanf(stream, format, ...) fwscanf_s(stream, format, ##__VA_ARGS__) - - /** - * @Description: The sscanf_s function is equivalent to fscanf_s, except that input is obtained from a string (specified by the argument buffer) rather than from a stream - * @param buffer - read character from buffer - * @param format - fromat string - * @return:returns the number of input items assigned, If an error occurred return -1. - */ - #define hi_sscanf(buffer, format, ...) sscanf_s(buffer, format, ##__VA_ARGS__) - - /** - * @Description: The swscanf_s function is the wide-character equivalent of the sscanf_s function - * @param buffer - read character from buffer - * @param format - fromat string - * @return:returns the number of input items assigned, If an error occurred return -1. - */ - #define hi_swscanf(buffer, format, ...) swscanf_s(buffer, format, ##__VA_ARGS__) - - /** - * @Description:The gets_s function reads at most one less than the number of characters specified by destMax from the stream pointed to by stdin, into the array pointed to by buffer - * @param buffer - destination address - * @param destMax -The maximum length of destination buffer(including the terminating null character) - * @return EOK if there was no runtime-constraint violation - */ - static inline char* hi_gets(char* buffer, size_t destMax) - { - return gets_s(buffer, destMax); - } - - /** - * @Description:The memset_s function copies the value of c (converted to an unsigned char) into each of the first count characters of the object pointed to by dest. - * @param dest - destination address - * @param destMax -The maximum length of destination buffer - * @param c - the value to be copied - * @param count -copies fisrt count characters of dest - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_memset(void* dest, size_t destMax, int c, size_t count) - { - return memset_s(dest, destMax, c, count); - } - - /** - * @Description:The memcpy_s function copies n characters from the object pointed to by src into the object pointed to by dest. - * @param dest - destination address - * @param destMax -The maximum length of destination buffer - * @param src -source address - * @param count -copies count characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_memcpy(void* dest, size_t destMax, const void* src, size_t count) - { - return memcpy_s(dest, destMax, src, count); - } - - /** - * @Description:The strcpy_s function copies the string pointed to by strSrc (including the terminating null character) into the array pointed to by strDest - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer(including the terminating null character) - * @param strSrc -source address - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_strcpy(char* strDest, size_t destMax, const char* strSrc) - { - return strcpy_s(strDest, destMax, strSrc); - } - - /** - * @Description:The strncpy_s function copies not more than n successive characters (not including the terminating null character) - * from the array pointed to by strSrc to the array pointed to by strDest - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer(including the terminating null character) - * @param strSrc -source address - * @param count -copies count characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_strncpy(char* strDest, size_t destMax, const char* strSrc, size_t count) - { - return strncpy_s(strDest, destMax, strSrc, count); - } - - /** - * @Description:The strcat_s function appends a copy of the string pointed to by strSrc (including the terminating null character) - * to the end of the string pointed to by strDest - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer(including the terminating null wide character) - * @param strSrc -source address - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_strcat(char* strDest, size_t destMax, const char* strSrc) - { - return strcat_s(strDest, destMax, strSrc); - } - - - /** - * @Description:The strncat_s function appends not more than n successive characters (not including the terminating null character) - * from the array pointed to by strSrc to the end of the string pointed to by strDest. - * @param strDest - destination address - * @param destMax -The maximum length of destination buffer(including the terminating null character) - * @param strSrc -source address - * @param count -copies count characters from the src - * @return EOK if there was no runtime-constraint violation - */ - static inline int hi_strncat(char* strDest, size_t destMax, const char* strSrc, size_t count) - { - return strncat_s(strDest, destMax, strSrc, count); - } - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif/* __HI_SECUREC_H__5D13A042_DC3F_4ED9_A8D1_882811274C27 */ - - diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_sns_ctrl.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_sns_ctrl.h deleted file mode 100644 index 83193872..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_sns_ctrl.h +++ /dev/null @@ -1,135 +0,0 @@ -/****************************************************************************** - - Copyright (C), 2016, Hisilicon Tech. Co., Ltd. - - ****************************************************************************** - File Name : hi_sns_ctrl.h - Version : Initial Draft - Author : Hisilicon multimedia software group - Created : 2011/01/10 - Description : - History : - 1.Date : 2011/01/10 - Author : - Modification: Created file - -******************************************************************************/ - -#ifndef __HI_SNS_CTRL_H__ -#define __HI_SNS_CTRL_H__ - -#include "hi_type.h" -#include "hi_comm_3a.h" - -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif -#endif /* End of #ifdef __cplusplus */ - - -typedef struct hiISP_SNS_STATE_S { - HI_BOOL bInit; /* HI_TRUE: Sensor init */ - HI_BOOL bSyncInit; /* HI_TRUE: Sync Reg init */ - HI_U8 u8ImgMode; - HI_U8 u8Hdr; /* HI_TRUE: HDR enbale */ - WDR_MODE_E enWDRMode; - - ISP_SNS_REGS_INFO_S astRegsInfo[2]; /* [0]: Sensor reg info of cur-frame; [1]: Sensor reg info of pre-frame ; */ - - HI_U32 au32FL[2]; /* [0]: FullLines of cur-frame; [1]: Pre FullLines of pre-frame */ - HI_U32 u32FLStd; /* FullLines std */ - HI_U32 au32WDRIntTime[4]; -} ISP_SNS_STATE_S; - -typedef enum hiISP_SNS_MIRRORFLIP_TYPE_E { - ISP_SNS_NORMAL = 0, - ISP_SNS_MIRROR = 1, - ISP_SNS_FLIP = 2, - ISP_SNS_MIRROR_FLIP = 3, - ISP_SNS_BUTT -} ISP_SNS_MIRRORFLIP_TYPE_E; - -typedef struct hiISP_SNS_OBJ_S { - HI_S32 (*pfnRegisterCallback)(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, ALG_LIB_S *pstAwbLib); - HI_S32 (*pfnUnRegisterCallback)(VI_PIPE ViPipe, ALG_LIB_S *pstAeLib, ALG_LIB_S *pstAwbLib); - HI_S32 (*pfnSetBusInfo)(VI_PIPE ViPipe, ISP_SNS_COMMBUS_U unSNSBusInfo); - HI_VOID (*pfnStandby)(VI_PIPE ViPipe); - HI_VOID (*pfnRestart)(VI_PIPE ViPipe); - HI_VOID (*pfnMirrorFlip)(VI_PIPE ViPipe, ISP_SNS_MIRRORFLIP_TYPE_E eSnsMirrorFlip); - HI_S32 (*pfnWriteReg)(VI_PIPE ViPipe, HI_S32 s32Addr, HI_S32 s32Data); - HI_S32 (*pfnReadReg)(VI_PIPE ViPipe, HI_S32 s32Addr); - HI_S32 (*pfnSetInit)(VI_PIPE ViPipe, ISP_INIT_ATTR_S *pstInitAttr); -} ISP_SNS_OBJ_S; - -extern ISP_SNS_OBJ_S stSnsMn34220Obj; -extern ISP_SNS_OBJ_S stSnsImx377Obj; -extern ISP_SNS_OBJ_S stSnsImx299Obj; -extern ISP_SNS_OBJ_S stSnsImx477Obj; -extern ISP_SNS_OBJ_S stSnsImx299SlvsObj; -extern ISP_SNS_OBJ_S stSnsImx290Obj; -extern ISP_SNS_OBJ_S stSnsImx327Obj; -extern ISP_SNS_OBJ_S stSnsImx327_2l_Obj; -extern ISP_SNS_OBJ_S stSnsImx334Obj; -extern ISP_SNS_OBJ_S stSnsOV2718Obj; -extern ISP_SNS_OBJ_S stSnsAr0237Obj; - -extern ISP_SNS_OBJ_S stSnsCmv50000Obj; -extern ISP_SNS_OBJ_S stSnsImx277SlvsObj; -extern ISP_SNS_OBJ_S stSnsImx117Obj; -extern ISP_SNS_OBJ_S stSnsImx290SlaveObj; -extern ISP_SNS_OBJ_S stSnsImx334SlaveObj; -extern ISP_SNS_OBJ_S stSnsImx226Obj; -extern ISP_SNS_OBJ_S stSnsImx335Obj; -extern ISP_SNS_OBJ_S stSnsImx307Obj; -extern ISP_SNS_OBJ_S stSnsImx307_2l_Obj; -extern ISP_SNS_OBJ_S stSnsImx458Obj; -extern ISP_SNS_OBJ_S stSnsSc4236Obj; -extern ISP_SNS_OBJ_S stSnsSc4210Obj; -extern ISP_SNS_OBJ_S stSnsSc2231Obj; -extern ISP_SNS_OBJ_S stSnsSc2235Obj; -extern ISP_SNS_OBJ_S stSnsSc3235Obj; -extern ISP_SNS_OBJ_S stSnsSoiF37Obj; -extern ISP_SNS_OBJ_S stSnsOs05aObj; -extern ISP_SNS_OBJ_S stSnsOS08A10Obj; -extern ISP_SNS_OBJ_S stSnsOs05a_2lObj; -extern ISP_SNS_OBJ_S stSnsGc2053Obj; -extern ISP_SNS_OBJ_S stSnsSharp8kObj; -extern ISP_SNS_OBJ_S stSnsOv12870Obj; -extern ISP_SNS_OBJ_S stSnsGc2053ForCarObj; - -#define CMOS_CHECK_POINTER(ptr)\ - do {\ - if (ptr == HI_NULL)\ - {\ - ISP_TRACE(HI_DBG_ERR, "Null Pointer!\n");\ - return HI_ERR_ISP_NULL_PTR;\ - }\ - }while(0) - -#define CMOS_CHECK_POINTER_VOID(ptr)\ - do {\ - if (ptr == HI_NULL)\ - {\ - ISP_TRACE(HI_DBG_ERR, "Null Pointer!\n");\ - return;\ - }\ - }while(0) - -#define SENSOR_FREE(ptr)\ - do{\ - if (ptr != HI_NULL)\ - {\ - free(ptr);\ - ptr = HI_NULL;\ - }\ - } while (0) - - -#ifdef __cplusplus -#if __cplusplus -} -#endif -#endif /* End of #ifdef __cplusplus */ - -#endif /* __HI_SNS_CTRL_H__ */ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_spi.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_spi.h deleted file mode 100644 index e3ba60ef..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_spi.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef __HI_SPI_H__ -#define __HI_SPI_H__ - -typedef unsigned long long __u64; -typedef unsigned int __u32; -typedef unsigned short __u16; -typedef unsigned char __u8; - -#ifdef __HuaweiLite__ -#include -#else - - -/* User space versions of kernel symbols for SPI clocking modes, - * matching - */ - -#define SPI_CPHA 0x01 -#define SPI_CPOL 0x02 - -#define SPI_MODE_0 (0|0) -#define SPI_MODE_1 (0|SPI_CPHA) -#define SPI_MODE_2 (SPI_CPOL|0) -#define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) - -#define SPI_CS_HIGH 0x04 -#define SPI_LSB_FIRST 0x08 -#define SPI_3WIRE 0x10 -#define SPI_LOOP 0x20 -#define SPI_NO_CS 0x40 -#define SPI_READY 0x80 - -/*---------------------------------------------------------------------------*/ - -/* IOCTL commands */ - -#define SPI_IOC_MAGIC 'k' - -/** - * struct spi_ioc_transfer - describes a single SPI transfer - * @tx_buf: Holds pointer to userspace buffer with transmit data, or null. - * If no data is provided, zeroes are shifted out. - * @rx_buf: Holds pointer to userspace buffer for receive data, or null. - * @len: Length of tx and rx buffers, in bytes. - * @speed_hz: Temporary override of the device's bitrate. - * @bits_per_word: Temporary override of the device's wordsize. - * @delay_usecs: If nonzero, how long to delay after the last bit transfer - * before optionally deselecting the device before the next transfer. - * @cs_change: True to deselect device before starting the next transfer. - * - * This structure is mapped directly to the kernel spi_transfer structure; - * the fields have the same meanings, except of course that the pointers - * are in a different address space (and may be of different sizes in some - * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). - * Zero-initialize the structure, including currently unused fields, to - * accommodate potential future updates. - * - * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). - * Pass it an array of related transfers, they'll execute together. - * Each transfer may be half duplex (either direction) or full duplex. - * - * struct spi_ioc_transfer mesg[4]; - * ... - * status = ioctl(fd, SPI_IOC_MESSAGE(4), mesg); - * - * So for example one transfer might send a nine bit command (right aligned - * in a 16-bit word), the next could read a block of 8-bit data before - * terminating that command by temporarily deselecting the chip; the next - * could send a different nine bit command (re-selecting the chip), and the - * last transfer might write some register values. - */ -struct spi_ioc_transfer { - __u64 tx_buf; - __u64 rx_buf; - - __u32 len; - __u32 speed_hz; - - __u16 delay_usecs; - __u8 bits_per_word; - __u8 cs_change; - __u32 pad; - - /* If the contents of 'struct spi_ioc_transfer' ever change - * incompatibly, then the ioctl number (currently 0) must change; - * ioctls with constant size fields get a bit more in the way of - * error checking than ones (like this) where that field varies. - * - * NOTE: struct layout is the same in 64bit and 32bit userspace. - */ -}; - -/* not all platforms use or _IOC_TYPECHECK() ... */ -#define SPI_MSGSIZE(N) \ - ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \ - ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0) -#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)]) - - -/* Read / Write of SPI mode (SPI_MODE_0..SPI_MODE_3) */ -#define SPI_IOC_RD_MODE _IOR(SPI_IOC_MAGIC, 1, __u8) -#define SPI_IOC_WR_MODE _IOW(SPI_IOC_MAGIC, 1, __u8) - -/* Read / Write SPI bit justification */ -#define SPI_IOC_RD_LSB_FIRST _IOR(SPI_IOC_MAGIC, 2, __u8) -#define SPI_IOC_WR_LSB_FIRST _IOW(SPI_IOC_MAGIC, 2, __u8) - -/* Read / Write SPI device word length (1..N) */ -#define SPI_IOC_RD_BITS_PER_WORD _IOR(SPI_IOC_MAGIC, 3, __u8) -#define SPI_IOC_WR_BITS_PER_WORD _IOW(SPI_IOC_MAGIC, 3, __u8) - -/* Read / Write SPI device default max speed hz */ -#define SPI_IOC_RD_MAX_SPEED_HZ _IOR(SPI_IOC_MAGIC, 4, __u32) -#define SPI_IOC_WR_MAX_SPEED_HZ _IOW(SPI_IOC_MAGIC, 4, __u32) - -#endif -#endif /* __HI_SPI_H__ */ diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ssp.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ssp.h deleted file mode 100644 index 528ce0d2..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_ssp.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * extdrv/include/hi_ssp.h for Linux . - * - * History: - * 2006-4-11 create this file - */ - -#ifndef __HI_SSP_H__ -#define __HI_SSP_H__ - -#define SSP_READ_ALT 0x1 -#define SSP_WRITE_ALT 0X3 - -typedef struct hiSPI_DATA_S -{ - unsigned int spi_no; - unsigned char dev_addr; - unsigned int dev_byte_num; - unsigned int reg_addr; - unsigned int addr_byte_num; - unsigned int data; - unsigned int data_byte_num; -}SPI_DATA_S; - - -#endif - diff --git a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_tde_api.h b/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_tde_api.h deleted file mode 100644 index 4c92c15c..00000000 --- a/general/package/hisilicon-osdrv-hi3516ev300/files/include/hi_tde_api.h +++ /dev/null @@ -1,610 +0,0 @@ -/***************************************************************************** -*Copyright (C), 2016-2018, Hisilicon Tech. Co., Ltd. -* -* FileName: hi_api_tde.h -* Description:TDE2 API define -* -* History: -* Version Date Author DefectNum Description -* -*****************************************************************************/ - -#ifndef _HI_API_TDE2_H_ -#define _HI_API_TDE2_H_ - -#ifdef __cplusplus -#if __cplusplus -extern "C" { -#endif /* __cplusplus */ -#endif /* __cplusplus */ - -#include "hi_type.h" -#include "hi_tde_type.h" - -#define HI_TDE_Open HI_TDE2_Open -#define HI_TDE_Close HI_TDE2_Close -#define HI_TDE_BeginJob HI_TDE2_BeginJob - -/****************************************************************************/ -/* TDE2 API define */ -/****************************************************************************/ - -/******************************* API Declaration *****************************/ -/** \addtogroup TDE */ - -/** -\brief Starts a two-dimensional engine 2 (TDE2) device. -\attention \n -Before using the TDE, you must call this API to ensure that a TDE device is started.\n -A TDE device can be started repeatedly by using multiple processes.\n. - - -\param N/A -\retval ::HI_SUCCESS Success. -\retval ::HI_ERR_TDE_DEV_OPEN_FAILED Starting a TDE device fails. -\see \n -N/A -*/ -HI_S32 HI_TDE2_Open(HI_VOID); - - -/** -\brief Stops a TDE2 device. -\attention \n -HI_TDE2_Open must work with HI_TDE2_Close.\n -\param N/A -\retval N/A -\see \n -N/A -*/ -HI_VOID HI_TDE2_Close(HI_VOID); - - -/** -\brief Creates a TDE task. -\attention N/A -\param N/A -\retval If the return value is greater than 0, it indicates that the TDE task handle is valid. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\see \n -N/A -*/ -TDE_HANDLE HI_TDE2_BeginJob(HI_VOID); - - -/** -\brief Submits an existing TDE task. -\attention \n -Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to obtain a valid task handle.\n -If the calling mode is set to block mode, and the API is returned due to timeout or interruption, the operation continues till it is complete even though the API called by the TDE is returned in advance.\n -The synchronization mode is not supported currently.\n -After a task is submitted, its handle becomes invalid. If the task is submitted again, the error code HI_ERR_TDE_INVALID_HANDLE is returned. \n. - -\param[in] s32Handle Handle of a TDE task. -\param[in] bSync Whether to submit a TDE task in synchronization mode. -\param[in] bBlock Block flag. -\param[in] u32TimeOut Timeout period 10 ms. -\retval ::HI_SUCCESS A task is submitted successfully in non-block mode. -\retval ::HI_ERR_TDE_INVALID_HANDLE The input task handle is invalid. -\retval ::HI_ERR_TDE_JOB_TIMEOUT A task is not completed due to timeout. -\see \n -N/A -*/ -HI_S32 HI_TDE2_EndJob(TDE_HANDLE s32Handle, HI_BOOL bSync, HI_BOOL bBlock, HI_U32 u32TimeOut); - - -/** -\brief Cancels an operation added in a TDE task. -\attention \n -Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to obtain a valid task handle.\n -A submitted task cannot be cancelled.\n -No operations can be added to cancelled tasks, because the cancelled tasks are invalid.\n -This API is called when an error occurs during TDE operation configuration.\n -\param[in] s32Handle Handle of a TDE task. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_FAILURE The specified task cannot be cancelled because it has been submitted. - -\see \n -N/A -*/ -HI_S32 HI_TDE2_CancelJob(TDE_HANDLE s32Handle); - - - -/** -\brief Waits for the completion of a specified TDE task. -\attention \n - As a block interface, this API is blocked until the specified task is complete.\n - -\param[in] s32Handle Handle of a TDE task. -\retval 0 The specified TDE task is not completed. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_QUERY_TIMEOUT The specified task is not completed due to timeout. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The operation is not supported. -\retval ::HI_ERR_TDE_INTERRUPT Blocked job was interrupted. -\see \n -N/A -*/ -HI_S32 HI_TDE2_WaitForDone(TDE_HANDLE s32Handle); - - -/** -\brief Waits for the completion of all TDE tasks. -\attention \n -As a block interface, this API is blocked until all TDE tasks are complete.\n - -\param N/A -\retval 0 The specified TDE task is not completed. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The operation is not supported. -\retval ::HI_ERR_TDE_INTERRUPT Blocked job was interrupted. -N/A -*/ -HI_S32 HI_TDE2_WaitAllDone(HI_VOID); - - -/** -\brief Resets all statuses of the TDE. -\attention \n -This API is used to reset software and hardware if a timeout error occurs due to the inconsistency of the software and hardware for standby wakeup.\n -\param N/A -\retval 0 TDE reset successfully. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\see \n -N/A -*/ -HI_S32 HI_TDE2_Reset(HI_VOID); - - -/** -\brief Adds the fast copy operation to a TDE task. -\attention \n -HI_TDE2_QuickCopy adopts the direct memory access (DMA) transfer technology; therefore, HI_TDE2_QuickCopy is superior to HI_TDE2_Bitblit in transfer. -Because the format conversion is not supported during fast copying, the formats of the source bitmap and the target bitmap must be the same.\n -In addition, scaling is not supported during fast copying. If the operating area size of the source bitmap is different from that of the target bitmap, the copy and transfer operations are performed based on the minimum width and height.\n -The specified operating area and the specified bitmap must have a public area; otherwise, an error is returned. This requirement is applicable to other operations.\n -If the pixel format of a bitmap is greater than or equal to a byte, the base address and stride of the bitmap format must be aligned based on the pixel format. If the pixel format of a bitmap is smaller than a byte, the base address and stride of the bitmap must be aligned based on byte. This requirement is applicable to other operations.\n -If the pixel format of a bitmap is smaller than a byte, the horizontal start point and width of the bitmap must be aligned based on pixel.\n -The horizontal start point and width of the YCbCr422 bitmap must be even numbers. This requirement is applicable to other operations.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstSrc Source bitmap. -\param[in] pstSrcRect Operating area of the source bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_QuickCopy(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstSrc, const TDE2_RECT_S *pstSrcRect, - const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect); - - -/** -\brief Rapidly fills in the target bitmap with a fixed value. -\attention \n -The data to be filled in must be specified based on the format of the target bitmap.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\param[in] u32FillData Data to be filled in. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_QuickFill(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect, - HI_U32 u32FillData); - - -/** -\brief Scales the source bitmap based on a specified size of the target bitmap. The source bitmap and target bitmap can be the same. -\attention \n -The maximum minification is smaller than 256, there is no limit on magnification,but the max size of the bitmap is 4095*4095\n -You can scale a bitmap that serves as both source bitmap and target bitmap. If the memories for storing the source bitmap and target bitmap overlap, the bitmaps cannot be scaled.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstSrc Source bitmap. -\param[in] pstSrcRect Operating area of the source bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_ERR_TDE_NOT_ALIGNED The start address or stride of the bitmap is not aligned based on pixel. -\retval ::HI_ERR_TDE_MINIFICATION The start address or stride of the bitmap is not aligned based on pixel. -\retval ::HI_ERR_TDE_NOT_ALIGNED The start address of the color look-up table (CLUT) is not 4-byte aligned. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The operation is not supported. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_QuickResize(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstSrc, const TDE2_RECT_S *pstSrcRect, - const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect); - - -/** -\brief Adds the anti-flicker operation to a TDE task. -\attention \n -The anti-flicker operation supports vertical filtering only.\n -The anti-flicker operation can be performed on the source bitmap and target bitmap that are stored in the same memory.\n -If the sizes of the specified input area and output area are different, scaling is performed.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstSrc Source bitmap. -\param[in] pstSrcRect Operating area of the source bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_ERR_TDE_NOT_ALIGNED The start address or stride of the bitmap is not aligned based on pixel. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The operation is not supported. -\retval ::HI_ERR_TDE_MINIFICATION The minification is too large. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_QuickDeflicker(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstSrc, const TDE2_RECT_S *pstSrcRect, - const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect); - - - -/** -\brief Adds the transfer operation (with additional functions available for the raster or macroblock bitmap) to a TDE task. -\attention \n -Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to obtain a valid task handle.\n -If the sizes of the foreground bitmap and target bitmap are different, scaling is performed based on the preset scaling area. If no scaling area is set, the clip and transfer operations are performed based on the minimum value of the public area.\n -The value of the global alpha, Alpha0, or Alpha1 ranges from 0 to 255.\n -The background bitmap and the target bitmap can be the same.\n -If only the single-source transfer operation with additional functions,you can set the structure information and the pointer of the operating area of the background or the background bitmap to null,but the pointer to the operation option type can't be null,and it doesn't support ColorKey and Blend.\n -Scaling is not supported if the mirror function is enabled.\n -If only the single-source transfer operation (for example, performing the ROP and reverse operations on the source bitmap only) is required, you can set the structure information and the pointer of the operating area of the background or the background bitmap to null.\n -Scaling is not supported if the mirror function is enabled.\n -The clip operation can be performed only when the clipping area overlaps the operating area; otherwise, an error occurs.\n -When the color extension (from CLUT to ARGB/AYCbCr) is performed for the first time, the CLUT Reload flag function must be enabled.\n -During a simple transfer operation (the operation does not contain additional functions and the pixel format of source and target bitmaps are the same), you can set the pointer to the operation option type to null. Then fast transfer is implemented.\n -The pixel format of the target bitmap cannot be the macroblock format.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstBackGround Background bitmap. -\param[in] pstBackGroundRect Operating area of the background bitmap. -\param[in] pstForeGround Foreground bitmap. -\param[in] pstForeGroundRect Operating area of the foreground bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\param[in] pstOpt Structure for setting operation parameters. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_ERR_TDE_NOT_ALIGNED The start address of the CLUT is not 4-byte aligned. -\retval ::HI_ERR_TDE_MINIFICATION The minification is too large. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The bitmap does not support this operation. -\retval ::HI_ERR_TDE_CLIP_AREA The operating area does not overlap the clipping area, and the displayed information is not updated. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_Bitblit(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstBackGround, const TDE2_RECT_S *pstBackGroundRect, - const TDE2_SURFACE_S *pstForeGround, const TDE2_RECT_S *pstForeGroundRect, const TDE2_SURFACE_S *pstDst, - const TDE2_RECT_S *pstDstRect, const TDE2_OPT_S *pstOpt); - - -/** -\brief Adds the fill and transfer operations (with additional functions available for the raster bitmap) to a TDE task. After addition, the functions of drawing a point, drawing a line, filling in a color block on the surface, and filling in a memory can be implemented. -\attention \n -Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to obtain a valid task handle.\n -When the foreground bitmap is null, the functions of this API are the same as those of HI_TDE2_QuickFil.\n -During solid drawing, the foreground bitmap supports the colorkey operation only.\n -To draw a rectangle, a vertical line, or a horizontal line by calling HI_TDE2_SolidDraw, you need to set the width and height of the filled rectangle. For example, drawing a vertical line is to draw a rectangle with the width of one pixel. - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstForeGround Foreground bitmap. -\param[in] pstForeGroundRect Operating area of the foreground bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\param[in] pstFillColor Structure of fill colors. -\param[in] pstOpt Structure of operation attributes. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_ERR_TDE_NOT_ALIGNED The start address of the CLUT is not 4-byte aligned. -\retval ::HI_ERR_TDE_MINIFICATION The minification is too large. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The bitmap does not support this operation. -\retval ::HI_ERR_TDE_CLIP_AREA The operating area does not overlap the clipping area, and the displayed information is not updated. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_SolidDraw(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstForeGround, const TDE2_RECT_S *pstForeGroundRect, - const TDE2_SURFACE_S *pstDst, - const TDE2_RECT_S *pstDstRect, const TDE2_FILLCOLOR_S *pstFillColor, - const TDE2_OPT_S *pstOpt); - - -/** -\brief Adds the transfer operation (with additional functions available for the macroblock bitmap) to a TDE task. That is, the luminance macroblock data and the chrominance macroblock data are combined into raster data. During the combination, the scaling, anti-flicker, and clip operations can be performed concurrently. -\attention \n -Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to obtain a valid task handle.\n -For the YCbCr422 macroblock, the horizontal coordination of the start point and the width of the operating area must be an even number.\n -The pixel format of the target bitmap cannot be the macroblock format.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstMB Surface of a macroblock. -\param[in] pstMbRect Operating area of a macroblock. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\param[in] pstMbOpt Operation attributes of a macroblock. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_ERR_TDE_MINIFICATION The minification is too large because its maximum value is 255. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The bitmap does not support this operation. -\retval ::HI_ERR_TDE_CLIP_AREA The operating area does not overlap the clipping area, and the displayed information is not updated. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_MbBlit(TDE_HANDLE s32Handle, const TDE2_MB_S *pstMB, const TDE2_RECT_S *pstMbRect, const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect, - const TDE2_MBOPT_S *pstMbOpt); - - -/** -\brief Adds the mask raster of operation (ROP) (available for the raster bitmap) to a TDE task. That is, the ROP operation is performed on the foreground bitmap and the background bitmap based on the mask bitmap. -\attention \n -Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to obtain a valid task handle.\n -The sizes of the operating areas of the mask bitmap, foreground bitmap, and background bitmap must be the same.\n -The mask bitmap must be in A1 format.\n -The target bitmap and foreground bitmap must be in the same color space.\n -\param[in] s32Handle Handle of a TDE task. -\param[in] pstBackGround Background bitmap. -\param[in] pstBackGroundRect Operating area of the background bitmap. -\param[in] pstForeGround Foreground bitmap. -\param[in] pstForeGroundRect Operating area of the foreground bitmap. -\param[in] pstMask Mask bitmap. -\param[in] pstMaskRect Operating area of the mask bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\param[in] enRopCode_Color ROP code of a color component. -\param[in] enRopCode_Alpha ROP code of the alpha component. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_BitmapMaskRop(TDE_HANDLE s32Handle, - const TDE2_SURFACE_S *pstBackGround, const TDE2_RECT_S *pstBackGroundRect, - const TDE2_SURFACE_S *pstForeGround, const TDE2_RECT_S *pstForeGroundRect, - const TDE2_SURFACE_S *pstMask, const TDE2_RECT_S *pstMaskRect, - const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect, - TDE2_ROP_CODE_E enRopCode_Color, TDE2_ROP_CODE_E enRopCode_Alpha); - - -/** -\brief Adds the mask blend operation (available for the raster bitmap) to a TDE task. That is, the foreground bitmap and the background bitmap are blending with the mask bitmap based on the mask bitmap. -\attention \n -Before calling this API, you must call HI_TDE2_Open to start a TDE device and call HI_TDE2_BeginJob to obtain a valid task handle.\n -The target bitmap and background bitmap must be in the same color space.\n -If the foreground bitmap contains the premultiplied data, the premultiplied mode must be selected during alpha blending; otherwise, the non-premultiplied mode is selected. -The parameter enBlendMode cannot be set to TDE2_ALUCMD_ROP.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstBackGround Background bitmap. -\param[in] pstBackGroundRect Operating area of the background bitmap. -\param[in] pstForeGround Foreground bitmap. -\param[in] pstForeGroundRect Operating area of the foreground bitmap. -\param[in] pstMask Mask bitmap. -\param[in] pstMaskRect Operating area of the mask bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating area of the target bitmap. -\param[in] u8Alpha Global alpha value during alpha blending. -\param[in] enBlendMode Alpha blending mode. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\retval ::HI_ERR_TDE_NO_MEM Adding an operation fails due to insufficient memory. -\retval ::HI_FAILURE A system error or an unknown error occurs. -\see \n -N/A -*/ -HI_S32 HI_TDE2_BitmapMaskBlend(TDE_HANDLE s32Handle, - const TDE2_SURFACE_S *pstBackGround, const TDE2_RECT_S *pstBackGroundRect, - const TDE2_SURFACE_S *pstForeGround, const TDE2_RECT_S *pstForeGroundRect, - const TDE2_SURFACE_S *pstMask, const TDE2_RECT_S *pstMaskRect, - const TDE2_SURFACE_S *pstDst, const TDE2_RECT_S *pstDstRect, - HI_U8 u8Alpha, TDE2_ALUCMD_E enBlendMode); - - -/** -\brief Adds the rotation operation to a TDE task. -\attention \n -The pixel formats of the source bitmap and target bitmap must be the same, and the format cannot be YUV, CLUT1, or CLUT4.\n -The parameters s32DstPointX and s32DstPointY are set to 0 by default. Because the two parameters are not used at present, they can be set to any values.\n - -\param[in] s32Handle Handle of a TDE task. -\param[in] pstSrc Source bitmap. -\param[in] pstSrcRect Operating area of the source bitmap. -\param[in] pstDst Target bitmap. -\param[in] s32DstPointX Horizontal coordinate of the start point of the operating area in the target bitmap. -\param[in] s32DstPointY Vertical coordinate of the start point of the operating area in the target bitmap. -\param[in] enRotateAngle Rotate angle. -\retval 0 success. -\retval ::HI_ERR_TDE_DEV_NOT_OPEN Calling this API fails because no TDE device is started. -\retval ::HI_ERR_TDE_INVALID_HANDLE The handle of a TDE task is invalid. -\retval ::HI_ERR_TDE_NULL_PTR The parameter contains a null pointer. -\retval ::HI_ERR_TDE_UNSUPPORTED_OPERATION The operation is not supported. -\retval ::HI_ERR_TDE_INVALID_PARA The parameter is invalid. -\see \n -N/A -*/ -HI_S32 HI_TDE2_Rotate(TDE_HANDLE s32Handle, const TDE2_SURFACE_S* pstSrc, const TDE2_RECT_S *pstSrcRect, const TDE2_SURFACE_S* pstDst, - const TDE2_RECT_S *pstDstRect,TDE_ROTATE_ANGLE_E enRotateAngle); - - - -/** -\brief Sets the anti-flicker level. -\attention \n -N/A -\param[in] enDeflickerLevel Anti-flicker level. -\retval 0 success. -\retval :: - -\see none -*/ -HI_S32 HI_TDE2_SetDeflickerLevel(TDE_DEFLICKER_LEVEL_E enDeflickerLevel); - - -/** -\brief Obtains the anti-flicker level. -\attention \n -N/A -\param[in] pDeflickerLevel Anti-flicker level. -\retval 0 success. -\retval :: - -\see \n -N/A -*/ -HI_S32 HI_TDE2_GetDeflickerLevel(TDE_DEFLICKER_LEVEL_E *pDeflickerLevel); - - -/** -\brief Sets the alpha judgment threshold. -\attention \n -N/A -\param[in] u8ThresholdValue Judgment threshold. -\retval 0 success. -\retval :: - -\see \n -N/A -*/ -HI_S32 HI_TDE2_SetAlphaThresholdValue(HI_U8 u8ThresholdValue); - - -/** -\brief Obtains the alpha judgment threshold. -\attention \n -N/A -\param[in] pu8ThresholdValue Judgment threshold. -\retval 0 success. -\retval :: - -\see \n -N/A -*/ -HI_S32 HI_TDE2_GetAlphaThresholdValue(HI_U8 *pu8ThresholdValue); - - -/** -\brief Enables or disables the alpha judgment. -\attention N/A -\param[in] bEnAlphaThreshold Whether to enable the alpha judgment. -\retval 0 success. -\retval :: -\see \n -N/A -*/ -HI_S32 HI_TDE2_SetAlphaThresholdState(HI_BOOL bEnAlphaThreshold); - - -/** -\brief Obtains the enable status of the alpha judgment. -\attention N/A -\param[in] p_bEnAlphaThreshold Whether to enable the alpha judgment. -\retval 0 success. -\retval :: - -\see \n -N/A -*/ -HI_S32 HI_TDE2_GetAlphaThresholdState(HI_BOOL *p_bEnAlphaThreshold); - - -/** -\brief Fills in the pattern. -\attention N/A -\param[in] s32Handle Handle of a TDE task. -\param[in] pstBackGround Background bitmap. -\param[in] pstBackGroundRect Operating rectangle of the background bitmap. -\param[in] pstForeGround Foreground bitmap. -\param[in] pstForeGroundRect Operating rectangle of the foreground bitmap. -\param[in] pstDst Target bitmap. -\param[in] pstDstRect Operating rectangle of the target bitmap. -\param[in] pstOpt Options for pattern filling. -\retval 0 success. -\retval :: - -\see \n -N/A -*/ -HI_S32 HI_TDE2_PatternFill(TDE_HANDLE s32Handle, const TDE2_SURFACE_S *pstBackGround, - const TDE2_RECT_S *pstBackGroundRect, const TDE2_SURFACE_S *pstForeGround, - const TDE2_RECT_S *pstForeGroundRect, const TDE2_SURFACE_S *pstDst, - const TDE2_RECT_S *pstDstRect, const TDE2_PATTERN_FILL_OPT_S *pstOpt); - -/** -\brief Enables or disables the regional anti-flicker function. -\attention N/A -\param[in] bRegionDeflicker Enable/disable flag. -\retval 0 success. -\retval :: - -\see \n -N/A -*/ -HI_S32 HI_TDE2_EnableRegionDeflicker(HI_BOOL bRegionDeflicker); - -/** -\brief: multi blend surface by surface list -\param[in]: composed surface list -\retval: 0 success -**/ -HI_S32 HI_TDE2_MultiBlending(TDE_HANDLE s32Handle, const TDE_SURFACE_LIST_S *pstSurfaceList); - -/** @} */ /** |<--- 8bit --->|<--- 8bit --->| - |--------------------------------------------------------------| - | HI_MOD_ID_E | mod defined data | chnID | - |--------------------------------------------------------------| - -mod defined data: private data define by each module(for example: sub-mod id), usually, set to 0. -*/ - -#define HI_HANDLE_MAKEHANDLE(mod, privatedata, chnid) (hi_handle)( (((mod)& 0xffff) << 16) | ((((privatedata)& 0xff) << 8) ) | (((chnid) & 0xff)) ) - -#define HI_HANDLE_GET_MODID(handle) (((handle) >> 16) & 0xffff) -#define HI_HANDLE_GET_PriDATA(handle) (((handle) >> 8) & 0xff) -#define HI_HANDLE_GET_CHNID(handle) (((handle)) & 0xff) - - -/** @} */ /**