Changeset 1395 in SHVCSoftware
- Timestamp:
- 4 Aug 2015, 03:21:11 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibCommon
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1315 r1395 2815 2815 2816 2816 2817 Void TComDataCU::clipMv (TComMv& rcMv) 2817 Void TComDataCU::clipMv (TComMv& rcMv) const 2818 2818 { 2819 2819 const TComSPS &sps=*(m_pcSlice->getSPS()); -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1316 r1395 381 381 Void setMVPNumSubParts ( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 382 382 383 Void clipMv ( TComMv& rcMv ) ;384 Void getMvPredLeft ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldA.getMv(); }385 Void getMvPredAbove ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldB.getMv(); }386 Void getMvPredAboveRight ( TComMv& rcMvPred ) { rcMvPred = m_cMvFieldC.getMv(); }383 Void clipMv ( TComMv& rcMv ) const; 384 Void getMvPredLeft ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldA.getMv(); } 385 Void getMvPredAbove ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldB.getMv(); } 386 Void getMvPredAboveRight ( TComMv& rcMvPred ) const { rcMvPred = m_cMvFieldC.getMv(); } 387 387 388 388 Void compressMV (); -
branches/SHM-dev/source/Lib/TLibCommon/TComPattern.h
r1287 r1395 69 69 return m_piROIOrigin; 70 70 } 71 __inline const Pel* getROIOrigin() const 72 { 73 return m_piROIOrigin; 74 } 71 75 72 76 /// set parameters from Pel buffer for accessing neighbouring pixels … … 86 90 // ROI & pattern information, (ROI = &pattern[AboveOffset][LeftOffset]) 87 91 Pel* getROIY() { return m_cPatternY.getROIOrigin(); } 88 Int getROIYWidth() { return m_cPatternY.m_iROIWidth; } 89 Int getROIYHeight() { return m_cPatternY.m_iROIHeight; } 90 Int getPatternLStride() { return m_cPatternY.m_iPatternStride; } 91 Int getBitDepthY() { return m_cPatternY.m_bitDepth; } 92 const Pel* getROIY() const { return m_cPatternY.getROIOrigin(); } 93 Int getROIYWidth() const { return m_cPatternY.m_iROIWidth; } 94 Int getROIYHeight() const { return m_cPatternY.m_iROIHeight; } 95 Int getPatternLStride() const { return m_cPatternY.m_iPatternStride; } 96 Int getBitDepthY() const { return m_cPatternY.m_bitDepth; } 92 97 93 98 // ------------------------------------------------------------------------------------------------------------------- -
branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.cpp
r1389 r1395 197 197 198 198 // Setting the Distortion Parameter for Inter (ME) 199 Void TComRdCost::setDistParam( TComPattern* pcPatternKey,Pel* piRefY, Int iRefStride, DistParam& rcDistParam )199 Void TComRdCost::setDistParam( const TComPattern* const pcPatternKey, const Pel* piRefY, Int iRefStride, DistParam& rcDistParam ) 200 200 { 201 201 // set Original & Curr Pointer / Stride … … 229 229 230 230 // Setting the Distortion Parameter for Inter (subpel ME with step) 231 Void TComRdCost::setDistParam( TComPattern* pcPatternKey,Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME )231 Void TComRdCost::setDistParam( const TComPattern* const pcPatternKey, const Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME ) 232 232 { 233 233 // set Original & Curr Pointer / Stride … … 271 271 } 272 272 273 Void TComRdCost::setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1,Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard )274 { 275 rcDP.pOrg = p1;276 rcDP.pCur = p2;277 rcDP.iStrideOrg = iStride1;278 rcDP.iStrideCur = iStride2;279 rcDP.iCols = iWidth;280 rcDP.iRows = iHeight;281 rcDP.iStep = 1;282 rcDP.iSubShift = 0;283 rcDP.bitDepth = bitDepth;284 rcDP.DistFunc = m_afpDistortFunc[ ( bHadamard ? DF_HADS : DF_SADS ) + g_aucConvertToBit[ iWidth ] + 1 ];285 } 286 287 Distortion TComRdCost::calcHAD( Int bitDepth, Pel* pi0, Int iStride0,Pel* pi1, Int iStride1, Int iWidth, Int iHeight )273 Void TComRdCost::setDistParam( DistParam& rcDP, Int bitDepth, const Pel* p1, Int iStride1, const Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard ) 274 { 275 rcDP.pOrg = p1; 276 rcDP.pCur = p2; 277 rcDP.iStrideOrg = iStride1; 278 rcDP.iStrideCur = iStride2; 279 rcDP.iCols = iWidth; 280 rcDP.iRows = iHeight; 281 rcDP.iStep = 1; 282 rcDP.iSubShift = 0; 283 rcDP.bitDepth = bitDepth; 284 rcDP.DistFunc = m_afpDistortFunc[ ( bHadamard ? DF_HADS : DF_SADS ) + g_aucConvertToBit[ iWidth ] + 1 ]; 285 } 286 287 Distortion TComRdCost::calcHAD( Int bitDepth, const Pel* pi0, Int iStride0, const Pel* pi1, Int iStride1, Int iWidth, Int iHeight ) 288 288 { 289 289 Distortion uiSum = 0; … … 320 320 } 321 321 322 Distortion TComRdCost::getDistPart( Int bitDepth, Pel* piCur, Int iCurStride,Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, const ComponentID compID, DFunc eDFunc )322 Distortion TComRdCost::getDistPart( Int bitDepth, const Pel* piCur, Int iCurStride, const Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, const ComponentID compID, DFunc eDFunc ) 323 323 { 324 324 DistParam cDtParam; … … 1201 1201 // -------------------------------------------------------------------------------------------------------------------- 1202 1202 1203 Distortion TComRdCost::xCalcHADs2x2( Pel *piOrg,Pel *piCur, Int iStrideOrg, Int iStrideCur, Int iStep )1203 Distortion TComRdCost::xCalcHADs2x2( const Pel *piOrg, const Pel *piCur, Int iStrideOrg, Int iStrideCur, Int iStep ) 1204 1204 { 1205 1205 Distortion satd = 0; … … 1223 1223 } 1224 1224 1225 Distortion TComRdCost::xCalcHADs4x4( Pel *piOrg,Pel *piCur, Int iStrideOrg, Int iStrideCur, Int iStep )1225 Distortion TComRdCost::xCalcHADs4x4( const Pel *piOrg, const Pel *piCur, Int iStrideOrg, Int iStrideCur, Int iStep ) 1226 1226 { 1227 1227 Int k; … … 1319 1319 } 1320 1320 1321 Distortion TComRdCost::xCalcHADs8x8( Pel *piOrg,Pel *piCur, Int iStrideOrg, Int iStrideCur, Int iStep )1321 Distortion TComRdCost::xCalcHADs8x8( const Pel *piOrg, const Pel *piCur, Int iStrideOrg, Int iStrideCur, Int iStep ) 1322 1322 { 1323 1323 Int k, i, j, jj; … … 1423 1423 return TComRdCostWeightPrediction::xGetHADsw( pcDtParam ); 1424 1424 } 1425 Pel* piOrg= pcDtParam->pOrg;1426 Pel* piCur= pcDtParam->pCur;1427 Int iRows= pcDtParam->iRows;1428 Int iCols= pcDtParam->iCols;1429 Int iStrideCur = pcDtParam->iStrideCur;1430 Int iStrideOrg = pcDtParam->iStrideOrg;1431 Int iStep= pcDtParam->iStep;1425 const Pel* piOrg = pcDtParam->pOrg; 1426 const Pel* piCur = pcDtParam->pCur; 1427 const Int iRows = pcDtParam->iRows; 1428 const Int iCols = pcDtParam->iCols; 1429 const Int iStrideCur = pcDtParam->iStrideCur; 1430 const Int iStrideOrg = pcDtParam->iStrideOrg; 1431 const Int iStep = pcDtParam->iStep; 1432 1432 1433 1433 Int x, y; -
branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.h
r1389 r1395 68 68 { 69 69 public: 70 Pel*pOrg;71 Pel*pCur;72 Int iStrideOrg;73 Int iStrideCur;74 Int iRows;75 Int iCols;76 Int iStep;77 FpDistFunc DistFunc;78 Int bitDepth;79 80 Bool bApplyWeight; // whether weighted prediction is used or not81 WPScalingParam*wpCur; // weighted prediction scaling parameters for current ref82 ComponentID compIdx;70 const Pel* pOrg; 71 const Pel* pCur; 72 Int iStrideOrg; 73 Int iStrideCur; 74 Int iRows; 75 Int iCols; 76 Int iStep; 77 FpDistFunc DistFunc; 78 Int bitDepth; 79 80 Bool bApplyWeight; // whether weighted prediction is used or not 81 const WPScalingParam *wpCur; // weighted prediction scaling parameters for current ref 82 ComponentID compIdx; 83 83 84 84 // (vertical) subsampling shift (for reducing complexity) 85 85 // - 0 = no subsampling, 1 = even rows, 2 = every 4th, etc. 86 Int iSubShift;86 Int iSubShift; 87 87 88 88 DistParam() 89 { 90 pOrg = NULL; 91 pCur = NULL; 92 iStrideOrg = 0; 93 iStrideCur = 0; 94 iRows = 0; 95 iCols = 0; 96 iStep = 1; 97 DistFunc = NULL; 98 iSubShift = 0; 99 bitDepth = 0; 100 } 89 : pOrg(NULL), 90 pCur(NULL), 91 iStrideOrg(0), 92 iStrideCur(0), 93 iRows(0), 94 iCols(0), 95 iStep(1), 96 DistFunc(NULL), 97 bitDepth(0), 98 bApplyWeight(false), 99 wpCur(NULL), 100 compIdx(MAX_NUM_COMPONENT), 101 iSubShift(0) 102 { } 101 103 }; 102 104 … … 142 144 143 145 Void setDistParam( UInt uiBlkWidth, UInt uiBlkHeight, DFunc eDFunc, DistParam& rcDistParam ); 144 Void setDistParam( TComPattern* pcPatternKey,Pel* piRefY, Int iRefStride, DistParam& rcDistParam );145 Void setDistParam( TComPattern* pcPatternKey,Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME=false );146 Void setDistParam( DistParam& rcDP, Int bitDepth, Pel* p1, Int iStride1,Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false );147 148 Distortion calcHAD(Int bitDepth, Pel* pi0, Int iStride0,Pel* pi1, Int iStride1, Int iWidth, Int iHeight );146 Void setDistParam( const TComPattern* const pcPatternKey, const Pel* piRefY, Int iRefStride, DistParam& rcDistParam ); 147 Void setDistParam( const TComPattern* const pcPatternKey, const Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME=false ); 148 Void setDistParam( DistParam& rcDP, Int bitDepth, const Pel* p1, Int iStride1, const Pel* p2, Int iStride2, Int iWidth, Int iHeight, Bool bHadamard = false ); 149 150 Distortion calcHAD(Int bitDepth, const Pel* pi0, Int iStride0, const Pel* pi1, Int iStride1, Int iWidth, Int iHeight ); 149 151 150 152 // for motion cost … … 190 192 191 193 static Distortion xGetHADs ( DistParam* pcDtParam ); 192 static Distortion xCalcHADs2x2 ( Pel *piOrg,Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );193 static Distortion xCalcHADs4x4 ( Pel *piOrg,Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );194 static Distortion xCalcHADs8x8 ( Pel *piOrg,Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep );194 static Distortion xCalcHADs2x2 ( const Pel *piOrg, const Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 195 static Distortion xCalcHADs4x4 ( const Pel *piOrg, const Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 196 static Distortion xCalcHADs8x8 ( const Pel *piOrg, const Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 195 197 196 198 197 199 public: 198 200 199 Distortion getDistPart(Int bitDepth, Pel* piCur, Int iCurStride,Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, const ComponentID compID, DFunc eDFunc = DF_SSE );201 Distortion getDistPart(Int bitDepth, const Pel* piCur, Int iCurStride, const Pel* piOrg, Int iOrgStride, UInt uiBlkWidth, UInt uiBlkHeight, const ComponentID compID, DFunc eDFunc = DF_SSE ); 200 202 201 203 };// END CLASS DEFINITION TComRdCost
Note: See TracChangeset for help on using the changeset viewer.