diff --git a/source/Lib/CommonLib/ProfileLevelTier.cpp b/source/Lib/CommonLib/ProfileLevelTier.cpp index 2989180b5aa70171b79e86e99c98612ef5ac7185..d482eb656a27baa69d1eb57cd6ae61e7c3bacf86 100644 --- a/source/Lib/CommonLib/ProfileLevelTier.cpp +++ b/source/Lib/CommonLib/ProfileLevelTier.cpp @@ -67,9 +67,15 @@ static const LevelTierFeatures mainLevelTierInfo[] = { Level::LEVEL5 , 8912896, { 25000, 100000 }, 200, 11, 10, 267386880ULL, { 25000, 100000 }, { 6, 4} }, { Level::LEVEL5_1, 8912896, { 40000, 160000 }, 200, 11, 10, 534773760ULL, { 40000, 160000 }, { 8, 4} }, { Level::LEVEL5_2, 8912896, { 60000, 240000 }, 200, 11, 10, 1069547520ULL, { 60000, 240000 }, { 8, 4} }, +#if JVET_R0244_CPB_AND_MINCR + { Level::LEVEL6 , 35651584, { 80000, 240000 }, 600, 22, 20, 1069547520ULL, { 60000, 240000 }, { 8, 4} }, + { Level::LEVEL6_1, 35651584, { 120000, 480000 }, 600, 22, 20, 2139095040ULL, { 120000, 480000 }, { 8, 4} }, + { Level::LEVEL6_2, 35651584, { 180000, 800000 }, 600, 22, 20, 4278190080ULL, { 240000, 800000 }, { 8, 4} }, +#else { Level::LEVEL6 , 35651584, { 60000, 240000 }, 600, 22, 20, 1069547520ULL, { 60000, 240000 }, { 8, 4} }, { Level::LEVEL6_1, 35651584, { 120000, 480000 }, 600, 22, 20, 2139095040ULL, { 120000, 480000 }, { 8, 4} }, { Level::LEVEL6_2, 35651584, { 240000, 800000 }, 600, 22, 20, 4278190080ULL, { 240000, 800000 }, { 6, 4} }, +#endif #if JVET_R0245_LEVEL_CODING { Level::LEVEL15_5, MAX_UINT, { MAX_UINT, MAX_UINT }, MAX_UINT, MAX_UINT, MAX_UINT, MAX_CNFUINT64, {MAX_UINT, MAX_UINT }, { 0, 0} }, #else @@ -79,9 +85,15 @@ static const LevelTierFeatures mainLevelTierInfo[] = }; static const ProfileFeatures validProfiles[] = +#if JVET_R0244_CPB_AND_MINCR +{ // profile, pNameString, maxBitDepth, maxChrFmt, lvl15.5, cpbvcl, cpbnal, fcf*1000, mincr*100, levelInfo + { Profile::MAIN_10, "Main_10", 10, CHROMA_420, false, 1000, 1100, 1875, 100 , mainLevelTierInfo }, + { Profile::MAIN_444_10, "Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 75 , mainLevelTierInfo }, +#else { // profile, pNameString, maxBitDepth, maxChrFmt, lvl8.5, cpbvcl, cpbnal, fcf*1000, mincr*10, levelInfo { Profile::MAIN_10, "Main_10", 10, CHROMA_420, false, 1000, 1100, 1875, 10 , mainLevelTierInfo }, { Profile::MAIN_444_10, "Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 5 , mainLevelTierInfo }, +#endif { Profile::NONE, 0 } }; @@ -126,7 +138,11 @@ ProfileLevelTierFeatures::extractPTLInformation(const SPS &sps) double ProfileLevelTierFeatures::getMinCr() const { +#if JVET_R0244_CPB_AND_MINCR + return (m_pLevelTier!=0 && m_pProfile!=0) ? (m_pProfile->minCrScaleFactorx100 * m_pLevelTier->minCrBase[m_tier?1:0])/100.0 : 0.0 ; +#else return (m_pLevelTier!=0 && m_pProfile!=0) ? (m_pProfile->minCrScaleFactorx10 * m_pLevelTier->minCrBase[m_tier?1:0])/10.0 : 0.0 ; +#endif } uint64_t ProfileLevelTierFeatures::getCpbSizeInBits() const diff --git a/source/Lib/CommonLib/ProfileLevelTier.h b/source/Lib/CommonLib/ProfileLevelTier.h index df8215d0b796497d013437abcec69dfef200172c..68149beb4fe6be49b834a6d41b82713c1725b2fa 100644 --- a/source/Lib/CommonLib/ProfileLevelTier.h +++ b/source/Lib/CommonLib/ProfileLevelTier.h @@ -78,7 +78,11 @@ struct ProfileFeatures uint32_t cpbVclFactor; uint32_t cpbNalFactor; uint32_t formatCapabilityFactorx1000; +#if JVET_R0244_CPB_AND_MINCR + uint32_t minCrScaleFactorx100; +#else uint32_t minCrScaleFactorx10; +#endif const LevelTierFeatures *pLevelTiersListInfo; }; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 6c8354baa11686e925e687cb7063a5e71ac92213..fda66191973cce660b3a6b2c2a499598c336c300 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -241,6 +241,8 @@ #define JVET_R0101_PROPOSAL2 1 // JVET-R0101 Proposal 2: Bug fix for signalling some syntax elements length +#define JVET_R0244_CPB_AND_MINCR 1 // JVET-R0244: Changes to CPB sizes for MaxCPB = 80k for level 6, 120k for level 6.1, 180k for level 6.2; MinCrScaleFactor for the 4:4:4 profile changed to 0.75, and change MinCrBase to 8 for level 6.2. + #define JVET_R0245_LEVEL_CODING 1 // JVET-R0245: level coding numbering scheme //########### place macros to be be kept below this line ###############