Changeset 618 in 3DVCSoftware for branches/HTM-8.0-dev0/source/Lib/TLibEncoder
- Timestamp:
- 9 Sep 2013, 23:15:14 (12 years ago)
- Location:
- branches/HTM-8.0-dev0/source/Lib/TLibEncoder
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp ¶
r615 r618 229 229 } 230 230 } 231 #if H_MV5 232 #if H_MV 233 if ( pcPPS->getLayerId() > 0 ) 234 { 235 WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" ); 236 } 237 238 if( pcPPS->getPpsInferScalingListFlag( ) ) 239 { 240 WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" ); 241 } 242 else 243 { 244 #endif 245 #endif 231 246 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 232 247 if( pcPPS->getScalingListPresentFlag() ) … … 237 252 codeScalingList( m_pcSlice->getScalingList() ); 238 253 } 254 #if H_MV5 255 #if H_MV 256 } 257 #endif 258 #endif 239 259 WRITE_FLAG( pcPPS->getListsModificationPresentFlag(), "lists_modification_present_flag"); 240 260 WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); … … 319 339 { 320 340 WRITE_FLAG(pcVUI->getTilesFixedStructureFlag(), "tiles_fixed_structure_flag"); 341 #if !H_MV5 321 342 #if H_MV 322 343 if ( pcSPS->getLayerId() > 0 ) … … 324 345 WRITE_FLAG( pcVUI->getTileBoundariesAlignedFlag( ) ? 1 : 0 , "tile_boundaries_aligned_flag" ); 325 346 } 347 #endif 326 348 #endif 327 349 WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(), "motion_vectors_over_pic_boundaries_flag"); … … 429 451 #endif 430 452 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 453 #if H_MV5 454 #if H_MV 455 if ( pcSPS->getLayerId() > 0 ) 456 { 457 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" ); 458 } 459 460 if ( pcSPS->getUpdateRepFormatFlag() ) 461 { 462 #endif 463 #endif 431 464 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); 432 465 assert(pcSPS->getChromaFormatIdc () == 1); … … 439 472 WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (), "pic_width_in_luma_samples" ); 440 473 WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(), "pic_height_in_luma_samples" ); 474 #if H_MV5 475 #if H_MV 476 } 477 #endif 478 #endif 441 479 Window conf = pcSPS->getConformanceWindow(); 442 480 … … 449 487 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 450 488 } 451 489 #if H_MV5 490 #if H_MV 491 if ( pcSPS->getUpdateRepFormatFlag() ) 492 { 493 #endif 494 #endif 452 495 WRITE_UVLC( pcSPS->getBitDepthY() - 8, "bit_depth_luma_minus8" ); 453 496 WRITE_UVLC( pcSPS->getBitDepthC() - 8, "bit_depth_chroma_minus8" ); 454 497 #if H_MV5 498 #if H_MV 499 } 500 #endif 501 #endif 455 502 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 456 503 … … 478 525 if(pcSPS->getScalingListFlag()) 479 526 { 527 #if H_MV5 528 #if H_MV 529 if ( pcSPS->getLayerId() > 0 ) 530 { 531 WRITE_FLAG( pcSPS->getSpsInferScalingListFlag( ) ? 1 : 0 , "sps_infer_scaling_list_flag" ); 532 } 533 534 if ( pcSPS->getSpsInferScalingListFlag() ) 535 { 536 WRITE_CODE( pcSPS->getSpsScalingListRefLayerId( ), 6, "sps_scaling_list_ref_layer_id" ); 537 } 538 else 539 { 540 #endif 541 #endif 480 542 WRITE_FLAG( pcSPS->getScalingListPresentFlag() ? 1 : 0, "sps_scaling_list_data_present_flag" ); 481 543 if(pcSPS->getScalingListPresentFlag()) … … 486 548 codeScalingList( m_pcSlice->getScalingList() ); 487 549 } 550 #if H_MV5 551 #if H_MV 552 } 553 #endif 554 #endif 488 555 } 489 556 WRITE_FLAG( pcSPS->getUseAMP() ? 1 : 0, "amp_enabled_flag" ); … … 531 598 } 532 599 600 #if !H_MV5 533 601 #if H_MV 534 602 WRITE_FLAG( 1, "sps_extension_flag" ); … … 586 654 #endif 587 655 } 656 #else 657 #if !H_MV 658 WRITE_FLAG( 0, "sps_extension_flag" ); 659 #else 660 WRITE_FLAG( 1, "sps_extension_flag" ); 661 codeSPSExtension( pcSPS ); 662 #if !H_3D 663 WRITE_FLAG( 0, "sps_extension2_flag" ); 664 #else 665 WRITE_FLAG( 1, "sps_extension2_flag" ); 666 codeSPSExtension2( pcSPS, viewIndex, depthFlag ); 667 WRITE_FLAG( 0, "sps_extension3_flag" ); 668 #endif 669 #endif 670 } 671 672 #if H_MV 673 Void TEncCavlc::codeSPSExtension( TComSPS* pcSPS ) 674 { 675 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 676 WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" ); 677 } 678 #endif 679 680 #if H_3D 681 Void TEncCavlc::codeSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 682 { 683 #if H_3D_QTLPC 684 //GT: This has to go to VPS 685 if( depthFlag ) 686 { 687 WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag"); 688 WRITE_FLAG( pcSPS->getUsePC() ? 1 : 0, "use_pc_flag"); 689 } 690 #endif 691 if (!depthFlag ) 692 { 693 WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" ); 694 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" ); 695 if( !pcSPS->hasCamParInSliceHeader() ) 696 { 697 for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ ) 698 { 699 WRITE_SVLC( pcSPS->getCodedScale ()[ uiIndex ], "cp_scale" ); 700 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiIndex ], "cp_off" ); 701 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" ); 702 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" ); 703 } 704 } 705 } 706 } 707 #endif 708 #endif 588 709 589 710 Void TEncCavlc::codeVPS( TComVPS* pcVPS ) … … 592 713 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); 593 714 #if H_MV 715 #if H_MV5 716 WRITE_CODE( pcVPS->getMaxLayersMinus1(), 6, "vps_max_layers_minus1" ); 717 #else 594 718 WRITE_CODE( pcVPS->getMaxLayers() - 1, 6, "vps_max_layers_minus1" ); 719 #endif 595 720 #else 596 721 WRITE_CODE( 0, 6, "vps_reserved_zero_6bits" ); … … 675 800 } 676 801 } 802 #if !H_MV5 677 803 #if H_MV 678 804 WRITE_FLAG( 1, "vps_extension_flag" ); … … 860 986 return; 861 987 } 988 #else 989 #if H_MV 990 WRITE_FLAG( 1, "vps_extension_flag" ); 991 m_pcBitIf->writeAlignOne(); 992 codeVPSExtension( pcVPS ); 993 #if H_3D 994 WRITE_FLAG( 1, "vps_extension2_flag" ); 995 m_pcBitIf->writeAlignOne(); 996 codeVPSExtension2( pcVPS ); 997 WRITE_FLAG( 0, "vps_extension3_flag" ); 998 #else 999 WRITE_FLAG( 0, "vps_extension2_flag" ); 1000 #endif 1001 #else 1002 WRITE_FLAG( 0, "vps_extension_flag" ); 1003 #endif 1004 //future extensions here.. 1005 } 1006 1007 #endif 1008 1009 1010 #if H_MV5 1011 #if H_MV 1012 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 1013 { 1014 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1015 WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16, "vps_vui_offset" ); // TBD 1016 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1017 1018 for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ ) 1019 { 1020 WRITE_FLAG( pcVPS->getScalabilityMaskFlag( type ) ? 1 : 0, "scalability_mask_flag[i]" ); 1021 } 1022 1023 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ ) 1024 { 1025 WRITE_CODE( pcVPS->getDimensionIdLen( sIdx ) - 1 , 3, "dimension_id_len_minus1[j]"); 1026 } 1027 1028 if ( pcVPS->getSplittingFlag() ) 1029 { // Ignore old dimension id length 1030 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 ); 1031 } 1032 1033 WRITE_FLAG( pcVPS->getVpsNuhLayerIdPresentFlag() ? 1 : 0, "vps_nuh_layer_id_present_flag"); 1034 1035 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1036 { 1037 if ( pcVPS->getVpsNuhLayerIdPresentFlag() ) 1038 { 1039 WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6, "layer_id_in_nuh[i]"); 1040 } 1041 else 1042 { 1043 assert( pcVPS->getLayerIdInNuh( i ) == i ); 1044 } 1045 1046 assert( pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i ); 1047 1048 for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ ) 1049 { 1050 if ( !pcVPS->getSplittingFlag() ) 1051 { 1052 WRITE_CODE( pcVPS->getDimensionId( i, j ), pcVPS->getDimensionIdLen( j ), "dimension_id[i][j]"); 1053 } 1054 else 1055 { 1056 assert( pcVPS->getDimensionId( i, j ) == pcVPS->inferDimensionId( i, j ) ); 1057 } 1058 } 1059 } 1060 1061 // GT spec says: trac #39 1062 // if ( pcVPS->getNumViews() > 1 ) 1063 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 1064 { 1065 WRITE_CODE( pcVPS->getViewIdLenMinus1( ), 4, "view_id_len_minus1" ); 1066 } 1067 1068 for( Int i = 0; i < pcVPS->getNumViews(); i++ ) 1069 { 1070 WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLenMinus1( ) + 1, "view_id_val[i]" ); 1071 } 1072 1073 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1074 { 1075 for( Int j = 0; j < i; j++ ) 1076 { 1077 WRITE_FLAG( pcVPS->getDirectDependencyFlag( i, j ), "direct_dependency_flag[i][j]" ); 1078 } 1079 } 1080 1081 WRITE_FLAG( pcVPS->getMaxTidRefPresentFlag( ) ? 1 : 0 , "max_tid_ref_present_flag" ); 1082 1083 if ( pcVPS->getMaxTidRefPresentFlag() ) 1084 { 1085 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1086 { 1087 WRITE_CODE( pcVPS->getMaxTidIlRefPicPlus1( i ), 3, "max_tid_il_ref_pics_plus1[i]" ); 1088 } 1089 } 1090 1091 WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" ); 1092 WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( ) , 10, "vps_number_layer_sets_minus1" ); 1093 WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6, "vps_num_profile_tier_level_minus1" ); 1094 1095 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1096 { 1097 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1098 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1099 { 1100 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" ); 1101 } 1102 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1103 } 1104 1105 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1106 1107 WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" ); 1108 1109 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ) 1110 { 1111 WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( ) , 10, "num_add_output_layer_sets_minus1" ); 1112 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 ); 1113 } 1114 1115 if( numOutputLayerSets > 1) 1116 { 1117 WRITE_FLAG( pcVPS->getDefaultOneTargetOutputLayerFlag( ) ? 1 : 0, "default_one_target_output_layer_flag" ); 1118 } 1119 1120 for( Int i = 1; i < numOutputLayerSets; i++ ) 1121 { 1122 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 1123 { 1124 WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" ); 1125 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ ) 1126 { 1127 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" ); 1128 } 1129 } 1130 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1131 { 1132 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1133 } 1134 } 1135 1136 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1137 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1138 { 1139 WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" ); 1140 } 1141 1142 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1143 { 1144 TComRepFormat* pcRepFormat = pcVPS->getRepFormat(i); 1145 codeRepFormat( pcRepFormat ); 1146 } 1147 1148 if( pcVPS->getRepFormatIdxPresentFlag() ) 1149 { 1150 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1151 { 1152 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1153 { 1154 WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 4, "vps_rep_format_idx" ); 1155 } 1156 } 1157 } 1158 1159 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); 1160 WRITE_FLAG( pcVPS->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1161 WRITE_UVLC( pcVPS->getDirectDepTypeLenMinus2 ( ), "direct_dep_type_len_minus2"); 1162 1163 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1164 { 1165 for( Int j = 0; j < i; j++ ) 1166 { 1167 if (pcVPS->getDirectDependencyFlag( i, j) ) 1168 { 1169 assert ( pcVPS->getDirectDependencyType( i, j ) != -1 ); 1170 WRITE_CODE( pcVPS->getDirectDependencyType( i, j ),pcVPS->getDirectDepTypeLenMinus2( ) + 2, "direct_dependency_type[i][j]" ); 1171 } 1172 } 1173 } 1174 1175 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 1176 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag( ) ? 1 : 0 , "vps_vui_present_flag" ); 1177 1178 if( pcVPS->getVpsVuiPresentFlag() ) 1179 { 1180 m_pcBitIf->writeAlignOne(); // vps_vui_alignment_bit_equal_to_one 1181 codeVPSVUI( pcVPS ); 1182 } 1183 } 1184 1185 Void TEncCavlc::codeRepFormat( TComRepFormat* pcRepFormat ) 1186 { 1187 assert( pcRepFormat ); 1188 1189 WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" ); 1190 1191 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) 1192 { 1193 WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" ); 1194 } 1195 WRITE_CODE( pcRepFormat->getPicWidthVpsInLumaSamples( ), 16, "pic_width_vps_in_luma_samples" ); 1196 WRITE_CODE( pcRepFormat->getPicHeightVpsInLumaSamples( ), 16, "pic_height_vps_in_luma_samples" ); 1197 WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ), 4, "bit_depth_vps_luma_minus8" ); 1198 WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ), 4, "bit_depth_vps_chroma_minus8" ); 1199 } 1200 1201 Void TEncCavlc::codeVPSVUI( TComVPS* pcVPS ) 1202 { 1203 assert( pcVPS ); 1204 1205 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1206 1207 assert( pcVPSVUI ); 1208 1209 WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" ); 1210 WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" ); 1211 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1212 { 1213 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ ) 1214 { 1215 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) 1216 { 1217 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) 1218 { 1219 WRITE_FLAG( pcVPSVUI->getBitRatePresentFlag( i, j ) ? 1 : 0 , "bit_rate_present_flag" ); 1220 } 1221 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) 1222 { 1223 WRITE_FLAG( pcVPSVUI->getPicRatePresentFlag( i, j ) ? 1 : 0 , "pic_rate_present_flag" ); 1224 } 1225 if( pcVPSVUI->getBitRatePresentFlag( i, j ) ) 1226 { 1227 WRITE_CODE( pcVPSVUI->getAvgBitRate( i, j ), 16, "avg_bit_rate" ); 1228 WRITE_CODE( pcVPSVUI->getMaxBitRate( i, j ), 16, "max_bit_rate" ); 1229 } 1230 if( pcVPSVUI->getPicRatePresentFlag( i, j ) ) 1231 { 1232 WRITE_CODE( pcVPSVUI->getConstantPicRateIdc( i, j ), 2, "constant_pic_rate_idc" ); 1233 WRITE_CODE( pcVPSVUI->getAvgPicRate( i, j ), 16, "avg_pic_rate" ); 1234 } 1235 } 1236 } 1237 } 1238 1239 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1240 { 1241 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1242 { 1243 WRITE_FLAG( pcVPSVUI->getTileBoundariesAlignedFlag( i, j ) ? 1 : 0 , "tile_boundaries_aligned_flag" ); 1244 } 1245 } 1246 1247 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1248 1249 if( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ) 1250 { 1251 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1252 { 1253 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1254 { 1255 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); 1256 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1257 { 1258 WRITE_FLAG( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ? 1 : 0 , "ctu_based_offset_enabled_flag" ); 1259 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1260 { 1261 WRITE_UVLC( pcVPSVUI->getMinHorizontalCtuOffsetPlus1( i, j ), "min_horizontal_ctu_offset_plus1" ); 1262 } 1263 } 1264 } 1265 } 1266 } 1267 } 1268 #endif 1269 1270 #if H_3D 1271 Void TEncCavlc::codeVPSExtension2( TComVPS* pcVPS ) 1272 { 1273 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1274 { 1275 if (i!= 0) 1276 { 1277 if ( !( pcVPS->getDepthId( i ) == 1 ) ) 1278 { 1279 #if H_3D_IV_MERGE 1280 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]"); 1281 #endif 1282 #if H_3D_ARP 1283 WRITE_FLAG( pcVPS->getUseAdvRP ( i ) ? 1 : 0, "iv_res_pred_flag[i]" ); 1284 #endif 1285 #if H_3D_NBDV_REF 1286 WRITE_FLAG( pcVPS->getDepthRefinementFlag ( i ) ? 1 : 0 , "depth_refinement_flag[i]"); 1287 #endif 1288 #if H_3D_VSP 1289 WRITE_FLAG( pcVPS->getViewSynthesisPredFlag( i ) ? 1 : 0 , "view_synthesis_pred_flag[i]"); 1290 #endif 1291 } 1292 else 1293 { 1294 WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 , "vps_depth_modes_flag[i]" ); 1295 //WRITE_FLAG( pcVPS->getLimQtPredFlag ( i ) ? 1 : 0 , "lim_qt_pred_flag[i]" ); 1296 #if H_3D_DIM_DLT 1297 if( pcVPS->getVpsDepthModesFlag( i ) ) 1298 { 1299 WRITE_FLAG( pcVPS->getUseDLTFlag( i ) ? 1 : 0, "dlt_flag[i]" ); 1300 } 1301 if( pcVPS->getUseDLTFlag( i ) ) 1302 { 1303 // code mapping 1304 WRITE_UVLC(pcVPS->getNumDepthValues(i), "num_depth_values_in_dlt[i]"); 1305 for(Int d=0; d<pcVPS->getNumDepthValues(i); d++) 1306 { 1307 WRITE_UVLC( pcVPS->idx2DepthValue(i, d), "dlt_depth_value[i][d]" ); 1308 } 1309 } 1310 #endif 1311 #if LGE_INTER_SDC_E0156 1312 WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" ); 1313 #endif 1314 } 1315 } 1316 } 1317 #if H_3D_TMVP 1318 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" ); 1319 #endif 1320 } 1321 #endif 1322 #endif 862 1323 863 1324 Void TEncCavlc::codeSliceHeader ( TComSlice* pcSlice ) … … 909 1370 { 910 1371 #if H_MV 1372 #if H_MV5 1373 Int esb = 0; //Don't use i, otherwise will shadow something below 1374 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1375 { 1376 esb++; 1377 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" ); 1378 } 1379 1380 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1381 { 1382 esb++; 1383 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 1384 } 1385 1386 for (; esb < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) 1387 #else 911 1388 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 912 1389 { … … 915 1392 916 1393 for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 1394 #endif 917 1395 #else 918 1396 for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1052 1530 } 1053 1531 #if H_MV 1532 #if H_MV5 1533 Int layerId = pcSlice->getLayerId(); 1534 if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) 1535 { 1536 WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" ); 1537 if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 ) 1538 { 1539 if( !vps->getMaxOneActiveRefLayerFlag()) 1540 { 1541 WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" ); 1542 } 1543 if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 1544 { 1545 for( Int idx = 0; idx < pcSlice->getNumActiveRefLayerPics(); idx++ ) 1546 { 1547 WRITE_CODE( pcSlice->getInterLayerPredLayerIdc( idx ), pcSlice->getInterLayerPredLayerIdcLen( ), "inter_layer_pred_layer_idc" ); 1548 } 1549 } 1550 } 1551 } 1552 #else 1054 1553 Int layerIdInVps = pcSlice->getLayerIdInVps(); 1055 1554 if( pcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 ) … … 1074 1573 } 1075 1574 1575 #endif 1076 1576 #endif 1077 1577 if(pcSlice->getSPS()->getUseSAO()) … … 1178 1678 if ( pcSlice->getEnableTMVPFlag() ) 1179 1679 { 1680 #if !H_MV5 1180 1681 #if H_MV 1181 1682 if( pcSlice->getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 ) … … 1190 1691 { 1191 1692 #endif 1693 #endif 1192 1694 if ( pcSlice->getSliceType() == B_SLICE ) 1193 1695 { … … 1202 1704 } 1203 1705 } 1706 #if !H_MV5 1204 1707 #if H_MV 1205 1708 } 1709 #endif 1206 1710 #endif 1207 1711 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncCavlc.h ¶
r608 r618 84 84 UInt getCoeffCost () { return m_uiCoeffCost; } 85 85 Void codeVPS ( TComVPS* pcVPS ); 86 #if H_MV5 87 #if H_MV 88 Void codeVPSExtension ( TComVPS *pcVPS ); 89 Void codeRepFormat ( TComRepFormat* pcRepFormat ); 90 Void codeVPSVUI ( TComVPS* pcVPS ); 91 #endif 92 #endif 86 93 Void codeVUI ( TComVUI *pcVUI, TComSPS* pcSPS ); 94 #if H_MV5 95 #if H_MV 96 Void codeSPSExtension ( TComSPS* pcSPS ); 97 #endif 98 #endif 87 99 #if H_3D 100 #if H_MV5 101 Void codeVPSExtension2 ( TComVPS* pcVPS ); 102 Void codeSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 103 #endif 88 104 Void codeSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 89 105 #else -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncCfg.h ¶
r608 r618 77 77 Int m_interLayerPredLayerIdc [MAX_NUM_REF_PICS]; 78 78 Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 79 #if !H_MV5 79 80 Int m_collocatedRefLayerIdx; 81 #endif 80 82 #endif 81 83 GOPEntry() … … 95 97 #if H_MV 96 98 , m_numActiveRefLayerPics(0) 99 #if !H_MV5 97 100 , m_collocatedRefLayerIdx(-1) 101 #endif 98 102 #endif 99 103 { … … 357 361 Int m_layerIdInVps; 358 362 Int m_viewId; 363 #if H_MV5 364 Int m_viewIndex; 365 #endif 359 366 #endif 360 367 361 368 #if H_3D 369 #if !H_MV5 362 370 Int m_viewIndex; 371 #endif 363 372 Bool m_isDepth; 364 373 … … 417 426 , m_layerIdInVps(-1) 418 427 , m_viewId(-1) 428 #if H_MV5 429 , m_viewIndex(-1) 430 #endif 419 431 #if H_3D 432 #if !H_MV5 420 433 , m_viewIndex(-1) 434 #endif 421 435 , m_isDepth(false) 422 436 , m_bUseVSO(false) … … 451 465 Void setViewId ( Int viewId ) { m_viewId = viewId; } 452 466 Int getViewId () { return m_viewId; } 453 #if H_ 3D467 #if H_MV5 454 468 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 455 469 Int getViewIndex () { return m_viewIndex; } 470 #endif 471 #if H_3D 472 #if !H_MV5 473 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 474 Int getViewIndex () { return m_viewIndex; } 475 #endif 456 476 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 457 477 Bool getIsDepth () { return m_isDepth; } -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncGOP.cpp ¶
r616 r618 471 471 pcPic->setCurrSliceIdx(0); 472 472 473 474 #if H_MV5 475 #if H_MV 476 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), getLayerId() ); 477 #else 478 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 479 #endif 480 #else 473 481 #if H_3D 474 482 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), getLayerId() ); 475 483 #else 476 484 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 485 #endif 477 486 #endif 478 487 pcSlice->setLastIDR(m_iLastIDR); 479 488 pcSlice->setSliceIdx(0); 480 489 #if H_MV 490 #if H_MV5 491 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 492 #else 481 493 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer ); 494 #endif 482 495 pcPic ->setLayerId ( getLayerId() ); 483 496 pcPic ->setViewId ( getViewId() ); … … 642 655 refPicListModification->setRefPicListModificationFlagL1(0); 643 656 #if H_MV 657 #if H_MV5 658 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 1 ) 659 { 660 // Some more sophisticated algorithm to determine discardable_flag might be added here. 661 pcSlice->setDiscardableFlag ( false ); 662 } 663 664 TComVPS* vps = pcSlice->getVPS(); 665 Int numDirectRefLayers = vps ->getNumDirectRefLayers( getLayerId() ); 666 GOPEntry gopEntry = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ); 667 668 if ( getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && numDirectRefLayers > 0 ) 669 { 670 pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 ); 671 if ( pcSlice->getInterLayerPredEnabledFlag() && numDirectRefLayers > 1 ) 672 { 673 if ( !vps->getMaxOneActiveRefLayerFlag() ) 674 { 675 pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 ); 676 } 677 if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) ) 678 { 679 for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ ) 680 { 681 pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] ); 682 } 683 } 684 } 685 } 686 assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics ); 687 688 pcSlice->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 689 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) ); 690 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) ); 691 692 std::vector< TComPic* > tempRefPicLists[2]; 693 std::vector< Bool > usedAsLongTerm [2]; 694 Int numPocTotalCurr; 695 696 pcSlice->getTempRefPicLists( rcListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 697 698 699 xSetRefPicListModificationsMv( tempRefPicLists, pcSlice, iGOPid ); 700 #else 644 701 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 645 702 { … … 692 749 } 693 750 751 #endif 694 752 #else 695 753 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); … … 702 760 703 761 // Set reference list 762 #if H_MV5 763 #if H_MV 764 pcSlice->setRefPicList( tempRefPicLists, usedAsLongTerm, numPocTotalCurr ); 765 #else 766 pcSlice->setRefPicList ( rcListPic ); 767 #endif 768 769 #if H_3D_ARP 770 //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh 771 pcSlice->setARPStepNum(); 772 if(pcSlice->getARPStepNum() > 1) 773 { 774 for(Int iLayerId = 0; iLayerId < getLayerId(); iLayerId ++ ) 775 { 776 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId); 777 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 ); 778 if( iViewIdx<getViewIndex() && !bIsDepth ) 779 { 780 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx ); 781 } 782 } 783 } 784 #endif 785 #else 704 786 #if H_MV 705 787 pcSlice->setRefPicList( rcListPic, m_refPicSetInterLayer ); … … 722 804 pcSlice->setRefPicList ( rcListPic ); 723 805 #endif 724 806 #endif 725 807 #if H_3D 726 808 pcSlice->setIvPicLists( m_ivPicLists ); … … 2084 2166 pcPic->setReconMark ( true ); 2085 2167 #if H_MV 2168 #if H_MV5 2169 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 2170 #else 2086 2171 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 2172 #endif 2087 2173 std::vector<Int> temp; 2088 2174 TComSlice::markCurrPic( pcPic ); … … 2916 3002 2917 3003 #if H_MV 3004 #if H_MV5 3005 Void TEncGOP::xSetRefPicListModificationsMv( std::vector<TComPic*> tempPicLists[2], TComSlice* pcSlice, UInt iGOPid ) 3006 { 3007 3008 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || pcSlice->getNumActiveRefLayerPics() == 0 ) 3009 { 3010 return; 3011 } 3012 3013 GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( pcSlice->getLayerId( ) > 0) ) ? MAX_GOP : iGOPid ); 3014 assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() ); 3015 3016 Int numPicsInTempList = pcSlice->getNumRpsCurrTempList(); 3017 3018 // GT: check if SliceType should be checked here. 3019 for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1 3020 { 3021 Int numPicsInFinalRefList = pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); 3022 3023 Int finalIdxToTempIdxMap[16]; 3024 for( Int k = 0; k < 16; k++ ) 3025 { 3026 finalIdxToTempIdxMap[ k ] = -1; 3027 } 3028 3029 Bool isModified = false; 3030 if ( numPicsInTempList > 1 ) 3031 { 3032 for( Int k = 0; k < pcSlice->getNumActiveRefLayerPics(); k++ ) 3033 { 3034 // get position in temp. list 3035 Int refPicLayerId = pcSlice->getRefPicLayerId(k); 3036 Int idxInTempList = 0; 3037 for (; idxInTempList < numPicsInTempList; idxInTempList++) 3038 { 3039 if ( (tempPicLists[li][idxInTempList])->getLayerId() == refPicLayerId ) 3040 { 3041 break; 3042 } 3043 } 3044 3045 Int idxInFinalList = ge.m_interViewRefPosL[ li ][ k ]; 3046 3047 // Add negative from behind 3048 idxInFinalList = ( idxInFinalList < 0 )? ( numPicsInTempList + idxInFinalList ) : idxInFinalList; 3049 3050 Bool curIsModified = ( idxInFinalList != idxInTempList ) && ( ( idxInTempList < numPicsInFinalRefList ) || ( idxInFinalList < numPicsInFinalRefList ) ) ; 3051 if ( curIsModified ) 3052 { 3053 isModified = true; 3054 assert( finalIdxToTempIdxMap[ idxInFinalList ] == -1 ); // Assert when two inter layer reference pictures are sorted to the same position 3055 } 3056 finalIdxToTempIdxMap[ idxInFinalList ] = idxInTempList; 3057 } 3058 } 3059 3060 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 3061 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 3062 3063 if( isModified ) 3064 { 3065 Int refIdx = 0; 3066 3067 for( Int i = 0; i < numPicsInFinalRefList; i++ ) 3068 { 3069 if( finalIdxToTempIdxMap[i] >= 0 ) 3070 { 3071 refPicListModification->setRefPicSetIdxL( li, i, finalIdxToTempIdxMap[i] ); 3072 } 3073 else 3074 { 3075 ///* Fill gaps with temporal references */// 3076 // Forward inter layer reference pictures 3077 while( ( refIdx < numPicsInTempList ) && ( tempPicLists[li][refIdx]->getLayerId() != getLayerId()) ) 3078 { 3079 refIdx++; 3080 } 3081 refPicListModification->setRefPicSetIdxL( li, i, refIdx ); 3082 refIdx++; 3083 } 3084 } 3085 } 3086 } 3087 } 3088 #else 2918 3089 Void TEncGOP::xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ) 2919 3090 { … … 2979 3150 } 2980 3151 #endif 3152 #endif 2981 3153 //! \} -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncGOP.h ¶
r608 r618 99 99 #if H_MV 100 100 TComPicLists* m_ivPicLists; 101 #if H_MV5 102 std::vector<TComPic*> m_refPicSetInterLayer0; 103 std::vector<TComPic*> m_refPicSetInterLayer1; 104 #else 101 105 std::vector<TComPic*> m_refPicSetInterLayer; 106 #endif 102 107 103 108 Int m_pocLastCoded; … … 211 216 } 212 217 #if H_MV 218 #if H_MV5 219 Void xSetRefPicListModificationsMv( std::vector<TComPic*> tempPicLists[2], TComSlice* pcSlice, UInt iGOPid ); 220 #else 213 221 Void xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ); 222 #endif 214 223 #endif 215 224 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncSbac.cpp ¶
r612 r618 649 649 // residual flag 650 650 m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) ); 651 #if H_MV_ENC_DEC_TRAC 652 DTRACE_CU("sdc_residual_flag[i]", uiResidual) 653 #endif 651 654 652 655 if (uiResidual) … … 654 657 // encode sign bit of residual 655 658 m_pcBinIf->encodeBinEP( uiSign ); 659 #if H_MV_ENC_DEC_TRAC 660 DTRACE_CU("sdc_residual_sign_flag[i]", uiSign) 661 #endif 656 662 657 663 #if H_3D_DIM_DLT … … 664 670 // encode residual magnitude 665 671 uiAbsIdx -= 1; 672 673 #if H_MV_ENC_DEC_TRAC 674 DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx) 675 #endif 676 666 677 // prefix part 667 678 if ( uiAbsIdx == 0 ) 679 { 668 680 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) ); 681 } 669 682 else 670 683 { … … 679 692 } 680 693 if ( uiAbsIdx < uiPrefixThreshold ) 694 { 681 695 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) ); 682 // suffix part696 } 683 697 else 684 { 698 { // suffix part 685 699 uiAbsIdx -= uiPrefixThreshold; 686 700 UInt uiSuffixLength = numBitsForValue(uiNumDepthValues - uiPrefixThreshold); -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncSlice.cpp ¶
r608 r618 176 176 \param pPPS PPS associated with the slice 177 177 */ 178 #if H_MV5 179 #if H_MV 180 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ) 181 #else 182 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ) 183 #endif 184 #else 178 185 #if H_3D 179 186 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ) 180 187 #else 181 188 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ) 189 #endif 182 190 #endif 183 191 { … … 186 194 187 195 rpcSlice = pcPic->getSlice(0); 196 197 #if H_MV5 198 rpcSlice->setVPS( pVPS ); 199 200 rpcSlice->setLayerId ( layerId ); 201 rpcSlice->setViewId ( pVPS->getViewId ( layerId ) ); 202 rpcSlice->setViewIndex ( pVPS->getViewIndex ( layerId ) ); 203 #if H_3D 204 rpcSlice->setIsDepth ( pVPS->getDepthId ( layerId ) != 0 ); 205 #endif 206 #else 188 207 #if H_3D 189 208 // GT: Should also be activated for MV-HEVC at some stage … … 195 214 rpcSlice->setViewIndex ( pVPS->getViewIndex ( vpsLayerId ) ); 196 215 rpcSlice->setIsDepth ( pVPS->getDepthId ( vpsLayerId ) != 0 ); 216 #endif 197 217 #endif 198 218 rpcSlice->setSPS( pSPS ); -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncSlice.h ¶
r608 r618 116 116 117 117 /// preparation of slice encoding (reference marking, QP and lambda) 118 #if H_MV5 119 #if H_MV 120 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 121 Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ); 122 #else 123 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 124 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ); 125 #endif 126 #else 118 127 #if H_3D 119 128 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, … … 122 131 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 123 132 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ); 133 #endif 124 134 #endif 125 135 #if RATE_CONTROL_LAMBDA_DOMAIN -
TabularUnified branches/HTM-8.0-dev0/source/Lib/TLibEncoder/TEncTop.cpp ¶
r608 r618 548 548 * that chooses the actual compatibility based upon options */ 549 549 550 #if H_MV5 551 #if H_MV 552 m_cSPS.setUpdateRepFormatFlag ( m_layerId == 0 ); 553 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) ); 554 m_cSPS.setSpsScalingListRefLayerId ( 0 ); 555 #endif 556 #endif 550 557 m_cSPS.setPicWidthInLumaSamples ( m_iSourceWidth ); 551 558 m_cSPS.setPicHeightInLumaSamples ( m_iSourceHeight ); … … 670 677 { 671 678 #if H_MV 679 #if H_MV5 680 m_cPPS.setLayerId( getLayerId() ); 681 if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 ) 682 #else 672 683 if( getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) > 0 ) 684 #endif 673 685 { 674 686 m_cPPS.setListsModificationPresentFlag( true ); … … 736 748 m_cPPS.setOutputFlagPresentFlag( false ); 737 749 #if H_MV 750 #if H_MV5 751 m_cPPS.setNumExtraSliceHeaderBits( 2 ); 752 #else 738 753 m_cPPS.setNumExtraSliceHeaderBits( 1 ); 754 #endif 739 755 #endif 740 756 m_cPPS.setSignHideFlag(getSignHideFlag());
Note: See TracChangeset for help on using the changeset viewer.