Changeset 28 in SHVCSoftware for trunk/source/Lib/TLibEncoder
- Timestamp:
- 7 Feb 2013, 02:16:51 (12 years ago)
- Location:
- trunk/source/Lib/TLibEncoder
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r2 r28 600 600 #endif 601 601 WRITE_FLAG( pcSPS->getTMVPFlagsPresent() ? 1 : 0, "sps_temporal_mvp_enable_flag" ); 602 #if REF_IDX_MFM 603 if( pcSPS->getLayerId() > 0 ) 604 { 605 assert(pcSPS->getMFMEnabledFlag()); 606 WRITE_FLAG( pcSPS->getMFMEnabledFlag() ? 1 : 0, "sps_enh_mfm_enable_flag" ); 607 } 608 #endif 602 609 #if SUPPORT_FOR_VUI 603 610 WRITE_FLAG( pcSPS->getVuiParametersPresentFlag(), "vui_parameters_present_flag" ); -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r20 r28 1351 1351 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) 1352 1352 { 1353 #if REF_IDX_ME_ZEROMV 1354 Bool bZeroMVILR = rpcTempCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]); 1355 if(bZeroMVILR) 1356 { 1357 #endif 1353 1358 if(!(uiNoResidual==1 && mergeCandBuffer[uiMergeCand]==1)) 1354 1359 { … … 1402 1407 } 1403 1408 } 1409 #if REF_IDX_ME_ZEROMV 1410 } 1411 #endif 1404 1412 } 1405 1413 -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r2 r28 465 465 #endif 466 466 467 #if REF_IDX_FRAMEWORK 468 if (pcSlice->getSliceType() == B_SLICE) 469 pcSlice->setColFromL0Flag(1-uiColDir); 470 #endif 471 467 472 // Set reference list 468 473 pcSlice->setRefPicList ( rcListPic ); … … 471 476 { 472 477 m_pcEncTop->setILRPic(pcPic); 478 479 #if REF_IDX_MFM 480 pcSlice->setRefPOCListILP(m_pcEncTop->getIlpList(), pcSlice->getBaseColPic()); 481 #endif 473 482 pcSlice->addRefPicList ( m_pcEncTop->getIlpList(), 1); 483 484 #if REF_IDX_MFM 485 Bool found = false; 486 UInt ColFromL0Flag = pcSlice->getColFromL0Flag(); 487 UInt ColRefIdx = pcSlice->getColRefIdx(); 488 for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++) 489 { 490 if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->getIsILR() ) 491 { 492 ColRefIdx = colIdx; 493 found = true; 494 break; 495 } 496 } 497 498 if( found == false ) 499 { 500 ColFromL0Flag = 1 - ColFromL0Flag; 501 for(Int colIdx = 0; colIdx < pcSlice->getNumRefIdx( RefPicList(1 - ColFromL0Flag) ); colIdx++) 502 { 503 if( pcSlice->getRefPic( RefPicList(1 - ColFromL0Flag), colIdx)->getIsILR() ) 504 { 505 ColRefIdx = colIdx; 506 found = true; 507 break; 508 } 509 } 510 } 511 512 if(found == true) 513 { 514 pcSlice->setColFromL0Flag(ColFromL0Flag); 515 pcSlice->setColRefIdx(ColRefIdx); 516 } 517 #endif 474 518 } 475 519 #endif … … 495 539 if (pcSlice->getSliceType() == B_SLICE) 496 540 { 541 #if !REF_IDX_FRAMEWORK 497 542 pcSlice->setColFromL0Flag(1-uiColDir); 543 #endif 498 544 Bool bLowDelay = true; 499 545 Int iCurrPOC = pcSlice->getPOC(); -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r21 r28 3211 3211 for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand ) 3212 3212 { 3213 #if REF_IDX_ME_ZEROMV 3214 Bool bZeroMVILR = pcCU->xCheckZeroMVILRMerge(uhInterDirNeighbours[uiMergeCand], cMvFieldNeighbours[0 + 2*uiMergeCand], cMvFieldNeighbours[1 + 2*uiMergeCand]); 3215 if(bZeroMVILR) 3216 { 3217 #endif 3213 3218 UInt uiCostCand = MAX_UINT; 3214 3219 UInt uiBitsCand = 0; … … 3234 3239 uiMergeIndex = uiMergeCand; 3235 3240 } 3241 #if REF_IDX_ME_ZEROMV 3242 } 3243 #endif 3236 3244 } 3237 3245 } … … 3420 3428 if(pcCU->getSlice()->getMvdL1ZeroFlag() && iRefList==1 && biPDistTemp < bestBiPDist) 3421 3429 { 3430 #if REF_IDX_ME_ZEROMV 3431 Bool bZeroMVILR = pcCU->xCheckZeroMVILRMvdL1Zero(iRefList, iRefIdxTemp, aaiMvpIdx[iRefList][iRefIdxTemp]); 3432 if(bZeroMVILR) 3433 { 3434 #endif 3422 3435 bestBiPDist = biPDistTemp; 3423 3436 bestBiPMvpL1 = aaiMvpIdx[iRefList][iRefIdxTemp]; 3424 3437 bestBiPRefIdxL1 = iRefIdxTemp; 3438 #if REF_IDX_ME_ZEROMV 3439 } 3440 #endif 3425 3441 } 3426 3442 … … 3560 3576 } 3561 3577 // Bi-directional prediction 3578 #if REF_IDX_ME_ZEROMV 3579 if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) && !(pcCU->getSlice()->getMvdL1ZeroFlag() && bestBiPDist == MAX_INT) ) 3580 #else 3562 3581 if ( (pcCU->getSlice()->isInterB()) && (pcCU->isBipredRestriction(iPartIdx) == false) ) 3582 #endif 3563 3583 { 3564 3584 -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r21 r28 85 85 memset(m_cIlpPic, 0, sizeof(m_cIlpPic)); 86 86 #endif 87 #if REF_IDX_MFM 88 m_bMFMEnabledFlag = false; 89 #endif 87 90 } 88 91 … … 394 397 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true); 395 398 #endif 396 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE 399 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM 397 400 m_cIlpPic[j]->setIsILR(true); 398 401 #endif … … 599 602 // mark it should be extended 600 603 rpcPic->getPicYuvRec()->setBorderExtension(false); 604 601 605 } 602 606 … … 605 609 #if SVC_EXTENSION 606 610 m_cSPS.setLayerId(m_layerId); 611 #endif 612 #if REF_IDX_MFM 613 m_cSPS.setMFMEnabledFlag(m_bMFMEnabledFlag); 607 614 #endif 608 615 -
trunk/source/Lib/TLibEncoder/TEncTop.h
r2 r28 140 140 TComPic* m_cIlpPic[MAX_NUM_REF]; ///< Inter layer Prediction picture = upsampled picture 141 141 #endif 142 #if REF_IDX_MFM 143 Bool m_bMFMEnabledFlag; 144 #endif 142 145 protected: 143 146 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed … … 228 231 Void setILRPic(TComPic *pcPic); 229 232 #endif 233 #if REF_IDX_MFM 234 Void setMFMEnabledFlag (Bool flag) {m_bMFMEnabledFlag = flag;} 235 Bool getMFMEnabledFlag() {return m_bMFMEnabledFlag;} 236 #endif 230 237 231 238 };
Note: See TracChangeset for help on using the changeset viewer.