Changeset 1066 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 13 Oct 2014, 12:19:36 (10 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1039 r1066 53 53 } 54 54 // To avoid mismatches 55 #if H_MV_HLS10_GEN_FIX 56 fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() ); 57 #else 55 58 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" ); 59 #endif 56 60 #else 57 61 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); … … 66 70 return; 67 71 } 72 #if H_MV_HLS10_GEN_FIX 73 fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() ); 74 #else 68 75 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" ); 76 #endif 69 77 #else 70 78 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); … … 334 342 } 335 343 } 344 #if !H_MV_HLS10_PPS 336 345 #if H_MV 337 346 if ( pcPPS->getLayerId() > 0 ) … … 347 356 { 348 357 #endif 358 #endif 349 359 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 350 360 if(pcPPS->getScalingListPresentFlag ()) … … 352 362 parseScalingList( pcPPS->getScalingList() ); 353 363 } 354 #if H_MV 355 } 356 #endif 357 364 #if !H_MV_HLS10_PPS 365 #if H_MV 366 } 367 #endif 368 #endif 358 369 READ_FLAG( uiCode, "lists_modification_present_flag"); 359 370 pcPPS->setListsModificationPresentFlag(uiCode); … … 389 400 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 390 401 { 402 #if H_MV_HLS10_PPS 403 parsePPSMultilayerExtension( pcPPS ); 404 #else 391 405 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 392 406 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 407 #endif 393 408 } 394 409 #if !H_3D … … 415 430 } 416 431 } 432 417 433 418 434 #if H_3D … … 759 775 UInt uiCode; 760 776 READ_CODE( 4, uiCode, "sps_video_parameter_set_id"); pcSPS->setVPSId ( uiCode ); 777 761 778 #if H_MV 762 779 if ( pcSPS->getLayerId() == 0 ) … … 765 782 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 766 783 assert(uiCode <= 6); 784 #if H_MV_HLS10_MULTILAYERSPS 785 #if H_MV 786 } 787 else 788 { 789 READ_CODE( 3, uiCode, "sps_ext_or_max_sub_layers_minus1" ); pcSPS->setSpsExtOrMaxSubLayersMinus1( uiCode ); 790 pcSPS->inferSpsMaxSubLayersMinus1( false, NULL ); 791 } 792 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 793 { 794 #endif 795 #endif 767 796 768 797 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); … … 774 803 775 804 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 805 #if H_MV_HLS10_PTL_INFER_FIX 806 pcSPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 807 pcSPS->getPTL()->inferSubLayerValues( pcSPS->getMaxTLayers() - 1, 0, NULL ); 808 #endif 776 809 #if H_MV 777 810 } … … 780 813 assert(uiCode <= 15); 781 814 #if H_MV 815 #if H_MV_HLS10_MULTILAYERSPS 816 if ( pcSPS->getMultiLayerExtSpsFlag() ) 817 #else 782 818 if ( pcSPS->getLayerId() > 0 ) 819 #endif 783 820 { 784 821 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); … … 802 839 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 803 840 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 804 #if H_MV 805 } 841 #if !H_MV_HLS10_MULTILAYERSPS 842 #if H_MV 843 } 844 #endif 806 845 #endif 807 846 READ_FLAG( uiCode, "conformance_window_flag"); … … 816 855 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 817 856 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 857 #if H_MV_HLS10_MULTILAYERSPS 858 } 859 #endif 818 860 #else 819 861 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); … … 825 867 826 868 #if H_MV 869 #if H_MV_HLS10_MULTILAYERSPS 870 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 871 #else // H_MV_HLS10_GEN 827 872 if ( pcSPS->getLayerId() == 0 ) 873 #endif // H_MV_HLS10_GEN 828 874 { 829 875 #endif … … 845 891 846 892 #if H_MV 893 #if H_MV_HLS10_MULTILAYERSPS 894 if ( !pcSPS->getMultiLayerExtSpsFlag()) 895 #else 847 896 if ( pcSPS->getLayerId() == 0 ) 897 #endif 848 898 { 849 899 #endif … … 904 954 { 905 955 #if H_MV 956 #if H_MV_HLS10_MULTILAYERSPS 957 if ( pcSPS->getMultiLayerExtSpsFlag() ) 958 #else 906 959 if ( pcSPS->getLayerId() > 0 ) 960 #endif 907 961 { 908 962 READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setSpsInferScalingListFlag( uiCode == 1 ); … … 1032 1086 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false); 1033 1087 1088 #if !H_MV_HLS10_PPS 1034 1089 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode ); 1035 1090 … … 1046 1101 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" ); 1047 1102 } 1103 #endif 1048 1104 } 1049 1105 … … 1066 1122 } 1067 1123 #endif 1124 1125 #if H_MV_HLS10_PPS 1126 Void TDecCavlc::parsePPSMultilayerExtension(TComPPS* pcPPS) 1127 { 1128 UInt uiCode = 0; 1129 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 1130 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 1131 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1132 READ_UVLC( uiCode, "num_ref_loc_offsets" ); assert( uiCode == 0 ); 1133 } 1134 1135 #endif 1068 1136 #endif 1069 1137 … … 1075 1143 #if H_MV 1076 1144 READ_FLAG( uiCode, "vps_base_layer_internal_flag" ); pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 ); 1145 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 1146 READ_FLAG( uiCode, "vps_base_layer_available_flag" ); pcVPS->setVpsBaseLayerAvailableFlag( uiCode == 1 ); 1147 #else 1077 1148 READ_FLAG( uiCode, "vps_reserved_one_bit" ); assert( uiCode == 1 ); 1149 #endif 1078 1150 #else 1079 1151 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); … … 1090 1162 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1091 1163 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); 1164 #if H_MV_HLS10_PTL_INFER_FIX 1165 #if H_MV 1166 pcVPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 1167 pcVPS->getPTL()->inferSubLayerValues( pcVPS->getMaxTLayers() - 1, 0, NULL ); 1168 #endif 1169 #endif 1092 1170 UInt subLayerOrderingInfoPresentFlag; 1093 1171 READ_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag"); … … 1115 1193 READ_CODE( 6, uiCode, "vps_max_layer_id" ); pcVPS->setVpsMaxLayerId( uiCode ); 1116 1194 1195 #if H_MV_HLS10_GEN_FIX 1196 READ_UVLC( uiCode, "vps_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode ); 1197 #else 1117 1198 READ_UVLC( uiCode, "vps_max_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode ); 1199 #endif 1118 1200 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 1119 1201 { … … 1204 1286 UInt uiCode; 1205 1287 1288 #if H_MV_HLS10_PTL 1289 if( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) 1290 { 1291 parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1292 1293 #if !H_MV_HLS10_PTL_INFER_FIX 1294 // Copy Profile info 1295 TComPTL temp = *pcVPS->getPTL( 1 ); 1296 *pcVPS->getPTL( 1 ) = *pcVPS->getPTL( 0 ); 1297 pcVPS->getPTL( 1 )->copyLevelFrom( &temp ); 1298 #else 1299 pcVPS->getPTL( 1 )->inferGeneralValues ( false, 1, pcVPS->getPTL( 0 ) ); 1300 pcVPS->getPTL( 1 )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1(), 1, pcVPS->getPTL( 0 ) ); 1301 #endif 1302 } 1303 #endif 1304 1206 1305 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); 1207 1306 … … 1275 1374 } 1276 1375 pcVPS->setRefLayers(); 1376 1377 #if H_MV_HLS10_ADD_LAYERSETS 1378 if ( pcVPS->getNumIndependentLayers() > 1 ) 1379 { 1380 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1381 } 1382 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1383 { 1384 for (Int j = 1; j < pcVPS->getNumIndependentLayers(); j++) 1385 { 1386 READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode ); 1387 } 1388 pcVPS->deriveAddLayerSetLayerIdList( i ); 1389 } 1390 #endif 1391 1277 1392 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); 1278 1393 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1310 1425 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1311 1426 1427 #if H_MV_HLS10_PTL 1428 Int offsetVal = ( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1; 1429 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1430 { 1431 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1432 parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1433 #if H_MV_HLS10_PTL_INFER_FIX 1434 pcVPS->getPTL( offsetVal )->inferGeneralValues ( pcVPS->getVpsProfilePresentFlag( i ), offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1435 pcVPS->getPTL( offsetVal )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1() , offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1436 #else 1437 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1438 { 1439 TComPTL temp = *pcVPS->getPTL( offsetVal ); 1440 *pcVPS->getPTL( offsetVal ) = *pcVPS->getPTL( offsetVal - 1 ); 1441 pcVPS->getPTL( offsetVal )->copyLevelFrom( &temp ); 1442 } 1443 #endif 1444 offsetVal++; 1445 } 1446 #else 1312 1447 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1313 1448 { … … 1321 1456 } 1322 1457 } 1323 1458 #endif 1459 1460 #if !H_MV_HLS10_ADD_LAYERSETS 1324 1461 if ( pcVPS->getNumIndependentLayers() > 1 ) 1325 1462 { … … 1333 1470 } 1334 1471 } 1472 #endif 1473 1335 1474 if (pcVPS->getNumLayerSets() > 1) 1336 1475 { … … 1345 1484 pcVPS->setLayerSetIdxForOlsMinus1(0, -1); 1346 1485 1486 #if H_MV_HLS10_NESSECARY_LAYER 1487 pcVPS->deriveNecessaryLayerFlags( 0 ); 1488 #endif 1347 1489 pcVPS->deriveTargetLayerIdList( 0 ); 1348 1490 1491 #if H_MV_HLS10_PTL_FIX 1492 if (pcVPS->getVpsBaseLayerInternalFlag() ) 1493 { 1494 pcVPS->setProfileTierLevelIdx(0,0, pcVPS->inferProfileTierLevelIdx(0,0) ); 1495 } 1496 #endif 1349 1497 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1350 1498 { 1351 1499 if( i >= pcVPS->getNumLayerSets( ) ) 1352 1500 { 1501 #if !VPS_MISC_UPDATES 1353 1502 READ_UVLC( uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1503 #else 1504 READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1505 #endif 1354 1506 } 1355 1507 … … 1368 1520 } 1369 1521 } 1522 #if H_MV_HLS10_NESSECARY_LAYER 1523 pcVPS->deriveNecessaryLayerFlags( i ); 1524 #endif 1370 1525 pcVPS->deriveTargetLayerIdList( i ); 1371 1526 1527 #if H_MV_HLS10_PTL 1528 for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ ) 1529 { 1530 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() > 0 ) 1531 { 1532 READ_CODE( pcVPS->getProfileTierLevelIdxLen(), uiCode,"profile_tier_level_idx[ i ][ j ]" ); pcVPS->setProfileTierLevelIdx( i, j, uiCode ); 1533 } 1534 #if H_MV_HLS10_PTL_FIX 1535 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 ) 1536 { 1537 pcVPS->setProfileTierLevelIdx( i , j, pcVPS->inferProfileTierLevelIdx( i, j) ); 1538 } 1539 #endif 1540 } 1541 #else 1372 1542 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1373 { 1543 { 1374 1544 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1375 1545 } 1546 #endif 1547 1376 1548 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1377 1549 { … … 1422 1594 } 1423 1595 1596 #if !H_MV_HLS10_GEN_FIX 1424 1597 READ_FLAG( uiCode, "vps_reserved_zero_flag" ); 1598 #endif 1425 1599 parseDpbSize( pcVPS ); 1426 1600 … … 1484 1658 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1485 1659 { 1486 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode );1487 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )1488 {1489 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 );1490 }1491 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode );1492 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode );1660 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode ); 1661 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) 1662 { 1663 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 ); 1664 } 1665 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode ); 1666 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode ); 1493 1667 } 1494 1668 else … … 1496 1670 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 1497 1671 } 1672 #if H_MV_HLS10_GEN_VSP_CONF_WIN 1673 READ_FLAG( uiCode, "conformance_window_vps_flag" ); pcRepFormat->setConformanceWindowVpsFlag( uiCode == 1 ); 1674 if ( pcRepFormat->getConformanceWindowVpsFlag() ) 1675 { 1676 READ_UVLC( uiCode, "conf_win_vps_left_offset" ); pcRepFormat->setConfWinVpsLeftOffset( uiCode ); 1677 READ_UVLC( uiCode, "conf_win_vps_right_offset" ); pcRepFormat->setConfWinVpsRightOffset( uiCode ); 1678 READ_UVLC( uiCode, "conf_win_vps_top_offset" ); pcRepFormat->setConfWinVpsTopOffset( uiCode ); 1679 READ_UVLC( uiCode, "conf_win_vps_bottom_offset" ); pcRepFormat->setConfWinVpsBottomOffset( uiCode ); 1680 } 1681 #endif 1498 1682 } 1499 1683 … … 1521 1705 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1522 1706 { 1707 #if H_MV_HLS10_VPS_VUI 1708 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1709 #else 1523 1710 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1711 #endif 1524 1712 { 1525 1713 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1554 1742 else 1555 1743 { 1744 #if H_MV_HLS10_VPS_VUI 1745 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 ); 1746 #else 1556 1747 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1748 #endif 1557 1749 } 1558 1750 … … 1565 1757 } 1566 1758 1759 #if I0045_VPS_VUI_VST_PARAMS 1760 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1761 { 1762 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1763 { 1764 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); 1765 } 1766 } 1767 else if ( !pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1768 { 1769 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1770 { 1771 pcVPSVUI->setVpsVideoSignalInfoIdx( i, i ); 1772 } 1773 } 1774 else 1775 { 1776 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1777 { 1778 pcVPSVUI->setVpsVideoSignalInfoIdx( i, 0 ); 1779 } 1780 } 1781 #else 1567 1782 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1568 1783 { … … 1580 1795 } 1581 1796 } 1797 #endif 1582 1798 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1583 1799 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1594 1810 { 1595 1811 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) 1596 { 1812 { 1813 #if H_MV_HLS10_REF_PRED_LAYERS 1814 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdDirectRefLayer(pcVPS->getLayerIdInNuh( i ) , j )); 1815 #else 1597 1816 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j )); 1817 #endif 1598 1818 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1599 1819 { … … 1613 1833 } 1614 1834 } 1835 #if H_MV_HLS10_VPS_VUI 1836 READ_FLAG( uiCode, "single_layer_for_non_irap_flag" ); pcVPSVUI->setSingleLayerForNonIrapFlag( uiCode == 1 ); 1837 READ_FLAG( uiCode, "higher_layer_irap_skip_flag" ); pcVPSVUI->setHigherLayerIrapSkipFlag( uiCode == 1 ); 1838 #else 1615 1839 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1840 #endif 1616 1841 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1617 1842 … … 1622 1847 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1623 1848 { 1849 #if H_MV_HLS10_REF_PRED_LAYERS 1850 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdDirectRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1851 #else 1624 1852 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1853 #endif 1625 1854 { 1626 1855 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); … … 1641 1870 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) 1642 1871 { 1872 #if VPS_MISC_UPDATES 1873 assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1); 1874 #endif 1643 1875 parseVpsVuiBspHrdParameters( pcVPS ); 1644 1876 } … … 1661 1893 1662 1894 TComVpsVuiBspHrdParameters* vpsVuiBspHrdP = pcVPSVUI->getVpsVuiBspHrdParameters(); 1663 1895 #if H_MV_HLS10_VPS_VUI_BSP 1896 assert( vpsVuiBspHrdP == NULL ); 1897 vpsVuiBspHrdP = new TComVpsVuiBspHrdParameters; 1898 pcVPSVUI->setVpsVuiBspHrdParameters( vpsVuiBspHrdP ); 1899 #else 1664 1900 assert ( vpsVuiBspHrdP ); 1665 1901 #endif 1666 1902 UInt uiCode; 1903 #if H_MV_HLS10_VPS_VUI_BSP 1904 READ_UVLC( uiCode, "vps_num_add_hrd_params" ); vpsVuiBspHrdP->setVpsNumAddHrdParams( uiCode ); 1905 vpsVuiBspHrdP->createAfterVpsNumAddHrdParams( pcVPS ); 1906 for( Int i = pcVPS->getNumHrdParameters(); i < pcVPS->getNumHrdParameters() + vpsVuiBspHrdP->getVpsNumAddHrdParams(); i++ ) 1907 { 1908 if( i > 0 ) 1909 { 1910 READ_FLAG( uiCode, "cprms_add_present_flag" ); vpsVuiBspHrdP->setCprmsAddPresentFlag( i, uiCode == 1 ); 1911 } 1912 else 1913 { 1914 vpsVuiBspHrdP->setCprmsAddPresentFlag( i, true ); 1915 } 1916 1917 READ_UVLC( uiCode, "num_sub_layer_hrd_minus1" ); vpsVuiBspHrdP->setNumSubLayerHrdMinus1( i, uiCode ); 1918 TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i ); 1919 parseHrdParameters( hrdParameters, vpsVuiBspHrdP->getCprmsAddPresentFlag( i ), vpsVuiBspHrdP->getNumSubLayerHrdMinus1( i ) ); 1920 } 1921 1922 vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( 0, 0, 0); 1923 vpsVuiBspHrdP->createAfterNumPartitionsInSchemeMinus1( 0, 0 ); 1924 1925 for( Int h = 0; h < pcVPS->getNumOutputLayerSets(); h++ ) 1926 { 1927 if ( h == 0) 1928 { 1929 vpsVuiBspHrdP->setNumSignalledPartitioningSchemes( h, 0 ); 1930 } 1931 else 1932 { 1933 READ_UVLC( uiCode, "num_signalled_partitioning_schemes" ); vpsVuiBspHrdP->setNumSignalledPartitioningSchemes( h, uiCode ); 1934 } 1935 vpsVuiBspHrdP->createAfterNumSignalledPartitioningSchemes( h ); 1936 1937 for( Int j = 0; j < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; j++ ) 1938 { 1939 if ( j == 0 && h == 0 ) 1940 { 1941 vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, uiCode ); 1942 } 1943 else if( j == 0 ) 1944 { 1945 vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, pcVPS->getNumLayersInIdList( h ) - 1 ); 1946 } 1947 else 1948 { 1949 READ_UVLC( uiCode, "num_partitions_in_scheme_minus1" ); vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, uiCode ); 1950 } 1951 vpsVuiBspHrdP->createAfterNumPartitionsInSchemeMinus1( h, j ); 1952 1953 for( Int k = 0; k <= vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 1954 { 1955 for( Int r = 0; r < pcVPS->getNumLayersInIdList(pcVPS->olsIdxToLsIdx( h ) ) ; r++ ) 1956 { 1957 if( h == 0 && j == 0 && k == 0 && r == 0 ) 1958 { 1959 vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, true ); 1960 } 1961 else if ( h > 0 && j == 0 ) 1962 { 1963 vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, (k == r) ); 1964 } 1965 else 1966 { 1967 READ_FLAG( uiCode, "layer_included_in_partition_flag" ); vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, uiCode == 1 ); 1968 } 1969 } 1970 } 1971 } 1972 if ( h > 0 ) 1973 { 1974 for( Int i = 0; i < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; i++ ) 1975 { 1976 for( Int t = 0; t <= pcVPS->getMaxSubLayersInLayerSetMinus1( pcVPS->olsIdxToLsIdx( i ) ); t++ ) 1977 { 1978 READ_UVLC( uiCode, "num_bsp_schedules_minus1" ); vpsVuiBspHrdP->setNumBspSchedulesMinus1( h, i, t, uiCode ); 1979 vpsVuiBspHrdP->createAfterNumBspSchedulesMinus1( h, i, t ); 1980 for( Int j = 0; j <= vpsVuiBspHrdP->getNumBspSchedulesMinus1( h, i, t ); j++ ) 1981 { 1982 for( Int k = 0; k <= vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 1983 { 1984 READ_CODE( vpsVuiBspHrdP->getBspHrdIdxLen( pcVPS ), uiCode, "bsp_hrd_idx" ); vpsVuiBspHrdP->setBspHrdIdx( h, i, t, j, k, uiCode ); 1985 READ_UVLC( uiCode, "bsp_sched_idx" ); vpsVuiBspHrdP->setBspSchedIdx( h, i, t, j, k, uiCode ); 1986 } 1987 } 1988 } 1989 } 1990 } 1991 } 1992 #else 1667 1993 READ_UVLC( uiCode, "vps_num_bsp_hrd_parameters_minus1" ); vpsVuiBspHrdP->setVpsNumBspHrdParametersMinus1( uiCode ); 1668 1994 for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ ) … … 1701 2027 } 1702 2028 } 1703 } 2029 #endif 2030 } 1704 2031 1705 2032 Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) … … 1733 2060 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1734 2061 { 2062 #if H_MV_HLS10_DBP_SIZE 2063 if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) )) 2064 { 2065 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 2066 } 2067 else 2068 { 2069 if ( vps->getNecessaryLayerFlag( i, k ) && ( j == 0 ) && ( k == 0 )) 2070 { 2071 dpbSize->setMaxVpsDecPicBufferingMinus1(i ,k, j, 0 ); 2072 } 2073 } 2074 #else 1735 2075 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 2076 #endif 1736 2077 } 1737 2078 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); … … 1744 2085 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1745 2086 { 1746 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 2087 #if H_MV_HLS10_DBP_SIZE 2088 if ( vps->getNecessaryLayerFlag(i, k ) ) 2089 { 2090 #endif 2091 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 2092 #if H_MV_HLS10_DBP_SIZE 2093 } 2094 #endif 1747 2095 } 1748 2096 dpbSize->setMaxVpsNumReorderPics ( i, j, dpbSize->getMaxVpsNumReorderPics ( i, j - 1 ) ); … … 1940 2288 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 1941 2289 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2290 #if !H_MV_HLS10_ADD_LAYERSETS 1942 2291 vps->inferDbpSizeLayerSetZero( sps, false ); 2292 #endif 1943 2293 1944 2294 if ( sps->getVuiParametersPresentFlag() ) … … 2008 2358 esb++; 2009 2359 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 2360 #if NON_REF_NAL_TYPE_DISCARDABLE 2361 if ( uiCode == 1 ) 2362 { 2363 assert(rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TRAIL_R && 2364 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_TSA_R && 2365 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_STSA_R && 2366 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RADL_R && 2367 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R); 2368 } 2369 #endif 2010 2370 } 2011 2371 … … 2155 2515 rps->checkMaxNumPics( 2156 2516 vps->getVpsExtensionFlag(), 2517 #if H_MV_HLS10_MAXNUMPICS 2518 MAX_INT, // To be replaced by MaxDbpSize 2519 #else 2157 2520 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2521 #endif 2158 2522 rpcSlice->getLayerId(), 2159 2523 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 2268 2632 rps->checkMaxNumPics( 2269 2633 vps->getVpsExtensionFlag(), 2634 #if H_MV_HLS10_MAXNUMPICS 2635 MAX_INT, // To be replaced by MaxDbpsize 2636 #else 2270 2637 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2638 #endif 2271 2639 rpcSlice->getLayerId(), 2272 2640 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 2287 2655 if (rpcSlice->getSPS()->getTMVPFlagsPresent()) 2288 2656 { 2657 #if I0044_SLICE_TMVP 2658 READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" ); 2659 #else 2289 2660 READ_FLAG( uiCode, "slice_temporal_mvp_enable_flag" ); 2661 #endif 2290 2662 rpcSlice->setEnableTMVPFlag( uiCode == 1 ? true : false ); 2291 2663 } … … 2637 3009 2638 3010 #if H_3D 3011 #if LGE_FCO_I0116 3012 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && rpcSlice->getIsDepth() ) 3013 #else 2639 3014 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() ) 3015 #endif 2640 3016 { 2641 3017 UInt uiViewIndex = rpcSlice->getViewIndex(); … … 2723 3099 #endif 2724 3100 } 3101 #if INFERENCE_POC_MSB_VAL_PRESENT 3102 else 3103 { 3104 rpcSlice->setSliceSegmentHeaderExtensionLength( 0 ); 3105 rpcSlice->setPocMsbValPresentFlag( false ); 3106 } 3107 #endif 2725 3108 2726 3109 … … 2815 3198 READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode); 2816 3199 #if H_MV 2817 rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ); 3200 #if !H_MV_HLS10_PTL_INFER_FIX 3201 rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ); 3202 #else 3203 // When profilePresentFlag is equal to 0, sub_layer_profile_present_flag[ i ] shall be equal to 0. 3204 assert( profilePresentFlag || !rpcPTL->getSubLayerProfilePresentFlag(i) ); 3205 #endif 2818 3206 #else 2819 3207 } … … 2833 3221 for(Int i = 0; i < maxNumSubLayersMinus1; i++) 2834 3222 { 2835 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3223 #if H_MV_HLS10_PTL_INFER_FIX 3224 #if H_MV 3225 if( rpcPTL->getSubLayerProfilePresentFlag(i) ) 3226 #else 3227 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3228 #endif 3229 #else 3230 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3231 #endif 2836 3232 { 2837 3233 parseProfileTier(rpcPTL->getSubLayerPTL(i)); … … 2866 3262 ptl->setFrameOnlyConstraintFlag(uiCode ? true : false); 2867 3263 3264 #if H_MV_HLS10_PTL 3265 #if H_MV_HLS10_PTL_INFER_FIX 3266 if( ptl->getV2ConstraintsPresentFlag() ) 3267 #else 3268 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) || 3269 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) || 3270 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) || 3271 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) ) 3272 #endif 3273 { 3274 READ_FLAG( uiCode, "max_12bit_constraint_flag" ); ptl->setMax12bitConstraintFlag ( uiCode == 1 ); 3275 READ_FLAG( uiCode, "max_10bit_constraint_flag" ); ptl->setMax10bitConstraintFlag ( uiCode == 1 ); 3276 READ_FLAG( uiCode, "max_8bit_constraint_flag" ); ptl->setMax8bitConstraintFlag ( uiCode == 1 ); 3277 READ_FLAG( uiCode, "max_422chroma_constraint_flag" ); ptl->setMax422chromaConstraintFlag ( uiCode == 1 ); 3278 READ_FLAG( uiCode, "max_420chroma_constraint_flag" ); ptl->setMax420chromaConstraintFlag ( uiCode == 1 ); 3279 READ_FLAG( uiCode, "max_monochrome_constraint_flag" ); ptl->setMaxMonochromeConstraintFlag ( uiCode == 1 ); 3280 READ_FLAG( uiCode, "intra_constraint_flag" ); ptl->setIntraConstraintFlag ( uiCode == 1 ); 3281 READ_FLAG( uiCode, "one_picture_only_constraint_flag" ); ptl->setOnePictureOnlyConstraintFlag( uiCode == 1 ); 3282 READ_FLAG( uiCode, "lower_bit_rate_constraint_flag" ); ptl->setLowerBitRateConstraintFlag ( uiCode == 1 ); 3283 READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[0..15]"); 3284 READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[16..31]"); 3285 READ_CODE(2 , uiCode, "XXX_reserved_zero_34bits[32..33]"); 3286 } 3287 else 3288 { 3289 READ_CODE(16, uiCode, "XXX_reserved_zero_43bits[0..15]"); 3290 READ_CODE(16, uiCode, "XXX_reserved_zero_43bits[16..31]"); 3291 READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]"); 3292 } 3293 #if H_MV_HLS10_PTL_INFER_FIX 3294 if( ptl->getInbldPresentFlag() ) 3295 #else 3296 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) || 3297 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) || 3298 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) || 3299 ptl->getProfileCompatibilityFlag( 5 ) ) 3300 #endif 3301 { 3302 READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 ); 3303 } 3304 else 3305 { 3306 READ_FLAG(uiCode, "reserved_zero_bit"); 3307 } 3308 #else 2868 3309 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]"); 2869 3310 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[16..31]"); 2870 3311 READ_CODE(12, uiCode, "XXX_reserved_zero_44bits[32..43]"); 3312 #endif 2871 3313 } 2872 3314 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r1039 r1066 97 97 #endif 98 98 99 #if H_MV_HLS10_PPS 100 #if H_MV 101 Void parsePPSMultilayerExtension( TComPPS* pcPPS ); 102 #endif 103 #endif 104 105 99 106 #if H_3D 100 107 Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r1039 r1066 859 859 // get collocated depth block 860 860 UInt uiDepthStride = 0; 861 #if LGE_FCO_I0116 862 Pel* pDepthPels = pcCU->getVirtualDepthBlock(pcCU->getZorderIdxInCU(), pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride); 863 #else 861 864 Pel* pDepthPels = pcCU->getVirtualDepthBlock(0, pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride); 865 #endif 862 866 AOF( pDepthPels != NULL ); 863 867 AOF( uiDepthStride != 0 ); -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1039 r1066 794 794 795 795 #if MTK_I0099_VPS_EX2 796 #if LGE_FCO_I0116 797 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark()) 798 #else 796 799 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag) 800 #endif 797 801 #else 798 802 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) … … 854 858 UInt uiTexturePart = uiMode; 855 859 #if MTK_I0099_VPS_EX2 860 #if LGE_FCO_I0116 861 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark()) 862 #else 856 863 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag ) 864 #endif 857 865 #else 858 866 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC()) -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r976 r1066 229 229 } 230 230 231 #if !LGE_FCO_I0116 231 232 if ( pcSlice->getIsDepth()) 232 233 { 233 234 return; 234 235 } 236 #endif 235 237 236 238 Int curPoc = pcSlice->getPOC(); … … 667 669 #if H_MV 668 670 sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false ); 671 #if !H_MV_HLS10_ADD_LAYERSETS 669 672 vps->inferDbpSizeLayerSetZero( sps, false ); 673 #endif 670 674 // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0 671 675 if ( vps->getVpsNumRepFormatsMinus1() == 0 ) … … 675 679 } 676 680 sps->checkRpsMaxNumPics( vps, getLayerId() ); 681 #if H_MV_HLS10_MULTILAYERSPS 682 683 if( sps->getLayerId() != 0 ) 684 { 685 sps->inferSpsMaxSubLayersMinus1( true, vps ); 686 } 687 688 #if H_MV_HLS10_MULTILAYERSPS 689 // It is a requirement of bitstream conformance that, when the SPS is referred to by 690 // any current picture that belongs to an independent non-base layer, the value of 691 // MultiLayerExtSpsFlag derived from the SPS shall be equal to 0. 692 693 if ( m_layerId > 0 && vps->getNumRefLayers( m_layerId ) == 0 ) 694 { 695 assert( sps->getMultiLayerExtSpsFlag() == 0 ); 696 } 697 #endif 698 699 if( sps->getMultiLayerExtSpsFlag() ) 700 { 701 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 702 } 703 #else 677 704 if( m_layerId > 0 ) 678 705 { 679 706 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 680 707 } 708 #endif 681 709 #endif 682 710 … … 702 730 #if H_MV 703 731 m_apcSlicePilot->setVPS(vps); 732 #if H_MV_HLS10_REF_PRED_LAYERS 733 // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 734 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, pps->getLayerId() ) ); 735 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 736 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, sps->getLayerId() ) ); 737 #else 704 738 // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 705 739 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) ); 706 740 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 707 741 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) ); 742 #endif 708 743 sps->inferRepFormat ( vps , m_layerId ); 709 744 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 745 710 746 #endif 711 747 pps->setSPS(sps); … … 909 945 } 910 946 #endif 947 948 #if I0044_SLICE_TMVP 949 if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 ) 950 { 951 //update all pics in the DPB such that they cannot be used for TMPV ref 952 TComList<TComPic*>::iterator iterRefPic = m_cListPic.begin(); 953 while( iterRefPic != m_cListPic.end() ) 954 { 955 TComPic *refPic = *iterRefPic; 956 if( ( refPic->getLayerId() == m_apcSlicePilot->getLayerId() ) && refPic->getReconMark() ) 957 { 958 for(Int i = refPic->getNumAllocatedSlice()-1; i >= 0; i--) 959 { 960 961 TComSlice *refSlice = refPic->getSlice(i); 962 refSlice->setAvailableForTMVPRefFlag( false ); 963 } 964 } 965 iterRefPic++; 966 } 967 } 968 m_apcSlicePilot->setAvailableForTMVPRefFlag( true ); 969 #endif 970 911 971 xActivateParameterSets(); 912 972 … … 1133 1193 #endif 1134 1194 // For generalized B 1195 #if I0044_SLICE_TMVP 1196 if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() ) 1197 { 1198 TComPic* refPic = pcSlice->getRefPic(RefPicList(1 - pcSlice->getColFromL0Flag()), pcSlice->getColRefIdx()); 1199 1200 assert ( refPic ); 1201 assert ( refPic->getPicSym()->getSlice(0)->getAvailableForTMVPRefFlag() == true ); 1202 } 1203 #endif 1204 1205 // For generalized B 1135 1206 // note: maybe not existed case (always L0 is copied to L1 if L1 is empty) 1136 1207 if (pcSlice->isInterB() && pcSlice->getNumRefIdx(REF_PIC_LIST_1) == 0) … … 1201 1272 1202 1273 #if H_3D_IV_MERGE 1274 #if LGE_FCO_I0116 1275 if( !pcSlice->getIsDepth() && m_pcCamParsCollector ) 1276 #else 1203 1277 if( pcSlice->getIsDepth() && m_pcCamParsCollector ) 1278 #endif 1204 1279 { 1205 1280 m_pcCamParsCollector->copyCamParamForSlice( pcSlice ); … … 1652 1727 for (Int i = 0; i < vps->getNumDirectRefLayers( getLayerId() ); i++ ) 1653 1728 { 1729 #if H_MV_HLS10_REF_PRED_LAYERS 1730 Int refLayerId = vps->getIdDirectRefLayer( m_layerId, i ); 1731 #else 1654 1732 Int refLayerId = vps->getRefLayerId( m_layerId, i ); 1733 #endif 1655 1734 allRefLayersInitilizedFlag = allRefLayersInitilizedFlag && m_layerInitilizedFlag[ refLayerId ]; 1656 1735 }
Note: See TracChangeset for help on using the changeset viewer.