Ignore:
Timestamp:
30 Dec 2014, 18:47:09 (10 years ago)
Author:
seregin
Message:

support profile, tier and level for each layer, patch was provided by Hendry <fhendry@…>

File:
1 edited

Legend:

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

    r925 r941  
    608608  string* cfg_outputLayerSetIdx      = new string;
    609609#endif
     610#if MULTIPLE_PTL_SUPPORT
     611  string* cfg_listOfLayerPTLOfOlss   = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1];
     612#endif
    610613#if AVC_BASE
    611614  string  cfg_BLInputFile;
     
    837840 
    838841  // Profile and level
     842#if !MULTIPLE_PTL_SUPPORT
    839843  ("Profile", m_profile,   Profile::NONE, "Profile to be used when encoding (Incomplete)")
    840844  ("Level",   m_level,     Level::NONE,   "Level limit to be used, eg 5.1 (Incomplete)")
     
    845849  ("NonPackedSource",   m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing")
    846850  ("FrameOnly",         m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames")
     851#else
     852  ("NumProfileTierLevel", m_numPTLInfo, 2, "Number of Profile, Tier and Level information")
     853  ("Profile%d", m_profileList,   Profile::NONE, NUM_POSSIBLE_LEVEL, "Profile to be used when encoding (Incomplete)")
     854  ("Level%d",   m_levelList,     Level::NONE, NUM_POSSIBLE_LEVEL, "Level limit to be used, eg 5.1 (Incomplete)")
     855  ("Tier%d",    m_levelTierList, Level::MAIN, NUM_POSSIBLE_LEVEL, "Tier to use for interpretation of --Level")
     856
     857  ("ProgressiveSource%d", m_progressiveSourceFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source is progressive")
     858  ("InterlacedSource%d",  m_interlacedSourceFlagList,  false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source is interlaced")
     859  ("NonPackedSource%d",   m_nonPackedConstraintFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source does not contain frame packing")
     860  ("FrameOnly%d",         m_frameOnlyConstraintFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that the bitstream contains only frames")
     861   
     862  ("LayerPTLIndex%d", m_layerPTLIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer")
     863  ("ListOfProfileTierLevelOls%d", cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_LAYER_ID_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1")
     864#endif
    847865
    848866#if LAYER_CTB
     
    19221940  // Layers in the output layer set
    19231941  m_listOfOutputLayers.resize(m_numOutputLayerSets);
     1942
     1943#if MULTIPLE_PTL_SUPPORT
     1944  m_listOfLayerPTLofOlss.resize(m_numOutputLayerSets);
     1945#endif
     1946
    19241947  Int startOlsCtr = 1;
    19251948  if( m_defaultTargetOutputLayerIdc == 0 || m_defaultTargetOutputLayerIdc == 1 )
     
    19411964      assert( scanStringToArray( cfg_listOfOutputLayers[olsCtr], m_numLayersInOutputLayerSet[olsCtr], "ListOfOutputLayers", m_listOfOutputLayers[olsCtr] ) );
    19421965    }
    1943   }
     1966#if MULTIPLE_PTL_SUPPORT
     1967    if (olsCtr > m_numLayerSets)
     1968    {
     1969      scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[m_outputLayerSetIdx[olsCtr - m_numLayerSets]], "ListOfOutputLayers", m_listOfLayerPTLofOlss[olsCtr] );
     1970    }
     1971    else
     1972    {
     1973      scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsCtr], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] );
     1974    }
     1975#endif
     1976  }
     1977#if MULTIPLE_PTL_SUPPORT
     1978  m_listOfLayerPTLofOlss[0].push_back(m_layerPTLIdx[0]);
     1979  delete [] cfg_listOfLayerPTLOfOlss;
     1980#endif
    19441981  delete cfg_numLayersInOutputLayerSet;
    19451982  delete [] cfg_listOfOutputLayers;
     
    25032540    fprintf(stderr, "******************************************************************\n");
    25042541  }
     2542 
     2543#if !MULTIPLE_PTL_SUPPORT
    25052544  if( m_profile==Profile::NONE )
    25062545  {
     
    25152554    fprintf(stderr, "***************************************************************************\n");
    25162555  }
     2556#else
     2557  int ii = 0;
     2558  while ( ii < m_numPTLInfo )
     2559  {
     2560    if( m_profileList[ii] == Profile::NONE )
     2561    {
     2562      fprintf(stderr, "***************************************************************************\n");
     2563      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n");
     2564      fprintf(stderr, "***************************************************************************\n");
     2565    }
     2566    if( m_levelList[ii] == Level::NONE )
     2567    {
     2568      fprintf(stderr, "***************************************************************************\n");
     2569      fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set!   **\n");
     2570      fprintf(stderr, "***************************************************************************\n");
     2571    }
     2572    ii++;
     2573  }
     2574#endif
    25172575
    25182576  Bool check_failed = false; /* abort if there is a fatal configuration problem */
Note: See TracChangeset for help on using the changeset viewer.