Changeset 56 in 3DVCSoftware for trunk/source/App/TAppEncoder/TAppEncTop.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/App/TAppEncoder/TAppEncTop.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 
    3634/** \file     TAppEncTop.h
    3735    \brief    Encoder application class (header)
     
    4139#define __TAPPENCTOP__
    4240
    43 #include "../../Lib/TLibEncoder/TEncTop.h"
    44 #include "../../Lib/TLibVideoIO/TVideoIOYuv.h"
    45 #include "../../Lib/TLibVideoIO/TVideoIOBits.h"
    46 #include "../../Lib/TLibCommon/TComBitStream.h"
    47 #include "../../Lib/TLibCommon/TComDepthMapGenerator.h"
     41#include <list>
     42#include <ostream>
     43
     44#include "TLibEncoder/TEncTop.h"
     45#include "TLibVideoIO/TVideoIOYuv.h"
     46#include "TLibCommon/AccessUnit.h"
    4847#include "TAppEncCfg.h"
    49 //GT VSO
     48#include "TLibCommon/TComDepthMapGenerator.h"
     49#if HHI_VSO || HHI_INTERVIEW_SKIP
    5050#include "../../Lib/TLibRenderer/TRenTop.h"
    51 //GT VSO end
     51#endif
     52
     53//! \ingroup TAppEncoder
     54//! \{
    5255
    5356// ====================================================================================================================
     
    6063private:
    6164  // class interface
     65  std::vector<TEncTop*>                           m_acTEncTopList ;
     66  std::vector<TEncTop*>                           m_acTEncDepthTopList ;
     67  std::vector<TVideoIOYuv*>             m_acTVideoIOYuvInputFileList;  ///< input YUV file
     68  std::vector<TVideoIOYuv*>  m_acTVideoIOYuvDepthInputFileList;
     69  std::vector<TVideoIOYuv*>             m_acTVideoIOYuvReconFileList;  ///< output reconstruction file
     70  std::vector<TVideoIOYuv*>  m_acTVideoIOYuvDepthReconFileList;
    6271
    63   std::vector<TEncTop*>                          m_acTEncTopList ;
    64   std::vector<TEncTop*>        m_acTEncDepthTopList ;
    65   std::vector<TVideoIOYuv*>              m_acTVideoIOYuvInputFileList;
    66   std::vector<TVideoIOYuv*>    m_acTVideoIOYuvDepthInputFileList;
    67   std::vector<TVideoIOYuv*>              m_acTVideoIOYuvReconFileList;
    68   std::vector<TVideoIOYuv*>    m_acTVideoIOYuvDepthReconFileList;
     72  std::vector< TComList<TComPicYuv*>* >  m_picYuvRec;       ///< list of reconstruction YUV files
     73  std::vector< TComList<TComPicYuv*>* >  m_picYuvDepthRec;         
    6974
    70   TVideoIOBitsStartCode      m_cTVideoIOBitsFile;           ///< output bitstream file
    71  
    72   std::vector< TComList<TComPicYuv*>* >  m_cListPicYuvRecList;              ///< list of reconstruction YUV files
    73   std::vector< TComList<TComPicYuv*>* >  m_cListPicYuvDepthRecList;         ///< list of reconstruction YUV files
    74   std::vector<PicOrderCnt> m_aiNextPocToDump;
    75   std::vector<PicOrderCnt> m_aiNextDepthPocToDump;
    76   std::vector< std::map<PicOrderCnt, TComPicYuv*> > m_cListPicYuvRecMap;
    77   std::vector< std::map<PicOrderCnt, TComPicYuv*> > m_cListPicYuvDepthRecMap;
     75  std::vector<Int>              m_frameRcvd;                  ///< number of received frames
     76  std::vector<Int>              m_depthFrameRcvd;   
    7877
    79   TComList<TComBitstream*>   m_cListBitstream;              ///< list of bitstreams
    80  
    81   std::vector<Int>              m_iFrameRcvdVector;                  ///< number of received frames
    82   std::vector<Int>            m_iDepthFrameRcvdVector;             ///< number of received frames
     78  unsigned                   m_essentialBytes;
     79  unsigned                   m_totalBytes;
    8380
    8481#if DEPTH_MAP_GENERATION
     
    8683  TComAUPicAccess             m_cAUPicAccess;
    8784#endif
    88  
     85
    8986#if HHI_VSO
    9087  TRenTop                     m_cRendererTop;
     
    9289#endif
    9390
     91#if HHI_INTERVIEW_SKIP
     92  TRenTop  m_cUsedPelsRenderer;                               ///< renderer for used pels map
     93#endif
    9494protected:
    9595  // initialization
     
    100100 
    101101  /// obtain required buffers
    102   Void  xGetBuffer        ( TComPicYuv*& rpcPicYuvRec,                  //GT: unused?
    103                            TComBitstream*& rpcBitStream );
     102  Void xGetBuffer(TComPicYuv*& rpcPicYuvRec, Int iViewIdx, Bool isDepth);
    104103 
    105   Void  xGetBuffer        ( TComPicYuv*& rpcPicYuvRec, Int iViewIdx, std::vector< TComList<TComPicYuv*>*>& racBuffer  );
    106 
    107104  /// delete allocated buffers
    108105  Void  xDeleteBuffer     ();
    109106 
    110107  // file I/O
    111   Void  xWriteOutput      ( Int iViewIdx, Bool isDepth = false );              ///< write bitstream to file
    112 
    113 
    114   // util 
    115   TComPic*    xGetPicFromView   ( Int iViewIdx, Int iPoc, Bool bDepth );
     108  Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, std::list<AccessUnit>& accessUnits, Int iViewIdx, Bool isDepth); ///< write bitstream to file
     109  void rateStatsAccum(const AccessUnit& au, const std::vector<unsigned>& stats);
     110  // void printRateSummary();
     111 
     112  TComPic* xGetPicFromView( Int viewId, Int iPoc, Bool isDepth );
    116113  TComPicYuv* xGetPicYuvFromView( Int iViewIdx, Int iPoc, Bool bDepth, Bool bRecon );
    117 
    118 
    119   // Ref Data
    120 #if HHI_VSO
    121   Void  xSetBaseLUT   ( Int iViewIdxSource, Int iViewIdxTarget, TComMVDRefData* pcRefInfo, InterViewReference eView );
    122   Void  xSetBasePicYuv( Int iViewIdx, Int iPoc, TComMVDRefData* pcRefInfo, InterViewReference eView, bool bDepth ); ///< store pics from buffers in pcRefInfo
    123 #endif
    124114 
    125115public:
     
    128118 
    129119  Void        encode      ();                               ///< main encoding function
     120  TEncTop*    getTEncTop( Int viewId, Bool isDepth );   
     121
     122  std::vector<TComPic*> getInterViewRefPics( Int viewId, Int poc, Bool isDepth, TComSPS* sps );
     123  TComPic*              getPicFromView     ( Int viewId, Int poc, Bool isDepth ) { return xGetPicFromView( viewId, poc, isDepth ); }
     124  TComPicYuv*           getPicYuvFromView  ( Int iViewIdx, Int iPoc, bool bDepth, Bool bRecon ) { return xGetPicYuvFromView( iViewIdx, iPoc, bDepth, bRecon ); }
     125
     126#if HHI_INTERVIEW_SKIP
     127  Void                  getUsedPelsMap   ( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedPelsMap );
     128#endif
    130129#if HHI_VSO
    131130  Void                  setupRenModel    ( Int iPoc, Int iEncViewIdx, Int iEncContent );
    132   Void                  setMVDPic        ( Int iViewIdx, Int iPoc, TComMVDRefData* pcReferenceInfo ); // set MultiView References
    133131#endif
    134   Void                  getUsedPelsMap   ( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedPelsMap );
    135   std::vector<TComPic*> getSpatialRefPics( Int iViewIdx, Int iPoc, Bool bIsDepthCoder );              // only for mvc functionality yet
    136   TComPic*              getPicFromView   ( Int iViewIdx, Int iPoc, Bool bDepth ) { return xGetPicFromView( iViewIdx, iPoc, bDepth ); }
    137 
    138 #if HHI_VSO
    139   TRenModel* getRenModel    () { return  &m_cRendererModel ; };
    140 #endif
    141 
     132 
    142133#if DEPTH_MAP_GENERATION
    143134  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
     
    146137
    147138#if HHI_VSO
     139  TRenModel* getRenModel    () { return  &m_cRendererModel ; };
     140#endif
     141
     142#if HHI_VSO
    148143private:
    149   std::vector<TVideoIOYuv*>                            m_acTVideoIOYuvERFileList;
    150   std::map< Int, std::vector< TComPicYuv*> > m_cMapPicExtRefView;             /// Buffer for external Reference files
    151 
    152   Int                                        m_iLastFramePutInERViewBuffer;   ///< Poc of last frame put to ERView Buffer
    153   Void  xSetERPicYuvs(  Int iViewIdx, Int iPoc, TComMVDRefData* pcReferenceInfo );    ///< store pic from buffer in pcReferenceInfo   
    154144  Void  xStoreVSORefPicsInBuffer();                                                   ///< read in External Ref pic from file and store in buffer
    155145#endif
    156  
     146
    157147};// END CLASS DEFINITION TAppEncTop
     148
     149//! \}
    158150
    159151#endif // __TAPPENCTOP__
Note: See TracChangeset for help on using the changeset viewer.