Changeset 382 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib


Ignore:
Timestamp:
5 Sep 2013, 23:09:52 (11 years ago)
Author:
qualcomm
Message:

Integration of N0160_TILE_BOUNDARY_ALIGNED_FLAG and N0160_VUI_EXT_ILP_REF

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

Legend:

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

    r377 r382  
    16711671    m_maxSublayerForIlpPlus1[i] = m_uiMaxTLayers + 1;
    16721672  }
     1673#endif
     1674#if N0160_TILE_BOUNDARY_ALIGNED_FLAG
     1675   ::memset(m_tileBoundariesAlignedFlag,  0, sizeof(m_tileBoundariesAlignedFlag));
     1676#endif
     1677#if N0160_VUI_EXT_ILP_REF
     1678   m_numIlpRestrictedRefLayers = false;
     1679   ::memset(m_minSpatialSegmentOffsetPlus1,  0, sizeof(m_minSpatialSegmentOffsetPlus1));
     1680   ::memset(m_ctuBasedOffsetEnabledFlag,     0, sizeof(m_ctuBasedOffsetEnabledFlag));
     1681   ::memset(m_minHorizontalCtuOffsetPlus1,   0, sizeof(m_minHorizontalCtuOffsetPlus1));
    16731682#endif
    16741683}
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h

    r381 r382  
    500500  Bool       m_singleLayerForNonIrapFlag;
    501501#endif
     502#if N0160_TILE_BOUNDARY_ALIGNED_FLAG
     503  Bool       m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     504#endif
     505#if N0160_VUI_EXT_ILP_REF   
     506  Bool        m_numIlpRestrictedRefLayers;
     507  Int         m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     508  Bool        m_ctuBasedOffsetEnabledFlag   [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     509  Int         m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     510#endif
    502511public:
    503512  TComVPS();
     
    671680  Void   setSingleLayerForNonIrapFlag(Bool x)                       { m_singleLayerForNonIrapFlag = x;    }
    672681#endif
     682#if N0160_TILE_BOUNDARY_ALIGNED_FLAG 
     683  Bool   getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId)           { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; }
     684  Void   setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x)   { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; }
     685#endif
     686#if N0160_VUI_EXT_ILP_REF 
     687  Bool  getNumIlpRestrictedRefLayers   ( )                                         { return m_numIlpRestrictedRefLayers        ;}
     688  Void  setNumIlpRestrictedRefLayers   ( Int val )                                 { m_numIlpRestrictedRefLayers         = val;}
     689 
     690  Int  getMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId )          { return m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId];}
     691  Void setMinSpatialSegmentOffsetPlus1( Int currLayerId, Int refLayerId, Int val ) { m_minSpatialSegmentOffsetPlus1[currLayerId][refLayerId] = val;}
     692 
     693  Bool getCtuBasedOffsetEnabledFlag   ( Int currLayerId, Int refLayerId )            { return m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId];}
     694  Void setCtuBasedOffsetEnabledFlag   ( Int currLayerId, Int refLayerId, Bool flag ) { m_ctuBasedOffsetEnabledFlag[currLayerId][refLayerId] = flag;}
     695 
     696  Int  getMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId )            { return m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId];}
     697  Void setMinHorizontalCtuOffsetPlus1 ( Int currLayerId, Int refLayerId, Int val )   { m_minHorizontalCtuOffsetPlus1[currLayerId][refLayerId] = val;} 
     698#endif
     699
    673700};
    674701
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h

    r380 r382  
    5454#define EXTERNAL_USEDBYCURR_N0082        1      ///< N0082: final ref picture list change (encoder) //dev ver.
    5555#endif
    56 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 1      ///< VUI flag to indicate tile boundary alignment
    57 #define M0463_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
     56#define M0464_TILE_BOUNDARY_ALIGNED_FLAG 0      ///< VUI flag to indicate tile boundary alignment
     57#define M0463_VUI_EXT_ILP_REF            0      ///< VUI extension inter-layer dependency offset signalling
    5858#define SPS_EXTENSION                    1      ///< Define sps_extension() syntax structure
    5959#define SCALED_REF_LAYER_OFFSET_FLAG     0      ///< M0309: Signal scaled reference layer offsets in SPS
     
    7878#define M0457_PREDICTION_INDICATIONS     1
    7979#define M0040_ADAPTIVE_RESOLUTION_CHANGE 1
     80#define VPS_VUI                          1      ///< Include function structure for VPS VUI
     81
     82#if VPS_VUI
     83#define N0160_TILE_BOUNDARY_ALIGNED_FLAG 1     ///< VPS VUI flag to indicate tile boundary alignment
     84#define N0160_VUI_EXT_ILP_REF            1     ///< VUI extension inter-layer dependency offset signalling
     85#endif //VPS_VUI
     86
    8087#endif
    8188
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r381 r382  
    11451145  READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
    11461146#endif
    1147 }
    1148 #endif
    1149 
     1147
     1148  READ_FLAG( uiCode,  "vps_vui_present_flag" );
     1149  if (uiCode)
     1150  {
     1151#if VPS_VUI
     1152    parseVPSVUI(vps);
     1153#endif
     1154  }
     1155}
     1156#endif
     1157
     1158#if VPS_VUI
     1159Void TDecCavlc::parseVPSVUI(TComVPS *vps)
     1160{
     1161  UInt i,j;
     1162  UInt uiCode;
     1163#if N0160_TILE_BOUNDARY_ALIGNED_FLAG
     1164  for(i = 1; i < vps->getMaxLayers(); i++)
     1165  {
     1166    for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     1167    {
     1168      READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1));     
     1169    }
     1170  } 
     1171#endif
     1172#if N0160_VUI_EXT_ILP_REF
     1173    READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 );
     1174  if( vps->getNumIlpRestrictedRefLayers())
     1175  {
     1176    for(i = 1; i < vps->getMaxLayers(); i++)
     1177    {
     1178      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     1179      {
     1180        READ_UVLC( uiCode, "min_spatial_segment_offset_plus1[i][j]" ); vps->setMinSpatialSegmentOffsetPlus1( i, j, uiCode );
     1181        if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 )
     1182        { 
     1183          READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[i][j]"); vps->setCtuBasedOffsetEnabledFlag(i, j, uiCode == 1 );
     1184          if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 
     1185          {
     1186            READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[i][j]"); vps->setMinHorizontalCtuOffsetPlus1( i,j, uiCode );
     1187          }
     1188        } 
     1189      } 
     1190    }
     1191  }
     1192#endif
     1193}
     1194#endif
    11501195Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager)
    11511196{
  • branches/SHM-3.1-dev/source/Lib/TLibDecoder/TDecCAVLC.h

    r345 r382  
    7575  Void  parseVPSExtension   ( TComVPS* pcVPS );
    7676#endif
     77#if VPS_VUI
     78  Void  parseVPSVUI   ( TComVPS* pcVPS );
     79#endif
    7780#if SPS_SUB_LAYER_INFO
    7881  Void  parseSPS            ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager );
  • branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r377 r382  
    886886  WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
    887887#endif
     888
     889#if !VPS_VUI
     890  WRITE_FLAG( 0,                     "vps_vui_present_flag" );
     891#else
     892  WRITE_FLAG( 1,                     "vps_vui_present_flag" );
     893  codeVPSVUI(vps); 
     894#endif
     895}
     896#endif
     897
     898#if VPS_VUI
     899Void TEncCavlc::codeVPSVUI (TComVPS *vps)
     900{
     901  Int i,j;
     902#if N0160_TILE_BOUNDARY_ALIGNED_FLAG
     903  for(i = 1; i < vps->getMaxLayers(); i++)
     904  {
     905    for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     906    {
     907      WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" );
     908    }
     909  } 
     910#endif
     911#if N0160_VUI_EXT_ILP_REF
     912  WRITE_FLAG( vps->getNumIlpRestrictedRefLayers() ? 1 : 0 , "num_ilp_restricted_ref_layers" );   
     913  if( vps->getNumIlpRestrictedRefLayers())
     914  {
     915    for(i = 1; i < vps->getMaxLayers(); i++)
     916    {
     917      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     918      {       
     919        WRITE_UVLC(vps->getMinSpatialSegmentOffsetPlus1( i, j),    "min_spatial_segment_offset_plus1[i][j]");
     920       
     921        if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 )
     922        { 
     923          WRITE_FLAG( vps->getCtuBasedOffsetEnabledFlag( i, j) ? 1 : 0 , "ctu_based_offset_enabled_flag[i][j]" );   
     924         
     925          if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 
     926          {
     927            WRITE_UVLC(vps->getMinHorizontalCtuOffsetPlus1( i, j),    "min_horizontal_ctu_offset_plus1[i][j]");           
     928          }
     929        } 
     930      } 
     931    }
     932  }
     933#endif
    888934}
    889935#endif
  • branches/SHM-3.1-dev/source/Lib/TLibEncoder/TEncCavlc.h

    r345 r382  
    8787  Void  codeVPSExtension        ( TComVPS* pcVPS );
    8888#endif
     89#if VPS_VUI
     90  Void codeVPSVUI               (TComVPS *vps);
     91#endif
    8992  Void  codeVUI                 ( TComVUI *pcVUI, TComSPS* pcSPS );
    9093  Void  codeSPS                 ( TComSPS* pcSPS );
Note: See TracChangeset for help on using the changeset viewer.