Changeset 773 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 16 Jan 2014, 09:56:13 (11 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 9 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 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r758 r773 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 … … 106 96 #endif 107 97 108 #if H_3D && DLT_DIFF_CODING_IN_PPS98 #if H_3D 109 99 Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ); 110 100 Void parsePPSExtension ( TComPPS* pcPPS, TComVPS* pcVPS ); -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r758 r773 135 135 Void TDecCu::decompressCU( TComDataCU* pcCU ) 136 136 { 137 #if ! QC_DEPTH_IV_MRG_F0125137 #if !H_3D_IV_MERGE 138 138 xDecompressCU( pcCU, 0, 0 ); 139 139 #endif … … 315 315 m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth) ); 316 316 m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 317 #if QC_DEPTH_IV_MRG_F0125317 #if H_3D_IV_MERGE 318 318 if( pcCU->getSlice()->getIsDepth()) 319 319 { … … 333 333 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 334 334 } 335 #if QC_DEPTH_IV_MRG_F0125335 #if H_3D_IV_MERGE 336 336 } 337 337 #endif … … 390 390 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 391 391 392 #if LGE_SHARP_VSP_INHERIT_F0104393 392 #if H_3D_IC 394 393 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 396 395 #if H_3D_ARP 397 396 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth ); 398 #endif399 397 #endif 400 398 … … 403 401 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 404 402 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 405 #if MTK_SPIVMP_F0110403 #if H_3D_SPIVMP 406 404 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 407 405 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); … … 411 409 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 412 410 #endif 413 #if ETRIKHU_MERGE_REUSE_F0093414 411 m_ppcCU[uiDepth]->initAvailableFlags(); 415 412 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 416 413 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 417 #if MTK_SPIVMP_F0110414 #if H_3D_SPIVMP 418 415 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 419 416 #endif 420 417 , numValidMergeCand, uiMergeIndex ); 421 #else422 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand, uiMergeIndex );423 #endif424 418 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 425 419 #else 426 #if ETRIKHU_MERGE_REUSE_F0093420 #if H_3D 427 421 m_ppcCU[uiDepth]->initAvailableFlags(); 428 422 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); … … 468 462 } 469 463 } 470 #if MTK_SPIVMP_F0110464 #if H_3D_SPIVMP 471 465 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 472 466 if (bSPIVMPFlag[uiMergeIndex]) … … 488 482 } 489 483 } 490 #if MTK_F0110_FIX491 484 delete[] pcMvFieldSP; 492 485 delete[] puhInterDirSP; 493 #else494 delete pcMvFieldSP;495 delete puhInterDirSP;496 #endif497 #endif498 #if !LGE_SHARP_VSP_INHERIT_F0104499 #if H_3D_IC500 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );501 #endif502 #if H_3D_ARP503 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );504 #endif505 486 #endif 506 487 507 488 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 508 #if QC_DEPTH_IV_MRG_F0125489 #if H_3D_IV_MERGE 509 490 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 510 491 #endif … … 522 503 { 523 504 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 524 #if QC_DEPTH_IV_MRG_F0125505 #if H_3D_IV_MERGE 525 506 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 526 507 #endif … … 534 515 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 535 516 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 536 #if !LGE_SHARP_VSP_INHERIT_F0104537 #if H_3D_IC538 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );539 #endif540 #if H_3D_ARP541 m_pcEntropyDecoder->decodeARPW ( pcCU , uiAbsPartIdx , uiDepth );542 #endif543 #endif544 517 #if H_3D_INTER_SDC 545 518 m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 550 523 setdQPFlag( bCodeDQP ); 551 524 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 552 #if QC_DEPTH_IV_MRG_F0125525 #if H_3D_IV_MERGE 553 526 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 554 527 #endif … … 568 541 { 569 542 TComPic* pcPic = pcCU->getPic(); 570 #if ! QC_DEPTH_IV_MRG_F0125543 #if !H_3D_IV_MERGE 571 544 Bool bBoundary = false; 572 545 UInt uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ]; … … 780 753 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 781 754 { 782 #if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 783 #if DLT_DIFF_CODING_IN_PPS 755 #if H_3D 784 756 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 785 #else 786 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 787 #endif 788 { 789 #if DLT_DIFF_CODING_IN_PPS 790 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 791 #else 792 pReco [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 793 #endif 794 } 795 else 796 { 797 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] ); 798 } 757 { 758 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); 759 } 760 else 761 { 762 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] ); 763 } 799 764 #else 800 765 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] ); … … 1008 973 { 1009 974 #if H_3D_DIM_DLT 1010 #if DLT_DIFF_CODING_IN_PPS1011 975 Pel pPredIdx = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] ); 1012 976 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 1013 977 Pel pRecoValue = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx ); 1014 #else1015 Pel pPredIdx = pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), apDCPredValues[uiSegment] );1016 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);1017 Pel pRecoValue = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pPredIdx + pResiIdx );1018 #endif1019 978 1020 979 apDCResiValues[uiSegment] = pRecoValue - apDCPredValues[uiSegment]; -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r735 r773 111 111 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 112 112 113 #if SEC_ONLY_TEXTURE_IC_F0151114 113 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() ) 115 #else116 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) )117 #endif118 114 { 119 115 return; … … 213 209 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 214 210 #endif 215 #if MTK_SPIVMP_F0110211 #if H_3D_SPIVMP 216 212 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 217 213 TComMvField* pcMvFieldSP; … … 245 241 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 246 242 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 247 #if LGE_SHARP_VSP_INHERIT_F0104248 243 #if H_3D_IC 249 244 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 251 246 #if H_3D_ARP 252 247 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 253 #endif254 248 #endif 255 249 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) … … 262 256 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 263 257 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 264 #if MTK_SPIVMP_F0110258 #if H_3D_SPIVMP 265 259 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 266 260 #endif 267 #if ETRIKHU_MERGE_REUSE_F0093268 261 pcSubCU->initAvailableFlags(); 269 262 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 270 263 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 271 #if MTK_SPIVMP_F0110264 #if H_3D_SPIVMP 272 265 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 273 266 #endif 274 267 , numValidMergeCand ); 275 #else276 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );277 #endif278 268 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 279 269 … … 283 273 } 284 274 #else 285 #if ETRIKHU_MERGE_REUSE_F0093275 #if H_3D 286 276 pcSubCU->initAvailableFlags(); 287 277 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); … … 303 293 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 304 294 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 305 #if MTK_SPIVMP_F0110295 #if H_3D_SPIVMP 306 296 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 307 297 #endif 308 #if ETRIKHU_MERGE_REUSE_F0093309 298 pcSubCU->initAvailableFlags(); 310 299 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 311 300 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo 312 #if MTK_SPIVMP_F0110301 #if H_3D_SPIVMP 313 302 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 314 303 #endif 315 304 ,numValidMergeCand, uiMergeIndex ); 316 #else317 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo,numValidMergeCand, uiMergeIndex );318 #endif319 305 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 320 306 if(vspFlag[uiMergeIndex]) … … 323 309 } 324 310 #else 325 #if ETRIKHU_MERGE_REUSE_F0093311 #if H_3D 326 312 pcSubCU->initAvailableFlags(); 327 313 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); … … 345 331 } 346 332 } 347 #if MTK_SPIVMP_F0110333 #if H_3D_SPIVMP 348 334 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 349 335 if (bSPIVMPFlag[uiMergeIndex] != 0) … … 381 367 } 382 368 } 383 #if LGE_SHARP_VSP_INHERIT_F0104384 369 #if H_3D_IC 385 370 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 387 372 #if H_3D_ARP 388 373 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 389 #endif390 374 #endif 391 375 } … … 401 385 } 402 386 } 403 #if MTK_SPIVMP_F0110 404 #if MTK_F0110_FIX 387 #if H_3D_SPIVMP 405 388 delete[] pcMvFieldSP; 406 389 delete[] puhInterDirSP; 407 #else408 delete pcMvFieldSP;409 delete puhInterDirSP;410 #endif411 390 #endif 412 391 return; -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r758 r773 71 71 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; 72 72 #endif 73 #if DLT_DIFF_CODING_IN_PPS73 #if H_3D 74 74 virtual Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ) = 0; 75 75 #else … … 152 152 Void decodeSPS ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); } 153 153 #endif 154 #if DLT_DIFF_CODING_IN_PPS154 #if H_3D 155 155 Void decodePPS ( TComPPS* pcPPS, TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS, pcVPS); } 156 156 #else -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r758 r773 89 89 #if H_3D_DIM_DMM 90 90 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #if !SEC_DMM3_RBC_F014792 , m_cDmm3DataSCModel ( 1, 1, NUM_DMM3_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)93 #endif94 #endif95 #if H_3D_DIM_RBC96 , m_cRbcDataSCModel ( 1, 1, NUM_RBC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)97 91 #endif 98 92 #if H_3D_DIM_SDC … … 178 172 #if H_3D_DIM_DMM 179 173 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); 180 #if !SEC_DMM3_RBC_F0147181 m_cDmm3DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM3_DATA );182 #endif183 #endif184 #if H_3D_DIM_RBC185 m_cRbcDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_RBC_DATA );186 174 #endif 187 175 #if H_3D_DIM_SDC … … 253 241 #if H_3D_DIM_DMM 254 242 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 255 #if !SEC_DMM3_RBC_F0147256 m_cDmm3DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );257 #endif258 #endif259 #if H_3D_DIM_RBC260 m_cRbcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_RBC_DATA );261 243 #endif 262 244 #if H_3D_DIM_SDC … … 414 396 } 415 397 416 #if QC_DIM_DELTADC_UNIFY_F0132417 398 Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt uiNumSeg ) 418 399 { … … 431 412 } 432 413 } 433 #else 434 Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt dimType ) 435 { 436 UInt absValDeltaDC = 0; 437 xReadExGolombLevel( absValDeltaDC, m_cDdcDataSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) ); 438 rValDeltaDC = (Pel)absValDeltaDC; 439 440 if( rValDeltaDC != 0 ) 441 { 442 UInt uiSign; 443 m_pcTDecBinIf->decodeBinEP( uiSign ); 444 if ( uiSign ) 445 { 446 rValDeltaDC = -rValDeltaDC; 447 } 448 } 449 } 450 #endif 414 451 415 452 416 #if H_3D_DIM_DMM … … 461 425 ruiTabIdx = uiIdx; 462 426 } 463 #if !SEC_DMM3_RBC_F0147 464 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit ) 465 { 466 UInt uiSymbol, uiIdx = 0; 467 for( Int i = 0; i < iNumBit; i++ ) 468 { 469 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm3DataSCModel.get(0, 0, 0) ); 470 uiIdx += uiSymbol << i; 471 } 472 ruiIntraIdx = uiIdx; 473 } 474 #endif 475 #endif 476 #if H_3D_DIM_RBC 477 Void TDecSbac::xParseRbcEdge( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 478 { 479 UInt uiSymbol = 0; 480 481 // 1. Top(0) or Left(1) 482 UChar ucLeft; 483 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 484 ucLeft = uiSymbol; 485 486 // 2. Start position (lowest bit first) 487 UChar ucStart = 0; 488 for( UInt ui = 0; ui < 6 - uiDepth; ui++ ) 489 { 490 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 491 ucStart |= (uiSymbol << ui); 492 } 493 494 // 3. Number of edges 495 UChar ucMax = 0; 496 for( UInt ui = 0; ui < 7 - uiDepth; ui++ ) 497 { 498 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 499 ucMax |= (uiSymbol << ui); 500 } 501 ucMax++; // +1 502 503 // 4. Edges 504 UChar* pucSymbolList = (UChar*) xMalloc( UChar, 256 * RBC_MAX_EDGE_NUM_PER_4x4 ); 505 for( Int iPtr = 0; iPtr < ucMax; iPtr++ ) 506 { 507 UChar ucEdge = 0; 508 UInt uiReorderEdge = 0; 509 for( UInt ui = 0; ui < 6; ui++ ) 510 { 511 m_pcTDecBinIf->decodeBin( uiSymbol, m_cRbcDataSCModel.get( 0, 0, 0 ) ); 512 ucEdge <<= 1; 513 ucEdge |= uiSymbol; 514 if( uiSymbol == 0 ) 515 break; 516 } 517 518 switch( ucEdge ) 519 { 520 case 0 : // "0" 521 uiReorderEdge = 0; 522 break; 523 case 2 : // "10" 524 uiReorderEdge = 1; 525 break; 526 case 6 : // "110" 527 uiReorderEdge = 2; 528 break; 529 case 14 : // "1110" 530 uiReorderEdge = 3; 531 break; 532 case 30 : // "11110" 533 uiReorderEdge = 4; 534 break; 535 case 62 : // "111110" 536 uiReorderEdge = 5; 537 break; 538 case 63 : // "111111" 539 uiReorderEdge = 6; 540 break; 541 default : 542 printf("parseIntraEdgeChain: error (unknown code %d)\n",ucEdge); 543 assert(false); 544 break; 545 } 546 pucSymbolList[iPtr] = uiReorderEdge; 547 } 548 ///////////////////// 549 // Edge Reconstruction 550 Bool* pbRegion = pcCU->getEdgePartition( uiAbsPartIdx ); 551 pcCU->reconPartition( uiAbsPartIdx, uiDepth, ucLeft == 1, ucStart, ucMax, pucSymbolList, pbRegion ); 552 xFree( pucSymbolList ); 553 } 554 #endif 427 #endif 428 555 429 #if H_3D_DIM_SDC 556 430 Void TDecSbac::xParseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) … … 568 442 569 443 #if H_3D_DIM_DLT 570 #if DLT_DIFF_CODING_IN_PPS571 444 UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() ); 572 #else573 UInt uiMaxResidualBits = pcCU->getSlice()->getVPS()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );574 #endif575 445 #else 576 446 UInt uiMaxResidualBits = g_bitDepthY; … … 596 466 UInt uiCount = 0; 597 467 #if H_3D_DIM_DLT 598 #if DLT_DIFF_CODING_IN_PPS599 468 UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 600 #else601 UInt uiNumDepthValues = pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );602 #endif603 469 #else 604 470 UInt uiNumDepthValues = ((1 << g_bitDepthY)-1); … … 1175 1041 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth ); 1176 1042 } break; 1177 #if !SEC_DMM3_RBC_F01471178 case( DMM3_IDX ):1179 {1180 UInt uiIntraIdx = 0;1181 xParseDmm3WedgeIdx( uiIntraIdx, g_dmm3IntraTabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] );1182 pcCU->setDmm3IntraTabIdxSubParts( uiIntraIdx, absPartIdx, depth );1183 } break;1184 #endif1185 1043 case( DMM4_IDX ): break; 1186 1044 #endif 1187 #if H_3D_DIM_RBC1188 case( RBC_IDX ):1189 {1190 xParseRbcEdge( pcCU, absPartIdx, depth );1191 } break;1192 #endif1193 1045 default: break; 1194 1046 } 1195 1047 1196 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1197 if( pcCU->getSDCFlag(absPartIdx) ) 1198 { 1199 assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N); 1200 pcCU->setTrIdxSubParts(0, absPartIdx, depth); 1201 pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth); 1202 1203 UInt uiNumSegments = ( dir == DC_IDX || dir == PLANAR_IDX )? 1 : 2; 1204 for (UInt uiSeg=0; uiSeg<uiNumSegments; uiSeg++) 1205 { 1206 xParseSDCResidualData(pcCU, absPartIdx, depth, uiSeg); 1207 } 1208 } 1209 else 1210 { 1211 #endif 1212 #if QC_DIM_DELTADC_UNIFY_F0132 1213 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1214 #else 1215 if( dimType < DIM_NUM_TYPE ) 1216 #endif 1217 { 1218 UInt symbol; 1219 #if QC_DIM_DELTADC_UNIFY_F0132 1220 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2; 1048 if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) ) 1049 { 1050 UInt symbol; 1051 UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2; 1052 1053 if( pcCU->getSDCFlag( absPartIdx ) ) 1054 { 1055 assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N); 1056 pcCU->setTrIdxSubParts(0, absPartIdx, depth); 1057 pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth); 1058 } 1059 1060 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) ); 1061 1062 if( symbol ) 1063 { 1064 if( !pcCU->getSDCFlag( absPartIdx ) ) 1065 { 1066 dir += symbol; 1067 } 1068 } 1069 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 1070 { 1071 Pel valDeltaDC = 0; 1072 if( symbol ) 1073 { 1074 xParseDimDeltaDC( valDeltaDC, uiNumSegments ); 1075 } 1221 1076 1222 1077 if( pcCU->getSDCFlag( absPartIdx ) ) 1223 1078 { 1224 assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N); 1225 pcCU->setTrIdxSubParts(0, absPartIdx, depth); 1226 pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth); 1227 } 1228 1229 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) ); 1230 1231 if( symbol ) 1232 { 1233 if( !pcCU->getSDCFlag( absPartIdx ) ) 1234 { 1235 dir += symbol; 1236 } 1237 } 1238 for( UInt segment = 0; segment < uiNumSegments; segment++ ) 1239 { 1240 Pel valDeltaDC = 0; 1241 if( symbol ) 1242 { 1243 xParseDimDeltaDC( valDeltaDC, uiNumSegments ); 1244 } 1245 1246 if( pcCU->getSDCFlag( absPartIdx ) ) 1247 { 1248 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx ); 1249 } 1250 else 1251 { 1252 pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC ); 1253 } 1254 } 1255 #else 1256 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) ); 1257 if( symbol ) 1258 { 1259 dir += symbol; 1260 for( UInt segment = 0; segment < 2; segment++ ) 1261 { 1262 Pel valDeltaDC = 0; 1263 xParseDimDeltaDC( valDeltaDC, dimType ); 1264 pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC ); 1265 } 1266 } 1267 #endif 1268 } 1269 #if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132 1270 } 1271 #endif 1079 pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx ); 1080 } 1081 else 1082 { 1083 pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC ); 1084 } 1085 } 1086 } 1272 1087 1273 1088 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); … … 1297 1112 else if( puIdx == 0 ) 1298 1113 { 1299 #if SEC_DMM3_RBC_F01471300 1114 while( binNum < 1 && symbol ) 1301 #else1302 while( binNum < 3 && symbol )1303 #endif1304 1115 { 1305 1116 ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum); … … 1308 1119 binNum++; 1309 1120 } 1310 #if SEC_DMM3_RBC_F0147 1311 if( modeCode == 0 ) { dir = 0; sdcFlag = 0;} 1312 else if( modeCode == 1 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1313 #else 1314 if( modeCode == 0 ) { dir = 0; sdcFlag = 0;} 1315 else if( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1316 else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1317 else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1318 #endif 1121 if( modeCode == 0 ) 1122 { 1123 dir = 0; 1124 sdcFlag = 0; 1125 } 1126 else if ( modeCode == 1 ) 1127 { 1128 dir = (2*DMM1_IDX+DIM_OFFSET); 1129 sdcFlag = 0; 1130 } 1319 1131 } 1320 1132 else 1321 1133 { 1322 #if SEC_DMM3_RBC_F01471323 1134 while( binNum < 4 && symbol ) 1324 1135 { … … 1333 1144 else if ( modeCode == 14 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1334 1145 else if ( modeCode == 15 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1335 #else 1336 UInt maxBinNum = 0; 1337 m_pcTDecBinIf->decodeBinEP(symbol); 1338 if( symbol == 1 ) 1339 { 1340 maxBinNum = 3; 1341 } 1342 else 1343 { 1344 maxBinNum = 2; 1345 symbol = 1; 1346 } 1347 while( binNum<maxBinNum && symbol ) 1348 { 1349 ctxDepthMode = puIdx*3 + ( binNum >= 2 ? 2 : binNum ); 1350 m_pcTDecBinIf->decodeBin(symbol,m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode)); 1351 modeCode = (modeCode<<1)+symbol; 1352 binNum++; 1353 } 1354 if( maxBinNum == 3 ) 1355 { 1356 if ( modeCode == 0 ) { dir = PLANAR_IDX; sdcFlag = 1;} 1357 else if ( modeCode == 2 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1358 else if ( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1359 else if ( modeCode == 7 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;} 1360 } 1361 else 1362 { 1363 if ( modeCode == 0 ) { dir = 5; sdcFlag = 0;} 1364 else if ( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;} 1365 else if ( modeCode == 3 ) { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;} 1366 } 1367 #endif 1146 1368 1147 } 1369 1148 pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth ); -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r758 r773 81 81 Void parseSPS ( TComSPS* /*pcSPS*/ ) {} 82 82 #endif 83 #if DLT_DIFF_CODING_IN_PPS83 #if H_3D 84 84 Void parsePPS ( TComPPS* /*pcPPS*/, TComVPS* /*pcVPS*/ ) {} 85 85 #else … … 103 103 #if H_3D_DIM 104 104 Void xReadExGolombLevel ( UInt& ruiSymbol, ContextModel& rcSCModel ); 105 #if QC_DIM_DELTADC_UNIFY_F0132106 105 Void xParseDimDeltaDC ( Pel& rValDeltaDC, UInt uiNumSeg ); 107 #else108 Void xParseDimDeltaDC ( Pel& rValDeltaDC, UInt dimType );109 #endif110 106 #if H_3D_DIM_DMM 111 107 Void xParseDmm1WedgeIdx ( UInt& ruiTabIdx, Int iNumBit ); 112 #if !SEC_DMM3_RBC_F0147113 Void xParseDmm3WedgeIdx ( UInt& ruiIntraIdx, Int iNumBit );114 #endif115 #endif116 #if H_3D_DIM_RBC117 Void xParseRbcEdge ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );118 108 #endif 119 109 #if H_3D_DIM_SDC … … 223 213 #if H_3D_DIM_DMM 224 214 ContextModel3DBuffer m_cDmm1DataSCModel; 225 #if !SEC_DMM3_RBC_F0147226 ContextModel3DBuffer m_cDmm3DataSCModel;227 #endif228 #endif229 #if H_3D_DIM_RBC230 ContextModel3DBuffer m_cRbcDataSCModel;231 215 #endif 232 216 #if H_3D_DIM_SDC -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r758 r773 228 228 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, uiViewIndex ); 229 229 m_aiViewId[ uiViewIndex ] = pcSlice->getViewId(); 230 #if CAM_HLS_F0136_F0045_F0082 230 231 231 if( uiViewIndex == 1 ) 232 232 { … … 239 239 AOF( m_bCamParsVaryOverTime == pcSlice->getVPS()->hasCamParInSliceHeader ( uiViewIndex ) ); 240 240 } 241 #else 242 if( uiViewIndex == 1 ) 243 { 244 m_uiCamParsCodedPrecision = pcSlice->getSPS()->getCamParPrecision (); 245 m_bCamParsVaryOverTime = pcSlice->getSPS()->hasCamParInSliceHeader (); 246 } 247 else if( uiViewIndex > 1 ) 248 { 249 AOF( m_uiCamParsCodedPrecision == pcSlice->getSPS()->getCamParPrecision () ); 250 AOF( m_bCamParsVaryOverTime == pcSlice->getSPS()->hasCamParInSliceHeader () ); 251 } 252 #endif 241 253 242 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ ) 254 243 { … … 264 253 else 265 254 { 266 #if CAM_HLS_F0136_F0045_F0082267 255 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedScale (uiViewIndex) [ uiBaseIndex ]; 268 256 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getVPS()->getCodedOffset (uiViewIndex) [ uiBaseIndex ]; 269 257 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedScale (uiViewIndex) [ uiBaseIndex ]; 270 258 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getVPS()->getInvCodedOffset(uiViewIndex) [ uiBaseIndex ]; 271 #else272 m_aaiCodedScale [ uiBaseIndex ][ uiViewIndex ] = pcSlice->getSPS()->getCodedScale () [ uiBaseIndex ];273 m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ] = pcSlice->getSPS()->getCodedOffset () [ uiBaseIndex ];274 m_aaiCodedScale [ uiViewIndex ][ uiBaseIndex ] = pcSlice->getSPS()->getInvCodedScale () [ uiBaseIndex ];275 m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ] = pcSlice->getSPS()->getInvCodedOffset() [ uiBaseIndex ];276 #endif277 259 xInitLUTs( uiBaseIndex, uiViewIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 278 260 xInitLUTs( uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); … … 302 284 } 303 285 304 #if QC_DEPTH_IV_MRG_F0125286 #if H_3D_IV_MERGE 305 287 Void 306 288 CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice ) 307 289 { 308 #if !CAM_HLS_F0136_F0045_F0082309 UInt uiViewIndex = pcSlice->getViewIndex();310 311 pcSlice->getSPS()->initCamParaSPS( uiViewIndex, m_uiCamParsCodedPrecision, m_bCamParsVaryOverTime, m_aaiCodedScale, m_aaiCodedOffset );312 #endif313 290 if( m_bCamParsVaryOverTime ) 314 291 { … … 656 633 #if H_MV 657 634 m_apcSlicePilot->setVPS(vps); 658 #if H_MV_6_PS_0092_17659 635 // 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 636 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) ); 661 637 // 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 638 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) ); 663 #endif664 639 sps->inferRepFormat ( vps , m_layerId ); 665 640 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); … … 692 667 693 668 #if H_MV 694 #if H_MV_FIX_SKIP_PICTURES695 669 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 670 { 700 671 assert( nalu.m_layerId == m_layerId ); … … 754 725 #endif 755 726 756 #if H_MV _LAYER_WISE_STARTUP727 #if H_MV 757 728 xCeckNoClrasOutput(); 758 729 #endif … … 762 733 m_prevSliceSkipped = true; 763 734 m_skippedPOC = m_apcSlicePilot->getPOC(); 764 #if H_MV _FIX_SKIP_PICTURES765 735 #if H_MV 736 sliceSkippedFlag = true; 766 737 #endif 767 738 return false; … … 772 743 m_prevSliceSkipped = true; 773 744 m_skippedPOC = m_apcSlicePilot->getPOC(); 774 #if H_MV _FIX_SKIP_PICTURES775 745 #if H_MV 746 sliceSkippedFlag = true; 776 747 #endif 777 748 return false; … … 1007 978 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 1008 979 #if H_3D_ARP 1009 #if SHARP_ARP_REF_CHECK_F01051010 980 pcSlice->setARPStepNum(m_ivPicLists); 1011 #else1012 pcSlice->setARPStepNum();1013 #endif1014 981 if( pcSlice->getARPStepNum() > 1 ) 1015 982 { … … 1113 1080 } 1114 1081 1115 #if QC_DEPTH_IV_MRG_F01251082 #if H_3D_IV_MERGE 1116 1083 if( pcSlice->getIsDepth() && m_pcCamParsCollector ) 1117 1084 { … … 1127 1094 m_pcCamParsCollector->setSlice( pcSlice ); 1128 1095 } 1129 #if QC_DEPTH_IV_MRG_F01251130 if( pcSlice->getIsDepth() )1131 {1132 #if !CAM_HLS_F0136_F0045_F00821133 pcSlice->getSPS()->setHasCamParInSliceHeader( false );1134 #endif1135 }1136 #endif1137 1096 #endif 1138 1097 m_bFirstSliceInPicture = false; … … 1174 1133 pps->setLayerId( getLayerId() ); 1175 1134 #endif 1176 #if DLT_DIFF_CODING_IN_PPS1135 #if H_3D 1177 1136 // Assuming that all PPS indirectly refer to the same VPS via different SPS 1178 1137 // There is no parsing dependency in decoding DLT in PPS. … … 1181 1140 // Step 1) decoding DLT tables based on the number of depth layers, and 1182 1141 // Step 2) mapping DLT tables to the depth layers 1183 // as descri pted in the 3D-HEVC WD.1142 // as described in the 3D-HEVC WD. 1184 1143 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1185 1144 m_cEntropyDecoder.decodePPS( pps, vps ); … … 1226 1185 1227 1186 #if H_MV 1228 #if H_MV_FIX_SKIP_PICTURES1229 1187 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag, Bool& sliceSkippedFlag ) 1230 #else1231 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay, Bool newLayerFlag)1232 #endif1233 1188 #else 1234 1189 Bool TDecTop::decode(InputNALUnit& nalu, Int& iSkipFrame, Int& iPOCLastDisplay) … … 1275 1230 case NAL_UNIT_CODED_SLICE_RASL_R: 1276 1231 #if H_MV 1277 #if H_MV_FIX_SKIP_PICTURES1278 1232 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag ); 1279 #else1280 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag);1281 #endif1282 1233 #else 1283 1234 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay); … … 1328 1279 return true; 1329 1280 } 1330 #if H_MV _LAYER_WISE_STARTUP1281 #if H_MV 1331 1282 else if ( !m_layerInitilizedFlag[ m_layerId ] ) // start of random access point, m_pocRandomAccess has not been set yet. 1332 1283 #else … … 1340 1291 { 1341 1292 1342 #if H_MV _LAYER_WISE_STARTUP1293 #if H_MV 1343 1294 if ( xAllRefLayersInitilized() ) 1344 1295 { … … 1357 1308 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 1358 1309 { 1359 #if H_MV _LAYER_WISE_STARTUP1310 #if H_MV 1360 1311 if ( xAllRefLayersInitilized() ) 1361 1312 { 1362 1313 m_layerInitilizedFlag[ m_layerId ] = true; 1314 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable. 1315 } 1316 else 1317 { 1318 return true; 1319 } 1320 #else 1363 1321 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable. 1322 #endif 1364 1323 } 1365 1324 else 1366 1325 { 1367 return true; 1368 } 1369 #else 1370 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable. 1371 #endif 1372 } 1373 else 1374 { 1375 #if H_MV_FIX_SKIP_PICTURES 1326 #if H_MV 1376 1327 static Bool warningMessage[MAX_NUM_LAYERS]; 1377 1328 static Bool warningInitFlag = false; … … 1408 1359 return true; 1409 1360 } 1410 #if H_MV _LAYER_WISE_STARTUP1361 #if H_MV 1411 1362 return !m_layerInitilizedFlag[ getLayerId() ]; 1412 1363 #else … … 1455 1406 } 1456 1407 1457 #if H_MV _LAYER_WISE_STARTUP1408 #if H_MV 1458 1409 Void TDecTop::xCeckNoClrasOutput() 1459 1410 { -
trunk/source/Lib/TLibDecoder/TDecTop.h
r738 r773 78 78 Int**** getBaseViewShiftLUTI() { return m_aiBaseViewShiftLUT; } 79 79 80 #if QC_DEPTH_IV_MRG_F012580 #if H_3D_IV_MERGE 81 81 Void copyCamParamForSlice( TComSlice* pcSlice ); 82 82 #endif … … 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.