Changeset 964 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 5 Jul 2014, 05:16:45 (11 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/AnnexBread.h
r872 r964 65 65 , m_Input(istream) 66 66 { 67 istream.exceptions(std::istream::eofbit );67 istream.exceptions(std::istream::eofbit | std::istream::badbit); 68 68 } 69 69 -
trunk/source/Lib/TLibDecoder/NALread.cpp
r872 r964 127 127 else 128 128 { 129 #if H_MV_HLS_8_GEN_Q0108_13 130 131 // If nal_unit_type is in the range of BLA_W_LP to RSV_IRAP_VCL23, inclusive, i.e. the coded 132 // slice segment belongs to an IRAP picture, TemporalId shall be equal to 0. 133 // Otherwise, when nal_unit_type is equal to TSA_R, TSA_N, STSA_R, or STSA_N, TemporalId shall not be equal to 0. 134 // Otherwise, if nal_unit_type is equal to TSA or TSA_N, TemporalId shall not be equal to 0. 135 // Otherwise, when nuh_layer_id is equal to 0 and nal_unit_type is equal to STSA_R or STSA_N, 136 // TemporalId shall not be equal to 0. 137 138 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R 139 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N ); 140 141 assert( nalu.m_layerId > 0 142 || ( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R 143 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_N ) ); 144 #else 129 145 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R 130 146 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 131 147 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R 132 148 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_N ); 149 #endif 133 150 } 134 151 } -
trunk/source/Lib/TLibDecoder/SEIread.cpp
r884 r964 399 399 { 400 400 UInt val; 401 READ_CODE(4, val, "active_v ps_id");sei.activeVPSId = val;402 READ_FLAG( val, "full_random_access_flag"); sei.m_fullRandomAccessFlag = val ? true : false;403 READ_FLAG( val, "no_param_set_update_flag"); sei.m_noParamSetUpdateFlag = val ? true : false;401 READ_CODE(4, val, "active_video_parameter_set_id"); sei.activeVPSId = val; 402 READ_FLAG( val, "self_contained_cvs_flag"); sei.m_selfContainedCvsFlag = val ? true : false; 403 READ_FLAG( val, "no_parameter_set_update_flag"); sei.m_noParameterSetUpdateFlag = val ? true : false; 404 404 READ_UVLC( val, "num_sps_ids_minus1"); sei.numSpsIdsMinus1 = val; 405 405 406 sei.activeSeqParam SetId.resize(sei.numSpsIdsMinus1 + 1);406 sei.activeSeqParameterSetId.resize(sei.numSpsIdsMinus1 + 1); 407 407 for (Int i=0; i < (sei.numSpsIdsMinus1 + 1); i++) 408 408 { 409 READ_UVLC(val, "active_seq_param_set_id"); sei.activeSeqParamSetId[i] = val; 410 } 411 412 UInt uibits = m_pcBitstream->getNumBitsUntilByteAligned(); 413 414 while(uibits--) 415 { 416 READ_FLAG(val, "alignment_bit"); 417 } 409 READ_UVLC(val, "active_seq_parameter_set_id"); sei.activeSeqParameterSetId[i] = val; 410 } 411 412 xParseByteAlign(); 418 413 } 419 414 … … 681 676 case 4: 682 677 { 683 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeed Value= val;684 if( sei.m_cameraIsoSpeed Value== 255) //Extended_ISO678 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeedIdc = val; 679 if( sei.m_cameraIsoSpeedIdc == 255) //Extended_ISO 685 680 { 686 681 READ_CODE( 32, val, "camera_iso_speed_value" ); sei.m_cameraIsoSpeedValue = val; 682 } 683 READ_CODE( 8, val, "exposure_index_idc" ); sei.m_exposureIndexIdc = val; 684 if( sei.m_exposureIndexIdc == 255) //Extended_ISO 685 { 686 READ_CODE( 32, val, "exposure_index_value" ); sei.m_exposureIndexValue = val; 687 687 } 688 688 READ_FLAG( val, "exposure_compensation_value_sign_flag" ); sei.m_exposureCompensationValueSignFlag = val; -
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 } -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r884 r964 67 67 Int** m_aaiTempOffset; 68 68 #endif 69 69 70 public: 70 71 … … 80 81 Void parseRepFormat ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat ); 81 82 Void parseVPSVUI ( TComVPS* pcVPS ); 82 Void parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo );83 Void parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ); 83 84 Void parseDpbSize ( TComVPS* pcVPS ); 84 Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS );85 Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS ); 85 86 #endif 86 87 … … 108 109 Void parseProfileTier (ProfileTierLevel *ptl); 109 110 Void parseHrdParameters (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh); 111 #if H_MV_HLS_8_HRD_Q0102_08 112 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx); 113 #else 110 114 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager); 115 #endif 111 116 Void parseTerminatingBit ( UInt& ruiBit ); 112 117 -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r950 r964 1113 1113 { 1114 1114 UInt uiInitTrDepth = ( pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1 ); 1115 UInt uiNumPart = pcCU->getNumPart Inter();1115 UInt uiNumPart = pcCU->getNumPartitions(); 1116 1116 UInt uiNumQParts = pcCU->getTotalNumPart() >> 2; 1117 1117 -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r884 r964 67 67 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 68 68 #if H_3D 69 virtual Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) = 0;69 virtual Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) = 0; 70 70 #else 71 71 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; … … 77 77 #endif 78 78 79 #if H_MV_HLS_8_HRD_Q0102_08 80 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx ) = 0; 81 #else 79 82 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) = 0; 83 #endif 80 84 81 85 virtual Void parseTerminatingBit ( UInt& ruilsLast ) = 0; … … 125 129 virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0; 126 130 127 virtual ~TDecEntropyIf() {} 131 virtual ~TDecEntropyIf() {}; 128 132 }; 129 133 … … 160 164 Void decodePPS ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS); } 161 165 #endif 166 #if H_MV_HLS_8_HRD_Q0102_08 167 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, targetOlsIdx ); } 168 #else 162 169 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager); } 163 170 #endif 164 171 Void decodeTerminatingBit ( UInt& ruiIsLast ) { m_pcEntropyDecoderIf->parseTerminatingBit(ruiIsLast); } 165 172 -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r872 r964 249 249 } 250 250 251 #if !H_MV_HLS_7_VPS_P0300_27 252 #if SETTING_PIC_OUTPUT_MARK 253 rpcPic->setOutputMark(rpcPic->getSlice(0)->getPicOutputFlag() ? true : false); 254 #else 251 255 rpcPic->setOutputMark(true); 256 #endif 252 257 rpcPic->setReconMark(true); 258 #endif 253 259 } 254 260 -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r950 r964 957 957 assert(0); 958 958 } 959 #endif 959 960 #if H_MV_ENC_DEC_TRAC 960 961 DTRACE_CU("part_mode", eMode ) 961 962 #endif 963 #if H_3D_QTLPC 962 964 } 963 965 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r950 r964 87 87 #endif 88 88 89 #if H_MV_HLS_8_HRD_Q0102_08 90 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/, Int targetOlsIdx ) {} 91 #else 89 92 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/) {} 93 #endif 90 94 Void parseTerminatingBit ( UInt& ruiBit ); 91 95 Void parseMVPIdx ( Int& riMVPIdx ); -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r884 r964 365 365 m_prevSliceSkipped = false; 366 366 m_skippedPOC = 0; 367 #if SETTING_NO_OUT_PIC_PRIOR 368 m_bFirstSliceInBitstream = true; 369 m_lastPOCNoOutputPriorPics = -1; 370 m_craNoRaslOutputFlag = false; 371 m_isNoOutputPriorPics = false; 372 #endif 373 #if H0056_EOS_CHECKS 374 m_isLastNALWasEos = false; 375 #endif 367 376 #if H_MV 368 377 m_layerId = 0; … … 372 381 m_isDepth = false; 373 382 m_pcCamParsCollector = 0; 383 #endif 384 #if H_MV_HLS_8_HRD_Q0102_08 385 m_targetOptLayerSetIdx = -1; 374 386 #endif 375 387 #endif … … 471 483 TComVPS* vps = pcSlice->getVPS(); 472 484 TComDpbSize* dpbSize = vps->getDpbSize(); 473 Int lsIdx = vps-> getLayerSetIdxForOutputLayerSet( getTargetOutputLayerSetIdx()); // Is this correct, seems to be missing in spec?485 Int lsIdx = vps->olsIdxToLsIdx( getTargetOutputLayerSetIdx()); // Is this correct, seems to be missing in spec? 474 486 Int layerIdx = vps->getIdxInLayerSet ( lsIdx, getLayerId() ); 475 487 Int subDpbIdx = dpbSize->getSubDpbAssigned( lsIdx, layerIdx ); … … 499 511 { 500 512 rpcPic->setOutputMark(false); 513 #if H_MV_HLS_7_VPS_P0300_27 514 rpcPic->setPicOutputFlag(false); 515 #endif 501 516 bBufferIsAvailable = true; 502 517 break; … … 506 521 { 507 522 rpcPic->setOutputMark(false); 523 #if H_MV_HLS_7_VPS_P0300_27 524 rpcPic->setPicOutputFlag(false); 525 #endif 508 526 rpcPic->setReconMark( false ); 509 527 rpcPic->getPicYuvRec()->setBorderExtension( false ); … … 550 568 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 551 569 TComSlice::markCurrPic( pcPic ); 570 #if !H_MV_HLS_8_DBP_NODOC_42 552 571 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); 553 572 #endif 573 #endif 554 574 m_bFirstSliceInPicture = true; 555 575 556 576 return; 557 577 } 578 579 #if SETTING_NO_OUT_PIC_PRIOR 580 Void TDecTop::checkNoOutputPriorPics (TComList<TComPic*>*& rpcListPic) 581 { 582 if (!rpcListPic || !m_isNoOutputPriorPics) return; 583 584 TComList<TComPic*>::iterator iterPic = rpcListPic->begin(); 585 586 while (iterPic != rpcListPic->end()) 587 { 588 TComPic*& pcPicTmp = *(iterPic++); 589 if (m_lastPOCNoOutputPriorPics != pcPicTmp->getPOC()) 590 { 591 pcPicTmp->setOutputMark(false); 592 #if H_MV_HLS_7_VPS_P0300_27 593 pcPicTmp->setPicOutputFlag(false); 594 #endif 595 } 596 } 597 } 598 #endif 558 599 559 600 Void TDecTop::xCreateLostPicture(Int iLostPoc) … … 620 661 TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); 621 662 assert (vps != 0); 622 if ( false ==m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP(), m_layerId ) )663 if (!m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP(), m_layerId ) ) 623 664 #else 624 665 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) … … 628 669 assert (0); 629 670 } 671 672 #if H_MV_HLS_8_HRD_Q0102_08 673 sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false ); 674 #endif 675 676 #if H_MV_HLS_8_RPS_Q0100_36 677 vps->inferDbpSizeLayerSetZero( sps, false ); 678 #endif 679 680 #if H_MV_HLS_8_PMS_Q0195_21 681 // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0 682 if ( vps->getVpsNumRepFormatsMinus1() == 0 ) 683 { 684 //, it is a requirement of bitstream conformance that the value of update_rep_format_flag shall be equal to 0. 685 assert( sps->getUpdateRepFormatFlag() == false ); 686 } 687 #endif 688 689 #if H_MV_HLS_8_RPS_Q0100_36 690 sps->checkRpsMaxNumPics( vps, getLayerId() ); 691 #endif 692 693 #if H_MV_HLS_8_MIS_Q0177_22 694 if( m_layerId > 0 ) 695 { 696 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 697 } 698 #endif 630 699 631 700 if( pps->getDependentSliceSegmentsEnabledFlag() ) … … 719 788 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 720 789 #endif 790 791 #if H_MV_HLS_8_HRD_Q0102_08 792 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_targetOptLayerSetIdx ); 793 #else 721 794 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 722 795 #endif 723 796 // set POC for dependent slices in skipped pictures 724 797 if(m_apcSlicePilot->getDependentSliceSegmentFlag() && m_prevSliceSkipped) … … 741 814 #endif 742 815 816 #if SETTING_NO_OUT_PIC_PRIOR 817 //For inference of NoOutputOfPriorPicsFlag 818 if (m_apcSlicePilot->getRapPicFlag()) 819 { 820 if ((m_apcSlicePilot->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_apcSlicePilot->getNalUnitType() <= NAL_UNIT_CODED_SLICE_IDR_N_LP) || 821 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_bFirstSliceInSequence) || 822 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_apcSlicePilot->getHandleCraAsBlaFlag())) 823 { 824 m_apcSlicePilot->setNoRaslOutputFlag(true); 825 } 826 //the inference for NoOutputPriorPicsFlag 827 if (!m_bFirstSliceInBitstream && m_apcSlicePilot->getRapPicFlag() && m_apcSlicePilot->getNoRaslOutputFlag()) 828 { 829 if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) 830 { 831 m_apcSlicePilot->setNoOutputPriorPicsFlag(true); 832 } 833 } 834 else 835 { 836 m_apcSlicePilot->setNoOutputPriorPicsFlag(false); 837 } 838 839 if(m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) 840 { 841 m_craNoRaslOutputFlag = m_apcSlicePilot->getNoRaslOutputFlag(); 842 } 843 } 844 if (m_apcSlicePilot->getRapPicFlag() && m_apcSlicePilot->getNoOutputPriorPicsFlag()) 845 { 846 m_lastPOCNoOutputPriorPics = m_apcSlicePilot->getPOC(); 847 m_isNoOutputPriorPics = true; 848 } 849 else 850 { 851 m_isNoOutputPriorPics = false; 852 } 853 854 //For inference of PicOutputFlag 855 if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R) 856 { 857 if ( m_craNoRaslOutputFlag ) 858 { 859 m_apcSlicePilot->setPicOutputFlag(false); 860 } 861 } 862 #endif 863 864 #if FIX_POC_CRA_NORASL_OUTPUT 865 if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_craNoRaslOutputFlag) //Reset POC MSB when CRA has NoRaslOutputFlag equal to 1 866 { 867 Int iMaxPOClsb = 1 << m_apcSlicePilot->getSPS()->getBitsForPOC(); 868 m_apcSlicePilot->setPOC( m_apcSlicePilot->getPOC() & (iMaxPOClsb - 1) ); 869 } 870 #endif 743 871 #if H_MV 744 872 xCeckNoClrasOutput(); … … 769 897 770 898 //we should only get a different poc for a new picture (with CTU address==0) 771 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && ( !m_apcSlicePilot->getSliceCurStartCUAddr()==0))899 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (m_apcSlicePilot->getSliceCurStartCUAddr()!=0)) 772 900 { 773 901 printf ("Warning, the first slice of a picture might have been lost!\n"); … … 810 938 } 811 939 m_bFirstSliceInSequence = false; 940 #if SETTING_NO_OUT_PIC_PRIOR 941 m_bFirstSliceInBitstream = false; 942 #endif 812 943 //detect lost reference picture and insert copy of earlier frame. 813 944 Int lostPoc; … … 1127 1258 #endif 1128 1259 #if H_3D 1129 // Preliminary fix. assuming that all sps refer to the same SPS.1260 // Preliminary fix. assuming that all sps refer to the same VPS. 1130 1261 // Parsing dependency should be resolved! 1131 1262 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1132 assert( vps != 0 ); 1263 assert( vps != 0 ); 1133 1264 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1134 1265 #else … … 1182 1313 SEIActiveParameterSets *seiAps = (SEIActiveParameterSets*)(*activeParamSets.begin()); 1183 1314 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1184 assert(seiAps->activeSeqParam SetId.size()>0);1185 #if H_MV 1186 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParam SetId[0], m_layerId ))1187 #else 1188 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParam SetId[0] ))1315 assert(seiAps->activeSeqParameterSetId.size()>0); 1316 #if H_MV 1317 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParameterSetId[0], m_layerId )) 1318 #else 1319 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParameterSetId[0] )) 1189 1320 #endif 1190 1321 { … … 1209 1340 case NAL_UNIT_VPS: 1210 1341 xDecodeVPS(); 1342 #if H0056_EOS_CHECKS 1343 m_isLastNALWasEos = false; 1344 #endif 1211 1345 return false; 1212 1346 … … 1221 1355 case NAL_UNIT_PREFIX_SEI: 1222 1356 case NAL_UNIT_SUFFIX_SEI: 1357 #if H0056_EOS_CHECKS 1358 if ( nalu.m_nalUnitType == NAL_UNIT_SUFFIX_SEI ) 1359 { 1360 assert( m_isLastNALWasEos == false ); 1361 } 1362 #endif 1223 1363 xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType ); 1224 1364 return false; … … 1240 1380 case NAL_UNIT_CODED_SLICE_RASL_N: 1241 1381 case NAL_UNIT_CODED_SLICE_RASL_R: 1382 #if H0056_EOS_CHECKS 1383 if (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N || 1384 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_N || 1385 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_N || 1386 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || 1387 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N ) 1388 { 1389 assert( m_isLastNALWasEos == false ); 1390 } 1391 else 1392 { 1393 m_isLastNALWasEos = false; 1394 } 1395 #endif 1242 1396 #if H_MV 1243 1397 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag ); … … 1247 1401 break; 1248 1402 case NAL_UNIT_EOS: 1403 #if H0056_EOS_CHECKS 1404 assert( m_isLastNALWasEos == false ); 1405 //Check layer id of the nalu. if it is not 0, give a warning message and just return without doing anything. 1406 if (nalu.m_layerId > 0) 1407 { 1408 printf( "\nThis bitstream has EOS with non-zero layer id.\n" ); 1409 return false; 1410 } 1411 m_isLastNALWasEos = true; 1412 #endif 1249 1413 m_associatedIRAPType = NAL_UNIT_INVALID; 1250 1414 m_pocCRA = 0; … … 1264 1428 return false; 1265 1429 1430 case NAL_UNIT_FILLER_DATA: 1431 #if H_MV 1432 assert( m_isLastNALWasEos == false ); 1433 #endif 1434 return false; 1266 1435 1267 1436 case NAL_UNIT_RESERVED_VCL_N10: … … 1284 1453 case NAL_UNIT_RESERVED_VCL31: 1285 1454 1286 case NAL_UNIT_FILLER_DATA:1287 1455 case NAL_UNIT_RESERVED_NVCL41: 1288 1456 case NAL_UNIT_RESERVED_NVCL42: -
trunk/source/Lib/TLibDecoder/TDecTop.h
r884 r964 195 195 Bool* m_layerInitilizedFlag; // initialization Layers 196 196 static ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 197 #if H_MV_HLS_8_HRD_Q0102_08 198 Int m_targetOptLayerSetIdx; 199 #endif 197 200 #else 198 201 ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets … … 225 228 Bool m_prevSliceSkipped; 226 229 Int m_skippedPOC; 230 #if SETTING_NO_OUT_PIC_PRIOR 231 Bool m_bFirstSliceInBitstream; 232 Int m_lastPOCNoOutputPriorPics; 233 Bool m_isNoOutputPriorPics; 234 Bool m_craNoRaslOutputFlag; //value of variable NoRaslOutputFlag of the last CRA pic 235 #endif 236 #if H0056_EOS_CHECKS 237 Bool m_isLastNALWasEos; 238 #endif 227 239 228 240 #if H_MV … … 258 270 259 271 Void deletePicBuffer(); 272 #if H_MV 273 #if H_MV_HLS_7_VPS_P0300_27 274 TComVPS* getActiveVPS() { return m_parameterSetManagerDecoder.getActiveVPS( ); } 275 #endif 276 TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS( m_layerId ); } 277 #else 278 TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS(); } 279 #endif 260 280 261 281 #if H_MV … … 265 285 #endif 266 286 287 #if SETTING_NO_OUT_PIC_PRIOR 288 Void checkNoOutputPriorPics (TComList<TComPic*>*& rpcListPic); 289 290 Bool getNoOutputPriorPicsFlag () { return m_isNoOutputPriorPics; } 291 Void setNoOutputPriorPicsFlag (bool val) { m_isNoOutputPriorPics = val; } 292 #endif 267 293 #if H_MV 268 294 TComPic* getPic ( Int poc ); … … 270 296 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 271 297 Void setLayerInitilizedFlags( Bool* val ) { m_layerInitilizedFlag = val; } 298 #if H_MV_HLS_8_HRD_Q0102_08 299 Void setTargetOptLayerSetIdx( Int targetOptLayerSetIdx ) { m_targetOptLayerSetIdx = targetOptLayerSetIdx; } 300 #endif 272 301 TComVPS* getPrefetchedVPS () { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present. 273 302 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); }
Note: See TracChangeset for help on using the changeset viewer.