?? mp4encapi.h
字號(hào):
/*-------------------------------------------------------------------------------- ---- This software is confidential and proprietary and may be used ---- only as expressly authorized by a licensing agreement from ---- ---- Hantro Products Oy. ---- ---- In the event of publication, the following notice is applicable: ---- ---- (C) COPYRIGHT 2001,2002,2003 HANTRO PRODUCTS OY ---- ALL RIGHTS RESERVED ---- ---- The entire notice above must be reproduced on all copies. ---- -------------------------------------------------------------------------------------- Abstract : The API definition of the MPEG4 Encoder-------------------------------------------------------------------------------------- Version control information, please leave untouched.---- $RCSfile: MP4EncApi.h,v $-- $Date: 2005/04/19 12:32:45 $-- $Revision: 1.8 $--------------------------------------------------------------------------------*//*------------------------------------------------------------------------------ Table of contents 1. Enumeration for the Encoding Schemes 2. Enumeration for the Parameter IDs 3. Structures for the information interchange between the MPEG4 Encoder and the user application 4. Enumeration for Encoder API return values 5. Enumeration for the video frame (VOP) coding types 6. Structure for passing input data to Encode() function 7. Structure for the returning the function status information from the API 8. Structure for returning the API version information 9. Prototypes of the MPEG4 API functions------------------------------------------------------------------------------*/#ifndef MP4ENCAPI_H#define MP4ENCAPI_H#include "basetype.h"/*------------------------------------------------------------------------------ 1. Enumeration for the Encoding Schemes------------------------------------------------------------------------------*//*------------------------------------------------------------------------------ 2. Enumeration for the Parameter IDs------------------------------------------------------------------------------*/typedef enum{ /* Quantization Parameter to be used as default QP */ /* Type of the parameter to be changed: u32 */ MP4API_ENC_PID_QUANT_PARAM = 1, /* Header Extension Code Enable (can be used with VideoPackets) */ /* Type of the parameter to be changed: u32 */ MP4API_ENC_PID_HEC_ENABLE, /* Target Bit Rate */ /* Type of the parameter to be changed: u32 */ MP4API_ENC_PID_BIT_RATE, /* Video Object Sequence User data */ /* Type of the parameter to be changed: MP4API_EncParam_UserData */ MP4API_ENC_PID_VOS_USER_DATA, /* Video Object User data */ /* Type of the parameter to be changed: MP4API_EncParam_UserData */ MP4API_ENC_PID_VO_USER_DATA, /* Video Object Layer User data */ /* Type of the parameter to be changed: MP4API_EncParam_UserData */ MP4API_ENC_PID_VOL_USER_DATA, /* Group Of VOP User data */ /* Type of the parameter to be changed: MP4API_EncParam_UserData */ MP4API_ENC_PID_GOV_USER_DATA, /* Enables pre-processing */ /* Type of the parameter to be changed: u32 */ MP4API_ENC_PID_PREPROCESSING_ENABLE, /* Definition of the Pixel Aspect Ratio */ /* Type of the parameter to be changed: */ /* MP4API_EncParam_PixelAspectRatio */ MP4API_ENC_PID_PIXEL_ASPECT_RATIO, /* Short Video Header (H.263 baseline) information */ /* Type of the parameter to be changed: */ /* MP4API_EncParam_ShortVideoHeader */ MP4API_ENC_PID_SHORT_VIDEO_HEADER, /* Camera Movement Stabilization Control */ /* Type of the parameter to be changed: */ /* MP4API_EncParam_CameraStabilization */ MP4API_ENC_PID_CAM_STAB, /* MPEG4 Stream Type Information as defined in the MPEG4 Standard */ /* Type of the parameter to be changed: */ /* MP4API_EncParam_StreamTypeInfo */ MP4API_ENC_PID_STREAM_TYPE_INFO, /* Cyclic Intra Refresh */ /* Type of the parameter to be changed: */ /* MP4API_EncParam_CyclicIntraRefresh */ MP4API_ENC_PID_CYCLIC_INTRA_REFRESH, /* Rate Control */ /* Type of the parameter to be changed: MP4API_EncParam_RateControl */ MP4API_ENC_PID_RATE_CTRL, /* Time Code at the Group Of VOP (GOV) layer of the MPEG4 stream. */ /* Time information in real time format (Hours, Minutes, Seconds) */ /* Type of the parameter to be changed: MP4API_EncParam_TimeCode */ MP4API_ENC_PID_TIME_CODE, /* Size of the Video Packet */ /* Note 1: The size of a Video Packet (VP) cannot be */ /* bigger than the size of SW/HW RLC buffer. Otherwise */ /* An overflow can occure. */ /* Note 2: The MPEG4 Standard restricts the size */ /* Type of the parameter to be changed: u32 */ MP4API_ENC_PID_VIDEO_PACKET_SIZE, /* Group Of VOP (GOV) Header Insert Control. Value reseted when */ /* GOV headers inserted into stream */ /* Type of the parameter to be changed: u32 */ MP4API_ENC_PID_GOV_HEADER_ENABLE, /* Size of the picture in pixels */ /* Note: Encoder processes a picture by dividing it into macroblocks */ /* which are 16x16 pixels. Width and height of a picture to be */ /* encoded have to be divisible evenly by 16. Anyhow it is possible */ /* to set the picture size information inserted into stream to show */ /* smaller size. */ /* Type of the parameter to be changed: MP4API_EncParam_PictureSize */ MP4API_ENC_PID_PICTURE_SIZE, /* Control Parameters for Changing the Macroblock Type */ /* Do NOT change if not familiar with encoder details */ /* Type of the parameter to be changed: MP4API_EncParam_IntraControl */ MP4API_ENC_PID_INTRA_CONTROL, /* Defines Which Error Detection and Concealment Tools are used */ /* Type of the parameter to be changed: MP4API_EncParam_ErrorTools */ MP4API_ENC_PID_ERROR_TOOLS, /* Compression Parameters defining: */ /* - Rounding Control in the interpolation */ /* - Usage of the AC Prediction */ /* - Whether Motion Vectors are allowed to point out of the picture */ /* - Coding of the Intra DC components */ /* Type of the parameter to be changed: */ /* MP4API_EncParam_CompressionParameters */ MP4API_ENC_PID_COMPRESSION_PARAMS, /* Time Resolution defining how many evenly spaced unit (ticks) */ /* one second contains (e.g. if frame rate is 15 FPS */ /* => Time Resolution = 15. Therefore TimeIncrement between */ /* two picture frames is 1 */ /* Type of the parameter to be changed: u16 */ MP4API_ENC_PID_TIME_RESOLUTION, /* Hardware Interrupt Interval */ /* Do NOT change if not absolute familiar with Encoder details */ /* Sets the (minimum) number of macroblocks encoded during one */ /* ASIC run. */ /* Type of the parameter to be changed: u16 */ MP4API_ENC_PID_HW_INTERRUPT_INTERVAL, /* Bit Usage */ /* Detailed information of bit usage */ /* Type of the parameter to be read: MP4API_EncParam_BitUsage */ MP4API_ENC_PID_BIT_USAGE, /* Picture Coded Information */ /* Whether the picture (VOP) was coded or not */ /* Picture (VOP) can be set as not coded by the Rate Control. */ /* A VOP can be set to be not-coded if the virtual buffer is full. */ /* The feature of skipping picture frames can be tuned by changing */ /* the FrameSkipLimit at RateControl parameters */ /* Type of the parameter to be read: u32 */ MP4API_ENC_PID_PICTURE_CODED, /* check if the texture VLC buffer limit was reached by ASIC */ /* bigger buffer should be used when limit is often reached */ /* Type of the parameter to be read: u32 */ MP4API_ENC_PID_TXTR_VLC_BUF_FULL, /* setup a table where macroblock offsets are returned */ /* Type of the parameter to be set: (u32*) */ MP4API_ENC_PID_MB_OFFSET_TABLE, /* setup a table where macroblock QP are returned */ /* Type of the parameter to be set: (u8*) */ MP4API_ENC_PID_MB_QP_TABLE }MP4API_EncParamId;/*------------------------------------------------------------------------------ 3. Structures for the information interchange between the MPEG4 Encoder and the user application------------------------------------------------------------------------------*/typedef struct /* MP4API_EncParam_UserData */{ /* Enable user data insertion into stream */ u8 u8_Enable; /* Pointer to user data to be inserted into stream */ u8 *pu8_UserData; /* Number of bytes to be inserted into stream */ u32 u32_Length;}MP4API_EncParam_UserData;typedef struct /* MP4API_EncParam_PixelAspectRatio */{ /* Pixel aspect ratio information (Specified in MPEG4 standard) */ u8 u8_AspectRatioInfo; /* Pixel width if required by the AspectRatioInfo */ u8 u8_ParWidth; /* Pixel height if required by the AspectRatioInfo */ u8 u8_ParHeight;}MP4API_EncParam_PixelAspectRatio;typedef struct /* MP4API_EncParam_ShortVideoHeader */{ /* Enable Short Video Header Mode */ u8 u8_ShortVideoHeaderEnable; /* generate H263 compatible stream */ u8 u8_H263_Stream; /* Group Of Blocks header insertion frequency */ /* Values from 0 to 8: 0 = Never add GOB Header into the stream */ /* 1 = GOB Header with every GOB/MacroBlock-row, */ /* 2 = every 2nd MB-row ... 8 = every 8th MB-row */ u8 u8_GobResyncMarkerInsertion; /* SVH Specific parameters as defined in MPEG4 Standard */ u8 u8_SplitScreenIndicator; u8 u8_DocumentCameraIndicator; u8 u8_FullPictureFreezeRelease;}MP4API_EncParam_ShortVideoHeader;typedef struct /* MP4API_EncParam_CameraStabilization */{ /* Enable Camera Movement Stabilization */ u32 u32_CamStabEnable; /* Captured frame width */ u32 u32_FrameWidth; /* captured frame height */ u32 u32_FrameHeight;}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -