Changeset 1276 in 3DVCSoftware for branches/HTM-14.1-update-dev3


Ignore:
Timestamp:
15 Jul 2015, 12:56:34 (9 years ago)
Author:
tech
Message:

Further decoder fixes.

File:
1 edited

Legend:

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

    r1270 r1276  
    257257  }
    258258  Int numValidMergeCand = 0;
    259 #if !NH_3D
    260259  Bool hasMergedCandList = false;
    261 #else
    262   Bool isMerged = false;
    263 #endif
    264260
    265261  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
     
    315311    {
    316312      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     313#if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST
     314      if (bDebugPredEnabled)
     315      {
     316        std::cout << "Coded merge flag, CU absPartIdx: " << uiAbsPartIdx << " PU(" << uiPartIdx << ") absPartIdx: " << uiSubPartIdx;
     317        std::cout << " merge index: " << (UInt)pcCU->getMergeIndex(uiSubPartIdx) << std::endl;
     318      }
     319#endif
     320
    317321#if NH_3D_DBBP
    318322      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
     
    321325#endif
    322326      {
    323         pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    324         if ( !isMerged )
    325         {
     327        if ( !hasMergedCandList )
     328        {
     329          pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set.
     330
     331#if NH_3D_MLC
    326332#if NH_3D_VSP
    327333          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    328334          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    329 #if H_3D_SPIVMP
     335#endif
     336#if NH_3D_SPIVMP
    330337          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    331338#endif
    332339          pcSubCU->initAvailableFlags();
     340#endif
    333341          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     342#if NH_3D_MLC
    334343          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    335344#if NH_3D_SPIVMP
     
    337346#endif
    338347            , numValidMergeCand );
    339           pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     348          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     349#if NH_3D_VSP
     350            , vspFlag
     351#endif
    340352#if NH_3D_SPIVMP
    341353            , bSPIVMPFlag
    342354#endif
    343355            , numValidMergeCand );
     356#if NH_3D_VSP
    344357          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    345 #else
    346 #if H_3D
    347           pcSubCU->initAvailableFlags();
    348           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    349           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    350 
    351 #else
    352           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    353 #endif
    354 #endif
    355           isMerged = true;
    356         }
    357         pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
     358#endif
     359#endif
     360          pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore.
     361          hasMergedCandList = true;
     362        }
    358363      }
    359364      else
    360365      {
    361         uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
     366#if NH_3D_MLC
    362367#if NH_3D_VSP
    363368        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    364369        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    365 #if H_3D_SPIVMP
     370#endif
     371#if NH_3D_SPIVMP
    366372        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    367373#endif
    368374        pcSubCU->initAvailableFlags();
     375#endif
    369376        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
     377#if NH_3D_MLC
    370378        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    371379#if NH_3D_SPIVMP
     
    373381#endif
    374382          ,numValidMergeCand, uiMergeIndex );
    375         pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
     383        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours
     384#if NH_3D_VSP
     385          , vspFlag
     386#endif
    376387#if NH_3D_SPIVMP
    377388          , bSPIVMPFlag
    378389#endif
    379390          ,numValidMergeCand );
     391#if NH_3D_VSP
    380392        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    381 #else
    382 #if H_3D
    383         pcSubCU->initAvailableFlags();
    384         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    385         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    386 #else
    387         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    388393#endif
    389394#endif
     
    420425        }
    421426      }
    422 #if H_3D_SPIVMP
     427#if NH_3D_SPIVMP
    423428      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
    424429      if (bSPIVMPFlag[uiMergeIndex] != 0)
     
    451456        {
    452457          decodeMvsAMVP   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
     458#if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST
     459          if (bDebugPredEnabled)
     460          {
     461            std::cout << "refListIdx: " << uiRefListIdx << std::endl;
     462            std::cout << "MVD horizontal: " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getHor() << std::endl;
     463            std::cout << "MVD vertical:   " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getVer() << std::endl;
     464            std::cout << "MVPIdxPU: " << pcCU->getMVPIdx(RefPicList( uiRefListIdx ), uiSubPartIdx) << std::endl;
     465            std::cout << "InterDir: " << (UInt)pcCU->getInterDir(uiSubPartIdx) << std::endl;
     466          }
     467#endif
    453468        }
    454469      }
Note: See TracChangeset for help on using the changeset viewer.