[cvs] / xvidcore / src / motion / motion_est.h Repository:
ViewVC logotype

Diff of /xvidcore/src/motion/motion_est.h

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

revision 1.3.2.5, Tue Apr 8 15:35:52 2003 UTC revision 1.5, Sat Apr 5 15:54:58 2003 UTC
# Line 114  Line 114 
114          VECTOR * currentMV;          VECTOR * currentMV;
115          VECTOR * currentQMV;          VECTOR * currentQMV;
116          int32_t * iMinSAD;          int32_t * iMinSAD;
117          const uint8_t * RefP[6]; // N, V, H, HV, cU, cV          const uint8_t * Ref;
118            const uint8_t * RefH;
119            const uint8_t * RefV;
120            const uint8_t * RefHV;
121            const uint8_t * RefCU;
122            const uint8_t * RefCV;
123          const uint8_t * CurU;          const uint8_t * CurU;
124          const uint8_t * CurV;          const uint8_t * CurV;
125          uint8_t * RefQ;          uint8_t * RefQ;
# Line 128  Line 133 
133          int chroma;          int chroma;
134          int rrv;          int rrv;
135  //fields for interpolate and direct modes  //fields for interpolate and direct modes
136          const uint8_t * b_RefP[6]; // N, V, H, HV, cU, cV          const uint8_t * bRef;
137            const uint8_t * bRefH;
138            const uint8_t * bRefV;
139            const uint8_t * bRefHV;
140            const uint8_t * b_RefCU;
141            const uint8_t * b_RefCV;
142    
143          VECTOR bpredMV;          VECTOR bpredMV;
144          uint32_t bFcode;          uint32_t bFcode;
145  // fields for direct mode  // fields for direct mode
# Line 239  Line 250 
250  #define iDiamondSize 2  #define iDiamondSize 2
251    
252  static __inline uint32_t  static __inline uint32_t
253  MakeGoodMotionFlags(const uint32_t MotionFlags, const uint32_t VopFlags, const uint32_t VolFlags)  MakeGoodMotionFlags(const uint32_t MotionFlags, const uint32_t GlobalFlags)
254  {  {
255          uint32_t Flags = MotionFlags;          uint32_t Flags = MotionFlags;
256    
257          if (!(VopFlags & XVID_VOP_MODEDECISION_BITS))          if (!(GlobalFlags & XVID_MODEDECISION_BITS))
258                  Flags &= ~(XVID_ME_QUARTERPELREFINE16_BITS+XVID_ME_QUARTERPELREFINE8_BITS+XVID_ME_HALFPELREFINE16_BITS+XVID_ME_HALFPELREFINE8_BITS+XVID_ME_EXTSEARCH_BITS);                  Flags &= ~(QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS+EXTSEARCH_BITS);
259    
260          if (Flags & XVID_ME_EXTSEARCH_BITS)          if (Flags & EXTSEARCH_BITS)
261                  Flags |= XVID_ME_HALFPELREFINE16_BITS;                  Flags |= HALFPELREFINE16_BITS;
262    
263          if (Flags & XVID_ME_EXTSEARCH_BITS && MotionFlags & XVID_ME_EXTSEARCH8)          if (Flags & EXTSEARCH_BITS && MotionFlags & PMV_EXTSEARCH8)
264                  Flags |= XVID_ME_HALFPELREFINE8_BITS;                  Flags |= HALFPELREFINE8_BITS;
265    
266          if (Flags & XVID_ME_HALFPELREFINE16_BITS)          if (Flags & HALFPELREFINE16_BITS)
267                  Flags |= XVID_ME_QUARTERPELREFINE16_BITS;                  Flags |= QUARTERPELREFINE16_BITS;
268    
269          if (Flags & XVID_ME_HALFPELREFINE8_BITS) {          if (Flags & HALFPELREFINE8_BITS) {
270                  Flags |= XVID_ME_QUARTERPELREFINE8_BITS;                  Flags |= QUARTERPELREFINE8_BITS;
271                  Flags &= ~XVID_ME_HALFPELREFINE8;                  Flags &= ~PMV_HALFPELREFINE8;
272          }          }
273    
274          if (Flags & XVID_ME_QUARTERPELREFINE8_BITS)          if (Flags & QUARTERPELREFINE8_BITS)
275                  Flags &= ~XVID_ME_QUARTERPELREFINE8;                  Flags &= ~PMV_QUARTERPELREFINE8;
276    
277          if (!(VolFlags & XVID_VOL_QUARTERPEL))          if (!(GlobalFlags & XVID_QUARTERPEL))
278                  Flags &= ~(XVID_ME_QUARTERPELREFINE16+XVID_ME_QUARTERPELREFINE8+XVID_ME_QUARTERPELREFINE16_BITS+XVID_ME_QUARTERPELREFINE8_BITS);                  Flags &= ~(PMV_QUARTERPELREFINE16+PMV_QUARTERPELREFINE8+QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS);
279    
280          if (!(VopFlags & XVID_VOP_HALFPEL))          if (!(GlobalFlags & XVID_HALFPEL))
281                  Flags &= ~(XVID_ME_EXTSEARCH16+XVID_ME_HALFPELREFINE16+XVID_ME_HALFPELREFINE8+XVID_ME_HALFPELREFINE16_BITS+XVID_ME_HALFPELREFINE8_BITS);                  Flags &= ~(PMV_EXTSEARCH16+PMV_HALFPELREFINE16+PMV_HALFPELREFINE8+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS);
282    
283          if ((VopFlags & XVID_VOP_GREYSCALE) || (VopFlags & XVID_VOP_REDUCED))          if (GlobalFlags & (XVID_GREYSCALE + XVID_REDUCED))
284                  Flags &= ~(XVID_ME_CHROMA16 + XVID_ME_CHROMA8);                  Flags &= ~(PMV_CHROMA16 + PMV_CHROMA8);
285    
286          return Flags;          return Flags;
287  }  }

Legend:
Removed from v.1.3.2.5  
changed lines
  Added in v.1.5

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