[svn] / branches / dev-api-4 / xvidcore / src / motion / motion_est.h Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/motion/motion_est.h

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

revision 886, Fri Feb 21 14:49:29 2003 UTC revision 978, Tue Apr 8 15:35:52 2003 UTC
# Line 26  Line 26 
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_est.h,v 1.3 2003-02-21 14:40:11 syskin Exp $   *  $Id: motion_est.h,v 1.3.2.5 2003-04-08 15:35:52 edgomez Exp $
30   *   *
31   ***************************************************************************/   ***************************************************************************/
32    
# Line 90  Line 90 
90          (int)(29.6436*NEIGH_TEND_8X8 + 0.5), (int)(36.4949*NEIGH_TEND_8X8 + 0.5)        };          (int)(29.6436*NEIGH_TEND_8X8 + 0.5), (int)(36.4949*NEIGH_TEND_8X8 + 0.5)        };
91    
92  // mv.length table  // mv.length table
93  static const uint32_t mvtab[33] = {  static const int mvtab[64] = {
94          1, 2, 3, 4, 6, 7, 7, 7,          1, 2, 3, 4, 6, 7, 7, 7,
95          9, 9, 9, 10, 10, 10, 10, 10,          9, 9, 9, 10, 10, 10, 10, 10,
96          10, 10, 10, 10, 10, 10, 10, 10,          10, 10, 10, 10, 10, 10, 10, 10,
97          10, 11, 11, 11, 11, 11, 11, 12, 12                  10, 11, 11, 11, 11, 11, 11, 12,
98  };                  12, 12, 12, 12, 12, 12, 12, 12,
99                    12, 12, 12, 12, 12, 12, 12, 12,
100                    12, 12, 12, 12, 12, 12, 12, 12, 12 };
101    
102  static const int DQtab[4] = {  static const int DQtab[4] = {
103          -1, -2, 1, 2          -1, -2, 1, 2
# Line 112  Line 114 
114          VECTOR * currentMV;          VECTOR * currentMV;
115          VECTOR * currentQMV;          VECTOR * currentQMV;
116          int32_t * iMinSAD;          int32_t * iMinSAD;
117          const uint8_t * Ref;          const uint8_t * RefP[6]; // N, V, H, HV, cU, cV
         const uint8_t * RefH;  
         const uint8_t * RefV;  
         const uint8_t * RefHV;  
         const uint8_t * RefCU;  
         const uint8_t * RefCV;  
118          const uint8_t * CurU;          const uint8_t * CurU;
119          const uint8_t * CurV;          const uint8_t * CurV;
120          uint8_t * RefQ;          uint8_t * RefQ;
# Line 131  Line 128 
128          int chroma;          int chroma;
129          int rrv;          int rrv;
130  //fields for interpolate and direct modes  //fields for interpolate and direct modes
131          const uint8_t * bRef;          const uint8_t * b_RefP[6]; // N, V, H, HV, cU, cV
         const uint8_t * bRefH;  
         const uint8_t * bRefV;  
         const uint8_t * bRefHV;  
         const uint8_t * b_RefCU;  
         const uint8_t * b_RefCV;  
   
132          VECTOR bpredMV;          VECTOR bpredMV;
133          uint32_t bFcode;          uint32_t bFcode;
134  // fields for direct mode  // fields for direct mode
135          VECTOR directmvF[4];          VECTOR directmvF[4];
136          VECTOR directmvB[4];          VECTOR directmvB[4];
137          const VECTOR * referencemv;          const VECTOR * referencemv;
138    // _BITS stuff
139            int16_t * dctSpace;
140    
141  } SearchData;  } SearchData;
142    
# Line 246  Line 239 
239  #define iDiamondSize 2  #define iDiamondSize 2
240    
241  static __inline uint32_t  static __inline uint32_t
242  MakeGoodMotionFlags(const uint32_t MotionFlags, const uint32_t GlobalFlags)  MakeGoodMotionFlags(const uint32_t MotionFlags, const uint32_t VopFlags, const uint32_t VolFlags)
243  {  {
244          uint32_t Flags = MotionFlags;          uint32_t Flags = MotionFlags;
245    
246          if (!(GlobalFlags & XVID_MODEDECISION_BITS))          if (!(VopFlags & XVID_VOP_MODEDECISION_BITS))
247                  Flags &= ~(QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS+EXTSEARCH_BITS);                  Flags &= ~(XVID_ME_QUARTERPELREFINE16_BITS+XVID_ME_QUARTERPELREFINE8_BITS+XVID_ME_HALFPELREFINE16_BITS+XVID_ME_HALFPELREFINE8_BITS+XVID_ME_EXTSEARCH_BITS);
248    
249          if (Flags & EXTSEARCH_BITS)          if (Flags & XVID_ME_EXTSEARCH_BITS)
250                  Flags |= HALFPELREFINE16_BITS;                  Flags |= XVID_ME_HALFPELREFINE16_BITS;
251    
252          if (Flags & EXTSEARCH_BITS && MotionFlags & PMV_EXTSEARCH8)          if (Flags & XVID_ME_EXTSEARCH_BITS && MotionFlags & XVID_ME_EXTSEARCH8)
253                  Flags |= HALFPELREFINE8_BITS;                  Flags |= XVID_ME_HALFPELREFINE8_BITS;
254    
255          if (Flags & HALFPELREFINE16_BITS)          if (Flags & XVID_ME_HALFPELREFINE16_BITS)
256                  Flags |= QUARTERPELREFINE16_BITS;                  Flags |= XVID_ME_QUARTERPELREFINE16_BITS;
257    
258          if (Flags & HALFPELREFINE8_BITS) {          if (Flags & XVID_ME_HALFPELREFINE8_BITS) {
259                  Flags |= QUARTERPELREFINE8_BITS;                  Flags |= XVID_ME_QUARTERPELREFINE8_BITS;
260                  Flags &= ~PMV_HALFPELREFINE8;                  Flags &= ~XVID_ME_HALFPELREFINE8;
261          }          }
262    
263          if (Flags & QUARTERPELREFINE8_BITS)          if (Flags & XVID_ME_QUARTERPELREFINE8_BITS)
264                  Flags &= ~PMV_QUARTERPELREFINE8;                  Flags &= ~XVID_ME_QUARTERPELREFINE8;
265    
266          if (!(GlobalFlags & XVID_QUARTERPEL))          if (!(VolFlags & XVID_VOL_QUARTERPEL))
267                  Flags &= ~(PMV_QUARTERPELREFINE16+PMV_QUARTERPELREFINE8+QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS);                  Flags &= ~(XVID_ME_QUARTERPELREFINE16+XVID_ME_QUARTERPELREFINE8+XVID_ME_QUARTERPELREFINE16_BITS+XVID_ME_QUARTERPELREFINE8_BITS);
268    
269          if (!(GlobalFlags & XVID_HALFPEL))          if (!(VopFlags & XVID_VOP_HALFPEL))
270                  Flags &= ~(PMV_EXTSEARCH16+PMV_HALFPELREFINE16+PMV_HALFPELREFINE8+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS);                  Flags &= ~(XVID_ME_EXTSEARCH16+XVID_ME_HALFPELREFINE16+XVID_ME_HALFPELREFINE8+XVID_ME_HALFPELREFINE16_BITS+XVID_ME_HALFPELREFINE8_BITS);
271    
272          if (GlobalFlags & (XVID_GREYSCALE + XVID_REDUCED))          if ((VopFlags & XVID_VOP_GREYSCALE) || (VopFlags & XVID_VOP_REDUCED))
273                  Flags &= ~(PMV_CHROMA16 + PMV_CHROMA8);                  Flags &= ~(XVID_ME_CHROMA16 + XVID_ME_CHROMA8);
274    
275          return Flags;          return Flags;
276  }  }

Legend:
Removed from v.886  
changed lines
  Added in v.978

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