├── lib ├── opencv │ ├── libopencv_core.so │ ├── libopencv_video.so │ ├── libopencv_core.so.3.4 │ ├── libopencv_imgproc.so │ ├── libopencv_video.so.3.4 │ ├── libopencv_videoio.so │ ├── libopencv_imgproc.so.3.4 │ ├── libopencv_videoio.so.3.4 │ ├── libopencv_videostab.so │ ├── libopencv_videostab.so.3.4 │ ├── libopencv_core.so.3.4.2 │ ├── libopencv_imgcodecs.so │ ├── libopencv_video.so.3.4.2 │ ├── libopencv_imgcodecs.so.3.4 │ ├── libopencv_imgproc.so.3.4.2 │ ├── libopencv_videoio.so.3.4.2 │ ├── libopencv_imgcodecs.so.3.4.2 │ └── libopencv_videostab.so.3.4.2 ├── libgomp.so.1 ├── hisi │ ├── libdnvqe.so │ ├── libive.so │ ├── libmpi.so │ ├── libnnie.so │ ├── libupvqe.so │ ├── libsecurec.so │ └── libVoiceEngine.so ├── libsdk_yolov5.so └── libstdc++.so.6 ├── data ├── car.jpg ├── test.jpg ├── cat-dog.jpeg ├── person.jpeg ├── result1.jpg ├── result2.jpg ├── result3.jpg ├── wechat.jpeg └── qq-group.jpeg ├── models └── yolov5-voc.wk ├── bin └── run.sh ├── include ├── opencv2 │ ├── flann │ │ ├── dummy.h │ │ ├── config.h │ │ ├── general.h │ │ ├── flann.hpp │ │ ├── timer.h │ │ ├── sampling.h │ │ ├── object_factory.h │ │ ├── ground_truth.h │ │ ├── params.h │ │ ├── matrix.h │ │ ├── linear_index.h │ │ └── logger.h │ ├── opencv_modules.hpp │ ├── features2d │ │ ├── hal │ │ │ └── interface.h │ │ └── features2d.hpp │ ├── core │ │ ├── ovx.hpp │ │ ├── version.hpp │ │ ├── bufferpool.hpp │ │ ├── utils │ │ │ ├── logger.defines.hpp │ │ │ ├── filesystem.hpp │ │ │ └── logger.hpp │ │ ├── opencl │ │ │ ├── runtime │ │ │ │ ├── opencl_svm_definitions.hpp │ │ │ │ ├── opencl_core_wrappers.hpp │ │ │ │ ├── opencl_gl_wrappers.hpp │ │ │ │ ├── opencl_clamdfft.hpp │ │ │ │ ├── opencl_clamdblas.hpp │ │ │ │ ├── opencl_gl.hpp │ │ │ │ ├── autogenerated │ │ │ │ │ ├── opencl_gl_wrappers.hpp │ │ │ │ │ └── opencl_gl.hpp │ │ │ │ ├── opencl_svm_20.hpp │ │ │ │ └── opencl_core.hpp │ │ │ ├── opencl_svm.hpp │ │ │ └── ocl_defs.hpp │ │ ├── core.hpp │ │ ├── ocl_genbase.hpp │ │ ├── va_intel.hpp │ │ ├── cuda │ │ │ ├── warp_reduce.hpp │ │ │ ├── funcattrib.hpp │ │ │ ├── dynamic_smem.hpp │ │ │ ├── transform.hpp │ │ │ └── common.hpp │ │ └── cuda_stream_accessor.hpp │ ├── imgproc │ │ ├── hal │ │ │ └── interface.h │ │ └── imgproc.hpp │ ├── ml │ │ ├── ml.inl.hpp │ │ └── ml.hpp │ ├── video │ │ └── video.hpp │ ├── imgcodecs │ │ ├── imgcodecs.hpp │ │ └── ios.h │ ├── video.hpp │ ├── fuzzy │ │ └── types.hpp │ └── fuzzy.hpp ├── yolov5.h └── hisi │ ├── hi_ssp.h │ ├── hi_comm_ai.h │ ├── hi_af_comm.h │ ├── hi_comm_ao.h │ ├── vdec_exp.h │ ├── vou_exp.h │ ├── hi_isp_debug.h │ ├── hi_i2c.h │ ├── hi_md.h │ ├── mpi_region.h │ ├── mpi_snap.h │ ├── hi_isp_bin.h │ ├── hi_tde_errcode.h │ ├── hi_type.h │ ├── mpi_vb.h │ ├── hi_types.h │ ├── hiir.h │ ├── watchdog.h │ ├── mpi_awb.h │ ├── hi_resampler_api.h │ ├── mpi_hdmi.h │ ├── mpi_ae.h │ ├── list.h │ ├── mpi_vdec.h │ ├── hi_comm_snap.h │ ├── hi_sns_ctrl.h │ ├── hi_comm_vb.h │ └── hi_spi.h ├── README.md └── sample_codes └── yolov5_demo ├── Makefile └── src └── main.cpp /lib/opencv/libopencv_core.so: -------------------------------------------------------------------------------- 1 | libopencv_core.so.3.4 -------------------------------------------------------------------------------- /lib/opencv/libopencv_video.so: -------------------------------------------------------------------------------- 1 | libopencv_video.so.3.4 -------------------------------------------------------------------------------- /lib/opencv/libopencv_core.so.3.4: -------------------------------------------------------------------------------- 1 | libopencv_core.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_imgproc.so: -------------------------------------------------------------------------------- 1 | libopencv_imgproc.so.3.4 -------------------------------------------------------------------------------- /lib/opencv/libopencv_video.so.3.4: -------------------------------------------------------------------------------- 1 | libopencv_video.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_videoio.so: -------------------------------------------------------------------------------- 1 | libopencv_videoio.so.3.4 -------------------------------------------------------------------------------- /lib/opencv/libopencv_imgproc.so.3.4: -------------------------------------------------------------------------------- 1 | libopencv_imgproc.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_videoio.so.3.4: -------------------------------------------------------------------------------- 1 | libopencv_videoio.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_videostab.so: -------------------------------------------------------------------------------- 1 | libopencv_videostab.so.3.4 -------------------------------------------------------------------------------- /lib/opencv/libopencv_videostab.so.3.4: -------------------------------------------------------------------------------- 1 | libopencv_videostab.so.3.4.2 -------------------------------------------------------------------------------- /data/car.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/car.jpg -------------------------------------------------------------------------------- /data/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/test.jpg -------------------------------------------------------------------------------- /data/cat-dog.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/cat-dog.jpeg -------------------------------------------------------------------------------- /data/person.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/person.jpeg -------------------------------------------------------------------------------- /data/result1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/result1.jpg -------------------------------------------------------------------------------- /data/result2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/result2.jpg -------------------------------------------------------------------------------- /data/result3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/result3.jpg -------------------------------------------------------------------------------- /data/wechat.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/wechat.jpeg -------------------------------------------------------------------------------- /lib/libgomp.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/libgomp.so.1 -------------------------------------------------------------------------------- /data/qq-group.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/data/qq-group.jpeg -------------------------------------------------------------------------------- /lib/hisi/libdnvqe.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/hisi/libdnvqe.so -------------------------------------------------------------------------------- /lib/hisi/libive.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/hisi/libive.so -------------------------------------------------------------------------------- /lib/hisi/libmpi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/hisi/libmpi.so -------------------------------------------------------------------------------- /lib/hisi/libnnie.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/hisi/libnnie.so -------------------------------------------------------------------------------- /lib/hisi/libupvqe.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/hisi/libupvqe.so -------------------------------------------------------------------------------- /lib/libsdk_yolov5.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/libsdk_yolov5.so -------------------------------------------------------------------------------- /lib/libstdc++.so.6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/libstdc++.so.6 -------------------------------------------------------------------------------- /models/yolov5-voc.wk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/models/yolov5-voc.wk -------------------------------------------------------------------------------- /lib/hisi/libsecurec.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/hisi/libsecurec.so -------------------------------------------------------------------------------- /lib/hisi/libVoiceEngine.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/hisi/libVoiceEngine.so -------------------------------------------------------------------------------- /lib/opencv/libopencv_core.so.3.4.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_core.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_imgcodecs.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_imgcodecs.so -------------------------------------------------------------------------------- /lib/opencv/libopencv_video.so.3.4.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_video.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_imgcodecs.so.3.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_imgcodecs.so.3.4 -------------------------------------------------------------------------------- /lib/opencv/libopencv_imgproc.so.3.4.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_imgproc.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_videoio.so.3.4.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_videoio.so.3.4.2 -------------------------------------------------------------------------------- /bin/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export LD_LIBRARY_PATH=../lib:../lib/hisi:../lib/opencv:$LD_LIBRARY_PATH 4 | 5 | ./yolov5_demo $1 6 | 7 | -------------------------------------------------------------------------------- /lib/opencv/libopencv_imgcodecs.so.3.4.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_imgcodecs.so.3.4.2 -------------------------------------------------------------------------------- /lib/opencv/libopencv_videostab.so.3.4.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tevcam2020/yolov5-nnie/HEAD/lib/opencv/libopencv_videostab.so.3.4.2 -------------------------------------------------------------------------------- /include/opencv2/flann/dummy.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OPENCV_FLANN_DUMMY_H_ 3 | #define OPENCV_FLANN_DUMMY_H_ 4 | 5 | namespace cvflann 6 | { 7 | 8 | CV_DEPRECATED inline void dummyfunc() {} 9 | 10 | } 11 | 12 | 13 | #endif /* OPENCV_FLANN_DUMMY_H_ */ 14 | -------------------------------------------------------------------------------- /include/yolov5.h: -------------------------------------------------------------------------------- 1 | #ifndef __YOLOV5_H 2 | #define __YOLOV5_H 3 | 4 | #include 5 | #include 6 | //#include "nnie_sdk.h" 7 | #include 8 | 9 | struct BoxInfo 10 | { 11 | int label; 12 | float score; 13 | cv::Rect2f box; 14 | }; 15 | 16 | class YOLOV5 17 | { 18 | public: 19 | int init(char* model_path); 20 | int detect(cv::Mat &image, std::vector &bboxs, float threshold=0.5); 21 | int destroy(); 22 | }; 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/hisi/hi_ssp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * extdrv/include/hi_ssp.h for Linux . 3 | * 4 | * History: 5 | * 2006-4-11 create this file 6 | */ 7 | 8 | #ifndef __HI_SSP_H__ 9 | #define __HI_SSP_H__ 10 | 11 | #define SSP_READ_ALT 0x1 12 | #define SSP_WRITE_ALT 0X3 13 | 14 | typedef struct hiSPI_DATA_S 15 | { 16 | unsigned int spi_no; 17 | unsigned char dev_addr; 18 | unsigned int dev_byte_num; 19 | unsigned int reg_addr; 20 | unsigned int addr_byte_num; 21 | unsigned int data; 22 | unsigned int data_byte_num; 23 | }SPI_DATA_S; 24 | 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## centerface on nnie 2 | 3 | 训练代码参考yolov5,此代码所用模型进行了重新训练,代码使用C++ opencv方式编写,简洁易用。 4 | 5 | #### 性能 6 | 7 | Hi3516cv500: 8 | 9 | | -- | -- | 10 | | --------- | ---- | 11 | | 416 * 416 | 40ms | 12 | 13 | VOC2007 Test: 14 | 15 | | -- | -- | 16 | | ------ | ---- | 17 | | MAP@0.5 | 84 | 18 | 19 | #### 结果演示: 20 | 21 | ![image](./data/result1.jpg) 22 | 23 | ![image](./data/result2.jpg) 24 | 25 | ![image](./data/result3.jpg) 26 | 27 | 28 | ##### QQ Group:1164802745 29 | 30 | 31 | ![image](./data/qq-group.jpeg) 32 | 33 | 34 | ##### Wechat: xzmh321 35 | 36 | 37 | ![image](./data/wechat.jpeg) 38 | 39 | 40 | 商务合作联系:perry@tevcam.com, pugss@tevcam.com 41 | 42 | -------------------------------------------------------------------------------- /include/opencv2/opencv_modules.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ** File generated automatically, do not modify ** 3 | * 4 | * This file defines the list of modules available in current build configuration 5 | * 6 | * 7 | */ 8 | 9 | // This definition means that OpenCV is built with enabled non-free code. 10 | // For example, patented algorithms for non-profit/non-commercial use only. 11 | /* #undef OPENCV_ENABLE_NONFREE */ 12 | 13 | #define HAVE_OPENCV_CORE 14 | #define HAVE_OPENCV_FEATURES2D 15 | #define HAVE_OPENCV_FLANN 16 | #define HAVE_OPENCV_FUZZY 17 | #define HAVE_OPENCV_IMGCODECS 18 | #define HAVE_OPENCV_IMGPROC 19 | #define HAVE_OPENCV_LINE_DESCRIPTOR 20 | #define HAVE_OPENCV_ML 21 | #define HAVE_OPENCV_VIDEO 22 | 23 | 24 | -------------------------------------------------------------------------------- /include/opencv2/features2d/hal/interface.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENCV_FEATURE2D_HAL_INTERFACE_H 2 | #define OPENCV_FEATURE2D_HAL_INTERFACE_H 3 | 4 | #include "opencv2/core/cvdef.h" 5 | //! @addtogroup featrure2d_hal_interface 6 | //! @{ 7 | 8 | //! @name Fast feature detector types 9 | //! @sa cv::FastFeatureDetector 10 | //! @{ 11 | #define CV_HAL_TYPE_5_8 0 12 | #define CV_HAL_TYPE_7_12 1 13 | #define CV_HAL_TYPE_9_16 2 14 | //! @} 15 | 16 | //! @name Key point 17 | //! @sa cv::KeyPoint 18 | //! @{ 19 | struct CV_EXPORTS cvhalKeyPoint 20 | { 21 | float x; 22 | float y; 23 | float size; 24 | float angle; 25 | float response; 26 | int octave; 27 | int class_id; 28 | }; 29 | //! @} 30 | 31 | //! @} 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /sample_codes/yolov5_demo/Makefile: -------------------------------------------------------------------------------- 1 | PROJECT_HOME = ../.. 2 | OPENCV_PATH=${PROJECT_HOME}/lib/opencv 3 | CUXX = arm-himix200-linux-gcc 4 | 5 | BIN = ${PROJECT_HOME}/bin/yolov5_demo 6 | 7 | SRCS = ./src/main.cpp 8 | 9 | OBJS = $(SRCS:.cpp=.o) 10 | 11 | CFLAGS = -std=c++11 -O3 -I${PROJECT_HOME}/include -I${PROJECT_HOME}/include/hisi 12 | 13 | LIBFLAGS = -lpthread -lm -ldl -lstdc++ -L${PROJECT_HOME}/lib -lsdk_yolov5 -L${PROJECT_HOME}/lib/hisi -lnnie -live -lmpi -lVoiceEngine -ldnvqe -lsecurec -lupvqe -L${OPENCV_PATH} -lopencv_core -lopencv_imgcodecs -lopencv_imgproc 14 | 15 | all: $(BIN) 16 | 17 | $(OBJS): 18 | 19 | %.o: %.cpp 20 | $(CUXX) -c $(CFLAGS) $< -o $@ 21 | 22 | $(BIN): $(OBJS) 23 | $(CUXX) $^ $(LIBFLAGS) -o $@ 24 | 25 | clean: 26 | rm -f $(BIN) ./src/*.o 27 | 28 | -------------------------------------------------------------------------------- /sample_codes/yolov5_demo/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "yolov5.h" 5 | 6 | int main(int argc, char *argv[]) 7 | { 8 | if(argc != 2) 9 | { 10 | std::cout << "Usage: " << argv[0] << " !\n"; 11 | return -1; 12 | } 13 | 14 | YOLOV5 yolov5; 15 | std::string model_path = "../models/yolov5-voc.wk"; 16 | int ret = yolov5.init((char*)model_path.c_str()); 17 | 18 | cv::Mat image = cv::imread(argv[1]); 19 | if(image.empty()) 20 | { 21 | std::cout << "input image is empty!!!\n"; 22 | return -1; 23 | } 24 | 25 | std::vector bboxs; 26 | ret = yolov5.detect(image, bboxs); 27 | for(int i = 0; i < bboxs.size(); i++){ 28 | cv::rectangle(image, bboxs[i].box, cv::Scalar(0, 255, 0), 2, 8, 0); 29 | } 30 | cv::imwrite("result.jpg", image); 31 | yolov5.destroy(); 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /include/opencv2/core/ovx.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | // Copyright (C) 2016, Intel Corporation, all rights reserved. 6 | // Third party copyrights are property of their respective owners. 7 | 8 | // OpenVX related definitions and declarations 9 | 10 | #pragma once 11 | #ifndef OPENCV_OVX_HPP 12 | #define OPENCV_OVX_HPP 13 | 14 | #include "cvdef.h" 15 | 16 | namespace cv 17 | { 18 | /// Check if use of OpenVX is possible 19 | CV_EXPORTS_W bool haveOpenVX(); 20 | 21 | /// Check if use of OpenVX is enabled 22 | CV_EXPORTS_W bool useOpenVX(); 23 | 24 | /// Enable/disable use of OpenVX 25 | CV_EXPORTS_W void setUseOpenVX(bool flag); 26 | } // namespace cv 27 | 28 | #endif // OPENCV_OVX_HPP 29 | -------------------------------------------------------------------------------- /include/opencv2/core/version.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_VERSION_HPP 6 | #define OPENCV_VERSION_HPP 7 | 8 | #define CV_VERSION_MAJOR 3 9 | #define CV_VERSION_MINOR 4 10 | #define CV_VERSION_REVISION 2 11 | #define CV_VERSION_STATUS "" 12 | 13 | #define CVAUX_STR_EXP(__A) #__A 14 | #define CVAUX_STR(__A) CVAUX_STR_EXP(__A) 15 | 16 | #define CVAUX_STRW_EXP(__A) L ## #__A 17 | #define CVAUX_STRW(__A) CVAUX_STRW_EXP(__A) 18 | 19 | #define CV_VERSION CVAUX_STR(CV_VERSION_MAJOR) "." CVAUX_STR(CV_VERSION_MINOR) "." CVAUX_STR(CV_VERSION_REVISION) CV_VERSION_STATUS 20 | 21 | /* old style version constants*/ 22 | #define CV_MAJOR_VERSION CV_VERSION_MAJOR 23 | #define CV_MINOR_VERSION CV_VERSION_MINOR 24 | #define CV_SUBMINOR_VERSION CV_VERSION_REVISION 25 | 26 | #endif // OPENCV_VERSION_HPP 27 | -------------------------------------------------------------------------------- /include/hisi/hi_comm_ai.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ai.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AI_H__ 19 | #define __HI_COMM_AI_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif /* End of #ifdef __cplusplus */ 34 | 35 | #endif /* End of #ifndef __HI_COMM_AI_H__ */ 36 | 37 | -------------------------------------------------------------------------------- /include/opencv2/core/bufferpool.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | // 5 | // Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved. 6 | 7 | #ifndef OPENCV_CORE_BUFFER_POOL_HPP 8 | #define OPENCV_CORE_BUFFER_POOL_HPP 9 | 10 | #ifdef _MSC_VER 11 | #pragma warning(push) 12 | #pragma warning(disable: 4265) 13 | #endif 14 | 15 | namespace cv 16 | { 17 | 18 | //! @addtogroup core 19 | //! @{ 20 | 21 | class BufferPoolController 22 | { 23 | protected: 24 | ~BufferPoolController() { } 25 | public: 26 | virtual size_t getReservedSize() const = 0; 27 | virtual size_t getMaxReservedSize() const = 0; 28 | virtual void setMaxReservedSize(size_t size) = 0; 29 | virtual void freeAllReservedBuffers() = 0; 30 | }; 31 | 32 | //! @} 33 | 34 | } 35 | 36 | #ifdef _MSC_VER 37 | #pragma warning(pop) 38 | #endif 39 | 40 | #endif // OPENCV_CORE_BUFFER_POOL_HPP 41 | -------------------------------------------------------------------------------- /include/hisi/hi_af_comm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_af_comm.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2012/12/20 10 | Description : 11 | History : 12 | 1.Date : 2012/12/20 13 | Author : 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | #ifndef __HI_AF_COMM_H__ 18 | #define __HI_AF_COMM_H__ 19 | 20 | #include "hi_type.h" 21 | 22 | #ifdef __cplusplus 23 | #if __cplusplus 24 | extern "C" { 25 | #endif 26 | #endif /* End of #ifdef __cplusplus */ 27 | 28 | #define HI_AF_LIB_NAME "hisi_af_lib" 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif /* End of #ifdef __cplusplus */ 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/hisi/hi_comm_ao.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ao.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AO_H__ 19 | #define __HI_COMM_AO_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif /* End of #ifdef __cplusplus */ 35 | 36 | #endif /* End of #ifndef __HI_COMM_AO_H__ */ 37 | 38 | -------------------------------------------------------------------------------- /include/opencv2/core/utils/logger.defines.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_LOGGER_DEFINES_HPP 6 | #define OPENCV_LOGGER_DEFINES_HPP 7 | 8 | //! @addtogroup core_logging 9 | //! @{ 10 | 11 | // Supported logging levels and their semantic 12 | #define CV_LOG_LEVEL_SILENT 0 //!< for using in setLogLevel() call 13 | #define CV_LOG_LEVEL_FATAL 1 //!< Fatal (critical) error (unrecoverable internal error) 14 | #define CV_LOG_LEVEL_ERROR 2 //!< Error message 15 | #define CV_LOG_LEVEL_WARN 3 //!< Warning message 16 | #define CV_LOG_LEVEL_INFO 4 //!< Info message 17 | #define CV_LOG_LEVEL_DEBUG 5 //!< Debug message. Disabled in the "Release" build. 18 | #define CV_LOG_LEVEL_VERBOSE 6 //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build. 19 | 20 | //! @} 21 | 22 | #endif // OPENCV_LOGGER_DEFINES_HPP 23 | -------------------------------------------------------------------------------- /include/hisi/vdec_exp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2017, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : vdec_exp.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 2017/07/15 8 | Last Modified : 9 | Description : 10 | Function List : 11 | ******************************************************************************/ 12 | 13 | 14 | #include "hi_common.h" 15 | 16 | #ifndef __HI_VDEC_EXP_H__ 17 | #define __HI_VDEC_EXP_H__ 18 | 19 | typedef struct hiVDEC_EXPORT_CALLBACK_S 20 | { 21 | void (*pfnVdecNotify) (int module_id, int channel, int event_type, void* args); 22 | int (*pfnVdecSetscheduler_Dec) (void); 23 | } VDEC_EXPORT_CALLBACK_S; 24 | 25 | typedef HI_S32 FN_VDEC_RegisterExpCallback(VDEC_EXPORT_CALLBACK_S *pstExpCallback); 26 | 27 | typedef struct hiVDEC_EXPORT_SYMBOL_S 28 | { 29 | FN_VDEC_RegisterExpCallback *pfnVdecRegisterExpCallback; 30 | }VDEC_EXPORT_SYMBOL_S; 31 | 32 | 33 | #endif /* __HI_VOU_EXP_H__ */ 34 | 35 | -------------------------------------------------------------------------------- /include/hisi/vou_exp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : vou_ext.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2011/06/28 10 | Description : 11 | History : 12 | 1.Date : 2011/06/28 13 | Author : n00168968/z00185248/l00181524 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | 18 | #include "hi_common.h" 19 | 20 | #ifndef __HI_VOU_EXP_H__ 21 | #define __HI_VOU_EXP_H__ 22 | 23 | typedef struct hiVOU_EXPORT_CALLBACK_S 24 | { 25 | void (*pfnVoNotify) (int module_id, int vodev); 26 | } VOU_EXPORT_CALLBACK_S; 27 | 28 | typedef HI_S32 FN_VO_RegisterExternCallback(VOU_EXPORT_CALLBACK_S *pstExpCallback); 29 | 30 | typedef struct hiVOU_EXPORT_SYMBOL_S 31 | { 32 | FN_VO_RegisterExternCallback *pfnVoRegisterExpCallback; 33 | }VOU_EXPORT_SYMBOL_S; 34 | 35 | 36 | #endif /* __HI_VOU_EXP_H__ */ 37 | 38 | -------------------------------------------------------------------------------- /include/opencv2/imgproc/hal/interface.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENCV_IMGPROC_HAL_INTERFACE_H 2 | #define OPENCV_IMGPROC_HAL_INTERFACE_H 3 | 4 | //! @addtogroup imgproc_hal_interface 5 | //! @{ 6 | 7 | //! @name Interpolation modes 8 | //! @sa cv::InterpolationFlags 9 | //! @{ 10 | #define CV_HAL_INTER_NEAREST 0 11 | #define CV_HAL_INTER_LINEAR 1 12 | #define CV_HAL_INTER_CUBIC 2 13 | #define CV_HAL_INTER_AREA 3 14 | #define CV_HAL_INTER_LANCZOS4 4 15 | //! @} 16 | 17 | //! @name Morphology operations 18 | //! @sa cv::MorphTypes 19 | //! @{ 20 | #define CV_HAL_MORPH_ERODE 0 21 | #define CV_HAL_MORPH_DILATE 1 22 | //! @} 23 | 24 | //! @name Threshold types 25 | //! @sa cv::ThresholdTypes 26 | //! @{ 27 | #define CV_HAL_THRESH_BINARY 0 28 | #define CV_HAL_THRESH_BINARY_INV 1 29 | #define CV_HAL_THRESH_TRUNC 2 30 | #define CV_HAL_THRESH_TOZERO 3 31 | #define CV_HAL_THRESH_TOZERO_INV 4 32 | #define CV_HAL_THRESH_MASK 7 33 | #define CV_HAL_THRESH_OTSU 8 34 | #define CV_HAL_THRESH_TRIANGLE 16 35 | //! @} 36 | 37 | //! @name Adaptive threshold algorithm 38 | //! @sa cv::AdaptiveThresholdTypes 39 | //! @{ 40 | #define CV_HAL_ADAPTIVE_THRESH_MEAN_C 0 41 | #define CV_HAL_ADAPTIVE_THRESH_GAUSSIAN_C 1 42 | //! @} 43 | 44 | //! @} 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /include/hisi/hi_isp_debug.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_isp_debug.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2010/08/30 10 | Description : 11 | History : 12 | 1.Date : 2010/08/30 13 | Author : 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | 18 | #ifndef __HI_ISP_DEBUG_H__ 19 | #define __HI_ISP_DEBUG_H__ 20 | 21 | #include "hi_debug.h" 22 | 23 | #if 0 24 | #define PRINT_DEBUG_INFO 25 | #endif 26 | 27 | #if 0 28 | #define PRINT_INFO_2FILE 29 | #endif 30 | 31 | #define ISP_TRACE(level, fmt, ...)\ 32 | do{ \ 33 | HI_TRACE(level, HI_ID_ISP,"[Func]:%s [Line]:%d [Info]:"fmt,__FUNCTION__, __LINE__,##__VA_ARGS__);\ 34 | }while(0) 35 | 36 | /* To avoid divide-0 exception in code. */ 37 | #define DIV_0_TO_1(a) ( (0 == (a)) ? 1 : (a) ) 38 | #define DIV_0_TO_1_FLOAT(a) ((((a) < 1E-10) && ((a) > -1E-10)) ? 1 : (a)) 39 | 40 | #endif /* __HI_ISP_DEBUG_H__ */ 41 | -------------------------------------------------------------------------------- /include/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp: -------------------------------------------------------------------------------- 1 | /* See LICENSE file in the root OpenCV directory */ 2 | 3 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP 4 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP 5 | 6 | #if defined(HAVE_OPENCL_SVM) 7 | #if defined(CL_VERSION_2_0) 8 | 9 | // OpenCL 2.0 contains SVM definitions 10 | 11 | #else 12 | 13 | typedef cl_bitfield cl_device_svm_capabilities; 14 | typedef cl_bitfield cl_svm_mem_flags; 15 | typedef cl_uint cl_kernel_exec_info; 16 | 17 | // 18 | // TODO Add real values after OpenCL 2.0 release 19 | // 20 | 21 | #ifndef CL_DEVICE_SVM_CAPABILITIES 22 | #define CL_DEVICE_SVM_CAPABILITIES 0x1053 23 | 24 | #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0) 25 | #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1) 26 | #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2) 27 | #define CL_DEVICE_SVM_ATOMICS (1 << 3) 28 | #endif 29 | 30 | #ifndef CL_MEM_SVM_FINE_GRAIN_BUFFER 31 | #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) 32 | #endif 33 | 34 | #ifndef CL_MEM_SVM_ATOMICS 35 | #define CL_MEM_SVM_ATOMICS (1 << 11) 36 | #endif 37 | 38 | 39 | #endif // CL_VERSION_2_0 40 | #endif // HAVE_OPENCL_SVM 41 | 42 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP 43 | -------------------------------------------------------------------------------- /include/hisi/hi_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef _HI_I2C_H 2 | #define _HI_I2C_H 3 | 4 | 5 | 6 | /* /dev/i2c-X ioctl commands. The ioctl's parameter is always an 7 | * unsigned long, except for: 8 | * - I2C_FUNCS, takes pointer to an unsigned long 9 | * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data 10 | * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data 11 | */ 12 | #define I2C_RETRIES 0x0701 /* number of times a device address should 13 | be polled when not acknowledging */ 14 | #define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ 15 | 16 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses 17 | * are NOT supported! (due to code brokenness) 18 | */ 19 | #define I2C_SLAVE 0x0703 /* Use this slave address */ 20 | #define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it 21 | is already in use by a driver! */ 22 | #define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ 23 | 24 | #define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */ 25 | 26 | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */ 27 | 28 | #define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */ 29 | #define I2C_SMBUS 0x0720 /* SMBus transfer */ 30 | #define I2C_16BIT_REG 0x0709 /* 16BIT REG WIDTH */ 31 | #define I2C_16BIT_DATA 0x070a /* 16BIT DATA WIDTH */ 32 | 33 | typedef struct hiI2C_DATA_S 34 | { 35 | unsigned char dev_addr; 36 | unsigned int reg_addr; 37 | unsigned int addr_byte_num; 38 | unsigned int data; 39 | unsigned int data_byte_num; 40 | }I2C_DATA_S; 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /include/hisi/hi_md.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2015, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_md.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software (IVE) group 9 | Created : 2014/11/10 10 | Description : 11 | History : 12 | 1.Date : 2014/11/10 13 | Author : 14 | Modification: Created file 15 | 2.Date : 2015/11/24 16 | Author : 17 | Modification: Modify MD_ATTR_S 18 | ******************************************************************************/ 19 | #ifndef _HI_MD_H_ 20 | #define _HI_MD_H_ 21 | 22 | #include "hi_ive.h" 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus 26 | extern "C"{ 27 | #endif 28 | #endif 29 | /* 30 | * Definition md algorithm mode 31 | */ 32 | typedef enum hiMD_ALG_MODE_E 33 | { 34 | MD_ALG_MODE_BG = 0x0,/*Base on background image*/ 35 | MD_ALG_MODE_REF = 0x1,/*Base on reference image*/ 36 | 37 | MD_ALG_MODE_BUTT 38 | }MD_ALG_MODE_E; 39 | /* 40 | * Definition of md attribute 41 | */ 42 | typedef struct hiMD_ATTR_S 43 | { 44 | MD_ALG_MODE_E enAlgMode; /*Md algorithm mode*/ 45 | IVE_SAD_MODE_E enSadMode; /*Sad mode*/ 46 | IVE_SAD_OUT_CTRL_E enSadOutCtrl; /*Sad output ctrl*/ 47 | HI_U32 u32Width; /*Image width*/ 48 | HI_U32 u32Height; /*Image height*/ 49 | HI_U16 u16SadThr; /*Sad thresh*/ 50 | IVE_CCL_CTRL_S stCclCtrl; /*Ccl ctrl*/ 51 | IVE_ADD_CTRL_S stAddCtrl; /*Add ctrl*/ 52 | }MD_ATTR_S; 53 | 54 | #ifdef __cplusplus 55 | #if __cplusplus 56 | } 57 | #endif 58 | #endif 59 | 60 | #endif/*_HI_MD_H_*/ -------------------------------------------------------------------------------- /include/opencv2/flann/config.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_CONFIG_H_ 31 | #define OPENCV_FLANN_CONFIG_H_ 32 | 33 | #ifdef FLANN_VERSION_ 34 | #undef FLANN_VERSION_ 35 | #endif 36 | #define FLANN_VERSION_ "1.6.10" 37 | 38 | #endif /* OPENCV_FLANN_CONFIG_H_ */ 39 | -------------------------------------------------------------------------------- /include/opencv2/ml/ml.inl.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | 5 | #ifndef OPENCV_ML_INL_HPP 6 | #define OPENCV_ML_INL_HPP 7 | 8 | namespace cv { namespace ml { 9 | 10 | // declared in ml.hpp 11 | template 12 | int simulatedAnnealingSolver(SimulatedAnnealingSolverSystem& solverSystem, 13 | double initialTemperature, double finalTemperature, double coolingRatio, 14 | size_t iterationsPerStep, 15 | CV_OUT double* lastTemperature, 16 | cv::RNG& rngEnergy 17 | ) 18 | { 19 | CV_Assert(finalTemperature > 0); 20 | CV_Assert(initialTemperature > finalTemperature); 21 | CV_Assert(iterationsPerStep > 0); 22 | CV_Assert(coolingRatio < 1.0f); 23 | double Ti = initialTemperature; 24 | double previousEnergy = solverSystem.energy(); 25 | int exchange = 0; 26 | while (Ti > finalTemperature) 27 | { 28 | for (size_t i = 0; i < iterationsPerStep; i++) 29 | { 30 | solverSystem.changeState(); 31 | double newEnergy = solverSystem.energy(); 32 | if (newEnergy < previousEnergy) 33 | { 34 | previousEnergy = newEnergy; 35 | exchange++; 36 | } 37 | else 38 | { 39 | double r = rngEnergy.uniform(0.0, 1.0); 40 | if (r < std::exp(-(newEnergy - previousEnergy) / Ti)) 41 | { 42 | previousEnergy = newEnergy; 43 | exchange++; 44 | } 45 | else 46 | { 47 | solverSystem.reverseState(); 48 | } 49 | } 50 | } 51 | Ti *= coolingRatio; 52 | } 53 | if (lastTemperature) 54 | *lastTemperature = Ti; 55 | return exchange; 56 | } 57 | 58 | }} //namespace 59 | 60 | #endif // OPENCV_ML_INL_HPP 61 | -------------------------------------------------------------------------------- /include/hisi/mpi_region.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | Copyright (C), 2016-2011, Hisilicon Tech. Co., Ltd. 4 | ****************************************************************************** 5 | File Name : mpi_region.h 6 | Version : Initial Draft 7 | Author : Hisilicon multimedia software group 8 | Created : 2016/11/15 9 | Last Modified : 10 | Description : MPP Programe Interface for region moudle 11 | Function List : 12 | ******************************************************************************/ 13 | 14 | 15 | #ifndef __MPI_REGION_H__ 16 | #define __MPI_REGION_H__ 17 | 18 | #include "hi_comm_region.h" 19 | 20 | #ifdef __cplusplus 21 | #if __cplusplus 22 | extern "C"{ 23 | #endif 24 | #endif /* End of #ifdef __cplusplus */ 25 | 26 | HI_S32 HI_MPI_RGN_Create(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 27 | HI_S32 HI_MPI_RGN_Destroy(RGN_HANDLE Handle); 28 | 29 | HI_S32 HI_MPI_RGN_GetAttr(RGN_HANDLE Handle, RGN_ATTR_S *pstRegion); 30 | HI_S32 HI_MPI_RGN_SetAttr(RGN_HANDLE Handle, const RGN_ATTR_S *pstRegion); 31 | 32 | HI_S32 HI_MPI_RGN_SetBitMap(RGN_HANDLE Handle, const BITMAP_S *pstBitmap); 33 | 34 | HI_S32 HI_MPI_RGN_AttachToChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 35 | HI_S32 HI_MPI_RGN_DetachFromChn(RGN_HANDLE Handle, const MPP_CHN_S *pstChn); 36 | 37 | HI_S32 HI_MPI_RGN_SetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, const RGN_CHN_ATTR_S *pstChnAttr); 38 | HI_S32 HI_MPI_RGN_GetDisplayAttr(RGN_HANDLE Handle, const MPP_CHN_S *pstChn, RGN_CHN_ATTR_S *pstChnAttr); 39 | 40 | HI_S32 HI_MPI_RGN_GetCanvasInfo(RGN_HANDLE Handle, RGN_CANVAS_INFO_S *pstCanvasInfo); 41 | HI_S32 HI_MPI_RGN_UpdateCanvas(RGN_HANDLE Handle); 42 | 43 | HI_S32 HI_MPI_RGN_BatchBegin(RGN_HANDLEGROUP *pu32Group,HI_U32 u32Num,const RGN_HANDLE handle[]); 44 | HI_S32 HI_MPI_RGN_BatchEnd(RGN_HANDLEGROUP u32Group); 45 | 46 | HI_S32 HI_MPI_RGN_GetFd(HI_VOID); 47 | #ifdef __cplusplus 48 | #if __cplusplus 49 | } 50 | #endif 51 | #endif /* End of #ifdef __cplusplus */ 52 | 53 | #endif /* End of #ifndef __MPI_REGION_H__ */ 54 | 55 | -------------------------------------------------------------------------------- /include/hisi/mpi_snap.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2017, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : mpi_vi.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2017/06/16 10 | Description : 11 | History : 12 | 13 | 14 | ******************************************************************************/ 15 | #ifndef __MPI_SNAP_H__ 16 | #define __MPI_SNAP_H__ 17 | 18 | #include "hi_comm_video.h" 19 | #include "hi_comm_snap.h" 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C" 24 | { 25 | #endif 26 | #endif /* __cplusplus */ 27 | 28 | 29 | HI_S32 HI_MPI_SNAP_SetPipeAttr(VI_PIPE ViPipe, const SNAP_ATTR_S *pstSnapAttr); 30 | HI_S32 HI_MPI_SNAP_GetPipeAttr(VI_PIPE ViPipe, SNAP_ATTR_S *pstSnapAttr); 31 | HI_S32 HI_MPI_SNAP_EnablePipe(VI_PIPE ViPipe); 32 | HI_S32 HI_MPI_SNAP_DisablePipe(VI_PIPE ViPipe); 33 | HI_S32 HI_MPI_SNAP_TriggerPipe(VI_PIPE ViPipe); 34 | 35 | HI_S32 HI_MPI_SNAP_MultiTrigger(VI_STITCH_GRP StitchGrp); 36 | 37 | /* HDR */ 38 | HI_S32 HI_MPI_SNAP_SetProSharpenParam(VI_PIPE ViPipe, const ISP_PRO_SHARPEN_PARAM_S *pstIspShpParam); 39 | HI_S32 HI_MPI_SNAP_GetProSharpenParam(VI_PIPE ViPipe, ISP_PRO_SHARPEN_PARAM_S *pstIspShpParam); 40 | HI_S32 HI_MPI_SNAP_SetProBNRParam(VI_PIPE ViPipe, const ISP_PRO_BNR_PARAM_S *pstNrParma); 41 | HI_S32 HI_MPI_SNAP_GetProBNRParam(VI_PIPE ViPipe, ISP_PRO_BNR_PARAM_S *pstNrParma); 42 | 43 | 44 | HI_S32 HI_MPI_SNAP_SetBNRRawDumpAttr(VI_PIPE ViPipe, const BNR_DUMP_ATTR_S* pstBnrDumpAttr); 45 | HI_S32 HI_MPI_SNAP_GetBNRRawDumpAttr(VI_PIPE ViPipe, BNR_DUMP_ATTR_S* pstBnrDumpAttr); 46 | 47 | HI_S32 HI_MPI_SNAP_GetBNRRaw(VI_PIPE ViPipe, VIDEO_FRAME_INFO_S *pstVideoFrame, HI_S32 s32MilliSec); 48 | HI_S32 HI_MPI_SNAP_ReleaseBNRRaw(VI_PIPE ViPipe, const VIDEO_FRAME_INFO_S *pstVideoFrame); 49 | 50 | 51 | #ifdef __cplusplus 52 | #if __cplusplus 53 | } 54 | #endif 55 | #endif /* __cplusplus */ 56 | 57 | #endif /*__MPI_SNAP_H__ */ 58 | 59 | 60 | -------------------------------------------------------------------------------- /include/opencv2/flann/general.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_GENERAL_H_ 32 | #define OPENCV_FLANN_GENERAL_H_ 33 | 34 | #include "opencv2/core.hpp" 35 | 36 | namespace cvflann 37 | { 38 | 39 | class FLANNException : public cv::Exception 40 | { 41 | public: 42 | FLANNException(const char* message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 43 | 44 | FLANNException(const cv::String& message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 45 | }; 46 | 47 | } 48 | 49 | 50 | #endif /* OPENCV_FLANN_GENERAL_H_ */ 51 | -------------------------------------------------------------------------------- /include/hisi/hi_isp_bin.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_isp_bin.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2015/01/14 10 | Description : 11 | History : 12 | 1.Date : 2015/01/14 13 | Author : 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | 18 | #ifndef __HI_ISP_BIN_H__ 19 | #define __HI_ISP_BIN_H__ 20 | 21 | #include "hi_type.h" 22 | #include "hi_comm_isp.h" 23 | 24 | #ifdef __cplusplus 25 | #if __cplusplus 26 | extern "C" { 27 | #endif 28 | #endif /* End of #ifdef __cplusplus */ 29 | 30 | /**************************************************************************** 31 | * MACRO DEFINITION * 32 | ****************************************************************************/ 33 | #define MAX_BIN_REG_NUM 5 34 | 35 | /**************************************************************************** 36 | * GENERAL STRUCTURES * 37 | ****************************************************************************/ 38 | typedef struct hiISP_BIN_REG_ATTR_S 39 | { 40 | HI_U32 u32Addr; /* register addr */ 41 | HI_U8 u8StartBit; /* start bit of register addr */ 42 | HI_U8 u8EndBit; /* end bit of register addr */ 43 | } ISP_BIN_REG_ATTR_S; 44 | 45 | /*-------------------------------------------* 46 | The base addr of ISP logic register 47 | The base addr of ISP ext register 48 | The base addr of Hisi AE ext register 49 | The base addr of Hisi AWB ext register 50 | *-------------------------------------------*/ 51 | 52 | ISP_BIN_REG_ATTR_S g_astIspBinRegAttr[ISP_MAX_PIPE_NUM][MAX_BIN_REG_NUM] = 53 | { 54 | [0 ... (ISP_MAX_PIPE_NUM - 1)] = {0} 55 | }; 56 | 57 | 58 | #ifdef __cplusplus 59 | #if __cplusplus 60 | } 61 | #endif 62 | #endif /* End of #ifdef __cplusplus */ 63 | 64 | #endif /*__HI_ISP_BIN_H__ */ 65 | -------------------------------------------------------------------------------- /include/hisi/hi_tde_errcode.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2016-2018, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : tde_errcode.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 8 | Last Modified : 9 | Description : err code define 10 | Function List : 11 | History : May modify the code to errcode.h FOR hi3110 12 | ******************************************************************************/ 13 | #ifndef __TDE_ERRCODE_H__ 14 | #define __TDE_ERRCODE_H__ 15 | 16 | //#include "hi_debug.h" 17 | #include "hi_type.h" 18 | 19 | #ifdef __cplusplus 20 | #if __cplusplus 21 | extern "C" { 22 | #endif 23 | #endif /* __cplusplus */ 24 | 25 | //#define HI_ID_TDE 100 26 | /* tde start err no. */ 27 | #define HI_ERR_TDE_BASE ((HI_S32)( ((0x80UL + 0x20UL)<<24) | (100 << 16 ) | (4 << 13) | 1 )) 28 | 29 | enum 30 | { 31 | HI_ERR_TDE_DEV_NOT_OPEN = HI_ERR_TDE_BASE, /**< tde device not open yet */ 32 | HI_ERR_TDE_DEV_OPEN_FAILED, /**< open tde device failed */ 33 | HI_ERR_TDE_NULL_PTR, /**< input parameters contain null ptr */ 34 | HI_ERR_TDE_NO_MEM, /**< malloc failed */ 35 | HI_ERR_TDE_INVALID_HANDLE, /**< invalid job handle */ 36 | HI_ERR_TDE_INVALID_PARA, /**< invalid parameter */ 37 | HI_ERR_TDE_NOT_ALIGNED, /**< aligned error for position, stride, width */ 38 | HI_ERR_TDE_MINIFICATION, /**< invalid minification */ 39 | HI_ERR_TDE_CLIP_AREA, /**< clip area and operation area have no intersection */ 40 | HI_ERR_TDE_JOB_TIMEOUT, /**< blocked job wait timeout */ 41 | HI_ERR_TDE_UNSUPPORTED_OPERATION, /**< unsupported operation */ 42 | HI_ERR_TDE_QUERY_TIMEOUT, /**< query time out */ 43 | HI_ERR_TDE_INTERRUPT /* blocked job was interrupted */ 44 | }; 45 | 46 | 47 | #ifdef __cplusplus 48 | #if __cplusplus 49 | } 50 | #endif 51 | #endif /* __cplusplus */ 52 | 53 | #endif /* __TDE_ERRCODE_H__*/ 54 | 55 | 56 | -------------------------------------------------------------------------------- /include/hisi/hi_type.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : hi_type.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 2016/07/15 8 | Last Modified : 9 | Description : The common data type defination 10 | Function List : 11 | ******************************************************************************/ 12 | #ifndef __HI_TYPE_H__ 13 | #define __HI_TYPE_H__ 14 | 15 | 16 | #ifdef __cplusplus 17 | #if __cplusplus 18 | extern "C"{ 19 | #endif 20 | #endif /* __cplusplus */ 21 | 22 | /*----------------------------------------------* 23 | * The common data type, will be used in the whole project.* 24 | *----------------------------------------------*/ 25 | 26 | typedef unsigned char HI_U8; 27 | typedef unsigned short HI_U16; 28 | typedef unsigned int HI_U32; 29 | 30 | typedef signed char HI_S8; 31 | typedef short HI_S16; 32 | typedef int HI_S32; 33 | 34 | typedef unsigned long HI_UL; 35 | typedef signed long HI_SL; 36 | 37 | typedef float HI_FLOAT; 38 | typedef double HI_DOUBLE; 39 | 40 | #ifndef _M_IX86 41 | typedef unsigned long long HI_U64; 42 | typedef long long HI_S64; 43 | #else 44 | typedef unsigned __int64 HI_U64; 45 | typedef __int64 HI_S64; 46 | #endif 47 | 48 | typedef char HI_CHAR; 49 | #define HI_VOID void 50 | 51 | typedef unsigned int HI_HANDLE; 52 | 53 | /*----------------------------------------------* 54 | * const defination * 55 | *----------------------------------------------*/ 56 | typedef enum { 57 | HI_FALSE = 0, 58 | HI_TRUE = 1, 59 | } HI_BOOL; 60 | 61 | 62 | #ifndef NULL 63 | #define NULL 0L 64 | #endif 65 | 66 | #define HI_NULL 0L 67 | #define HI_SUCCESS 0 68 | #define HI_FAILURE (-1) 69 | 70 | 71 | #ifdef __cplusplus 72 | #if __cplusplus 73 | } 74 | #endif 75 | #endif /* __cplusplus */ 76 | 77 | #endif /* __HI_TYPE_H__ */ 78 | 79 | -------------------------------------------------------------------------------- /include/hisi/mpi_vb.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 4 | ****************************************************************************** 5 | File Name : mpi_vb.h 6 | Version : Initial Draft 7 | Author : Hisilicon multimedia software group 8 | Created : 2016/07/15 9 | Last Modified : 10 | Description : MPP Programe Interface for video buffer management moudle 11 | Function List : 12 | ******************************************************************************/ 13 | 14 | #ifndef __MPI_VB_H__ 15 | #define __MPI_VB_H__ 16 | 17 | #include "hi_comm_vb.h" 18 | #include "hi_comm_video.h" 19 | 20 | #ifdef __cplusplus 21 | #if __cplusplus 22 | extern "C"{ 23 | #endif 24 | #endif /* End of #ifdef __cplusplus */ 25 | 26 | VB_POOL HI_MPI_VB_CreatePool(VB_POOL_CONFIG_S *pstVbPoolCfg); 27 | HI_S32 HI_MPI_VB_DestroyPool(VB_POOL Pool); 28 | 29 | VB_BLK HI_MPI_VB_GetBlock(VB_POOL Pool, HI_U64 u64BlkSize,const HI_CHAR *pcMmzName); 30 | HI_S32 HI_MPI_VB_ReleaseBlock(VB_BLK Block); 31 | 32 | VB_BLK HI_MPI_VB_PhysAddr2Handle(HI_U64 u64PhyAddr); 33 | HI_U64 HI_MPI_VB_Handle2PhysAddr(VB_BLK Block); 34 | VB_POOL HI_MPI_VB_Handle2PoolId(VB_BLK Block); 35 | 36 | HI_S32 HI_MPI_VB_InquireUserCnt(VB_BLK Block); 37 | 38 | HI_S32 HI_MPI_VB_GetSupplementAddr(VB_BLK Block, VIDEO_SUPPLEMENT_S *pstSupplement); 39 | HI_S32 HI_MPI_VB_SetSupplementConfig(const VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 40 | HI_S32 HI_MPI_VB_GetSupplementConfig(VB_SUPPLEMENT_CONFIG_S *pstSupplementConfig); 41 | 42 | 43 | HI_S32 HI_MPI_VB_Init(HI_VOID); 44 | HI_S32 HI_MPI_VB_Exit(HI_VOID); 45 | HI_S32 HI_MPI_VB_SetConfig(const VB_CONFIG_S *pstVbConfig); 46 | HI_S32 HI_MPI_VB_GetConfig(VB_CONFIG_S *pstVbConfig); 47 | 48 | HI_S32 HI_MPI_VB_MmapPool(VB_POOL Pool); 49 | HI_S32 HI_MPI_VB_MunmapPool(VB_POOL Pool); 50 | 51 | HI_S32 HI_MPI_VB_GetBlockVirAddr(VB_POOL Pool, HI_U64 u64PhyAddr, HI_VOID **ppVirAddr); 52 | 53 | HI_S32 HI_MPI_VB_InitModCommPool(VB_UID_E enVbUid); 54 | HI_S32 HI_MPI_VB_ExitModCommPool(VB_UID_E enVbUid); 55 | 56 | HI_S32 HI_MPI_VB_SetModPoolConfig(VB_UID_E enVbUid, const VB_CONFIG_S *pstVbConfig); 57 | HI_S32 HI_MPI_VB_GetModPoolConfig(VB_UID_E enVbUid, VB_CONFIG_S *pstVbConfig); 58 | 59 | 60 | #ifdef __cplusplus 61 | #if __cplusplus 62 | } 63 | #endif 64 | #endif /* End of #ifdef __cplusplus */ 65 | 66 | #endif /*__MPI_VI_H__ */ 67 | 68 | -------------------------------------------------------------------------------- /include/opencv2/core/opencl/runtime/opencl_core_wrappers.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP 43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP 44 | 45 | #include "autogenerated/opencl_core_wrappers.hpp" 46 | 47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP 48 | -------------------------------------------------------------------------------- /include/opencv2/core/opencl/runtime/opencl_gl_wrappers.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP 43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP 44 | 45 | #include "autogenerated/opencl_gl_wrappers.hpp" 46 | 47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP 48 | -------------------------------------------------------------------------------- /include/hisi/hi_types.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 3 | ****************************************************************************** 4 | File Name : hi_type.h 5 | Version : Initial Draft 6 | Author : Hisilicon multimedia software group 7 | Created : 2005/4/23 8 | Last Modified : 9 | Description : Common data types of the system. 10 | Function List : 11 | History : 12 | ******************************************************************************/ 13 | #ifndef __HI_TYPES_H__ 14 | #define __HI_TYPES_H__ 15 | 16 | #include "hi_type.h" 17 | 18 | #ifdef __cplusplus 19 | #if __cplusplus 20 | extern "C"{ 21 | #endif 22 | #endif /* __cplusplus */ 23 | 24 | /*--------------------------------------------------------------------------------------------------------------* 25 | * Defintion of basic data types. The data types are applicable to both the application layer and kernel codes. * 26 | *--------------------------------------------------------------------------------------------------------------*/ 27 | /*************************** Structure Definition ****************************/ 28 | /** \addtogroup Common_TYPE */ 29 | /** @{ */ /** |<--- 8bit --->|<--- 8bit --->| 42 | |--------------------------------------------------------------| 43 | | HI_MOD_ID_E | mod defined data | chnID | 44 | |--------------------------------------------------------------| 45 | 46 | mod defined data: private data define by each module(for example: sub-mod id), usually, set to 0. 47 | */ 48 | 49 | #define HI_HANDLE_MAKEHANDLE(mod, privatedata, chnid) (HI_HANDLE)( (((mod)& 0xffff) << 16) | ((((privatedata)& 0xff) << 8) ) | (((chnid) & 0xff)) ) 50 | 51 | #define HI_HANDLE_GET_MODID(handle) (((handle) >> 16) & 0xffff) 52 | #define HI_HANDLE_GET_PriDATA(handle) (((handle) >> 8) & 0xff) 53 | #define HI_HANDLE_GET_CHNID(handle) (((handle)) & 0xff) 54 | 55 | 56 | /** @} */ /**