Changeset 608 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncGOP.h
- Timestamp:
- 1 Sep 2013, 22:47:26 (12 years ago)
- File:
-
- 1 edited
-
trunk/source/Lib/TLibEncoder/TEncGOP.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncGOP.h
r443 r608 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 2, ITU/ISO/IEC6 * Copyright (c) 2010-2013, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 48 48 #include "TLibCommon/TComLoopFilter.h" 49 49 #include "TLibCommon/AccessUnit.h" 50 #include "TLibCommon/TComDepthMapGenerator.h"51 #include "TLibCommon/TComResidualGenerator.h"52 #include "TEncAdaptiveLoopFilter.h"53 50 #include "TEncSampleAdaptiveOffset.h" 54 51 #include "TEncSlice.h" … … 56 53 #include "TEncCavlc.h" 57 54 #include "TEncSbac.h" 55 #include "SEIwrite.h" 58 56 59 57 #include "TEncAnalyze.h" 60 58 #include "TEncRateCtrl.h" 61 59 #include <vector> 62 60 … … 77 75 Bool m_bLongtermTestPictureHasBeenCoded; 78 76 Bool m_bLongtermTestPictureHasBeenCoded2; 77 UInt m_numLongTermRefPicSPS; 78 UInt m_ltRefPicPocLsbSps[33]; 79 Bool m_ltRefPicUsedByCurrPicFlag[33]; 79 80 Int m_iLastIDR; 80 81 Int m_iGopSize; … … 93 94 TEncBinCABAC* m_pcBinCABAC; 94 95 TComLoopFilter* m_pcLoopFilter; 95 96 #if DEPTH_MAP_GENERATION 97 TComDepthMapGenerator* m_pcDepthMapGenerator;98 # endif99 #if H3D_IVRP & !QC_ARP_D0177 100 TComResidualGenerator* m_pcResidualGenerator;101 #endif 96 97 SEIWriter m_seiWriter; 98 99 #if H_MV 100 TComPicLists* m_ivPicLists; 101 std::vector<TComPic*> m_refPicSetInterLayer; 102 102 103 Int m_pocLastCoded; 103 104 // Adaptive Loop filter 105 TEncAdaptiveLoopFilter* m_pcAdaptiveLoopFilter; 104 Int m_layerId; 105 Int m_viewId; 106 #if H_3D 107 Int m_viewIndex; 108 Bool m_isDepth; 109 #endif 110 #endif 106 111 //--Adaptive Loop filter 107 112 TEncSampleAdaptiveOffset* m_pcSAO; 108 113 TComBitCounter* m_pcBitCounter; 109 T ComRdCost* m_pcRdCost; ///< RD cost computation114 TEncRateCtrl* m_pcRateCtrl; 110 115 // indicate sequence first 111 116 Bool m_bSeqFirst; … … 114 119 Bool m_bRefreshPending; 115 120 Int m_pocCRA; 116 UInt* m_uiStoredStartCUAddrForEncodingSlice;117 UInt* m_uiStoredStartCUAddrForEncodingEntropySlice;121 std::vector<Int> m_storedStartCUAddrForEncodingSlice; 122 std::vector<Int> m_storedStartCUAddrForEncodingSliceSegment; 118 123 119 124 std::vector<Int> m_vRVM_RP; 120 125 UInt m_lastBPSEI; 126 UInt m_totalCoded; 127 UInt m_cpbRemovalDelay; 128 UInt m_tl0Idx; 129 UInt m_rapIdx; 130 Bool m_activeParameterSetSEIPresentInAU; 131 Bool m_bufferingPeriodSEIPresentInAU; 132 Bool m_pictureTimingSEIPresentInAU; 133 Bool m_nestedBufferingPeriodSEIPresentInAU; 134 Bool m_nestedPictureTimingSEIPresentInAU; 121 135 public: 122 136 TEncGOP(); 123 137 virtual ~TEncGOP(); 124 138 125 Void create ( Int iWidth, Int iHeight, UInt iMaxCUWidth, UInt iMaxCUHeight);139 Void create (); 126 140 Void destroy (); 127 141 128 142 Void init ( TEncTop* pcTEncTop ); 143 #if H_MV 129 144 Void initGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP); 130 Void compressPicInGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid ); 131 Void xWriteTileLocationToSliceHeader (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect, TComSlice*& rpcSlice); 132 133 Int getPocLastCoded() { return m_pocLastCoded; } 145 Void compressPicInGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP, Int iGOPid ); 146 #else 147 Void compressGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRec, std::list<AccessUnit>& accessUnitsInGOP ); 148 #endif 149 Void xAttachSliceDataToNalUnit (OutputNALUnit& rNalu, TComOutputBitstream*& rpcBitstreamRedirect); 150 151 #if H_MV 152 Int getPocLastCoded () { return m_pocLastCoded; } 153 Int getLayerId () { return m_layerId; } 154 Int getViewId () { return m_viewId; } 155 #if H_3D 156 Int getViewIndex () { return m_viewIndex; } 157 Bool getIsDepth () { return m_isDepth; } 158 #endif 159 #endif 160 134 161 Int getGOPSize() { return m_iGopSize; } 135 162 136 163 TComList<TComPic*>* getListPic() { return m_pcListPic; } 137 164 165 #if !H_MV 166 Void printOutSummary ( UInt uiNumAllPicCoded ); 167 #endif 168 #if H_3D_VSO 169 Void preLoopFilterPicAll ( TComPic* pcPic, Dist64& ruiDist, UInt64& ruiBits ); 170 #else 138 171 Void preLoopFilterPicAll ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits ); 139 TEncTop* getEncTop() { return m_pcEncTop; } 172 #endif 140 173 141 174 TEncSlice* getSliceEncoder() { return m_pcSliceEncoder; } 142 NalUnitType getNalUnitType( UInt uiPOCCurr ); 143 NalUnitType getNalUnitTypeBaseViewMvc( UInt uiPOCCurr ); 144 Void freeAPS (TComAPS* pAPS, TComSPS* pSPS); 145 Void allocAPS (TComAPS* pAPS, TComSPS* pSPS); 175 NalUnitType getNalUnitType( Int pocCurr, Int lastIdr ); 176 Void arrangeLongtermPicturesInRPS(TComSlice *, TComList<TComPic*>& ); 146 177 protected: 147 Void encodeAPS (TComAPS* pcAPS, TComOutputBitstream& APSbs, TComSlice* pcSlice); //!< encode APS syntax elements 148 Void assignNewAPS(TComAPS& cAPS, Int apsID, std::vector<TComAPS>& vAPS, TComSlice* pcSlice); //!< Assign APS object into APS container 149 178 TEncRateCtrl* getRateCtrl() { return m_pcRateCtrl; } 150 179 151 180 protected: 152 181 Void xInitGOP ( Int iPOC, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut ); 153 Void xGetBuffer ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, UInt uiPOCCurr );182 Void xGetBuffer ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, Int pocCurr ); 154 183 155 184 Void xCalculateAddPSNR ( TComPic* pcPic, TComPicYuv* pcPicD, const AccessUnit&, Double dEncTime ); 156 185 #if H_3D_VSO 186 Dist64 xFindDistortionFrame (TComPicYuv* pcPic0, TComPicYuv* pcPic1); 187 #else 157 188 UInt64 xFindDistortionFrame (TComPicYuv* pcPic0, TComPicYuv* pcPic1); 189 #endif 158 190 159 191 Double xCalculateRVM(); 160 192 161 Void xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid ); 193 SEIActiveParameterSets* xCreateSEIActiveParameterSets (TComSPS *sps); 194 SEIFramePacking* xCreateSEIFramePacking(); 195 SEIDisplayOrientation* xCreateSEIDisplayOrientation(); 196 197 SEIToneMappingInfo* xCreateSEIToneMappingInfo(); 198 199 Void xCreateLeadingSEIMessages (/*SEIMessages seiMessages,*/ AccessUnit &accessUnit, TComSPS *sps); 200 Int xGetFirstSeiLocation (AccessUnit &accessUnit); 201 Void xResetNonNestedSEIPresentFlags() 202 { 203 m_activeParameterSetSEIPresentInAU = false; 204 m_bufferingPeriodSEIPresentInAU = false; 205 m_pictureTimingSEIPresentInAU = false; 206 } 207 Void xResetNestedSEIPresentFlags() 208 { 209 m_nestedBufferingPeriodSEIPresentInAU = false; 210 m_nestedPictureTimingSEIPresentInAU = false; 211 } 212 #if H_MV 213 Void xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ); 214 #endif 215 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); 162 216 };// END CLASS DEFINITION TEncGOP 163 217 … … 168 222 { 169 223 EXECUTE_INLOOPFILTER, 170 ENCODE_APS,171 224 ENCODE_SLICE 172 225 };
Note: See TracChangeset for help on using the changeset viewer.