Commit 398cb89d authored by Yin Zhao's avatar Yin Zhao
Browse files

Merge branch 'master' into JVET-O0050

# Conflicts:
#	source/Lib/CommonLib/CodingStructure.cpp
#	source/Lib/CommonLib/Unit.cpp
#	source/Lib/DecoderLib/CABACReader.cpp
#	source/Lib/EncoderLib/CABACWriter.cpp
#	source/Lib/EncoderLib/EncCu.cpp
#	source/Lib/EncoderLib/EncModeCtrl.cpp
#	source/Lib/EncoderLib/InterSearch.cpp
#	source/Lib/EncoderLib/IntraSearch.cpp
parents c6f6cdc2 20c8d508
......@@ -75,8 +75,11 @@ CUTransquantBypassFlagForce: 0 # Force transquant bypass
#============ VTM settings ======================
LoopFilterTcOffset_div2 : 0
SEIDecodedPictureHash : 0
CbQpOffset : 1
CrQpOffset : 1
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 2 31 43
QpOutValCb : 2 32 41
TemporalSubsampleRatio : 8
ReWriteParamSets : 1
......@@ -114,7 +117,7 @@ LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 1 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1
JointCbCr : 1 # JointCbCr: 0: disable, 1: enable
# Fast tools
PBIntraFast : 1
ISPFast : 1
......
......@@ -92,9 +92,11 @@ RCForceIntraQP : 0 # Rate control: force int
#============ VTM settings ======================
LoopFilterTcOffset_div2 : 0
SEIDecodedPictureHash : 0
CbQpOffset : 1
CrQpOffset : 1
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 32 44
QpOutValCb : 32 41
ReWriteParamSets : 1
#============ NEXT ====================
......@@ -130,10 +132,12 @@ LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1
JointCbCr : 1 # JointCbCr: 0: disable, 1: enable
PROF : 1
# Fast tools
PBIntraFast : 1
ISPFast : 1
ISPFast : 0
FastMrg : 1
AMaxBT : 1
FastMIP : 0
......
......@@ -92,9 +92,11 @@ RCForceIntraQP : 0 # Rate control: force int
#============ VTM settings ======================
LoopFilterTcOffset_div2 : 0
SEIDecodedPictureHash : 0
CbQpOffset : 1
CrQpOffset : 1
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 32 44
QpOutValCb : 32 41
ReWriteParamSets : 1
#============ NEXT ====================
......@@ -134,10 +136,12 @@ LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 2 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
MIP : 1
JointCbCr : 1 # JointCbCr: 0: disable, 1: enable
PROF : 1
# Fast tools
PBIntraFast : 1
ISPFast : 1
ISPFast : 0
FastMrg : 1
AMaxBT : 1
FastMIP : 0
......
......@@ -106,9 +106,11 @@ RCForceIntraQP : 0 # Rate control: force int
#============ VTM settings ======================
LoopFilterTcOffset_div2 : 0
SEIDecodedPictureHash : 0
CbQpOffset : 1
CrQpOffset : 1
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 32 44
QpOutValCb : 32 41
ReWriteParamSets : 1
#============ NEXT ====================
......@@ -152,10 +154,12 @@ LMCSUpdateCtrl : 0 # LMCS model update control: 0:RA, 1:AI, 2
MIP : 1
DMVR : 1
SMVD : 1
JointCbCr : 1 # JointCbCr: 0: disable, 1: enable
PROF : 1
# Fast tools
PBIntraFast : 1
ISPFast : 1
ISPFast : 0
FastMrg : 1
AMaxBT : 1
FastMIP : 0
......
......@@ -12,3 +12,9 @@ WCGPPSChromaQpScale : -0.46 # Linear chroma QP offset mapping (s
WCGPPSChromaQpOffset : 9.26 # Linear chroma QP offset mapping (offset) based on QP
WCGPPSCbQpScale : 1.14 # Scale factor depending on capture and representation color space
WCGPPSCrQpScale : 1.79 # Scale factor depending on capture and representation color space
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 10 23 32 42
QpOutValCb : 10 24 32 37
......@@ -7,3 +7,9 @@ LMCSSignalType : 2 # Input signal type: 0:SDR, 1:HDR-PQ
#======== Chroma QP scale ============
WCGPPSEnable : 0 # enable WCG Chroma scale
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 10 23 32 42
QpOutValCb : 10 24 32 37
......@@ -1165,6 +1165,12 @@ Specifies the maximum number of merge candidates to use.
Specifies the maximum number of triangle merge candidates to use.
\\
\Option{MaxNumIBCMergeCand} &
%\ShortOption{\None} &
\Default{6} &
Specifies the maximum number of IBC merge candidates to use.
\\
\Option{DisableIntraInInter} &
%\ShortOption{\None} &
\Default{0} &
......@@ -1334,6 +1340,57 @@ $\lambda = \lambda_{base} \times max(2, min(4, (sliceQP-12)/6))$
In addition, independent on the IntraQPFactor, if HadamardME=false, then for an inter slice the final $\lambda$ is scaled by a factor of $0.95$.
\\
\Option{UseIdentityTableForNon420Chroma}
\Default{1}
Specifies whether identity chroma QP mapping tables are used for 4:2:2 and 4:4:4 content. When set to 1, the identity chroma QP mapping table is used for all the three chroma components for 4:2:2 or 4:4:4 content. When set to 0, chroma QP
mapping table may be specified by other parameters in the configuration.
\\
\Option{SameCQPTablesForAllChroma}
\Default{1)
Specifies that the Cb, Cr and joint Cb-Cr components all use the same
chroma mapping table. When set to 1, the values of QpInValCr,
QpOutValCr, QpInValCbCr and QpOutValCbCr are ignored. When set to 0, all
Cb, Cr and joint Cb-Cr components may have different chroma QP mapping tables specified in the configuration file. \\ Note that
SameCQPTablesForAllChroma is ignored when UseIdentityTableForNon420Chroma is set to 1 for 4:2:2 and 4:4:4 content.
\\
\Option{QpInValCb}%
\Option{QpOutValCb}&
\Default{\NotSet}
Specifies the input and coordinates of the pivot points used to specify the chroma QP mapping tables for the Cb component. Default values are as follows:
\begin{tabular}{cp{0.45\textwidth}}
QpInValCb: 25, 33, 43 \\
QpOutValCb: 25, 32, 37 \\
\end{tabular}
The values specify the pivot points for the chroma QP mapping table, the unspecified QP values are interpolated from the remaining values. E.g., the default values above specify that the pivot points for the chroma QP mapping table for the Cb component are (25, 25), (33, 32), (43, 37).
\\ Note that that QpInValCr and QpOutValCr are ignored when UseIdentityTableForNon420Chroma is set to 1 for 4:2:2 and 4:4:4 content.
\\
\Option{QpInValCr}%
\Option{QpOutValCr}&
\Default{\NotSet}
Specifies the input and coordinates of the pivot points used to specify the chroma QP mapping tables for the Cr component. Default values are as follows:
\begin{tabular}{cp{0.45\textwidth}}
QpInValCr: 0 \\
QpOutValCr: 0 \\
\end{tabular}
The default values specify a pivot point of (0,0) which corresponds to an identity chroma QP mapping table. \\ Note that that QpInValCr and QpOutValCr are ignored
when SameCQPTablesForAllChroma is set to 1 or when UseIdentityTableForNon420Chroma is set to 1 for 4:2:2 and 4:4:4 content.
\\
\Option{QpInValCbCr}%
\Option{QpOutValCbCr}&
\Default{\NotSet}
Specifies the input and coordinates of the pivot points used to specify the chroma QP mapping tables for the joint Cb-Cr component. Default values are as follows:
\begin{tabular}{cp{0.45\textwidth}}
QpInValrCr: 0 \\
QpOutValCbCr: 0 \\
\end{tabular}
The default values specify a pivot point of (0,0) which corresponds to a identity chroma QP mapping table. Note that that QpInValCbCr and QpOutVaCblCr are ignored
when SameCQPTablesForAllChroma is set to 1 or when UseIdentityTableForNon420Chroma is set to 1 for 4:2:2 and 4:4:4 content.
\\
\Option{CbQpOffset (-cbqpofs)}%
\Option{CrQpOffset (-crqpofs)} &
%\ShortOption{-cbqpofs}%
......@@ -1822,6 +1879,12 @@ Enables or disables reduced testing of non-DCT-II transforms if ISP is likely to
This option has no effect if either ISP or MTS are disabled.
\\
\Option{JointCbCr} &
%\ShortOption{\None} &
\Default{false} &
Enables or disables the joint coding of chroma residuals.
\\
\Option{SAO} &
%\ShortOption{\None} &
\Default{true} &
......
......@@ -136,6 +136,9 @@ void EncApp::xInitLibCfg()
#if JVET_O1136_TS_BDPCM_SIGNALLING
m_cEncLib.setNoBDPCMConstraintFlag ( !m_useBDPCM );
#endif
#if JVET_O0376_SPS_JOINTCBCR_FLAG
m_cEncLib.setNoJointCbCrConstraintFlag (!m_JointCbCrMode);
#endif
m_cEncLib.setNoQpDeltaConstraintFlag ( m_bNoQpDeltaConstraintFlag );
m_cEncLib.setNoDepQuantConstraintFlag ( !m_depQuantEnabledFlag);
m_cEncLib.setNoSignDataHidingConstraintFlag ( !m_signDataHidingEnabledFlag );
......@@ -167,6 +170,10 @@ void EncApp::xInitLibCfg()
#if X0038_LAMBDA_FROM_QP_CAPABILITY
m_cEncLib.setIntraQPOffset ( m_intraQPOffset );
m_cEncLib.setLambdaFromQPEnable ( m_lambdaFromQPEnable );
#endif
#if JVET_O0650_SIGNAL_CHROMAQP_MAPPING_TABLE
m_cEncLib.setChromaQpMappingTableParams (m_chromaQpMappingTableParams);
#endif
m_cEncLib.setPad ( m_aiPad );
......@@ -254,6 +261,9 @@ void EncApp::xInitLibCfg()
m_cEncLib.setSubPuMvpMode ( m_SubPuMvpMode );
m_cEncLib.setAffine ( m_Affine );
m_cEncLib.setAffineType ( m_AffineType );
#if JVET_O0070_PROF
m_cEncLib.setPROF ( m_PROF );
#endif
m_cEncLib.setBIO (m_BIO);
m_cEncLib.setUseLMChroma ( m_LMChroma );
m_cEncLib.setCclmCollocatedChromaFlag ( m_cclmCollocatedChromaFlag );
......@@ -289,7 +299,13 @@ void EncApp::xInitLibCfg()
m_cEncLib.setDMVR ( m_DMVR );
m_cEncLib.setMMVD ( m_MMVD );
m_cEncLib.setMmvdDisNum (m_MmvdDisNum);
m_cEncLib.setRDPCM ( m_RdpcmMode );
m_cEncLib.setRDPCM ( m_RdpcmMode );
#if JVET_O0119_BASE_PALETTE_444
m_cEncLib.setPLTMode ( m_PLTMode);
#endif
#if JVET_O0376_SPS_JOINTCBCR_FLAG
m_cEncLib.setJointCbCr ( m_JointCbCrMode );
#endif
m_cEncLib.setIBCMode ( m_IBCMode );
m_cEncLib.setIBCLocalSearchRangeX ( m_IBCLocalSearchRangeX );
m_cEncLib.setIBCLocalSearchRangeY ( m_IBCLocalSearchRangeY );
......@@ -383,6 +399,9 @@ void EncApp::xInitLibCfg()
m_cEncLib.setMaxNumMergeCand ( m_maxNumMergeCand );
m_cEncLib.setMaxNumAffineMergeCand ( m_maxNumAffineMergeCand );
m_cEncLib.setMaxNumTriangleCand ( m_maxNumTriangleCand );
#if JVET_O0455_IBC_MAX_MERGE_NUM
m_cEncLib.setMaxNumIBCMergeCand ( m_maxNumIBCMergeCand );
#endif
//====== Weighted Prediction ========
m_cEncLib.setUseWP ( m_useWeightedPred );
......
This diff is collapsed.
......@@ -145,6 +145,9 @@ protected:
bool m_noTransformSkipConstraintFlag;
#if JVET_O1136_TS_BDPCM_SIGNALLING
bool m_noBDPCMConstraintFlag;
#endif
#if JVET_O0376_SPS_JOINTCBCR_FLAG
bool m_noJointCbCrConstraintFlag;
#endif
bool m_bNoQpDeltaConstraintFlag;
bool m_bNoDepQuantConstraintFlag;
......@@ -202,6 +205,10 @@ protected:
double m_fQP; ///< QP value of key-picture (floating point)
#endif
int m_iQP; ///< QP value of key-picture (integer)
#if JVET_O0650_SIGNAL_CHROMAQP_MAPPING_TABLE
bool m_useIdentityTableForNon420Chroma;
ChromaQpMappingTableParams m_chromaQpMappingTableParams;
#endif
#if X0038_LAMBDA_FROM_QP_CAPABILITY
int m_intraQPOffset; ///< QP offset for intra slice (integer)
bool m_lambdaFromQPEnable; ///< enable flag for QP:lambda fix
......@@ -253,6 +260,9 @@ protected:
int m_SubPuMvpMode;
bool m_Affine;
bool m_AffineType;
#if JVET_O0070_PROF
bool m_PROF;
#endif
bool m_BIO;
int m_LMChroma;
bool m_cclmCollocatedChromaFlag;
......@@ -283,6 +293,12 @@ protected:
bool m_MMVD;
int m_MmvdDisNum;
bool m_RdpcmMode;
#if JVET_O0119_BASE_PALETTE_444
unsigned m_PLTMode;
#endif
#if JVET_O0376_SPS_JOINTCBCR_FLAG
bool m_JointCbCrMode;
#endif
unsigned m_IBCMode;
unsigned m_IBCLocalSearchRangeX;
unsigned m_IBCLocalSearchRangeY;
......@@ -515,6 +531,9 @@ protected:
uint32_t m_maxNumMergeCand; ///< Max number of merge candidates
uint32_t m_maxNumAffineMergeCand; ///< Max number of affine merge candidates
uint32_t m_maxNumTriangleCand;
#if JVET_O0455_IBC_MAX_MERGE_NUM
uint32_t m_maxNumIBCMergeCand; ///< Max number of IBC merge candidates
#endif
int m_TMVPModeId;
bool m_depQuantEnabledFlag;
......
......@@ -115,7 +115,7 @@ protected:
static const int m_classToFilterMapping[NUM_FIXED_FILTER_SETS][MAX_NUM_ALF_CLASSES];
static const int m_fixedFilterSetCoeff[ALF_FIXED_FILTER_NUM][MAX_NUM_ALF_LUMA_COEFF];
short m_fixedFilterSetCoeffDec[NUM_FIXED_FILTER_SETS][MAX_NUM_ALF_CLASSES * MAX_NUM_ALF_LUMA_COEFF];
#if JVET_O0090_ALF_CHROMA_FILTER_ALTERNATIVES_CTB
#if JVET_O0090_ALF_CHROMA_FILTER_ALTERNATIVES_CTB || JVET_O_MAX_NUM_ALF_APS_8
short m_coeffApsLuma[ALF_CTB_MAX_NUM_APS][MAX_NUM_ALF_LUMA_COEFF * MAX_NUM_ALF_CLASSES];
short m_clippApsLuma[ALF_CTB_MAX_NUM_APS][MAX_NUM_ALF_LUMA_COEFF * MAX_NUM_ALF_CLASSES];
#else
......
......@@ -42,6 +42,83 @@
#include "Buffer.h"
#include "InterpolationFilter.h"
#if JVET_O0070_PROF
void applyPROFCore(Pel* dst, int dstStride, const Pel* src, int srcStride, int width, int height, const Pel* gradX, const Pel* gradY, int gradStride, const int* dMvX, const int* dMvY, int dMvStride, int shiftNum, Pel offset, const ClpRng& clpRng)
{
int idx = 0;
const int dIshift = 1;
const int dIoffset = 1 << (dIshift - 1);
for (int h = 0; h < height; h++)
{
for (int w = 0; w < width; w++)
{
int32_t dI = dMvX[idx] * gradX[w] + dMvY[idx] * gradY[w];
dI = (dI + dIoffset) >> dIshift;
dI = (src[w] + dI + offset) >> shiftNum;
dst[w] = (Pel)ClipPel(dI, clpRng);
idx++;
}
gradX += gradStride;
gradY += gradStride;
dst += dstStride;
src += srcStride;
}
}
template<bool l1PROFEnabled = true>
void applyBiPROFCore (Pel* dst, int dstStride, const Pel* src0, const Pel* src1, int srcStride, int width, int height, const Pel* gradX0, const Pel* gradY0, const Pel* gradX1, const Pel* gradY1, int gradStride, const int* dMvX0, const int* dMvY0, const int* dMvX1, const int* dMvY1, int dMvStride, const int8_t w0, const ClpRng& clpRng)
{
int idx = 16;
int32_t dI0 = 0;
int32_t dI1 = 0;
const int dIshift = 1;
const int dIoffset = 1 << (dIshift - 1);
const int clipbd = clpRng.bd;
const int shiftNum = std::max<int>(2, (IF_INTERNAL_PREC - clipbd)) + g_GbiLog2WeightBase;
const int offset = (1 << (shiftNum - 1)) + (IF_INTERNAL_OFFS << g_GbiLog2WeightBase);
const int8_t w1 = g_GbiWeightBase - w0;
for (int h = 0; h < height; h++)
{
if (!(h & 3)) idx -= 16;
idx += 4;
for (int w = 0; w < width; w++)
{
if (!(w & 3)) idx -= 4;
dI0 = dMvX0[idx] * gradX0[w] + dMvY0[idx] * gradY0[w];
dI0 = (dI0 + dIoffset) >> dIshift;
if (l1PROFEnabled)
{
dI1 = dMvX1[idx] * gradX1[w] + dMvY1[idx] * gradY1[w];
dI1 = (dI1 + dIoffset) >> dIshift;
dst[w] = (Pel)ClipPel(rightShift(((src0[w] + dI0) * w0 + (src1[w] + dI1) * w1 + offset), shiftNum), clpRng);
}
else
dst[w] = (Pel)ClipPel(rightShift(((src0[w] + dI0) * w0 + src1[w] * w1 + offset), shiftNum), clpRng);
idx++;
}
gradX0 += gradStride;
gradY0 += gradStride;
if (l1PROFEnabled)
{
gradX1 += gradStride;
gradY1 += gradStride;
}
dst += dstStride;
src0 += srcStride;
src1 += srcStride;
}
}
#endif
template< typename T >
void addAvgCore( const T* src1, int src1Stride, const T* src2, int src2Stride, T* dest, int dstStride, int width, int height, int rshift, int offset, const ClpRng& clpRng )
{
......@@ -86,6 +163,9 @@ void addBIOAvgCore(const Pel* src0, int src0Stride, const Pel* src1, int src1Str
}
}
#if JVET_O0070_PROF
template<bool PAD = true>
#endif
void gradFilterCore(Pel* pSrc, int srcStride, int width, int height, int gradStride, Pel* gradX, Pel* gradY, const int bitDepth)
{
Pel* srcTmp = pSrc + srcStride + 1;
......@@ -97,14 +177,23 @@ void gradFilterCore(Pel* pSrc, int srcStride, int width, int height, int gradStr
{
for (int x = 0; x < (width - 2 * BIO_EXTEND_SIZE); x++)
{
#if JVET_O0570_GRAD_SIMP
gradYTmp[x] = ( srcTmp[x + srcStride] >> shift1 ) - ( srcTmp[x - srcStride] >> shift1 );
gradXTmp[x] = ( srcTmp[x + 1] >> shift1 ) - ( srcTmp[x - 1] >> shift1 );
#else
gradYTmp[x] = (srcTmp[x + srcStride] - srcTmp[x - srcStride]) >> shift1;
gradXTmp[x] = (srcTmp[x + 1] - srcTmp[x - 1]) >> shift1;
#endif
}
gradXTmp += gradStride;
gradYTmp += gradStride;
srcTmp += srcStride;
}
#if JVET_O0070_PROF
if (PAD)
{
#endif
gradXTmp = gradX + gradStride + 1;
gradYTmp = gradY + gradStride + 1;
for (int y = 0; y < (height - 2 * BIO_EXTEND_SIZE); y++)
......@@ -124,8 +213,41 @@ void gradFilterCore(Pel* pSrc, int srcStride, int width, int height, int gradStr
::memcpy(gradXTmp + (height - 2 * BIO_EXTEND_SIZE)*gradStride, gradXTmp + (height - 2 * BIO_EXTEND_SIZE - 1)*gradStride, sizeof(Pel)*(width));
::memcpy(gradYTmp - gradStride, gradYTmp, sizeof(Pel)*(width));
::memcpy(gradYTmp + (height - 2 * BIO_EXTEND_SIZE)*gradStride, gradYTmp + (height - 2 * BIO_EXTEND_SIZE - 1)*gradStride, sizeof(Pel)*(width));
#if JVET_O0070_PROF
}
#endif
}
#if JVET_O0304_SIMPLIFIED_BDOF
void calcBIOSumsCore(const Pel* srcY0Tmp, const Pel* srcY1Tmp, Pel* gradX0, Pel* gradX1, Pel* gradY0, Pel* gradY1, int xu, int yu, const int src0Stride, const int src1Stride, const int widthG, const int bitDepth, int* sumAbsGX, int* sumAbsGY, int* sumDIX, int* sumDIY, int* sumSignGY_GX)
{
int shift4 = std::max<int>(4, (bitDepth - 8));
int shift5 = std::max<int>(1, (bitDepth - 11));
for (int y = 0; y < 6; y++)
{
for (int x = 0; x < 6; x++)
{
int tmpGX = (gradX0[x] + gradX1[x]) >> shift5;
int tmpGY = (gradY0[x] + gradY1[x]) >> shift5;
int tmpDI = (int)((srcY1Tmp[x] >> shift4) - (srcY0Tmp[x] >> shift4));
*sumAbsGX += (tmpGX < 0 ? -tmpGX : tmpGX);
*sumAbsGY += (tmpGY < 0 ? -tmpGY : tmpGY);
*sumDIX += (tmpGX < 0 ? -tmpDI : (tmpGX == 0 ? 0 : tmpDI));
*sumDIY += (tmpGY < 0 ? -tmpDI : (tmpGY == 0 ? 0 : tmpDI));
*sumSignGY_GX += (tmpGY < 0 ? -tmpGX : (tmpGY == 0 ? 0 : tmpGX));
}
srcY1Tmp += src1Stride;
srcY0Tmp += src0Stride;
gradX0 += widthG;
gradX1 += widthG;
gradY0 += widthG;
gradY1 += widthG;
}
}
#endif
void calcBIOParCore(const Pel* srcY0Temp, const Pel* srcY1Temp, const Pel* gradX0, const Pel* gradX1, const Pel* gradY0, const Pel* gradY1, int* dotProductTemp1, int* dotProductTemp2, int* dotProductTemp3, int* dotProductTemp5, int* dotProductTemp6, const int src0Stride, const int src1Stride, const int gradStride, const int widthG, const int heightG, const int bitDepth)
{
int shift4 = std::max<int>(4, (bitDepth - 8));
......@@ -268,8 +390,12 @@ PelBufferOps::PelBufferOps()
addBIOAvg4 = addBIOAvgCore;
bioGradFilter = gradFilterCore;
calcBIOPar = calcBIOParCore;
#if !JVET_O0304_SIMPLIFIED_BDOF
calcBIOPar = calcBIOParCore;
calcBlkGradient = calcBlkGradientCore;
#else
calcBIOSums = calcBIOSumsCore;
#endif
copyBuffer = copyBufferCore;
padding = paddingCore;
......@@ -280,6 +406,13 @@ PelBufferOps::PelBufferOps()
removeHighFreq4 = removeHighFreq;
#endif
#if JVET_O0070_PROF
profGradFilter = gradFilterCore <false>;
applyPROF = applyPROFCore;
applyBiPROF[1] = applyBiPROFCore;
applyBiPROF[0] = applyBiPROFCore <false>;
roundIntVector = nullptr;
#endif
}
PelBufferOps g_pelBufOP = PelBufferOps();
......
......@@ -70,6 +70,9 @@ struct PelBufferOps
void(*addBIOAvg4) (const Pel* src0, int src0Stride, const Pel* src1, int src1Stride, Pel *dst, int dstStride, const Pel *gradX0, const Pel *gradX1, const Pel *gradY0, const Pel*gradY1, int gradStride, int width, int height, int tmpx, int tmpy, int shift, int offset, const ClpRng& clpRng);
void(*bioGradFilter) (Pel* pSrc, int srcStride, int width, int height, int gradStride, Pel* gradX, Pel* gradY, const int bitDepth);
void(*calcBIOPar) (const Pel* srcY0Temp, const Pel* srcY1Temp, const Pel* gradX0, const Pel* gradX1, const Pel* gradY0, const Pel* gradY1, int* dotProductTemp1, int* dotProductTemp2, int* dotProductTemp3, int* dotProductTemp5, int* dotProductTemp6, const int src0Stride, const int src1Stride, const int gradStride, const int widthG, const int heightG, const int bitDepth);
#if JVET_O0304_SIMPLIFIED_BDOF
void(*calcBIOSums) (const Pel* srcY0Tmp, const Pel* srcY1Tmp, Pel* gradX0, Pel* gradX1, Pel* gradY0, Pel* gradY1, int xu, int yu, const int src0Stride, const int src1Stride, const int widthG, const int bitDepth, int* sumAbsGX, int* sumAbsGY, int* sumDIX, int* sumDIY, int* sumSignGY_GX);
#endif
void(*calcBlkGradient)(int sx, int sy, int *arraysGx2, int *arraysGxGy, int *arraysGxdI, int *arraysGy2, int *arraysGydI, int &sGx2, int &sGy2, int &sGxGy, int &sGxdI, int &sGydI, int width, int height, int unitSize);
void(*copyBuffer)(Pel *src, int srcStride, Pel *dst, int dstStride, int width, int height);
void(*padding)(Pel *dst, int stride, int width, int height, int padSize);
......@@ -79,6 +82,12 @@ struct PelBufferOps
void ( *removeHighFreq8) ( Pel* src0, int src0Stride, const Pel* src1, int src1Stride, int width, int height);
void ( *removeHighFreq4) ( Pel* src0, int src0Stride, const Pel* src1, int src1Stride, int width, int height);
#endif
#if JVET_O0070_PROF
void (*profGradFilter) (Pel* pSrc, int srcStride, int width, int height, int gradStride, Pel* gradX, Pel* gradY, const int bitDepth);
void (*applyPROF) (Pel* dst, int dstStride, const Pel* src, int srcStride, int width, int height, const Pel* gradX, const Pel* gradY, int gradStride, const int* dMvX, const int* dMvY, int dMvStride, int shiftNum, Pel offset, const ClpRng& clpRng);
void (*applyBiPROF[2]) (Pel* dst, int dstStride, const Pel* src0, const Pel* src1, int srcStride, int width, int height, const Pel* gradX0, const Pel* gradY0, const Pel* gradX1, const Pel* gradY1, int gradStride, const int* dMvX0, const int* dMvY0, const int* dMvX1, const int* dMvY1, int dMvStride, const int8_t gbiWeightL0, const ClpRng& clpRng);
void (*roundIntVector) (int* v, int size, unsigned int nShift, const int dmvLimit);
#endif
};
extern PelBufferOps g_pelBufOP;
......@@ -164,6 +173,13 @@ typedef AreaBuf<const TCoeff> CCoeffBuf;
typedef AreaBuf< MotionInfo> MotionBuf;
typedef AreaBuf<const MotionInfo> CMotionBuf;
#if JVET_O0119_BASE_PALETTE_444
typedef AreaBuf< TCoeff> PLTescapeBuf;
typedef AreaBuf<const TCoeff> CPLTescapeBuf;
typedef AreaBuf< bool> PLTtypeBuf;
typedef AreaBuf<const bool> CPLTtypeBuf;
#endif
#define SIZE_AWARE_PER_EL_OP( OP, INC ) \
if( ( width & 7 ) == 0 ) \
......
......@@ -115,12 +115,12 @@ static inline int getTransformShift(const int channelBitDepth, const Size size,
//------------------------------------------------
#if !JVET_O0650_SIGNAL_CHROMAQP_MAPPING_TABLE
static inline int getScaledChromaQP(int unscaledChromaQP, const ChromaFormat chFmt)
{
return g_aucChromaScale[chFmt][Clip3(0, (chromaQPMappingTableSize - 1), unscaledChromaQP)];
}
#endif
//======================================================================================================================
//Scaling lists =======================================================================================================
......
......@@ -67,11 +67,21 @@ CodingStructure::CodingStructure(CUCache& cuCache, PUCache& puCache, TUCache& tu
, m_cuCache ( cuCache )
, m_puCache ( puCache )
, m_tuCache ( tuCache )
#if JVET_O0070_PROF
, bestParent ( nullptr )
#endif
#if JVET_O1170_CHECK_BV_AT_DECODER
, resetIBCBuffer (false)
#endif
{
for( uint32_t i = 0; i < MAX_NUM_COMPONENT; i++ )
{
m_coeffs[ i ] = nullptr;
m_pcmbuf[ i ] = nullptr;
#if JVET_O0119_BASE_PALETTE_444
m_runType[i] = nullptr;
m_runLength[i] = nullptr;
#endif
m_offsets[ i ] = 0;
}
......@@ -609,6 +619,10 @@ TransformUnit& CodingStructure::addTU( const UnitArea &unit, const ChannelType c
TCoeff *coeffs[5] = { nullptr, nullptr, nullptr, nullptr, nullptr };
Pel *pcmbuf[5] = { nullptr, nullptr, nullptr, nullptr, nullptr };
#if JVET_O0119_BASE_PALETTE_444
bool *runType[5] = { nullptr, nullptr, nullptr, nullptr, nullptr };
Pel *runLength[5] = { nullptr, nullptr, nullptr, nullptr, nullptr };