Changeset 882 in 3DVCSoftware for branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 28 Mar 2014, 01:17:13 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r877 r882 366 366 367 367 READ_FLAG( uiCode, "pps_extension_flag"); 368 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION369 368 if (uiCode) 370 369 { … … 383 382 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 384 383 { 385 #if H_MV_HLS_7_POC_P0041386 384 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 387 #endif388 385 } 389 386 … … 406 403 #endif 407 404 } 408 #else409 if (uiCode)410 {411 #if H_3D412 parsePPSExtension( pcPPS, pcVPS );413 READ_FLAG( uiCode, "pps_extension2_flag");414 if ( uiCode )415 {416 #endif417 while ( xMoreRbspData() )418 {419 READ_FLAG( uiCode, "pps_extension_data_flag");420 }421 #if H_3D422 }423 #endif424 }425 #endif426 405 } 427 406 … … 849 828 assert(uiCode <= 12); 850 829 851 #if H_MV _HLS_7_SPS_P0155_16_32830 #if H_MV 852 831 if ( pcSPS->getLayerId() == 0 ) 853 832 { … … 888 867 } 889 868 } 890 #if H_MV _HLS_7_SPS_P0155_16_32869 #if H_MV 891 870 } 892 871 #endif … … 1053 1032 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode ); 1054 1033 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode ); 1055 #if H_MV_HLS_7_RESERVED_FLAGS1056 1034 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" ); 1057 #endif1058 1035 } 1059 1036 } … … 1092 1069 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 1093 1070 1094 #if H_MV_HLS_7_VPS_P0125_241095 1071 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1096 #else1097 #if H_MV && !H_MV_HLS7_GEN1098 READ_CODE( 16, uiCode, "vps_extension_offset" );1099 #else1100 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff);1101 #endif1102 #endif1103 1072 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); 1104 1073 UInt subLayerOrderingInfoPresentFlag; … … 1212 1181 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1213 1182 1214 #if !H_MV_HLS_7_VPS_P0307_231215 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 );1216 if ( pcVPS->getVpsVuiPresentFlag() )1217 {1218 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode );1219 }1220 #endif1221 1222 1183 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); 1223 1184 … … 1325 1286 1326 1287 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); pcVPS->setAllRefLayersActiveFlag( uiCode == 1 ); 1327 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1328 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); pcVPS->setVpsNumberLayerSetsMinus1 ( uiCode ); 1329 #endif 1330 1331 #if !H_MV_HLS_7_VPS_P0306_22 1332 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1333 #else 1288 1334 1289 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1335 #endif 1290 1336 1291 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1337 1292 { 1338 1293 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1339 #if !H_MV_HLS_7_VPS_P0048_141340 if( !pcVPS->getVpsProfilePresentFlag( i ) )1341 {1342 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );1343 pcVPS->checkProfileRefMinus1( i );1344 }1345 #endif1346 1294 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1347 1295 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1348 1296 { 1349 1297 TComPTL temp = *pcVPS->getPTL( i ); 1350 #if H_MV_HLS_7_VPS_P0048_141351 1298 *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 ); 1352 #else1353 *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );1354 #endif1355 1299 pcVPS->getPTL( i )->copyLevelFrom( &temp ); 1356 1300 } 1357 1301 } 1358 1302 1359 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271360 1303 READ_UVLC( uiCode, "num_add_output_layer_sets" ); pcVPS->setNumAddOutputLayerSets( uiCode ); 1361 1304 pcVPS->initTargetLayerIdLists( ); … … 1365 1308 } 1366 1309 1367 #else1368 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;1369 1370 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );1371 1372 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )1373 {1374 READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1" ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );1375 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);1376 }1377 1378 if( numOutputLayerSets > 1)1379 {1380 READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode );1381 pcVPS->checkDefaultOneTargetOutputLayerIdc();1382 }1383 #endif1384 1385 1310 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1386 1311 pcVPS->setOutputLayerSetIdxMinus1(0, -1); 1387 1312 1388 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271389 1313 pcVPS->deriveTargetLayerIdList( 0 ); 1390 1314 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1391 1315 { 1392 1316 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1393 #else1394 for( Int i = 1; i < numOutputLayerSets; i++ )1395 {1396 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )1397 #endif1398 1317 { 1399 1318 READ_UVLC( uiCode, "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode ); 1400 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271401 1319 } 1402 1320 … … 1416 1334 } 1417 1335 pcVPS->deriveTargetLayerIdList( i ); 1418 #else 1419 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ ) 1420 { 1421 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); 1422 } 1423 } 1424 else 1425 { // These inference rules would also be helpful in spec text 1426 pcVPS->setOutputLayerSetIdxMinus1(i, i - 1 ); 1427 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ ) 1428 { 1429 pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j )); 1430 } 1431 } 1432 #endif 1336 1433 1337 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1434 1338 { … … 1436 1340 } 1437 1341 1438 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271439 1342 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1440 1343 { … … 1442 1345 } 1443 1346 } 1444 #else1445 }1446 if( pcVPS->getMaxLayersMinus1() > 0 )1447 {1448 READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 );1449 }1450 #endif1451 1452 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271453 pcVPS->deriveTargetLayerIdLists();1454 #endif1455 1347 1456 1348 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1457 1349 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1458 1350 { 1459 #if H_MV_HLS_7_VPS_P0306_221460 1351 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1461 #else1462 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );1463 #endif1464 1352 } 1465 1353 … … 1479 1367 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1480 1368 { 1481 #if H_MV_HLS_7_VPS_P0306_221482 1369 READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1483 #else1484 READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );1485 #endif1486 1370 } 1487 1371 } … … 1500 1384 } 1501 1385 1502 #if H_MV_HLS_7_RESERVED_FLAGS1503 1386 READ_FLAG( uiCode, "vps_reserved_zero_flag" ); 1504 #endif1505 1387 parseDpbSize( pcVPS ); 1506 1388 … … 1531 1413 } 1532 1414 1533 #if H_MV_HLS_7_VPS_P0307_231534 1415 READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode ); 1535 1416 for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ ) … … 1538 1419 } 1539 1420 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); 1540 #endif1541 #if !H_MV_HLS_7_RESERVED_FLAGS1542 READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" );1543 #endif1544 1421 if( pcVPS->getVpsVuiPresentFlag() ) 1545 1422 { … … 1547 1424 parseVPSVUI( pcVPS ); 1548 1425 } 1549 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG1550 1426 { 1551 1427 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); … … 1553 1429 pcVPSVUI->inferVpsVui( false ); 1554 1430 } 1555 #endif1556 1431 1557 1432 pcVPS->checkVPSExtensionSyntax(); … … 1601 1476 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1602 1477 } 1603 #if H_MV_HLS_7_MISC_P0068_211604 1478 if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ) 1605 1479 { 1606 1480 READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 ); 1607 1481 } 1608 #endif1609 1482 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1610 1483 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); 1611 1484 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1612 1485 { 1613 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271614 1486 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1615 #else1616 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ )1617 #endif1618 1487 { 1619 1488 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) … … 1641 1510 } 1642 1511 1643 #if H_MV_HLS_7_VPS_P0076_151644 1512 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1645 1513 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1675 1543 } 1676 1544 } 1677 #endif1678 1545 1679 1546 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); … … 1712 1579 } 1713 1580 1714 #if H_MV_HLS_7_RESERVED_FLAGS1715 1581 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1716 #endif1717 1718 1582 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1719 1583 … … 1737 1601 } 1738 1602 1739 #if !H_MV_HLS_7_VPS_P0076_151740 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 );1741 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() )1742 {1743 READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode );1744 }1745 else1746 {1747 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );1748 }1749 1750 for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ )1751 {1752 assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL );1753 TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo();1754 parseVideoSignalInfo( curVideoSignalInfo );1755 pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo );1756 }1757 1758 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 )1759 {1760 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1761 {1762 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode );1763 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );1764 }1765 }1766 else1767 {1768 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1769 {1770 pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i );1771 }1772 }1773 #endif1774 1603 READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 ); 1775 1604 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1777 1606 parseVpsVuiBspHrdParameters( pcVPS ); 1778 1607 } 1779 #if H_MV_HLS_7_MISC_P0182_131780 1608 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1781 1609 { … … 1785 1613 } 1786 1614 } 1787 #endif1788 1615 } 1789 1616 … … 1864 1691 { 1865 1692 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 ); 1866 #if H_MV_HLS_7_HRD_P0156_71867 1693 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1868 #else1869 for( Int j = 0; j <= vps->getMaxTLayers() - 1 ; j++ )1870 #endif1871 1694 { 1872 1695 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1876 1699 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1877 1700 { 1878 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_271879 1701 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1880 #else1881 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ )1882 #endif1883 1702 { 1884 1703 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); … … 1983 1802 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) 1984 1803 { 1985 #if FIX_CAM_PARS_COLLECTOR1986 1804 pcVPS->setCamParPresent ( viewIndex, false ); 1987 1805 pcVPS->setHasCamParInSliceHeader( viewIndex, false ); 1988 #endif1989 1806 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1); 1990 1807 if ( bCamParPresentFlag ) … … 2718 2535 if(pps->getSliceHeaderExtensionPresentFlag()) 2719 2536 { 2720 #if !H_MV_HLS_7_POC_P00412721 READ_UVLC(uiCode,"slice_header_extension_length");2722 for(Int i=0; i<uiCode; i++)2723 {2724 UInt ignore;2725 READ_CODE(8,ignore,"slice_header_extension_data_byte");2726 }2727 }2728 #else2729 2537 #if H_MV 2730 2538 READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode ); … … 2796 2604 } 2797 2605 } 2798 #endif2799 2606 #endif 2800 2607 }
Note: See TracChangeset for help on using the changeset viewer.