Changeset 56 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncGOP.h


Ignore:
Timestamp:
11 May 2012, 21:20:17 (12 years ago)
Author:
hschwarz
Message:

updated trunk (move to HM6.1)

File:
1 edited

Legend:

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

    r5 r56  
    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-2011, ISO/IEC
     6 * Copyright (c) 2010-2012, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    1515 *    this list of conditions and the following disclaimer in the documentation
    1616 *    and/or other materials provided with the distribution.
    17  *  * Neither the name of the ISO/IEC nor the names of its contributors may
     17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
    1818 *    be used to endorse or promote products derived from this software without
    1919 *    specific prior written permission.
     
    3232 */
    3333
    34 
    35 
    36 /** \file     TEncPic.h
     34/** \file     TEncGOP.h
    3735    \brief    GOP encoder class (header)
    3836*/
    3937
    40 #ifndef __TEncPic__
    41 #define __TEncPic__
     38#ifndef __TENCGOP__
     39#define __TENCGOP__
     40
     41#include <list>
    4242
    4343#include <stdlib.h>
    4444
    45 #include "../TLibCommon/TComList.h"
    46 #include "../TLibCommon/TComPic.h"
    47 #include "../TLibCommon/TComBitStream.h"
    48 #include "../TLibCommon/TComBitCounter.h"
    49 #include "../TLibCommon/TComLoopFilter.h"
    50 #include "../TLibCommon/TComDepthMapGenerator.h"
    51 #include "../TLibCommon/TComResidualGenerator.h"
     45#include "TLibCommon/TComList.h"
     46#include "TLibCommon/TComPic.h"
     47#include "TLibCommon/TComBitCounter.h"
     48#include "TLibCommon/TComLoopFilter.h"
     49#include "TLibCommon/AccessUnit.h"
     50#include "TLibCommon/TComDepthMapGenerator.h"
     51#include "TLibCommon/TComResidualGenerator.h"
    5252#include "TEncAdaptiveLoopFilter.h"
     53#include "TEncSampleAdaptiveOffset.h"
    5354#include "TEncSlice.h"
    5455#include "TEncEntropy.h"
     
    5859#include "TEncAnalyze.h"
    5960
    60 #ifdef WEIGHT_PRED
    61 #include "WeightPredAnalysis.h"
    62 #endif
     61#include <vector>
    6362
    64 #if RVM_VCEGAM10
    65 #include <vector>
    66 #endif
     63//! \ingroup TLibEncoder
     64//! \{
    6765
    6866class TEncTop;
     
    7371
    7472/// GOP encoder class
    75 class TEncPic
     73class TEncGOP
    7674{
    7775private:
    7876  //  Data
    79   Int                     m_iHrchDepth;
     77  Bool                    m_bLongtermTestPictureHasBeenCoded;
     78  Bool                    m_bLongtermTestPictureHasBeenCoded2;
     79  Int                     m_iLastIDR;
     80  Int                     m_iGopSize;
     81  Int                     m_iNumPicCoded;
     82  Bool                    m_bFirst;
    8083 
    8184  //  Access channel
     
    9093  TEncBinCABAC*           m_pcBinCABAC;
    9194  TComLoopFilter*         m_pcLoopFilter;
     95 
    9296#if DEPTH_MAP_GENERATION
    9397  TComDepthMapGenerator*  m_pcDepthMapGenerator;
     
    96100  TComResidualGenerator*  m_pcResidualGenerator;
    97101#endif
    98  
     102  Int                     m_pocLastCoded;
     103
    99104  // Adaptive Loop filter
    100105  TEncAdaptiveLoopFilter* m_pcAdaptiveLoopFilter;
    101106  //--Adaptive Loop filter
    102 #if MTK_SAO
    103107  TEncSampleAdaptiveOffset*  m_pcSAO;
    104 #endif
    105108  TComBitCounter*         m_pcBitCounter;
     109  TComRdCost*             m_pcRdCost;                           ///< RD cost computation
     110  // indicate sequence first
     111  Bool                    m_bSeqFirst;
    106112 
    107   TComRdCost*             m_pcRdCost;                           ///< RD cost computation
    108  
    109 #if DCM_DECODING_REFRESH
    110113  // clean decoding refresh
    111114  Bool                    m_bRefreshPending;
    112   UInt                    m_uiPOCCDR;
    113 #endif
     115  Int                     m_pocCRA;
    114116  UInt*                   m_uiStoredStartCUAddrForEncodingSlice;
    115117  UInt*                   m_uiStoredStartCUAddrForEncodingEntropySlice;
    116118
    117 // #if MTK_NONCROSS_INLOOP_FILTER
    118 //   UInt                    m_uiILSliceCount;
    119 //   UInt*                   m_puiILSliceStartLCU;
    120 //   UInt*                   m_puiILSliceEndLCU;
    121 // #endif
    122 
    123 #if RVM_VCEGAM10
    124119  std::vector<Int> m_vRVM_RP;
    125 #endif
    126120
    127121public:
    128   TEncPic();
    129   virtual ~TEncPic();
     122  TEncGOP();
     123  virtual ~TEncGOP();
    130124 
    131125  Void  create      ( Int iWidth, Int iHeight, UInt iMaxCUWidth, UInt iMaxCUHeight );
     
    133127 
    134128  Void  init        ( TEncTop* pcTEncTop );
    135   Void compressPic( TComBitstream* pcBitstreamOut, TComPicYuv cPicOrg, TComPic* pcPic, TComPicYuv* pcPicYuvRecOut,
    136                  TComPic* pcOrgRefList[2][MAX_REF_PIC_NUM], Bool&  rbSeqFirst, TComList<TComPic*>& rcListPic  );
     129  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; }
     134  Int   getGOPSize()          { return  m_iGopSize;  }
     135 
    137136  TComList<TComPic*>*   getListPic()      { return m_pcListPic; }
    138137 
    139138  Void  preLoopFilterPicAll  ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits );
     139 
     140  TEncSlice*  getSliceEncoder()   { return m_pcSliceEncoder; }
     141  NalUnitType getNalUnitType( UInt uiPOCCurr );
     142  NalUnitType getNalUnitTypeBaseViewMvc( UInt uiPOCCurr );
     143  Void freeAPS     (TComAPS* pAPS, TComSPS* pSPS);
     144  Void allocAPS    (TComAPS* pAPS, TComSPS* pSPS);
     145protected:
     146  Void encodeAPS   (TComAPS* pcAPS, TComOutputBitstream& APSbs, TComSlice* pcSlice);            //!< encode APS syntax elements
     147  Void assignNewAPS(TComAPS& cAPS, Int apsID, std::vector<TComAPS>& vAPS, TComSlice* pcSlice);  //!< Assign APS object into APS container
     148 
    140149
     150protected:
     151  Void  xInitGOP          ( Int iPOC, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut );
     152  Void  xGetBuffer        ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, UInt uiPOCCurr );
    141153 
    142 protected:
    143 #if DCM_DECODING_REFRESH
    144   NalUnitType getNalUnitType( UInt uiPOCCurr );
    145 #endif
    146 
    147   Void  xCalculateAddPSNR ( TComPic* pcPic, TComPicYuv* pcPicD, UInt uiBits, Double dEncTime );
     154  Void  xCalculateAddPSNR ( TComPic* pcPic, TComPicYuv* pcPicD, const AccessUnit&, Double dEncTime );
    148155 
    149156  UInt64 xFindDistortionFrame (TComPicYuv* pcPic0, TComPicYuv* pcPic1);
    150157
    151 #if RVM_VCEGAM10
    152158  Double xCalculateRVM();
    153 #endif
    154 };// END CLASS DEFINITION TEncPic
    155159
     160  Void  xSetRefPicListModificationsMvc( TComSlice* pcSlice, UInt uiPOCCurr, UInt iGOPid );
     161};// END CLASS DEFINITION TEncGOP
    156162
    157 #endif // __TEncPic__
     163// ====================================================================================================================
     164// Enumeration
     165// ====================================================================================================================
     166enum PROCESSING_STATE
     167{
     168  EXECUTE_INLOOPFILTER,
     169  ENCODE_APS,
     170  ENCODE_SLICE
     171};
    158172
     173enum SCALING_LIST_PARAMETER
     174{
     175  SCALING_LIST_OFF,
     176  SCALING_LIST_DEFAULT,
     177  SCALING_LIST_FILE_READ
     178};
     179
     180//! \}
     181
     182#endif // __TENCGOP__
     183
Note: See TracChangeset for help on using the changeset viewer.