Changeset 165 in SHVCSoftware for branches/SHM-2.0-dev/source
- Timestamp:
- 8 May 2013, 22:13:18 (12 years ago)
- Location:
- branches/SHM-2.0-dev/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
r154 r165 853 853 #endif 854 854 // Target output layer 855 #if VPS_PROFILE_OUTPUT_LAYERS 856 vps->setNumOutputLayerSets(2); // 2 including the default base-layer set. 857 vps->setNumProfileTierLevel(2); // 1 for the enhancement layer 858 vps->setProfileLevelTierIdx(1, 1); 859 vps->setDefaultOneTargetOutputLayerFlag(true); 860 Int lsIdx = 1; 861 vps->setOutputLayerSetIdx(1, lsIdx); // Because only one layer set 862 #else 855 863 vps->setNumOutputLayerSets(1); 856 864 Int lsIdx = 1; 857 865 vps->setOutputLayerSetIdx(0, lsIdx); // Because only one layer set 866 #endif 858 867 // Include the highest layer as output layer 859 868 for(UInt layer=0; layer <= vps->getMaxLayerId() ; layer++) -
branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.cpp
r162 r165 1491 1491 , m_numOutputLayerSets (0) 1492 1492 #endif 1493 #if VPS_PROFILE_OUTPUT_LAYERS 1494 , m_numProfileTierLevel (0) 1495 , m_moreOutputLayerSetsThanDefaultFlag (false) 1496 , m_numAddOutputLayerSets (0) 1497 , m_defaultOneTargetOutputLayerFlag (false) 1498 #endif 1493 1499 { 1494 1500 for( Int i = 0; i < MAX_TLAYER; i++) … … 1532 1538 ::memset(m_layerSetLayerIdList, 0, sizeof(m_layerSetLayerIdList)); 1533 1539 ::memset(m_numLayerInIdList, 0, sizeof(m_numLayerInIdList )); 1540 #endif 1541 #if VPS_PROFILE_OUTPUT_LAYERS 1542 ::memset(m_profileLevelTierIdx, 0, sizeof(m_profileLevelTierIdx)); 1534 1543 #endif 1535 1544 } -
branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h
r162 r165 550 550 UInt m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 551 551 #endif 552 552 #if VPS_PROFILE_OUTPUT_LAYERS 553 UInt m_numProfileTierLevel; 554 Bool m_moreOutputLayerSetsThanDefaultFlag; 555 Int m_numAddOutputLayerSets; 556 Bool m_defaultOneTargetOutputLayerFlag; 557 Int m_profileLevelTierIdx[64]; 558 #endif 553 559 public: 554 560 TComVPS(); … … 682 688 UInt getRefLayerId(Int layerId, Int refLayerIdx) { return m_refLayerId[layerId][refLayerIdx]; } 683 689 Void setRefLayerId(Int layerId, Int refLayerIdx, UInt refLayerId) { m_refLayerId[layerId][refLayerIdx] = refLayerId; } 690 #endif 691 #if VPS_PROFILE_OUTPUT_LAYERS 692 UInt getNumProfileTierLevel() { return m_numProfileTierLevel; } 693 Void setNumProfileTierLevel(Int x) { m_numProfileTierLevel = x; } 694 695 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag;} 696 Void setMoreOutputLayerSetsThanDefaultFlag(Bool x) { m_moreOutputLayerSetsThanDefaultFlag = x ;} 697 698 Int getNumAddOutputLayerSets() { return m_numAddOutputLayerSets; } 699 Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } 700 701 Bool getDefaultOneTargetOutputLayerFlag() { return m_defaultOneTargetOutputLayerFlag;} 702 Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} 703 704 Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } 705 Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } 684 706 #endif 685 707 }; -
branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h
r162 r165 54 54 #define VPS_EXTN_DIRECT_REF_LAYERS 1 ///< Include indication of direct dependency of layers in VPS extension 55 55 #define VPS_EXTN_DIRECT_REF_LAYERS_CONTINUE 1 56 #define VPS_OUTPUT_LAYER_SET_IDX 1 ///< Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i] 57 #define VPS_MOVE_DIR_DEPENDENCY_FLAG 1 ///< Move the syntax element direct_dependency_flag to follow the syntax element dimension_id 56 #define VPS_OUTPUT_LAYER_SET_IDX 1 ///< M0268: Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i] 57 #define VPS_MOVE_DIR_DEPENDENCY_FLAG 1 ///< M0268: Move the syntax element direct_dependency_flag to follow the syntax element dimension_id 58 #define VPS_PROFILE_OUTPUT_LAYERS 1 ///< M0268: Signal profile information and output layer information as in Sec. 3 of M0268v2 58 59 #endif 59 60 -
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 -
branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r160 r165 39 39 #include "TEncCavlc.h" 40 40 #include "SEIwrite.h" 41 41 #include <iostream> 42 42 //! \ingroup TLibEncoder 43 43 //! \{ … … 718 718 #if VPS_EXTN_PROFILE_INFO 719 719 // Profile-tier-level signalling 720 #if VPS_PROFILE_OUTPUT_LAYERS 721 WRITE_CODE( vps->getNumLayerSets() - 1 , 10, "vps_number_layer_sets_minus1" ); 722 WRITE_CODE( vps->getNumProfileTierLevel() - 1, 6, "vps_num_profile_tier_level_minus1"); 723 for(Int idx = 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) 724 #else 720 725 for(Int idx = 1; idx <= vps->getNumLayerSets() - 1; idx++) 726 #endif 721 727 { 722 728 WRITE_FLAG( vps->getProfilePresentFlag(idx), "vps_profile_present_flag[i]" ); 723 729 if( !vps->getProfilePresentFlag(idx) ) 724 730 { 731 #if VPS_PROFILE_OUTPUT_LAYERS 732 WRITE_CODE( vps->getProfileLayerSetRef(idx) - 1, 6, "profile_ref_minus1[i]" ); 733 #else 725 734 WRITE_UVLC( vps->getProfileLayerSetRef(idx) - 1, "vps_profile_layer_set_ref_minus1[i]" ); 735 #endif 726 736 } 727 737 codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); 728 738 } 729 739 #endif 740 741 #if VPS_PROFILE_OUTPUT_LAYERS 742 Int numOutputLayerSets = vps->getNumOutputLayerSets() ; 743 WRITE_FLAG( (numOutputLayerSets > vps->getNumLayerSets()), "more_output_layer_sets_than_default_flag" ); 744 if(numOutputLayerSets > vps->getNumLayerSets()) 745 { 746 WRITE_CODE( numOutputLayerSets - vps->getNumLayerSets(), 10, "num_add_output_layer_sets" ); 747 } 748 if( numOutputLayerSets > 1 ) 749 { 750 WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" ); 751 } 752 753 for(i = 1; i < numOutputLayerSets; i++) 754 { 755 if( i > (vps->getNumLayerSets() - 1) ) 756 { 757 Int numBits = std::max(1.0, ceil( log((double)vps->getNumLayerSets() - 1) / log(2.0) )); 758 WRITE_CODE( vps->getOutputLayerSetIdx(i) - 1, numBits, "output_layer_set_idx_minus1"); 759 Int lsIdx = vps->getOutputLayerSetIdx(i); 760 for(j = 0; j < vps->getNumLayersInIdList(lsIdx) - 1; j++) 761 { 762 WRITE_FLAG( vps->getOutputLayerFlag(i,j), "output_layer_flag[i][j]"); 763 } 764 } 765 Int numBits = std::max(1.0, ceil( log((double)vps->getNumProfileTierLevel()) / log(2.0) )); 766 WRITE_CODE( vps->getProfileLevelTierIdx(i), numBits, "profile_level_tier_idx[i]" ); 767 } 768 #else 730 769 #if VPS_EXTN_OP_LAYER_SETS 731 770 // Target output layer signalling … … 748 787 } 749 788 } 789 #endif 750 790 #endif 751 791 #if !VPS_MOVE_DIR_DEPENDENCY_FLAG
Note: See TracChangeset for help on using the changeset viewer.