source: 3DVCSoftware/trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.h @ 2

Last change on this file since 2 was 2, checked in by hhi, 13 years ago

inital import

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1
2
3/** \file     TComRdCostWeightPrediction.h
4    \brief    RD cost computation classes (header)
5*/
6
7#ifndef __TCOMRDCOSTWEIGHTPREDICTION__
8#define __TCOMRDCOSTWEIGHTPREDICTION__
9
10
11#include "CommonDef.h"
12#include "TComPattern.h"
13#include "TComMv.h"
14#include "TComRdCost.h"
15#ifdef WEIGHT_PRED
16  #include "TComSlice.h"
17#endif
18
19class DistParam;
20class TComPattern;
21
22// ====================================================================================================================
23// Class definition
24// ====================================================================================================================
25
26/// RD cost computation class, with Weighted Prediction
27class TComRdCostWeightPrediction
28{
29private:
30  static  Int   m_w0, m_w1; // current wp scaling values
31  static  Int   m_shift;
32  static  Int   m_offset;
33  static  Int   m_round;
34  static  Bool  m_xSetDone;
35
36public:
37  TComRdCostWeightPrediction();
38  virtual ~TComRdCostWeightPrediction();
39 
40protected:
41   
42  static inline Void  xSetWPscale(Int w0, Int w1, Int shift, Int offset, Int round);
43
44  static UInt xGetSSEw          ( DistParam* pcDtParam );
45  static UInt xGetSSE4w         ( DistParam* pcDtParam );
46  static UInt xGetSSE8w         ( DistParam* pcDtParam );
47  static UInt xGetSSE16w        ( DistParam* pcDtParam );
48  static UInt xGetSSE32w        ( DistParam* pcDtParam );
49  static UInt xGetSSE64w        ( DistParam* pcDtParam );
50  static UInt xGetSSE16Nw       ( DistParam* pcDtParam );
51 
52  static UInt xGetSADw          ( DistParam* pcDtParam );
53  static UInt xGetSAD4w         ( DistParam* pcDtParam );
54  static UInt xGetSAD8w         ( DistParam* pcDtParam );
55  static UInt xGetSAD16w        ( DistParam* pcDtParam );
56  static UInt xGetSAD32w        ( DistParam* pcDtParam );
57  static UInt xGetSAD64w        ( DistParam* pcDtParam );
58  static UInt xGetSAD16Nw       ( DistParam* pcDtParam );
59 
60  static UInt xGetSADsw         ( DistParam* pcDtParam );
61  static UInt xGetSADs4w        ( DistParam* pcDtParam );
62  static UInt xGetSADs8w        ( DistParam* pcDtParam );
63  static UInt xGetSADs16w       ( DistParam* pcDtParam );
64  static UInt xGetSADs32w       ( DistParam* pcDtParam );
65  static UInt xGetSADs64w       ( DistParam* pcDtParam );
66  static UInt xGetSADs16Nw      ( DistParam* pcDtParam );
67 
68  static UInt xGetHADs4w        ( DistParam* pcDtParam );
69  static UInt xGetHADs8w        ( DistParam* pcDtParam );
70  static UInt xGetHADsw         ( DistParam* pcDtParam );
71  static UInt xCalcHADs2x2w     ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );
72  static UInt xCalcHADs4x4w     ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );
73  static UInt xCalcHADs8x8w     ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );
74 
75};// END CLASS DEFINITION TComRdCostWeightPrediction
76
77inline Void  TComRdCostWeightPrediction::xSetWPscale(Int w0, Int w1, Int shift, Int offset, Int round)
78{
79  m_w0        = w0;
80  m_w1        = w1;
81  m_shift     = shift;
82  m_offset    = offset;
83  m_round     = round;
84
85  m_xSetDone  = true;
86}
87
88#endif // __TCOMRDCOSTWEIGHTPREDICTION__
89
Note: See TracBrowser for help on using the repository browser.