Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecEntropy.cpp


Ignore:
Timestamp:
4 May 2015, 17:47:40 (9 years ago)
Author:
tech
Message:

Merged 14.0-dev0@1187.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r1179 r1196  
    5252  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
    5353}
    54 
    55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033
     54#if H_3D
    5655Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    5756{
     
    6362  m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth );
    6463}
    65 #else
    66 #if H_3D_SINGLE_DEPTH
    67 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    68 {
    69   if( !pcCU->getSlice()->getIntraSingleFlag() )
    70   {
    71     return;
    72   } 
    73 
    74   m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
    75 }
    76 #endif
    7764#endif
    7865
     
    161148{
    162149  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
    163 #if !HHI_MOVE_SYN_K0052 
    164 #if H_3D_DBBP
    165 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    166   {
    167     decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
    168   }
    169 #endif
    170 #endif
    171150}
    172151
     
    176155  {
    177156    decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
    178 #if HHI_MOVE_SYN_K0052
     157#if H_3D_DIM_SDC
    179158    decodeSDCFlag   ( pcCU, uiAbsPartIdx, uiDepth );   
    180 #endif
    181 #if H_3D_DIM_SDC
    182159#if H_3D_DISABLE_CHROMA
    183 #if !HHI_MOVE_SYN_K0052
    184     if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )
    185 #else
    186160    if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0  )
    187 #endif
    188161#else
    189162    if(!pcCU->getSDCFlag(uiAbsPartIdx))
     
    247220#endif
    248221#if H_3D_SPIVMP
    249   Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
    250   TComMvField*  pcMvFieldSP;
    251   UChar* puhInterDirSP;
    252   pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
    253   puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
     222  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];     
     223  TComMvField*  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2];
     224  UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()];
    254225#endif
    255226  for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
     
    265236  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
    266237#endif
    267 #if HHI_MOVE_SYN_K0052
     238#if H_3D
    268239  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
    269240  {
     
    475446      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
    476447      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    477 #if H_3D_ARP
    478       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    479 #endif
    480 #if H_3D_IC
    481       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    482 #endif
    483 #if H_3D_DBBP
    484       if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
    485 #else
    486448      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 )
    487 #endif
    488449      {
    489450        pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
    490451        if ( !isMerged )
    491452        {
    492 #if H_3D_VSP
    493           Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    494           memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    495 #if H_3D_SPIVMP
    496           memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    497 #endif
    498           pcSubCU->initAvailableFlags();
    499           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    500           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
    501 #if H_3D_SPIVMP
    502             , pcMvFieldSP, puhInterDirSP
    503 #endif
    504             , numValidMergeCand );
    505           pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
    506 #if H_3D_SPIVMP
    507             , bSPIVMPFlag
    508 #endif
    509             , numValidMergeCand );
    510           pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    511 
    512 #else
    513 #if H_3D
    514           pcSubCU->initAvailableFlags();
    515           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
    516           pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    517 
    518 #else
    519453          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    520 #endif
    521 #endif
    522454          isMerged = true;
    523455        }
     
    527459      {
    528460        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
    529 #if H_3D_VSP
    530         Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
    531         memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
    532 #if H_3D_SPIVMP
    533         memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
    534 #endif
    535         pcSubCU->initAvailableFlags();
    536461        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    537         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
    538 #if H_3D_SPIVMP
    539           , pcMvFieldSP, puhInterDirSP
    540 #endif
    541           ,numValidMergeCand, uiMergeIndex );
    542         pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
    543 #if H_3D_SPIVMP
    544           , bSPIVMPFlag
    545 #endif
    546           ,numValidMergeCand );
    547         pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
    548 #else
    549 #if H_3D
    550         pcSubCU->initAvailableFlags();
    551         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    552         pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    553 #else
    554         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
    555 #endif
    556 #endif
    557462      }
    558463      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
     
    567472          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    568473          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
    569 #if H_3D_VSP
    570 #if H_3D_DBBP
    571           if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
    572 #else
    573           if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
    574 #endif
    575           {
    576             if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
    577             {
    578               UInt dummy;
    579               Int vspSize;
    580               Int width, height;
    581               pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
    582               pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
    583               pcCU->setVSPFlag( uiSubPartIdx, vspSize );
    584             }
    585           }
    586 #endif
    587         }
    588       }
    589 #if H_3D_SPIVMP
    590       pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
    591       if (bSPIVMPFlag[uiMergeIndex] != 0)
    592       {
    593         Int iWidth, iHeight;
    594         UInt uiIdx;
    595         pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
    596 
    597         UInt uiSPAddr;
    598 
    599         Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
    600 
    601         pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
    602 
    603         for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
    604         {
    605           pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
    606           pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
    607           pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
    608           pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
    609         }
    610       }
    611 #endif
     474        }
     475      }
    612476    }
    613477    else
     
    623487        }
    624488      }
    625 #if H_3D_ARP
    626       decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
    627 #endif
    628 #if H_3D_IC
    629       decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
    630 #endif
    631489    }
    632490    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
     
    706564}
    707565
    708 #if HHI_MOVE_SYN_K0052
     566#if H_3D
    709567Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
    710568{
     
    753611  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
    754612}
    755 
    756613#else
    757614Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
     
    798655}
    799656#endif
     657
    800658Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
    801659{
     
    869727      if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 )     
    870728      {
    871       if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
    872       {
    873         m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
    874       }
    875       if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
    876       {
    877         m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
    878       }
    879     }
    880     else
    881     {
     729        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
     730        {
     731          m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
     732        }
     733        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
     734        {
     735          m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
     736        }
     737      }
     738      else
     739      {
    882740        if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
    883741        {
     
    1131989{
    1132990  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
    1133 #if HHI_MOVE_SYN_K0052
    1134991  if ( pcCU->isSkipped( uiAbsPartIdx ) )
    1135992  {
    1136993    return;
    1137994  }
    1138 #endif
    1139995
    1140996
     
    11571013Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    11581014{
    1159 #if HHI_MOVE_SYN_K0052
    11601015  if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )
    11611016  {
    1162 #endif
    11631017    m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
    1164 #if HHI_MOVE_SYN_K0052
    1165   }
    1166 #endif
     1018  }
    11671019}
    11681020#endif
Note: See TracChangeset for help on using the changeset viewer.