Ignore:
Timestamp:
17 May 2013, 03:16:43 (12 years ago)
Author:
ustc
Message:

JCTVC-M0037. rate control harmonization with SHVC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r191 r211  
    337337  Int*    cfg_scaledRefLayerBottomOffset [MAX_LAYERS];
    338338#endif
     339#if RC_SHVC_HARMONIZATION
     340  Bool*   cfg_RCEnableRateControl  [MAX_LAYERS];
     341  Int*    cfg_RCTargetBitRate      [MAX_LAYERS];
     342  Bool*   cfg_RCKeepHierarchicalBit[MAX_LAYERS];
     343  Bool*   cfg_RCLCULevelRC         [MAX_LAYERS];
     344  Bool*   cfg_RCUseLCUSeparateModel[MAX_LAYERS];
     345  Int*    cfg_RCInitialQP          [MAX_LAYERS];
     346  Bool*   cfg_RCForceIntraQP       [MAX_LAYERS];
     347#endif
    339348  for(UInt layer = 0; layer < MAX_LAYERS; layer++)
    340349  {
     
    356365    cfg_scaledRefLayerRightOffset [layer] = &m_acLayerCfg[layer].m_scaledRefLayerRightOffset;
    357366    cfg_scaledRefLayerBottomOffset[layer] = &m_acLayerCfg[layer].m_scaledRefLayerBottomOffset;
     367#endif
     368#if RC_SHVC_HARMONIZATION
     369    cfg_RCEnableRateControl[layer]   = &m_acLayerCfg[layer].m_RCEnableRateControl;
     370    cfg_RCTargetBitRate[layer]       = &m_acLayerCfg[layer].m_RCTargetBitrate;
     371    cfg_RCKeepHierarchicalBit[layer] = &m_acLayerCfg[layer].m_RCKeepHierarchicalBit;
     372    cfg_RCLCULevelRC[layer]          = &m_acLayerCfg[layer].m_RCLCULevelRC;
     373    cfg_RCUseLCUSeparateModel[layer] = &m_acLayerCfg[layer].m_RCUseLCUSeparateModel;
     374    cfg_RCInitialQP[layer]           = &m_acLayerCfg[layer].m_RCInitialQP;
     375    cfg_RCForceIntraQP[layer]        = &m_acLayerCfg[layer].m_RCForceIntraQP;
    358376#endif
    359377  }
     
    617635  ("ESD", m_useEarlySkipDetection, false, "Early SKIP detection setting")
    618636#if RATE_CONTROL_LAMBDA_DOMAIN
     637#if RC_SHVC_HARMONIZATION
     638  ("RateControl%d", cfg_RCEnableRateControl, false, MAX_LAYERS, "Rate control: enable rate control for layer %d")
     639  ("TargetBitrate%d", cfg_RCTargetBitRate, 0, MAX_LAYERS, "Rate control: target bitrate for layer %d")
     640  ("KeepHierarchicalBit%d", cfg_RCKeepHierarchicalBit, false, MAX_LAYERS, "Rate control: keep hierarchical bit allocation for layer %d")
     641  ("LCULevelRateControl%d", cfg_RCLCULevelRC, true, MAX_LAYERS, "Rate control: LCU level RC")
     642  ("RCLCUSeparateModel%d", cfg_RCUseLCUSeparateModel, true, MAX_LAYERS, "Rate control: Use LCU level separate R-lambda model")
     643  ("InitialQP%d", cfg_RCInitialQP, 0, MAX_LAYERS, "Rate control: initial QP")
     644  ("RCForceIntraQP%d", cfg_RCForceIntraQP, false, MAX_LAYERS, "Rate control: force intra QP to be equal to initial QP")
     645#else
    619646  ( "RateControl",         m_RCEnableRateControl,   false, "Rate control: enable rate control" )
    620647  ( "TargetBitrate",       m_RCTargetBitrate,           0, "Rate control: target bitrate" )
     
    624651  ( "InitialQP",           m_RCInitialQP,               0, "Rate control: initial QP" )
    625652  ( "RCForceIntraQP",      m_RCForceIntraQP,        false, "Rate control: force intra QP to be equal to initial QP" )
     653#endif
    626654#else
    627655  ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off")
     
    17421770
    17431771#if RATE_CONTROL_LAMBDA_DOMAIN
     1772#if RC_SHVC_HARMONIZATION
     1773  for ( Int layer=0; layer<m_numLayers; layer++ )
     1774  {
     1775    if ( m_acLayerCfg[layer].m_RCEnableRateControl )
     1776    {
     1777      if ( m_acLayerCfg[layer].m_RCForceIntraQP )
     1778      {
     1779        if ( m_acLayerCfg[layer].m_RCInitialQP == 0 )
     1780        {
     1781          printf( "\nInitial QP for rate control is not specified. Reset not to use force intra QP!" );
     1782          m_acLayerCfg[layer].m_RCForceIntraQP = false;
     1783        }
     1784      }
     1785    }
     1786    xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" );
     1787  }
     1788#else
    17441789  if ( m_RCEnableRateControl )
    17451790  {
     
    17541799    xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" );
    17551800  }
     1801#endif
    17561802#else
    17571803  if(m_enableRateCtrl)
     
    18691915  printf("PCM sample bit depth         : (Y:%d, C:%d)\n", g_uiPCMBitDepthLuma, g_uiPCMBitDepthChroma );
    18701916#if RATE_CONTROL_LAMBDA_DOMAIN
     1917#if !RC_SHVC_HARMONIZATION
    18711918  printf("RateControl                  : %d\n", m_RCEnableRateControl );
    18721919  if(m_RCEnableRateControl)
     
    18791926    printf("ForceIntraQP                 : %d\n", m_RCForceIntraQP );
    18801927  }
     1928#endif
    18811929#else
    18821930  printf("RateControl                  : %d\n", m_enableRateCtrl);
Note: See TracChangeset for help on using the changeset viewer.