26 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
27 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
28 |
* |
* |
29 |
* $Id: motion.h,v 1.13.2.3 2002-10-03 08:26:19 syskin Exp $ |
* $Id: motion.h,v 1.13.2.5 2002-11-02 15:52:31 chl Exp $ |
30 |
* |
* |
31 |
***************************************************************************/ |
***************************************************************************/ |
32 |
|
|
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, |
181 |
FindFcode( const MBParam * const pParam, |
FindFcode( const MBParam * const pParam, |
182 |
const FRAMEINFO * const current); |
const FRAMEINFO * const current); |
183 |
|
|
184 |
|
/* used internally only */ |
185 |
|
|
186 |
|
static VECTOR |
187 |
|
GlobalMotionEst(const MACROBLOCK * const pMBs, |
188 |
|
const MBParam * const pParam, const uint32_t iFcode); |
189 |
|
|
190 |
|
|
191 |
#endif /* _MOTION_H_ */ |
#endif /* _MOTION_H_ */ |