Changeset 636 in 3DVCSoftware


Ignore:
Timestamp:
16 Oct 2013, 11:27:16 (11 years ago)
Author:
kwu-htm
Message:

Clean-up version of JCT3V-E0227.

Location:
branches/HTM-8.2-dev0-KWU
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-8.2-dev0-KWU/cfg/3D-HEVC/baseCfg_3view+depth.cfg

    r635 r636  
    224224RCForceIntraQP                      : 0                # Rate control: force intra QP to be equal to initial QP
    225225
    226 DepthMADPred                        : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
    227 TargetBitAssign                     : 0                 # Manual assignment of target bit-rate
    228 ViewWiseTargetBits                  : 950000 315000 358000              # View-wise target bit-rate setting
     226DepthMADPred                        : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
     227TargetBitAssign                     : 0                # Manual assignment of target bit-rate
     228ViewWiseTargetBits                  : 950000 315000 358000      # View-wise target bit-rate setting
    229229
    230230#============ Rate Control URQ ======================
    231 #RateControl                         : 0                # 0: Disable rate control 1: Enable rate control with total target
    232 #DepthMADPred                       : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
    233 #TargetBitAssign                    : 0                 # Manual assignment of target bit-rate
    234 #ViewWiseTargetBits                 : 952 315 360       # View-wise target bit-rate setting
    235 #TargetBitrate                       : 1500             # input target bitrate when RateCtrl is enable
    236 #NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
     231#RateCtrl                           : 0                # 0: Disable rate control 1: Enable rate control with total target
     232#DepthMADPred                       : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
     233#TargetBitAssign                    : 0                # Manual assignment of target bit-rate
     234#ViewWiseTargetBits                 : 952 315 360      # View-wise target bit-rate setting
     235#TargetBitrate                      : 1500             # input target bitrate when RateCtrl is enable
     236#NumLCUInUnit                       : 1                # Number of LCU in an Unit. Fraction is not allowed
    237237
    238238#========== multiview coding tools ==========
  • branches/HTM-8.2-dev0-KWU/cfg/3D-HEVC/fullCfg.cfg

    r635 r636  
    230230RCForceIntraQP                      : 0                # Rate control: force intra QP to be equal to initial QP
    231231
    232 DepthMADPred                        : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
    233 TargetBitAssign                     : 0                 # Manual assignment of target bit-rate
    234 ViewWiseTargetBits                  : 950000 315000 358000              # View-wise target bit-rate setting
     232DepthMADPred                        : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
     233TargetBitAssign                     : 0                # Manual assignment of target bit-rate
     234ViewWiseTargetBits                  : 950000 315000 358000      # View-wise target bit-rate setting
    235235
    236236#============ Rate Control URQ ======================
    237 #RateControl                         : 0                # 0: Disable rate control 1: Enable rate control with total target
    238 #DepthMADPred                       : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
    239 #TargetBitAssign                    : 0                 # Manual assignment of target bit-rate
    240 #ViewWiseTargetBits                 : 952 315 360       # View-wise target bit-rate setting
    241 #TargetBitrate                       : 1500             # input target bitrate when RateCtrl is enable
    242 #NumLCUInUnit                        : 1                # Number of LCU in an Unit. Fraction is not allowed
     237#RateCtrl                           : 0                # 0: Disable rate control 1: Enable rate control with total target
     238#DepthMADPred                       : 0                # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view
     239#TargetBitAssign                    : 0                # Manual assignment of target bit-rate
     240#ViewWiseTargetBits                 : 952 315 360      # View-wise target bit-rate setting
     241#TargetBitrate                      : 1500             # input target bitrate when RateCtrl is enable
     242#NumLCUInUnit                       : 1                # Number of LCU in an Unit. Fraction is not allowed
    243243
    244244#========== multiview coding tools ==========
  • branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder/TAppEncCfg.cpp

    r635 r636  
    8484
    8585#if KWU_RC_MADPRED_E0227
    86   m_uiDepthMADPred = 0;
     86  m_DepthMADPred = 0;
    8787#endif
    8888}
     
    600600
    601601#if KWU_RC_VIEWRC_E0227
    602   ("ViewWiseTargetBits, -vtbr" ,  m_pchViewTargetBits,  std::vector<Int>(1, 32), "View-wise target bit-rate setting")
    603   ("TargetBitAssign, -ta", m_bViewWiseRateCtrl, false, "View-wise rate control on/off")
     602  ("ViewWiseTargetBits, -vtbr" ,  m_ViewTargetBits,  std::vector<Int>(1, 32), "View-wise target bit-rate setting")
     603  ("TargetBitAssign, -ta", m_ViewWiseRateCtrl, false, "View-wise rate control on/off")
    604604#endif
    605605#if KWU_RC_MADPRED_E0227
    606   ("DepthMADPred, -dm", m_uiDepthMADPred, (UInt)0, "Depth based MAD prediction on/off")
    607 #endif
    608 #else
    609   ("RateControl,-rc", m_enableRateCtrl, false, "Rate control on/off")
     606  ("DepthMADPred, -dm", m_DepthMADPred, (UInt)0, "Depth based MAD prediction on/off")
     607#endif
     608#else
     609  ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off")
    610610  ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate")
    611611  ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit")
    612612
    613613#if KWU_RC_VIEWRC_E0227
    614   ("ViewWiseTargetBits, -vtbr" ,  m_pchViewTargetBits,  std::vector<Int>(1, 32), "View-wise target bit-rate setting")
    615   ("TargetBitAssign, -ta", m_bViewWiseRateCtrl, false, "View-wise rate control on/off")
     614  ("ViewWiseTargetBits, -vtbr" ,  m_ViewTargetBits,  std::vector<Int>(1, 32), "View-wise target bit-rate setting")
     615  ("TargetBitAssign, -ta", m_ViewWiseRateCtrl, false, "View-wise rate control on/off")
    616616#endif
    617617#if KWU_RC_MADPRED_E0227
    618   ("DepthMADPred, -dm", m_uiDepthMADPred, (UInt)0, "Depth based MAD prediction on/off")
     618  ("DepthMADPred, -dm", m_DepthMADPred, (UInt)0, "Depth based MAD prediction on/off")
    619619#endif
    620620#endif
     
    21792179    xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" );
    21802180
    2181     //m_iMaxDeltaQP       = MAX_DELTA_QP;
     2181#if !(KWU_RC_MADPRED_E0227 || KWU_RC_VIEWRC_E0227)
     2182    m_iMaxDeltaQP       = MAX_DELTA_QP;
     2183#endif
    21822184    m_iMaxCuDQPDepth    = MAX_CUDQP_DEPTH;
    21832185  }
     
    23232325
    23242326#if KWU_RC_MADPRED_E0227
    2325     printf("Depth based MAD prediction   : %d\n", m_uiDepthMADPred);
     2327    printf("Depth based MAD prediction   : %d\n", m_DepthMADPred);
    23262328#endif
    23272329#if KWU_RC_VIEWRC_E0227
    2328     printf("View-wise Rate control       : %d\n", m_bViewWiseRateCtrl);
    2329     if(m_bViewWiseRateCtrl)
     2330    printf("View-wise Rate control       : %d\n", m_ViewWiseRateCtrl);
     2331    if(m_ViewWiseRateCtrl)
    23302332    {
    23312333
    23322334      printf("ViewWiseTargetBits           : ");
    23332335      for (int i = 0 ; i < m_iNumberOfViews ; i++)
    2334         printf("%d ", m_pchViewTargetBits[i]);
     2336        printf("%d ", m_ViewTargetBits[i]);
    23352337      printf("\n");
    23362338    }
     
    23492351
    23502352#if KWU_RC_MADPRED_E0227
    2351     printf("Depth based MAD prediction   : %d\n", m_uiDepthMADPred);
     2353    printf("Depth based MAD prediction   : %d\n", m_DepthMADPred);
    23522354#endif
    23532355#if KWU_RC_VIEWRC_E0227
    2354     printf("View-wise Rate control       : %d\n", m_bViewWiseRateCtrl);
    2355     if(m_bViewWiseRateCtrl)
     2356    printf("View-wise Rate control       : %d\n", m_ViewWiseRateCtrl);
     2357    if(m_ViewWiseRateCtrl)
    23562358    {
    23572359
    23582360      printf("ViewWiseTargetBits           : ");
    23592361      for (int i = 0 ; i < m_iNumberOfViews ; i++)
    2360         printf("%d ", m_pchViewTargetBits[i]);
     2362        printf("%d ", m_ViewTargetBits[i]);
    23612363      printf("\n");
    23622364    }
  • branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder/TAppEncCfg.h

    r635 r636  
    369369
    370370#if KWU_RC_VIEWRC_E0227
    371   vector<Int>     m_pchViewTargetBits;
    372   bool      m_bViewWiseRateCtrl;                              ///< Flag for using view-wise rate control
     371  vector<Int>     m_ViewTargetBits;
     372  bool      m_ViewWiseRateCtrl;                              ///< Flag for using view-wise rate control
    373373#endif
    374374#if KWU_RC_MADPRED_E0227
    375   UInt       m_uiDepthMADPred;
     375  UInt       m_DepthMADPred;
    376376#endif
    377377#else
     
    381381
    382382#if KWU_RC_VIEWRC_E0227
    383   vector<Int>     m_pchViewTargetBits;
    384   bool      m_bViewWiseRateCtrl;                              ///< Flag for using view-wise rate control
     383  vector<Int>     m_ViewTargetBits;
     384  bool      m_ViewWiseRateCtrl;                              ///< Flag for using view-wise rate control
    385385#endif
    386386#if KWU_RC_MADPRED_E0227
    387   UInt       m_uiDepthMADPred;
     387  UInt       m_DepthMADPred;
    388388#endif
    389389#endif
  • branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder/TAppEncTop.cpp

    r635 r636  
    512512  m_cTEncTop.setSignHideFlag(m_signHideFlag);
    513513#if RATE_CONTROL_LAMBDA_DOMAIN
     514#if KWU_RC_MADPRED_E0227
    514515  if(!m_cTEncTop.getIsDepth())    //only for texture
     516  {
    515517    m_cTEncTop.setUseRateCtrl         ( m_RCEnableRateControl );
     518  }
    516519  else
     520  {
    517521    m_cTEncTop.setUseRateCtrl         ( 0 );
     522  }
     523#else
     524  m_cTEncTop.setUseRateCtrl         ( m_RCEnableRateControl );
     525#endif
    518526#if !KWU_RC_VIEWRC_E0227
    519527  m_cTEncTop.setTargetBitrate       ( m_RCTargetBitrate );
     
    528536  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
    529537  {
    530     m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_uiDepthMADPred       : 0);
     538    m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_DepthMADPred       : 0);
    531539
    532540    if(m_cTEncTop.getUseDepthMADPred())
     541    {
    533542      m_cTEncTop.setCamParam(&m_cCameraData);
     543    }
    534544  }
    535545#endif
     
    537547  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
    538548  {
    539     m_cTEncTop.setUseViewWiseRateCtrl(m_bViewWiseRateCtrl);
     549    m_cTEncTop.setUseViewWiseRateCtrl(m_ViewWiseRateCtrl);
    540550
    541551    if(m_iNumberOfViews == 1)
    542552    {
    543       if(m_bViewWiseRateCtrl)
    544       {
    545         m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     553      if(m_ViewWiseRateCtrl)
     554      {
     555        m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]);
    546556      }
    547557      else
     558      {
    548559        m_cTEncTop.setTargetBitrate       ( m_RCTargetBitrate );
     560      }
    549561    }
    550562    else
    551563    {
    552       if(m_bViewWiseRateCtrl)
    553       {
    554         m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     564      if(m_ViewWiseRateCtrl)
     565      {
     566        m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]);
    555567      }
    556568      else
     
    559571        {
    560572          if(m_cTEncTop.getViewId() == 0)
     573          {
    561574            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*80)/100 );
     575          }
    562576          else if(m_cTEncTop.getViewId() == 1)
     577          {
    563578            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*20)/100 );
     579          }
    564580        }
    565581        else if(m_iNumberOfViews == 3)
    566582        {
    567583          if(m_cTEncTop.getViewId() == 0)
     584          {
    568585            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*66)/100 );
     586          }
    569587          else if(m_cTEncTop.getViewId() == 1)
     588          {
    570589            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*17)/100 );
     590          }
    571591          else if(m_cTEncTop.getViewId() == 2)
     592          {
    572593            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*17)/100 );
     594          }
    573595        }
    574596        else
     597        {
    575598          m_cTEncTop.setTargetBitrate              ( m_RCTargetBitrate );
    576       }
    577     }
    578   }
    579 #endif
    580 #else
     599        }
     600      }
     601    }
     602  }
     603#endif
     604#else
     605#if KWU_RC_MADPRED_E0227
    581606  if(!m_cTEncTop.getIsDepth())    //only for texture
    582607  {
     
    588613  }
    589614  else
     615  {
    590616    m_cTEncTop.setUseRateCtrl         ( 0 );
     617  }
     618#else
     619  m_cTEncTop.setUseRateCtrl     ( m_enableRateCtrl);
     620  m_cTEncTop.setTargetBitrate   ( m_targetBitrate);
     621  m_cTEncTop.setNumLCUInUnit    ( m_numLCUInUnit);
     622#endif
    591623 
    592624#if KWU_RC_MADPRED_E0227
    593625  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
    594626  {
    595     m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_uiDepthMADPred       : 0);
     627    m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_DepthMADPred       : 0);
    596628
    597629    if(m_cTEncTop.getUseDepthMADPred())
     630    {
    598631      m_cTEncTop.setCamParam(&m_cCameraData);
     632    }
    599633  }
    600634#endif
     
    603637  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
    604638  {
    605     m_cTEncTop.setUseViewWiseRateCtrl(m_bViewWiseRateCtrl);
     639    m_cTEncTop.setUseViewWiseRateCtrl(m_ViewWiseRateCtrl);
    606640    if(m_iNumberOfViews == 1)
    607641    {
    608       if(m_bViewWiseRateCtrl)
    609       {
    610         m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     642      if(m_ViewWiseRateCtrl)
     643      {
     644        m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]);
    611645      }
    612646      else
     647      {
    613648        m_cTEncTop.setTargetBitrate       ( m_targetBitrate );
     649      }
    614650    }
    615651    else
    616652    {
    617       if(m_bViewWiseRateCtrl)
    618       {
    619         m_cTEncTop.setTargetBitrate(m_pchViewTargetBits[layerIdInVps>>1]);
     653      if(m_ViewWiseRateCtrl)
     654      {
     655        m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]);
    620656      }
    621657      else
     
    624660        {
    625661          if(m_cTEncTop.getViewId() == 0)
     662          {
    626663            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*80)/100 );
     664          }
    627665          else if(m_cTEncTop.getViewId() == 1)
     666          {
    628667            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*20)/100 );
     668          }
    629669        }
    630670        else if(m_iNumberOfViews == 3)
    631671        {
    632672          if(m_cTEncTop.getViewId() == 0)
     673          {
    633674            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*66)/100 );
     675          }
    634676          else if(m_cTEncTop.getViewId() == 1)
     677          {
    635678            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*17)/100 );
     679          }
    636680          else if(m_cTEncTop.getViewId() == 2)
     681          {
    637682            m_cTEncTop.setTargetBitrate              ( (m_targetBitrate*17)/100 );
     683          }
    638684        }
    639685        else
     686        {
    640687          m_cTEncTop.setTargetBitrate              ( m_targetBitrate );
     688        }
    641689      }
    642690    }
  • branches/HTM-8.2-dev0-KWU/source/Lib/TAppCommon/TAppComCamPara.cpp

    r635 r636  
    15301530#if KWU_RC_MADPRED_E0227
    15311531Void
    1532   TAppComCamPara::RCGetZNearZFar( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar )
     1532  TAppComCamPara::getZNearZFar( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar )
    15331533{
    15341534  UInt uiFoundLine = -1;
     
    15471547
    15481548Void
    1549   TAppComCamPara::RCGetGeometryData( Int iView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated )
     1549  TAppComCamPara::getGeometryData( Int iView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated )
    15501550{
    15511551  UInt uiFoundLine = -1;
  • branches/HTM-8.2-dev0-KWU/source/Lib/TAppCommon/TAppComCamPara.h

    r635 r636  
    222222
    223223#if KWU_RC_MADPRED_E0227
    224   Void  RCGetZNearZFar             ( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar );
    225   Void  RCGetGeometryData          ( Int dView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated );
     224  Void  getZNearZFar             ( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar );
     225  Void  getGeometryData          ( Int dView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated );
    226226#endif
    227227};
  • branches/HTM-8.2-dev0-KWU/source/Lib/TLibCommon/TypeDef.h

    r635 r636  
    310310#define RATE_CONTROL_INTRA                          1  ///< JCTVC-M0257, rate control for intra
    311311#endif
    312 #define KWU_RC_VIEWRC_E0227                         0  ///< JCT3V-E0227, view-wise target bitrate allocation
    313 #define KWU_RC_MADPRED_E0227                        0  ///< JCT3V-E0227, inter-view MAD prediction
     312#define KWU_RC_VIEWRC_E0227                         1  ///< JCT3V-E0227, view-wise target bitrate allocation
     313#define KWU_RC_MADPRED_E0227                        1  ///< JCT3V-E0227, inter-view MAD prediction
    314314
    315315#define MAX_CPB_CNT                     32  ///< Upper bound of (cpb_cnt_minus1 + 1)
  • branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncCu.cpp

    r635 r636  
    242242 
    243243  m_bUseSBACRD        = pcEncTop->getUseSBACRD();
     244
     245#if KWU_RC_MADPRED_E0227
    244246  if(!pcEncTop->getIsDepth())
     247  {
    245248    m_pcRateCtrl        = pcEncTop->getRateCtrl();
     249  }
    246250  else
    247251  {
    248252    m_pcRateCtrl = NULL;
    249253  }
     254#else
     255  m_pcRateCtrl        = pcEncTop->getRateCtrl();
     256#endif
    250257}
    251258
     
    21242131#endif
    21252132
    2126 #if RATE_CONTROL_LAMBDA_DOMAIN  && !M0036_RC_IMPROVEMENT
    2127 #if KWU_RC_MADPRED_E0227
     2133#if RATE_CONTROL_LAMBDA_DOMAIN  && (!M0036_RC_IMPROVEMENT || KWU_RC_MADPRED_E0227)
    21282134  if ( m_pcEncCfg->getUseRateCtrl() && m_pcEncCfg->getLCULevelRC() && ePartSize == SIZE_2Nx2N && uhDepth <= m_addSADDepth )
    21292135  {
     
    21332139    m_temporalSAD = (Int)SAD;
    21342140  }
    2135 #endif
    21362141#endif
    21372142#if !RATE_CONTROL_LAMBDA_DOMAIN  && KWU_RC_MADPRED_E0227
     
    22682273  rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
    22692274 
    2270 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT
    2271 #if KWU_RC_MADPRED_E0227
     2275#if RATE_CONTROL_LAMBDA_DOMAIN && (!M0036_RC_IMPROVEMENT || KWU_RC_MADPRED_E0227)
    22722276  UChar uhDepth = rpcTempCU->getDepth( 0 );
    22732277  if ( m_pcEncCfg->getUseRateCtrl() && m_pcEncCfg->getLCULevelRC() && eSize == SIZE_2Nx2N && uhDepth <= m_addSADDepth )
     
    22782282    m_spatialSAD = (Int)SAD;
    22792283  }
    2280 #endif
    22812284#endif
    22822285#if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_RC_MADPRED_E0227
  • branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncGOP.cpp

    r635 r636  
    984984#if KWU_RC_MADPRED_E0227
    985985      if(m_pcCfg->getLayerId() != 0)
     986      {
    986987        m_pcRateCtrl->getRCPic()->setIVPic( m_pcEncTop->getEncTop()->getTEncTop(0)->getRateCtrl()->getRCPic() );
    987       //getEncTop()->getEncTop();//->getTEncTop(0);//->getUseRateCtrl()->getRCPic();
     988      }
    988989#endif
    989990
     
    10371038          list<TEncRCPic*> listPreviousPicture = m_pcRateCtrl->getPicList();
    10381039          lambda  = m_pcRateCtrl->getRCPic()->estimatePicLambdaIV( listPreviousPicture, pcSlice->getPOC() );
    1039           //printf("lambda : %lf\n", lambda);
    10401040          sliceQP = m_pcRateCtrl->getRCPic()->estimatePicQP( lambda, listPreviousPicture );
    10411041        }
  • branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncRateCtrl.cpp

    r635 r636  
    726726  m_lastPicture = NULL;
    727727  list<TEncRCPic*>::reverse_iterator it;
     728#if KWU_RC_MADPRED_E0227
    728729  for ( it = listPreviousPictures.rbegin(); it != listPreviousPictures.rend(); it++ )
    729730  {
     
    734735    }
    735736  }
     737#endif
    736738#endif
    737739
     
    10921094  {
    10931095    Pel*  pOrg    = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0);
    1094     Pel*  pRec    = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvPred()->getLumaAddr(pcCU->getAddr(), 0);
     1096    Pel*  pRec    = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), 0);
    10951097    Pel*  pDep    = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0);
    10961098    Int   iStride = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getStride();
     
    11211123    pcCU->getPosInPic(0, PosX, PosY);
    11221124    if((PosX + *iDisparity) < 0 || (PosX + *iDisparity + iWidth) >= pcCU->getSlice()->getSPS()->getMaxCUWidth())
     1125    {
    11231126      Disp = 0;
     1127    }
    11241128
    11251129    for( y = 0; y < iHeight; y++ )
     
    11381142    m_LCUs[ LCUIdx ].m_IVMAD = IVMAD;
    11391143    if(m_lastPicture)
     1144    {
    11401145      m_LCUs[ LCUIdx ].m_MAD = m_lastPicture->getLCU(LCUIdx).m_MAD;
     1146    }
    11411147
    11421148    MAD = m_LCUs[ LCUIdx ].m_IVMAD;
     
    20762082  m_sourceHeightInLCU        = (sourceHeight / maxCUHeight) + (( sourceHeight %  maxCUHeight) ? 1 : 0); 
    20772083  m_isLowdelay               = (sizeIntraPeriod == -1) ? true : false;
     2084#if KWU_RC_MADPRED_E0227
    20782085  m_prevBitrate              = ( targetKbps * 1000 );  // in units of 1,024 bps
    20792086  m_currBitrate              = ( targetKbps * 1000 );
     2087#else
     2088  m_prevBitrate              = ( targetKbps << 10 );  // in units of 1,024 bps
     2089  m_currBitrate              = ( targetKbps << 10 );
     2090#endif
    20802091  m_frameRate                = frameRate;
    20812092  m_refFrameNum              = m_isLowdelay ? (sizeGOP) : (sizeGOP>>1);
     
    24532464
    24542465  Pel*  pOrg   = pcCU->getPic()->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0);
    2455   Pel*  pRec   = pcCU->getPic()->getPicYuvPred()->getLumaAddr(pcCU->getAddr(), 0);
     2466  Pel*  pRec   = pcCU->getPic()->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), 0);
    24562467  Int   stride = pcCU->getPic()->getStride();
    24572468
     
    24832494
    24842495  Pel*  pOrg    = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0);
    2485   Pel*  pRec    = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvPred()->getLumaAddr(pcCU->getAddr(), 0);
     2496  Pel*  pRec    = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), 0);
    24862497  Pel*  pDep    = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0);
    24872498  Int   iStride = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getStride();
  • branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncSlice.cpp

    r635 r636  
    157157  m_pdRdPicQp         = (Double*)xMalloc( Double, m_pcCfg->getDeltaQpRD() * 2 + 1 );
    158158  m_piRdPicQp         = (Int*   )xMalloc( Int,    m_pcCfg->getDeltaQpRD() * 2 + 1 );
     159#if KWU_RC_MADPRED_E0227
    159160  if(m_pcCfg->getUseRateCtrl())
     161  {
    160162    m_pcRateCtrl        = pcEncTop->getRateCtrl();
     163  }
    161164  else
     165  {
    162166    m_pcRateCtrl        = NULL;
     167  }
     168#else
     169  m_pcRateCtrl        = pcEncTop->getRateCtrl();
     170#endif
    163171}
    164172
     
    11361144        Int Direction = pcSlice->getViewId() - pcCU->getSlice()->getIvPic(false, 0)->getViewId();
    11371145
    1138         pcEncTop->getCamParam()->RCGetZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf);
    1139         pcEncTop->getCamParam()->RCGetGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated);
    1140         pcEncTop->getCamParam()->RCGetGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated);
     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);
    11411149
    11421150        m_pcRateCtrl->updateLCUDataEnhancedView(pcCU, pcCU->getTotalBits(), pcCU->getQP(0), BasePos, Position, FocalLength, Zn, Zf, (Direction > 0 ? 1 : -1));
     
    12501258            Int iDisparity;
    12511259
    1252             pcEncTop->getCamParam()->RCGetZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf);
    1253             pcEncTop->getCamParam()->RCGetGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated);
    1254             pcEncTop->getCamParam()->RCGetGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated);
     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);
    12551263            bpp       = m_pcRateCtrl->getRCPic()->getLCUTargetBppforInterView( m_pcRateCtrl->getPicList(), pcCU,
    12561264                            BasePos, Position, FocalLength, Zn, Zf, (Direction > 0 ? 1 : -1), &iDisparity );
Note: See TracChangeset for help on using the changeset viewer.