Ignore:
Timestamp:
17 Oct 2013, 20:17:10 (11 years ago)
Author:
kwu-htm
Message:

Clean up and revised according to the guideline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncSlice.cpp

    r636 r637  
    332332  }
    333333#if !RATE_CONTROL_LAMBDA_DOMAIN
    334   if ( m_pcCfg->getUseRateCtrl() && !m_pcCfg->getIsDepth())
     334  if ( m_pcCfg->getUseRateCtrl())
    335335  {
    336336    dQP = m_pcRateCtrl->getFrameQP(rpcSlice->isReferenced(), rpcSlice->getPOC());
     
    11341134#endif
    11351135#if !RATE_CONTROL_LAMBDA_DOMAIN
    1136     if(m_pcCfg->getUseRateCtrl() && !m_pcCfg->getIsDepth())
     1136    if(m_pcCfg->getUseRateCtrl())
    11371137    {
    11381138#if KWU_RC_MADPRED_E0227
    11391139      if(pcSlice->getLayerId() != 0 && m_pcCfg->getUseDepthMADPred() && !pcSlice->getIsDepth())
    11401140      {
    1141         double Zn, Zf, FocalLength, Position, CamShift;
    1142         double BasePos;
     1141        double zn, zf, focallength, position, camshift;
     1142        double basepos;
    11431143        bool bInterpolated;
    1144         Int Direction = pcSlice->getViewId() - pcCU->getSlice()->getIvPic(false, 0)->getViewId();
    1145 
    1146         pcEncTop->getCamParam()->getZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf);
    1147         pcEncTop->getCamParam()->getGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated);
    1148         pcEncTop->getCamParam()->getGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated);
    1149 
    1150         m_pcRateCtrl->updateLCUDataEnhancedView(pcCU, pcCU->getTotalBits(), pcCU->getQP(0), BasePos, Position, FocalLength, Zn, Zf, (Direction > 0 ? 1 : -1));
     1144        Int direction = pcSlice->getViewId() - pcCU->getSlice()->getIvPic(false, 0)->getViewId();
     1145
     1146        pcEncTop->getCamParam()->xGetZNearZFar(pcEncTop->getCamParam()->getBaseViewNumbers()[pcSlice->getViewIndex()], pcSlice->getPOC(), zn, zf);
     1147        pcEncTop->getCamParam()->xGetGeometryData(pcEncTop->getCamParam()->getBaseViewNumbers()[0], pcSlice->getPOC(), focallength, basepos, camshift, bInterpolated);
     1148        pcEncTop->getCamParam()->xGetGeometryData(pcEncTop->getCamParam()->getBaseViewNumbers()[pcSlice->getViewIndex()], pcSlice->getPOC(), focallength, position, camshift, bInterpolated);
     1149
     1150        m_pcRateCtrl->updateLCUDataEnhancedView(pcCU, pcCU->getTotalBits(), pcCU->getQP(0), basepos, position, focallength, zn, zf, (direction > 0 ? 1 : -1));
    11511151      }
    11521152#endif
     
    12521252          if(pcSlice->getLayerId() != 0 && m_pcCfg->getUseDepthMADPred() && !pcSlice->getIsDepth())
    12531253          {
    1254             double Zn, Zf, FocalLength, Position, CamShift;
    1255             double BasePos;
     1254            double zn, zf, focallength, position, camShift;
     1255            double basePos;
    12561256            bool bInterpolated;
    1257             Int Direction = pcSlice->getViewId() - pcCU->getSlice()->getIvPic(false, 0)->getViewId();
    1258             Int iDisparity;
    1259 
    1260             pcEncTop->getCamParam()->getZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf);
    1261             pcEncTop->getCamParam()->getGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated);
    1262             pcEncTop->getCamParam()->getGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated);
     1257            Int direction = pcSlice->getViewId() - pcCU->getSlice()->getIvPic(false, 0)->getViewId();
     1258            Int disparity;
     1259
     1260            pcEncTop->getCamParam()->xGetZNearZFar(pcEncTop->getCamParam()->getBaseViewNumbers()[pcSlice->getViewIndex()], pcSlice->getPOC(), zn, zf);
     1261            pcEncTop->getCamParam()->xGetGeometryData(pcEncTop->getCamParam()->getBaseViewNumbers()[0], pcSlice->getPOC(), focallength, basePos, camShift, bInterpolated);
     1262            pcEncTop->getCamParam()->xGetGeometryData(pcEncTop->getCamParam()->getBaseViewNumbers()[pcSlice->getViewIndex()], pcSlice->getPOC(), focallength, position, camShift, bInterpolated);
    12631263            bpp       = m_pcRateCtrl->getRCPic()->getLCUTargetBppforInterView( m_pcRateCtrl->getPicList(), pcCU,
    1264                             BasePos, Position, FocalLength, Zn, Zf, (Direction > 0 ? 1 : -1), &iDisparity );
     1264              basePos, position, focallength, zn, zf, (direction > 0 ? 1 : -1), &disparity );
    12651265          }
    12661266          else
     
    13911391#if TICKET_1090_FIX
    13921392#if RATE_CONTROL_LAMBDA_DOMAIN
    1393       if ( m_pcCfg->getUseRateCtrl() && !m_pcCfg->getIsDepth() )
     1393      if ( m_pcCfg->getUseRateCtrl() )
    13941394      {
    13951395#if !M0036_RC_IMPROVEMENT || KWU_RC_MADPRED_E0227
     
    14561456    m_uiPicDist      += pcCU->getTotalDistortion();
    14571457#if !RATE_CONTROL_LAMBDA_DOMAIN
    1458     if(m_pcCfg->getUseRateCtrl() && !m_pcCfg->getIsDepth())
     1458    if(m_pcCfg->getUseRateCtrl())
    14591459    {
    14601460      m_pcRateCtrl->updateLCUData(pcCU, pcCU->getTotalBits(), pcCU->getQP(0));
     
    14771477  xRestoreWPparam( pcSlice );
    14781478#if !RATE_CONTROL_LAMBDA_DOMAIN
    1479   if(m_pcCfg->getUseRateCtrl() && !m_pcCfg->getIsDepth())
     1479  if(m_pcCfg->getUseRateCtrl())
    14801480  {
    14811481    m_pcRateCtrl->updateFrameData(m_uiPicTotalBits);
Note: See TracChangeset for help on using the changeset viewer.