Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncSlice.h
- Timestamp:
- 13 Aug 2015, 17:38:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncSlice.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. 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2015, ITU/ISO/IEC6 * Copyright (c) 2010-2015, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 65 65 // encoder configuration 66 66 TEncCfg* m_pcCfg; ///< encoder configuration class 67 67 68 68 // pictures 69 69 TComList<TComPic*>* m_pcListPic; ///< list of pictures 70 70 TComPicYuv* m_apcPicYuvPred; ///< prediction picture buffer 71 71 TComPicYuv* m_apcPicYuvResi; ///< residual picture buffer 72 72 73 73 // processing units 74 74 TEncGOP* m_pcGOPEncoder; ///< GOP encoder 75 75 TEncCu* m_pcCuEncoder; ///< CU encoder 76 76 77 77 // encoder search 78 78 TEncSearch* m_pcPredSearch; ///< encoder search class 79 79 80 80 // coding tools 81 81 TEncEntropy* m_pcEntropyCoder; ///< entropy encoder 82 TEncCavlc* m_pcCavlcCoder; ///< CAVLC encoder83 82 TEncSbac* m_pcSbacCoder; ///< SBAC encoder 84 83 TEncBinCABAC* m_pcBinCABAC; ///< Bin encoder CABAC 85 84 TComTrQuant* m_pcTrQuant; ///< transform & quantization 86 85 87 86 // RD optimization 88 TComBitCounter* m_pcBitCounter; ///< bit counter89 87 TComRdCost* m_pcRdCost; ///< RD cost computation 90 88 TEncSbac*** m_pppcRDSbacCoder; ///< storage for SBAC-based RD optimization 91 89 TEncSbac* m_pcRDGoOnSbacCoder; ///< go-on SBAC encoder 92 90 UInt64 m_uiPicTotalBits; ///< total bits for the picture 93 #if H_3D_VSO91 #if NH_3D_VSO 94 92 Dist64 m_uiPicDist; ///< total distortion for the picture 95 93 #else … … 100 98 Double* m_pdRdPicQp; ///< array of picture QP candidates (double-type for lambda) 101 99 Int* m_piRdPicQp; ///< array of picture QP candidates (Int-type) 102 TEncBinCABAC* m_pcBufferBinCoderCABACs; ///< line of bin coder CABAC103 TEncSbac* m_pcBufferSbacCoders; ///< line to store temporary contexts104 TEncBinCABAC* m_pcBufferLowLatBinCoderCABACs; ///< dependent tiles: line of bin coder CABAC105 TEncSbac* m_pcBufferLowLatSbacCoders; ///< dependent tiles: line to store temporary contexts106 100 TEncRateCtrl* m_pcRateCtrl; ///< Rate control manager 107 101 UInt m_uiSliceIdx; 108 std::vector<TEncSbac*> CTXMem; 102 TEncSbac m_lastSliceSegmentEndContextState; ///< context storage for state at the end of the previous slice-segment (used for dependent slices only). 103 TEncSbac m_entropyCodingSyncContextState; ///< context storate for state of contexts at the wavefront/WPP/entropy-coding-sync second CTU of tile-row 104 SliceType m_encCABACTableIdx; 105 106 Void setUpLambda(TComSlice* slice, const Double dLambda, Int iQP); 107 Void calculateBoundingCtuTsAddrForSlice(UInt &startCtuTSAddrSlice, UInt &boundingCtuTSAddrSlice, Bool &haveReachedTileBoundary, TComPic* pcPic, const Int sliceMode, const Int sliceArgument); 108 109 109 public: 110 110 TEncSlice(); 111 111 virtual ~TEncSlice(); 112 113 Void create ( Int iWidth, Int iHeight, UInt iMaxCUWidth, UInt iMaxCUHeight, UChar uhTotalDepth );112 113 Void create ( Int iWidth, Int iHeight, ChromaFormat chromaFormat, UInt iMaxCUWidth, UInt iMaxCUHeight, UChar uhTotalDepth ); 114 114 Void destroy (); 115 115 Void init ( TEncTop* pcEncTop ); 116 116 117 117 /// preparation of slice encoding (reference marking, QP and lambda) 118 #if H_MV119 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,120 Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS,Int layerId, bool isField );118 #if NH_MV 119 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, 120 Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, Int layerId, bool isField ); 121 121 #else 122 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,123 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS, bool isField);122 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, 123 Int iGOPid, TComSlice*& rpcSlice, Bool isField ); 124 124 #endif 125 125 Void resetQP ( TComPic* pic, Int sliceQP, Double lambda ); 126 126 // compress and encode slice 127 Void precompressSlice ( TComPic* & rpcPic ); ///< precompress slice for multi-loopopt.128 Void compressSlice ( TComPic* & rpcPic); ///< analysis stage of slice129 Void calCostSliceI ( TComPic* & rpcPic );130 Void encodeSlice ( TComPic* & rpcPic, TComOutputBitstream* pcSubstreams);131 127 Void precompressSlice ( TComPic* pcPic ); ///< precompress slice for multi-loop slice-level QP opt. 128 Void compressSlice ( TComPic* pcPic, const Bool bCompressEntireSlice, const Bool bFastDeltaQP ); ///< analysis stage of slice 129 Void calCostSliceI ( TComPic* pcPic ); 130 Void encodeSlice ( TComPic* pcPic, TComOutputBitstream* pcSubstreams, UInt &numBinsCoded ); 131 132 132 // misc. functions 133 133 Void setSearchRange ( TComSlice* pcSlice ); ///< set ME range adaptively 134 UInt64 getTotalBits () { return m_uiPicTotalBits; } 135 134 136 135 TEncCu* getCUEncoder() { return m_pcCuEncoder; } ///< CU encoder 137 Void xDetermineStartAndBoundingC UAddr ( UInt& uiStartCUAddr, UInt& uiBoundingCUAddr, TComPic*& rpcPic, Bool bEncodeSlice);136 Void xDetermineStartAndBoundingCtuTsAddr ( UInt& startCtuTsAddr, UInt& boundingCtuTsAddr, TComPic* pcPic ); 138 137 UInt getSliceIdx() { return m_uiSliceIdx; } 139 138 Void setSliceIdx(UInt i) { m_uiSliceIdx = i; } 140 Void initCtxMem( UInt i ); 141 Void setCtxMem( TEncSbac* sb, Int b ) { CTXMem[b] = sb;}139 140 SliceType getEncCABACTableIdx() const { return m_encCABACTableIdx; } 142 141 143 142 private:
Note: See TracChangeset for help on using the changeset viewer.