Changeset 443 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCu.cpp
- Timestamp:
- 26 May 2013, 15:41:34 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r332 r443 54 54 m_ppcYuvResi = NULL; 55 55 m_ppcYuvReco = NULL; 56 #if H3D_IVRP 56 #if H3D_IVRP & !QC_ARP_D0177 57 57 m_ppcYuvResPred = NULL; 58 58 #endif … … 82 82 m_ppcYuvResi = new TComYuv*[m_uiMaxDepth-1]; 83 83 m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1]; 84 #if H3D_IVRP 84 #if H3D_IVRP & !QC_ARP_D0177 85 85 m_ppcYuvResPred = new TComYuv* [m_uiMaxDepth-1]; 86 86 #endif … … 96 96 m_ppcYuvResi[ui] = new TComYuv; m_ppcYuvResi[ui]->create( uiWidth, uiHeight ); 97 97 m_ppcYuvReco[ui] = new TComYuv; m_ppcYuvReco[ui]->create( uiWidth, uiHeight ); 98 #if H3D_IVRP 98 #if H3D_IVRP & !QC_ARP_D0177 99 99 m_ppcYuvResPred[ui] = new TComYuv; m_ppcYuvResPred[ui]->create( uiWidth, uiHeight ); 100 100 #endif … … 120 120 m_ppcYuvResi[ui]->destroy(); delete m_ppcYuvResi[ui]; m_ppcYuvResi[ui] = NULL; 121 121 m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL; 122 #if H3D_IVRP 122 #if H3D_IVRP & !QC_ARP_D0177 123 123 m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL; 124 124 #endif … … 128 128 delete [] m_ppcYuvResi; m_ppcYuvResi = NULL; 129 129 delete [] m_ppcYuvReco; m_ppcYuvReco = NULL; 130 #if H3D_IVRP 130 #if H3D_IVRP & !QC_ARP_D0177 131 131 delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL; 132 132 #endif … … 312 312 pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP 313 313 } 314 314 #if QC_CU_NBDV_D0181 315 DisInfo DvInfo; 316 DvInfo.bDV = false; 317 if(!pcCU->getSlice()->isIntra()) 318 { 319 #if QC_ARP_D0177 320 if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getUseAdvRP()) && pcCU->getSlice()->getViewId()) 321 #else 322 if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getMultiviewResPredMode()) && pcCU->getSlice()->getViewId()) 323 #endif 324 { 325 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true ); 326 m_ppcCU[uiDepth]->copyDVInfoFrom( pcCU, uiAbsPartIdx); 327 PartSize ePartTemp = m_ppcCU[uiDepth]->getPartitionSize(0); 328 UChar cWidTemp = m_ppcCU[uiDepth]->getWidth(0); 329 UChar cHeightTemp = m_ppcCU[uiDepth]->getHeight(0); 330 m_ppcCU[uiDepth]->setWidth ( 0, pcCU->getSlice()->getSPS()->getMaxCUWidth ()/(1<<uiDepth) ); 331 m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth) ); 332 m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 333 #if MERL_VSP_C0152 334 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(0, 0, &DvInfo, false, true); 335 #else 336 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(0, 0, &DvInfo, false); 337 #endif 338 pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth); 339 m_ppcCU[uiDepth]->setPartSizeSubParts( ePartTemp, 0, uiDepth ); 340 m_ppcCU[uiDepth]->setWidth ( 0, cWidTemp ); 341 m_ppcCU[uiDepth]->setHeight ( 0, cHeightTemp ); 342 } 343 if(DvInfo.bDV==false) 344 { 345 DvInfo.iN=1; 346 #if !SEC_DEFAULT_DV_D0112 347 DvInfo.m_acMvCand[0].setHor(0); 348 DvInfo.m_acMvCand[0].setVer(0); 349 DvInfo.m_aVIdxCan[0] = 0; 350 #endif 351 pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth); 352 } 353 } 354 #endif 315 355 // decode CU mode and the partition size 316 356 if( !pcCU->getSlice()->isIntra() && pcCU->getNumSucIPCM() == 0 ) … … 353 393 const UChar uhNewDepth = max<UInt>( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) ); 354 394 #if MERL_VSP_C0152 355 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui); 356 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 395 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui ); 396 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx ); 397 #endif 398 #if MERL_VSP_NBDV_RefVId_Fix_D0166 399 Int vspDir = pcTextureCU->getVSPDir( uiAbsPartIdx + ui ); 400 pcCU->setVSPDir( uiAbsPartIdx + ui, vspDir ); 357 401 #endif 358 402 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_SKIP ); … … 371 415 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 372 416 #if MERL_VSP_C0152 417 #if LGE_VSP_INHERIT_D0092 418 Int iVSPIndexTrue[MRG_MAX_NUM_CANDS_MEM]; 419 for (Int i=0; i<MRG_MAX_NUM_CANDS_MEM; i++) 420 { 421 iVSPIndexTrue[i] = 0; 422 } 423 #else 373 424 Int iVSPIndexTrue[3] = {-1, -1, -1}; 425 #endif 426 #if MERL_VSP_NBDV_RefVId_Fix_D0166 427 Int iVSPDirTrue[3] = {-1, -1, -1}; 428 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, iVSPDirTrue, uiMergeIndex ); 429 #else 374 430 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, uiDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, iVSPIndexTrue, uiMergeIndex ); 431 #endif 432 #if MTK_D0156 433 if( !pcCU->getSlice()->getSPS()->getUseVSPCompensation() ) 434 { 435 pcCU->setVSPIndexSubParts( 0, uiAbsPartIdx, 0, uiDepth ); 436 } 437 else 438 #endif 375 439 { 376 440 Int iVSPIdx = 0; 441 #if LGE_VSP_INHERIT_D0092 442 if (iVSPIndexTrue[uiMergeIndex] == 1) 443 { 444 iVSPIdx = 1; 445 } 446 #else 377 447 Int numVspIdx; 378 448 numVspIdx = 3; … … 385 455 } 386 456 } 387 pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth ); //Initialize the VSP, may change later in get InterMergeCandidates() 457 #endif 458 pcCU->setVSPIndexSubParts( iVSPIdx, uiAbsPartIdx, 0, uiDepth ); // Initialize 459 #if MERL_VSP_NBDV_RefVId_Fix_D0166 460 pcCU->setVSPDirSubParts( 0, uiAbsPartIdx, 0, uiDepth ); 461 #endif 462 #if QC_BVSP_CleanUP_D0191 && !LGE_VSP_INHERIT_D0092 463 if(iVSPIdx != 0) 464 { 465 Int iIVCIdx = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, 0)->getPOC()==pcCU->getSlice()->getPOC() ? 0: pcCU->getSlice()->getNewRefIdx(REF_PIC_LIST_0); 466 cMvFieldNeighbours[ 2*uiMergeIndex].setRefIdx(iIVCIdx); 467 } 468 #endif 388 469 } 389 470 #else … … 409 490 } 410 491 #endif 492 #if QC_ARP_D0177 493 if( pcCU->getSlice()->getSPS()->getUseAdvRP() ) 494 { 495 pcCU->setResPredAvailSubParts ( false, uiAbsPartIdx, 0, uiDepth ); 496 pcCU->setResPredFlagSubParts ( false, uiAbsPartIdx, 0, uiDepth ); 497 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth, m_ppcCU[uiDepth], 0 ); 498 } 499 #endif 411 500 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 412 501 return; … … 460 549 } 461 550 #endif 462 551 #if QC_ARP_D0177 552 if (pcCU->getSlice()->getSPS()->getUseAdvRP() && pcCU->isIntra( uiAbsPartIdx ) ) 553 { 554 pcCU->setResPredAvailSubParts ( 0, uiAbsPartIdx, 0, uiDepth ); 555 pcCU->setResPredFlagSubParts ( 0, uiAbsPartIdx, 0, uiDepth ); 556 } 557 #endif 463 558 #if HHI_MPI 464 559 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) … … 476 571 Int vspIdx = pcTextureCU->getVSPIndex( uiAbsPartIdx + ui); 477 572 pcCU->setVSPIndex( uiAbsPartIdx + ui, vspIdx); 573 #endif 574 #if MERL_VSP_NBDV_RefVId_Fix_D0166 575 if (pcCU->getSlice()->getIsDepth()) { 576 pcCU->setVSPDir( uiAbsPartIdx + ui, 0); 577 } 578 else { 579 Int vspDir = pcTextureCU->getVSPDir( uiAbsPartIdx + ui); 580 pcCU->setVSPDir( uiAbsPartIdx + ui, vspDir); 581 } 478 582 #endif 479 583 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER ); … … 670 774 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 671 775 #endif 672 #if H3D_IVRP 776 #if H3D_IVRP & !QC_ARP_D0177 673 777 if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0)) 674 778 { … … 1032 1136 // reconstruct residual based on mask + DC residuals 1033 1137 Pel apDCResiValues[2]; 1138 #if !MERL_General_Fix 1034 1139 Pel apDCRecoValues[2]; 1140 #endif 1035 1141 for( UInt ui = 0; ui < uiNumSegments; ui++ ) 1036 1142 { … … 1039 1145 Pel pRecoValue = GetIdx2DepthValue( pPredIdx + pResiIdx ); 1040 1146 1147 #if !MERL_General_Fix 1041 1148 apDCRecoValues[ui] = pRecoValue; 1149 #endif 1042 1150 apDCResiValues[ui] = pRecoValue - apDCPredValues[ui]; 1043 1151 } … … 1056 1164 UChar ucSegment = pMask?(UChar)pMask[uiX]:0; 1057 1165 assert( ucSegment < uiNumSegments ); 1166 #if MTK_SAMPLE_BASED_SDC_D0110 1167 Pel pResiDC = apDCResiValues[ucSegment]; 1058 1168 1169 pReco [ uiX ] = Clip( pPred[ uiX ] + pResiDC ); 1170 #else 1059 1171 Pel pPredVal= apDCPredValues[ucSegment]; 1060 1172 Pel pResiDC = apDCResiValues[ucSegment]; 1061 1173 1062 1174 pReco [ uiX ] = Clip( pPredVal + pResiDC ); 1175 #endif 1063 1176 pRecIPred[ uiX ] = pReco[ uiX ]; 1064 1177 }
Note: See TracChangeset for help on using the changeset viewer.