Changeset 466 in SHVCSoftware for branches/SHM-4.0-dev/source/Lib/TLibDecoder
- Timestamp:
- 13 Nov 2013, 23:25:47 (11 years ago)
- Location:
- branches/SHM-4.0-dev/source/Lib/TLibDecoder
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r464 r466 187 187 assert(uiCode <= 63); 188 188 pcPPS->setPPSId (uiCode); 189 189 190 190 READ_UVLC( uiCode, "pps_seq_parameter_set_id"); 191 191 assert(uiCode <= 15); 192 192 pcPPS->setSPSId (uiCode); 193 193 194 194 READ_FLAG( uiCode, "dependent_slice_segments_enabled_flag" ); pcPPS->setDependentSliceSegmentsEnabledFlag ( uiCode == 1 ); 195 195 READ_FLAG( uiCode, "output_flag_present_flag" ); pcPPS->setOutputFlagPresentFlag( uiCode==1 ); … … 293 293 294 294 #if IL_SL_SIGNALLING_N0371 295 pcPPS->setPPS( pcPPS->getLayerId(), pcPPS ); 295 pcPPS->setPPS( pcPPS->getLayerId(), pcPPS ); 296 296 #endif 297 297 … … 301 301 pcPPS->getScalingList()->setLayerId( pcPPS->getLayerId() ); 302 302 303 if( pcPPS->getLayerId() > 0 ) 303 if( pcPPS->getLayerId() > 0 ) 304 304 { 305 305 READ_FLAG( uiCode, "pps_pred_scaling_list_flag" ); pcPPS->setPredScalingListFlag( uiCode ? true : false ); 306 306 pcPPS->getScalingList()->setPredScalingListFlag( pcPPS->getPredScalingListFlag() ); 307 307 308 308 if( pcPPS->getPredScalingListFlag() ) 309 309 { … … 319 319 } 320 320 321 // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and 321 // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and 322 322 // pps_infer_scaling_list_flag in the PPS is equal to 1, pps_infer_scaling_list_flag shall be equal to 0 for the PPS that is active for the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id 323 323 assert( pcPPS->getPPS( pcPPS->getScalingListRefLayerId() )->getPredScalingListFlag() == false ); 324 324 325 // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB, 325 // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB, 326 326 // the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB 327 327 assert( pcPPS->getSPS()->getVPS()->getScalingListLayerDependency( pcPPS->getLayerId(), pcPPS->getScalingListRefLayerId() ) == true ); … … 450 450 { 451 451 READ_FLAG( uiCode, "tiles_fixed_structure_flag"); pcVUI->setTilesFixedStructureFlag(uiCode); 452 #if M0464_TILE_BOUNDARY_ALIGNED_FLAG 453 if ( pcSPS->getLayerId() > 0 ) 454 { 455 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 ); 456 } 457 #endif 452 458 READ_FLAG( uiCode, "motion_vectors_over_pic_boundaries_flag"); pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode); 453 459 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag"); pcVUI->setRestrictedRefPicListsFlag(uiCode); … … 536 542 } 537 543 538 #if S VC_EXTENSION544 #if SPS_SUB_LAYER_INFO 539 545 Void TDecCavlc::parseSPS(TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager) 540 546 #else … … 548 554 UInt uiCode; 549 555 READ_CODE( 4, uiCode, "sps_video_parameter_set_id"); pcSPS->setVPSId ( uiCode ); 550 #if S VC_EXTENSION556 #if SPS_SUB_LAYER_INFO 551 557 if(pcSPS->getLayerId() == 0) 552 558 { … … 554 560 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 555 561 assert(uiCode <= 6); 556 562 557 563 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); 558 #if S VC_EXTENSION564 #if SPS_SUB_LAYER_INFO 559 565 } 560 566 else … … 563 569 pcSPS->setTemporalIdNestingFlag( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getTemporalNestingFlag() ); 564 570 } 571 #endif 565 572 #if IL_SL_SIGNALLING_N0371 566 573 pcSPS->setVPS( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId()) ); 567 574 pcSPS->setSPS( pcSPS->getLayerId(), pcSPS ); 568 575 #endif 569 #endif570 576 if ( pcSPS->getMaxTLayers() == 1 ) 571 577 { 572 578 // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0 573 #if S VC_EXTENSION579 #if SPS_SUB_LAYER_INFO 574 580 assert( pcSPS->getTemporalIdNestingFlag() == true ); 575 581 #else … … 592 598 if( pcSPS->getLayerId() > 0 ) 593 599 { 594 READ_FLAG( uiCode, "update_rep_format_flag" ); 600 READ_FLAG( uiCode, "update_rep_format_flag" ); 595 601 pcSPS->setUpdateRepFormatFlag( uiCode ? true : false ); 596 602 } … … 599 605 pcSPS->setUpdateRepFormatFlag( true ); 600 606 } 601 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 607 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 602 608 { 603 609 #endif … … 633 639 } 634 640 #if REPN_FORMAT_IN_VPS 635 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 641 if( pcSPS->getLayerId() == 0 || pcSPS->getUpdateRepFormatFlag() ) 636 642 { 637 643 #endif … … 653 659 UInt subLayerOrderingInfoPresentFlag; 654 660 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); 655 661 656 662 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 657 663 { … … 722 728 } 723 729 724 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and 730 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and 725 731 // sps_infer_scaling_list_flag in the SPS is equal to 1, sps_infer_scaling_list_flag shall be equal to 0 for the SPS that is active for the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id 726 732 assert( pcSPS->getSPS( pcSPS->getScalingListRefLayerId() )->getPredScalingListFlag() == false ); 727 733 728 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB, 734 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB, 729 735 // the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB 730 736 assert( pcSPS->getVPS()->getScalingListLayerDependency( pcSPS->getLayerId(), pcSPS->getScalingListRefLayerId() ) == true ); … … 835 841 assert( uiCode == 0 ); 836 842 #endif 843 #if SCALED_REF_LAYER_OFFSETS 837 844 if( pcSPS->getLayerId() > 0 ) 838 845 { 839 Int iCode; 846 Int iCode; 840 847 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets(uiCode); 841 848 for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++) … … 848 855 } 849 856 } 857 #endif 850 858 #if M0463_VUI_EXT_ILP_REF 851 859 //// sps_extension_vui_parameters( ) 852 860 if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() ) 853 { 854 READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode ); 855 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ ) 856 { 857 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode ); 858 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 ) 859 { 860 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 ); 861 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 862 { 863 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode ); 864 } 865 } 866 } 867 } 861 { 862 READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode ); 863 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ ) 864 { 865 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode ); 866 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 ) 867 { 868 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 ); 869 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) ) 870 { 871 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode ); 872 } 873 } 874 } 875 } 868 876 //// sps_extension_vui_parameters( ) END 869 877 #endif … … 992 1000 } 993 1001 994 #if SVC_EXTENSION995 1002 #if VPS_EXTNS 996 1003 Void TDecCavlc::parseVPSExtension(TComVPS *vps) … … 1011 1018 vps->setNumScalabilityTypes(numScalabilityTypes); 1012 1019 1020 #if VPS_SPLIT_FLAG 1013 1021 for(j = 0; j < numScalabilityTypes - vps->getSplittingFlag(); j++) 1022 #else 1023 for(j = 0; j < numScalabilityTypes; j++) 1024 #endif 1014 1025 { 1015 1026 READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); vps->setDimensionIdLen(j, uiCode + 1); 1016 1027 } 1017 1028 #if VPS_SPLIT_FLAG 1018 1029 if(vps->getSplittingFlag()) 1019 1030 { … … 1027 1038 numBits = 6; 1028 1039 } 1040 #else 1041 if(vps->getSplittingFlag()) 1042 { 1043 UInt numBits = 0; 1044 for(j = 0; j < numScalabilityTypes; j++) 1045 { 1046 numBits += vps->getDimensionIdLen(j); 1047 } 1048 assert( numBits <= 6 ); 1049 } 1050 #endif 1029 1051 1030 1052 READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false); … … 1044 1066 vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i); 1045 1067 1046 if( !vps->getSplittingFlag() ) 1047 {1048 for(j = 0; j < numScalabilityTypes; j++) 1049 {1050 READ_CODE( vps->getDimensionIdLen(j), uiCode, "dimension_id[i][j]" ); vps->setDimensionId(i, j, uiCode);1051 assert( uiCode <= vps->getMaxLayerId());1052 }1053 } 1054 } 1055 #endif 1056 #if VIEW_ID_RELATED_SIGNALING 1057 // if ( pcVPS->getNumViews() > 1 ) 1058 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 1068 #if VPS_SPLIT_FLAG 1069 if(!vps->getSplittingFlag()) 1070 #endif 1071 for(j = 0; j < numScalabilityTypes; j++) 1072 { 1073 READ_CODE( vps->getDimensionIdLen(j), uiCode, "dimension_id[i][j]" ); vps->setDimensionId(i, j, uiCode); 1074 assert( uiCode <= vps->getMaxLayerId() ); 1075 } 1076 } 1077 #endif 1078 #if VIEW_ID_RELATED_SIGNALING 1079 // if ( pcVPS->getNumViews() > 1 ) 1080 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 1059 1081 { 1060 1082 READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode ); … … 1066 1088 } 1067 1089 #endif 1090 #if VPS_MOVE_DIR_DEPENDENCY_FLAG 1068 1091 #if VPS_EXTN_DIRECT_REF_LAYERS 1069 1092 // For layer 0 … … 1085 1108 } 1086 1109 #endif 1110 #endif 1087 1111 #if JCTVC_M0203_INTERLAYER_PRED_IDC 1088 1112 #if N0120_MAX_TID_REF_PRESENT_FLAG … … 1095 1119 #if N0120_MAX_TID_REF_CFG 1096 1120 assert( uiCode <= vps->getMaxTLayers()); 1097 #else 1121 #else 1098 1122 assert( uiCode <= vps->getMaxTLayers()+ 1 ); 1099 #endif 1100 } 1101 } 1102 else 1123 #endif 1124 } 1125 } 1126 else 1103 1127 { 1104 1128 for(i = 0; i < vps->getMaxLayers() - 1; i++) … … 1120 1144 #if VPS_EXTN_PROFILE_INFO 1121 1145 // Profile-tier-level signalling 1146 #if VPS_PROFILE_OUTPUT_LAYERS 1122 1147 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); assert( uiCode == (vps->getNumLayerSets() - 1) ); 1123 1148 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 ); 1124 1149 vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel()); 1125 1150 for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) 1151 #else 1152 vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets()); 1153 for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++) 1154 #endif 1126 1155 { 1127 1156 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); vps->setProfilePresentFlag(idx, uiCode ? true : false); 1128 1157 if( !vps->getProfilePresentFlag(idx) ) 1129 1158 { 1159 #if VPS_PROFILE_OUTPUT_LAYERS 1130 1160 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); 1161 #else 1162 READ_UVLC( uiCode, "vps_profile_layer_set_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); 1163 #endif 1131 1164 assert( vps->getProfileLayerSetRef(idx) < idx ); 1132 1133 1165 // Copy profile information as indicated 1134 1166 vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) ); … … 1138 1170 #endif 1139 1171 1172 #if VPS_PROFILE_OUTPUT_LAYERS 1140 1173 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false ); 1141 1174 Int numOutputLayerSets = 0; … … 1198 1231 READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 1199 1232 } 1200 1233 #else 1234 #if VPS_EXTN_OP_LAYER_SETS 1235 // Target output layer signalling 1236 READ_UVLC( uiCode, "vps_num_output_layer_sets"); vps->setNumOutputLayerSets(uiCode); 1237 for(i = 0; i < vps->getNumOutputLayerSets(); i++) 1238 { 1239 #if VPS_OUTPUT_LAYER_SET_IDX 1240 READ_UVLC( uiCode, "vps_output_layer_set_idx_minus1[i]"); vps->setOutputLayerSetIdx(i, uiCode + 1); 1241 #else 1242 READ_UVLC( uiCode, "vps_output_layer_set_idx[i]"); vps->setOutputLayerSetIdx(i, uiCode); 1243 #endif 1244 Int lsIdx = vps->getOutputLayerSetIdx(i); 1245 for(j = 0; j <= vps->getMaxLayerId(); j++) 1246 { 1247 if(vps->getLayerIdIncludedFlag(lsIdx, j)) 1248 { 1249 READ_FLAG( uiCode, "vps_output_layer_flag[lsIdx][j]"); vps->setOutputLayerFlag(lsIdx, j, uiCode); 1250 } 1251 } 1252 } 1253 #endif 1254 #endif 1201 1255 #if REPN_FORMAT_IN_VPS 1202 READ_FLAG( uiCode, "rep_format_idx_present_flag"); 1256 READ_FLAG( uiCode, "rep_format_idx_present_flag"); 1203 1257 vps->setRepFormatIdxPresentFlag( uiCode ? true : false ); 1204 1258 … … 1219 1273 parseRepFormat( vps->getVpsRepFormat(i) ); 1220 1274 } 1221 1275 1222 1276 // Default assignment for layer 0 1223 1277 vps->setVpsRepFormatIdx( 0, 0 ); … … 1258 1312 READ_FLAG(uiCode, "cross_layer_irap_aligned_flag" ); 1259 1313 vps->setCrossLayerIrapAlignFlag(uiCode); 1260 #endif 1261 1314 #endif 1315 1316 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG 1317 #if VPS_EXTN_DIRECT_REF_LAYERS 1318 // For layer 0 1319 vps->setNumDirectRefLayers(0, 0); 1320 // For other layers 1321 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1322 { 1323 UInt numDirectRefLayers = 0; 1324 for( Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++) 1325 { 1326 READ_FLAG(uiCode, "direct_dependency_flag[i][j]" ); vps->setDirectDependencyFlag(layerCtr, refLayerCtr, uiCode? true : false); 1327 if(uiCode) 1328 { 1329 vps->setRefLayerId(layerCtr, numDirectRefLayers, refLayerCtr); 1330 numDirectRefLayers++; 1331 } 1332 } 1333 vps->setNumDirectRefLayers(layerCtr, numDirectRefLayers); 1334 } 1335 #endif 1336 #endif 1262 1337 #if VPS_EXTN_DIRECT_REF_LAYERS && M0457_PREDICTION_INDICATIONS 1263 1338 READ_UVLC( uiCode, "direct_dep_type_len_minus2"); vps->setDirectDepTypeLen(uiCode+2); … … 1279 1354 { 1280 1355 for(j = 0; j < i; j++) 1281 { 1356 { 1282 1357 vps->setScalingListLayerDependency( i, j, vps->checkLayerDependency( i,j ) ); 1283 1358 } … … 1298 1373 } 1299 1374 parseVPSVUI(vps); 1300 #endif 1375 #endif 1301 1376 } 1302 1377 } … … 1307 1382 UInt uiCode; 1308 1383 READ_CODE( 2, uiCode, "chroma_format_idc" ); repFormat->setChromaFormatVpsIdc( uiCode ); 1309 1384 1310 1385 if( repFormat->getChromaFormatVpsIdc() == 3 ) 1311 1386 { … … 1315 1390 READ_CODE ( 16, uiCode, "pic_width_in_luma_samples" ); repFormat->setPicWidthVpsInLumaSamples ( uiCode ); 1316 1391 READ_CODE ( 16, uiCode, "pic_height_in_luma_samples" ); repFormat->setPicHeightVpsInLumaSamples( uiCode ); 1317 1392 1318 1393 READ_CODE( 4, uiCode, "bit_depth_luma_minus8" ); repFormat->setBitDepthVpsLuma ( uiCode + 8 ); 1319 1394 READ_CODE( 4, uiCode, "bit_depth_chroma_minus8" ); repFormat->setBitDepthVpsChroma( uiCode + 8 ); … … 1381 1456 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) 1382 1457 { 1383 READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1)); 1384 } 1385 } 1386 #endif 1458 READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1)); 1459 } 1460 } 1461 #endif 1387 1462 #if N0160_VUI_EXT_ILP_REF 1388 READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 ); 1463 READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 ); 1389 1464 if( vps->getNumIlpRestrictedRefLayers()) 1390 1465 { … … 1393 1468 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) 1394 1469 { 1395 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1[i][j]" ); vps->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1396 if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 ) 1397 { 1398 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[i][j]"); vps->setCtuBasedOffsetEnabledFlag(i, j, uiCode == 1 ); 1399 if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 1470 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1[i][j]" ); vps->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1471 if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 ) 1472 { 1473 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[i][j]"); vps->setCtuBasedOffsetEnabledFlag(i, j, uiCode == 1 ); 1474 if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 1400 1475 { 1401 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[i][j]"); vps->setMinHorizontalCtuOffsetPlus1( i,j, uiCode ); 1476 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[i][j]"); vps->setMinHorizontalCtuOffsetPlus1( i,j, uiCode ); 1402 1477 } 1403 } 1404 } 1405 } 1406 } 1407 #endif 1408 } 1409 #endif 1410 #endif //SVC_EXTENSION 1411 1478 } 1479 } 1480 } 1481 } 1482 #endif 1483 } 1484 #endif 1412 1485 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) 1413 1486 { … … 1482 1555 if(!rpcSlice->getDependentSliceSegmentFlag()) 1483 1556 { 1484 #if SVC_EXTENSION1485 1557 #if POC_RESET_FLAG 1486 Int iBits = 0; 1558 Int iBits = 0; 1487 1559 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > iBits) 1488 1560 { … … 1500 1572 } 1501 1573 #else 1574 #if SH_DISCARDABLE_FLAG 1502 1575 if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits()>0) 1503 1576 { … … 1508 1581 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored 1509 1582 } 1510 #endif 1511 #else //SVC_EXTENSION 1583 #else 1512 1584 for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 1513 1585 { 1514 1586 READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored 1515 1587 } 1516 #endif //SVC_EXTENSION 1588 #endif 1589 #endif 1517 1590 1518 1591 READ_UVLC ( uiCode, "slice_type" ); rpcSlice->setSliceType((SliceType)uiCode); … … 1676 1749 rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLsbLt); 1677 1750 rps->setCheckLTMSBPresent(j,false); 1678 1751 1679 1752 // reset deltaPocMSBCycleLT for first LTRP from slice header if MSB not present 1680 1753 if( j == offset+(numOfLtrp-numLtrpInSPS)-1 ) … … 1779 1852 #else 1780 1853 else if( rpcSlice->getVPS()->getIlpSshSignalingEnabledFlag() == false ) 1781 #endif 1854 #endif 1782 1855 { 1783 1856 rpcSlice->setInterLayerPredEnabledFlag(true); … … 2007 2080 2008 2081 #if REPN_FORMAT_IN_VPS 2082 #if O0194_REPN_FORMAT_IN_VPS_BUGFIX 2083 g_bitDepthYLayer[rpcSlice->getLayerId()] = rpcSlice->getBitDepthY(); 2084 g_bitDepthCLayer[rpcSlice->getLayerId()] = rpcSlice->getBitDepthC(); 2085 #endif 2009 2086 assert( rpcSlice->getSliceQp() >= -rpcSlice->getQpBDOffsetY() ); 2010 2087 #else … … 2117 2194 { 2118 2195 Int endOfSliceHeaderLocation = m_pcBitstream->getByteLocation(); 2119 2196 2120 2197 // Adjust endOfSliceHeaderLocation to account for emulation prevention bytes in the slice segment header 2121 2198 for ( UInt curByteIdx = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ ) … … 2523 2600 #if IL_SL_SIGNALLING_N0371 2524 2601 if ( scalingList->getLayerId() > 0 && scalingList->getPredScalingListFlag() ) 2525 { 2602 { 2526 2603 READ_FLAG( code, "scaling_list_pred_mode_flag"); 2527 2604 scalingListPredModeFlag = (code) ? true : false; -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r452 r466 72 72 Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); 73 73 Void parseVPS ( TComVPS* pcVPS ); 74 #if SPS_EXTENSION75 74 #if VPS_EXTNS 76 75 Void parseVPSExtension ( TComVPS* pcVPS ); … … 83 82 Void parseRepFormat ( RepFormat *repFormat ); 84 83 #endif 84 #if SPS_SUB_LAYER_INFO 85 85 Void parseSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ); 86 Void parseSPSExtension ( TComSPS* pcSPS ); 87 #else //SVC_EXTENSION 86 #else 88 87 Void parseSPS ( TComSPS* pcSPS ); 89 #endif //SVC_EXTENSION 88 #endif 89 #if SPS_EXTENSION 90 Void parseSPSExtension ( TComSPS* pcSPS ); 91 #endif 90 92 Void parsePPS ( TComPPS* pcPPS); 91 93 Void parseVUI ( TComVUI* pcVUI, TComSPS* pcSPS ); -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecCu.cpp
r442 r466 616 616 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr(); 617 617 } 618 #if O0194_REPN_FORMAT_IN_VPS_BUGFIX 619 #if REPN_FORMAT_IN_VPS 620 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), eText, pcCU->getSlice()->getQpBDOffsetC(), curChromaQpOffset ); 621 #else 618 622 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset ); 623 #endif 624 #else 625 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset ); 626 #endif 619 627 620 628 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText]; … … 768 776 // Cb and Cr 769 777 Int curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCbQpOffset() + pcCU->getSlice()->getSliceQpDeltaCb(); 778 #if O0194_REPN_FORMAT_IN_VPS_BUGFIX 779 #if REPN_FORMAT_IN_VPS 780 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getQpBDOffsetC(), curChromaQpOffset ); 781 #else 770 782 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset ); 783 #endif 784 #else 785 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset ); 786 #endif 771 787 772 788 uiWidth >>= 1; … … 776 792 777 793 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr(); 794 #if O0194_REPN_FORMAT_IN_VPS_BUGFIX 795 #if REPN_FORMAT_IN_VPS 796 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getQpBDOffsetC(), curChromaQpOffset ); 797 #else 778 798 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset ); 799 #endif 800 #else 801 m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset ); 802 #endif 779 803 780 804 piCoeff = pcCU->getCoeffCr(); pResi = m_ppcYuvResi[uiDepth]->getCrAddr(); -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecEntropy.h
r452 r466 66 66 67 67 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 68 #if S VC_EXTENSION68 #if SPS_SUB_LAYER_INFO 69 69 virtual Void parseSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ) = 0; 70 70 #else … … 134 134 Void resetEntropy ( TComSlice* p) { m_pcEntropyDecoderIf->resetEntropy(p); } 135 135 Void decodeVPS ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); } 136 #if S VC_EXTENSION136 #if SPS_SUB_LAYER_INFO 137 137 Void decodeSPS ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager ) { m_pcEntropyDecoderIf->parseSPS(pcSPS, parameterSetManager); } 138 138 #else -
branches/SHM-4.0-dev/source/Lib/TLibDecoder/TDecSbac.h
r452 r466 76 76 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); } 77 77 Void parseVPS ( TComVPS* /*pcVPS*/ ) {} 78 #if S VC_EXTENSION78 #if SPS_SUB_LAYER_INFO 79 79 Void parseSPS ( TComSPS* /*pcSPS*/, ParameterSetManagerDecoder * /*parameterSetManager*/ ) {} 80 80 #else
Note: See TracChangeset for help on using the changeset viewer.