Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncTop.h
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncTop.h
r1179 r1313 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC4 * granted under this license. 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 43 43 #include "TLibCommon/TComPrediction.h" 44 44 #include "TLibCommon/TComTrQuant.h" 45 #include "TLibCommon/TComLoopFilter.h" 45 46 #include "TLibCommon/AccessUnit.h" 46 47 … … 76 77 UInt m_uiNumAllPicCoded; ///< number of coded pictures 77 78 TComList<TComPic*> m_cListPic; ///< dynamic list of pictures 78 79 #if H_MV79 80 #if NH_MV 80 81 TComPicLists* m_ivPicLists; ///< access to picture lists of other layers 81 82 #endif 82 #if H_3D_IC83 #if NH_3D_IC 83 84 Int *m_aICEnableCandidate; 84 85 Int *m_aICEnableNum; … … 87 88 TEncSearch m_cSearch; ///< encoder search class 88 89 //TEncEntropy* m_pcEntropyCoder; ///< entropy encoder 89 TEncCavlc* m_pcCavlcCoder; ///< CAVLC encoder 90 TEncCavlc* m_pcCavlcCoder; ///< CAVLC encoder 90 91 // coding tool 91 92 TComTrQuant m_cTrQuant; ///< transform & quantization class … … 96 97 TEncSbac m_cSbacCoder; ///< SBAC encoder 97 98 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 101 100 // processing unit 102 101 TEncGOP m_cGOPEncoder; ///< GOP encoder … … 104 103 TEncCu m_cCuEncoder; ///< CU encoder 105 104 // 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 108 107 // RD cost computation 109 TComBitCounter m_cBitCounter; ///< bit counter for RD optimization110 108 TComRdCost m_cRdCost; ///< RD cost computation class 111 109 TEncSbac*** m_pppcRDSbacCoder; ///< temporal storage for RD computation … … 118 116 TEncBinCABAC m_cRDGoOnBinCoderCABAC; ///< going on bin coder CABAC for RD stage 119 117 #endif 120 Int m_iNumSubstreams; ///< # of top-level elements allocated.121 TComBitCounter* m_pcBitCounters; ///< bit counters for RD optimization per substream122 TComRdCost* m_pcRdCosts; ///< RD cost computation class per substream123 TEncSbac**** m_ppppcRDSbacCoders; ///< temporal storage for RD computation per substream124 TEncSbac* m_pcRDGoOnSbacCoders; ///< going on SBAC model for RD stage per substream125 TEncBinCABAC**** m_ppppcBinCodersCABAC; ///< temporal CABAC state storage for RD computation per substream126 TEncBinCABAC* m_pcRDGoOnBinCodersCABAC; ///< going on bin coder CABAC for RD stage per substream127 118 128 119 // quality control 129 120 TEncPreanalyzer m_cPreanalyzer; ///< image characteristics analyzer for TM5-step3-like adaptive QP 130 121 131 TComScalingList m_scalingList; ///< quantization matrix information132 122 TEncRateCtrl m_cRateCtrl; ///< Rate control class 133 123 … … 136 126 TAppComCamPara* m_cCamParam; 137 127 #endif 138 139 #if H_MV 128 #if NH_MV 140 129 TEncAnalyze m_cAnalyzeAll; 141 130 TEncAnalyze m_cAnalyzeI; 142 131 TEncAnalyze m_cAnalyzeP; 143 TEncAnalyze m_cAnalyzeB; 132 TEncAnalyze m_cAnalyzeB; 133 TEncAnalyze m_cAnalyzeAll_in; 144 134 #endif 145 135 protected: 146 136 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed 137 Void xInitVPS (); ///< initialize VPS from encoder options 147 138 Void xInitSPS (); ///< initialize SPS from encoder options 148 139 Void xInitPPS (); ///< initialize PPS from encoder options 149 140 Void xInitScalingLists(); ///< initialize scaling lists 141 Void xInitHrdParameters(); ///< initialize HRD parameters 142 150 143 Void xInitPPSforTiles (); 151 144 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 194 146 public: 195 147 TEncTop(); 196 148 virtual ~TEncTop(); 197 149 198 150 Void create (); 199 151 Void destroy (); … … 203 155 Void init (Bool isFieldCoding); 204 156 #endif 205 206 #if H_MV 157 #if NH_MV 207 158 TComPicLists* getIvPicLists() { return m_ivPicLists; } 208 159 #endif 209 #if H_3D_IC160 #if NH_3D_IC 210 161 Int* getICEnableCandidate() { return m_aICEnableCandidate; } 211 162 Int* getICEnableNum() { return m_aICEnableNum; } 212 163 #endif 213 164 Void deletePicBuffer (); 214 215 Void createWPPCoders(Int iNumSubstreams); 216 217 #if H_MV 165 #if NH_MV 218 166 Void initNewPic(TComPicYuv* pcPicYuvOrg); 219 167 #endif … … 221 169 // member access functions 222 170 // ------------------------------------------------------------------------------------------------------------------- 223 171 224 172 TComList<TComPic*>* getListPic () { return &m_cListPic; } 225 173 TEncSearch* getPredSearch () { return &m_cSearch; } 226 174 227 175 TComTrQuant* getTrQuant () { return &m_cTrQuant; } 228 176 TComLoopFilter* getLoopFilter () { return &m_cLoopFilter; } … … 235 183 TEncSbac* getSbacCoder () { return &m_cSbacCoder; } 236 184 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 241 186 TComRdCost* getRdCost () { return &m_cRdCost; } 242 187 TEncSbac*** getRDSbacCoder () { return m_pppcRDSbacCoder; } 243 188 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; }248 189 TEncRateCtrl* getRateCtrl () { return &m_cRateCtrl; } 249 190 #if KWU_RC_MADPRED_E0227 … … 252 193 Void setCamParam(TAppComCamPara * pCamparam) { m_cCamParam = pCamparam;} 253 194 #endif 254 TComSPS* getSPS () { return &m_cSPS; }255 TComPPS* getPPS () { return &m_cPPS; }256 195 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 260 198 TEncAnalyze* getAnalyzeAll () { return &m_cAnalyzeAll; } 261 199 TEncAnalyze* getAnalyzeI () { return &m_cAnalyzeI; } 262 200 TEncAnalyze* getAnalyzeP () { return &m_cAnalyzeP; } 263 201 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); 269 204 TComPic* getPic ( Int poc ); 270 205 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 271 206 #endif 272 #if H_3D207 #if NH_3D 273 208 Void setSps3dExtension ( TComSps3dExtension sps3dExtension ) { m_cSPS.setSps3dExtension( sps3dExtension ); }; 274 209 #endif 275 #if H_3D_IC210 #if NH_3D_IC 276 211 Void setICEnableCandidate ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; } 277 212 Void setICEnableNum ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; } … … 282 217 283 218 /// 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); 291 231 #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-sequence295 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_3D307 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 ); 308 248 #endif 309 249 }; … … 312 252 313 253 #endif // __TENCTOP__ 254
Note: See TracChangeset for help on using the changeset viewer.