Ignore:
Timestamp:
14 Oct 2013, 20:13:58 (11 years ago)
Author:
kwu-htm
Message:

"JCT3V-E0227 : Inter-view MAD prediction for 3D multi-view video" is integrated by KWU. Configuration has changed by adding rate control for URQ and the integrated view-wise target bitrate allocation and inter-view MAD prediction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder/TAppEncTop.cpp

    r622 r635  
    512512  m_cTEncTop.setSignHideFlag(m_signHideFlag);
    513513#if RATE_CONTROL_LAMBDA_DOMAIN
    514   m_cTEncTop.setUseRateCtrl         ( m_RCEnableRateControl );
     514  if(!m_cTEncTop.getIsDepth())    //only for texture
     515    m_cTEncTop.setUseRateCtrl         ( m_RCEnableRateControl );
     516  else
     517    m_cTEncTop.setUseRateCtrl         ( 0 );
     518#if !KWU_RC_VIEWRC_E0227
    515519  m_cTEncTop.setTargetBitrate       ( m_RCTargetBitrate );
     520#endif
    516521  m_cTEncTop.setKeepHierBit         ( m_RCKeepHierarchicalBit );
    517522  m_cTEncTop.setLCULevelRC          ( m_RCLCULevelRC );
     
    519524  m_cTEncTop.setInitialQP           ( m_RCInitialQP );
    520525  m_cTEncTop.setForceIntraQP        ( m_RCForceIntraQP );
    521 #else
    522   m_cTEncTop.setUseRateCtrl     ( m_enableRateCtrl);
    523   m_cTEncTop.setTargetBitrate   ( m_targetBitrate);
    524   m_cTEncTop.setNumLCUInUnit    ( m_numLCUInUnit);
     526
     527#if KWU_RC_MADPRED_E0227
     528  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
     529  {
     530    m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_uiDepthMADPred       : 0);
     531
     532    if(m_cTEncTop.getUseDepthMADPred())
     533      m_cTEncTop.setCamParam(&m_cCameraData);
     534  }
     535#endif
     536#if KWU_RC_VIEWRC_E0227
     537  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
     538  {
     539    m_cTEncTop.setUseViewWiseRateCtrl(m_bViewWiseRateCtrl);
     540
     541    if(m_iNumberOfViews == 1)
     542    {
     543      if(m_bViewWiseRateCtrl)
     544      {
     545        m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     546      }
     547      else
     548        m_cTEncTop.setTargetBitrate       ( m_RCTargetBitrate );
     549    }
     550    else
     551    {
     552      if(m_bViewWiseRateCtrl)
     553      {
     554        m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     555      }
     556      else
     557      {
     558        if(m_iNumberOfViews == 2)
     559        {
     560          if(m_cTEncTop.getViewId() == 0)
     561            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*80)/100 );
     562          else if(m_cTEncTop.getViewId() == 1)
     563            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*20)/100 );
     564        }
     565        else if(m_iNumberOfViews == 3)
     566        {
     567          if(m_cTEncTop.getViewId() == 0)
     568            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*66)/100 );
     569          else if(m_cTEncTop.getViewId() == 1)
     570            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*17)/100 );
     571          else if(m_cTEncTop.getViewId() == 2)
     572            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*17)/100 );
     573        }
     574        else
     575          m_cTEncTop.setTargetBitrate              ( m_RCTargetBitrate );
     576      }
     577    }
     578  }
     579#endif
     580#else
     581  if(!m_cTEncTop.getIsDepth())    //only for texture
     582  {
     583    m_cTEncTop.setUseRateCtrl         ( m_enableRateCtrl );
     584#if !KWU_RC_VIEWRC_E0227
     585    m_cTEncTop.setTargetBitrate       ( m_targetBitrate );
     586#endif
     587    m_cTEncTop.setNumLCUInUnit        ( m_numLCUInUnit);
     588  }
     589  else
     590    m_cTEncTop.setUseRateCtrl         ( 0 );
     591 
     592#if KWU_RC_MADPRED_E0227
     593  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
     594  {
     595    m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_uiDepthMADPred       : 0);
     596
     597    if(m_cTEncTop.getUseDepthMADPred())
     598      m_cTEncTop.setCamParam(&m_cCameraData);
     599  }
     600#endif
     601
     602#if KWU_RC_VIEWRC_E0227
     603  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
     604  {
     605    m_cTEncTop.setUseViewWiseRateCtrl(m_bViewWiseRateCtrl);
     606    if(m_iNumberOfViews == 1)
     607    {
     608      if(m_bViewWiseRateCtrl)
     609      {
     610        m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     611      }
     612      else
     613        m_cTEncTop.setTargetBitrate       ( m_targetBitrate );
     614    }
     615    else
     616    {
     617      if(m_bViewWiseRateCtrl)
     618      {
     619        m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     620      }
     621      else
     622      {
     623        if(m_iNumberOfViews == 2)
     624        {
     625          if(m_cTEncTop.getViewId() == 0)
     626            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*80)/100 );
     627          else if(m_cTEncTop.getViewId() == 1)
     628            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*20)/100 );
     629        }
     630        else if(m_iNumberOfViews == 3)
     631        {
     632          if(m_cTEncTop.getViewId() == 0)
     633            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*66)/100 );
     634          else if(m_cTEncTop.getViewId() == 1)
     635            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*17)/100 );
     636          else if(m_cTEncTop.getViewId() == 2)
     637            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*17)/100 );
     638        }
     639        else
     640          m_cTEncTop.setTargetBitrate              ( m_targetBitrate );
     641      }
     642    }
     643  }
     644#endif
    525645#endif
    526646  m_cTEncTop.setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag);
     
    669789  for(Int layer=0; layer<m_numberOfLayers; layer++)
    670790  {
     791#if KWU_RC_MADPRED_E0227
     792    m_acTEncTopList[layer]->init( this );
     793#else
    671794    m_acTEncTopList[layer]->init( );
     795#endif
    672796  }
    673797#else
     
    789913      }
    790914    }
     915
     916#if !RATE_CONTROL_LAMBDA_DOMAIN
     917    for(Int layer=0; layer < m_numberOfLayers; layer++ )
     918    {
     919      if(m_acTEncTopList[layer]->getUseRateCtrl()  && !m_acTEncTopList[layer]->getIsDepth())
     920      {
     921        m_acTEncTopList[layer]->getRateCtrl()->updateRCGOPStatus();
     922      }
     923    }
     924#endif
     925
    791926    gopSize = maxGopSize;
    792927  }
Note: See TracChangeset for help on using the changeset viewer.