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

📄 fmpeg4_avcodec.h

📁 gm8120的video控制
💻 H
📖 第 1 页 / 共 3 页
字号:
	DMA_FREE_PTR_dec pfnDmaFree;			// Don't care when pfnDmaMalloc == NULL	MALLOC_PTR_dec pfnMalloc;	FREE_PTR_dec pfnFree;	SEM_WAIT_PTR pfnSemWait;	SEM_SIGNAL_PTR pfnSemSignal;	REQUEST_BS_PTR pfnRequestBS;#endif} FMP4_DEC_PARAM;    /* Structure used to pass a frame to the encoder */typedef struct{    void *bitstream;                   /*< [out]    								*    								* Output MPEG4 bitstream buffer pointer (physical addr.) */    int length;                        /*< [out]    								*    								* Output MPEG4 bitstream length (bytes) */    unsigned char *quant_intra_matrix; /*< [in]    								*    								* Custom intra quantization matrix when MPEG4 quant is enabled*/    unsigned char *quant_inter_matrix; /*< [in]    								*    								* Custom inter quantization matrix when MPEG4 quant is enabled */    int quant;                         /*< [in]    								*    								* Frame quantizer :    								* <ul>    								* <li> 0 (zero) : Then the  rate controler chooses the right quantizer    								*                 for you.  Typically used in ABR encoding, or first pass of a VBR    								*                 encoding session.    								* <li> !=  0  :  Then you  force  the  encoder  to use  this  specific    								*                  quantizer   value.     It   is   clamped    in   the   interval    								*                  [1..31]. Tipically used  during the 2nd pass of  a VBR encoding    								*                  session.     								* </ul> */    int intra;                         /*< [in/out]    								*    								* <ul>    								* <li> [in] : tells Faraday if the frame must be encoded as an intra frame    								*     <ul>    								*     <li> 1: forces the encoder  to create a keyframe. Mainly used during    								*              a VBR 2nd pass.    								*     <li> 0:  forces the  encoder not to  create a keyframe.  Minaly used    								*               during a VBR second pass    								*     <li> -1: let   the  encoder   decide  (based   on   contents  and    								*              max_key_interval). Mainly  used in ABR  mode and during  a 1st    								*              VBR pass.     								*     </ul>    								* <li> [out] : When first set to -1, the encoder returns the effective keyframe state    								*              of the frame.     								* </ul>                                    */        /// The base address for input Y frame buffer.    unsigned char *pu8YFrameBaseAddr;  /**< To set input Y frame buffer's base address.\n                              *   <B>N.B.</B> : the input frame buffer address must be <B>physical address</B> with <B>8-byte aligned</B>.                              *   @see pu8UFrameBaseAddr                              *   @see pu8VFrameBaseAddr                              *                              *   Also, this variable can be set by utilizing the function FMpeg4EncSetYUVAddr().                              *   @see FMpeg4EncSetYUVAddr                              */    /// The base address for input U frame buffer.	    unsigned char *pu8UFrameBaseAddr;  /**< To set input U frame buffer's base address.\n                              *   <B>N.B.</B> : the input frame buffer address must be <B>physical address</B> with <B>8-byte aligned</B>.                              *   @see pu8YFrameBaseAddr                              *   @see pu8VFrameBaseAddr                              *                              *   Also, this variable can be set by utilizing the function FMpeg4EncSetYUVAddr().                              *   @see FMpeg4EncSetYUVAddr                              */    /// The base address for input V frame buffer.    unsigned char *pu8VFrameBaseAddr;  /**< To set input V frame buffer's base address.\n                              *   <B>N.B.</B> : the input frame buffer address must be <B>physical address</B> with <B>8-byte aligned</B>.                              *   @see pu8YFrameBaseAddr                              *   @see pu8UFrameBaseAddr                              *                              *   Also, this variable can be set by utilizing the function FMpeg4EncSetYUVAddr().                              *   @see FMpeg4EncSetYUVAddr                              */     int    active0;        //the result of motion dection      int    active1;        //the result of motion dection      int    active2;        //the result of motion dection      int    frameindex;     //the frame index for motion dection} Faraday_ENC_FRAME;typedef struct {  /// The base address of hardware core.  unsigned int   *pu32BaseAddr;    /**< User can use this variable to set the base                                    *   address of hardware core.                                    */  /// The CPU cache alignment  unsigned int u32CacheAlign;	/**< User needs to specify the CPU cache line in ,<B>bytes</B>.\n                                    *   ex: The cache line is 16 when the CPU is FA526                                    */  /// The encoded bitrate in Kbps.  unsigned int   u32BitRate;       /**< User can use this variable to set encoded bitrate in <B>Kbps</B>.\n                                    *   Note that 'target bitrate = (u32BitRate * 1000 bits)'.\n                                    *   And this option is only valid when rate control mechanism                                    *   is enabled. (that is, when quantization value is equal to 0)                                    *   @see u32Quant                                    */  /// The width of encoded frame in pels.  unsigned int   u32FrameWidth;    /**< User can use this field to specify the <B>width</B> of                                     *   encoded frame in pels.                                    */  /// The height of encoded frame in pels.  unsigned int   u32FrameHeight;   /**< User can use this field to specify the <B>height</B> of                                     *   encoded frame in pels.                                    */    /// To enable the function of encoding rectangular region of interest(ROI) within captured frame.    int bROIEnable;  /**< If this parameter bROIEnable is enabled, the parameters u32ROIX , u32ROIY ,                      *   u32ROIWidth and u32ROIHeight are valid.\n                      *   If this parameter bROIEnable is disabled, the parameters u32ROIX , u32ROIY ,                      *   u32ROIWidth and u32ROIHeight are ignored.\n                      *                      *   - 0: To disable the function of encoding rectangular region of interest.                      *   - 1: To enable the function of encoding rectangular region of interest.                      *                      *   @see u32ROIX                      *   @see u32ROIY                      *   @see u32ROIWidth                      *   @see u32ROIHeight                      */    /// The upper-left corner x coordinate of rectangular region of interest within captured frame.    unsigned int u32ROIX;  /**< This parameter is valid only when bROIEnable is enabled.                            *   User can use this parameter to specify the upper-left <B>x coordinate</B>                            *   of region of interest within captured frame.                            *   <B>N.B.</B> : the <B>x coordinate</B> must be a <B>multiple of 16 pixels</B> since                            *   the picture is processed on a macroblock basis.                            *   @see bROIEnable                            */    /// The upper-left corner coordinate y of region of interest within captured frame.    unsigned int u32ROIY;  /**< This parameter is valid only when bROIEnable is enabled.                            *   User can use this parameter to specify the upper-left <B>y coordinate</B>                            *   of region of interest within captured frame.                            *   <B>N.B.</B> : the <B>y coordinate</B> must be a <B>multiple of 16 pixels</B> since                            *   the picture is processed on a macroblock basis.                            *   @see bROIEnable                            */    /// The width of user-defined rectangular region of interest within the captured frame in pixel units.    unsigned int u32ROIWidth;  /**< This parameter is valid only when bROIEnable is enabled.\n                                *   This parameter specifies the width of retangular region of interest within                                *   the captured frame in pixel units.\n                                *   <B>N.B.</B> : the width needs to be a <B>multiple of 16 pixels</B> since                                *   the picture is processed on a macroblock basis.                                *   @see bROIEnable                                */	/// The height of user-defined rectangular region of interest within the captured frame in pixel units.    unsigned int u32ROIHeight; /**< This parameter is valid only when bROIEnable is enabled.\n                                *   This parameter specifies the height of retangular region of interest within                                *   the captured frame in pixel units.\n                                *   <B>N.B.</B> : the height needs be a <B>multiple of 16 pixels</B> since                                *  the picture is processed on a macroblock basis.                                *   @see bROIEnable                                */	/// The base frame rate.  unsigned int fFrameRate;       /**< To set the encoded frame rate per second.                                    */		                                  /// The initial quantization value of I-frame while rate control mechanism is enabled.  unsigned int   u32InitialQuant;  /**< While rate control mechanism is enabled , user can                                    *   use this field to set the initial quantization value of                                    *   I-frame.                                     *   @see u32Quant                                    */  /// The frame interval between I-frames.  unsigned int   u32IPInterval;    /**< This variable was used to set the interval between I-frames.                                    */  /// The short header (H263) mode.  int            bShortHeader;     /**< A flag of enabling short header (H.263) mode or not.                                    *   - 0: disable short header.                                    *   - 1: enable short header.                                    */  /// The 4 motion vectors (4MV) mode.  int            bEnable4MV;       /**< To select 4MV (4 motion vectors) mode or 1MV (1 motion vector) mode.                                    *   - 0: disable 4MV mode and use 1MV (1 motion vector) mode instead.                                    *   - 1: enable 4MV mode and select 4MV mode.                                    */  /// The H.263 quantization method.		                              int            bH263Quant;       /**< To select H.263 quantization method or MPEG4 quantization method.                                    *   - 0: select MPEG4 quantization method.                                    *   - 1: select H.263 quantization method.                                    */  /// The resync marker option.  int            bResyncMarker;    /**< A flag of enabling resync marker mechanism or not.                                    *   - 0: disable resync marker.                                    *   - 1: enable resync marker.                                    */  /// The maximum quantization value.  unsigned int   u32MaxQuant;      /**< To set the maximum quantization value range.                                    */

⌨️ 快捷键说明

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