Changeset 165 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibDecoder
- Timestamp:
- 8 May 2013, 22:13:18 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r160 r165 927 927 #endif 928 928 #endif 929 929 930 #if VPS_EXTN_PROFILE_INFO 930 931 // Profile-tier-level signalling 932 #if VPS_PROFILE_OUTPUT_LAYERS 933 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); assert( uiCode == (vps->getNumLayerSets() - 1) ); 934 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1"); vps->setNumProfileTierLevel( uiCode + 1 ); 935 vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel()); 936 for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) 937 #else 931 938 vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets()); 932 939 for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++) 940 #endif 933 941 { 934 942 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); vps->setProfilePresentFlag(idx, uiCode ? true : false); 935 943 if( !vps->getProfilePresentFlag(idx) ) 936 944 { 945 #if VPS_PROFILE_OUTPUT_LAYERS 946 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); 947 #else 937 948 READ_UVLC( uiCode, "vps_profile_layer_set_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); 949 #endif 938 950 assert( vps->getProfileLayerSetRef(idx) < idx ); 939 951 // Copy profile information as indicated … … 944 956 #endif 945 957 958 #if VPS_PROFILE_OUTPUT_LAYERS 959 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); vps->setMoreOutputLayerSetsThanDefaultFlag( uiCode ? true : false ); 960 Int numOutputLayerSets = 0; 961 if(! vps->getMoreOutputLayerSetsThanDefaultFlag() ) 962 { 963 numOutputLayerSets = vps->getNumLayerSets(); 964 } 965 else 966 { 967 READ_CODE( 10, uiCode, "num_add_output_layer_sets" ); vps->setNumAddOutputLayerSets( uiCode ); 968 numOutputLayerSets = vps->getNumLayerSets() + vps->getNumAddOutputLayerSets(); 969 } 970 if( numOutputLayerSets > 1 ) 971 { 972 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); vps->setDefaultOneTargetOutputLayerFlag( uiCode ? true : false ); 973 } 974 vps->setNumOutputLayerSets( numOutputLayerSets ); 975 976 for(i = 1; i < numOutputLayerSets; i++) 977 { 978 if( i > (vps->getNumLayerSets() - 1) ) 979 { 980 Int numBits = std::max(1.0, ceil( log((double)vps->getNumLayerSets() - 1) / log(2.0) )); 981 READ_CODE( numBits, uiCode, "output_layer_set_idx_minus1"); vps->setOutputLayerSetIdx( i, uiCode + 1); 982 Int lsIdx = vps->getOutputLayerSetIdx(i); 983 for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++) 984 { 985 READ_FLAG( uiCode, "output_layer_flag[i][j]"); vps->setOutputLayerFlag(i, j, uiCode); 986 } 987 } 988 else 989 { 990 // i <= (vps->getNumLayerSets() - 1) 991 // Assign OutputLayerFlag depending on default_one_target_output_layer_flag 992 Int lsIdx = i; 993 if( vps->getDefaultOneTargetOutputLayerFlag() ) 994 { 995 for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++) 996 { 997 vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1))); 998 } 999 } 1000 else 1001 { 1002 for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++) 1003 { 1004 vps->setOutputLayerFlag(i, j, 1); 1005 } 1006 } 1007 } 1008 Int numBits = std::max(1.0, ceil( log((double)vps->getNumProfileTierLevel()) / log(2.0) )); 1009 READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" ); vps->setProfileLevelTierIdx(i, uiCode); 1010 } 1011 #else 946 1012 #if VPS_EXTN_OP_LAYER_SETS 947 1013 // Target output layer signalling … … 962 1028 } 963 1029 } 964 } 965 #endif 1030 } 1031 #endif 1032 #endif 1033 966 1034 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG 967 1035 #if VPS_EXTN_DIRECT_REF_LAYERS
Note: See TracChangeset for help on using the changeset viewer.