Changeset 407 in SHVCSoftware for branches


Ignore:
Timestamp:
1 Oct 2013, 22:08:33 (11 years ago)
Author:
qualcomm
Message:

Signal view ID-related syntax elements in VPS (Macro: VIEW_ID_RELATED_SIGNALING)

Introduce signaling of view_id_len_minus1 and view_id_val.

From: Adarsh K. Ramasubramonian <aramasub@…>

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

Legend:

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

    r405 r407  
    17551755, m_vpsNumRepFormats          (1)
    17561756#endif
     1757#if VIEW_ID_RELATED_SIGNALING
     1758, m_viewIdLenMinus1           (0)
     1759#endif
    17571760{
    17581761  for( Int i = 0; i < MAX_TLAYER; i++)
     
    18321835  ::memset( m_vpsRepFormatIdx, 0, sizeof(m_vpsRepFormatIdx) );
    18331836#endif
     1837#if VIEW_ID_RELATED_SIGNALING
     1838  ::memset(m_viewIdVal, 0, sizeof(m_viewIdVal));
     1839#endif
    18341840}
    18351841
     
    18621868    setNumLayersInIdList(i, n);
    18631869  }
     1870}
     1871#endif
     1872#if VIEW_ID_RELATED_SIGNALING
     1873Int TComVPS::getNumViews()
     1874{
     1875  Int numViews = 1;
     1876  for( Int i = 0; i <= getMaxLayers() - 1; i++ )
     1877  {
     1878    Int lId = getLayerIdInNuh( i );
     1879    if ( i > 0 && ( getViewIndex( lId ) != getScalabilityId( i - 1, VIEW_ORDER_INDEX ) ) )
     1880    {
     1881      numViews++;
     1882    }   
     1883  }
     1884
     1885  return numViews;
     1886}
     1887Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType )
     1888{
     1889  return getScalabilityMask( scalType ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0;
     1890
     1891Int TComVPS::scalTypeToScalIdx( ScalabilityType scalType )
     1892{
     1893  assert( scalType >= 0 && scalType <= MAX_VPS_NUM_SCALABILITY_TYPES );
     1894  assert( scalType == MAX_VPS_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) );
     1895  Int scalIdx = 0;
     1896  for( Int curScalType = 0; curScalType < scalType; curScalType++ )
     1897  {
     1898    scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 );
     1899
     1900  }
     1901
     1902  return scalIdx;
    18641903}
    18651904#endif
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h

    r399 r407  
    557557  Int        m_vpsRepFormatIdx[16];
    558558#endif
     559#if VIEW_ID_RELATED_SIGNALING
     560  Int         m_viewIdLenMinus1;
     561  Int         m_viewIdVal                [MAX_LAYERS];
     562#endif
    559563public:
    560564  TComVPS();
     
    778782  Int    getVpsRepFormatIdx(Int idx)        { return m_vpsRepFormatIdx[idx];   }
    779783  Void   setVpsRepFormatIdx(Int idx, Int x) { m_vpsRepFormatIdx[idx] = x;      }         
     784#endif
     785#if VIEW_ID_RELATED_SIGNALING
     786  Void    setViewIdLenMinus1( Int  val )                                   { m_viewIdLenMinus1 = val; }
     787  Int     getViewIdLenMinus1(  )                                           { return m_viewIdLenMinus1; }
     788
     789  Void    setViewIdVal( Int viewOrderIndex, Int  val )                     { m_viewIdVal[viewOrderIndex] = val; }
     790  Int     getViewIdVal( Int viewOrderIndex )                               { return m_viewIdVal[viewOrderIndex]; }
     791  Int     getScalabilityId(Int, ScalabilityType scalType );
     792
     793  Int     getViewIndex    ( Int layerIdInNuh )                             { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX  ); }   
     794
     795  Int     getNumViews();
     796  Int     scalTypeToScalIdx( ScalabilityType scalType );
    780797#endif
    781798};
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h

    r405 r407  
    159159
    160160#define FIX1071 1 ///< fix for issue #1071
     161#define VIEW_ID_RELATED_SIGNALING        1 ///< Introduce syntax elements view_id_len_minus1 and view_id_val
    161162#define M0043_LAYERS_PRESENT_SEI         0 ///< M0043: add layers present SEI. Macro shall be equal to 0 according to the JCTVC-N0174 discussion. The code is to be removed.
    162163
     
    622623  };
    623624}
     625#if VIEW_ID_RELATED_SIGNALING
     626/// scalability types
     627  enum ScalabilityType
     628  {
     629    VIEW_ORDER_INDEX  = 1,
     630    SCALABILITY_ID = 2,
     631  };
     632#endif
    624633//! \}
    625634
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r402 r407  
    975975  }
    976976#endif
     977#if VIEW_ID_RELATED_SIGNALING
     978  // if ( pcVPS->getNumViews() > 1 ) 
     979  //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.
     980  {
     981    READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode );
     982  }
     983
     984  for( Int i = 0; i < vps->getNumViews(); i++ )
     985  {
     986    READ_CODE( vps->getViewIdLenMinus1( ) + 1, uiCode, "view_id_val[i]" ); vps->setViewIdVal( i, uiCode );
     987  }
     988#endif
    977989#if VPS_MOVE_DIR_DEPENDENCY_FLAG
    978990#if VPS_EXTN_DIRECT_REF_LAYERS
  • branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r402 r407  
    770770  }
    771771#endif
     772#if VIEW_ID_RELATED_SIGNALING
     773  // if ( pcVPS->getNumViews() > 1 ) 
     774  //   However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.
     775  {
     776    WRITE_CODE( vps->getViewIdLenMinus1( ), 4, "view_id_len_minus1" );
     777  }
     778
     779  for( Int i = 0; i < vps->getNumViews(); i++ )
     780  {
     781    WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLenMinus1( ) + 1, "view_id_val[i]" );
     782  }
     783#endif
    772784#if VPS_MOVE_DIR_DEPENDENCY_FLAG
    773785#if VPS_EXTN_DIRECT_REF_LAYERS
Note: See TracChangeset for help on using the changeset viewer.