--- branches/dev-api-3/xvidcore/src/motion/motion_est.h 2002/10/17 13:27:22 600 +++ branches/dev-api-3/xvidcore/src/motion/motion_est.h 2002/11/20 15:29:07 663 @@ -26,7 +26,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: motion_est.h,v 1.1.2.5 2002-10-17 13:27:22 Isibaar Exp $ + * $Id: motion_est.h,v 1.1.2.8 2002-11-20 15:29:07 syskin Exp $ * ***************************************************************************/ @@ -44,13 +44,14 @@ /* INTER bias for INTER/INTRA decision; mpeg4 spec suggests 2*nb */ #define MV16_INTER_BIAS 512 +/* vector map (vlc delta size) smoother parameters ! float !*/ +#define NEIGH_TEND_16X16 10.5 +#define NEIGH_TEND_8X8 4.0 +#define NEIGH_8X8_BIAS 30 + /* Parameters which control inter/inter4v decision */ #define IMV16X16 2 -/* vector map (vlc delta size) smoother parameters ! float !*/ -#define NEIGH_TEND_16X16 4.0 -#define NEIGH_TEND_8X8 7.0 - static const int lambda_vec16[32] = { 0 ,(int)(1.00235 * NEIGH_TEND_16X16 + 0.5), (int)(1.15582*NEIGH_TEND_16X16 + 0.5), (int)(1.31976*NEIGH_TEND_16X16 + 0.5), @@ -105,9 +106,7 @@ // general fields int max_dx, min_dx, max_dy, min_dy; uint32_t rounding; - uint32_t quarterpel; VECTOR predMV; - VECTOR predQMV; VECTOR *currentMV; VECTOR *currentQMV; int32_t *iMinSAD; @@ -115,12 +114,19 @@ const uint8_t * RefH; const uint8_t * RefV; const uint8_t * RefHV; - const uint8_t * RefQ; + const uint8_t * RefCU; + const uint8_t * RefCV; + const uint8_t * CurU; + const uint8_t * CurV; + uint8_t * RefQ; const uint8_t * Cur; - uint32_t iQuant; + uint32_t lambda16; + uint32_t lambda8; uint32_t iEdgedWidth; uint32_t iFcode; int * temp; + int qpel, qpel_precision; + int chroma; //fields for interpolate and direct mode const uint8_t *bRef; const uint8_t *bRefH; @@ -204,11 +210,10 @@ const uint32_t iLimit); static void -SearchP(const uint8_t * const pRef, +SearchP(const IMAGE * const pRef, const uint8_t * const pRefH, const uint8_t * const pRefV, const uint8_t * const pRefHV, - const uint8_t * const pRefQ, const IMAGE * const pCur, const int x, const int y,