Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
- Timestamp:
- 4 May 2015, 17:47:40 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r1179 r1196 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 54 #if H_3D 56 55 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 57 56 { … … 63 62 m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth ); 64 63 } 65 #else66 #if H_3D_SINGLE_DEPTH67 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 #endif77 64 #endif 78 65 … … 161 148 { 162 149 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 163 #if !HHI_MOVE_SYN_K0052164 #if H_3D_DBBP165 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 #endif170 #endif171 150 } 172 151 … … 176 155 { 177 156 decodeIntraDirModeLuma ( pcCU, uiAbsPartIdx, uiDepth ); 178 #if H HI_MOVE_SYN_K0052157 #if H_3D_DIM_SDC 179 158 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 180 #endif181 #if H_3D_DIM_SDC182 159 #if H_3D_DISABLE_CHROMA 183 #if !HHI_MOVE_SYN_K0052184 if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )185 #else186 160 if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 187 #endif188 161 #else 189 162 if(!pcCU->getSDCFlag(uiAbsPartIdx)) … … 247 220 #endif 248 221 #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()]; 254 225 #endif 255 226 for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ ) … … 265 236 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 266 237 #endif 267 #if H HI_MOVE_SYN_K0052238 #if H_3D 268 239 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 269 240 { … … 475 446 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 476 447 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 477 #if H_3D_ARP478 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );479 #endif480 #if H_3D_IC481 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );482 #endif483 #if H_3D_DBBP484 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )485 #else486 448 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 487 #endif488 449 { 489 450 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 490 451 if ( !isMerged ) 491 452 { 492 #if H_3D_VSP493 Int vspFlag[MRG_MAX_NUM_CANDS_MEM];494 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);495 #if H_3D_SPIVMP496 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);497 #endif498 pcSubCU->initAvailableFlags();499 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);500 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours501 #if H_3D_SPIVMP502 , pcMvFieldSP, puhInterDirSP503 #endif504 , numValidMergeCand );505 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag506 #if H_3D_SPIVMP507 , bSPIVMPFlag508 #endif509 , numValidMergeCand );510 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );511 512 #else513 #if H_3D514 pcSubCU->initAvailableFlags();515 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);516 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );517 518 #else519 453 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 520 #endif521 #endif522 454 isMerged = true; 523 455 } … … 527 459 { 528 460 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 529 #if H_3D_VSP530 Int vspFlag[MRG_MAX_NUM_CANDS_MEM];531 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);532 #if H_3D_SPIVMP533 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);534 #endif535 pcSubCU->initAvailableFlags();536 461 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 537 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours538 #if H_3D_SPIVMP539 , pcMvFieldSP, puhInterDirSP540 #endif541 ,numValidMergeCand, uiMergeIndex );542 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag543 #if H_3D_SPIVMP544 , bSPIVMPFlag545 #endif546 ,numValidMergeCand );547 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );548 #else549 #if H_3D550 pcSubCU->initAvailableFlags();551 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );552 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );553 #else554 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );555 #endif556 #endif557 462 } 558 463 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); … … 567 472 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 568 473 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 } 612 476 } 613 477 else … … 623 487 } 624 488 } 625 #if H_3D_ARP626 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );627 #endif628 #if H_3D_IC629 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );630 #endif631 489 } 632 490 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) … … 706 564 } 707 565 708 #if H HI_MOVE_SYN_K0052566 #if H_3D 709 567 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 710 568 { … … 753 611 pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx); 754 612 } 755 756 613 #else 757 614 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) … … 798 655 } 799 656 #endif 657 800 658 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU) 801 659 { … … 869 727 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 870 728 { 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 else881 {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 { 882 740 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 883 741 { … … 1131 989 { 1132 990 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 1133 #if HHI_MOVE_SYN_K00521134 991 if ( pcCU->isSkipped( uiAbsPartIdx ) ) 1135 992 { 1136 993 return; 1137 994 } 1138 #endif1139 995 1140 996 … … 1157 1013 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1158 1014 { 1159 #if HHI_MOVE_SYN_K00521160 1015 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 1161 1016 { 1162 #endif1163 1017 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 1164 #if HHI_MOVE_SYN_K0052 1165 } 1166 #endif 1018 } 1167 1019 } 1168 1020 #endif
Note: See TracChangeset for help on using the changeset viewer.