Changeset 1006 in SHVCSoftware for branches/SHM-upgrade/source/App


Ignore:
Timestamp:
27 Jan 2015, 19:44:15 (10 years ago)
Author:
seregin
Message:

port implementation of JCTVC-R0235 - Processing of bitstreams without an available base layer (rev 1005)

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  
    265265      }
    266266      fclose (targetDecLayerIdSetFile);
     267#if !R0235_SMALLEST_LAYER_ID  // LayerId=0 is not required anymore in some cases
    267268      if ( m_targetDecLayerIdSet.size() > 0 && !isLayerIdZeroIncluded )
    268269      {
     
    270271        return false;
    271272      }
     273#endif
    272274    }
    273275    else
  • branches/SHM-upgrade/source/App/TAppDecoder/TAppDecTop.cpp

    r962 r1006  
    12121212    return true;
    12131213  }
     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
    12141220  for (std::vector<Int>::iterator it = m_targetDecLayerIdSet.begin(); it != m_targetDecLayerIdSet.end(); it++)
    12151221  {
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.cpp

    r998 r1006  
    26812681#if MULTIPLE_PTL_SUPPORT
    26822682    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
    26832694    scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] );
     2695#endif
    26842696    //For conformance checking
    26852697    //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:
     
    26882700    //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
    26892701    //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
    26902706    for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
    26912707    {
     
    26962712                (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) );
    26972713      }
    2698     }   
     2714    }
     2715#if R0235_SMALLEST_LAYER_ID
     2716    }
     2717#endif
    26992718#endif
    27002719  }
     
    50845103}
    50855104#endif
     5105
     5106#if R0235_SMALLEST_LAYER_ID
     5107#if OUTPUT_LAYER_SETS_CONFIG
     5108Void 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
     5157Bool 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
    50865177#endif //SVC_EXTENSION
    50875178//! \}
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.h

    r959 r1006  
    587587  Bool scanStringToArray(string const cfgString, Int const numEntries, const char* logString, std::vector<Int> &  returnVector);
    588588  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
    589594#else
    590595  Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString);
Note: See TracChangeset for help on using the changeset viewer.