3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - Encoder header - |
* - Encoder header - |
5 |
* |
* |
6 |
|
* Copyright(C) 2002 Michael Militzer |
7 |
|
* |
8 |
* This program is an implementation of a part of one or more MPEG-4 |
* This program is an implementation of a part of one or more MPEG-4 |
9 |
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
10 |
* to use this software module in hardware or software products are |
* to use this software module in hardware or software products are |
29 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
30 |
* |
* |
31 |
****************************************************************************/ |
****************************************************************************/ |
|
/***************************************************************************** |
|
|
* |
|
|
* History |
|
|
* |
|
|
* - 13.06.2002 Added legal header |
|
|
* - 22.08.2001 Added support for EXT_MODE encoding mode |
|
|
* support for EXTENDED API |
|
|
* - 22.08.2001 fixed bug in iDQtab |
|
|
* |
|
|
* $Id: encoder.h,v 1.10 2002-06-13 21:45:24 edgomez Exp $ |
|
|
* |
|
|
****************************************************************************/ |
|
32 |
|
|
33 |
#ifndef _ENCODER_H_ |
#ifndef _ENCODER_H_ |
34 |
#define _ENCODER_H_ |
#define _ENCODER_H_ |
82 |
uint32_t fincr; |
uint32_t fincr; |
83 |
uint32_t fbase; |
uint32_t fbase; |
84 |
|
|
85 |
|
#ifdef _SMP |
86 |
|
int num_threads; |
87 |
|
#endif |
88 |
|
|
89 |
#ifdef BFRAMES |
#ifdef BFRAMES |
90 |
int max_bframes; |
int max_bframes; |
91 |
#endif |
#endif |
102 |
|
|
103 |
HINTINFO *hint; |
HINTINFO *hint; |
104 |
|
|
|
#ifdef BFRAMES |
|
105 |
uint32_t m_seconds; |
uint32_t m_seconds; |
106 |
uint32_t m_ticks; |
uint32_t m_ticks; |
|
#endif |
|
107 |
|
|
108 |
} |
} |
109 |
MBParam; |
MBParam; |
120 |
uint32_t fcode; |
uint32_t fcode; |
121 |
uint32_t bcode; |
uint32_t bcode; |
122 |
|
|
|
#ifdef BFRAMES |
|
123 |
uint32_t seconds; |
uint32_t seconds; |
124 |
uint32_t ticks; |
uint32_t ticks; |
|
#endif |
|
125 |
|
|
126 |
IMAGE image; |
IMAGE image; |
127 |
|
|
157 |
FRAMEINFO *current; |
FRAMEINFO *current; |
158 |
FRAMEINFO *reference; |
FRAMEINFO *reference; |
159 |
|
|
160 |
#ifdef _DEBUG |
#ifdef _DEBUG_PSNR |
161 |
IMAGE sOriginal; |
IMAGE sOriginal; |
162 |
#endif |
#endif |
163 |
IMAGE vInterH; |
IMAGE vInterH; |
168 |
|
|
169 |
#ifdef BFRAMES |
#ifdef BFRAMES |
170 |
/* constants */ |
/* constants */ |
171 |
|
int global; |
172 |
int bquant_ratio; |
int bquant_ratio; |
173 |
/* vars */ |
int frame_drop_ratio; |
174 |
|
|
175 |
|
/* image queue */ |
176 |
|
int queue_head; |
177 |
|
int queue_tail; |
178 |
|
int queue_size; |
179 |
|
IMAGE *queue; |
180 |
|
|
181 |
|
/* bframe buffer */ |
182 |
int bframenum_head; |
int bframenum_head; |
183 |
int bframenum_tail; |
int bframenum_tail; |
184 |
int flush_bframes; |
int flush_bframes; |
187 |
IMAGE f_refh; |
IMAGE f_refh; |
188 |
IMAGE f_refv; |
IMAGE f_refv; |
189 |
IMAGE f_refhv; |
IMAGE f_refhv; |
190 |
|
int bframenum_dx50bvop; |
191 |
|
|
192 |
|
int last_pframe; |
193 |
|
int last_sync; |
194 |
|
int time_pp; |
195 |
|
int m_framenum; /* debug frame num counter; unlike iFrameNum, does not reset at ivop */ |
196 |
#endif |
#endif |
197 |
|
|
198 |
Statistics sStat; |
Statistics sStat; |
199 |
RateControl rate_control; |
RateControl rate_control; |
200 |
} |
} |
245 |
XVID_ENC_FRAME * pFrame, |
XVID_ENC_FRAME * pFrame, |
246 |
XVID_ENC_STATS * pResult); |
XVID_ENC_STATS * pResult); |
247 |
|
|
248 |
|
int encoder_encode_bframes(Encoder * pEnc, |
249 |
|
XVID_ENC_FRAME * pFrame, |
250 |
|
XVID_ENC_STATS * pResult); |
251 |
|
|
252 |
#endif |
#endif |