Changeset 674 in SHVCSoftware for branches/SHM-6-dev


Ignore:
Timestamp:
14 Apr 2014, 18:56:22 (11 years ago)
Author:
seregin
Message:

add a check for vps_extension_flag

Location:
branches/SHM-6-dev/source
Files:
3 edited

Legend:

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

    r663 r674  
    989989  vps->setMaxLayerId(m_numLayers - 1);    // Set max-layer ID
    990990
     991  vps->setVpsExtensionFlag( m_numLayers > 1 ? true : false );
     992
    991993  vps->setNumLayerSets(m_numLayers);
    992994  for(Int setId = 1; setId < vps->getNumLayerSets(); setId++)
  • branches/SHM-6-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r673 r674  
    977977    }
    978978  }
     979
     980#if VPS_EXTNS
    979981  READ_FLAG( uiCode,  "vps_extension_flag" );      pcVPS->setVpsExtensionFlag( uiCode ? true : false );
    980982
     983  // When MaxLayersMinus1 is greater than 0, vps_extension_flag shall be equal to 1.
     984  if( pcVPS->getMaxLayers() > 1 )
     985  {
     986    assert( pcVPS->getVpsExtensionFlag() == true );
     987  }
     988
    981989  if( pcVPS->getVpsExtensionFlag()  )
    982990  {
    983 #if VPS_EXTNS
    984991    while ( m_pcBitstream->getNumBitsRead() % 8 != 0 )
    985992    {
     
    9951002      }
    9961003    }
    997 #else
    998     while ( xMoreRbspData() )
    999     {
    1000       READ_FLAG( uiCode, "vps_extension_data_flag");
    1001     }
    1002 #endif
    10031004  }
    10041005  else
     
    10071008    defaultVPSExtension(pcVPS);   
    10081009  }
     1010#else
     1011  READ_FLAG( uiCode,  "vps_extension_flag" );
     1012  if (uiCode)
     1013  {
     1014    while ( xMoreRbspData() )
     1015    {
     1016      READ_FLAG( uiCode, "vps_extension_data_flag");
     1017    }
     1018  }
     1019#endif
    10091020
    10101021  return;
  • branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r672 r674  
    777777    }
    778778  }
    779 #if !VPS_EXTNS
    780   WRITE_FLAG( 0,                     "vps_extension_flag" );
    781 #else
    782   pcVPS->setVpsExtensionFlag(true);
     779#if VPS_EXTNS
     780  // When MaxLayersMinus1 is greater than 0, vps_extension_flag shall be equal to 1.
     781  if( pcVPS->getMaxLayers() > 1 )
     782  {
     783    assert( pcVPS->getVpsExtensionFlag() == true );
     784  }
     785
    783786  WRITE_FLAG( pcVPS->getVpsExtensionFlag() ? 1 : 0,                     "vps_extension_flag" );
    784787
     
    799802    WRITE_FLAG( 0,                     "vps_extension2_flag" );   // Flag value of 1 reserved
    800803  }
     804#else
     805  WRITE_FLAG( 0,                     "vps_extension_flag" );
    801806#endif 
    802807  //future extensions here..
Note: See TracChangeset for help on using the changeset viewer.