Ticket #1418: IBCcheck.patch

File IBCcheck.patch, 3.8 KB (added by Vadim, 9 years ago)
  • Lib/TLibCommon/TypeDef.h

     
    4545#include <vector>
    4646#include <cstdlib>
    4747
     48#define IBC_BUGFIX              1
     49
    4850//! \ingroup TLibCommon
    4951//! \{
    5052
  • Lib/TLibEncoder/TEncCu.cpp

     
    23422342
    23432343#if AMP_MRG
    23442344  rpcTempCU->setMergeAMP (true);
     2345#if IBC_BUGFIX
     2346  Bool valid =
     2347#endif
    23452348  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth] DEBUG_STRING_PASS_INTO(sTest), false, bUseMRG, iMVCandList );
    23462349#else
    23472350  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], false, iMVCandList );
    23482351#endif
    23492352
     2353#if IBC_BUGFIX
     2354  if( !valid )
     2355  {
     2356    return;
     2357  }
     2358#endif
     2359
    23502360#if AMP_MRG
    23512361  if ( !rpcTempCU->getMergeAMP() )
    23522362  {
  • Lib/TLibEncoder/TEncSearch.cpp

     
    64746474
    64756475//! search of the best candidate for inter prediction
    64766476#if AMP_MRG
     6477#if IBC_BUGFIX
     6478Bool TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv, TComYuv* pcRecoYuv DEBUG_STRING_FN_DECLARE(sDebug), Bool bUseRes, Bool bUseMRG, TComMv* iMVCandList )
     6479#else
    64776480Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv, TComYuv* pcRecoYuv DEBUG_STRING_FN_DECLARE(sDebug), Bool bUseRes, Bool bUseMRG, TComMv* iMVCandList )
     6481#endif
    64786482#else
    64796483Void TEncSearch::predInterSearch( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv, TComYuv* pcRecoYuv, Bool bUseRes, TComMv* iMVCandList )
    64806484#endif
     
    70247028        pcCU->setMVPIdxSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    70257029        pcCU->setMVPNumSubParts( -1, REF_PIC_LIST_1, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr));
    70267030      }
     7031#if IBC_BUGFIX
     7032      else if( uiMECost < std::numeric_limits<Distortion>::max() )
     7033#else
    70277034      else
     7035#endif
    70287036      {
    70297037        // set ME result
    70307038        pcCU->setMergeFlagSubParts( false,        uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     
    70327040        pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMEMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
    70337041        pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMEMvField[1], ePartSize, uiPartAddr, 0, iPartIdx );
    70347042      }
     7043#if IBC_BUGFIX
     7044      else
     7045      {
     7046        return false;
     7047      }
     7048#endif
    70357049    }
    70367050
    70377051    //  MC
     
    70417055
    70427056  setWpScalingDistParam( pcCU, -1, REF_PIC_LIST_X );
    70437057
     7058#if IBC_BUGFIX
     7059  return true;
     7060#else
    70447061  return;
     7062#endif
    70457063}
    70467064
    70477065Bool TEncSearch::isBlockVectorValid( Int xPos, Int yPos, Int width, Int height, TComDataCU *pcCU, UInt uiAbsPartIdx,
  • Lib/TLibEncoder/TEncSearch.h

     
    282282                                          );
    283283
    284284  /// encoder estimation - inter prediction (non-skip)
     285#if IBC_BUGFIX
     286  Bool predInterSearch          ( TComDataCU* pcCU,
     287#else
    285288  Void predInterSearch          ( TComDataCU* pcCU,
     289#endif
    286290                                  TComYuv*    pcOrgYuv,
    287291                                  TComYuv*    pcPredYuv,
    288292                                  TComYuv*    pcResiYuv,