Changeset 56 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComMotionInfo.h
- Timestamp:
- 11 May 2012, 21:20:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r5 r56 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 1,ISO/IEC6 * Copyright (c) 2010-2012, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 15 15 * this list of conditions and the following disclaimer in the documentation 16 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the I SO/IEC nor the names of its contributors may17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may 18 18 * be used to endorse or promote products derived from this software without 19 19 * specific prior written permission. … … 32 32 */ 33 33 34 35 36 34 /** \file TComMotionInfo.h 37 35 \brief motion information handling classes (header) … … 46 44 #include "TComMv.h" 47 45 46 //! \ingroup TLibCommon 47 //! \{ 48 48 49 // ==================================================================================================================== 49 50 // Type definition … … 53 54 typedef struct _AMVPInfo 54 55 { 55 TComMv m_acMvCand[ AMVP_MAX_NUM_CANDS ]; ///< array of motion vector predictor candidates56 TComMv m_acMvCand[ AMVP_MAX_NUM_CANDS_MEM ]; ///< array of motion vector predictor candidates 56 57 Int iN; ///< number of motion vector predictor candidates 57 58 } AMVPInfo; … … 69 70 70 71 public: 71 TComMvField() : 72 m_iRefIdx (-1) 73 { 74 } 72 TComMvField() : m_iRefIdx( NOT_VALID ) {} 75 73 76 Void setMvField ( TComMvcMv, Int iRefIdx )74 Void setMvField( TComMv const & cMv, Int iRefIdx ) 77 75 { 78 76 m_acMv = cMv; … … 80 78 } 81 79 82 TComMv& getMv () { return m_acMv; } 83 Int getRefIdx () { return m_iRefIdx; } 80 Void setRefIdx( Int refIdx ) { m_iRefIdx = refIdx; } 84 81 85 Int getHor () { return m_acMv.getHor(); } 86 Int getVer () { return m_acMv.getVer(); } 82 TComMv const & getMv() const { return m_acMv; } 83 TComMv & getMv() { return m_acMv; } 84 85 Int getRefIdx() const { return m_iRefIdx; } 86 Int getHor () const { return m_acMv.getHor(); } 87 Int getVer () const { return m_acMv.getVer(); } 87 88 }; 88 89 … … 93 94 TComMv* m_pcMv; 94 95 TComMv* m_pcMvd; 95 Int*m_piRefIdx;96 Char* m_piRefIdx; 96 97 UInt m_uiNumPartition; 97 98 AMVPInfo m_cAMVPInfo; 99 100 template <typename T> 101 Void setAll( T *p, T const & val, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx ); 102 98 103 public: 99 TComCUMvField() 100 { 101 m_pcMv = NULL; 102 m_pcMvd = NULL; 103 m_piRefIdx = NULL; 104 } 105 ~TComCUMvField() 106 { 107 m_pcMv = NULL; 108 m_pcMvd = NULL; 109 m_piRefIdx = NULL; 110 } 111 104 TComCUMvField() : m_pcMv(NULL), m_pcMvd(NULL), m_piRefIdx(NULL), m_uiNumPartition(0) {} 105 ~TComCUMvField() {} 106 112 107 // ------------------------------------------------------------------------------------------------------------------ 113 108 // create / destroy 114 109 // ------------------------------------------------------------------------------------------------------------------ 115 110 116 Void create 117 Void destroy 111 Void create( UInt uiNumPartition ); 112 Void destroy(); 118 113 119 114 // ------------------------------------------------------------------------------------------------------------------ 120 115 // clear / copy 121 116 // ------------------------------------------------------------------------------------------------------------------ 117 118 Void clearMvField(); 122 119 123 Void clearMv ( Int iPartAddr, UInt uiDepth ); 124 Void clearMvd ( Int iPartAddr, UInt uiDepth ); 125 Void clearMvField (); 126 127 Void copyFrom ( TComCUMvField* pcCUMvFieldSrc, Int iNumPartSrc, Int iPartAddrDst ); 128 Void copyTo ( TComCUMvField* pcCUMvFieldDst, Int iPartAddrDst ); 129 Void copyTo ( TComCUMvField* pcCUMvFieldDst, Int iPartAddrDst, UInt uiOffset, UInt uiNumPart ); 130 Void copyMvTo ( TComCUMvField* pcCUMvFieldDst, Int iPartAddrDst ); 120 Void copyFrom( TComCUMvField const * pcCUMvFieldSrc, Int iNumPartSrc, Int iPartAddrDst ); 121 Void copyTo ( TComCUMvField* pcCUMvFieldDst, Int iPartAddrDst ) const; 122 Void copyTo ( TComCUMvField* pcCUMvFieldDst, Int iPartAddrDst, UInt uiOffset, UInt uiNumPart ) const; 131 123 132 124 // ------------------------------------------------------------------------------------------------------------------ … … 134 126 // ------------------------------------------------------------------------------------------------------------------ 135 127 136 TComMv& getMv ( Int iIdx ) { return m_pcMv [iIdx]; } 137 TComMv* getMv () { return m_pcMv; } 138 TComMv& getMvd ( Int iIdx ) { return m_pcMvd [iIdx]; } 139 TComMv* getMvd () { return m_pcMvd; } 140 Int getRefIdx ( Int iIdx ) { return m_piRefIdx[iIdx]; } 141 Int* getRefIdx () { return m_piRefIdx; } 128 TComMv const & getMv ( Int iIdx ) const { return m_pcMv [iIdx]; } 129 TComMv const & getMvd ( Int iIdx ) const { return m_pcMvd [iIdx]; } 130 Int getRefIdx( Int iIdx ) const { return m_piRefIdx[iIdx]; } 142 131 143 132 AMVPInfo* getAMVPInfo () { return &m_cAMVPInfo; } 133 144 134 // ------------------------------------------------------------------------------------------------------------------ 145 135 // set 146 136 // ------------------------------------------------------------------------------------------------------------------ 147 137 148 Void setMv ( TComMv cMv, Int iIdx ) { m_pcMv [iIdx] = cMv; } 149 Void setMvd ( TComMv cMvd, Int iIdx ) { m_pcMvd [iIdx] = cMvd; } 150 Void setRefIdx ( Int iRefIdx, Int iIdx ) { m_piRefIdx[iIdx] = iRefIdx; } 138 Void setAllMv ( TComMv const & rcMv, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 139 Void setAllMvd ( TComMv const & rcMvd, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 140 Void setAllRefIdx ( Int iRefIdx, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 141 Void setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 142 143 Void setNumPartition( Int iNumPart ) 144 { 145 m_uiNumPartition = iNumPart; 146 } 151 147 152 Void setMvPtr ( TComMv* cMvPtr ) { m_pcMv = cMvPtr; } 153 Void setMvdPtr ( TComMv* cMvdPtr ) { m_pcMvd = cMvdPtr; } 154 Void setRefIdxPtr ( Int* iRefIdxPtr ) { m_piRefIdx = iRefIdxPtr; } 155 Void setNumPartition ( Int iNumPart ) { m_uiNumPartition=iNumPart; } 148 Void linkToWithOffset( TComCUMvField const * src, Int offset ) 149 { 150 m_pcMv = src->m_pcMv + offset; 151 m_pcMvd = src->m_pcMvd + offset; 152 m_piRefIdx = src->m_piRefIdx + offset; 153 } 156 154 157 Void setAllMv ( TComMv& rcMv, PartSize eCUMode, Int iPartAddr, Int iPartIdx, UInt uiDepth ); 158 Void setAllMvd ( TComMv& rcMvd, PartSize eCUMode, Int iPartAddr, Int iPartIdx, UInt uiDepth ); 159 Void setAllRefIdx ( Int iRefIdx, PartSize eMbMode, Int iPartAddr, Int iPartIdx, UInt uiDepth ); 160 Void setAllMvField ( TComMv& rcMv, Int iRefIdx, PartSize eMbMode, Int iPartAddr, Int iPartIdx, UInt uiDepth ); 161 162 #if AMVP_BUFFERCOMPRESS 163 Void compress (PredMode* pePredMode,UChar* puhInterDir); 164 #endif 165 155 #if HHI_MPI 156 Void compress(Char* pePredMode, UChar* puhInterDir, Int scale); 157 #else 158 Void compress(Char* pePredMode, Int scale); 159 #endif 160 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC 161 Void decreaseMvAccuracy( Int iPartAddr, Int iNumPart, Int iShift ); 162 #endif 166 163 }; 167 164 165 //! \} 166 168 167 #endif // __TCOMMOTIONINFO__ 169
Note: See TracChangeset for help on using the changeset viewer.