Ignore:
Timestamp:
10 Sep 2013, 17:27:55 (11 years ago)
Author:
qualcomm
Message:

Signaling representation format in VPS (MACRO: REPN_FORMAT_IN_VPS)

Includes signaling of representation format - including picture resolution, bit depth, chroma format - in the VPS, with the option of updating them in the SPS. The configuration file has "RepFormatIdx%d" added to indicate for each layer which representation format is used. The rep_format() structures are automatically created by the encoder. If the bit depth and the chroma format are also changed across layers, some more configuration support would be needed.

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r380 r389  
    139139
    140140#if SVC_EXTENSION
    141 Void TDecTop::xInitILRP(TComSPS *pcSPS)
    142 {
     141#if !REPN_FORMAT_IN_VPS
     142Void TDecTop::xInitILRP(TComSPS *pcSPS
     143#else
     144Void TDecTop::xInitILRP(TComSlice *slice)
     145#endif
     146{
     147#if REPN_FORMAT_IN_VPS
     148  TComSPS* pcSPS = slice->getSPS();
     149  Int bitDepthY   = slice->getBitDepthY();
     150  Int bitDepthC   = slice->getBitDepthC();
     151  Int picWidth    = slice->getPicWidthInLumaSamples();
     152  Int picHeight   = slice->getPicHeightInLumaSamples();
     153#endif
    143154  if(m_layerId>0)
    144155  {
     156#if REPN_FORMAT_IN_VPS
     157    g_bitDepthY     = bitDepthY;
     158    g_bitDepthC     = bitDepthC;
     159#else
    145160    g_bitDepthY     = pcSPS->getBitDepthY();
    146161    g_bitDepthC     = pcSPS->getBitDepthC();
     162#endif
    147163    g_uiMaxCUWidth  = pcSPS->getMaxCUWidth();
    148164    g_uiMaxCUHeight = pcSPS->getMaxCUHeight();
     
    165181
    166182        m_cIlpPic[j] = new  TComPic;
     183#if REPN_FORMAT_IN_VPS
     184#if SVC_UPSAMPLING
     185        m_cIlpPic[j]->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true);
     186#else
     187        m_cIlpPic[j]->create(picWidth, picHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true);
     188#endif
     189#else
    167190#if SVC_UPSAMPLING
    168191        m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, pcSPS, true);
    169192#else
    170193        m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true);
     194#endif
    171195#endif
    172196        for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCUsInFrame(); i++)
     
    178202  }
    179203}
     204
     205
    180206
    181207Void TDecTop::setILRPic(TComPic *pcPic)
     
    271297        //TComPic*                      pcPic = *(pcTDecTopBase->getListPic()->begin());
    272298        TComPicYuv* pcPicYuvRecBase = (*(pcTDecTopBase->getListPic()->begin()))->getPicYuvRec();
     299#if REPN_FORMAT_IN_VPS
     300        if(pcPicYuvRecBase->getWidth() != pcSlice->getPicWidthInLumaSamples() || pcPicYuvRecBase->getHeight() != pcSlice->getPicHeightInLumaSamples() || !zeroOffsets )
     301#else
    273302        if(pcPicYuvRecBase->getWidth() != pcSlice->getSPS()->getPicWidthInLumaSamples() || pcPicYuvRecBase->getHeight() != pcSlice->getSPS()->getPicHeightInLumaSamples() || !zeroOffsets )
     303#endif
    274304        {
    275305          rpcPic->setSpatialEnhLayerFlag( i, true );
     
    288318#endif
    289319   
     320#if REPN_FORMAT_IN_VPS
     321#if SVC_UPSAMPLING
     322    rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     323                     conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true);
     324#else
     325    rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     326                     conformanceWindow, defaultDisplayWindow, numReorderPics, true);
     327#endif
     328#else
    290329#if SVC_UPSAMPLING
    291330    rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     
    295334                     conformanceWindow, defaultDisplayWindow, numReorderPics, true);
    296335#endif
     336#endif
     337
    297338    rpcPic->getPicSym()->allocSaoParam(&m_cSAO);
    298339    m_cListPic.pushBack( rpcPic );
     
    334375  rpcPic->destroy();
    335376
     377#if REPN_FORMAT_IN_VPS
     378#if SVC_UPSAMPLING
     379  rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     380                   conformanceWindow, defaultDisplayWindow, numReorderPics, pcSlice->getSPS(), true);
     381
     382#else
     383  rpcPic->create ( pcSlice->getPicWidthInLumaSamples(), pcSlice->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     384                   conformanceWindow, defaultDisplayWindow, numReorderPics, true);
     385#endif
     386#else
    336387#if SVC_UPSAMPLING
    337388  rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
     
    341392  rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth,
    342393                   conformanceWindow, defaultDisplayWindow, numReorderPics, true);
     394#endif
    343395#endif
    344396  rpcPic->getPicSym()->allocSaoParam(&m_cSAO);
     
    548600  m_apcSlicePilot->setSPS(sps);
    549601  pps->setSPS(sps);
     602#if REPN_FORMAT_IN_VPS
    550603  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1);
     604#else
     605  pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1);
     606#endif
    551607  pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) );
    552608
     609#if REPN_FORMAT_IN_VPS
     610  g_bitDepthY     = m_apcSlicePilot->getBitDepthY();
     611  g_bitDepthC     = m_apcSlicePilot->getBitDepthC();
     612#else
    553613  g_bitDepthY     = sps->getBitDepthY();
    554614  g_bitDepthC     = sps->getBitDepthC();
     615#endif
    555616  g_uiMaxCUWidth  = sps->getMaxCUWidth();
    556617  g_uiMaxCUHeight = sps->getMaxCUHeight();
     
    569630
    570631  m_cSAO.destroy();
     632#if REPN_FORMAT_IN_VPS
     633  m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );
     634#else
    571635  m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );
     636#endif
    572637  m_cLoopFilter.create( sps->getMaxCUDepth() );
    573638}
     
    684749  // actual decoding starts here
    685750  xActivateParameterSets();
    686 
     751#if REPN_FORMAT_IN_VPS
     752  // Initialize ILRP if needed, only for the current layer 
     753  // ILRP intialization should go along with activation of parameters sets,
     754  // although activation of parameter sets itself need not be done for each and every slice!!!
     755  xInitILRP(m_apcSlicePilot);
     756#endif
    687757  if (m_apcSlicePilot->isNextSlice())
    688758  {
     
    9541024        const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc);
    9551025
     1026
    9561027        Int widthBL   = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth();
    9571028        Int heightBL  = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight();
     
    11231194#endif
    11241195#if SVC_EXTENSION
     1196#if !REPN_FORMAT_IN_VPS   // ILRP can only be initialized at activation 
    11251197  if(m_numLayer>0)
    11261198  {
    11271199    xInitILRP(sps);
    11281200  }
     1201#endif
    11291202#endif
    11301203}
Note: See TracChangeset for help on using the changeset viewer.