--- branches/dev-api-4/xvidcore/src/encoder.h 2003/02/22 08:49:45 890 +++ branches/dev-api-4/xvidcore/src/encoder.h 2003/06/09 01:25:19 1053 @@ -36,7 +36,7 @@ * support for EXTENDED API * - 22.08.2001 fixed bug in iDQtab * - * $Id: encoder.h,v 1.27.2.1 2003-02-22 08:49:44 suxen_drol Exp $ + * $Id: encoder.h,v 1.27.2.9 2003-06-09 01:16:35 edgomez Exp $ * ****************************************************************************/ @@ -46,19 +46,11 @@ #include "xvid.h" #include "portab.h" #include "global.h" -#include "utils/ratecontrol.h" /***************************************************************************** * Constants ****************************************************************************/ -/* Quatization type */ -#define H263_QUANT 0 -#define MPEG4_QUANT 1 - -/* Indicates no quantizer changes in INTRA_Q/INTER_Q modes */ -#define NO_CHANGE 64 - /***************************************************************************** * Types ****************************************************************************/ @@ -80,15 +72,22 @@ uint32_t mb_width; uint32_t mb_height; + int plugin_flags; + /* frame rate increment & base */ uint32_t fincr; uint32_t fbase; + int profile; + xvid_global_t global_flags; int bquant_ratio; int bquant_offset; int frame_drop_ratio; + int min_quant[3]; + int max_quant[3]; + #ifdef _SMP int num_threads; #endif @@ -138,6 +137,8 @@ typedef struct { + int frame_num; + int fincr; xvid_vol_t vol_flags; xvid_vop_t vop_flags; xvid_motion_t motion_flags; @@ -156,8 +157,8 @@ MACROBLOCK *mbs; - WARPPOINTS warp; // as in bitstream - GMC_DATA gmc_data; // common data for all MBs + WARPPOINTS warp; /* as in bitstream */ + GMC_DATA gmc_data; /* common data for all MBs */ int length; /* the encoded size of this frame */ @@ -173,12 +174,25 @@ int iFrameNum; int bitrate; - // images + /* zones */ + unsigned int num_zones; + xvid_enc_zone_t * zones; + + /* plugins */ + unsigned int num_plugins; /* note: we store plugin flags in MBPARAM */ + xvid_enc_plugin_t * plugins; + + /* dquant */ + + int * temp_dquants; + + /* images */ FRAMEINFO *current; FRAMEINFO *reference; - IMAGE sOriginal; + IMAGE sOriginal; /* original image copy for i/p frames */ + IMAGE sOriginal2; /* original image copy for b-frames */ IMAGE vInterH; IMAGE vInterV; IMAGE vInterVf; @@ -209,8 +223,6 @@ int m_framenum; /* debug frame num counter; unlike iFrameNum, does not reset at ivop */ - RateControl rate_control; - float fMvPrevSigma; } Encoder; @@ -254,7 +266,7 @@ void init_encoder(uint32_t cpu_flags); -int enc_create(xvid_enc_create_t * create, xvid_enc_rc_t * rc); +int enc_create(xvid_enc_create_t * create); int enc_destroy(Encoder * pEnc); int enc_encode(Encoder * pEnc, xvid_enc_frame_t * pFrame,