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

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

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

revision 803, Fri Jan 24 11:44:24 2003 UTC revision 836, Wed Feb 12 12:57:27 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.1.2.14 2003-01-24 11:44:24 syskin Exp $   *  $Id: motion_est.h,v 1.1.2.15 2003-02-12 12:57:27 syskin Exp $
30   *   *
31   ***************************************************************************/   ***************************************************************************/
32    
# Line 226  Line 226 
226                  const int x,                  const int x,
227                  const int y,                  const int y,
228                  const uint32_t MotionFlags,                  const uint32_t MotionFlags,
229                    const uint32_t GlobalFlags,
230                  const uint32_t iQuant,                  const uint32_t iQuant,
231                  SearchData * const Data,                  SearchData * const Data,
232                  const MBParam * const pParam,                  const MBParam * const pParam,
# Line 246  Line 247 
247    
248  #define iDiamondSize 2  #define iDiamondSize 2
249    
250    static __inline uint32_t
251    MakeGoodMotionFlags(const uint32_t MotionFlags, const uint32_t GlobalFlags)
252    {
253            uint32_t Flags = MotionFlags;
254    
255            if (!(GlobalFlags & XVID_MODEDECISION_BITS))
256                    Flags &= ~(QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS+EXTSEARCH_BITS);
257    
258            if (Flags & EXTSEARCH_BITS)
259                    Flags |= HALFPELREFINE16_BITS;
260    
261            if (Flags & EXTSEARCH_BITS && MotionFlags & PMV_EXTSEARCH8)
262                    Flags |= HALFPELREFINE8_BITS;
263    
264            if (Flags & HALFPELREFINE16_BITS)
265                    Flags |= QUARTERPELREFINE16_BITS;
266    
267            if (Flags & HALFPELREFINE8_BITS) {
268                    Flags |= QUARTERPELREFINE8_BITS;
269                    Flags &= ~PMV_HALFPELREFINE8;
270            }
271    
272            if (Flags & QUARTERPELREFINE8_BITS)
273                    Flags &= ~PMV_QUARTERPELREFINE8;
274    
275            if (!(GlobalFlags & XVID_QUARTERPEL))
276                    Flags &= ~(PMV_QUARTERPELREFINE16+PMV_QUARTERPELREFINE8+QUARTERPELREFINE16_BITS+QUARTERPELREFINE8_BITS);
277    
278            if (!(GlobalFlags & XVID_HALFPEL))
279                    Flags &= ~(PMV_EXTSEARCH16+PMV_HALFPELREFINE16+PMV_HALFPELREFINE8+HALFPELREFINE16_BITS+HALFPELREFINE8_BITS);
280    
281            if (GlobalFlags & (XVID_GREYSCALE + XVID_REDUCED))
282                    Flags &= ~(PMV_CHROMA16 + PMV_CHROMA8);
283    
284            return Flags;
285    }
286    
287    /* BITS mode decision and search */
288    
289    #include "../bitstream/zigzag.h"
290    #include "../quant/quant_mpeg4.h"
291    #include "../quant/quant_h263.h"
292    #include "../bitstream/vlc_codes.h"
293    
294    static int
295    CountMBBitsInter(SearchData * const Data,
296                                    const MACROBLOCK * const pMBs, const int x, const int y,
297                                    const MBParam * const pParam,
298                                    const uint32_t MotionFlags);
299    
300    static int
301    CountMBBitsInter4v(const SearchData * const Data,
302                                            MACROBLOCK * const pMB, const MACROBLOCK * const pMBs,
303                                            const int x, const int y,
304                                            const MBParam * const pParam, const uint32_t MotionFlags,
305                                            const VECTOR * const backup);
306    
307    static int
308    CountMBBitsIntra(const SearchData * const Data);
309    
310    int CodeCoeffIntra_CalcBits(const int16_t qcoeff[64], const uint16_t * zigzag);
311    int CodeCoeffInter_CalcBits(const int16_t qcoeff[64], const uint16_t * zigzag);
312    
313  #endif                                                  /* _MOTION_EST_H_ */  #endif                                                  /* _MOTION_EST_H_ */

Legend:
Removed from v.803  
changed lines
  Added in v.836

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