Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncTop.h


Ignore:
Timestamp:
13 Aug 2015, 17:38:13 (9 years ago)
Author:
tech
Message:

Merged 14.1-update-dev1@1312.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncTop.h

    r1179 r1313  
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license. 
    5  *
    6 * Copyright (c) 2010-2015, ITU/ISO/IEC
     4 * granted under this license.
     5 *
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    4343#include "TLibCommon/TComPrediction.h"
    4444#include "TLibCommon/TComTrQuant.h"
     45#include "TLibCommon/TComLoopFilter.h"
    4546#include "TLibCommon/AccessUnit.h"
    4647
     
    7677  UInt                    m_uiNumAllPicCoded;             ///< number of coded pictures
    7778  TComList<TComPic*>      m_cListPic;                     ///< dynamic list of pictures
    78  
    79 #if H_MV
     79
     80#if NH_MV
    8081  TComPicLists*           m_ivPicLists;                   ///< access to picture lists of other layers
    8182#endif
    82 #if H_3D_IC
     83#if NH_3D_IC
    8384  Int *m_aICEnableCandidate;
    8485  Int *m_aICEnableNum;
     
    8788  TEncSearch              m_cSearch;                      ///< encoder search class
    8889  //TEncEntropy*            m_pcEntropyCoder;                     ///< entropy encoder
    89   TEncCavlc*              m_pcCavlcCoder;                       ///< CAVLC encoder 
     90  TEncCavlc*              m_pcCavlcCoder;                       ///< CAVLC encoder
    9091  // coding tool
    9192  TComTrQuant             m_cTrQuant;                     ///< transform & quantization class
     
    9697  TEncSbac                m_cSbacCoder;                   ///< SBAC encoder
    9798  TEncBinCABAC            m_cBinCoderCABAC;               ///< bin coder CABAC
    98   TEncSbac*               m_pcSbacCoders;                 ///< SBAC encoders (to encode substreams )
    99   TEncBinCABAC*           m_pcBinCoderCABACs;             ///< bin coders CABAC (one per substream)
    100  
     99
    101100  // processing unit
    102101  TEncGOP                 m_cGOPEncoder;                  ///< GOP encoder
     
    104103  TEncCu                  m_cCuEncoder;                   ///< CU encoder
    105104  // SPS
    106   TComSPS                 m_cSPS;                         ///< SPS
    107   TComPPS                 m_cPPS;                         ///< PPS
     105  TComSPS                 m_cSPS;                         ///< SPS. This is the base value. This is copied to TComPicSym
     106  TComPPS                 m_cPPS;                         ///< PPS. This is the base value. This is copied to TComPicSym
    108107  // RD cost computation
    109   TComBitCounter          m_cBitCounter;                  ///< bit counter for RD optimization
    110108  TComRdCost              m_cRdCost;                      ///< RD cost computation class
    111109  TEncSbac***             m_pppcRDSbacCoder;              ///< temporal storage for RD computation
     
    118116  TEncBinCABAC            m_cRDGoOnBinCoderCABAC;         ///< going on bin coder CABAC for RD stage
    119117#endif
    120   Int                     m_iNumSubstreams;                ///< # of top-level elements allocated.
    121   TComBitCounter*         m_pcBitCounters;                 ///< bit counters for RD optimization per substream
    122   TComRdCost*             m_pcRdCosts;                     ///< RD cost computation class per substream
    123   TEncSbac****            m_ppppcRDSbacCoders;             ///< temporal storage for RD computation per substream
    124   TEncSbac*               m_pcRDGoOnSbacCoders;            ///< going on SBAC model for RD stage per substream
    125   TEncBinCABAC****        m_ppppcBinCodersCABAC;           ///< temporal CABAC state storage for RD computation per substream
    126   TEncBinCABAC*           m_pcRDGoOnBinCodersCABAC;        ///< going on bin coder CABAC for RD stage per substream
    127118
    128119  // quality control
    129120  TEncPreanalyzer         m_cPreanalyzer;                 ///< image characteristics analyzer for TM5-step3-like adaptive QP
    130121
    131   TComScalingList         m_scalingList;                 ///< quantization matrix information
    132122  TEncRateCtrl            m_cRateCtrl;                    ///< Rate control class
    133123
     
    136126  TAppComCamPara*         m_cCamParam;
    137127#endif
    138  
    139 #if H_MV
     128#if NH_MV
    140129  TEncAnalyze             m_cAnalyzeAll;
    141130  TEncAnalyze             m_cAnalyzeI;
    142131  TEncAnalyze             m_cAnalyzeP;
    143   TEncAnalyze             m_cAnalyzeB; 
     132  TEncAnalyze             m_cAnalyzeB;
     133  TEncAnalyze             m_cAnalyzeAll_in;
    144134#endif
    145135protected:
    146136  Void  xGetNewPicBuffer  ( TComPic*& rpcPic );           ///< get picture buffer which will be processed
     137  Void  xInitVPS          ();                             ///< initialize VPS from encoder options
    147138  Void  xInitSPS          ();                             ///< initialize SPS from encoder options
    148139  Void  xInitPPS          ();                             ///< initialize PPS from encoder options
    149  
     140  Void  xInitScalingLists();                              ///< initialize scaling lists
     141  Void  xInitHrdParameters();                             ///< initialize HRD parameters
     142
    150143  Void  xInitPPSforTiles  ();
    151144  Void  xInitRPS          (Bool isFieldCoding);           ///< initialize PPS from encoder options
    152 #if H_MV
    153 
    154   template <class T>     Void  xDelete( Bool ar, T inArray )
    155   {
    156     if( inArray != NULL)
    157     {
    158       if ( ar )
    159       {     
    160         delete[] inArray;
    161       }
    162       else
    163       {
    164         delete inArray;
    165       }
    166     }
    167   }
    168 
    169   template <class T>     Void  xDelete( Bool ar, T inArray, Int idx1 )
    170   {
    171     if( inArray != NULL)
    172     {
    173         xDelete( ar, inArray[idx1]);
    174     }
    175   }
    176 
    177   template <class T>     Void  xDelete( Bool ar, T inArray, Int idx1, Int idx2 )
    178   {
    179     if( inArray != NULL )
    180     {
    181       xDelete( ar, inArray[idx1], idx2 );
    182     }
    183   }
    184 
    185   template <class T>     Void  xDelete( Bool ar, T inArray, Int idx1, Int idx2, Int idx3 )
    186   {
    187     if( inArray != NULL )
    188     {
    189       xDelete( ar, inArray[idx1], idx2, idx3 );
    190     }
    191   }
    192 
    193 #endif
     145
    194146public:
    195147  TEncTop();
    196148  virtual ~TEncTop();
    197  
     149
    198150  Void      create          ();
    199151  Void      destroy         ();
     
    203155  Void      init            (Bool isFieldCoding);
    204156#endif
    205 
    206 #if H_MV 
     157#if NH_MV 
    207158  TComPicLists* getIvPicLists() { return m_ivPicLists; }
    208159#endif
    209 #if H_3D_IC
     160#if NH_3D_IC
    210161  Int*      getICEnableCandidate() { return m_aICEnableCandidate; }
    211162  Int*      getICEnableNum() { return m_aICEnableNum; }
    212163#endif
    213164  Void      deletePicBuffer ();
    214 
    215   Void      createWPPCoders(Int iNumSubstreams);
    216  
    217 #if H_MV
     165#if NH_MV
    218166  Void      initNewPic(TComPicYuv* pcPicYuvOrg);
    219167#endif
     
    221169  // member access functions
    222170  // -------------------------------------------------------------------------------------------------------------------
    223  
     171
    224172  TComList<TComPic*>*     getListPic            () { return  &m_cListPic;             }
    225173  TEncSearch*             getPredSearch         () { return  &m_cSearch;              }
    226  
     174
    227175  TComTrQuant*            getTrQuant            () { return  &m_cTrQuant;             }
    228176  TComLoopFilter*         getLoopFilter         () { return  &m_cLoopFilter;          }
     
    235183  TEncSbac*               getSbacCoder          () { return  &m_cSbacCoder;           }
    236184  TEncBinCABAC*           getBinCABAC           () { return  &m_cBinCoderCABAC;       }
    237   TEncSbac*               getSbacCoders     () { return  m_pcSbacCoders;      }
    238   TEncBinCABAC*           getBinCABACs          () { return  m_pcBinCoderCABACs;      }
    239  
    240   TComBitCounter*         getBitCounter         () { return  &m_cBitCounter;          }
     185
    241186  TComRdCost*             getRdCost             () { return  &m_cRdCost;              }
    242187  TEncSbac***             getRDSbacCoder        () { return  m_pppcRDSbacCoder;       }
    243188  TEncSbac*               getRDGoOnSbacCoder    () { return  &m_cRDGoOnSbacCoder;     }
    244   TComBitCounter*         getBitCounters        () { return  m_pcBitCounters;         }
    245   TComRdCost*             getRdCosts            () { return  m_pcRdCosts;             }
    246   TEncSbac****            getRDSbacCoders       () { return  m_ppppcRDSbacCoders;     }
    247   TEncSbac*               getRDGoOnSbacCoders   () { return  m_pcRDGoOnSbacCoders;   }
    248189  TEncRateCtrl*           getRateCtrl           () { return &m_cRateCtrl;             }
    249190#if KWU_RC_MADPRED_E0227
     
    252193  Void                    setCamParam(TAppComCamPara * pCamparam)                 { m_cCamParam = pCamparam;}
    253194#endif
    254   TComSPS*                getSPS                () { return  &m_cSPS;                 }
    255   TComPPS*                getPPS                () { return  &m_cPPS;                 }
    256195  Void selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid );
    257   Int getReferencePictureSetIdxForSOP(TComSlice* slice, Int POCCurr, Int GOPid );
    258   TComScalingList*        getScalingList        () { return  &m_scalingList;         }
    259 #if H_MV
     196  Int getReferencePictureSetIdxForSOP(Int POCCurr, Int GOPid );
     197#if NH_MV
    260198  TEncAnalyze*            getAnalyzeAll         () { return &m_cAnalyzeAll; }
    261199  TEncAnalyze*            getAnalyzeI           () { return &m_cAnalyzeI;   }
    262200  TEncAnalyze*            getAnalyzeP           () { return &m_cAnalyzeP;   }
    263201  TEncAnalyze*            getAnalyzeB           () { return &m_cAnalyzeB;   }
    264 
    265   Int                     getNumAllPicCoded     () { return m_uiNumAllPicCoded; }
    266  
    267   Int                     getFrameId            (Int iGOPid);
    268  
     202  Int                     getNumAllPicCoded     () { return m_uiNumAllPicCoded; }
     203  Int                     getFrameId            (Int iGOPid); 
    269204  TComPic*                getPic                ( Int poc );
    270205  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    271206#endif
    272 #if H_3D
     207#if NH_3D
    273208  Void                    setSps3dExtension     ( TComSps3dExtension sps3dExtension ) { m_cSPS.setSps3dExtension( sps3dExtension );  };
    274209#endif
    275 #if H_3D_IC
     210#if NH_3D_IC
    276211  Void                    setICEnableCandidate         ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; }
    277212  Void                    setICEnableNum         ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
     
    282217
    283218  /// encode several number of pictures until end-of-sequence
    284 #if H_MV
    285   Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded  , Int gopId  ); 
    286 
    287    /// encode several number of pictures until end-of-sequence
    288   Void encode( bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
    289               std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, bool isTff  , Int gopId );
    290 
     219#if NH_MV
     220  Void encode( Bool bEos,
     221    TComPicYuv* pcPicYuvOrg,
     222    TComPicYuv* pcPicYuvTrueOrg, const InputColourSpaceConversion snrCSC, // used for SNR calculations. Picture in original colour space.
     223    TComList<TComPicYuv*>& rcListPicYuvRecOut,
     224    std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, Int gopId );
     225
     226  /// encode several number of pictures until end-of-sequence
     227  Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg,
     228    TComPicYuv* pcPicYuvTrueOrg, const InputColourSpaceConversion snrCSC, // used for SNR calculations. Picture in original colour space.
     229    TComList<TComPicYuv*>& rcListPicYuvRecOut,
     230    std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, Bool isTff, Int gopId);
    291231#else
    292   Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
    293               std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded );
    294    /// encode several number of pictures until end-of-sequence
    295   Void encode( bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
    296               std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, bool isTff);
    297 
    298 #endif
    299 
    300 #if H_MV
    301   Void printSummary      ( Int numAllPicCoded, bool isField );
    302 #else
    303   Void printSummary(bool isField) { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded, isField); }
    304 #endif
    305 
    306 #if H_3D
    307    Void setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset );
     232  Void encode( Bool bEos,
     233               TComPicYuv* pcPicYuvOrg,
     234               TComPicYuv* pcPicYuvTrueOrg, const InputColourSpaceConversion snrCSC, // used for SNR calculations. Picture in original colour space.
     235              TComList<TComPicYuv*>& rcListPicYuvRecOut,
     236               std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded );
     237
     238  /// encode several number of pictures until end-of-sequence
     239  Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg,
     240               TComPicYuv* pcPicYuvTrueOrg, const InputColourSpaceConversion snrCSC, // used for SNR calculations. Picture in original colour space.
     241               TComList<TComPicYuv*>& rcListPicYuvRecOut,
     242               std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, Bool isTff);
     243#endif
     244  Void printSummary(Bool isField) { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded, isField, m_printMSEBasedSequencePSNR, m_printSequenceMSE, m_cSPS.getBitDepths()); }
     245
     246#if NH_3D_VSO
     247   Void setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset, Int maxCuHeight );
    308248#endif
    309249};
     
    312252
    313253#endif // __TENCTOP__
     254
Note: See TracChangeset for help on using the changeset viewer.