Changeset 544 in SHVCSoftware
- Timestamp:
- 11 Jan 2014, 01:46:01 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/App/TAppEncoder/TAppEncTop.cpp
r537 r544 1171 1171 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 1172 1172 vps->setNumProfileTierLevel(vps->getNumLayerSets()); 1173 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 1174 vps->setDefaultOneTargetOutputLayerIdc(1); 1175 #else 1173 1176 vps->setDefaultOneTargetOutputLayerFlag(true); 1177 #endif 1174 1178 for(i = 1; i < vps->getNumLayerSets(); i++) 1175 1179 { -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r542 r544 2038 2038 , m_moreOutputLayerSetsThanDefaultFlag (false) 2039 2039 , m_numAddOutputLayerSets (0) 2040 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 2041 , m_defaultOneTargetOutputLayerIdc (0) 2042 #else 2040 2043 , m_defaultOneTargetOutputLayerFlag (false) 2044 #endif 2041 2045 #if VPS_VUI_BITRATE_PICRATE 2042 2046 , m_bitRatePresentVpsFlag (false) … … 2048 2052 #endif 2049 2053 #if VIEW_ID_RELATED_SIGNALING 2054 #if O0109_VIEW_ID_LEN 2055 , m_viewIdLen (0) 2056 #else 2050 2057 , m_viewIdLenMinus1 (0) 2058 #endif 2051 2059 #endif 2052 2060 #if VPS_VUI_OFFSET -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r542 r544 540 540 Bool m_moreOutputLayerSetsThanDefaultFlag; 541 541 Int m_numAddOutputLayerSets; 542 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 543 UInt m_defaultOneTargetOutputLayerIdc; 544 #else 542 545 Bool m_defaultOneTargetOutputLayerFlag; 546 #endif 543 547 Int m_profileLevelTierIdx[64]; 544 548 #if JCTVC_M0458_INTERLAYER_RPS_SIG … … 622 626 #endif 623 627 #if VIEW_ID_RELATED_SIGNALING 628 #if O0109_VIEW_ID_LEN 629 Int m_viewIdLen; 630 #else 624 631 Int m_viewIdLenMinus1; 632 #endif 625 633 Int m_viewIdVal [MAX_LAYERS]; 626 634 #endif … … 642 650 Int m_numSubDpbs [MAX_VPS_OP_LAYER_SETS_PLUS1]; 643 651 #endif 652 653 #if O0109_MOVE_VPS_VUI_FLAG 654 Bool m_vpsVuiPresentFlag; 655 #endif 656 644 657 #endif //SVC_EXTENSION 645 658 #if VPS_VUI_OFFSET … … 814 827 Void setNumAddOutputLayerSets(Int x) { m_numAddOutputLayerSets = x ; } 815 828 829 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 830 UInt getDefaultOneTargetOutputLayerIdc() { return m_defaultOneTargetOutputLayerIdc;} 831 Void setDefaultOneTargetOutputLayerIdc(UInt x) { m_defaultOneTargetOutputLayerIdc= x ;} 832 #else 816 833 Bool getDefaultOneTargetOutputLayerFlag() { return m_defaultOneTargetOutputLayerFlag;} 817 834 Void setDefaultOneTargetOutputLayerFlag(Bool x) { m_defaultOneTargetOutputLayerFlag= x ;} 818 835 #endif 819 836 Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } 820 837 Void setProfileLevelTierIdx(Int i, Int x) { m_profileLevelTierIdx[i] = x ; } … … 949 966 #endif 950 967 #if VIEW_ID_RELATED_SIGNALING 968 #if O0109_VIEW_ID_LEN 969 Void setViewIdLen( Int val ) { m_viewIdLen = val; } 970 Int getViewIdLen( ) { return m_viewIdLen; } 971 #else 951 972 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } 952 973 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } 974 #endif 953 975 954 976 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } … … 989 1011 Void setNumSubDpbs(Int i, Int x) { m_numSubDpbs[i] = x; } 990 1012 #endif 1013 1014 #if O0109_MOVE_VPS_VUI_FLAG 1015 Bool getVpsVuiPresentFlag() { return m_vpsVuiPresentFlag; } 1016 Void setVpsVuiPresentFlag(Bool x) { m_vpsVuiPresentFlag = x; } 1017 #endif 1018 991 1019 #if VPS_VUI_OFFSET 992 1020 Int getVpsVuiOffset() { return m_vpsVuiOffset; } -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r543 r544 49 49 #define MAX_LAYERS 2 ///< max number of layers the codec is supposed to handle 50 50 51 #define O0109_O0199_FLAGS_TO_VUI 1 ///< JCTVC-O0109, O0199: move single_layer_for_non_irap_flag and higher_layer_flag to vps_vui 52 #define O0109_VIEW_ID_LEN 1 ///< JCTVC-O0109: view_id_len_minus1 to view_id_len, and add constraint (1<<view_id_len) is greater than or equal to NumViews 53 #define O0109_PROF_REF_MINUS1 1 ///< JCTVC-O0109: constraint that profile_ref_minus1[i] shall be less than or equal to i 54 #define O0109_DEFAULT_ONE_OUT_LAYER_IDC 1 ///< JCTVC-O0109: default_one_target_output_layer_flag to default_one_target_output_layer_idc 55 #define O0109_MOVE_VPS_VUI_FLAG 1 ///< JCTVC-O0109: move vps_vui_present_flag before vps_vui_offset 56 51 57 #define O0194_DIFFERENT_BITDEPTH_EL_BL 1 ///< JCTVC-O0194: Support for different bitdepth values for BL and EL, add required configuration parameters (and Some bugfixes when REPN_FORMAT_IN_VPS (JCTVC-N0092) is enabled) 52 58 #if O0194_DIFFERENT_BITDEPTH_EL_BL … … 179 185 #define RC_SHVC_HARMONIZATION 1 ///< JCTVC-M0037: rate control for SHVC 180 186 181 #define VIEW_ID_RELATED_SIGNALING 1 ///< Introduce syntax elements view_id _len_minus1and view_id_val187 #define VIEW_ID_RELATED_SIGNALING 1 ///< Introduce syntax elements view_id and view_id_val 182 188 #define M0043_LAYERS_PRESENT_SEI 0 ///< JCTVC-M0043: add layers present SEI. Macro shall be equal to 0 according to the JCTVC-N0174 discussion. The code is to be removed. 183 189 #define N0383_IL_CONSTRAINED_TILE_SETS_SEI 1 -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r542 r544 990 990 991 991 READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false); 992 993 #if O0109_MOVE_VPS_VUI_FLAG 994 READ_FLAG( uiCode, "vps_vui_present_flag"); vps->setVpsVuiPresentFlag(uiCode ? true : false); 995 if ( uiCode ) 996 { 997 #endif 992 998 #if VPS_VUI_OFFSET 993 999 READ_CODE( 16, uiCode, "vps_vui_offset" ); vps->setVpsVuiOffset( uiCode ); 1000 #endif 1001 #if O0109_MOVE_VPS_VUI_FLAG 1002 } 994 1003 #endif 995 1004 READ_FLAG( uiCode, "splitting_flag" ); vps->setSplittingFlag(uiCode ? true : false); … … 1051 1060 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 1052 1061 { 1062 #if O0109_VIEW_ID_LEN 1063 READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode ); 1064 #else 1053 1065 READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode ); 1054 } 1055 1066 #endif 1067 } 1068 1069 #if O0109_VIEW_ID_LEN 1070 if ( vps->getViewIdLen() > 0 ) 1071 { 1072 for( i = 0; i < vps->getNumViews(); i++ ) 1073 { 1074 READ_CODE( vps->getViewIdLen( ), uiCode, "view_id_val[i]" ); vps->setViewIdVal( i, uiCode ); 1075 } 1076 } 1077 #else 1056 1078 for( i = 0; i < vps->getNumViews(); i++ ) 1057 1079 { … … 1059 1081 } 1060 1082 #endif 1083 #endif // view id related signaling 1061 1084 #if VPS_EXTN_DIRECT_REF_LAYERS 1062 1085 // For layer 0 … … 1168 1191 { 1169 1192 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); 1193 #if O0109_PROF_REF_MINUS1 1194 assert( vps->getProfileLayerSetRef(idx) <= idx ); 1195 #else 1170 1196 assert( vps->getProfileLayerSetRef(idx) < idx ); 1171 1197 #endif 1172 1198 // Copy profile information as indicated 1173 1199 vps->getPTLForExtn(idx)->copyProfileInfo( vps->getPTLForExtn( vps->getProfileLayerSetRef(idx) ) ); … … 1190 1216 if( numOutputLayerSets > 1 ) 1191 1217 { 1218 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 1219 READ_CODE( 2, uiCode, "default_one_target_output_layer_idc" ); vps->setDefaultOneTargetOutputLayerIdc( uiCode ); 1220 #else 1192 1221 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); vps->setDefaultOneTargetOutputLayerFlag( uiCode ? true : false ); 1222 #endif 1193 1223 } 1194 1224 vps->setNumOutputLayerSets( numOutputLayerSets ); … … 1218 1248 // Assign OutputLayerFlag depending on default_one_target_output_layer_flag 1219 1249 Int lsIdx = i; 1250 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 1251 if( vps->getDefaultOneTargetOutputLayerIdc() == 1 ) 1252 { 1253 for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++) 1254 { 1255 vps->setOutputLayerFlag(i, j, (j == (vps->getNumLayersInIdList(lsIdx)-1))); 1256 } 1257 } 1258 else if ( vps->getDefaultOneTargetOutputLayerIdc() == 0 ) 1259 { 1260 for(j = 0; j < vps->getNumLayersInIdList(lsIdx); j++) 1261 { 1262 vps->setOutputLayerFlag(i, j, 1); 1263 } 1264 } 1265 else 1266 { 1267 // Other values of default_one_target_output_layer_idc than 0 and 1 are reserved for future use. 1268 } 1269 #else 1220 1270 if( vps->getDefaultOneTargetOutputLayerFlag() ) 1221 1271 { … … 1232 1282 } 1233 1283 } 1284 #endif 1234 1285 } 1235 1286 Int numBits = 1; … … 1411 1462 #endif 1412 1463 1464 #if !O0109_O0199_FLAGS_TO_VUI 1413 1465 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1414 1466 READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false); … … 1417 1469 READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false); 1418 1470 #endif 1419 1471 #endif 1472 1473 #if O0109_MOVE_VPS_VUI_FLAG 1474 if ( vps->getVpsVuiPresentFlag() ) 1475 #else 1420 1476 READ_FLAG( uiCode, "vps_vui_present_flag" ); 1421 1477 if (uiCode) 1478 #endif 1422 1479 { 1423 1480 #if VPS_VUI … … 1596 1653 } 1597 1654 #endif 1655 1656 #if O0109_O0199_FLAGS_TO_VUI 1657 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1658 READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false); 1659 #endif 1660 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1661 READ_FLAG(uiCode, "higher_layer_irap_skip_flag" ); vps->setHigherLayerIrapSkipFlag(uiCode == 1 ? true : false); 1662 #endif 1663 #endif 1664 1598 1665 #if N0160_VUI_EXT_ILP_REF 1599 1666 READ_FLAG( uiCode, "num_ilp_restricted_ref_layers" ); vps->setNumIlpRestrictedRefLayers( uiCode == 1 ); -
branches/SHM-4.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r542 r544 798 798 799 799 WRITE_FLAG( vps->getAvcBaseLayerFlag(), "avc_base_layer_flag" ); 800 #if O0109_MOVE_VPS_VUI_FLAG 801 #if !VPS_VUI 802 WRITE_FLAG( 0, "vps_vui_present_flag" ); 803 vps->setVpsVuiPresentFlag(false); 804 #else 805 WRITE_FLAG( 1, "vps_vui_present_flag" ); 806 vps->setVpsVuiPresentFlag(true); 807 #endif 808 if ( vps->getVpsVuiPresentFlag() ) 809 { 810 #if VPS_VUI_OFFSET 811 WRITE_CODE( vps->getVpsVuiOffset( ), 16, "vps_vui_offset" ); 812 #endif 813 WRITE_FLAG( vps->getSplittingFlag(), "splitting_flag" ); 814 } 815 #else 800 816 #if VPS_VUI_OFFSET 801 817 WRITE_CODE( vps->getVpsVuiOffset( ), 16, "vps_vui_offset" ); 802 818 #endif 803 819 WRITE_FLAG( vps->getSplittingFlag(), "splitting_flag" ); 820 #endif // O0109_MOVE_VPS_VUI_FLAG 804 821 805 822 for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++) … … 847 864 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 848 865 { 866 #if O0109_VIEW_ID_LEN 867 WRITE_CODE( vps->getViewIdLen( ), 4, "view_id_len" ); 868 assert ( vps->getNumViews() >= (1<<vps->getViewIdLen()) ); 869 #else 849 870 WRITE_CODE( vps->getViewIdLenMinus1( ), 4, "view_id_len_minus1" ); 850 } 851 871 #endif 872 } 873 874 #if O0109_VIEW_ID_LEN 875 if ( vps->getViewIdLen() > 0 ) 876 { 877 #endif 852 878 for( i = 0; i < vps->getNumViews(); i++ ) 853 879 { 880 #if O0109_VIEW_ID_LEN 881 WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLen( ), "view_id_val[i]" ); 882 #else 854 883 WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLenMinus1( ) + 1, "view_id_val[i]" ); 855 } 856 #endif 884 #endif 885 } 886 #if O0109_VIEW_ID_LEN 887 } 888 #endif 889 #endif // VIEW_ID_RELATED_SIGNALING 890 857 891 #if VPS_EXTN_DIRECT_REF_LAYERS 858 892 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) … … 937 971 if( numOutputLayerSets > 1 ) 938 972 { 973 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 974 WRITE_CODE( vps->getDefaultOneTargetOutputLayerIdc(), 2, "default_one_target_output_layer_idc" ); 975 #else 939 976 WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" ); 977 #endif 940 978 } 941 979 … … 1078 1116 #endif 1079 1117 #endif 1118 1119 #if !O0109_O0199_FLAGS_TO_VUI 1080 1120 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1081 1121 WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" ); … … 1084 1124 WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" ); 1085 1125 #endif 1086 1126 #endif 1127 1128 #if !O0109_MOVE_VPS_VUI_FLAG 1087 1129 #if !VPS_VUI 1088 1130 WRITE_FLAG( 0, "vps_vui_present_flag" ); … … 1103 1145 } 1104 1146 #endif 1147 #else 1148 if(vps->getVpsVuiPresentFlag()) // Should be conditioned on the value of vps_vui_present_flag 1149 { 1150 while ( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0 ) 1151 { 1152 WRITE_FLAG(1, "vps_vui_alignment_bit_equal_to_one"); 1153 } 1154 #if VPS_VUI_OFFSET 1155 Int vpsVuiOffsetValeInBits = this->m_pcBitIf->getNumberOfWrittenBits() - m_vpsVuiCounter + 16; // 2 bytes for NUH 1156 assert( vpsVuiOffsetValeInBits % 8 == 0 ); 1157 vps->setVpsVuiOffset( vpsVuiOffsetValeInBits >> 3 ); 1158 #endif 1159 codeVPSVUI(vps); 1160 } 1161 #endif // 0109_MOVE_VPS_FLAG 1105 1162 } 1106 1163 #endif … … 1236 1293 } 1237 1294 } 1295 #endif 1296 1297 #if O0109_O0199_FLAGS_TO_VUI 1298 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1299 WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" ); 1300 #endif 1301 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1302 WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" ); 1303 #endif 1238 1304 #endif 1239 1305 #if N0160_VUI_EXT_ILP_REF
Note: See TracChangeset for help on using the changeset viewer.