Changeset 1000 in SHVCSoftware for branches/SHM-upgrade


Ignore:
Timestamp:
22 Jan 2015, 07:22:02 (10 years ago)
Author:
seregin
Message:

port using layerIdx in repformat (rev 999)

Location:
branches/SHM-upgrade/source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncTop.cpp

    r998 r1000  
    12491249{
    12501250#if SVC_EXTENSION
     1251  TComVPS* vps = m_acTEncTop[0].getVPS();
     1252  m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers );
     1253
     1254  UInt i = 0, dimIdLen = 0;
     1255
     1256  while((1 << dimIdLen) < m_numLayers)
     1257  {
     1258    dimIdLen++;
     1259  }
     1260  vps->setDimensionIdLen(0, dimIdLen);
     1261  vps->setNuhLayerIdPresentFlag(false);
     1262  vps->setLayerIdInNuh(0, 0);
     1263  vps->setLayerIdInVps(0, 0);
     1264  for(i = 1; i < vps->getMaxLayers(); i++)
     1265  {
     1266    vps->setLayerIdInNuh(i, i);
     1267    vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
     1268    vps->setDimensionId(i, 0, i);
     1269  }
     1270
    12511271  for(UInt layer=0; layer<m_numLayers; layer++)
    12521272  {
     
    12761296#endif
    12771297  }
    1278   m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers );
     1298
    12791299#if VPS_EXTN_OP_LAYER_SETS
    1280   TComVPS* vps = m_acTEncTop[0].getVPS();
    12811300  vps->setMaxLayerId(m_numLayers - 1);    // Set max-layer ID
    12821301
     
    13701389#endif
    13711390#if VPS_EXTN_MASK_AND_DIM_INFO
    1372   UInt i = 0, dimIdLen = 0;
    13731391#if AVC_BASE
    13741392#if VPS_AVC_BL_FLAG_REMOVAL
     
    14081426    vps->setNumScalabilityTypes(0);
    14091427  }
    1410   while((1 << dimIdLen) < m_numLayers)
    1411   {
    1412     dimIdLen++;
    1413   }
    1414   vps->setDimensionIdLen(0, dimIdLen);
    1415   vps->setNuhLayerIdPresentFlag(false);
    1416   vps->setLayerIdInNuh(0, 0);
    1417   vps->setLayerIdInVps(0, 0);
    1418   for(i = 1; i < vps->getMaxLayers(); i++)
    1419   {
    1420     vps->setLayerIdInNuh(i, i);
    1421     vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
    1422     vps->setDimensionId(i, 0, i);
    1423   }
     1428 
    14241429#if AUXILIARY_PICTURES
    14251430  if (m_scalabilityMask[3])
  • branches/SHM-upgrade/source/Lib/TLibCommon/TComSlice.cpp

    r996 r1000  
    39113911  else
    39123912  {
    3913     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getPicWidthVpsInLumaSamples();
     3913    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicWidthVpsInLumaSamples();
    39143914  }
    39153915#else
     
    39203920  else
    39213921  {
    3922     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicWidthVpsInLumaSamples();
     3922    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicWidthVpsInLumaSamples();
    39233923  }
    39243924#endif
     
    39543954  else
    39553955  {
    3956     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getPicHeightVpsInLumaSamples();
     3956    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicHeightVpsInLumaSamples();
    39573957  }
    39583958#else
     
    39633963  else
    39643964  {
    3965     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicHeightVpsInLumaSamples();
     3965    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicHeightVpsInLumaSamples();
    39663966  }
    39673967#endif
     
    40064006  else
    40074007  {
    4008     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getChromaFormatVpsIdc();
     4008    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getChromaFormatVpsIdc();
    40094009  }
    40104010#else
     
    40154015  else
    40164016  {
    4017     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getChromaFormatVpsIdc();
     4017    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getChromaFormatVpsIdc();
    40184018  }
    40194019#endif
     
    40484048  else
    40494049  {
    4050     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getBitDepthVpsLuma();
     4050    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsLuma();
    40514051  }
    40524052#else
     
    40574057  else
    40584058  {
    4059     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsLuma();
     4059    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsLuma();
    40604060  }
    40614061#endif
     
    40904090  else
    40914091  {
    4092     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getBitDepthVpsChroma();
     4092    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsChroma();
    40934093  }
    40944094#else
     
    40994099  else
    41004100  {
    4101     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsChroma();
     4101    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsChroma();
    41024102  }
    41034103#endif
     
    41434143  else
    41444144  {
    4145     return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getConformanceWindowVps();
     4145    return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getConformanceWindowVps();
    41464146  }
    41474147#else
     
    41524152  else
    41534153  {
    4154     return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getConformanceWindowVps();
     4154    return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(vps->getLayerIdInVps(layerId))) )->getConformanceWindowVps();
    41554155  }
    41564156#endif
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r981 r1000  
    17101710      else
    17111711      {
    1712         format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx(sps->getLayerId()) )->getChromaFormatVpsIdc();
     1712        format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerIdInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc();
    17131713#if Q0195_REP_FORMAT_CLEANUP
    17141714        assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check
     
    34093409  {
    34103410#if VPS_FIX_TO_MATCH_SPEC
    3411       for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ )
    3412 #else
    3413       for (i = 1; i < vps->getMaxLayers(); i++)
     3411    for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ )
     3412#else
     3413    for (i = 1; i < vps->getMaxLayers(); i++)
    34143414#endif
    34153415    {
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.cpp

    r996 r1000  
    764764
    765765#if R0227_REP_FORMAT_CONSTRAINT //Conformance checking for rep format -- rep format of current picture of current layer shall never be greater rep format defined in VPS for the current layer
     766  UInt layerIdx = activeVPS->getLayerIdInVps(m_apcSlicePilot->getLayerId());
     767
    766768  if ( activeVPS->getVpsExtensionFlag() == 1 && (m_apcSlicePilot->getLayerId() == 0 || sps->getV1CompatibleSPSFlag() == 1) )
    767769  {
    768     UInt layerId = m_apcSlicePilot->getLayerId();
    769     assert( sps->getPicWidthInLumaSamples()  <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getPicWidthVpsInLumaSamples() );
    770     assert( sps->getPicHeightInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getPicHeightVpsInLumaSamples() );
    771     assert( sps->getChromaFormatIdc()        <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getChromaFormatVpsIdc() );
    772     assert( sps->getBitDepth(CHANNEL_TYPE_LUMA)              <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getBitDepthVpsLuma() );
    773     assert( sps->getBitDepth(CHANNEL_TYPE_CHROMA)            <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId) )->getBitDepthVpsChroma() );
     770    assert( sps->getPicWidthInLumaSamples()        <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getPicWidthVpsInLumaSamples() );
     771    assert( sps->getPicHeightInLumaSamples()       <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getPicHeightVpsInLumaSamples() );
     772    assert( sps->getChromaFormatIdc()              <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getChromaFormatVpsIdc() );
     773    assert( sps->getBitDepth(CHANNEL_TYPE_LUMA)    <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsLuma() );
     774    assert( sps->getBitDepth(CHANNEL_TYPE_CHROMA)  <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsChroma() );
    774775  }
    775776  else if ( activeVPS->getVpsExtensionFlag() == 1 )
    776777  {
    777     UInt layerId = m_apcSlicePilot->getLayerId();
    778     assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getPicWidthVpsInLumaSamples()  <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getPicWidthVpsInLumaSamples());
    779     assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getPicHeightVpsInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getPicHeightVpsInLumaSamples());
    780     assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getChromaFormatVpsIdc()        <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getChromaFormatVpsIdc());
    781     assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsLuma()           <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsLuma());
    782     assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsChroma()         <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerId))->getBitDepthVpsChroma());
     778    assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples()  <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples());
     779    assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples() <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples());
     780    assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc()        <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc());
     781    assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma()           <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma());
     782    assert( activeVPS->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma()         <= activeVPS->getVpsRepFormat( activeVPS->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma());
    783783  }
    784784#endif
  • branches/SHM-upgrade/source/Lib/TLibEncoder/TEncTop.cpp

    r989 r1000  
    928928  {
    929929#if REPN_FORMAT_IN_VPS
    930     m_cSPS.setBitDepth    (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVps(ChannelType(channelType))            );
    931     m_cSPS.setQpBDOffset  (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVps(ChannelType(channelType)) - 8)));
     930    m_cSPS.setBitDepth    (ChannelType(channelType), m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType))            );
     931    m_cSPS.setQpBDOffset  (ChannelType(channelType), (6 * (m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps( m_layerId ) ) )->getBitDepthVps(ChannelType(channelType)) - 8)));
    932932#else
    933933    m_cSPS.setBitDepth    (ChannelType(channelType), g_bitDepth[channelType]            );
     
    15781578{
    15791579#if O0096_REP_FORMAT_INDEX
    1580   RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_layerId ) );
    1581 #else
    1582   RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) );
     1580  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) );
     1581#else
     1582  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) );
    15831583#endif
    15841584  Int bitDepthY,bitDepthC,picWidth,picHeight;
Note: See TracChangeset for help on using the changeset viewer.