Ignore:
Timestamp:
7 Sep 2015, 18:40:35 (10 years ago)
Author:
tech
Message:

Removed 3D-HEVC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.1-MV-draft-4/source/Lib/TLibEncoder/TEncGOP.cpp

    r1321 r1325  
    101101  m_viewId       = 0;
    102102  m_pocLastCoded = -1;
    103 #if NH_3D
    104   m_viewIndex  =   0;
    105   m_isDepth = false;
    106 #endif
    107103#endif
    108104  m_associatedIRAPType = NAL_UNIT_CODED_SLICE_IDR_N_LP;
     
    150146  m_layerId              = pcTEncTop->getLayerId();
    151147  m_viewId               = pcTEncTop->getViewId();
    152 #if NH_3D
    153   m_viewIndex            = pcTEncTop->getViewIndex();
    154   m_isDepth              = pcTEncTop->getIsDepth();
    155 #endif
    156 #endif
    157 #if NH_3D_IC
    158   m_aICEnableCandidate   = pcTEncTop->getICEnableCandidate();
    159   m_aICEnableNum         = pcTEncTop->getICEnableNum();
    160 #endif
    161 #if KWU_FIX_URQ
    162   m_pcRateCtrl           = pcTEncTop->getRateCtrl();
    163148#endif
    164149}
     
    11841169    pcPic  ->setLayerId     ( getLayerId()   );
    11851170    pcPic  ->setViewId      ( getViewId()    );   
    1186 #if !NH_3D
    11871171    pcSlice->setLayerId     ( getLayerId() );
    11881172    pcSlice->setViewId      ( getViewId()  );   
    11891173    pcSlice->setVPS         ( m_pcEncTop->getVPS() );
    1190 #else
    1191     pcPic  ->setViewIndex   ( getViewIndex() );
    1192     pcPic  ->setIsDepth( getIsDepth() );
    1193     pcSlice->setCamparaSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() );   
    1194 #endif
    11951174#endif
    11961175    //set default slice level flag to the same as SPS level flag
     
    13631342
    13641343    const TComVPS*           vps = pcSlice->getVPS();     
    1365 #if NH_3D
    1366     Int numDirectRefLayers = vps    ->getNumRefListLayers( getLayerId() );
    1367 #else
    13681344    Int numDirectRefLayers = vps    ->getNumDirectRefLayers( getLayerId() );
    1369 #endif
    1370 #if NH_3D
    1371     pcSlice->setIvPicLists( m_ivPicLists );         
    1372 
    1373     Int gopNum = (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid;
    1374     GOPEntry gopEntry      = m_pcCfg->getGOPEntry( gopNum );     
    1375 #else
    13761345    GOPEntry gopEntry      = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid );     
    1377 #endif
    13781346
    13791347
     
    13891357          pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 );
    13901358        }
    1391 #if NH_3D
    1392         if ( gopEntry.m_numActiveRefLayerPics != vps->getNumRefListLayers( getLayerId() ) )
    1393 #else
    13941359        if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) )
    1395 #endif
    13961360        {       
    13971361          interLayerPredLayerIdcPresentFlag = true;
     
    14141378    assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics );
    14151379   
    1416 #if NH_3D
    1417     if ( m_pcEncTop->decProcAnnexI() )
    1418     {   
    1419       pcSlice->deriveInCmpPredAndCpAvailFlag( );
    1420       if ( pcSlice->getInCmpPredAvailFlag() )
    1421       {     
    1422         pcSlice->setInCompPredFlag( gopEntry.m_interCompPredFlag );
    1423       }
    1424       else
    1425       {
    1426         if (gopEntry.m_interCompPredFlag )
    1427         {
    1428           if ( gopNum == MAX_GOP)
    1429           {
    1430             printf( "\nError: FrameI_l%d cannot enable inter-component prediction on slice level. All reference layers need to be available and at least one tool using inter-component prediction must be enabled in the SPS. \n", pcSlice->getVPS()->getLayerIdInVps( getLayerId() ) );
    1431           }
    1432           else
    1433           {
    1434             printf( "\nError: Frame%d_l%d cannot enable inter-component prediction on slice level. All reference layers need to be available and at least one tool using inter-component prediction must be enabled in the SPS. \n", gopNum, pcSlice->getVPS()->getLayerIdInVps( getLayerId() ) );
    1435           }
    1436          
    1437           exit(EXIT_FAILURE);
    1438         }
    1439       }
    1440       pcSlice->init3dToolParameters();
    1441       pcSlice->checkInCompPredRefLayers();
    1442     }   
    1443 #if NH_3D_IV_MERGE
    1444     // This needs to be done after initialization of 3D tool parameters.
    1445     pcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( )   ) ? 1 : 0 ));
    1446 #endif
    1447 #endif
    14481380
    14491381    pcSlice->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 );
     
    14691401    pcSlice->setRefPicList ( rcListPic );
    14701402#endif
    1471 #if NH_3D_NBDV
    1472     pcSlice->setDefaultRefView();
    1473 #endif
    1474 #if NH_3D_ARP
    1475     //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh
    1476     pcSlice->setARPStepNum(m_ivPicLists);
    1477 #endif
    1478 #if NH_3D_IC
    1479     pcSlice->setICEnableCandidate( m_aICEnableCandidate );         
    1480     pcSlice->setICEnableNum( m_aICEnableNum );         
    1481 #endif
    14821403
    14831404    //  Slice info. refinement
     
    15331454
    15341455    pcSlice->setList1IdxToList0Idx();
    1535 #if NH_3D_TMVP
    1536     if(pcSlice->getLayerId())
    1537       pcSlice->generateAlterRefforTMVP();
    1538 #endif
    15391456
    15401457    if (m_pcEncTop->getTMVPModeId() == 2)
     
    15651482#endif
    15661483
    1567 #if NH_3D_VSO
    1568   // Should be moved to TEncTop !!!
    1569   Bool bUseVSO = m_pcEncTop->getUseVSO();
    1570  
    1571   TComRdCost* pcRdCost = m_pcEncTop->getRdCost();   
    1572 
    1573   pcRdCost->setUseVSO( bUseVSO );
    1574 
    1575   // SAIT_VSO_EST_A0033
    1576   pcRdCost->setUseEstimatedVSD( m_pcEncTop->getUseEstimatedVSD() );
    1577 
    1578   if ( bUseVSO )
    1579   {
    1580     Int iVSOMode = m_pcEncTop->getVSOMode();
    1581     pcRdCost->setVSOMode( iVSOMode  );
    1582     pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() );
    1583 
    1584     // SAIT_VSO_EST_A0033
    1585 #if H_3D_FCO
    1586     Bool flagRec;
    1587     flagRec =  ((m_pcEncTop->getIvPicLists()->getPicYuv( pcSlice->getViewIndex(), false, pcSlice->getPOC(), true) == NULL) ? false: true);
    1588     pcRdCost->setVideoRecPicYuv( m_pcEncTop->getIvPicLists()->getPicYuv( pcSlice->getViewIndex(), false, pcSlice->getPOC(), flagRec ) );
    1589     pcRdCost->setDepthPicYuv   ( m_pcEncTop->getIvPicLists()->getPicYuv( pcSlice->getViewIndex(), true, pcSlice->getPOC(), false ) );
    1590 #else
    1591     pcRdCost->setVideoRecPicYuv( m_pcEncTop->getIvPicLists()->getPicYuv( pcSlice->getViewIndex(), false , pcSlice->getPOC(), true ) );
    1592     pcRdCost->setDepthPicYuv   ( m_pcEncTop->getIvPicLists()->getPicYuv( pcSlice->getViewIndex(), true  , pcSlice->getPOC(), false ) );
    1593 #endif
    1594 
    1595     // LGE_WVSO_A0119
    1596     Bool bUseWVSO  = m_pcEncTop->getUseWVSO();
    1597     pcRdCost->setUseWVSO( bUseWVSO );
    1598 
    1599   }
    1600 #endif
    16011484
    16021485    /////////////////////////////////////////////////////////////////////////////////////////////////// Compress a slice
     
    16491532      m_pcRateCtrl->initRCPic( frameLevel );
    16501533
    1651 #if KWU_RC_MADPRED_E0227
    1652       if(m_pcCfg->getLayerId() != 0)
    1653       {
    1654         m_pcRateCtrl->getRCPic()->setIVPic( m_pcEncTop->getEncTop()->getTEncTop(0)->getRateCtrl()->getRCPic() );
    1655       }
    1656 #endif
    16571534
    16581535      estimatedBits = m_pcRateCtrl->getRCPic()->getTargetBits();
     
    16911568      else    // normal case
    16921569      {
    1693 #if KWU_RC_MADPRED_E0227
    1694         if(m_pcRateCtrl->getLayerID() != 0)
    1695         {
    1696           list<TEncRCPic*> listPreviousPicture = m_pcRateCtrl->getPicList();
    1697           lambda  = m_pcRateCtrl->getRCPic()->estimatePicLambdaIV( listPreviousPicture, pcSlice->getPOC() );
    1698           sliceQP = m_pcRateCtrl->getRCPic()->estimatePicQP( lambda, listPreviousPicture );
    1699         }
    1700         else
    1701         {
    1702 #endif
    17031570        list<TEncRCPic*> listPreviousPicture = m_pcRateCtrl->getPicList();
    17041571        lambda  = m_pcRateCtrl->getRCPic()->estimatePicLambda( listPreviousPicture, pcSlice->getSliceType());
    17051572        sliceQP = m_pcRateCtrl->getRCPic()->estimatePicQP( lambda, listPreviousPicture );
    1706 #if KWU_RC_MADPRED_E0227
    1707         }
    1708 #endif
    17091573      }
    17101574
     
    17171581    UInt uiNumSliceSegments = 1;
    17181582
    1719 #if NH_3D_NBDV
    1720       if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    1721       {
    1722         Int iColPoc = pcSlice->getRefPOC(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx());
    1723         pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc));
    1724       }
    1725 #endif
    1726 #if NH_3D
    1727       pcSlice->setDepthToDisparityLUTs();
    1728 
    1729 #endif
    1730 
    1731 #if NH_3D_NBDV
    1732       if(pcSlice->getViewIndex() && !pcSlice->getIsDepth() && !pcSlice->isIntra()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
    1733       {
    1734         pcPic->checkTemporalIVRef();
    1735       }
    1736 
    1737       if(pcSlice->getIsDepth())
    1738       {
    1739         pcPic->checkTextureRef();
    1740       }
    1741 #endif
     1583
    17421584    // Allocate some coders, now the number of tiles are known.
    17431585    const Int numSubstreamsColumns = (pcSlice->getPPS()->getNumTileColumnsMinus1() + 1);
     
    18141656      // write various parameter sets
    18151657      actualTotalBits += xWriteParameterSets(accessUnit, pcSlice);
    1816 #if PPS_FIX_DEPTH
    1817       if(!pcSlice->getIsDepth() || !pcSlice->getViewIndex() )
    1818       {
    1819 #endif
    1820 #if PPS_FIX_DEPTH
    1821       }
    1822 #endif
    18231658
    18241659
     
    19791814    // cabac_zero_words processing
    19801815    cabac_zero_word_padding(pcSlice, pcPic, binCountsInNalUnits, numBytesInVclNalUnits, accessUnit.back()->m_nalUnitData, m_pcCfg->getCabacZeroWordPaddingEnabled());
    1981 #if NH_3D
    1982       pcPic->compressMotion(2);
    1983 #else
    19841816    pcPic->compressMotion();
    1985 #endif
    19861817#if NH_MV
    19871818      m_pocLastCoded = pcPic->getPOC();
     
    21401971}
    21411972
    2142 #if NH_3D_VSO
    2143 Void TEncGOP::preLoopFilterPicAll( TComPic* pcPic, Dist64& ruiDist )
    2144 #else
    21451973Void TEncGOP::preLoopFilterPicAll( TComPic* pcPic, UInt64& ruiDist )
    2146 #endif
    21471974{
    21481975  Bool bCalcDist = false;
     
    22252052}
    22262053
    2227 #if NH_3D_VSO
    2228 Dist64 TEncGOP::xFindDistortionFrame (TComPicYuv* pcPic0, TComPicYuv* pcPic1, const BitDepths &bitDepths)
    2229 #else
    22302054UInt64 TEncGOP::xFindDistortionFrame (TComPicYuv* pcPic0, TComPicYuv* pcPic1, const BitDepths &bitDepths)
    2231 #endif
    2232 {
    2233 #if NH_3D_VSO
    2234   Dist64  uiTotalDiff = 0;
    2235 #else
     2055{
    22362056  UInt64  uiTotalDiff = 0;
    2237 #endif
    22382057
    22392058  for(Int chan=0; chan<pcPic0 ->getNumberValidComponents(); chan++)
     
    23752194      pRec += iRecStride;
    23762195    }
    2377 #if NH_3D_VSO
    2378 #if H_3D_VSO_SYNTH_DIST_OUT
    2379   if ( m_pcRdCost->getUseRenModel() )
    2380   {
    2381     unsigned int maxval = 255 * (1<<(g_uiBitDepth + g_uiBitIncrement -8));
    2382     Double fRefValueY = (double) maxval * maxval * iSize;
    2383     Double fRefValueC = fRefValueY / 4.0;
    2384     TRenModel*  pcRenModel = m_pcEncTop->getEncTop()->getRenModel();
    2385     Int64 iDistVSOY, iDistVSOU, iDistVSOV;
    2386     pcRenModel->getTotalSSE( iDistVSOY, iDistVSOU, iDistVSOV );
    2387     dYPSNR = ( iDistVSOY ? 10.0 * log10( fRefValueY / (Double) iDistVSOY ) : 99.99 );
    2388     dUPSNR = ( iDistVSOU ? 10.0 * log10( fRefValueC / (Double) iDistVSOU ) : 99.99 );
    2389     dVPSNR = ( iDistVSOV ? 10.0 * log10( fRefValueC / (Double) iDistVSOV ) : 99.99 );
    2390   }
    2391   else
    2392   {
    2393 #endif
    2394 #endif
    23952196    const Int maxval = 255 << (pcPic->getPicSym()->getSPS().getBitDepth(toChannelType(ch)) - 8);
    23962197    const Double fRefValue = (Double) maxval * maxval * iSize;
     
    23992200  }
    24002201
    2401 #if NH_3D_VSO
    2402 #if H_3D_VSO_SYNTH_DIST_OUT
    2403 }
    2404 #endif
    2405 #endif 
    24062202  /* calculate the size of the access unit, excluding:
    24072203   *  - any AnnexB contributions (start_code_prefix, zero_byte, etc.,)
Note: See TracChangeset for help on using the changeset viewer.