Ignore:
Timestamp:
11 Jul 2018, 15:19:49 (6 years ago)
Author:
tech
Message:

Merged HTM-16.2-dev@1412

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComRdCostWeightPrediction.cpp

    r1405 r1413  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2016, ITU/ISO/IEC
     6 * Copyright (c) 2010-2017, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    7474  Distortion uiSum = 0;
    7575
    76 #if !U0040_MODIFIED_WEIGHTEDPREDICTION_WITH_BIPRED_AND_CLIPPING
    77   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 #else
    9576  // Default weight
    9677  if (w0 == 1 << shift)
     
    222203  }
    223204  //pcDtParam->compIdx = MAX_NUM_COMPONENT;  // reset for DEBUG (assert test)
    224 #endif
    225205
    226206  return uiSum >> distortionShift;
     
    256236  Distortion sum = 0;
    257237
    258 #if !U0040_MODIFIED_WEIGHTEDPREDICTION_WITH_BIPRED_AND_CLIPPING
    259   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 #else
    273238  if (pcDtParam->bIsBiPred)
    274239  {
     
    303268
    304269  //pcDtParam->compIdx = MAX_NUM_COMPONENT; // reset for DEBUG (assert test)
    305 #endif
    306270
    307271  return sum;
Note: See TracChangeset for help on using the changeset viewer.