Changeset 1084 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 24 Oct 2014, 11:44:58 (10 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1066 r1084 53 53 } 54 54 // To avoid mismatches 55 #if H_MV_HLS10_GEN_FIX56 55 fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() ); 57 56 #else 58 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );59 #endif60 #else61 57 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); 62 58 #endif … … 70 66 return; 71 67 } 72 #if H_MV_HLS10_GEN_FIX73 68 fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() ); 74 #else75 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );76 #endif77 69 #else 78 70 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); … … 300 292 if( pcPPS->getTilesEnabledFlag() ) 301 293 { 302 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); pcPPS->setNum ColumnsMinus1( uiCode );303 READ_UVLC ( uiCode, "num_tile_rows_minus1" ); pcPPS->setNum RowsMinus1( uiCode );304 READ_FLAG ( uiCode, "uniform_spacing_flag" ); pcPPS->set UniformSpacingFlag( uiCode);305 306 if( !pcPPS->get UniformSpacingFlag())307 { 308 UInt* columnWidth = (UInt*)malloc(pcPPS->getNumColumnsMinus1()*sizeof(UInt));309 for(UInt i=0; i<pcPPS->getNum ColumnsMinus1(); i++)294 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); pcPPS->setNumTileColumnsMinus1( uiCode ); 295 READ_UVLC ( uiCode, "num_tile_rows_minus1" ); pcPPS->setNumTileRowsMinus1( uiCode ); 296 READ_FLAG ( uiCode, "uniform_spacing_flag" ); pcPPS->setTileUniformSpacingFlag( uiCode == 1 ); 297 298 if( !pcPPS->getTileUniformSpacingFlag()) 299 { 300 std::vector<Int> columnWidth(pcPPS->getNumTileColumnsMinus1()); 301 for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++) 310 302 { 311 303 READ_UVLC( uiCode, "column_width_minus1" ); 312 304 columnWidth[i] = uiCode+1; 313 305 } 314 pcPPS->setColumnWidth(columnWidth); 315 free(columnWidth); 316 317 UInt* rowHeight = (UInt*)malloc(pcPPS->getNumRowsMinus1()*sizeof(UInt)); 318 for(UInt i=0; i<pcPPS->getNumRowsMinus1(); i++) 306 pcPPS->setTileColumnWidth(columnWidth); 307 308 std::vector<Int> rowHeight (pcPPS->getTileNumRowsMinus1()); 309 for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++) 319 310 { 320 311 READ_UVLC( uiCode, "row_height_minus1" ); 321 312 rowHeight[i] = uiCode + 1; 322 313 } 323 pcPPS->setRowHeight(rowHeight); 324 free(rowHeight); 325 } 326 327 if(pcPPS->getNumColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0) 314 pcPPS->setTileRowHeight(rowHeight); 315 } 316 317 if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0) 328 318 { 329 319 READ_FLAG ( uiCode, "loop_filter_across_tiles_enabled_flag" ); pcPPS->setLoopFilterAcrossTilesEnabledFlag( uiCode ? true : false ); … … 342 332 } 343 333 } 344 #if !H_MV_HLS10_PPS345 #if H_MV346 if ( pcPPS->getLayerId() > 0 )347 {348 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );349 }350 351 if( pcPPS->getPpsInferScalingListFlag( ) )352 {353 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );354 }355 else356 {357 #endif358 #endif359 334 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 360 335 if(pcPPS->getScalingListPresentFlag ()) … … 362 337 parseScalingList( pcPPS->getScalingList() ); 363 338 } 364 #if !H_MV_HLS10_PPS365 #if H_MV366 }367 #endif368 #endif369 339 READ_FLAG( uiCode, "lists_modification_present_flag"); 370 340 pcPPS->setListsModificationPresentFlag(uiCode); … … 400 370 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 401 371 { 402 #if H_MV_HLS10_PPS403 372 parsePPSMultilayerExtension( pcPPS ); 404 #else405 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );406 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );407 #endif408 373 } 409 374 #if !H_3D … … 505 470 READ_CODE(8, uiNumDepthValues, "num_depth_values_in_dlt[i]"); // num_entry 506 471 507 #if !H_3D_DELTA_DLT508 if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false ) // Single-view DLT Diff Coding509 #endif510 472 { 511 473 // The condition if( pcVPS->getNumDepthValues(i) > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component. … … 555 517 } 556 518 557 #if H_3D_DELTA_DLT558 519 if( pcDLT->getInterViewDltPredEnableFlag( i ) ) 559 520 { … … 571 532 pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues); 572 533 } 573 #else 574 // store final DLT 575 pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues); 576 #endif 534 577 535 } 578 536 } … … 782 740 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 783 741 assert(uiCode <= 6); 784 #if H_MV_HLS10_MULTILAYERSPS785 742 #if H_MV 786 743 } … … 793 750 { 794 751 #endif 795 #endif796 752 797 753 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); … … 803 759 804 760 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 805 #if H_MV _HLS10_PTL_INFER_FIX761 #if H_MV 806 762 pcSPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 807 763 pcSPS->getPTL()->inferSubLayerValues( pcSPS->getMaxTLayers() - 1, 0, NULL ); 808 #endif809 #if H_MV810 764 } 811 765 #endif … … 813 767 assert(uiCode <= 15); 814 768 #if H_MV 815 #if H_MV_HLS10_MULTILAYERSPS816 769 if ( pcSPS->getMultiLayerExtSpsFlag() ) 817 #else818 if ( pcSPS->getLayerId() > 0 )819 #endif820 770 { 821 771 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); … … 839 789 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 840 790 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 841 #if !H_MV_HLS10_MULTILAYERSPS842 #if H_MV843 }844 #endif845 #endif846 791 READ_FLAG( uiCode, "conformance_window_flag"); 847 792 if (uiCode != 0) … … 855 800 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 856 801 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 857 #if H_MV_HLS10_MULTILAYERSPS 858 } 859 #endif 802 } 860 803 #else 861 804 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); … … 867 810 868 811 #if H_MV 869 #if H_MV_HLS10_MULTILAYERSPS870 812 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 871 #else // H_MV_HLS10_GEN872 if ( pcSPS->getLayerId() == 0 )873 #endif // H_MV_HLS10_GEN874 813 { 875 814 #endif … … 891 830 892 831 #if H_MV 893 #if H_MV_HLS10_MULTILAYERSPS894 832 if ( !pcSPS->getMultiLayerExtSpsFlag()) 895 #else896 if ( pcSPS->getLayerId() == 0 )897 #endif898 833 { 899 834 #endif … … 954 889 { 955 890 #if H_MV 956 #if H_MV_HLS10_MULTILAYERSPS957 891 if ( pcSPS->getMultiLayerExtSpsFlag() ) 958 #else959 if ( pcSPS->getLayerId() > 0 )960 #endif961 892 { 962 893 READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setSpsInferScalingListFlag( uiCode == 1 ); … … 1086 1017 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false); 1087 1018 1088 #if !H_MV_HLS10_PPS1089 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode );1090 1091 for( Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets( ); i++)1092 {1093 READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcSPS->setScaledRefLayerId( i, uiCode );1094 1095 Int j = pcSPS->getScaledRefLayerId( i );1096 Int iCode;1097 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); pcSPS->setScaledRefLayerLeftOffset( j, iCode );1098 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); pcSPS->setScaledRefLayerTopOffset( j, iCode );1099 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );1100 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );1101 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );1102 }1103 #endif1104 1019 } 1105 1020 … … 1107 1022 Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 1108 1023 { 1109 #if !MTK_I0099_VPS_EX2 1110 UInt uiCode; 1111 #if H_3D_QTLPC 1112 //GT: This has to go to VPS 1113 if( depthFlag ) 1114 { 1115 READ_FLAG( uiCode, "use_qtl_flag" ); 1116 pcSPS->setUseQTL( uiCode ); 1117 READ_FLAG( uiCode, "use_pc_flag" ); 1118 pcSPS->setUsePC( uiCode ); 1119 } 1120 #endif 1121 #endif 1122 } 1123 #endif 1124 1125 #if H_MV_HLS10_PPS 1024 1025 } 1026 #endif 1027 1126 1028 Void TDecCavlc::parsePPSMultilayerExtension(TComPPS* pcPPS) 1127 1029 { … … 1134 1036 1135 1037 #endif 1136 #endif1137 1038 1138 1039 Void TDecCavlc::parseVPS(TComVPS* pcVPS) … … 1143 1044 #if H_MV 1144 1045 READ_FLAG( uiCode, "vps_base_layer_internal_flag" ); pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 ); 1145 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL1146 1046 READ_FLAG( uiCode, "vps_base_layer_available_flag" ); pcVPS->setVpsBaseLayerAvailableFlag( uiCode == 1 ); 1147 #else1148 READ_FLAG( uiCode, "vps_reserved_one_bit" ); assert( uiCode == 1 );1149 #endif1150 1047 #else 1151 1048 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); … … 1162 1059 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1163 1060 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); 1164 #if H_MV_HLS10_PTL_INFER_FIX1165 1061 #if H_MV 1166 1062 pcVPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 1167 1063 pcVPS->getPTL()->inferSubLayerValues( pcVPS->getMaxTLayers() - 1, 0, NULL ); 1168 #endif1169 1064 #endif 1170 1065 UInt subLayerOrderingInfoPresentFlag; … … 1193 1088 READ_CODE( 6, uiCode, "vps_max_layer_id" ); pcVPS->setVpsMaxLayerId( uiCode ); 1194 1089 1195 #if H_MV_HLS10_GEN_FIX1196 1090 READ_UVLC( uiCode, "vps_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode ); 1197 #else1198 READ_UVLC( uiCode, "vps_max_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode );1199 #endif1200 1091 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 1201 1092 { … … 1241 1132 READ_FLAG( uiCode, "cprms_present_flag[i]" ); pcVPS->setCprmsPresentFlag( uiCode == 1 ? true : false, i ); 1242 1133 } 1134 else 1135 { 1136 pcVPS->setCprmsPresentFlag( true, i ); 1137 } 1138 1243 1139 parseHrdParameters(pcVPS->getHrdParameters(i), pcVPS->getCprmsPresentFlag( i ), pcVPS->getMaxTLayers() - 1); 1244 1140 } … … 1286 1182 UInt uiCode; 1287 1183 1288 #if H_MV_HLS10_PTL1289 1184 if( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) 1290 1185 { 1291 1186 parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1292 1187 1293 #if !H_MV_HLS10_PTL_INFER_FIX1294 // Copy Profile info1295 TComPTL temp = *pcVPS->getPTL( 1 );1296 *pcVPS->getPTL( 1 ) = *pcVPS->getPTL( 0 );1297 pcVPS->getPTL( 1 )->copyLevelFrom( &temp );1298 #else1299 1188 pcVPS->getPTL( 1 )->inferGeneralValues ( false, 1, pcVPS->getPTL( 0 ) ); 1300 1189 pcVPS->getPTL( 1 )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1(), 1, pcVPS->getPTL( 0 ) ); 1301 #endif 1302 } 1303 #endif 1190 } 1304 1191 1305 1192 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1375 1262 pcVPS->setRefLayers(); 1376 1263 1377 #if H_MV_HLS10_ADD_LAYERSETS1378 1264 if ( pcVPS->getNumIndependentLayers() > 1 ) 1379 1265 { … … 1388 1274 pcVPS->deriveAddLayerSetLayerIdList( i ); 1389 1275 } 1390 #endif1391 1276 1392 1277 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); … … 1425 1310 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1426 1311 1427 #if H_MV_HLS10_PTL1428 1312 Int offsetVal = ( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1; 1429 1313 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) … … 1431 1315 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1432 1316 parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1433 #if H_MV_HLS10_PTL_INFER_FIX1434 1317 pcVPS->getPTL( offsetVal )->inferGeneralValues ( pcVPS->getVpsProfilePresentFlag( i ), offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1435 1318 pcVPS->getPTL( offsetVal )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1() , offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1436 #else1437 if( !pcVPS->getVpsProfilePresentFlag( i ) )1438 {1439 TComPTL temp = *pcVPS->getPTL( offsetVal );1440 *pcVPS->getPTL( offsetVal ) = *pcVPS->getPTL( offsetVal - 1 );1441 pcVPS->getPTL( offsetVal )->copyLevelFrom( &temp );1442 }1443 #endif1444 1319 offsetVal++; 1445 1320 } 1446 #else 1447 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1448 { 1449 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1450 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1451 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1452 { 1453 TComPTL temp = *pcVPS->getPTL( i ); 1454 *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 ); 1455 pcVPS->getPTL( i )->copyLevelFrom( &temp ); 1456 } 1457 } 1458 #endif 1459 1460 #if !H_MV_HLS10_ADD_LAYERSETS 1461 if ( pcVPS->getNumIndependentLayers() > 1 ) 1462 { 1463 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1464 } 1465 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1466 { 1467 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1468 { 1469 READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode ); 1470 } 1471 } 1472 #endif 1321 1473 1322 1474 1323 if (pcVPS->getNumLayerSets() > 1) … … 1484 1333 pcVPS->setLayerSetIdxForOlsMinus1(0, -1); 1485 1334 1486 #if H_MV_HLS10_NESSECARY_LAYER1487 1335 pcVPS->deriveNecessaryLayerFlags( 0 ); 1488 #endif1489 1336 pcVPS->deriveTargetLayerIdList( 0 ); 1490 1337 1491 #if H_MV_HLS10_PTL_FIX1492 1338 if (pcVPS->getVpsBaseLayerInternalFlag() ) 1493 1339 { 1494 1340 pcVPS->setProfileTierLevelIdx(0,0, pcVPS->inferProfileTierLevelIdx(0,0) ); 1495 1341 } 1496 #endif1497 1342 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1498 1343 { 1499 1344 if( i >= pcVPS->getNumLayerSets( ) ) 1500 1345 { 1501 #if !VPS_MISC_UPDATES1502 READ_UVLC( uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode );1503 #else1504 1346 READ_CODE( pcVPS->getLayerSetIdxForOlsMinus1Len( i ), uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1505 #endif1506 1347 } 1507 1348 … … 1520 1361 } 1521 1362 } 1522 #if H_MV_HLS10_NESSECARY_LAYER1523 1363 pcVPS->deriveNecessaryLayerFlags( i ); 1524 #endif1525 1364 pcVPS->deriveTargetLayerIdList( i ); 1526 1365 1527 #if H_MV_HLS10_PTL1528 1366 for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ ) 1529 1367 { … … 1532 1370 READ_CODE( pcVPS->getProfileTierLevelIdxLen(), uiCode,"profile_tier_level_idx[ i ][ j ]" ); pcVPS->setProfileTierLevelIdx( i, j, uiCode ); 1533 1371 } 1534 #if H_MV_HLS10_PTL_FIX1535 1372 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 ) 1536 1373 { 1537 1374 pcVPS->setProfileTierLevelIdx( i , j, pcVPS->inferProfileTierLevelIdx( i, j) ); 1538 1375 } 1539 #endif 1540 } 1541 #else 1542 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1543 { 1544 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1545 } 1546 #endif 1376 } 1547 1377 1548 1378 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) … … 1594 1424 } 1595 1425 1596 #if !H_MV_HLS10_GEN_FIX1597 READ_FLAG( uiCode, "vps_reserved_zero_flag" );1598 #endif1599 1426 parseDpbSize( pcVPS ); 1600 1427 … … 1670 1497 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 1671 1498 } 1672 #if H_MV_HLS10_GEN_VSP_CONF_WIN1673 1499 READ_FLAG( uiCode, "conformance_window_vps_flag" ); pcRepFormat->setConformanceWindowVpsFlag( uiCode == 1 ); 1674 1500 if ( pcRepFormat->getConformanceWindowVpsFlag() ) … … 1679 1505 READ_UVLC( uiCode, "conf_win_vps_bottom_offset" ); pcRepFormat->setConfWinVpsBottomOffset( uiCode ); 1680 1506 } 1681 #endif1682 1507 } 1683 1508 … … 1705 1530 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1706 1531 { 1707 #if H_MV_HLS10_VPS_VUI1708 1532 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1709 #else1710 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ )1711 #endif1712 1533 { 1713 1534 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1742 1563 else 1743 1564 { 1744 #if H_MV_HLS10_VPS_VUI1745 1565 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 ); 1746 #else1747 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );1748 #endif1749 1566 } 1750 1567 … … 1757 1574 } 1758 1575 1759 #if I0045_VPS_VUI_VST_PARAMS1760 1576 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1761 1577 { … … 1779 1595 } 1780 1596 } 1781 #else 1782 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1783 { 1784 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1785 { 1786 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); 1787 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() ); 1788 } 1789 } 1790 else 1791 { 1792 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1793 { 1794 pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ); 1795 } 1796 } 1797 #endif 1597 1798 1598 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1799 1599 if( !pcVPSVUI->getTilesNotInUseFlag() ) … … 1811 1611 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) 1812 1612 { 1813 #if H_MV_HLS10_REF_PRED_LAYERS1814 1613 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdDirectRefLayer(pcVPS->getLayerIdInNuh( i ) , j )); 1815 #else1816 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j ));1817 #endif1818 1614 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1819 1615 { … … 1833 1629 } 1834 1630 } 1835 #if H_MV_HLS10_VPS_VUI1836 1631 READ_FLAG( uiCode, "single_layer_for_non_irap_flag" ); pcVPSVUI->setSingleLayerForNonIrapFlag( uiCode == 1 ); 1837 1632 READ_FLAG( uiCode, "higher_layer_irap_skip_flag" ); pcVPSVUI->setHigherLayerIrapSkipFlag( uiCode == 1 ); 1838 #else1839 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );1840 #endif1841 1633 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1842 1634 … … 1847 1639 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1848 1640 { 1849 #if H_MV_HLS10_REF_PRED_LAYERS1850 1641 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdDirectRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1851 #else1852 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )1853 #endif1854 1642 { 1855 1643 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); … … 1870 1658 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) 1871 1659 { 1872 #if VPS_MISC_UPDATES1873 1660 assert(pcVPS->getTimingInfo()->getTimingInfoPresentFlag() == 1); 1874 #endif1875 1661 parseVpsVuiBspHrdParameters( pcVPS ); 1876 1662 } … … 1893 1679 1894 1680 TComVpsVuiBspHrdParameters* vpsVuiBspHrdP = pcVPSVUI->getVpsVuiBspHrdParameters(); 1895 #if H_MV_HLS10_VPS_VUI_BSP1896 1681 assert( vpsVuiBspHrdP == NULL ); 1897 1682 vpsVuiBspHrdP = new TComVpsVuiBspHrdParameters; 1898 1683 pcVPSVUI->setVpsVuiBspHrdParameters( vpsVuiBspHrdP ); 1899 #else1900 assert ( vpsVuiBspHrdP );1901 #endif1902 1684 UInt uiCode; 1903 #if H_MV_HLS10_VPS_VUI_BSP1904 1685 READ_UVLC( uiCode, "vps_num_add_hrd_params" ); vpsVuiBspHrdP->setVpsNumAddHrdParams( uiCode ); 1905 1686 vpsVuiBspHrdP->createAfterVpsNumAddHrdParams( pcVPS ); … … 1990 1771 } 1991 1772 } 1992 #else1993 READ_UVLC( uiCode, "vps_num_bsp_hrd_parameters_minus1" ); vpsVuiBspHrdP->setVpsNumBspHrdParametersMinus1( uiCode );1994 for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )1995 {1996 if( i > 0 )1997 {1998 READ_FLAG( uiCode, "bsp_cprms_present_flag" ); vpsVuiBspHrdP->setBspCprmsPresentFlag( i, uiCode == 1 );1999 }2000 TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );2001 parseHrdParameters( hrdParameters, vpsVuiBspHrdP->getBspCprmsPresentFlag( i ), pcVPS->getMaxSubLayersMinus1() );2002 }2003 for( Int h = 1; h <= pcVPS->getVpsNumLayerSetsMinus1(); h++ )2004 {2005 READ_UVLC( uiCode, "num_bitstream_partitions" ); vpsVuiBspHrdP->setNumBitstreamPartitions( h, uiCode );2006 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ )2007 {2008 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ )2009 {2010 READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 );2011 }2012 }2013 vpsVuiBspHrdP->checkLayerInBspFlag( pcVPS, h );2014 2015 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) )2016 {2017 READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1" ); vpsVuiBspHrdP->setNumBspSchedCombinationsMinus1( h, uiCode );2018 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )2019 {2020 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )2021 {2022 READ_CODE( vpsVuiBspHrdP->getBspCombHrdIdxLen(), uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode );2023 READ_UVLC( uiCode, "bsp_comb_sched_idx" ); vpsVuiBspHrdP->setBspCombSchedIdx( h, i, j, uiCode );2024 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );2025 }2026 }2027 }2028 }2029 #endif2030 1773 } 2031 1774 … … 2060 1803 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 2061 1804 { 2062 #if H_MV_HLS10_DBP_SIZE2063 1805 if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) )) 2064 1806 { … … 2072 1814 } 2073 1815 } 2074 #else2075 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );2076 #endif2077 1816 } 2078 1817 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); … … 2085 1824 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 2086 1825 { 2087 #if H_MV_HLS10_DBP_SIZE2088 1826 if ( vps->getNecessaryLayerFlag(i, k ) ) 2089 1827 { 2090 #endif2091 1828 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 2092 #if H_MV_HLS10_DBP_SIZE2093 1829 } 2094 #endif2095 1830 } 2096 1831 dpbSize->setMaxVpsNumReorderPics ( i, j, dpbSize->getMaxVpsNumReorderPics ( i, j - 1 ) ); … … 2106 1841 { 2107 1842 UInt uiCode; 2108 #if SEC_VPS_CLEANUP_I00902109 1843 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 2110 #else2111 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )2112 #endif2113 1844 { 2114 1845 #if H_3D_ARP … … 2119 1850 pcVPS->setSubPULog2Size(i, 0); 2120 1851 #endif 2121 #if !SEC_VPS_CLEANUP_I0090 2122 if ( i != 0 ) 2123 #endif 2124 { 2125 #if MTK_I0099_VPS_EX2 1852 { 1853 #if H_3D_IV_MERGE 2126 1854 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 2127 #if SEC_HLS_CLEANUP_I01002128 1855 READ_FLAG( uiCode, "iv_mv_scaling_flag[i]"); pcVPS->setIvMvScalingFlag ( i, uiCode == 1 ? true : false ); 2129 1856 #endif 2130 #endif2131 1857 if( !( pcVPS->getDepthId( i ) == 1 ) ) 2132 1858 { 2133 1859 #if H_3D_IV_MERGE 2134 #if !MTK_I0099_VPS_EX22135 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false );2136 #endif2137 1860 if( !pcVPS->getNumDirectRefLayers(i) ) 2138 1861 { … … 2166 1889 else 2167 1890 { 2168 #if !MTK_I0099_VPS_EX22169 #if H_3D_IV_MERGE2170 if(i!=1)2171 {2172 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false );2173 if( !pcVPS->getNumDirectRefLayers(i) )2174 {2175 assert( !uiCode );2176 }2177 }2178 #endif2179 #if H_3D_SPIVMP2180 if (i!=1)2181 {2182 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3);2183 }2184 #endif2185 #endif2186 1891 #if H_3D_IV_MERGE 2187 1892 READ_FLAG( uiCode, "mpi_flag[i]" ); pcVPS->setMPIFlag( i, uiCode == 1 ? true : false ); 2188 #endif2189 #if MTK_I0099_VPS_EX22190 1893 READ_UVLC (uiCode, "log2_mpi_sub_PU_size_minus3[i]"); pcVPS->setSubPUMPILog2Size(i, uiCode+3); 2191 1894 #endif 2192 1895 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false ); 2193 #if SEPARATE_FLAG_I00851896 #if H_3D 2194 1897 READ_FLAG( uiCode, "ivp_flag[i]" ); pcVPS->setIVPFlag( i, uiCode == 1 ? true : false ); 2195 1898 #endif 2196 #if MTK_I0099_VPS_EX21899 #if H_3D_QTLPC 2197 1900 READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPredFlag ( i, uiCode == 1 ? true : false ); 2198 1901 #endif … … 2209 1912 2210 1913 READ_UVLC( uiCamParPrecision, "cp_precision" ); 2211 #if SEC_VPS_CLEANUP_I00902212 1914 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++) 2213 #else2214 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)2215 #endif2216 1915 { 2217 1916 pcVPS->setCamParPresent ( viewIndex, false ); … … 2235 1934 } 2236 1935 } 2237 #if !MTK_I0099_VPS_EX22238 READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3"); pcVPS->setSubPUMPILog2Size( uiCode + 3 );2239 #endif2240 #if !SEC_HLS_CLEANUP_I01002241 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );2242 #endif2243 1936 } 2244 1937 #endif … … 2288 1981 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2289 1982 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2290 #if !H_MV_HLS10_ADD_LAYERSETS2291 vps->inferDbpSizeLayerSetZero( sps, false );2292 #endif2293 1983 2294 1984 if ( sps->getVuiParametersPresentFlag() ) … … 2358 2048 esb++; 2359 2049 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 2360 #if NON_REF_NAL_TYPE_DISCARDABLE2361 2050 if ( uiCode == 1 ) 2362 2051 { … … 2367 2056 rpcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R); 2368 2057 } 2369 #endif2370 2058 } 2371 2059 … … 2515 2203 rps->checkMaxNumPics( 2516 2204 vps->getVpsExtensionFlag(), 2517 #if H_MV_HLS10_MAXNUMPICS2518 2205 MAX_INT, // To be replaced by MaxDbpSize 2519 #else2520 vps->getMaxNumPics( rpcSlice->getLayerId() ),2521 #endif2522 2206 rpcSlice->getLayerId(), 2523 2207 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 2632 2316 rps->checkMaxNumPics( 2633 2317 vps->getVpsExtensionFlag(), 2634 #if H_MV_HLS10_MAXNUMPICS2635 2318 MAX_INT, // To be replaced by MaxDbpsize 2636 #else2637 vps->getMaxNumPics( rpcSlice->getLayerId() ),2638 #endif2639 2319 rpcSlice->getLayerId(), 2640 2320 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 2655 2335 if (rpcSlice->getSPS()->getTMVPFlagsPresent()) 2656 2336 { 2657 #if I0044_SLICE_TMVP2337 #if H_MV 2658 2338 READ_FLAG( uiCode, "slice_temporal_mvp_enabled_flag" ); 2659 2339 #else … … 2865 2545 } 2866 2546 #if H_3D_IC 2867 #if SEC_HLS_CLEANUP_I01002868 2547 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 ) 2869 #else2870 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth())2871 #endif2872 2548 { 2873 2549 UInt uiCodeTmp = 0; … … 2883 2559 } 2884 2560 #endif 2885 #if MTK_SINGLE_DEPTH_MODE_I00952561 #if H_3D_SINGLE_DEPTH 2886 2562 if(rpcSlice->getIsDepth()) 2887 2563 { … … 3009 2685 3010 2686 #if H_3D 3011 #if LGE_FCO_I01162687 #if H_3D_FCO 3012 2688 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && rpcSlice->getIsDepth() ) 3013 2689 #else … … 3090 2766 } 3091 2767 assert( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) == rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2768 } 3092 2769 #else 3093 2770 READ_UVLC( uiCode, "slice_header_extension_length" ); … … 3097 2774 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 3098 2775 } 3099 #endif 3100 } 3101 #if INFERENCE_POC_MSB_VAL_PRESENT 3102 else 3103 { 3104 rpcSlice->setSliceSegmentHeaderExtensionLength( 0 ); 3105 rpcSlice->setPocMsbValPresentFlag( false ); 3106 } 3107 #endif 3108 3109 2776 } 2777 #endif 3110 2778 m_pcBitstream->readByteAlignment(); 3111 2779 … … 3198 2866 READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode); 3199 2867 #if H_MV 3200 #if !H_MV_HLS10_PTL_INFER_FIX3201 rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );3202 #else3203 2868 // When profilePresentFlag is equal to 0, sub_layer_profile_present_flag[ i ] shall be equal to 0. 3204 2869 assert( profilePresentFlag || !rpcPTL->getSubLayerProfilePresentFlag(i) ); 3205 #endif3206 2870 #else 3207 2871 } … … 3221 2885 for(Int i = 0; i < maxNumSubLayersMinus1; i++) 3222 2886 { 3223 #if H_MV_HLS10_PTL_INFER_FIX3224 2887 #if H_MV 3225 2888 if( rpcPTL->getSubLayerProfilePresentFlag(i) ) 3226 2889 #else 3227 2890 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3228 #endif3229 #else3230 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )3231 2891 #endif 3232 2892 { … … 3262 2922 ptl->setFrameOnlyConstraintFlag(uiCode ? true : false); 3263 2923 3264 #if H_MV_HLS10_PTL 3265 #if H_MV_HLS10_PTL_INFER_FIX 2924 #if H_MV 3266 2925 if( ptl->getV2ConstraintsPresentFlag() ) 3267 #else3268 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) ||3269 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) ||3270 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) ||3271 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) )3272 #endif3273 2926 { 3274 2927 READ_FLAG( uiCode, "max_12bit_constraint_flag" ); ptl->setMax12bitConstraintFlag ( uiCode == 1 ); … … 3291 2944 READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]"); 3292 2945 } 3293 #if H_MV_HLS10_PTL_INFER_FIX3294 2946 if( ptl->getInbldPresentFlag() ) 3295 #else3296 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||3297 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) ||3298 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) ||3299 ptl->getProfileCompatibilityFlag( 5 ) )3300 #endif3301 2947 { 3302 2948 READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 ); … … 3331 2977 assert(0); 3332 2978 } 3333 #if MTK_SINGLE_DEPTH_MODE_I00952979 #if H_3D_SINGLE_DEPTH 3334 2980 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 3335 2981 { -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r1066 r1084 97 97 #endif 98 98 99 #if H_MV_HLS10_PPS100 99 #if H_MV 101 100 Void parsePPSMultilayerExtension( TComPPS* pcPPS ); 102 #endif103 101 #endif 104 102 … … 126 124 127 125 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 128 #if MTK_SINGLE_DEPTH_MODE_I0095126 #if H_3D_SINGLE_DEPTH 129 127 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 130 128 #endif -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r1066 r1084 420 420 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 421 421 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 422 #if !FIX_TICKET_79423 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];424 #endif425 422 #if H_3D_SPIVMP 426 423 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; … … 434 431 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 435 432 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 436 #if !FIX_TICKET_79437 , inheritedVSPDisInfo438 #endif439 433 #if H_3D_SPIVMP 440 434 , pcMvFieldSP, puhInterDirSP … … 456 450 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 457 451 #endif 458 #endif459 #if H_3D_VSP && !FIX_TICKET_79460 if(vspFlag[uiMergeIndex])461 {462 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiAbsPartIdx, 0, uiDepth);463 }464 452 #endif 465 453 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); … … 546 534 return; 547 535 } 548 #if MTK_SINGLE_DEPTH_MODE_I0095536 #if H_3D_SINGLE_DEPTH 549 537 m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth ); 550 538 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) … … 580 568 m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP ); 581 569 setdQPFlag( bCodeDQP ); 582 #if MTK_SINGLE_DEPTH_MODE_I0095570 #if H_3D_SINGLE_DEPTH 583 571 } 584 572 #endif … … 682 670 break; 683 671 case MODE_INTRA: 684 #if MTK_SINGLE_DEPTH_MODE_I0095672 #if H_3D_SINGLE_DEPTH 685 673 if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) ) 686 674 xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth ); … … 730 718 } 731 719 } 732 #if MTK_SINGLE_DEPTH_MODE_I0095720 #if H_3D_SINGLE_DEPTH 733 721 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 734 722 { … … 749 737 Pel DepthNeighbours[5]; 750 738 Int index =0; 751 for( Int i = 0; (i < 5) && (index< MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )739 for( Int i = 0; (i < 5) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ ) 752 740 { 753 741 if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i)) … … 859 847 // get collocated depth block 860 848 UInt uiDepthStride = 0; 861 #if LGE_FCO_I0116849 #if H_3D_FCO 862 850 Pel* pDepthPels = pcCU->getVirtualDepthBlock(pcCU->getZorderIdxInCU(), pcCU->getWidth(0), pcCU->getHeight(0), uiDepthStride); 863 851 #else … … 932 920 933 921 // reconstruct final prediction signal by combining both segments 934 #if SHARP_DBBP_SIMPLE_FLTER_I0109935 922 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0), 0, ePartSize); 936 #else 937 m_pcPrediction->combineSegmentsWithMask(apSegPredYuv, m_ppcYuvReco[uiDepth], pMask, pcCU->getWidth(0), pcCU->getHeight(0)); 938 #endif 939 923 940 924 // inter recon 941 925 xDecodeInterTexture( pcCU, 0, uiDepth ); … … 1311 1295 Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx); 1312 1296 1313 #if SHARP_DMM1_I01101314 1297 WedgeList* pacWedgeList = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 1315 #else1316 WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];1317 #endif1318 1298 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 1319 1299 1320 1300 uiNumSegments = 2; 1321 1301 1322 #if SHARP_DMM1_I01101323 1302 pbMask = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern(); 1324 1303 uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride(); 1325 #else1326 pbMask = pcWedgelet->getPattern();1327 uiMaskStride = pcWedgelet->getStride();1328 #endif1329 1304 } 1330 1305 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) -
trunk/source/Lib/TLibDecoder/TDecCu.h
r1039 r1084 123 123 Void setdQPFlag ( Bool b ) { m_bDecodeDQP = b; } 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 #if MTK_SINGLE_DEPTH_MODE_I0095125 #if H_3D_SINGLE_DEPTH 126 126 Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 127 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r1039 r1084 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 #if MTK_SINGLE_DEPTH_MODE_I009554 #if H_3D_SINGLE_DEPTH 55 55 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 56 56 { … … 152 152 153 153 #if H_3D_DBBP 154 155 #if SEC_DBBP_EXPLICIT_SIG_I0077156 #if SEC_DBBP_DISALLOW_8x8_I0078157 154 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 158 #else159 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )160 #endif161 #else162 #if SEC_DBBP_DISALLOW_8x8_I0078163 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )164 #else165 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )166 #endif167 #endif168 155 { 169 156 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth); 170 #if !SEC_DBBP_EXPLICIT_SIG_I0077171 if( pcCU->getDBBPFlag(uiAbsPartIdx) )172 {173 174 // get collocated depth block175 UInt uiDepthStride = 0;176 Pel* pDepthPels = NULL;177 pDepthPels = pcCU->getVirtualDepthBlock(uiAbsPartIdx, pcCU->getWidth(uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), uiDepthStride);178 179 AOF( pDepthPels != NULL );180 AOF( uiDepthStride != 0 );181 182 // derive true partitioning for this CU based on depth183 // (needs to be done in parsing process as motion vector predictors are also derived during parsing)184 PartSize eVirtualPartSize = m_pcPrediction->getPartitionSizeFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(uiAbsPartIdx));185 AOF( eVirtualPartSize != SIZE_NONE );186 187 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);188 189 // make sure that DBBP flag is set for both segments190 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;191 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);192 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth);193 }194 #endif195 157 } 196 158 #endif … … 311 273 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 312 274 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 313 #if !FIX_TICKET_79314 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];315 #endif316 275 #if H_3D_SPIVMP 317 276 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); … … 320 279 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 321 280 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 322 #if !FIX_TICKET_79323 , inheritedVSPDisInfo324 #endif325 281 #if H_3D_SPIVMP 326 282 , pcMvFieldSP, puhInterDirSP … … 334 290 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 335 291 336 #if !FIX_TICKET_79337 if(vspFlag[uiMergeIndex])338 {339 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);340 }341 #endif342 292 #else 343 293 #if H_3D … … 360 310 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 361 311 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 362 #if !FIX_TICKET_79363 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];364 #endif365 312 #if H_3D_SPIVMP 366 313 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); … … 369 316 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 370 317 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 371 #if !FIX_TICKET_79372 , inheritedVSPDisInfo373 #endif374 318 #if H_3D_SPIVMP 375 319 , pcMvFieldSP, puhInterDirSP … … 382 326 ,numValidMergeCand ); 383 327 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 384 #if !FIX_TICKET_79385 if(vspFlag[uiMergeIndex])386 {387 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);388 }389 #endif390 328 #else 391 329 #if H_3D … … 485 423 #endif 486 424 } 487 #if H_3D_VSP && !FIX_TICKET_75488 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))489 #else490 425 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) 491 #endif492 426 { 493 427 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx); -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r1039 r1084 89 89 public: 90 90 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 91 #if MTK_SINGLE_DEPTH_MODE_I009591 #if H_3D_SINGLE_DEPTH 92 92 virtual Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 93 93 #endif … … 132 132 virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0; 133 133 134 virtual ~TDecEntropyIf() {} ;134 virtual ~TDecEntropyIf() {} 135 135 }; 136 136 … … 179 179 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 180 180 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 181 #if MTK_SINGLE_DEPTH_MODE_I0095181 #if H_3D_SINGLE_DEPTH 182 182 Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 183 183 #endif -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r976 r1084 248 248 calcAndPrintHashStatus(*rpcPic->getPicYuvRec(), hash); 249 249 } 250 #if !H_MV 251 #if SETTING_PIC_OUTPUT_MARK 252 rpcPic->setOutputMark(rpcPic->getSlice(0)->getPicOutputFlag() ? true : false); 253 #else 254 rpcPic->setOutputMark(true); 255 #endif 256 rpcPic->setReconMark(true); 257 #endif 250 258 } 251 259 -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1066 r1084 52 52 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 53 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 54 #if MTK_SINGLE_DEPTH_MODE_I009554 #if H_3D_SINGLE_DEPTH 55 55 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 56 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 136 136 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 137 137 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 138 #if MTK_SINGLE_DEPTH_MODE_I0095138 #if H_3D_SINGLE_DEPTH 139 139 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 140 140 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); … … 207 207 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 208 208 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 209 #if MTK_SINGLE_DEPTH_MODE_I0095209 #if H_3D_SINGLE_DEPTH 210 210 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 211 211 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); … … 432 432 #endif 433 433 434 #if !FIX_TICKET_76 435 #if H_3D_DIM_SDC 436 Void TDecSbac::xParseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) 437 { 438 assert( pcCU->getSlice()->getIsDepth() ); 439 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 440 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 441 assert( uiSegment < 2 ); 442 443 UInt uiResidual = 0; 444 UInt uiBit = 0; 445 UInt uiAbsIdx = 0; 446 UInt uiSign = 0; 447 Int iIdx = 0; 448 449 #if H_3D_DIM_DLT 450 UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() ); 451 #else 452 UInt uiMaxResidualBits = g_bitDepthY; 453 #endif 454 assert( uiMaxResidualBits <= g_bitDepthY ); 455 456 m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) ); 457 458 #if H_MV_ENC_DEC_TRAC 459 DTRACE_CU("sdc_residual_flag[i]", uiResidual) 460 #endif 461 462 if (uiResidual) 463 { 464 // decode residual sign bit 465 m_pcTDecBinIf->decodeBinEP(uiSign); 466 #if H_MV_ENC_DEC_TRAC 467 DTRACE_CU("sdc_residual_sign_flag[i]", uiSign) 468 #endif 469 470 // decode residual magnitude 471 // prefix part 472 UInt uiCount = 0; 473 #if H_3D_DIM_DLT 474 UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ); 475 #else 476 UInt uiNumDepthValues = ((1 << g_bitDepthY)-1); 477 #endif 478 UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2); 479 for ( UInt ui = 0; ui < uiPrefixThreshold; ui++) 480 { 481 m_pcTDecBinIf->decodeBin( uiBit, m_cSDCResidualSCModel.get(0, 0, 0) ); 482 if ( uiBit == 0 ) 483 break; 484 else 485 uiCount++; 486 } 487 // suffix part 488 if ( uiCount == uiPrefixThreshold ) 489 { 490 for ( UInt ui = 0; ui < numBitsForValue(uiNumDepthValues - uiPrefixThreshold); ui++ ) 491 { 492 m_pcTDecBinIf->decodeBinEP( uiBit ); 493 uiAbsIdx |= uiBit << ui; 494 } 495 uiAbsIdx += uiCount; 496 } 497 else 498 { 499 uiAbsIdx = uiCount; 500 } 501 502 #if H_MV_ENC_DEC_TRAC 503 DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx) 504 #endif 505 506 uiAbsIdx += 1; 507 iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx; 508 } 509 510 pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx); 511 } 512 #endif 513 #endif 434 514 435 #endif 515 436 /** Parse I_PCM information. … … 649 570 #endif 650 571 } 651 #if MTK_SINGLE_DEPTH_MODE_I0095572 #if H_3D_SINGLE_DEPTH 652 573 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 653 574 { … … 671 592 672 593 UInt uiUnaryIdx = 0; 673 UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE;594 UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE; 674 595 if ( uiNumCand > 1 ) 675 596 { … … 781 702 Bool bParseSplitFlag = true; 782 703 783 #if MTK_I0099_VPS_EX2784 704 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 785 705 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 786 #else787 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS();788 #endif789 706 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 790 707 Bool bDepthMapDetect = (pcTexture != NULL); … … 793 710 Bool rapPic = (pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || pcCU->getSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA); 794 711 795 #if MTK_I0099_VPS_EX2 796 #if LGE_FCO_I0116 712 #if H_3D_FCO 797 713 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark()) 798 714 #else 799 715 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag) 800 #endif801 #else802 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())803 716 #endif 804 717 { … … 843 756 #if H_3D_QTLPC 844 757 Bool bParsePartSize = true; 845 #if MTK_I0099_VPS_EX2846 758 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 847 759 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 848 #else849 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS();850 #endif851 760 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 852 761 Bool bDepthMapDetect = (pcTexture != NULL); … … 857 766 Bool depthDependent = false; 858 767 UInt uiTexturePart = uiMode; 859 #if MTK_I0099_VPS_EX2 860 #if LGE_FCO_I0116768 769 #if H_3D_FCO 861 770 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag && pcTexture->getReconMark()) 862 771 #else 863 772 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFlag ) 864 #endif865 #else866 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL() && sps->getUsePC())867 773 #endif 868 774 { … … 1076 982 { 1077 983 #if H_3D_DIM 1078 #if SEPARATE_FLAG_I00851079 984 if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() ) 1080 #else1081 if( pcCU->getSlice()->getVpsDepthModesFlag() )1082 #endif1083 985 { 1084 986 parseIntraDepth( pcCU, absPartIdx+partOffset*j, depth ); … … 1222 1124 if( uiIsDimMode ) 1223 1125 { 1224 #if SEPARATE_FLAG_I00851225 1126 if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag() ) 1226 1127 { … … 1228 1129 if( !uiSymbol ) 1229 1130 { 1230 #if HS_DMM_SIGNALLING_I01201231 1131 pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth ); 1232 #else1233 pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );1234 #endif1235 1132 } 1236 1133 else 1237 1134 { 1238 #if HS_DMM_SIGNALLING_I01201239 1135 pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth ); 1240 #else1241 pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth );1242 #endif1243 1136 } 1244 1137 } 1245 1138 else if ( pcCU->getSlice()->getVpsDepthModesFlag() ) 1246 1139 { 1247 #if HS_DMM_SIGNALLING_I01201248 1140 pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth ); 1249 #else1250 pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth );1251 #endif1252 1141 } 1253 1142 else if( pcCU->getSlice()->getIVPFlag() ) 1254 1143 { 1255 #if HS_DMM_SIGNALLING_I01201256 1144 pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth ); 1257 #else 1258 pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth ); 1259 #endif 1260 } 1261 #else 1262 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) ); 1263 if( !uiSymbol ) 1264 { 1265 #if HS_DMM_SIGNALLING_I0120 1266 pcCU->setLumaIntraDirSubParts( DIM_OFFSET, absPartIdx, depth ); 1267 #else 1268 pcCU->setLumaIntraDirSubParts( ( 2 * DMM1_IDX + DIM_OFFSET ), absPartIdx, depth ); 1269 #endif 1270 } 1271 else 1272 { 1273 #if HS_DMM_SIGNALLING_I0120 1274 pcCU->setLumaIntraDirSubParts( ( 1+ DIM_OFFSET ), absPartIdx, depth ); 1275 #else 1276 pcCU->setLumaIntraDirSubParts( ( 2 * DMM4_IDX + DIM_OFFSET ), absPartIdx, depth ); 1277 #endif 1278 } 1279 #endif 1145 } 1280 1146 } 1281 1147 } … … 2190 2056 } 2191 2057 2192 #if HS_DMM_SIGNALLING_I01202193 2058 UInt symbol = 1; 2194 2059 UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1; 2195 #else 2196 UInt symbol = 0; 2197 UInt uiNumSegments = 0; 2198 #endif 2199 2200 #if HS_DMM_SIGNALLING_I0120 2060 2201 2061 if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx )) 2202 2062 { 2203 #else 2204 if( pcCU->isIntra( absPartIdx ) ) 2205 { 2206 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2207 uiNumSegments = isDimMode( dir ) ? 2 : 1; 2208 #endif 2063 2209 2064 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, 0 ) ); 2210 #if !HS_DMM_SIGNALLING_I01202211 if( pcCU->getSDCFlag( absPartIdx ) )2212 {2213 #endif2214 2065 assert( pcCU->getPartitionSize( absPartIdx ) == SIZE_2Nx2N ); 2215 2066 pcCU->setTrIdxSubParts( 0, absPartIdx, depth ); 2216 2067 pcCU->setCbfSubParts( 1, 1, 1, absPartIdx, depth ); 2217 2068 } 2218 #if !HS_DMM_SIGNALLING_I01202219 else2220 {2221 pcCU->setLumaIntraDirSubParts( dir + symbol, absPartIdx, depth );2222 }2223 }2224 else2225 {2226 uiNumSegments = 1;2227 symbol = 1;2228 }2229 #endif2230 2231 2069 2232 2070 for( UInt segment = 0; segment < uiNumSegments; segment++ ) … … 2289 2127 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDBBPFlagSCModel.get( 0, 0, 0 ) ); 2290 2128 2291 #if SEC_DBBP_EXPLICIT_SIG_I00772292 2129 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2293 2130 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); … … 2295 2132 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx, 0, uiDepth); 2296 2133 pcCU->setDBBPFlagSubParts(uiSymbol, uiAbsPartIdx+uiPUOffset, 1, uiDepth); 2297 #else2298 if( uiSymbol )2299 {2300 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);2301 UInt uiCurrPartNumQ = (pcCU->getPic()->getNumPartInCU() >> (2 * uiDepth)) >> 2;2302 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth);2303 }2304 #endif2305 2134 } 2306 2135 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r1039 r1084 129 129 130 130 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 131 #if MTK_SINGLE_DEPTH_MODE_I0095131 #if H_3D_SINGLE_DEPTH 132 132 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 133 133 #endif … … 182 182 ContextModel3DBuffer m_cCUSplitFlagSCModel; 183 183 ContextModel3DBuffer m_cCUSkipFlagSCModel; 184 #if MTK_SINGLE_DEPTH_MODE_I0095184 #if H_3D_SINGLE_DEPTH 185 185 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel; 186 186 ContextModel3DBuffer m_cSingleDepthValueSCModel; -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r1066 r1084 229 229 } 230 230 231 #if ! LGE_FCO_I0116231 #if !H_3D_FCO 232 232 if ( pcSlice->getIsDepth()) 233 233 { … … 669 669 #if H_MV 670 670 sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false ); 671 #if !H_MV_HLS10_ADD_LAYERSETS672 vps->inferDbpSizeLayerSetZero( sps, false );673 #endif674 671 // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0 675 672 if ( vps->getVpsNumRepFormatsMinus1() == 0 ) … … 679 676 } 680 677 sps->checkRpsMaxNumPics( vps, getLayerId() ); 681 #if H_MV_HLS10_MULTILAYERSPS682 678 683 679 if( sps->getLayerId() != 0 ) … … 686 682 } 687 683 688 #if H_MV_HLS10_MULTILAYERSPS689 684 // It is a requirement of bitstream conformance that, when the SPS is referred to by 690 685 // any current picture that belongs to an independent non-base layer, the value of … … 695 690 assert( sps->getMultiLayerExtSpsFlag() == 0 ); 696 691 } 697 #endif698 692 699 693 if( sps->getMultiLayerExtSpsFlag() ) … … 701 695 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 702 696 } 703 #else704 if( m_layerId > 0 )705 {706 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true );707 }708 #endif709 697 #endif 710 698 … … 730 718 #if H_MV 731 719 m_apcSlicePilot->setVPS(vps); 732 #if H_MV_HLS10_REF_PRED_LAYERS733 720 // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 734 721 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, pps->getLayerId() ) ); 735 722 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 736 723 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, sps->getLayerId() ) ); 737 #else738 // 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.739 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) );740 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.741 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) );742 #endif743 724 sps->inferRepFormat ( vps , m_layerId ); 744 725 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); … … 746 727 #endif 747 728 pps->setSPS(sps); 748 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNum ColumnsMinus1() + 1) : 1);729 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1); 749 730 pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) ); 750 731 … … 807 788 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 808 789 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_targetOptLayerSetIdx ); 790 #else 791 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 809 792 #endif 810 793 // set POC for dependent slices in skipped pictures … … 944 927 xResetPocInPicBuffer(); 945 928 } 946 #endif 947 948 #if I0044_SLICE_TMVP 949 if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 ) 929 930 if ( m_apcSlicePilot->getTLayer() == 0 && m_apcSlicePilot->getEnableTMVPFlag() == 0 ) 950 931 { 951 932 //update all pics in the DPB such that they cannot be used for TMPV ref … … 1043 1024 Bool bNextSlice = pcSlice->isNextSlice(); 1044 1025 1045 UInt uiCummulativeTileWidth; 1046 UInt uiCummulativeTileHeight; 1047 UInt i, j, p; 1048 1049 //set NumColumnsMins1 and NumRowsMinus1 1050 pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() ); 1051 pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() ); 1052 1053 //create the TComTileArray 1054 pcPic->getPicSym()->xCreateTComTileArray(); 1055 1056 if( pcSlice->getPPS()->getUniformSpacingFlag() ) 1057 { 1058 //set the width for each tile 1059 for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++) 1060 { 1061 for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++) 1062 { 1063 pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )-> 1064 setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1) 1065 - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) ); 1066 } 1067 } 1068 1069 //set the height for each tile 1070 for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++) 1071 { 1072 for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++) 1073 { 1074 pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )-> 1075 setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1) 1076 - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) ); 1077 } 1078 } 1079 } 1080 else 1081 { 1082 //set the width for each tile 1083 for(j=0; j < pcSlice->getPPS()->getNumRowsMinus1()+1; j++) 1084 { 1085 uiCummulativeTileWidth = 0; 1086 for(i=0; i < pcSlice->getPPS()->getNumColumnsMinus1(); i++) 1087 { 1088 pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcSlice->getPPS()->getColumnWidth(i) ); 1089 uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(i); 1090 } 1091 pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth ); 1092 } 1093 1094 //set the height for each tile 1095 for(j=0; j < pcSlice->getPPS()->getNumColumnsMinus1()+1; j++) 1096 { 1097 uiCummulativeTileHeight = 0; 1098 for(i=0; i < pcSlice->getPPS()->getNumRowsMinus1(); i++) 1099 { 1100 pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcSlice->getPPS()->getRowHeight(i) ); 1101 uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(i); 1102 } 1103 pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight ); 1104 } 1105 } 1106 1107 pcPic->getPicSym()->xInitTiles(); 1026 UInt i; 1027 pcPic->getPicSym()->initTiles(pcSlice->getPPS()); 1108 1028 1109 1029 //generate the Coding Order Map and Inverse Coding Order Map … … 1192 1112 #endif 1193 1113 #endif 1194 // For generalized B 1195 #if I0044_SLICE_TMVP 1114 #if H_MV 1196 1115 if( m_layerId > 0 && !pcSlice->isIntra() && pcSlice->getEnableTMVPFlag() ) 1197 1116 { … … 1272 1191 1273 1192 #if H_3D_IV_MERGE 1274 #if LGE_FCO_I01161193 #if H_3D_FCO 1275 1194 if( !pcSlice->getIsDepth() && m_pcCamParsCollector ) 1276 1195 #else … … 1727 1646 for (Int i = 0; i < vps->getNumDirectRefLayers( getLayerId() ); i++ ) 1728 1647 { 1729 #if H_MV_HLS10_REF_PRED_LAYERS1730 1648 Int refLayerId = vps->getIdDirectRefLayer( m_layerId, i ); 1731 #else1732 Int refLayerId = vps->getRefLayerId( m_layerId, i );1733 #endif1734 1649 allRefLayersInitilizedFlag = allRefLayersInitilizedFlag && m_layerInitilizedFlag[ refLayerId ]; 1735 1650 }
Note: See TracChangeset for help on using the changeset viewer.