Changeset 999 in SHVCSoftware for branches


Ignore:
Timestamp:
22 Jan 2015, 03:28:50 (10 years ago)
Author:
seregin
Message:

use layerIdx in repformat

Location:
branches/SHM-dev/source
Files:
4 edited

Legend:

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

    r997 r999  
    11921192{
    11931193#if SVC_EXTENSION
     1194  TComVPS* vps = m_acTEncTop[0].getVPS();
     1195  m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers );
     1196
     1197  UInt i = 0, dimIdLen = 0;
     1198
     1199  while((1 << dimIdLen) < m_numLayers)
     1200  {
     1201    dimIdLen++;
     1202  }
     1203  vps->setDimensionIdLen(0, dimIdLen);
     1204  vps->setNuhLayerIdPresentFlag(false);
     1205  vps->setLayerIdInNuh(0, 0);
     1206  vps->setLayerIdInVps(0, 0);
     1207  for(i = 1; i < vps->getMaxLayers(); i++)
     1208  {
     1209    vps->setLayerIdInNuh(i, i);
     1210    vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
     1211    vps->setDimensionId(i, 0, i);
     1212  }
     1213
    11941214  for(UInt layer=0; layer<m_numLayers; layer++)
    11951215  {
     
    12191239#endif
    12201240  }
    1221   m_acTEncTop[0].getVPS()->setMaxLayers( m_numLayers );
     1241
    12221242#if VPS_EXTN_OP_LAYER_SETS
    1223   TComVPS* vps = m_acTEncTop[0].getVPS();
    12241243  vps->setMaxLayerId(m_numLayers - 1);    // Set max-layer ID
    12251244
     
    13131332#endif
    13141333#if VPS_EXTN_MASK_AND_DIM_INFO
    1315   UInt i = 0, dimIdLen = 0;
    13161334#if AVC_BASE
    13171335#if VPS_AVC_BL_FLAG_REMOVAL
     
    13511369    vps->setNumScalabilityTypes(0);
    13521370  }
    1353   while((1 << dimIdLen) < m_numLayers)
    1354   {
    1355     dimIdLen++;
    1356   }
    1357   vps->setDimensionIdLen(0, dimIdLen);
    1358   vps->setNuhLayerIdPresentFlag(false);
    1359   vps->setLayerIdInNuh(0, 0);
    1360   vps->setLayerIdInVps(0, 0);
    1361   for(i = 1; i < vps->getMaxLayers(); i++)
    1362   {
    1363     vps->setLayerIdInNuh(i, i);
    1364     vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
    1365     vps->setDimensionId(i, 0, i);
    1366   }
     1371 
    13671372#if AUXILIARY_PICTURES
    13681373  if (m_scalabilityMask[3])
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r995 r999  
    21842184  else
    21852185  {
    2186     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getPicWidthVpsInLumaSamples();
     2186    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicWidthVpsInLumaSamples();
    21872187  }
    21882188#else
     
    21932193  else
    21942194  {
    2195     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicWidthVpsInLumaSamples();
     2195    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicWidthVpsInLumaSamples();
    21962196  }
    21972197#endif
     
    22272227  else
    22282228  {
    2229     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getPicHeightVpsInLumaSamples();
     2229    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getPicHeightVpsInLumaSamples();
    22302230  }
    22312231#else
     
    22362236  else
    22372237  {
    2238     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getPicHeightVpsInLumaSamples();
     2238    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getPicHeightVpsInLumaSamples();
    22392239  }
    22402240#endif
     
    22792279  else
    22802280  {
    2281     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getChromaFormatVpsIdc();
     2281    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getChromaFormatVpsIdc();
    22822282  }
    22832283#else
     
    22882288  else
    22892289  {
    2290     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getChromaFormatVpsIdc();
     2290    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getChromaFormatVpsIdc();
    22912291  }
    22922292#endif
     
    23212321  else
    23222322  {
    2323     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getBitDepthVpsLuma();
     2323    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsLuma();
    23242324  }
    23252325#else
     
    23302330  else
    23312331  {
    2332     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsLuma();
     2332    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsLuma();
    23332333  }
    23342334#endif
     
    23632363  else
    23642364  {
    2365     retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getBitDepthVpsChroma();
     2365    retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getBitDepthVpsChroma();
    23662366  }
    23672367#else
     
    23722372  else
    23732373  {
    2374     retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getBitDepthVpsChroma();
     2374    retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)) )->getBitDepthVpsChroma();
    23752375  }
    23762376#endif
     
    24162416  else
    24172417  {
    2418     return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerId))->getConformanceWindowVps();
     2418    return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdInVps(layerId)))->getConformanceWindowVps();
    24192419  }
    24202420#else
     
    24252425  else
    24262426  {
    2427     return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerId) )->getConformanceWindowVps();
     2427    return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdInVps(vps->getLayerIdInVps(layerId))) )->getConformanceWindowVps();
    24282428  }
    24292429#endif
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r995 r999  
    19941994  {
    19951995#if VPS_FIX_TO_MATCH_SPEC
    1996       for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ )
    1997 #else
    1998       for (i = 1; i < vps->getMaxLayers(); i++)
     1996    for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ )
     1997#else
     1998    for (i = 1; i < vps->getMaxLayers(); i++)
    19991999#endif
    20002000    {
     
    30563056  TComVPS* vps = NULL;
    30573057  vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId());
     3058  UInt layerIdx = vps->getLayerIdInVps(rpcSlice->getLayerId());
    30583059#if R0279_REP_FORMAT_INBL
    30593060  if ( vps->getVpsExtensionFlag() == 1 && (rpcSlice->getLayerId() == 0 || sps->getV1CompatibleSPSFlag() == 1) )
    30603061  {
    3061     assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getPicWidthVpsInLumaSamples() );
    3062     assert( sps->getPicHeightInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getPicHeightVpsInLumaSamples() );
    3063     assert( sps->getChromaFormatIdc() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getChromaFormatVpsIdc() );
    3064     assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getBitDepthVpsLuma() );
    3065     assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(rpcSlice->getLayerId()) )->getBitDepthVpsChroma() );
     3062    assert( sps->getPicWidthInLumaSamples()  <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getPicWidthVpsInLumaSamples() );
     3063    assert( sps->getPicHeightInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getPicHeightVpsInLumaSamples() );
     3064    assert( sps->getChromaFormatIdc()        <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getChromaFormatVpsIdc() );
     3065    assert( sps->getBitDepthY()              <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsLuma() );
     3066    assert( sps->getBitDepthC()              <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(layerIdx) )->getBitDepthVpsChroma() );
    30663067#else
    30673068  if ( rpcSlice->getLayerId() == 0 && vps->getVpsExtensionFlag() == 1 )
    30683069  {
    3069     assert( sps->getPicWidthInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getPicWidthVpsInLumaSamples() );
     3070    assert( sps->getPicWidthInLumaSamples()  <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getPicWidthVpsInLumaSamples() );
    30703071    assert( sps->getPicHeightInLumaSamples() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getPicHeightVpsInLumaSamples() );
    3071     assert( sps->getChromaFormatIdc() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getChromaFormatVpsIdc() );
    3072     assert( sps->getBitDepthY() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsLuma() );
    3073     assert( sps->getBitDepthC() <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsChroma() );
     3072    assert( sps->getChromaFormatIdc()        <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getChromaFormatVpsIdc() );
     3073    assert( sps->getBitDepthY()              <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsLuma() );
     3074    assert( sps->getBitDepthC()              <= vps->getVpsRepFormat( vps->getVpsRepFormatIdx(0) )->getBitDepthVpsChroma() );
    30743075#endif
    30753076  }
    30763077  else if ( vps->getVpsExtensionFlag() == 1 )
    30773078  {
    3078     assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getPicWidthVpsInLumaSamples()  <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getPicWidthVpsInLumaSamples());
    3079     assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getPicHeightVpsInLumaSamples() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getPicHeightVpsInLumaSamples());
    3080     assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getChromaFormatVpsIdc()        <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getChromaFormatVpsIdc());
    3081     assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getBitDepthVpsLuma()           <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getBitDepthVpsLuma());
    3082     assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getBitDepthVpsChroma()         <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(rpcSlice->getLayerId()))->getBitDepthVpsChroma());
     3079    assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples()  <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getPicWidthVpsInLumaSamples());
     3080    assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples() <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getPicHeightVpsInLumaSamples());
     3081    assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc()        <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getChromaFormatVpsIdc());
     3082    assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma()           <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsLuma());
     3083    assert(vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma()         <= vps->getVpsRepFormat(vps->getVpsRepFormatIdx(layerIdx))->getBitDepthVpsChroma());
    30833084  }
    30843085#endif
     
    36133614    else
    36143615    {
    3615       format = rpcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : rpcSlice->getVPS()->getVpsRepFormatIdx(sps->getLayerId()) )->getChromaFormatVpsIdc();
     3616      format = rpcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : rpcSlice->getVPS()->getVpsRepFormatIdx( rpcSlice->getVPS()->getLayerIdInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc();
    36163617#if Q0195_REP_FORMAT_CLEANUP
    36173618      assert( (sps->getUpdateRepFormatFlag()==false && rpcSlice->getVPS()->getVpsNumRepFormats()==1) || rpcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check
     
    36253626    else
    36263627    {
    3627       format = rpcSlice->getVPS()->getVpsRepFormat( rpcSlice->getVPS()->getVpsRepFormatIdx(sps->getLayerId()) )->getChromaFormatVpsIdc();
     3628      format = rpcSlice->getVPS()->getVpsRepFormat( rpcSlice->getVPS()->getVpsRepFormatIdx( rpcSlice->getVPS()->getLayerIdInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc();
    36283629    }
    36293630#endif
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r988 r999  
    11031103
    11041104#if REPN_FORMAT_IN_VPS
    1105   m_cSPS.setBitDepthY( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsLuma() );
    1106   m_cSPS.setBitDepthC( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsChroma()  );
    1107 
    1108   m_cSPS.setQpBDOffsetY ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsLuma()  - 8) );
    1109   m_cSPS.setQpBDOffsetC ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) )->getBitDepthVpsChroma()  - 8) );
     1105  UInt layerIdx = m_cVPS.getLayerIdInVps( m_layerId );
     1106
     1107  m_cSPS.setBitDepthY( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsLuma() );
     1108  m_cSPS.setBitDepthC( m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsChroma()  );
     1109
     1110  m_cSPS.setQpBDOffsetY ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsLuma() - 8) );
     1111  m_cSPS.setQpBDOffsetC ( 6*(m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( layerIdx ) )->getBitDepthVpsChroma() - 8) );
    11101112#else
    11111113  m_cSPS.setBitDepthY( g_bitDepthY );
     
    17291731{
    17301732#if O0096_REP_FORMAT_INDEX
    1731   RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_layerId ) );
    1732 #else
    1733   RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_layerId ) );
     1733  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) );
     1734#else
     1735  RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdInVps(m_layerId) ) );
    17341736#endif
    17351737  Int bitDepthY,bitDepthC,picWidth,picHeight;
Note: See TracChangeset for help on using the changeset viewer.