Changeset 389 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
10 Sep 2013, 17:27:55 (12 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@…>

Location:
branches/SHM-3.1-dev/source/Lib/TLibDecoder
Files:
6 edited

Legend:

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

    r386 r389  
    542542  READ_UVLC(     uiCode, "sps_seq_parameter_set_id" );           pcSPS->setSPSId( uiCode );
    543543  assert(uiCode <= 15);
    544  
    545   READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
    546   assert(uiCode <= 3);
    547   // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
    548   assert (uiCode == 1);
    549   if( uiCode == 3 )
    550   {
    551     READ_FLAG(     uiCode, "separate_colour_plane_flag");        assert(uiCode == 0);
    552   }
    553 
    554   READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
    555   READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
     544
     545#if REPN_FORMAT_IN_VPS
     546  if( pcSPS->getLayerId() > 0 )
     547  {
     548    READ_FLAG( uiCode, "update_rep_format_flag" );                 
     549    pcSPS->setUpdateRepFormatFlag( uiCode ? true : false );
     550  }
     551  else
     552  {
     553    pcSPS->setUpdateRepFormatFlag( true );
     554  }
     555  if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() )
     556  {
     557#endif
     558    READ_UVLC(     uiCode, "chroma_format_idc" );                  pcSPS->setChromaFormatIdc( uiCode );
     559    assert(uiCode <= 3);
     560    // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream
     561    assert (uiCode == 1);
     562    if( uiCode == 3 )
     563    {
     564      READ_FLAG(     uiCode, "separate_colour_plane_flag");        assert(uiCode == 0);
     565    }
     566
     567    READ_UVLC (    uiCode, "pic_width_in_luma_samples" );          pcSPS->setPicWidthInLumaSamples ( uiCode    );
     568    READ_UVLC (    uiCode, "pic_height_in_luma_samples" );         pcSPS->setPicHeightInLumaSamples( uiCode    );
     569#if REPN_FORMAT_IN_VPS
     570  }
     571#endif
    556572  READ_FLAG(     uiCode, "conformance_window_flag");
    557573  if (uiCode != 0)
    558574  {
    559575    Window &conf = pcSPS->getConformanceWindow();
     576#if REPN_FORMAT_IN_VPS
     577    READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode );
     578    READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode );
     579    READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode );
     580    READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode );
     581#else
    560582    READ_UVLC(   uiCode, "conf_win_left_offset" );               conf.setWindowLeftOffset  ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    561583    READ_UVLC(   uiCode, "conf_win_right_offset" );              conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) );
    562584    READ_UVLC(   uiCode, "conf_win_top_offset" );                conf.setWindowTopOffset   ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    563585    READ_UVLC(   uiCode, "conf_win_bottom_offset" );             conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) );
    564   }
    565 
    566   READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
    567   assert(uiCode <= 6);
    568   pcSPS->setBitDepthY( uiCode + 8 );
    569   pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
    570 
    571   READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
    572   assert(uiCode <= 6);
    573   pcSPS->setBitDepthC( uiCode + 8 );
    574   pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
    575 
     586#endif
     587  }
     588#if REPN_FORMAT_IN_VPS
     589  if(  pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() )
     590  {
     591#endif
     592    READ_UVLC(     uiCode, "bit_depth_luma_minus8" );
     593    assert(uiCode <= 6);
     594    pcSPS->setBitDepthY( uiCode + 8 );
     595    pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );
     596
     597    READ_UVLC( uiCode,    "bit_depth_chroma_minus8" );
     598    assert(uiCode <= 6);
     599    pcSPS->setBitDepthC( uiCode + 8 );
     600    pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );
     601#if REPN_FORMAT_IN_VPS
     602  }
     603#endif
    576604  READ_UVLC( uiCode,    "log2_max_pic_order_cnt_lsb_minus4" );   pcSPS->setBitsForPOC( 4 + uiCode );
    577605  assert(uiCode <= 12);
     
    11071135#endif
    11081136#endif
     1137#if REPN_FORMAT_IN_VPS
     1138  READ_FLAG( uiCode, "rep_format_idx_present_flag");
     1139  vps->setRepFormatIdxPresentFlag( uiCode ? true : false );
     1140
     1141  if( vps->getRepFormatIdxPresentFlag() )
     1142  {
     1143    READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" );
     1144    vps->setVpsNumRepFormats( uiCode + 1 );
     1145  }
     1146  else
     1147  {
     1148    // default assignment
     1149    assert (vps->getMaxLayers() <= 16);       // If max_layers_is more than 15, num_rep_formats has to be signaled
     1150    vps->setVpsNumRepFormats( vps->getMaxLayers() );
     1151  }
     1152  for(Int i = 0; i < vps->getVpsNumRepFormats(); i++)
     1153  {
     1154    // Read rep_format_structures
     1155    parseRepFormat( vps->getVpsRepFormat(i) );
     1156  }
     1157 
     1158  // Default assignment for layer 0
     1159  vps->setVpsRepFormatIdx( 0, 0 );
     1160  if( vps->getRepFormatIdxPresentFlag() )
     1161  {
     1162    for(Int i = 1; i < vps->getMaxLayers(); i++)
     1163    {
     1164      if( vps->getVpsNumRepFormats() > 1 )
     1165      {
     1166        READ_CODE( 4, uiCode, "vps_rep_format_idx[i]" );
     1167        vps->setVpsRepFormatIdx( i, uiCode );
     1168      }
     1169      else
     1170      {
     1171        // default assignment - only one rep_format() structure
     1172        vps->setVpsRepFormatIdx( i, 0 );
     1173      }
     1174    }
     1175  }
     1176  else
     1177  {
     1178    // default assignment - each layer assigned each rep_format() structure in the order signaled
     1179    for(Int i = 1; i < vps->getMaxLayers(); i++)
     1180    {
     1181      vps->setVpsRepFormatIdx( i, i );
     1182    }
     1183  }
     1184#endif
    11091185#if JCTVC_M0458_INTERLAYER_RPS_SIG
    1110    READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
    1111    vps->setMaxOneActiveRefLayerFlag(uiCode);
     1186  READ_FLAG(uiCode, "max_one_active_ref_layer_flag" );
     1187  vps->setMaxOneActiveRefLayerFlag(uiCode);
    11121188#endif
    11131189
     
    11631239}
    11641240#endif
    1165 
     1241#if REPN_FORMAT_IN_VPS
     1242Void  TDecCavlc::parseRepFormat      ( RepFormat *repFormat )
     1243{
     1244  UInt uiCode;
     1245  READ_CODE( 2, uiCode, "chroma_format_idc" );               repFormat->setChromaFormatVpsIdc( uiCode );
     1246 
     1247  if( repFormat->getChromaFormatVpsIdc() == 3 )
     1248  {
     1249    READ_FLAG( uiCode, "separate_colour_plane_flag");        repFormat->setSeparateColourPlaneVpsFlag(uiCode ? true : false);
     1250  }
     1251
     1252  READ_CODE ( 16, uiCode, "pic_width_in_luma_samples" );     repFormat->setPicWidthVpsInLumaSamples ( uiCode );
     1253  READ_CODE ( 16, uiCode, "pic_height_in_luma_samples" );    repFormat->setPicHeightVpsInLumaSamples( uiCode );
     1254 
     1255  READ_CODE( 4, uiCode, "bit_depth_luma_minus8" );           repFormat->setBitDepthVpsLuma  ( uiCode + 8 );
     1256  READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" );         repFormat->setBitDepthVpsChroma( uiCode + 8 );
     1257
     1258}
     1259#endif
    11661260#if VPS_VUI
    11671261Void TDecCavlc::parseVPSVUI(TComVPS *vps)
     
    12851379    rpcSlice->setDependentSliceSegmentFlag(false);
    12861380  }
     1381#if REPN_FORMAT_IN_VPS
     1382  Int numCTUs = ((rpcSlice->getPicWidthInLumaSamples()+sps->getMaxCUWidth()-1)/sps->getMaxCUWidth())*((rpcSlice->getPicHeightInLumaSamples()+sps->getMaxCUHeight()-1)/sps->getMaxCUHeight());
     1383#else
    12871384  Int numCTUs = ((sps->getPicWidthInLumaSamples()+sps->getMaxCUWidth()-1)/sps->getMaxCUWidth())*((sps->getPicHeightInLumaSamples()+sps->getMaxCUHeight()-1)/sps->getMaxCUHeight());
     1385#endif
    12881386  Int maxParts = (1<<(sps->getMaxCUDepth()<<1));
    12891387  UInt sliceSegmentAddress = 0;
     
    18011899    rpcSlice->setSliceQp (26 + pps->getPicInitQPMinus26() + iCode);
    18021900
     1901#if REPN_FORMAT_IN_VPS
     1902    assert( rpcSlice->getSliceQp() >= -rpcSlice->getQpBDOffsetY() );
     1903#else
    18031904    assert( rpcSlice->getSliceQp() >= -sps->getQpBDOffsetY() );
     1905#endif
    18041906    assert( rpcSlice->getSliceQp() <=  51 );
    18051907
     
    21322234  xReadSvlc( iDQp );
    21332235
     2236#if REPN_FORMAT_IN_VPS
     2237  Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY();
     2238#else
    21342239  Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY();
     2240#endif
    21352241  qp = (((Int) pcCU->getRefQP( uiAbsPartIdx ) + iDQp + 52 + 2*qpBdOffsetY )%(52+ qpBdOffsetY)) -  qpBdOffsetY;
    21362242
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r382 r389  
    7878  Void  parseVPSVUI   ( TComVPS* pcVPS );
    7979#endif
     80#if REPN_FORMAT_IN_VPS
     81  Void  parseRepFormat      ( RepFormat *repFormat );
     82#endif
    8083#if SPS_SUB_LAYER_INFO
    8184  Void  parseSPS            ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager );
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCu.cpp

    r345 r389  
    177177  TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx());
    178178  UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
     179#if REPN_FORMAT_IN_VPS
     180  UInt uiWidth  = pcSlice->getPicWidthInLumaSamples();
     181  UInt uiHeight = pcSlice->getPicHeightInLumaSamples();
     182#else
    179183  UInt uiWidth = pcSlice->getSPS()->getPicWidthInLumaSamples();
    180184  UInt uiHeight = pcSlice->getSPS()->getPicHeightInLumaSamples();
     185#endif
    181186  UInt uiGranularityWidth = g_uiMaxCUWidth;
    182187  UInt uiPosX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
     
    230235  TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
    231236  Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr();
     237#if REPN_FORMAT_IN_VPS
     238  if((!bStartInCU) && ( uiRPelX < pcSlice->getPicWidthInLumaSamples()           ) && ( uiBPelY < pcSlice->getPicHeightInLumaSamples()           ) )
     239#else
    232240  if((!bStartInCU) && ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     241#endif
    233242  {
    234243    m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
     
    256265      if ( bSubInSlice )
    257266      {
     267#if REPN_FORMAT_IN_VPS
     268        if ( !ruiIsLast && ( uiLPelX < pcCU->getSlice()->getPicWidthInLumaSamples()           ) && ( uiTPelY < pcCU->getSlice()->getPicHeightInLumaSamples()           ) )
     269#else
    258270        if ( !ruiIsLast && ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )
     271#endif
    259272        {
    260273          xDecodeCU( pcCU, uiIdx, uiDepth+1, ruiIsLast );
     
    385398  TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
    386399  Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr();
     400#if REPN_FORMAT_IN_VPS
     401  if(bStartInCU||( uiRPelX >= pcSlice->getPicWidthInLumaSamples()           ) || ( uiBPelY >= pcSlice->getPicHeightInLumaSamples()           ) )
     402#else
    387403  if(bStartInCU||( uiRPelX >= pcSlice->getSPS()->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     404#endif
    388405  {
    389406    bBoundary = true;
     
    401418     
    402419      Bool binSlice = (pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr())&&(pcCU->getSCUAddr()+uiIdx<pcSlice->getSliceSegmentCurEndCUAddr());
     420#if REPN_FORMAT_IN_VPS
     421      if(binSlice&&( uiLPelX < pcSlice->getPicWidthInLumaSamples()           ) && ( uiTPelY < pcSlice->getPicHeightInLumaSamples()           ) )
     422#else
    403423      if(binSlice&&( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
     424#endif
    404425      {
    405426        xDecompressCU(pcCU, uiIdx, uiNextDepth );
     
    494515 
    495516  //===== inverse transform =====
     517#if REPN_FORMAT_IN_VPS
     518  m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), TEXT_LUMA, pcCU->getSlice()->getQpBDOffsetY(), 0 );
     519#else
    496520  m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 );
     521#endif
    497522
    498523  Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA];
     
    733758  pResi = m_ppcYuvResi[uiDepth]->getLumaAddr();
    734759
     760#if REPN_FORMAT_IN_VPS
     761  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_LUMA, pcCU->getSlice()->getQpBDOffsetY(), 0 );
     762#else
    735763  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 );
     764#endif
    736765
    737766  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, trMode, 0, piCoeff );
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecSbac.cpp

    r345 r389  
    860860  {
    861861    UInt uiSign;
     862#if REPN_FORMAT_IN_VPS
     863    Int qpBdOffsetY = pcCU->getSlice()->getQpBDOffsetY();
     864#else
    862865    Int qpBdOffsetY = pcCU->getSlice()->getSPS()->getQpBDOffsetY();
     866#endif
    863867    m_pcTDecBinIf->decodeBinEP(uiSign);
    864868    iDQp = uiDQp;
  • 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}
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecTop.h

    r380 r389  
    211211  Int       getBLHeight() { return  m_iBLSourceHeight; }
    212212#endif
     213#if REPN_FORMAT_IN_VPS
     214  Void      xInitILRP(TComSlice *slice);
     215#else
    213216  Void      xInitILRP(TComSPS *pcSPS);
     217#endif
    214218  Void      setILRPic(TComPic *pcPic);
    215219#endif
Note: See TracChangeset for help on using the changeset viewer.