Changeset 964 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
- Timestamp:
- 5 Jul 2014, 05:16:45 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r950 r964 140 140 WRITE_UVLC( rps->getNumberOfNegativePictures(), "num_negative_pics" ); 141 141 WRITE_UVLC( rps->getNumberOfPositivePictures(), "num_positive_pics" ); 142 142 143 Int prev = 0; 143 144 for(Int j=0 ; j < rps->getNumberOfNegativePictures(); j++) … … 276 277 pcPPS->getLayerId() != 1 ) 277 278 { 278 pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false ); 279 #if H_MV_HLS_8_SPS_NODOC_48 280 pcPPS->setPps3dExtensionFlag( false ); 281 #else 282 pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false ); 283 #endif 279 284 } 280 285 #endif … … 283 288 WRITE_FLAG( 0, "pps_extension_flag" ); 284 289 #else 285 WRITE_FLAG( 1, "pps_extension_flag" ); 286 290 WRITE_FLAG( 1, "pps_extension_present_flag" ); 291 292 #if H_MV_HLS_8_SPS_NODOC_48 293 WRITE_FLAG( pcPPS->getPpsRangeExtensionsFlag( ) ? 1 : 0 , "pps_range_extensions_flag" ); 294 WRITE_FLAG( pcPPS->getPpsMultilayerExtensionFlag( ) ? 1 : 0 , "pps_multilayer_extension_flag" ); 295 #if !H_3D 296 WRITE_CODE( pcPPS->getPpsExtension6bits( ), 6, "pps_extension_6bits" ); 297 #else 298 WRITE_FLAG( pcPPS->getPps3dExtensionFlag( ) ? 1 : 0 , "pps_3d_extension_flag" ); 299 WRITE_CODE( pcPPS->getPpsExtension5bits( ), 5, "pps_extension_5bits" ); 300 #endif 301 if ( pcPPS->getPpsRangeExtensionsFlag() ) 302 { 303 assert(0); 304 } 305 306 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 307 { 308 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 309 #if H_MV_HLS_8_PPS_NODOC_NN 310 WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" ); 311 #endif 312 } 313 314 #if H_3D 315 if( pcPPS->getPps3dExtensionFlag( ) ) // This probably needs to be aligned with Rext and SHVC 316 { 317 codePPSExtension( pcPPS ); 318 } 319 #endif 320 #else 287 321 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 288 322 { … … 305 339 codePPSExtension( pcPPS ); 306 340 } 341 #endif 307 342 #endif 308 343 … … 822 857 WRITE_FLAG( 0, "sps_extension_flag" ); 823 858 #else 824 WRITE_FLAG( pcSPS->getSpsExtensionFlag(), "sps_extension_flag" ); 825 826 if ( pcSPS->getSpsExtensionFlag() ) 827 { 859 WRITE_FLAG( pcSPS->getSpsExtensionPresentFlag(), "sps_extension_present_flag" ); 860 861 if ( pcSPS->getSpsExtensionPresentFlag() ) 862 { 863 #if H_MV_HLS_8_SPS_NODOC_48 864 WRITE_FLAG( pcSPS->getSpsRangeExtensionsFlag( ) ? 1 : 0 , "sps_range_extensions_flag" ); 865 WRITE_FLAG( pcSPS->getSpsMultilayerExtensionFlag( ) ? 1 : 0 , "sps_multilayer_extension_flag" ); 866 #if !H_3D 867 WRITE_CODE( pcSPS->getSpsExtension6bits( ), 6, "sps_extension_6bits" ); 868 #else 869 WRITE_FLAG( pcSPS->getSps3dExtensionFlag( ) ? 1 : 0 , "sps_3d_extension_flag" ); 870 WRITE_CODE( pcSPS->getSpsExtension5bits( ), 5, "sps_extension_5bits" ); 871 #endif 872 } 873 874 if ( pcSPS->getSpsRangeExtensionsFlag() ) 875 { 876 assert( 0 ); 877 } 878 879 if ( pcSPS->getSpsMultilayerExtensionFlag() ) 880 { 881 codeSPSExtension( pcSPS ); 882 } 883 884 #if H_3D 885 if ( pcSPS->getSps3dExtensionFlag() ) 886 { 887 codeSPSExtension2( pcSPS, viewIndex, depthFlag ); 888 } 889 890 #endif 891 #else 828 892 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 829 893 { … … 848 912 #endif 849 913 } 914 #endif 850 915 #endif 851 916 } … … 890 955 { 891 956 WRITE_CODE( pcVPS->getVPSId(), 4, "vps_video_parameter_set_id" ); 957 #if H_MV_HLS_8_SYN_Q0041_03 958 WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" ); 959 WRITE_FLAG( 1 , "vps_reserved_one_bit" ); 960 #else 892 961 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); 962 #endif 893 963 #if H_MV 894 964 WRITE_CODE( pcVPS->getMaxLayersMinus1(), 6, "vps_max_layers_minus1" ); … … 972 1042 } 973 1043 #if H_MV 1044 #if H_MV_HLS_8_RPS_Q0100_36 1045 WRITE_FLAG( pcVPS->getVpsExtensionFlag(), "vps_extension_flag" ); 1046 #else 974 1047 WRITE_FLAG( 1, "vps_extension_flag" ); 1048 #endif 975 1049 m_pcBitIf->writeAlignOne(); 976 1050 codeVPSExtension( pcVPS ); … … 996 1070 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 997 1071 { 1072 1073 #if !H_MV_HLS_8_SYN_Q0041_03 998 1074 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1075 #endif 1076 999 1077 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1000 1078 … … 1010 1088 1011 1089 if ( pcVPS->getSplittingFlag() ) 1012 { // Ignore old dimension id length1090 { 1013 1091 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 ); 1014 1092 } … … 1042 1120 } 1043 1121 1044 1045 1122 WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" ); 1046 1123 … … 1068 1145 } 1069 1146 } 1147 1070 1148 WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" ); 1071 1149 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1109 1187 } 1110 1188 1111 WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" ); 1189 #if H_MV_HLS_8_SYN_39_19 1190 if ( pcVPS->getNumIndependentLayers() > 1 ) 1191 { 1192 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1193 } 1194 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1195 { 1196 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1197 { 1198 WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j ) , "highest_layer_idx_plus1" ); 1199 } 1200 } 1201 if (pcVPS->getNumLayerSets() > 1) 1202 { 1203 WRITE_UVLC( pcVPS->getNumAddOlss( ), "num_add_olss" ); 1204 WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" ); 1205 } 1206 #else 1207 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1112 1208 1113 1209 if( pcVPS->getNumOutputLayerSets() > 1) 1114 1210 { 1115 WRITE_CODE( pcVPS->getDefault TargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" );1211 WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" ); 1116 1212 } 1117 1213 #endif 1118 1214 1119 1215 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 1120 assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 1216 assert( pcVPS->getLayerSetIdxForOlsMinus1( 0 ) == -1 ); 1217 1218 1219 1121 1220 1122 1221 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1123 1222 { 1223 #if H_MV_HLS_8_SYN_39_19 1224 if( i >= pcVPS->getNumLayerSets( ) ) 1225 #else 1124 1226 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1227 #endif 1125 1228 { 1126 WRITE_UVLC( pcVPS->get OutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" );1127 } 1128 1129 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefault TargetOutputLayerIdc() == 2 )1229 WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ), "layer_set_idx_for_ols_minus1[i]" ); 1230 } 1231 1232 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 ) 1130 1233 { 1131 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ); j++ )1234 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) 1132 1235 { 1133 1236 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" ); … … 1136 1239 else 1137 1240 { 1138 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ) - 1; j++ )1241 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ) - 1; j++ ) 1139 1242 { 1140 1243 assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j )); 1141 1244 } 1142 1245 } 1246 1143 1247 1144 1248 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) … … 1152 1256 } 1153 1257 1258 #if !H_MV_HLS_8_PMS_Q0195_20 1154 1259 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1155 1260 if ( pcVPS->getRepFormatIdxPresentFlag() ) … … 1157 1262 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1158 1263 } 1264 #else 1265 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1266 #endif 1159 1267 1160 1268 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1161 1269 { 1270 1162 1271 TComRepFormat* curRepFormat = pcVPS->getRepFormat(i); 1163 1272 TComRepFormat* prevRepFormat = i > 0 ? pcVPS->getRepFormat( i - 1) : NULL; 1164 1273 codeRepFormat( i, curRepFormat , prevRepFormat); 1165 } 1166 1274 1275 } 1276 1277 #if H_MV_HLS_8_PMS_Q0195_20 1278 if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1279 { 1280 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1281 } 1282 #endif 1167 1283 if( pcVPS->getRepFormatIdxPresentFlag() ) 1168 1284 { 1285 #if H_MV_HLS_8_SYN_Q0041_03 1286 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1287 #else 1169 1288 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1170 { 1289 #endif 1290 { 1291 #if !H_MV_HLS_8_PMS_Q0195_20 1171 1292 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1172 1293 { 1294 #endif 1173 1295 WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" ); 1174 } 1175 } 1176 } 1296 #if !H_MV_HLS_8_PMS_Q0195_20 1297 } 1298 #endif 1299 } 1300 } 1301 #if H_MV_HLS_8_PMS_Q0195_20 1302 else 1303 { 1304 #if H_MV_HLS_8_SYN_Q0041_03 1305 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1306 #else 1307 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1308 #endif 1309 { 1310 assert( pcVPS->getVpsRepFormatIdx( i ) == pcVPS->inferVpsRepFormatIdx( i ) ); 1311 } 1312 } 1313 #endif 1314 1177 1315 1178 1316 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); … … 1187 1325 } 1188 1326 } 1327 1189 1328 WRITE_FLAG( 0, "vps_reserved_zero_flag" ); 1190 1329 codeDpbSize( pcVPS ); … … 1193 1332 1194 1333 WRITE_FLAG( pcVPS->getDefaultDirectDependencyFlag( ) ? 1 : 0 , "default_direct_dependency_flag" ); 1195 1196 1334 if ( pcVPS->getDefaultDirectDependencyFlag( ) ) 1197 1335 { … … 1199 1337 } 1200 1338 1339 #if H_MV_HLS_8_SYN_Q0041_03 1340 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1341 { 1342 for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 1343 #else 1201 1344 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1202 1345 { 1203 1346 for( Int j = 0; j < i; j++ ) 1347 #endif 1204 1348 { 1205 1349 if (pcVPS->getDirectDependencyFlag( i, j) ) … … 1218 1362 } 1219 1363 WRITE_UVLC( 0, "vps_non_vui_extension_length" ); 1220 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1364 1365 1366 1367 1368 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1221 1369 if( pcVPS->getVpsVuiPresentFlag() ) 1222 1370 { … … 1229 1377 pcVPSVUI->inferVpsVui( true ); 1230 1378 } 1379 1231 1380 } 1232 1381 … … 1248 1397 for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ ) 1249 1398 { 1399 #if H_MV_HLS_8_MIS_Q0102_30 1400 Int currLsIdx = vps->olsIdxToLsIdx( i ); 1401 #endif 1250 1402 WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" ); 1403 #if H_MV_HLS_8_MIS_Q0102_30 1404 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1405 #else 1251 1406 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1407 #endif 1252 1408 { 1253 1409 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1257 1413 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1258 1414 { 1259 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1415 #if H_MV_HLS_8_MIS_Q0102_30 1416 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1417 #else 1418 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ ) 1419 #endif 1260 1420 { 1261 1421 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); 1262 1422 } 1263 1423 WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" ); 1264 #if H_MV_HLS7_GEN1265 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) )1266 {1267 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )1268 {1269 WRITE_UVLC( dpbSize->getMaxVpsLayerDecPicBuffMinus1( i, k, j ), "max_vps_layer_dec_pic_buff_minus1" );1270 }1271 }1272 #endif1273 1424 WRITE_UVLC( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ), "max_vps_latency_increase_plus1" ); 1274 1425 } … … 1277 1428 if ( j > 0 ) 1278 1429 { 1279 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1430 #if H_MV_HLS_8_DBP_NODOC_42 1431 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1432 #else 1433 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ ) 1434 #endif 1280 1435 { 1281 1436 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1285 1440 } 1286 1441 } 1287 } 1288 } 1442 } 1443 } 1289 1444 } 1290 1445 … … 1324 1479 assert( pcVPSVUI ); 1325 1480 1481 1326 1482 WRITE_FLAG( pcVPSVUI->getCrossLayerPicTypeAlignedFlag( ) ? 1 : 0 , "cross_layer_pic_type_aligned_flag" ); 1327 1483 if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() ) … … 1337 1493 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1338 1494 { 1495 #if H_MV_HLS_8_SYN_Q0041_03 1496 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1497 #else 1339 1498 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1340 { 1499 #endif 1500 { 1501 #if H_MV_HLS_8_MIS_Q0102_30 1502 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1503 #else 1341 1504 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) 1505 #endif 1342 1506 { 1343 1507 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) … … 1399 1563 if( !pcVPSVUI->getTilesNotInUseFlag() ) 1400 1564 { 1565 #if H_MV_HLS_8_SYN_Q0041_03 1566 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1567 #else 1401 1568 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1569 #endif 1402 1570 { 1403 1571 WRITE_FLAG( pcVPSVUI->getTilesInUseFlag( i ) ? 1 : 0 , "tiles_in_use_flag[i]" ); … … 1407 1575 } 1408 1576 } 1409 1577 #if H_MV_HLS_8_SYN_Q0041_03 1578 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1579 #else 1410 1580 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1581 #endif 1411 1582 { 1412 1583 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) … … 1439 1610 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1440 1611 { 1612 #if H_MV_HLS_8_SYN_Q0041_03 1613 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1614 { 1615 #endif 1441 1616 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); 1442 1617 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) … … 1448 1623 } 1449 1624 } 1625 #if H_MV_HLS_8_SYN_Q0041_03 1626 } 1627 #endif 1450 1628 } 1451 1629 } … … 1495 1673 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 1496 1674 { 1675 #if H_MV_HLS_8_HRD_Q0101_04 1676 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 1677 { 1678 WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" ); 1679 #else 1497 1680 for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1498 1681 { … … 1505 1688 vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec 1506 1689 } 1690 #endif 1507 1691 } 1508 1692 } … … 1510 1694 1511 1695 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) ) 1512 { 1513 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinations( h ), "num_bsp_sched_combinations" ); 1514 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinations( h ); i++ ) 1696 { 1697 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" ); 1698 #if H_MV_HLS_8_HRD_Q0182_05 1699 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1700 #else 1701 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1702 #endif 1515 1703 { 1516 1704 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ ) 1517 1705 { 1706 #if H_MV_HLS_8_HRD_Q0101_04 1707 WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" ); 1708 #else 1518 1709 WRITE_UVLC( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), "bsp_comb_hrd_idx" ); 1710 #endif 1519 1711 WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" ); 1712 1713 #if H_MV_HLS_8_HRD_Q0101_04 1714 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j ); 1715 #endif 1520 1716 } 1521 1717 } … … 1636 1832 if ( pcSlice->getRapPicFlag() ) 1637 1833 { 1834 #if SETTING_NO_OUT_PIC_PRIOR 1835 WRITE_FLAG( pcSlice->getNoOutputPriorPicsFlag() ? 1 : 0, "no_output_of_prior_pics_flag" ); 1836 #else 1638 1837 WRITE_FLAG( 0, "no_output_of_prior_pics_flag" ); 1838 #endif 1639 1839 } 1640 1840 #if PPS_FIX_DEPTH … … 1707 1907 Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1); 1708 1908 WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb"); 1709 } 1909 #if H_MV_HLS_8_POC_Q0142_32 1910 pcSlice->setSlicePicOrderCntLsb( picOrderCntLSB ); 1911 #endif 1912 } 1913 1710 1914 #endif 1711 1915 if( !pcSlice->getIdrPicFlag() ) … … 2137 2341 } 2138 2342 2343 #if H_MV_HLS_8_POC_Q0142_32 2344 pcSlice->checkPocResetIdc(); 2345 #endif 2346 2139 2347 if( pcSlice->getPocResetIdc() != 0 ) 2140 2348 { … … 2147 2355 WRITE_CODE( pcSlice->getPocLsbVal( ), pcSlice->getPocLsbValLen() , "poc_lsb_val" ); 2148 2356 } 2149 2357 #if H_MV_HLS_8_POC_Q0142_32 2358 pcSlice->checkPocLsbVal(); 2359 #endif 2360 2150 2361 if( !pcSlice->getPocMsbValRequiredFlag() /* TODO && pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) 2151 2362 { 2152 2363 WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" ); 2153 2364 } 2365 #if H_MV_HLS_8_POC_Q0146_15 2366 else 2367 { 2368 assert( pcSlice->getPocMsbValPresentFlag() == pcSlice->inferPocMsbValPresentFlag( ) ); 2369 } 2370 #endif 2154 2371 2155 2372 if( pcSlice->getPocMsbValPresentFlag() )
Note: See TracChangeset for help on using the changeset viewer.