42 |
#define MVzero(A) ( ((A).x)==(0) && ((A).y)==(0) ) |
#define MVzero(A) ( ((A).x)==(0) && ((A).y)==(0) ) |
43 |
#define MVequal(A,B) ( ((A).x)==((B).x) && ((A).y)==((B).y) ) |
#define MVequal(A,B) ( ((A).x)==((B).x) && ((A).y)==((B).y) ) |
44 |
|
|
45 |
|
static const uint32_t roundtab[16] = |
46 |
|
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 }; |
47 |
|
|
48 |
|
/* |
49 |
|
* modified rounding tables |
50 |
|
* original tables see ISO spec tables 7-6 -> 7-9 |
51 |
|
*/ |
52 |
|
|
53 |
|
/* K = 4 */ |
54 |
|
static const uint32_t roundtab_76[16] = { 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1 }; |
55 |
|
/* K = 2 */ |
56 |
|
static const uint32_t roundtab_78[8] = { 0, 0, 1, 1, 0, 0, 0, 1 }; |
57 |
|
/* K = 1 */ |
58 |
|
static const uint32_t roundtab_79[4] = { 0, 1, 0, 0 }; |
59 |
|
|
60 |
|
|
61 |
/* |
/* |
62 |
* getref: calculate reference image pointer |
* getref: calculate reference image pointer |
63 |
* the decision to use interpolation h/v/hv or the normal image is |
* the decision to use interpolation h/v/hv or the normal image is |
64 |
* based on dx & dy. |
* based on dx & dy. |
65 |
*/ |
*/ |
66 |
|
|
|
static const uint32_t roundtab[16] = |
|
|
{ 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 }; |
|
|
|
|
|
|
|
67 |
static __inline const uint8_t * |
static __inline const uint8_t * |
68 |
get_ref(const uint8_t * const refn, |
get_ref(const uint8_t * const refn, |
69 |
const uint8_t * const refh, |
const uint8_t * const refh, |
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, |
172 |
|
|
173 |
int |
int |
174 |
MEanalysis( const IMAGE * const pRef, |
MEanalysis( const IMAGE * const pRef, |
175 |
const IMAGE * const pCurrent, |
FRAMEINFO * const Current, |
176 |
MBParam * const pParam, |
MBParam * const pParam, |
177 |
MACROBLOCK * const pMBs, |
int maxIntra, |
178 |
const uint32_t iFcode); |
int intraCount, |
179 |
|
int bCount); |
180 |
|
|
181 |
|
int |
182 |
|
FindFcode( const MBParam * const pParam, |
183 |
|
const FRAMEINFO * const current); |
184 |
|
|
185 |
|
/* used internally only */ |
186 |
|
|
187 |
|
static VECTOR |
188 |
|
GlobalMotionEst(const MACROBLOCK * const pMBs, |
189 |
|
const MBParam * const pParam, const uint32_t iFcode); |
190 |
|
|
191 |
|
|
192 |
#endif /* _MOTION_H_ */ |
#endif /* _MOTION_H_ */ |