Ignore:
Timestamp:
29 Aug 2013, 15:10:30 (11 years ago)
Author:
tech
Message:

Merged dev3: DEV-2.0-DEV3-KWU@589

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp

    r598 r601  
    483483
    484484}
     485
     486#if SCU_HS_FAST_DEPTH_INTRA_E0238
     487
     488UInt TComRdCost::calcVAR (Pel* pi0, Int stride, Int width, Int height, Int cuDepth)
     489{
     490  Int temp = 0;
     491
     492  for (Int y = 0; y < height; y++)
     493  {
     494    for (Int x = 0; x < width; x++)
     495    {
     496      temp += pi0[ y * stride + x ];
     497    }
     498  }
     499
     500  Int cuMaxLog2Size = g_aucConvertToBit[g_uiMaxCUWidth]+2;
     501 
     502  if ( width == 4 )
     503  {
     504    cuDepth = cuMaxLog2Size - 2;
     505  }
     506
     507  temp = temp >> (cuMaxLog2Size-cuDepth) * 2;
     508
     509  UInt sum = 0;
     510  for (Int y = 0; y < height; y++)
     511  {
     512    for (Int x = 0; x <  width; x++)
     513    {
     514      sum += (pi0[ y * stride + x ] - temp ) * (pi0[ y * stride + x ] - temp );
     515    }
     516  }
     517  return (sum >> (cuMaxLog2Size-cuDepth)*2);
     518
     519}
     520#endif
     521
    485522
    486523#if WEIGHTED_CHROMA_DISTORTION
Note: See TracChangeset for help on using the changeset viewer.