1 /* 2 * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef _HI_MD_H_ 17 #define _HI_MD_H_ 18 19 #include "hi_ive.h" 20 21 #ifdef __cplusplus 22 #if __cplusplus 23 extern "C" { 24 #endif 25 #endif 26 /* 27 * Definition md algorithm mode 28 */ 29 typedef enum hiMD_ALG_MODE_E { 30 MD_ALG_MODE_BG = 0x0, /* Base on background image */ 31 MD_ALG_MODE_REF = 0x1, /* Base on reference image */ 32 33 MD_ALG_MODE_BUTT 34 } MD_ALG_MODE_E; 35 /* 36 * Definition of md attribute 37 */ 38 typedef struct hiMD_ATTR_S { 39 MD_ALG_MODE_E enAlgMode; /* Md algorithm mode */ 40 IVE_SAD_MODE_E enSadMode; /* Sad mode */ 41 IVE_SAD_OUT_CTRL_E enSadOutCtrl; /* Sad output ctrl */ 42 HI_U32 u32Width; /* Image width */ 43 HI_U32 u32Height; /* Image height */ 44 HI_U16 u16SadThr; /* Sad thresh */ 45 IVE_CCL_CTRL_S stCclCtrl; /* Ccl ctrl */ 46 IVE_ADD_CTRL_S stAddCtrl; /* Add ctrl */ 47 } MD_ATTR_S; 48 49 #ifdef __cplusplus 50 #if __cplusplus 51 } 52 #endif 53 #endif 54 55 #endif /* _HI_MD_H_ */