Changeset 567 in 3DVCSoftware for branches/HTM-DEV-2.0-dev1-Mediatek


Ignore:
Timestamp:
12 Aug 2013, 11:21:53 (11 years ago)
Author:
mediatek-htm
Message:

Integration of JCT3V-E0182. The MACRO is "MTK_TEXTURE_MRGCAND_BUGFIX_E0182".

By Yi-Wen Chen (yiwen.chen@…)

Location:
branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComDataCU.cpp

    r566 r567  
    31593159    if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) )
    31603160    {
     3161#if MTK_TEXTURE_MRGCAND_BUGFIX_E0182
     3162      pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] );
     3163      Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() );
     3164      if( (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) && ( iValidDepRef >= 0 ) )
     3165      {
     3166        TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv();
     3167        const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
     3168        cMvPred+=cAdd;
     3169        cMvPred>>=2;
     3170        clipMv(cMvPred);
     3171        pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef);
     3172      }
     3173
     3174      if ( getSlice()->isInterB() )
     3175      {
     3176        pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] );
     3177        iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx() );
     3178        if( (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) && ( iValidDepRef >= 0) )
     3179        {
     3180          TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv();
     3181          const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) );
     3182          cMvPred+=cAdd;
     3183          cMvPred>>=2;
     3184          clipMv(cMvPred);
     3185          pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef);
     3186        }
     3187      }
     3188
     3189      puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0;
     3190      puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0;
     3191
     3192      if( puhInterDirNeighbours[iCount] != 0 )
     3193      {
     3194        abCandIsInter[iCount] = true;
     3195        if ( mrgCandIdx == iCount )
     3196        {
     3197          return;
     3198        }
     3199        iCount ++;
     3200      }
     3201#else
    31613202      abCandIsInter[iCount] = true;     
    31623203      puhInterDirNeighbours[iCount] = pcTextureCU->getInterDir( uiPartIdxCenter );
     
    32023243      }
    32033244      iCount ++;
     3245#endif//Bug fix
    32043246    }
    32053247  }
  • branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComPic.cpp

    r566 r567  
    710710}
    711711#endif
     712#if MTK_TEXTURE_MRGCAND_BUGFIX_E0182
     713Void TComPic::checkTextureRef(  )
     714{
     715  TComSlice* pcCurrSlice = getSlice(getCurrSliceIdx());
     716  TComPic* pcTextPic = pcCurrSlice->getTexturePic();
     717  TComSlice* pcTextSlice = pcTextPic->getSlice(0); // currently only support single slice
     718
     719  for( Int iTextRefDir = 0; (iTextRefDir < (pcTextSlice->isInterB()? 2:1) ) && !pcTextSlice->isIntra(); iTextRefDir ++ )
     720  {
     721    for( Int iTextRefIdx =0; iTextRefIdx<pcTextSlice->getNumRefIdx(( RefPicList )iTextRefDir ); iTextRefIdx++)
     722    {
     723      Int iTextRefPOC    = pcTextSlice->getRefPOC( ( RefPicList )iTextRefDir, iTextRefIdx);
     724      Int iTextRefViewId = pcTextSlice->getRefPic( ( RefPicList )iTextRefDir, iTextRefIdx)->getViewIndex();
     725      m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = -1;
     726      Int iCurrRefDir = iTextRefDir;
     727      for( Int iCurrRefIdx =0; ( iCurrRefIdx<pcCurrSlice->getNumRefIdx(( RefPicList )iCurrRefDir ) ) && ( m_aiTexToDepRef[iTextRefDir][iTextRefIdx] < 0 ) ; iCurrRefIdx++)
     728      {
     729        if( pcCurrSlice->getRefPOC( ( RefPicList )iCurrRefDir, iCurrRefIdx ) == iTextRefPOC &&
     730          pcCurrSlice->getRefPic( ( RefPicList )iCurrRefDir, iCurrRefIdx)->getViewIndex() == iTextRefViewId )
     731        { 
     732          m_aiTexToDepRef[iTextRefDir][iTextRefIdx] = iCurrRefIdx;
     733        }
     734      }
     735    }
     736
     737  }
     738}
     739
     740Int TComPic::isTextRefValid(Int iTextRefDir, Int iTextRefIdx)
     741{
     742  return m_aiTexToDepRef[iTextRefDir][iTextRefIdx];
     743}
     744#endif
    712745//! \}
  • branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TComPic.h

    r566 r567  
    107107  Bool        m_abTIVRINCurrRL  [2][2][MAX_NUM_REF]; //whether an inter-view reference picture with the same view index of the inter-view reference picture of temporal reference picture of current picture exists in current reference picture lists
    108108#endif
     109#if MTK_TEXTURE_MRGCAND_BUGFIX_E0182 
     110  Int         m_aiTexToDepRef  [2][MAX_NUM_REF];
     111#endif
    109112public:
    110113  TComPic();
     
    222225  Bool      isTempIVRefValid(Int currCandPic, Int iTempRefDir, Int iTempRefIdx);
    223226#endif
     227#if MTK_TEXTURE_MRGCAND_BUGFIX_E0182
     228  Void      checkTextureRef(  );
     229  Int       isTextRefValid(Int iTextRefDir, Int iTextRefIdx);
     230#endif
    224231  /** transfer ownership of seis to this picture */
    225232  void setSEIs(SEIMessages& seis) { m_SEIs = seis; }
  • branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibCommon/TypeDef.h

    r566 r567  
    108108#define MTK_NBDV_TN_FIX_E0172                1 // fix the issue of DV derivation from the temporal neighboring blocks, issue 7 in JCT3V-E0172
    109109#endif
     110#define MTK_TEXTURE_MRGCAND_BUGFIX_E0182  1   // Bugfix for TEXTURE MERGING CANDIDATE     , JCT3V-E0182
    110111#endif
    111112#define H_3D_VSP                          1   // View synthesis prediction
  • branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibDecoder/TDecGop.cpp

    r566 r567  
    165165  }
    166166#endif
     167#if MTK_TEXTURE_MRGCAND_BUGFIX_E0182
     168  if(pcSlice->getIsDepth())
     169  {
     170    rpcPic->checkTextureRef();
     171  }
     172#endif
    167173#if H_3D
    168174  pcSlice->setDepthToDisparityLUTs();
  • branches/HTM-DEV-2.0-dev1-Mediatek/source/Lib/TLibEncoder/TEncGOP.cpp

    r566 r567  
    10841084      }
    10851085#endif
     1086#if MTK_TEXTURE_MRGCAND_BUGFIX_E0182
     1087      if(pcSlice->getIsDepth())
     1088      {
     1089        pcPic->checkTextureRef();
     1090      }
     1091#endif
    10861092    while(nextCUAddr<uiRealEndAddress) // determine slice boundaries
    10871093    {
Note: See TracChangeset for help on using the changeset viewer.