Changeset 1084 in 3DVCSoftware for trunk/source/Lib/TLibEncoder
- Timestamp:
- 24 Oct 2014, 11:44:58 (10 years ago)
- Location:
- trunk/source/Lib/TLibEncoder
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r1066 r1084 49 49 { 50 50 #if H_MV_ENC_DEC_TRAC 51 #if H_MV_HLS10_GEN_FIX52 51 fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() ); 53 52 #else 54 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );55 #endif56 #else57 53 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); 58 54 #endif … … 62 58 { 63 59 #if H_MV_ENC_DEC_TRAC 64 #if H_MV_HLS10_GEN_FIX65 60 fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() ); 66 #else67 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );68 #endif69 61 #else 70 62 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); … … 218 210 if( pcPPS->getTilesEnabledFlag() ) 219 211 { 220 WRITE_UVLC( pcPPS->getNum ColumnsMinus1(), "num_tile_columns_minus1" );221 WRITE_UVLC( pcPPS->get NumRowsMinus1(), "num_tile_rows_minus1" );222 WRITE_FLAG( pcPPS->get UniformSpacingFlag(), "uniform_spacing_flag" );223 if( pcPPS->getUniformSpacingFlag() == 0)224 { 225 for(UInt i=0; i<pcPPS->getNum ColumnsMinus1(); i++)226 { 227 WRITE_UVLC( pcPPS->get ColumnWidth(i)-1, "column_width_minus1" );228 } 229 for(UInt i=0; i<pcPPS->get NumRowsMinus1(); i++)230 { 231 WRITE_UVLC( pcPPS->get RowHeight(i)-1, "row_height_minus1" );232 } 233 } 234 if(pcPPS->getNum ColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0)212 WRITE_UVLC( pcPPS->getNumTileColumnsMinus1(), "num_tile_columns_minus1" ); 213 WRITE_UVLC( pcPPS->getTileNumRowsMinus1(), "num_tile_rows_minus1" ); 214 WRITE_FLAG( pcPPS->getTileUniformSpacingFlag(), "uniform_spacing_flag" ); 215 if( !pcPPS->getTileUniformSpacingFlag() ) 216 { 217 for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++) 218 { 219 WRITE_UVLC( pcPPS->getTileColumnWidth(i)-1, "column_width_minus1" ); 220 } 221 for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++) 222 { 223 WRITE_UVLC( pcPPS->getTileRowHeight(i)-1, "row_height_minus1" ); 224 } 225 } 226 if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0) 235 227 { 236 228 WRITE_FLAG( pcPPS->getLoopFilterAcrossTilesEnabledFlag()?1 : 0, "loop_filter_across_tiles_enabled_flag"); … … 249 241 } 250 242 } 251 #if !H_MV_HLS10_PPS252 #if H_MV253 if ( pcPPS->getLayerId() > 0 )254 {255 WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" );256 }257 258 if( pcPPS->getPpsInferScalingListFlag( ) )259 {260 WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" );261 }262 else263 {264 #endif265 #endif266 243 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 267 244 if( pcPPS->getScalingListPresentFlag() ) … … 269 246 codeScalingList( m_pcSlice->getScalingList() ); 270 247 } 271 #if !H_MV_HLS10_PPS272 #if H_MV273 }274 #endif275 #endif276 248 #if PPS_FIX_DEPTH 277 249 if( pcPPS->getSPS()->getVPS()->getDepthId(pcPPS->getSPS()->getLayerId()) ) … … 313 285 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 314 286 { 315 #if H_MV_HLS10_PPS316 287 codePPSMultilayerExtension( pcPPS ); 317 #else318 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );319 WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" );320 #endif321 288 } 322 289 … … 385 352 } 386 353 387 #if H_3D_DELTA_DLT388 354 if( pcDLT->getInterViewDltPredEnableFlag( i ) ) 389 355 { … … 395 361 pcDLT->getDeltaDLT(i, piRefDLT, uiRefNum, aiIdx2DepthValue_coded, &uiNumDepthValues_coded); 396 362 } 397 #endif398 363 399 364 if ( NULL == (puiDltDiffValues = (UInt *)calloc(uiNumDepthValues_coded, sizeof(UInt))) ) 400 365 { 366 // This should be changed to an assertion. 401 367 exit(-1); 402 368 } … … 477 443 { 478 444 WRITE_CODE(uiNumDepthValues_coded, 8, "num_depth_values_in_dlt[i]"); // num_entry 479 480 #if !H_3D_DELTA_DLT481 if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false ) // Single-view DLT Diff Coding482 #endif483 445 { 484 446 // The condition if( uiNumDepthValues_coded > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component. … … 566 528 if( defaultDisplayWindow.getWindowEnabledFlag() ) 567 529 { 568 WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset() ,"def_disp_win_left_offset");569 WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset() ,"def_disp_win_right_offset");570 WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset() ,"def_disp_win_top_offset");571 WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset() ,"def_disp_win_bottom_offset");530 WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_left_offset"); 531 WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_right_offset"); 532 WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_top_offset"); 533 WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset()/ TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_bottom_offset"); 572 534 } 573 535 TimingInfo *timingInfo = pcVUI->getTimingInfo(); … … 691 653 #endif 692 654 WRITE_CODE( pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1" ); 693 #if H_MV_HLS10_MULTILAYERSPS694 655 #if H_MV 695 656 } … … 700 661 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 701 662 { 702 #endif703 663 #endif 704 664 … … 710 670 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 711 671 #if H_MV 712 #if H_MV_HLS10_MULTILAYERSPS713 672 if ( pcSPS->getMultiLayerExtSpsFlag() ) 714 #else715 if ( pcSPS->getLayerId() > 0 )716 #endif717 673 { 718 674 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" ); … … 735 691 WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (), "pic_width_in_luma_samples" ); 736 692 WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(), "pic_height_in_luma_samples" ); 737 #if !H_MV_HLS10_MULTILAYERSPS738 #if H_MV739 }740 #endif741 #endif742 693 Window conf = pcSPS->getConformanceWindow(); 743 694 … … 750 701 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 751 702 } 752 #if H_MV_HLS10_MULTILAYERSPS753 703 #if H_MV 754 704 } 755 705 #endif 756 #endif757 706 758 707 #if H_MV 759 #if H_MV_HLS10_MULTILAYERSPS760 708 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 761 #else762 if ( pcSPS->getLayerId() == 0 )763 #endif764 709 { 765 710 #endif … … 771 716 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 772 717 #if H_MV 773 #if H_MV_HLS10_MULTILAYERSPS774 718 if ( !pcSPS->getMultiLayerExtSpsFlag()) 775 #else776 if ( pcSPS->getLayerId() == 0 )777 #endif778 719 { 779 720 #endif … … 806 747 { 807 748 #if H_MV 808 #if H_MV_HLS10_MULTILAYERSPS809 749 if ( pcSPS->getMultiLayerExtSpsFlag() ) 810 #else811 if ( pcSPS->getLayerId() > 0 )812 #endif813 750 { 814 751 WRITE_FLAG( pcSPS->getSpsInferScalingListFlag( ) ? 1 : 0 , "sps_infer_scaling_list_flag" ); … … 917 854 { 918 855 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 919 #if !H_MV_HLS10_PPS 920 WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets( ), "num_scaled_ref_layer_offsets" ); 921 922 for( Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets( ); i++) 923 { 924 WRITE_CODE( pcSPS->getScaledRefLayerId( i ), 6, "scaled_ref_layer_id" ); 925 926 Int j = pcSPS->getScaledRefLayerId( i ); 927 928 WRITE_SVLC( pcSPS->getScaledRefLayerLeftOffset( j ), "scaled_ref_layer_left_offset" ); 929 WRITE_SVLC( pcSPS->getScaledRefLayerTopOffset( j ), "scaled_ref_layer_top_offset" ); 930 WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" ); 931 WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" ); 932 WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" ); 933 } 934 #endif 935 } 936 937 938 #if H_MV_HLS10_PPS 856 } 857 858 939 859 Void TEncCavlc::codePPSMultilayerExtension(TComPPS* pcPPS) 940 860 { … … 944 864 WRITE_UVLC( 0, "num_ref_loc_offsets" ); 945 865 } 946 #endif947 866 948 867 #endif … … 951 870 Void TEncCavlc::codeSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 952 871 { 953 #if H_3D_QTLPC 954 #if !MTK_I0099_VPS_EX2 955 //GT: This has to go to VPS 956 if( depthFlag ) 957 { 958 WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag"); 959 WRITE_FLAG( pcSPS->getUsePC() ? 1 : 0, "use_pc_flag"); 960 } 961 #endif 962 #endif 963 } 964 965 872 873 } 966 874 #endif 967 875 … … 974 882 #if H_MV 975 883 WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" ); 976 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL977 884 WRITE_FLAG( pcVPS->getVpsBaseLayerAvailableFlag( ) ? 1 : 0 , "vps_base_layer_available_flag" ); 978 #else // H_MV_HLS10_GEN979 WRITE_FLAG( 1 , "vps_reserved_one_bit" );980 #endif // H_MV_HLS10_GEN981 885 #else 982 886 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); … … 1008 912 assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 ); 1009 913 WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6, "vps_max_layer_id" ); 1010 #if H_MV_HLS10_GEN_FIX1011 914 WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(), "vps_num_layer_sets_minus1" ); 1012 #else1013 WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(), "vps_max_num_layer_sets_minus1" );1014 #endif1015 915 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 1016 916 { … … 1089 989 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 1090 990 { 1091 #if H_MV_HLS10_PTL1092 991 if( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) 1093 992 { 1094 993 codePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1095 994 } 1096 #endif1097 995 1098 996 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); … … 1167 1065 } 1168 1066 1169 #if H_MV_HLS10_ADD_LAYERSETS1170 1067 if ( pcVPS->getNumIndependentLayers() > 1 ) 1171 1068 { … … 1180 1077 1181 1078 } 1182 #endif1183 1079 1184 1080 … … 1218 1114 WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" ); 1219 1115 1220 #if H_MV_HLS10_PTL1221 1116 Int offsetVal = ( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1; 1222 1117 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) … … 1226 1121 offsetVal++; 1227 1122 } 1228 #else 1229 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1230 { 1231 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1232 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1233 } 1234 #endif 1235 1236 #if !H_MV_HLS10_ADD_LAYERSETS 1237 if ( pcVPS->getNumIndependentLayers() > 1 ) 1238 { 1239 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1240 } 1241 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1242 { 1243 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1244 { 1245 WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j ) , "highest_layer_idx_plus1" ); 1246 } 1247 } 1248 #endif 1123 1249 1124 1250 1125 if (pcVPS->getNumLayerSets() > 1) … … 1258 1133 1259 1134 1260 #if H_MV_HLS10_PTL_FIX1261 1135 if (pcVPS->getVpsBaseLayerInternalFlag() ) 1262 1136 { 1263 1137 assert( pcVPS->getProfileTierLevelIdx(0,0) == pcVPS->inferProfileTierLevelIdx(0,0) ); 1264 1138 } 1265 #endif1266 1139 1267 1140 … … 1270 1143 if( i >= pcVPS->getNumLayerSets( ) ) 1271 1144 { 1272 #if !VPS_MISC_UPDATES1273 WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ), "layer_set_idx_for_ols_minus1[i]" );1274 #else1275 1145 WRITE_CODE( pcVPS->getLayerSetIdxForOlsMinus1( i ), pcVPS->getLayerSetIdxForOlsMinus1Len( i ) , "layer_set_idx_for_ols_minus1[i]" ); 1276 #endif1277 1146 } 1278 1147 … … 1292 1161 } 1293 1162 1294 #if H_MV_HLS10_PTL1295 1163 for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ ) 1296 1164 { … … 1299 1167 WRITE_CODE( pcVPS->getProfileTierLevelIdx( i, j ), pcVPS->getProfileTierLevelIdxLen() ,"profile_tier_level_idx[ i ][ j ]" ); 1300 1168 } 1301 #if H_MV_HLS10_PTL_FIX1302 1169 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 ) 1303 1170 { 1304 1171 assert( pcVPS->getProfileTierLevelIdx( i , j ) == pcVPS->inferProfileTierLevelIdx( i, j ) ); 1305 1172 } 1306 #endif 1307 1308 } 1309 #else 1310 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1311 { 1312 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1313 } 1314 #endif 1173 1174 } 1315 1175 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1316 1176 { … … 1362 1222 } 1363 1223 1364 #if !H_MV_HLS10_GEN_FIX1365 WRITE_FLAG( 0, "vps_reserved_zero_flag" );1366 #endif1367 1224 codeDpbSize( pcVPS ); 1368 1225 … … 1441 1298 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1442 1299 { 1443 #if H_MV_HLS10_DBP_SIZE1444 1300 if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) )) 1445 1301 { … … 1453 1309 } 1454 1310 } 1455 #else1456 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );1457 #endif1458 1311 } 1459 1312 WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" ); … … 1466 1319 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1467 1320 { 1468 #if H_MV_HLS10_DBP_SIZE1469 1321 if ( vps->getNecessaryLayerFlag(i, k ) ) 1470 1322 { 1471 #endif1472 1323 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 1473 #if H_MV_HLS10_DBP_SIZE1474 1324 } 1475 #endif1476 1325 } 1477 1326 assert( dpbSize->getMaxVpsNumReorderPics ( i, j ) == dpbSize->getMaxVpsNumReorderPics ( i, j - 1 ) ); … … 1508 1357 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, true ); 1509 1358 } 1510 #if H_MV_HLS10_GEN_VSP_CONF_WIN1511 1359 WRITE_FLAG( pcRepFormat->getConformanceWindowVpsFlag( ) ? 1 : 0 , "conformance_window_vps_flag" ); 1512 1360 if ( pcRepFormat->getConformanceWindowVpsFlag() ) … … 1517 1365 WRITE_UVLC( pcRepFormat->getConfWinVpsBottomOffset( ), "conf_win_vps_bottom_offset" ); 1518 1366 } 1519 #endif1520 1367 } 1521 1368 … … 1542 1389 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1543 1390 { 1544 #if H_MV_HLS10_VPS_VUI1545 1391 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1546 #else1547 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ )1548 #endif1549 1392 { 1550 1393 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1579 1422 else 1580 1423 { 1581 #if H_MV_HLS10_VPS_VUI1582 1424 assert( pcVPSVUI->getVpsNumVideoSignalInfoMinus1() == pcVPS->getMaxLayersMinus1() - ( pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1) ); 1583 #else1584 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );1585 #endif1586 1425 } 1587 1426 … … 1596 1435 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1597 1436 { 1598 #if I0045_VPS_VUI_VST_PARAMS1599 1437 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1600 1438 { 1601 1439 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); 1602 1440 } 1603 #else1604 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1605 {1606 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" );1607 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() );1608 }1609 }1610 else1611 {1612 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1613 {1614 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) == ( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ) );1615 }1616 #endif1617 1441 } 1618 1442 WRITE_FLAG( pcVPSVUI->getTilesNotInUseFlag( ) ? 1 : 0 , "tiles_not_in_use_flag" ); … … 1631 1455 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) 1632 1456 { 1633 #if H_MV_HLS10_REF_PRED_LAYERS1634 1457 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdRefLayer(pcVPS->getLayerIdInNuh( i ) , j )); 1635 #else1636 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j ));1637 #endif1638 1458 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1639 1459 { … … 1653 1473 } 1654 1474 } 1655 #if H_MV_HLS10_VPS_VUI1656 1475 WRITE_FLAG( pcVPSVUI->getSingleLayerForNonIrapFlag( ) ? 1 : 0 , "single_layer_for_non_irap_flag" ); 1657 1476 WRITE_FLAG( pcVPSVUI->getHigherLayerIrapSkipFlag( ) ? 1 : 0 , "higher_layer_irap_skip_flag" ); 1658 #else1659 WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" );1660 #endif1661 1477 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1662 1478 … … 1667 1483 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1668 1484 { 1669 #if H_MV_HLS10_REF_PRED_LAYERS1670 1485 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1671 #else1672 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )1673 #endif1674 1486 { 1675 1487 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); … … 1714 1526 assert ( vpsVuiBspHrdP ); 1715 1527 1716 #if H_MV_HLS10_VPS_VUI_BSP1717 1528 WRITE_UVLC( vpsVuiBspHrdP->getVpsNumAddHrdParams( ), "vps_num_add_hrd_params" ); 1718 1529 … … 1760 1571 } 1761 1572 1762 #else // H_MV_HLS10_GEN1763 WRITE_UVLC( vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ), "vps_num_bsp_hrd_parameters_minus1" );1764 for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )1765 {1766 if( i > 0 )1767 {1768 WRITE_FLAG( vpsVuiBspHrdP->getBspCprmsPresentFlag( i ) ? 1 : 0 , "bsp_cprms_present_flag" );1769 }1770 TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );1771 codeHrdParameters( hrdParameters, vpsVuiBspHrdP->getBspCprmsPresentFlag( i ), pcVPS->getMaxSubLayersMinus1() );1772 }1773 for( Int h = 1; h <= pcVPS->getVpsNumLayerSetsMinus1(); h++ )1774 {1775 WRITE_UVLC( vpsVuiBspHrdP->getNumBitstreamPartitions( h ), "num_bitstream_partitions" );1776 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ )1777 {1778 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ )1779 {1780 WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" );1781 }1782 }1783 vpsVuiBspHrdP->checkLayerInBspFlag( pcVPS, h );1784 1785 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) )1786 {1787 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" );1788 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )1789 {1790 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )1791 {1792 WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" );1793 WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" );1794 1795 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );1796 }1797 }1798 }1799 }1800 #endif1801 1573 } 1802 1574 #endif … … 1805 1577 Void TEncCavlc::codeVPSExtension2( TComVPS* pcVPS ) 1806 1578 { 1807 #if SEC_VPS_CLEANUP_I00901808 1579 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1809 #else 1810 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1811 #endif 1812 { 1813 #if !SEC_VPS_CLEANUP_I0090 1814 if (i!= 0) 1815 #endif 1816 { 1817 #if MTK_I0099_VPS_EX2 1580 { 1581 { 1818 1582 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]"); 1819 #if SEC_HLS_CLEANUP_I01001820 1583 WRITE_FLAG( pcVPS->getIvMvScalingFlag( i ) ? 1 : 0 , "iv_mv_scaling_flag[i]" ); 1821 #endif 1822 1823 #endif 1584 1824 1585 if ( !( pcVPS->getDepthId( i ) == 1 ) ) 1825 1586 { 1826 1587 #if H_3D_IV_MERGE 1827 #if !MTK_I0099_VPS_EX21828 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");1829 #endif1830 1588 #if H_3D_SPIVMP 1831 1589 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]"); … … 1847 1605 else 1848 1606 { 1849 #if !MTK_I0099_VPS_EX21850 if(i!=1)1851 {1852 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");1853 }1854 #if H_3D_SPIVMP1855 if (i!=1)1856 {1857 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]");1858 }1859 #endif1860 #endif1861 1607 #if H_3D_IV_MERGE 1862 1608 WRITE_FLAG( pcVPS->getMPIFlag( i ) ? 1 : 0 , "mpi_flag[i]" ); 1863 1609 #endif 1864 #if MTK_I0099_VPS_EX21865 1610 WRITE_UVLC( pcVPS->getSubPUMPILog2Size(i)-3, "log2_mpi_sub_PU_size_minus3[i]"); 1866 #endif 1611 1867 1612 WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 , "vps_depth_modes_flag[i]" ); 1868 #if SEPARATE_FLAG_I00851613 #if H_3D 1869 1614 WRITE_FLAG( pcVPS->getIVPFlag( i ) ? 1 : 0 , "IVP_flag[i]" ); 1870 1615 #endif 1871 #if MTK_I0099_VPS_EX21872 1616 WRITE_FLAG( pcVPS->getLimQtPredFlag ( i ) ? 1 : 0 , "lim_qt_pred_flag[i]" ); 1873 #endif1874 1617 1875 1618 #if H_3D_INTER_SDC … … 1880 1623 } 1881 1624 WRITE_UVLC( pcVPS->getCamParPrecision(), "cp_precision" ); 1882 #if SEC_VPS_CLEANUP_I00901883 1625 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++) 1884 #else1885 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++)1886 #endif1887 1626 { 1888 1627 WRITE_FLAG( pcVPS->getCamParPresent(viewIndex) ? 1 : 0, "cp_present_flag[i]" ); … … 1902 1641 } 1903 1642 } 1904 #if !MTK_I0099_VPS_EX21905 WRITE_UVLC( pcVPS->getSubPUMPILog2Size( ) - 3, "log2_sub_PU_MPI_size_minus3");1906 #endif1907 #if H_3D_TMVP1908 #if !SEC_HLS_CLEANUP_I01001909 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" );1910 #endif1911 #endif1912 1643 } 1913 1644 #endif … … 1978 1709 esb++; 1979 1710 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 1980 #if NON_REF_NAL_TYPE_DISCARDABLE1981 1711 if (pcSlice->getDiscardableFlag( )) 1982 1712 { … … 1987 1717 pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_RASL_R); 1988 1718 } 1989 #endif1990 1719 } 1991 1720 … … 2148 1877 if (pcSlice->getSPS()->getTMVPFlagsPresent()) 2149 1878 { 2150 #if I0044_SLICE_TMVP1879 #if H_MV 2151 1880 WRITE_FLAG( pcSlice->getEnableTMVPFlag() ? 1 : 0, "slice_temporal_mvp_enabled_flag" ); 2152 1881 #else … … 2308 2037 } 2309 2038 #if H_3D_IC 2310 #if SEC_HLS_CLEANUP_I01002311 2039 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth() && vps->getNumDirectRefLayers( layerId ) > 0 ) 2312 #else2313 else if( pcSlice->getViewIndex() && ( pcSlice->getSliceType() == P_SLICE || pcSlice->getSliceType() == B_SLICE ) && !pcSlice->getIsDepth())2314 #endif2315 2040 { 2316 2041 WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "slice_ic_enable_flag" ); … … 2321 2046 } 2322 2047 #endif 2323 #if MTK_SINGLE_DEPTH_MODE_I00952048 #if H_3D_SINGLE_DEPTH 2324 2049 if(pcSlice->getIsDepth()) 2325 2050 { … … 2385 2110 } 2386 2111 #if H_3D 2387 #if LGE_FCO_I01162112 #if H_3D_FCO 2388 2113 if( pcSlice->getVPS()->hasCamParInSliceHeader( pcSlice->getViewIndex() ) && pcSlice->getIsDepth() ) 2389 2114 #else … … 2575 2300 WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), "general_frame_only_constraint_flag"); 2576 2301 2577 #if H_MV_HLS10_PTL 2578 #if H_MV_HLS10_PTL_INFER_FIX 2302 #if H_MV 2579 2303 if( ptl->getV2ConstraintsPresentFlag() ) 2580 #else2581 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) ||2582 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) ||2583 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) ||2584 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) )2585 #endif2586 2304 { 2587 2305 WRITE_FLAG( ptl->getMax12bitConstraintFlag( ) ? 1 : 0 , "max_12bit_constraint_flag" ); … … 2604 2322 WRITE_CODE( 0, 11, "XXX_reserved_zero_43bits[32..42]"); 2605 2323 } 2606 #if H_MV_HLS10_PTL_INFER_FIX2607 2324 if( ptl->getInbldPresentFlag() ) 2608 #else2609 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||2610 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) ||2611 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) ||2612 ptl->getProfileCompatibilityFlag( 5 ) )2613 #endif2614 2325 { 2615 2326 WRITE_FLAG( ptl->getInbldFlag( ) ? 1 : 0 , "inbld_flag" ); … … 2762 2473 assert(0); 2763 2474 } 2764 #if MTK_SINGLE_DEPTH_MODE_I00952475 #if H_3D_SINGLE_DEPTH 2765 2476 Void TEncCavlc::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2766 2477 { -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r1066 r1084 107 107 Void codePPS ( TComPPS* pcPPS ); 108 108 109 #if H_MV_HLS10_PPS110 109 #if H_MV 111 110 Void codePPSMultilayerExtension( TComPPS* pcPPS ); 112 #endif113 111 #endif 114 112 … … 129 127 Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ); 130 128 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 131 #if MTK_SINGLE_DEPTH_MODE_I0095129 #if H_3D_SINGLE_DEPTH 132 130 Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ); 133 131 #endif -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r1039 r1084 124 124 Int m_iSourceWidth; 125 125 Int m_iSourceHeight; 126 Int m_conformanceMode;127 126 Window m_conformanceWindow; 128 127 Int m_framesToBeEncoded; … … 229 228 Bool m_bPCMFilterDisableFlag; 230 229 Bool m_loopFilterAcrossTilesEnabledFlag; 231 Int m_iUniformSpacingIdr;230 Bool m_tileUniformSpacingFlag; 232 231 Int m_iNumColumnsMinus1; 233 UInt* m_puiColumnWidth;234 232 Int m_iNumRowsMinus1; 235 UInt* m_puiRowHeight; 233 std::vector<Int> m_tileColumnWidth; 234 std::vector<Int> m_tileRowHeight; 236 235 237 236 Int m_iWaveFrontSynchro; … … 414 413 #if H_3D_DIM 415 414 Bool m_useDMM; 416 #if SEPARATE_FLAG_I0085417 415 Bool m_useIVP; 418 #endif419 416 Bool m_useSDC; 420 417 Bool m_useDLT; 421 418 #endif 422 #if MTK_SINGLE_DEPTH_MODE_I0095419 #if H_3D_SINGLE_DEPTH 423 420 Bool m_useSingleDepthMode; 424 421 #endif … … 426 423 Bool m_useMPI; 427 424 #endif 428 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX429 425 #if H_3D_QTLPC 430 426 Bool m_bUseQTL; 431 #if !MTK_I0099_VPS_EX2432 Bool m_bUsePC;433 #endif434 #endif435 427 #endif 436 428 #endif 437 429 public: 438 430 TEncCfg() 439 : m_ puiColumnWidth()440 , m_ puiRowHeight()431 : m_tileColumnWidth() 432 , m_tileRowHeight() 441 433 #if H_MV 442 434 , m_layerId(-1) … … 452 444 453 445 virtual ~TEncCfg() 454 { 455 delete[] m_puiColumnWidth; 456 delete[] m_puiRowHeight; 457 } 446 {} 458 447 459 448 Void setProfile(Profile::Name profile) { m_profile = profile; } … … 678 667 Void setLFCrossTileBoundaryFlag ( Bool val ) { m_loopFilterAcrossTilesEnabledFlag = val; } 679 668 Bool getLFCrossTileBoundaryFlag () { return m_loopFilterAcrossTilesEnabledFlag; } 680 Void set UniformSpacingIdr ( Int i ) { m_iUniformSpacingIdr = i; }681 Int getUniformSpacingIdr () { return m_iUniformSpacingIdr; }669 Void setTileUniformSpacingFlag ( Bool b ) { m_tileUniformSpacingFlag = b; } 670 Bool getTileUniformSpacingFlag () { return m_tileUniformSpacingFlag; } 682 671 Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } 683 672 Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } 684 Void setColumnWidth ( UInt* columnWidth ) 685 { 686 if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) 687 { 688 Int m_iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth; 689 m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; 690 691 for(Int i=0; i<m_iNumColumnsMinus1; i++) 692 { 693 m_puiColumnWidth[i] = columnWidth[i]; 694 printf("col: m_iWidthInCU= %4d i=%4d width= %4d\n",m_iWidthInCU,i,m_puiColumnWidth[i]); //AFU 695 } 696 } 697 } 698 UInt getColumnWidth ( UInt columnidx ) { return *( m_puiColumnWidth + columnidx ); } 673 Void setColumnWidth ( const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } 674 UInt getColumnWidth ( UInt columnIdx ) { return m_tileColumnWidth[columnIdx]; } 699 675 Void setNumRowsMinus1 ( Int i ) { m_iNumRowsMinus1 = i; } 700 676 Int getNumRowsMinus1 () { return m_iNumRowsMinus1; } 701 Void setRowHeight (UInt* rowHeight) 702 { 703 if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 ) 704 { 705 Int m_iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight; 706 m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; 707 708 for(Int i=0; i<m_iNumRowsMinus1; i++) 709 { 710 m_puiRowHeight[i] = rowHeight[i]; 711 printf("row: m_iHeightInCU=%4d i=%4d height=%4d\n",m_iHeightInCU,i,m_puiRowHeight[i]); //AFU 712 } 713 } 714 } 715 UInt getRowHeight ( UInt rowIdx ) { return *( m_puiRowHeight + rowIdx ); } 677 Void setRowHeight ( const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } 678 UInt getRowHeight ( UInt rowIdx ) { return m_tileRowHeight[rowIdx]; } 716 679 Void xCheckGSParameters(); 717 680 Void setWaveFrontSynchro(Int iWaveFrontSynchro) { m_iWaveFrontSynchro = iWaveFrontSynchro; } … … 1013 976 Bool getUseDMM () { return m_useDMM; } 1014 977 Void setUseDMM ( Bool b) { m_useDMM = b; } 1015 #if SEPARATE_FLAG_I00851016 978 Bool getUseIVP () { return m_useIVP; } 1017 979 Void setUseIVP ( Bool b) { m_useIVP = b; } 1018 #endif1019 980 Bool getUseSDC () { return m_useSDC; } 1020 981 Void setUseSDC ( Bool b) { m_useSDC = b; } … … 1022 983 Void setUseDLT ( Bool b) { m_useDLT = b; } 1023 984 #endif 1024 #if MTK_SINGLE_DEPTH_MODE_I0095985 #if H_3D_SINGLE_DEPTH 1025 986 Void setUseSingleDepthMode ( Bool bVal ) { m_useSingleDepthMode = bVal; } 1026 987 Bool getUseSingleDepthMode () { return m_useSingleDepthMode; } 1027 988 #endif 1028 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX1029 989 #if H_3D_QTLPC 1030 990 Void setUseQTL ( Bool b ) { m_bUseQTL = b; } 1031 991 Bool getUseQTL () { return m_bUseQTL; } 1032 #if !MTK_I0099_VPS_EX21033 Void setUsePC ( Bool b ) { m_bUsePC = b; }1034 Bool getUsePC () { return m_bUsePC; }1035 #endif1036 #endif1037 992 #endif 1038 993 #if H_3D_IV_MERGE -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r1066 r1084 409 409 410 410 #if H_3D_QTLPC 411 #if MTK_I0099_VPS_EX2412 411 TComVPS *vps = pcPic->getSlice(0)->getVPS(); 413 412 Bool bLimQtPredFalg = vps->getLimQtPredFlag(pcPic->getSlice(0)->getLayerId()); 414 #else415 TComSPS *sps = pcPic->getSlice(0)->getSPS();416 #endif417 413 TComPic *pcTexture = rpcBestCU->getSlice()->getTexturePic(); 418 414 … … 535 531 #if H_3D_QTLPC 536 532 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 537 538 #if MTK_I0099_VPS_EX2 539 #if MTK_I0099_FIX 540 #if LGE_FCO_I0116 533 #if H_3D_FCO 541 534 if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg ) && pcTexture->getReconMark()) 542 535 #else 543 536 if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg )) 544 #endif545 #else546 if(depthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFalg)547 #endif548 #else549 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())550 537 #endif 551 538 { … … 702 689 703 690 #if H_3D_QTLPC 704 #if MTK_I0099_VPS_EX2705 #if MTK_I0099_FIX706 691 if(depthMapDetect && !bIntraSliceDetect && !rapPic && ( m_pcEncCfg->getUseQTL() || bLimQtPredFalg )) 707 #else708 if(depthMapDetect && !bIntraSliceDetect && !rapPic && bLimQtPredFalg)709 #endif710 #else711 if(depthMapDetect && !bIntraSliceDetect && !rapPic && sps->getUseQTL())712 #endif713 692 { 714 693 bTrySplitDQP = bTrySplit; … … 734 713 } 735 714 #endif 736 #if MTK_SINGLE_DEPTH_MODE_I0095715 #if H_3D_SINGLE_DEPTH 737 716 rpcTempCU->initEstData( uiDepth, iMinQP, isAddLowestQP ); 738 717 if(rpcBestCU->getSlice()->getApplySingleDepthMode()) … … 1057 1036 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 1058 1037 #if H_3D_DIM_ENC 1059 #if HHI_DMM4_ENC_I00661060 1038 || rpcBestCU->getSlice()->getIsDepth() 1061 #else1062 || ( rpcBestCU->getSlice()->getIsDepth() && rpcBestCU->getSlice()->isIRAP() )1063 #endif1064 1039 #endif 1065 1040 ) // avoid very complex intra if it is unlikely 1066 1041 { 1067 #if H HI_DMM4_ENC_I00661042 #if H_3D_DIM 1068 1043 Bool bOnlyIVP = false; 1069 1044 if( rpcBestCU->getSlice()->getIsDepth() && !(rpcBestCU->getSlice()->isIRAP()) && … … 1098 1073 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1099 1074 { 1100 #if H HI_DMM4_ENC_I00661075 #if H_3D_DIM 1101 1076 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN, bOnlyIVP ); 1102 1077 #else … … 1590 1565 return; 1591 1566 } 1592 #if MTK_SINGLE_DEPTH_MODE_I00951567 #if H_3D_SINGLE_DEPTH 1593 1568 m_pcEntropyCoder->encodeSingleDepthMode( pcCU, uiAbsPartIdx ); 1594 1569 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) … … 1627 1602 m_pcEntropyCoder->encodeCoeff( pcCU, uiAbsPartIdx, uiDepth, pcCU->getWidth (uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), bCodeDQP ); 1628 1603 setdQPFlag( bCodeDQP ); 1629 #if MTK_SINGLE_DEPTH_MODE_I00951604 #if H_3D_SINGLE_DEPTH 1630 1605 } 1631 1606 #endif … … 1863 1838 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1864 1839 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1865 #if !FIX_TICKET_791866 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];1867 #endif1868 1840 #if H_3D_SPIVMP 1869 1841 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; … … 1878 1850 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1879 1851 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1880 #if !FIX_TICKET_791881 , inheritedVSPDisInfo1882 #endif1883 1852 #if H_3D_SPIVMP 1884 1853 , pcMvFieldSP, puhInterDirSP … … 1895 1864 1896 1865 #else 1897 #if FIX_TICKET_791898 1866 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand ); 1899 #else1900 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );1901 #endif1902 1867 #endif 1903 1868 … … 1942 1907 #if H_3D_VSP 1943 1908 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); 1944 #if !FIX_TICKET_791945 rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );1946 #endif1947 1909 #endif 1948 1910 #if H_3D_DDD … … 2043 2005 2044 2006 rpcTempCU->setSkipFlagSubParts( rpcTempCU->getQtRootCbf(0) == 0, 0, uhDepth ); 2045 #if MTK_SINGLE_DEPTH_MODE_I00952007 #if H_3D_SINGLE_DEPTH 2046 2008 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2047 2009 #endif … … 2061 2023 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual ) 2062 2024 { 2063 #if FAST_SDC_OFFSET_DECISION_I00842064 2025 Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE}; 2065 2026 for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ ) 2066 #else2067 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )2068 #endif2069 2027 { 2070 #if FAST_SDC_OFFSET_DECISION_I00842071 2028 if( uiOffest > 3) 2072 2029 { … … 2084 2041 } 2085 2042 } 2086 #endif2087 2043 if( rpcTempCU != rpcTempCUPre ) 2088 2044 { … … 2091 2047 } 2092 2048 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2093 #if MTK_SINGLE_DEPTH_MODE_I00952049 #if H_3D_SINGLE_DEPTH 2094 2050 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2095 2051 #endif … … 2106 2062 } 2107 2063 #endif 2108 #if FAST_SDC_OFFSET_DECISION_I00842109 2064 Int iSdcOffset = 0; 2110 2065 if(uiOffest % 2 == 0) … … 2127 2082 dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost(); 2128 2083 } 2129 #else2130 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,2131 m_ppcOrigYuv[uhDepth],2132 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],2133 m_ppcResiYuvTemp[uhDepth],2134 m_ppcRecoYuvTemp[uhDepth],2135 uiOffest,2136 uhDepth );2137 #endif2138 2084 2139 2085 xCheckDQP( rpcTempCU ); … … 2253 2199 2254 2200 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2255 #if MTK_SINGLE_DEPTH_MODE_I00952201 #if H_3D_SINGLE_DEPTH 2256 2202 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2257 2203 #endif … … 2326 2272 } 2327 2273 #endif 2328 2329 2274 #if H_3D_VSO // M4 2330 2275 if( m_pcRdCost->getUseLambdaScaleVSO() ) … … 2332 2277 else 2333 2278 #endif 2334 2335 2279 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2336 2280 #if H_3D_INTER_SDC … … 2342 2286 if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N) 2343 2287 { 2344 #if FAST_SDC_OFFSET_DECISION_I00842345 2288 Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE}; 2346 2289 for( Int uiOffest = 1 ; uiOffest <= 5 ; uiOffest++ ) 2347 #else 2348 for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ ) 2349 #endif 2350 { 2351 #if FAST_SDC_OFFSET_DECISION_I0084 2290 { 2352 2291 if( uiOffest > 3) 2353 2292 { … … 2365 2304 } 2366 2305 } 2367 #endif 2306 2368 2307 if( rpcTempCU != rpcTempCUPre ) 2369 2308 { … … 2373 2312 } 2374 2313 rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth ); 2375 #if MTK_SINGLE_DEPTH_MODE_I00952314 #if H_3D_SINGLE_DEPTH 2376 2315 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uhDepth ); 2377 2316 #endif … … 2389 2328 #endif 2390 2329 2391 #if FAST_SDC_OFFSET_DECISION_I00842392 2330 Int iSdcOffset = 0; 2393 2331 if(uiOffest % 2 == 0) … … 2410 2348 dOffsetCost [uiOffest -1] = rpcTempCU->getTotalCost(); 2411 2349 } 2412 #else2413 m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU,2414 m_ppcOrigYuv[uhDepth],2415 ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],2416 m_ppcResiYuvTemp[uhDepth],2417 m_ppcRecoYuvTemp[uhDepth],2418 uiOffest,2419 uhDepth );2420 #endif2421 2350 2422 2351 xCheckDQP( rpcTempCU ); … … 2493 2422 } 2494 2423 } 2495 #if MTK_SINGLE_DEPTH_MODE_I00952424 #if H_3D_SINGLE_DEPTH 2496 2425 Void TEncCu::xCheckRDCostSingleDepth( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize ) 2497 2426 { … … 2560 2489 } 2561 2490 #endif 2491 2562 2492 Void TEncCu::xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG ) 2563 2493 { … … 2581 2511 AOF( uiWidth == uiHeight ); 2582 2512 2583 #if SEC_DBBP_DISALLOW_8x8_I0078 2513 #if H_3D_DBBP 2514 // Is this correct here, was under the macro SEC_DBBP_DISALLOW_8x8_I0078, however the function is related to Single Depth Mode 2584 2515 if(uiWidth <= 8) 2585 2516 { … … 2592 2523 // fetch virtual depth block 2593 2524 UInt uiDepthStride = 0; 2594 #if LGE_FCO_I01162525 #if H_3D_FCO 2595 2526 Pel* pDepthPels = rpcTempCU->getVirtualDepthBlock(rpcTempCU->getZorderIdxInCU(), uiWidth, uiHeight, uiDepthStride); 2596 2527 #else … … 2688 2619 2689 2620 // reconstruct final prediction signal by combining both segments 2690 #if SHARP_DBBP_SIMPLE_FLTER_I01092691 2621 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight, 0, eVirtualPartSize); 2692 #else2693 m_pcPredSearch->combineSegmentsWithMask(apPredYuv, m_ppcPredYuvTemp[uhDepth], pMask, uiWidth, uiHeight);2694 #endif2695 2696 2622 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcResiYuvBest[uhDepth], m_ppcRecoYuvTemp[uhDepth], false ); 2697 2623 … … 2700 2626 } 2701 2627 #endif 2702 2703 #if HHI_DMM4_ENC_I0066 2628 #if H_3D_DIM 2704 2629 Void TEncCu::xCheckRDCostIntra( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize eSize, Bool bOnlyIVP ) 2705 2630 #else … … 2707 2632 #endif 2708 2633 { 2709 UInt uiDepth = rpcTempCU->getDepth( 0 ); 2710 2634 UInt uiDepth = rpcTempCU->getDepth( 0 ); 2711 2635 #if H_3D_VSO // M5 2712 2636 if( m_pcRdCost->getUseRenModel() ) … … 2721 2645 2722 2646 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2723 #if MTK_SINGLE_DEPTH_MODE_I00952647 #if H_3D_SINGLE_DEPTH 2724 2648 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth ); 2725 2649 #endif … … 2733 2657 m_pcPredSearch->preestChromaPredMode( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth] ); 2734 2658 } 2735 #if H HI_DMM4_ENC_I00662659 #if H_3D_DIM 2736 2660 m_pcPredSearch ->estIntraPredQT ( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC, bSeparateLumaChroma, bOnlyIVP ); 2737 2661 #else … … 2751 2675 } 2752 2676 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2753 #if MTK_SINGLE_DEPTH_MODE_I00952677 #if H_3D_SINGLE_DEPTH 2754 2678 m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0, true ); 2755 2679 if(!rpcTempCU->getSingleDepthFlag(0)) … … 2768 2692 m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP ); 2769 2693 setdQPFlag( bCodeDQP ); 2770 #if MTK_SINGLE_DEPTH_MODE_I00952694 #if H_3D_SINGLE_DEPTH 2771 2695 } 2772 2696 #endif … … 2798 2722 2799 2723 rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 2800 #if MTK_SINGLE_DEPTH_MODE_I00952724 #if H_3D_SINGLE_DEPTH 2801 2725 rpcTempCU->setSingleDepthFlagSubParts( false, 0, uiDepth ); 2802 2726 #endif … … 2817 2741 } 2818 2742 m_pcEntropyCoder->encodeSkipFlag ( rpcTempCU, 0, true ); 2819 #if MTK_SINGLE_DEPTH_MODE_I00952743 #if H_3D_SINGLE_DEPTH 2820 2744 m_pcEntropyCoder->encodeSingleDepthMode( rpcTempCU, 0, true ); 2821 2745 #endif -
trunk/source/Lib/TLibEncoder/TEncCu.h
r1039 r1084 159 159 Void xCheckRDCostInterDBBP( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, Bool bUseMRG = false ); 160 160 #endif 161 #if MTK_SINGLE_DEPTH_MODE_I0095161 #if H_3D_SINGLE_DEPTH 162 162 Void xCheckRDCostSingleDepth ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize ); 163 163 #endif 164 #if H HI_DMM4_ENC_I0066164 #if H_3D_DIM 165 165 Void xCheckRDCostIntra ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bOnlyIVP ); 166 166 #else -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r1066 r1084 119 119 m_pcEntropyCoderIf->codeSkipFlag( pcCU, uiAbsPartIdx ); 120 120 } 121 #if MTK_SINGLE_DEPTH_MODE_I0095121 #if H_3D_SINGLE_DEPTH 122 122 Void TEncEntropy::encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 123 123 { … … 185 185 else 186 186 { 187 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX188 187 Int ICEnableCandidate = pcCU->getSlice()->getICEnableCandidate(pcCU->getSlice()->getDepth()); 189 188 Int ICEnableNum = pcCU->getSlice()->getICEnableNum(pcCU->getSlice()->getDepth()); … … 195 194 pcCU->getSlice()->setICEnableCandidate(pcCU->getSlice()->getDepth(), ICEnableCandidate); 196 195 pcCU->getSlice()->setICEnableNum(pcCU->getSlice()->getDepth(), ICEnableNum); 197 #else198 g_aICEnableCANDIDATE[pcCU->getSlice()->getDepth()]++;199 if(pcCU->getICFlag(uiAbsPartIdx))200 {201 g_aICEnableNUM[pcCU->getSlice()->getDepth()]++;202 }203 #endif204 196 } 205 197 if( pcCU->isICFlagRequired( uiAbsPartIdx ) ) … … 273 265 } 274 266 267 m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth ); 268 275 269 #if H_3D_DBBP 276 #if! SEC_DBBP_EXPLICIT_SIG_I0077277 PartSize eVirtualPartSize = pcCU->getPartitionSize(uiAbsPartIdx);278 if( pcCU->getDBBPFlag(uiAbsPartIdx) )279 {280 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );281 282 // temporarily change partition size for DBBP blocks283 pcCU->setPartSizeSubParts(RWTH_DBBP_PACK_MODE, uiAbsPartIdx, uiDepth);284 }285 #endif286 #endif287 288 m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );289 290 #if H_3D_DBBP291 #if SEC_DBBP_EXPLICIT_SIG_I0077292 #if SEC_DBBP_DISALLOW_8x8_I0078293 270 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 ) 294 #else295 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )296 #endif297 #else298 #if SEC_DBBP_DISALLOW_8x8_I0078299 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )300 #else301 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )302 #endif303 #endif304 271 { 305 272 encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD); 306 #if !SEC_DBBP_EXPLICIT_SIG_I0077307 if( pcCU->getDBBPFlag(uiAbsPartIdx) )308 {309 // restore virtual partition size for DBBP blocks310 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);311 }312 #endif313 273 } 314 274 #endif -
trunk/source/Lib/TLibEncoder/TEncEntropy.h
r1039 r1084 86 86 virtual Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 87 87 virtual Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 88 #if MTK_SINGLE_DEPTH_MODE_I009588 #if H_3D_SINGLE_DEPTH 89 89 virtual Void codeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 90 90 #endif … … 174 174 Void encodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 175 175 Void encodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 176 #if MTK_SINGLE_DEPTH_MODE_I0095176 #if H_3D_SINGLE_DEPTH 177 177 Void encodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD=false ); 178 178 #endif -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r1066 r1084 160 160 #endif 161 161 #endif 162 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX163 m_aICEnableCandidate 164 m_aICEnableNum 162 #if H_3D_IC 163 m_aICEnableCandidate = pcTEncTop->getICEnableCandidate(); 164 m_aICEnableNum = pcTEncTop->getICEnableNum(); 165 165 #endif 166 166 #if KWU_FIX_URQ … … 395 395 Void TEncGOP::initGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsInGOP) 396 396 { 397 #if H_MV_ALIGN_HM_15 398 xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut, false ); 399 #else 397 400 xInitGOP( iPOCLast, iNumPicRcvd, rcListPic, rcListPicYuvRecOut ); 401 #endif 398 402 m_iNumPicCoded = 0; 399 403 } … … 937 941 pcSlice->setRefPicList ( rcListPic ); 938 942 #endif 939 #if MTK_SINGLE_DEPTH_MODE_I0095943 #if H_3D_SINGLE_DEPTH 940 944 TEncTop* pcEncTop = (TEncTop*) m_pcCfg; 941 945 bool enableSingleDepthMode=false; … … 971 975 #endif 972 976 #endif 973 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX977 #if H_3D_IC 974 978 pcSlice->setICEnableCandidate( m_aICEnableCandidate ); 975 979 pcSlice->setICEnableNum( m_aICEnableNum ); … … 1228 1232 UInt uiRealEndAddress = uiExternalAddress*pcPic->getNumPartInCU()+uiInternalAddress; 1229 1233 1230 UInt uiCummulativeTileWidth;1231 UInt uiCummulativeTileHeight;1232 1234 Int p, j; 1233 1235 UInt uiEncCUAddr; 1234 1236 1235 //set NumColumnsMinus1 and NumRowsMinus1 1236 pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() ); 1237 pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() ); 1238 1239 //create the TComTileArray 1240 pcPic->getPicSym()->xCreateTComTileArray(); 1241 1242 if( pcSlice->getPPS()->getUniformSpacingFlag() == 1 ) 1243 { 1244 //set the width for each tile 1245 for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++) 1246 { 1247 for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++) 1248 { 1249 pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )-> 1250 setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1) 1251 - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) ); 1252 } 1253 } 1254 1255 //set the height for each tile 1256 for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++) 1257 { 1258 for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++) 1259 { 1260 pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )-> 1261 setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1) 1262 - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) ); 1263 } 1264 } 1265 } 1266 else 1267 { 1268 //set the width for each tile 1269 for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++) 1270 { 1271 uiCummulativeTileWidth = 0; 1272 for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1(); p++) 1273 { 1274 pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->setTileWidth( pcSlice->getPPS()->getColumnWidth(p) ); 1275 uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(p); 1276 } 1277 pcPic->getPicSym()->getTComTile(j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth ); 1278 } 1279 1280 //set the height for each tile 1281 for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++) 1282 { 1283 uiCummulativeTileHeight = 0; 1284 for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1(); p++) 1285 { 1286 pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->setTileHeight( pcSlice->getPPS()->getRowHeight(p) ); 1287 uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(p); 1288 } 1289 pcPic->getPicSym()->getTComTile(p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight ); 1290 } 1291 } 1292 //intialize each tile of the current picture 1293 pcPic->getPicSym()->xInitTiles(); 1237 pcPic->getPicSym()->initTiles(pcSlice->getPPS()); 1294 1238 1295 1239 // Allocate some coders, now we know how many tiles there are. … … 1814 1758 1815 1759 #if SETTING_NO_OUT_PIC_PRIOR 1760 pcSlice->setNoRaslOutputFlag(false); 1816 1761 if (pcSlice->isIRAP()) 1817 1762 { … … 1821 1766 } 1822 1767 //the inference for NoOutputPriorPicsFlag 1768 // KJS: This cannot happen at the encoder 1823 1769 if (!m_bFirst && pcSlice->isIRAP() && pcSlice->getNoRaslOutputFlag()) 1824 1770 { … … 2492 2438 assert (m_iGopSize > 0); 2493 2439 2494 return;2495 }2496 2497 Void TEncGOP::xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut )2498 {2499 assert( iNumPicRcvd > 0 );2500 // Exception for the first frame2501 if ( iPOCLast == 0 )2502 {2503 m_iGopSize = 1;2504 }2505 else2506 m_iGopSize = m_pcCfg->getGOPSize();2507 2508 assert (m_iGopSize > 0);2509 2510 2440 return; 2511 2441 } -
trunk/source/Lib/TLibEncoder/TEncGOP.h
r1066 r1084 116 116 #endif 117 117 #endif 118 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX119 Int *m_aICEnableCandidate;120 Int *m_aICEnableNum;118 #if H_3D_IC 119 Int* m_aICEnableCandidate; 120 Int* m_aICEnableNum; 121 121 #endif 122 122 //--Adaptive Loop filter … … 200 200 201 201 Void xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, bool isField ); 202 Void xInitGOP ( Int iPOC, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut );203 202 Void xGetBuffer ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, Int pocCurr, bool isField ); 204 203 -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r1066 r1084 58 58 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 59 59 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 60 #if MTK_SINGLE_DEPTH_MODE_I009560 #if H_3D_SINGLE_DEPTH 61 61 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 62 62 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 134 134 135 135 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 136 #if MTK_SINGLE_DEPTH_MODE_I0095136 #if H_3D_SINGLE_DEPTH 137 137 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 138 138 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); … … 214 214 curCost = m_cCUSplitFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 215 215 curCost += m_cCUSkipFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG ); 216 #if MTK_SINGLE_DEPTH_MODE_I0095216 #if H_3D_SINGLE_DEPTH 217 217 curCost += m_cCUSingleDepthFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 218 218 curCost += m_cSingleDepthValueSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); … … 255 255 curCost += m_CUTransquantBypassFlagSCModel.calcCost( curSliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG ); 256 256 #if H_3D_DIM 257 #if SEPARATE_FLAG_I0085258 257 if( m_pcSlice->getVpsDepthModesFlag() || m_pcSlice->getIVPFlag() ) 259 #else260 if( m_pcSlice->getVpsDepthModesFlag() )261 #endif262 258 { 263 259 curCost += m_cDepthIntraModeSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DEPTH_INTRA_MODE ); … … 291 287 292 288 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 293 #if MTK_SINGLE_DEPTH_MODE_I0095289 #if H_3D_SINGLE_DEPTH 294 290 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG ); 295 291 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA ); … … 454 450 m_pcBinIf->encodeBinsEP( bins, numBins ); 455 451 } 456 #if MTK_SINGLE_DEPTH_MODE_I0095452 #if H_3D_SINGLE_DEPTH 457 453 Void TEncSbac::codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) 458 454 { … … 462 458 { 463 459 UInt uiUnaryIdx = (UInt) pcCU->getSingleDepthValue(uiAbsPartIdx); 464 UInt uiNumCand = MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE;460 UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE; 465 461 if ( uiNumCand > 1 ) 466 462 { … … 563 559 564 560 #endif 565 566 #if !FIX_TICKET_76567 #if H_3D_DIM_SDC568 Void TEncSbac::xCodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )569 {570 assert( pcCU->getSlice()->getIsDepth() );571 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );572 assert( pcCU->getSDCFlag(uiAbsPartIdx) );573 assert( uiSegment < 2 );574 575 Pel segmentDCOffset = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx);576 577 UInt uiResidual = segmentDCOffset == 0 ? 0 : 1;578 UInt uiSign = segmentDCOffset < 0 ? 1 : 0;579 UInt uiAbsIdx = abs(segmentDCOffset);580 581 #if H_3D_DIM_DLT582 UInt uiMaxResidualBits = pcCU->getSlice()->getPPS()->getDLT()->getBitsPerDepthValue( pcCU->getSlice()->getLayerIdInVps() );583 #else584 UInt uiMaxResidualBits = g_bitDepthY;585 #endif586 assert( uiMaxResidualBits <= g_bitDepthY );587 588 // residual flag589 m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );590 #if H_MV_ENC_DEC_TRAC591 DTRACE_CU("sdc_residual_flag[i]", uiResidual)592 #endif593 594 if (uiResidual)595 {596 // encode sign bit of residual597 m_pcBinIf->encodeBinEP( uiSign );598 #if H_MV_ENC_DEC_TRAC599 DTRACE_CU("sdc_residual_sign_flag[i]", uiSign)600 #endif601 #if H_3D_DIM_DLT602 UInt uiNumDepthValues = pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() );603 #else604 UInt uiNumDepthValues = ((1 << g_bitDepthY)-1);605 #endif606 607 assert(uiAbsIdx <= uiNumDepthValues);608 609 // encode residual magnitude610 uiAbsIdx -= 1;611 612 #if H_MV_ENC_DEC_TRAC613 DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx)614 #endif615 616 // prefix part617 if ( uiAbsIdx == 0 )618 {619 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );620 }621 else622 {623 UInt l = uiAbsIdx;624 UInt k = 0;625 UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2);626 while ( l > 0 && k < uiPrefixThreshold )627 {628 m_pcBinIf->encodeBin( 1, m_cSDCResidualSCModel.get(0, 0, 0) );629 l--;630 k++;631 }632 if ( uiAbsIdx < uiPrefixThreshold )633 {634 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );635 }636 else637 { // suffix part638 uiAbsIdx -= uiPrefixThreshold;639 UInt uiSuffixLength = numBitsForValue(uiNumDepthValues - uiPrefixThreshold);640 UInt uiBitInfo = 0;641 for ( Int i = 0; i < uiSuffixLength; i++)642 {643 uiBitInfo = ( uiAbsIdx & ( 1 << i ) ) >> i;644 m_pcBinIf->encodeBinEP( uiBitInfo);645 }646 }647 }648 649 }650 }651 #endif652 #endif653 561 #endif 654 562 … … 717 625 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 718 626 #if H_3D_QTLPC 719 #if MTK_I0099_VPS_EX2720 627 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 721 628 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 722 #else723 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS();724 #endif725 629 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 726 630 Bool bDepthMapDetect = (pcTexture != NULL); … … 731 635 Bool depthDependent = false; 732 636 UInt uiTexturePart = eSize; 733 #if MTK_I0099_VPS_EX2 734 #if LGE_FCO_I0116637 638 #if H_3D_FCO 735 639 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark()) 736 640 #else 737 641 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag ) 738 #endif739 #else740 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC() )741 642 #endif 742 643 { … … 1097 998 Bool bCodeSplitFlag = true; 1098 999 1099 #if MTK_I0099_VPS_EX21100 1000 TComVPS *vps = pcCU->getPic()->getSlice(0)->getVPS(); 1101 1001 Bool bLimQtPredFlag = vps->getLimQtPredFlag(pcCU->getPic()->getSlice(0)->getLayerId()); 1102 #else1103 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS();1104 #endif1105 1002 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 1106 1003 Bool bDepthMapDetect = (pcTexture != NULL); … … 1109 1006 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); 1110 1007 1111 #if MTK_I0099_VPS_EX2 1112 #if LGE_FCO_I0116 1008 #if H_3D_FCO 1113 1009 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag && pcTexture->getReconMark() ) 1114 1010 #else 1115 1011 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && bLimQtPredFlag ) 1116 #endif1117 #else1118 if(bDepthMapDetect && !bIntraSliceDetect && !rapPic && pcCU->getPic()->getReduceBitsFlag() && sps->getUseQTL() && sps->getUsePC())1119 1012 #endif 1120 1013 { … … 1167 1060 dir[j] = pcCU->getLumaIntraDir( absPartIdx+partOffset*j ); 1168 1061 #if H_3D_DIM 1169 #if SEPARATE_FLAG_I00851170 1062 if( pcCU->getSlice()->getVpsDepthModesFlag() || pcCU->getSlice()->getIVPFlag() ) 1171 #else1172 if( pcCU->getSlice()->getVpsDepthModesFlag() )1173 #endif1174 1063 { 1175 1064 codeIntraDepth( pcCU, absPartIdx+partOffset*j ); … … 1317 1206 } 1318 1207 //mode coding 1319 #if SEPARATE_FLAG_I00851320 1208 if( pcCU->getSlice()->getVpsDepthModesFlag() && pcCU->getSlice()->getIVPFlag()) 1321 1209 { 1322 1210 m_pcBinIf->encodeBin( uiCodeIdx == 0 ? 0 : 1, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) ); 1323 1211 } 1324 #else1325 m_pcBinIf->encodeBin( uiCodeIdx == 0 ? 0 : 1, m_cDepthIntraModeSCModel.get( 0, 0, 0 ) );1326 #endif1327 1212 } 1328 1213 } … … 2368 2253 } 2369 2254 2370 #if HS_DMM_SIGNALLING_I01202371 2255 UInt uiNumSegments = isDimMode( pcCU->getLumaIntraDir( absPartIdx ) ) ? 2 : 1; 2372 2256 UInt dimDeltaDC = 1; 2373 #else 2374 UInt uiNumSegments = 0; 2375 UInt dimDeltaDC = 0; 2376 #endif 2377 2378 #if HS_DMM_SIGNALLING_I0120 2257 2379 2258 if( pcCU->isIntra( absPartIdx ) && pcCU->getSDCFlag( absPartIdx )) 2380 2259 { 2381 #else2382 if( pcCU->isIntra( absPartIdx ) )2383 {2384 UInt dir = pcCU->getLumaIntraDir( absPartIdx );2385 uiNumSegments = isDimMode( dir ) ? 2 : 1;2386 2387 if( pcCU->getSDCFlag( absPartIdx ) )2388 {2389 #endif2390 2260 if( uiNumSegments == 1 ) 2391 2261 { … … 2396 2266 dimDeltaDC = ( pcCU->getSDCSegmentDCOffset( 0, absPartIdx ) || pcCU->getSDCSegmentDCOffset( 1, absPartIdx ) ) ? 1 : 0; 2397 2267 } 2398 #if !HS_DMM_SIGNALLING_I01202399 }2400 else2401 {2402 dimDeltaDC = isDimDeltaDC( dir );2403 }2404 #endif2405 2268 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get( 0, 0, 0 ) ); 2406 2269 } 2407 #if !HS_DMM_SIGNALLING_I01202408 else //all-zero inter SDC is not allowed2409 {2410 uiNumSegments = 1;2411 dimDeltaDC = 1;2412 }2413 #endif2414 2270 2415 2271 if( dimDeltaDC ) … … 2447 2303 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2448 2304 { 2449 #if SEC_DBBP_EXPLICIT_SIG_I00772450 2305 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx ); 2451 2306 AOF( ePartSize == SIZE_2NxN || ePartSize == SIZE_Nx2N ); 2452 #endif2453 2307 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2454 2308 AOF( !pcCU->getSlice()->getIsDepth() ); -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r1039 r1084 130 130 Void xCodeDmm1WedgeIdx ( UInt uiTabIdx, Int iNumBit ); 131 131 #endif 132 #if !FIX_TICKET_76133 #if H_3D_DIM_SDC134 Void xCodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );135 #endif136 #endif137 132 #endif 138 133 … … 155 150 Void codeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ); 156 151 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 157 #if MTK_SINGLE_DEPTH_MODE_I0095152 #if H_3D_SINGLE_DEPTH 158 153 Void codeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx ); 159 154 #endif … … 224 219 ContextModel3DBuffer m_cCUSplitFlagSCModel; 225 220 ContextModel3DBuffer m_cCUSkipFlagSCModel; 226 #if MTK_SINGLE_DEPTH_MODE_I0095221 #if H_3D_SINGLE_DEPTH 227 222 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel; 228 223 ContextModel3DBuffer m_cSingleDepthValueSCModel; -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r1066 r1084 915 915 } 916 916 m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true ); 917 #if MTK_SINGLE_DEPTH_MODE_I0095917 #if H_3D_SINGLE_DEPTH 918 918 m_pcEntropyCoder->encodeSingleDepthMode(pcCU, 0, true ); 919 919 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) … … 921 921 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 922 922 } 923 #if MTK_SINGLE_DEPTH_MODE_I0095923 #if H_3D_SINGLE_DEPTH 924 924 else 925 925 { … … 927 927 } 928 928 #endif 929 #if MTK_SINGLE_DEPTH_MODE_I0095929 #if H_3D_SINGLE_DEPTH 930 930 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 931 931 { … … 945 945 } 946 946 } 947 #if MTK_SINGLE_DEPTH_MODE_I0095948 } 949 #endif 950 } 951 #if MTK_SINGLE_DEPTH_MODE_I0095947 #if H_3D_SINGLE_DEPTH 948 } 949 #endif 950 } 951 #if H_3D_SINGLE_DEPTH 952 952 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 953 953 { … … 995 995 } 996 996 } 997 #if MTK_SINGLE_DEPTH_MODE_I0095997 #if H_3D_SINGLE_DEPTH 998 998 } 999 999 #endif … … 1859 1859 dRDCost += dSingleCost; 1860 1860 } 1861 #if MTK_SINGLE_DEPTH_MODE_I00951861 #if H_3D_SINGLE_DEPTH 1862 1862 Void TEncSearch::xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel *DepthNeighbor ) 1863 1863 { … … 1970 1970 UInt dimType = getDimType ( uiLumaPredMode ); 1971 1971 UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx); 1972 #if SHARP_DMM1_I01101973 1972 UInt uiBaseWidth = pcCU->isDMM1UpscaleMode(uiWidth) ? pcCU->getDMM1BasePatternWidth(uiWidth) : uiWidth; 1974 1973 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiBaseWidth]].size() && dimType == DMM1_IDX ) 1975 #else 1976 if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX ) 1977 #endif 1978 { 1979 #if SHARP_DMM1_I0110 1974 { 1980 1975 if (g_aucConvertToBit[uiBaseWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used. 1981 #else1982 if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.1983 #endif1984 1976 { 1985 1977 patternID = 1349; // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16 … … 2043 2035 Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx); 2044 2036 2045 #if SHARP_DMM1_I01102046 2037 WedgeList* pacWedgeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 2047 #else2048 WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];2049 #endif2050 2038 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 2051 2039 2052 2040 uiNumSegments = 2; 2053 #if SHARP_DMM1_I01102054 2041 pbMask = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern( uiWidth ) : pcWedgelet->getPattern(); 2055 2042 uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride(); 2056 #else2057 pbMask = pcWedgelet->getPattern();2058 uiMaskStride = pcWedgelet->getStride();2059 #endif2060 2043 } 2061 2044 if( getDimType( uiLumaPredMode ) == DMM4_IDX ) … … 2878 2861 pcCU->setChromIntraDirSubParts( uiBestMode, 0, pcCU->getDepth( 0 ) ); 2879 2862 } 2880 #if MTK_SINGLE_DEPTH_MODE_I00952863 #if H_3D_SINGLE_DEPTH 2881 2864 Void 2882 2865 TEncSearch::estIntraPredSingleDepth( TComDataCU* pcCU, … … 2900 2883 Pel DepthNeighbours[5]; 2901 2884 //construction of depth candidates 2902 for( Int i = 0; (i < 5) && (index< MTK_SINGLE_DEPTH_MODE_CANDIDATE_LIST_SIZE) ; i++ )2885 for( Int i = 0; (i < 5) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ ) 2903 2886 { 2904 2887 if(!pcCU->getNeighDepth (0, 0, &testDepth, i)) … … 2983 2966 UInt& ruiDistC, 2984 2967 Bool bLumaOnly 2985 #if H HI_DMM4_ENC_I00662968 #if H_3D_DIM 2986 2969 , Bool bOnlyIVP 2987 2970 #endif … … 3032 3015 Int numModesForFullRD = g_aucIntraModeNumFast[ uiWidthBit ]; 3033 3016 3034 #if H HI_DMM4_ENC_I00663017 #if H_3D_DIM 3035 3018 if( bOnlyIVP ) 3036 3019 { … … 3080 3063 UInt iModeBits = xModeBitsIntra( pcCU, uiMode, uiPU, uiPartOffset, uiDepth, uiInitTrDepth ); 3081 3064 #if H_3D_VSO // M35 3082 #if H_3D_VSO_FIX // This fix should be enabled after verification3083 3065 Double dLambda; 3084 3066 if ( m_pcRdCost->getUseLambdaScaleVSO() ) … … 3092 3074 3093 3075 Double cost = (Double)uiSad + (Double)iModeBits * dLambda; 3094 #else3095 Double cost = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda();3096 #endif3097 3076 #else 3098 3077 Double cost = (Double)uiSad + (Double)iModeBits * m_pcRdCost->getSqrtLambda(); … … 3135 3114 } 3136 3115 } 3137 #if H HI_DMM4_ENC_I00663116 #if H_3D_DIM 3138 3117 } 3139 3118 #endif … … 3143 3122 if( m_pcEncCfg->getIsDepth() && uiWidth >= DIM_MIN_SIZE && uiWidth <= DIM_MAX_SIZE && uiWidth == uiHeight ) 3144 3123 { 3145 #if HHI_DMM4_ENC_I00663146 #if SEPARATE_FLAG_I00853147 3124 if( bOnlyIVP && m_pcEncCfg->getUseIVP() ) 3148 #else3149 if( bOnlyIVP )3150 #endif3151 3125 { 3152 3126 TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight ); … … 3158 3132 pcCU->setDimDeltaDC( DMM4_IDX, 1, uiPartOffset, deltaDC2 ); 3159 3133 3160 #if HS_DMM_SIGNALLING_I01203161 3134 uiRdModeList[ numModesForFullRD++ ] = (DMM4_IDX+DIM_OFFSET); 3162 #else3163 uiRdModeList[ numModesForFullRD++ ] = (2*DMM4_IDX +DIM_OFFSET);3164 if( deltaDC1 != 0 || deltaDC2 != 0 )3165 uiRdModeList[ numModesForFullRD++ ] = (2*DMM4_IDX+1+DIM_OFFSET);3166 #endif3167 3135 dmm4Segmentation->destroy(); delete dmm4Segmentation; 3168 3136 } 3169 3137 else 3170 3138 { 3171 #endif3172 3139 #if H_3D_FAST_DEPTH_INTRA 3173 3140 Int threshold = max(((pcCU->getQP(0))>>3)-1,3); … … 3177 3144 3178 3145 #if H_3D_DIM_DMM 3179 #if SEPARATE_FLAG_I00853180 3146 if( ( m_pcEncCfg->getUseDMM() || m_pcEncCfg->getUseIVP() ) 3181 #else3182 if( m_pcEncCfg->getUseDMM()3183 #endif3184 3147 #if H_3D_FAST_DEPTH_INTRA 3185 3148 && (uiRdModeList[0] != PLANAR_IDX || varCU >= varThreshold) … … 3187 3150 ) 3188 3151 { 3189 #if SEPARATE_FLAG_I00853190 3152 UInt uiStart, uiEnd; 3191 3153 if( m_pcEncCfg->getUseDMM() && m_pcEncCfg->getUseIVP() ) … … 3210 3172 } 3211 3173 for( UInt dmmType = uiStart; dmmType < uiEnd; dmmType++ ) 3212 #else3213 for( UInt dmmType = 0; dmmType < DMM_NUM_TYPE; dmmType++ )3214 #endif3215 3174 { 3216 3175 #if H_3D_FCO 3217 3176 TComPic* picTexture = pcCU->getSlice()->getIvPic(false, pcCU->getSlice()->getViewIndex() ); 3218 #if LGE_FCO_I01163177 #if H_3D_FCO 3219 3178 if ( !picTexture->getReconMark() && (DMM4_IDX == dmmType ) ) 3220 3179 #else … … 3234 3193 xSearchDmm1Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx ); 3235 3194 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dmmType, uiPartOffset, uiDepth + uiInitTrDepth ); 3236 #if SHARP_DMM1_I01103237 3195 biSegmentation = pcCU->isDMM1UpscaleMode( uiWidth ) ? 3238 3196 &(g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])][uiTabIdx]) : &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]); 3239 #else3240 biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]);3241 #endif3242 3197 } break; 3243 3198 … … 3254 3209 if( biSegmentation ) 3255 3210 { 3256 #if SHARP_DMM1_I01103257 3211 if( dmmType == DMM1_IDX && pcCU->isDMM1UpscaleMode( uiWidth ) ){ 3258 3212 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getScaledPattern(uiWidth), uiWidth, uiWidth, uiHeight, deltaDC1, deltaDC2 ); … … 3262 3216 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 ); 3263 3217 } 3264 #else3265 xSearchDmmDeltaDCs( pcCU, uiPartOffset, piOrg, piPred, uiStride, biSegmentation->getPattern(), biSegmentation->getStride(), uiWidth, uiHeight, deltaDC1, deltaDC2 );3266 #endif3267 3218 pcCU->setDimDeltaDC( dmmType, 0, uiPartOffset, deltaDC1 ); 3268 3219 pcCU->setDimDeltaDC( dmmType, 1, uiPartOffset, deltaDC2 ); 3269 3220 3270 #if HS_DMM_SIGNALLING_I01203271 3221 uiRdModeList[ numModesForFullRD++ ] = (dmmType +DIM_OFFSET); 3272 #else3273 uiRdModeList[ numModesForFullRD++ ] = (2*dmmType +DIM_OFFSET);3274 #if HHI_DMM4_ENC_I00663275 if( deltaDC1 != 0 || deltaDC2 != 0 )3276 #endif3277 uiRdModeList[ numModesForFullRD++ ] = (2*dmmType+1+DIM_OFFSET);3278 #endif3279 3280 3222 if( DMM4_IDX == dmmType ) { biSegmentation->destroy(); delete biSegmentation; } 3281 3223 } 3282 3224 } 3283 3225 } 3284 #if H HI_DMM4_ENC_I00663226 #if H_3D_DIM 3285 3227 } 3286 3228 #endif … … 3295 3237 3296 3238 UInt uiBestPUMode = 0; 3297 #if SCU_HS_FAST_INTRA_SDC_I01233239 #if H_3D_FAST_INTRA_SDC 3298 3240 UInt uiBestPUModeConv = 0; 3299 3241 UInt uiSecondBestPUModeConv = 0; … … 3309 3251 Double dBestPUCost = MAX_DOUBLE; 3310 3252 3311 #if SCU_HS_FAST_INTRA_SDC_I01233253 #if H_3D_FAST_INTRA_SDC 3312 3254 Double dBestPUCostConv = MAX_DOUBLE; 3313 3255 UInt varCU = m_pcRdCost->calcVAR(piOrg, uiStride, uiWidth,uiHeight,pcCU->getDepth(0)); … … 3319 3261 Pel apBestDCOffsets[2] = {0,0}; 3320 3262 #endif 3321 #if SCU_HS_FAST_INTRA_SDC_I01233263 #if H_3D_FAST_INTRA_SDC 3322 3264 for( UInt uiMode = 0; uiMode < numModesForFullRD + rdSDC; uiMode++ ) 3323 3265 #else … … 3326 3268 { 3327 3269 // set luma prediction mode 3328 #if ! SCU_HS_FAST_INTRA_SDC_I01233270 #if !H_3D_FAST_INTRA_SDC 3329 3271 UInt uiOrgMode = uiRdModeList[uiMode]; 3330 3272 #endif 3331 3273 3332 #if SCU_HS_FAST_INTRA_SDC_I01233274 #if H_3D_FAST_INTRA_SDC 3333 3275 UInt uiOrgMode; 3334 3276 if (uiMode < numModesForFullRD) … … 3356 3298 3357 3299 #if H_3D_DIM_SDC 3358 #if SCU_HS_FAST_INTRA_SDC_I01233300 #if H_3D_FAST_INTRA_SDC 3359 3301 Bool bTestSDC = ( m_pcEncCfg->getUseSDC() && pcCU->getSDCAvailable(uiPartOffset) && uiMode >= numModesForFullRD); 3360 3302 #else … … 3364 3306 for( UInt uiSDC=0; uiSDC<=(bTestSDC?1:0); uiSDC++ ) 3365 3307 { 3366 #if SCU_HS_FAST_INTRA_SDC_I01233308 #if H_3D_FAST_INTRA_SDC 3367 3309 if (!uiSDC && uiMode >= numModesForFullRD) continue; 3368 3310 #endif 3369 3311 pcCU->setSDCFlagSubParts( (uiSDC != 0), uiPartOffset, uiDepth + uiInitTrDepth ); 3370 #if FAST_SDC_OFFSET_DECISION_I00843371 3312 Double dOffsetCost[3] = {MAX_DOUBLE,MAX_DOUBLE,MAX_DOUBLE}; 3372 3313 for( Int iOffset = 1; iOffset <= 5; iOffset++ ) 3373 #else 3374 for( Int iSDCDeltaResi = -2; iSDCDeltaResi <= 2; iSDCDeltaResi++ ) 3375 #endif 3376 { 3377 #if FAST_SDC_OFFSET_DECISION_I0084 3314 { 3378 3315 Int iSDCDeltaResi = 0; 3379 3316 if(iOffset % 2 == 0) … … 3385 3322 iSDCDeltaResi = -1 * (iOffset >> 1); 3386 3323 } 3387 #endif3388 3324 if( ( uiSDC == 0 ) && iSDCDeltaResi != 0 ) 3389 3325 { 3390 3326 continue; 3391 3327 } 3392 #if FAST_SDC_OFFSET_DECISION_I00843393 3328 if( iOffset > 3) 3394 3329 { … … 3407 3342 } 3408 3343 #endif 3409 #endif3410 3344 3411 3345 #if H_3D_DIM_ENC || H_3D_DIM_SDC … … 3452 3386 // start encoding with SDC 3453 3387 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, ( testZeroResi != 0 ), iSDCDeltaResi ); 3454 #if FAST_SDC_OFFSET_DECISION_I00843455 3388 if ( testZeroResi == 0 && iOffset <= 3 ) 3456 3389 { 3457 3390 dOffsetCost [iOffset -1] = dPUCost; 3458 3391 } 3459 #endif3460 3392 } 3461 3393 else … … 3465 3397 #if H_3D_DIM_ENC 3466 3398 xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, (testZeroResi != 0) ); 3467 #if SCU_HS_FAST_INTRA_SDC_I01233399 #if H_3D_FAST_INTRA_SDC 3468 3400 if( dPUCost < dBestPUCostConv ) 3469 3401 { … … 4017 3949 #if H_3D_VSP 4018 3950 , Int* vspFlag 4019 #if !FIX_TICKET_794020 , InheritedVSPDisInfo* inheritedVSPDisInfo4021 #endif4022 3951 #endif 4023 3952 #if H_3D_SPIVMP … … 4079 4008 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand); 4080 4009 pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 4081 #if H_3D_VSP && !FIX_TICKET_794082 , inheritedVSPDisInfo4083 #endif4084 4010 #if H_3D_SPIVMP 4085 4011 , pcMvFieldSP, puhInterDirSP … … 4109 4035 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand); 4110 4036 pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours 4111 #if H_3D_VSP && !FIX_TICKET_794112 , inheritedVSPDisInfo4113 #endif4114 4037 #if H_3D_SPIVMP 4115 4038 , pcMvFieldSP, puhInterDirSP … … 4132 4055 #endif 4133 4056 } 4134 #if H_3D_VSP && !FIX_TICKET_754135 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours,vspFlag, numValidMergeCand );4136 #else4137 4057 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 4138 #endif4139 4058 4140 4059 #if H_3D_DBBP … … 4164 4083 #if H_3D_VSP 4165 4084 pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 4166 #if !FIX_TICKET_794167 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );4168 #endif4169 4085 #endif 4170 4086 … … 4266 4182 * \returns Void 4267 4183 */ 4268 #if H_3D_VSP && !FIX_TICKET_754269 Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int* vspFlag, Int numValidMergeCand )4270 #else4271 4184 Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int numValidMergeCand ) 4272 #endif4273 4185 { 4274 4186 if ( pcCU->isBipredRestriction(puIdx) ) … … 4276 4188 for( UInt mergeCand = 0; mergeCand < numValidMergeCand; ++mergeCand ) 4277 4189 { 4278 #if H_3D_VSP && !FIX_TICKET_754279 if ( (interDirNeighbours[mergeCand] == 3) && (vspFlag[mergeCand] == false) )4280 #else4281 4190 if ( interDirNeighbours[mergeCand] == 3 ) 4282 #endif4283 4191 { 4284 4192 interDirNeighbours[mergeCand] = 1; … … 4902 4810 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 4903 4811 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 4904 #if !FIX_TICKET_794905 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];4906 #endif4907 4812 UInt uiAbsPartIdx = 0; 4908 4813 Int iWidth = 0; … … 4922 4827 #if H_3D_VSP 4923 4828 , vspFlag 4924 #if !FIX_TICKET_794925 , inheritedVSPDisInfo4926 #endif4927 4829 #endif 4928 4830 #if H_3D_SPIVMP … … 4938 4840 #if H_3D_VSP 4939 4841 pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4940 #if !FIX_TICKET_794941 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );4942 #endif4943 4842 #endif 4944 4843 #if H_3D_DDD … … 6430 6329 if( bCodeChroma ) 6431 6330 { 6331 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6332 m_pcEntropyCoder->resetBits(); 6432 6333 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode ); 6433 6334 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U ); 6434 uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsY;6335 uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits(); 6435 6336 6337 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6338 m_pcEntropyCoder->resetBits(); 6436 6339 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode ); 6437 6340 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V ); 6438 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - ( uiSingleBitsY + uiSingleBitsU );6341 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits(); 6439 6342 } 6440 6343 … … 6517 6420 const Double singleCostY = m_pcRdCost->calcRdCost( uiSingleBitsY, uiNonzeroDistY ); 6518 6421 #endif 6422 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6423 6519 6424 m_pcEntropyCoder->resetBits(); 6520 6425 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA, uiTrMode ); … … 6550 6455 else if( checkTransformSkipY ) 6551 6456 { 6457 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6552 6458 m_pcEntropyCoder->resetBits(); 6553 6459 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA, uiTrMode ); … … 6606 6512 { 6607 6513 const Double dSingleCostU = m_pcRdCost->calcRdCost( uiSingleBitsU, uiNonzeroDistU ); 6514 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6608 6515 m_pcEntropyCoder->resetBits(); 6609 6516 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U, uiTrMode ); … … 6631 6538 else if( checkTransformSkipUV ) 6632 6539 { 6540 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6633 6541 m_pcEntropyCoder->resetBits(); 6634 6542 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U, uiTrMode ); … … 6675 6583 { 6676 6584 const Double dSingleCostV = m_pcRdCost->calcRdCost( uiSingleBitsV, uiNonzeroDistV ); 6585 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6677 6586 m_pcEntropyCoder->resetBits(); 6678 6587 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V, uiTrMode ); … … 6700 6609 else if( checkTransformSkipUV ) 6701 6610 { 6611 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6702 6612 m_pcEntropyCoder->resetBits(); 6703 6613 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V, uiTrMode ); … … 6896 6806 pcCU->setCbfSubParts( uiAbsSumTransformSkipV ? uiSetCbf : 0, TEXT_CHROMA_V, uiAbsPartIdx, pcCU->getDepth(0)+uiTrModeC ); 6897 6807 6898 m_pcEntropyCoder->resetBits();6899 6808 uiSingleBitsU = 0; 6900 6809 uiSingleBitsV = 0; … … 6902 6811 if( uiAbsSumTransformSkipU ) 6903 6812 { 6813 m_pcEntropyCoder->resetBits(); 6904 6814 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode ); 6905 6815 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U ); … … 6944 6854 if( uiAbsSumTransformSkipV ) 6945 6855 { 6856 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 6857 m_pcEntropyCoder->resetBits(); 6946 6858 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode ); 6947 6859 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V ); 6948 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsU;6860 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits(); 6949 6861 6950 6862 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr(); … … 7388 7300 } 7389 7301 m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true ); 7390 #if MTK_SINGLE_DEPTH_MODE_I00957302 #if H_3D_SINGLE_DEPTH 7391 7303 m_pcEntropyCoder->encodeSingleDepthMode ( pcCU, 0, true ); 7392 7304 #endif … … 7845 7757 7846 7758 Pel refDC1 = 0; Pel refDC2 = 0; 7847 #if SHARP_DMM1_I01107848 7759 WedgeList* pacWedgeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 7849 7760 WedgeNodeList* pacWedgeNodeList = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeNodeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])]; 7850 #else7851 WedgeList* pacWedgeList = &g_dmmWedgeLists [(g_aucConvertToBit[uiWidth])];7852 WedgeNodeList* pacWedgeNodeList = &g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])];7853 #endif7854 7761 7855 7762 // coarse wedge search … … 7859 7766 { 7860 7767 TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())); 7861 #if SHARP_DMM1_I01107862 7768 Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern(); 7863 7769 UInt uiStride = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride(); 7864 7770 xCalcBiSegDCs ( piRef, uiRefStride, pbPattern, uiStride, refDC1, refDC2 ); 7865 7771 xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7866 #else7867 xCalcBiSegDCs ( piRef, uiRefStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );7868 xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );7869 #endif7870 7772 7871 7773 Dist uiActDist = RDO_DIST_MAX; … … 7903 7805 { 7904 7806 TComWedgelet* pcWedgelet = &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))); 7905 #if SHARP_DMM1_I01107906 7807 Bool *pbPattern = pcCU->isDMM1UpscaleMode(uiWidth) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern(); 7907 7808 UInt uiStride = pcCU->isDMM1UpscaleMode(uiWidth) ? uiWidth : pcWedgelet->getStride(); 7908 7809 xCalcBiSegDCs ( piRef, uiRefStride, pbPattern, uiStride, refDC1, refDC2 ); 7909 7810 xAssignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 ); 7910 #else7911 xCalcBiSegDCs ( piRef, uiRefStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );7912 xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 );7913 #endif7914 7811 Dist uiActDist = RDO_DIST_MAX; 7915 7812 #if H_3D_VSO -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r1039 r1084 181 181 UInt& ruiDistC, 182 182 Bool bLumaOnly 183 #if H HI_DMM4_ENC_I0066183 #if H_3D_DIM 184 184 , Bool bOnlyIVP 185 185 #endif … … 191 191 TComYuv* pcRecoYuv, 192 192 UInt uiPreCalcDistC ); 193 #if MTK_SINGLE_DEPTH_MODE_I0095193 #if H_3D_SINGLE_DEPTH 194 194 Void estIntraPredSingleDepth ( TComDataCU* pcCU, 195 195 TComYuv* pcOrgYuv, … … 354 354 UInt uiAbsPartIdx, 355 355 UInt stateU0V1Both2 ); 356 #if MTK_SINGLE_DEPTH_MODE_I0095356 #if H_3D_SINGLE_DEPTH 357 357 Void xIntraCodingSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Int iTestDepthIdx, Pel * DepthNeighbor ); 358 358 #endif … … 429 429 #if H_3D_VSP 430 430 , Int* vspFlag 431 #if !FIX_TICKET_79432 , InheritedVSPDisInfo* inheritedVSPDisInfo433 #endif434 431 #endif 435 432 #if H_3D_SPIVMP … … 443 440 TComMvField* mvFieldNeighbours, 444 441 UChar* interDirNeighbours, 445 #if H_3D_VSP && !FIX_TICKET_75446 Int* vspFlag,447 #endif448 442 Int numValidMergeCand ); 449 443 -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r1066 r1084 72 72 ContextModel::buildNextStateTable(); 73 73 #endif 74 #if H_MV_HLS10_GEN_FIX75 74 #if H_MV 76 75 m_iNumSubstreams = 0; 77 #endif78 76 #endif 79 77 … … 89 87 m_ivPicLists = NULL; 90 88 #endif 91 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX89 #if H_3D_IC 92 90 m_aICEnableCandidate = NULL; 93 91 m_aICEnableNum = NULL; … … 236 234 for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ ) 237 235 { 238 #if H_MV_HLS10_GEN_FIX239 236 #if H_MV 240 237 xDelete( false, m_pppcRDSbacCoder, iDepth, iCIIdx); … … 244 241 delete m_pppcBinCoderCABAC[iDepth][iCIIdx]; 245 242 #endif 246 #endif247 243 } 248 244 } … … 250 246 for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ ) 251 247 { 252 #if H_MV_HLS10_GEN_FIX253 248 #if H_MV 254 249 xDelete( true, m_pppcRDSbacCoder , iDepth); … … 258 253 delete [] m_pppcBinCoderCABAC[iDepth]; 259 254 #endif 260 #endif 261 } 262 263 #if H_MV_HLS10_GEN_FIX 255 } 256 264 257 #if H_MV 265 258 xDelete( true, m_pppcRDSbacCoder ); … … 269 262 delete [] m_pppcBinCoderCABAC; 270 263 #endif 271 #endif272 264 for ( UInt ui = 0; ui < m_iNumSubstreams; ui++ ) 273 265 { … … 276 268 for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ ) 277 269 { 278 #if H_MV_HLS10_GEN_FIX279 270 #if H_MV 280 271 xDelete(false, m_ppppcRDSbacCoders ,ui, iDepth, iCIIdx); … … 284 275 delete m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx]; 285 276 #endif 286 #endif287 277 } 288 278 } … … 290 280 for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ ) 291 281 { 292 #if H_MV_HLS10_GEN_FIX293 282 #if H_MV 294 283 xDelete(true, m_ppppcRDSbacCoders ,ui, iDepth); … … 298 287 delete [] m_ppppcBinCodersCABAC[ui][iDepth]; 299 288 #endif 300 #endif 301 } 302 303 304 #if H_MV_HLS10_GEN_FIX 289 } 290 291 305 292 #if H_MV 306 293 xDelete(true, m_ppppcRDSbacCoders, ui); … … 310 297 delete[] m_ppppcBinCodersCABAC[ui]; 311 298 #endif 312 #endif 313 } 314 #if H_MV_HLS10_GEN_FIX 299 } 315 300 #if H_MV 316 301 xDelete(true, m_ppppcRDSbacCoders ) ; … … 332 317 delete[] m_pcRdCosts; 333 318 #endif 334 #endif335 319 336 320 #if !H_MV … … 370 354 371 355 xInitPPSforTiles(); 372 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX356 #if H_3D_IC 373 357 m_aICEnableCandidate = new Int[ 10 ]; 374 358 m_aICEnableNum = new Int[ 10 ]; … … 769 753 #if H_MV 770 754 m_cSPS.setUpdateRepFormatFlag ( false ); 771 #if H_MV_HLS10_MULTILAYERSPS772 755 Bool multiLayerExtensionFlag = ( getLayerId() > 0 ) && ( m_cVPS->getNumRefLayers( getLayerId() ) > 0 ); 773 756 … … 778 761 m_cSPS.setSpsScalingListRefLayerId( m_cVPS->getIdRefLayer( getLayerId(), 0 ) ); 779 762 } 780 #else781 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) );782 m_cSPS.setSpsScalingListRefLayerId ( 0 );783 #endif784 763 m_cSPS.setSpsExtensionPresentFlag ( true ); 785 764 m_cSPS.setSpsMultilayerExtensionFlag ( true ); … … 829 808 m_cSPS.setUseAMP ( m_useAMP ); 830 809 831 #if !MTK_I0099_VPS_EX2832 #if H_3D_QTLPC833 m_cSPS.setUseQTL( m_bUseQTL );834 m_cSPS.setUsePC ( m_bUsePC );835 #endif836 #endif837 838 810 for (i = g_uiMaxCUDepth-g_uiAddCUDepth; i < g_uiMaxCUDepth; i++ ) 839 811 { … … 863 835 for( Int is = 0; is < targetDecLayerIdList.size(); is++ ) 864 836 { 865 #if H_MV_HLS10_ADD_LAYERSETS866 837 if ( m_cVPS->getNecessaryLayerFlag( ols, is ) ) 867 838 { 868 839 m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true ); 869 840 } 870 #else 871 m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true ); 872 #endif 873 } 874 } 875 #if !H_MV_HLS10_ADD_LAYERSETS 876 m_cVPS->inferDbpSizeLayerSetZero( &m_cSPS, true ); 877 #endif 841 } 842 } 878 843 #endif 879 844 m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma); … … 889 854 { 890 855 TComVUI* pcVUI = m_cSPS.getVuiParameters(); 891 pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioI dc() != -1);856 pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioInfoPresentFlag()); 892 857 pcVUI->setAspectRatioIdc(getAspectRatioIdc()); 893 858 pcVUI->setSarWidth(getSarWidth()); … … 1323 1288 Void TEncTop::xInitPPSforTiles() 1324 1289 { 1325 m_cPPS.set UniformSpacingFlag( m_iUniformSpacingIdr);1326 m_cPPS.setNum ColumnsMinus1( m_iNumColumnsMinus1 );1327 m_cPPS.setNum RowsMinus1( m_iNumRowsMinus1 );1328 if( m_iUniformSpacingIdr == 0)1329 { 1330 m_cPPS.set ColumnWidth( m_puiColumnWidth );1331 m_cPPS.set RowHeight( m_puiRowHeight );1290 m_cPPS.setTileUniformSpacingFlag( m_tileUniformSpacingFlag ); 1291 m_cPPS.setNumTileColumnsMinus1( m_iNumColumnsMinus1 ); 1292 m_cPPS.setNumTileRowsMinus1( m_iNumRowsMinus1 ); 1293 if( !m_tileUniformSpacingFlag ) 1294 { 1295 m_cPPS.setTileColumnWidth( m_tileColumnWidth ); 1296 m_cPPS.setTileRowHeight( m_tileRowHeight ); 1332 1297 } 1333 1298 m_cPPS.setLoopFilterAcrossTilesEnabledFlag( m_loopFilterAcrossTilesEnabledFlag ); 1334 1299 1335 1300 // # substreams is "per tile" when tiles are independent. 1336 if (m_iWaveFrontSynchro 1337 ) 1301 if (m_iWaveFrontSynchro ) 1338 1302 { 1339 1303 m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)); … … 1361 1325 } 1362 1326 1363 if( m_iNumColumnsMinus1 && m_iUniformSpacingIdr==0)1327 if( m_iNumColumnsMinus1 && !m_tileUniformSpacingFlag ) 1364 1328 { 1365 1329 for(Int i=0; i<m_iNumColumnsMinus1; i++) 1366 1330 { 1367 uiCummulativeColumnWidth += m_ puiColumnWidth[i];1331 uiCummulativeColumnWidth += m_tileColumnWidth[i]; 1368 1332 } 1369 1333 … … 1388 1352 } 1389 1353 1390 if( m_iNumRowsMinus1 && m_iUniformSpacingIdr==0)1354 if( m_iNumRowsMinus1 && !m_tileUniformSpacingFlag ) 1391 1355 { 1392 1356 for(Int i=0; i<m_iNumRowsMinus1; i++) 1393 uiCummulativeRowHeight += m_ puiRowHeight[i];1357 uiCummulativeRowHeight += m_tileRowHeight[i]; 1394 1358 1395 1359 if( uiCummulativeRowHeight >= iHeightInCU ) -
trunk/source/Lib/TLibEncoder/TEncTop.h
r1066 r1084 80 80 TComPicLists* m_ivPicLists; ///< access to picture lists of other layers 81 81 #endif 82 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX82 #if H_3D_IC 83 83 Int *m_aICEnableCandidate; 84 84 Int *m_aICEnableNum; … … 150 150 Void xInitPPSforTiles (); 151 151 Void xInitRPS (Bool isFieldCoding); ///< initialize PPS from encoder options 152 #if H_MV_HLS10_GEN_FIX153 152 #if H_MV 154 153 … … 193 192 194 193 #endif 195 #endif196 194 public: 197 195 TEncTop(); … … 209 207 TComPicLists* getIvPicLists() { return m_ivPicLists; } 210 208 #endif 211 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX212 Int *getICEnableCandidate() { return m_aICEnableCandidate; }213 Int *getICEnableNum() { return m_aICEnableNum; }209 #if H_3D_IC 210 Int* getICEnableCandidate() { return m_aICEnableCandidate; } 211 Int* getICEnableNum() { return m_aICEnableNum; } 214 212 #endif 215 213 Void deletePicBuffer (); … … 272 270 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 273 271 #endif 274 #if MTK_LOW_LATENCY_IC_ENCODING_H0086_FIX272 #if H_3D_IC 275 273 Void setICEnableCandidate ( Int* ICEnableCandidate) { m_aICEnableCandidate = ICEnableCandidate; } 276 274 Void setICEnableNum ( Int* ICEnableNum) { m_aICEnableNum = ICEnableNum; }
Note: See TracChangeset for help on using the changeset viewer.