Changeset 1274 in 3DVCSoftware for branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp
- Timestamp:
- 14 Jul 2015, 12:31:09 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp
r1225 r1274 105 105 } 106 106 107 #if H_3D_ARP107 #if NH_3D_ARP 108 108 Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 109 109 { … … 129 129 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 130 130 131 #if H_3D_ARP131 #if NH_3D_ARP 132 132 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 133 133 #else … … 240 240 UInt uiNumPU = ( ePartSize == SIZE_2Nx2N ? 1 : ( ePartSize == SIZE_NxN ? 4 : 2 ) ); 241 241 UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxTotalCUDepth() - uiDepth ) << 1 ) ) >> 4; 242 #if H_3D_IV_MERGE 242 //#if H_3D_IV_MERGE 243 #if NH_3D_MLC 243 244 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 244 245 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 247 248 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 248 249 #endif 249 #if H_3D_SPIVMP250 #if NH_3D_SPIVMP 250 251 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 251 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition ()*2];252 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition ()];253 #endif 254 #if H_3D_IV_MERGE252 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 253 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 254 #endif 255 #if NH_3D_IV_MERGE 255 256 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 256 257 #endif … … 260 261 } 261 262 Int numValidMergeCand = 0; 263 #if !NH_3D 262 264 Bool hasMergedCandList = false; 265 #else 266 Bool isMerged = false; 267 #endif 263 268 264 269 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 265 270 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 266 #if H_3D271 #if NH_3D 267 272 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 268 273 { … … 296 301 297 302 ////// Parse CUs extension syntax 303 #if NH_3D_DBBP 298 304 decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 299 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 300 301 #if H_3D_ARP 305 #endif 306 //decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 307 308 #if NH_3D_ARP 302 309 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 303 310 #endif … … 312 319 { 313 320 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 314 #if H_3D_DBBP321 #if NH_3D_DBBP 315 322 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) 316 323 #else … … 321 328 if ( !isMerged ) 322 329 { 323 #if H_3D_VSP330 #if NH_3D_VSP 324 331 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 325 332 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); … … 330 337 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 331 338 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 332 #if H_3D_SPIVMP339 #if NH_3D_SPIVMP 333 340 , pcMvFieldSP, puhInterDirSP 334 341 #endif 335 342 , numValidMergeCand ); 336 343 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 337 #if H_3D_SPIVMP344 #if NH_3D_SPIVMP 338 345 , bSPIVMPFlag 339 346 #endif 340 347 , numValidMergeCand ); 341 348 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 342 343 349 #else 344 350 #if H_3D … … 358 364 { 359 365 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 360 #if H_3D_VSP366 #if NH_3D_VSP 361 367 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 362 368 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); … … 367 373 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 368 374 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 369 #if H_3D_SPIVMP375 #if NH_3D_SPIVMP 370 376 , pcMvFieldSP, puhInterDirSP 371 377 #endif 372 378 ,numValidMergeCand, uiMergeIndex ); 373 379 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 374 #if H_3D_SPIVMP380 #if NH_3D_SPIVMP 375 381 , bSPIVMPFlag 376 382 #endif … … 398 404 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 399 405 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 400 #if H_3D_VSP401 #if H_3D_DBBP406 #if NH_3D_VSP 407 #if NH_3D_DBBP 402 408 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) ) 403 409 #else … … 490 496 { 491 497 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set. 498 499 #if NH_3D_MLC 500 #if NH_3D_VSP 501 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 502 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 503 #endif 504 #if NH_3D_SPIVMP 505 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 506 #endif 507 pcSubCU->initAvailableFlags(); 508 #endif 492 509 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 510 #if NH_3D_MLC 511 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 512 #if NH_3D_SPIVMP 513 , pcMvFieldSP, puhInterDirSP 514 #endif 515 , numValidMergeCand ); 516 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 517 #if NH_3D_VSP 518 , vspFlag 519 #endif 520 #if NH_3D_SPIVMP 521 , bSPIVMPFlag 522 #endif 523 , numValidMergeCand ); 524 #if NH_3D_VSP 525 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 526 #endif 527 #endif 493 528 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore. 494 529 hasMergedCandList = true; … … 498 533 { 499 534 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 535 536 #if NH_3D_MLC 537 #if NH_3D_VSP 538 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 539 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 540 #endif 541 #if NH_3D_SPIVMP 542 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 543 #endif 544 pcSubCU->initAvailableFlags(); 545 #endif 500 546 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 547 #if NH_3D_MLC 548 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 549 #if NH_3D_SPIVMP 550 , pcMvFieldSP, puhInterDirSP 551 #endif 552 ,numValidMergeCand, uiMergeIndex ); 553 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 554 #if NH_3D_VSP 555 , vspFlag 556 #endif 557 #if NH_3D_SPIVMP 558 , bSPIVMPFlag 559 #endif 560 ,numValidMergeCand ); 561 #if NH_3D_VSP 562 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 563 #endif 564 #endif 501 565 } 502 566 … … 512 576 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 513 577 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 514 515 } 516 } 578 #if NH_3D_VSP 579 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 ) 580 { 581 if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) ) 582 { 583 UInt dummy; 584 Int vspSize; 585 Int width, height; 586 pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 ); 587 pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize ); 588 pcCU->setVSPFlag( uiSubPartIdx, vspSize ); 589 } 590 } 591 #endif 592 } 593 } 594 #if NH_3D_SPIVMP 595 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 596 if (bSPIVMPFlag[uiMergeIndex] != 0) 597 { 598 Int iWidth, iHeight; 599 UInt uiIdx; 600 pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true ); 601 602 UInt uiSPAddr; 603 604 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 605 606 pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 607 608 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 609 { 610 pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 611 pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 612 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 613 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 614 } 615 } 616 #endif 517 617 } 518 618 else … … 551 651 } 552 652 #endif 553 #if H_3D_SPIVMP653 #if NH_3D_SPIVMP 554 654 delete[] pcMvFieldSP; 555 655 delete[] puhInterDirSP; … … 619 719 } 620 720 621 #if H_3D721 #if NH_3D 622 722 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 623 723 { … … 1070 1170 } 1071 1171 #endif 1072 #if H_3D_DBBP1172 #if NH_3D_DBBP 1073 1173 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1074 1174 {
Note: See TracChangeset for help on using the changeset viewer.