├── Makefile ├── README.md ├── image ├── dog_bike_car.jpg ├── dog_bike_car_416x416.bgr ├── dog_bike_car_416x416.jpg ├── dog_bike_car_416x416.yuv └── result.png ├── libhisi ├── include │ ├── aacdec.h │ ├── aacenc.h │ ├── acodec.h │ ├── autoconf.h │ ├── fisheye_calibrate.h │ ├── hi_ae_comm.h │ ├── hi_af_comm.h │ ├── hi_awb_comm.h │ ├── hi_buffer.h │ ├── hi_comm_3a.h │ ├── hi_comm_adec.h │ ├── hi_comm_aenc.h │ ├── hi_comm_ai.h │ ├── hi_comm_aio.h │ ├── hi_comm_ao.h │ ├── hi_comm_avs.h │ ├── hi_comm_dis.h │ ├── hi_comm_gdc.h │ ├── hi_comm_hdmi.h │ ├── hi_comm_hdr.h │ ├── hi_comm_isp.h │ ├── hi_comm_ive.h │ ├── hi_comm_rc.h │ ├── hi_comm_region.h │ ├── hi_comm_snap.h │ ├── hi_comm_sns.h │ ├── hi_comm_svp.h │ ├── hi_comm_sys.h │ ├── hi_comm_vb.h │ ├── hi_comm_vdec.h │ ├── hi_comm_venc.h │ ├── hi_comm_vgs.h │ ├── hi_comm_vi.h │ ├── hi_comm_video.h │ ├── hi_comm_vo.h │ ├── hi_comm_vpss.h │ ├── hi_common.h │ ├── hi_common_cipher.h │ ├── hi_debug.h │ ├── hi_defines.h │ ├── hi_errno.h │ ├── hi_i2c.h │ ├── hi_isp_bin.h │ ├── hi_isp_debug.h │ ├── hi_isp_defines.h │ ├── hi_ive.h │ ├── hi_math.h │ ├── hi_md.h │ ├── hi_mipi.h │ ├── hi_mipi_tx.h │ ├── hi_nnie.h │ ├── hi_plugin.h │ ├── hi_resampler_api.h │ ├── hi_runtime_api.h │ ├── hi_runtime_comm.h │ ├── hi_securec.h │ ├── hi_sns_ctrl.h │ ├── hi_spi.h │ ├── hi_ssp.h │ ├── hi_tde_api.h │ ├── hi_tde_errcode.h │ ├── hi_tde_type.h │ ├── hi_type.h │ ├── hi_types.h │ ├── hi_unf_cipher.h │ ├── hifb.h │ ├── hiir.h │ ├── ivs_md.h │ ├── list.h │ ├── mpi_ae.h │ ├── mpi_audio.h │ ├── mpi_avs.h │ ├── mpi_awb.h │ ├── mpi_gdc.h │ ├── mpi_hdmi.h │ ├── mpi_hdr.h │ ├── mpi_isp.h │ ├── mpi_ive.h │ ├── mpi_nnie.h │ ├── mpi_region.h │ ├── mpi_snap.h │ ├── mpi_sys.h │ ├── mpi_vb.h │ ├── mpi_vdec.h │ ├── mpi_venc.h │ ├── mpi_vgs.h │ ├── mpi_vi.h │ ├── mpi_vo.h │ ├── mpi_vpss.h │ ├── securec.h │ ├── securectype.h │ ├── vdec_exp.h │ ├── vou_exp.h │ └── watchdog.h └── lib │ ├── libVoiceEngine.a │ ├── lib_hiae.a │ ├── lib_hiawb.a │ ├── lib_hiawb_natura.a │ ├── lib_hidehaze.a │ ├── lib_hidrc.a │ ├── lib_hildci.a │ ├── libdnvqe.a │ ├── libhdmi.a │ ├── libhi_cipher.a │ ├── libhifisheyecalibrate.a │ ├── libisp.a │ ├── libive.a │ ├── libmd.a │ ├── libmpi.a │ ├── libnnie.a │ ├── libsecurec.a │ ├── libsns_imx307.a │ ├── libsns_imx307_2l.a │ ├── libsns_imx327.a │ ├── libsns_imx327_2l.a │ ├── libsns_imx335.a │ ├── libsns_imx377.a │ ├── libsns_imx458.a │ ├── libsns_mn34220.a │ ├── libsns_os05a.a │ ├── libsns_os05a_2l.a │ ├── libsvpruntime.a │ ├── libtde.a │ └── libupvqe.a ├── libopencv ├── bin │ ├── opencv_annotation │ ├── opencv_interactive-calibration │ ├── opencv_version │ ├── opencv_visualisation │ └── setup_vars_opencv4.sh ├── include │ └── opencv2 │ │ ├── calib3d.hpp │ │ ├── calib3d │ │ ├── calib3d.hpp │ │ └── calib3d_c.h │ │ ├── core.hpp │ │ ├── core │ │ ├── affine.hpp │ │ ├── async.hpp │ │ ├── base.hpp │ │ ├── bindings_utils.hpp │ │ ├── bufferpool.hpp │ │ ├── check.hpp │ │ ├── core.hpp │ │ ├── core_c.h │ │ ├── cuda.hpp │ │ ├── cuda.inl.hpp │ │ ├── cuda │ │ │ ├── block.hpp │ │ │ ├── border_interpolate.hpp │ │ │ ├── color.hpp │ │ │ ├── common.hpp │ │ │ ├── datamov_utils.hpp │ │ │ ├── detail │ │ │ │ ├── color_detail.hpp │ │ │ │ ├── reduce.hpp │ │ │ │ ├── reduce_key_val.hpp │ │ │ │ ├── transform_detail.hpp │ │ │ │ ├── type_traits_detail.hpp │ │ │ │ └── vec_distance_detail.hpp │ │ │ ├── dynamic_smem.hpp │ │ │ ├── emulation.hpp │ │ │ ├── filters.hpp │ │ │ ├── funcattrib.hpp │ │ │ ├── functional.hpp │ │ │ ├── limits.hpp │ │ │ ├── reduce.hpp │ │ │ ├── saturate_cast.hpp │ │ │ ├── scan.hpp │ │ │ ├── simd_functions.hpp │ │ │ ├── transform.hpp │ │ │ ├── type_traits.hpp │ │ │ ├── utility.hpp │ │ │ ├── vec_distance.hpp │ │ │ ├── vec_math.hpp │ │ │ ├── vec_traits.hpp │ │ │ ├── warp.hpp │ │ │ ├── warp_reduce.hpp │ │ │ └── warp_shuffle.hpp │ │ ├── cuda_stream_accessor.hpp │ │ ├── cuda_types.hpp │ │ ├── cv_cpu_dispatch.h │ │ ├── cv_cpu_helper.h │ │ ├── cvdef.h │ │ ├── cvstd.hpp │ │ ├── cvstd.inl.hpp │ │ ├── cvstd_wrapper.hpp │ │ ├── detail │ │ │ ├── async_promise.hpp │ │ │ └── exception_ptr.hpp │ │ ├── directx.hpp │ │ ├── eigen.hpp │ │ ├── fast_math.hpp │ │ ├── hal │ │ │ ├── hal.hpp │ │ │ ├── interface.h │ │ │ ├── intrin.hpp │ │ │ ├── intrin_avx.hpp │ │ │ ├── intrin_avx512.hpp │ │ │ ├── intrin_cpp.hpp │ │ │ ├── intrin_forward.hpp │ │ │ ├── intrin_msa.hpp │ │ │ ├── intrin_neon.hpp │ │ │ ├── intrin_sse.hpp │ │ │ ├── intrin_sse_em.hpp │ │ │ ├── intrin_vsx.hpp │ │ │ ├── intrin_wasm.hpp │ │ │ └── msa_macros.h │ │ ├── mat.hpp │ │ ├── mat.inl.hpp │ │ ├── matx.hpp │ │ ├── neon_utils.hpp │ │ ├── ocl.hpp │ │ ├── ocl_genbase.hpp │ │ ├── opencl │ │ │ ├── ocl_defs.hpp │ │ │ ├── opencl_info.hpp │ │ │ ├── opencl_svm.hpp │ │ │ └── runtime │ │ │ │ ├── autogenerated │ │ │ │ ├── opencl_clamdblas.hpp │ │ │ │ ├── opencl_clamdfft.hpp │ │ │ │ ├── opencl_core.hpp │ │ │ │ ├── opencl_core_wrappers.hpp │ │ │ │ ├── opencl_gl.hpp │ │ │ │ └── opencl_gl_wrappers.hpp │ │ │ │ ├── opencl_clamdblas.hpp │ │ │ │ ├── opencl_clamdfft.hpp │ │ │ │ ├── opencl_core.hpp │ │ │ │ ├── opencl_core_wrappers.hpp │ │ │ │ ├── opencl_gl.hpp │ │ │ │ ├── opencl_gl_wrappers.hpp │ │ │ │ ├── opencl_svm_20.hpp │ │ │ │ ├── opencl_svm_definitions.hpp │ │ │ │ └── opencl_svm_hsa_extension.hpp │ │ ├── opengl.hpp │ │ ├── operations.hpp │ │ ├── optim.hpp │ │ ├── ovx.hpp │ │ ├── persistence.hpp │ │ ├── saturate.hpp │ │ ├── simd_intrinsics.hpp │ │ ├── softfloat.hpp │ │ ├── sse_utils.hpp │ │ ├── traits.hpp │ │ ├── types.hpp │ │ ├── types_c.h │ │ ├── utility.hpp │ │ ├── utils │ │ │ ├── allocator_stats.hpp │ │ │ ├── allocator_stats.impl.hpp │ │ │ ├── filesystem.hpp │ │ │ ├── logger.defines.hpp │ │ │ ├── logger.hpp │ │ │ ├── logtag.hpp │ │ │ └── trace.hpp │ │ ├── va_intel.hpp │ │ ├── version.hpp │ │ └── vsx_utils.hpp │ │ ├── cvconfig.h │ │ ├── dnn.hpp │ │ ├── dnn │ │ ├── all_layers.hpp │ │ ├── dict.hpp │ │ ├── dnn.hpp │ │ ├── dnn.inl.hpp │ │ ├── layer.details.hpp │ │ ├── layer.hpp │ │ ├── shape_utils.hpp │ │ ├── utils │ │ │ └── inference_engine.hpp │ │ └── version.hpp │ │ ├── features2d.hpp │ │ ├── features2d │ │ ├── features2d.hpp │ │ └── hal │ │ │ └── interface.h │ │ ├── flann.hpp │ │ ├── flann │ │ ├── all_indices.h │ │ ├── allocator.h │ │ ├── any.h │ │ ├── autotuned_index.h │ │ ├── composite_index.h │ │ ├── config.h │ │ ├── defines.h │ │ ├── dist.h │ │ ├── dummy.h │ │ ├── dynamic_bitset.h │ │ ├── flann.hpp │ │ ├── flann_base.hpp │ │ ├── general.h │ │ ├── ground_truth.h │ │ ├── hdf5.h │ │ ├── heap.h │ │ ├── hierarchical_clustering_index.h │ │ ├── index_testing.h │ │ ├── kdtree_index.h │ │ ├── kdtree_single_index.h │ │ ├── kmeans_index.h │ │ ├── linear_index.h │ │ ├── logger.h │ │ ├── lsh_index.h │ │ ├── lsh_table.h │ │ ├── matrix.h │ │ ├── miniflann.hpp │ │ ├── nn_index.h │ │ ├── object_factory.h │ │ ├── params.h │ │ ├── random.h │ │ ├── result_set.h │ │ ├── sampling.h │ │ ├── saving.h │ │ ├── simplex_downhill.h │ │ └── timer.h │ │ ├── gapi.hpp │ │ ├── gapi │ │ ├── core.hpp │ │ ├── cpu │ │ │ ├── core.hpp │ │ │ ├── gcpukernel.hpp │ │ │ └── imgproc.hpp │ │ ├── fluid │ │ │ ├── core.hpp │ │ │ ├── gfluidbuffer.hpp │ │ │ ├── gfluidkernel.hpp │ │ │ └── imgproc.hpp │ │ ├── garg.hpp │ │ ├── garray.hpp │ │ ├── gasync_context.hpp │ │ ├── gcall.hpp │ │ ├── gcommon.hpp │ │ ├── gcompiled.hpp │ │ ├── gcompiled_async.hpp │ │ ├── gcompoundkernel.hpp │ │ ├── gcomputation.hpp │ │ ├── gcomputation_async.hpp │ │ ├── gkernel.hpp │ │ ├── gmat.hpp │ │ ├── gmetaarg.hpp │ │ ├── gproto.hpp │ │ ├── gpu │ │ │ ├── core.hpp │ │ │ ├── ggpukernel.hpp │ │ │ └── imgproc.hpp │ │ ├── gscalar.hpp │ │ ├── gtransform.hpp │ │ ├── gtype_traits.hpp │ │ ├── gtyped.hpp │ │ ├── imgproc.hpp │ │ ├── infer.hpp │ │ ├── infer │ │ │ └── ie.hpp │ │ ├── ocl │ │ │ ├── core.hpp │ │ │ ├── goclkernel.hpp │ │ │ └── imgproc.hpp │ │ ├── opencv_includes.hpp │ │ ├── operators.hpp │ │ ├── own │ │ │ ├── assert.hpp │ │ │ ├── convert.hpp │ │ │ ├── cvdefs.hpp │ │ │ ├── exports.hpp │ │ │ ├── mat.hpp │ │ │ ├── saturate.hpp │ │ │ ├── scalar.hpp │ │ │ └── types.hpp │ │ ├── render.hpp │ │ └── util │ │ │ ├── any.hpp │ │ │ ├── compiler_hints.hpp │ │ │ ├── optional.hpp │ │ │ ├── throw.hpp │ │ │ ├── util.hpp │ │ │ └── variant.hpp │ │ ├── highgui.hpp │ │ ├── highgui │ │ ├── highgui.hpp │ │ └── highgui_c.h │ │ ├── imgcodecs.hpp │ │ ├── imgcodecs │ │ ├── imgcodecs.hpp │ │ ├── imgcodecs_c.h │ │ ├── ios.h │ │ └── legacy │ │ │ └── constants_c.h │ │ ├── imgproc.hpp │ │ ├── imgproc │ │ ├── detail │ │ │ └── gcgraph.hpp │ │ ├── hal │ │ │ ├── hal.hpp │ │ │ └── interface.h │ │ ├── imgproc.hpp │ │ ├── imgproc_c.h │ │ └── types_c.h │ │ ├── ml.hpp │ │ ├── ml │ │ ├── ml.hpp │ │ └── ml.inl.hpp │ │ ├── objdetect.hpp │ │ ├── objdetect │ │ ├── detection_based_tracker.hpp │ │ └── objdetect.hpp │ │ ├── opencv.hpp │ │ ├── opencv_modules.hpp │ │ ├── photo.hpp │ │ ├── photo │ │ ├── cuda.hpp │ │ ├── legacy │ │ │ └── constants_c.h │ │ └── photo.hpp │ │ ├── stitching.hpp │ │ ├── stitching │ │ ├── detail │ │ │ ├── autocalib.hpp │ │ │ ├── blenders.hpp │ │ │ ├── camera.hpp │ │ │ ├── exposure_compensate.hpp │ │ │ ├── matchers.hpp │ │ │ ├── motion_estimators.hpp │ │ │ ├── seam_finders.hpp │ │ │ ├── timelapsers.hpp │ │ │ ├── util.hpp │ │ │ ├── util_inl.hpp │ │ │ ├── warpers.hpp │ │ │ └── warpers_inl.hpp │ │ └── warpers.hpp │ │ ├── video.hpp │ │ ├── video │ │ ├── background_segm.hpp │ │ ├── legacy │ │ │ └── constants_c.h │ │ ├── tracking.hpp │ │ └── video.hpp │ │ ├── videoio.hpp │ │ └── videoio │ │ ├── cap_ios.h │ │ ├── legacy │ │ └── constants_c.h │ │ ├── registry.hpp │ │ ├── videoio.hpp │ │ └── videoio_c.h └── lib │ ├── libopencv_calib3d.so │ ├── libopencv_core.so │ ├── libopencv_dnn.so │ ├── libopencv_features2d.so │ ├── libopencv_flann.so │ ├── libopencv_gapi.so │ ├── libopencv_highgui.so │ ├── libopencv_imgcodecs.so │ ├── libopencv_imgproc.so │ ├── libopencv_ml.so │ ├── libopencv_objdetect.so │ ├── libopencv_photo.so │ ├── libopencv_stitching.so │ ├── libopencv_video.so │ └── libopencv_videoio.so ├── main.cpp ├── model └── coco_yolov3_detect.wk └── src ├── Tensor.h ├── ins_nnie_interface.cpp ├── ins_nnie_interface.h ├── nnie_core.c ├── nnie_core.h ├── sample_comm.h ├── sample_comm_nnie.c ├── sample_comm_nnie.h ├── sample_comm_svp.c ├── sample_comm_svp.h ├── sample_nnie_api.cpp ├── sample_nnie_api.h └── util.h /Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -I./src 2 | CFLAGS += -I./libhisi/include 3 | CFLAGS += -I./libopencv/include 4 | CFLAGS += -L./libhisi/lib 5 | CFLAGS += -L./libopencv/lib 6 | 7 | CXXFLAGS += -I./src 8 | CXXFLAGS += -I./libhisi/include 9 | CXXFLAGS += -I./libopencv/include 10 | CXXFLAGS += -L./libhisi/lib 11 | CXXFLAGS += -L./libopencv/lib 12 | 13 | 14 | LD_HISI_LIBS += -ldnvqe -lhdmi -lhi_cipher -lhifisheyecalibrate -live -lmd -lmpi -lsecurec -lsvpruntime -ltde -lupvqe -lVoiceEngine -lnnie 15 | 16 | LD_OPENCV_LIBS += -lopencv_highgui -lopencv_imgproc -lopencv_video -lopencv_videoio -lopencv_dnn -lopencv_ml -lopencv_photo -lopencv_objdetect -lopencv_stitching -lopencv_flann -lopencv_imgcodecs -lopencv_core -lopencv_calib3d -lopencv_features2d 17 | 18 | 19 | CXXFLAGS += ${LD_HISI_LIBS} 20 | CXXFLAGS += ${LD_OPENCV_LIBS} 21 | CXXFLAGS += -std=c++11 22 | CXXFLAGS += -Wno-error 23 | CXXFLAGS += -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -ffast-math -fpermissive -fpic 24 | CXXFLAGS += -O3 25 | 26 | SRCS1 := $(wildcard ./src/*.c) 27 | SRCS2 := $(wildcard ./src/*.cpp) 28 | TARGET:= test 29 | 30 | # target source 31 | 32 | OBJS1 = $(SRCS1:%.c=%.o) 33 | OBJS2 = $(SRCS2:%.cpp=%.o) 34 | 35 | CXX = arm-himix200-linux-g++ 36 | CC = arm-himix200-linux-gcc 37 | .PHONY : clean all 38 | 39 | all: $(TARGET) 40 | 41 | $(TARGET): ./main.o $(OBJS1) $(OBJS2) 42 | $(CXX) $(CXXFLAGS) -lpthread -lm -ldl -o $@ $^ -Wl,--start-group ${LD_HISI_LIBS} -Wl,--end-group 43 | arm_lib: 44 | arm-himix200-linux-ar rcs libyolo.a $(OBJS1) $(OBJS2) 45 | arm-himix200-linux-gcc -shared -fPIC -lstdc++ -o libyolo.so $(OBJS1) $(OBJS2) 46 | 47 | clean: 48 | @rm -f $(TARGET) ./*.o ./src/*.o 49 | @rm -f libyolo.a libyolo.so 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nnie_yolo 2 | **海思Hi3516DV300移植YOLOv3** 3 | 在海思Hisilicon的Hi3516dv300芯片上,利用nnie和opencv库,简洁了官方yolov3用例中各种复杂的嵌套调用/复杂编译,提供了交叉编译后可成功上板部署运行的demo。 4 | 同时,对在海思Hisilicon的其他AI芯片上利用nnie部署CNN模型提供参考和借鉴。 5 | 以下为demo工程说明: 6 | 7 | ## 1.libopencv 8 | 交叉编译时所依赖的opencv库,已经打包好了; 9 | 亦可根据自己项目需要选择不同版本/不同阉割程度的opencv依赖库,需自行编译。 10 | 11 | ## 2.libhisi 12 | 交叉编译时所依赖的nnie库,海思官方提供,未作处理全部堆上,lib静态库,亦可换为动态库。 13 | 14 | ## 3.image 15 | demo输入原始图像dog_bike_car.jpg;dog_bike_car_416x416.jpg; 16 | 官方输入原始图像dog_bike_car_416x416.bgr; 17 | 项目使用原始图像dog_bike_car_416x416.yuv。**嵌入式搬砖哥提供的图像格式,YUV420;最终转换后输入模型的图像格式仍为BGR** 18 | 19 | 20 | ## 4.model 21 | **coco_yolov3_detect.wk**官方提供的COCO预训练模型,classes number 80, transformed by RuyiStudio(Windows System)。Linux System(for me, Ubuntu18.04) can use ruyicmd tool. 22 | 模型转换这块坑多且深,由于海思只支持caffe模型转自家wk模型,所以通过tensorflow/pytorch/keras/darknet等深度学习框架训练出来sample_nnie_api.cpp的自定义模型需要先转caffe模型,再转wk模型。 23 | 24 | ## 5.src 25 | ### sample_nnie_api.h 26 | yolov3 wk模型接口函数: 27 | 1. int yolo_init(const char *yolo_model_path); 28 | 2. int yolo_run(unsigned char *input_yuv420_data, int input_w, int input_h); 29 | 3. int yolo_unit(); 30 | 可封装为标准的输入输出接口。 31 | 32 | ### sample_nnie_api.cpp 33 | yolov3 wk模型后处理过程详细的代码实现。 34 | 35 | 36 | ## 6.main.cpp 37 | demo主函数代码实现,可了解物体检测时接口函数调用过程。 38 | 39 | ## 7.交叉编译环境 40 | 交叉编译工具见海思Hisilicon官方提供的SDK,即**arm-himix200-linux.tgz**,3.6个GB。 41 | 手里拿有板子的码友应该都有SDK的,对吧。依照文档配置好交叉编译环境。 42 | 43 | ## 8.编译文件 44 | **Makefile**较为简洁直观的编译文件 45 | 46 | ## demo使用步骤如下: 47 | 1. 工程编译生成test可执行文件; 48 | 命令**make** 49 | 2. 工程编译生成libyolo库文件; 50 | 命令**make arm_lib** 51 | 3. 在hi3516dv300上运行test文件可得yolov3-demo运行结果如图。 52 | ![result](https://github.com/BaronLeeLZP/hi3516dv300_nnie-yolov3-demo/blob/master/image/result.png) 53 | 4. 命令**make clean**可清理原有的编译输出对象,之后再修改文件重新编译。 54 | 55 | 如有技术问题欢迎交流! 56 | 如有版权问题请及时告知! 57 | -------------------------------------------------------------------------------- /image/dog_bike_car.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaronLeeLZP/hi3516dv300_nnie-yolov3-demo/41d4fc5b799a655b3752dd37f399185d35d0645a/image/dog_bike_car.jpg -------------------------------------------------------------------------------- /image/dog_bike_car_416x416.bgr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaronLeeLZP/hi3516dv300_nnie-yolov3-demo/41d4fc5b799a655b3752dd37f399185d35d0645a/image/dog_bike_car_416x416.bgr -------------------------------------------------------------------------------- /image/dog_bike_car_416x416.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaronLeeLZP/hi3516dv300_nnie-yolov3-demo/41d4fc5b799a655b3752dd37f399185d35d0645a/image/dog_bike_car_416x416.jpg -------------------------------------------------------------------------------- /image/dog_bike_car_416x416.yuv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaronLeeLZP/hi3516dv300_nnie-yolov3-demo/41d4fc5b799a655b3752dd37f399185d35d0645a/image/dog_bike_car_416x416.yuv -------------------------------------------------------------------------------- /image/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BaronLeeLZP/hi3516dv300_nnie-yolov3-demo/41d4fc5b799a655b3752dd37f399185d35d0645a/image/result.png -------------------------------------------------------------------------------- /libhisi/include/fisheye_calibrate.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : histitch.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 10 | Description : 11 | History : 12 | 1.Date : 2016/09/25 13 | Author : 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HIGDC_H__ 19 | #define __HIGDC_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C" { 24 | #endif 25 | #endif /* __cplusplus */ 26 | 27 | #include "hi_comm_video.h" 28 | 29 | #define HI_ERR_FISHEYE_CALIBRATE_NULL_PTR 0xA0258011 30 | #define HI_ERR_FISHEYE_CALIBRATE_ILLEGAL_PARAM 0xA0258012 31 | #define HI_ERR_FISHEYE_CALIBRATE_NOT_SUPPORT 0xA0258013 32 | 33 | 34 | typedef enum hiFISHEYE_CALIBRATE_LEVEL_E 35 | { 36 | LEVEL_0 = 0, /*calibrate level 0*/ 37 | LEVEL_1 = 1, /*calibrate level 1*/ 38 | LEVEL_2 = 2, /*calibrate level 2*/ 39 | 40 | LEVEL_BUTT 41 | } FISHEYE_CALIBRATE_LEVEL_E; 42 | 43 | 44 | typedef struct hiFISHEYE_CALIBTATE_RESULT_S 45 | { 46 | HI_S32 s32OffsetV; /* the horizontal offset between image center and physical center of len*/ 47 | HI_S32 s32OffsetH; /* the vertical offset between image center and physical center of len*/ 48 | HI_S32 s32Radius_X; /* the X coordinate of physical center of len*/ 49 | HI_S32 s32Radius_Y; /* the Y coordinate of physical center of len*/ 50 | HI_U32 u32Radius; /* the radius of len*/ 51 | } FISHEYE_CALIBTATE_RESULT_S; 52 | 53 | typedef struct hiCALIBTATE_OUTPUT_S 54 | { 55 | FISHEYE_CALIBTATE_RESULT_S stCalibrateResult; /*the output of result*/ 56 | } CALIBTATE_OUTPUT_S; 57 | 58 | 59 | HI_S32 HI_FISHEYE_ComputeCalibrateResult(VIDEO_FRAME_S *pstVFramIn, FISHEYE_CALIBRATE_LEVEL_E enLevel, CALIBTATE_OUTPUT_S *pOutCalibrate); 60 | HI_S32 HI_FISHEYE_MarkCalibrateResult(VIDEO_FRAME_S *pstPicIn, VIDEO_FRAME_S *pstPicOut, FISHEYE_CALIBTATE_RESULT_S *pCalibrateResult); 61 | 62 | 63 | #ifdef __cplusplus 64 | #if __cplusplus 65 | } 66 | #endif 67 | #endif /* __cplusplus */ 68 | 69 | 70 | #endif /* __HISTITCH_H__ */ 71 | 72 | -------------------------------------------------------------------------------- /libhisi/include/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 | -------------------------------------------------------------------------------- /libhisi/include/hi_comm_ai.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ai.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AI_H__ 19 | #define __HI_COMM_AI_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | #ifdef __cplusplus 30 | #if __cplusplus 31 | } 32 | #endif 33 | #endif /* End of #ifdef __cplusplus */ 34 | 35 | #endif /* End of #ifndef __HI_COMM_AI_H__ */ 36 | 37 | -------------------------------------------------------------------------------- /libhisi/include/hi_comm_ao.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_comm_ao.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2009/5/5 10 | Description : 11 | History : 12 | 1.Date : 2009/5/5 13 | Author : p00123320 14 | Modification: Created file 15 | ******************************************************************************/ 16 | 17 | 18 | #ifndef __HI_COMM_AO_H__ 19 | #define __HI_COMM_AO_H__ 20 | 21 | #ifdef __cplusplus 22 | #if __cplusplus 23 | extern "C"{ 24 | #endif 25 | #endif /* End of #ifdef __cplusplus */ 26 | 27 | 28 | 29 | 30 | #ifdef __cplusplus 31 | #if __cplusplus 32 | } 33 | #endif 34 | #endif /* End of #ifdef __cplusplus */ 35 | 36 | #endif /* End of #ifndef __HI_COMM_AO_H__ */ 37 | 38 | -------------------------------------------------------------------------------- /libhisi/include/hi_common_cipher.h: -------------------------------------------------------------------------------- 1 | #ifndef __HI_COMMON_CIPHER__ 2 | #define __HI_COMMON_CIPHER__ 3 | 4 | #ifdef __cplusplus 5 | #if __cplusplus 6 | extern "C" { 7 | #endif 8 | #endif /* __cplusplus */ 9 | 10 | #define HI_ERR_CIPHER_NOT_INIT (HI_S32)(0x804D0001) 11 | #define HI_ERR_CIPHER_INVALID_HANDLE (HI_S32)(0x804D0002) 12 | #define HI_ERR_CIPHER_INVALID_POINT (HI_S32)(0x804D0003) 13 | #define HI_ERR_CIPHER_INVALID_PARA (HI_S32)(0x804D0004) 14 | #define HI_ERR_CIPHER_FAILED_INIT (HI_S32)(0x804D0005) 15 | #define HI_ERR_CIPHER_FAILED_GETHANDLE (HI_S32)(0x804D0006) 16 | #define HI_ERR_CIPHER_FAILED_RELEASEHANDLE (HI_S32)(0x804D0007) 17 | #define HI_ERR_CIPHER_FAILED_CONFIGAES (HI_S32)(0x804D0008) 18 | #define HI_ERR_CIPHER_FAILED_CONFIGDES (HI_S32)(0x804D0009) 19 | #define HI_ERR_CIPHER_FAILED_ENCRYPT (HI_S32)(0x804D000A) 20 | #define HI_ERR_CIPHER_FAILED_DECRYPT (HI_S32)(0x804D000B) 21 | #define HI_ERR_CIPHER_BUSY (HI_S32)(0x804D000C) 22 | #define HI_ERR_CIPHER_NO_AVAILABLE_RNG (HI_S32)(0x804D000D) 23 | #define HI_ERR_CIPHER_FAILED_MEM (HI_S32)(0x804D000E) 24 | #define HI_ERR_CIPHER_UNAVAILABLE (HI_S32)(0x804D000F) 25 | #define HI_ERR_CIPHER_OVERFLOW (HI_S32)(0x804D0010) 26 | #define HI_ERR_CIPHER_HARD_STATUS (HI_S32)(0x804D0011) 27 | #define HI_ERR_CIPHER_TIMEOUT (HI_S32)(0x804D0012) 28 | #define HI_ERR_CIPHER_UNSUPPORTED (HI_S32)(0x804D0013) 29 | #define HI_ERR_CIPHER_REGISTER_IRQ (HI_S32)(0x804D0014) 30 | #define HI_ERR_CIPHER_ILLEGAL_UUID (HI_S32)(0x804D0015) 31 | #define HI_ERR_CIPHER_ILLEGAL_KEY (HI_S32)(0x804D0016) 32 | #define HI_ERR_CIPHER_INVALID_ADDR (HI_S32)(0x804D0017) 33 | #define HI_ERR_CIPHER_INVALID_LENGTH (HI_S32)(0x804D0018) 34 | #define HI_ERR_CIPHER_ILLEGAL_DATA (HI_S32)(0x804D0019) 35 | #define HI_ERR_CIPHER_RSA_SIGN (HI_S32)(0x804D001A) 36 | #define HI_ERR_CIPHER_RSA_VERIFY (HI_S32)(0x804D001B) 37 | #define HI_ERR_CIPHER_MEMSET_S_FAILED (HI_S32)(0x804D001C) 38 | #define HI_ERR_CIPHER_MEMCPY_S_FAILED (HI_S32)(0x804D001D) 39 | #define HI_ERR_CIPHER_RSA_CRYPT_FAILED (HI_S32)(0x804D001E) 40 | 41 | #ifdef __cplusplus 42 | #if __cplusplus 43 | } 44 | #endif 45 | #endif /* __cplusplus */ 46 | 47 | #endif /* __CRYP_CIPHER_H__ */ 48 | 49 | -------------------------------------------------------------------------------- /libhisi/include/hi_i2c.h: -------------------------------------------------------------------------------- 1 | #ifndef _HI_I2C_H 2 | #define _HI_I2C_H 3 | 4 | 5 | 6 | /* /dev/i2c-X ioctl commands. The ioctl's parameter is always an 7 | * unsigned long, except for: 8 | * - I2C_FUNCS, takes pointer to an unsigned long 9 | * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data 10 | * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data 11 | */ 12 | #define I2C_RETRIES 0x0701 /* number of times a device address should 13 | be polled when not acknowledging */ 14 | #define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ 15 | 16 | /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses 17 | * are NOT supported! (due to code brokenness) 18 | */ 19 | #define I2C_SLAVE 0x0703 /* Use this slave address */ 20 | #define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it 21 | is already in use by a driver! */ 22 | #define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ 23 | 24 | #define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */ 25 | 26 | #define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */ 27 | 28 | #define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */ 29 | #define I2C_SMBUS 0x0720 /* SMBus transfer */ 30 | #define I2C_16BIT_REG 0x0709 /* 16BIT REG WIDTH */ 31 | #define I2C_16BIT_DATA 0x070a /* 16BIT DATA WIDTH */ 32 | 33 | typedef struct hiI2C_DATA_S 34 | { 35 | unsigned char dev_addr; 36 | unsigned int reg_addr; 37 | unsigned int addr_byte_num; 38 | unsigned int data; 39 | unsigned int data_byte_num; 40 | }I2C_DATA_S; 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /libhisi/include/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 | -------------------------------------------------------------------------------- /libhisi/include/hi_isp_debug.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (C), 2016, Hisilicon Tech. Co., Ltd. 4 | 5 | ****************************************************************************** 6 | File Name : hi_isp_debug.h 7 | Version : Initial Draft 8 | Author : Hisilicon multimedia software group 9 | Created : 2010/08/30 10 | Description : 11 | History : 12 | 1.Date : 2010/08/30 13 | Author : 14 | Modification: Created file 15 | 16 | ******************************************************************************/ 17 | 18 | #ifndef __HI_ISP_DEBUG_H__ 19 | #define __HI_ISP_DEBUG_H__ 20 | 21 | #include "hi_debug.h" 22 | 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 | -------------------------------------------------------------------------------- /libhisi/include/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_*/ -------------------------------------------------------------------------------- /libhisi/include/hi_plugin.h: -------------------------------------------------------------------------------- 1 | #ifndef __HI_PLUGIN_TYPE_H__ 2 | #define __HI_PLUGIN_TYPE_H__ 3 | 4 | #include "hi_type.h" 5 | 6 | #if defined(_MSC_VER) 7 | #define EXPORT __declspec(dllexport) 8 | #elif defined(__GNUC__) 9 | #define EXPORT __attribute__((visibility("default"))) 10 | #else 11 | #define EXPORT 12 | #pragma warning cant export dynamic symbos 13 | #endif 14 | 15 | #ifdef __cplusplus 16 | #if __cplusplus 17 | extern "C" { 18 | #endif 19 | #endif /* __cplusplus */ 20 | 21 | #define MAX_OPERAND_NAME_LEN (64) 22 | 23 | typedef struct hiNodePlugin_Shape_S 24 | { 25 | HI_S32 s32H; 26 | HI_S32 s32W; 27 | HI_S32 s32C; 28 | } HI_NodePlugin_Shape_S; 29 | 30 | typedef enum hiNodePlugin_ElemType_E 31 | { 32 | ELEM_TYPE_U8, 33 | ELEM_TYPE_U16, 34 | ELEM_TYPE_U32 35 | } HI_NodePlugin_ElemType_E; 36 | 37 | typedef struct hiNodePlugin_Operand_S 38 | { 39 | HI_U64 u64Offset; // addr 40 | HI_CHAR mName[MAX_OPERAND_NAME_LEN + 1]; 41 | HI_NodePlugin_ElemType_E enElemType; 42 | HI_U32 u32Num; 43 | HI_U32 u32Stride; 44 | HI_NodePlugin_Shape_S stShape; 45 | } HI_NodePlugin_Operand_S; 46 | 47 | typedef struct HiNodeParam 48 | { 49 | HI_VOID* pParam; 50 | HI_U32 u32Size; 51 | } HI_NodePlugin_NodeParam_S; 52 | 53 | typedef HI_S32 (*NodePluginCompute)(const HI_NodePlugin_Operand_S*, HI_U32, HI_NodePlugin_Operand_S*, HI_U32, HI_NodePlugin_NodeParam_S*, HI_NodePlugin_NodeParam_S*); 54 | 55 | typedef HI_S32 (*NodePluginGetType)(HI_CHAR pszNodeType[], const HI_U32 u32Length); 56 | 57 | EXPORT HI_S32 HI_NodePlugin_Compute(const HI_NodePlugin_Operand_S* pstInputs, HI_U32 u32InputNum, 58 | HI_NodePlugin_Operand_S* pstOutputs, HI_U32 u32Outputs, HI_NodePlugin_NodeParam_S* pstHyperParam, HI_NodePlugin_NodeParam_S* pstTrainingParam); 59 | 60 | EXPORT HI_S32 HI_NodePlugin_getNodeType(HI_CHAR pszNodeType[], const HI_U32 u32Length); 61 | 62 | #ifdef __cplusplus 63 | #if __cplusplus 64 | } 65 | #endif 66 | #endif /* __cplusplus */ 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /libhisi/include/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 | -------------------------------------------------------------------------------- /libhisi/include/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 | -------------------------------------------------------------------------------- /libhisi/include/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 | /** @} */ /**