Changeset 1393 in SHVCSoftware


Ignore:
Timestamp:
4 Aug 2015, 03:17:26 (9 years ago)
Author:
seregin
Message:

port rev 4531

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r1368 r1393  
    502502  Int         iHeight;
    503503  UInt        uiPartAddr;
     504  const TComSlice *pSlice    = pcCU->getSlice();
     505  const SliceType  sliceType = pSlice->getSliceType();
     506  const TComPPS   &pps       = *(pSlice->getPPS());
    504507
    505508  if ( iPartIdx >= 0 )
     
    508511    if ( eRefPicList != REF_PIC_LIST_X )
    509512    {
    510       if( pcCU->getSlice()->getPPS()->getUseWP())
     513      if( (sliceType == P_SLICE && pps.getUseWP()) || (sliceType == B_SLICE && pps.getWPBiPred()))
    511514      {
    512515        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
     516        xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    513517      }
    514518      else
     
    516520        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    517521      }
    518       if ( pcCU->getSlice()->getPPS()->getUseWP() )
    519       {
     522    }
     523    else
     524    {
     525      if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
     526      {
     527        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
     528      }
     529      else
     530      {
     531        xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
     532      }
     533    }
     534    return;
     535  }
     536
     537  for ( iPartIdx = 0; iPartIdx < pcCU->getNumPartitions(); iPartIdx++ )
     538  {
     539    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
     540
     541    if ( eRefPicList != REF_PIC_LIST_X )
     542    {
     543      if( (sliceType == P_SLICE && pps.getUseWP()) || (sliceType == B_SLICE && pps.getWPBiPred()))
     544      {
     545        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
    520546        xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    521547      }
    522     }
    523     else
    524     {
    525       if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )
    526       {
    527         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );
    528       }
    529548      else
    530549      {
    531         xPredInterBi  (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );
    532       }
    533     }
    534     return;
    535   }
    536 
    537   for ( iPartIdx = 0; iPartIdx < pcCU->getNumPartitions(); iPartIdx++ )
    538   {
    539     pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight );
    540 
    541     if ( eRefPicList != REF_PIC_LIST_X )
    542     {
    543       if( pcCU->getSlice()->getPPS()->getUseWP())
    544       {
    545         xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true );
    546       }
    547       else
    548       {
    549550        xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    550       }
    551       if ( pcCU->getSlice()->getPPS()->getUseWP() )
    552       {
    553         xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred );
    554551      }
    555552    }
Note: See TracChangeset for help on using the changeset viewer.