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
161bd4fe43Sopenharmony_ci#ifndef __HI_COMM_VDEC_H__
171bd4fe43Sopenharmony_ci#define __HI_COMM_VDEC_H__
181bd4fe43Sopenharmony_ci#include "hi_type.h"
191bd4fe43Sopenharmony_ci#include "hi_common.h"
201bd4fe43Sopenharmony_ci#include "hi_errno.h"
211bd4fe43Sopenharmony_ci#include "hi_comm_video.h"
221bd4fe43Sopenharmony_ci#include "hi_comm_vb.h"
231bd4fe43Sopenharmony_ci#include "hi_defines.h"
241bd4fe43Sopenharmony_ci
251bd4fe43Sopenharmony_ci#ifdef __cplusplus
261bd4fe43Sopenharmony_ci#if __cplusplus
271bd4fe43Sopenharmony_ciextern "C" {
281bd4fe43Sopenharmony_ci#endif
291bd4fe43Sopenharmony_ci#endif /* End of #ifdef __cplusplus */
301bd4fe43Sopenharmony_ci
311bd4fe43Sopenharmony_ci#define HI_IO_BLOCK               HI_TRUE
321bd4fe43Sopenharmony_ci#define HI_IO_NOBLOCK             HI_FALSE
331bd4fe43Sopenharmony_ci
341bd4fe43Sopenharmony_citypedef enum hiVIDEO_MODE_E {
351bd4fe43Sopenharmony_ci    VIDEO_MODE_STREAM = 0, /* send by stream */
361bd4fe43Sopenharmony_ci    VIDEO_MODE_FRAME, /* send by frame  */
371bd4fe43Sopenharmony_ci    VIDEO_MODE_COMPAT, /* One frame supports multiple packets sending. */
381bd4fe43Sopenharmony_ci    /* The current frame is considered to end when bEndOfFrame is equal to HI_TRUE */
391bd4fe43Sopenharmony_ci    VIDEO_MODE_BUTT
401bd4fe43Sopenharmony_ci} VIDEO_MODE_E;
411bd4fe43Sopenharmony_ci
421bd4fe43Sopenharmony_citypedef struct hiVDEC_ATTR_VIDEO_S {
431bd4fe43Sopenharmony_ci    HI_U32 u32RefFrameNum; /* RW, Range: [0, 16]; reference frame num. */
441bd4fe43Sopenharmony_ci    HI_BOOL bTemporalMvpEnable; /* RW; */
451bd4fe43Sopenharmony_ci    /* specifies whether temporal motion vector predictors can be used for inter prediction */
461bd4fe43Sopenharmony_ci    HI_U32 u32TmvBufSize; /* RW; tmv buffer size(Byte) */
471bd4fe43Sopenharmony_ci} VDEC_ATTR_VIDEO_S;
481bd4fe43Sopenharmony_ci
491bd4fe43Sopenharmony_citypedef struct hiVDEC_CHN_ATTR_S {
501bd4fe43Sopenharmony_ci    PAYLOAD_TYPE_E enType; /* RW; video type to be decoded   */
511bd4fe43Sopenharmony_ci    VIDEO_MODE_E enMode; /* RW; send by stream or by frame */
521bd4fe43Sopenharmony_ci    HI_U32 u32PicWidth; /* RW; max pic width */
531bd4fe43Sopenharmony_ci    HI_U32 u32PicHeight; /* RW; max pic height */
541bd4fe43Sopenharmony_ci    HI_U32 u32StreamBufSize; /* RW; stream buffer size(Byte) */
551bd4fe43Sopenharmony_ci    HI_U32 u32FrameBufSize; /* RW; frame buffer size(Byte) */
561bd4fe43Sopenharmony_ci    HI_U32 u32FrameBufCnt;
571bd4fe43Sopenharmony_ci    union {
581bd4fe43Sopenharmony_ci        VDEC_ATTR_VIDEO_S stVdecVideoAttr; /* structure with video ( h264/h265) */
591bd4fe43Sopenharmony_ci    };
601bd4fe43Sopenharmony_ci} VDEC_CHN_ATTR_S;
611bd4fe43Sopenharmony_ci
621bd4fe43Sopenharmony_citypedef struct hiVDEC_STREAM_S {
631bd4fe43Sopenharmony_ci    HI_U32 u32Len; /* W; stream len */
641bd4fe43Sopenharmony_ci    HI_U64 u64PTS; /* W; time stamp */
651bd4fe43Sopenharmony_ci    HI_BOOL bEndOfFrame; /* W; is the end of a frame */
661bd4fe43Sopenharmony_ci    HI_BOOL bEndOfStream; /* W; is the end of all stream */
671bd4fe43Sopenharmony_ci    HI_BOOL bDisplay; /* W; is the current frame displayed. only valid by VIDEO_MODE_FRAME */
681bd4fe43Sopenharmony_ci    HI_U8 *ATTRIBUTE pu8Addr; /* W; stream address */
691bd4fe43Sopenharmony_ci} VDEC_STREAM_S;
701bd4fe43Sopenharmony_ci
711bd4fe43Sopenharmony_citypedef struct hiVDEC_USERDATA_S {
721bd4fe43Sopenharmony_ci    HI_U64 u64PhyAddr; /* R; userdata data phy address */
731bd4fe43Sopenharmony_ci    HI_U32 u32Len; /* R; userdata data len */
741bd4fe43Sopenharmony_ci    HI_BOOL bValid; /* R; is valid? */
751bd4fe43Sopenharmony_ci    HI_U8 *ATTRIBUTE pu8Addr; /* R; userdata data vir address */
761bd4fe43Sopenharmony_ci} VDEC_USERDATA_S;
771bd4fe43Sopenharmony_ci
781bd4fe43Sopenharmony_citypedef struct hi_VDEC_DECODE_ERROR_S {
791bd4fe43Sopenharmony_ci    HI_S32 s32FormatErr; /* R; format error. eg: do not support filed */
801bd4fe43Sopenharmony_ci    HI_S32 s32PicSizeErrSet; /* R; picture width or height is larger than chnnel width or height */
811bd4fe43Sopenharmony_ci    HI_S32 s32StreamUnsprt; /* R; unsupport the stream specification */
821bd4fe43Sopenharmony_ci    HI_S32 s32PackErr; /* R; stream package error */
831bd4fe43Sopenharmony_ci    HI_S32 s32PrtclNumErrSet; /* R; protocol num is not enough. eg: slice, pps, sps */
841bd4fe43Sopenharmony_ci    HI_S32 s32RefErrSet; /* R; refrence num is not enough */
851bd4fe43Sopenharmony_ci    HI_S32 s32PicBufSizeErrSet; /* R; the buffer size of picture is not enough */
861bd4fe43Sopenharmony_ci    HI_S32 s32StreamSizeOver; /* R; the stream size is too big and force discard stream */
871bd4fe43Sopenharmony_ci    HI_S32 s32VdecStreamNotRelease; /* R; the stream not released for too long time */
881bd4fe43Sopenharmony_ci} VDEC_DECODE_ERROR_S;
891bd4fe43Sopenharmony_ci
901bd4fe43Sopenharmony_citypedef struct hiVDEC_CHN_STATUS_S {
911bd4fe43Sopenharmony_ci    PAYLOAD_TYPE_E enType; /* R; video type to be decoded */
921bd4fe43Sopenharmony_ci    HI_U32 u32LeftStreamBytes; /* R; left stream bytes waiting for decode */
931bd4fe43Sopenharmony_ci    HI_U32 u32LeftStreamFrames; /* R; left frames waiting for decode,only valid for VIDEO_MODE_FRAME */
941bd4fe43Sopenharmony_ci    HI_U32 u32LeftPics; /* R; pics waiting for output */
951bd4fe43Sopenharmony_ci    HI_BOOL bStartRecvStream; /* R; had started recv stream? */
961bd4fe43Sopenharmony_ci    HI_U32 u32RecvStreamFrames; /* R; how many frames of stream has been received. valid when send by frame. */
971bd4fe43Sopenharmony_ci    HI_U32 u32DecodeStreamFrames; /* R; how many frames of stream has been decoded. valid when send by frame. */
981bd4fe43Sopenharmony_ci    VDEC_DECODE_ERROR_S stVdecDecErr; /* R; information about decode error */
991bd4fe43Sopenharmony_ci    HI_U32 u32Width; /* R; the width of the currently decoded stream */
1001bd4fe43Sopenharmony_ci    HI_U32 u32Height; /* R; the height of the currently decoded stream */
1011bd4fe43Sopenharmony_ci} VDEC_CHN_STATUS_S;
1021bd4fe43Sopenharmony_ci
1031bd4fe43Sopenharmony_citypedef enum hiVIDEO_DEC_MODE_E {
1041bd4fe43Sopenharmony_ci    VIDEO_DEC_MODE_IPB = 0,
1051bd4fe43Sopenharmony_ci    VIDEO_DEC_MODE_IP,
1061bd4fe43Sopenharmony_ci    VIDEO_DEC_MODE_I,
1071bd4fe43Sopenharmony_ci    VIDEO_DEC_MODE_BUTT
1081bd4fe43Sopenharmony_ci} VIDEO_DEC_MODE_E;
1091bd4fe43Sopenharmony_ci
1101bd4fe43Sopenharmony_citypedef enum hiVIDEO_OUTPUT_ORDER_E {
1111bd4fe43Sopenharmony_ci    VIDEO_OUTPUT_ORDER_DISP = 0,
1121bd4fe43Sopenharmony_ci    VIDEO_OUTPUT_ORDER_DEC,
1131bd4fe43Sopenharmony_ci    VIDEO_OUTPUT_ORDER_BUTT
1141bd4fe43Sopenharmony_ci} VIDEO_OUTPUT_ORDER_E;
1151bd4fe43Sopenharmony_ci
1161bd4fe43Sopenharmony_citypedef struct hiVDEC_PARAM_VIDEO_S {
1171bd4fe43Sopenharmony_ci    HI_S32 s32ErrThreshold; /* RW, Range: [0, 100]; */
1181bd4fe43Sopenharmony_ci    /* threshold for stream error process, 0: discard with any error, 100 : keep data with any error */
1191bd4fe43Sopenharmony_ci    VIDEO_DEC_MODE_E enDecMode; /* RW; */
1201bd4fe43Sopenharmony_ci    /* decode mode , 0: deocde IPB frames, 1: only decode I frame & P frame , 2: only decode I frame */
1211bd4fe43Sopenharmony_ci    VIDEO_OUTPUT_ORDER_E enOutputOrder; /* RW; */
1221bd4fe43Sopenharmony_ci    /* frames output order ,0: the same with display order , 1: the same width decoder order */
1231bd4fe43Sopenharmony_ci    COMPRESS_MODE_E enCompressMode; /* RW; compress mode */
1241bd4fe43Sopenharmony_ci    VIDEO_FORMAT_E enVideoFormat; /* RW; video format */
1251bd4fe43Sopenharmony_ci    HI_BOOL bCompositeDecEnable; /* RW; HI_FALSE: output base layer; HI_TRUE: output enhance layer; default: HI_FALSE */
1261bd4fe43Sopenharmony_ci} VDEC_PARAM_VIDEO_S;
1271bd4fe43Sopenharmony_ci
1281bd4fe43Sopenharmony_citypedef struct hiVDEC_PARAM_PICTURE_S {
1291bd4fe43Sopenharmony_ci    PIXEL_FORMAT_E enPixelFormat; /* RW; out put pixel format */
1301bd4fe43Sopenharmony_ci    HI_U32 u32Alpha; /* RW, Range: [0, 255]; value 0 is transparent. */
1311bd4fe43Sopenharmony_ci    /* [0 ,127]   is deemed to transparent when enPixelFormat is ARGB1555 or ABGR1555
1321bd4fe43Sopenharmony_ci     * [128 ,256] is deemed to non-transparent when enPixelFormat is ARGB1555 or ABGR1555
1331bd4fe43Sopenharmony_ci     */
1341bd4fe43Sopenharmony_ci} VDEC_PARAM_PICTURE_S;
1351bd4fe43Sopenharmony_ci
1361bd4fe43Sopenharmony_citypedef struct hiVDEC_CHN_PARAM_S {
1371bd4fe43Sopenharmony_ci    PAYLOAD_TYPE_E enType; /* RW; video type to be decoded   */
1381bd4fe43Sopenharmony_ci    HI_U32 u32DisplayFrameNum; /* RW, Range: [0, 16]; display frame num */
1391bd4fe43Sopenharmony_ci    union {
1401bd4fe43Sopenharmony_ci        VDEC_PARAM_VIDEO_S stVdecVideoParam; /* structure with video ( h265/h264) */
1411bd4fe43Sopenharmony_ci        VDEC_PARAM_PICTURE_S stVdecPictureParam; /* structure with picture (jpeg/mjpeg ) */
1421bd4fe43Sopenharmony_ci    };
1431bd4fe43Sopenharmony_ci} VDEC_CHN_PARAM_S;
1441bd4fe43Sopenharmony_ci
1451bd4fe43Sopenharmony_citypedef struct hiH264_PRTCL_PARAM_S {
1461bd4fe43Sopenharmony_ci    HI_S32 s32MaxSliceNum; /* RW; max slice num support */
1471bd4fe43Sopenharmony_ci    HI_S32 s32MaxSpsNum; /* RW; max sps num support */
1481bd4fe43Sopenharmony_ci    HI_S32 s32MaxPpsNum; /* RW; max pps num support */
1491bd4fe43Sopenharmony_ci} H264_PRTCL_PARAM_S;
1501bd4fe43Sopenharmony_ci
1511bd4fe43Sopenharmony_citypedef struct hiH265_PRTCL_PARAM_S {
1521bd4fe43Sopenharmony_ci    HI_S32 s32MaxSliceSegmentNum; /* RW; max slice segmnet num support */
1531bd4fe43Sopenharmony_ci    HI_S32 s32MaxVpsNum; /* RW; max vps num support */
1541bd4fe43Sopenharmony_ci    HI_S32 s32MaxSpsNum; /* RW; max sps num support */
1551bd4fe43Sopenharmony_ci    HI_S32 s32MaxPpsNum; /* RW; max pps num support */
1561bd4fe43Sopenharmony_ci} H265_PRTCL_PARAM_S;
1571bd4fe43Sopenharmony_ci
1581bd4fe43Sopenharmony_citypedef struct hiVDEC_PRTCL_PARAM_S {
1591bd4fe43Sopenharmony_ci    PAYLOAD_TYPE_E enType; /* RW; video type to be decoded, only h264 and h265 supported */
1601bd4fe43Sopenharmony_ci    union {
1611bd4fe43Sopenharmony_ci        H264_PRTCL_PARAM_S stH264PrtclParam; /* protocol param structure for h264 */
1621bd4fe43Sopenharmony_ci        H265_PRTCL_PARAM_S stH265PrtclParam; /* protocol param structure for h265 */
1631bd4fe43Sopenharmony_ci    };
1641bd4fe43Sopenharmony_ci} VDEC_PRTCL_PARAM_S;
1651bd4fe43Sopenharmony_ci
1661bd4fe43Sopenharmony_citypedef struct hiVDEC_CHN_POOL_S {
1671bd4fe43Sopenharmony_ci    VB_POOL hPicVbPool; /* RW;  vb pool id for pic buffer */
1681bd4fe43Sopenharmony_ci    VB_POOL hTmvVbPool; /* RW;  vb pool id for tmv buffer */
1691bd4fe43Sopenharmony_ci} VDEC_CHN_POOL_S;
1701bd4fe43Sopenharmony_ci
1711bd4fe43Sopenharmony_citypedef enum hiVDEC_EVNT_E {
1721bd4fe43Sopenharmony_ci    VDEC_EVNT_STREAM_ERR = 1,
1731bd4fe43Sopenharmony_ci    VDEC_EVNT_UNSUPPORT,
1741bd4fe43Sopenharmony_ci    VDEC_EVNT_OVER_REFTHR,
1751bd4fe43Sopenharmony_ci    VDEC_EVNT_REF_NUM_OVER,
1761bd4fe43Sopenharmony_ci    VDEC_EVNT_SLICE_NUM_OVER,
1771bd4fe43Sopenharmony_ci    VDEC_EVNT_SPS_NUM_OVER,
1781bd4fe43Sopenharmony_ci    VDEC_EVNT_PPS_NUM_OVER,
1791bd4fe43Sopenharmony_ci    VDEC_EVNT_PICBUF_SIZE_ERR,
1801bd4fe43Sopenharmony_ci    VDEC_EVNT_SIZE_OVER,
1811bd4fe43Sopenharmony_ci    VDEC_EVNT_IMG_SIZE_CHANGE,
1821bd4fe43Sopenharmony_ci    VDEC_EVNT_VPS_NUM_OVER,
1831bd4fe43Sopenharmony_ci    VDEC_EVNT_BUTT
1841bd4fe43Sopenharmony_ci} VDEC_EVNT_E;
1851bd4fe43Sopenharmony_ci
1861bd4fe43Sopenharmony_citypedef enum hiVDEC_CAPACITY_STRATEGY_E {
1871bd4fe43Sopenharmony_ci    VDEC_CAPACITY_STRATEGY_BY_MOD = 0,
1881bd4fe43Sopenharmony_ci    VDEC_CAPACITY_STRATEGY_BY_CHN = 1,
1891bd4fe43Sopenharmony_ci    VDEC_CAPACITY_STRATEGY_BUTT
1901bd4fe43Sopenharmony_ci} VDEC_CAPACITY_STRATEGY_E;
1911bd4fe43Sopenharmony_ci
1921bd4fe43Sopenharmony_citypedef struct hiVDEC_VIDEO_MOD_PARAM_S {
1931bd4fe43Sopenharmony_ci    HI_U32 u32MaxPicWidth;
1941bd4fe43Sopenharmony_ci    HI_U32 u32MaxPicHeight;
1951bd4fe43Sopenharmony_ci    HI_U32 u32MaxSliceNum;
1961bd4fe43Sopenharmony_ci    HI_U32 u32VdhMsgNum;
1971bd4fe43Sopenharmony_ci    HI_U32 u32VdhBinSize;
1981bd4fe43Sopenharmony_ci    HI_U32 u32VdhExtMemLevel;
1991bd4fe43Sopenharmony_ci} VDEC_VIDEO_MOD_PARAM_S;
2001bd4fe43Sopenharmony_ci
2011bd4fe43Sopenharmony_citypedef struct hiVDEC_PICTURE_MOD_PARAM_S {
2021bd4fe43Sopenharmony_ci    HI_U32 u32MaxPicWidth;
2031bd4fe43Sopenharmony_ci    HI_U32 u32MaxPicHeight;
2041bd4fe43Sopenharmony_ci    HI_BOOL bSupportProgressive;
2051bd4fe43Sopenharmony_ci    HI_BOOL bDynamicAllocate;
2061bd4fe43Sopenharmony_ci    VDEC_CAPACITY_STRATEGY_E enCapStrategy;
2071bd4fe43Sopenharmony_ci} VDEC_PICTURE_MOD_PARAM_S;
2081bd4fe43Sopenharmony_ci
2091bd4fe43Sopenharmony_citypedef struct hiVDEC_MOD_PARAM_S {
2101bd4fe43Sopenharmony_ci    VB_SOURCE_E enVdecVBSource; /* RW, Range: [1, 3];  frame buffer mode  */
2111bd4fe43Sopenharmony_ci    HI_U32 u32MiniBufMode; /* RW, Range: [0, 1];  stream buffer mode */
2121bd4fe43Sopenharmony_ci    HI_U32 u32ParallelMode; /* RW, Range: [0, 1];  VDH working mode   */
2131bd4fe43Sopenharmony_ci    VDEC_VIDEO_MOD_PARAM_S stVideoModParam;
2141bd4fe43Sopenharmony_ci    VDEC_PICTURE_MOD_PARAM_S stPictureModParam;
2151bd4fe43Sopenharmony_ci} VDEC_MOD_PARAM_S;
2161bd4fe43Sopenharmony_ci
2171bd4fe43Sopenharmony_citypedef struct hiVDEC_USER_DATA_ATTR_S {
2181bd4fe43Sopenharmony_ci    HI_BOOL bEnable;
2191bd4fe43Sopenharmony_ci    HI_U32  u32MaxUserDataLen;
2201bd4fe43Sopenharmony_ci} VDEC_USER_DATA_ATTR_S;
2211bd4fe43Sopenharmony_ci
2221bd4fe43Sopenharmony_ci/*********************************************************************************************/
2231bd4fe43Sopenharmony_ci/* invlalid channel ID */
2241bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_INVALID_CHNID HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_INVALID_CHNID)
2251bd4fe43Sopenharmony_ci/* at lease one parameter is illagal ,eg, an illegal enumeration value  */
2261bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_ILLEGAL_PARAM HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_ILLEGAL_PARAM)
2271bd4fe43Sopenharmony_ci/* channel exists */
2281bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_EXIST         HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_EXIST)
2291bd4fe43Sopenharmony_ci/* using a NULL point */
2301bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_NULL_PTR      HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_NULL_PTR)
2311bd4fe43Sopenharmony_ci/* try to enable or initialize system,device or channel, before configing attribute */
2321bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_NOT_CONFIG    HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_CONFIG)
2331bd4fe43Sopenharmony_ci/* operation is not supported by NOW */
2341bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_NOT_SUPPORT   HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_SUPPORT)
2351bd4fe43Sopenharmony_ci/* operation is not permitted ,eg, try to change stati attribute */
2361bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_NOT_PERM      HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_NOT_PERM)
2371bd4fe43Sopenharmony_ci/* the channle is not existed  */
2381bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_UNEXIST       HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_UNEXIST)
2391bd4fe43Sopenharmony_ci/* failure caused by malloc memory */
2401bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_NOMEM         HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_NOMEM)
2411bd4fe43Sopenharmony_ci/* failure caused by malloc buffer */
2421bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_NOBUF         HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_NOBUF)
2431bd4fe43Sopenharmony_ci/* no data in buffer */
2441bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_BUF_EMPTY     HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_EMPTY)
2451bd4fe43Sopenharmony_ci/* no buffer for new data */
2461bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_BUF_FULL      HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_BUF_FULL)
2471bd4fe43Sopenharmony_ci/* system is not ready,had not initialed or loaded */
2481bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_SYS_NOTREADY  HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_SYS_NOTREADY)
2491bd4fe43Sopenharmony_ci/* system busy */
2501bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_BUSY          HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_BUSY)
2511bd4fe43Sopenharmony_ci
2521bd4fe43Sopenharmony_ci/* bad address,  eg. used for copy_from_user & copy_to_user   */
2531bd4fe43Sopenharmony_ci#define HI_ERR_VDEC_BADADDR       HI_DEF_ERR(HI_ID_VDEC, EN_ERR_LEVEL_ERROR, EN_ERR_BADADDR)
2541bd4fe43Sopenharmony_ci
2551bd4fe43Sopenharmony_ci#ifdef __cplusplus
2561bd4fe43Sopenharmony_ci#if __cplusplus
2571bd4fe43Sopenharmony_ci}
2581bd4fe43Sopenharmony_ci#endif
2591bd4fe43Sopenharmony_ci#endif /* End of #ifdef __cplusplus */
2601bd4fe43Sopenharmony_ci
2611bd4fe43Sopenharmony_ci#endif /* End of #ifndef  __HI_COMM_VDEC_H__ */
2621bd4fe43Sopenharmony_ci
263