...
 
Commits (36)
......@@ -4,6 +4,7 @@ SEISubpicLevelInfoNumSubpics: 2 # number of subpictur
SEISubpicLevelInfoMaxSublayers: 7 # number of sublayers - has to be equal to vps_max_sublayers_minus1 + 1
SEISubpicLevelInfoSublayerInfoPresentFlag: 0 # 0: all sublayers use the same level information, 1: each sublayer shall specify its own level information
SEISubpicLevelInfoNonSubpicLayersFractions: 100 # see software manual for list format
SEISubpicLevelInfoRefLevels: 4.1 # see software manual for list format
SEISubpicLevelInfoRefLevelFractions: 40 30 # see software manual for list format
......
......@@ -954,7 +954,8 @@ multiple matches.
\Default{none} &
Specifies the profile to which the encoded bitstream complies.
Valid VVC Ver. 1 values are: none, main_10, main_10_still_picture, main_444_10, main_444_10_still_picture.
Valid VVC Ver. 1 values are: none, main_10, main_10_still_picture, main_10_444, main_10_444_still_picture,
multilayer_main_10, multilayer_main_10_still_picture, multilayer_main_10_444, multilayer_main_10_444_still_picture.
When one of the still picture profiles are selected, the OnePictureOnlyConstraintFlag setting will be forced to 1.
\\
......@@ -1108,6 +1109,12 @@ Specifies the value of one_slice_per_pic_constraint_flag
Specifies the value of one_subpic_per_pic_constraint_flag
\\
\Option{MaxLog2CtuSizeConstraintIdc} &
%\ShortOption{\None} &
\Default{8} &
Specifies the value of gci_three_minus_max_log2_ctu_size_constraint_idc
\\
\Option{PartitionConstraintsOverrideConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
......@@ -1246,6 +1253,12 @@ Specifies the value of gci_no_gpm_constraint_flag
Specifies the value of gci_no_transform_skip_constraint_flag
\\
\Option{LumaTransformSize64ConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of gci_no_luma_transform_size_64_constraint_flag
\\
\Option{BDPCMConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
......@@ -3267,16 +3280,6 @@ Specifies the maximum TU size for which transform-skip can be used; the minimum
\\
\Option{ImplicitResidualDPCM} &
\Default{false} &
When true, specifies the use of the implicitly signalled residual RDPCM tool (for intra). Version 1 and some Version 2 (RExt) profiles require this to be false.
\\
\Option{ExplicitResidualDPCM} &
\Default{false} &
When true, specifies the use of the explicitly signalled residual RDPCM tool (for intra-block-copy and inter). Version 1 and some Version 2 (RExt) profiles require this to be false.
\\
\Option{ResidualRotation} &
\Default{false} &
When true, specifies the use of the residual rotation tool. Version 1 and some Version 2 (RExt) profiles require this to be false.
......@@ -4396,6 +4399,15 @@ Enable signalling of level information for each sublayer
0 & All sublayers use the same level information \\
\end{tabular}
\\
\Option{SEISubpicLevelInfoNonSubpicLayersFractions} &
\Default{""} &
List of fraction of levels to be signalled for non-subpicture layers.
\par
\begin{tabular}{p{0.49\columnwidth}}
When sli_sublayer_info_present_flag = 0, the number of input elements shall be equal to numReflevels. List is ordered by level.\\
When sli_sublayer_info_present_flag = 1, the number of input elements shall be equal to numReflevels * maxSublayers. List is ordered by level then sublayer. For example, let Amn denotes the reference level indices for the m-th sublayer and and n-th reference level, the first N elements (A00...A0n-1) denotes the RefLevelFractions for N levels in the 0-th sublayer, and the following N elements (A10...A1n-1) denotes the RefLevelFractions for N levels in the 1st sublayer, and so on, untill all MxN elements specified.\\
\end{tabular}
\\
\Option{SEISubpicLevelInfoRefLevels} &
\Default{""} &
List of reference levels to be signalled.
......
......@@ -201,6 +201,19 @@ void EncApp::xInitLibCfg()
ptls[0].setLevelIdc ( m_level );
ptls[0].setProfileIdc ( m_profile);
ptls[0].setTierFlag ( m_levelTier );
#if JVET_S0138_GCI_PTL
ptls[0].setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlag);
ptls[0].setMultiLayerEnabledFlag ( m_multiLayerEnabledFlag);
#if JVET_S_PROFILES
CHECK((m_profile == Profile::MAIN_10 || m_profile == Profile::MAIN_10_444
|| m_profile == Profile::MAIN_10_STILL_PICTURE || m_profile == Profile::MAIN_10_444_STILL_PICTURE)
&& m_multiLayerEnabledFlag,
"ptl_multilayer_enabled_flag shall be equal to 0 for non-multilayer profiles");
#else
CHECK( (m_profile == Profile::MAIN_10 || m_profile == Profile::MAIN_444_10) && m_multiLayerEnabledFlag, "ptl_multilayer_enabled_flag shall be equal to 0 for Main 10 and Main 10 4:4:4 profiles");
#endif
CHECK( !m_multiLayerEnabledFlag && m_maxLayers > 1, "There is only one layer in the CVS when ptl_multilayer_enabled_flag equal to 0");
#endif
ptls[0].setNumSubProfile ( m_numSubProfile );
for (int i = 0; i < m_numSubProfile; i++)
{
......@@ -214,6 +227,10 @@ void EncApp::xInitLibCfg()
vps.setVPSExtensionFlag ( false );
m_cEncLib.setProfile ( m_profile);
m_cEncLib.setLevel ( m_levelTier, m_level);
#if JVET_S0138_GCI_PTL
m_cEncLib.setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlag);
m_cEncLib.setMultiLayerEnabledFlag ( m_multiLayerEnabledFlag);
#endif
m_cEncLib.setNumSubProfile ( m_numSubProfile );
for (int i = 0; i < m_numSubProfile; i++)
{
......@@ -252,12 +269,16 @@ void EncApp::xInitLibCfg()
m_cEncLib.setPicHeaderInSliceHeaderConstraintFlag(m_picHeaderInSliceHeaderConstraintFlag);
m_cEncLib.setOneSlicePerPicConstraintFlag(m_oneSlicePerPicConstraintFlag);
m_cEncLib.setOneSubpicPerPicConstraintFlag(m_oneSubpicPerPicConstraintFlag);
#if !JVET_S0138_GCI_PTL
m_cEncLib.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag);
#endif
m_cEncLib.setOnePictureOnlyConstraintFlag(m_onePictureOnlyConstraintFlag);
m_cEncLib.setIntraOnlyConstraintFlag(m_intraOnlyConstraintFlag);
m_cEncLib.setNoIdrConstraintFlag(m_noIdrConstraintFlag);
m_cEncLib.setNoGdrConstraintFlag(m_noGdrConstraintFlag);
#if !JVET_S0138_GCI_PTL
m_cEncLib.setSingleLayerConstraintFlag(m_singleLayerConstraintFlag);
#endif
m_cEncLib.setAllLayersIndependentConstraintFlag(m_allLayersIndependentConstraintFlag);
m_cEncLib.setNoQpDeltaConstraintFlag(m_bNoQpDeltaConstraintFlag);
......@@ -288,6 +309,11 @@ void EncApp::xInitLibCfg()
m_cEncLib.setNoQtbttDualTreeIntraConstraintFlag(m_bNoQtbttDualTreeIntraConstraintFlag);
CHECK(m_bNoQtbttDualTreeIntraConstraintFlag && m_dualTree, "Dual tree shall be deactivated when m_bNoQtbttDualTreeIntraConstraintFlag is equal to 1");
#if JVET_S0066_GCI
m_cEncLib.setMaxLog2CtuSizeConstraintIdc(m_maxLog2CtuSizeConstraintIdc);
CHECK( m_uiCTUSize > (1<<(m_maxLog2CtuSizeConstraintIdc)), "CTUSize shall be less than or equal to 1 << m_maxLog2CtuSize");
#endif
m_cEncLib.setNoPartitionConstraintsOverrideConstraintFlag(m_noPartitionConstraintsOverrideConstraintFlag);
CHECK(m_noPartitionConstraintsOverrideConstraintFlag && m_SplitConsOverrideEnabledFlag, "Partition override shall be deactivated when m_noPartitionConstraintsOverrideConstraintFlag is equal to 1");
......@@ -349,6 +375,11 @@ void EncApp::xInitLibCfg()
m_cEncLib.setNoTransformSkipConstraintFlag(m_noTransformSkipConstraintFlag);
CHECK(m_noTransformSkipConstraintFlag && m_useTransformSkip, "Transform skip shall be deactivated when m_noTransformSkipConstraintFlag is equal to 1");
#if JVET_S0066_GCI
m_cEncLib.setNoLumaTransformSize64ConstraintFlag(m_noLumaTransformSize64ConstraintFlag);
CHECK(m_noLumaTransformSize64ConstraintFlag && m_log2MaxTbSize > 5, "Max transform size shall be less than 64 when m_noLumaTransformSize64ConstraintFlag is equal to 1");
#endif
m_cEncLib.setNoBDPCMConstraintFlag(m_noBDPCMConstraintFlag);
CHECK(m_noBDPCMConstraintFlag && m_useBDPCM, "BDPCM shall be deactivated when m_noBDPCMConstraintFlag is equal to 1");
......@@ -406,14 +437,18 @@ void EncApp::xInitLibCfg()
{
m_cEncLib.setNonPackedConstraintFlag(false);
m_cEncLib.setNonProjectedConstraintFlag(false);
#if !JVET_S0138_GCI_PTL
m_cEncLib.setSingleLayerConstraintFlag(false);
#endif
m_cEncLib.setAllLayersIndependentConstraintFlag(false);
m_cEncLib.setNoResChangeInClvsConstraintFlag(false);
m_cEncLib.setOneTilePerPicConstraintFlag(false);
m_cEncLib.setPicHeaderInSliceHeaderConstraintFlag(false);
m_cEncLib.setOneSlicePerPicConstraintFlag(false);
m_cEncLib.setOneSubpicPerPicConstraintFlag(false);
#if !JVET_S0138_GCI_PTL
m_cEncLib.setFrameOnlyConstraintFlag(false);
#endif
m_cEncLib.setOnePictureOnlyConstraintFlag(false);
m_cEncLib.setIntraOnlyConstraintFlag(false);
m_cEncLib.setMaxBitDepthConstraintIdc(16);
......@@ -718,10 +753,6 @@ void EncApp::xInitLibCfg()
m_cEncLib.setPersistentRiceAdaptationEnabledFlag ( m_persistentRiceAdaptationEnabledFlag );
m_cEncLib.setCabacBypassAlignmentEnabledFlag ( m_cabacBypassAlignmentEnabledFlag );
m_cEncLib.setLog2MaxTransformSkipBlockSize ( m_log2MaxTransformSkipBlockSize );
for (uint32_t signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)
{
m_cEncLib.setRdpcmEnabledFlag ( RDPCMSignallingMode(signallingModeIndex), m_rdpcmEnabledFlag[signallingModeIndex]);
}
m_cEncLib.setFastUDIUseMPMEnabled ( m_bFastUDIUseMPMEnabled );
m_cEncLib.setFastMEForGenBLowDelayEnabled ( m_bFastMEForGenBLowDelayEnabled );
m_cEncLib.setUseBLambdaForNonKeyLowDelayPictures ( m_bUseBLambdaForNonKeyLowDelayPictures );
......
This diff is collapsed.
......@@ -137,7 +137,9 @@ protected:
bool m_bIntraOnlyConstraintFlag;
uint32_t m_maxBitDepthConstraintIdc;
int m_maxChromaFormatConstraintIdc;
#if !JVET_S0138_GCI_PTL
bool m_singleLayerConstraintFlag;
#endif
bool m_allLayersIndependentConstraintFlag;
bool m_noMrlConstraintFlag;
bool m_noIspConstraintFlag;
......@@ -154,6 +156,9 @@ protected:
bool m_noVirtualBoundaryConstraintFlag;
#endif
bool m_bNoQtbttDualTreeIntraConstraintFlag;
#if JVET_S0066_GCI
int m_maxLog2CtuSizeConstraintIdc;
#endif
bool m_noPartitionConstraintsOverrideConstraintFlag;
bool m_bNoSaoConstraintFlag;
bool m_bNoAlfConstraintFlag;
......@@ -174,6 +179,9 @@ protected:
bool m_noGeoConstraintFlag;
bool m_bNoLadfConstraintFlag;
bool m_noTransformSkipConstraintFlag;
#if JVET_S0066_GCI
bool m_noLumaTransformSize64ConstraintFlag;
#endif
bool m_noBDPCMConstraintFlag;
bool m_noJointCbCrConstraintFlag;
bool m_bNoQpDeltaConstraintFlag;
......@@ -192,6 +200,10 @@ protected:
Profile::Name m_profile;
Level::Tier m_levelTier;
Level::Name m_level;
#if JVET_S0138_GCI_PTL
bool m_frameOnlyConstraintFlag;
bool m_multiLayerEnabledFlag;
#endif
std::vector<uint32_t> m_subProfile;
uint8_t m_numSubProfile;
......@@ -206,8 +218,9 @@ protected:
bool m_picHeaderInSliceHeaderConstraintFlag;
bool m_oneSlicePerPicConstraintFlag;
bool m_oneSubpicPerPicConstraintFlag;
#if !JVET_S0138_GCI_PTL
bool m_frameOnlyConstraintFlag;
#endif
// coding structure
int m_iIntraPeriod; ///< period of I-slice (random access period)
int m_iDecodingRefreshType; ///< random access type
......@@ -227,7 +240,6 @@ protected:
uint32_t m_log2MaxTransformSkipBlockSize; ///< transform-skip maximum size (minimum of 2)
bool m_transformSkipRotationEnabledFlag; ///< control flag for transform-skip/transquant-bypass residual rotation
bool m_transformSkipContextEnabledFlag; ///< control flag for transform-skip/transquant-bypass single significance map context
bool m_rdpcmEnabledFlag[NUMBER_OF_RDPCM_SIGNALLING_MODES];///< control flags for residual DPCM
bool m_persistentRiceAdaptationEnabledFlag; ///< control flag for Golomb-Rice parameter adaptation over each slice
bool m_cabacBypassAlignmentEnabledFlag;
bool m_ISP;
......
......@@ -276,6 +276,7 @@ const int AdaptiveLoopFilter::m_fixedFilterSetCoeff[ALF_FIXED_FILTER_NUM][MAX_NU
{ 0, 1, 2, -8, 2, -6, 5, 15, 0, 2, -7, 9, 0 },
{ 1, -1, 12, -15, -7, -2, 3, 6, 6, -1, 7, 30, 0 },
};
const int AdaptiveLoopFilter::m_classToFilterMapping[NUM_FIXED_FILTER_SETS][MAX_NUM_ALF_CLASSES] =
{
{ 8, 2, 2, 2, 3, 4, 53, 9, 9, 52, 4, 4, 5, 9, 2, 8, 10, 9, 1, 3, 39, 39, 10, 9, 52 },
......@@ -319,7 +320,9 @@ void AdaptiveLoopFilter::applyCcAlfFilter(CodingStructure &cs, ComponentID compI
if (!skipFiltering)
{
if (filterControl != nullptr)
{
filterIdx--;
}
const int16_t *filterCoeff = filterSet[filterIdx];
......@@ -584,10 +587,8 @@ void AdaptiveLoopFilter::ALFProcess(CodingStructure& cs)
coeff = m_fixedFilterSetCoeffDec[filterSetIndex];
clip = m_clipDefault;
}
m_filter7x7Blk(m_classifier, recYuv, tmpYuv, blk, blk, COMPONENT_Y, coeff, clip, m_clpRngs.comp[COMPONENT_Y], cs
, m_alfVBLumaCTUHeight
, m_alfVBLumaPos
);
m_filter7x7Blk(m_classifier, recYuv, tmpYuv, blk, blk, COMPONENT_Y, coeff, clip, m_clpRngs.comp[COMPONENT_Y],
cs, m_alfVBLumaCTUHeight, m_alfVBLumaPos);
}
for( int compIdx = 1; compIdx < MAX_NUM_COMPONENT; compIdx++ )
......@@ -1116,7 +1117,6 @@ void AdaptiveLoopFilter::filterBlk(AlfClassifier **classifier, const PelUnitBuf
const int clsSizeY = 4;
const int clsSizeX = 4;
CHECK( startHeight % clsSizeY, "Wrong startHeight in filtering" );
CHECK( startWidth % clsSizeX, "Wrong startWidth in filtering" );
CHECK( ( endHeight - startHeight ) % clsSizeY, "Wrong endHeight in filtering" );
......
......@@ -102,7 +102,6 @@ enum CodingStatisticsType
STATS__CABAC_FIXED_BITS,
STATS__BYTE_ALIGNMENT_BITS,
STATS__TRAILING_BITS,
STATS__EXPLICIT_RDPCM_BITS,
STATS__CABAC_EP_BIT_ALIGNMENT,
STATS__CABAC_BITS__ALIGNED_SIGN_BIT,
STATS__CABAC_BITS__ALIGNED_ESCAPE_BITS,
......@@ -197,7 +196,6 @@ static inline const char* getName(CodingStatisticsType name)
"CABAC_FIXED_BITS",
"BYTE_ALIGNMENT_BITS",
"TRAILING_BITS",
"EXPLICIT_RDPCM_BITS",
"CABAC_EP_BIT_ALIGNMENT",
"CABAC_BITS__ALIGNED_SIGN_BIT",
"CABAC_BITS__ALIGNED_ESCAPE_BITS",
......
......@@ -683,7 +683,6 @@ void CodingStructure::addEmptyTUs( Partitioner &partitioner )
{
tu.getCoeffs( ComponentID( compID ) ).fill( 0 );
tu.getPcmbuf( ComponentID( compID ) ).fill( 0 );
tu.rdpcm[compID] = RDPCM_OFF;
}
}
tu.depth = trDepth;
......
......@@ -696,22 +696,6 @@ const CtxSet ContextSetCfg::CopyRunModel = ContextSetCfg::addCtxSet
{ 0, 9, 5, },
});
const CtxSet ContextSetCfg::RdpcmFlag = ContextSetCfg::addCtxSet
({
{ CNU, CNU, },
{ CNU, CNU, },
{ CNU, CNU, },
{ DWS, DWS, },
});
const CtxSet ContextSetCfg::RdpcmDir = ContextSetCfg::addCtxSet
({
{ CNU, CNU, },
{ CNU, CNU, },
{ CNU, CNU, },
{ DWS, DWS, },
});
const CtxSet ContextSetCfg::TransformSkipFlag = ContextSetCfg::addCtxSet
({
{ 25, 17, },
......@@ -768,14 +752,6 @@ const CtxSet ContextSetCfg::SbtPosFlag = ContextSetCfg::addCtxSet
{ 13, },
});
const CtxSet ContextSetCfg::CrossCompPred = ContextSetCfg::addCtxSet
({
{ CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, },
{ CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, },
{ CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, },
{ DWS, DWS, DWS, DWS, DWS, DWS, DWS, DWS, DWS, DWS, },
});
const CtxSet ContextSetCfg::ChromaQpAdjFlag = ContextSetCfg::addCtxSet
({
{ CNU, },
......
......@@ -249,13 +249,10 @@ public:
static const CtxSet RunTypeFlag;
static const CtxSet IdxRunModel;
static const CtxSet CopyRunModel;
static const CtxSet RdpcmFlag;
static const CtxSet RdpcmDir;
static const CtxSet SbtFlag;
static const CtxSet SbtQuadFlag;
static const CtxSet SbtHorFlag;
static const CtxSet SbtPosFlag;
static const CtxSet CrossCompPred;
static const CtxSet ChromaQpAdjFlag;
static const CtxSet ChromaQpAdjIdc;
static const CtxSet ImvFlag;
......
/* The copyright in this software is being made available under the BSD
* License, included below. This software may be subject to other third party
* and contributor rights, including patent rights, and no such rights are
* granted under this license.
*
* Copyright (c) 2010-2020, ITU/ISO/IEC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/** \file CrossCompPrediction.cpp
\brief cross component prediction class
*/
#include "CrossCompPrediction.h"
#include "Unit.h"
#include "CommonDef.h"
#include "CodingStructure.h"
#include "Slice.h"
/* The copyright in this software is being made available under the BSD
* License, included below. This software may be subject to other third party
* and contributor rights, including patent rights, and no such rights are
* granted under this license.
*
* Copyright (c) 2010-2020, ITU/ISO/IEC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
This diff is collapsed.
......@@ -506,19 +506,21 @@ void InterpolationFilter::filterCopy( const ClpRng& clpRng, const Pel *src, int
}
}
else
for (row = 0; row < height; row++)
{
for (col = 0; col < width; col++)
for (row = 0; row < height; row++)
{
Pel val = src[ col ];
val = rightShift_round((val + IF_INTERNAL_OFFS), shift);
for (col = 0; col < width; col++)
{
Pel val = src[col];
val = rightShift_round((val + IF_INTERNAL_OFFS), shift);
dst[col] = ClipPel( val, clpRng );
JVET_J0090_CACHE_ACCESS( &src[col], __FILE__, __LINE__ );
}
dst[col] = ClipPel(val, clpRng);
JVET_J0090_CACHE_ACCESS(&src[col], __FILE__, __LINE__);
}
src += srcStride;
dst += dstStride;
src += srcStride;
dst += dstStride;
}
}
}
}
......@@ -790,7 +792,6 @@ void InterpolationFilter::filterHor(const ComponentID compID, Pel const *src, in
else
{
filterHor<NTAPS_LUMA>( clpRng, src, srcStride, dst, dstStride, width, height, isLast, m_lumaFilter[frac], biMCForDMVR );
}
}
else
......
......@@ -112,7 +112,6 @@ void IntraPrediction::destroy()
void IntraPrediction::init(ChromaFormat chromaFormatIDC, const unsigned bitDepthY)
{
if (m_yuvExt2[COMPONENT_Y][0] != nullptr && m_currChromaFormat != chromaFormatIDC)
{
destroy();
......@@ -211,7 +210,6 @@ void IntraPrediction::setReferenceArrayLengths( const CompArea &area )
m_leftRefLength = (height << 1);
m_topRefLength = (width << 1);
}
void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, const PredictionUnit &pu)
......@@ -348,6 +346,7 @@ void IntraPrediction::xPredIntraPlanar( const CPelBuf &pSrc, PelBuf &pDst )
}
}
}
void IntraPrediction::xPredIntraDc( const CPelBuf &pSrc, PelBuf &pDst, const ChannelType channelType, const bool enableBoundaryFilter )
{
const Pel dcval = xGetPredValDc( pSrc, pDst );
......@@ -722,6 +721,7 @@ void IntraPrediction::geneWeightedPred(const ComponentID compId, PelBuf &pred, c
}
}
}
void IntraPrediction::switchBuffer(const PredictionUnit &pu, ComponentID compID, PelBuf srcBuff, Pel *dst)
{
Pel *src = srcBuff.bufAt(0, 0);
......@@ -750,14 +750,14 @@ void IntraPrediction::geneIntrainterPred(const CodingUnit &cu)
if (isChromaEnabled(pu->chromaFormat))
{
maxCompID = MAX_NUM_COMPONENT;
if (pu->chromaSize().width > 2)
{
initIntraPatternChType(cu, pu->Cb());
predIntraAng(COMPONENT_Cb, cu.cs->getPredBuf(*pu).Cb(), *pu);
if (pu->chromaSize().width > 2)
{
initIntraPatternChType(cu, pu->Cb());
predIntraAng(COMPONENT_Cb, cu.cs->getPredBuf(*pu).Cb(), *pu);
initIntraPatternChType(cu, pu->Cr());
predIntraAng(COMPONENT_Cr, cu.cs->getPredBuf(*pu).Cr(), *pu);
}
initIntraPatternChType(cu, pu->Cr());
predIntraAng(COMPONENT_Cr, cu.cs->getPredBuf(*pu).Cr(), *pu);
}
}
for (int currCompID = 0; currCompID < maxCompID; currCompID++)
{
......@@ -838,7 +838,6 @@ void IntraPrediction::initIntraPatternChTypeISP(const CodingUnit& cu, const Comp
}
else
{
m_topRefLength = cu.blocks[area.compID].width + area.width;
m_leftRefLength = cu.blocks[area.compID].height + area.height;
......@@ -907,7 +906,6 @@ void IntraPrediction::initIntraPatternChTypeISP(const CodingUnit& cu, const Comp
*dst = sample;
dst++;
}
}
}
// ----- Step 2: filtered reference samples -----
......@@ -975,11 +973,13 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf
const Pel* ptrSrc;
const Pel valueDC = 1 << (sps.getBitDepth( chType ) - 1);
if( numIntraNeighbor == 0 )
{
// Fill border with DC value
for (int j = 0; j <= predSize + multiRefIdx; j++) { ptrDst[j] = valueDC; }
for (int j = 0; j <= predSize + multiRefIdx; j++)
{
ptrDst[j] = valueDC;
}
for (int i = 0; i <= predHSize + multiRefIdx; i++)
{
ptrDst[i + predStride] = valueDC;
......@@ -989,7 +989,10 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf
{
// Fill top-left border and top and top right with rec. samples
ptrSrc = srcBuf - (1 + multiRefIdx) * srcStride - (1 + multiRefIdx);
for (int j = 0; j <= predSize + multiRefIdx; j++) { ptrDst[j] = ptrSrc[j]; }
for (int j = 0; j <= predSize + multiRefIdx; j++)
{
ptrDst[j] = ptrSrc[j];
}
for (int i = 0; i <= predHSize + multiRefIdx; i++)
{
ptrDst[i + predStride] = ptrSrc[i * srcStride];
......@@ -1166,8 +1169,7 @@ void IntraPrediction::xFillReferenceSamples( const CPelBuf &recoBuf, Pel* refBuf
}
void IntraPrediction::xFilterReferenceSamples(const Pel *refBufUnfiltered, Pel *refBufFiltered, const CompArea &area,
const SPS &sps, int multiRefIdx
)
const SPS &sps, int multiRefIdx)
{
if (area.compID != COMPONENT_Y)
{
......@@ -1390,13 +1392,13 @@ void IntraPrediction::xGetLumaRecPixels(const PredictionUnit &pu, CompArea chrom
memset(bNeighborFlags, 0, totalUnits);
bool aboveIsAvailable, leftIsAvailable;
int availlableUnit = isLeftAvailable( isChroma( pu.chType ) ? cu : lumaCU, toChannelType( area.compID ), area.pos(), iLeftUnits, iUnitHeight,
( bNeighborFlags + iLeftUnits + leftBelowUnits - 1 ) );
int availlableUnit = isLeftAvailable(isChroma(pu.chType) ? cu : lumaCU, toChannelType(area.compID), area.pos(),
iLeftUnits, iUnitHeight, (bNeighborFlags + iLeftUnits + leftBelowUnits - 1));
leftIsAvailable = availlableUnit == iTUHeightInUnits;
availlableUnit = isAboveAvailable( isChroma( pu.chType ) ? cu : lumaCU, toChannelType( area.compID ), area.pos(), iAboveUnits, iUnitWidth,
( bNeighborFlags + iLeftUnits + leftBelowUnits + 1 ) );
availlableUnit = isAboveAvailable(isChroma(pu.chType) ? cu : lumaCU, toChannelType(area.compID), area.pos(),
iAboveUnits, iUnitWidth, (bNeighborFlags + iLeftUnits + leftBelowUnits + 1));
aboveIsAvailable = availlableUnit == iTUWidthInUnits;
......@@ -1662,7 +1664,6 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
srcColor0 = temp.bufAt(0, 0);
curChroma0 = getPredictorPtr(compID);
unsigned internalBitDepth = sps.getBitDepth(CHANNEL_TYPE_CHROMA);
int minLuma[2] = { MAX_INT, 0 };
......@@ -1743,10 +1744,22 @@ void IntraPrediction::xGetLMParameters(const PredictionUnit &pu, const Component
int maxGrpIdx[2] = { 1, 3 };
int *tmpMinGrp = minGrpIdx;
int *tmpMaxGrp = maxGrpIdx;
if (selectLumaPix[tmpMinGrp[0]] > selectLumaPix[tmpMinGrp[1]]) std::swap(tmpMinGrp[0], tmpMinGrp[1]);
if (selectLumaPix[tmpMaxGrp[0]] > selectLumaPix[tmpMaxGrp[1]]) std::swap(tmpMaxGrp[0], tmpMaxGrp[1]);
if (selectLumaPix[tmpMinGrp[0]] > selectLumaPix[tmpMaxGrp[1]]) std::swap(tmpMinGrp, tmpMaxGrp);
if (selectLumaPix[tmpMinGrp[1]] > selectLumaPix[tmpMaxGrp[0]]) std::swap(tmpMinGrp[1], tmpMaxGrp[0]);
if (selectLumaPix[tmpMinGrp[0]] > selectLumaPix[tmpMinGrp[1]])
{
std::swap(tmpMinGrp[0], tmpMinGrp[1]);
}
if (selectLumaPix[tmpMaxGrp[0]] > selectLumaPix[tmpMaxGrp[1]])
{
std::swap(tmpMaxGrp[0], tmpMaxGrp[1]);
}
if (selectLumaPix[tmpMinGrp[0]] > selectLumaPix[tmpMaxGrp[1]])
{
std::swap(tmpMinGrp, tmpMaxGrp);
}
if (selectLumaPix[tmpMinGrp[1]] > selectLumaPix[tmpMaxGrp[0]])
{
std::swap(tmpMinGrp[1], tmpMaxGrp[0]);
}
minLuma[0] = (selectLumaPix[tmpMinGrp[0]] + selectLumaPix[tmpMinGrp[1]] + 1 )>>1;
minLuma[1] = (selectChromaPix[tmpMinGrp[0]] + selectChromaPix[tmpMinGrp[1]] + 1) >> 1;
......@@ -1848,6 +1861,7 @@ void IntraPrediction::predIntraMip( const ComponentID compId, PelBuf &piPred, co
}
}
}
void IntraPrediction::reorderPLT(CodingStructure& cs, Partitioner& partitioner, ComponentID compBegin, uint32_t numComp)
{
CodingUnit &cu = *cs.getCU(partitioner.chType);
......@@ -1875,7 +1889,9 @@ void IntraPrediction::reorderPLT(CodingStructure& cs, Partitioner& partitioner,
for (curidx = 0; curidx < cu.curPLTSize[compBegin]; curidx++)
{
if( curPLTpred[curidx] )
{
continue;
}
bool matchTmp = true;
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
......@@ -1902,10 +1918,10 @@ void IntraPrediction::reorderPLT(CodingStructure& cs, Partitioner& partitioner,
}
else
{
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
curPLTtmp[comp][reusePLTSizetmp] = cs.prevPLT.curPLT[comp][predidx];
}
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
curPLTtmp[comp][reusePLTSizetmp] = cs.prevPLT.curPLT[comp][predidx];
}
}
reusePLTSizetmp++;
pltSizetmp++;
......@@ -1934,10 +1950,10 @@ void IntraPrediction::reorderPLT(CodingStructure& cs, Partitioner& partitioner,
}
else
{
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
curPLTtmp[comp][pltSizetmp] = cu.curPLT[comp][curidx];
}
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
curPLTtmp[comp][pltSizetmp] = cu.curPLT[comp][curidx];
}
}
pltSizetmp++;
}
......@@ -1954,10 +1970,10 @@ void IntraPrediction::reorderPLT(CodingStructure& cs, Partitioner& partitioner,
}
else
{
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
cu.curPLT[comp][curidx] = curPLTtmp[comp][curidx];
}
for (int comp = compBegin; comp < (compBegin + numComp); comp++)
{
cu.curPLT[comp][curidx] = curPLTtmp[comp][curidx];
}
}
}
}
......
This diff is collapsed.
......@@ -151,6 +151,10 @@ ProfileTierLevel::ProfileTierLevel()
, m_numSubProfile(0)
, m_subProfileIdc(0)
, m_levelIdc (Level::NONE)
#if JVET_S0138_GCI_PTL
, m_frameOnlyConstraintFlag(1)
, m_multiLayerEnabledFlag(0)
#endif
{
::memset(m_subLayerLevelPresentFlag, 0, sizeof(m_subLayerLevelPresentFlag ));
::memset(m_subLayerLevelIdc, Level::NONE, sizeof(m_subLayerLevelIdc ));
......
......@@ -229,34 +229,36 @@ void Picture::destroy()
#if ENABLE_SPLIT_PARALLELISM
for( int jId = 0; jId < PARL_SPLIT_MAX_NUM_THREADS; jId++ )
#endif
for (uint32_t t = 0; t < NUM_PIC_TYPES; t++)
{
M_BUFS( jId, t ).destroy();
}
m_hashMap.clearAll();
if( cs )
{
cs->destroy();
delete cs;
cs = nullptr;
}
for (uint32_t t = 0; t < NUM_PIC_TYPES; t++)
{
M_BUFS(jId, t).destroy();
}
m_hashMap.clearAll();
if (cs)
{
cs->destroy();
delete cs;
cs = nullptr;
}
for( auto &ps : slices )
{
delete ps;
}
slices.clear();
for (auto &ps: slices)
{
delete ps;
}
slices.clear();
for( auto &psei : SEIs )
{
delete psei;
}
SEIs.clear();
for (auto &psei: SEIs)
{
delete psei;
}
SEIs.clear();
if (m_spliceIdx)
{
delete[] m_spliceIdx;
m_spliceIdx = NULL;
if (m_spliceIdx)
{
delete[] m_spliceIdx;
m_spliceIdx = NULL;
}
}
}
......@@ -277,11 +279,17 @@ void Picture::createTempBuffers( const unsigned _maxCUSize )
M_BUFS( jId, PIC_PREDICTION ).create( chromaFormat, a, _maxCUSize );
M_BUFS( jId, PIC_RESIDUAL ).create( chromaFormat, a, _maxCUSize );
#if ENABLE_SPLIT_PARALLELISM
if( jId > 0 ) M_BUFS( jId, PIC_RECONSTRUCTION ).create( chromaFormat, Y(), _maxCUSize, margin, MEMORY_ALIGN_DEF_SIZE );
if (jId > 0)
{
M_BUFS(jId, PIC_RECONSTRUCTION).create(chromaFormat, Y(), _maxCUSize, margin, MEMORY_ALIGN_DEF_SIZE);
}
#endif
}
if( cs ) cs->rebindPicBufs();
if (cs)
{
cs->rebindPicBufs();
}
}
void Picture::destroyTempBuffers()
......@@ -291,15 +299,26 @@ void Picture::destroyTempBuffers()
for( int jId = 0; jId < scheduler.getNumPicInstances(); jId++ )
#endif
for( uint32_t t = 0; t < NUM_PIC_TYPES; t++ )
{
if( t == PIC_RESIDUAL || t == PIC_PREDICTION ) M_BUFS( jId, t ).destroy();
for (uint32_t t = 0; t < NUM_PIC_TYPES; t++)
{
if (t == PIC_RESIDUAL || t == PIC_PREDICTION)
{
M_BUFS(jId, t).destroy();
}
#if ENABLE_SPLIT_PARALLELISM
if( t == PIC_RECONSTRUCTION && jId > 0 ) M_BUFS( jId, t ).destroy();
if (t == PIC_RECONSTRUCTION && jId > 0)
{
M_BUFS(jId, t).destroy();
}
#endif
}
}
if( cs ) cs->rebindPicBufs();
if (cs)
{
cs->rebindPicBufs();
}
}
PelBuf Picture::getOrigBuf(const CompArea &blk) { return getBuf(blk, PIC_ORIGINAL); }
......@@ -343,7 +362,6 @@ void Picture::finalInit( const VPS* vps, const SPS& sps, const PPS& pps, PicHead
SEIs.clear();
clearSliceBuffer();
const ChromaFormat chromaFormatIDC = sps.getChromaFormatIdc();
const int iWidth = pps.getPicWidthInLumaSamples();
const int iHeight = pps.getPicHeightInLumaSamples();
......@@ -387,7 +405,6 @@ void Picture::allocateNewSlice()
Slice& slice = *slices.back();
memcpy(slice.getAlfAPSs(), cs->alfApss, sizeof(cs->alfApss));
slice.setPPS( cs->pps);
slice.setSPS( cs->sps);
slice.setVPS( cs->vps);
......@@ -397,6 +414,7 @@ void Picture::allocateNewSlice()
slice.initSlice();
}
}
void Picture::fillSliceLossyLosslessArray(std::vector<uint16_t> sliceLosslessIndexArray, bool mixedLossyLossless)
{
uint16_t numElementsinsliceLosslessIndexArray = (uint16_t)sliceLosslessIndexArray.size();
......@@ -415,7 +433,6 @@ void Picture::fillSliceLossyLosslessArray(std::vector<uint16_t> sliceLosslessInd
}
}
CHECK(m_lossylosslessSliceArray.size() < numSlices, "sliceLosslessArray size is less than number of slices");
}
Slice *Picture::swapSliceObject(Slice * p, uint32_t i)
......@@ -446,7 +463,6 @@ void Picture::clearSliceBuffer()
}
#if ENABLE_SPLIT_PARALLELISM
void Picture::finishParallelPart( const UnitArea& area )
{
const UnitArea clipdArea = clipArea( area, *this );
......@@ -461,8 +477,6 @@ void Picture::finishParallelPart( const UnitArea& area )
M_BUFS( destID, PIC_RECONSTRUCTION ).subBuf( clipdArea ).copyFrom( M_BUFS( sourceID, PIC_RECONSTRUCTION ).subBuf( clipdArea ) );
}
}
#endif
const TFilterCoeff DownsamplingFilterSRC[8][16][12] =
......@@ -657,21 +671,63 @@ void Picture::sampleRateConv( const std::pair<int, int> scalingRatio, const std:
int verFilter = 0;
int horFilter = 0;
if( scalingRatio.first > ( 15 << SCALE_RATIO_BITS ) / 4 ) horFilter = 7;
else if( scalingRatio.first > ( 20 << SCALE_RATIO_BITS ) / 7 ) horFilter = 6;
else if( scalingRatio.first > ( 5 << SCALE_RATIO_BITS ) / 2 ) horFilter = 5;
else if( scalingRatio.first > ( 2 << SCALE_RATIO_BITS ) ) horFilter = 4;
else if( scalingRatio.first > ( 5 << SCALE_RATIO_BITS ) / 3 ) horFilter = 3;
else if( scalingRatio.first > ( 5 << SCALE_RATIO_BITS ) / 4 ) horFilter = 2;
else if( scalingRatio.first > ( 20 << SCALE_RATIO_BITS ) / 19 ) horFilter = 1;
if( scalingRatio.second > ( 15 << SCALE_RATIO_BITS ) / 4 ) verFilter = 7;
else if( scalingRatio.second > ( 20 << SCALE_RATIO_BITS ) / 7 ) verFilter = 6;
else if( scalingRatio.second > ( 5 << SCALE_RATIO_BITS ) / 2 ) verFilter = 5;
else if( scalingRatio.second > ( 2 << SCALE_RATIO_BITS ) ) verFilter = 4;
else if( scalingRatio.second > ( 5 << SCALE_RATIO_BITS ) / 3 ) verFilter = 3;
else if( scalingRatio.second > ( 5 << SCALE_RATIO_BITS ) / 4 ) verFilter = 2;
else if( scalingRatio.second > ( 20 << SCALE_RATIO_BITS ) / 19 ) verFilter = 1;
if (scalingRatio.first > (15 << SCALE_RATIO_BITS) / 4)
{
horFilter = 7;
}
else if (scalingRatio.first > (20 << SCALE_RATIO_BITS) / 7)
{
horFilter = 6;
}
else if (scalingRatio.first > (5 << SCALE_RATIO_BITS) / 2)
{
horFilter = 5;
}
else if (scalingRatio.first > (2 << SCALE_RATIO_BITS))
{
horFilter = 4;
}
else if (scalingRatio.first > (5 << SCALE_RATIO_BITS) / 3)
{
horFilter = 3;
}
else if (scalingRatio.first > (5 << SCALE_RATIO_BITS) / 4)
{
horFilter = 2;
}
else if (scalingRatio.first > (20 << SCALE_RATIO_BITS) / 19)
{
horFilter = 1;
}
if (scalingRatio.second > (15 << SCALE_RATIO_BITS) / 4)
{
verFilter = 7;
}
else if (scalingRatio.second > (20 << SCALE_RATIO_BITS) / 7)
{
verFilter = 6;
}
else if (scalingRatio.second > (5 << SCALE_RATIO_BITS) / 2)
{
verFilter = 5;
}
else if (scalingRatio.second > (2 << SCALE_RATIO_BITS))
{
verFilter = 4;
}
else if (scalingRatio.second > (5 << SCALE_RATIO_BITS) / 3)
{
verFilter = 3;
}
else if (scalingRatio.second > (5 << SCALE_RATIO_BITS) / 4)
{
verFilter = 2;
}
else if (scalingRatio.second > (20 << SCALE_RATIO_BITS) / 19)
{
verFilter = 1;
}
filterHor = &DownsamplingFilterSRC[horFilter][0][0];
filterVer = &DownsamplingFilterSRC[verFilter][0][0];
......@@ -1074,15 +1130,15 @@ void Picture::extendPicBorder( const PPS *pps )
Pel* pi = piTxt;
// do left and right margins
for (int y = 0; y < p.height; y++)
for (int y = 0; y < p.height; y++)
{
for (int x = 0; x < xmargin; x++)
{
for (int x = 0; x < xmargin; x++ )
{
pi[ -xmargin + x ] = pi[0];
pi[ p.width + x ] = pi[p.width-1];
}
pi += p.stride;
pi[-xmargin + x] = pi[0];
pi[p.width + x] = pi[p.width - 1];
}
pi += p.stride;
}
// pi is now the (0,height) (bottom left of image within bigger picture
pi -= (p.stride + xmargin);
......@@ -1248,7 +1304,6 @@ Pel* Picture::getOrigin( const PictureType &type, const ComponentID compID ) con
const int jId = ( type == PIC_ORIGINAL || type == PIC_TRUE_ORIGINAL ) ? 0 : scheduler.getSplitPicId();
#endif
return M_BUFS( jId, type ).getOrigin( compID );
}
void Picture::createSpliceIdx(int nums)
......@@ -1264,10 +1319,14 @@ bool Picture::getSpliceFull()
for (int i = 0; i < m_ctuNums; i++)
{
if (m_spliceIdx[i] != 0)
{
count++;
}
}
if (count < m_ctuNums * 0.25)
{
return false;
}
return true;
}
......
......@@ -93,16 +93,50 @@ static const LevelTierFeatures mainLevelTierInfo[] =
#endif
};
static const ProfileFeatures validProfiles[] =
{ // profile, pNameString, maxBitDepth, maxChrFmt, lvl15.5, cpbvcl, cpbnal, fcf*1000, mincr*100, levelInfo
// most constrained profiles must appear first.
{ Profile::MAIN_10, "Main_10_Still_Picture", 10, CHROMA_420, true, 1000, 1100, 1875, 100 , mainLevelTierInfo, true },
{ Profile::MAIN_444_10, "Main_444_10_Still_Picture", 10, CHROMA_444, true, 2500, 2750, 3750, 75 , mainLevelTierInfo, true },
{ Profile::MAIN_10, "Main_10", 10, CHROMA_420, false, 1000, 1100, 1875, 100 , mainLevelTierInfo, false },
{ Profile::MAIN_444_10, "Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 75 , mainLevelTierInfo, false },
{ Profile::NONE, 0 }
static const ProfileFeatures validProfiles[] = {
// profile, pNameString, maxBitDepth, maxChrFmt, lvl15.5, cpbvcl, cpbnal, fcf*1000, mincr*100, levelInfo
// most constrained profiles must appear first.
#if JVET_S_PROFILES
{ Profile::MAIN_10_STILL_PICTURE, "Main_10_Still_Picture", 10, CHROMA_420, true, 1000, 1100, 1875, 100,
mainLevelTierInfo, true },
{ Profile::MULTILAYER_MAIN_10_STILL_PICTURE, "Multilayer_Main_10_Still_Picture", 10, CHROMA_420, true, 1000, 1100,
1875, 100, mainLevelTierInfo, true },
{ Profile::MAIN_10_444_STILL_PICTURE, "Main_444_10_Still_Picture", 10, CHROMA_444, true, 2500, 2750, 3750, 75,
mainLevelTierInfo, true },
{ Profile::MULTILAYER_MAIN_10_444_STILL_PICTURE, "Multilayer_Main_444_10_Still_Picture", 10, CHROMA_444, true, 2500,
2750, 3750, 75, mainLevelTierInfo, true },
{ Profile::MAIN_10, "Main_10", 10, CHROMA_420, false, 1000, 1100, 1875, 100, mainLevelTierInfo, false },
{ Profile::MULTILAYER_MAIN_10, "Multilayer_Main_10", 10, CHROMA_420, false, 1000, 1100, 1875, 100, mainLevelTierInfo,
false },
{ Profile::MAIN_10_444, "Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 75, mainLevelTierInfo, false },
{ Profile::MULTILAYER_MAIN_10_444, "Multilayer_Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 75,
mainLevelTierInfo, false },
#else
{ Profile::MAIN_10, "Main_10_Still_Picture", 10, CHROMA_420, true, 1000, 1100, 1875, 100, mainLevelTierInfo, true },
{ Profile::MAIN_444_10, "Main_444_10_Still_Picture", 10, CHROMA_444, true, 2500, 2750, 3750, 75, mainLevelTierInfo,
true },
{ Profile::MAIN_10, "Main_10", 10, CHROMA_420, false, 1000, 1100, 1875, 100, mainLevelTierInfo, false },
{ Profile::MAIN_444_10, "Main_444_10", 10, CHROMA_444, false, 2500, 2750, 3750, 75, mainLevelTierInfo, false },
#endif
{ Profile::NONE, 0 },
};
#if JVET_S_PROFILES
const ProfileFeatures *ProfileFeatures::getProfileFeatures(const Profile::Name p)
{
int i;
for (i = 0; validProfiles[i].profile != Profile::NONE; i++)
{
if (validProfiles[i].profile == p)
{
return &validProfiles[i];
}
}
return &validProfiles[i];
}
#endif
void
ProfileLevelTierFeatures::extractPTLInformation(const SPS &sps)
{
......
......@@ -82,6 +82,10 @@ struct ProfileFeatures
uint32_t minCrScaleFactorx100;
const LevelTierFeatures *pLevelTiersListInfo;
bool onePictureOnlyFlagMustBe1;
#if JVET_S_PROFILES
static const ProfileFeatures *getProfileFeatures(const Profile::Name p);
#endif
};
......
......@@ -40,7 +40,6 @@
#include "UnitTools.h"
#include "ContextModelling.h"
#include "CodingStructure.h"
#include "CrossCompPrediction.h"
#include "dtrace_buffer.h"
......
......@@ -40,7 +40,6 @@
#include "UnitTools.h"
#include "ContextModelling.h"
#include "CodingStructure.h"
#include "CrossCompPrediction.h"
#include "dtrace_next.h"
#include "dtrace_buffer.h"
......@@ -540,7 +539,7 @@ void QuantRDOQ::quant(TransformUnit &tu, const ComponentID &compID, const CCoeff
{
if( (tu.cu->bdpcmMode && isLuma(compID)) || (isChroma(compID) && tu.cu->bdpcmModeChroma ) )
{
forwardRDPCM( tu, compID, pSrc, uiAbsSum, cQP, ctx );
forwardBDPCM(tu, compID, pSrc, uiAbsSum, cQP, ctx);
}
else
{
......@@ -1399,7 +1398,8 @@ void QuantRDOQ::xRateDistOptQuantTS( TransformUnit &tu, const ComponentID &compI
}
}
void QuantRDOQ::forwardRDPCM( TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &coeffs, TCoeff &absSum, const QpParam &qp, const Ctx &ctx )
void QuantRDOQ::forwardBDPCM(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &coeffs, TCoeff &absSum,
const QpParam &qp, const Ctx &ctx)
{
const FracBitsAccess& fracBits = ctx.getFracBitsAcess();
......
......@@ -65,7 +65,8 @@ public:
void setScalingList ( ScalingList *scalingList, const int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths);
// quantization
void quant ( TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &pSrc, TCoeff &uiAbsSum, const QpParam &cQP, const Ctx& ctx );
void forwardRDPCM ( TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &pSrc, TCoeff &uiAbsSum, const QpParam &cQP, const Ctx &ctx );
void forwardBDPCM(TransformUnit &tu, const ComponentID &compID, const CCoeffBuf &pSrc, TCoeff &uiAbsSum,
const QpParam &cQP, const Ctx &ctx);
private:
double* xGetErrScaleCoeffSL ( uint32_t list, uint32_t sizeX, uint32_t sizeY, int qp ) { return m_errScale[sizeX][sizeY][list][qp]; }; //!< get Error Scale Coefficent
......
......@@ -662,6 +662,9 @@ public:
#if JVET_S0176_SLI_SEI
int m_sliMaxSublayers;
bool m_sliSublayerInfoPresentFlag;
#if JVET_S0098_SLI_FRACTION
std::vector<std::vector<int>> m_nonSubpicLayersFraction;
#endif
std::vector<std::vector<Level::Name>> m_refLevelIdc;
std::vector<std::vector<std::vector<int>>> m_refLevelFraction;
#else
......
......@@ -2802,17 +2802,12 @@ void PicHeader::resetWpScaling()
SPSRExt::SPSRExt()
: m_transformSkipRotationEnabledFlag (false)
, m_transformSkipContextEnabledFlag (false)
// m_rdpcmEnabledFlag initialized below
, m_extendedPrecisionProcessingFlag (false)
, m_intraSmoothingDisabledFlag (false)
, m_highPrecisionOffsetsEnabledFlag (false)
, m_persistentRiceAdaptationEnabledFlag(false)
, m_cabacBypassAlignmentEnabledFlag (false)
{
for (uint32_t signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++)
{
m_rdpcmEnabledFlag[signallingModeIndex] = false;
}
}
......@@ -4474,14 +4469,17 @@ bool operator == (const ConstraintInfo& op1, const ConstraintInfo& o
#if !JVET_S0266_VUI_length
if( op1.m_nonPackedConstraintFlag != op2.m_nonPackedConstraintFlag ) return false;
#endif
#if !JVET_S0138_GCI_PTL
if( op1.m_frameOnlyConstraintFlag != op2.m_frameOnlyConstraintFlag ) return false;
#endif
if( op1.m_intraOnlyConstraintFlag != op2.m_intraOnlyConstraintFlag ) return false;
if( op1.m_maxBitDepthConstraintIdc != op2.m_maxBitDepthConstraintIdc ) return false;
if( op1.m_maxChromaFormatConstraintIdc != op2.m_maxChromaFormatConstraintIdc ) return false;
if( op1.m_onePictureOnlyConstraintFlag != op2.m_onePictureOnlyConstraintFlag ) return false;
if( op1.m_lowerBitRateConstraintFlag != op2.m_lowerBitRateConstraintFlag ) return false;
#if !JVET_S0138_GCI_PTL
if (op1.m_singleLayerConstraintFlag != op2.m_singleLayerConstraintFlag ) return false;
#endif
if (op1.m_allLayersIndependentConstraintFlag != op2.m_allLayersIndependentConstraintFlag ) return false;
if (op1.m_noMrlConstraintFlag != op2.m_noMrlConstraintFlag ) return false;
if (op1.m_noIspConstraintFlag != op2.m_noIspConstraintFlag ) return false;
......@@ -4543,6 +4541,10 @@ bool operator == (const ProfileTierLevel& op1, const ProfileTierLeve
if (op1.m_profileIdc != op2.m_profileIdc) return false;
if (op1.m_numSubProfile != op2.m_numSubProfile) return false;
if (op1.m_levelIdc != op2.m_levelIdc) return false;
#if JVET_S0138_GCI_PTL
if (op1.m_frameOnlyConstraintFlag != op2.m_frameOnlyConstraintFlag) return false;
if (op1.m_multiLayerEnabledFlag != op2.m_multiLayerEnabledFlag) return false;
#endif
if (op1.m_constraintInfo != op2.m_constraintInfo) return false;
if (op1.m_subProfileIdc != op2.m_subProfileIdc) return false;
......
......@@ -247,14 +247,17 @@ class ConstraintInfo
bool m_picHeaderInSliceHeaderConstraintFlag;
bool m_oneSlicePerPicConstraintFlag;
bool m_oneSubpicPerPicConstraintFlag;
#if !JVET_S0138_GCI_PTL
bool m_frameOnlyConstraintFlag;
#endif
bool m_intraOnlyConstraintFlag;
uint32_t m_maxBitDepthConstraintIdc;
int m_maxChromaFormatConstraintIdc;
bool m_onePictureOnlyConstraintFlag;
bool m_lowerBitRateConstraintFlag;
#if !JVET_S0138_GCI_PTL
bool m_singleLayerConstraintFlag;
#endif
bool m_allLayersIndependentConstraintFlag;
bool m_noMrlConstraintFlag;
bool m_noIspConstraintFlag;
......@@ -272,6 +275,9 @@ class ConstraintInfo
bool m_noVirtualBoundaryConstraintFlag;
#endif
bool m_noQtbttDualTreeIntraConstraintFlag;
#if JVET_S0066_GCI
int m_maxLog2CtuSizeConstraintIdc;
#endif
bool m_noPartitionConstraintsOverrideConstraintFlag;
bool m_noSaoConstraintFlag;
bool m_noAlfConstraintFlag;
......@@ -292,6 +298,9 @@ class ConstraintInfo
bool m_noGeoConstraintFlag;
bool m_noLadfConstraintFlag;
bool m_noTransformSkipConstraintFlag;
#if JVET_S0066_GCI
bool m_noLumaTransformSize64ConstraintFlag;
#endif
bool m_noBDPCMConstraintFlag;
bool m_noJointCbCrConstraintFlag;
bool m_noQpDeltaConstraintFlag;
......@@ -324,7 +333,9 @@ public:
, m_picHeaderInSliceHeaderConstraintFlag(false)
, m_oneSlicePerPicConstraintFlag(false)
, m_oneSubpicPerPicConstraintFlag(false)
#if !JVET_S0138_GCI_PTL
, m_frameOnlyConstraintFlag (false)
#endif
, m_intraOnlyConstraintFlag (false)
#if JVET_S0094_CHROMAFORMAT_BITDEPTH_CONSTRAINT
, m_maxBitDepthConstraintIdc ( 16)
......@@ -335,8 +346,9 @@ public:
#endif
, m_onePictureOnlyConstraintFlag (false)
, m_lowerBitRateConstraintFlag (false )
#if !JVET_S0138_GCI_PTL
, m_singleLayerConstraintFlag(false)
#endif
, m_allLayersIndependentConstraintFlag(false)
, m_noMrlConstraintFlag(false)
, m_noIspConstraintFlag(false)
......@@ -353,6 +365,9 @@ public:
, m_noVirtualBoundaryConstraintFlag(false)
#endif
, m_noQtbttDualTreeIntraConstraintFlag(false)
#if JVET_S0066_GCI
, m_maxLog2CtuSizeConstraintIdc(8)
#endif
, m_noPartitionConstraintsOverrideConstraintFlag(false)
, m_noSaoConstraintFlag (false)
, m_noAlfConstraintFlag (false)
......@@ -373,6 +388,9 @@ public:
, m_noGeoConstraintFlag (false)
, m_noLadfConstraintFlag (false)
, m_noTransformSkipConstraintFlag(false)
#if JVET_S0066_GCI
, m_noLumaTransformSize64ConstraintFlag(false)
#endif
, m_noBDPCMConstraintFlag (false)
, m_noJointCbCrConstraintFlag (false)
, m_noQpDeltaConstraintFlag (false)
......@@ -399,10 +417,10 @@ public:
bool getNonPackedConstraintFlag() const { return m_nonPackedConstraintFlag; }
void setNonPackedConstraintFlag(bool b) { m_nonPackedConstraintFlag = b; }
#endif
#if !JVET_S0138_GCI_PTL
bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; }
void setFrameOnlyConstraintFlag(bool b) { m_frameOnlyConstraintFlag = b; }
#endif
uint32_t getMaxBitDepthConstraintIdc() const { return m_maxBitDepthConstraintIdc; }
void setMaxBitDepthConstraintIdc(uint32_t bitDepth) { m_maxBitDepthConstraintIdc = bitDepth; }
......@@ -437,9 +455,10 @@ public:
bool getLowerBitRateConstraintFlag() const { return m_lowerBitRateConstraintFlag; }
void setLowerBitRateConstraintFlag(bool b) { m_lowerBitRateConstraintFlag = b; }
#if !JVET_S0138_GCI_PTL
bool getSingleLayerConstraintFlag() const { return m_singleLayerConstraintFlag; }
void setSingleLayerConstraintFlag(bool b) { m_singleLayerConstraintFlag = b; }
#endif
bool getAllLayersIndependentConstraintFlag() const { return m_allLayersIndependentConstraintFlag; }
void setAllLayersIndependentConstraintFlag(bool b) { m_allLayersIndependentConstraintFlag = b; }
bool getNoMrlConstraintFlag() const { return m_noMrlConstraintFlag; }
......@@ -470,6 +489,10 @@ public:
#endif
bool getNoQtbttDualTreeIntraConstraintFlag() const { return m_noQtbttDualTreeIntraConstraintFlag; }
void setNoQtbttDualTreeIntraConstraintFlag(bool bVal) { m_noQtbttDualTreeIntraConstraintFlag = bVal; }
#if JVET_S0066_GCI
int getMaxLog2CtuSizeConstraintIdc() const { return m_maxLog2CtuSizeConstraintIdc; }
void setMaxLog2CtuSizeConstraintIdc(int idc) { m_maxLog2CtuSizeConstraintIdc = idc; }
#endif
bool getNoPartitionConstraintsOverrideConstraintFlag() const { return m_noPartitionConstraintsOverrideConstraintFlag; }
void setNoPartitionConstraintsOverrideConstraintFlag(bool bVal) { m_noPartitionConstraintsOverrideConstraintFlag = bVal; }
bool getNoSaoConstraintFlag() const { return m_noSaoConstraintFlag; }
......@@ -512,6 +535,10 @@ public:
void setNoLadfConstraintFlag(bool bVal) { m_noLadfConstraintFlag = bVal; }
bool getNoTransformSkipConstraintFlag() const { return m_noTransformSkipConstraintFlag; }
void setNoTransformSkipConstraintFlag(bool bVal) { m_noTransformSkipConstraintFlag = bVal; }
#if JVET_S0066_GCI
bool getNoLumaTransformSize64ConstraintFlag() const { return m_noLumaTransformSize64ConstraintFlag; }
void setNoLumaTransformSize64ConstraintFlag(bool bVal) { m_noLumaTransformSize64ConstraintFlag = bVal; }
#endif
bool getNoBDPCMConstraintFlag() const { return m_noBDPCMConstraintFlag; }
void setNoBDPCMConstraintFlag(bool bVal) { m_noBDPCMConstraintFlag = bVal; }
bool getNoQpDeltaConstraintFlag() const { return m_noQpDeltaConstraintFlag; }
......@@ -550,7 +577,10 @@ class ProfileTierLevel
uint8_t m_numSubProfile;
std::vector<uint32_t> m_subProfileIdc;
Level::Name m_levelIdc;
#if JVET_S0138_GCI_PTL
bool m_frameOnlyConstraintFlag;
bool m_multiLayerEnabledFlag;
#endif
ConstraintInfo m_constraintInfo;
bool m_subLayerLevelPresentFlag[MAX_TLAYER - 1];
Level::Name m_subLayerLevelIdc[MAX_TLAYER];
......@@ -573,6 +603,13 @@ public:
Level::Name getLevelIdc() const { return m_levelIdc; }
void setLevelIdc(Level::Name x) { m_levelIdc = x; }
#if JVET_S0138_GCI_PTL
bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; }
void setFrameOnlyConstraintFlag(bool x) { m_frameOnlyConstraintFlag = x; }
bool getMultiLayerEnabledFlag() const { return m_multiLayerEnabledFlag; }
void setMultiLayerEnabledFlag(bool x) { m_multiLayerEnabledFlag = x; }