Changeset 56 in 3DVCSoftware for trunk/source/Lib/TLibCommon/TComPic.h


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

updated trunk (move to HM6.1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComPic.h

    r21 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.
    5  *
    6  * Copyright (c) 2010-2011, ISO/IEC
     4 * granted under this license. 
     5 *
     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     TComPic.h
    3735    \brief    picture class (header)
     
    4644#include "TComPicYuv.h"
    4745#include "TComBitStream.h"
    48 #include "TComMVDRefData.h"
     46
     47//! \ingroup TLibCommon
     48//! \{
    4949
    5050class SEImessages;
     
    5858{
    5959private:
     60  UInt                  m_uiTLayer;               //  Temporal layer
     61  Bool                  m_bUsedByCurr;            //  Used by current picture
     62  Bool                  m_bIsLongTerm;            //  IS long term picture
    6063  TComPicSym*           m_apcPicSym;              //  Symbol
    61 
     64 
    6265  TComPicYuv*           m_apcPicYuv[2];           //  Texture,  0:org / 1:rec
     66 
    6367#if DEPTH_MAP_GENERATION
    6468  TComPicYuv*           m_pcPredDepthMap;         //  estimated depth map
    6569#endif
     70
    6671#if HHI_INTER_VIEW_MOTION_PRED
    6772  TComPicYuv*           m_pcOrgDepthMap;          //  original depth map
     
    7378  TComPicYuv*           m_pcPicYuvPred;           //  Prediction
    7479  TComPicYuv*           m_pcPicYuvResi;           //  Residual
    75 #if PARALLEL_MERGED_DEBLK
    76   TComPicYuv*           m_pcPicYuvDeblkBuf;
    77 #endif
    7880  Bool                  m_bReconstructed;
     81  Bool                  m_bNeededForOutput;
    7982  UInt                  m_uiCurrSliceIdx;         // Index of current slice
    8083
     84  Bool                  m_usedForTMVP;
     85 
     86  Int*                  m_pSliceSUMap;
     87  Bool*                 m_pbValidSlice;
     88  Int                   m_sliceGranularityForNDBFilter;
     89  Bool                  m_bIndependentSliceBoundaryForNDBFilter;
     90  Bool                  m_bIndependentTileBoundaryForNDBFilter;
     91  TComPicYuv*           m_pNDBFilterYuvTmp;    //!< temporary picture buffer when non-cross slice/tile boundary in-loop filtering is enabled
     92  std::vector<std::vector<TComDataCU*> > m_vSliceCUDataLink;
     93
    8194  SEImessages* m_SEIs; ///< Any SEI messages that have been received.  If !NULL we own the object.
    82 
    83   SliceType             m_eSliceType;
    84   double                m_dQP;
    85   Bool                  m_bReferenced;
    86   UInt                  m_uiColDir;
    87   Int                   m_aiRefPOCList[2][MAX_NUM_REF];
    88   Int                   m_aiRefViewIdxList[2][MAX_NUM_REF];
    89   Int                   m_aiNumRefIdx[2];    //  for multiple reference of current slice
    90 
    91   Int                   m_iViewIdx;
     95#if HHI_INTERVIEW_SKIP
     96  TComPicYuv*           m_pcUsedPelsMap;
     97#endif
    9298#if SONY_COLPIC_AVAILABILITY
    9399  Int                   m_iViewOrderIdx;
     
    95101  Int**                 m_aaiCodedScale;
    96102  Int**                 m_aaiCodedOffset;
    97 
    98 #if HHI_VSO 
    99   TComMVDRefData        m_cReferenceInfo;
    100 #endif
    101 #if HHI_INTERVIEW_SKIP
    102   TComPicYuv*           m_pcUsedPelsMap;
    103 #endif
    104 
    105103
    106104public:
    107105  TComPic();
    108106  virtual ~TComPic();
    109 
    110 
    111   Void          create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth );
    112   Void          destroy();
     107 
     108  Void          create( Int iWidth, Int iHeight, UInt uiMaxWidth, UInt uiMaxHeight, UInt uiMaxDepth, Bool bIsVirtual = false );
     109  virtual Void  destroy();
     110 
     111  UInt          getTLayer()                { return m_uiTLayer;   }
     112  Void          setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; }
     113
     114  Bool          getUsedByCurr()             { return m_bUsedByCurr; }
     115  Void          setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; }
     116  Bool          getIsLongTerm()             { return m_bIsLongTerm; }
     117  Void          setIsLongTerm( Bool lt ) { m_bIsLongTerm = lt; }
    113118
    114119  TComPicSym*   getPicSym()           { return  m_apcPicSym;    }
     
    117122  TComSPS*      getSPS()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getSPS();  }
    118123  Int           getPOC()              { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getPOC();  }
    119 #if 0
    120   Bool          getDRBFlag()          { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getDRBFlag();  }
    121   Int           getERBIndex()         { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getERBIndex();  }
    122 #endif
     124  Int           getViewId()           { return  m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getViewId(); }
    123125  TComDataCU*&  getCU( UInt uiCUAddr )  { return  m_apcPicSym->getCU( uiCUAddr ); }
    124 
    125   SliceType     getSliceType()        { return m_eSliceType ;}
    126   double        getQP()               { return m_dQP ;}
    127   Bool          getReferenced()       { return m_bReferenced ;}
    128 
     126 
    129127  TComPicYuv*   getPicYuvOrg()        { return  m_apcPicYuv[0]; }
    130128  TComPicYuv*   getPicYuvRec()        { return  m_apcPicYuv[1]; }
    131 
    132 #if DEPTH_MAP_GENERATION
    133   TComPicYuv*   getPredDepthMap()     { return  m_pcPredDepthMap; }
    134 #endif
    135 #if HHI_INTER_VIEW_MOTION_PRED
    136   TComPicYuv*   getOrgDepthMap()      { return  m_pcOrgDepthMap; }
    137 #endif
    138 #if HHI_INTER_VIEW_RESIDUAL_PRED
    139   TComPicYuv*   getResidual()         { return  m_pcResidual; }
    140 #endif
    141 
    142129#if HHI_INTERVIEW_SKIP
    143130  TComPicYuv*   getUsedPelsMap()      { return  m_pcUsedPelsMap; }
    144131#endif
    145 
     132 
     133#if DEPTH_MAP_GENERATION
     134  TComPicYuv*   getPredDepthMap()     { return  m_pcPredDepthMap; }
     135#endif
     136
     137#if HHI_INTER_VIEW_MOTION_PRED
     138  TComPicYuv*   getOrgDepthMap()      { return  m_pcOrgDepthMap; }
     139#endif
     140
     141#if HHI_INTER_VIEW_RESIDUAL_PRED
     142  TComPicYuv*   getResidual()         { return  m_pcResidual; }
     143#endif
     144
     145#if SONY_COLPIC_AVAILABILITY
     146  Void          setViewOrderIdx(Int i)                        { m_iViewOrderIdx = i; }
     147  Int           getViewOrderIdx()                             { return m_iViewOrderIdx; }
     148#endif
     149  Void          setScaleOffset( Int** pS, Int** pO )  { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; }
     150  Int**         getCodedScale ()                      { return m_aaiCodedScale;  }
     151  Int**         getCodedOffset()                      { return m_aaiCodedOffset; }
    146152
    147153  TComPicYuv*   getPicYuvPred()       { return  m_pcPicYuvPred; }
     
    149155  Void          setPicYuvPred( TComPicYuv* pcPicYuv )       { m_pcPicYuvPred = pcPicYuv; }
    150156  Void          setPicYuvResi( TComPicYuv* pcPicYuv )       { m_pcPicYuvResi = pcPicYuv; }
    151   Void          setQP( double dQP )   { m_dQP = dQP; }
    152   Void          setSliceType( SliceType eSliceType ) { m_eSliceType = eSliceType; }
    153   Void          setReferenced( Bool bReferenced )    { m_bReferenced = bReferenced; }
    154   Void          setColDir( UInt uiColDir )           { m_uiColDir = uiColDir; }
    155   UInt          getColDir()                          { return m_uiColDir; }
    156   Void          setRefPOC( Int i, RefPicList e, Int iRefIdx ) { m_aiRefPOCList[e][iRefIdx] = i; }
    157   Int           getRefPOC( RefPicList e, Int iRefIdx )        { return m_aiRefPOCList[e][iRefIdx]; }
    158   Void          setRefViewIdx( Int i, RefPicList e, Int iRefIdx ) { m_aiRefViewIdxList[e][iRefIdx] = i; }
    159   Int           getRefViewIdx( RefPicList e, Int iRefIdx )        { return m_aiRefViewIdxList[e][iRefIdx]; }
    160   Int           getNumRefs( RefPicList e )                    { return m_aiNumRefIdx[e]; }
    161   Void          setNumRefs( Int i, RefPicList e )             { m_aiNumRefIdx[e] = i; }
    162   Void          setViewIdx( Int i )                           { m_iViewIdx = i; }
    163   Int           getViewIdx()                                  { return m_iViewIdx; }
    164 #if SONY_COLPIC_AVAILABILITY
    165   Void          setViewOrderIdx(Int i)                        { m_iViewOrderIdx = i; }
    166   Int           getViewOrderIdx()                             { return m_iViewOrderIdx; }
    167 #endif
    168 
    169   Void          setScaleOffset( Int** pS, Int** pO )  { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; }
    170   Int**         getCodedScale ()                      { return m_aaiCodedScale;  }
    171   Int**         getCodedOffset()                      { return m_aaiCodedOffset; }
    172 
    173 #if HHI_VSO
    174   TComMVDRefData* getMVDReferenceInfo() { return &m_cReferenceInfo; }
    175 #endif
    176 
     157 
    177158  UInt          getNumCUsInFrame()      { return m_apcPicSym->getNumberOfCUsInFrame(); }
    178159  UInt          getNumPartInWidth()     { return m_apcPicSym->getNumPartInWidth();     }
     
    183164  UInt          getMinCUWidth()         { return m_apcPicSym->getMinCUWidth();         }
    184165  UInt          getMinCUHeight()        { return m_apcPicSym->getMinCUHeight();        }
    185 
     166 
    186167  UInt          getParPelX(UChar uhPartIdx) { return getParPelX(uhPartIdx); }
    187168  UInt          getParPelY(UChar uhPartIdx) { return getParPelX(uhPartIdx); }
    188 
     169 
    189170  Int           getStride()           { return m_apcPicYuv[1]->getStride(); }
    190171  Int           getCStride()          { return m_apcPicYuv[1]->getCStride(); }
    191 
     172 
    192173  Void          setReconMark (Bool b) { m_bReconstructed = b;     }
    193174  Bool          getReconMark ()       { return m_bReconstructed;  }
    194175
    195 #if AMVP_BUFFERCOMPRESS
    196   Void          compressMotion();
    197 #endif
     176  Void          setUsedForTMVP( Bool b ) { m_usedForTMVP = b;    }
     177  Bool          getUsedForTMVP()         { return m_usedForTMVP; }
     178
     179  Void          setOutputMark (Bool b) { m_bNeededForOutput = b;     }
     180  Bool          getOutputMark ()       { return m_bNeededForOutput;  }
     181 
     182  Void          compressMotion();
    198183  UInt          getCurrSliceIdx()            { return m_uiCurrSliceIdx;                }
    199184  Void          setCurrSliceIdx(UInt i)      { m_uiCurrSliceIdx = i;                   }
     
    201186  Void          allocateNewSlice()           {m_apcPicSym->allocateNewSlice();         }
    202187  Void          clearSliceBuffer()           {m_apcPicSym->clearSliceBuffer();         }
    203 
    204   Void          addOriginalBuffer       ();
    205 #if PARALLEL_MERGED_DEBLK
    206   Void          addDeblockBuffer        ();
    207 #endif
    208 #if DEPTH_MAP_GENERATION
    209   Void          addPrdDepthMapBuffer    ( UInt uiSubSampExpX, UInt uiSubSampExpY );
    210 #endif
    211 #if HHI_INTER_VIEW_MOTION_PRED
    212   Void          addOrgDepthMapBuffer    ();
    213 #endif
    214 #if HHI_INTER_VIEW_RESIDUAL_PRED
    215   Void          addResidualBuffer       ();
    216 #endif
    217 
    218188#if HHI_INTERVIEW_SKIP
    219189  Void          addUsedPelsMapBuffer    ();
    220 #endif
    221 
    222   Void          removeOriginalBuffer    ();
    223 #if PARALLEL_MERGED_DEBLK
    224   Void          removeDeblockBuffer     ();
     190  Void          removeUsedPelsMapBuffer ();
     191#endif
     192 
     193  Void          createNonDBFilterInfo   (UInt* pSliceStartAddress = NULL, Int numSlices = 1, Int sliceGranularityDepth= 0
     194                                        ,Bool bNDBFilterCrossSliceBoundary = true
     195                                        ,Int  numTiles = 1
     196                                        ,Bool bNDBFilterCrossTileBoundary = true);
     197  Void          createNonDBFilterInfoLCU(Int tileID, Int sliceID, TComDataCU* pcCU, UInt startSU, UInt endSU, Int sliceGranularyDepth, UInt picWidth, UInt picHeight);
     198  Void          destroyNonDBFilterInfo();
     199
     200#if DEPTH_MAP_GENERATION
     201  Void          addPrdDepthMapBuffer    ( UInt uiSubSampExpX, UInt uiSubSampExpY );
     202#endif
     203#if HHI_INTER_VIEW_MOTION_PRED
     204  Void          addOrgDepthMapBuffer    ();
     205#endif
     206#if HHI_INTER_VIEW_RESIDUAL_PRED
     207  Void          addResidualBuffer       ();
    225208#endif
    226209#if DEPTH_MAP_GENERATION
     
    233216  Void          removeResidualBuffer    ();
    234217#endif
    235 #if HHI_INTERVIEW_SKIP
    236   Void          removeUsedPelsMapBuffer ();
    237 #endif
    238 
    239 #if PARALLEL_MERGED_DEBLK
    240   TComPicYuv*   getPicYuvDeblkBuf()      { return  m_pcPicYuvDeblkBuf; }
    241 #endif
    242 
    243   /** transfer ownership of @seis to @this picture */
     218  Bool          getValidSlice                                  (Int sliceID)  {return m_pbValidSlice[sliceID];}
     219  Int           getSliceGranularityForNDBFilter                ()             {return m_sliceGranularityForNDBFilter;}
     220  Bool          getIndependentSliceBoundaryForNDBFilter        ()             {return m_bIndependentSliceBoundaryForNDBFilter;}
     221  Bool          getIndependentTileBoundaryForNDBFilter         ()             {return m_bIndependentTileBoundaryForNDBFilter; }
     222  TComPicYuv*   getYuvPicBufferForIndependentBoundaryProcessing()             {return m_pNDBFilterYuvTmp;}
     223  std::vector<TComDataCU*>& getOneSliceCUDataForNDBFilter      (Int sliceID) { return m_vSliceCUDataLink[sliceID];}
     224
     225  /** transfer ownership of seis to this picture */
    244226  void setSEIs(SEImessages* seis) { m_SEIs = seis; }
    245227
    246228  /**
    247229   * return the current list of SEI messages associated with this picture.
    248    * Pointer is valid until @this->destroy() is called */
     230   * Pointer is valid until this->destroy() is called */
    249231  SEImessages* getSEIs() { return m_SEIs; }
    250232
    251233  /**
    252234   * return the current list of SEI messages associated with this picture.
    253    * Pointer is valid until @this->destroy() is called */
     235   * Pointer is valid until this->destroy() is called */
    254236  const SEImessages* getSEIs() const { return m_SEIs; }
    255237
    256238};// END CLASS DEFINITION TComPic
    257239
     240//! \}
    258241
    259242#endif // __TCOMPIC__
    260 
Note: See TracChangeset for help on using the changeset viewer.