Ignore:
Timestamp:
15 Jul 2015, 12:46:07 (9 years ago)
Author:
tech
Message:
  • Further fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1274 r1275  
    261261  }
    262262  Int numValidMergeCand = 0;
    263 #if !NH_3D
    264263  Bool hasMergedCandList = false;
    265 #else
    266   Bool isMerged = false;
    267 #endif
    268264
    269265  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
     
    309305  decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    310306#endif
    311 #if H_3D_IC
     307#if NH_3D_IC
    312308  decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    313309#endif
     
    319315    {
    320316      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     317#if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST
     318      if (bDebugPredEnabled)
     319      {
     320        std::cout << "Coded merge flag, CU absPartIdx: " << uiAbsPartIdx << " PU(" << uiPartIdx << ") absPartIdx: " << uiSubPartIdx;
     321        std::cout << " merge index: " << (UInt)pcCU->getMergeIndex(uiSubPartIdx) << std::endl;
     322      }
     323#endif
     324
    321325#if NH_3D_DBBP
    322326      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
     
    325329#endif
    326330      {
    327         pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    328         if ( !isMerged )
    329         {
     331        if ( !hasMergedCandList )
     332        {
     333          pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set.
     334
     335#if NH_3D_MLC
    330336#if NH_3D_VSP
    331337          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    332338          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    333 #if H_3D_SPIVMP
     339#endif
     340#if NH_3D_SPIVMP
    334341          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    335342#endif
    336343          pcSubCU->initAvailableFlags();
    337           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     344#endif
     345          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     346#if NH_3D_MLC
    338347          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    339348#if NH_3D_SPIVMP
     
    341350#endif
    342351            , numValidMergeCand );
    343           pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     352          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     353#if NH_3D_VSP
     354            , vspFlag
     355#endif
    344356#if NH_3D_SPIVMP
    345357            , bSPIVMPFlag
    346358#endif
    347359            , numValidMergeCand );
     360#if NH_3D_VSP
    348361          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    349 #else
    350 #if H_3D
    351           pcSubCU->initAvailableFlags();
    352           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    353           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    354 
    355 #else
    356           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    357 #endif
    358 #endif
    359           isMerged = true;
    360         }
    361         pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
     362#endif
     363#endif
     364          pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore.
     365          hasMergedCandList = true;
     366        }
    362367      }
    363368      else
    364369      {
    365         uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     370#if NH_3D_MLC
    366371#if NH_3D_VSP
    367372        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    368373        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    369 #if H_3D_SPIVMP
     374#endif
     375#if NH_3D_SPIVMP
    370376        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    371377#endif
    372378        pcSubCU->initAvailableFlags();
     379#endif
    373380        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     381#if NH_3D_MLC
    374382        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    375383#if NH_3D_SPIVMP
     
    377385#endif
    378386          ,numValidMergeCand, uiMergeIndex );
    379         pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     387        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     388#if NH_3D_VSP
     389          , vspFlag
     390#endif
    380391#if NH_3D_SPIVMP
    381392          , bSPIVMPFlag
    382393#endif
    383394          ,numValidMergeCand );
     395#if NH_3D_VSP
    384396        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    385 #else
    386 #if H_3D
    387         pcSubCU->initAvailableFlags();
    388         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    389         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    390 #else
    391         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    392397#endif
    393398#endif
     
    397402      TComMv cTmpMv( 0, 0 );
    398403      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
    399       {       
     404      {
    400405        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
    401406        {
     
    424429        }
    425430      }
    426 #if H_3D_SPIVMP
     431#if NH_3D_SPIVMP
    427432      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
    428433      if (bSPIVMPFlag[uiMergeIndex] != 0)
     
    455460        {
    456461          decodeMvsAMVP   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     462#if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST
     463          if (bDebugPredEnabled)
     464          {
     465            std::cout << "refListIdx: " << uiRefListIdx << std::endl;
     466            std::cout << "MVD horizontal: " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getHor() << std::endl;
     467            std::cout << "MVD vertical:   " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getVer() << std::endl;
     468            std::cout << "MVPIdxPU: " << pcCU->getMVPIdx(RefPicList( uiRefListIdx ), uiSubPartIdx) << std::endl;
     469            std::cout << "InterDir: " << (UInt)pcCU->getInterDir(uiSubPartIdx) << std::endl;
     470          }
     471#endif
    457472        }
    458473      }
Note: See TracChangeset for help on using the changeset viewer.