Ignore:
Timestamp:
2 Jan 2014, 07:21:30 (11 years ago)
Author:
seregin
Message:

update to HM-12.1 base

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r531 r532  
    129129  if (m_bUseSAO)
    130130  {
     131#if HM_CLEANUP_SAO
     132#if AUXILIARY_PICTURES
     133    m_cEncSAO.create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     134#else
     135    m_cEncSAO.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     136#endif
     137#if SAO_ENCODE_ALLOW_USE_PREDEBLOCK
     138    m_cEncSAO.createEncData(getSaoLcuBoundary());
     139#else
     140    m_cEncSAO.createEncData();
     141#endif
     142#else
    131143    m_cEncSAO.setSaoLcuBoundary(getSaoLcuBoundary());
    132144    m_cEncSAO.setSaoLcuBasedOptimization(getSaoLcuBasedOptimization());
     
    134146    m_cEncSAO.create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight );
    135147    m_cEncSAO.createEncBuffer();
     148#endif
    136149  }
    137150#if ADAPTIVE_QP_SELECTION
     
    143156  m_cLoopFilter.        create( g_uiMaxCUDepth );
    144157 
    145 #if RATE_CONTROL_LAMBDA_DOMAIN
    146158  if ( m_RCEnableRateControl )
    147159  {
     
    149161                      g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );
    150162  }
    151 #else
    152   m_cRateCtrl.create(getIntraPeriod(), getGOPSize(), getFrameRate(), getTargetBitrate(), getQP(), getNumLCUInUnit(), getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight);
    153 #endif
    154163  // if SBAC-based RD optimization is used
    155164  if( m_bUseSBACRD )
     
    250259  if (m_cSPS.getUseSAO())
    251260  {
     261#if HM_CLEANUP_SAO
     262    m_cEncSAO.destroyEncData();
     263    m_cEncSAO.destroy();
     264#else
    252265    m_cEncSAO.destroy();
    253266    m_cEncSAO.destroyEncBuffer();
     267#endif
    254268  }
    255269  m_cLoopFilter.        destroy();
     
    401415{
    402416  // compress GOP
    403 #if RATE_CONTROL_LAMBDA_DOMAIN
    404417#if !RC_SHVC_HARMONIZATION
    405418  if ( m_RCEnableRateControl )
     
    408421  }
    409422#endif
    410 #endif
    411423
    412424  // compress GOP
    413425  m_cGOPEncoder.compressGOP(iPicIdInGOP, m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, false, false);
    414426
    415 #if RATE_CONTROL_LAMBDA_DOMAIN
    416427#if !RC_SHVC_HARMONIZATION
    417428  if ( m_RCEnableRateControl )
     
    419430    m_cRateCtrl.destroyRCGOP();
    420431  }
    421 #endif
    422432#endif
    423433 
     
    463473  }
    464474 
    465 #if RATE_CONTROL_LAMBDA_DOMAIN
    466475  if ( m_RCEnableRateControl )
    467476  {
    468477    m_cRateCtrl.initRCGOP( m_iNumPicRcvd );
    469478  }
    470 #endif
    471479
    472480  // compress GOP
     
    474482  m_cGOPEncoder.compressGOP(m_iPOCLast, m_iNumPicRcvd, m_cListPic, rcListPicYuvRecOut, accessUnitsOut, false, false);
    475483
    476 #if RATE_CONTROL_LAMBDA_DOMAIN
    477484  if ( m_RCEnableRateControl )
    478485  {
    479486    m_cRateCtrl.destroyRCGOP();
    480487  }
    481 #endif
    482488 
    483489  iNumEncoded         = m_iNumPicRcvd;
     
    519525    TComPic *pcTopField;
    520526    xGetNewPicBuffer( pcTopField );
     527#if !HM_CLEANUP_SAO
    521528    pcTopField->getPicSym()->allocSaoParam(&m_cEncSAO);
     529#endif
    522530    pcTopField->setReconMark (false);
    523531   
     
    540548    Pel * pcTopFieldU =  pcTopField->getPicYuvOrg()->getCbAddr();
    541549    Pel * pcTopFieldV =  pcTopField->getPicYuvOrg()->getCrAddr();
    542    
     550
    543551    // compute image characteristics
    544552    if ( getUseAdaptiveQP() )
    545553    {
    546554      m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcTopField ) );
    547     }
    548    
     555    }   
     556
    549557    /* -- Defield -- */
    550558   
     
    560568    TComPic* pcBottomField;
    561569    xGetNewPicBuffer( pcBottomField );
     570#if !HM_CLEANUP_SAO
    562571    pcBottomField->getPicSym()->allocSaoParam(&m_cEncSAO);
     572#endif
    563573    pcBottomField->setReconMark (false);
    564574   
     
    581591    Pel * pcBottomFieldU =  pcBottomField->getPicYuvOrg()->getCbAddr();
    582592    Pel * pcBottomFieldV =  pcBottomField->getPicYuvOrg()->getCrAddr();
    583    
    584     // Compute image characteristics
     593
     594    // compute image characteristics
    585595    if ( getUseAdaptiveQP() )
    586596    {
    587597      m_cPreanalyzer.xPreanalyze( dynamic_cast<TEncPic*>( pcBottomField ) );
    588     }
    589    
     598    }       
     599
    590600    /* -- Defield -- */
    591601   
     
    642652    TComPic *pcTopField;
    643653    xGetNewPicBuffer( pcTopField );
     654#if !HM_CLEANUP_SAO
    644655    pcTopField->getPicSym()->allocSaoParam(&m_cEncSAO);
     656#endif
    645657    pcTopField->setReconMark (false);
    646658   
     
    694706    TComPic* pcBottomField;
    695707    xGetNewPicBuffer( pcBottomField );
     708#if !HM_CLEANUP_SAO
    696709    pcBottomField->getPicSym()->allocSaoParam(&m_cEncSAO);
     710#endif
    697711    pcBottomField->setReconMark (false);
    698712   
    699     TComPicYuv* rpcPicYuvRec = new TComPicYuv;
     713    TComPicYuv* rpcPicYuvRec;
    700714    if ( rcListPicYuvRecOut.size() == (UInt)m_iGOPSize )
    701715    {
     
    704718    else
    705719    {
     720      rpcPicYuvRec = new TComPicYuv;
    706721      rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    707722    }
     
    897912#endif
    898913    }
    899 
     914#if !HM_CLEANUP_SAO
    900915    if (getUseSAO())
    901916    {
    902917      rpcPic->getPicSym()->allocSaoParam(&m_cEncSAO);
    903918    }
     919#endif
    904920    m_cListPic.pushBack( rpcPic );
    905921  }
     
    11471163  }
    11481164
    1149 #if RATE_CONTROL_LAMBDA_DOMAIN
    11501165  if ( m_RCEnableRateControl )
    11511166  {
     
    11541169    m_cPPS.setMinCuDQPSize( m_cPPS.getSPS()->getMaxCUWidth() >> ( m_cPPS.getMaxCuDQPDepth()) );
    11551170  }
    1156 #endif
    11571171
    11581172  m_cPPS.setChromaCbQpOffset( m_chromaCbQpOffset );
Note: See TracChangeset for help on using the changeset viewer.