Changeset 1053 in 3DVCSoftware for branches/HTM-12.0-dev0/source/Lib/TLibEncoder
- Timestamp:
- 25 Sep 2014, 02:15:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.