Changeset 655 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 23 Oct 2013, 23:01:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r622 r655 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 #endif 921 #if H_MV 5798 799 #if H_MV 922 800 Void TDecCavlc::parseSPSExtension( TComSPS* pcSPS ) 923 801 { … … 972 850 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 973 851 #if H_MV 974 #if H_MV5975 852 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 853 #else 980 854 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 1061 935 if (uiCode) 1062 936 { 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 LGE_INTER_SDC_E01561256 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 937 #if H_MV 1283 938 m_pcBitstream->readOutTrailingBits(); … … 1305 960 #endif 1306 961 } 1307 } 1308 #endif 1309 1310 #if H_MV5 962 return; 963 } 964 1311 965 #if H_MV 1312 966 Void TDecCavlc::parseVPSExtension( TComVPS* pcVPS ) … … 1640 1294 } 1641 1295 #endif 1642 #if LGE_INTER_SDC_E01561296 #if H_3D_INTER_SDC 1643 1297 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); 1644 1298 #endif … … 1648 1302 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1649 1303 } 1650 #endif1651 1304 #endif 1652 1305 … … 1680 1333 #if H_MV 1681 1334 vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId()); 1682 #if H_MV51683 1335 assert( vps != NULL ); 1684 1336 … … 1692 1344 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerId() ) == 1 ); 1693 1345 #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 1346 #endif 1704 1347 rpcSlice->setSPS(sps); … … 1747 1390 { 1748 1391 #if H_MV 1749 #if H_MV51750 1392 Int esb = 0; //Don't use i, otherwise will shadow something below 1751 1393 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) … … 1762 1404 1763 1405 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 1406 #else 1773 1407 for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1808 1442 READ_CODE(sps->getBitsForPOC(), uiCode, "pic_order_cnt_lsb"); 1809 1443 Int iPOClsb = uiCode; 1810 Int iPrevPOC = rpcSlice->getPrev POC();1444 Int iPrevPOC = rpcSlice->getPrevTid0POC(); 1811 1445 Int iMaxPOClsb = 1<< sps->getBitsForPOC(); 1812 Int iPrevPOClsb = iPrevPOC %iMaxPOClsb;1446 Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1); 1813 1447 Int iPrevPOCmsb = iPrevPOC-iPrevPOClsb; 1814 1448 Int iPOCmsb; … … 1833 1467 } 1834 1468 rpcSlice->setPOC (iPOCmsb+iPOClsb); 1835 #if H_MV51836 1469 #if H_MV 1837 1470 if ( rpcSlice->getPocResetFlag() ) … … 1841 1474 1842 1475 } 1843 #endif1844 1476 #endif 1845 1477 TComReferencePictureSet* rps; … … 1941 1573 rps->setDeltaPOC(j, - rpcSlice->getPOC() + pocLsbLt); 1942 1574 rps->setCheckLTMSBPresent(j,false); 1575 1576 // reset deltaPocMSBCycleLT for first LTRP from slice header if MSB not present 1577 if( j == offset+(numOfLtrp-numLtrpInSPS)-1 ) 1578 { 1579 deltaPocMSBCycleLT = 0; 1580 } 1943 1581 } 1944 1582 prevDeltaMSB = deltaPocMSBCycleLT; … … 1970 1608 } 1971 1609 #if H_MV 1972 #if H_MV51973 1610 Int layerId = rpcSlice->getLayerId(); 1974 1611 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) { … … 1989 1626 } 1990 1627 } 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 1628 #endif 2017 1629 if(sps->getUseSAO()) … … 2155 1767 if ( rpcSlice->getEnableTMVPFlag() ) 2156 1768 { 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 1769 if ( rpcSlice->getSliceType() == B_SLICE ) 2173 1770 { … … 2191 1788 rpcSlice->setColRefIdx(0); 2192 1789 } 2193 #if !H_MV52194 #if H_MV2195 }2196 #endif2197 #endif2198 1790 } 2199 1791 if ( (pps->getUseWP() && rpcSlice->getSliceType()==P_SLICE) || (pps->getWPBiPred() && rpcSlice->getSliceType()==B_SLICE) ) … … 2651 2243 } 2652 2244 #endif 2653 #if LGE_INTER_SDC_E01562245 #if H_3D_INTER_SDC 2654 2246 Void TDecCavlc::parseInterSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2655 2247 {
Note: See TracChangeset for help on using the changeset viewer.