Commit 4e796e63 authored by Jonatan Samuelsson's avatar Jonatan Samuelsson
Browse files

JVET-P0217 PTL syntax cleanup

parent 70a9f1fb
Pipeline #3408 passed with stage
in 7 minutes and 37 seconds
......@@ -88,6 +88,8 @@
#define JVET_P0526_PLT_ENCODER 1 // JVET-P0526: PLT encoder improvement
#define JVET_P0217_PTL_SYNTAX_CLEANUP 1 // JVET-P0217: On Profile, tier, and level syntax structure
#define JVET_P0641_REMOVE_2xN_CHROMA_INTRA 1 // JVET-P0641: removing 2xN chroma intra blocks
#define JVET_P0445_SUBBLOCK_MERGE_ENC_SPEEDUP 1 // JVET-P0445: encoder speed up for sub-block based merge candidate search
......
......@@ -3579,6 +3579,12 @@ void HLSyntaxReader::parseProfileTierLevel(ProfileTierLevel *ptl, int maxNumSubL
READ_CODE(7 , symbol, "general_profile_idc" ); ptl->setProfileIdc (Profile::Name(symbol));
READ_FLAG( symbol, "general_tier_flag" ); ptl->setTierFlag (symbol ? Level::HIGH : Level::MAIN);
#if JVET_P0217_PTL_SYNTAX_CLEANUP
parseConstraintInfo( ptl->getConstraintInfo() );
READ_CODE( 8, symbol, "general_level_idc" ); ptl->setLevelIdc( Level::Name( symbol ) );
#endif
READ_CODE(8, symbol, "num_sub_profiles");
uint8_t numSubProfiles = symbol;
ptl->setNumSubProfile( numSubProfiles );
......@@ -3587,9 +3593,11 @@ void HLSyntaxReader::parseProfileTierLevel(ProfileTierLevel *ptl, int maxNumSubL
READ_CODE(32, symbol, "general_sub_profile_idc[i]"); ptl->setSubProfileIdc(i, symbol);
}
#if !JVET_P0217_PTL_SYNTAX_CLEANUP
parseConstraintInfo( ptl->getConstraintInfo() );
READ_CODE(8 , symbol, "general_level_idc" ); ptl->setLevelIdc (Level::Name(symbol));
#endif
for (int i = 0; i < maxNumSubLayersMinus1; i++)
{
......@@ -3608,6 +3616,16 @@ void HLSyntaxReader::parseProfileTierLevel(ProfileTierLevel *ptl, int maxNumSubL
READ_CODE(8 , symbol, "sub_layer_level_idc" ); ptl->setSubLayerLevelIdc (i, Level::Name(symbol));
}
}
#if JVET_P0217_PTL_SYNTAX_CLEANUP
ptl->setSubLayerLevelIdc(maxNumSubLayersMinus1, ptl->getLevelIdc());
for( int i = maxNumSubLayersMinus1 - 1; i >= 0; i-- )
{
if( !ptl->getSubLayerLevelPresentFlag( i ) )
{
ptl->setSubLayerLevelIdc( i, ptl->getSubLayerLevelIdc( i + 1 ) );
}
}
#endif
}
......
......@@ -2347,15 +2347,23 @@ void HLSWriter::codeProfileTierLevel ( const ProfileTierLevel* ptl, int maxN
WRITE_CODE( int(ptl->getProfileIdc()), 7 , "general_profile_idc" );
WRITE_FLAG( ptl->getTierFlag()==Level::HIGH, "general_tier_flag" );
#if JVET_P0217_PTL_SYNTAX_CLEANUP
codeConstraintInfo( ptl->getConstraintInfo() );
WRITE_CODE( int( ptl->getLevelIdc() ), 8, "general_level_idc" );
#endif
WRITE_CODE(ptl->getNumSubProfile(), 8, "num_sub_profiles");
for (int i = 0; i < ptl->getNumSubProfile(); i++)
{
WRITE_CODE(ptl->getSubProfileIdc(i) , 32, "general_sub_profile_idc[i]");
}
#if !JVET_P0217_PTL_SYNTAX_CLEANUP
codeConstraintInfo(ptl->getConstraintInfo());
WRITE_CODE( int(ptl->getLevelIdc()), 8 , "general_level_idc" );
#endif
for (int i = 0; i < maxNumSubLayersMinus1; i++)
{
......
Supports Markdown
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