Changeset 530 in SHVCSoftware
- Timestamp:
- 28 Dec 2013, 02:37:15 (11 years ago)
- 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 615 615 ("MaxTidIlRefPicsPlus1%d", cfg_maxTidIlRefPicsPlus1, 1, MAX_LAYERS, "allowed maximum temporal_id for inter-layer prediction") 616 616 #endif 617 #if O0223_PICTURE_TYPES_ALIGN_FLAG 618 ("CrossLayerPictureTypeAlignFlag", m_crossLayerPictureTypeAlignFlag, true, "align picture type across layers" ) 619 #endif 617 620 #if N0147_IRAP_ALIGN_FLAG 618 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" )621 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 619 622 #endif 620 623 #if AVC_BASE … … 2443 2446 printf("Skip picture at ARC switch : %d\n", m_skipPictureAtArcSwitch ); 2444 2447 #endif 2448 #if O0223_PICTURE_TYPES_ALIGN_FLAG 2449 printf("Cross layer picture type alignment : %d\n", m_crossLayerPictureTypeAlignFlag ); 2450 #endif 2445 2451 #if N0147_IRAP_ALIGN_FLAG 2446 2452 printf("Cross layer IRAP alignment : %d\n", m_crossLayerIrapAlignFlag ); -
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncCfg.h
r524 r530 394 394 Bool m_phaseAlignFlag; 395 395 #endif 396 #if O0223_PICTURE_TYPES_ALIGN_FLAG 397 Bool m_crossLayerPictureTypeAlignFlag; 398 #endif 396 399 #if N0147_IRAP_ALIGN_FLAG 397 400 Bool m_crossLayerIrapAlignFlag; -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r529 r530 2092 2092 ::memset(m_pocLsbNotPresentFlag, 0, sizeof(m_pocLsbNotPresentFlag)); 2093 2093 #endif 2094 #if O0223_PICTURE_TYPES_ALIGN_FLAG 2095 m_crossLayerPictureTypeAlignFlag = true; 2096 #endif 2094 2097 #if N0147_IRAP_ALIGN_FLAG 2095 2098 m_crossLayerIrapAlignFlag = true; … … 2111 2114 } 2112 2115 #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 2113 2121 #if TILE_BOUNDARY_ALIGNED_FLAG 2114 2122 ::memset(m_tileBoundariesAlignedFlag, 0, sizeof(m_tileBoundariesAlignedFlag)); 2115 2123 #endif 2124 #if VPS_VUI_WPP_NOT_IN_USE__FLAG 2125 m_wppNotInUseFlag = true; 2126 ::memset(m_wppInUseFlag, 0, sizeof(m_wppInUseFlag)); 2127 #endif 2116 2128 #if N0160_VUI_EXT_ILP_REF 2117 2129 m_numIlpRestrictedRefLayers = false; … … 2231 2243 } 2232 2244 #endif 2233 2245 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 2246 Void 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 2271 Void 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 2234 2283 #if O0092_0094_DEPENDENCY_CONSTRAINT 2235 2284 Void TComVPS::setRefLayersFlags(Int currLayerId) -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r529 r530 548 548 Bool m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1]; 549 549 #endif 550 #if O0223_PICTURE_TYPES_ALIGN_FLAG 551 Bool m_crossLayerPictureTypeAlignFlag; 552 #endif 550 553 #if N0147_IRAP_ALIGN_FLAG 551 554 Bool m_crossLayerIrapAlignFlag; … … 571 574 Bool m_higherLayerIrapSkipFlag; 572 575 #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 573 581 #if TILE_BOUNDARY_ALIGNED_FLAG 574 582 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]; 575 587 #endif 576 588 #if N0160_VUI_EXT_ILP_REF … … 812 824 Void setPocLsbNotPresentFlag(Int i, Bool x) { m_pocLsbNotPresentFlag[i] = x; } 813 825 #endif 826 #if O0223_PICTURE_TYPES_ALIGN_FLAG 827 Bool getCrossLayerPictureTypeAlignFlag() { return m_crossLayerPictureTypeAlignFlag; } 828 Void setCrossLayerPictureTypeAlignFlag(Bool x) { m_crossLayerPictureTypeAlignFlag = x; } 829 #endif 814 830 #if N0147_IRAP_ALIGN_FLAG 815 831 Bool getCrossLayerIrapAlignFlag() { return m_crossLayerIrapAlignFlag; } … … 843 859 Void setHigherLayerIrapSkipFlag(Bool x) { m_higherLayerIrapSkipFlag = x; } 844 860 #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 845 869 #if TILE_BOUNDARY_ALIGNED_FLAG 846 870 Bool getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId) { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; } 847 871 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; } 848 878 #endif 849 879 #if N0160_VUI_EXT_ILP_REF -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r529 r530 96 96 97 97 #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 98 100 #define TILE_BOUNDARY_ALIGNED_FLAG 1 ///< JCTVC-N0160/JCTVC-N0199 proposal 2 variant 2: VPS VUI flag to indicate tile boundary alignment 99 101 #define N0160_VUI_EXT_ILP_REF 1 ///< VUI extension inter-layer dependency offset signalling … … 157 159 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG 0 ///< shall be 0, JCTVC-N0107 158 160 #endif 161 162 #define O0223_PICTURE_TYPES_ALIGN_FLAG 1 ///< a flag to indicatate whether picture types are aligned across layers. 159 163 160 164 #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 1479 1479 UInt i,j; 1480 1480 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 1481 1487 #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 } 1484 1497 #endif 1485 1498 #if VPS_VUI_BITRATE_PICRATE … … 1533 1546 } 1534 1547 #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 1535 1566 #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)); 1541 1592 } 1542 1593 } -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r529 r530 1148 1148 { 1149 1149 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 1150 1155 #if IRAP_ALIGN_FLAG_IN_VPS_VUI 1151 1156 WRITE_FLAG(vps->getCrossLayerIrapAlignFlag(), "cross_layer_irap_aligned_flag"); 1152 1157 #endif 1158 #if O0223_PICTURE_TYPES_ALIGN_FLAG 1159 } 1160 #endif 1153 1161 #if VPS_VUI_BITRATE_PICRATE 1154 1162 WRITE_FLAG( vps->getBitRatePresentVpsFlag(), "bit_rate_present_vps_flag" ); … … 1183 1191 } 1184 1192 #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 1185 1207 #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 1194 1236 #if N0160_VUI_EXT_ILP_REF 1195 1237 WRITE_FLAG( vps->getNumIlpRestrictedRefLayers() ? 1 : 0 , "num_ilp_restricted_ref_layers" );
Note: See TracChangeset for help on using the changeset viewer.