Changeset 964 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 5 Jul 2014, 05:16:45 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r950 r964 364 364 READ_FLAG( uiCode, "slice_segment_header_extension_present_flag"); 365 365 pcPPS->setSliceHeaderExtensionPresentFlag(uiCode); 366 366 367 #if H_MV 368 READ_FLAG( uiCode, "pps_extension_present_flag"); 369 #else 367 370 READ_FLAG( uiCode, "pps_extension_flag"); 371 #endif 368 372 if (uiCode) 369 373 { 374 370 375 #if H_MV 376 #if H_MV_HLS_8_SPS_NODOC_48 377 READ_FLAG( uiCode, "pps_range_extensions_flag" ); pcPPS->setPpsRangeExtensionsFlag( uiCode == 1 ); 378 READ_FLAG( uiCode, "pps_multilayer_extension_flag" ); pcPPS->setPpsMultilayerExtensionFlag( uiCode == 1 ); 379 #if !H_3D 380 READ_CODE( 6, uiCode, "pps_extension_6bits" ); pcPPS->setPpsExtension6bits( uiCode ); 381 #else 382 READ_FLAG( uiCode, "pps_3d_extension_flag" ); pcPPS->setPps3dExtensionFlag( uiCode == 1 ); 383 READ_CODE( 5, uiCode, "pps_extension_5bits" ); pcPPS->setPpsExtension5bits( uiCode ); 384 #endif 385 if ( pcPPS->getPpsRangeExtensionsFlag() ) 386 { 387 assert(0); 388 } 389 390 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 391 { 392 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 393 #if H_MV_HLS_8_PPS_NODOC_NN 394 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 395 #endif 396 } 397 #if !H_3D 398 if ( pcPPS->getPpsExtension6bits() ) 399 { 400 #else 401 if ( pcPPS->getPps3dExtensionFlag() ) 402 { 403 parsePPSExtension( pcPPS, pcVPS ); 404 } 405 if ( pcPPS->getPpsExtension5bits() ) 406 { 407 #endif 408 #else 371 409 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 372 410 { … … 395 433 { 396 434 #endif 435 #endif 436 397 437 while ( xMoreRbspData() ) 398 438 { … … 845 885 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 846 886 { 847 #if H_MV848 887 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]"); 849 #else850 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");851 #endif852 888 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 853 #if H_MV854 889 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" ); 855 #else856 READ_UVLC ( uiCode, "sps_num_reorder_pics" );857 #endif858 890 pcSPS->setNumReorderPics(uiCode, i); 859 #if H_MV860 891 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 861 #else862 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1");863 #endif864 892 pcSPS->setMaxLatencyIncrease( uiCode, i ); 865 893 … … 978 1006 } 979 1007 1008 1009 #if H_MV 1010 READ_FLAG( uiCode, "sps_extension_present_flag"); 1011 pcSPS->setSpsExtensionPresentFlag( uiCode ); 1012 if (pcSPS->getSpsExtensionPresentFlag( ) ) 1013 #else 980 1014 READ_FLAG( uiCode, "sps_extension_flag"); 1015 if (uiCode) 1016 #endif 1017 { 981 1018 #if H_MV 982 pcSPS->setSpsExtensionFlag( uiCode ); 983 if (pcSPS->getSpsExtensionFlag( ) ) 984 #else 985 if (uiCode) 986 #endif 987 { 988 #if H_MV 1019 #if H_MV_HLS_8_SPS_NODOC_48 1020 READ_FLAG( uiCode, "sps_range_extensions_flag" ); pcSPS->setSpsRangeExtensionsFlag( uiCode == 1 ); 1021 READ_FLAG( uiCode, "sps_multilayer_extension_flag" ); pcSPS->setSpsMultilayerExtensionFlag( uiCode == 1 ); 1022 #if !H_3D 1023 READ_CODE( 6, uiCode, "sps_extension_6bits" ); pcSPS->setSpsExtension6bits( uiCode ); 1024 #else 1025 READ_FLAG( uiCode, "sps_3d_extension_flag" ); pcSPS->setSps3dExtensionFlag( uiCode == 1 ); 1026 READ_CODE( 5, uiCode, "sps_extension_5bits" ); pcSPS->setSpsExtension5bits( uiCode ); 1027 #endif 1028 } 1029 1030 if ( pcSPS->getSpsRangeExtensionsFlag() ) 1031 { 1032 assert( 0 ); 1033 } 1034 1035 if ( pcSPS->getSpsMultilayerExtensionFlag() ) 1036 { 1037 parseSPSExtension( pcSPS ); 1038 } 1039 1040 #if H_3D 1041 if ( pcSPS->getSps3dExtensionFlag() ) 1042 { 1043 parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 1044 } 1045 1046 if ( pcSPS->getSpsExtension5bits() ) 1047 { 1048 #else 1049 if ( pcSPS->getSpsExtension6bits() ) 1050 { 1051 #endif 1052 #else 989 1053 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 990 1054 { … … 1012 1076 { 1013 1077 #endif 1078 #endif 1014 1079 while ( xMoreRbspData() ) 1015 1080 { 1016 1081 READ_FLAG( uiCode, "sps_extension_data_flag"); 1017 1082 } 1018 #if H_MV 1083 #if H_MV && !H_MV_HLS_8_SPS_NODOC_48 1019 1084 } 1020 1085 #endif … … 1067 1132 1068 1133 READ_CODE( 4, uiCode, "vps_video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 1134 #if H_MV_HLS_8_SYN_Q0041_03 1135 READ_FLAG( uiCode, "vps_base_layer_internal_flag" ); pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 ); 1136 READ_FLAG( uiCode, "vps_reserved_one_bit" ); assert( uiCode == 1 ); 1137 #else 1069 1138 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 1139 #endif 1070 1140 #if H_MV 1071 1141 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( std::min( uiCode, (UInt) ( MAX_NUM_LAYER_IDS-1) ) ); … … 1073 1143 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); 1074 1144 #endif 1075 READ_CODE( 3, uiCode, "vps_max_sub_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); 1145 READ_CODE( 3, uiCode, "vps_max_sub_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); assert(uiCode+1 <= MAX_TLAYER); 1076 1146 READ_FLAG( uiCode, "vps_temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 1077 1147 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); … … 1151 1221 } 1152 1222 } 1223 #if H_MV_HLS_8_RPS_Q0100_36 1224 READ_FLAG( uiCode, "vps_extension_flag" ); pcVPS->setVpsExtensionFlag( uiCode == 1 ? true : false ); 1225 if ( pcVPS->getVpsExtensionFlag() ) 1226 #else 1153 1227 READ_FLAG( uiCode, "vps_extension_flag" ); 1154 1228 if (uiCode) 1229 #endif 1155 1230 { 1156 1231 #if H_MV … … 1187 1262 { 1188 1263 UInt uiCode; 1264 #if !H_MV_HLS_8_SYN_Q0041_03 1189 1265 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1266 #endif 1190 1267 1191 1268 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1267 1344 READ_CODE( 3, uiCode, "sub_layers_vps_max_minus1" ); pcVPS->setSubLayersVpsMaxMinus1( i, uiCode ); 1268 1345 pcVPS->checkSubLayersVpsMaxMinus1( i ); 1269 1270 1346 } 1271 1347 } … … 1294 1370 1295 1371 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); pcVPS->setAllRefLayersActiveFlag( uiCode == 1 ); 1296 1297 1372 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1298 1373 … … 1309 1384 } 1310 1385 1311 READ_UVLC( uiCode, "num_add_output_layer_sets" ); pcVPS->setNumAddOutputLayerSets( uiCode ); 1386 #if H_MV_HLS_8_SYN_39_19 1387 if ( pcVPS->getNumIndependentLayers() > 1 ) 1388 { 1389 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1390 } 1391 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1392 { 1393 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1394 { 1395 READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode ); 1396 } 1397 } 1398 if (pcVPS->getNumLayerSets() > 1) 1399 { 1400 READ_UVLC( uiCode, "num_add_olss" ); pcVPS->setNumAddOlss( uiCode ); 1401 READ_CODE( 2, uiCode, "default_output_layer_idc" ); pcVPS->setDefaultOutputLayerIdc( std::min( uiCode, (UInt) 2 ) ); 1402 } 1403 1404 pcVPS->initTargetLayerIdLists( ); 1405 1406 #else 1407 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1312 1408 pcVPS->initTargetLayerIdLists( ); 1313 1409 if( pcVPS->getNumOutputLayerSets() > 1) 1314 1410 { 1315 READ_CODE( 2, uiCode, "default_ target_output_layer_idc" ); pcVPS->setDefaultTargetOutputLayerIdc( std::min( uiCode, (UInt) 2 ) );1411 READ_CODE( 2, uiCode, "default_output_layer_idc" ); pcVPS->setDefaultOutputLayerIdc( std::min( uiCode, (UInt) 2 ) ); 1316 1412 } 1413 #endif 1317 1414 1318 1415 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1319 pcVPS->set OutputLayerSetIdxMinus1(0, -1);1416 pcVPS->setLayerSetIdxForOlsMinus1(0, -1); 1320 1417 1321 1418 pcVPS->deriveTargetLayerIdList( 0 ); 1419 1322 1420 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1323 1421 { 1422 #if H_MV_HLS_8_SYN_39_19 1423 if( i >= pcVPS->getNumLayerSets( ) ) 1424 #else 1324 1425 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1426 #endif 1325 1427 { 1326 READ_UVLC( uiCode, " output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );1327 } 1328 1329 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefault TargetOutputLayerIdc() == 2 )1428 READ_UVLC( uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1429 } 1430 1431 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 ) 1330 1432 { 1331 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ); j++ )1433 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) 1332 1434 { 1333 1435 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); … … 1336 1438 else 1337 1439 { 1338 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ); j++ )1440 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) 1339 1441 { 1340 1442 pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j )); … … 1347 1449 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1348 1450 } 1349 1350 1451 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1351 1452 { … … 1354 1455 } 1355 1456 1457 #if !H_MV_HLS_8_PMS_Q0195_20 1356 1458 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1357 1459 if ( pcVPS->getRepFormatIdxPresentFlag() ) … … 1359 1461 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1360 1462 } 1463 #else 1464 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1465 #endif 1361 1466 1362 1467 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) … … 1369 1474 } 1370 1475 1476 #if H_MV_HLS_8_PMS_Q0195_20 1477 if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1478 { 1479 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1480 } 1481 #endif 1371 1482 if( pcVPS->getRepFormatIdxPresentFlag() ) 1372 1483 { 1484 #if H_MV_HLS_8_SYN_Q0041_03 1485 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1486 #else 1373 1487 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1374 { 1488 #endif 1489 { 1490 #if !H_MV_HLS_8_PMS_Q0195_20 1375 1491 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1376 1492 { 1493 #endif 1377 1494 READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1378 } 1379 } 1380 } 1495 #if !H_MV_HLS_8_PMS_Q0195_20 1496 } 1497 #endif 1498 } 1499 } 1500 #if H_MV_HLS_8_PMS_Q0195_20 1501 else 1502 { 1503 #if H_MV_HLS_8_SYN_Q0041_03 1504 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1505 #else 1506 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1507 #endif 1508 { 1509 pcVPS->setVpsRepFormatIdx( i, pcVPS->inferVpsRepFormatIdx( i ) ); 1510 } 1511 } 1512 #endif 1381 1513 1382 1514 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); … … 1403 1535 } 1404 1536 1537 #if H_MV_HLS_8_SYN_Q0041_03 1538 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1539 { 1540 for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 1541 #else 1405 1542 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1406 1543 { 1407 1544 for( Int j = 0; j < i; j++ ) 1545 #endif 1408 1546 { 1409 1547 if (pcVPS->getDirectDependencyFlag( i, j) ) … … 1415 1553 else 1416 1554 { 1555 1417 1556 READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2, uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode); 1418 1557 } … … 1420 1559 } 1421 1560 } 1422 1423 1561 READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode ); 1424 1562 for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ ) … … 1437 1575 pcVPSVUI->inferVpsVui( false ); 1438 1576 } 1439 1440 1577 pcVPS->checkVPSExtensionSyntax(); 1441 1578 } … … 1492 1629 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1493 1630 { 1631 #if H_MV_HLS_8_SYN_Q0041_03 1632 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1633 #else 1494 1634 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1495 { 1635 #endif 1636 { 1637 #if H_MV_HLS_8_MIS_Q0102_30 1638 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1639 #else 1496 1640 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) 1641 #endif 1497 1642 { 1498 1643 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) … … 1551 1696 } 1552 1697 } 1553 1554 1698 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1555 1699 if( !pcVPSVUI->getTilesNotInUseFlag() ) 1556 1700 { 1701 #if H_MV_HLS_8_SYN_Q0041_03 1702 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1703 #else 1557 1704 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1705 #endif 1558 1706 { 1559 1707 READ_FLAG( uiCode, "tiles_in_use_flag[i]" ); pcVPSVUI->setTilesInUseFlag( i, uiCode == 1 ); … … 1563 1711 } 1564 1712 } 1565 1566 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1713 #if H_MV_HLS_8_SYN_Q0041_03 1714 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1715 #else 1716 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1717 #endif 1567 1718 { 1568 1719 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) … … 1586 1737 } 1587 1738 } 1588 1589 1739 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1590 1740 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); … … 1596 1746 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1597 1747 { 1598 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1599 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1600 { 1601 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag" ); pcVPSVUI->setCtuBasedOffsetEnabledFlag( i, j, uiCode == 1 ); 1602 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1748 #if H_MV_HLS_8_SYN_Q0041_03 1749 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1750 { 1751 #endif 1752 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1753 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1603 1754 { 1604 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1" ); pcVPSVUI->setMinHorizontalCtuOffsetPlus1( i, j, uiCode ); 1755 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag" ); pcVPSVUI->setCtuBasedOffsetEnabledFlag( i, j, uiCode == 1 ); 1756 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1757 { 1758 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1" ); pcVPSVUI->setMinHorizontalCtuOffsetPlus1( i, j, uiCode ); 1759 } 1605 1760 } 1606 } 1761 #if H_MV_HLS_8_SYN_Q0041_03 1762 } 1763 #endif 1607 1764 } 1608 1765 } … … 1613 1770 { 1614 1771 parseVpsVuiBspHrdParameters( pcVPS ); 1615 }1772 } 1616 1773 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1617 1774 { … … 1651 1808 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 1652 1809 { 1810 #if H_MV_HLS_8_HRD_Q0101_04 1811 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 1812 { 1813 READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 ); 1814 #else 1653 1815 for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1654 1816 { … … 1661 1823 vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec 1662 1824 } 1825 #endif 1663 1826 } 1664 1827 } … … 1667 1830 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) ) 1668 1831 { 1669 READ_UVLC( uiCode, "num_bsp_sched_combinations" ); vpsVuiBspHrdP->setNumBspSchedCombinations( h, uiCode ); 1670 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinations( h ); i++ ) 1832 READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1" ); vpsVuiBspHrdP->setNumBspSchedCombinationsMinus1( h, uiCode ); 1833 #if H_MV_HLS_8_HRD_Q0182_05 1834 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1835 #else 1836 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1837 #endif 1671 1838 { 1672 1839 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ ) 1673 1840 { 1841 #if H_MV_HLS_8_HRD_Q0101_04 1842 READ_CODE( vpsVuiBspHrdP->getBspCombHrdIdxLen(), uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode ); 1843 #else 1674 1844 READ_UVLC( uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode ); 1845 #endif 1675 1846 READ_UVLC( uiCode, "bsp_comb_sched_idx" ); vpsVuiBspHrdP->setBspCombSchedIdx( h, i, j, uiCode ); 1847 #if H_MV_HLS_8_HRD_Q0101_04 1848 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j ); 1849 #endif 1676 1850 } 1677 1851 } … … 1698 1872 for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ ) 1699 1873 { 1874 #if H_MV_HLS_8_MIS_Q0102_30 1875 Int currLsIdx = vps->olsIdxToLsIdx( i ); 1876 #endif 1700 1877 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 ); 1878 #if H_MV_HLS_8_MIS_Q0102_30 1879 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1880 #else 1701 1881 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1882 #endif 1702 1883 { 1703 1884 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1707 1888 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1708 1889 { 1709 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1890 #if H_MV_HLS_8_MIS_Q0102_30 1891 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1892 #else 1893 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ ) 1894 #endif 1710 1895 { 1711 1896 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1712 1897 } 1713 1898 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); 1714 #if H_MV_HLS7_GEN1715 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) )1716 {1717 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )1718 {1719 READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1" ); dpbSize->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode );1720 }1721 }1722 #endif1723 1899 READ_UVLC( uiCode, "max_vps_latency_increase_plus1" ); dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode ); 1724 1900 } … … 1727 1903 if ( j > 0 ) 1728 1904 { 1729 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1905 #if H_MV_HLS_8_DBP_NODOC_42 1906 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1907 #else 1908 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ ) 1909 #endif 1730 1910 { 1731 1911 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1858 2038 #endif 1859 2039 2040 #if H_MV_HLS_8_HRD_Q0102_08 2041 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx) 2042 #else 1860 2043 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) 2044 #endif 1861 2045 { 1862 2046 UInt uiCode; … … 1876 2060 if( rpcSlice->getRapPicFlag()) 1877 2061 { 1878 READ_FLAG( uiCode, "no_output_of_prior_pics_flag" ); //ignored 1879 } 2062 READ_FLAG( uiCode, "no_output_of_prior_pics_flag" ); //ignored -- updated already 2063 #if SETTING_NO_OUT_PIC_PRIOR 2064 rpcSlice->setNoOutputPriorPicsFlag(uiCode ? true : false); 2065 #else 2066 rpcSlice->setNoOutputPicPrior( false ); 2067 #endif 2068 } 2069 1880 2070 READ_UVLC ( uiCode, "slice_pic_parameter_set_id" ); rpcSlice->setPPSId(uiCode); 1881 2071 pps = parameterSetManager->getPrefetchedPPS(uiCode); … … 1891 2081 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 1892 2082 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2083 #if H_MV_HLS_8_HRD_Q0102_08 2084 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2085 #endif 2086 #if H_MV_HLS_8_RPS_Q0100_36 2087 vps->inferDbpSizeLayerSetZero( sps, false ); 2088 #endif 2089 1893 2090 if ( sps->getVuiParametersPresentFlag() ) 1894 2091 { … … 1944 2141 } 1945 2142 2143 #if H0044_POC_LSB_NOT_PRESENT 2144 UInt slicePicOrderCntLsb = 0; 2145 #endif 2146 1946 2147 if(!rpcSlice->getDependentSliceSegmentFlag()) 1947 2148 { … … 1994 2195 1995 2196 #if H_MV 2197 #if !H0044_POC_LSB_NOT_PRESENT 1996 2198 UInt slicePicOrderCntLsb = 0; 2199 #endif 1997 2200 Int iPOClsb = slicePicOrderCntLsb; // Needed later 1998 2201 if ( (rpcSlice->getLayerId() > 0 && !vps->getPocLsbNotPresentFlag( rpcSlice->getLayerIdInVps())) || !rpcSlice->getIdrPicFlag() ) … … 2000 2203 READ_CODE(sps->getBitsForPOC(), slicePicOrderCntLsb, "slice_pic_order_cnt_lsb"); 2001 2204 } 2205 #if H_MV_HLS_8_POC_Q0142_32 2206 rpcSlice->setSlicePicOrderCntLsb( slicePicOrderCntLsb ); 2207 #endif 2002 2208 2003 2209 Bool picOrderCntMSBZeroFlag = false; … … 2093 2299 READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" ); 2094 2300 if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header 2095 { 2301 { 2096 2302 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 2303 #if H_MV_HLS_8_RPS_Q0100_36 2304 if ( !rps->getInterRPSPrediction( ) ) 2305 { // check sum of num_positive_pics and num_negative_pics 2306 rps->checkMaxNumPics( 2307 vps->getVpsExtensionFlag(), 2308 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2309 rpcSlice->getLayerId(), 2310 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); 2311 } 2312 #endif 2097 2313 } 2098 2314 else // use reference to short-term reference picture set in PPS … … 2198 2414 rps->setNumberOfPictures(offset); 2199 2415 } 2416 #if H_MV_HLS_8_RPS_Q0100_36 2417 if ( !rps->getInterRPSPrediction( ) ) 2418 { // check sum of NumPositivePics, NumNegativePics, num_long_term_sps and num_long_term_pics 2419 rps->checkMaxNumPics( 2420 vps->getVpsExtensionFlag(), 2421 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2422 rpcSlice->getLayerId(), 2423 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); 2424 } 2425 #endif 2200 2426 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 2201 2427 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL … … 2578 2804 rpcSlice->setPocResetIdc( 0 ); 2579 2805 } 2580 2806 #if H_MV_HLS_8_POC_Q0142_32 2807 rpcSlice->checkPocResetIdc(); 2808 #endif 2809 2810 #if H0044_POC_LSB_NOT_PRESENT 2811 if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && slicePicOrderCntLsb > 0 ) 2812 { 2813 assert( rpcSlice->getPocResetIdc() != 2 ); 2814 } 2815 #endif 2581 2816 if( rpcSlice->getPocResetIdc() != 0 ) 2582 2817 { … … 2593 2828 READ_FLAG( uiCode, "full_poc_reset_flag" ); rpcSlice->setFullPocResetFlag( uiCode == 1 ); 2594 2829 READ_CODE( rpcSlice->getPocLsbValLen() , uiCode, "poc_lsb_val" ); rpcSlice->setPocLsbVal( uiCode ); 2830 #if !H_MV_HLS_8_POC_Q0142_32 2831 #if H0044_POC_LSB_NOT_PRESENT 2832 if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && rpcSlice->getFullPocResetFlag() ) 2833 { 2834 assert( rpcSlice->getPocLsbVal() == 0 ); 2835 } 2836 #endif 2837 #endif 2595 2838 } 2596 2597 // Derive the value of PocMsbValRequiredFlag 2839 #if H_MV_HLS_8_POC_Q0142_32 2840 rpcSlice->checkPocLsbVal(); 2841 #endif 2842 2843 // Derive the value of PocMs8bValRequiredFlag 2598 2844 rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag() 2599 2845 /* || TODO related to vps_poc_lsb_aligned_flag */ … … 2606 2852 else 2607 2853 { 2854 #if H_MV_HLS_8_POC_Q0146_15 2855 rpcSlice->setPocMsbValPresentFlag( rpcSlice->inferPocMsbValPresentFlag( ) ); 2856 #else 2608 2857 if( rpcSlice->getPocMsbValRequiredFlag() ) 2609 2858 { … … 2614 2863 rpcSlice->setPocMsbValPresentFlag( false ); 2615 2864 } 2865 #endif 2616 2866 } 2617 2867 … … 2633 2883 UInt ignore; 2634 2884 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 2635 } 2636 } 2885 } 2637 2886 #endif 2638 2887 }
Note: See TracChangeset for help on using the changeset viewer.