source: 3DVCSoftware/branches/HTM-6.2-dev1-LG/source/Lib/TLibEncoder/TEncTop.cpp @ 408

Last change on this file since 408 was 408, checked in by lg, 12 years ago

D0135->D0092->D0091

  • Property svn:eol-style set to native
File size: 33.3 KB
Line 
1/* The copyright in this software is being made available under the BSD
2 * License, included below. This software may be subject to other third party
3 * and contributor rights, including patent rights, and no such rights are
4 * granted under this license. 
5 *
6 * Copyright (c) 2010-2012, ITU/ISO/IEC
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright notice,
13 *    this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above copyright notice,
15 *    this list of conditions and the following disclaimer in the documentation
16 *    and/or other materials provided with the distribution.
17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18 *    be used to endorse or promote products derived from this software without
19 *    specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34/** \file     TEncTop.cpp
35    \brief    encoder class
36*/
37
38#include "TLibCommon/CommonDef.h"
39#include "TEncTop.h"
40#include "TEncPic.h"
41#include "../../App/TAppEncoder/TAppEncTop.h"
42#if FAST_BIT_EST
43#include "TLibCommon/ContextModel.h"
44#endif
45
46//! \ingroup TLibEncoder
47//! \{
48
49// ====================================================================================================================
50// Constructor / destructor / create / destroy
51// ====================================================================================================================
52
53TEncTop::TEncTop()
54{
55  m_iPOCLast          = -1;
56  m_iNumPicRcvd       =  0;
57  m_uiNumAllPicCoded  =  0;
58  m_pppcRDSbacCoder   =  NULL;
59  m_pppcBinCoderCABAC =  NULL;
60  m_cRDGoOnSbacCoder.init( &m_cRDGoOnBinCoderCABAC );
61#if ENC_DEC_TRACE
62  g_hTrace = fopen( "TraceEnc.txt", "wb" );
63  g_bJustDoIt = g_bEncDecTraceDisable;
64  g_nSymbolCounter = 0;
65#endif
66
67  m_iMaxRefPicNum     = 0;
68
69#if FAST_BIT_EST
70  ContextModel::buildNextStateTable();
71#endif
72
73  m_pcSbacCoders           = NULL;
74  m_pcBinCoderCABACs       = NULL;
75  m_ppppcRDSbacCoders      = NULL;
76  m_ppppcBinCodersCABAC    = NULL;
77  m_pcRDGoOnSbacCoders     = NULL;
78  m_pcRDGoOnBinCodersCABAC = NULL;
79  m_pcBitCounters          = NULL;
80  m_pcRdCosts              = NULL;
81}
82
83TEncTop::~TEncTop()
84{
85#if ENC_DEC_TRACE
86  fclose( g_hTrace );
87#endif
88}
89
90Void TEncTop::create ()
91{
92  // initialize global variables
93  if( m_viewId == 0 && m_isDepth == false )
94  {
95    initROM();
96  }
97
98
99  // create processing unit classes
100  m_cGOPEncoder.        create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight );
101  m_cSliceEncoder.      create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
102  m_cCuEncoder.         create( g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight );
103  if (m_bUseSAO)
104  {
105#if LGE_SAO_MIGRATION_D0091
106    m_cEncSAO.setSaoLcuBoundary(getSaoLcuBoundary());
107    m_cEncSAO.setSaoLcuBasedOptimization(getSaoLcuBasedOptimization());
108#else
109    m_cEncSAO.setSaoInterleavingFlag(getSaoInterleavingFlag());
110#endif
111    m_cEncSAO.setMaxNumOffsetsPerPic(getMaxNumOffsetsPerPic());
112    m_cEncSAO.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
113    m_cEncSAO.createEncBuffer();
114  }
115#if ADAPTIVE_QP_SELECTION
116  if (m_bUseAdaptQpSelect)
117  {
118    m_cTrQuant.initSliceQpDelta();
119  }
120#endif
121  m_cAdaptiveLoopFilter.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
122  m_cLoopFilter.        create( g_uiMaxCUDepth );
123 
124#if DEPTH_MAP_GENERATION
125  m_cDepthMapGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement, PDM_SUB_SAMP_EXP_X(m_uiPredDepthMapGeneration), PDM_SUB_SAMP_EXP_Y(m_uiPredDepthMapGeneration) );
126#endif
127#if H3D_IVRP
128  m_cResidualGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
129#endif
130
131  if(m_bUseALF)
132  {
133    m_cAdaptiveLoopFilter.setAlfCoefInSlice(m_bALFParamInSlice);
134    m_cAdaptiveLoopFilter.createAlfGlobalBuffers();
135  }
136
137  if(m_bUseSAO || m_bUseALF)
138  {
139    m_vAPS.reserve(MAX_NUM_SUPPORTED_APS);
140  }
141
142  // if SBAC-based RD optimization is used
143  if( m_bUseSBACRD )
144  {
145    m_pppcRDSbacCoder = new TEncSbac** [g_uiMaxCUDepth+1];
146#if FAST_BIT_EST
147    m_pppcBinCoderCABAC = new TEncBinCABACCounter** [g_uiMaxCUDepth+1];
148#else
149    m_pppcBinCoderCABAC = new TEncBinCABAC** [g_uiMaxCUDepth+1];
150#endif
151   
152    for ( Int iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
153    {
154      m_pppcRDSbacCoder[iDepth] = new TEncSbac* [CI_NUM];
155#if FAST_BIT_EST
156      m_pppcBinCoderCABAC[iDepth] = new TEncBinCABACCounter* [CI_NUM];
157#else
158      m_pppcBinCoderCABAC[iDepth] = new TEncBinCABAC* [CI_NUM];
159#endif
160     
161      for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
162      {
163        m_pppcRDSbacCoder[iDepth][iCIIdx] = new TEncSbac;
164#if FAST_BIT_EST
165        m_pppcBinCoderCABAC [iDepth][iCIIdx] = new TEncBinCABACCounter;
166#else
167        m_pppcBinCoderCABAC [iDepth][iCIIdx] = new TEncBinCABAC;
168#endif
169        m_pppcRDSbacCoder   [iDepth][iCIIdx]->init( m_pppcBinCoderCABAC [iDepth][iCIIdx] );
170      }
171    }
172  }
173  m_pcTAppEncTop = NULL;
174#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
175  if( g_aacWedgeLists.empty() && m_bUseDMM )
176  {
177    initWedgeLists();
178  }
179#endif
180}
181
182/**
183 - Allocate coders required for wavefront for the nominated number of substreams.
184 .
185 \param iNumSubstreams Determines how much information to allocate.
186 */
187Void TEncTop::createWPPCoders(Int iNumSubstreams)
188{
189  if (m_pcSbacCoders != NULL)
190    return; // already generated.
191
192  m_iNumSubstreams         = iNumSubstreams;
193  m_pcSbacCoders           = new TEncSbac       [iNumSubstreams];
194  m_pcBinCoderCABACs       = new TEncBinCABAC   [iNumSubstreams];
195  m_pcRDGoOnSbacCoders     = new TEncSbac       [iNumSubstreams];
196  m_pcRDGoOnBinCodersCABAC = new TEncBinCABAC   [iNumSubstreams];
197  m_pcBitCounters          = new TComBitCounter [iNumSubstreams];
198  m_pcRdCosts              = new TComRdCost     [iNumSubstreams];
199
200  for ( UInt ui = 0 ; ui < iNumSubstreams; ui++ )
201  {
202    m_pcRDGoOnSbacCoders[ui].init( &m_pcRDGoOnBinCodersCABAC[ui] );
203    m_pcSbacCoders[ui].init( &m_pcBinCoderCABACs[ui] );
204  }
205  if( m_bUseSBACRD )
206  {
207    m_ppppcRDSbacCoders      = new TEncSbac***    [iNumSubstreams];
208    m_ppppcBinCodersCABAC    = new TEncBinCABAC***[iNumSubstreams];
209    for ( UInt ui = 0 ; ui < iNumSubstreams ; ui++ )
210    {
211      m_ppppcRDSbacCoders[ui]  = new TEncSbac** [g_uiMaxCUDepth+1];
212      m_ppppcBinCodersCABAC[ui]= new TEncBinCABAC** [g_uiMaxCUDepth+1];
213     
214      for ( Int iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
215      {
216        m_ppppcRDSbacCoders[ui][iDepth]  = new TEncSbac*     [CI_NUM];
217        m_ppppcBinCodersCABAC[ui][iDepth]= new TEncBinCABAC* [CI_NUM];
218
219        for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
220        {
221          m_ppppcRDSbacCoders  [ui][iDepth][iCIIdx] = new TEncSbac;
222          m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx] = new TEncBinCABAC;
223          m_ppppcRDSbacCoders  [ui][iDepth][iCIIdx]->init( m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx] );
224        }
225      }
226    }
227  }
228}
229
230Void TEncTop::destroy ()
231{
232  if(m_bUseALF)
233  {
234    m_cAdaptiveLoopFilter.destroyAlfGlobalBuffers();
235  }
236
237  for(Int i=0; i< m_vAPS.size(); i++)
238  {
239    TComAPS& cAPS = m_vAPS[i];
240    m_cGOPEncoder.freeAPS(&cAPS, &m_cSPS);
241  }
242
243  // destroy processing unit classes
244  m_cGOPEncoder.        destroy();
245  m_cSliceEncoder.      destroy();
246  m_cCuEncoder.         destroy();
247  if (m_cSPS.getUseSAO())
248  {
249    m_cEncSAO.destroy();
250    m_cEncSAO.destroyEncBuffer();
251  }
252  m_cAdaptiveLoopFilter.destroy();
253  m_cLoopFilter.        destroy();
254
255#if DEPTH_MAP_GENERATION
256  m_cDepthMapGenerator. destroy();
257#endif
258#if H3D_IVRP
259  m_cResidualGenerator. destroy();
260#endif
261
262  m_RPSList.            destroy();
263 
264  // SBAC RD
265  if( m_bUseSBACRD )
266  {
267    Int iDepth;
268    for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
269    {
270      for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
271      {
272        delete m_pppcRDSbacCoder[iDepth][iCIIdx];
273        delete m_pppcBinCoderCABAC[iDepth][iCIIdx];
274      }
275    }
276   
277    for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
278    {
279      delete [] m_pppcRDSbacCoder[iDepth];
280      delete [] m_pppcBinCoderCABAC[iDepth];
281    }
282   
283    delete [] m_pppcRDSbacCoder;
284    delete [] m_pppcBinCoderCABAC;
285
286    for ( UInt ui = 0; ui < m_iNumSubstreams; ui++ )
287    {
288      for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
289      {
290        for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ )
291        {
292          delete m_ppppcRDSbacCoders  [ui][iDepth][iCIIdx];
293          delete m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx];
294        }
295      }
296
297      for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ )
298      {
299        delete [] m_ppppcRDSbacCoders  [ui][iDepth];
300        delete [] m_ppppcBinCodersCABAC[ui][iDepth];
301      }
302      delete[] m_ppppcRDSbacCoders  [ui];
303      delete[] m_ppppcBinCodersCABAC[ui];
304    }
305    delete[] m_ppppcRDSbacCoders;
306    delete[] m_ppppcBinCodersCABAC;
307  }
308  delete[] m_pcSbacCoders;
309  delete[] m_pcBinCoderCABACs;
310  delete[] m_pcRDGoOnSbacCoders; 
311  delete[] m_pcRDGoOnBinCodersCABAC;
312  delete[] m_pcBitCounters;
313  delete[] m_pcRdCosts;
314 
315  // destroy ROM
316  if(m_viewId == 0 && m_isDepth == false)
317  {
318  destroyROM();
319  }
320 
321  return;
322}
323
324Void TEncTop::init( TAppEncTop* pcTAppEncTop )
325{
326  UInt *aTable4=NULL, *aTable8=NULL;
327  UInt* aTableLastPosVlcIndex=NULL; 
328  // initialize SPS
329  xInitSPS();
330 
331  // initialize PPS
332  m_cPPS.setSPS(&m_cSPS);
333  m_cSPS.setRPSList(&m_RPSList);
334  xInitPPS();
335  xInitRPS();
336
337  xInitSPSforInterViewRefs();
338  xInitPPSforTiles();
339
340  // initialize processing unit classes
341  m_cGOPEncoder.  init( this );
342  m_cSliceEncoder.init( this );
343  m_cCuEncoder.   init( this );
344 
345  m_pcTAppEncTop = pcTAppEncTop;
346
347#if DEPTH_MAP_GENERATION
348#if VIDYO_VPS_INTEGRATION
349  m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getVPSAccess(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() );
350#else
351  m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() );
352#endif
353#endif
354#if H3D_IVRP
355  m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
356#endif
357
358  // initialize transform & quantization class
359  m_pcCavlcCoder = getCavlcCoder();
360 
361  m_cTrQuant.init( g_uiMaxCUWidth, g_uiMaxCUHeight, 1 << m_uiQuadtreeTULog2MaxSize,
362                  0,
363                  aTable4, aTable8, 
364                  aTableLastPosVlcIndex, m_bUseRDOQ, true 
365#if ADAPTIVE_QP_SELECTION                 
366                  , m_bUseAdaptQpSelect
367#endif
368                  );
369 
370  // initialize encoder search class
371#if DV_V_RESTRICTION_B0037
372  m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_bUseDisparitySearchRangeRestriction, m_iVerticalDisparitySearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
373#else
374  m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() );
375#endif
376  if(m_bUseALF)
377  {
378    m_cAdaptiveLoopFilter.setALFEncodePassReduction( m_iALFEncodePassReduction );
379    m_cAdaptiveLoopFilter.setALFMaxNumberFilters( m_iALFMaxNumberFilters );
380    m_cAdaptiveLoopFilter.initPicQuadTreePartition(m_bALFPicBasedEncode );   
381  }
382
383  m_iMaxRefPicNum = 0;
384}
385
386// ====================================================================================================================
387// Public member functions
388// ====================================================================================================================
389
390Void TEncTop::initNewPic( TComPicYuv* pcPicYuvOrg, TComPicYuv* pcOrgPdmDepth )
391{
392  TComPic* pcPicCurr = NULL;
393
394  // get original YUV
395  xGetNewPicBuffer( pcPicCurr );
396  pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() );
397
398#if INTER_VIEW_VECTOR_SCALING_C0115
399  pcPicCurr->setViewOrderIdx(m_iViewOrderIdx);    // will be changed to view_id
400#endif
401  pcPicCurr->setScaleOffset( m_aaiCodedScale, m_aaiCodedOffset );
402
403#if H3D_IVMP
404  if( m_uiMultiviewMvRegMode )
405  {
406    AOF( pcOrgPdmDepth );
407    AOF( pcPicCurr->getOrgDepthMap() );
408    pcOrgPdmDepth->copyToPic( pcPicCurr->getOrgDepthMap() );
409  }
410  else
411  {
412    AOT( pcOrgPdmDepth );
413    AOT( pcPicCurr->getOrgDepthMap() );
414  }
415#endif
416
417#if DEPTH_MAP_GENERATION
418  // add extra pic buffers
419  Bool  bNeedPrdDepthMapBuf = ( m_uiPredDepthMapGeneration > 0 );
420  if( bNeedPrdDepthMapBuf && !pcPicCurr->getPredDepthMap() )
421  {
422    pcPicCurr->addPrdDepthMapBuffer( PDM_SUB_SAMP_EXP_X(m_uiPredDepthMapGeneration), PDM_SUB_SAMP_EXP_Y(m_uiPredDepthMapGeneration) );
423  }
424#endif
425
426  // compute image characteristics
427  if ( getUseAdaptiveQP() )
428  {
429    m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcPicCurr ) );
430  }
431}
432
433Void TEncTop::deletePicBuffer()
434{
435  TComList<TComPic*>::iterator iterPic = m_cListPic.begin();
436  Int iSize = Int( m_cListPic.size() );
437 
438  for ( Int i = 0; i < iSize; i++ )
439  {
440    TComPic* pcPic = *(iterPic++);
441   
442    pcPic->destroy();
443    delete pcPic;
444    pcPic = NULL;
445  }
446}
447
448/**
449 - Application has picture buffer list with size of GOP + 1
450 - Picture buffer list acts like as ring buffer
451 - End of the list has the latest picture
452 .
453 \param   bEos                true if end-of-sequence is reached
454 \param   pcPicYuvOrg         original YUV picture
455 \retval  rcListPicYuvRecOut  list of reconstruction YUV pictures
456 \retval  rcListBitstreamOut  list of output bitstreams
457 \retval  iNumEncoded         number of encoded pictures
458 */
459Void TEncTop::encode( bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded, Int gopId )
460{ 
461
462  if( gopId == 0)
463  {
464    m_cGOPEncoder.initGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut); 
465  }
466
467  {
468    m_cGOPEncoder.compressPicInGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, gopId );
469  }
470 
471  if( gopId + 1 == m_cGOPEncoder.getGOPSize() )
472  {
473    iNumEncoded         = m_iNumPicRcvd;
474    m_iNumPicRcvd       = 0;
475    m_uiNumAllPicCoded += iNumEncoded;
476  }
477}
478
479
480#if HHI_INTERVIEW_SKIP || H3D_IVMP || H3D_IVRP
481Void
482TEncTop::deleteExtraPicBuffers( Int iPoc )
483{
484  TComPic*                      pcPic = 0;
485  TComList<TComPic*>::iterator  cIter = m_cListPic.begin();
486  TComList<TComPic*>::iterator  cEnd  = m_cListPic.end  ();
487  for( ; cIter != cEnd; cIter++ )
488  {
489    if( (*cIter)->getPOC() == iPoc )
490    {
491      pcPic = *cIter;
492      break;
493    }
494  }
495  AOF( pcPic );
496  if ( pcPic )
497  {
498#if H3D_IVMP
499    pcPic->removeOrgDepthMapBuffer();
500#endif
501#if H3D_IVRP
502    pcPic->removeResidualBuffer   ();
503#endif
504#if HHI_INTERVIEW_SKIP
505    pcPic->removeUsedPelsMapBuffer();
506#endif
507  }
508}
509#endif
510
511Void
512TEncTop::compressMotion( Int iPoc )
513{
514  TComPic*                      pcPic = 0;
515  TComList<TComPic*>::iterator  cIter = m_cListPic.begin();
516  TComList<TComPic*>::iterator  cEnd  = m_cListPic.end  ();
517  for( ; cIter != cEnd; cIter++ )
518  {
519    if( (*cIter)->getPOC() == iPoc )
520    {
521      pcPic = *cIter;
522      break;
523    }
524  }
525  AOF( pcPic );
526  if ( pcPic )
527  {
528    pcPic->compressMotion();
529  }
530}
531
532// ====================================================================================================================
533// Protected member functions
534// ====================================================================================================================
535
536/**
537 - Application has picture buffer list with size of GOP + 1
538 - Picture buffer list acts like as ring buffer
539 - End of the list has the latest picture
540 .
541 \retval rpcPic obtained picture buffer
542 */
543Void TEncTop::xGetNewPicBuffer ( TComPic*& rpcPic )
544{
545  TComSlice::sortPicList(m_cListPic);
546 
547  if (m_cListPic.size() >= (UInt)(m_iGOPSize + getMaxDecPicBuffering(MAX_TLAYER-1) + 2) )
548  {
549    TComList<TComPic*>::iterator iterPic  = m_cListPic.begin();
550    Int iSize = Int( m_cListPic.size() );
551    for ( Int i = 0; i < iSize; i++ )
552    {
553      rpcPic = *(++iterPic);
554      if(rpcPic->getSlice(0)->isReferenced() == false)
555         break;
556    }
557  }
558  else
559  {
560        if ( getUseAdaptiveQP() )
561        {
562          TEncPic* pcEPic = new TEncPic;
563          pcEPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 );
564          rpcPic = pcEPic;
565        }
566        else
567        {
568          rpcPic = new TComPic;
569          rpcPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
570        }
571    m_cListPic.pushBack( rpcPic );
572  }
573#if HHI_INTERVIEW_SKIP
574  if( m_bInterViewSkip )
575  {
576    rpcPic->addUsedPelsMapBuffer();
577  }
578#endif
579  rpcPic->setReconMark (false);
580 
581  m_iPOCLast++;
582  m_iNumPicRcvd++;
583 
584#if H3D_IVMP
585  if( m_uiMultiviewMvRegMode )
586  {
587    rpcPic->addOrgDepthMapBuffer();
588  }
589#endif
590 
591  rpcPic->getSlice(0)->setPOC( m_iPOCLast );
592  // mark it should be extended
593  rpcPic->getPicYuvRec()->setBorderExtension(false);
594  rpcPic->getPicYuvOrg()->setBorderExtension(false); 
595}
596
597Void TEncTop::xInitSPS()
598{
599  m_cSPS.setPicWidthInLumaSamples         ( m_iSourceWidth      );
600  m_cSPS.setPicHeightInLumaSamples        ( m_iSourceHeight     );
601  m_cSPS.setPicCroppingFlag( m_croppingMode!= 0 );
602  if (m_croppingMode != 0)
603  {
604    m_cSPS.setPicCropLeftOffset( m_cropLeft );
605    m_cSPS.setPicCropRightOffset( m_cropRight );
606    m_cSPS.setPicCropTopOffset( m_cropTop );
607    m_cSPS.setPicCropBottomOffset( m_cropBottom );
608  }
609  m_cSPS.setMaxCUWidth    ( g_uiMaxCUWidth      );
610  m_cSPS.setMaxCUHeight   ( g_uiMaxCUHeight     );
611  m_cSPS.setMaxCUDepth    ( g_uiMaxCUDepth      );
612  m_cSPS.setMinTrDepth    ( 0                   );
613  m_cSPS.setMaxTrDepth    ( 1                   );
614 
615  m_cSPS.setPCMLog2MinSize (m_uiPCMLog2MinSize);
616  m_cSPS.setUsePCM        ( m_usePCM           );
617  m_cSPS.setPCMLog2MaxSize( m_pcmLog2MaxSize  );
618
619  m_cSPS.setUseALF        ( m_bUseALF           );
620  if(m_bUseALF)
621  {
622    m_cSPS.setUseALFCoefInSlice(m_bALFParamInSlice);
623  }
624 
625#if RWTH_SDC_DLT_B0036
626  m_cSPS.setUseDLT        ( m_bUseDLT );
627#endif
628 
629  m_cSPS.setQuadtreeTULog2MaxSize( m_uiQuadtreeTULog2MaxSize );
630  m_cSPS.setQuadtreeTULog2MinSize( m_uiQuadtreeTULog2MinSize );
631  m_cSPS.setQuadtreeTUMaxDepthInter( m_uiQuadtreeTUMaxDepthInter    );
632  m_cSPS.setQuadtreeTUMaxDepthIntra( m_uiQuadtreeTUMaxDepthIntra    );
633 
634#if LOSSLESS_CODING
635  m_cSPS.setUseLossless   ( m_useLossless  );
636#endif
637  m_cSPS.setUseLMChroma   ( m_bUseLMChroma           ); 
638 
639  m_cSPS.setMaxTrSize   ( 1 << m_uiQuadtreeTULog2MaxSize );
640 
641  m_cSPS.setUseLComb    ( m_bUseLComb           );
642  m_cSPS.setLCMod       ( m_bLCMod   );
643  m_cSPS.setUseNSQT( m_useNSQT );
644 
645  Int i;
646#if HHI_AMVP_OFF
647  for ( i = 0; i < g_uiMaxCUDepth; i++ )
648  {
649    m_cSPS.setAMVPMode( i, AM_NONE );
650  }
651#else
652  for ( i = 0; i < g_uiMaxCUDepth; i++ )
653  {
654    m_cSPS.setAMVPMode( i, AM_EXPL );
655  }
656#endif
657 
658  for (i = 0; i < g_uiMaxCUDepth-1; i++ )
659  {
660    m_cSPS.setAMPAcc( i, m_useAMP );
661    //m_cSPS.setAMPAcc( i, 1 );
662  }
663
664  m_cSPS.setUseAMP ( m_useAMP );
665
666  for (i = g_uiMaxCUDepth-1; i < g_uiMaxCUDepth; i++ )
667  {
668    m_cSPS.setAMPAcc(i, 0);
669  }
670
671  m_cSPS.setBitDepth    ( g_uiBitDepth        );
672  m_cSPS.setBitIncrement( g_uiBitIncrement    );
673  m_cSPS.setQpBDOffsetY ( (Int)(6*(g_uiBitDepth + g_uiBitIncrement - 8)) );
674  m_cSPS.setQpBDOffsetC ( (Int)(6*(g_uiBitDepth + g_uiBitIncrement - 8)) );
675
676  m_cSPS.setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag );
677  m_cSPS.setUseSAO( m_bUseSAO );
678
679  m_cSPS.setMaxTLayers( m_maxTempLayer );
680  m_cSPS.setTemporalIdNestingFlag( false );
681  for ( i = 0; i < m_cSPS.getMaxTLayers(); i++ )
682  {
683    m_cSPS.setMaxDecPicBuffering(m_maxDecPicBuffering[i], i);
684    m_cSPS.setNumReorderPics(m_numReorderPics[i], i);
685  }
686  m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma);
687  m_cSPS.setPCMBitDepthChroma (g_uiPCMBitDepthChroma);
688  m_cSPS.setPCMFilterDisableFlag  ( m_bPCMFilterDisableFlag );
689
690  m_cSPS.setLFCrossTileBoundaryFlag( m_bLFCrossTileBoundaryFlag );
691  m_cSPS.setUniformSpacingIdr( m_iUniformSpacingIdr );
692  m_cSPS.setNumColumnsMinus1( m_iNumColumnsMinus1 );
693  m_cSPS.setNumRowsMinus1( m_iNumRowsMinus1 );
694  if( m_iUniformSpacingIdr == 0 )
695  {
696    m_cSPS.setColumnWidth( m_puiColumnWidth );
697    m_cSPS.setRowHeight( m_puiRowHeight );
698  }
699  m_cSPS.setScalingListFlag ( (m_useScalingListId == 0) ? 0 : 1 );
700  m_cSPS.setUseDF( m_loopFilterOffsetInAPS );
701
702#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
703  m_cSPS.setUseDMM( m_bUseDMM );
704#endif
705
706#if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723
707  m_cSPS.setUseDMM34( m_bUseDMM34 );
708#endif
709
710#if H3D_QTL
711  m_cSPS.setUseQTLPC( m_bUseQTLPC );
712#endif
713#if HHI_MPI
714  m_cSPS.setUseMVI( m_bUseMVI );
715#endif
716
717
718#if MTK_D0156
719#if MERL_VSP_COMPENSATION_C0152
720  m_cSPS.setUseVSPCompensation           ( m_bUseVSPCompensation );
721#endif
722  m_cSPS.setUseDVPRefine                 ( m_bUseDVPRefine       );
723#endif
724
725  if( m_isDepth )
726  {
727#if FCO_FIX_SPS_CHANGE
728    m_cSPS.initMultiviewSPSDepth    ( m_viewId, m_iViewOrderIdx, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
729#else
730    m_cSPS.initMultiviewSPSDepth    ( m_viewId, m_iViewOrderIdx );
731#endif
732
733#if DEPTH_MAP_GENERATION
734    m_cSPS.setPredDepthMapGeneration( m_viewId, true );
735#endif
736#if H3D_IVRP
737    m_cSPS.setMultiviewResPredMode  ( 0 );
738#endif
739  }
740  else
741  {
742#if QC_MVHEVC_B0046
743    m_cSPS.initMultiviewSPS   ( m_viewId);
744#else
745    m_cSPS.initMultiviewSPS           ( m_viewId, m_iViewOrderIdx, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
746#endif
747    if( m_viewId )
748    {
749#if DEPTH_MAP_GENERATION
750#if H3D_IVMP
751      m_cSPS.setPredDepthMapGeneration( m_viewId, false, m_uiPredDepthMapGeneration, m_uiMultiviewMvPredMode, m_uiPdmPrecision, m_aaiPdmScaleNomDelta, m_aaiPdmOffset );
752#else
753      m_cSPS.setPredDepthMapGeneration( m_viewId, false, m_uiPredDepthMapGeneration, 0, m_uiPdmPrecision, m_aaiPdmScaleNomDelta, m_aaiPdmOffset );
754#endif
755#endif
756#if H3D_IVRP
757      m_cSPS.setMultiviewResPredMode  ( m_uiMultiviewResPredMode );
758#endif
759
760    }
761    else
762    {
763#if DEPTH_MAP_GENERATION
764      m_cSPS.setPredDepthMapGeneration( m_viewId, false );
765#endif
766#if H3D_IVRP
767      m_cSPS.setMultiviewResPredMode  ( 0 );
768#endif
769    }
770  }
771}
772
773Void TEncTop::xInitPPS()
774{
775  m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred );
776  m_cPPS.setSliceGranularity(m_iSliceGranularity);
777  Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false;
778
779#if LOSSLESS_CODING
780  Int lowestQP = - m_cSPS.getQpBDOffsetY();
781
782  if(getUseLossless())
783  {
784    if ((getMaxCuDQPDepth() == 0) && (getMaxDeltaQP() == 0 ) && (getQP() == lowestQP) )
785    {
786      bUseDQP = false;
787    }
788    else
789    {
790      bUseDQP = true;
791    }
792  }
793  else
794  {
795    if(bUseDQP == false)
796    {
797      if((getMaxDeltaQP() != 0 )|| getUseAdaptiveQP())
798      {
799        bUseDQP = true;
800      }
801    }
802  }
803
804#else
805  if(bUseDQP == false)
806  {
807    if((getMaxDeltaQP() != 0 )|| getUseAdaptiveQP())
808    {
809      bUseDQP = true;
810    }
811  }
812#endif
813
814  if(bUseDQP)
815  {
816    m_cPPS.setUseDQP(true);
817    m_cPPS.setMaxCuDQPDepth( m_iMaxCuDQPDepth );
818    m_cPPS.setMinCuDQPSize( m_cPPS.getSPS()->getMaxCUWidth() >> ( m_cPPS.getMaxCuDQPDepth()) );
819  }
820  else
821  {
822    m_cPPS.setUseDQP(false);
823    m_cPPS.setMaxCuDQPDepth( 0 );
824    m_cPPS.setMinCuDQPSize( m_cPPS.getSPS()->getMaxCUWidth() >> ( m_cPPS.getMaxCuDQPDepth()) );
825  }
826
827  m_cPPS.setChromaQpOffset   ( m_iChromaQpOffset    );
828  m_cPPS.setChromaQpOffset2nd( m_iChromaQpOffset2nd );
829
830  m_cPPS.setEntropyCodingMode( 1 ); // In the PPS now, but also remains in slice header!
831  m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams);
832  m_cPPS.setUseWP( m_bUseWeightPred );
833  m_cPPS.setWPBiPredIdc( m_uiBiPredIdc );
834  m_cPPS.setEnableTMVPFlag( m_bEnableTMVP );
835  m_cPPS.setOutputFlagPresentFlag( false );
836  m_cPPS.setSignHideFlag(getSignHideFlag());
837  m_cPPS.setTSIG(getTSIG());
838  m_cPPS.setDeblockingFilterControlPresent (m_DeblockingFilterControlPresent );
839  m_cPPS.setLog2ParallelMergeLevelMinus2      (LOG2_PARALLEL_MERGE_LEVEL_MINUS2);
840#if CABAC_INIT_FLAG
841  m_cPPS.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG);
842#endif
843}
844
845//Function for initializing m_RPSList, a list of TComReferencePictureSet, based on the GOPEntry objects read from the config file.
846Void TEncTop::xInitRPS()
847{
848  TComReferencePictureSet*      rps;
849 
850  m_RPSList.create(getGOPSize()+m_extraRPSs);
851  for( Int i = 0; i < getGOPSize()+m_extraRPSs; i++) 
852  {
853    GOPEntryMvc ge = getGOPEntry(i);
854    rps = m_RPSList.getReferencePictureSet(i);
855    rps->setNumberOfPictures(ge.m_numRefPics);
856    rps->setNumRefIdc(ge.m_numRefIdc);
857    Int numNeg = 0;
858    Int numPos = 0;
859    for( Int j = 0; j < ge.m_numRefPics; j++)
860    {
861      rps->setDeltaPOC(j,ge.m_referencePics[j]);
862      rps->setUsed(j,ge.m_usedByCurrPic[j]);
863      if(ge.m_referencePics[j]>0)
864      {
865        numPos++;
866      }
867      else
868      {
869        numNeg++;
870      }
871    }
872    rps->setNumberOfNegativePictures(numNeg);
873    rps->setNumberOfPositivePictures(numPos);
874    rps->setInterRPSPrediction(ge.m_interRPSPrediction);
875    if (ge.m_interRPSPrediction)
876    {
877      rps->setDeltaRIdxMinus1(ge.m_deltaRIdxMinus1);
878      rps->setDeltaRPS(ge.m_deltaRPS);
879      rps->setNumRefIdc(ge.m_numRefIdc);
880      for (Int j = 0; j < ge.m_numRefIdc; j++ )
881      {
882        rps->setRefIdc(j, ge.m_refIdc[j]);
883      }
884#if WRITE_BACK
885      // the folowing code overwrite the deltaPOC and Used by current values read from the config file with the ones
886      // computed from the RefIdc.  This is not necessary if both are identical. Currently there is no check to see if they are identical.
887      numNeg = 0;
888      numPos = 0;
889      TComReferencePictureSet*     RPSRef = m_RPSList.getReferencePictureSet(i-(ge.m_deltaRIdxMinus1+1));
890      for (Int j = 0; j < ge.m_numRefIdc; j++ )
891      {
892        if (ge.m_refIdc[j])
893        {
894          Int deltaPOC = ge.m_deltaRPS + ((j < RPSRef->getNumberOfPictures())? RPSRef->getDeltaPOC(j) : 0);
895          rps->setDeltaPOC((numNeg+numPos),deltaPOC);
896          rps->setUsed((numNeg+numPos),ge.m_refIdc[j]==1?1:0);
897          if (deltaPOC<0)
898          {
899            numNeg++;
900          }
901          else
902          {
903            numPos++;
904          }
905        }
906      }
907      rps->setNumberOfNegativePictures(numNeg);
908      rps->setNumberOfPositivePictures(numPos);
909      rps->sortDeltaPOC();
910#endif
911    }
912  }
913 
914}
915
916   // This is a function that
917   // determines what Reference Picture Set to use
918   // for a specific slice (with POC = POCCurr)
919Void TEncTop::selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid,TComList<TComPic*>& listPic )
920{
921#if QC_REM_IDV_B0046
922  if( (slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR ||slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && slice->getSPS()->getViewId() && POCCurr == 0 )
923#else
924  if( slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && POCCurr == 0 )
925#endif
926  {
927    TComReferencePictureSet* rps = slice->getLocalRPS();
928    rps->setNumberOfNegativePictures(0);
929    rps->setNumberOfPositivePictures(0);
930    rps->setNumberOfLongtermPictures(0);
931    rps->setNumberOfPictures(0);
932    slice->setRPS(rps);
933  }
934  else
935  {
936    slice->setRPSidx(GOPid);
937
938    for(Int extraNum=m_iGOPSize; extraNum<m_extraRPSs+m_iGOPSize; extraNum++)
939    {   
940      if(m_uiIntraPeriod > 0)
941      {
942        if(POCCurr%m_uiIntraPeriod==m_GOPList[extraNum].m_POC)
943        {
944          slice->setRPSidx(extraNum);
945        }
946      }
947      else
948      {
949        if(POCCurr==m_GOPList[extraNum].m_POC)
950        {
951          slice->setRPSidx(extraNum);
952        }
953      }
954    }
955
956    slice->setRPS(getRPSList()->getReferencePictureSet(slice->getRPSidx()));
957    slice->getRPS()->setNumberOfPictures(slice->getRPS()->getNumberOfNegativePictures()+slice->getRPS()->getNumberOfPositivePictures());
958  }
959}
960
961Void TEncTop::xInitSPSforInterViewRefs()
962{
963  // base view
964  if( getGOPEntry( MAX_GOP ).m_POC == -1 )
965  { 
966    m_cSPS.setNumberOfUsableInterViewRefs( 0 );
967    m_cSPS.setListsModificationPresentFlag( false );
968    return;
969  }
970
971  Int numberUsableInterViewRefs = 0;
972  for( Int i = 0; i < getGOPSize()+1 && numberUsableInterViewRefs < MAX_VIEW_NUM; i++ ) 
973  {
974    GOPEntryMvc ge = ( i < getGOPSize() ) ? getGOPEntry( i ) : getGOPEntry( MAX_GOP );
975    for( Int j = 0; j < ge.m_numInterViewRefPics; j++ )
976    {
977      // add ref view to list
978      Bool onList = false;
979      for( Int k = 0; k < numberUsableInterViewRefs; k++ )
980      {
981        if( ge.m_interViewRefs[j] == m_cSPS.getUsableInterViewRef( k ) )
982        {
983          onList = true;
984          break;
985        }
986      }
987      if( !onList )
988      {
989        m_cSPS.setUsableInterViewRef( (UInt)numberUsableInterViewRefs, ge.m_interViewRefs[j] );
990        numberUsableInterViewRefs++;
991      }
992    }
993  }
994  m_cSPS.setNumberOfUsableInterViewRefs( numberUsableInterViewRefs );
995
996  // sort inter view refs
997  for( Int j = 1; j < m_cSPS.getNumberOfUsableInterViewRefs(); j++ )
998  { 
999    Int deltaViewId = m_cSPS.getUsableInterViewRef( j );
1000    for( Int k = j-1; k >= 0; k-- )
1001    {
1002      Int temp = m_cSPS.getUsableInterViewRef( k );
1003      if( deltaViewId > temp )
1004      {
1005        m_cSPS.setUsableInterViewRef( k+1, temp );
1006        m_cSPS.setUsableInterViewRef( k, deltaViewId );
1007      }
1008    }
1009  }
1010
1011  m_cSPS.setListsModificationPresentFlag( true );
1012}
1013
1014Void  TEncTop::xInitPPSforTiles()
1015{
1016    m_cPPS.setColumnRowInfoPresent( m_iColumnRowInfoPresent );
1017    m_cPPS.setUniformSpacingIdr( m_iUniformSpacingIdr );
1018    m_cPPS.setNumColumnsMinus1( m_iNumColumnsMinus1 );
1019    m_cPPS.setNumRowsMinus1( m_iNumRowsMinus1 );
1020    if( m_iUniformSpacingIdr == 0 )
1021    {
1022      m_cPPS.setColumnWidth( m_puiColumnWidth );
1023      m_cPPS.setRowHeight( m_puiRowHeight );
1024    }
1025    m_cPPS.setTileBehaviorControlPresentFlag( m_iTileBehaviorControlPresentFlag );
1026    m_cPPS.setLFCrossTileBoundaryFlag( m_bLFCrossTileBoundaryFlag );
1027
1028    // # substreams is "per tile" when tiles are independent.
1029    if ( m_iWaveFrontSynchro )
1030    {
1031      m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1));
1032    }
1033}
1034
1035Void  TEncCfg::xCheckGSParameters()
1036{
1037  Int   iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth;
1038  Int   iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight;
1039  UInt  uiCummulativeColumnWidth = 0;
1040  UInt  uiCummulativeRowHeight = 0;
1041
1042  //check the column relative parameters
1043  if( m_iNumColumnsMinus1 >= (1<<(LOG2_MAX_NUM_COLUMNS_MINUS1+1)) )
1044  {
1045    printf( "The number of columns is larger than the maximum allowed number of columns.\n" );
1046    exit( EXIT_FAILURE );
1047  }
1048
1049  if( m_iNumColumnsMinus1 >= iWidthInCU )
1050  {
1051    printf( "The current picture can not have so many columns.\n" );
1052    exit( EXIT_FAILURE );
1053  }
1054
1055  if( m_iNumColumnsMinus1 && m_iUniformSpacingIdr==0 )
1056  {
1057    for(Int i=0; i<m_iNumColumnsMinus1; i++)
1058      uiCummulativeColumnWidth += m_puiColumnWidth[i];
1059
1060    if( uiCummulativeColumnWidth >= iWidthInCU )
1061    {
1062      printf( "The width of the column is too large.\n" );
1063      exit( EXIT_FAILURE );
1064    }
1065  }
1066
1067  //check the row relative parameters
1068  if( m_iNumRowsMinus1 >= (1<<(LOG2_MAX_NUM_ROWS_MINUS1+1)) )
1069  {
1070    printf( "The number of rows is larger than the maximum allowed number of rows.\n" );
1071    exit( EXIT_FAILURE );
1072  }
1073
1074  if( m_iNumRowsMinus1 >= iHeightInCU )
1075  {
1076    printf( "The current picture can not have so many rows.\n" );
1077    exit( EXIT_FAILURE );
1078  }
1079
1080  if( m_iNumRowsMinus1 && m_iUniformSpacingIdr==0 )
1081  {
1082    for(Int i=0; i<m_iNumRowsMinus1; i++)
1083      uiCummulativeRowHeight += m_puiRowHeight[i];
1084
1085    if( uiCummulativeRowHeight >= iHeightInCU )
1086    {
1087      printf( "The height of the row is too large.\n" );
1088      exit( EXIT_FAILURE );
1089    }
1090  }
1091}
1092
1093Void TEncTop::setTEncTopList(std::vector<TEncTop*>* pacTEncTopList )
1094{
1095  assert(m_viewId!=-1); // not to be set for single view coding
1096
1097  m_pacTEncTopList=pacTEncTopList;
1098
1099}
1100
1101Void TEncTop::printOutSummary(UInt uiNumAllPicCoded)
1102{
1103  assert (uiNumAllPicCoded == m_cAnalyzeAll.getNumPic());
1104
1105  //--CFG_KDY
1106  m_cAnalyzeAll.setFrmRate( getFrameRate() );
1107  m_cAnalyzeI.setFrmRate( getFrameRate() );
1108  m_cAnalyzeP.setFrmRate( getFrameRate() );
1109  m_cAnalyzeB.setFrmRate( getFrameRate() );
1110
1111  //-- all
1112  if(m_viewId==-1)
1113    printf( "\n\nSUMMARY --------------------------------------------------------\n" );
1114  else {
1115    if ( m_isDepth )
1116    {
1117      printf( "\n\nSUMMARY ---------------------------------------------- DEPTH %2d\n", m_viewId );
1118    }
1119    else
1120    {
1121      printf( "\n\nSUMMARY ---------------------------------------------- VIDEO %2d\n", m_viewId );
1122    }
1123  };
1124  m_cAnalyzeAll.printOut('a');
1125
1126  printf( "\n\nI Slices--------------------------------------------------------\n" );
1127  m_cAnalyzeI.printOut('i');
1128
1129  printf( "\n\nP Slices--------------------------------------------------------\n" );
1130  m_cAnalyzeP.printOut('p');
1131
1132  printf( "\n\nB Slices--------------------------------------------------------\n" );
1133  m_cAnalyzeB.printOut('b');
1134
1135//  m_cAnalyzeAll.printSummaryOut();
1136//  m_cAnalyzeI.printSummary('I');
1137//  m_cAnalyzeP.printSummary('P');
1138//  m_cAnalyzeB.printSummary('B');
1139}
1140
1141//! \}
Note: See TracBrowser for help on using the repository browser.