Changeset 773 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 16 Jan 2014, 09:56:13 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r758 r773 215 215 } 216 216 217 #if DLT_DIFF_CODING_IN_PPS217 #if H_3D 218 218 Void TDecCavlc::parsePPS(TComPPS* pcPPS, TComVPS* pcVPS ) 219 219 #else … … 368 368 if (uiCode) 369 369 { 370 #if DLT_DIFF_CODING_IN_PPS370 #if H_3D 371 371 parsePPSExtension( pcPPS, pcVPS ); 372 372 READ_FLAG( uiCode, "pps_extension2_flag"); … … 378 378 READ_FLAG( uiCode, "pps_extension_data_flag"); 379 379 } 380 #if DLT_DIFF_CODING_IN_PPS381 } 382 #endif 383 } 384 } 385 386 #if DLT_DIFF_CODING_IN_PPS380 #if H_3D 381 } 382 #endif 383 } 384 } 385 386 #if H_3D 387 387 Void TDecCavlc::parsePPSExtension( TComPPS* pcPPS, TComVPS* pcVPS ) 388 388 { 389 //Ed.(GT): pcVPS should not be used here. Needs to be fixed. 389 390 UInt uiCode = 0; 390 391 TComDLT* pcDLT = new TComDLT; … … 556 557 557 558 READ_FLAG( uiCode, "video_signal_type_present_flag"); pcVUI->setVideoSignalTypePresentFlag(uiCode); 558 #if H_MV _6_PS_O0118_33559 #if H_MV 559 560 assert( pcSPS->getLayerId() == 0 || !pcVUI->getVideoSignalTypePresentFlag() ); 560 561 #endif 561 562 562 if (pcVUI->getVideoSignalTypePresentFlag()) 563 563 { … … 746 746 { 747 747 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); 748 #if H_MV_6_PS_REP_FORM_18_19_20749 748 if ( pcSPS->getUpdateRepFormatFlag() ) 750 749 { … … 754 753 else 755 754 { 756 #else757 }758 759 if ( pcSPS->getUpdateRepFormatFlag() )760 {761 #endif762 755 #endif 763 756 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); … … 795 788 796 789 #if H_MV 797 #if H_MV_6_PS_REP_FORM_18_19_20798 790 if ( pcSPS->getLayerId() == 0 ) 799 #else800 if ( pcSPS->getUpdateRepFormatFlag() )801 #endif802 791 { 803 792 #endif … … 948 937 949 938 READ_FLAG( uiCode, "sps_extension_flag"); 950 #if H_MV _6_PSEM_O0142_3939 #if H_MV 951 940 pcSPS->setSpsExtensionFlag( uiCode ); 952 #endif953 941 if (pcSPS->getSpsExtensionFlag( ) ) 954 { 955 #if !H_MV_6_PSEM_O0142_3 956 #if H_MV 957 parseSPSExtension( pcSPS ); 958 READ_FLAG( uiCode, "sps_extension2_flag"); 959 if ( uiCode ) 960 { 961 #if H_3D 962 parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 963 READ_FLAG( uiCode, "sps_extension3_flag"); 964 if ( uiCode ) 965 { 966 #endif 967 #endif 968 #else 942 #else 943 if (uiCode) 944 #endif 945 { 946 #if H_MV 969 947 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 970 948 { … … 996 974 READ_FLAG( uiCode, "sps_extension_data_flag"); 997 975 } 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 976 #if H_MV 977 } 1007 978 #endif 1008 979 } … … 1014 985 UInt uiCode; 1015 986 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 987 1020 988 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode ); … … 1031 999 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode ); 1032 1000 } 1033 #endif1034 1001 } 1035 1002 … … 1048 1015 } 1049 1016 #endif 1050 1051 #if !CAM_HLS_F0136_F0045_F00821052 UInt uiCamParPrecision = 0;1053 Bool bCamParSlice = false;1054 if ( !depthFlag )1055 {1056 READ_UVLC( uiCamParPrecision, "cp_precision" );1057 READ_FLAG( uiCode, "cp_in_slice_header_flag" ); bCamParSlice = ( uiCode == 1 );1058 if( !bCamParSlice )1059 {1060 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )1061 {1062 Int iCode;1063 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;1064 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;1065 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];1066 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];1067 }1068 }1069 }1070 pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );1071 #endif1072 1017 } 1073 1018 #endif … … 1081 1026 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 1082 1027 #if H_MV 1083 #if H_MV_6_LAYER_ID_321084 1028 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 1029 #else 1089 1030 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 1140 1081 } 1141 1082 } 1142 #if H_MV _6_HRD_O0217_131083 #if H_MV 1143 1084 pcVPS->deriveLayerSetLayerIdList(); 1144 1085 #endif … … 1181 1122 #if H_3D 1182 1123 m_pcBitstream->readOutTrailingBits(); 1183 #if CAM_HLS_F0136_F0045_F00821184 1124 pcVPS->createCamPars(pcVPS->getNumViews()); 1185 #endif1186 1125 parseVPSExtension2( pcVPS ); 1187 1126 READ_FLAG( uiCode, "vps_extension3_flag" ); … … 1209 1148 UInt uiCode; 1210 1149 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1211 #if H_MV_6_PS_O0109_241212 1150 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); if ( pcVPS->getVpsVuiPresentFlag() ) 1213 1151 { 1214 #endif1215 1152 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode ); 1216 #if H_MV_6_PS_O0109_24 1217 } 1218 #endif 1153 } 1219 1154 1220 1155 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1263 1198 } 1264 1199 1265 #if H_MV_6_PS_O0109_221266 1200 READ_CODE( 4, uiCode, "view_id_len" ); pcVPS->setViewIdLen( uiCode ); 1267 1201 … … 1280 1214 } 1281 1215 } 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 1216 1296 1217 … … 1302 1223 } 1303 1224 } 1304 #if H_MV_6_MISC_O0062_311305 1225 pcVPS->setRefLayers(); 1306 #endif1307 #if H_MV_6_ILDSD_O0120_261308 1226 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); 1309 1227 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1323 1241 } 1324 1242 } 1325 #endif1326 1243 READ_FLAG( uiCode, "max_tid_ref_present_flag" ); pcVPS->setMaxTidRefPresentFlag( uiCode == 1 ); 1327 1244 … … 1330 1247 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1331 1248 { 1332 #if H_MV_6_ILDDS_O0225_301333 1249 for( Int j = i + 1; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1334 1250 { … … 1338 1254 } 1339 1255 } 1340 #else1341 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );1342 #endif1343 1256 } 1344 1257 } … … 1354 1267 { 1355 1268 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode ); 1356 #if H_MV_6_PS_O0109_231357 1269 pcVPS->checkProfileRefMinus1( i ); 1358 #endif1359 1270 } 1360 1271 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); … … 1379 1290 if( numOutputLayerSets > 1) 1380 1291 { 1381 #if H_MV_6_PS_0109_251382 1292 READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); pcVPS->setDefaultOneTargetOutputLayerIdc( uiCode ); 1383 1293 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1384 #else1385 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag( uiCode == 1);1386 #endif1387 1294 } 1388 1295 1389 #if H_MV_6_HRD_O0217_131390 1296 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1391 1297 pcVPS->setOutputLayerSetIdxMinus1(0, -1); 1392 #endif1393 1298 for( Int i = 1; i < numOutputLayerSets; i++ ) 1394 1299 { … … 1401 1306 } 1402 1307 } 1403 #if H_MV_6_HRD_O0217_131404 1308 else 1405 1309 { // These inference rules would also be helpful in spec text … … 1410 1314 } 1411 1315 } 1412 #endif1413 1316 1414 1317 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) … … 1417 1320 } 1418 1321 } 1419 #if H_MV_6_GEN_0153_281420 1322 if( pcVPS->getMaxLayersMinus1() > 0 ) 1421 1323 { 1422 1324 READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 ); 1423 1325 } 1424 #endif1425 #if H_MV_6_HRD_O0217_131426 1326 pcVPS->deriveTargetLayerIdLists(); 1427 #endif1428 1327 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1429 1328 if ( pcVPS->getRepFormatIdxPresentFlag() ) … … 1434 1333 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1435 1334 { 1436 #if H_MV_6_PS_REP_FORM_18_19_201437 1335 assert( pcVPS->getRepFormat(i) == NULL ); 1438 1336 TComRepFormat* curRepFormat = new TComRepFormat(); … … 1440 1338 parseRepFormat( i, curRepFormat , prevRepFormat); 1441 1339 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 1340 } 1449 1341 … … 1454 1346 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1455 1347 { 1456 #if H_MV_6_PS_REP_FORM_18_19_201457 1348 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 1349 } 1462 1350 } … … 1464 1352 1465 1353 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1466 #if H_MV_6_MISC_O0062_311467 1354 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1468 1355 { … … 1472 1359 } 1473 1360 } 1474 #endif 1475 1476 #if H_MV_6_HRD_O0217_13 1361 1477 1362 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 1363 1483 1364 READ_UVLC( uiCode, "direct_dep_type_len_minus2") ; pcVPS->setDirectDepTypeLenMinus2 ( uiCode ); 1484 1365 1485 #if H_MV_6_PS_O0096_211486 1366 READ_FLAG( uiCode, "default_direct_dependency_flag" ); pcVPS->setDefaultDirectDependencyFlag( uiCode == 1 ); 1487 1367 if ( pcVPS->getDefaultDirectDependencyFlag( ) ) … … 1507 1387 } 1508 1388 } 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 1389 1522 1390 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 1391 1527 1392 if( pcVPS->getVpsVuiPresentFlag() ) … … 1532 1397 1533 1398 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 1399 } 1400 1540 1401 Void TDecCavlc::parseRepFormat( Int i, TComRepFormat* pcRepFormat, TComRepFormat* pcPrevRepFormat ) 1541 #else1542 Void TDecCavlc::parseRepFormat( TComRepFormat* pcRepFormat )1543 #endif1544 1402 { 1545 1403 assert( pcRepFormat ); … … 1547 1405 UInt uiCode; 1548 1406 1549 #if H_MV_6_PS_REP_FORM_18_19_201550 1407 READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" ); pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode ); 1551 1408 READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode ); … … 1556 1413 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1557 1414 { 1558 #endif1559 1415 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode ); 1560 1416 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) … … 1562 1418 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 ); 1563 1419 } 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 1420 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode ); 1569 1421 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode ); 1570 #if H_MV_6_PS_REP_FORM_18_19_201571 1422 } 1572 1423 else … … 1574 1425 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 1575 1426 } 1576 #endif1577 1427 } 1578 1428 … … 1587 1437 1588 1438 UInt uiCode; 1589 #if H_MV_6_PS_O0223_291590 1439 READ_FLAG( uiCode, "cross_layer_pic_type_aligned_flag" ); pcVPSVUI->setCrossLayerPicTypeAlignedFlag( uiCode == 1 ); 1591 1440 if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() ) … … 1593 1442 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1594 1443 } 1595 #endif1596 1444 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1597 1445 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); … … 1624 1472 } 1625 1473 1626 #if H_MV_6_O0226_371627 1474 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1628 1475 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1659 1506 } 1660 1507 } 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 1508 1671 1509 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); … … 1690 1528 } 1691 1529 1692 #if H_MV_6_PS_O0118_331693 1530 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1694 1531 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1724 1561 } 1725 1562 } 1726 #endif1727 #if H_MV_6_HRD_O0164_151728 1563 READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 ); 1729 1564 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1731 1566 parseVpsVuiBspHrdParameters( pcVPS ); 1732 1567 } 1733 #endif 1734 } 1735 1736 #if H_MV_6_HRD_O0164_15 1568 } 1569 1737 1570 Void TDecCavlc::parseVpsVuiBspHrdParameters( TComVPS* pcVPS ) 1738 1571 { … … 1791 1624 } 1792 1625 } 1793 #endif 1794 1795 #if H_MV_6_PS_O0118_33 1626 1796 1627 Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) 1797 1628 { … … 1803 1634 READ_CODE( 8, uiCode, "matrix_coeffs_vps" ); pcVideoSignalInfo->setMatrixCoeffsVps( uiCode ); 1804 1635 } 1805 #endif 1806 1807 #if H_MV_6_HRD_O0217_13 1636 1808 1637 Void TDecCavlc::parseDpbSize( TComVPS* vps ) 1809 1638 { … … 1847 1676 } 1848 1677 #endif 1849 #endif1850 1678 1851 1679 #if H_3D … … 1859 1687 pcVPS->setARPStepNum( i, 1 ); 1860 1688 #endif 1861 #if MTK_SPIVMP_F01101689 #if H_3D_SPIVMP 1862 1690 pcVPS->setSubPULog2Size(i, 0); 1863 1691 #endif … … 1868 1696 #if H_3D_IV_MERGE 1869 1697 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1870 #if MTK_SPIVMP_F01101698 #if H_3D_SPIVMP 1871 1699 READ_UVLC (uiCode, "log2_sub_PU_size_minus2"); pcVPS->setSubPULog2Size(i, uiCode+2); 1872 1700 #endif … … 1885 1713 else 1886 1714 { 1887 #if QC_DEPTH_IV_MRG_F0125 &&H_3D_IV_MERGE1715 #if H_3D_IV_MERGE 1888 1716 if(i!=1) 1889 1717 { … … 1891 1719 } 1892 1720 #endif 1893 #if MTK_SPIVMP_F01101721 #if H_3D_SPIVMP 1894 1722 if (i!=1) 1895 1723 { … … 1897 1725 } 1898 1726 #endif 1899 #if SEC_MPI_ENABLING_MERGE_F01501727 #if H_3D_IV_MERGE 1900 1728 READ_FLAG( uiCode, "mpi_flag[i]" ); pcVPS->setMPIFlag( i, uiCode == 1 ? true : false ); 1901 1729 #endif 1902 1730 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false ); 1903 1731 // READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPreFlag ( i, uiCode == 1 ? true : false ); 1904 #if H_3D_DIM_DLT1905 #if !DLT_DIFF_CODING_IN_PPS1906 if( pcVPS->getVpsDepthModesFlag( i ) )1907 {1908 READ_FLAG( uiCode, "dlt_flag[i]" ); pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false );1909 }1910 if( pcVPS->getUseDLTFlag( i ) )1911 {1912 // decode mapping1913 UInt uiNumDepthValues;1914 // parse number of values in DLT1915 READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");1916 1917 // parse actual DLT values1918 Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));1919 for(Int d=0; d<uiNumDepthValues; d++)1920 {1921 READ_UVLC(uiCode, "dlt_depth_value[i][d]");1922 aiIdx2DepthValue[d] = (Int)uiCode;1923 }1924 1925 pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);1926 1927 // clean memory1928 free(aiIdx2DepthValue);1929 }1930 #endif1931 #endif1932 1732 #if H_3D_INTER_SDC 1933 1733 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); … … 1936 1736 } 1937 1737 } 1938 #if CAM_HLS_F0136_F0045_F0082 1738 1939 1739 UInt uiCamParPrecision = 0; 1940 1740 Bool bCamParSlice = false; … … 1962 1762 } 1963 1763 } 1964 #endif 1764 1965 1765 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1966 1766 } … … 2000 1800 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 2001 1801 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2002 #if H_MV_6_PS_O0118_332003 1802 if ( sps->getVuiParametersPresentFlag() ) 2004 1803 { 2005 1804 sps->getVuiParameters()->inferVideoSignalInfo( vps, rpcSlice->getLayerId() ); 2006 1805 } 2007 #endif2008 1806 rpcSlice->setVPS(vps); 2009 1807 rpcSlice->setViewId ( vps->getViewId ( rpcSlice->getLayerId() ) ); … … 2059 1857 #if H_MV 2060 1858 Int esb = 0; //Don't use i, otherwise will shadow something below 2061 #if !H_MV_6_RALS_O0149_11 1859 1860 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1861 { 1862 esb++; 1863 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 1864 } 1865 1866 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1867 { 1868 esb++; 1869 READ_FLAG( uiCode, "cross_layer_bla_flag" ); rpcSlice->setCrossLayerBlaFlag( uiCode == 1 ); 1870 } 1871 rpcSlice->checkCrossLayerBlaFlag( ); 1872 2062 1873 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 2063 1874 { … … 2065 1876 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 ); 2066 1877 } 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 1878 2090 1879 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) … … 2111 1900 2112 1901 2113 #if H_MV _6_POC_31_35_381902 #if H_MV 2114 1903 UInt slicePicOrderCntLsb = 0; 2115 1904 Int iPOClsb = slicePicOrderCntLsb; // Needed later … … 2162 1951 if( rpcSlice->getIdrPicFlag() ) 2163 1952 { 2164 #if !H_MV _6_POC_31_35_381953 #if !H_MV 2165 1954 rpcSlice->setPOC(0); 2166 1955 #endif … … 2177 1966 else 2178 1967 { 2179 #if !H_MV _6_POC_31_35_381968 #if !H_MV 2180 1969 READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 2181 1970 Int iPOClsb = uiCode; … … 2205 1994 } 2206 1995 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 1996 #endif 2216 1997 TComReferencePictureSet* rps; … … 2347 2128 } 2348 2129 #if H_MV 2349 #if H_MV_6_ILDDS_ILREFPICS_27_342350 2130 Bool interLayerPredLayerIdcPresentFlag = false; 2351 #endif2352 2131 Int layerId = rpcSlice->getLayerId(); 2353 2132 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) … … 2362 2141 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 2363 2142 { 2364 #if H_MV_6_ILDDS_ILREFPICS_27_342365 2143 interLayerPredLayerIdcPresentFlag = true; 2366 #endif2367 2144 for( Int idx = 0; idx < rpcSlice->getNumActiveRefLayerPics(); idx++ ) 2368 2145 { … … 2372 2149 } 2373 2150 } 2374 #if H_MV_6_ILDDS_ILREFPICS_27_342375 2151 if ( !interLayerPredLayerIdcPresentFlag ) 2376 2152 { … … 2380 2156 } 2381 2157 } 2382 #endif2383 2158 #endif 2384 2159 if(sps->getUseSAO()) … … 2550 2325 } 2551 2326 #if H_3D_IC 2552 #if SEC_ONLY_TEXTURE_IC_F01512553 2327 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth()) 2554 #else2555 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) )2556 #endif2557 2328 { 2558 2329 UInt uiCodeTmp = 0; … … 2572 2343 READ_UVLC( uiCode, "five_minus_max_num_merge_cand"); 2573 2344 #if H_3D_IV_MERGE 2574 #if SEC_MPI_ENABLING_MERGE_F01502575 2345 if(rpcSlice->getIsDepth()) 2576 2346 { … … 2584 2354 rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2585 2355 } 2586 #else 2587 Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ; 2588 rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2589 #endif 2356 2590 2357 #else 2591 2358 rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode); … … 2689 2456 } 2690 2457 2691 #if CAM_HLS_F0044 2692 #if CAM_HLS_F0136_F0045_F0082 2458 #if H_3D 2693 2459 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() ) 2694 #else2695 if( rpcSlice->getSPS()->hasCamParInSliceHeader() )2696 #endif2697 2460 { 2698 2461 UInt uiViewIndex = rpcSlice->getViewIndex(); … … 2706 2469 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset ); 2707 2470 } 2708 2709 2471 #endif 2710 2472 … … 2712 2474 { 2713 2475 READ_UVLC(uiCode,"slice_header_extension_length"); 2714 #if H_3D && !CAM_HLS_F0044 2715 #if CAM_HLS_F0136_F0045_F0082 2716 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() ) 2717 #else 2718 if( rpcSlice->getSPS()->hasCamParInSliceHeader() ) 2719 #endif 2720 { 2721 UInt uiViewIndex = rpcSlice->getViewIndex(); 2722 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ ) 2723 { 2724 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode; 2725 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode; 2726 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ]; 2727 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ]; 2728 } 2729 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset ); 2730 } 2731 2732 READ_FLAG(uiCode,"slice_segment_header_extension2_flag"); 2733 if ( uiCode ) 2734 { 2735 READ_UVLC(uiCode,"slice_header_extension2_length"); 2736 for(Int i=0; i<uiCode; i++) 2737 { 2738 UInt ignore; 2739 READ_CODE(8,ignore,"slice_header_extension2_data_byte"); 2740 } 2741 } 2742 } 2743 #else 2476 2744 2477 for(Int i=0; i<uiCode; i++) 2745 2478 { … … 2748 2481 } 2749 2482 } 2750 #endif 2483 2751 2484 m_pcBitstream->readByteAlignment(); 2752 2485
Note: See TracChangeset for help on using the changeset viewer.