Changeset 1275 in 3DVCSoftware for branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp
- Timestamp:
- 15 Jul 2015, 12:46:07 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp
r1274 r1275 261 261 } 262 262 Int numValidMergeCand = 0; 263 #if !NH_3D264 263 Bool hasMergedCandList = false; 265 #else266 Bool isMerged = false;267 #endif268 264 269 265 pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); … … 309 305 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 310 306 #endif 311 #if H_3D_IC307 #if NH_3D_IC 312 308 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 313 309 #endif … … 319 315 { 320 316 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 317 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 318 if (bDebugPredEnabled) 319 { 320 std::cout << "Coded merge flag, CU absPartIdx: " << uiAbsPartIdx << " PU(" << uiPartIdx << ") absPartIdx: " << uiSubPartIdx; 321 std::cout << " merge index: " << (UInt)pcCU->getMergeIndex(uiSubPartIdx) << std::endl; 322 } 323 #endif 324 321 325 #if NH_3D_DBBP 322 326 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) … … 325 329 #endif 326 330 { 327 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 328 if ( !isMerged ) 329 { 331 if ( !hasMergedCandList ) 332 { 333 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); // temporarily set. 334 335 #if NH_3D_MLC 330 336 #if NH_3D_VSP 331 337 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 332 338 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 333 #if H_3D_SPIVMP 339 #endif 340 #if NH_3D_SPIVMP 334 341 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 335 342 #endif 336 343 pcSubCU->initAvailableFlags(); 337 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 344 #endif 345 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 346 #if NH_3D_MLC 338 347 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 339 348 #if NH_3D_SPIVMP … … 341 350 #endif 342 351 , numValidMergeCand ); 343 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 352 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 353 #if NH_3D_VSP 354 , vspFlag 355 #endif 344 356 #if NH_3D_SPIVMP 345 357 , bSPIVMPFlag 346 358 #endif 347 359 , numValidMergeCand ); 360 #if NH_3D_VSP 348 361 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 349 #else 350 #if H_3D 351 pcSubCU->initAvailableFlags(); 352 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 353 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 354 355 #else 356 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 357 #endif 358 #endif 359 isMerged = true; 360 } 361 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); 362 #endif 363 #endif 364 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); // restore. 365 hasMergedCandList = true; 366 } 362 367 } 363 368 else 364 369 { 365 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 370 #if NH_3D_MLC 366 371 #if NH_3D_VSP 367 372 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 368 373 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 369 #if H_3D_SPIVMP 374 #endif 375 #if NH_3D_SPIVMP 370 376 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 371 377 #endif 372 378 pcSubCU->initAvailableFlags(); 379 #endif 373 380 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 381 #if NH_3D_MLC 374 382 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 375 383 #if NH_3D_SPIVMP … … 377 385 #endif 378 386 ,numValidMergeCand, uiMergeIndex ); 379 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 387 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 388 #if NH_3D_VSP 389 , vspFlag 390 #endif 380 391 #if NH_3D_SPIVMP 381 392 , bSPIVMPFlag 382 393 #endif 383 394 ,numValidMergeCand ); 395 #if NH_3D_VSP 384 396 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 385 #else386 #if H_3D387 pcSubCU->initAvailableFlags();388 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );389 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );390 #else391 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );392 397 #endif 393 398 #endif … … 397 402 TComMv cTmpMv( 0, 0 ); 398 403 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 399 { 404 { 400 405 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 401 406 { … … 424 429 } 425 430 } 426 #if H_3D_SPIVMP431 #if NH_3D_SPIVMP 427 432 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 428 433 if (bSPIVMPFlag[uiMergeIndex] != 0) … … 455 460 { 456 461 decodeMvsAMVP ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 462 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 463 if (bDebugPredEnabled) 464 { 465 std::cout << "refListIdx: " << uiRefListIdx << std::endl; 466 std::cout << "MVD horizontal: " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getHor() << std::endl; 467 std::cout << "MVD vertical: " << pcCU->getCUMvField(RefPicList(uiRefListIdx))->getMvd( uiAbsPartIdx ).getVer() << std::endl; 468 std::cout << "MVPIdxPU: " << pcCU->getMVPIdx(RefPicList( uiRefListIdx ), uiSubPartIdx) << std::endl; 469 std::cout << "InterDir: " << (UInt)pcCU->getInterDir(uiSubPartIdx) << std::endl; 470 } 471 #endif 457 472 } 458 473 }
Note: See TracChangeset for help on using the changeset viewer.