Changeset 1387 in SHVCSoftware
- Timestamp:
- 4 Aug 2015, 02:53:17 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/Debug.cpp
r1335 r1387 179 179 PRINT_CONSTANT(O0043_BEST_EFFORT_DECODING, settingNameWidth, settingValueWidth); 180 180 181 PRINT_CONSTANT(ME_ENABLE_ROUNDING_OF_MVS, settingNameWidth, settingValueWidth); 182 181 183 //------------------------------------------------ 182 184 -
branches/SHM-dev/source/Lib/TLibCommon/TComMv.h
r1262 r1387 116 116 } 117 117 118 #if ME_ENABLE_ROUNDING_OF_MVS 119 //! shift right with rounding 120 Void divideByPowerOf2 (const Int i) 121 { 122 int offset = (i == 0) ? 0 : 1 << (i - 1); 123 m_iHor += offset; 124 m_iVer += offset; 125 126 m_iHor >>= i; 127 m_iVer >>= i; 128 } 129 #endif 130 118 131 const TComMv& operator<<= (const Int i) 119 132 { -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1353 r1387 190 190 #define O0043_BEST_EFFORT_DECODING 0 ///< 0 (default) = disable code related to best effort decoding, 1 = enable code relating to best effort decoding [ decode-side only ]. 191 191 192 #define ME_ENABLE_ROUNDING_OF_MVS 1 ///< 0 (default) = disables rounding of motion vectors when right shifted, 1 = enables rounding 193 192 194 #define RDOQ_CHROMA_LAMBDA 1 ///< F386: weighting of chroma for RDOQ 193 195 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1372 r1387 4004 4004 pcCU->clipMv ( rcMvSrchRngRB ); 4005 4005 4006 #if ME_ENABLE_ROUNDING_OF_MVS 4007 rcMvSrchRngLT.divideByPowerOf2(iMvShift); 4008 rcMvSrchRngRB.divideByPowerOf2(iMvShift); 4009 #else 4006 4010 rcMvSrchRngLT >>= iMvShift; 4007 4011 rcMvSrchRngRB >>= iMvShift; 4012 #endif 4008 4013 } 4009 4014 … … 4125 4130 UInt uiSearchRange = m_iSearchRange; 4126 4131 pcCU->clipMv( rcMv ); 4132 #if ME_ENABLE_ROUNDING_OF_MVS 4133 rcMv.divideByPowerOf2(2); 4134 #else 4127 4135 rcMv >>= 2; 4136 #endif 4128 4137 // init TZSearchStruct 4129 4138 IntTZSearchStruct cStruct; … … 4142 4151 TComMv cMv = m_acMvPredictors[index]; 4143 4152 pcCU->clipMv( cMv ); 4153 #if ME_ENABLE_ROUNDING_OF_MVS 4154 cMv.divideByPowerOf2(2); 4155 #else 4144 4156 cMv >>= 2; 4157 #endif 4145 4158 xTZSearchHelp( pcPatternKey, cStruct, cMv.getHor(), cMv.getVer(), 0, 0 ); 4146 4159 } … … 4158 4171 integerMv2Nx2NPred <<= 2; 4159 4172 pcCU->clipMv( integerMv2Nx2NPred ); 4173 #if ME_ENABLE_ROUNDING_OF_MVS 4174 integerMv2Nx2NPred.divideByPowerOf2(2); 4175 #else 4160 4176 integerMv2Nx2NPred >>= 2; 4177 #endif 4161 4178 xTZSearchHelp(pcPatternKey, cStruct, integerMv2Nx2NPred.getHor(), integerMv2Nx2NPred.getVer(), 0, 0); 4162 4179 … … 4337 4354 4338 4355 pcCU->clipMv( rcMv ); 4356 #if ME_ENABLE_ROUNDING_OF_MVS 4357 rcMv.divideByPowerOf2(2); 4358 #else 4339 4359 rcMv >>= 2; 4360 #endif 4340 4361 // init TZSearchStruct 4341 4362 IntTZSearchStruct cStruct; … … 4357 4378 TComMv cMv = m_acMvPredictors[index]; 4358 4379 pcCU->clipMv( cMv ); 4380 #if ME_ENABLE_ROUNDING_OF_MVS 4381 cMv.divideByPowerOf2(2); 4382 #else 4359 4383 cMv >>= 2; 4384 #endif 4360 4385 xTZSearchHelp( pcPatternKey, cStruct, cMv.getHor(), cMv.getVer(), 0, 0 ); 4361 4386 } … … 4373 4398 integerMv2Nx2NPred <<= 2; 4374 4399 pcCU->clipMv( integerMv2Nx2NPred ); 4400 #if ME_ENABLE_ROUNDING_OF_MVS 4401 integerMv2Nx2NPred.divideByPowerOf2(2); 4402 #else 4375 4403 integerMv2Nx2NPred >>= 2; 4404 #endif 4376 4405 xTZSearchHelp(pcPatternKey, cStruct, integerMv2Nx2NPred.getHor(), integerMv2Nx2NPred.getVer(), 0, 0); 4377 4406 … … 5925 5954 { 5926 5955 uiBitsTemp += iRefIdxTemp+1; 5927 if ( iRefIdxTemp == pcCU->getSlice()->getNumRefIdx(eRefPicList)-1 ) uiBitsTemp--; 5956 if ( iRefIdxTemp == pcCU->getSlice()->getNumRefIdx(eRefPicList)-1 ) 5957 { 5958 uiBitsTemp--; 5959 } 5928 5960 } 5929 5961
Note: See TracChangeset for help on using the changeset viewer.