Changeset 1005 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder


Ignore:
Timestamp:
26 Jan 2015, 17:11:15 (10 years ago)
Author:
nokia
Message:

Implementation of JCTVC-R0235 - Processing of bitstreams without an available base layer

Location:
branches/SHM-dev/source/App/TAppEncoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r997 r1005  
    19851985#if MULTIPLE_PTL_SUPPORT
    19861986    Int olsToLsIndex = (olsCtr >= (m_numLayerSets + m_numAddLayerSets)) ? m_outputLayerSetIdx[olsCtr - (m_numLayerSets + m_numAddLayerSets)] : olsCtr;
     1987#if R0235_SMALLEST_LAYER_ID
     1988    // This is a fix to allow setting of PTL for additional layer sets
     1989    if (olsCtr >= m_numLayerSets && olsCtr < (m_numLayerSets + m_numAddLayerSets))
     1990    {
     1991      scanStringToArrayNumEntries(cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr]);
     1992    }
     1993    else
     1994    {
     1995      scanStringToArray(cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr]);
     1996    }
     1997#else
     1998    Int olsToLsIndex = (olsCtr >= (m_numLayerSets + m_numAddLayerSets)) ? m_outputLayerSetIdx[olsCtr - (m_numLayerSets + m_numAddLayerSets)] : olsCtr;
    19871999    scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] );
     2000#endif
    19882001    //For conformance checking
    19892002    //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:
     
    19922005    //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
    19932006    //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
     2007#if R0235_SMALLEST_LAYER_ID
     2008    if (m_numAddLayerSets == 0)
     2009    {
     2010#endif
    19942011    for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
    19952012    {
     
    20012018      }
    20022019    }   
     2020#if R0235_SMALLEST_LAYER_ID
     2021    }
     2022#endif
    20032023#endif
    20042024  }
     
    41754195#endif
    41764196#endif //SVC_EXTENSION
     4197
     4198#if SVC_EXTENSION
     4199#if R0235_SMALLEST_LAYER_ID
     4200#if OUTPUT_LAYER_SETS_CONFIG
     4201Void TAppEncCfg::cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString)
     4202{
     4203  Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str());
     4204  if (numEntries > 0)
     4205  {
     4206    Char *arrayEntry;
     4207    Int i = 0;
     4208    *arr = new Int[numEntries];
     4209
     4210    if (tempChar == NULL)
     4211    {
     4212      arrayEntry = NULL;
     4213    }
     4214    else
     4215    {
     4216      arrayEntry = strtok(tempChar, " ,");
     4217    }
     4218    while (arrayEntry != NULL)
     4219    {
     4220      if (i >= numEntries)
     4221      {
     4222        printf("%s: The number of entries specified is larger than the allowed number.\n", logString);
     4223        exit(EXIT_FAILURE);
     4224      }
     4225      *(*arr + i) = atoi(arrayEntry);
     4226      arrayEntry = strtok(NULL, " ,");
     4227      i++;
     4228    }
     4229    numEntries = i;
     4230    /*
     4231    if (i < numEntries)
     4232    {
     4233      printf("%s: Some entries are not specified.\n", logString);
     4234      exit(EXIT_FAILURE);
     4235    }
     4236    */
     4237  }
     4238  else
     4239  {
     4240    *arr = NULL;
     4241  }
     4242
     4243  if (tempChar)
     4244  {
     4245    free(tempChar);
     4246    tempChar = NULL;
     4247  }
     4248}
     4249
     4250Bool TAppEncCfg::scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, std::vector<Int> & returnVector)
     4251{
     4252  Int *tempArray = NULL;
     4253  numEntries = MAX_LAYERS;
     4254  // For all layer sets
     4255  cfgStringToArrayNumEntries(&tempArray, cfgString, numEntries, logString);
     4256  if (tempArray)
     4257  {
     4258    returnVector.empty();
     4259    for (Int i = 0; i < numEntries; i++)
     4260    {
     4261      returnVector.push_back(tempArray[i]);
     4262    }
     4263    delete[] tempArray; tempArray = NULL;
     4264    return true;
     4265  }
     4266  return false;
     4267}
     4268#endif
     4269#endif // R0235
     4270#endif //SVC_EXTENSION
     4271
     4272
    41774273//! \}
  • TabularUnified branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r951 r1005  
    544544  Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> &  returnVector);
    545545  Void cfgStringToArray(Int **arr, string const cfgString, Int const numEntries, const char* logString);
     546#if R0235_SMALLEST_LAYER_ID
     547  Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, Int * const returnArray);
     548  Bool scanStringToArrayNumEntries(string const cfgString, Int &numEntries, const char* logString, std::vector<Int> &  returnVector);
     549  Void cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString);
     550#endif
    546551#else
    547552  Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
Note: See TracChangeset for help on using the changeset viewer.