Commit abd1d7eb authored by Frederic Barbier's avatar Frederic Barbier
Browse files

[Cosmetics] Cleanup trailing spaces

parent f79cf313
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
* *
* \section Introduction * \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 detailed information see the sub-pages of this site.
* *
* For information on the <b>subversion repositories</b> and the <b>software manual</b> see * For information on the <b>subversion repositories</b> and the <b>software manual</b> see
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* The copyright in this software is being made available under the BSD * The copyright in this software is being made available under the BSD
* License, included below. This software may be subject to other third party * License, included below. This software may be subject to other third party
* and contributor rights, including patent rights, and no such rights are * 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 * Copyright (c) 2010-2019, ITU/ISO/IEC
* All rights reserved. * All rights reserved.
......
...@@ -260,7 +260,7 @@ void EncApp::xInitLibCfg() ...@@ -260,7 +260,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setLadfIntervalLowerBound(m_LadfIntervalLowerBound[k], k); m_cEncLib.setLadfIntervalLowerBound(m_LadfIntervalLowerBound[k], k);
} }
} }
#endif #endif
m_cEncLib.setUseMHIntra ( m_MHIntra ); m_cEncLib.setUseMHIntra ( m_MHIntra );
m_cEncLib.setUseTriangle ( m_Triangle ); m_cEncLib.setUseTriangle ( m_Triangle );
#if JVET_M0253_HASH_ME #if JVET_M0253_HASH_ME
...@@ -574,7 +574,7 @@ void EncApp::xInitLibCfg() ...@@ -574,7 +574,7 @@ void EncApp::xInitLibCfg()
m_cEncLib.setReshapeSignalType ( m_reshapeSignalType ); m_cEncLib.setReshapeSignalType ( m_reshapeSignalType );
m_cEncLib.setReshapeIntraCMD ( m_intraCMD ); m_cEncLib.setReshapeIntraCMD ( m_intraCMD );
m_cEncLib.setReshapeCW ( m_reshapeCW ); m_cEncLib.setReshapeCW ( m_reshapeCW );
#endif #endif
} }
void EncApp::xCreateLib( std::list<PelUnitBuf*>& recBufList void EncApp::xCreateLib( std::list<PelUnitBuf*>& recBufList
......
...@@ -1338,13 +1338,13 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ...@@ -1338,13 +1338,13 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
po::ErrorReporter err; po::ErrorReporter err;
const list<const char*>& argv_unhandled = po::scanArgv(opts, argc, (const char**) argv, 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_POC *= 2;
m_GOPList[i].m_deltaRPS *= 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; m_GOPList[i].m_referencePics[j] *= 2;
} }
...@@ -1973,7 +1973,7 @@ bool EncAppCfg::xCheckParameter() ...@@ -1973,7 +1973,7 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara(m_IBCMode, "IBC Mode only allowed with NEXT profile"); xConfirmPara(m_IBCMode, "IBC Mode only allowed with NEXT profile");
#if JVET_M0253_HASH_ME #if JVET_M0253_HASH_ME
xConfirmPara( m_HashME, "Hash motion estimation only allowed with NEXT profile" ); 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" ); xConfirmPara( m_useFastLCTU, "Fast large CTU can only be applied when encoding with NEXT profile" );
#if JVET_M0464_UNI_MTS #if JVET_M0464_UNI_MTS
xConfirmPara( m_MTS, "MTS only allowed with NEXT profile" ); xConfirmPara( m_MTS, "MTS only allowed with NEXT profile" );
...@@ -2053,8 +2053,8 @@ bool EncAppCfg::xCheckParameter() ...@@ -2053,8 +2053,8 @@ bool EncAppCfg::xCheckParameter()
xConfirmPara( m_useAMaxBT && !m_SplitConsOverrideEnabledFlag, "AMaxBt can only be used with PartitionConstriantsOverride enabled" ); 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)"); 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]); 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"); 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 ...@@ -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 byte_offset2 = offset / 8;
int hi_bits2 = offset % 8; int hi_bits2 = offset % 8;
uint16_t data2 = (nalu[byte_offset2] << 8) | nalu[byte_offset2 + 1]; 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)) if(((data2 >> low_bits2) % 2))
offset += 1; // PPSId=0 offset += 1; // PPSId=0
else else
offset += 3; // PPSId=1 offset += 3; // PPSId=1
offset += 1; // slice_type TODO: ue(v) offset += 1; // slice_type TODO: ue(v)
// separate_colour_plane_flag is not supported in JEM1.0 // separate_colour_plane_flag is not supported in JEM1.0
if (nalu_type == CRA) if (nalu_type == CRA)
......
...@@ -393,7 +393,7 @@ void AreaBuf<Pel>::rspSignal(std::vector<Pel>& pLUT) ...@@ -393,7 +393,7 @@ void AreaBuf<Pel>::rspSignal(std::vector<Pel>& pLUT)
if (width == 1) if (width == 1)
{ {
THROW("Blocks of width = 1 not supported"); THROW("Blocks of width = 1 not supported");
} }
else else
{ {
#endif #endif
...@@ -470,7 +470,7 @@ Pel AreaBuf <Pel> ::computeAvg() const ...@@ -470,7 +470,7 @@ Pel AreaBuf <Pel> ::computeAvg() const
#endif #endif
int32_t acc = 0; int32_t acc = 0;
#define AVG_INC \ #define AVG_INC \
src += stride; src += stride;
#define AVG_OP(ADDR) acc += src[ADDR] #define AVG_OP(ADDR) acc += src[ADDR]
SIZE_AWARE_PER_EL_OP(AVG_OP, AVG_INC); SIZE_AWARE_PER_EL_OP(AVG_OP, AVG_INC);
#undef AVG_INC #undef AVG_INC
......
...@@ -831,7 +831,7 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C ...@@ -831,7 +831,7 @@ void CodingStructure::useSubStructure( const CodingStructure& subStruct, const C
if( cpyResi ) picture->getResiBuf( clippedArea ).copyFrom( subResiBuf ); if( cpyResi ) picture->getResiBuf( clippedArea ).copyFrom( subResiBuf );
if( cpyReco ) picture->getRecoBuf( clippedArea ).copyFrom( subRecoBuf ); 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)) if (!subStruct.m_isTuEnc && ((!slice->isIntra() || slice->getSPS()->getIBCFlag()) && subStruct.chType != CHANNEL_TYPE_CHROMA))
#else #else
if (!subStruct.m_isTuEnc && (!slice->isIntra() && subStruct.chType != CHANNEL_TYPE_CHROMA)) if (!subStruct.m_isTuEnc && (!slice->isIntra() && subStruct.chType != CHANNEL_TYPE_CHROMA))
...@@ -1015,7 +1015,7 @@ void CodingStructure::copyStructure( const CodingStructure& other, const Channel ...@@ -1015,7 +1015,7 @@ void CodingStructure::copyStructure( const CodingStructure& other, const Channel
pu = *ppu; pu = *ppu;
} }
#if JVET_M0483_IBC #if JVET_M0483_IBC
if (!other.slice->isIntra() || other.slice->getSPS()->getIBCFlag()) if (!other.slice->isIntra() || other.slice->getSPS()->getIBCFlag())
#else #else
if( !other.slice->isIntra() ) if( !other.slice->isIntra() )
...@@ -1126,7 +1126,7 @@ void CodingStructure::clearTUs() ...@@ -1126,7 +1126,7 @@ void CodingStructure::clearTUs()
memset( m_tuIdx [i], 0, sizeof( *m_tuIdx [0] ) * _area ); 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++ ) for( int i = 0; i < numCh; i++ )
{ {
m_offsets[i] = 0; m_offsets[i] = 0;
......
...@@ -409,7 +409,7 @@ static const int TRIANGLE_MIN_SIZE = 8 * 8; ...@@ -409,7 +409,7 @@ static const int TRIANGLE_MIN_SIZE = 8 * 8;
#if JVET_M0140_SBT #if JVET_M0140_SBT
static const int SBT_MAX_SIZE = 64; ///< maximum CU size for using 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_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 #endif
static const int IBC_MAX_CAND_SIZE = 16; // max block size for ibc search 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_ ...@@ -350,7 +350,7 @@ std::vector<std::vector<uint8_t>> ContextSetCfg::sm_InitTables( NUMBER_OF_SLICE_
const CtxSet ContextSetCfg::SplitFlag = ContextSetCfg::addCtxSet const CtxSet ContextSetCfg::SplitFlag = ContextSetCfg::addCtxSet
({ ({
#if JVET_M0421_SPLIT_SIG #if JVET_M0421_SPLIT_SIG
// |-------- do split ctx -------------------| // |-------- do split ctx -------------------|
{ 93, 124, 141, 123, 125, 141, 139, 126, 157, }, { 93, 124, 141, 123, 125, 141, 139, 126, 157, },
{ 108, 139, 156, 138, 140, 141, 139, 141, 143, }, { 108, 139, 156, 138, 140, 141, 139, 141, 143, },
{ 153, 154, 172, 153, 140, 156, 154, 127, 159, }, { 153, 154, 172, 153, 140, 156, 154, 127, 159, },
......
...@@ -193,7 +193,7 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) ...@@ -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_triangleBuf.create(UnitArea(chromaFormatIDC, Area(0, 0, MAX_CU_SIZE, MAX_CU_SIZE)));
m_iRefListIdx = -1; m_iRefListIdx = -1;
m_gradX0 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE); m_gradX0 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE);
m_gradY0 = (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); m_gradX1 = (Pel*)xMalloc(Pel, BIO_TEMP_BUFFER_SIZE);
...@@ -204,7 +204,7 @@ void InterPrediction::init( RdCost* pcRdCost, ChromaFormat chromaFormatIDC ) ...@@ -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_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))); 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++) 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_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)); 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) ...@@ -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 void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList& eRefPicList, PelUnitBuf& pcYuvPred, const bool& bi
, const bool& bioApplied , const bool& bioApplied
, const bool luma, const bool chroma , const bool luma, const bool chroma
) )
{ {
...@@ -473,7 +473,7 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList& ...@@ -473,7 +473,7 @@ void InterPrediction::xPredInterUni(const PredictionUnit& pu, const RefPicList&
, isIBC , isIBC
); );
} }
#else #else
xPredInterBlk( compID, pu, pu.cu->slice->getRefPic( eRefPicList, iRefIdx ), mv[0], pcYuvPred, bi, pu.cu->slice->clpRng( compID ) xPredInterBlk( compID, pu, pu.cu->slice->getRefPic( eRefPicList, iRefIdx ), mv[0], pcYuvPred, bi, pu.cu->slice->clpRng( compID )
, bioApplied , bioApplied
, isIBC , isIBC
...@@ -567,14 +567,14 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred) ...@@ -567,14 +567,14 @@ void InterPrediction::xPredInterBi(PredictionUnit& pu, PelUnitBuf &pcYuvPred)
{ {
if( ( (pps.getUseWP() && slice.getSliceType() == P_SLICE) || (pps.getWPBiPred() && slice.getSliceType() == B_SLICE) ) ) if( ( (pps.getUseWP() && slice.getSliceType() == P_SLICE) || (pps.getWPBiPred() && slice.getSliceType() == B_SLICE) ) )
{ {
xPredInterUni ( pu, eRefPicList, pcMbBuf, true xPredInterUni ( pu, eRefPicList, pcMbBuf, true
, bioApplied , bioApplied
, true, true , true, true
); );
} }
else else
{ {
xPredInterUni( pu, eRefPicList, pcMbBuf, pu.cu->triangle xPredInterUni( pu, eRefPicList, pcMbBuf, pu.cu->triangle
, bioApplied , bioApplied
, true, true , true, true
); );
...@@ -786,7 +786,7 @@ void InterPrediction::xPredInterBlk ( const ComponentID& compID, const Predictio ...@@ -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); bioSampleExtendBilinearFilter(refBuf.buf, refBuf.stride, dstBuf.buf, dstBuf.stride, width - 2, height - 2, 1, xFrac, yFrac, rndRes, chFmt, clpRng);
#endif #endif
// restore data // restore data
width = backupWidth; width = backupWidth;
height = backupHeight; height = backupHeight;
dstBuf.buf = backupDstBufPtr; dstBuf.buf = backupDstBufPtr;
...@@ -937,7 +937,7 @@ void InterPrediction::xPredAffineBlk( const ComponentID& compID, const Predictio ...@@ -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)* 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)] + m_storedMv[((h << iScaleY) / AFFINE_MIN_BLOCK_SIZE + 1)* MVBUFFER_SIZE + ((w << iScaleX) / AFFINE_MIN_BLOCK_SIZE + 1)] +
Mv(2, 2)); Mv(2, 2));
curMv.set(curMv.getHor() >> 2, curMv.getVer() >> 2); curMv.set(curMv.getHor() >> 2, curMv.getVer() >> 2);
#endif #endif
#endif #endif
if (sps.getWrapAroundEnabledFlag()) if (sps.getWrapAroundEnabledFlag())
...@@ -1329,7 +1329,7 @@ void InterPrediction::xWeightedAverage(const PredictionUnit& pu, const CPelUnitB ...@@ -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 , const bool luma, const bool chroma
) )
{ {
...@@ -1358,7 +1358,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu ...@@ -1358,7 +1358,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
{ {
if( ( ( sliceType == P_SLICE && pps.getUseWP() ) || ( sliceType == B_SLICE && pps.getWPBiPred() ) ) ) if( ( ( sliceType == P_SLICE && pps.getUseWP() ) || ( sliceType == B_SLICE && pps.getWPBiPred() ) ) )
{ {
xPredInterUni ( pu, eRefPicList, predBuf, true xPredInterUni ( pu, eRefPicList, predBuf, true
, false , false
, true, true , true, true
); );
...@@ -1366,7 +1366,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu ...@@ -1366,7 +1366,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
} }
else else
{ {
xPredInterUni( pu, eRefPicList, predBuf, false xPredInterUni( pu, eRefPicList, predBuf, false
, false , false
, true, true , true, true
); );
...@@ -1380,7 +1380,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu ...@@ -1380,7 +1380,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
} }
else if( xCheckIdenticalMotion( pu ) ) else if( xCheckIdenticalMotion( pu ) )
{ {
xPredInterUni( pu, REF_PIC_LIST_0, predBuf, false xPredInterUni( pu, REF_PIC_LIST_0, predBuf, false
, false , false
, true, true , true, true
); );
...@@ -1393,7 +1393,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu ...@@ -1393,7 +1393,7 @@ void InterPrediction::motionCompensation( PredictionUnit &pu, PelUnitBuf &predBu
return; return;
} }
void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRefPicList void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRefPicList
, const bool luma, const bool chroma , const bool luma, const bool chroma
) )
{ {
...@@ -1403,7 +1403,7 @@ void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRef ...@@ -1403,7 +1403,7 @@ void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRef
#if JVET_M0147_DMVR #if JVET_M0147_DMVR
pu.mvRefine = true; pu.mvRefine = true;
#endif #endif
motionCompensation( pu, predBuf, eRefPicList motionCompensation( pu, predBuf, eRefPicList
, luma, chroma , luma, chroma
); );
#if JVET_M0147_DMVR #if JVET_M0147_DMVR
...@@ -1412,12 +1412,12 @@ void InterPrediction::motionCompensation( CodingUnit &cu, const RefPicList &eRef ...@@ -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 , const bool luma, const bool chroma
) )
{ {
PelUnitBuf predBuf = pu.cs->getPredBuf( pu ); PelUnitBuf predBuf = pu.cs->getPredBuf( pu );
motionCompensation( pu, predBuf, eRefPicList motionCompensation( pu, predBuf, eRefPicList
, luma, chroma , luma, chroma
); );
} }
...@@ -1447,11 +1447,11 @@ void InterPrediction::motionCompensation4Triangle( CodingUnit &cu, MergeCtx &tri ...@@ -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() ) ); const UnitArea localUnitArea( cu.cs->area.chromaFormat, Area( 0, 0, pu.lwidth(), pu.lheight() ) );
PelUnitBuf tmpTriangleBuf = m_triangleBuf.getBuf( localUnitArea ); PelUnitBuf tmpTriangleBuf = m_triangleBuf.getBuf( localUnitArea );
PelUnitBuf predBuf = cu.cs->getPredBuf( pu ); PelUnitBuf predBuf = cu.cs->getPredBuf( pu );
triangleMrgCtx.setMergeInfo( pu, candIdx0 ); triangleMrgCtx.setMergeInfo( pu, candIdx0 );
PU::spanMotionInfo( pu ); PU::spanMotionInfo( pu );
motionCompensation( pu, tmpTriangleBuf ); motionCompensation( pu, tmpTriangleBuf );
triangleMrgCtx.setMergeInfo( pu, candIdx1 ); triangleMrgCtx.setMergeInfo( pu, candIdx1 );
PU::spanMotionInfo( pu ); PU::spanMotionInfo( pu );
motionCompensation( pu, predBuf ); motionCompensation( pu, predBuf );
...@@ -1525,7 +1525,7 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint ...@@ -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 offsetDefault = (1<<(shiftDefault-1)) + IF_INTERNAL_OFFS;
const int32_t shiftWeighted = std::max<int>(2, (IF_INTERNAL_PREC - clipbd)) + log2WeightBase; 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 offsetWeighted = (1 << (shiftWeighted - 1)) + (IF_INTERNAL_OFFS << log2WeightBase);
const int32_t ratioWH = (width > height) ? (width / height) : 1; const int32_t ratioWH = (width > height) ? (width / height) : 1;
const int32_t ratioHW = (width > height) ? 1 : (height / width); const int32_t ratioHW = (width > height) ? 1 : (height / width);
#if JVET_M0328_KEEP_ONE_WEIGHT_GROUP #if JVET_M0328_KEEP_ONE_WEIGHT_GROUP
...@@ -1538,7 +1538,7 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint ...@@ -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 weightedStartPos = ( splitDir == 0 ) ? ( 0 - (weightedLength >> 1) * ratioWH ) : ( width - ((weightedLength + 1) >> 1) * ratioWH );
int32_t weightedEndPos = weightedStartPos + weightedLength * ratioWH - 1; int32_t weightedEndPos = weightedStartPos + weightedLength * ratioWH - 1;
int32_t weightedPosoffset =( splitDir == 0 ) ? ratioWH : -ratioWH; int32_t weightedPosoffset =( splitDir == 0 ) ? ratioWH : -ratioWH;
#if JVET_M0328_KEEP_ONE_WEIGHT_GROUP #if JVET_M0328_KEEP_ONE_WEIGHT_GROUP
Pel tmpPelWeighted; Pel tmpPelWeighted;
int32_t weightIdx; int32_t weightIdx;
...@@ -1546,7 +1546,7 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint ...@@ -1546,7 +1546,7 @@ void InterPrediction::xWeightedTriangleBlk( const PredictionUnit &pu, const uint
const Pel* tmpPelWeighted; const Pel* tmpPelWeighted;
#endif #endif
int32_t x, y, tmpX, tmpY, tmpWeightedStart, tmpWeightedEnd; int32_t x, y, tmpX, tmpY, tmpWeightedStart, tmpWeightedEnd;
for( y = 0; y < height; y+= ratioHW ) for( y = 0; y < height; y+= ratioHW )
{ {
for( tmpY = ratioHW; tmpY > 0; tmpY-- ) for( tmpY = ratioHW; tmpY > 0; tmpY-- )
...@@ -1901,15 +1901,15 @@ void InterPrediction::xinitMC(PredictionUnit& pu, const ClpRngs &clpRngs) ...@@ -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) void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, const ClpRngs &clpRngs, const bool bioApplied)
{ {
int iterationCount = DMVR_NUM_ITERATION; int iterationCount = DMVR_NUM_ITERATION;
/*Always High Precision*/ /*Always High Precision*/
int mvShift = MV_FRACTIONAL_BITS_INTERNAL; int mvShift = MV_FRACTIONAL_BITS_INTERNAL;
/*use merge MV as starting MV*/ /*use merge MV as starting MV*/
Mv mergeMv[] = { pu.mv[REF_PIC_LIST_0] , pu.mv[REF_PIC_LIST_1] }; 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 dy = std::min<int>(pu.lumaSize().height, DMVR_SUBCU_HEIGHT);
int dx = std::min<int>(pu.lumaSize().width, DMVR_SUBCU_WIDTH); int dx = std::min<int>(pu.lumaSize().width, DMVR_SUBCU_WIDTH);
...@@ -1936,9 +1936,9 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con ...@@ -1936,9 +1936,9 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
Pel *biLinearPredL1 = m_cYuvPredTempDMVRL1 + (iterationCount * m_biLinearBufStride) + iterationCount; Pel *biLinearPredL1 = m_cYuvPredTempDMVRL1 + (iterationCount * m_biLinearBufStride) + iterationCount;
Position puPos = pu.lumaPos(); Position puPos = pu.lumaPos();
int bd = pu.cs->slice->getClpRngs().comp[COMPONENT_Y].bd; int bd = pu.cs->slice->getClpRngs().comp[COMPONENT_Y].bd;
{ {
int num = 0; int num = 0;
...@@ -1946,7 +1946,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con ...@@ -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 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) for (int x = puPos.x, xStart = 0; x < (puPos.x + pu.lumaSize().width); x = x + dx, xStart = xStart + dx)
{ {
uint64_t minCost = MAX_UINT64; uint64_t minCost = MAX_UINT64;
bool notZeroCost = true; bool notZeroCost = true;
int16_t totalDeltaMV[2] = { 0,0 }; int16_t totalDeltaMV[2] = { 0,0 };
...@@ -1996,7 +1996,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con ...@@ -1996,7 +1996,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
totalDeltaMV[0] = (totalDeltaMV[0] << mvShift); totalDeltaMV[0] = (totalDeltaMV[0] << mvShift);
totalDeltaMV[1] = (totalDeltaMV[1] << mvShift); totalDeltaMV[1] = (totalDeltaMV[1] << mvShift);
xDMVRSubPixelErrorSurface(notZeroCost, totalDeltaMV, deltaMV, pSADsArray); xDMVRSubPixelErrorSurface(notZeroCost, totalDeltaMV, deltaMV, pSADsArray);
pu.mvdL0SubPu[num] = Mv(totalDeltaMV[0], totalDeltaMV[1]); pu.mvdL0SubPu[num] = Mv(totalDeltaMV[0], totalDeltaMV[1]);
num++; num++;
...@@ -2022,7 +2022,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con ...@@ -2022,7 +2022,7 @@ void InterPrediction::xProcessDMVR(PredictionUnit& pu, PelUnitBuf &pcYuvDst, con
int x = 0, y = 0; int x = 0, y = 0;
int xStart = 0, yStart = 0; int xStart = 0, yStart = 0;
int num = 0; int num = 0;