Commit 2edb292b authored by Xiang Li's avatar Xiang Li

Merge branch 'fix_profiles' into 'master'

Fix profile handling

See merge request !1836
parents d72e9c24 416020d4
Pipeline #5574 failed with stage
in 11 minutes and 2 seconds
......@@ -2575,7 +2575,14 @@ int EncAppCfg::xAutoDetermineProfile()
case ChromaFormat::CHROMA_420:
if (maxBitDepth <= 10)
{
m_profile = m_maxLayers > 1 ? Profile::MULTILAYER_MAIN_10 : Profile::MAIN_10;
if (m_level == Level::LEVEL15_5 && m_framesToBeEncoded == 1)
{
m_profile = m_maxLayers > 1 ? Profile::MULTILAYER_MAIN_10_STILL_PICTURE : Profile::MAIN_10_STILL_PICTURE;
}
else
{
m_profile = m_maxLayers > 1 ? Profile::MULTILAYER_MAIN_10 : Profile::MAIN_10;
}
}
break;
......@@ -2583,7 +2590,15 @@ int EncAppCfg::xAutoDetermineProfile()
case ChromaFormat::CHROMA_444:
if (maxBitDepth <= 10)
{
m_profile = m_maxLayers > 1 ? Profile::MULTILAYER_MAIN_10_444 : Profile::MAIN_10_444;
if (m_level == Level::LEVEL15_5 && m_framesToBeEncoded == 1)
{
m_profile =
m_maxLayers > 1 ? Profile::MULTILAYER_MAIN_10_444_STILL_PICTURE : Profile::MAIN_10_444_STILL_PICTURE;
}
else
{
m_profile = m_maxLayers > 1 ? Profile::MULTILAYER_MAIN_10_444 : Profile::MAIN_10_444;
}
}
break;
......
......@@ -145,10 +145,16 @@ ProfileLevelTierFeatures::extractPTLInformation(const SPS &sps)
m_tier = spsPtl.getTierFlag();
// Identify the profile from the profile Idc, and possibly other constraints.
#if !JVET_S_PROFILES
bool onePictureOnlyConstraintFlag=spsPtl.getConstraintInfo()->getOnePictureOnlyConstraintFlag();
#endif
for(int32_t i=0; validProfiles[i].profile != Profile::NONE; i++)
{
#if JVET_S_PROFILES
if (spsPtl.getProfileIdc() == validProfiles[i].profile)
#else
if (spsPtl.getProfileIdc() == validProfiles[i].profile && !(validProfiles[i].onePictureOnlyFlagMustBe1 && !onePictureOnlyConstraintFlag))
#endif
{
m_pProfile = &(validProfiles[i]);
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment