Ticket #715: RemovingFunctions.patch

File RemovingFunctions.patch, 5.8 KB (added by obici, 10 years ago)

Patch for removing the functions

  • source/Lib/TLibCommon/TComDataCU.cpp

     
    30973097  numValidMergeCand = uiArrayAddr;
    30983098}
    30993099
    3100 /** Check the duplicated candidate in the list
    3101  * \param pcMvFieldNeighbours
    3102  * \param puhInterDirNeighbours
    3103  * \param pbCandIsInter
    3104  * \param ruiArrayAddr
    3105  * \returns Void
    3106  */
    3107 Void TComDataCU::xCheckDuplicateCand(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, bool* pbCandIsInter, UInt& ruiArrayAddr)
    3108 {
    3109   if (getSlice()->isInterB())
    3110   {
    3111     UInt uiMvFieldNeighIdxCurr = ruiArrayAddr << 1;
    3112     Int iRefIdxL0 = pcMvFieldNeighbours[ uiMvFieldNeighIdxCurr ].getRefIdx();
    3113     Int iRefIdxL1 = pcMvFieldNeighbours[ uiMvFieldNeighIdxCurr + 1 ].getRefIdx();
    3114     TComMv MvL0 = pcMvFieldNeighbours[ uiMvFieldNeighIdxCurr ].getMv();
    3115     TComMv MvL1 = pcMvFieldNeighbours[ uiMvFieldNeighIdxCurr + 1 ].getMv();
    3116 
    3117     for (int k=0; k<ruiArrayAddr; k++)
    3118     {
    3119       UInt uiMvFieldNeighIdxComp = k << 1;
    3120       if (iRefIdxL0 == pcMvFieldNeighbours[ uiMvFieldNeighIdxComp ].getRefIdx() &&
    3121           iRefIdxL1 == pcMvFieldNeighbours[ uiMvFieldNeighIdxComp + 1 ].getRefIdx() &&
    3122           MvL0 == pcMvFieldNeighbours[ uiMvFieldNeighIdxComp ].getMv() &&
    3123           MvL1 == pcMvFieldNeighbours[ uiMvFieldNeighIdxComp + 1 ].getMv() &&
    3124           puhInterDirNeighbours[ ruiArrayAddr ] == puhInterDirNeighbours[ k ] )
    3125       {
    3126         pbCandIsInter[ruiArrayAddr] = false;
    3127         break;
    3128       }
    3129     }
    3130   }
    3131   else
    3132   {
    3133     UInt uiMvFieldNeighIdxCurr = ruiArrayAddr << 1;
    3134     Int iRefIdxL0 = pcMvFieldNeighbours[ uiMvFieldNeighIdxCurr ].getRefIdx();
    3135     TComMv MvL0 = pcMvFieldNeighbours[ uiMvFieldNeighIdxCurr ].getMv();
    3136 
    3137     for (int k=0; k<ruiArrayAddr; k++)
    3138     {
    3139       UInt uiMvFieldNeighIdxComp = k << 1;
    3140       if (iRefIdxL0 == pcMvFieldNeighbours[ uiMvFieldNeighIdxComp ].getRefIdx() &&
    3141           MvL0 == pcMvFieldNeighbours[ uiMvFieldNeighIdxComp ].getMv() &&
    3142           puhInterDirNeighbours[ ruiArrayAddr ] == puhInterDirNeighbours[ k ] )
    3143       {
    3144         pbCandIsInter[ruiArrayAddr] = false;
    3145         break;
    3146       }
    3147     }
    3148   }
    3149 
    3150   if (pbCandIsInter[ruiArrayAddr])
    3151   {
    3152     ++ruiArrayAddr;
    3153   }
    3154 }
    3155 
    3156 Void TComDataCU::xCheckCornerCand( TComDataCU* pcCorner, UInt uiCornerPUIdx, UInt uiIter, Bool& rbValidCand )
    3157 {
    3158   if( uiIter == 0 )
    3159   {
    3160     if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
    3161     {
    3162       rbValidCand = true;
    3163       if( getSlice()->isInterB() )
    3164       {
    3165         if ( pcCorner->getInterDir( uiCornerPUIdx ) == 1 )
    3166         {
    3167           if( pcCorner->getCUMvField(REF_PIC_LIST_0)->getRefIdx( uiCornerPUIdx ) != 0 )
    3168           {
    3169             rbValidCand = false;
    3170           }
    3171         }
    3172         else if ( pcCorner->getInterDir( uiCornerPUIdx ) == 2 )
    3173         {
    3174           if( pcCorner->getCUMvField(REF_PIC_LIST_1)->getRefIdx( uiCornerPUIdx ) != 0 )
    3175           {
    3176             rbValidCand = false;
    3177           }
    3178         }
    3179         else
    3180         {
    3181           if( pcCorner->getCUMvField(REF_PIC_LIST_0)->getRefIdx( uiCornerPUIdx ) != 0 || pcCorner->getCUMvField(REF_PIC_LIST_1)->getRefIdx( uiCornerPUIdx ) != 0 )
    3182           {
    3183             rbValidCand = false;
    3184           }
    3185         }
    3186       }
    3187       else if( pcCorner->getCUMvField(REF_PIC_LIST_0)->getRefIdx( uiCornerPUIdx ) != 0 )
    3188       {
    3189         rbValidCand = false;
    3190       }
    3191     }
    3192   }
    3193   else
    3194   {
    3195     if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) )
    3196     {
    3197       rbValidCand = true;
    3198       if( getSlice()->isInterB() )
    3199       {
    3200         if ( pcCorner->getInterDir( uiCornerPUIdx ) == 1 )
    3201         {
    3202           if( pcCorner->getCUMvField(REF_PIC_LIST_0)->getRefIdx( uiCornerPUIdx ) < 0 )
    3203           {
    3204             rbValidCand = false;
    3205           }
    3206         }
    3207         else if ( pcCorner->getInterDir( uiCornerPUIdx ) == 2 )
    3208         {
    3209           if( pcCorner->getCUMvField(REF_PIC_LIST_1)->getRefIdx( uiCornerPUIdx ) < 0 )
    3210           {
    3211             rbValidCand = false;
    3212           }
    3213         }
    3214         else
    3215         {
    3216           if( pcCorner->getCUMvField(REF_PIC_LIST_0)->getRefIdx( uiCornerPUIdx ) < 0 || pcCorner->getCUMvField(REF_PIC_LIST_1)->getRefIdx( uiCornerPUIdx ) < 0 )
    3217           {
    3218             rbValidCand = false;
    3219           }
    3220         }
    3221       }
    3222       else if( pcCorner->getCUMvField(REF_PIC_LIST_0)->getRefIdx( uiCornerPUIdx ) < 0 )
    3223       {
    3224         rbValidCand = false;
    3225       }
    3226     }
    3227   }
    3228 }
    32293100/** Check whether the current PU and a spatial neighboring PU are in a same ME region.
    32303101 * \param xN, xN   location of the upper-left corner pixel of a neighboring PU
    32313102 * \param xP, yP   location of the upper-left corner pixel of the current PU
  • source/Lib/TLibCommon/TComDataCU.h

     
    217217  Void          deriveRightBottomIdx        ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB );
    218218  Bool          xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx );
    219219 
    220   Void xCheckCornerCand( TComDataCU* pcCorner, UInt uiCornerIdx, UInt uiIter, Bool& rbValidCand );
    221220  /// compute required bits to encode MVD (used in AMVP)
    222221  UInt          xGetMvdBits           ( TComMv cMvd );
    223222  UInt          xGetComponentBits     ( Int iVal );
     
    227226 
    228227  Void xDeriveCenterIdx( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxCenter );
    229228  Bool xGetCenterCol( UInt uiPartIdx, RefPicList eRefPicList, int iRefIdx, TComMv *pcMv );
    230  
    231   Void xCheckDuplicateCand(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, bool* pbCandIsInter, UInt& ruiArrayAddr);
    232229
    233230public:
    234231  TComDataCU();