- Timestamp:
- 29 Jan 2013, 20:23:17 (12 years ago)
- Location:
- trunk/source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r2 r21 787 787 #endif 788 788 789 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV 790 xConfirmPara( REF_IDX_ME_AROUND_ZEROMV && REF_IDX_ME_ZEROMV, "REF_IDX_ME_AROUND_ZEROMV and REF_IDX_ME_ZEROMV cannot be enabled simultaneously"); 791 #endif 789 792 // max CU width and height should be power of 2 790 793 UInt ui = m_uiMaxCUWidth; … … 1309 1312 printf("EL_RAP_SliceType: %d ", m_elRapSliceBEnabled); 1310 1313 printf("REF_IDX_ME_AROUND_ZEROMV:%d ", REF_IDX_ME_AROUND_ZEROMV); 1314 printf("REF_IDX_ME_ZEROMV: %d", REF_IDX_ME_ZEROMV); 1311 1315 #else 1312 1316 printf("INTRA_BL:%d ", INTRA_BL); -
trunk/source/Lib/TLibCommon/TComPic.cpp
r20 r21 68 68 , m_bSpatialEnhLayer( false ) 69 69 , m_pcFullPelBaseRec( NULL ) 70 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE70 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE 71 71 , m_bIsILR (false) 72 72 #endif -
trunk/source/Lib/TLibCommon/TComPic.h
r20 r21 88 88 Bool m_bSpatialEnhLayer; // whether current layer is a spatial enhancement layer, 89 89 TComPicYuv* m_pcFullPelBaseRec; // upsampled base layer recontruction for difference domain inter prediction 90 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE90 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE 91 91 Bool m_bIsILR; // Is ILR picture 92 92 #endif … … 118 118 TComPicYuv* getFullPelBaseRec () { return m_pcFullPelBaseRec; } 119 119 #endif 120 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE120 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE 121 121 Void setIsILR( Bool bIsILR) {m_bIsILR = bIsILR;} 122 122 Bool getIsILR() {return m_bIsILR;} -
trunk/source/Lib/TLibCommon/TypeDef.h
r20 r21 58 58 #if REF_IDX_FRAMEWORK 59 59 #define REF_IDX_ME_AROUND_ZEROMV 0 ///< added ME around zero MV for inter-layer reference picture 60 #define REF_IDX_ME_ZEROMV 1 ///< L0051: use zero motion for inter-layer reference picture (without fractional ME) 60 61 #define ENCODER_FAST_MODE 1 ///< L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1. 61 62 #else -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r11 r21 164 164 m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true); 165 165 #endif 166 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV 167 m_cIlpPic[j]->setIsILR(true); 168 #endif 166 169 for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCUsInFrame(); i++) 167 170 { -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r20 r21 4470 4470 setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList ); 4471 4471 // Do integer search 4472 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV 4472 4473 #if REF_IDX_ME_AROUND_ZEROMV 4473 4474 if( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic … … 4487 4488 } 4488 4489 } 4490 #endif 4491 #if REF_IDX_ME_ZEROMV 4492 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic 4493 rcMv.setZero(); //use Mv(0, 0) for integer ME 4494 else //non ILR reference pic 4495 { 4496 if ( !m_iFastSearch || bBi ) 4497 { 4498 xPatternSearch ( pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost ); 4499 } 4500 else 4501 { 4502 rcMv = *pcMvPred; 4503 xPatternSearchFast ( pcCU, pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost ); 4504 } 4505 } 4506 #endif 4489 4507 #else 4490 4508 if ( !m_iFastSearch || bBi ) … … 4503 4521 4504 4522 { 4523 #if REF_IDX_ME_ZEROMV 4524 if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR()) //ILR reference pic 4525 xPatternSearchFracDIFMv0( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost, bBi ); 4526 else //non ILR reference pic 4527 xPatternSearchFracDIF( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost, bBi ); 4528 #else 4505 4529 xPatternSearchFracDIF( pcCU, pcPatternKey, piRefY, iRefStride, &rcMv, cMvHalf, cMvQter, ruiCost 4506 4530 ,bBi 4507 4531 ); 4532 #endif 4508 4533 } 4509 4534 … … 4887 4912 } 4888 4913 4914 #if REF_IDX_ME_ZEROMV 4915 Void TEncSearch::xPatternSearchFracDIFMv0(TComDataCU* pcCU, 4916 TComPattern* pcPatternKey, 4917 Pel* piRefY, 4918 Int iRefStride, 4919 TComMv* pcMvInt, 4920 TComMv& rcMvHalf, 4921 TComMv& rcMvQter, 4922 UInt& ruiCost, 4923 Bool biPred 4924 ) 4925 { 4926 assert(pcMvInt->getHor() == 0 && pcMvInt->getVer() == 0); 4927 Int iOffset = pcMvInt->getHor() + pcMvInt->getVer() * iRefStride; 4928 m_pcRdCost->setDistParam( pcPatternKey, piRefY + iOffset, iRefStride, 1, m_cDistParam, m_pcEncCfg->getUseHADME() ); 4929 m_pcRdCost->setCostScale ( 2 ); 4930 setDistParamComp(0); 4931 ruiCost = m_cDistParam.DistFunc( &m_cDistParam ); //SATD 4932 ruiCost += m_pcRdCost->getCost( pcMvInt->getHor(), pcMvInt->getVer() ); //SATD rdCost 4933 rcMvHalf.setZero(); 4934 rcMvQter.setZero(); 4935 } 4936 #endif 4889 4937 /** encode residual and calculate rate-distortion for a CU block 4890 4938 * \param pcCU -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r20 r21 471 471 #endif 472 472 473 #if REF_IDX_ME_ZEROMV 474 Void xPatternSearchFracDIFMv0 ( TComDataCU* pcCU, 475 TComPattern* pcPatternKey, 476 Pel* piRefY, 477 Int iRefStride, 478 TComMv* pcMvInt, 479 TComMv& rcMvHalf, 480 TComMv& rcMvQter, 481 UInt& ruiCost, 482 Bool biPred ); 483 #endif 473 484 Void xExtDIFUpSamplingH( TComPattern* pcPattern, Bool biPred ); 474 485 Void xExtDIFUpSamplingQ( TComPattern* pcPatternKey, TComMv halfPelRef, Bool biPred ); -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r20 r21 394 394 m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true); 395 395 #endif 396 #if REF_IDX_ME_AROUND_ZEROMV || ENCODER_FAST_MODE396 #if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE 397 397 m_cIlpPic[j]->setIsILR(true); 398 398 #endif
Note: See TracChangeset for help on using the changeset viewer.