23 |
#define MODE_DIRECT_NONE_MV 4 |
#define MODE_DIRECT_NONE_MV 4 |
24 |
#define MODE_DIRECT_NO4V 5 |
#define MODE_DIRECT_NO4V 5 |
25 |
|
|
|
|
|
|
// vop coding types |
|
|
// intra, prediction, backward, sprite, not_coded |
|
|
#define I_VOP 0 |
|
|
#define P_VOP 1 |
|
|
#define B_VOP 2 |
|
|
#define S_VOP 3 |
|
|
#define N_VOP 4 |
|
|
|
|
|
/* convert mpeg-4 coding type i/p/b/s_VOP to XVID_TYPE_xxx */ |
|
|
static __inline int |
|
|
coding2type(int coding_type) |
|
|
{ |
|
|
return coding_type + 1; |
|
|
} |
|
|
|
|
|
/* convert XVID_TYPE_xxx to bitstream coding type i/p/b/s_VOP */ |
|
|
static __inline int |
|
|
type2coding(int xvid_type) |
|
|
{ |
|
|
return xvid_type - 1; |
|
|
} |
|
|
|
|
|
|
|
|
typedef struct |
|
|
{ |
|
|
int x; |
|
|
int y; |
|
|
} |
|
|
VECTOR; |
|
|
|
|
|
|
|
|
|
|
26 |
typedef struct |
typedef struct |
27 |
{ |
{ |
28 |
VECTOR duv[3]; |
VECTOR duv[3]; |
178 |
#define SIGN(X) (((X)>0)?1:-1) |
#define SIGN(X) (((X)>0)?1:-1) |
179 |
#define CLIP(X,AMIN,AMAX) (((X)<(AMIN)) ? (AMIN) : ((X)>(AMAX)) ? (AMAX) : (X)) |
#define CLIP(X,AMIN,AMAX) (((X)<(AMIN)) ? (AMIN) : ((X)>(AMAX)) ? (AMAX) : (X)) |
180 |
#define DIV_DIV(a,b) (((a)>0) ? ((a)+((b)>>1))/(b) : ((a)-((b)>>1))/(b)) |
#define DIV_DIV(a,b) (((a)>0) ? ((a)+((b)>>1))/(b) : ((a)-((b)>>1))/(b)) |
|
#define SWAP(_T_,A,B) { _T_ tmp = A; A = B; B = tmp; } |
|
181 |
|
|
182 |
|
|
183 |
#endif /* _GLOBAL_H_ */ |
#endif /* _GLOBAL_H_ */ |