?? mp4encapi.h
字號:
MP4API_EncParam_CameraStabilization;typedef struct /* MP4API_EncParam_StreamTypeInfo */{ /* MPEG4 Stream type information as defined in the standard */ /* Profile and level information */ /* 8 = Simple profile level 0 */ /* 1 = Simple Profile Level 1 */ /* 2 = Simple Profile Level 2 */ /* 3 = Simple Profile Level 3 */ u8 u8_ProfileAndLevel; /* Type of the Video Signal */ u8 u8_VideoSignalType; /* Video Format */ u8 u8_VideoFormat; /* Video Range */ u8 u8_VideoRange; /* Color Description Information */ u8 u8_ColorDescription; u8 u8_ColorPrimaries; u8 u8_TransferCharacteristics; u8 u8_MatrixCoefficients; /* Define Random Accessible VOL Feature. */ /* Set all the VOP to be encoded as Intra VOPs */ u8 u8_RandomAccessibleVol;}MP4API_EncParam_StreamTypeInfo;typedef struct /* MP4API_EncParam_CyclicIntraRefresh */{ /* Enable Cyclic Intra Refresh */ u32 u32_CirEnable; /* Number of Intra MBs in a picture (VOP) */ u32 u32_IntraPerVop;}MP4API_EncParam_CyclicIntraRefresh;typedef struct /* MP4API_EncParam_RateControl */{ /* Rate Control Enable */ u32 u32_RateCtrlEnable; /* Target Bit Rate (bits/second) */ u32 u32_TargetBitRate; /* Target Frame Rate (frames/second) */ u32 u32_TargetFrameRate; /* flag to enable/disable frame skipping */ u32 u32_FrameSkipEnable; /* Enables 4 motion vectors feature */ u32 u32_FourMotionVectorsEnable; /* Quantization Parameter (QP). The value is used for the Intra */ /* VOPs and as default QP value if RateCtrl is disabled */ u32 u32_DefaultQuantParameter; struct {
u32 u32_Enable; /* Enable VBV model */ u32 u32_Set; /* if 0 use default values */ u32 u32_BufSize; /* VBV or HRD buffer size */ u32 u32_InitOccupancy; /* initial buffer occupancy */ } vbv_params;}MP4API_EncParam_RateControl;typedef struct /* MP4API_EncParam_TimeCode */{ u32 u32_Hours; u32 u32_Minutes; u32 u32_Seconds;}MP4API_EncParam_TimeCode;typedef struct /* MP4API_EncParam_PictureSize */{ /* Picture Width in Pixels */ u16 u16_Width; /* Picture Height in Pixels */ u16 u16_Height;}MP4API_EncParam_PictureSize;typedef struct /* MP4API_EncParam_IntraControl */{ /* Penalty values when deciding the macroblock type */ u16 u16_MvSadPenalty; u16 u16_IntraSadPenalty; u16 u16_Inter4MvSadPenalty;}MP4API_EncParam_IntraControl;typedef struct /* MP4API_EncParam_ErrorTools */{ /* Enable use of the Video Packets */ u8 u8_VideoPacketsEnable; /* Enable use of the Data Partition */ u8 u8_DataPartitionEnable; /* Enable use of the Reversible VLC instead of VLC */ /* Note: Data partition have to be enabled if RVLC is used */ u8 u8_RVlcEnable;}MP4API_EncParam_ErrorTools;typedef struct /* MP4API_EncParam_CompressionParameters */{ /* Enable AC Prediction */ u8 u8_AcPredictionEnable; /* Allow Motion Vectors point out of the picture */ u8 u8_OutsideVopMvEnable; /* Rounding Control for the Interpolation */ u8 u8_RoundingCtrl; /* Threshold Value Defining when DC components of Intra MBs */ /* should be coded with DC VLC Instead of AC VLC */ /* (0 = Intra DC VLC always, 7 = Intra AC VLC always) */ /* Dependency of QPs and the threshold defined in the MPEG4 Standard */ u8 u8_IntraDcVlcThr;}MP4API_EncParam_CompressionParameters;typedef struct /* MP4API_EncParam_BitUsage */{ /* Size of the stream headers */ u32 u32_HeaderDataSize; /* Size of the motion vectors */ u32 u32_MvDataSize; /* Size of the texture data */ u32 u32_TextureDataSize; /* Size of the pattern data (which blocks were coded) */ u32 u32_PatternDataSize;}MP4API_EncParam_BitUsage;/*------------------------------------------------------------------------------ 4. Enumeration for Encoder API return values------------------------------------------------------------------------------*/typedef enum{ MP4API_ENC_OK = 0x00000000, MP4API_ENC_VIDEO_PACKET_READY = 0x00000001, MP4API_ENC_PICTURE_READY = 0x00000002, /* general error codes starting with 0x10000000 */ MP4API_ENC_ERROR = 0x10000000, MP4API_ENC_MEM_ALLOC_FAILED = 0x10000001, MP4API_ENC_INVALID_SCHEME = 0x10000002, MP4API_ENC_STRM_GEN_ERROR = 0x10000003, MP4API_ENC_INVALID_PARAM = 0x10000004, MP4API_ENC_NULL_POINTER = 0x10000005, MP4API_ENC_STRM_ALREADY_STARTED = 0x10000006, MP4API_ENC_VOP_NOT_READY = 0x10000007, MP4API_ENC_BAD_INSTANCE = 0x10000008, MP4API_ENC_STRM_NOT_STARTED = 0x10000009, MP4API_ENC_OUT_BUF_OVERFLOW = 0x1000000A, MP4API_ENC_FATAL_ERROR = 0x1FFFFFFF, /* Init error codes starting with 0x20000000 */ MP4API_RC_INIT_ERROR = 0x20000000, MP4API_CS_INIT_ERROR = 0x20000001, MP4API_MVD_INIT_ERROR = 0x20000002, MP4API_STRM_INIT_ERROR = 0x20000003, /* HW errors */ MP4API_ENC_INVALID_ASIC = 0x30000000, MP4API_ENC_HWRESET_FAILED = 0x30000001, /* HOS specific errors */ MP4API_ENC_HOS_INIT_ERROR = 0x40000000, MP4API_ENC_HOS_WAIT_TIMEOUT = 0x40000001, MP4API_ENC_HOS_WAIT_ERROR = 0x40000002}MP4API_EncReturnValue;/*------------------------------------------------------------------------------ 5. Enumeration for the video frame (VOP) coding types------------------------------------------------------------------------------*/typedef enum{ MP4API_ENC_VOP_CODING_TYPE_INTRA = 0, MP4API_ENC_VOP_CODING_TYPE_INTER = 1}MP4API_EncVopCodingType;/*------------------------------------------------------------------------------ 6. Structure for passing input data to Encode() function------------------------------------------------------------------------------*/typedef struct /* MP4API_EncInput */{ u32 *pu32_Picture; /* Pointer to input picture (bus address) */ u32 u32_TimeIncrement; /* Time resolution units after prev picture */ u32 *pu32_OutputBuffer; /* Pointer to output stream buffer */ u32 u32_OutBufSize; /* output buffer size in bytes (4 multiple) */ MP4API_EncVopCodingType VopCodingType; /* Intra or Inter */}MP4API_EncInput;/*------------------------------------------------------------------------------ 7. Structure for the returning the function status information from the API------------------------------------------------------------------------------*/typedef struct /* MP4API_EncOutput */{ MP4API_EncReturnValue Code; /* Return status information */ u32 u32_Size; /* Number of bytes written into output buffer */}MP4API_EncOutput;/*------------------------------------------------------------------------------ 8. Structure for returning the API version information------------------------------------------------------------------------------*/ typedef struct /* MP4API_EncAPIVersion */ { u32 u32_Major; /* Encoder API major version */ u32 u32_Minor; /* Encoder API minor version */ } MP4API_EncAPIVersion;/*------------------------------------------------------------------------------ 9. Prototypes of the MPEG4 API functions------------------------------------------------------------------------------*/void *MP4API_EncoderInit(MP4API_EncScheme EncScheme);u32 MP4API_EncoderConfig(void *pEncInst, void *pNewValue, MP4API_EncParamId ParameterId);u32 MP4API_EncoderGetInfo(void *pEncInst, void *pOutput, MP4API_EncParamId ParameterId);u32 MP4API_EncoderStartStream(void *pEncInst, MP4API_EncInput * pInput, MP4API_EncOutput * pOutput);u32 MP4API_Encode(void *pEncInst, MP4API_EncInput * pInput, MP4API_EncOutput * pOutput);u32 MP4API_EncoderEndStream(void *pEncInst, MP4API_EncInput * pInput, MP4API_EncOutput * pOutput);u32 MP4API_EncoderShutdown(void *pEncInst);MP4API_EncAPIVersion MP4API_EncoderGetAPIVersion(void);#endif /* MP4ENCAPI_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -