Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncSlice.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/TEncSlice.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. 
     4 * granted under this license.
    55 *
    6 * Copyright (c) 2010-2015, ITU/ISO/IEC
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    6565  // encoder configuration
    6666  TEncCfg*                m_pcCfg;                              ///< encoder configuration class
    67  
     67
    6868  // pictures
    6969  TComList<TComPic*>*     m_pcListPic;                          ///< list of pictures
    7070  TComPicYuv*             m_apcPicYuvPred;                      ///< prediction picture buffer
    7171  TComPicYuv*             m_apcPicYuvResi;                      ///< residual picture buffer
    72  
     72
    7373  // processing units
    7474  TEncGOP*                m_pcGOPEncoder;                       ///< GOP encoder
    7575  TEncCu*                 m_pcCuEncoder;                        ///< CU encoder
    76  
     76
    7777  // encoder search
    7878  TEncSearch*             m_pcPredSearch;                       ///< encoder search class
    79  
     79
    8080  // coding tools
    8181  TEncEntropy*            m_pcEntropyCoder;                     ///< entropy encoder
    82   TEncCavlc*              m_pcCavlcCoder;                       ///< CAVLC encoder
    8382  TEncSbac*               m_pcSbacCoder;                        ///< SBAC encoder
    8483  TEncBinCABAC*           m_pcBinCABAC;                         ///< Bin encoder CABAC
    8584  TComTrQuant*            m_pcTrQuant;                          ///< transform & quantization
    86  
     85
    8786  // RD optimization
    88   TComBitCounter*         m_pcBitCounter;                       ///< bit counter
    8987  TComRdCost*             m_pcRdCost;                           ///< RD cost computation
    9088  TEncSbac***             m_pppcRDSbacCoder;                    ///< storage for SBAC-based RD optimization
    9189  TEncSbac*               m_pcRDGoOnSbacCoder;                  ///< go-on SBAC encoder
    9290  UInt64                  m_uiPicTotalBits;                     ///< total bits for the picture
    93 #if H_3D_VSO
     91#if NH_3D_VSO
    9492  Dist64                  m_uiPicDist;                          ///< total distortion for the picture
    9593#else
     
    10098  Double*                 m_pdRdPicQp;                          ///< array of picture QP candidates (double-type for lambda)
    10199  Int*                    m_piRdPicQp;                          ///< array of picture QP candidates (Int-type)
    102   TEncBinCABAC*           m_pcBufferBinCoderCABACs;       ///< line of bin coder CABAC
    103   TEncSbac*               m_pcBufferSbacCoders;                 ///< line to store temporary contexts
    104   TEncBinCABAC*           m_pcBufferLowLatBinCoderCABACs;       ///< dependent tiles: line of bin coder CABAC
    105   TEncSbac*               m_pcBufferLowLatSbacCoders;           ///< dependent tiles: line to store temporary contexts
    106100  TEncRateCtrl*           m_pcRateCtrl;                         ///< Rate control manager
    107101  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
    109109public:
    110110  TEncSlice();
    111111  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 );
    114114  Void    destroy             ();
    115115  Void    init                ( TEncTop* pcEncTop );
    116  
     116
    117117  /// preparation of slice encoding (reference marking, QP and lambda)
    118 #if H_MV
    119   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  );
    121121#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 );
    124124#endif
    125125  Void    resetQP             ( TComPic* pic, Int sliceQP, Double lambda );
    126126  // compress and encode slice
    127   Void    precompressSlice    ( TComPic*& rpcPic                                );      ///< precompress slice for multi-loop opt.
    128   Void    compressSlice       ( TComPic*& rpcPic                                );      ///< analysis stage of slice
    129   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
    132132  // misc. functions
    133133  Void    setSearchRange      ( TComSlice* pcSlice  );                                  ///< set ME range adaptively
    134   UInt64  getTotalBits        ()  { return m_uiPicTotalBits; }
    135  
     134
    136135  TEncCu*        getCUEncoder() { return m_pcCuEncoder; }                        ///< CU encoder
    137   Void    xDetermineStartAndBoundingCUAddr  ( UInt& uiStartCUAddr, UInt& uiBoundingCUAddr, TComPic*& rpcPic, Bool bEncodeSlice );
     136  Void    xDetermineStartAndBoundingCtuTsAddr  ( UInt& startCtuTsAddr, UInt& boundingCtuTsAddr, TComPic* pcPic );
    138137  UInt    getSliceIdx()         { return m_uiSliceIdx;                    }
    139138  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;        }
    142141
    143142private:
Note: See TracChangeset for help on using the changeset viewer.