Changeset 1053 in 3DVCSoftware
- Timestamp:
- 25 Sep 2014, 02:15:29 (10 years ago)
- Location:
- branches/HTM-12.0-dev0/source/Lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.0-dev0/source/Lib/TLibCommon/TComSlice.cpp
r1052 r1053 103 103 , m_temporalLayerNonReferenceFlag ( false ) 104 104 , m_enableTMVPFlag ( true ) 105 #if I0044_SLICE_TMVP 106 , m_availableForTMVPRefFlag ( true ) 107 #endif 105 108 #if H_MV 106 109 , m_refPicSetInterLayer0 ( NULL ) -
branches/HTM-12.0-dev0/source/Lib/TLibCommon/TComSlice.h
r1039 r1053 996 996 Void setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val ) { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ] = val; } 997 997 Int getLayerSetIdxForOlsMinus1( Int outLayerSetIdx ) { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; } 998 #if VPS_MISC_UPDATES 999 Int getLayerSetIdxForOlsMinus1Len( Int outLayerSetIdx ) { return gCeilLog2( m_layerSetIdxForOlsMinus1[ outLayerSetIdx ] + 1 ); } 1000 #endif 998 1001 999 1002 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } … … 2195 2198 2196 2199 Bool m_enableTMVPFlag; 2200 #if I0044_SLICE_TMVP 2201 Bool m_availableForTMVPRefFlag; 2202 #endif 2203 2197 2204 #if H_MV 2198 2205 std::vector<TComPic*>* m_refPicSetInterLayer0; … … 2527 2534 Void setEnableTMVPFlag ( Bool b ) { m_enableTMVPFlag = b; } 2528 2535 Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} 2536 #if I0044_SLICE_TMVP 2537 Void setAvailableForTMVPRefFlag ( Bool b ) { m_availableForTMVPRefFlag = b; } 2538 Bool getAvailableForTMVPRefFlag () { return m_availableForTMVPRefFlag;} 2539 #endif 2529 2540 2530 2541 #if H_MV -
branches/HTM-12.0-dev0/source/Lib/TLibCommon/TypeDef.h
r1052 r1053 382 382 383 383 //Added by Qualcomm for HLS 384 #define DISCARDABLE_PIC_RPS 1 ///< JCTVC-G0131: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1 384 #define DISCARDABLE_PIC_RPS 1 ///< JCT3V-G0131: Inter-layer RPS and temporal RPS should not contain picture with discardable_flag equal to 1 385 #define VPS_MISC_UPDATES 1 ///< Misc updates:JCT3V-0240, 386 #define NON_REF_NAL_TYPE_DISCARDABLE 1 ///< JCT3V-G0031: If discardable picture is a non-IRAP, it must be a non-referenced sub-layer picture 387 #define INFERENCE_POC_MSB_VAL_PRESENT 1 ///< JCT3V-H0042: poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0 388 #define INFERENCE_POC_RESET_INFO_PRESENT 1 ///< JCT3V-H0042: Infer the value of poc_reset_info_present_flag to be equal to 0 when no pps extension / pps extension for multilayer. 389 #define I0044_SLICE_TMVP 1 ///< JCT3V-I0044: Regarding slice_temporal_mvp_enabled_flag 390 #define I0045_BR_PR_ADD_LAYER_SET 1 ///< JCT3V-I0045: Signalling of bit-rate and picture rate for additional layer set 391 #define I0045_VPS_VUI_VST_PARAMS 1 ///< JCT3V-I0045: Related to signalling of VST parameters of the base layer. 385 392 386 393 // TBD: Check if integration is necessary. -
branches/HTM-12.0-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1039 r1053 392 392 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 393 393 } 394 #if INFERENCE_POC_RESET_INFO_PRESENT 395 pcPPS->setPocResetInfoPresentFlag( false ); 396 #endif 394 397 #if !H_3D 395 398 if ( pcPPS->getPpsExtension6bits() ) … … 414 417 #endif 415 418 } 419 #if INFERENCE_POC_RESET_INFO_PRESENT 420 else 421 { 422 pcPPS->setPpsRangeExtensionsFlag( false ); 423 pcPPS->setPpsMultilayerExtensionFlag( false ); 424 pcPPS->setPps3dExtensionFlag( false ); 425 pcPPS->setPocResetInfoPresentFlag( false ); 426 } 427 #endif 416 428 } 417 429 … … 1274 1286 } 1275 1287 } 1288 1289 #if VPS_MISC_UPDATES //These codes are moved from below 1290 if ( pcVPS->getNumIndependentLayers() > 1 ) 1291 { 1292 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1293 } 1294 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1295 { 1296 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1297 { 1298 READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode ); 1299 } 1300 } 1301 #endif 1302 1276 1303 pcVPS->setRefLayers(); 1277 1304 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); … … 1322 1349 } 1323 1350 1351 #if !VPS_MISC_UPDATES //These codes are moved to earlier position. 1324 1352 if ( pcVPS->getNumIndependentLayers() > 1 ) 1325 1353 { … … 1333 1361 } 1334 1362 } 1363 #endif 1364 1335 1365 if (pcVPS->getNumLayerSets() > 1) 1336 1366 { … … 1351 1381 if( i >= pcVPS->getNumLayerSets( ) ) 1352 1382 { 1383 #if !VPS_MISC_UPDATES 1353 1384 READ_UVLC( uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1354 } 1355 1385 #else 1386 READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1387 #endif 1388 } 1389 1390 #if !VPS_MISC_UPDATES 1356 1391 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 ) 1392 #else 1393 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() >= 2 ) //According to the spec, value 3 shall be treated as 2 1394 #endif 1357 1395 { 1358 1396 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) … … 1521 1559 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1522 1560 { 1561 #if I0045_BR_PR_ADD_LAYER_SET 1562 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1563 #else 1523 1564 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1565 #endif 1524 1566 { 1525 1567 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1554 1596 else 1555 1597 { 1598 #if I0045_VPS_VUI_VST_PARAMS 1599 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1); 1600 #else 1556 1601 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1602 #endif 1557 1603 } 1558 1604 … … 1565 1611 } 1566 1612 1613 #if I0045_VPS_VUI_VST_PARAMS 1614 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1615 { 1616 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1617 { 1618 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); 1619 } 1620 } 1621 else if ( !pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1622 { 1623 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1624 { 1625 pcVPSVUI->setVpsVideoSignalInfoIdx( i, i ); 1626 } 1627 } 1628 else 1629 { 1630 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1631 { 1632 pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 ); 1633 } 1634 } 1635 #else 1567 1636 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1568 1637 { … … 1580 1649 } 1581 1650 } 1651 #endif 1582 1652 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1583 1653 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1641 1711 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) 1642 1712 { 1713 #if VPS_MISC_UPDATES 1714 assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1); 1715 #endif 1643 1716 parseVpsVuiBspHrdParameters( pcVPS ); 1644 1717 } … … 2008 2081 esb++; 2009 2082 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 2083 #if NON_REF_NAL_TYPE_DISCARDABLE 2084 if ( uiCode == 1 ) 2085 { 2086 assert(rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R && 2087 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R && 2088 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R && 2089 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R && 2090 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R); 2091 } 2092 #endif 2010 2093 } 2011 2094 … … 2287 2370 if (rpcSlice->getSPS()->getTMVPFlagsPresent()) 2288 2371 { 2372 #if I0044_SLICE_TMVP 2373 READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" ); 2374 #else 2289 2375 READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" ); 2376 #endif 2290 2377 rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false ); 2291 2378 } … … 2723 2810 #endif 2724 2811 } 2812 #if INFERENCE_POC_MSB_VAL_PRESENT 2813 else 2814 { 2815 rpcSlice->setSliceSegmentHeaderExtensionLength( 0 ); 2816 rpcSlice->setPocMsbValPresentFlag( false ); 2817 } 2818 #endif 2725 2819 2726 2820 -
branches/HTM-12.0-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r976 r1053 909 909 } 910 910 #endif 911 912 #if I0044_SLICE_TMVP 913 if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 ) 914 { 915 //update all pics in the DPB such that they cannot be used for TMPV ref 916 TComList<TComPic*>::iterator iterRefPic = m_cListPic.begin(); 917 while( iterRefPic != m_cListPic.end() ) 918 { 919 TComPic *refPic = *iterRefPic; 920 if( ( refPic->getLayerId() == m_apcSlicePilot->getLayerId() ) && refPic->getReconMark() ) 921 { 922 for(Int i = refPic->getNumAllocatedSlice()-1; i >= 0; i--) 923 { 924 925 TComSlice *refSlice = refPic->getSlice(i); 926 refSlice->setAvailableForTMVPRefFlag( false ); 927 } 928 } 929 iterRefPic++; 930 } 931 } 932 m_apcSlicePilot->setAvailableForTMVPRefFlag( true ); 933 #endif 934 911 935 xActivateParameterSets(); 912 936 … … 1132 1156 #endif 1133 1157 #endif 1158 1159 #if I0044_SLICE_TMVP 1160 if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() ) 1161 { 1162 TComPic* refPic = pcSlice->getRefPic(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx()); 1163 1164 assert ( refPic ); 1165 assert ( refPic->getPicSym()->getSlice(0)->getAvailableForTMVPRefFlag() == true ); 1166 } 1167 #endif 1168 1134 1169 // For generalized B 1135 1170 // note: maybe not existed case (always L0 is copied to L1 if L1 is empty) -
branches/HTM-12.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r1039 r1053 1012 1012 #if H_MV 1013 1013 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 1014 { 1014 { 1015 //TODO: ADD implementation for PTL. Need to add level info in each layer. 1015 1016 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1016 1017 … … 1084 1085 } 1085 1086 1087 #if VPS_MISC_UPDATES //These codes are moved from below. 1088 if ( pcVPS->getNumIndependentLayers() > 1 ) 1089 { 1090 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1091 } 1092 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1093 { 1094 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1095 { 1096 WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j ) , "highest_layer_idx_plus1" ); 1097 } 1098 } 1099 #endif 1100 1086 1101 WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" ); 1087 1102 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1125 1140 } 1126 1141 1142 #if !VPS_MISC_UPDATES 1127 1143 if ( pcVPS->getNumIndependentLayers() > 1 ) 1128 1144 { … … 1136 1152 } 1137 1153 } 1154 #endif 1155 1138 1156 if (pcVPS->getNumLayerSets() > 1) 1139 1157 { … … 1152 1170 if( i >= pcVPS->getNumLayerSets( ) ) 1153 1171 { 1172 #if !VPS_MISC_UPDATES 1154 1173 WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ), "layer_set_idx_for_ols_minus1[i]" ); 1155 } 1156 1174 #else 1175 WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) , "layer_set_idx_for_ols_minus1[i]" ); 1176 #endif 1177 } 1178 1179 #if !VPS_MISC_UPDATES 1157 1180 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 ) 1181 #else 1182 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() >= 2 ) //according to the flag value 3 shall be treated as 2. 1183 #endif 1158 1184 { 1159 1185 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) … … 1371 1397 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1372 1398 { 1399 #if I0045_BR_PR_ADD_LAYER_SET 1400 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1401 #else 1373 1402 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1403 #endif 1374 1404 { 1375 1405 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1404 1434 else 1405 1435 { 1436 #if I0045_VPS_VUI_VST_PARAMS 1437 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 ); 1438 #else 1406 1439 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1440 #endif 1407 1441 } 1408 1442 … … 1417 1451 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1418 1452 { 1453 #if I0045_VPS_VUI_VST_PARAMS 1454 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1455 { 1456 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); 1457 } 1458 #else 1419 1459 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1420 1460 { … … 1429 1469 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) ); 1430 1470 } 1471 #endif 1431 1472 } 1432 1473 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); … … 1733 1774 esb++; 1734 1775 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 1776 #if NON_REF_NAL_TYPE_DISCARDABLE 1777 if (pcSlice->getDiscardableFlag( )) 1778 { 1779 assert(pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R && 1780 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R && 1781 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R && 1782 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R && 1783 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R); 1784 } 1785 #endif 1735 1786 } 1736 1787 … … 1893 1944 if (pcSlice->getSPS()->getTMVPFlagsPresent()) 1894 1945 { 1946 #if I0044_SLICE_TMVP 1947 WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" ); 1948 #else 1895 1949 WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enable_flag" ); 1950 #endif 1896 1951 } 1897 1952 }
Note: See TracChangeset for help on using the changeset viewer.