Changeset 1276 in 3DVCSoftware
- Timestamp:
- 15 Jul 2015, 12:56:34 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev3/source/Lib/TLibDecoder/TDecEntropy.cpp
r1270 r1276 257 257 } 258 258 Int numValidMergeCand = 0; 259 #if !NH_3D260 259 Bool hasMergedCandList = false; 261 #else262 Bool isMerged = false;263 #endif264 260 265 261 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); … … 315 311 { 316 312 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 317 321 #if NH_3D_DBBP 318 322 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) … … 321 325 #endif 322 326 { 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 326 332 #if NH_3D_VSP 327 333 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 328 334 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 329 #if H_3D_SPIVMP 335 #endif 336 #if NH_3D_SPIVMP 330 337 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 331 338 #endif 332 339 pcSubCU->initAvailableFlags(); 340 #endif 333 341 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 342 #if NH_3D_MLC 334 343 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 335 344 #if NH_3D_SPIVMP … … 337 346 #endif 338 347 , numValidMergeCand ); 339 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 348 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 349 #if NH_3D_VSP 350 , vspFlag 351 #endif 340 352 #if NH_3D_SPIVMP 341 353 , bSPIVMPFlag 342 354 #endif 343 355 , numValidMergeCand ); 356 #if NH_3D_VSP 344 357 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 } 358 363 } 359 364 else 360 365 { 361 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 366 #if NH_3D_MLC 362 367 #if NH_3D_VSP 363 368 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 364 369 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 365 #if H_3D_SPIVMP 370 #endif 371 #if NH_3D_SPIVMP 366 372 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 367 373 #endif 368 374 pcSubCU->initAvailableFlags(); 375 #endif 369 376 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 377 #if NH_3D_MLC 370 378 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 371 379 #if NH_3D_SPIVMP … … 373 381 #endif 374 382 ,numValidMergeCand, uiMergeIndex ); 375 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 383 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 384 #if NH_3D_VSP 385 , vspFlag 386 #endif 376 387 #if NH_3D_SPIVMP 377 388 , bSPIVMPFlag 378 389 #endif 379 390 ,numValidMergeCand ); 391 #if NH_3D_VSP 380 392 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 381 #else382 #if H_3D383 pcSubCU->initAvailableFlags();384 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );385 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );386 #else387 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );388 393 #endif 389 394 #endif … … 420 425 } 421 426 } 422 #if H_3D_SPIVMP427 #if NH_3D_SPIVMP 423 428 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 424 429 if (bSPIVMPFlag[uiMergeIndex] != 0) … … 451 456 { 452 457 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 453 468 } 454 469 }
Note: See TracChangeset for help on using the changeset viewer.