[cvs] / xvidcore / src / motion / estimation_common.c Repository:
ViewVC logotype

Diff of /xvidcore/src/motion/estimation_common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8, Sun Oct 3 14:49:34 2004 UTC revision 1.11, Mon Mar 14 00:47:08 2005 UTC
# Line 55  Line 55 
55  { 0, 1, 0, 0 };  { 0, 1, 0, 0 };
56    
57  const int xvid_me_lambda_vec16[32] =  const int xvid_me_lambda_vec16[32] =
58          {     0    ,(int)(1.00235 * NEIGH_TEND_16X16 + 0.5),          {     0    ,(int)(0.5 * NEIGH_TEND_16X16 + 0.5),
59          (int)(1.15582*NEIGH_TEND_16X16 + 0.5), (int)(1.31976*NEIGH_TEND_16X16 + 0.5),          (int)(1.0*NEIGH_TEND_16X16 + 0.5), (int)(1.5*NEIGH_TEND_16X16 + 0.5),
60          (int)(1.49591*NEIGH_TEND_16X16 + 0.5), (int)(1.68601*NEIGH_TEND_16X16 + 0.5),          (int)(2.0*NEIGH_TEND_16X16 + 0.5), (int)(2.5*NEIGH_TEND_16X16 + 0.5),
61          (int)(1.89187*NEIGH_TEND_16X16 + 0.5), (int)(2.11542*NEIGH_TEND_16X16 + 0.5),          (int)(5.0*NEIGH_TEND_16X16 + 0.5), (int)(7.0*NEIGH_TEND_16X16 + 0.5),
62          (int)(2.35878*NEIGH_TEND_16X16 + 0.5), (int)(2.62429*NEIGH_TEND_16X16 + 0.5),          (int)(8.0*NEIGH_TEND_16X16 + 0.5), (int)(9.0*NEIGH_TEND_16X16 + 0.5),
63          (int)(2.91455*NEIGH_TEND_16X16 + 0.5), (int)(3.23253*NEIGH_TEND_16X16 + 0.5),          (int)(10.0*NEIGH_TEND_16X16 + 0.5), (int)(11.0*NEIGH_TEND_16X16 + 0.5),
64          (int)(3.58158*NEIGH_TEND_16X16 + 0.5), (int)(3.96555*NEIGH_TEND_16X16 + 0.5),          (int)(12.0*NEIGH_TEND_16X16 + 0.5), (int)(13.0*NEIGH_TEND_16X16 + 0.5),
65          (int)(4.38887*NEIGH_TEND_16X16 + 0.5), (int)(4.85673*NEIGH_TEND_16X16 + 0.5),          (int)(14.0*NEIGH_TEND_16X16 + 0.5), (int)(15.0*NEIGH_TEND_16X16 + 0.5),
66          (int)(5.37519*NEIGH_TEND_16X16 + 0.5), (int)(5.95144*NEIGH_TEND_16X16 + 0.5),          (int)(16.0*NEIGH_TEND_16X16 + 0.5), (int)(17.0*NEIGH_TEND_16X16 + 0.5),
67          (int)(6.59408*NEIGH_TEND_16X16 + 0.5), (int)(7.31349*NEIGH_TEND_16X16 + 0.5),          (int)(18.0*NEIGH_TEND_16X16 + 0.5), (int)(19.0*NEIGH_TEND_16X16 + 0.5),
68          (int)(8.12242*NEIGH_TEND_16X16 + 0.5), (int)(9.03669*NEIGH_TEND_16X16 + 0.5),          (int)(20.0*NEIGH_TEND_16X16 + 0.5), (int)(21.0*NEIGH_TEND_16X16 + 0.5),
69          (int)(10.0763*NEIGH_TEND_16X16 + 0.5), (int)(11.2669*NEIGH_TEND_16X16 + 0.5),          (int)(22.0*NEIGH_TEND_16X16 + 0.5), (int)(23.0*NEIGH_TEND_16X16 + 0.5),
70          (int)(12.6426*NEIGH_TEND_16X16 + 0.5), (int)(14.2493*NEIGH_TEND_16X16 + 0.5),          (int)(24.0*NEIGH_TEND_16X16 + 0.5), (int)(25.0*NEIGH_TEND_16X16 + 0.5),
71          (int)(16.1512*NEIGH_TEND_16X16 + 0.5), (int)(18.442*NEIGH_TEND_16X16 + 0.5),          (int)(26.0*NEIGH_TEND_16X16 + 0.5), (int)(27.0*NEIGH_TEND_16X16 + 0.5),
72          (int)(21.2656*NEIGH_TEND_16X16 + 0.5), (int)(24.8580*NEIGH_TEND_16X16 + 0.5),          (int)(28.0*NEIGH_TEND_16X16 + 0.5), (int)(29.0*NEIGH_TEND_16X16 + 0.5),
73          (int)(29.6436*NEIGH_TEND_16X16 + 0.5), (int)(36.4949*NEIGH_TEND_16X16 + 0.5)          (int)(30.0*NEIGH_TEND_16X16 + 0.5), (int)(31.0*NEIGH_TEND_16X16 + 0.5)
74  };  };
75    
76  /*****************************************************************************  /*****************************************************************************
# Line 269  Line 269 
269                                  CHECK_CANDIDATE(x + iDiamondSize, y - iDiamondSize, 2 + 4);                                  CHECK_CANDIDATE(x + iDiamondSize, y - iDiamondSize, 2 + 4);
270                                  break;                                  break;
271                          case 2 + 8:                          case 2 + 8:
272                                  CHECK_CANDIDATE(x - iDiamondSize, y - iDiamondSize, 1 + 4);                                  CHECK_CANDIDATE(x + iDiamondSize, y - iDiamondSize, 2 + 4);
                                 CHECK_CANDIDATE(x - iDiamondSize, y + iDiamondSize, 1 + 8);  
273                                  CHECK_CANDIDATE(x + iDiamondSize, y + iDiamondSize, 2 + 8);                                  CHECK_CANDIDATE(x + iDiamondSize, y + iDiamondSize, 2 + 8);
274                                    CHECK_CANDIDATE(x - iDiamondSize, y + iDiamondSize, 1 + 8);
275                                  break;                                  break;
276                          case 1 + 8:                          case 1 + 8:
277                                  CHECK_CANDIDATE(x + iDiamondSize, y - iDiamondSize, 2 + 4);                                  CHECK_CANDIDATE(x - iDiamondSize, y - iDiamondSize, 1 + 4);
                                 CHECK_CANDIDATE(x + iDiamondSize, y + iDiamondSize, 2 + 8);  
278                                  CHECK_CANDIDATE(x - iDiamondSize, y + iDiamondSize, 1 + 8);                                  CHECK_CANDIDATE(x - iDiamondSize, y + iDiamondSize, 1 + 8);
279                                    CHECK_CANDIDATE(x + iDiamondSize, y + iDiamondSize, 2 + 8);
280                                  break;                                  break;
281                          default:                /* 1+2+4+8 == we didn't find anything at all */                          default:                /* 1+2+4+8 == we didn't find anything at all */
282                                  CHECK_CANDIDATE(x - iDiamondSize, y - iDiamondSize, 1 + 4);                                  CHECK_CANDIDATE(x - iDiamondSize, y - iDiamondSize, 1 + 4);
# Line 495  Line 495 
495          CHECK_CANDIDATE((xo+xo2)>>1, (yo+yo2)>>1, direction);          CHECK_CANDIDATE((xo+xo2)>>1, (yo+yo2)>>1, direction);
496    
497  }  }
498    
499    /* it's the positive max, so "32" needs fcode of 2, not 1 */
500    unsigned int
501    getMinFcode(const int MVmax)
502    {
503            unsigned int fcode;
504            for (fcode = 1; (16 << fcode) <= MVmax; fcode++);
505            return fcode;
506    }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.11

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4