Changeset 494 in SHVCSoftware for trunk/source/Lib/TLibEncoder/TEncTop.cpp


Ignore:
Timestamp:
16 Nov 2013, 22:09:25 (11 years ago)
Author:
seregin
Message:

reintegrate branch SHM-4.0-dev

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r442 r494  
    8888  m_bMFMEnabledFlag = false;
    8989#endif
    90 #if SCALED_REF_LAYER_OFFSETS
    9190  m_numScaledRefLayerOffsets = 0;
    92 #endif
    93 #endif
    9491#if POC_RESET_FLAG
    9592  m_pocAdjustmentValue     = 0;
    9693#endif
     94#endif //SVC_EXTENSION
    9795}
    9896
     
    117115  m_cGOPEncoder.        create();
    118116#endif
     117#if AUXILIARY_PICTURES
     118  m_cSliceEncoder.      create( getSourceWidth(), getSourceHeight(), m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     119#else
    119120  m_cSliceEncoder.      create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     121#endif
    120122  m_cCuEncoder.         create( g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight );
    121123  if (m_bUseSAO)
     
    175177    }
    176178  }
     179
     180#if LAYER_CTB
     181  memcpy(g_auiLayerZscanToRaster[m_layerId], g_auiZscanToRaster, sizeof( g_auiZscanToRaster ) );
     182  memcpy(g_auiLayerRasterToZscan[m_layerId], g_auiRasterToZscan, sizeof( g_auiRasterToZscan ) );
     183  memcpy(g_auiLayerRasterToPelX[m_layerId],  g_auiRasterToPelX,  sizeof( g_auiRasterToPelX ) );
     184  memcpy(g_auiLayerRasterToPelY[m_layerId],  g_auiRasterToPelY,  sizeof( g_auiRasterToPelY ) );
     185#endif
    177186}
    178187
     
    601610    else
    602611    {
     612#if AUXILIARY_PICTURES
     613      rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     614#else
    603615      rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
     616#endif
    604617    }
    605618    rcListPicYuvRecOut.pushBack( rpcPicYuvRec );
     
    801814#endif
    802815
     816#if AUXILIARY_PICTURES
     817#if SVC_UPSAMPLING
     818      pcEPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 ,
     819                      m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS);
     820#else
     821      pcEPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 ,
     822                      m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics);
     823#endif
     824#else
    803825#if SVC_UPSAMPLING
    804826      pcEPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 ,
     
    807829      pcEPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, m_cPPS.getMaxCuDQPDepth()+1 ,
    808830                      m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics);
     831#endif
    809832#endif
    810833      rpcPic = pcEPic;
     
    842865#endif
    843866
     867#if AUXILIARY_PICTURES
     868#if SVC_UPSAMPLING
     869      rpcPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     870                      m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics, &m_cSPS);
     871#else
     872      rpcPic->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     873                      m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics);
     874#endif
     875#else
    844876#if SVC_UPSAMPLING
    845877      rpcPic->create( m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     
    849881                      m_conformanceWindow, m_defaultDisplayWindow, m_numReorderPics);
    850882#endif
     883#endif
    851884    }
    852885
     
    871904#if SVC_EXTENSION
    872905  m_cSPS.setLayerId(m_layerId);
    873 #endif
    874906#if REF_IDX_MFM
    875907#if !M0457_COL_PICTURE_SIGNALING
     
    877909#endif
    878910#endif
    879 #if SCALED_REF_LAYER_OFFSETS
    880911  m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets);
    881912  for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++)
     
    883914    m_cSPS.getScaledRefLayerWindow(i) = m_scaledRefLayerWindow[i];
    884915  }
    885 #endif
     916#endif //SVC_EXTENSION
    886917  ProfileTierLevel& profileTierLevel = *m_cSPS.getPTL()->getGeneralPTL();
    887918  profileTierLevel.setLevelIdc(m_level);
     
    914945  m_cSPS.setMaxCUHeight   ( g_uiMaxCUHeight     );
    915946  m_cSPS.setMaxCUDepth    ( g_uiMaxCUDepth      );
     947#if AUXILIARY_PICTURES
     948  m_cSPS.setChromaFormatIdc( m_chromaFormatIDC);
     949#endif
    916950
    917951  Int minCUSize = m_cSPS.getMaxCUWidth() >> ( m_cSPS.getMaxCUDepth()-g_uiAddCUDepth );
     
    11881222  for( Int i = 0; i < getGOPSize()+m_extraRPSs; i++)
    11891223  {
    1190 #if FINAL_RPL_CHANGE_N0082
    1191     GOPEntry ge = m_ppcTEncTop[m_cSPS.getLayerId()]->getGOPEntry(i);
    1192 #else
    11931224    GOPEntry ge = getGOPEntry(i);
    1194 #endif
    11951225    rps = rpsList->getReferencePictureSet(i);
    11961226    rps->setNumberOfPictures(ge.m_numRefPics);
     
    15361566#endif
    15371567
    1538 #if SVC_EXTENSION
    15391568#if !REPN_FORMAT_IN_VPS
    15401569Void TEncTop::xInitILRP()
     
    15591588        m_cIlpPic[j] = new  TComPic;
    15601589#if SVC_UPSAMPLING
     1590#if AUXILIARY_PICTURES
     1591        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true);
     1592#else
    15611593        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true);
     1594#endif
    15621595#else
    15631596        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true);
     
    16111644        m_cIlpPic[j] = new  TComPic;
    16121645#if SVC_UPSAMPLING
     1646#if AUXILIARY_PICTURES
     1647        m_cIlpPic[j]->create(picWidth, picHeight, m_chromaFormatIDC, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true);
     1648#else
    16131649        m_cIlpPic[j]->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, &m_cSPS, true);
     1650#endif
    16141651#else
    16151652        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true);
     
    16241661}
    16251662#endif
    1626 Void TEncTop::setILRPic(TComPic *pcPic)
    1627 {
    1628   for( Int i = 0; i < pcPic->getSlice(0)->getActiveNumILRRefIdx(); i++ )
    1629   {
    1630     Int refLayerIdc = pcPic->getSlice(0)->getInterLayerPredLayerIdc(i);
    1631 
    1632     if(m_cIlpPic[refLayerIdc])
    1633     {
    1634       m_cIlpPic[refLayerIdc]->copyUpsampledPictureYuv(pcPic->getFullPelBaseRec(refLayerIdc), m_cIlpPic[refLayerIdc]->getPicYuvRec());
    1635       m_cIlpPic[refLayerIdc]->getSlice(0)->setPOC(pcPic->getPOC());
    1636       m_cIlpPic[refLayerIdc]->setLayerId(pcPic->getSlice(0)->getBaseColPic(refLayerIdc)->getLayerId()); //set reference layerId
    1637       m_cIlpPic[refLayerIdc]->getPicYuvRec()->setBorderExtension(false);
    1638       m_cIlpPic[refLayerIdc]->getPicYuvRec()->extendPicBorder();
    1639       for (Int j=0; j<m_cIlpPic[refLayerIdc]->getPicSym()->getNumberOfCUsInFrame(); j++)    // set reference CU layerId
    1640       {
    1641         m_cIlpPic[refLayerIdc]->getPicSym()->getCU(j)->setLayerId(m_cIlpPic[refLayerIdc]->getLayerId());
    1642       }
    1643     }
    1644   }
    1645 }
    1646 #endif
    1647 #endif
     1663#endif //SVC_EXTENSION
    16481664//! \}
Note: See TracChangeset for help on using the changeset viewer.