⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mp4decdrv.h

📁 ARM9基于WINDOWSCE的BSP源代码
💻 H
字号:
#ifndef MP4DECDRV_H
#define MP4DECDRV_H

/*------------------------------------------------------------------------------
    1. Include Headers
------------------------------------------------------------------------------*/
 
typedef unsigned char u8;   /* Unsigned 8 bit char                   */
typedef signed char i8;     /* Signed 8 bit char, 2's complement     */
typedef unsigned short u16; /* Unsigned 16 bit short                 */
typedef signed short i16;   /* Signed 16 short, 2's complement       */
typedef unsigned int u32;   /* Unsigned 32 bit integer               */
typedef signed int i32;     /* Signed 32 bit integer, 2's complement */

/*------------------------------------------------------------------------------
    2.1. API's return value enumerations.
------------------------------------------------------------------------------*/
 
    typedef enum {
	    MP4DEC_OK = 0,
        MP4DEC_STRM_PROCESSED = 1,
        MP4DEC_VOP_RDY, 
        MP4DEC_VOP_RDY_BUFF_NOT_EMPTY,
        MP4DEC_VOS_END,
        MP4DEC_HDRS_RDY,
        MP4DEC_HDRS_RDY_BUFF_NOT_EMPTY, 
        MP4DEC_PARAM_ERR = -1,
       	MP4DEC_STRM_ERR = -2,
        MP4DEC_STRM_ERR_BUFF_NOT_EMPTY = -3,
        MP4DEC_NOT_INITIALIZED = -4, 
        MP4DEC_MEMFAIL = -5,
        MP4DEC_DWLERR = -6,        
		MP4DEC_LACKINPUT = -7 ,
		MP4DEC_LACKOUTPUT = -8
    } MP4DecRet;


    
/*------------------------------------------------------------------------------
    3.1. Structures for MP4API_Decode() parameters.
------------------------------------------------------------------------------*/

	typedef void *MP4DecInst; 
	typedef void *VPDInst_t;
	
    typedef struct {

        u8  *pStream;            /* Pointer to stream to be decoded       */
        u32 streamBusAddress;	
        u32  dataLen;            /* Number of bytes to be decoded         */
    } MP4DecInput;

    typedef struct TimeCode
	{
    	u32 hours;
    	u32 minutes;
    	u32 seconds;
    	u32 timeIncr;
    	u32 timeRes;
	}
	TimeCode_t;
        
    typedef struct {

        u32 *pOutputPicture;     /* Pointer to the recent decoded picture
        								decoder output, YUV format		 */
        u8  *pStrmCurrPos;	
        u32 currBusAddress;							
        u32 nbrOfErrMBs;        /* Number of concealed MB's in last VOP  */
        TimeCode_t timeCode;
    } MP4DecOutput;
    
/*------------------------------------------------------------------------------
    3.2. Structures for information interchange with DEC API 
         and user application.
------------------------------------------------------------------------------*/

	typedef struct{
		u32 frameWidth;
		u32 frameHeight;
		u32 videoObjectLayerWidth;
		u32 videoObjectLayerHeight;
		u32 isShortVideo;
		u32 profileAndLevelIndication;
		u32 videoFormat;
		u32 videoRange;
		u32 vopNumber;
		u32 vopCodingType;
		u32 resyncMarkerDisable;
		u32 vopQp;
	} MP4DecInfo;

	/* Version information */
	typedef struct MP4DecApiVersion
	{
    	u32 major;    /* Decoder API major version */
    	u32 minor;    /* Dncoder API minor version */
	} MP4DecApiVersion_t;	

	    typedef enum {
        VPD_OK = 0,
        VPD_ERR = -1,
        VPD_PARAM_ERR = -2,
        VPD_ARGNULL = -3
    } VPDResult;
  
/*------------------------------------------------------------------------------
    3.1. VPD Instance pointer
------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------
    3.2. Structures for information interchange with 
          VPD API and user application.
------------------------------------------------------------------------------*/

typedef struct vpdGeneral {
    u32 vpdOutputBusAddr;
    u32 vpdOutCbBus;
    u32 vpdOutCrBus;
    u32 scaledFrameWidth;
    u32 scaledFrameHeight;
    u32 postProcessValue;
    u32 enablePatternRecogn;
}vpdGeneral_t;

typedef struct vpdRgb {
    u32 rgbEnable;
    u32 rgbColorDepth;
    u32 ditheringEnable;
    i32 contrast;
    i32 brightness;
    i32 saturation;
}vpdRgb_t;

typedef struct vpdConvFactor {
    u32 customRgbFactorsEna;
    u32 a;
    u32 b;
    u32 c;
    u32 d;
    u32 e;
}vpdConvFactor_t;
        
typedef struct vpdZoom {
    
    u32 digitalZoomEnable;
    /* NOTE: these are coordinates of the input frame */ 
    u32 zoomCoordY; 
    u32 zoomCoordX;
    u32 zoomHeight;
    u32 zoomWidth;
}vpdZoom_t;

typedef struct vpdMask1 {
    u32 mask1Enable;
    /* NOTE: these are coordinates of the scaled output image,
     not the whole display */
    u32 mask1StartCoordY; 
    u32 mask1StartCoordX;
    u32 mask1EndCoordY;
    u32 mask1EndCoordX;
}vpdMask1_t;

typedef struct vpdMask2 {
    u32 mask2Enable;
    /* NOTE: these are coordinates of the scaled output image,
     not the whole display */
    u32 mask2StartCoordY;
    u32 mask2StartCoordX;
    u32 mask2EndCoordY;
    u32 mask2EndCoordX;
}vpdMask2_t;

typedef struct vpdPosition{
    /* NOTE: these are coordinates of the output display */
    i32 outStartCoordX;
    i32 outStartCoordY;
    u32 displayWidth; 
    u32 displayHeight;
}vpdPosition_t;
    
typedef struct vpdExtInput {        
    u32 extInputBusAddr;
    u32 extFrameWidth;
    u32 extFrameHeight;
    u32 videoRange;
    u32 extQp;
}vpdExtInput_t;

typedef struct {
    vpdGeneral_t    vpdGeneral;
    vpdRgb_t        vpdRgb;
    vpdConvFactor_t vpdConvFact;     
    vpdZoom_t       vpdZoom;
    vpdMask1_t      vpdMask1;
    vpdMask2_t      vpdMask2;
    vpdPosition_t   vpdPosition;
    vpdExtInput_t   vpdExtInput;    
} VPDConfig_t;

    /* Version information */
typedef struct VPDApiVersion{
    u32 major;    /* VPD API major version */
    u32 minor;    /* VPD API minor version */
} VPDApiVersion_t;  

#ifdef __cplusplus
extern "C"
{
#endif
typedef	MP4DecRet (*MP4DecDecodeProc)(MP4DecInst decInst, 
                        MP4DecInput  		*pInput, 
                        MP4DecOutput 		*pOutput);
    
typedef	MP4DecRet (*MP4DecInitProc)(MP4DecInst *decInst);

typedef	MP4DecRet (*MP4DecGetInfoProc)(MP4DecInst decInst,
    							MP4DecInfo	*pDecInfo);
                                   
typedef	void  (*MP4DecReleaseProc)(MP4DecInst decInst);
 
typedef	MP4DecApiVersion_t (*MP4DecGetAPIVersionProc)(void);
	
typedef	VPDResult (*VPDInitProc)(VPDInst_t * vpdInst, MP4DecInst *decInst);

typedef	VPDResult (*VPDGetConfigProc)(VPDInst_t vpdInst, VPDConfig_t *vpdConf);

typedef VPDResult (*VPDSetConfigProc)(VPDInst_t vpdInst, VPDConfig_t *vpdConf);

typedef	void (*VPDReleaseProc)(MP4DecInst decInst);

typedef VPDResult (*VPDGetResultProc)(VPDInst_t vpdInst);

typedef	VPDApiVersion_t (*VPDGetAPIVersionProc)(void);

typedef void*	(*MP4DecMallocLinearProc)( u32 size , u32* phys);
typedef BOOL	(*MP4DecFreeLinearProc)( void* );
#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -