Ignore:
Timestamp:
14 Jul 2015, 12:31:09 (9 years ago)
Author:
tech
Message:

Merged HTM-14.1-update-dev3@1273.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-14.1-update-dev2/source/Lib/TLibCommon/TComDataCU.h

    r1225 r1274  
    5050#include "TComPattern.h"
    5151
    52 #if H_3D_ARP
    53 #include "TComYuv.h"
    54 #endif
    5552#if H_3D
    5653#include <algorithm>
     
    6562static const UInt NUM_MOST_PROBABLE_MODES=3;
    6663
    67 #if H_3D_DBBP
     64#if NH_3D_DBBP
    6865typedef struct _DBBPTmpData
    6966{
     
    167164  Char*         m_apiMVPNum[NUM_REF_PIC_LIST_01];       ///< array of number of possible motion vectors predictors
    168165  Bool*         m_pbIPCMFlag;         ///< array of intra_pcm flags
    169 #if H_3D_NBDV
     166#if NH_3D_NBDV
    170167  DisInfo*      m_pDvInfo;
    171168#endif
    172 #if H_3D_VSP
     169#if NH_3D_VSP
    173170  Char*         m_piVSPFlag;          ///< array of VSP flags to indicate whehter a block uses VSP or not  ///< 0: non-VSP; 1: VSP
    174171#endif
    175 #if H_3D_SPIVMP
     172#if NH_3D_SPIVMP
    176173  Bool*         m_pbSPIVMPFlag;       ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP
    177174#endif
    178 #if H_3D_ARP
     175#if NH_3D_ARP
    179176  UChar*        m_puhARPW;
    180177#endif
     
    193190#endif
    194191#endif
    195 #if H_3D_DBBP
     192#if NH_3D_DBBP
    196193  Bool*         m_pbDBBPFlag;        ///< array of DBBP flags
    197194  DbbpTmpData   m_sDBBPTmpData;
    198195#endif
    199 #if H_3D
     196#if NH_3D_MLC
    200197  Bool          m_bAvailableFlagA1;    ///< A1 available flag
    201198  Bool          m_bAvailableFlagB1;    ///< B1 available flag
     
    220217  UInt          m_uiTotalBins;        ///< sum of partition bins
    221218  Char          m_codedQP;
    222 #if H_3D
    223   DisInfo       m_cDefaultDisInfo;    ///< Default disparity information for initializing
    224 #endif
    225 #if H_3D_IV_MERGE
    226   TComMotionCand  m_mergCands[MRG_IVSHIFT+1];
    227   Int           m_baseListidc;
     219#if NH_3D_MLC
     220  DisInfo         m_cDefaultDisInfo;    ///< Default disparity information for initializing
     221  TComMotionCand  m_mergCands[MRG_IVSHIFT+1];   ///< Motion candidates for merge mode
     222  Int             m_numSpatialCands;
    228223#endif
    229224
     
    235230  Bool          xAddMVPCand           ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
    236231  Bool          xAddMVPCandOrder      ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir );
    237 #if H_3D_VSP
     232#if NH_3D_VSP
    238233  Bool          xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount);
    239234#endif
    240 #if H_3D_IV_MERGE
     235#if NH_3D_IV_MERGE
    241236  Bool          xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int*   ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx );
    242237#endif
     
    251246
    252247  /// compute scaling factor from POC difference
    253 #if !H_3D_ARP
     248#if !NH_3D_ARP
    254249  Int           xGetDistScaleFactor   ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
    255250#endif
     
    257252  Void xDeriveCenterIdx( UInt uiPartIdx, UInt& ruiPartIdxCenter );
    258253
    259 #if H_3D_VSP
     254#if NH_3D_VSP
    260255  Void xSetMvFieldForVSP  ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, Int *shiftLUT, RefPicList refPicList, Int refIdx, Bool isDepth, Int &vspSize );
    261256#endif
     
    268263  // create / destroy / initialize / copy
    269264  // -------------------------------------------------------------------------------------------------------------------
    270 #if H_3D_ARP
     265#if NH_3D_ARP
     266  /// compute scaling factor from POC difference
    271267  Int           xGetDistScaleFactor   ( Int iCurrPOC, Int iCurrRefPOC, Int iColPOC, Int iColRefPOC );
    272268#endif
     
    282278  Void          initSubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx, UInt uiDepth, Int qp );
    283279  Void          setOutsideCUPart      ( UInt uiAbsPartIdx, UInt uiDepth );
    284 #if H_3D_NBDV
    285   Void          copyDVInfoFrom (TComDataCU* pcCU, UInt uiAbsPartIdx);
     280#if NH_3D_NBDV
     281  Void          copyDVInfoFrom        (TComDataCU* pcCU, UInt uiAbsPartIdx);
    286282#endif
    287283
    288284  Void          copySubCU             ( TComDataCU* pcCU, UInt uiPartUnitIdx );
    289285  Void          copyInterPredInfoFrom ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefPicList
    290 #if H_3D_NBDV
     286#if NH_3D_NBDV
    291287  , Bool bNBDV = false
    292288#endif
     
    319315#endif
    320316
     317#if NH_3D_ARP
     318  Void          setSlice              ( TComSlice* pcSlice)     { m_pcSlice = pcSlice;       }
     319  Void          setPic                ( TComDataCU* pcCU  )     { m_pcPic              = pcCU->getPic(); }
     320#endif
    321321  // -------------------------------------------------------------------------------------------------------------------
    322322  // member functions for CU data
     
    329329  Void          setCUTransquantBypassSubParts( Bool flag, UInt uiAbsPartIdx, UInt uiDepth );
    330330
    331 #if H_3D_DBBP
     331#if NH_3D_DBBP
    332332  Pel*          getVirtualDepthBlock(UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt& uiDepthStride);
    333333#endif
     
    353353  Void          setPredModeSubParts   ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth );
    354354
    355 #if H_3D_DBBP
     355#if NH_3D_DBBP
    356356  Bool*         getDBBPFlag           ()                        { return m_pbDBBPFlag;               }
    357357  Bool          getDBBPFlag           ( UInt uiIdx )            { return m_pbDBBPFlag[uiIdx];        }
     
    454454  template <typename T>
    455455  Void          setSubPart            ( T bParameter, T* pbBaseCtu, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
    456 #if H_3D_VSP
     456#if H_3D_VSP || NH_3D_DBBP
    457457  template<typename T>
    458458  Void          setSubPartT           ( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx );
     
    480480  Void          setIPCMFlag           (UInt uiIdx, Bool b )     { m_pbIPCMFlag[uiIdx] = b;           }
    481481  Void          setIPCMFlagSubParts   (Bool bIpcmFlag, UInt uiAbsPartIdx, UInt uiDepth);
    482 #if H_3D_NBDV
     482#if NH_3D_NBDV
    483483  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth );
     484#if H_3D_VSP || NH_3D_DBBP
    484485  Void          setDvInfoSubParts     ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth);
     486#endif
    485487  DisInfo*      getDvInfo             ()                        { return m_pDvInfo;                 }
    486488  DisInfo       getDvInfo             (UInt uiIdx)              { return m_pDvInfo[uiIdx];          }
    487489#endif
    488 #if H_3D_NBDV
     490#if NH_3D_NBDV
    489491  Void          xDeriveRightBottomNbIdx(Int &uiLCUIdxRBNb, Int &uiPartIdxRBNb );
    490492  Bool          xCheckSpatialNBDV (TComDataCU* pcTmpCU, UInt uiIdx, DisInfo* pNbDvInfo, Bool bSearchForMvpDv, IDVInfo* paMvpDvInfo,
    491493                                   UInt uiMvpDvPos
    492 #if H_3D_NBDV_REF
     494#if NH_3D_NBDV_REF
    493495  , Bool bDepthRefine = false
    494496#endif
     
    496498  Bool          xGetColDisMV      ( Int currCandPic, RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx );
    497499  Void          getDisMvpCandNBDV ( DisInfo* pDInfo
    498 #if H_3D_NBDV_REF
     500#if NH_3D_NBDV_REF
    499501   , Bool bDepthRefine = false
    500502#endif
    501503   );
    502504   
     505#if NH_3D_IV_MERGE
     506  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     507#endif
     508
    503509#if H_3D
    504510  Void          getDispforDepth  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
     
    507513   Bool          getNeighDepth (UInt uiPartIdx, UInt uiPartAddr, Pel* pNeighDepth, Int index);
    508514#endif
    509 #if H_3D_NBDV_REF
     515#if NH_3D_NBDV_REF
    510516  Pel           getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT );
    511517  Void          estimateDVFromDM(Int refViewIdx, UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred );
    512 #endif //H_3D_NBDV_REF
     518#endif //NH_3D_NBDV_REF
    513519#endif
    514520#if  H_3D_FAST_TEXTURE_ENCODING
    515521  Void          getIVNStatus       ( UInt uiPartIdx,  DisInfo* pDInfo, Bool& bIVFMerge,  Int& iIVFMaxD);
    516522#endif
    517 #if H_3D_SPIVMP
     523#if NH_3D_SPIVMP
    518524  Void          getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight);
    519525  Void          getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr );
    520526  Void          setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight );
    521527#endif
    522 #if H_3D_IV_MERGE
     528#if NH_3D_IV_MERGE
    523529  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth           
    524530
    525 #if H_3D_SPIVMP
     531#if NH_3D_SPIVMP
    526532    , TComMvField* pcMFieldSP, UChar* puhInterDirSP
    527533#endif   
     
    529535    );   
    530536#endif
    531 #if H_3D_ARP
     537#if NH_3D_ARP
    532538  UChar*        getARPW            ()                        { return m_puhARPW;               }
    533539  UChar         getARPW            ( UInt uiIdx )            { return m_puhARPW[uiIdx];        }
    534540  Void          setARPW            ( UInt uiIdx, UChar w )   { m_puhARPW[uiIdx] = w;           }
    535541  Void          setARPWSubParts    ( UChar w, UInt uiAbsPartIdx, UInt uiDepth );
    536   Double        getARPWFactor      ( UInt uiIdx );
    537542#endif
    538543#if NH_3D_IC
     
    542547  Void          setICFlagSubParts  ( Bool bICFlag,  UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
    543548  Bool          isICFlagRequired   ( UInt uiAbsPartIdx );
     549  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
     550#elif NH_3D_VSP
    544551  Void          getPartIndexAndSize( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight, UInt uiAbsPartIdx = 0, Bool bLCU = false);
    545552#else
     
    654661  Bool          hasEqualMotion              ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx );
    655662
    656 #if H_3D
    657   Bool          getAvailableFlagA1() { return m_bAvailableFlagA1;}
    658   Bool          getAvailableFlagB1() { return m_bAvailableFlagB1;}
    659   Bool          getAvailableFlagB0() { return m_bAvailableFlagB0;}
    660   Bool          getAvailableFlagA0() { return m_bAvailableFlagA0;}
    661   Bool          getAvailableFlagB2() { return m_bAvailableFlagB2;}
     663#if NH_3D_MLC
     664  Bool          getAvailableFlagA1() { return m_bAvailableFlagA1;   }
     665  Bool          getAvailableFlagB1() { return m_bAvailableFlagB1;   }
     666  Bool          getAvailableFlagB0() { return m_bAvailableFlagB0;   }
     667  Bool          getAvailableFlagA0() { return m_bAvailableFlagA0;   }
     668  Bool          getAvailableFlagB2() { return m_bAvailableFlagB2;   }
    662669  Void          initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0;  }
    663670  Void          buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    664 #if H_3D_VSP
     671#if NH_3D_VSP
    665672    , Int* vspFlag
    666673#endif
    667 #if H_3D_SPIVMP
     674#if NH_3D_SPIVMP
    668675    , Bool* pbSPIVMPFlag
    669676#endif
    670677    , Int& numValidMergeCand
    671678    );
    672   Void          getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1);
    673   Void          xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
    674 #else
     679  Void          xGetInterMergeCandidates      ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours
     680#if NH_3D_SPIVMP
     681  , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
     682#endif
     683  , Int& numValidMergeCand, Int mrgCandIdx = -1 );
     684#endif
    675685  Void          getInterMergeCandidates       ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1 );
    676 #endif
    677 #if H_3D_SPIVMP
    678                                             , TComMvField* pcMvFieldSP, UChar* puhInterDirSP
    679 #endif
    680 
    681 #if H_3D_VSP
    682 #if H_3D_SPIVMP
     686
     687#if NH_3D_VSP
     688#if NH_3D_SPIVMP
    683689  Bool*         getSPIVMPFlag        ()                        { return m_pbSPIVMPFlag;          }
    684690  Bool          getSPIVMPFlag        ( UInt uiIdx )            { return m_pbSPIVMPFlag[uiIdx];   }
     
    723729  UInt          getCtxSkipFlag                  ( UInt   uiAbsPartIdx                                 );
    724730  UInt          getCtxInterDir                  ( UInt   uiAbsPartIdx                                 );
    725 #if H_3D_ARP
     731#if NH_3D_ARP
    726732  UInt          getCTXARPWFlag                  ( UInt   uiAbsPartIdx                                 );
    727733#endif 
Note: See TracChangeset for help on using the changeset viewer.