Ignore:
Timestamp:
6 Jan 2015, 03:12:18 (10 years ago)
Author:
seregin
Message:

update on PTL

File:
1 edited

Legend:

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

    r957 r959  
    6565  MAINREXT = 4,
    6666  HIGHTHROUGHPUTREXT = 5, // Placeholder profile for development
     67#if MULTIPLE_PTL_SUPPORT
     68  MULTIVIEWMAIN = 6,
     69  SCALABLEMAIN = 7,
     70  SCALABLEMAIN10 = 7,
     71#endif
    6772  // The following are RExt profiles, which would map to the MAINREXT profile idc.
    6873  // The enumeration indicates the bit-depth constraint in the bottom 2 digits
     
    338343  {"main-RExt",            Profile::MAINREXT           },
    339344  {"high-throughput-RExt", Profile::HIGHTHROUGHPUTREXT },
     345#if MULTIPLE_PTL_SUPPORT
     346  {"multiview-main",       Profile::MULTIVIEWMAIN      },       //This is not used in this software
     347  {"scalable-main",        Profile::SCALABLEMAIN       },
     348  {"scalable-main10",      Profile::SCALABLEMAIN10     },
     349#endif
    340350};
    341351
     
    372382    {"main_444_12_intra",  MAIN_444_12_INTRA},
    373383    {"main_444_16_intra",  MAIN_444_16_INTRA},
     384#if MULTIPLE_PTL_SUPPORT
     385    {"multiview-main",     MULTIVIEWMAIN    },
     386    {"scalable-main",      SCALABLEMAIN     },
     387    {"scalable-main10",    SCALABLEMAIN10   },
     388#endif
    374389};
    375390
     
    515530  return readStrToEnum(strToScalingListMode, sizeof(strToScalingListMode)/sizeof(*strToScalingListMode), in, mode);
    516531}
     532
     533#if MULTIPLE_PTL_SUPPORT
     534namespace Profile
     535{
     536  static inline istream& operator >> (istream &in, Name &profile)
     537  {
     538    return readStrToEnum(strToProfile, sizeof(strToProfile)/sizeof(*strToProfile), in, profile);
     539  }
     540}
     541#endif
    517542
    518543template <class T>
     
    10141039  string inputColourSpaceConvert;
    10151040#if MULTIPLE_PTL_SUPPORT
    1016   ExtendedProfileName extendedProfile[NUM_POSSIBLE_LEVEL];
     1041  ExtendedProfileName extendedProfile[MAX_NUM_LAYER_IDS + 1];
    10171042#else
    10181043  ExtendedProfileName extendedProfile;
     
    12661291  // Profile and level
    12671292#if MULTIPLE_PTL_SUPPORT
    1268   ("NumProfileTierLevel",                             m_numPTLInfo,                                         2, "Number of Profile, Tier and Level information")
    1269   ("Profile%d",                                       extendedProfile,               NONE, NUM_POSSIBLE_LEVEL,  "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
    1270   ("Level%d",                                         m_levelList,            Level::NONE, NUM_POSSIBLE_LEVEL, "Level limit to be used, eg 5.1, or none")
    1271   ("Tier%d",                                          m_levelTierList,        Level::MAIN, NUM_POSSIBLE_LEVEL, "Tier to use for interpretation of --Level (main or high only)")
     1293  ("NumProfileTierLevel",                             m_numPTLInfo,                                         1, "Number of Profile, Tier and Level information")
     1294  ("Profile%d",                                       extendedProfile,          NONE, (MAX_NUM_LAYER_IDS + 1),  "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
     1295  ("Level%d",                                         m_levelList,       Level::NONE, (MAX_NUM_LAYER_IDS + 1), "Level limit to be used, eg 5.1, or none")
     1296  ("Tier%d",                                          m_levelTierList,   Level::MAIN, (MAX_NUM_LAYER_IDS + 1), "Tier to use for interpretation of --Level (main or high only)")
    12721297  ("MaxBitDepthConstraint",                           tmpBitDepthConstraint,                               0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters")
    12731298  ("MaxChromaFormatConstraint",                       tmpConstraintChromaFormat,                            0, "Chroma-format to use for the profile-constraint for RExt profiles. 0=automatically choose based upon other parameters")
    12741299  ("IntraConstraintFlag",                             tmpIntraConstraintFlag,                           false, "Value of general_intra_constraint_flag to use for RExt profiles (not used if an explicit RExt sub-profile is specified)")
    12751300  ("LowerBitRateConstraintFlag",                      tmpLowerBitRateConstraintFlag,                     true, "Value of general_lower_bit_rate_constraint_flag to use for RExt profiles")
    1276  
    1277   ("ProgressiveSource%d",                             m_progressiveSourceFlagList,   false, NUM_POSSIBLE_LEVEL, "Indicate that source is progressive")
    1278   ("InterlacedSource%d",                              m_interlacedSourceFlagList,    false, NUM_POSSIBLE_LEVEL, "Indicate that source is interlaced")
    1279   ("NonPackedSource%d",                               m_nonPackedConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that source does not contain frame packing")
    1280   ("FrameOnly%d",                                     m_frameOnlyConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that the bitstream contains only frames")
     1301
     1302  ("ProfileCompatibility%d",                          m_profileCompatibility, Profile::NONE, (MAX_NUM_LAYER_IDS + 1), "Compatible profile to be used when encoding")
     1303  ("ProgressiveSource%d",                             m_progressiveSourceFlagList,   false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source is progressive")
     1304  ("InterlacedSource%d",                              m_interlacedSourceFlagList,    false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source is interlaced")
     1305  ("NonPackedSource%d",                               m_nonPackedConstraintFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source does not contain frame packing")
     1306  ("FrameOnly%d",                                     m_frameOnlyConstraintFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that the bitstream contains only frames")
    12811307 
    12821308  ("LayerPTLIndex%d",                                 cfg_layerPTLIdx,               0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer")
    1283   ("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")
     1309  ("ListOfProfileTierLevelOls%d",                     cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_OUTPUT_LAYER_SETS_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")
    12841310#else
    12851311  ("Profile",                                         extendedProfile,                                   NONE, "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none")
     
    26222648    }
    26232649#if MULTIPLE_PTL_SUPPORT
    2624     if( olsCtr > startOlsCtr ) // Non-default OLS
    2625     {
    2626       scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[m_outputLayerSetIdx[olsCtr - startOlsCtr - 1]], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] );
    2627     }
    2628     else
    2629     {
    2630       scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsCtr], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] );
    2631     }
     2650    Int olsToLsIndex = (olsCtr > startOlsCtr) ? m_outputLayerSetIdx[olsCtr - m_numLayerSets] : olsCtr;
     2651    scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] );
     2652    //For conformance checking
     2653    //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:
     2654    //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
     2655    //Conformance of a layer in an output operation point associated with an OLS in a bitstream to the Scalable Main 10 profile is indicated as follows:
     2656    //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
     2657    //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
     2658    for ( Int ii = 1; ii < m_numLayerInIdList[olsToLsIndex]; ii++)
     2659    {
     2660      if (m_layerSetLayerIdList[olsToLsIndex][ii - 1] != 0 && m_layerSetLayerIdList[olsToLsIndex][ii] != 0)  //Profile / profile compatibility of enhancement layers must indicate the same profile.
     2661      {
     2662        assert( (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||
     2663                (m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ||   
     2664                (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) );
     2665      }
     2666    }   
    26322667#endif
    26332668  }
Note: See TracChangeset for help on using the changeset viewer.