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/TEncTop.cpp

    r1321 r1325  
    7979  m_ivPicLists = NULL;
    8080#endif
    81 #if NH_3D_IC
    82   m_aICEnableCandidate = NULL;
    83   m_aICEnableNum = NULL;
    84 #endif
    8581#if NH_MV
    8682  m_cCavlcCoder.setEncTop(this);
     
    126122  if ( m_RCEnableRateControl )
    127123  {
    128 #if KWU_RC_MADPRED_E0227
    129     m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, m_iFrameRate, m_iGOPSize, m_iSourceWidth, m_iSourceHeight,
    130       g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList, getLayerId() );
    131 #else
    132124    m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, m_iFrameRate, m_iGOPSize, m_iSourceWidth, m_iSourceHeight,
    133125        m_maxCUWidth, m_maxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );
    134 #endif
    135126  }
    136127
     
    202193}
    203194
    204 #if KWU_RC_MADPRED_E0227
    205 Void TEncTop::init(TAppEncTop* pcTAppEncTop, Bool isFieldCoding)
    206 #else
    207195Void TEncTop::init(Bool isFieldCoding)
    208 #endif
    209196{
    210197  // initialize SPS
    211 #if H_3D
    212   // Assuming that all PPS indirectly refer to the same VPS via different SPS
    213   m_cSPS.setVPS(m_cVPS);
    214 #endif
    215198  xInitSPS();
    216199  xInitVPS();
     
    228211
    229212  xInitPPSforTiles();
    230 #if NH_3D_IC
    231   m_aICEnableCandidate = new Int[ 10 ];
    232   m_aICEnableNum = new Int[ 10 ];
    233 
    234   for(int i=0;i<10;i++)
    235   {
    236     m_aICEnableCandidate[i]=0;
    237     m_aICEnableNum[i]=0;
    238   }
    239 #endif
    240213
    241214  // initialize processing unit classes
     
    244217  m_cCuEncoder.   init( this );
    245218
    246 #if KWU_RC_MADPRED_E0227
    247   m_pcTAppEncTop = pcTAppEncTop;
    248 #endif
    249219  // initialize transform & quantization class
    250220  m_pcCavlcCoder = getCavlcCoder();
     
    351321  }
    352322  pcPicCurr->setLayerId( getLayerId());
    353 #if NH_3D
    354   pcPicCurr->setScaleOffset( m_cameraParameters->getCodedScale(), m_cameraParameters->getCodedOffset() );
    355 #endif
    356323}
    357324#endif
     
    393360Void TEncTop::encode( Bool flush, TComPicYuv* pcPicYuvOrg, TComPicYuv* pcPicYuvTrueOrg, const InputColourSpaceConversion snrCSC, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int& iNumEncoded )
    394361{
    395 #endif
    396 #if NH_3D
    397   TComPic* picLastCoded = getPic( getGOPEncoder()->getPocLastCoded() );
    398   if( picLastCoded )
    399   {
    400     picLastCoded->compressMotion(1);
    401   }
    402362#endif
    403363#if NH_MV
     
    711671  m_cSPS.setSpsExtensionPresentFlag       ( true );
    712672  m_cSPS.setSpsMultilayerExtensionFlag    ( true );
    713 #if NH_3D
    714   m_cSPS.setSps3dExtensionFlag            ( true );
    715 #endif
    716673#endif
    717674
     
    722679  m_cSPS.setMaxCUHeight            ( m_maxCUHeight       );
    723680  m_cSPS.setMaxTotalCUDepth        ( m_maxTotalCUDepth   );
    724 #if NH_3D
    725   assert( !getIsDepth()  || m_chromaFormatIDC == CHROMA_400 );
    726 #endif
    727681  m_cSPS.setChromaFormatIdc( m_chromaFormatIDC);
    728682  m_cSPS.setLog2DiffMaxMinCodingBlockSize(m_log2DiffMaxMinCodingBlockSize);
     
    987941#if NH_MV
    988942  m_cPPS.setLayerId( getLayerId() );
    989 #if NH_3D
    990   // Check if this condition is still correct
    991   if( getVPS()->getNumRefListLayers( getLayerId() ) > 0 )
    992 #else
    993943  if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 )
    994 #endif
    995944  {
    996945    m_cPPS.setListsModificationPresentFlag( true );
     
    999948  m_cPPS.setSPSId( getLayerIdInVps() );
    1000949  m_cPPS.setPpsMultilayerExtensionFlag    ( true );
    1001 #if NH_3D
    1002   // Might be used for DLT
    1003   m_cPPS.setPps3dExtensionFlag            ( getIsDepth() );
    1004 #endif
    1005 #endif
    1006 
    1007 #if NH_3D_DLT
    1008   // create mapping from depth layer indexes to layer ids
    1009   Int j=0;
    1010   for( Int i=0; i<=getVPS()->getMaxLayersMinus1(); i++ )
    1011   {
    1012     Int layerId = getVPS()->getLayerIdInNuh(i);
    1013     if( getVPS()->getDepthId(layerId) )
    1014       m_cDLT.setDepthIdxToLayerId(j++, layerId);
    1015   }
    1016   m_cPPS.setDLT( m_cDLT );
    1017 #endif
     950#endif
     951
    1018952
    1019953  m_cPPS.setConstrainedIntraPred( m_bUseConstrainedIntraPred );
     
    14861420#endif
    14871421
    1488 #if NH_3D_VSO
    1489 Void TEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset, Int maxCuHeight )
    1490 {
    1491   TRenModel* rendererModel = m_cRdCost.getRenModel();
    1492   rendererModel->setupPart( iHorOffset, std::min( maxCuHeight, (Int) ( m_iSourceHeight - iHorOffset ) )) ;
    1493  
    1494   Int iEncViewSIdx = m_cameraParameters->getBaseId2SortedId()[ iEncViewIdx ];
    1495 
    1496   // setup base views
    1497   Int iNumOfBV = m_renderModelParameters->getNumOfBaseViewsForView( iEncViewSIdx, iEncContent );
    1498 
    1499   for (Int iCurView = 0; iCurView < iNumOfBV; iCurView++ )
    1500   {
    1501     Int iBaseViewSIdx;
    1502     Int iVideoDistMode;
    1503     Int iDepthDistMode;
    1504 
    1505     m_renderModelParameters->getBaseViewData( iEncViewSIdx, iEncContent, iCurView, iBaseViewSIdx, iVideoDistMode, iDepthDistMode );
    1506 
    1507     AOT( iVideoDistMode < 0 || iVideoDistMode > 2 );
    1508 
    1509     Int iBaseViewIdx = m_cameraParameters->getBaseSortedId2Id()[ iBaseViewSIdx ];
    1510 
    1511     TComPicYuv* pcPicYuvVideoRec  = m_ivPicLists->getPicYuv( iBaseViewIdx, false, iPoc, true  );
    1512     TComPicYuv* pcPicYuvDepthRec  = m_ivPicLists->getPicYuv( iBaseViewIdx, true , iPoc, true  );
    1513     TComPicYuv* pcPicYuvVideoOrg  = m_ivPicLists->getPicYuv( iBaseViewIdx, false, iPoc, false );
    1514     TComPicYuv* pcPicYuvDepthOrg  = m_ivPicLists->getPicYuv( iBaseViewIdx, true , iPoc, false );   
    1515 
    1516     TComPicYuv* pcPicYuvVideoRef  = ( iVideoDistMode == 2 ) ? pcPicYuvVideoOrg  : NULL;
    1517     TComPicYuv* pcPicYuvDepthRef  = ( iDepthDistMode == 2 ) ? pcPicYuvDepthOrg  : NULL;
    1518 
    1519     TComPicYuv* pcPicYuvVideoTest = ( iVideoDistMode == 0 ) ? pcPicYuvVideoOrg  : pcPicYuvVideoRec;
    1520     TComPicYuv* pcPicYuvDepthTest = ( iDepthDistMode == 0 ) ? pcPicYuvDepthOrg  : pcPicYuvDepthRec;
    1521 
    1522     AOT( (iVideoDistMode == 2) != (pcPicYuvVideoRef != NULL) );
    1523     AOT( (iDepthDistMode == 2) != (pcPicYuvDepthRef != NULL) );
    1524     AOT( pcPicYuvDepthTest == NULL );
    1525     AOT( pcPicYuvVideoTest == NULL );
    1526 
    1527     rendererModel->setBaseView( iBaseViewSIdx, pcPicYuvVideoTest, pcPicYuvDepthTest, pcPicYuvVideoRef, pcPicYuvDepthRef );
    1528   }
    1529 
    1530   rendererModel->setErrorMode( iEncViewSIdx, iEncContent, 0 );
    1531   // setup virtual views
    1532   Int iNumOfSV  = m_renderModelParameters->getNumOfModelsForView( iEncViewSIdx, iEncContent );
    1533   for (Int iCurView = 0; iCurView < iNumOfSV; iCurView++ )
    1534   {
    1535     Int iOrgRefBaseViewSIdx;
    1536     Int iLeftBaseViewSIdx;
    1537     Int iRightBaseViewSIdx;
    1538     Int iSynthViewRelNum;
    1539     Int iModelNum;
    1540     Int iBlendMode;
    1541     m_renderModelParameters->getSingleModelData(iEncViewSIdx, iEncContent, iCurView, iModelNum, iBlendMode,iLeftBaseViewSIdx, iRightBaseViewSIdx, iOrgRefBaseViewSIdx, iSynthViewRelNum );
    1542 
    1543     Int iLeftBaseViewIdx    = -1;
    1544     Int iRightBaseViewIdx   = -1;
    1545 
    1546     TComPicYuv* pcPicYuvOrgRef  = NULL;
    1547     Int**      ppiShiftLUTLeft  = NULL;
    1548     Int**      ppiShiftLUTRight = NULL;
    1549     Int**      ppiBaseShiftLUTLeft  = NULL;
    1550     Int**      ppiBaseShiftLUTRight = NULL;
    1551 
    1552 
    1553     Int        iDistToLeft      = -1;
    1554 
    1555     Int iSynthViewIdx = m_cameraParameters->synthRelNum2Idx( iSynthViewRelNum );
    1556 
    1557     if ( iLeftBaseViewSIdx != -1 )
    1558     {
    1559       iLeftBaseViewIdx   = m_cameraParameters->getBaseSortedId2Id()   [ iLeftBaseViewSIdx ];
    1560       ppiShiftLUTLeft    = m_cameraParameters->getSynthViewShiftLUTI()[ iLeftBaseViewIdx  ][ iSynthViewIdx  ];
    1561     }
    1562 
    1563     if ( iRightBaseViewSIdx != -1 )
    1564     {
    1565       iRightBaseViewIdx  = m_cameraParameters->getBaseSortedId2Id()   [iRightBaseViewSIdx ];
    1566       ppiShiftLUTRight   = m_cameraParameters->getSynthViewShiftLUTI()[ iRightBaseViewIdx ][ iSynthViewIdx ];
    1567     }
    1568 
    1569     if ( iRightBaseViewSIdx != -1 && iLeftBaseViewSIdx != -1 )
    1570     {
    1571       iDistToLeft          = m_cameraParameters->getRelDistLeft(  iSynthViewIdx , iLeftBaseViewIdx, iRightBaseViewIdx);
    1572       ppiBaseShiftLUTLeft  = m_cameraParameters->getBaseViewShiftLUTI() [ iLeftBaseViewIdx  ][ iRightBaseViewIdx ];
    1573       ppiBaseShiftLUTRight = m_cameraParameters->getBaseViewShiftLUTI() [ iRightBaseViewIdx ][ iLeftBaseViewIdx  ];
    1574 
    1575     }
    1576 
    1577     if ( iOrgRefBaseViewSIdx != -1 )
    1578     {
    1579       pcPicYuvOrgRef = m_ivPicLists->getPicYuv(  m_cameraParameters->getBaseSortedId2Id()[ iOrgRefBaseViewSIdx ] , false, iPoc, false );
    1580       AOF ( pcPicYuvOrgRef );
    1581     }
    1582 
    1583     rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );
    1584   }
    1585 }
    1586 #endif
    15871422
    15881423//! \}
Note: See TracChangeset for help on using the changeset viewer.