[svn] / trunk / xvidcore / src / motion / estimation.h Repository:
ViewVC logotype

Diff of /trunk/xvidcore/src/motion/estimation.h

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

revision 1567, Wed Dec 8 12:43:48 2004 UTC revision 1919, Fri Dec 24 13:21:35 2010 UTC
# Line 4  Line 4 
4   *  - Motion Estimation related header -   *  - Motion Estimation related header -
5   *   *
6   *  Copyright(C) 2002 Christoph Lampert <gruel@web.de>   *  Copyright(C) 2002 Christoph Lampert <gruel@web.de>
7   *               2002 Michael Militzer <michael@xvid.org>   *               2002-2010 Michael Militzer <michael@xvid.org>
8   *               2002-2003 Radoslaw Czyz <xvid@syskin.cjb.net>   *               2002-2003 Radoslaw Czyz <xvid@syskin.cjb.net>
9   *   *
10   *  This program is free software ; you can redistribute it and/or modify   *  This program is free software ; you can redistribute it and/or modify
# Line 21  Line 21 
21   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
22   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23   *   *
24   * $Id: estimation.h,v 1.9 2004-12-08 12:43:48 syskin Exp $   * $Id: estimation.h,v 1.16 2010-12-24 13:21:35 Isibaar Exp $
25   *   *
26   ****************************************************************************/   ****************************************************************************/
27    
# Line 30  Line 30 
30    
31  #include "../portab.h"  #include "../portab.h"
32  #include "../global.h"  #include "../global.h"
33    #include "sad.h"
34    
35  /* hard coded motion search parameters */  /* hard coded motion search parameters */
36    
# Line 40  Line 41 
41  #define MV16_INTER_BIAS 450  #define MV16_INTER_BIAS 450
42    
43  /* vector map (vlc delta size) smoother parameters ! float !*/  /* vector map (vlc delta size) smoother parameters ! float !*/
44  #define NEIGH_TEND_16X16                10.5  #define NEIGH_TEND_16X16                0.6
45  #define NEIGH_TEND_8X8                  40.0  #define NEIGH_TEND_8X8                  1.5
46    
47  #define NEIGH_8X8_BIAS                  40  #define NEIGH_8X8_BIAS                  40
48    
49  #define BITS_MULT                               16  #define BITS_MULT                               16
# Line 114  Line 116 
116          const uint16_t * scan_table; /* current scan table */          const uint16_t * scan_table; /* current scan table */
117          const uint16_t * mpeg_quant_matrices;                   /* current MPEG quantization matrices */          const uint16_t * mpeg_quant_matrices;                   /* current MPEG quantization matrices */
118          int lambda[6];                          /* R-D lambdas for all 6 blocks */          int lambda[6];                          /* R-D lambdas for all 6 blocks */
119            unsigned int quant_sq;          /* quant squared - saves many multiplications in VHQ */
120            uint32_t rel_var8[6];           /* relative variances for all 6 sub-blocks */
121            int metric;                                     /* distortion metric for R-D optimizations, currently: PSNR=0, PSNRHVSM=1 */
122  } SearchData;  } SearchData;
123    
124    static __inline uint32_t
125    masked_sseh8_16bit(int16_t * const orig,
126                       int16_t * const rec,
127                       const uint32_t rel_var8)
128    {
129            uint16_t mask = ((isqrt(2*coeff8_energy(orig)*rel_var8) + 48) >> 6);
130            return (5*sseh8_16bit(orig, rec, (uint16_t) mask)) >> 7;
131    }
132    
133  typedef void(CheckFunc)(const int x, const int y,  typedef void(CheckFunc)(const int x, const int y,
134                                                  SearchData * const Data,                                                  SearchData * const Data,
135                                                  const unsigned int Direction);                                                  const unsigned int Direction);
# Line 164  Line 177 
177                  const IMAGE * const pCurrent,                  const IMAGE * const pCurrent,
178                  const IMAGE * const pRef,                  const IMAGE * const pRef,
179                  const IMAGE * const vGMC,                  const IMAGE * const vGMC,
180                  const int coding_type);                  const int coding_type,
181                    const int bound);
182    
183  void  void
184  xvid_me_ModeDecision_Fast(SearchData * const Data,  xvid_me_ModeDecision_Fast(SearchData * const Data,
# Line 178  Line 192 
192                  const IMAGE * const pCurrent,                  const IMAGE * const pCurrent,
193                  const IMAGE * const pRef,                  const IMAGE * const pRef,
194                  const IMAGE * const vGMC,                  const IMAGE * const vGMC,
195                  const int coding_type);                  const int coding_type,
196                    const int bound);
197    
198  void  void
199  ModeDecision_BVOP_RD(SearchData * const Data_d,  ModeDecision_BVOP_RD(SearchData * const Data_d,
# Line 190  Line 205 
205                                           VECTOR * f_predMV,                                           VECTOR * f_predMV,
206                                           VECTOR * b_predMV,                                           VECTOR * b_predMV,
207                                           const uint32_t MotionFlags,                                           const uint32_t MotionFlags,
208                                             const uint32_t VopFlags,
209                                           const MBParam * const pParam,                                           const MBParam * const pParam,
210                                           int x, int y);                                           int x, int y,
211                                             int best_sad,
212                                             int force_direct);
213    
214  unsigned int  unsigned int
215  getMinFcode(const int MVmax);  getMinFcode(const int MVmax);

Legend:
Removed from v.1567  
changed lines
  Added in v.1919

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