Changeset 289 in SHVCSoftware for branches


Ignore:
Timestamp:
17 Jun 2013, 03:02:26 (12 years ago)
Author:
samsung
Message:

integrate M0163 and M0152 into SHM-2.1-dev

Location:
branches/SHM-2.1-dev/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r288 r289  
    7575, m_iDepth                        ( 0 )
    7676, m_bRefenced                     ( false )
     77#if SH_DISCARDABLE_FLAG
     78, m_bDiscardableFlag              ( false )
     79#endif
    7780, m_pcSPS                         ( NULL )
    7881, m_pcPPS                         ( NULL )
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h

    r288 r289  
    14691469  Bool        m_bRefenced;
    14701470 
     1471#if SH_DISCARDABLE_FLAG
     1472  Bool        m_bDiscardableFlag;
     1473#endif
     1474
    14711475  // access channel
    14721476  TComVPS*    m_pcVPS;
     
    16281632   Bool     isRADL() {  return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); }
    16291633   Bool     isRASL()   {   return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); }
     1634#endif
     1635
     1636#if SH_DISCARDABLE_FLAG
     1637  Bool      getDiscardableFlag  ()                              { return m_bDiscardableFlag; }
     1638  Void      setDiscardableFlag  (Bool b)                        { m_bDiscardableFlag = b; }
    16301639#endif
    16311640
  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h

    r288 r289  
    6060#define VPS_PROFILE_OUTPUT_LAYERS        1      ///< M0268: Signal profile information and output layer information as in Sec. 3 of M0268v2
    6161#define SPS_SUB_LAYER_INFO               1      ///< M0268: Do not signal sps_max_sub_layers_minus1 and sps_temporal_id_nesting_flag for nuh_layer_id greater than 0
    62 #endif
     62#define VPS_SPLIT_FLAG                   1      ///< M0163: Do not signal dimension_id and the last dimension_id_len_minus1, when splitting_flag is equal to 1.
     63#endif
     64
     65#define SH_DISCARDABLE_FLAG              1      ///< M0152: Use one reserved flag in the slice header for discardable flag
    6366
    6467#define DERIVE_LAYER_ID_LIST_VARIABLES   1      ///< Derived variables based on the variables in VPS - for use in syntax table parsing
  • branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r288 r289  
    920920  vps->setNumScalabilityTypes(numScalabilityTypes);
    921921
     922#if VPS_SPLIT_FLAG
     923  for(j = 0; j < numScalabilityTypes - vps->getSplittingFlag(); j++)
     924#else
    922925  for(j = 0; j < numScalabilityTypes; j++)
     926#endif
    923927  {
    924928    READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); vps->setDimensionIdLen(j, uiCode + 1);
    925929  }
     930#if VPS_SPLIT_FLAG
     931  if(vps->getSplittingFlag())
     932  {
     933    UInt numBits = 0;
     934    for(j = 0; j < numScalabilityTypes - 1; j++)
     935    {
     936      numBits += vps->getDimensionIdLen(j);
     937    }
     938    assert( numBits < 6 );
     939    vps->setDimensionIdLen(numScalabilityTypes-1, 6 - numBits);
     940    numBits = 6;
     941  }
     942#else
    926943  if(vps->getSplittingFlag())
    927944  {
     
    933950    assert( numBits <= 6 );
    934951  }
     952#endif
    935953
    936954  READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false);
     
    950968    vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
    951969
     970#if VPS_SPLIT_FLAG
     971    if(!vps->getSplittingFlag())
     972#endif
    952973    for(j = 0; j < numScalabilityTypes; j++)
    953974    {
     
    11931214  if(!rpcSlice->getDependentSliceSegmentFlag())
    11941215  {
     1216
     1217#if SH_DISCARDABLE_FLAG
     1218    if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits()>0)
     1219    {
     1220      READ_FLAG(uiCode, "discardable_flag"); // ignored
     1221    }
     1222    for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     1223    {
     1224      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
     1225    }
     1226#else
    11951227    for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
    11961228    {
    11971229      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
    11981230    }
     1231#endif
    11991232
    12001233    READ_UVLC (    uiCode, "slice_type" );            rpcSlice->setSliceType((SliceType)uiCode);
  • branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r288 r289  
    726726  }
    727727
     728#if VPS_SPLIT_FLAG
     729  for(j = 0; j < vps->getNumScalabilityTypes() - vps->getSplittingFlag(); j++)
     730#else
    728731  for(j = 0; j < vps->getNumScalabilityTypes(); j++)
     732#endif
    729733  {
    730734    WRITE_CODE( vps->getDimensionIdLen(j) - 1, 3,      "dimension_id_len_minus1[j]" );
     
    738742      WRITE_CODE( vps->getLayerIdInNuh(i),     6,      "layer_id_in_nuh[i]" );
    739743    }
     744#if VPS_SPLIT_FLAG
     745    if(!vps->getSplittingFlag())
     746#endif
    740747    for(j = 0; j < vps->getNumScalabilityTypes(); j++)
    741748    {
     
    904911  if ( !pcSlice->getDependentSliceSegmentFlag() )
    905912  {
    906     for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     913
     914#if SH_DISCARDABLE_FLAG
     915    if (pcSlice->getPPS()->getNumExtraSliceHeaderBits()>0)
     916    {
     917      assert(!!"discardable_flag");
     918      WRITE_FLAG(pcSlice->getDiscardableFlag(), "discardable_flag");
     919    }
     920    for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
    907921    {
    908922      assert(!!"slice_reserved_undetermined_flag[]");
    909923      WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
    910924    }
     925#else
     926    for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     927    {
     928      assert(!!"slice_reserved_undetermined_flag[]");
     929      WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
     930    }
     931#endif
    911932
    912933    WRITE_UVLC( pcSlice->getSliceType(),       "slice_type" );
Note: See TracChangeset for help on using the changeset viewer.