36 |
* support for EXTENDED API |
* support for EXTENDED API |
37 |
* - 22.08.2001 fixed bug in iDQtab |
* - 22.08.2001 fixed bug in iDQtab |
38 |
* |
* |
39 |
* $Id: encoder.h,v 1.27.2.5 2003-03-16 12:04:14 suxen_drol Exp $ |
* $Id: encoder.h,v 1.27.2.9 2003-06-09 01:16:35 edgomez Exp $ |
40 |
* |
* |
41 |
****************************************************************************/ |
****************************************************************************/ |
42 |
|
|
46 |
#include "xvid.h" |
#include "xvid.h" |
47 |
#include "portab.h" |
#include "portab.h" |
48 |
#include "global.h" |
#include "global.h" |
|
#include "utils/ratecontrol.h" |
|
49 |
|
|
50 |
/***************************************************************************** |
/***************************************************************************** |
51 |
* Constants |
* Constants |
78 |
uint32_t fincr; |
uint32_t fincr; |
79 |
uint32_t fbase; |
uint32_t fbase; |
80 |
|
|
81 |
|
int profile; |
82 |
|
|
83 |
xvid_global_t global_flags; |
xvid_global_t global_flags; |
84 |
int bquant_ratio; |
int bquant_ratio; |
85 |
int bquant_offset; |
int bquant_offset; |
86 |
int frame_drop_ratio; |
int frame_drop_ratio; |
87 |
|
|
88 |
|
int min_quant[3]; |
89 |
|
int max_quant[3]; |
90 |
|
|
91 |
#ifdef _SMP |
#ifdef _SMP |
92 |
int num_threads; |
int num_threads; |
93 |
#endif |
#endif |
157 |
|
|
158 |
MACROBLOCK *mbs; |
MACROBLOCK *mbs; |
159 |
|
|
160 |
WARPPOINTS warp; // as in bitstream |
WARPPOINTS warp; /* as in bitstream */ |
161 |
GMC_DATA gmc_data; // common data for all MBs |
GMC_DATA gmc_data; /* common data for all MBs */ |
162 |
|
|
163 |
int length; /* the encoded size of this frame */ |
int length; /* the encoded size of this frame */ |
164 |
|
|
174 |
int iFrameNum; |
int iFrameNum; |
175 |
int bitrate; |
int bitrate; |
176 |
|
|
177 |
// plugins |
/* zones */ |
178 |
|
unsigned int num_zones; |
179 |
|
xvid_enc_zone_t * zones; |
180 |
|
|
181 |
|
/* plugins */ |
182 |
unsigned int num_plugins; /* note: we store plugin flags in MBPARAM */ |
unsigned int num_plugins; /* note: we store plugin flags in MBPARAM */ |
183 |
xvid_enc_plugin_t * plugins; |
xvid_enc_plugin_t * plugins; |
184 |
|
|
185 |
// dquant |
/* dquant */ |
186 |
|
|
187 |
int * temp_dquants; |
int * temp_dquants; |
188 |
|
|
189 |
// images |
/* images */ |
190 |
|
|
191 |
FRAMEINFO *current; |
FRAMEINFO *current; |
192 |
FRAMEINFO *reference; |
FRAMEINFO *reference; |
223 |
|
|
224 |
int m_framenum; /* debug frame num counter; unlike iFrameNum, does not reset at ivop */ |
int m_framenum; /* debug frame num counter; unlike iFrameNum, does not reset at ivop */ |
225 |
|
|
|
RateControl rate_control; |
|
|
|
|
226 |
float fMvPrevSigma; |
float fMvPrevSigma; |
227 |
} |
} |
228 |
Encoder; |
Encoder; |
266 |
|
|
267 |
void init_encoder(uint32_t cpu_flags); |
void init_encoder(uint32_t cpu_flags); |
268 |
|
|
269 |
int enc_create(xvid_enc_create_t * create, xvid_enc_rc_t * rc); |
int enc_create(xvid_enc_create_t * create); |
270 |
int enc_destroy(Encoder * pEnc); |
int enc_destroy(Encoder * pEnc); |
271 |
int enc_encode(Encoder * pEnc, |
int enc_encode(Encoder * pEnc, |
272 |
xvid_enc_frame_t * pFrame, |
xvid_enc_frame_t * pFrame, |