75 |
|
|
76 |
const int32_t dx, |
const int32_t dx, |
77 |
const int32_t dy, |
const int32_t dy, |
78 |
const uint32_t stride) |
const int32_t stride) |
79 |
{ |
{ |
80 |
|
|
81 |
|
|
109 |
|
|
110 |
const VECTOR * mv, /* measured in half-pel! */ |
const VECTOR * mv, /* measured in half-pel! */ |
111 |
|
|
112 |
const uint32_t stride) |
const int32_t stride) |
113 |
{ |
{ |
114 |
|
|
115 |
switch ((((mv->x) & 1) << 1) + ((mv->y) & 1)) { |
switch ((((mv->x) & 1) << 1) + ((mv->y) & 1)) { |
141 |
const IMAGE * const f_refV, |
const IMAGE * const f_refV, |
142 |
const IMAGE * const f_refHV, |
const IMAGE * const f_refHV, |
143 |
// backward (future) reference |
// backward (future) reference |
144 |
const MACROBLOCK * const b_mbs, |
const FRAMEINFO * const b_reference, |
145 |
const IMAGE * const b_ref, |
const IMAGE * const b_ref, |
146 |
const IMAGE * const b_refH, |
const IMAGE * const b_refH, |
147 |
const IMAGE * const b_refV, |
const IMAGE * const b_refV, |
162 |
const IMAGE * const b_refhv, |
const IMAGE * const b_refhv, |
163 |
int16_t * dct_codes); |
int16_t * dct_codes); |
164 |
|
|
165 |
|
|
166 |
|
/* GMC stuff. Maybe better put it into a separate file */ |
167 |
|
|
168 |
|
void |
169 |
|
generate_GMCparameters( const int num_wp, // [input]: number of warppoints |
170 |
|
const int res, // [input]: resolution |
171 |
|
const WARPPOINTS *const warp, // [input]: warp points |
172 |
|
const int width, const int height, // [input]: without edges! |
173 |
|
GMC_DATA *const gmc); // [output] precalculated parameters |
174 |
|
|
175 |
|
void |
176 |
|
generate_GMCimage( const GMC_DATA *const gmc_data, // [input] precalculated data |
177 |
|
const IMAGE *const pRef, // [input] |
178 |
|
const int mb_width, |
179 |
|
const int mb_height, |
180 |
|
const int stride, |
181 |
|
const int stride2, |
182 |
|
const int fcode, // [input] some parameters... |
183 |
|
const int32_t quarterpel, // [input] for rounding avgMV |
184 |
|
const int reduced_resolution, // [input] ignored |
185 |
|
const int32_t rounding, // [input] for rounding image data |
186 |
|
MACROBLOCK *const pMBs, // [output] average motion vectors |
187 |
|
IMAGE *const pGMC); // [output] full warped image |
188 |
|
|
189 |
|
|
190 |
|
VECTOR generate_GMCimageMB( const GMC_DATA *const gmc_data, /* [input] all precalc data */ |
191 |
|
const IMAGE *const pRef, // [input] |
192 |
|
const int mi, const int mj, /* [input] MB position */ |
193 |
|
const int stride, /* [input] Lumi stride */ |
194 |
|
const int stride2, /* [input] chroma stride */ |
195 |
|
const int quarterpel, /* [input] for rounding of AvgMV */ |
196 |
|
const int rounding, |
197 |
|
IMAGE *const pGMC); /* [outut] generate image */ |
198 |
|
|
199 |
|
|
200 |
|
|
201 |
|
/* Hinted ME */ |
202 |
|
|
203 |
void |
void |
204 |
MotionEstimationHinted( MBParam * const pParam, |
MotionEstimationHinted( MBParam * const pParam, |
205 |
FRAMEINFO * const current, |
FRAMEINFO * const current, |
210 |
|
|
211 |
int |
int |
212 |
MEanalysis( const IMAGE * const pRef, |
MEanalysis( const IMAGE * const pRef, |
213 |
const IMAGE * const pCurrent, |
FRAMEINFO * const Current, |
214 |
MBParam * const pParam, |
MBParam * const pParam, |
215 |
MACROBLOCK * const pMBs, |
int maxIntra, |
216 |
const uint32_t iFcode); |
int intraCount, |
217 |
|
int bCount); |
218 |
|
|
219 |
int |
int |
220 |
FindFcode( const MBParam * const pParam, |
FindFcode( const MBParam * const pParam, |
221 |
const FRAMEINFO * const current); |
const FRAMEINFO * const current); |
222 |
|
|
|
/* used internally only */ |
|
223 |
|
|
224 |
static VECTOR |
int d_amv_penalty(int x, int y, const VECTOR pred, const uint32_t iFcode, const int quant); |
|
GlobalMotionEst(const MACROBLOCK * const pMBs, |
|
|
const MBParam * const pParam, const uint32_t iFcode); |
|
225 |
|
|
226 |
|
|
227 |
#endif /* _MOTION_H_ */ |
#endif /* _MOTION_H_ */ |