21 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: estimation.h,v 1.6 2004-07-18 11:48:08 syskin Exp $ |
* $Id: estimation.h,v 1.8 2004-12-05 13:56:13 syskin Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
30 |
|
|
31 |
#include "../portab.h" |
#include "../portab.h" |
32 |
#include "../global.h" |
#include "../global.h" |
|
#include "../image/reduced.h" |
|
33 |
|
|
34 |
/* hard coded motion search parameters */ |
/* hard coded motion search parameters */ |
35 |
|
|
59 |
#define CHECK_CANDIDATE(X,Y,D) { \ |
#define CHECK_CANDIDATE(X,Y,D) { \ |
60 |
CheckCandidate((X),(Y), data, (D) ); } |
CheckCandidate((X),(Y), data, (D) ); } |
61 |
|
|
|
#define RRV_MV_SCALEDOWN(a) ( (a)>=0 ? (a+1)/2 : (a-1)/2 ) |
|
|
|
|
62 |
/* fast ((A)/2)*2 */ |
/* fast ((A)/2)*2 */ |
63 |
#define EVEN(A) (((A)<0?(A)+1:(A)) & ~1) |
#define EVEN(A) (((A)<0?(A)+1:(A)) & ~1) |
64 |
|
|
93 |
int qpel; /* if we're coding in qpel mode */ |
int qpel; /* if we're coding in qpel mode */ |
94 |
int qpel_precision; /* if X and Y are in qpel precision (refinement probably) */ |
int qpel_precision; /* if X and Y are in qpel precision (refinement probably) */ |
95 |
int chroma; /* should we include chroma SAD? */ |
int chroma; /* should we include chroma SAD? */ |
|
int rrv; /* are we using reduced resolution? */ |
|
96 |
|
|
97 |
/* fields for interpolate and direct modes */ |
/* fields for interpolate and direct modes */ |
98 |
const uint8_t * b_RefP[6]; /* backward reference pictures - N, V, H, HV, cU, cV */ |
const uint8_t * b_RefP[6]; /* backward reference pictures - N, V, H, HV, cU, cV */ |
99 |
VECTOR bpredMV; /* backward prediction - used interpolate mode only */ |
VECTOR bpredMV; /* backward prediction - used in Interpolate-mode search only */ |
100 |
uint32_t bFcode; /* backward fcode - used as above */ |
uint32_t bFcode; /* backward fcode - used in Interpolate-mode search only */ |
101 |
int b_chromaX, b_chromaY; |
int b_chromaX, b_chromaY; |
102 |
|
|
103 |
/* fields for direct mode */ |
/* fields for direct mode */ |
104 |
VECTOR directmvF[4]; /* scaled reference vectors */ |
VECTOR directmvF[4]; /* scaled reference vectors */ |
105 |
VECTOR directmvB[4]; /* as above */ |
VECTOR directmvB[4]; |
106 |
const VECTOR * referencemv; /* pointer to not-scaled reference vectors */ |
const VECTOR * referencemv; /* pointer to not-scaled reference vectors */ |
107 |
|
|
108 |
/* BITS/R-D stuff */ |
/* BITS/R-D stuff */ |
136 |
int |
int |
137 |
xvid_me_SkipDecisionP(const IMAGE * current, const IMAGE * reference, |
xvid_me_SkipDecisionP(const IMAGE * current, const IMAGE * reference, |
138 |
const int x, const int y, |
const int x, const int y, |
139 |
const uint32_t stride, const uint32_t iQuant, int rrv); |
const uint32_t stride, const uint32_t iQuant); |
140 |
|
|
141 |
#define iDiamondSize 2 |
#define iDiamondSize 2 |
142 |
typedef void |
typedef void |