Changeset 1324 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibCommon


Ignore:
Timestamp:
22 Jul 2015, 00:07:31 (10 years ago)
Author:
seregin
Message:

port rev 4402

Location:
branches/SHM-dev/source/Lib/TLibCommon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComYuv.cpp

    r1315 r1324  
    410410                              const UInt uiPartIdx,
    411411                              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
    416415                              )
    417416{
     
    419418  {
    420419    const ComponentID compID=ComponentID(comp);
    421 #if !DISABLING_CLIP_FOR_BIPREDME
    422     const Int clipBd=bitDepths[toChannelType(compID)];
    423 #endif
    424 
    425420    const Pel* pSrc  = pcYuvSrc->getAddr(compID, uiPartIdx);
    426421    Pel* pDst  = getAddr(compID, uiPartIdx);
     
    430425    const Int iWidth  = uiWidth >>getComponentScaleX(compID);
    431426    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      }
    445451    }
    446452  }
  • branches/SHM-dev/source/Lib/TLibCommon/TComYuv.h

    r1313 r1324  
    140140
    141141  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
    145143                                          );
    146144
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1298 r1324  
    208208#define SBH_THRESHOLD                                     4  ///< I0156: value of the fixed SBH controlling threshold
    209209
    210 #define DISABLING_CLIP_FOR_BIPREDME                       1  ///< Ticket #175
    211 
    212210#define C1FLAG_NUMBER                                     8 // maximum number of largerThan1 flag coded in one chunk :  16 in HM5
    213211#define C2FLAG_NUMBER                                     1 // maximum number of largerThan2 flag coded in one chunk:  16 in HM5
Note: See TracChangeset for help on using the changeset viewer.