11bd4fe43Sopenharmony_ci/* 21bd4fe43Sopenharmony_ci * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 31bd4fe43Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 41bd4fe43Sopenharmony_ci * you may not use this file except in compliance with the License. 51bd4fe43Sopenharmony_ci * You may obtain a copy of the License at 61bd4fe43Sopenharmony_ci * 71bd4fe43Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 81bd4fe43Sopenharmony_ci * 91bd4fe43Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 101bd4fe43Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 111bd4fe43Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 121bd4fe43Sopenharmony_ci * See the License for the specific language governing permissions and 131bd4fe43Sopenharmony_ci * limitations under the License. 141bd4fe43Sopenharmony_ci */ 151bd4fe43Sopenharmony_ci#ifndef __HI_COMM_REGION_H__ 161bd4fe43Sopenharmony_ci#define __HI_COMM_REGION_H__ 171bd4fe43Sopenharmony_ci 181bd4fe43Sopenharmony_ci#include "hi_common.h" 191bd4fe43Sopenharmony_ci#include "hi_comm_video.h" 201bd4fe43Sopenharmony_ci#include "hi_errno.h" 211bd4fe43Sopenharmony_ci#include "hi_defines.h" 221bd4fe43Sopenharmony_ci 231bd4fe43Sopenharmony_ci#ifdef __cplusplus 241bd4fe43Sopenharmony_ci#if __cplusplus 251bd4fe43Sopenharmony_ciextern "C" { 261bd4fe43Sopenharmony_ci#endif 271bd4fe43Sopenharmony_ci#endif 281bd4fe43Sopenharmony_ci 291bd4fe43Sopenharmony_ci#define RGN_COLOR_LUT_NUM 2 301bd4fe43Sopenharmony_ci#define RGN_MAX_BMP_UPDATE_NUM 16 311bd4fe43Sopenharmony_ci#define RGN_BATCHHANDLE_MAX 24 321bd4fe43Sopenharmony_ci 331bd4fe43Sopenharmony_citypedef HI_U32 RGN_HANDLE; 341bd4fe43Sopenharmony_citypedef HI_U32 RGN_HANDLEGROUP; 351bd4fe43Sopenharmony_ci 361bd4fe43Sopenharmony_ci/* type of video regions */ 371bd4fe43Sopenharmony_citypedef enum hiRGN_TYPE_E { 381bd4fe43Sopenharmony_ci OVERLAY_RGN = 0, /* video overlay region */ 391bd4fe43Sopenharmony_ci COVER_RGN, 401bd4fe43Sopenharmony_ci COVEREX_RGN, 411bd4fe43Sopenharmony_ci OVERLAYEX_RGN, 421bd4fe43Sopenharmony_ci MOSAIC_RGN, 431bd4fe43Sopenharmony_ci RGN_BUTT 441bd4fe43Sopenharmony_ci} RGN_TYPE_E; 451bd4fe43Sopenharmony_ci 461bd4fe43Sopenharmony_citypedef enum hiINVERT_COLOR_MODE_E { 471bd4fe43Sopenharmony_ci LESSTHAN_LUM_THRESH = 0, /* the lum of the video is less than the lum threshold which is set by u32LumThresh */ 481bd4fe43Sopenharmony_ci MORETHAN_LUM_THRESH, /* the lum of the video is more than the lum threshold which is set by u32LumThresh */ 491bd4fe43Sopenharmony_ci INVERT_COLOR_BUTT 501bd4fe43Sopenharmony_ci} INVERT_COLOR_MODE_E; 511bd4fe43Sopenharmony_ci 521bd4fe43Sopenharmony_citypedef struct hiOVERLAY_QP_INFO_S { 531bd4fe43Sopenharmony_ci HI_BOOL bAbsQp; 541bd4fe43Sopenharmony_ci HI_S32 s32Qp; 551bd4fe43Sopenharmony_ci HI_BOOL bQpDisable; 561bd4fe43Sopenharmony_ci} OVERLAY_QP_INFO_S; 571bd4fe43Sopenharmony_ci 581bd4fe43Sopenharmony_citypedef struct hiOVERLAY_INVERT_COLOR_S { 591bd4fe43Sopenharmony_ci SIZE_S stInvColArea; /* It must be multipe of 16 but not more than 64. */ 601bd4fe43Sopenharmony_ci HI_U32 u32LumThresh; /* The threshold to decide whether invert the OSD's color or not. */ 611bd4fe43Sopenharmony_ci INVERT_COLOR_MODE_E enChgMod; 621bd4fe43Sopenharmony_ci HI_BOOL bInvColEn; /* The switch of inverting color. */ 631bd4fe43Sopenharmony_ci} OVERLAY_INVERT_COLOR_S; 641bd4fe43Sopenharmony_ci 651bd4fe43Sopenharmony_citypedef enum hiATTACH_DEST_E { 661bd4fe43Sopenharmony_ci ATTACH_JPEG_MAIN = 0, 671bd4fe43Sopenharmony_ci ATTACH_JPEG_MPF0, 681bd4fe43Sopenharmony_ci ATTACH_JPEG_MPF1, 691bd4fe43Sopenharmony_ci ATTACH_JPEG_BUTT 701bd4fe43Sopenharmony_ci} ATTACH_DEST_E; 711bd4fe43Sopenharmony_ci 721bd4fe43Sopenharmony_citypedef struct hiOVERLAY_ATTR_S { 731bd4fe43Sopenharmony_ci /* bitmap pixel format,now only support ARGB1555 or ARGB4444 */ 741bd4fe43Sopenharmony_ci PIXEL_FORMAT_E enPixelFmt; 751bd4fe43Sopenharmony_ci 761bd4fe43Sopenharmony_ci /* background color, pixel format depends on "enPixelFmt" */ 771bd4fe43Sopenharmony_ci HI_U32 u32BgColor; 781bd4fe43Sopenharmony_ci 791bd4fe43Sopenharmony_ci /* region size,W:[2,RGN_OVERLAY_MAX_WIDTH],align:2,H:[2,RGN_OVERLAY_MAX_HEIGHT],align:2 */ 801bd4fe43Sopenharmony_ci SIZE_S stSize; 811bd4fe43Sopenharmony_ci HI_U32 u32CanvasNum; 821bd4fe43Sopenharmony_ci} OVERLAY_ATTR_S; 831bd4fe43Sopenharmony_ci 841bd4fe43Sopenharmony_citypedef struct hiOVERLAY_CHN_ATTR_S { 851bd4fe43Sopenharmony_ci /* X:[0,OVERLAY_MAX_X_VENC],align:2,Y:[0,OVERLAY_MAX_Y_VENC],align:2 */ 861bd4fe43Sopenharmony_ci POINT_S stPoint; 871bd4fe43Sopenharmony_ci 881bd4fe43Sopenharmony_ci /* 891bd4fe43Sopenharmony_ci * background an foreground transparence when pixel format is ARGB1555 901bd4fe43Sopenharmony_ci * the pixel format is ARGB1555,when the alpha bit is 1 this alpha is value! 911bd4fe43Sopenharmony_ci * range:[0,128] 921bd4fe43Sopenharmony_ci */ 931bd4fe43Sopenharmony_ci HI_U32 u32FgAlpha; 941bd4fe43Sopenharmony_ci 951bd4fe43Sopenharmony_ci /* 961bd4fe43Sopenharmony_ci * background an foreground transparence when pixel format is ARGB1555 971bd4fe43Sopenharmony_ci * the pixel format is ARGB1555,when the alpha bit is 0 this alpha is value! 981bd4fe43Sopenharmony_ci * range:[0,128] 991bd4fe43Sopenharmony_ci */ 1001bd4fe43Sopenharmony_ci HI_U32 u32BgAlpha; 1011bd4fe43Sopenharmony_ci 1021bd4fe43Sopenharmony_ci HI_U32 u32Layer; /* OVERLAY region layer range:[0,7] */ 1031bd4fe43Sopenharmony_ci 1041bd4fe43Sopenharmony_ci OVERLAY_QP_INFO_S stQpInfo; 1051bd4fe43Sopenharmony_ci 1061bd4fe43Sopenharmony_ci OVERLAY_INVERT_COLOR_S stInvertColor; 1071bd4fe43Sopenharmony_ci 1081bd4fe43Sopenharmony_ci ATTACH_DEST_E enAttachDest; 1091bd4fe43Sopenharmony_ci 1101bd4fe43Sopenharmony_ci HI_U16 u16ColorLUT[RGN_COLOR_LUT_NUM]; 1111bd4fe43Sopenharmony_ci} OVERLAY_CHN_ATTR_S; 1121bd4fe43Sopenharmony_ci 1131bd4fe43Sopenharmony_citypedef enum hiRGN_AREA_TYPE_E { 1141bd4fe43Sopenharmony_ci AREA_RECT = 0, 1151bd4fe43Sopenharmony_ci AREA_QUAD_RANGLE, 1161bd4fe43Sopenharmony_ci AREA_BUTT 1171bd4fe43Sopenharmony_ci} RGN_AREA_TYPE_E; 1181bd4fe43Sopenharmony_ci 1191bd4fe43Sopenharmony_citypedef enum hiRGN_COORDINATE_E { 1201bd4fe43Sopenharmony_ci RGN_ABS_COOR = 0, /* Absolute coordinate */ 1211bd4fe43Sopenharmony_ci RGN_RATIO_COOR /* Ratio coordinate */ 1221bd4fe43Sopenharmony_ci} RGN_COORDINATE_E; 1231bd4fe43Sopenharmony_ci 1241bd4fe43Sopenharmony_citypedef struct hiRGN_QUADRANGLE_S { 1251bd4fe43Sopenharmony_ci HI_BOOL bSolid; /* whether solid or dashed quadrangle */ 1261bd4fe43Sopenharmony_ci HI_U32 u32Thick; /* Line Width of quadrangle, valid when dashed quadrangle */ 1271bd4fe43Sopenharmony_ci POINT_S stPoint[4]; /* quadrangle has 4 points */ 1281bd4fe43Sopenharmony_ci} RGN_QUADRANGLE_S; 1291bd4fe43Sopenharmony_ci 1301bd4fe43Sopenharmony_citypedef struct hiCOVER_CHN_ATTR_S { 1311bd4fe43Sopenharmony_ci RGN_AREA_TYPE_E enCoverType; /* rect or arbitary quadrilateral COVER */ 1321bd4fe43Sopenharmony_ci union { 1331bd4fe43Sopenharmony_ci RECT_S stRect; /* config of rect */ 1341bd4fe43Sopenharmony_ci RGN_QUADRANGLE_S stQuadRangle; /* config of arbitary quadrilateral COVER */ 1351bd4fe43Sopenharmony_ci }; 1361bd4fe43Sopenharmony_ci HI_U32 u32Color; 1371bd4fe43Sopenharmony_ci HI_U32 u32Layer; /* COVER region layer */ 1381bd4fe43Sopenharmony_ci RGN_COORDINATE_E enCoordinate; /* ratio coordiante or abs coordinate */ 1391bd4fe43Sopenharmony_ci} COVER_CHN_ATTR_S; 1401bd4fe43Sopenharmony_ci 1411bd4fe43Sopenharmony_citypedef struct hiCOVEREX_CHN_ATTR_S { 1421bd4fe43Sopenharmony_ci RGN_AREA_TYPE_E enCoverType; /* rect or arbitary quadrilateral COVER */ 1431bd4fe43Sopenharmony_ci union { 1441bd4fe43Sopenharmony_ci RECT_S stRect; /* config of rect */ 1451bd4fe43Sopenharmony_ci RGN_QUADRANGLE_S stQuadRangle; /* config of arbitary quadrilateral COVER */ 1461bd4fe43Sopenharmony_ci }; 1471bd4fe43Sopenharmony_ci HI_U32 u32Color; 1481bd4fe43Sopenharmony_ci HI_U32 u32Layer; /* COVEREX region layer range */ 1491bd4fe43Sopenharmony_ci} COVEREX_CHN_ATTR_S; 1501bd4fe43Sopenharmony_ci 1511bd4fe43Sopenharmony_citypedef enum hiMOSAIC_BLK_SIZE_E { 1521bd4fe43Sopenharmony_ci MOSAIC_BLK_SIZE_8 = 0, /* block size 8*8 of MOSAIC */ 1531bd4fe43Sopenharmony_ci MOSAIC_BLK_SIZE_16, /* block size 16*16 of MOSAIC */ 1541bd4fe43Sopenharmony_ci MOSAIC_BLK_SIZE_32, /* block size 32*32 of MOSAIC */ 1551bd4fe43Sopenharmony_ci MOSAIC_BLK_SIZE_64, /* block size 64*64 of MOSAIC */ 1561bd4fe43Sopenharmony_ci MOSAIC_BLK_SIZE_BUTT 1571bd4fe43Sopenharmony_ci} MOSAIC_BLK_SIZE_E; 1581bd4fe43Sopenharmony_ci 1591bd4fe43Sopenharmony_citypedef struct hiMOSAIC_CHN_ATTR_S { 1601bd4fe43Sopenharmony_ci RECT_S stRect; /* location of MOSAIC */ 1611bd4fe43Sopenharmony_ci MOSAIC_BLK_SIZE_E enBlkSize; /* block size of MOSAIC */ 1621bd4fe43Sopenharmony_ci HI_U32 u32Layer; /* MOSAIC region layer range:[0,3] */ 1631bd4fe43Sopenharmony_ci} MOSAIC_CHN_ATTR_S; 1641bd4fe43Sopenharmony_ci 1651bd4fe43Sopenharmony_citypedef struct hiOVERLAYEX_COMM_ATTR_S { 1661bd4fe43Sopenharmony_ci PIXEL_FORMAT_E enPixelFmt; 1671bd4fe43Sopenharmony_ci 1681bd4fe43Sopenharmony_ci /* background color, pixel format depends on "enPixelFmt" */ 1691bd4fe43Sopenharmony_ci HI_U32 u32BgColor; 1701bd4fe43Sopenharmony_ci 1711bd4fe43Sopenharmony_ci /* region size,W:[2,RGN_OVERLAY_MAX_WIDTH],align:2,H:[2,RGN_OVERLAY_MAX_HEIGHT],align:2 */ 1721bd4fe43Sopenharmony_ci SIZE_S stSize; 1731bd4fe43Sopenharmony_ci HI_U32 u32CanvasNum; 1741bd4fe43Sopenharmony_ci} OVERLAYEX_ATTR_S; 1751bd4fe43Sopenharmony_ci 1761bd4fe43Sopenharmony_citypedef struct hiOVERLAYEX_CHN_ATTR_S { 1771bd4fe43Sopenharmony_ci /* X:[0,RGN_OVERLAY_MAX_X],align:2,Y:[0,RGN_OVERLAY_MAX_Y],align:2 */ 1781bd4fe43Sopenharmony_ci POINT_S stPoint; 1791bd4fe43Sopenharmony_ci 1801bd4fe43Sopenharmony_ci /* 1811bd4fe43Sopenharmony_ci * background an foreground transparence when pixel format is ARGB1555 1821bd4fe43Sopenharmony_ci * the pixel format is ARGB1555,when the alpha bit is 1 this alpha is value! 1831bd4fe43Sopenharmony_ci * range:[0,255] 1841bd4fe43Sopenharmony_ci */ 1851bd4fe43Sopenharmony_ci HI_U32 u32FgAlpha; 1861bd4fe43Sopenharmony_ci 1871bd4fe43Sopenharmony_ci /* 1881bd4fe43Sopenharmony_ci * background an foreground transparence when pixel format is ARGB1555 1891bd4fe43Sopenharmony_ci * the pixel format is ARGB1555,when the alpha bit is 0 this alpha is value! 1901bd4fe43Sopenharmony_ci * range:[0,255] 1911bd4fe43Sopenharmony_ci */ 1921bd4fe43Sopenharmony_ci HI_U32 u32BgAlpha; 1931bd4fe43Sopenharmony_ci 1941bd4fe43Sopenharmony_ci HI_U32 u32Layer; /* OVERLAYEX region layer range:[0,15] */ 1951bd4fe43Sopenharmony_ci 1961bd4fe43Sopenharmony_ci HI_U16 u16ColorLUT[RGN_COLOR_LUT_NUM]; 1971bd4fe43Sopenharmony_ci} OVERLAYEX_CHN_ATTR_S; 1981bd4fe43Sopenharmony_ci 1991bd4fe43Sopenharmony_citypedef union hiRGN_ATTR_U { 2001bd4fe43Sopenharmony_ci OVERLAY_ATTR_S stOverlay; /* attribute of overlay region */ 2011bd4fe43Sopenharmony_ci OVERLAYEX_ATTR_S stOverlayEx; /* attribute of overlayex region */ 2021bd4fe43Sopenharmony_ci} RGN_ATTR_U; 2031bd4fe43Sopenharmony_ci 2041bd4fe43Sopenharmony_citypedef union hiRGN_CHN_ATTR_U { 2051bd4fe43Sopenharmony_ci OVERLAY_CHN_ATTR_S stOverlayChn; /* attribute of overlay region */ 2061bd4fe43Sopenharmony_ci COVER_CHN_ATTR_S stCoverChn; /* attribute of cover region */ 2071bd4fe43Sopenharmony_ci COVEREX_CHN_ATTR_S stCoverExChn; /* attribute of coverex region */ 2081bd4fe43Sopenharmony_ci OVERLAYEX_CHN_ATTR_S stOverlayExChn; /* attribute of overlayex region */ 2091bd4fe43Sopenharmony_ci MOSAIC_CHN_ATTR_S stMosaicChn; /* attribute of mosic region */ 2101bd4fe43Sopenharmony_ci} RGN_CHN_ATTR_U; 2111bd4fe43Sopenharmony_ci 2121bd4fe43Sopenharmony_ci/* attribute of a region */ 2131bd4fe43Sopenharmony_citypedef struct hiRGN_ATTR_S { 2141bd4fe43Sopenharmony_ci RGN_TYPE_E enType; /* region type */ 2151bd4fe43Sopenharmony_ci RGN_ATTR_U unAttr; /* region attribute */ 2161bd4fe43Sopenharmony_ci} RGN_ATTR_S; 2171bd4fe43Sopenharmony_ci 2181bd4fe43Sopenharmony_ci/* attribute of a region */ 2191bd4fe43Sopenharmony_citypedef struct hiRGN_CHN_ATTR_S { 2201bd4fe43Sopenharmony_ci HI_BOOL bShow; 2211bd4fe43Sopenharmony_ci RGN_TYPE_E enType; /* region type */ 2221bd4fe43Sopenharmony_ci RGN_CHN_ATTR_U unChnAttr; /* region attribute */ 2231bd4fe43Sopenharmony_ci} RGN_CHN_ATTR_S; 2241bd4fe43Sopenharmony_ci 2251bd4fe43Sopenharmony_citypedef struct hiRGN_BMP_UPDATE_S { 2261bd4fe43Sopenharmony_ci POINT_S stPoint; 2271bd4fe43Sopenharmony_ci BITMAP_S stBmp; 2281bd4fe43Sopenharmony_ci HI_U32 u32Stride; 2291bd4fe43Sopenharmony_ci} RGN_BMP_UPDATE_S; 2301bd4fe43Sopenharmony_ci 2311bd4fe43Sopenharmony_citypedef struct hiRGN_BMP_UPDATE_CFG_S { 2321bd4fe43Sopenharmony_ci HI_U32 u32BmpCnt; 2331bd4fe43Sopenharmony_ci RGN_BMP_UPDATE_S astBmpUpdate[RGN_MAX_BMP_UPDATE_NUM]; 2341bd4fe43Sopenharmony_ci} RGN_BMP_UPDATE_CFG_S; 2351bd4fe43Sopenharmony_ci 2361bd4fe43Sopenharmony_citypedef struct hiRGN_CANVAS_INFO_S { 2371bd4fe43Sopenharmony_ci HI_U64 u64PhyAddr; 2381bd4fe43Sopenharmony_ci HI_U64 u64VirtAddr; 2391bd4fe43Sopenharmony_ci SIZE_S stSize; 2401bd4fe43Sopenharmony_ci HI_U32 u32Stride; 2411bd4fe43Sopenharmony_ci PIXEL_FORMAT_E enPixelFmt; 2421bd4fe43Sopenharmony_ci} RGN_CANVAS_INFO_S; 2431bd4fe43Sopenharmony_ci 2441bd4fe43Sopenharmony_ci/* PingPong buffer change when set attr, it needs to remap memory in mpi interface */ 2451bd4fe43Sopenharmony_ci#define HI_NOTICE_RGN_BUFFER_CHANGE HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_NOTICE, HI_SUCCESS) 2461bd4fe43Sopenharmony_ci 2471bd4fe43Sopenharmony_ci/* invlalid device ID */ 2481bd4fe43Sopenharmony_ci#define HI_ERR_RGN_INVALID_DEVID HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_DEVID) 2491bd4fe43Sopenharmony_ci/* invlalid channel ID */ 2501bd4fe43Sopenharmony_ci#define HI_ERR_RGN_INVALID_CHNID HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID) 2511bd4fe43Sopenharmony_ci/* at lease one parameter is illagal ,eg, an illegal enumeration value */ 2521bd4fe43Sopenharmony_ci#define HI_ERR_RGN_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM) 2531bd4fe43Sopenharmony_ci/* channel exists */ 2541bd4fe43Sopenharmony_ci#define HI_ERR_RGN_EXIST HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST) 2551bd4fe43Sopenharmony_ci/* UN exist */ 2561bd4fe43Sopenharmony_ci#define HI_ERR_RGN_UNEXIST HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST) 2571bd4fe43Sopenharmony_ci/* using a NULL point */ 2581bd4fe43Sopenharmony_ci#define HI_ERR_RGN_NULL_PTR HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR) 2591bd4fe43Sopenharmony_ci/* try to enable or initialize system,device or channel, before configing attribute */ 2601bd4fe43Sopenharmony_ci#define HI_ERR_RGN_NOT_CONFIG HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_CONFIG) 2611bd4fe43Sopenharmony_ci/* operation is not supported by NOW */ 2621bd4fe43Sopenharmony_ci#define HI_ERR_RGN_NOT_SUPPORT HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT) 2631bd4fe43Sopenharmony_ci/* operation is not permitted ,eg, try to change stati attribute */ 2641bd4fe43Sopenharmony_ci#define HI_ERR_RGN_NOT_PERM HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM) 2651bd4fe43Sopenharmony_ci/* failure caused by malloc memory */ 2661bd4fe43Sopenharmony_ci#define HI_ERR_RGN_NOMEM HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM) 2671bd4fe43Sopenharmony_ci/* failure caused by malloc buffer */ 2681bd4fe43Sopenharmony_ci#define HI_ERR_RGN_NOBUF HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF) 2691bd4fe43Sopenharmony_ci/* no data in buffer */ 2701bd4fe43Sopenharmony_ci#define HI_ERR_RGN_BUF_EMPTY HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY) 2711bd4fe43Sopenharmony_ci/* no buffer for new data */ 2721bd4fe43Sopenharmony_ci#define HI_ERR_RGN_BUF_FULL HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL) 2731bd4fe43Sopenharmony_ci/* bad address, eg. used for copy_from_user & copy_to_user */ 2741bd4fe43Sopenharmony_ci#define HI_ERR_RGN_BADADDR HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_BADADDR) 2751bd4fe43Sopenharmony_ci/* resource is busy, eg. destroy a venc chn without unregistering it */ 2761bd4fe43Sopenharmony_ci#define HI_ERR_RGN_BUSY HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY) 2771bd4fe43Sopenharmony_ci 2781bd4fe43Sopenharmony_ci/* 2791bd4fe43Sopenharmony_ci * System is not ready,maybe not initialed or loaded. 2801bd4fe43Sopenharmony_ci * Returning the error code when opening a device file failed. 2811bd4fe43Sopenharmony_ci */ 2821bd4fe43Sopenharmony_ci#define HI_ERR_RGN_NOTREADY HI_DEF_ERR(HI_ID_RGN, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY) 2831bd4fe43Sopenharmony_ci 2841bd4fe43Sopenharmony_ci#ifdef __cplusplus 2851bd4fe43Sopenharmony_ci#if __cplusplus 2861bd4fe43Sopenharmony_ci} 2871bd4fe43Sopenharmony_ci#endif 2881bd4fe43Sopenharmony_ci#endif /* __cplusplus */ 2891bd4fe43Sopenharmony_ci#endif /* __HI_COMM_REGION_H__ */ 290