Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncTop.cpp


Ignore:
Timestamp:
20 Feb 2013, 22:07:43 (11 years ago)
Author:
tech
Message:

Reintegrated branch 5.1-dev0 rev. 295.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r210 r296  
    103103  if (m_bUseSAO)
    104104  {
    105 #if SAO_UNIT_INTERLEAVING
    106105    m_cEncSAO.setSaoInterleavingFlag(getSaoInterleavingFlag());
    107106    m_cEncSAO.setMaxNumOffsetsPerPic(getMaxNumOffsetsPerPic());
    108 #endif
    109107    m_cEncSAO.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    110108    m_cEncSAO.createEncBuffer();
     
    122120  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) );
    123121#endif
    124 #if HHI_INTER_VIEW_RESIDUAL_PRED
     122#if H3D_IVRP
    125123  m_cResidualGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
    126124#endif
     
    128126  if(m_bUseALF)
    129127  {
    130 #if LCU_SYNTAX_ALF
    131128    m_cAdaptiveLoopFilter.setAlfCoefInSlice(m_bALFParamInSlice);
    132129    m_cAdaptiveLoopFilter.createAlfGlobalBuffers();
    133 #else
    134     m_cAdaptiveLoopFilter.setGOPSize( getGOPSize() );
    135     m_cAdaptiveLoopFilter.createAlfGlobalBuffers(m_iALFEncodePassReduction);
    136 #endif
    137130  }
    138131
     
    258251  m_cDepthMapGenerator. destroy();
    259252#endif
    260 #if HHI_INTER_VIEW_RESIDUAL_PRED
     253#if H3D_IVRP
    261254  m_cResidualGenerator. destroy();
    262255#endif
     
    333326  // initialize PPS
    334327  m_cPPS.setSPS(&m_cSPS);
    335 #if RPS_IN_SPS
    336328  m_cSPS.setRPSList(&m_RPSList);
    337 #else
    338   m_cPPS.setRPSList(&m_RPSList);
    339 #endif
    340329  xInitPPS();
    341330  xInitRPS();
     
    358347#endif
    359348#endif
    360 #if HHI_INTER_VIEW_RESIDUAL_PRED
     349#if H3D_IVRP
    361350  m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
    362351#endif
     
    384373    m_cAdaptiveLoopFilter.setALFEncodePassReduction( m_iALFEncodePassReduction );
    385374    m_cAdaptiveLoopFilter.setALFMaxNumberFilters( m_iALFMaxNumberFilters );
    386 #if LCU_SYNTAX_ALF
    387375    m_cAdaptiveLoopFilter.initPicQuadTreePartition(m_bALFPicBasedEncode );   
    388 #endif
    389376  }
    390377
     
    404391  pcPicYuvOrg->copyToPic( pcPicCurr->getPicYuvOrg() );
    405392
    406 #if SONY_COLPIC_AVAILABILITY
    407   pcPicCurr->setViewOrderIdx(m_iViewOrderIdx);
     393#if INTER_VIEW_VECTOR_SCALING_C0115
     394  pcPicCurr->setViewOrderIdx(m_iViewOrderIdx);    // will be changed to view_id
    408395#endif
    409396  pcPicCurr->setScaleOffset( m_aaiCodedScale, m_aaiCodedOffset );
    410397
    411 #if HHI_INTER_VIEW_MOTION_PRED
     398#if H3D_IVMP
    412399  if( m_uiMultiviewMvRegMode )
    413400  {
     
    486473
    487474
    488 #if HHI_INTERVIEW_SKIP || HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED
     475#if HHI_INTERVIEW_SKIP || H3D_IVMP || H3D_IVRP
    489476Void
    490477TEncTop::deleteExtraPicBuffers( Int iPoc )
     
    504491  if ( pcPic )
    505492  {
    506 #if HHI_INTER_VIEW_MOTION_PRED
     493#if H3D_IVMP
    507494    pcPic->removeOrgDepthMapBuffer();
    508495#endif
    509 #if HHI_INTER_VIEW_RESIDUAL_PRED
     496#if H3D_IVRP
    510497    pcPic->removeResidualBuffer   ();
    511498#endif
     
    553540  TComSlice::sortPicList(m_cListPic);
    554541 
    555 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
    556542  if (m_cListPic.size() >= (UInt)(m_iGOPSize + getMaxDecPicBuffering(MAX_TLAYER-1) + 2) )
    557 #else
    558   if (m_cListPic.size() >= (UInt)(m_iGOPSize + getMaxNumberOfReferencePictures() + 2) )
    559 #endif
    560543  {
    561544    TComList<TComPic*>::iterator iterPic  = m_cListPic.begin();
     
    594577  m_iNumPicRcvd++;
    595578 
    596 #if HHI_INTER_VIEW_MOTION_PRED
     579#if H3D_IVMP
    597580  if( m_uiMultiviewMvRegMode )
    598581  {
     
    611594  m_cSPS.setPicWidthInLumaSamples         ( m_iSourceWidth      );
    612595  m_cSPS.setPicHeightInLumaSamples        ( m_iSourceHeight     );
    613 #if PIC_CROPPING
    614596  m_cSPS.setPicCroppingFlag( m_croppingMode!= 0 );
    615597  if (m_croppingMode != 0)
     
    620602    m_cSPS.setPicCropBottomOffset( m_cropBottom );
    621603  }
    622 #else
    623   m_cSPS.setPad           ( m_aiPad             );
    624 #endif
    625604  m_cSPS.setMaxCUWidth    ( g_uiMaxCUWidth      );
    626605  m_cSPS.setMaxCUHeight   ( g_uiMaxCUHeight     );
     
    629608  m_cSPS.setMaxTrDepth    ( 1                   );
    630609 
    631 #if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
    632   m_cSPS.setMaxNumberOfReferencePictures(m_maxNumberOfReferencePictures);
    633   m_cSPS.setNumReorderFrames(m_numReorderFrames);
    634 #endif
    635610  m_cSPS.setPCMLog2MinSize (m_uiPCMLog2MinSize);
    636611  m_cSPS.setUsePCM        ( m_usePCM           );
     
    638613
    639614  m_cSPS.setUseALF        ( m_bUseALF           );
    640 #if LCU_SYNTAX_ALF
    641615  if(m_bUseALF)
    642616  {
    643617    m_cSPS.setUseALFCoefInSlice(m_bALFParamInSlice);
    644618  }
    645 #endif
    646619 
    647620#if RWTH_SDC_DLT_B0036
     
    657630  m_cSPS.setUseLossless   ( m_useLossless  );
    658631#endif
    659 #if !PIC_CROPPING
    660   m_cSPS.setUsePAD        ( m_bUsePAD           );
    661 #endif
    662632  m_cSPS.setUseLMChroma   ( m_bUseLMChroma           ); 
    663633 
     
    696666  m_cSPS.setBitDepth    ( g_uiBitDepth        );
    697667  m_cSPS.setBitIncrement( g_uiBitIncrement    );
    698 #if H0736_AVC_STYLE_QP_RANGE
    699668  m_cSPS.setQpBDOffsetY ( (Int)(6*(g_uiBitDepth + g_uiBitIncrement - 8)) );
    700669  m_cSPS.setQpBDOffsetC ( (Int)(6*(g_uiBitDepth + g_uiBitIncrement - 8)) );
    701 #endif
    702670
    703671  m_cSPS.setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag );
    704672  m_cSPS.setUseSAO( m_bUseSAO );
    705673
    706 #if !H0566_TLA
    707   if ( m_bTLayering )
    708   {
    709     Int iMaxTLayers = 1;
    710     for ( i = 1; ; i++)
    711     {
    712       iMaxTLayers = i;
    713       if ( (m_iGOPSize >> i) == 0 )
    714       {
    715         break;
    716       }
    717     }
    718  
    719     m_cSPS.setMaxTLayers( (UInt)iMaxTLayers );
    720 
    721     Bool bTemporalIdNestingFlag = true;
    722     for ( i = 0; i < m_cSPS.getMaxTLayers()-1; i++ )
    723     {
    724       if ( !m_abTLayerSwitchingFlag[i] )
    725       {
    726         bTemporalIdNestingFlag = false;
    727         break;
    728       }
    729     }
    730 
    731     m_cSPS.setTemporalIdNestingFlag( bTemporalIdNestingFlag );
    732   }
    733   else
    734   {
    735     m_cSPS.setMaxTLayers( 1 );
    736     m_cSPS.setTemporalIdNestingFlag( false );
    737   }
    738 #else
    739674  m_cSPS.setMaxTLayers( m_maxTempLayer );
    740675  m_cSPS.setTemporalIdNestingFlag( false );
    741 #endif
    742 #if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
    743676  for ( i = 0; i < m_cSPS.getMaxTLayers(); i++ )
    744677  {
     
    746679    m_cSPS.setNumReorderPics(m_numReorderPics[i], i);
    747680  }
    748 #endif
    749681  m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma);
    750682  m_cSPS.setPCMBitDepthChroma (g_uiPCMBitDepthChroma);
     
    753685  m_cSPS.setLFCrossTileBoundaryFlag( m_bLFCrossTileBoundaryFlag );
    754686  m_cSPS.setUniformSpacingIdr( m_iUniformSpacingIdr );
    755 #if !REMOVE_TILE_DEPENDENCE
    756   m_cSPS.setTileBoundaryIndependenceIdr( m_iTileBoundaryIndependenceIdr );
    757 #endif
    758687  m_cSPS.setNumColumnsMinus1( m_iNumColumnsMinus1 );
    759688  m_cSPS.setNumRowsMinus1( m_iNumRowsMinus1 );
     
    787716    m_cSPS.setPredDepthMapGeneration( m_viewId, true );
    788717#endif
    789 #if HHI_INTER_VIEW_RESIDUAL_PRED
     718#if H3D_IVRP
    790719    m_cSPS.setMultiviewResPredMode  ( 0 );
    791720#endif
     
    801730    {
    802731#if DEPTH_MAP_GENERATION
    803 #if HHI_INTER_VIEW_MOTION_PRED
     732#if H3D_IVMP
    804733      m_cSPS.setPredDepthMapGeneration( m_viewId, false, m_uiPredDepthMapGeneration, m_uiMultiviewMvPredMode, m_uiPdmPrecision, m_aaiPdmScaleNomDelta, m_aaiPdmOffset );
    805734#else
     
    807736#endif
    808737#endif
    809 #if HHI_INTER_VIEW_RESIDUAL_PRED
     738#if H3D_IVRP
    810739      m_cSPS.setMultiviewResPredMode  ( m_uiMultiviewResPredMode );
    811740#endif
     
    816745      m_cSPS.setPredDepthMapGeneration( m_viewId, false );
    817746#endif
    818 #if HHI_INTER_VIEW_RESIDUAL_PRED
     747#if H3D_IVRP
    819748      m_cSPS.setMultiviewResPredMode  ( 0 );
    820749#endif
     
    827756  m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred );
    828757  m_cPPS.setSliceGranularity(m_iSliceGranularity);
    829 #if !H0566_TLA
    830   if ( m_cSPS.getTemporalIdNestingFlag() )
    831   {
    832     m_cPPS.setNumTLayerSwitchingFlags( 0 );
    833     for ( UInt i = 0; i < m_cSPS.getMaxTLayers() - 1; i++ )
    834     {
    835       m_cPPS.setTLayerSwitchingFlag( i, true );
    836     }
    837   }
    838   else
    839   {
    840     m_cPPS.setNumTLayerSwitchingFlags( m_cSPS.getMaxTLayers() - 1 );
    841     for ( UInt i = 0; i < m_cPPS.getNumTLayerSwitchingFlags(); i++ )
    842     {
    843       m_cPPS.setTLayerSwitchingFlag( i, m_abTLayerSwitchingFlag[i] );
    844     }
    845   }   
    846 #endif
    847758  Bool bUseDQP = (getMaxCuDQPDepth() > 0)? true : false;
    848759
    849760#if LOSSLESS_CODING
    850 #if H0736_AVC_STYLE_QP_RANGE
    851761  Int lowestQP = - m_cSPS.getQpBDOffsetY();
    852 #else
    853   Int lowestQP = 0;
    854 #endif
    855762
    856763  if(getUseLossless())
     
    903810
    904811  m_cPPS.setEntropyCodingMode( 1 ); // In the PPS now, but also remains in slice header!
    905 #if !WPP_SIMPLIFICATION
    906   m_cPPS.setEntropyCodingSynchro(m_iWaveFrontSynchro);
    907   m_cPPS.setCabacIstateReset(m_iWaveFrontFlush != 0);
    908 #endif
    909812  m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams);
    910813  m_cPPS.setUseWP( m_bUseWeightPred );
    911814  m_cPPS.setWPBiPredIdc( m_uiBiPredIdc );
    912815  m_cPPS.setEnableTMVPFlag( m_bEnableTMVP );
    913 #if H0388
    914816  m_cPPS.setOutputFlagPresentFlag( false );
    915 #endif
    916 #if MULTIBITS_DATA_HIDING
    917817  m_cPPS.setSignHideFlag(getSignHideFlag());
    918818  m_cPPS.setTSIG(getTSIG());
    919 #endif
    920 #if DBL_CONTROL
    921819  m_cPPS.setDeblockingFilterControlPresent (m_DeblockingFilterControlPresent );
    922 #endif
    923 #if PARALLEL_MERGE
    924820  m_cPPS.setLog2ParallelMergeLevelMinus2      (LOG2_PARALLEL_MERGE_LEVEL_MINUS2);
    925 #endif
    926821#if CABAC_INIT_FLAG
    927822  m_cPPS.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG);
     
    1102997    m_cPPS.setColumnRowInfoPresent( m_iColumnRowInfoPresent );
    1103998    m_cPPS.setUniformSpacingIdr( m_iUniformSpacingIdr );
    1104 #if !REMOVE_TILE_DEPENDENCE
    1105     m_cPPS.setTileBoundaryIndependenceIdr( m_iTileBoundaryIndependenceIdr );
    1106 #endif
    1107999    m_cPPS.setNumColumnsMinus1( m_iNumColumnsMinus1 );
    11081000    m_cPPS.setNumRowsMinus1( m_iNumRowsMinus1 );
Note: See TracChangeset for help on using the changeset viewer.