Ignore:
Timestamp:
5 May 2013, 05:25:40 (12 years ago)
Author:
zhang
Message:

JCT3V-D0177: ARP

Location:
branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp

    r332 r373  
    711711        WRITE_UVLC( pcSPS->getMultiviewMvPredMode(), "multi_view_mv_pred_mode" );
    712712#endif
    713 #if H3D_IVRP
     713#if H3D_IVRP & !QC_ARP_D0177
    714714        WRITE_FLAG  ( pcSPS->getMultiviewResPredMode(), "multi_view_residual_pred_mode" );
    715715#endif
    716716      }
     717#endif
     718#if QC_ARP_D0177
     719      WRITE_FLAG( pcSPS->getUseAdvRP () ? 1 : 0,       "advanced_residual_pred_flag"  );
    717720#endif
    718721    }
     
    13211324}
    13221325#endif
    1323 
     1326#if QC_ARP_D0177
     1327Void TEncCavlc::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
     1328{
     1329  assert( false );
     1330}
     1331#endif
    13241332Void TEncCavlc::codeAlfCtrlFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
    13251333
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h

    r332 r373  
    160160  Void codeResPredFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    161161#endif
     162#if QC_ARP_D0177
     163  virtual Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     164#endif
    162165  Void codeAlfCtrlFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    163166
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCfg.h

    r332 r373  
    333333#endif
    334334#if H3D_IVRP
     335#if QC_ARP_D0177
     336  UInt      m_nUseAdvResPred;
     337  UInt      m_nARPStepNum;
     338#else
    335339  UInt        m_uiMultiviewResPredMode;
     340#endif
    336341#endif
    337342
     
    414419#endif
    415420#if H3D_IVRP
     421#if QC_ARP_D0177
     422  UInt       getUseAdvRP                    ()                  { return m_nUseAdvResPred; }
     423  Void       setUseAdvRP                    ( UInt  u )         { m_nUseAdvResPred = u;    }
     424  UInt       getARPStepNum                  ()                  { return m_nARPStepNum;    }
     425  Void       setARPStepNum                  ( UInt  u )         { m_nARPStepNum = u;       }
     426#else
    416427  Void      setMultiviewResPredMode         ( UInt  u )      { m_uiMultiviewResPredMode     = u; }
     428#endif
    417429#endif
    418430 
     
    809821  Int       getViewOrderIdx                 ()      { return  m_iViewOrderIdx; }    // will be changed to view_id
    810822#endif
     823
    811824};
    812825
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp

    r351 r373  
    6464  m_ppcBestCU      = new TComDataCU*[m_uhTotalDepth-1];
    6565  m_ppcTempCU      = new TComDataCU*[m_uhTotalDepth-1];
    66  
     66#if QC_ARP_D0177
     67  m_ppcWeightedTempCU = new TComDataCU*[m_uhTotalDepth-1];
     68#endif
    6769  m_ppcPredYuvBest = new TComYuv*[m_uhTotalDepth-1];
    6870  m_ppcResiYuvBest = new TComYuv*[m_uhTotalDepth-1];
     
    9193    m_ppcBestCU[i] = new TComDataCU; m_ppcBestCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
    9294    m_ppcTempCU[i] = new TComDataCU; m_ppcTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
    93    
     95#if QC_ARP_D0177
     96    m_ppcWeightedTempCU[i] = new TComDataCU; m_ppcWeightedTempCU[i]->create( uiNumPartitions, uiWidth, uiHeight, false, uiMaxWidth >> (m_uhTotalDepth - 1) );
     97#endif   
    9498    m_ppcPredYuvBest[i] = new TComYuv; m_ppcPredYuvBest[i]->create(uiWidth, uiHeight);
    9599    m_ppcResiYuvBest[i] = new TComYuv; m_ppcResiYuvBest[i]->create(uiWidth, uiHeight);
     
    170174    {
    171175      m_ppcResPredTmp [i]->destroy(); delete m_ppcResPredTmp[i];  m_ppcResPredTmp[i] = NULL;
     176    }
     177#endif
     178#if QC_ARP_D0177
     179    if(m_ppcWeightedTempCU[i])
     180    {
     181      m_ppcWeightedTempCU[i]->destroy(); delete m_ppcWeightedTempCU[i]; m_ppcWeightedTempCU[i] = NULL;
    172182    }
    173183#endif
     
    596606      if( rpcTempCU->getSlice()->getSliceType() != I_SLICE )
    597607      {
     608#if QC_ARP_D0177
     609        if(( rpcTempCU->getSlice()->getSPS()->getMultiviewMvPredMode() || rpcTempCU->getSlice()->getSPS()->getUseAdvRP()) && rpcTempCU->getSlice()->getViewId())
     610#else
    598611        if(( rpcTempCU->getSlice()->getSPS()->getMultiviewMvPredMode() || rpcTempCU->getSlice()->getSPS()->getMultiviewResPredMode()) && rpcTempCU->getSlice()->getViewId())
     612#endif
    599613        { 
    600614          PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
     
    624638      {
    625639#if H3D_IVRP
     640#if QC_ARP_D0177
     641        Bool  bResPredAvailable   = false;
     642        Bool  bResPredAllowed     =                    (!rpcBestCU->getSlice()->getSPS()->isDepth                () );
     643        bResPredAllowed           = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId              () );
     644        if( bResPredAllowed )
     645        {
     646          bResPredAvailable       = rpcBestCU->getResidualSamples( 0, true, m_ppcResPredTmp[uiDepth] );
     647        }
     648        for( UInt uiResPrdId = 0; uiResPrdId < (rpcBestCU->getSlice()->getSPS()->getUseAdvRP()? 1: ( bResPredAvailable ? 2 : 1 )); uiResPrdId++ )
     649#else
    626650        Bool  bResPredAvailable   = false;
    627651        UInt uiResPrdId = 0;
     652#endif
    628653        {
    629654          Bool bResPredFlag  = ( uiResPrdId > 0 );
     
    743768      {
    744769#if H3D_IVRP
     770#if QC_ARP_D0177
     771        Bool  bResPredAvailable   = false;
     772        Bool  bResPredAllowed     =                    (!rpcBestCU->getSlice()->getSPS()->isDepth                () );
     773        bResPredAllowed           = bResPredAllowed && ( rpcBestCU->getSlice()->getSPS()->getViewId              () );
     774        if( bResPredAllowed )
     775        {
     776          bResPredAvailable       = rpcBestCU->getResidualSamples( 0, true, m_ppcResPredTmp[uiDepth] );
     777        }
     778        for( UInt uiResPrdId = 0; uiResPrdId < (rpcBestCU->getSlice()->getSPS()->getUseAdvRP()? 1: ( bResPredAvailable ? 2 : 1 )); uiResPrdId++ )
     779#else
    745780        Bool  bResPredAvailable   = false;
    746781        UInt uiResPrdId = 0;
     782#endif
    747783        {
    748784          Bool bResPredFlag  = ( uiResPrdId > 0 );
     
    17951831        );
    17961832#endif
     1833#if QC_ARP_D0177
     1834    m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx, 0, uiDepth);
     1835#endif
    17971836    finishCU(pcCU,uiAbsPartIdx,uiDepth);
    17981837    return;
     
    18611900  Int numValidMergeCand = 0;
    18621901
     1902#if QC_ARP_D0177
     1903  Bool  bResPrdAvail  = rpcTempCU->getResPredAvail( 0 );
     1904  Bool  bResPrdFlag   = rpcTempCU->getResPredFlag ( 0 );
     1905#endif
    18631906#if LGE_ILLUCOMP_B0045
    18641907  Bool  bICFlag = rpcTempCU->getICFlag(0);
     
    18931936  rpcTempCU->getInterMergeCandidates( 0, 0, uhDepth, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
    18941937#endif
    1895 #if H3D_IVRP
     1938#if H3D_IVRP & !QC_ARP_D0177
    18961939  Bool bResPredAvail = rpcTempCU->getResPredAvail(0);
    18971940#endif
    18981941
    18991942  Bool bestIsSkip = false;
    1900  
     1943#if QC_ARP_D0177
     1944  Int nGRPW = rpcTempCU->getSlice()->getARPStepNum() - 1;
     1945  if(nGRPW < 0 || !bResPrdAvail )
     1946    nGRPW = 0;
     1947  for( ; nGRPW >= 0 ; nGRPW-- )
     1948  {
     1949#endif 
    19011950  for( UInt uiMergeCand = 0; uiMergeCand < numValidMergeCand; ++uiMergeCand )
    19021951  {
     
    19321981          rpcTempCU->setPredModeSubParts( MODE_SKIP, 0, uhDepth ); // interprets depth relative to LCU level
    19331982          rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
     1983#if QC_ARP_D0177
     1984          if(rpcTempCU->getSlice()->getSPS()->getUseAdvRP())
     1985            rpcTempCU->setARPWSubParts( ( UChar )nGRPW , 0 , uhDepth );
     1986#endif
    19341987          rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to LCU level
    19351988          rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level
     
    19552008
    19562009#if H3D_IVRP
     2010#if !QC_ARP_D0177
    19572011          rpcTempCU->setResPredAvailSubParts(bResPredAvail, 0, 0, uhDepth);
     2012#else
     2013          rpcTempCU->setResPredAvailSubParts( bResPrdAvail, 0, 0, uhDepth );
     2014          rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
     2015#endif 
    19582016#endif
    19592017#if LGE_ILLUCOMP_B0045
    19602018          rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uhDepth);
    19612019#endif
    1962 
     2020#if QC_ARP_D0177
     2021          if(rpcTempCU->getSlice()->getSPS()->getUseAdvRP())
     2022          {
     2023            bool bSignalflag[2] = {true, true};
     2024            for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
     2025            {
     2026              Int iRefIdx = cMvFieldNeighbours[uiRefListIdx + 2*uiMergeCand].getRefIdx();
     2027              RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
     2028              if(iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx))
     2029                bSignalflag[uiRefListIdx] = false;
     2030            }
     2031            if(!bSignalflag[0]&& !bSignalflag[1])
     2032            {
     2033              rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
     2034            }
     2035          }
     2036#endif
    19632037          // do MC
    19642038#if HHI_INTERVIEW_SKIP
     
    19732047            m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
    19742048#endif
    1975 #if H3D_IVRP
     2049#if H3D_IVRP & !QC_ARP_D0177
    19762050            if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0))
    19772051            {
     
    19922066              m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] );
    19932067#endif
    1994 #if H3D_IVRP
     2068#if H3D_IVRP & !QC_ARP_D0177
    19952069              if (uiMergeCand == 0 && rpcTempCU->getResPredAvail(0))
    19962070              {
     
    20492123    }
    20502124  }
     2125#if QC_ARP_D0177
     2126  }
     2127#endif
    20512128}
    20522129
     
    20662143{
    20672144  UChar uhDepth = rpcTempCU->getDepth( 0 );
    2068  
     2145#if QC_ARP_D0177
     2146  Bool bFirstTime = true;
     2147  Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1;
     2148  if(nARPWMax < 0 || !rpcTempCU->getResPredAvail( 0 ) )
     2149    nARPWMax = 0;
     2150  if( ePartSize != SIZE_2Nx2N)
     2151    nARPWMax = 0;
     2152  Int nARPWStart = 0 , nARPWStep = 1;
     2153  for( Int nCount = 0 , nGRPW = nARPWStart ; nCount <= nARPWMax ; nCount++ , nGRPW += nARPWStep )
     2154  {
     2155    if( bFirstTime == false && rpcTempCU->getSlice()->getSPS()->getUseAdvRP() )
     2156      rpcTempCU->initEstData( rpcTempCU->getDepth(0), rpcTempCU->getQP(0) );
     2157#endif 
    20692158#if HHI_VSO
    20702159  if( m_pcRdCost->getUseRenModel() )
     
    20932182  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    20942183
     2184#if QC_ARP_D0177
     2185  if(rpcTempCU->getSlice()->getSPS()->getUseAdvRP())
     2186    rpcTempCU->setARPWSubParts( ( UChar )nGRPW , 0 , uhDepth );
     2187#endif
     2188#if QC_ARP_D0177
     2189  if( bFirstTime == false && rpcTempCU->getSlice()->getSPS()->getUseAdvRP())
     2190  {
     2191    assert(!rpcTempCU->getSlice()->getSPS()->isDepth());
     2192    rpcTempCU->copyPartFrom( m_ppcWeightedTempCU[uhDepth] , 0 , uhDepth, true );
     2193    rpcTempCU->setARPWSubParts( ( UChar )nGRPW , 0 , uhDepth );
     2194#if MERL_VSP_C0152
     2195    m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth], 0);
     2196#else
     2197    m_pcPredSearch->motionCompensation( rpcTempCU , m_ppcPredYuvTemp[uhDepth] );
     2198#endif
     2199    if(rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N)
     2200    {
     2201      bool bSignalflag[2] = {true, true};
     2202      for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
     2203      {
     2204        RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
     2205        Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0);
     2206        if(iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx))
     2207          bSignalflag[uiRefListIdx] = false;
     2208      }
     2209      if(!bSignalflag[0]&& !bSignalflag[1])
     2210        rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
     2211    }
     2212  }
     2213  else
     2214  {
     2215    bFirstTime = false;
     2216#endif
    20952217#if AMP_MRG
    20962218  rpcTempCU->setMergeAMP (true);
     
    21072229#endif
    21082230#endif
     2231#if QC_ARP_D0177
     2232   if(rpcTempCU->getSlice()->getSPS()->getUseAdvRP())
     2233   {
     2234     m_ppcWeightedTempCU[uhDepth]->copyPartFrom( rpcTempCU , 0 , uhDepth );
     2235     if(rpcTempCU->getSlice()->getSPS()->getUseAdvRP() && rpcTempCU->getPartitionSize(0)==SIZE_2Nx2N)
     2236     {
     2237       bool bSignalflag[2] = {true, true};
     2238       for(UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx ++ )
     2239       {
     2240         RefPicList eRefList = uiRefListIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0;
     2241         Int iRefIdx = rpcTempCU->getCUMvField(eRefList)->getRefIdx(0);
     2242         if(iRefIdx < 0 || rpcTempCU->getSlice()->getPOC() == rpcTempCU->getSlice()->getRefPOC(eRefList, iRefIdx))
     2243           bSignalflag[uiRefListIdx] = false;
     2244       }
     2245       if(!bSignalflag[0]&& !bSignalflag[1])
     2246         rpcTempCU->setARPWSubParts( 0 , 0 , uhDepth );
     2247     }
     2248   }
     2249  }
     2250#endif
    21092251
    21102252#if AMP_MRG
    21112253  if ( !rpcTempCU->getMergeAMP() )
    21122254  {
     2255#if QC_ARP_D0177
     2256    if(rpcTempCU->getSlice()->getSPS()->getUseAdvRP())
     2257      continue;
     2258    else
     2259#endif
    21132260    return;
    21142261  }
     
    21512298  xCheckDQP( rpcTempCU );
    21522299  xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
     2300#if QC_ARP_D0177
     2301  }
     2302#endif
    21532303}
    21542304
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCu.h

    r296 r373  
    6969  TComDataCU**            m_ppcBestCU;      ///< Best CUs in each depth
    7070  TComDataCU**            m_ppcTempCU;      ///< Temporary CUs in each depth
     71#if QC_ARP_D0177
     72  TComDataCU**            m_ppcWeightedTempCU;   
     73#endif
    7174  UChar                   m_uhTotalDepth;
    7275 
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp

    r332 r373  
    456456
    457457
     458#if QC_ARP_D0177
     459Void TEncEntropy::encodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD, UInt uiDepth)
     460{
     461  if( pcCU->getSlice()->getViewId() == 0 || pcCU->getSlice()->getIsDepth() == true || !pcCU->getSlice()->getARPStepNum() )
     462  {
     463    return;
     464  }
     465  assert( pcCU->isIntra( uiAbsPartIdx ) == false );
     466  if( bRD )
     467  {
     468    uiAbsPartIdx = 0;
     469  }
     470  bool bSignalflag[2] = {true, true};
     471  if (!(pcCU->getPartitionSize(uiAbsPartIdx)==SIZE_2Nx2N || pcCU->isSkipped(uiAbsPartIdx)))
     472  {
     473    assert(pcCU->getARPW (uiAbsPartIdx) == 0);
     474    bSignalflag[0] = false;
     475    bSignalflag[1] = false;
     476 }
     477  if (!(bSignalflag[0]|| bSignalflag[1]))
     478  {
     479    assert(pcCU->getARPW (uiAbsPartIdx) == 0);
     480    if (uiDepth != -1)
     481      pcCU->setARPWSubParts(0, uiAbsPartIdx, uiDepth);
     482  }
     483  else
     484     m_pcEntropyCoderIf->codeARPW( pcCU, uiAbsPartIdx );
     485 
     486}
     487#endif
    458488/** parse the fixed length code (smaller than one max value) in ALF
    459489 * \param run: coded value
     
    12331263  {
    12341264    encodePUWise( pcCU, uiAbsPartIdx, bRD );
     1265#if QC_ARP_D0177
     1266    encodeARPW( pcCU , uiAbsPartIdx , bRD );
     1267#endif
    12351268  }
    12361269}
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h

    r332 r373  
    117117  virtual Void codeResPredFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
    118118#endif
     119#if QC_ARP_D0177
     120  virtual Void codeARPW         ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
     121#endif
    119122  virtual Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    120123 
     
    250253  Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx );
    251254  Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPUIdx, Bool bRD = false );
     255#if QC_ARP_D0177
     256  Void encodeARPW              ( TComDataCU* pcCU, UInt uiAbspartIdx , Bool bRD = false, UInt uiDepth = -1);
     257#endif
    252258  Void encodeAlfCtrlFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
    253259
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp

    r332 r373  
    7878  m_pcDepthMapGenerator = NULL;
    7979#endif
    80 #if H3D_IVRP
     80#if H3D_IVRP & !QC_ARP_D0177
    8181  m_pcResidualGenerator = NULL;
    8282#endif
     
    131131  m_pcDepthMapGenerator  = pcTEncTop->getDepthMapGenerator();
    132132#endif
    133 #if H3D_IVRP
     133#if H3D_IVRP & !QC_ARP_D0177
    134134  m_pcResidualGenerator  = pcTEncTop->getResidualGenerator();
    135135#endif
     
    390390      std::vector<TComPic*> apcInterViewRefPics = tAppEncTop->getInterViewRefPics( m_pcEncTop->getViewId(), pcSlice->getPOC(), m_pcEncTop->getIsDepth(), pcSlice->getSPS() );
    391391      pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics );
    392 
     392#if QC_ARP_D0177
     393      pcSlice->setARPStepNum();
     394      if(pcSlice->getARPStepNum() > 1)
     395      {
     396        for(Int iViewIdx = 0; iViewIdx < pcSlice->getViewId(); iViewIdx ++ )
     397          pcSlice->setBaseViewRefPicList( tAppEncTop->getTEncTop( iViewIdx , false )->getListPic(), iViewIdx );
     398      }
     399#endif
    393400      //  Slice info. refinement
    394401      if( pcSlice->getSliceType() == B_SLICE )
     
    754761      m_pcDepthMapGenerator->covertOrgDepthMap( pcPic );
    755762#endif
    756 #if H3D_IVRP
     763#if H3D_IVRP & !QC_ARP_D0177
    757764      m_pcResidualGenerator->initViewComponent( pcPic );
    758765#endif
     
    818825      pcSlice = pcPic->getSlice(0);
    819826
    820 #if H3D_IVRP
     827#if H3D_IVRP & !QC_ARP_D0177
    821828      // set residual picture
    822829      m_pcResidualGenerator->setRecResidualPic( pcPic );
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncGOP.h

    r296 r373  
    9797  TComDepthMapGenerator*  m_pcDepthMapGenerator;
    9898#endif
    99 #if H3D_IVRP
     99#if H3D_IVRP & !QC_ARP_D0177
    100100  TComResidualGenerator*  m_pcResidualGenerator;
    101101#endif
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp

    r332 r373  
    7272#if H3D_IVRP
    7373, m_cResPredFlagSCModel       ( 1,             1,               NUM_RES_PRED_FLAG_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
     74#endif
     75#if QC_ARP_D0177
     76, m_cCUPUARPW                 ( 1,             1,               NUM_ARPW_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
    7477#endif
    7578, m_cCUPartSizeSCModel        ( 1,             1,               NUM_PART_SIZE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     
    158161  m_cResPredFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_RES_PRED_FLAG );
    159162#endif
     163#if QC_ARP_D0177
     164  m_cCUPUARPW.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_ARPW );
     165#endif
    160166  m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
    161167  m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
     
    311317  m_cResPredFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_RES_PRED_FLAG );
    312318#endif
     319#if QC_ARP_D0177
     320  m_cCUPUARPW.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_ARPW );
     321#endif
    313322  m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
    314323  m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
     
    840849}
    841850#endif
    842 
     851#if QC_ARP_D0177
     852Void TEncSbac::codeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx )
     853{
     854  Int nW = pcCU->getARPW( uiAbsPartIdx );
     855  Int nMaxW = pcCU->getSlice()->getARPStepNum() - 1;
     856  assert( 0 <= nW && nW <= nMaxW );
     857  assert(nMaxW > 0);
     858  if( nMaxW > 0 )
     859  {
     860    Int nOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
     861    assert( 0 <= nOffset && nOffset <= 2 );
     862    Int nBinNum = nW + ( nW != nMaxW );
     863    m_pcBinIf->encodeBin( nW != 0 , m_cCUPUARPW.get( 0, 0, 0 + nOffset ) );
     864    if( nBinNum > 1 )
     865       m_pcBinIf->encodeBin( nW == nMaxW , m_cCUPUARPW.get( 0, 0, 3 ) );
     866  }
     867}
     868#endif
    843869Void TEncSbac::codeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    844870{
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h

    r332 r373  
    209209  Void codeResPredFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    210210#endif
     211#if QC_ARP_D0177
     212  virtual Void codeARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx );
     213#endif
    211214  Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    212215#if H3D_IVMP
     
    265268#if H3D_IVRP
    266269  ContextModel3DBuffer m_cResPredFlagSCModel;
     270#endif
     271#if QC_ARP_D0177
     272  ContextModel3DBuffer m_cCUPUARPW;
    267273#endif
    268274  ContextModel3DBuffer m_cCUPartSizeSCModel;
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp

    r332 r373  
    46744674#endif
    46754675      );
     4676#if QC_ARP_D0177
     4677    m_pcEntropyCoder->encodeARPW       ( pcCU , 0 , true );
     4678#endif
    46764679#endif
    46774680#if HHI_MPI
     
    59545957      );
    59555958#endif
     5959#if QC_ARP_D0177
     5960    m_pcEntropyCoder->encodeARPW( pcCU , 0 , true );
     5961#endif
    59565962    ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits();
    59575963  }
     
    59775983#endif
    59785984      );
     5985#if QC_ARP_D0177
     5986    m_pcEntropyCoder->encodeARPW( pcCU , 0 , true );
     5987#endif
    59795988#endif
    59805989#if HHI_MPI
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncTop.cpp

    r332 r373  
    120120  m_cDepthMapGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement, PDM_SUB_SAMP_EXP_X(m_uiPredDepthMapGeneration), PDM_SUB_SAMP_EXP_Y(m_uiPredDepthMapGeneration) );
    121121#endif
    122 #if H3D_IVRP
     122#if H3D_IVRP & !QC_ARP_D0177
    123123  m_cResidualGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
    124124#endif
     
    251251  m_cDepthMapGenerator. destroy();
    252252#endif
    253 #if H3D_IVRP
     253#if H3D_IVRP & !QC_ARP_D0177
    254254  m_cResidualGenerator. destroy();
    255255#endif
     
    347347#endif
    348348#endif
    349 #if H3D_IVRP
     349#if H3D_IVRP & !QC_ARP_D0177
    350350  m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
    351351#endif
     
    722722#endif
    723723#if H3D_IVRP
     724#if QC_ARP_D0177
     725    m_cSPS.setUseAdvRP              ( 0 );
     726    m_cSPS.setARPStepNum            ( 1 );
     727#else
    724728    m_cSPS.setMultiviewResPredMode  ( 0 );
    725729#endif
     730#endif
     731
    726732  }
    727733  else
     
    742748#endif
    743749#if H3D_IVRP
    744       m_cSPS.setMultiviewResPredMode  ( m_uiMultiviewResPredMode );
     750#if QC_ARP_D0177
     751     m_cSPS.setUseAdvRP  ( m_viewId > 0   ? m_nUseAdvResPred : 0 );
     752     m_cSPS.setARPStepNum( m_viewId > 0   ? QC_ARP_WFNR      : 1 );
     753#else
     754     m_cSPS.setMultiviewResPredMode  ( m_uiMultiviewResPredMode );
     755#endif
    745756#endif
    746757    }
     
    751762#endif
    752763#if H3D_IVRP
     764#if QC_ARP_D0177
     765      m_cSPS.setUseAdvRP              ( 0 );
     766      m_cSPS.setARPStepNum            ( 1 );
     767#else
    753768      m_cSPS.setMultiviewResPredMode  ( 0 );
     769#endif
    754770#endif
    755771    }
  • TabularUnified branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncTop.h

    r296 r373  
    103103  TComDepthMapGenerator   m_cDepthMapGenerator;           ///< depth map generator
    104104#endif
    105 #if H3D_IVRP
     105#if H3D_IVRP & !QC_ARP_D0177
    106106  TComResidualGenerator   m_cResidualGenerator;           ///< generator for residual pictures
    107107#endif
     
    234234  TComDepthMapGenerator*  getDepthMapGenerator  () { return  &m_cDepthMapGenerator;   }
    235235#endif
    236 #if H3D_IVRP
     236#if H3D_IVRP & !QC_ARP_D0177
    237237  TComResidualGenerator*  getResidualGenerator  () { return  &m_cResidualGenerator;   }
    238238#endif
Note: See TracChangeset for help on using the changeset viewer.