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.18 2002-09-03 17:24:26 chl Exp $ |
* $Id: encoder.h,v 1.18.2.7 2002-12-09 10:47:05 suxen_drol Exp $ |
40 |
* |
* |
41 |
****************************************************************************/ |
****************************************************************************/ |
42 |
|
|
70 |
{ |
{ |
71 |
I_VOP = 0, |
I_VOP = 0, |
72 |
P_VOP = 1, |
P_VOP = 1, |
73 |
B_VOP = 2 |
B_VOP = 2, |
74 |
|
S_VOP = 3 |
75 |
} |
} |
76 |
VOP_TYPE; |
VOP_TYPE; |
77 |
|
|
93 |
uint32_t fincr; |
uint32_t fincr; |
94 |
uint32_t fbase; |
uint32_t fbase; |
95 |
|
|
96 |
|
/* constants */ |
97 |
|
int global; |
98 |
|
int bquant_ratio; |
99 |
|
int bquant_offset; |
100 |
|
int frame_drop_ratio; |
101 |
|
|
102 |
#ifdef _SMP |
#ifdef _SMP |
103 |
int num_threads; |
int num_threads; |
104 |
#endif |
#endif |
105 |
|
|
106 |
#ifdef BFRAMES |
int iMaxKeyInterval; |
107 |
int max_bframes; |
int max_bframes; |
|
#endif |
|
108 |
|
|
109 |
/* rounding type; alternate 0-1 after each interframe */ |
/* rounding type; alternate 0-1 after each interframe */ |
110 |
/* 1 <= fixed_code <= 4 |
/* 1 <= fixed_code <= 4 |
115 |
uint32_t m_quant_type; |
uint32_t m_quant_type; |
116 |
uint32_t m_rounding_type; |
uint32_t m_rounding_type; |
117 |
uint32_t m_fcode; |
uint32_t m_fcode; |
118 |
|
uint32_t m_quarterpel; |
119 |
|
int m_reduced_resolution; /* reduced_resolution_enable */ |
120 |
|
|
121 |
HINTINFO *hint; |
HINTINFO *hint; |
122 |
|
|
123 |
uint32_t m_seconds; |
int64_t m_stamp; |
|
uint32_t m_ticks; |
|
|
|
|
124 |
} |
} |
125 |
MBParam; |
MBParam; |
126 |
|
|
127 |
|
|
128 |
typedef struct |
typedef struct |
129 |
{ |
{ |
130 |
|
int iTextBits; |
131 |
|
int iMvSum; |
132 |
|
int iMvCount; |
133 |
|
int kblks; |
134 |
|
int mblks; |
135 |
|
int ublks; |
136 |
|
} |
137 |
|
Statistics; |
138 |
|
|
139 |
|
|
140 |
|
typedef struct |
141 |
|
{ |
142 |
uint32_t quant; |
uint32_t quant; |
143 |
uint32_t motion_flags; |
uint32_t motion_flags; |
144 |
uint32_t global_flags; |
uint32_t global_flags; |
145 |
|
|
146 |
VOP_TYPE coding_type; |
VOP_TYPE coding_type; |
147 |
uint32_t rounding_type; |
uint32_t rounding_type; |
148 |
|
uint32_t quarterpel; |
149 |
uint32_t fcode; |
uint32_t fcode; |
150 |
uint32_t bcode; |
uint32_t bcode; |
151 |
|
|
152 |
uint32_t seconds; |
uint32_t seconds; |
153 |
uint32_t ticks; |
uint32_t ticks; |
154 |
|
int64_t stamp; |
155 |
|
|
156 |
IMAGE image; |
IMAGE image; |
157 |
|
|
158 |
MACROBLOCK *mbs; |
MACROBLOCK *mbs; |
159 |
|
VECTOR GMC_MV; |
160 |
|
|
161 |
|
Statistics sStat; |
162 |
} |
} |
163 |
FRAMEINFO; |
FRAMEINFO; |
164 |
|
|
|
typedef struct |
|
|
{ |
|
|
int iTextBits; |
|
|
float fMvPrevSigma; |
|
|
int iMvSum; |
|
|
int iMvCount; |
|
|
int kblks; |
|
|
int mblks; |
|
|
int ublks; |
|
|
} |
|
|
Statistics; |
|
|
|
|
165 |
|
|
166 |
|
|
167 |
typedef struct |
typedef struct |
169 |
MBParam mbParam; |
MBParam mbParam; |
170 |
|
|
171 |
int iFrameNum; |
int iFrameNum; |
|
int iMaxKeyInterval; |
|
172 |
int bitrate; |
int bitrate; |
173 |
|
|
174 |
// images |
// images |
185 |
IMAGE vInterHV; |
IMAGE vInterHV; |
186 |
IMAGE vInterHVf; |
IMAGE vInterHVf; |
187 |
|
|
|
#ifdef BFRAMES |
|
|
/* constants */ |
|
|
int global; |
|
|
int bquant_ratio; |
|
|
int frame_drop_ratio; |
|
|
|
|
188 |
/* image queue */ |
/* image queue */ |
189 |
int queue_head; |
int queue_head; |
190 |
int queue_tail; |
int queue_tail; |
202 |
IMAGE f_refhv; |
IMAGE f_refhv; |
203 |
int bframenum_dx50bvop; |
int bframenum_dx50bvop; |
204 |
|
|
|
int last_pframe; |
|
|
int last_sync; |
|
|
int time_pp; |
|
205 |
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 */ |
|
#endif |
|
206 |
|
|
|
Statistics sStat; |
|
207 |
RateControl rate_control; |
RateControl rate_control; |
208 |
|
|
209 |
|
float fMvPrevSigma; |
210 |
} |
} |
211 |
Encoder; |
Encoder; |
212 |
|
|