Changeset 1006 in SHVCSoftware for branches/SHM-upgrade/source/App
- Timestamp:
- 27 Jan 2015, 19:44:15 (10 years ago)
- Location:
- branches/SHM-upgrade/source/App
- Files:
-
- 3 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/App/TAppDecoder/TAppDecCfg.cpp
r962 r1006 265 265 } 266 266 fclose (targetDecLayerIdSetFile); 267 #if !R0235_SMALLEST_LAYER_ID // LayerId=0 is not required anymore in some cases 267 268 if ( m_targetDecLayerIdSet.size() > 0 && !isLayerIdZeroIncluded ) 268 269 { … … 270 271 return false; 271 272 } 273 #endif 272 274 } 273 275 else -
branches/SHM-upgrade/source/App/TAppDecoder/TAppDecTop.cpp
r962 r1006 1212 1212 return true; 1213 1213 } 1214 #if R0235_SMALLEST_LAYER_ID 1215 if (nalu->m_layerId == 0 && (nalu->m_nalUnitType == NAL_UNIT_VPS || nalu->m_nalUnitType == NAL_UNIT_SPS || nalu->m_nalUnitType == NAL_UNIT_PPS || nalu->m_nalUnitType == NAL_UNIT_EOS)) 1216 { 1217 return true; 1218 } 1219 #endif 1214 1220 for (std::vector<Int>::iterator it = m_targetDecLayerIdSet.begin(); it != m_targetDecLayerIdSet.end(); it++) 1215 1221 { -
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.cpp
r998 r1006 2681 2681 #if MULTIPLE_PTL_SUPPORT 2682 2682 Int olsToLsIndex = (olsCtr >= (m_numLayerSets + m_numAddLayerSets)) ? m_outputLayerSetIdx[olsCtr - (m_numLayerSets + m_numAddLayerSets)] : olsCtr; 2683 #if R0235_SMALLEST_LAYER_ID 2684 // This is a fix to allow setting of PTL for additional layer sets 2685 if (olsCtr >= m_numLayerSets && olsCtr < (m_numLayerSets + m_numAddLayerSets)) 2686 { 2687 scanStringToArrayNumEntries(cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr]); 2688 } 2689 else 2690 { 2691 scanStringToArray(cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr]); 2692 } 2693 #else 2683 2694 scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] ); 2695 #endif 2684 2696 //For conformance checking 2685 2697 //Conformance of a layer in an output operation point associated with an OLS in a bitstream to the Scalable Main profile is indicated as follows: … … 2688 2700 //If OpTid of the output operation point is equal to vps_max_sub_layer_minus1, the conformance is indicated by general_profile_idc being equal to 7 or general_profile_compatibility_flag[ 7 ] being equal to 1 2689 2701 //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag. 2702 #if R0235_SMALLEST_LAYER_ID 2703 if (m_numAddLayerSets == 0) 2704 { 2705 #endif 2690 2706 for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++) 2691 2707 { … … 2696 2712 (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ); 2697 2713 } 2698 } 2714 } 2715 #if R0235_SMALLEST_LAYER_ID 2716 } 2717 #endif 2699 2718 #endif 2700 2719 } … … 5084 5103 } 5085 5104 #endif 5105 5106 #if R0235_SMALLEST_LAYER_ID 5107 #if OUTPUT_LAYER_SETS_CONFIG 5108 Void TAppEncCfg::cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString) 5109 { 5110 Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str()); 5111 if (numEntries > 0) 5112 { 5113 Char *arrayEntry; 5114 Int i = 0; 5115 *arr = new Int[numEntries]; 5116 5117 if (tempChar == NULL) 5118 { 5119 arrayEntry = NULL; 5120 } 5121 else 5122 { 5123 arrayEntry = strtok(tempChar, " ,"); 5124 } 5125 while (arrayEntry != NULL) 5126 { 5127 if (i >= numEntries) 5128 { 5129 printf("%s: The number of entries specified is larger than the allowed number.\n", logString); 5130 exit(EXIT_FAILURE); 5131 } 5132 *(*arr + i) = atoi(arrayEntry); 5133 arrayEntry = strtok(NULL, " ,"); 5134 i++; 5135 } 5136 numEntries = i; 5137 /* 5138 if (i < numEntries) 5139 { 5140 printf("%s: Some entries are not specified.\n", logString); 5141 exit(EXIT_FAILURE); 5142 } 5143 */ 5144 } 5145 else 5146 { 5147 *arr = NULL; 5148 } 5149 5150 if (tempChar) 5151 { 5152 free(tempChar); 5153 tempChar = NULL; 5154 } 5155 } 5156 5157 Bool TAppEncCfg::scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, std::vector<Int> & returnVector) 5158 { 5159 Int *tempArray = NULL; 5160 numEntries = MAX_LAYERS; 5161 // For all layer sets 5162 cfgStringToArrayNumEntries(&tempArray, cfgString, numEntries, logString); 5163 if (tempArray) 5164 { 5165 returnVector.empty(); 5166 for (Int i = 0; i < numEntries; i++) 5167 { 5168 returnVector.push_back(tempArray[i]); 5169 } 5170 delete[] tempArray; tempArray = NULL; 5171 return true; 5172 } 5173 return false; 5174 } 5175 #endif 5176 #endif // R0235 5086 5177 #endif //SVC_EXTENSION 5087 5178 //! \} -
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.h
r959 r1006 587 587 Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> & returnVector); 588 588 Void cfgStringToArray(Int **arr, string const cfgString, Int const numEntries, const char* logString); 589 #if R0235_SMALLEST_LAYER_ID 590 Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, Int * const returnArray); 591 Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, std::vector<Int> & returnVector); 592 Void cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString); 593 #endif 589 594 #else 590 595 Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
Note: See TracChangeset for help on using the changeset viewer.