Commit 560381ab authored by Karl Sharman's avatar Karl Sharman
Browse files

Added main10 still picture profile support

parent 8c78610e
......@@ -62,6 +62,7 @@ enum ExtendedProfileName // this is used for determining profile strings, where
NONE = 0,
MAIN = 1,
MAIN10 = 2,
MAIN10_STILL_PICTURE=10002,
MAINSTILLPICTURE = 3,
MAINREXT = 4,
HIGHTHROUGHPUTREXT = 5, // Placeholder profile for development
......@@ -209,6 +210,7 @@ strToProfile[] =
{"main", Profile::MAIN },
{"main10", Profile::MAIN10 },
{"main-still-picture", Profile::MAINSTILLPICTURE },
{"main10-still-picture", Profile::MAIN10 },
{"main-RExt", Profile::MAINREXT },
{"high-throughput-RExt", Profile::HIGHTHROUGHPUTREXT }
};
......@@ -223,6 +225,8 @@ strToExtendedProfile[] =
{"none", NONE },
{"main", MAIN },
{"main10", MAIN10 },
{"main10_still_picture", MAIN10_STILL_PICTURE },
{"main10-still-picture", MAIN10_STILL_PICTURE },
{"main_still_picture", MAINSTILLPICTURE },
{"main-still-picture", MAINSTILLPICTURE },
{"main_RExt", MAINREXT },
......@@ -1252,7 +1256,12 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
}
m_motionEstimationSearchMethod=MESearchMethod(tmpMotionEstimationSearchMethod);
if (extendedProfile >= 1000 && extendedProfile <= 12316)
if (extendedProfile == MAIN10_STILL_PICTURE)
{
m_profile = Profile::MAIN10;
m_onePictureOnlyConstraintFlag = true;
}
else if (extendedProfile >= 1000 && extendedProfile <= 12316)
{
m_profile = Profile::MAINREXT;
if (m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0)
......@@ -1274,6 +1283,7 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
else
{
m_profile = Profile::Name(extendedProfile);
m_onePictureOnlyConstraintFlag = false;
}
if (m_profile == Profile::HIGHTHROUGHPUTREXT )
......
......@@ -1631,9 +1631,20 @@ Void TDecCavlc::parseProfileTier(ProfileTierLevel *ptl, const Bool /*bIsSubLayer
ptl->setChromaFormatConstraint(CHROMA_420);
ptl->setIntraConstraintFlag(false);
ptl->setLowerBitRateConstraintFlag(true);
READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[0..15]" ));
READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[16..31]" ));
READ_CODE(11, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[32..42]" ));
if (ptl->getProfileIdc() == Profile::MAIN10 || ptl->getProfileCompatibilityFlag(Profile::MAIN10))
{
READ_CODE(7, uiCode, PTL_TRACE_TEXT("reserved_zero_7bits" ));
READ_FLAG( uiCode, PTL_TRACE_TEXT("one_picture_only_constraint_flag")); ptl->setOnePictureOnlyConstraintFlag(uiCode != 0);
READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_35bits[0..15]" ));
READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_35bits[16..31]" ));
READ_CODE(3, uiCode, PTL_TRACE_TEXT("reserved_zero_35bits[32..34]" ));
}
else
{
READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[0..15]" ));
READ_CODE(16, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[16..31]" ));
READ_CODE(11, uiCode, PTL_TRACE_TEXT("reserved_zero_43bits[32..42]" ));
}
}
if ((ptl->getProfileIdc() >= Profile::MAIN && ptl->getProfileIdc() <= Profile::HIGHTHROUGHPUTREXT) ||
......
......@@ -106,6 +106,7 @@ static const ProfileFeatures validProfiles[] =
{ // profile, pNameString, maxBitDepth, maxChrFmt, intra, 1pic, lowerBR, RExtTools, ExtPrec , ChrmQPOf, align, HBRFactor, , wve+t, tiles,, lvl8.5, cpbvcl, cpbnal, fcf*1000, mincr*10
{ Profile::MAIN, "Main", 8, CHROMA_420, false, false, ENABLED , DISABLED, DISABLED, DISABLED, DISABLED, HBR_1 , false, 256, 64, false, 1000, 1100, 1500, 10 , mainLevelTierInfo },
{ Profile::MAIN10, "Main10", 10, CHROMA_420, false, false, ENABLED , DISABLED, DISABLED, DISABLED, DISABLED, HBR_1 , false, 256, 64, false, 1000, 1100, 1875, 10 , mainLevelTierInfo },
{ Profile::MAIN10, "Main10 Still Picture", 10, CHROMA_420, false, true, ENABLED , DISABLED, DISABLED, DISABLED, DISABLED, HBR_1 , false, 256, 64, true , 1000, 1100, 1875, 10 , mainLevelTierInfo },
{ Profile::MAINSTILLPICTURE, "Main Still Picture", 8, CHROMA_420, false, false, ENABLED , DISABLED, DISABLED, DISABLED, DISABLED, HBR_1 , false, 256, 64, true , 1000, 1100, 1500, 10 , mainLevelTierInfo },
{ Profile::MAINREXT, "Monochrome", 8, CHROMA_400, false, false, ENABLED , DISABLED, DISABLED, DISABLED, DISABLED, HBR_1_OR_2 , false, 256, 64, false, 667, 733, 1000, 10 , mainLevelTierInfo },
{ Profile::MAINREXT, "Monochrome 12", 12, CHROMA_400, false, false, ENABLED , DISABLED, DISABLED, DISABLED, DISABLED, HBR_1_OR_2 , false, 256, 64, false, 1000, 1100, 1500, 10 , mainLevelTierInfo },
......
......@@ -1137,6 +1137,14 @@ Void TEncCavlc::codeProfileTier( const ProfileTierLevel* ptl, const Bool /*bIsSu
WRITE_CODE(0 , 16, PTL_TRACE_TEXT("reserved_zero_34bits[16..31]" ));
WRITE_CODE(0 , 2, PTL_TRACE_TEXT("reserved_zero_34bits[32..33]" ));
}
else if (ptl->getProfileIdc() == Profile::MAIN10)
{
WRITE_CODE(0x00 , 7, PTL_TRACE_TEXT("reserved_zero_7bits" ));
WRITE_FLAG(ptl->getOnePictureOnlyConstraintFlag(), PTL_TRACE_TEXT("one_picture_only_constraint_flag"));
WRITE_CODE(0x0000 , 16, PTL_TRACE_TEXT("reserved_zero_35bits[0..15]" ));
WRITE_CODE(0x0000 , 16, PTL_TRACE_TEXT("reserved_zero_35bits[16..31]" ));
WRITE_CODE(0x0 , 3, PTL_TRACE_TEXT("reserved_zero_35bits[32..34]" ));
}
else
{
WRITE_CODE(0x0000 , 16, PTL_TRACE_TEXT("reserved_zero_43bits[0..15]" ));
......
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