Changeset 1324 in SHVCSoftware for branches/SHM-dev/source/Lib
- Timestamp:
- 22 Jul 2015, 00:07:31 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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.