Changeset 530 in SHVCSoftware


Ignore:
Timestamp:
28 Dec 2013, 02:37:15 (11 years ago)
Author:
qualcomm
Message:

Related to Adoption of JCTVC_O0223 with macro (O0223_PICTURE_TYPES_ALIGN_FLAG)
Related to Adoption of JCTVC_O0226 with macros (VPS_VUI_TILES_NOT_IN_USEFLAG
and VPS_VUI_WPP_NOT_IN_USE
FLAG)

From Hendry -- hendry@…

Location:
branches/SHM-4.1-dev/source
Files:
7 edited

Legend:

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

    r524 r530  
    615615  ("MaxTidIlRefPicsPlus1%d", cfg_maxTidIlRefPicsPlus1, 1, MAX_LAYERS, "allowed maximum temporal_id for inter-layer prediction")
    616616#endif
     617#if O0223_PICTURE_TYPES_ALIGN_FLAG
     618  ("CrossLayerPictureTypeAlignFlag", m_crossLayerPictureTypeAlignFlag, true, "align picture type across layers" ) 
     619#endif
    617620#if N0147_IRAP_ALIGN_FLAG
    618   ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 
     621    ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 
    619622#endif
    620623#if AVC_BASE
     
    24432446  printf("Skip picture at ARC switch    : %d\n", m_skipPictureAtArcSwitch );
    24442447#endif
     2448#if O0223_PICTURE_TYPES_ALIGN_FLAG
     2449  printf("Cross layer picture type alignment    : %d\n", m_crossLayerPictureTypeAlignFlag );
     2450#endif
    24452451#if N0147_IRAP_ALIGN_FLAG
    24462452  printf("Cross layer IRAP alignment    : %d\n", m_crossLayerIrapAlignFlag );
  • branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h

    r524 r530  
    394394  Bool m_phaseAlignFlag;
    395395#endif
     396#if O0223_PICTURE_TYPES_ALIGN_FLAG
     397  Bool m_crossLayerPictureTypeAlignFlag;
     398#endif
    396399#if N0147_IRAP_ALIGN_FLAG
    397400  Bool m_crossLayerIrapAlignFlag;
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp

    r529 r530  
    20922092  ::memset(m_pocLsbNotPresentFlag, 0, sizeof(m_pocLsbNotPresentFlag));
    20932093#endif
     2094#if O0223_PICTURE_TYPES_ALIGN_FLAG
     2095  m_crossLayerPictureTypeAlignFlag = true;
     2096#endif
    20942097#if N0147_IRAP_ALIGN_FLAG
    20952098  m_crossLayerIrapAlignFlag = true;
     
    21112114  }
    21122115#endif
     2116#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     2117   m_tilesNotInUseFlag = true;
     2118   ::memset(m_tilesInUseFlag,  0, sizeof(m_tilesInUseFlag));
     2119   ::memset(m_loopFilterNotAcrossTilesFlag,  0, sizeof(m_loopFilterNotAcrossTilesFlag));
     2120#endif
    21132121#if TILE_BOUNDARY_ALIGNED_FLAG
    21142122   ::memset(m_tileBoundariesAlignedFlag,  0, sizeof(m_tileBoundariesAlignedFlag));
    21152123#endif
     2124#if VPS_VUI_WPP_NOT_IN_USE__FLAG
     2125   m_wppNotInUseFlag = true;
     2126   ::memset(m_wppInUseFlag,  0, sizeof(m_wppInUseFlag));
     2127#endif
    21162128#if N0160_VUI_EXT_ILP_REF
    21172129   m_numIlpRestrictedRefLayers = false;
     
    22312243}
    22322244#endif
    2233 
     2245#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     2246Void TComVPS::setTilesNotInUseFlag(Bool x)
     2247{
     2248  m_tilesNotInUseFlag = x;
     2249  if (m_tilesNotInUseFlag)
     2250  {
     2251    for (int i = 0; i < getMaxLayers(); i++)
     2252    {
     2253      m_tilesInUseFlag[i] = m_loopFilterNotAcrossTilesFlag[i] = m_tilesNotInUseFlag;
     2254    }
     2255  }
     2256#if TILE_BOUNDARY_ALIGNED_FLAG 
     2257  if (m_tilesNotInUseFlag)
     2258  {
     2259    for (int i = 1; i < getMaxLayers(); i++)
     2260    {
     2261      for(int j = 0; j < getNumDirectRefLayers(getLayerIdInNuh(i)); j++)
     2262      {
     2263        setTileBoundariesAlignedFlag(i, j, m_tilesNotInUseFlag);
     2264      }
     2265    }
     2266  }
     2267#endif
     2268}
     2269#endif
     2270#if VPS_VUI_WPP_NOT_IN_USE__FLAG
     2271Void TComVPS::setWppNotInUseFlag(Bool x)
     2272{
     2273  m_wppNotInUseFlag = x;
     2274  if (m_wppNotInUseFlag)
     2275  {
     2276    for (int i = 0; i < getMaxLayers(); i++)
     2277    {
     2278      m_wppInUseFlag[i] = m_wppNotInUseFlag;
     2279    }
     2280  }
     2281}
     2282#endif
    22342283#if O0092_0094_DEPENDENCY_CONSTRAINT
    22352284Void TComVPS::setRefLayersFlags(Int currLayerId)
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h

    r529 r530  
    548548  Bool       m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1];
    549549#endif
     550#if O0223_PICTURE_TYPES_ALIGN_FLAG
     551  Bool       m_crossLayerPictureTypeAlignFlag;
     552#endif
    550553#if N0147_IRAP_ALIGN_FLAG
    551554  Bool       m_crossLayerIrapAlignFlag;
     
    571574  Bool       m_higherLayerIrapSkipFlag;
    572575#endif
     576#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     577  Bool       m_tilesNotInUseFlag;
     578  Bool       m_tilesInUseFlag[MAX_VPS_LAYER_ID_PLUS1];
     579  Bool       m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_ID_PLUS1];
     580#endif
    573581#if TILE_BOUNDARY_ALIGNED_FLAG
    574582  Bool       m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     583#endif
     584#if VPS_VUI_WPP_NOT_IN_USE__FLAG
     585  Bool       m_wppNotInUseFlag;
     586  Bool       m_wppInUseFlag[MAX_VPS_LAYER_ID_PLUS1];
    575587#endif
    576588#if N0160_VUI_EXT_ILP_REF   
     
    812824  Void   setPocLsbNotPresentFlag(Int i, Bool x)                                 { m_pocLsbNotPresentFlag[i] = x;    }
    813825#endif
     826#if O0223_PICTURE_TYPES_ALIGN_FLAG
     827  Bool   getCrossLayerPictureTypeAlignFlag()                                    { return m_crossLayerPictureTypeAlignFlag;                      }
     828  Void   setCrossLayerPictureTypeAlignFlag(Bool x)                              { m_crossLayerPictureTypeAlignFlag = x;                         }
     829#endif
    814830#if N0147_IRAP_ALIGN_FLAG
    815831  Bool   getCrossLayerIrapAlignFlag()                                           { return m_crossLayerIrapAlignFlag;                      }
     
    843859  Void   setHigherLayerIrapSkipFlag(Bool x)                       { m_higherLayerIrapSkipFlag = x;    }
    844860#endif
     861#if VPS_VUI_TILES_NOT_IN_USE__FLAG 
     862  Bool   getTilesNotInUseFlag()         { return m_tilesNotInUseFlag; }
     863  Void   setTilesNotInUseFlag(Bool x);
     864  Bool   getTilesInUseFlag(Int currLayerId)    { return m_tilesInUseFlag[currLayerId]; }
     865  Void   setTilesInUseFlag(Int currLayerId, Bool x)    { m_tilesInUseFlag[currLayerId] = x; }
     866  Bool   getLoopFilterNotAcrossTilesFlag(Int currLayerId)    { return m_loopFilterNotAcrossTilesFlag[currLayerId]; }
     867  Void   setLoopFilterNotAcrossTilesFlag(Int currLayerId, Bool x)    { m_loopFilterNotAcrossTilesFlag[currLayerId] = x; }
     868#endif
    845869#if TILE_BOUNDARY_ALIGNED_FLAG 
    846870  Bool   getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId)           { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; }
    847871  Void   setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x)   { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; }
     872#endif
     873#if VPS_VUI_WPP_NOT_IN_USE__FLAG 
     874  Bool   getWppNotInUseFlag()         { return m_wppNotInUseFlag; }
     875  Void   setWppNotInUseFlag(Bool x);
     876  Bool   getWppInUseFlag(Int currLayerId)    { return m_wppInUseFlag[currLayerId]; }
     877  Void   setWppInUseFlag(Int currLayerId, Bool x)    { m_wppInUseFlag[currLayerId] = x; }
    848878#endif
    849879#if N0160_VUI_EXT_ILP_REF 
  • branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h

    r529 r530  
    9696
    9797#if VPS_VUI
     98#define VPS_VUI_TILES_NOT_IN_USE__FLAG    1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
     99#define VPS_VUI_WPP_NOT_IN_USE__FLAG    1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
    98100#define TILE_BOUNDARY_ALIGNED_FLAG       1      ///< JCTVC-N0160/JCTVC-N0199 proposal 2 variant 2: VPS VUI flag to indicate tile boundary alignment
    99101#define N0160_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
     
    157159#define M0457_IL_SAMPLE_PRED_ONLY_FLAG   0      ///< shall be 0, JCTVC-N0107
    158160#endif
     161
     162#define O0223_PICTURE_TYPES_ALIGN_FLAG   1  ///< a flag to indicatate whether picture types are aligned across layers.
    159163
    160164#define N0147_IRAP_ALIGN_FLAG            1      ///< a flag to indicatate whether IRAPs are aligned across layers
  • branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r529 r530  
    14791479  UInt i,j;
    14801480  UInt uiCode;
     1481#if O0223_PICTURE_TYPES_ALIGN_FLAG
     1482  READ_FLAG(uiCode, "cross_layer_pic_type_aligned_flag" );
     1483  vps->setCrossLayerPictureTypeAlignFlag(uiCode);
     1484  if (!uiCode)
     1485  {
     1486#endif
    14811487#if IRAP_ALIGN_FLAG_IN_VPS_VUI
    1482   READ_FLAG(uiCode, "cross_layer_irap_aligned_flag" );
    1483   vps->setCrossLayerIrapAlignFlag(uiCode);
     1488    READ_FLAG(uiCode, "cross_layer_irap_aligned_flag" );
     1489    vps->setCrossLayerIrapAlignFlag(uiCode);
     1490#endif
     1491#if O0223_PICTURE_TYPES_ALIGN_FLAG
     1492  }
     1493  else
     1494  {
     1495    vps->setCrossLayerIrapAlignFlag(true);
     1496  }
    14841497#endif
    14851498#if VPS_VUI_BITRATE_PICRATE
     
    15331546  }
    15341547#endif
     1548#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     1549  UInt layerIdx;
     1550  READ_FLAG( uiCode, "tiles_not_in_use_flag" ); vps->setTilesNotInUseFlag(uiCode == 1);
     1551  if (!uiCode)
     1552  {
     1553    for(i = 0; i < vps->getMaxLayers(); i++)
     1554    {
     1555      READ_FLAG( uiCode, "tiles_in_use_flag[ i ]" ); vps->setTilesInUseFlag(i, (uiCode == 1));
     1556      if (uiCode)
     1557      {
     1558        READ_FLAG( uiCode, "loop_filter_not_across_tiles_flag[ i ]" ); vps->setLoopFilterNotAcrossTilesFlag(i, (uiCode == 1));
     1559      }
     1560      else
     1561      {
     1562        vps->setLoopFilterNotAcrossTilesFlag(i, false);
     1563      }
     1564    }
     1565#endif
    15351566#if TILE_BOUNDARY_ALIGNED_FLAG
    1536   for(i = 1; i < vps->getMaxLayers(); i++)
    1537   {
    1538     for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
    1539     {
    1540       READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1));
     1567    for(i = 1; i < vps->getMaxLayers(); i++)
     1568    {
     1569      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     1570      {
     1571#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     1572        layerIdx = vps->getLayerIdInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
     1573        if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) {
     1574          READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1));
     1575        }
     1576#else
     1577        READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1));
     1578#endif
     1579      }
     1580    }
     1581#endif
     1582#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     1583  }
     1584#endif
     1585#if VPS_VUI_WPP_NOT_IN_USE__FLAG
     1586  READ_FLAG( uiCode, "wpp_not_in_use_flag" ); vps->setWppNotInUseFlag(uiCode == 1);
     1587  if (!uiCode)
     1588  {
     1589    for(i = 0; i < vps->getMaxLayers(); i++)
     1590    {
     1591      READ_FLAG( uiCode, "wpp_in_use_flag[ i ]" ); vps->setWppInUseFlag(i, (uiCode == 1));
    15411592    }
    15421593  }
  • branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r529 r530  
    11481148{
    11491149  Int i,j;
     1150#if O0223_PICTURE_TYPES_ALIGN_FLAG
     1151  WRITE_FLAG(vps->getCrossLayerPictureTypeAlignFlag(), "cross_layer_pic_type_aligned_flag");
     1152  if (!vps->getCrossLayerPictureTypeAlignFlag())
     1153  {
     1154#endif
    11501155#if IRAP_ALIGN_FLAG_IN_VPS_VUI
    1151       WRITE_FLAG(vps->getCrossLayerIrapAlignFlag(), "cross_layer_irap_aligned_flag");
     1156    WRITE_FLAG(vps->getCrossLayerIrapAlignFlag(), "cross_layer_irap_aligned_flag");
    11521157#endif
     1158#if O0223_PICTURE_TYPES_ALIGN_FLAG
     1159  }
     1160#endif
    11531161#if VPS_VUI_BITRATE_PICRATE
    11541162  WRITE_FLAG( vps->getBitRatePresentVpsFlag(),        "bit_rate_present_vps_flag" );
     
    11831191  }
    11841192#endif
     1193#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     1194  UInt layerIdx;
     1195  WRITE_FLAG( vps->getTilesNotInUseFlag() ? 1 : 0 , "tiles_not_in_use_flag" );
     1196  if (!vps->getTilesNotInUseFlag())
     1197  {
     1198    for(i = 0; i < vps->getMaxLayers(); i++)
     1199    {
     1200      WRITE_FLAG( vps->getTilesInUseFlag(i) ? 1 : 0 , "tiles_in_use_flag[ i ]" );
     1201      if (vps->getTilesInUseFlag(i))
     1202      {
     1203        WRITE_FLAG( vps->getLoopFilterNotAcrossTilesFlag(i) ? 1 : 0 , "loop_filter_not_across_tiles_flag[ i ]" );
     1204      }
     1205    }
     1206#endif
    11851207#if TILE_BOUNDARY_ALIGNED_FLAG
    1186   for(i = 1; i < vps->getMaxLayers(); i++)
    1187   {
    1188     for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
    1189     {
    1190       WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" );
    1191     }
    1192   } 
    1193 #endif
     1208    for(i = 1; i < vps->getMaxLayers(); i++)
     1209    {
     1210      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
     1211      {
     1212#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     1213        layerIdx = vps->getLayerIdInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
     1214        if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) {
     1215          WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" );
     1216        }
     1217#else
     1218        WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" );
     1219#endif
     1220      }
     1221    } 
     1222#endif
     1223#if VPS_VUI_TILES_NOT_IN_USE__FLAG
     1224  }
     1225#endif
     1226#if VPS_VUI_WPP_NOT_IN_USE__FLAG
     1227  WRITE_FLAG( vps->getWppNotInUseFlag() ? 1 : 0 , "wpp_not_in_use_flag" );
     1228  if (!vps->getWppNotInUseFlag())
     1229  {
     1230    for(i = 0; i < vps->getMaxLayers(); i++)
     1231    {
     1232      WRITE_FLAG( vps->getWppInUseFlag(i) ? 1 : 0 , "wpp_in_use_flag[ i ]" );
     1233    }
     1234  }
     1235#endif
    11941236#if N0160_VUI_EXT_ILP_REF
    11951237  WRITE_FLAG( vps->getNumIlpRestrictedRefLayers() ? 1 : 0 , "num_ilp_restricted_ref_layers" );   
Note: See TracChangeset for help on using the changeset viewer.