Changeset 1412 in 3DVCSoftware for branches/HTM-16.2-dev/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp
- Timestamp:
- 12 Apr 2018, 11:12:21 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-16.2-dev/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp
r1405 r1412 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 6, ITU/ISO/IEC6 * Copyright (c) 2010-2017, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 74 74 Distortion uiSum = 0; 75 75 76 #if !U0040_MODIFIED_WEIGHTEDPREDICTION_WITH_BIPRED_AND_CLIPPING77 for(Int iRows = pcDtParam->iRows; iRows != 0; iRows-- )78 {79 for (Int n = 0; n < iCols; n++ )80 {81 const Pel pred = ( (w0*piCur[n] + round) >> shift ) + offset ;82 83 uiSum += abs( piOrg[n] - pred );84 }85 if (pcDtParam->m_maximumDistortionForEarlyExit < ( uiSum >> distortionShift))86 {87 return uiSum >> distortionShift;88 }89 piOrg += iStrideOrg;90 piCur += iStrideCur;91 }92 93 pcDtParam->compIdx = MAX_NUM_COMPONENT; // reset for DEBUG (assert test)94 #else95 76 // Default weight 96 77 if (w0 == 1 << shift) … … 222 203 } 223 204 //pcDtParam->compIdx = MAX_NUM_COMPONENT; // reset for DEBUG (assert test) 224 #endif225 205 226 206 return uiSum >> distortionShift; … … 256 236 Distortion sum = 0; 257 237 258 #if !U0040_MODIFIED_WEIGHTEDPREDICTION_WITH_BIPRED_AND_CLIPPING259 for(Int iRows = pcDtParam->iRows ; iRows != 0; iRows-- )260 {261 for (Int n = 0; n < iCols; n++ )262 {263 const Pel pred = ( (w0*piCur[n] + round) >> shift ) + offset ;264 const Pel residual = piOrg[n] - pred;265 sum += ( Distortion(residual) * Distortion(residual) ) >> distortionShift;266 }267 piOrg += iStrideOrg;268 piCur += iStrideCur;269 }270 271 pcDtParam->compIdx = MAX_NUM_COMPONENT; // reset for DEBUG (assert test)272 #else273 238 if (pcDtParam->bIsBiPred) 274 239 { … … 303 268 304 269 //pcDtParam->compIdx = MAX_NUM_COMPONENT; // reset for DEBUG (assert test) 305 #endif306 270 307 271 return sum;
Note: See TracChangeset for help on using the changeset viewer.