Ignore:
Timestamp:
20 Jul 2015, 14:13:33 (9 years ago)
Author:
tech
Message:

Upgrade to HM-16.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev1/source/Lib/TLibCommon/TComPrediction.cpp

    r1279 r1287  
    216216// Function for calculating DC value of the reference samples used in Intra prediction
    217217//NOTE: Bit-Limit - 25-bit source
    218 Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight, Bool bAbove, Bool bLeft )
     218Pel TComPrediction::predIntraGetPredValDC( const Pel* pSrc, Int iSrcStride, UInt iWidth, UInt iHeight)
    219219{
    220220  assert(iWidth > 0 && iHeight > 0);
     
    222222  Pel pDcVal;
    223223
    224   if (bAbove)
    225   {
    226     for (iInd = 0;iInd < iWidth;iInd++)
    227     {
    228       iSum += pSrc[iInd-iSrcStride];
    229     }
    230   }
    231   if (bLeft)
    232   {
    233     for (iInd = 0;iInd < iHeight;iInd++)
    234     {
    235       iSum += pSrc[iInd*iSrcStride-1];
    236     }
    237   }
    238 
    239   if (bAbove && bLeft)
    240   {
    241     pDcVal = (iSum + iWidth) / (iWidth + iHeight);
    242   }
    243   else if (bAbove)
    244   {
    245     pDcVal = (iSum + iWidth/2) / iWidth;
    246   }
    247   else if (bLeft)
    248   {
    249     pDcVal = (iSum + iHeight/2) / iHeight;
    250   }
    251   else
    252   {
    253     pDcVal = pSrc[-1]; // Default DC value already calculated and placed in the prediction array if no neighbors are available
    254   }
     224  for (iInd = 0;iInd < iWidth;iInd++)
     225  {
     226    iSum += pSrc[iInd-iSrcStride];
     227  }
     228  for (iInd = 0;iInd < iHeight;iInd++)
     229  {
     230    iSum += pSrc[iInd*iSrcStride-1];
     231  }
     232
     233  pDcVal = (iSum + iWidth) / (iWidth + iHeight);
    255234
    256235  return pDcVal;
     
    287266                                          Pel* pTrueDst, Int dstStrideTrue,
    288267                                          UInt uiWidth, UInt uiHeight, ChannelType channelType,
    289                                           UInt dirMode, Bool blkAboveAvailable, Bool blkLeftAvailable
    290                                   , const Bool bEnableEdgeFilters
     268                                          UInt dirMode, const Bool bEnableEdgeFilters
    291269                                  )
    292270{
     
    301279  if (modeDC)
    302280  {
    303     const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height, blkAboveAvailable, blkLeftAvailable);
     281    const Pel dcval = predIntraGetPredValDC(pSrc, srcStride, width, height);
    304282
    305283    for (Int y=height;y>0;y--, pTrueDst+=dstStrideTrue)
     
    332310    Pel  refLeft[2*MAX_CU_SIZE+1];
    333311
    334     // Initialise the Main and Left reference array.
     312    // Initialize the Main and Left reference array.
    335313    if (intraPredAngle < 0)
    336314    {
     
    445423}
    446424
    447 Void TComPrediction::predIntraAng( const ComponentID compID, UInt uiDirMode, Pel* piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, Bool bAbove, Bool bLeft, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM )
     425Void TComPrediction::predIntraAng( const ComponentID compID, UInt uiDirMode, Pel* piOrg /* Will be null for decoding */, UInt uiOrgStride, Pel* piPred, UInt uiStride, TComTU &rTu, const Bool bUseFilteredPredSamples, const Bool bUseLosslessDPCM )
    448426{
    449427  const ChannelType    channelType = toChannelType(compID);
     
    519497      const Int channelsBitDepthForPrediction = rTu.getCU()->getSlice()->getSPS()->getBitDepth(channelType);
    520498#endif
    521       xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, bAbove, bLeft, enableEdgeFilters );
    522 
    523       if(( uiDirMode == DC_IDX ) && bAbove && bLeft )
     499      xPredIntraAng( channelsBitDepthForPrediction, ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType, uiDirMode, enableEdgeFilters );
     500
     501      if( uiDirMode == DC_IDX )
    524502      {
    525503        xDCPredFiltering( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, channelType );
Note: See TracChangeset for help on using the changeset viewer.