Changeset 1324 in SHVCSoftware
- Timestamp:
- 22 Jul 2015, 00:07:31 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1323 r1324 1284 1284 ("SearchRange,-sr", m_iSearchRange, 96, "Motion search range") 1285 1285 ("BipredSearchRange", m_bipredSearchRange, 4, "Motion search range for bipred refinement") 1286 ("ClipForBiPredMEEnabled", m_bClipForBiPredMeEnabled, false, "Enables clipping in the Bi-Pred ME. It is disabled to reduce encoder run-time") 1286 1287 ("HadamardME", m_bUseHADME, true, "Hadamard ME for fractional-pel") 1287 1288 ("ASR", m_bUseASR, false, "Adaptive motion search range") -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1323 r1324 276 276 Int m_iSearchRange; ///< ME search range 277 277 Int m_bipredSearchRange; ///< ME search range for bipred refinement 278 Bool m_bClipForBiPredMeEnabled; ///< Enables clipping for Bi-Pred ME. 278 279 Bool m_bUseFastEnc; ///< flag for using fast encoder setting 279 280 Bool m_bUseEarlyCU; ///< flag for using Early CU setting -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1323 r1324 409 409 m_acTEncTop[layer].setSearchRange ( m_iSearchRange ); 410 410 m_acTEncTop[layer].setBipredSearchRange ( m_bipredSearchRange ); 411 m_acTEncTop[layer].setClipForBiPredMeEnabled ( m_bClipForBiPredMeEnabled ); 411 412 412 413 //====== Quality control ======== … … 845 846 m_cTEncTop.setSearchRange ( m_iSearchRange ); 846 847 m_cTEncTop.setBipredSearchRange ( m_bipredSearchRange ); 848 m_cTEncTop.setClipForBiPredMeEnabled ( m_bClipForBiPredMeEnabled ); 847 849 848 850 //====== Quality control ======== -
branches/SHM-dev/source/Lib/TLibCommon/TComYuv.cpp
r1315 r1324 410 410 const UInt uiPartIdx, 411 411 const UInt uiWidth, 412 const UInt uiHeight 413 #if !DISABLING_CLIP_FOR_BIPREDME 414 ,const Int bitDepths[MAX_NUM_CHANNEL_TYPE] 415 #endif 412 const UInt uiHeight, 413 const Int bitDepths[MAX_NUM_CHANNEL_TYPE], 414 const Bool bClipToBitDepths 416 415 ) 417 416 { … … 419 418 { 420 419 const ComponentID compID=ComponentID(comp); 421 #if !DISABLING_CLIP_FOR_BIPREDME422 const Int clipBd=bitDepths[toChannelType(compID)];423 #endif424 425 420 const Pel* pSrc = pcYuvSrc->getAddr(compID, uiPartIdx); 426 421 Pel* pDst = getAddr(compID, uiPartIdx); … … 430 425 const Int iWidth = uiWidth >>getComponentScaleX(compID); 431 426 const Int iHeight = uiHeight>>getComponentScaleY(compID); 432 433 for ( Int y = iHeight-1; y >= 0; y-- ) 434 { 435 for ( Int x = iWidth-1; x >= 0; x-- ) 436 { 437 #if DISABLING_CLIP_FOR_BIPREDME 438 pDst[x ] = (2 * pDst[x]) - pSrc[x]; 439 #else 440 pDst[x ] = ClipBD((2 * pDst[x]) - pSrc[x], clipBd); 441 #endif 442 } 443 pSrc += iSrcStride; 444 pDst += iDstStride; 427 if (bClipToBitDepths) 428 { 429 const Int clipBd=bitDepths[toChannelType(compID)]; 430 for ( Int y = iHeight-1; y >= 0; y-- ) 431 { 432 for ( Int x = iWidth-1; x >= 0; x-- ) 433 { 434 pDst[x ] = ClipBD((2 * pDst[x]) - pSrc[x], clipBd); 435 } 436 pSrc += iSrcStride; 437 pDst += iDstStride; 438 } 439 } 440 else 441 { 442 for ( Int y = iHeight-1; y >= 0; y-- ) 443 { 444 for ( Int x = iWidth-1; x >= 0; x-- ) 445 { 446 pDst[x ] = (2 * pDst[x]) - pSrc[x]; 447 } 448 pSrc += iSrcStride; 449 pDst += iDstStride; 450 } 445 451 } 446 452 } -
branches/SHM-dev/source/Lib/TLibCommon/TComYuv.h
r1313 r1324 140 140 141 141 Void removeHighFreq ( const TComYuv* pcYuvSrc, const UInt uiPartIdx, const UInt uiWidth, const UInt uiHeight 142 #if !DISABLING_CLIP_FOR_BIPREDME 143 , const Int bitDepths[MAX_NUM_CHANNEL_TYPE] 144 #endif 142 , const Int bitDepths[MAX_NUM_CHANNEL_TYPE], const Bool bClipToBitDepths 145 143 ); 146 144 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1298 r1324 208 208 #define SBH_THRESHOLD 4 ///< I0156: value of the fixed SBH controlling threshold 209 209 210 #define DISABLING_CLIP_FOR_BIPREDME 1 ///< Ticket #175211 212 210 #define C1FLAG_NUMBER 8 // maximum number of largerThan1 flag coded in one chunk : 16 in HM5 213 211 #define C2FLAG_NUMBER 1 // maximum number of largerThan2 flag coded in one chunk: 16 in HM5 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1322 r1324 172 172 Int m_iSearchRange; // 0:Full frame 173 173 Int m_bipredSearchRange; 174 Bool m_bClipForBiPredMeEnabled; 174 175 175 176 //====== Quality control ======== … … 544 545 Void setSearchRange ( Int i ) { m_iSearchRange = i; } 545 546 Void setBipredSearchRange ( Int i ) { m_bipredSearchRange = i; } 547 Void setClipForBiPredMeEnabled ( Bool b ) { m_bClipForBiPredMeEnabled = b; } 546 548 547 549 //====== Quality control ======== … … 606 608 //==== Motion search ======== 607 609 Bool getDisableIntraPUsInInterSlices () const { return m_bDisableIntraPUsInInterSlices; } 608 Int getFastSearch () { return m_iFastSearch; } 609 Int getSearchRange () { return m_iSearchRange; } 610 Int getFastSearch () const { return m_iFastSearch; } 611 Int getSearchRange () const { return m_iSearchRange; } 612 Bool getClipForBiPredMeEnabled () const { return m_bClipForBiPredMeEnabled; } 610 613 611 614 //==== Quality control ======== -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1317 r1324 3892 3892 pcYuvOrg->copyPartToPartYuv( pcYuv, uiPartAddr, iRoiWidth, iRoiHeight ); 3893 3893 3894 pcYuv->removeHighFreq( pcYuvOther, uiPartAddr, iRoiWidth, iRoiHeight 3895 #if !DISABLING_CLIP_FOR_BIPREDME 3896 , pcCU->getSlice()->getSPS()->getBitDepths().recon 3897 #endif 3898 ); 3894 pcYuv->removeHighFreq( pcYuvOther, uiPartAddr, iRoiWidth, iRoiHeight, pcCU->getSlice()->getSPS()->getBitDepths().recon, m_pcEncCfg->getClipForBiPredMeEnabled() ); 3899 3895 3900 3896 fWeight = 0.5;
Note: See TracChangeset for help on using the changeset viewer.