Commit abd1d7eb authored by Frederic Barbier's avatar Frederic Barbier

[Cosmetics] Cleanup trailing spaces

parent f79cf313
......@@ -7,8 +7,8 @@
*
* \section Introduction
*
* This is the doxygen generated documentation of the HEVC HM reference software.
*
* This is the doxygen generated documentation of the HEVC HM reference software.
*
* For detailed information see the sub-pages of this site.
*
* For information on the <b>subversion repositories</b> and the <b>software manual</b> see
......@@ -22,7 +22,7 @@
* 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.
* granted under this license.
*
* Copyright (c) 2010-2019, ITU/ISO/IEC
* All rights reserved.
......
......@@ -260,7 +260,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setLadfIntervalLowerBound(m_LadfIntervalLowerBound[k], k);
}
}
#endif
#endif
m_cEncLib.setUseMHIntra ( m_MHIntra );
m_cEncLib.setUseTriangle ( m_Triangle );
#if JVET_M0253_HASH_ME
......@@ -574,7 +574,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setReshapeSignalType ( m_reshapeSignalType );
m_cEncLib.setReshapeIntraCMD ( m_intraCMD );
m_cEncLib.setReshapeCW ( m_reshapeCW );
#endif
#endif
}
void EncApp::xCreateLib( std::list<PelUnitBuf*>& recBufList
......
......@@ -1338,13 +1338,13 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
po::ErrorReporter err;
const list<const char*>& argv_unhandled = po::scanArgv(opts, argc, (const char**) argv, err);
if (m_compositeRefEnabled)
if (m_compositeRefEnabled)
{
for (int i = 0; i < m_iGOPSize; i++)
for (int i = 0; i < m_iGOPSize; i++)
{
m_GOPList[i].m_POC *= 2;
m_GOPList[i].m_deltaRPS *= 2;
for (int j = 0; j < m_GOPList[i].m_numRefPics; j++)
for (int j = 0; j < m_GOPList[i].m_numRefPics; j++)
{
m_GOPList[i].m_referencePics[j] *= 2;
}
......@@ -1973,7 +1973,7 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara(m_IBCMode, "IBC Mode only allowed with NEXT profile");
#if JVET_M0253_HASH_ME
xConfirmPara( m_HashME, "Hash motion estimation only allowed with NEXT profile" );
#endif
#endif
xConfirmPara( m_useFastLCTU, "Fast large CTU can only be applied when encoding with NEXT profile" );
#if JVET_M0464_UNI_MTS
xConfirmPara( m_MTS, "MTS only allowed with NEXT profile" );
......@@ -2053,8 +2053,8 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_useAMaxBT && !m_SplitConsOverrideEnabledFlag, "AMaxBt can only be used with PartitionConstriantsOverride enabled" );
xConfirmPara(m_bitstreamFileName.empty(), "A bitstream file name must be specified (BitstreamFile)");
const uint32_t maxBitDepth=(m_chromaFormatIDC==CHROMA_400) ? m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA]);
xConfirmPara(m_bitDepthConstraint<maxBitDepth, "The internalBitDepth must not be greater than the bitDepthConstraint value");
......
......@@ -314,11 +314,11 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int
int byte_offset2 = offset / 8;
int hi_bits2 = offset % 8;
uint16_t data2 = (nalu[byte_offset2] << 8) | nalu[byte_offset2 + 1];
int low_bits2 = 16 - hi_bits2 - 1;
int low_bits2 = 16 - hi_bits2 - 1;
if(((data2 >> low_bits2) % 2))
offset += 1; // PPSId=0
offset += 1; // PPSId=0
else
offset += 3; // PPSId=1
offset += 3; // PPSId=1
offset += 1; // slice_type TODO: ue(v)
// separate_colour_plane_flag is not supported in JEM1.0
if (nalu_type == CRA)
......
......@@ -393,7 +393,7 @@ void AreaBuf<Pel>::rspSignal(std::vector<Pel>& pLUT)
if (width == 1)
{
THROW("Blocks of width = 1 not supported");
}
}
else
{
#endif
......@@ -470,7 +470,7 @@ Pel AreaBuf <Pel> ::computeAvg() const
#endif
int32_t acc = 0;
#define AVG_INC \
src += stride;
src += stride;
#define AVG_OP(ADDR) acc += src[ADDR]
SIZE_AWARE_PER_EL_OP(AVG_OP, AVG_INC);
#undef AVG_INC
......
......@@ -831,7 +831,7 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
if( cpyResi ) picture->getResiBuf( clippedArea ).copyFrom( subResiBuf );
if( cpyReco ) picture->getRecoBuf( clippedArea ).copyFrom( subRecoBuf );
#if JVET_M0483_IBC
#if JVET_M0483_IBC
if (!subStruct.m_isTuEnc && ((!slice->isIntra() || slice->getSPS()->getIBCFlag()) && subStruct.chType != CHANNEL_TYPE_CHROMA))
#else
if (!subStruct.m_isTuEnc && (!slice->isIntra() && subStruct.chType != CHANNEL_TYPE_CHROMA))
......@@ -1015,7 +1015,7 @@ void CodingStructure::copyStructure( const CodingStructure& other, const Channel
pu = *ppu;
}
#if JVET_M0483_IBC
#if JVET_M0483_IBC
if (!other.slice->isIntra() || other.slice->getSPS()->getIBCFlag())
#else
if( !other.slice->isIntra() )
......@@ -1126,7 +1126,7 @@ void CodingStructure::clearTUs()
memset( m_tuIdx [i], 0, sizeof( *m_tuIdx [0] ) * _area );
}
numCh = getNumberValidComponents( area.chromaFormat );
numCh = getNumberValidComponents( area.chromaFormat );
for( int i = 0; i < numCh; i++ )
{
m_offsets[i] = 0;
......
......@@ -409,7 +409,7 @@ static const int TRIANGLE_MIN_SIZE = 8 * 8;
#if JVET_M0140_SBT
static const int SBT_MAX_SIZE = 64; ///< maximum CU size for using SBT
static const int SBT_NUM_SL = 10; ///< maximum number of historical PU decision saved for a CU
static const int SBT_NUM_RDO = 2; ///< maximum number of SBT mode tried for a PU
static const int SBT_NUM_RDO = 2; ///< maximum number of SBT mode tried for a PU
#endif
static const int IBC_MAX_CAND_SIZE = 16; // max block size for ibc search
......
......@@ -350,7 +350,7 @@ std::vector<std::vector<uint8_t>> ContextSetCfg::sm_InitTables( NUMBER_OF_SLICE_
const CtxSet ContextSetCfg::SplitFlag = ContextSetCfg::addCtxSet
({
#if JVET_M0421_SPLIT_SIG
// |-------- do split ctx -------------------|
// |-------- do split ctx -------------------|
{ 93, 124, 141, 123, 125, 141, 139, 126, 157, },
{ 108, 139, 156, 138, 140, 141, 139, 141, 143, },
{ 153, 154, 172, 153, 140, 156, 154, 127, 159, },
......
......@@ -193,7 +193,7 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC )
m_triangleBuf.create(UnitArea(chromaFormatIDC, Area(0, 0, MAX_CU_SIZE, MAX_CU_SIZE)));
m_iRefListIdx = -1;
m_gradX0 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE);
m_gradY0 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE);
m_gradX1 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE);
......@@ -204,7 +204,7 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC )
m_cYuvPredTempDMVRL0 = (Pel*)xMalloc(Pel, (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION)) * (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION)));
m_cYuvPredTempDMVRL1 = (Pel*)xMalloc(Pel, (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION)) * (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION)));
for (uint32_t ch = 0; ch < MAX_NUM_COMPONENT; ch++)
{
{
m_cRefSamplesDMVRL0[ch] = (Pel*)xMalloc(Pel, (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION) + NTAPS_LUMA) * (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION) + NTAPS_LUMA));
m_cRefSamplesDMVRL1[ch] = (Pel*)xMalloc(Pel, (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION) + NTAPS_LUMA) * (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION) + NTAPS_LUMA));
}
......@@ -404,8 +404,8 @@ void InterPrediction::xChromaMC(PredictionUnit &pu, PelUnitBuf& pcYuvPred)
}
void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi
, const bool& bioApplied
void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi
, const bool& bioApplied
, const bool luma, const bool chroma
)
{
......@@ -473,7 +473,7 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
, isIBC
);
}
#else
#else
xPredInterBlk( compID, pu, pu.cu->slice->getRefPic( eRefPicList, iRefIdx ), mv[0], pcYuvPred, bi, pu.cu->slice->clpRng( compID )
, bioApplied
, isIBC
......@@ -567,14 +567,14 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
{
if( ( (pps.getUseWP() && slice.getSliceType() == P_SLICE) || (pps.getWPBiPred() && slice.getSliceType() == B_SLICE) ) )
{
xPredInterUni ( pu, eRefPicList, pcMbBuf, true
xPredInterUni ( pu, eRefPicList, pcMbBuf, true
, bioApplied
, true, true
);
}
else
{
xPredInterUni( pu, eRefPicList, pcMbBuf, pu.cu->triangle
xPredInterUni( pu, eRefPicList, pcMbBuf, pu.cu->triangle
, bioApplied
, true, true
);
......@@ -786,7 +786,7 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio
bioSampleExtendBilinearFilter(refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, width - 2, height - 2, 1, xFrac, yFrac, rndRes, chFmt, clpRng);
#endif
// restore data
// restore data
width = backupWidth;
height = backupHeight;
dstBuf.buf = backupDstBufPtr;
......@@ -937,7 +937,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)] +
m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)] +
Mv(2, 2));
curMv.set(curMv.getHor() >> 2, curMv.getVer() >> 2);
curMv.set(curMv.getHor() >> 2, curMv.getVer() >> 2);
#endif
#endif
if (sps.getWrapAroundEnabledFlag())
......@@ -1329,7 +1329,7 @@ void InterPrediction::xWeightedAverage(const PredictionUnit& pu, const CPelUnitB
}
}
void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBuf, const RefPicList &eRefPicList
void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBuf, const RefPicList &eRefPicList
, const bool luma, const bool chroma
)
{
......@@ -1358,7 +1358,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
{
if( ( ( sliceType == P_SLICE && pps.getUseWP() ) || ( sliceType == B_SLICE && pps.getWPBiPred() ) ) )
{
xPredInterUni ( pu, eRefPicList, predBuf, true
xPredInterUni ( pu, eRefPicList, predBuf, true
, false
, true, true
);
......@@ -1366,7 +1366,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
}
else
{
xPredInterUni( pu, eRefPicList, predBuf, false
xPredInterUni( pu, eRefPicList, predBuf, false
, false
, true, true
);
......@@ -1380,7 +1380,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
}
else if( xCheckIdenticalMotion( pu ) )
{
xPredInterUni( pu, REF_PIC_LIST_0, predBuf, false
xPredInterUni( pu, REF_PIC_LIST_0, predBuf, false
, false
, true, true
);
......@@ -1393,7 +1393,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
return;
}
void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRefPicList
void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRefPicList
, const bool luma, const bool chroma
)
{
......@@ -1403,7 +1403,7 @@ void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRef
#if JVET_M0147_DMVR
pu.mvRefine = true;
#endif
motionCompensation( pu, predBuf, eRefPicList
motionCompensation( pu, predBuf, eRefPicList
, luma, chroma
);
#if JVET_M0147_DMVR
......@@ -1412,12 +1412,12 @@ void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRef
}
}
void InterPrediction::motionCompensation( PredictionUnit &pu, const RefPicList &eRefPicList /*= REF_PIC_LIST_X*/
void InterPrediction::motionCompensation( PredictionUnit &pu, const RefPicList &eRefPicList /*= REF_PIC_LIST_X*/
, const bool luma, const bool chroma
)
{
PelUnitBuf predBuf = pu.cs->getPredBuf( pu );
motionCompensation( pu, predBuf, eRefPicList
motionCompensation( pu, predBuf, eRefPicList
, luma, chroma
);
}
......@@ -1447,11 +1447,11 @@ void InterPrediction::motionCompensation4Triangle( CodingUnit &cu, MergeCtx &tri
const UnitArea localUnitArea( cu.cs->area.chromaFormat, Area( 0, 0, pu.lwidth(), pu.lheight() ) );
PelUnitBuf tmpTriangleBuf = m_triangleBuf.getBuf( localUnitArea );
PelUnitBuf predBuf = cu.cs->getPredBuf( pu );
triangleMrgCtx.setMergeInfo( pu, candIdx0 );
PU::spanMotionInfo( pu );
motionCompensation( pu, tmpTriangleBuf );
triangleMrgCtx.setMergeInfo( pu, candIdx1 );
PU::spanMotionInfo( pu );
motionCompensation( pu, predBuf );
......@@ -1525,7 +1525,7 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint
const int32_t offsetDefault = (1<<(shiftDefault-1)) + IF_INTERNAL_OFFS;
const int32_t shiftWeighted = std::max<int>(2, (IF_INTERNAL_PREC - clipbd)) + log2WeightBase;
const int32_t offsetWeighted = (1 << (shiftWeighted - 1)) + (IF_INTERNAL_OFFS << log2WeightBase);
const int32_t ratioWH = (width > height) ? (width / height) : 1;
const int32_t ratioHW = (width > height) ? 1 : (height / width);
#if JVET_M0328_KEEP_ONE_WEIGHT_GROUP
......@@ -1538,7 +1538,7 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint
int32_t weightedStartPos = ( splitDir == 0 ) ? ( 0 - (weightedLength >> 1) * ratioWH ) : ( width - ((weightedLength + 1) >> 1) * ratioWH );
int32_t weightedEndPos = weightedStartPos + weightedLength * ratioWH - 1;
int32_t weightedPosoffset =( splitDir == 0 ) ? ratioWH : -ratioWH;
#if JVET_M0328_KEEP_ONE_WEIGHT_GROUP
Pel tmpPelWeighted;
int32_t weightIdx;
......@@ -1546,7 +1546,7 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint
const Pel* tmpPelWeighted;
#endif
int32_t x, y, tmpX, tmpY, tmpWeightedStart, tmpWeightedEnd;
for( y = 0; y < height; y+= ratioHW )
{
for( tmpY = ratioHW; tmpY > 0; tmpY-- )
......@@ -1901,15 +1901,15 @@ void InterPrediction::xinitMC(PredictionUnit& pu, const ClpRngs &clpRngs)
}
void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, const ClpRngs &clpRngs, const bool bioApplied)
{
{
int iterationCount = DMVR_NUM_ITERATION;
/*Always High Precision*/
int mvShift = MV_FRACTIONAL_BITS_INTERNAL;
/*use merge MV as starting MV*/
Mv mergeMv[] = { pu.mv[REF_PIC_LIST_0] , pu.mv[REF_PIC_LIST_1] };
m_biLinearBufStride = (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION));
m_biLinearBufStride = (MAX_CU_SIZE + (2 * DMVR_NUM_ITERATION));
int dy = std::min<int>(pu.lumaSize().height, DMVR_SUBCU_HEIGHT);
int dx = std::min<int>(pu.lumaSize().width, DMVR_SUBCU_WIDTH);
......@@ -1936,9 +1936,9 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
Pel *biLinearPredL1 = m_cYuvPredTempDMVRL1 + (iterationCount * m_biLinearBufStride) + iterationCount;
Position puPos = pu.lumaPos();
int bd = pu.cs->slice->getClpRngs().comp[COMPONENT_Y].bd;
{
int num = 0;
......@@ -1946,7 +1946,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
for (int y = puPos.y; y < (puPos.y + pu.lumaSize().height); y = y + dy, yStart = yStart + dy)
{
for (int x = puPos.x, xStart = 0; x < (puPos.x + pu.lumaSize().width); x = x + dx, xStart = xStart + dx)
{
{
uint64_t minCost = MAX_UINT64;
bool notZeroCost = true;
int16_t totalDeltaMV[2] = { 0,0 };
......@@ -1996,7 +1996,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
totalDeltaMV[0] = (totalDeltaMV[0] << mvShift);
totalDeltaMV[1] = (totalDeltaMV[1] << mvShift);
xDMVRSubPixelErrorSurface(notZeroCost, totalDeltaMV, deltaMV, pSADsArray);
pu.mvdL0SubPu[num] = Mv(totalDeltaMV[0], totalDeltaMV[1]);
num++;
......@@ -2022,7 +2022,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
int x = 0, y = 0;
int xStart = 0, yStart = 0;
int num = 0;
int num = 0;
int dstStride[MAX_NUM_COMPONENT] = { pcYuvDst.bufs[COMPONENT_Y].stride, pcYuvDst.bufs[COMPONENT_Cb].stride, pcYuvDst.bufs[COMPONENT_Cr].stride };
for (y = puPos.y; y < (puPos.y + pu.lumaSize().height); y = y + dy, yStart = yStart + dy)
......
......@@ -95,7 +95,7 @@ protected:
PelStorage m_triangleBuf;
Mv* m_storedMv;
#if JVET_M0147_DMVR
/*buffers for bilinear Filter data for DMVR refinement*/
/*buffers for bilinear Filter data for DMVR refinement*/
Pel* m_cYuvPredTempDMVRL0;
Pel* m_cYuvPredTempDMVRL1;
int m_biLinearBufStride;
......@@ -121,7 +121,7 @@ protected:
Mv m_pSearchOffset[5] = { Mv(0, 1), Mv(0, -1), Mv(1, 0), Mv(-1, 0), Mv(0, 0) };
uint64_t m_SADsArray[((2 * DMVR_NUM_ITERATION) + 1) * ((2 * DMVR_NUM_ITERATION) + 1)];
#endif
Pel* m_gradX0;
Pel* m_gradY0;
Pel* m_gradX1;
......@@ -134,8 +134,8 @@ protected:
#if !JVET_M0487_INT_EXTEND
void bioSampleExtendBilinearFilter(Pel const* src, int srcStride, Pel *dst, int dstStride, int width, int height, int dim, int fracX, int fracY, bool isLast, const ChromaFormat fmt, const ClpRng& clpRng);
#endif
void xPredInterUni ( const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi
, const bool& bioApplied
void xPredInterUni ( const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi
, const bool& bioApplied
, const bool luma, const bool chroma
);
void xPredInterBi ( PredictionUnit& pu, PelUnitBuf &pcYuvPred );
......
......@@ -278,10 +278,10 @@ void InterpolationFilter::filterCopy( const ClpRng& clpRng, const Pel *src, int
src += srcStride;
dst += dstStride;
}
}
}
}
else
#endif
#endif
for (row = 0; row < height; row++)
{
for (col = 0; col < width; col++)
......@@ -301,7 +301,7 @@ void InterpolationFilter::filterCopy( const ClpRng& clpRng, const Pel *src, int
#if JVET_M0147_DMVR
if (biMCForDMVR)
{
{
int shift10BitOut, offset;
if ((clpRng.bd - IF_INTERNAL_PREC_BILINEAR) > 0)
{
......@@ -512,7 +512,7 @@ void InterpolationFilter::filterHor(const ClpRng& clpRng, Pel const *src, int sr
m_filterHor[1][1][isLast](clpRng, src, srcStride, dst, dstStride, width, height, coeff, biMCForDMVR);
#else
m_filterHor[1][1][isLast]( clpRng, src, srcStride, dst, dstStride, width, height, coeff );
#endif
#endif
}
else if( N == 2 )
{
......@@ -682,7 +682,7 @@ void InterpolationFilter::filterVer( const ComponentID compID, Pel const *src, i
if (nFilterIdx == 1)
{
#if JVET_M0147_DMVR
filterVer<NTAPS_BILINEAR>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_bilinearFilterPrec4[frac], biMCForDMVR);
filterVer<NTAPS_BILINEAR>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_bilinearFilterPrec4[frac], biMCForDMVR);
#else
filterVer<NTAPS_BILINEAR>(clpRng, src, srcStride, dst, dstStride, width, height, isFirst, isLast, m_bilinearFilter[frac]);
#endif
......
......@@ -107,7 +107,7 @@ protected:
Pel xGetPredValDc ( const CPelBuf &pSrc, const Size &dstSize );
void xFillReferenceSamples ( const CPelBuf &recoBuf, Pel* refBufUnfiltered, const CompArea &area, const CodingUnit &cu );
void xFilterReferenceSamples ( const Pel* refBufUnfiltered, Pel* refBufFiltered, const CompArea &area, const SPS &sps
void xFilterReferenceSamples ( const Pel* refBufUnfiltered, Pel* refBufFiltered, const CompArea &area, const SPS &sps
, int multiRefIdx
);
......
......@@ -248,7 +248,7 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir )
for( auto &currTU : CU::traverseTUs( cu ) )
{
const Area& areaTu = cu.Y().valid() ? currTU.block( COMPONENT_Y ) : area;
#if JVET_M0471_LONG_DEBLOCKING_FILTERS
#if JVET_M0471_LONG_DEBLOCKING_FILTERS
const bool xOff = currTU.blocks[cu.chType].x != cu.blocks[cu.chType].x;
const bool yOff = currTU.blocks[cu.chType].y != cu.blocks[cu.chType].y;
if ((yOff != 0) && (edgeDir == EDGE_HOR))
......@@ -418,7 +418,7 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir )
#if JVET_M0471_LONG_DEBLOCKING_FILTERS
if (edge == 0)
{
#if FIX_DB_MAX_TRANSFORM_SIZE
#if FIX_DB_MAX_TRANSFORM_SIZE
xEdgeFilterLuma(cu, edgeDir, edge, maxFilterLengthP, maxFilterLengthQ);
#else
xEdgeFilterLuma(cu, edgeDir, edge, 7, maxFilterLength);
......@@ -426,19 +426,19 @@ void LoopFilter::xDeblockCU( CodingUnit& cu, const DeblockEdgeDir edgeDir )
}
else
{
#if FIX_DB_MAX_TRANSFORM_SIZE
#if FIX_DB_MAX_TRANSFORM_SIZE
if (implicitTU && ((edge % (maxTsize / 4)) == 0))
#else
if ( implicitTU && (edge == (64 / 4)) )
#endif
{
#if FIX_DB_MAX_TRANSFORM_SIZE
#if FIX_DB_MAX_TRANSFORM_SIZE
xEdgeFilterLuma(cu, edgeDir, edge, maxFilterLengthQ, maxFilterLengthQ);
#else
xEdgeFilterLuma(cu, edgeDir, edge, maxFilterLength, maxFilterLength);
#endif
}
#if FIX_DB_MAX_TRANSFORM_SIZE
#if FIX_DB_MAX_TRANSFORM_SIZE
else if ((edge == 2 || edge == (orthogonalLength - 2)) || (implicitTU && (((edge - 2) % ((maxTsize) / 4) == 0) || ((edge + 2) % ((maxTsize) / 4) == 0))))
#else
else if ( (edge == 2 || edge == (orthogonalLength - 2)) || (implicitTU && (edge == (56 / 4) || edge == (72 / 4))) )
......@@ -1142,7 +1142,7 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed
const unsigned cuQWidth = cuQ.block(COMPONENT_Cb).width;
const unsigned cuQHeight = cuQ.block(COMPONENT_Cb).height;
bool largeBoundary = ((edgeDir == EDGE_VER && cuPWidth >= 8 && cuQWidth >= 8) || (edgeDir == EDGE_HOR && cuPHeight >= 8 && cuQHeight >= 8));
bool largeBoundary = ((edgeDir == EDGE_VER && cuPWidth >= 8 && cuQWidth >= 8) || (edgeDir == EDGE_HOR && cuPHeight >= 8 && cuQHeight >= 8));
if (edgeDir == EDGE_HOR && pos.y % cuP.slice->getSPS()->getCTUSize() == 0)
{
......@@ -1276,11 +1276,11 @@ inline void LoopFilter::xFilteringPandQ(Pel* src, int offset, int numberPSide, i
CHECK(numberPSide <= 3 && numberQSide <= 3, "Short filtering in long filtering function");
Pel* srcP = src-offset;
Pel* srcQ = src;
int refP = 0;
int refQ = 0;
int refMiddle = 0;
const int dbCoeffs7[7] = { 59, 50, 41,32,23,14,5 };
const int dbCoeffs3[3] = { 53, 32, 11 };
const int dbCoeffs5[5] = { 58, 45, 32,19,6};
......@@ -1514,7 +1514,7 @@ inline void LoopFilter::xPelFilterChroma( Pel* piSrc, const int iOffset, const i
if (largeBoundary)
{
piSrc[-iOffset * 3] = m1; // p2
piSrc[-iOffset * 2] = m2; // p1
piSrc[-iOffset * 2] = m2; // p1
}
#endif
piSrc[-iOffset] = m3;
......
......@@ -62,7 +62,7 @@ private:
private:
/// CU-level deblocking function
void xDeblockCU ( CodingUnit& cu, const DeblockEdgeDir edgeDir );
// set / get functions
void xSetLoopfilterParam ( const CodingUnit& cu );
......
......@@ -237,7 +237,7 @@ namespace std
}
};
};
void clipMv ( Mv& rcMv, const struct Position& pos,
void clipMv ( Mv& rcMv, const struct Position& pos,
const struct Size& size,
const class SPS& sps );
......
......@@ -152,7 +152,7 @@ void RdCost::init()
m_afpDistortFunc[DF_SAD_FULL_NBIT32 ] = RdCost::xGetSAD_full;
m_afpDistortFunc[DF_SAD_FULL_NBIT64 ] = RdCost::xGetSAD_full;
m_afpDistortFunc[DF_SAD_FULL_NBIT16N] = RdCost::xGetSAD_full;
#if WCG_EXT
m_afpDistortFunc[DF_SSE_WTD ] = RdCost::xGetSSE_WTD;
m_afpDistortFunc[DF_SSE2_WTD ] = RdCost::xGetSSE2_WTD;
......@@ -2900,11 +2900,11 @@ void RdCost::initLumaLevelToWeightTable()
else
*/
{ // set SDR weight table
y = 0.015*x - 1.5 - 6; // this is the Equation used to derive the luma qp LUT for HDR in MPEG HDR anchor3.2 (JCTCX-X1020)
y = 0.015*x - 1.5 - 6; // this is the Equation used to derive the luma qp LUT for HDR in MPEG HDR anchor3.2 (JCTCX-X1020)
y = y<-3 ? -3 : (y>6 ? 6 : y);
}
m_lumaLevelToWeightPLUT[i] = pow(2.0, y / 3.0); // or power(10, dQp/10) they are almost equal
m_lumaLevelToWeightPLUT[i] = pow(2.0, y / 3.0); // or power(10, dQp/10) they are almost equal
}
}
......@@ -2918,7 +2918,7 @@ void RdCost::initLumaLevelToWeightTableReshape()
m_lumaLevelToWeightPLUT.resize(lutSize, 1.0);
if (m_signalType == RESHAPE_SIGNAL_PQ)
{
for (int i = 0; i < (1 << m_lumaBD); i++)
for (int i = 0; i < (1 << m_lumaBD); i++)
{
double x = m_lumaBD < 10 ? i << (10 - m_lumaBD) : m_lumaBD > 10 ? i >> (m_lumaBD - 10) : i;
double y;
......@@ -2940,7 +2940,7 @@ void RdCost::updateReshapeLumaLevelToWeightTableChromaMD(std::vector<Pel>& ILUT)
void RdCost::restoreReshapeLumaLevelToWeightTable()
{
for (int i = 0; i < (1 << m_lumaBD); i++)
for (int i = 0; i < (1 << m_lumaBD); i++)
{
m_reshapeLumaLevelToWeightPLUT.at(i) = m_lumaLevelToWeightPLUT.at(i);
}
......@@ -2964,7 +2964,7 @@ void RdCost::updateReshapeLumaLevelToWeightTable(SliceReshapeInfo &sliceReshape,
{
if (sliceReshape.reshaperModelBinCWDelta[i] == 1 || (sliceReshape.reshaperModelBinCWDelta[i] == -1 * histLens))
weight = wBin;