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/TLibDecoder
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r332 r373  
    14931493#endif
    14941494#if H3D_IVRP
    1495     pcSPS->setMultiviewResPredMode  ( 0 );
    1496 #endif
     1495#if QC_ARP_D0177
     1496     pcSPS->setUseAdvRP  ( 0 );
     1497     pcSPS->setARPStepNum( 1 );
     1498#else
     1499     pcSPS->setMultiviewResPredMode  ( 0 );
     1500#endif
     1501#endif
     1502
    14971503    }
    14981504    else
     
    15441550#endif
    15451551#if H3D_IVRP
     1552#if QC_ARP_D0177
     1553      pcSPS->setUseAdvRP  ( 0 );
     1554      pcSPS->setARPStepNum( 1 );
     1555#else
    15461556      pcSPS->setMultiviewResPredMode  ( 0 );
    15471557#endif
     1558#endif
     1559
    15481560      }
    15491561      else
     
    15731585        UInt uiMultiviewMvPredMode = 0;
    15741586#endif
    1575 #if H3D_IVRP
     1587#if H3D_IVRP & !QC_ARP_D0177
    15761588      UInt uiMultiviewResPredMode = 0;
    15771589#endif
     
    15881600          READ_UVLC( uiMultiviewMvPredMode, "multi_view_mv_pred_mode" );
    15891601#endif
    1590 #if H3D_IVRP
     1602#if H3D_IVRP & !QC_ARP_D0177
    15911603          READ_FLAG( uiMultiviewResPredMode, "multi_view_residual_pred_mode" );
    15921604#endif
     
    15991611#endif
    16001612#if H3D_IVRP
     1613#if QC_ARP_D0177
     1614      READ_FLAG( uiCode , "advanced_residual_pred_flag" );           pcSPS->setUseAdvRP( uiCode );
     1615      if( pcSPS->getUseAdvRP()  )
     1616          pcSPS->setARPStepNum( QC_ARP_WFNR );
     1617      else
     1618       pcSPS->setARPStepNum( 1 );
     1619#else
    16011620      pcSPS->setMultiviewResPredMode  ( uiMultiviewResPredMode );
    16021621#endif
     1622#endif
     1623
    16031624      }
    16041625    }
     
    24242445}
    24252446#endif
    2426 
     2447#if QC_ARP_D0177
     2448Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2449{
     2450  assert( false );
     2451}
     2452#endif
    24272453#if RWTH_SDC_DLT_B0036
    24282454Void TDecCavlc::parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.h

    r332 r373  
    144144  Void parseResPredFlag     ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth );
    145145#endif
     146#if QC_ARP_D0177
     147  Void parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx,UInt uiDepth );
     148#endif
    146149  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    147150  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp

    r351 r373  
    5454  m_ppcYuvResi = NULL;
    5555  m_ppcYuvReco = NULL;
    56 #if H3D_IVRP
     56#if H3D_IVRP & !QC_ARP_D0177
    5757  m_ppcYuvResPred = NULL;
    5858#endif
     
    8282  m_ppcYuvResi = new TComYuv*[m_uiMaxDepth-1];
    8383  m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1];
    84 #if H3D_IVRP
     84#if H3D_IVRP & !QC_ARP_D0177
    8585  m_ppcYuvResPred = new TComYuv*   [m_uiMaxDepth-1];
    8686#endif
     
    9696    m_ppcYuvResi[ui] = new TComYuv;    m_ppcYuvResi[ui]->create( uiWidth, uiHeight );
    9797    m_ppcYuvReco[ui] = new TComYuv;    m_ppcYuvReco[ui]->create( uiWidth, uiHeight );
    98 #if H3D_IVRP
     98#if H3D_IVRP & !QC_ARP_D0177
    9999    m_ppcYuvResPred[ui] = new TComYuv;    m_ppcYuvResPred[ui]->create( uiWidth, uiHeight );
    100100#endif
     
    120120    m_ppcYuvResi[ui]->destroy(); delete m_ppcYuvResi[ui]; m_ppcYuvResi[ui] = NULL;
    121121    m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL;
    122 #if H3D_IVRP
     122#if H3D_IVRP & !QC_ARP_D0177
    123123    m_ppcYuvResPred[ui]->destroy(); delete m_ppcYuvResPred[ui]; m_ppcYuvResPred[ui] = NULL;
    124124#endif
     
    128128  delete [] m_ppcYuvResi; m_ppcYuvResi = NULL;
    129129  delete [] m_ppcYuvReco; m_ppcYuvReco = NULL;
    130 #if H3D_IVRP
     130#if H3D_IVRP & !QC_ARP_D0177
    131131  delete [] m_ppcYuvResPred; m_ppcYuvResPred = NULL;
    132132#endif
     
    317317      if(!pcCU->getSlice()->isIntra())
    318318      {
     319#if QC_ARP_D0177
     320        if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getUseAdvRP())             && pcCU->getSlice()->getViewId())
     321#else
    319322        if(( pcCU->getSlice()->getSPS()->getMultiviewMvPredMode() || pcCU->getSlice()->getSPS()->getMultiviewResPredMode()) && pcCU->getSlice()->getViewId())
     323#endif
    320324        { 
    321325          m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true );
     
    443447    }
    444448#endif
     449#if QC_ARP_D0177
     450    if( pcCU->getSlice()->getSPS()->getUseAdvRP() )
     451    {
     452      pcCU->setResPredAvailSubParts ( false, uiAbsPartIdx, 0, uiDepth );
     453      pcCU->setResPredFlagSubParts  ( false, uiAbsPartIdx, 0, uiDepth );
     454      m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth, m_ppcCU[uiDepth], 0 );
     455    }
     456#endif
    445457    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    446458    return;
     
    494506  }
    495507#endif
    496 
     508#if QC_ARP_D0177
     509  if (pcCU->getSlice()->getSPS()->getUseAdvRP() && pcCU->isIntra( uiAbsPartIdx ) )
     510  {
     511    pcCU->setResPredAvailSubParts ( 0, uiAbsPartIdx, 0, uiDepth );
     512    pcCU->setResPredFlagSubParts  ( 0, uiAbsPartIdx, 0, uiDepth );
     513  }
     514#endif
    497515#if HHI_MPI
    498516    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
     
    704722  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
    705723#endif
    706 #if H3D_IVRP
     724#if H3D_IVRP & !QC_ARP_D0177
    707725  if (pcCU->getMergeFlag(0) && pcCU->getMergeIndex(0)==0 && pcCU->getResPredAvail(0))
    708726  {
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCu.h

    r296 r373  
    6161  TComYuv**           m_ppcYuvResi;       ///< array of residual buffer
    6262  TComYuv**           m_ppcYuvReco;       ///< array of prediction & reconstruction buffer
    63 #if H3D_IVRP
     63#if H3D_IVRP & !QC_ARP_D0177
    6464  TComYuv**           m_ppcYuvResPred;    ///< residual prediction buffer
    6565#endif
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp

    r332 r373  
    108108}
    109109
     110#if QC_ARP_D0177
     111Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx )
     112{
     113  if( pcCU->getSlice()->getViewId() == 0 || pcCU->getSlice()->getIsDepth() == true || !pcCU->getSlice()->getARPStepNum() )
     114    return;
     115  assert( !pcCU->isIntra( uiAbsPartIdx ) );
     116  Bool bResPredAvailable = !pcCU->getSlice()->getARPStepNum() ? false: ((pcCU->getPartitionSize(uiAbsPartIdx)==SIZE_2Nx2N || pcCU->isSkipped(uiAbsPartIdx)) ? true: false);
     117  if(!bResPredAvailable)
     118    pcCU->setARPWSubParts( 0 , uiAbsPartIdx, uiDepth ); 
     119  else
     120    m_pcEntropyDecoderIf->parseARPW( pcCU , uiAbsPartIdx , uiDepth );
     121}
     122#endif
    110123Void TDecEntropy::decodeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    111124{
     
    189202  {
    190203    decodePUWise( pcCU, uiAbsPartIdx, uiDepth, pcSubCU );
     204#if QC_ARP_D0177
     205    if( pcCU->getSlice()->getSPS()->getUseAdvRP() )
     206    {
     207      decodeARPW( pcCU , uiAbsPartIdx , uiDepth, pcSubCU, 0  );
     208    }
     209#endif
    191210  }
    192211}
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.h

    r332 r373  
    106106  virtual Void parseResPredFlag   ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    107107#endif
     108#if QC_ARP_D0177
     109  virtual Void parseARPW         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     110#endif
    108111  virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    109112  virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    198201  Void decodeMergeFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    199202  Void decodeMergeIndex        ( TComDataCU* pcSubCU, UInt uiPartIdx, UInt uiPartAddr, PartSize eCUMode, UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, UInt uiDepth );
     203#if QC_ARP_D0177
     204  Void decodeARPW              ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU, UInt uiPUIdx );
     205#endif
    200206  Void decodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    201207  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecGop.cpp

    r296 r373  
    9393                   ,TComDepthMapGenerator*  pcDepthMapGenerator
    9494#endif
    95 #if H3D_IVRP
     95#if H3D_IVRP & !QC_ARP_D0177
    9696                  ,TComResidualGenerator*  pcResidualGenerator
    9797#endif
     
    109109  m_pcDepthMapGenerator   = pcDepthMapGenerator;
    110110#endif
    111 #if H3D_IVRP
     111#if H3D_IVRP & !QC_ARP_D0177
    112112  m_pcResidualGenerator   = pcResidualGenerator;
    113113#endif
     
    298298      m_pcDepthMapGenerator->predictDepthMap  ( rpcPic );
    299299#endif
    300 #if H3D_IVRP
     300#if H3D_IVRP & !QC_ARP_D0177
    301301      m_pcResidualGenerator->initViewComponent( rpcPic );
    302302#endif
     
    331331  else
    332332  {
    333 #if H3D_IVRP
     333#if H3D_IVRP & !QC_ARP_D0177
    334334    // set residual picture
    335335    m_pcResidualGenerator->setRecResidualPic( rpcPic );
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecGop.h

    r296 r373  
    9090  TComDepthMapGenerator*  m_pcDepthMapGenerator;
    9191#endif
    92 #if H3D_IVRP
     92#if H3D_IVRP & !QC_ARP_D0177
    9393  TComResidualGenerator*  m_pcResidualGenerator;
    9494#endif
     
    118118                 ,TComDepthMapGenerator*  pcDepthMapGenerator
    119119#endif
    120 #if H3D_IVRP
     120#if H3D_IVRP & !QC_ARP_D0177
    121121                ,TComResidualGenerator*  pcResidualGenerator
    122122#endif
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecSbac.cpp

    r332 r373  
    6464#if H3D_IVRP
    6565, m_cResPredFlagSCModel       ( 1,             1,               NUM_RES_PRED_FLAG_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
     66#endif
     67#if QC_ARP_D0177
     68, m_cCUPUARPW                 ( 1,             1,               NUM_ARPW_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
    6669#endif
    6770, m_cCUPartSizeSCModel        ( 1,             1,               NUM_PART_SIZE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     
    162165  m_cResPredFlagSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_RES_PRED_FLAG );
    163166#endif
     167#if QC_ARP_D0177
     168  m_cCUPUARPW.initBuffer                ( sliceType, qp, (UChar*)INIT_ARPW );
     169#endif
    164170  m_cCUAlfCtrlFlagSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_ALF_CTRL_FLAG );
    165171  m_cCUPartSizeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PART_SIZE );
     
    248254#if H3D_IVRP
    249255  m_cResPredFlagSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_RES_PRED_FLAG );
     256#endif
     257#if QC_ARP_D0177
     258  m_cCUPUARPW.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_ARPW );
    250259#endif
    251260  m_cCUAlfCtrlFlagSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG );
     
    22352244}
    22362245#endif
    2237 
     2246#if QC_ARP_D0177
     2247Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     2248{
     2249  UInt nMaxW = pcCU->getSlice()->getARPStepNum() - 1;
     2250  assert (nMaxW >= 0);
     2251  UInt nW = 0;
     2252  if( nMaxW > 0 )
     2253  {
     2254    UInt nOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
     2255    assert( 0 <= nOffset && nOffset <= 2 );
     2256    UInt uiCode = 0;
     2257    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 0 + nOffset ) );
     2258    nW = uiCode;
     2259    if( nW == 1 )   
     2260    {
     2261      m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 3 ) );
     2262      nW += ( uiCode == 1 );
     2263    }
     2264  }
     2265  pcCU->setARPWSubParts( ( UChar )( nW ) , uiAbsPartIdx, uiDepth ); 
     2266}
     2267#endif
    22382268#if LGE_EDGE_INTRA_A0070
    22392269Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecSbac.h

    r332 r373  
    176176  Void parseResPredFlag   ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth );
    177177#endif
     178#if QC_ARP_D0177
     179  Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     180#endif
    178181  Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    179182  Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    218221#if H3D_IVRP
    219222  ContextModel3DBuffer m_cResPredFlagSCModel;
     223#endif
     224#if QC_ARP_D0177
     225  ContextModel3DBuffer m_cCUPUARPW;
    220226#endif
    221227  ContextModel3DBuffer m_cCUPartSizeSCModel;
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp

    r332 r373  
    403403  m_cDepthMapGenerator.destroy();
    404404#endif
    405 #if H3D_IVRP
     405#if H3D_IVRP & !QC_ARP_D0177
    406406  m_cResidualGenerator.destroy();
    407407#endif
     
    420420                    , &m_cDepthMapGenerator
    421421#endif
    422 #if H3D_IVRP
     422#if H3D_IVRP & !QC_ARP_D0177
    423423                    , &m_cResidualGenerator
    424424#endif
     
    434434#endif
    435435#endif
    436 #if H3D_IVRP
     436#if H3D_IVRP & !QC_ARP_D0177
    437437  m_cResidualGenerator.init( &m_cTrQuant, &m_cDepthMapGenerator );
    438438#endif
     
    860860    }
    861861#endif
    862 #if H3D_IVRP
     862#if H3D_IVRP & !QC_ARP_D0177
    863863    m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement );
    864864#endif
     
    10831083    std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() );
    10841084    pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics );
    1085 
     1085#if QC_ARP_D0177
     1086    //pcSlice->setBaseViewRefPicList( m_tAppDecTop->getTDecTop( 0 , false )->getListPic() );
     1087    pcSlice->setARPStepNum();
     1088    if(pcSlice->getARPStepNum() > 1)
     1089    {
     1090      for(Int iViewIdx = 0; iViewIdx < pcSlice->getViewId(); iViewIdx ++ )
     1091        pcSlice->setBaseViewRefPicList( m_tAppDecTop->getTDecTop( iViewIdx, false )->getListPic(), iViewIdx );
     1092    }
     1093#endif
    10861094    // For generalized B
    10871095    // note: maybe not existed case (always L0 is copied to L1 if L1 is empty)
  • branches/HTM-6.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.h

    r296 r373  
    213213  TComDepthMapGenerator   m_cDepthMapGenerator;
    214214#endif
    215 #if H3D_IVRP
     215#if H3D_IVRP & !QC_ARP_D0177
    216216  TComResidualGenerator   m_cResidualGenerator;
    217217#endif
Note: See TracChangeset for help on using the changeset viewer.