Changeset 897 in 3DVCSoftware


Ignore:
Timestamp:
8 Apr 2014, 09:24:15 (10 years ago)
Author:
lg
Message:

JCT3V-H0077/JCT3V-H0099/JCT3V-H0111/JCT3V-H0133, Sub-PU MPI hole filling process is integrated by LGE.

Location:
branches/HTM-10.2-dev1-LGE
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-10.2-dev1-LGE/source/Lib/TLibCommon/TComDataCU.cpp

    r888 r897  
    40914091
    40924092      Int         iTexPosX, iTexPosY;
     4093
    40934094      const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
    4094       for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight)
    4095       {
    4096         for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth)
    4097         {
    4098           iTexPosX     = j + iOffsetX;
    4099           iTexPosY     = i + iOffsetY;
    4100           pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx );
    4101           pcTexCU  = pcTexPic->getCU( iTexCUAddr );
    4102 
    4103           if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) )
     4095#if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133
     4096     
     4097      Int         iCenterPosX = iCurrPosX + ( ( iWidth /  iPUWidth ) >> 1 )  * iPUWidth + ( iPUWidth >> 1 );
     4098      Int         iCenterPosY = iCurrPosY + ( ( iHeight /  iPUHeight ) >> 1 )  * iPUHeight + (iPUHeight >> 1);
     4099      Int         iTexCenterCUAddr, iTexCenterAbsPartIdx;
     4100
     4101      if(iWidth == iPUWidth && iHeight == iPUHeight)
     4102      {
     4103          iCenterPosX = iCurrPosX + (iWidth >> 1);
     4104          iCenterPosY = iCurrPosY + (iHeight >> 1);
     4105      }
     4106
     4107      // derivation of center motion parameters from the collocated texture CU
     4108
     4109      pcTexRec->getCUAddrAndPartIdx( iCenterPosX , iCenterPosY , iTexCenterCUAddr, iTexCenterAbsPartIdx );
     4110      TComDataCU* pcDefaultCU    = pcTexPic->getCU( iTexCenterCUAddr );
     4111
     4112      if( pcDefaultCU->getPredictionMode( iTexCenterAbsPartIdx ) != MODE_INTRA )
     4113      {
     4114          for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )
    41044115          {
    4105             for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )
     4116              RefPicList  eCurrRefPicList = RefPicList( uiCurrRefListId );
     4117
     4118              TComMvField cDefaultMvField;
     4119              pcDefaultCU->getMvField( pcDefaultCU, iTexCenterAbsPartIdx, eCurrRefPicList, cDefaultMvField );
     4120              Int         iDefaultRefIdx     = cDefaultMvField.getRefIdx();
     4121              if (iDefaultRefIdx >= 0)
     4122              {
     4123                  Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eCurrRefPicList, iDefaultRefIdx);
     4124                  for (Int iRefPicList = 0; iRefPicList < m_pcSlice->getNumRefIdx( eCurrRefPicList ); iRefPicList++)
     4125                  {
     4126                      if (iDefaultRefPOC == m_pcSlice->getRefPOC(eCurrRefPicList, iRefPicList))
     4127                      {
     4128                          pbSPIVMPFlag[iCount] = true;
     4129                          TComMv cMv = cDefaultMvField.getMv() + cMvRounding;
     4130                          cMv >>= 2;
     4131                          clipMv( cMv );
     4132                          cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ;
     4133                          break;
     4134                      }
     4135                  }
     4136              }
     4137          }
     4138      }
     4139      if ( pbSPIVMPFlag[iCount] == true )
     4140      {   
     4141          iInterDirSaved = (cMvFieldSaved[0].getRefIdx()!=-1 ? 1: 0) + (cMvFieldSaved[1].getRefIdx()!=-1 ? 2: 0);
     4142          tmpDir = iInterDirSaved;
     4143          tmpMV[0] = cMvFieldSaved[0];
     4144          tmpMV[1] = cMvFieldSaved[1];
     4145      }
     4146
     4147      if ( iInterDirSaved != 0 )
     4148      {
     4149#endif
     4150          for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight)
     4151          {
     4152            for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth)
    41064153            {
    4107               RefPicList  eCurrRefPicList = RefPicList( uiCurrRefListId );
    4108               TComMvField cTexMvField;
    4109               pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField );
    4110               Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() );
    4111               if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
     4154              iTexPosX     = j + iOffsetX;
     4155              iTexPosY     = i + iOffsetY;
     4156              pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx );
     4157              pcTexCU  = pcTexPic->getCU( iTexCUAddr );
     4158
     4159              if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) )
    41124160              {
    4113                 TComMv cMv = cTexMvField.getMv() + cMvRounding;
    4114                 cMv >>=2;         
     4161                for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ )
     4162                {
     4163                  RefPicList  eCurrRefPicList = RefPicList( uiCurrRefListId );
     4164                  TComMvField cTexMvField;
     4165                  pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField );
     4166                  Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() );
     4167                  if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
     4168                  {
     4169                    TComMv cMv = cTexMvField.getMv() + cMvRounding;
     4170                    cMv >>=2;         
    41154171#if !(NTT_BUG_FIX_TK54)
    4116                 this->clipMv( cMv );
    4117 #endif
    4118                 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef);
     4172                    this->clipMv( cMv );
     4173#endif
     4174                    pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef);
     4175                  }
     4176                }
    41194177              }
     4178              puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0);
     4179              if (puhInterDirSP[iPartition] == 0)
     4180              {
     4181                if (iInterDirSaved != 0)
     4182                {
     4183                  puhInterDirSP[iPartition] = iInterDirSaved;
     4184                  pcMvFieldSP[2*iPartition] = cMvFieldSaved[0];
     4185                  pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1];
     4186                }
     4187              }
     4188#if !MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133
     4189              else
     4190              {
     4191                if (iInterDirSaved ==0)
     4192                {
     4193                  pbSPIVMPFlag[iCount] = true;
     4194                  tmpDir = puhInterDirSP[iPartition];
     4195                  tmpMV[0] = pcMvFieldSP[2*iPartition];
     4196                  tmpMV[1] = pcMvFieldSP[2*iPartition+1];
     4197
     4198                  if (iPartition != 0)
     4199                  {
     4200                    for (Int iPart = iPartition-1; iPart >= 0; iPart--)
     4201                    {
     4202                      puhInterDirSP[iPart] = puhInterDirSP[iPartition];
     4203                      pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition];
     4204                      pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1];
     4205                    }
     4206                  }
     4207                }
     4208                iInterDirSaved = puhInterDirSP[iPartition];
     4209                cMvFieldSaved[0] = pcMvFieldSP[2*iPartition];
     4210                cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1];
     4211              }
     4212#endif
     4213              iPartition ++;
    41204214            }
    41214215          }
    4122           puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0);
    4123           if (puhInterDirSP[iPartition] == 0)
    4124           {
    4125             if (iInterDirSaved != 0)
    4126             {
    4127               puhInterDirSP[iPartition] = iInterDirSaved;
    4128               pcMvFieldSP[2*iPartition] = cMvFieldSaved[0];
    4129               pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1];
    4130             }
    4131           }
    4132           else
    4133           {
    4134             if (iInterDirSaved ==0)
    4135             {
    4136               pbSPIVMPFlag[iCount] = true;
    4137               tmpDir = puhInterDirSP[iPartition];
    4138               tmpMV[0] = pcMvFieldSP[2*iPartition];
    4139               tmpMV[1] = pcMvFieldSP[2*iPartition+1];
    4140 
    4141               if (iPartition != 0)
    4142               {
    4143                 for (Int iPart = iPartition-1; iPart >= 0; iPart--)
    4144                 {
    4145                   puhInterDirSP[iPart] = puhInterDirSP[iPartition];
    4146                   pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition];
    4147                   pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1];
    4148                 }
    4149               }
    4150             }
    4151             iInterDirSaved = puhInterDirSP[iPartition];
    4152             cMvFieldSaved[0] = pcMvFieldSP[2*iPartition];
    4153             cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1];
    4154           }
    4155           iPartition ++;
    4156         }
    4157       }
     4216#if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133
     4217      }
     4218#endif
    41584219#if H_3D_FCO
    41594220    }
  • branches/HTM-10.2-dev1-LGE/source/Lib/TLibCommon/TypeDef.h

    r888 r897  
    325325
    326326#define H_MV_HLS7_GEN                        0  // General changes (not tested)
    327 
     327#define MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133    1
    328328
    329329
Note: See TracChangeset for help on using the changeset viewer.