Changeset 766 in 3DVCSoftware for branches/HTM-9.2-dev0/source/Lib/TLibDecoder
- Timestamp:
- 12 Jan 2014, 03:29:17 (11 years ago)
- Location:
- branches/HTM-9.2-dev0/source/Lib/TLibDecoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r765 r766 556 556 557 557 READ_FLAG( uiCode, "video_signal_type_present_flag"); pcVUI->setVideoSignalTypePresentFlag(uiCode); 558 #if H_MV_6_PS_O0118_33559 558 assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() ); 560 #endif561 559 562 560 if (pcVUI->getVideoSignalTypePresentFlag()) … … 746 744 { 747 745 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); 748 #if H_MV_6_PS_REP_FORM_18_19_20749 746 if ( pcSPS->getUpdateRepFormatFlag() ) 750 747 { … … 754 751 else 755 752 { 756 #else757 }758 759 if ( pcSPS->getUpdateRepFormatFlag() )760 {761 #endif762 753 #endif 763 754 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); … … 795 786 796 787 #if H_MV 797 #if H_MV_6_PS_REP_FORM_18_19_20798 788 if ( pcSPS->getLayerId() == 0 ) 799 #else800 if ( pcSPS->getUpdateRepFormatFlag() )801 #endif802 789 { 803 790 #endif … … 948 935 949 936 READ_FLAG( uiCode, "sps_extension_flag"); 950 #if H_MV_6_PSEM_O0142_3951 937 pcSPS->setSpsExtensionFlag( uiCode ); 952 #endif953 938 if (pcSPS->getSpsExtensionFlag( ) ) 954 939 { 955 #if !H_MV_6_PSEM_O0142_3956 #if H_MV957 parseSPSExtension( pcSPS );958 READ_FLAG( uiCode, "sps_extension2_flag");959 if ( uiCode )960 {961 #if H_3D962 parseSPSExtension2( pcSPS, viewIndex, depthFlag );963 READ_FLAG( uiCode, "sps_extension3_flag");964 if ( uiCode )965 {966 #endif967 #endif968 #else969 940 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 970 941 { … … 991 962 if ( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_ESC )) 992 963 { 993 #endif994 964 while ( xMoreRbspData() ) 995 965 { 996 966 READ_FLAG( uiCode, "sps_extension_data_flag"); 997 967 } 998 #if H_MV_6_PSEM_O0142_3 999 } 1000 #else 1001 #if H_MV 1002 #if H_3D 1003 } 1004 #endif 1005 } 1006 #endif 1007 #endif 968 } 1008 969 } 1009 970 } … … 1014 975 UInt uiCode; 1015 976 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false); 1016 #if !H_MV_6_SHVC_O0098_361017 READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );1018 #else1019 977 1020 978 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode ); … … 1031 989 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode ); 1032 990 } 1033 #endif1034 991 } 1035 992 … … 1081 1038 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 1082 1039 #if H_MV 1083 #if H_MV_6_LAYER_ID_321084 1040 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( std::min( uiCode, (UInt) ( MAX_NUM_LAYER_IDS-1) ) ); 1085 #else1086 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( uiCode );1087 #endif1088 1041 #else 1089 1042 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 1140 1093 } 1141 1094 } 1142 #if H_MV_6_HRD_O0217_131143 1095 pcVPS->deriveLayerSetLayerIdList(); 1144 #endif1145 1096 TimingInfo *timingInfo = pcVPS->getTimingInfo(); 1146 1097 READ_FLAG( uiCode, "vps_timing_info_present_flag"); timingInfo->setTimingInfoPresentFlag (uiCode ? true : false); … … 1209 1160 UInt uiCode; 1210 1161 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1211 #if H_MV_6_PS_O0109_241212 1162 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); if ( pcVPS->getVpsVuiPresentFlag() ) 1213 1163 { 1214 #endif1215 1164 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode ); 1216 #if H_MV_6_PS_O0109_24 1217 } 1218 #endif 1165 } 1219 1166 1220 1167 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1263 1210 } 1264 1211 1265 #if H_MV_6_PS_O0109_221266 1212 READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode ); 1267 1213 … … 1280 1226 } 1281 1227 } 1282 #else1283 // GT spec says: trac #391284 // if ( pcVPS->getNumViews() > 1 )1285 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.1286 {1287 READ_CODE( 4, uiCode, "view_id_len_minus1" ); pcVPS->setViewIdLenMinus1( uiCode );1288 }1289 1290 for( Int i = 0; i < pcVPS->getNumViews(); i++ )1291 {1292 READ_CODE( pcVPS->getViewIdLenMinus1( ) + 1, uiCode, "view_id_val[i]" ); pcVPS->setViewIdVal( i, uiCode );1293 }1294 #endif1295 1228 1296 1229 … … 1302 1235 } 1303 1236 } 1304 #if H_MV_6_MISC_O0062_311305 1237 pcVPS->setRefLayers(); 1306 #endif1307 #if H_MV_6_ILDSD_O0120_261308 1238 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); 1309 1239 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1323 1253 } 1324 1254 } 1325 #endif1326 1255 READ_FLAG( uiCode, "max_tid_ref_present_flag" ); pcVPS->setMaxTidRefPresentFlag( uiCode == 1 ); 1327 1256 … … 1330 1259 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1331 1260 { 1332 #if H_MV_6_ILDDS_O0225_301333 1261 for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1334 1262 { … … 1338 1266 } 1339 1267 } 1340 #else1341 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );1342 #endif1343 1268 } 1344 1269 } … … 1354 1279 { 1355 1280 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode ); 1356 #if H_MV_6_PS_O0109_231357 1281 pcVPS->checkProfileRefMinus1( i ); 1358 #endif1359 1282 } 1360 1283 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); … … 1379 1302 if( numOutputLayerSets > 1) 1380 1303 { 1381 #if H_MV_6_PS_0109_251382 1304 READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode ); 1383 1305 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1384 #else1385 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag( uiCode == 1);1386 #endif1387 1306 } 1388 1307 1389 #if H_MV_6_HRD_O0217_131390 1308 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1391 1309 pcVPS->setOutputLayerSetIdxMinus1(0, -1); 1392 #endif1393 1310 for( Int i = 1; i < numOutputLayerSets; i++ ) 1394 1311 { … … 1401 1318 } 1402 1319 } 1403 #if H_MV_6_HRD_O0217_131404 1320 else 1405 1321 { // These inference rules would also be helpful in spec text … … 1410 1326 } 1411 1327 } 1412 #endif1413 1328 1414 1329 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) … … 1417 1332 } 1418 1333 } 1419 #if H_MV_6_GEN_0153_281420 1334 if( pcVPS->getMaxLayersMinus1() > 0 ) 1421 1335 { 1422 1336 READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 ); 1423 1337 } 1424 #endif1425 #if H_MV_6_HRD_O0217_131426 1338 pcVPS->deriveTargetLayerIdLists(); 1427 #endif1428 1339 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1429 1340 if ( pcVPS->getRepFormatIdxPresentFlag() ) … … 1434 1345 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1435 1346 { 1436 #if H_MV_6_PS_REP_FORM_18_19_201437 1347 assert( pcVPS->getRepFormat(i) == NULL ); 1438 1348 TComRepFormat* curRepFormat = new TComRepFormat(); … … 1440 1350 parseRepFormat( i, curRepFormat , prevRepFormat); 1441 1351 pcVPS->setRepFormat(i, curRepFormat ); 1442 #else1443 assert( pcVPS->getRepFormat(i) == NULL );1444 TComRepFormat* repFormat = new TComRepFormat();1445 parseRepFormat( repFormat );1446 pcVPS->setRepFormat(i, repFormat );1447 #endif1448 1352 } 1449 1353 … … 1454 1358 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1455 1359 { 1456 #if H_MV_6_PS_REP_FORM_18_19_201457 1360 READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1458 #else1459 READ_CODE( 4, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode );1460 #endif1461 1361 } 1462 1362 } … … 1464 1364 1465 1365 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1466 #if H_MV_6_MISC_O0062_311467 1366 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1468 1367 { … … 1472 1371 } 1473 1372 } 1474 #endif 1475 1476 #if H_MV_6_HRD_O0217_13 1373 1477 1374 parseDpbSize( pcVPS ); 1478 #endif 1479 1480 #if !H_MV_6_PS_O0223_29 1481 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPS->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1482 #endif 1375 1483 1376 READ_UVLC( uiCode, "direct_dep_type_len_minus2") ; pcVPS->setDirectDepTypeLenMinus2 ( uiCode ); 1484 1377 1485 #if H_MV_6_PS_O0096_211486 1378 READ_FLAG( uiCode, "default_direct_dependency_flag" ); pcVPS->setDefaultDirectDependencyFlag( uiCode == 1 ); 1487 1379 if ( pcVPS->getDefaultDirectDependencyFlag( ) ) … … 1507 1399 } 1508 1400 } 1509 #else1510 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1511 {1512 for( Int j = 0; j < i; j++ )1513 {1514 if (pcVPS->getDirectDependencyFlag( i, j) )1515 {1516 READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2, uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);1517 }1518 }1519 }1520 #endif1521 1401 1522 1402 READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" ); 1523 #if !H_MV_6_PS_O0109_241524 READ_FLAG( uiCode, "vps_vui_present_flag" ) ; pcVPS->setVpsVuiPresentFlag( uiCode == 1 );1525 #endif1526 1403 1527 1404 if( pcVPS->getVpsVuiPresentFlag() ) … … 1532 1409 1533 1410 pcVPS->checkVPSExtensionSyntax(); 1534 #if !H_MV_6_MISC_O0062_31 1535 pcVPS->setRefLayers(); 1536 #endif 1537 } 1538 1539 #if H_MV_6_PS_REP_FORM_18_19_20 1411 } 1412 1540 1413 Void TDecCavlc::parseRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat ) 1541 #else1542 Void TDecCavlc::parseRepFormat( TComRepFormat* pcRepFormat )1543 #endif1544 1414 { 1545 1415 assert( pcRepFormat ); … … 1547 1417 UInt uiCode; 1548 1418 1549 #if H_MV_6_PS_REP_FORM_18_19_201550 1419 READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" ); pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode ); 1551 1420 READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode ); … … 1556 1425 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1557 1426 { 1558 #endif1559 1427 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode ); 1560 1428 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) … … 1562 1430 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 ); 1563 1431 } 1564 #if !H_MV_6_PS_REP_FORM_18_19_201565 READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" ); pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode );1566 READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode );1567 #endif1568 1432 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode ); 1569 1433 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode ); 1570 #if H_MV_6_PS_REP_FORM_18_19_201571 1434 } 1572 1435 else … … 1574 1437 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 1575 1438 } 1576 #endif1577 1439 } 1578 1440 … … 1587 1449 1588 1450 UInt uiCode; 1589 #if H_MV_6_PS_O0223_291590 1451 READ_FLAG( uiCode, "cross_layer_pic_type_aligned_flag" ); pcVPSVUI->setCrossLayerPicTypeAlignedFlag( uiCode == 1 ); 1591 1452 if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() ) … … 1593 1454 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1594 1455 } 1595 #endif1596 1456 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1597 1457 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); … … 1624 1484 } 1625 1485 1626 #if H_MV_6_O0226_371627 1486 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1628 1487 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1659 1518 } 1660 1519 } 1661 #else1662 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1663 {1664 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ )1665 {1666 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVPSVUI->setTileBoundariesAlignedFlag( i, j, uiCode == 1 );1667 }1668 }1669 #endif1670 1520 1671 1521 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); … … 1690 1540 } 1691 1541 1692 #if H_MV_6_PS_O0118_331693 1542 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1694 1543 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1724 1573 } 1725 1574 } 1726 #endif1727 #if H_MV_6_HRD_O0164_151728 1575 READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 ); 1729 1576 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1731 1578 parseVpsVuiBspHrdParameters( pcVPS ); 1732 1579 } 1733 #endif 1734 } 1735 1736 #if H_MV_6_HRD_O0164_15 1580 } 1581 1737 1582 Void TDecCavlc::parseVpsVuiBspHrdParameters( TComVPS* pcVPS ) 1738 1583 { … … 1791 1636 } 1792 1637 } 1793 #endif 1794 1795 #if H_MV_6_PS_O0118_33 1638 1796 1639 Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) 1797 1640 { … … 1803 1646 READ_CODE( 8, uiCode, "matrix_coeffs_vps" ); pcVideoSignalInfo->setMatrixCoeffsVps( uiCode ); 1804 1647 } 1805 #endif 1806 1807 #if H_MV_6_HRD_O0217_13 1648 1808 1649 Void TDecCavlc::parseDpbSize( TComVPS* vps ) 1809 1650 { … … 1846 1687 } 1847 1688 } 1848 #endif1849 1689 #endif 1850 1690 … … 2000 1840 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 2001 1841 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2002 #if H_MV_6_PS_O0118_332003 1842 if ( sps->getVuiParametersPresentFlag() ) 2004 1843 { 2005 1844 sps->getVuiParameters()->inferVideoSignalInfo( vps, rpcSlice->getLayerId() ); 2006 1845 } 2007 #endif2008 1846 rpcSlice->setVPS(vps); 2009 1847 rpcSlice->setViewId ( vps->getViewId ( rpcSlice->getLayerId() ) ); … … 2059 1897 #if H_MV 2060 1898 Int esb = 0; //Don't use i, otherwise will shadow something below 2061 #if !H_MV_6_RALS_O0149_11 1899 1900 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1901 { 1902 esb++; 1903 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 1904 } 1905 1906 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1907 { 1908 esb++; 1909 READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 ); 1910 } 1911 rpcSlice->checkCrossLayerBlaFlag( ); 1912 2062 1913 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 2063 1914 { … … 2065 1916 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 ); 2066 1917 } 2067 #endif2068 2069 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )2070 {2071 esb++;2072 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );2073 }2074 2075 #if H_MV_6_RALS_O0149_112076 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )2077 {2078 esb++;2079 READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 );2080 }2081 rpcSlice->checkCrossLayerBlaFlag( );2082 2083 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb )2084 {2085 esb++;2086 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 );2087 }2088 #endif2089 1918 2090 1919 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) … … 2111 1940 2112 1941 2113 #if H_MV_6_POC_31_35_382114 1942 UInt slicePicOrderCntLsb = 0; 2115 1943 Int iPOClsb = slicePicOrderCntLsb; // Needed later … … 2158 1986 rpcSlice->setPOC ( 0 ); 2159 1987 } 2160 #endif2161 1988 2162 1989 if( rpcSlice->getIdrPicFlag() ) 2163 1990 { 2164 #if !H_MV_6_POC_31_35_382165 rpcSlice->setPOC(0);2166 #endif2167 1991 TComReferencePictureSet* rps = rpcSlice->getLocalRPS(); 2168 1992 rps->setNumberOfNegativePictures(0); … … 2177 2001 else 2178 2002 { 2179 #if !H_MV_6_POC_31_35_382180 READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb");2181 Int iPOClsb = uiCode;2182 Int iPrevPOC = rpcSlice->getPrevTid0POC();2183 Int iMaxPOClsb = 1<< sps->getBitsForPOC();2184 Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1);2185 Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb;2186 Int iPOCmsb;2187 if( ( iPOClsb < iPrevPOClsb ) && ( ( iPrevPOClsb - iPOClsb ) >= ( iMaxPOClsb / 2 ) ) )2188 {2189 iPOCmsb = iPrevPOCmsb + iMaxPOClsb;2190 }2191 else if( (iPOClsb > iPrevPOClsb ) && ( (iPOClsb - iPrevPOClsb ) > ( iMaxPOClsb / 2 ) ) )2192 {2193 iPOCmsb = iPrevPOCmsb - iMaxPOClsb;2194 }2195 else2196 {2197 iPOCmsb = iPrevPOCmsb;2198 }2199 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP2200 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL2201 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP )2202 {2203 // For BLA picture types, POCmsb is set to 0.2204 iPOCmsb = 0;2205 }2206 rpcSlice->setPOC (iPOCmsb+iPOClsb);2207 #if H_MV2208 if ( rpcSlice->getPocResetFlag() )2209 {2210 rpcSlice->setPocBeforeReset ( rpcSlice->getPOC() );2211 rpcSlice->setPOC ( 0 );2212 2213 }2214 #endif2215 #endif2216 2003 TComReferencePictureSet* rps; 2217 2004 rps = rpcSlice->getLocalRPS(); … … 2347 2134 } 2348 2135 #if H_MV 2349 #if H_MV_6_ILDDS_ILREFPICS_27_342350 2136 Bool interLayerPredLayerIdcPresentFlag = false; 2351 #endif2352 2137 Int layerId = rpcSlice->getLayerId(); 2353 2138 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) … … 2362 2147 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 2363 2148 { 2364 #if H_MV_6_ILDDS_ILREFPICS_27_342365 2149 interLayerPredLayerIdcPresentFlag = true; 2366 #endif2367 2150 for( Int idx = 0; idx < rpcSlice->getNumActiveRefLayerPics(); idx++ ) 2368 2151 { … … 2372 2155 } 2373 2156 } 2374 #if H_MV_6_ILDDS_ILREFPICS_27_342375 2157 if ( !interLayerPredLayerIdcPresentFlag ) 2376 2158 { … … 2380 2162 } 2381 2163 } 2382 #endif2383 2164 #endif 2384 2165 if(sps->getUseSAO()) -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r758 r766 78 78 #if H_MV 79 79 Void parseVPSExtension ( TComVPS* pcVPS ); 80 #if H_MV_6_PS_REP_FORM_18_19_2081 80 Void parseRepFormat ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat ); 82 #else83 Void parseRepFormat ( TComRepFormat* pcRepFormat );84 #endif85 81 Void parseVPSVUI ( TComVPS* pcVPS ); 86 #if H_MV_6_PS_O0118_3387 82 Void parseVideoSignalInfo ( TComVideoSignalInfo* pcVideoSignalInfo ); 88 #endif89 #if H_MV_6_HRD_O0217_1390 83 Void parseDpbSize ( TComVPS* pcVPS ); 91 #endif92 #if H_MV_6_HRD_O0164_1593 84 Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS ); 94 #endif95 85 #endif 96 86 -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r765 r766 656 656 #if H_MV 657 657 m_apcSlicePilot->setVPS(vps); 658 #if H_MV_6_PS_0092_17659 658 // 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. 660 659 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) ); 661 660 // 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. 662 661 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) ); 663 #endif664 662 sps->inferRepFormat ( vps , m_layerId ); 665 663 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); … … 692 690 693 691 #if H_MV 694 #if H_MV_FIX_SKIP_PICTURES695 692 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ) 696 #else697 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag )698 #endif699 693 { 700 694 assert( nalu.m_layerId == m_layerId ); … … 754 748 #endif 755 749 756 #if H_MV_LAYER_WISE_STARTUP757 750 xCeckNoClrasOutput(); 758 #endif759 751 // Skip pictures due to random access 760 752 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) … … 762 754 m_prevSliceSkipped = true; 763 755 m_skippedPOC = m_apcSlicePilot->getPOC(); 764 #if H_MV_FIX_SKIP_PICTURES765 756 sliceSkippedFlag = true; 766 #endif767 757 return false; 768 758 } … … 772 762 m_prevSliceSkipped = true; 773 763 m_skippedPOC = m_apcSlicePilot->getPOC(); 774 #if H_MV_FIX_SKIP_PICTURES775 764 sliceSkippedFlag = true; 776 #endif777 765 return false; 778 766 } … … 1222 1210 1223 1211 #if H_MV 1224 #if H_MV_FIX_SKIP_PICTURES1225 1212 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ) 1226 #else1227 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag)1228 #endif1229 1213 #else 1230 1214 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay) … … 1271 1255 case NAL_UNIT_CODED_SLICE_RASL_R: 1272 1256 #if H_MV 1273 #if H_MV_FIX_SKIP_PICTURES1274 1257 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag ); 1275 #else1276 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);1277 #endif1278 1258 #else 1279 1259 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay); … … 1324 1304 return true; 1325 1305 } 1326 #if H_MV_LAYER_WISE_STARTUP1327 1306 else if ( !m_layerInitilizedFlag[ m_layerId ] ) // start of random access point, m_pocRandomAccess has not been set yet. 1328 #else1329 else if (m_pocRandomAccess == MAX_INT) // start of random access point, m_pocRandomAccess has not been set yet.1330 #endif1331 1307 { 1332 1308 if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA … … 1336 1312 { 1337 1313 1338 #if H_MV_LAYER_WISE_STARTUP1339 1314 if ( xAllRefLayersInitilized() ) 1340 1315 { … … 1346 1321 return true; 1347 1322 } 1348 #else1349 // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT.1350 m_pocRandomAccess = m_apcSlicePilot->getPOC();1351 #endif1352 1323 } 1353 1324 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 1354 1325 { 1355 #if H_MV_LAYER_WISE_STARTUP1356 1326 if ( xAllRefLayersInitilized() ) 1357 1327 { … … 1363 1333 return true; 1364 1334 } 1365 #else1366 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable.1367 #endif1368 1335 } 1369 1336 else 1370 1337 { 1371 #if H_MV_FIX_SKIP_PICTURES1372 1338 static Bool warningMessage[MAX_NUM_LAYERS]; 1373 1339 static Bool warningInitFlag = false; … … 1387 1353 warningMessage[m_layerId] = false; 1388 1354 } 1389 #else1390 static Bool warningMessage = false;1391 if(!warningMessage)1392 {1393 printf("\nWarning: this is not a valid random access point and the data is discarded until the first CRA picture");1394 warningMessage = true;1395 }1396 #endif1397 1355 return true; 1398 1356 } … … 1404 1362 return true; 1405 1363 } 1406 #if H_MV_LAYER_WISE_STARTUP1407 1364 return !m_layerInitilizedFlag[ getLayerId() ]; 1408 #else1409 // if we reach here, then the picture is not skipped.1410 return false;1411 #endif1412 1365 } 1413 1366 … … 1451 1404 } 1452 1405 1453 #if H_MV_LAYER_WISE_STARTUP1454 1406 Void TDecTop::xCeckNoClrasOutput() 1455 1407 { … … 1486 1438 } 1487 1439 #endif 1488 #endif1489 1440 //! \} -
branches/HTM-9.2-dev0/source/Lib/TLibDecoder/TDecTop.h
r765 r766 186 186 TComList<TComPic*> m_cListPic; // Dynamic buffer 187 187 #if H_MV 188 #if H_MV_LAYER_WISE_STARTUP189 188 Bool* m_layerInitilizedFlag; // initialization Layers 190 #endif191 189 static ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 192 190 #else … … 246 244 Void init(); 247 245 #if H_MV 248 #if H_MV_FIX_SKIP_PICTURES249 246 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer, Bool& sliceSkippedFlag ); 250 #else251 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer );252 #endif253 247 Bool decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayer ); 254 248 #else … … 268 262 TComList<TComPic*>* getListPic () { return &m_cListPic; } 269 263 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 270 #if H_MV_LAYER_WISE_STARTUP271 264 Void setLayerInitilizedFlags( Bool* val ) { m_layerInitilizedFlag = val; } 272 #endif273 #if H_MV_6_HRD_O0217_13274 265 TComVPS* getPrefetchedVPS () { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present. 275 #endif276 266 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); } 277 267 Void setLayerId ( Int layer) { m_layerId = layer; } … … 294 284 #if H_MV 295 285 TComPic* xGetPic( Int layerId, Int poc ); 296 #if H_MV_FIX_SKIP_PICTURES297 286 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ); 298 #else299 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag );300 #endif301 287 Void xResetPocInPicBuffer(); 302 #if H_MV_LAYER_WISE_STARTUP303 288 Void xCeckNoClrasOutput(); 304 289 305 290 Bool xAllRefLayersInitilized(); 306 #endif307 291 #else 308 292 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
Note: See TracChangeset for help on using the changeset viewer.