Changeset 648 in 3DVCSoftware for branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder
- Timestamp:
- 19 Oct 2013, 18:46:09 (11 years ago)
- Location:
- branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.cpp
r646 r648 330 330 } 331 331 } 332 #if H_MV5333 332 #if H_MV 334 333 if ( pcPPS->getLayerId() > 0 ) … … 344 343 { 345 344 #endif 346 #endif347 345 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 348 346 if(pcPPS->getScalingListPresentFlag ()) … … 350 348 parseScalingList( pcPPS->getScalingList() ); 351 349 } 352 #if H_MV5 353 #if H_MV 354 } 355 #endif 350 #if H_MV 351 } 356 352 #endif 357 353 … … 430 426 { 431 427 Window &defDisp = pcVUI->getDefaultDisplayWindow(); 432 #if !H_MV5433 READ_UVLC( uiCode, "def_disp_win_left_offset" ); defDisp.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) );434 READ_UVLC( uiCode, "def_disp_win_right_offset" ); defDisp.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) );435 READ_UVLC( uiCode, "def_disp_win_top_offset" ); defDisp.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );436 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) );437 #else438 428 #if H_MV 439 429 defDisp.setScaledFlag( false ); … … 448 438 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) ); 449 439 #endif 450 #endif451 440 } 452 441 TimingInfo *timingInfo = pcVUI->getTimingInfo(); … … 471 460 { 472 461 READ_FLAG( uiCode, "tiles_fixed_structure_flag"); pcVUI->setTilesFixedStructureFlag(uiCode); 473 #if !H_MV5474 #if H_MV475 if ( pcSPS->getLayerId() > 0 )476 {477 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 );478 }479 #endif480 #endif481 462 READ_FLAG( uiCode, "motion_vectors_over_pic_boundaries_flag"); pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode); 482 463 READ_FLAG( uiCode, "restricted_ref_pic_lists_flag"); pcVUI->setRestrictedRefPicListsFlag(uiCode); … … 597 578 READ_UVLC( uiCode, "sps_seq_parameter_set_id" ); pcSPS->setSPSId( uiCode ); 598 579 assert(uiCode <= 15); 599 #if H_MV5600 580 #if H_MV 601 581 if ( pcSPS->getLayerId() > 0 ) … … 606 586 if ( pcSPS->getUpdateRepFormatFlag() ) 607 587 { 608 #endif609 588 #endif 610 589 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); … … 619 598 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 620 599 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 621 #if H_MV5 622 #if H_MV 623 } 624 #endif 600 #if H_MV 601 } 625 602 #endif 626 603 READ_FLAG( uiCode, "conformance_window_flag"); … … 628 605 { 629 606 Window &conf = pcSPS->getConformanceWindow(); 630 #if H_MV5631 607 #if H_MV 632 608 // Needs to be scaled later, when ChromaFormatIdc is known. … … 642 618 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 643 619 #endif 644 #else 645 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 646 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 647 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 648 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 649 #endif 650 } 651 652 #if H_MV5 620 } 621 653 622 #if H_MV 654 623 if ( pcSPS->getUpdateRepFormatFlag() ) 655 624 { 656 #endif657 625 #endif 658 626 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); … … 665 633 pcSPS->setBitDepthC( uiCode + 8 ); 666 634 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 667 #if H_MV5 668 #if H_MV 669 } 670 #endif 635 #if H_MV 636 } 671 637 #endif 672 638 … … 692 658 pcSPS->setNumReorderPics(uiCode, i); 693 659 #if H_MV 694 #if H_MV5695 660 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 696 #else697 READ_UVLC ( uiCode, "sps_max_latency_increase[i]");698 #endif699 661 #else 700 662 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1"); … … 736 698 if(pcSPS->getScalingListFlag()) 737 699 { 738 #if H_MV5739 700 #if H_MV 740 701 if ( pcSPS->getLayerId() > 0 ) … … 750 711 { 751 712 #endif 752 #endif753 713 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode ); 754 714 if(pcSPS->getScalingListPresentFlag ()) … … 756 716 parseScalingList( pcSPS->getScalingList() ); 757 717 } 758 #if H_MV5 759 #if H_MV 760 } 761 #endif 718 #if H_MV 719 } 762 720 #endif 763 721 } … … 814 772 if (uiCode) 815 773 { 816 #if !H_MV5817 #if !H_MV818 while ( xMoreRbspData() )819 {820 READ_FLAG( uiCode, "sps_extension_data_flag");821 }822 #else823 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false);824 //// sps_extension_vui_parameters( )825 if( pcSPS->getVuiParameters()->getBitstreamRestrictionFlag() )826 {827 READ_UVLC( uiCode, "num_ilp_restricted_ref_layers" ); pcSPS->setNumIlpRestrictedRefLayers( uiCode );828 for( Int i = 0; i < pcSPS->getNumIlpRestrictedRefLayers( ); i++ )829 {830 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcSPS->setMinSpatialSegmentOffsetPlus1( i, uiCode );831 if( pcSPS->getMinSpatialSegmentOffsetPlus1( i ) > 0 )832 {833 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[ i ]"); pcSPS->setCtuBasedOffsetEnabledFlag(i, uiCode == 1 );834 if( pcSPS->getCtuBasedOffsetEnabledFlag( i ) )835 {836 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[ i ]"); pcSPS->setMinHorizontalCtuOffsetPlus1( i, uiCode );837 }838 }839 }840 }841 842 #if H_3D_QTLPC843 if( depthFlag )844 {845 READ_FLAG( uiCode, "use_qtl_flag" );846 pcSPS->setUseQTL( uiCode );847 READ_FLAG( uiCode, "use_pc_flag" );848 pcSPS->setUsePC( uiCode );849 }850 #endif851 //// sps_extension_vui_parameters( ) END852 READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" );853 READ_FLAG( uiCode, "sps_extension2_flag");854 if ( uiCode )855 {856 #if !H_3D857 while ( xMoreRbspData() )858 {859 READ_FLAG( uiCode, "sps_extension_data_flag");860 }861 #else862 863 UInt uiCamParPrecision = 0;864 Bool bCamParSlice = false;865 if ( !depthFlag )866 {867 READ_UVLC( uiCamParPrecision, "cp_precision" );868 READ_FLAG( uiCode, "cp_in_slice_header_flag" ); bCamParSlice = ( uiCode == 1 );869 if( !bCamParSlice )870 {871 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )872 {873 Int iCode;874 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;875 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;876 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];877 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];878 }879 }880 }881 pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );882 READ_FLAG( uiCode, "sps_extension3_flag");883 if ( uiCode )884 {885 while ( xMoreRbspData() )886 {887 READ_FLAG( uiCode, "sps_extension_data_flag");888 }889 }890 #endif // !H_3D891 }892 #endif // !H_MV893 }894 }895 #else896 774 #if H_MV 897 775 parseSPSExtension( pcSPS ); … … 918 796 } 919 797 } 920 #endif921 #if H_MV5922 798 Void TDecCavlc::parseSPSExtension( TComSPS* pcSPS ) 923 799 { … … 963 839 } 964 840 #endif 965 #endif966 841 967 842 Void TDecCavlc::parseVPS(TComVPS* pcVPS) … … 972 847 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 973 848 #if H_MV 974 #if H_MV5975 849 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( uiCode ); 976 #else977 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 );978 #endif979 850 #else 980 851 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 1061 932 if (uiCode) 1062 933 { 1063 #if !H_MV51064 #if H_MV1065 m_pcBitstream->readOutTrailingBits();1066 1067 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );1068 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false );1069 1070 for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ )1071 {1072 READ_FLAG( uiCode, "scalability_mask[i]" ); pcVPS->setScalabilityMask( sIdx, uiCode == 1 ? true : false );1073 }1074 1075 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ )1076 {1077 READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); pcVPS->setDimensionIdLen( sIdx, uiCode + 1 );1078 }1079 1080 if ( pcVPS->getSplittingFlag() )1081 {1082 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1, pcVPS->inferLastDimsionIdLenMinus1() );1083 }1084 1085 READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false );1086 1087 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )1088 {1089 if ( pcVPS->getVpsNuhLayerIdPresentFlag() && ( i > 0 ) )1090 {1091 READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" ); pcVPS->setLayerIdInNuh( i, uiCode );1092 }1093 else1094 {1095 pcVPS->setLayerIdInNuh( i, i );;1096 }1097 1098 pcVPS->setLayerIdInVps( pcVPS->getLayerIdInNuh( i ), i );1099 1100 for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ )1101 {1102 if ( !pcVPS->getSplittingFlag() )1103 {1104 READ_CODE( pcVPS->getDimensionIdLen( j ), uiCode, "dimension_id[i][j]" ); pcVPS->setDimensionId( i, j, uiCode );1105 }1106 else1107 {1108 pcVPS->setDimensionId( i, j, pcVPS->inferDimensionId( i, j) );1109 }1110 }1111 }1112 1113 1114 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )1115 {1116 for( Int j = 0; j < i; j++ )1117 {1118 READ_FLAG( uiCode, "direct_dependency_flag[i][j]" ); pcVPS->setDirectDependencyFlag( i, j, uiCode );1119 }1120 }1121 1122 for( Int i = 0; i < pcVPS->getMaxLayers() - 1; i++ )1123 {1124 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); pcVPS->setMaxTidIlRefPicPlus1( i , uiCode );1125 }1126 1127 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); pcVPS->setVpsNumberLayerSetsMinus1 ( uiCode );1128 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode );1129 1130 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ )1131 {1132 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 );1133 if( !pcVPS->getVpsProfilePresentFlag( i ) )1134 {1135 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode );1136 }1137 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1);1138 if( !pcVPS->getVpsProfilePresentFlag( i ) )1139 {1140 TComPTL temp = *pcVPS->getPTL( i );1141 *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 );1142 pcVPS->getPTL( i )->copyLevelFrom( &temp );1143 }1144 }1145 1146 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1;1147 1148 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 );1149 1150 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) )1151 {1152 READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1" ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode );1153 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1);1154 }1155 1156 if( numOutputLayerSets > 1)1157 {1158 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag( uiCode == 1);1159 }1160 1161 for( Int i = 1; i < numOutputLayerSets; i++ )1162 {1163 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) )1164 {1165 READ_UVLC( uiCode, "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );1166 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ )1167 {1168 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 );1169 }1170 }1171 if ( pcVPS->getProfileLevelTierIdxLen() > 0 )1172 {1173 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode );1174 }1175 }1176 1177 READ_FLAG( uiCode , "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag( uiCode == 1 );1178 READ_UVLC( uiCode, "direct_dep_type_len_minus2"); pcVPS->setDirectDepTypeLenMinus2 ( uiCode );1179 1180 for( Int i = 1; i <= pcVPS->getMaxLayers() - 1; i++ )1181 {1182 for( Int j = 0; j < i; j++ )1183 {1184 if (pcVPS->getDirectDependencyFlag( i, j) )1185 {1186 READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2, uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode);1187 }1188 }1189 }1190 1191 READ_FLAG ( uiCode, "vps_shvc_reserved_zero_flag" );1192 1193 #if H_3D1194 READ_FLAG( uiCode, "vps_extension2_flag" );1195 if (uiCode)1196 {1197 m_pcBitstream->readOutTrailingBits();1198 1199 for( Int i = 0; i <= pcVPS->getMaxLayers() - 1; i++ )1200 {1201 1202 #if H_3D_ARP1203 pcVPS->setUseAdvRP ( i, 0 );1204 pcVPS->setARPStepNum( i, 1 );1205 #endif1206 if ( i != 0 )1207 {1208 if( !( pcVPS->getDepthId( i ) == 1 ) )1209 {1210 #if H_3D_IV_MERGE1211 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false );1212 #endif1213 #if H_3D_ARP1214 READ_FLAG( uiCode, "iv_res_pred_flag[i]" ); pcVPS->setUseAdvRP ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 );1215 1216 #endif1217 #if H_3D_NBDV_REF1218 READ_FLAG( uiCode, "depth_refinement_flag[i]"); pcVPS->setDepthRefinementFlag ( i, uiCode == 1 ? true : false );1219 #endif1220 #if H_3D_VSP1221 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false );1222 #endif1223 }1224 else1225 {1226 1227 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );1228 // READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPreFlag ( i, uiCode == 1 ? true : false );1229 #if H_3D_DIM_DLT1230 if( pcVPS->getVpsDepthModesFlag( i ) )1231 {1232 READ_FLAG( uiCode, "dlt_flag[i]" ); pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false );1233 }1234 if( pcVPS->getUseDLTFlag( i ) )1235 {1236 // decode mapping1237 UInt uiNumDepthValues;1238 // parse number of values in DLT1239 READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]");1240 1241 // parse actual DLT values1242 Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));1243 for(Int d=0; d<uiNumDepthValues; d++)1244 {1245 READ_UVLC(uiCode, "dlt_depth_value[i][d]");1246 aiIdx2DepthValue[d] = (Int)uiCode;1247 }1248 1249 pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);1250 1251 // clean memory1252 free(aiIdx2DepthValue);1253 }1254 #endif1255 #if H_3D_INTER_SDC1256 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false );1257 #endif1258 }1259 }1260 }1261 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false );1262 }1263 #endif1264 pcVPS->checkVPSExtensionSyntax();1265 1266 pcVPS->setRefLayers();1267 1268 #else1269 while ( xMoreRbspData() )1270 {1271 READ_FLAG( uiCode, "vps_extension_data_flag");1272 }1273 #endif1274 }1275 1276 #if H_3D1277 pcVPS->initViewIndex();1278 #endif1279 return;1280 }1281 #else1282 934 #if H_MV 1283 935 m_pcBitstream->readOutTrailingBits(); … … 1306 958 } 1307 959 } 1308 #endif 1309 1310 #if H_MV5 960 1311 961 #if H_MV 1312 962 Void TDecCavlc::parseVPSExtension( TComVPS* pcVPS ) … … 1649 1299 } 1650 1300 #endif 1651 #endif1652 1301 1653 1302 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) … … 1680 1329 #if H_MV 1681 1330 vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId()); 1682 #if H_MV51683 1331 assert( vps != NULL ); 1684 1332 … … 1692 1340 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerId() ) == 1 ); 1693 1341 #endif 1694 #else1695 assert(vps!=0);1696 rpcSlice->setVPS(vps);1697 rpcSlice->setViewId ( vps->getViewId ( rpcSlice->getLayerIdInVps() ) );1698 #if H_3D1699 rpcSlice->setViewIndex( vps->getViewIndex( rpcSlice->getLayerIdInVps() ) );1700 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerIdInVps() ) == 1 );1701 #endif1702 #endif1703 1342 #endif 1704 1343 rpcSlice->setSPS(sps); … … 1747 1386 { 1748 1387 #if H_MV 1749 #if H_MV51750 1388 Int esb = 0; //Don't use i, otherwise will shadow something below 1751 1389 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) … … 1762 1400 1763 1401 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) 1764 #else1765 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 )1766 {1767 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 );1768 }1769 1770 for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)1771 #endif1772 1402 #else 1773 1403 for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1833 1463 } 1834 1464 rpcSlice->setPOC (iPOCmsb+iPOClsb); 1835 #if H_MV51836 1465 #if H_MV 1837 1466 if ( rpcSlice->getPocResetFlag() ) … … 1841 1470 1842 1471 } 1843 #endif1844 1472 #endif 1845 1473 TComReferencePictureSet* rps; … … 1970 1598 } 1971 1599 #if H_MV 1972 #if H_MV51973 1600 Int layerId = rpcSlice->getLayerId(); 1974 1601 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) { … … 1989 1616 } 1990 1617 } 1991 #else1992 Int layerIdInVps = rpcSlice->getLayerIdInVps();1993 if( rpcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 )1994 {1995 READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 );1996 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerIdInVps ) > 1 )1997 {1998 if( !vps->getMaxOneActiveRefLayerFlag())1999 {2000 READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode );2001 }2002 for( Int i = 0; i < rpcSlice->getNumActiveRefLayerPics(); i++ )2003 {2004 READ_CODE( rpcSlice->getInterLayerPredLayerIdcLen( ), uiCode, "inter_layer_pred_layer_idc" ); rpcSlice->setInterLayerPredLayerIdc( i, uiCode );2005 }2006 }2007 }2008 2009 rpcSlice->setActiveMotionPredRefLayers( );2010 2011 if( vps->getNumSamplePredRefLayers( layerIdInVps ) > 0 && rpcSlice->getNumActiveRefLayerPics() > 0 )2012 {2013 READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" ); rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode == 1 );2014 }2015 #endif2016 1618 #endif 2017 1619 if(sps->getUseSAO()) … … 2155 1757 if ( rpcSlice->getEnableTMVPFlag() ) 2156 1758 { 2157 #if !H_MV52158 #if H_MV2159 if( rpcSlice->getLayerId() > 0 && rpcSlice->getNumActiveMotionPredRefLayers() > 0 )2160 {2161 READ_FLAG( uiCode, "alt_collocated_indication_flag" ); rpcSlice->setAltCollocatedIndicationFlag( uiCode == 1 );2162 }2163 2164 if( rpcSlice->getAltCollocatedIndicationFlag() && rpcSlice->getNumActiveMotionPredRefLayers() > 1 )2165 {2166 READ_UVLC( uiCode, "collocated_ref_layer_idx" ); rpcSlice->setCollocatedRefLayerIdx( uiCode );2167 }2168 else2169 {2170 #endif2171 #endif2172 1759 if ( rpcSlice->getSliceType() == B_SLICE ) 2173 1760 { … … 2191 1778 rpcSlice->setColRefIdx(0); 2192 1779 } 2193 #if !H_MV52194 #if H_MV2195 }2196 #endif2197 #endif2198 1780 } 2199 1781 if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) ) -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecCAVLC.h
r646 r648 76 76 Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); 77 77 Void parseVPS ( TComVPS* pcVPS ); 78 #if H_MV579 78 #if H_MV 80 79 Void parseVPSExtension ( TComVPS* pcVPS ); … … 86 85 Void parseSPSExtension ( TComSPS* pcSPS ); 87 86 #endif 88 #endif89 87 #if H_3D 90 #if H_MV591 88 Void parseVPSExtension2 ( TComVPS* pcVPS ); 92 89 Void parseSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 93 #endif94 90 Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 95 91 #else -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecTop.cpp
r647 r648 436 436 Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window(); 437 437 438 #if H_MV5439 438 #if H_MV 440 439 assert( conformanceWindow .getScaledFlag() ); 441 440 assert( defaultDisplayWindow.getScaledFlag() ); 442 #endif443 441 #endif 444 442 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) … … 518 516 m_cCuDecoder.destroy(); 519 517 #if H_MV 520 #if H_MV5521 518 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 522 #else523 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer );524 #endif525 519 TComSlice::markCurrPic( pcPic ); 526 520 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); … … 591 585 assert (sps != 0); 592 586 593 #if H_MV5594 587 #if H_MV 595 588 TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); … … 599 592 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 600 593 #endif 601 #else602 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP()))603 #endif604 594 { 605 595 printf ("Parameter set activation failed!"); … … 627 617 m_apcSlicePilot->setSPS(sps); 628 618 #if H_MV 629 #if H_MV5630 619 m_apcSlicePilot->setVPS(vps); 631 620 sps->inferRepFormat ( vps , m_layerId ); 632 621 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 633 #else634 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );635 #endif636 622 #endif 637 623 pps->setSPS(sps); … … 695 681 696 682 #if H_MV 697 #if H_MV5698 683 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 699 #else700 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer );701 #endif702 684 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 703 685 #endif … … 706 688 #if H_MV 707 689 TComVPS* vps = m_apcSlicePilot->getVPS(); 708 #if H_MV5709 690 Int layerId = nalu.m_layerId; 710 691 setViewId ( vps->getViewId ( layerId ) ); … … 714 695 m_ivPicLists->setVPS( vps ); 715 696 #endif 716 #else717 Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId );718 setViewId ( vps->getViewId ( layerIdInVps ) );719 #if H_3D720 setViewIndex( vps->getViewIndex( layerIdInVps ) );721 setIsDepth ( vps->getDepthId ( layerIdInVps ) == 1 );722 m_ivPicLists->setVPS( vps );723 #endif724 #endif725 697 #endif 726 698 // Skip pictures due to random access … … 763 735 #endif 764 736 // actual decoding starts here 765 #if H_MV5766 737 #if H_MV 767 738 // This part needs further testing ! … … 771 742 } 772 743 #endif 773 #endif774 744 xActivateParameterSets(); 775 745 … … 791 761 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 792 762 #if H_MV 793 #if H_MV5794 763 m_apcSlicePilot->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 795 #else796 m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer );797 #endif798 764 #endif 799 765 // Get a new picture buffer … … 941 907 // Set reference list 942 908 #if H_MV 943 #if H_MV5944 909 std::vector< TComPic* > tempRefPicLists[2]; 945 910 std::vector< Bool > usedAsLongTerm [2]; … … 948 913 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 949 914 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 950 #else951 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );952 #endif953 915 #if H_3D_ARP 954 916 pcSlice->setARPStepNum(); … … 1088 1050 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1089 1051 assert( vps != 0 ); 1090 #if H_MV51091 1052 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1092 1053 #else 1093 Int layerIdInVPS = vps->getLayerIdInVps( m_layerId );1094 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( layerIdInVPS ), ( vps->getDepthId( layerIdInVPS ) == 1 ) );1095 #endif1096 #else1097 1054 m_cEntropyDecoder.decodeSPS( sps ); 1098 1055 #endif … … 1103 1060 { 1104 1061 TComPPS* pps = new TComPPS(); 1105 #if H_MV51106 1062 #if H_MV 1107 1063 pps->setLayerId( getLayerId() ); 1108 #endif1109 1064 #endif 1110 1065 m_cEntropyDecoder.decodePPS( pps ); … … 1116 1071 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1117 1072 { 1118 #if H_MV51119 1073 #if H_MV 1120 1074 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1122 1076 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1123 1077 #endif 1124 #else1125 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1126 #endif1127 1078 } 1128 1079 else 1129 1080 { 1130 #if H_MV51131 1081 #if H_MV 1132 1082 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); … … 1134 1084 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1135 1085 #endif 1136 #else1137 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() );1138 #endif1139 1086 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 1140 1087 if (activeParamSets.size()>0) … … 1143 1090 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1144 1091 assert(seiAps->activeSeqParamSetId.size()>0); 1145 #if H_MV51146 1092 #if H_MV 1147 1093 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0], m_layerId )) 1148 #else1149 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] ))1150 #endif1151 1094 #else 1152 1095 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] )) … … 1310 1253 } 1311 1254 1312 #if H_MV51313 1255 Void TDecTop::xResetPocInPicBuffer() 1314 1256 { … … 1328 1270 } 1329 1271 #endif 1330 #endif1331 1272 //! \} -
branches/HTM-8.2-dev0-Cleanup/source/Lib/TLibDecoder/TDecTop.h
r622 r648 216 216 Int m_viewId; 217 217 TComPicLists* m_ivPicLists; 218 #if H_MV5219 218 std::vector<TComPic*> m_refPicSetInterLayer0; 220 219 std::vector<TComPic*> m_refPicSetInterLayer1; 221 #else222 std::vector<TComPic*> m_refPicSetInterLayer;223 #endif224 220 #if H_3D 225 221 Int m_viewIndex; … … 279 275 TComPic* xGetPic( Int layerId, Int poc ); 280 276 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag ); 281 #if H_MV5282 277 Void xResetPocInPicBuffer(); 283 #endif284 278 #else 285 279 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay);
Note: See TracChangeset for help on using the changeset viewer.