From 00b795cfb53748c24bb22653c3bc5743853fbed5 Mon Sep 17 00:00:00 2001 From: Rickard Sjoberg <rickard.sjoberg@ericsson.com> Date: Thu, 10 Oct 2019 23:18:05 +0200 Subject: [PATCH] Cleaning up the code and reverting some changes to remove clang warnings committed by mistake. --- source/App/EncoderApp/EncAppCfg.cpp | 8 ++--- source/Lib/CommonLib/AdaptiveLoopFilter.cpp | 37 +++++++++------------ source/Lib/CommonLib/TrQuant.cpp | 8 ++--- source/Lib/EncoderLib/EncCu.cpp | 2 +- source/Lib/EncoderLib/IntraSearch.h | 2 +- source/Lib/Utilities/program_options_lite.h | 2 +- 6 files changed, 27 insertions(+), 32 deletions(-) diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 53f5fe792..24ec767c7 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -3726,13 +3726,13 @@ void EncAppCfg::xPrintParameter() { msg( VERBOSE, "RPR:%d", 0 ); } - -#if EXTENSION_360_VIDEO - m_ext360.outputConfigurationSummary(); -#endif #if JVET_O0549_ENCODER_ONLY_FILTER msg(VERBOSE, "TemporalFilter:%d ", m_gopBasedTemporalFilterEnabled); #endif +#if EXTENSION_360_VIDEO + m_ext360.outputConfigurationSummary(); +#endif + msg( VERBOSE, "\n\n"); msg( NOTICE, "\n"); diff --git a/source/Lib/CommonLib/AdaptiveLoopFilter.cpp b/source/Lib/CommonLib/AdaptiveLoopFilter.cpp index f82eefedd..912fb32ab 100644 --- a/source/Lib/CommonLib/AdaptiveLoopFilter.cpp +++ b/source/Lib/CommonLib/AdaptiveLoopFilter.cpp @@ -1171,55 +1171,53 @@ void AdaptiveLoopFilter::filterBlk(AlfClassifier **classifier, const PelUnitBuf clip = fClipSet + cl.classIdx * MAX_NUM_ALF_LUMA_COEFF; } - if( filtType == ALF_FILTER_7 ) { if( transposeIdx == 1 ) { - filterCoeff = { { coef[9], coef[4], coef[10], coef[8], coef[1], coef[5], coef[11], coef[7], coef[3], coef[0], coef[2], coef[6], coef[12] }}; - filterClipp = { { clip[9], clip[4], clip[10], clip[8], clip[1], clip[5], clip[11], clip[7], clip[3], clip[0], clip[2], clip[6], clip[12] }}; + filterCoeff = { coef[9], coef[4], coef[10], coef[8], coef[1], coef[5], coef[11], coef[7], coef[3], coef[0], coef[2], coef[6], coef[12] }; + filterClipp = { clip[9], clip[4], clip[10], clip[8], clip[1], clip[5], clip[11], clip[7], clip[3], clip[0], clip[2], clip[6], clip[12] }; } else if( transposeIdx == 2 ) { - filterCoeff = { { coef[0], coef[3], coef[2], coef[1], coef[8], coef[7], coef[6], coef[5], coef[4], coef[9], coef[10], coef[11], coef[12] }}; - filterClipp = { { clip[0], clip[3], clip[2], clip[1], clip[8], clip[7], clip[6], clip[5], clip[4], clip[9], clip[10], clip[11], clip[12] }}; + filterCoeff = { coef[0], coef[3], coef[2], coef[1], coef[8], coef[7], coef[6], coef[5], coef[4], coef[9], coef[10], coef[11], coef[12] }; + filterClipp = { clip[0], clip[3], clip[2], clip[1], clip[8], clip[7], clip[6], clip[5], clip[4], clip[9], clip[10], clip[11], clip[12] }; } else if( transposeIdx == 3 ) { - filterCoeff = { { coef[9], coef[8], coef[10], coef[4], coef[3], coef[7], coef[11], coef[5], coef[1], coef[0], coef[2], coef[6], coef[12] }}; - filterClipp = { { clip[9], clip[8], clip[10], clip[4], clip[3], clip[7], clip[11], clip[5], clip[1], clip[0], clip[2], clip[6], clip[12] }}; + filterCoeff = { coef[9], coef[8], coef[10], coef[4], coef[3], coef[7], coef[11], coef[5], coef[1], coef[0], coef[2], coef[6], coef[12] }; + filterClipp = { clip[9], clip[8], clip[10], clip[4], clip[3], clip[7], clip[11], clip[5], clip[1], clip[0], clip[2], clip[6], clip[12] }; } else { - filterCoeff = { { coef[0], coef[1], coef[2], coef[3], coef[4], coef[5], coef[6], coef[7], coef[8], coef[9], coef[10], coef[11], coef[12] }}; - filterClipp = { { clip[0], clip[1], clip[2], clip[3], clip[4], clip[5], clip[6], clip[7], clip[8], clip[9], clip[10], clip[11], clip[12] }}; + filterCoeff = { coef[0], coef[1], coef[2], coef[3], coef[4], coef[5], coef[6], coef[7], coef[8], coef[9], coef[10], coef[11], coef[12] }; + filterClipp = { clip[0], clip[1], clip[2], clip[3], clip[4], clip[5], clip[6], clip[7], clip[8], clip[9], clip[10], clip[11], clip[12] }; } } else { if( transposeIdx == 1 ) { - filterCoeff = { { coef[4], coef[1], coef[5], coef[3], coef[0], coef[2], coef[6] }}; - filterClipp = { { clip[4], clip[1], clip[5], clip[3], clip[0], clip[2], clip[6] }}; + filterCoeff = { coef[4], coef[1], coef[5], coef[3], coef[0], coef[2], coef[6] }; + filterClipp = { clip[4], clip[1], clip[5], clip[3], clip[0], clip[2], clip[6] }; } else if( transposeIdx == 2 ) { - filterCoeff = { { coef[0], coef[3], coef[2], coef[1], coef[4], coef[5], coef[6] }}; - filterClipp = { { clip[0], clip[3], clip[2], clip[1], clip[4], clip[5], clip[6] }}; + filterCoeff = { coef[0], coef[3], coef[2], coef[1], coef[4], coef[5], coef[6] }; + filterClipp = { clip[0], clip[3], clip[2], clip[1], clip[4], clip[5], clip[6] }; } else if( transposeIdx == 3 ) { - filterCoeff = { { coef[4], coef[3], coef[5], coef[1], coef[0], coef[2], coef[6] }}; - filterClipp = { { clip[4], clip[3], clip[5], clip[1], clip[0], clip[2], clip[6] }}; + filterCoeff = { coef[4], coef[3], coef[5], coef[1], coef[0], coef[2], coef[6] }; + filterClipp = { clip[4], clip[3], clip[5], clip[1], clip[0], clip[2], clip[6] }; } else { - filterCoeff = { { coef[0], coef[1], coef[2], coef[3], coef[4], coef[5], coef[6] }}; - filterClipp = { { clip[0], clip[1], clip[2], clip[3], clip[4], clip[5], clip[6] }}; + filterCoeff = { coef[0], coef[1], coef[2], coef[3], coef[4], coef[5], coef[6] }; + filterClipp = { clip[0], clip[1], clip[2], clip[3], clip[4], clip[5], clip[6] }; } } - for( int ii = 0; ii < clsSizeY; ii++ ) { pImg0 = pImgYPad0 + j + ii * srcStride; @@ -1393,6 +1391,3 @@ void AdaptiveLoopFilter::filterBlk(AlfClassifier **classifier, const PelUnitBuf pImgYPad6 += srcStride2; } } - - - diff --git a/source/Lib/CommonLib/TrQuant.cpp b/source/Lib/CommonLib/TrQuant.cpp index 5e65217b8..11ecdde18 100644 --- a/source/Lib/CommonLib/TrQuant.cpp +++ b/source/Lib/CommonLib/TrQuant.cpp @@ -818,14 +818,14 @@ void TrQuant::xT( const TransformUnit &tu, const ComponentID &compID, const CPel { const int shift = ((floorLog2(width )) + bitDepth + TRANSFORM_MATRIX_SHIFT) - maxLog2TrDynamicRange + COM16_C806_TRANS_PREC; CHECK( shift < 0, "Negative shift" ); - // CHECKD( ( transformWidthIndex < 0 ), "There is a problem with the width." ); + CHECKD( ( transformWidthIndex < 0 ), "There is a problem with the width." ); fastFwdTrans[trTypeHor][transformWidthIndex]( block, dstCoeff.buf, shift, 1, 0, skipWidth ); } else //if (iWidth == 1) //1-D vertical transform { int shift = ( ( floorLog2(height) ) + bitDepth + TRANSFORM_MATRIX_SHIFT ) - maxLog2TrDynamicRange + COM16_C806_TRANS_PREC; CHECK( shift < 0, "Negative shift" ); - // CHECKD( ( transformHeightIndex < 0 ), "There is a problem with the height." ); + CHECKD( ( transformHeightIndex < 0 ), "There is a problem with the height." ); fastFwdTrans[trTypeVer][transformHeightIndex]( block, dstCoeff.buf, shift, 1, 0, skipHeight ); } } @@ -879,14 +879,14 @@ void TrQuant::xIT( const TransformUnit &tu, const ComponentID &compID, const CCo { int shift = ( TRANSFORM_MATRIX_SHIFT + maxLog2TrDynamicRange - 1 ) - bitDepth + COM16_C806_TRANS_PREC; CHECK( shift < 0, "Negative shift" ); - // CHECK( ( transformHeightIndex < 0 ), "There is a problem with the height." ); + CHECK( ( transformHeightIndex < 0 ), "There is a problem with the height." ); fastInvTrans[trTypeVer][transformHeightIndex]( pCoeff.buf, block, shift + 1, 1, 0, skipHeight, clipMinimum, clipMaximum ); } else //if(iHeight == 1) //1-D horizontal transform { const int shift = ( TRANSFORM_MATRIX_SHIFT + maxLog2TrDynamicRange - 1 ) - bitDepth + COM16_C806_TRANS_PREC; CHECK( shift < 0, "Negative shift" ); - // CHECK( ( transformWidthIndex < 0 ), "There is a problem with the width." ); + CHECK( ( transformWidthIndex < 0 ), "There is a problem with the width." ); fastInvTrans[trTypeHor][transformWidthIndex]( pCoeff.buf, block, shift + 1, 1, 0, skipWidth, clipMinimum, clipMaximum ); } diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 07416a712..d315172bb 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -2619,7 +2619,7 @@ void EncCu::xCheckRDCostMerge2Nx2N( CodingStructure *&tempCS, CodingStructure *& pu.mhIntraFlag = true; pu.regularMergeFlag = false; pu.intraDir[0] = PLANAR_IDX; - // CHECK(pu.intraDir[0]<0 || pu.intraDir[0]>(NUM_LUMA_MODE - 1), "out of intra mode"); + CHECK(pu.intraDir[0]<0 || pu.intraDir[0]>(NUM_LUMA_MODE - 1), "out of intra mode"); pu.intraDir[1] = DM_CHROMA_IDX; } else if (RdModeList[uiMrgHADIdx].isMMVD) diff --git a/source/Lib/EncoderLib/IntraSearch.h b/source/Lib/EncoderLib/IntraSearch.h index a3ee1da27..664d0b392 100644 --- a/source/Lib/EncoderLib/IntraSearch.h +++ b/source/Lib/EncoderLib/IntraSearch.h @@ -262,7 +262,7 @@ private: int getNumCompletedSubParts(ISPType splitType, int iModeIdx) { const unsigned st = splitType - 1; - // CHECK(st < 0 || st > 1, "The split type is invalid!"); + CHECK(st < 0 || st > 1, "The split type is invalid!"); CHECK(iModeIdx < 0 || iModeIdx >(NUM_LUMA_MODE - 1), "The modeIdx is invalid"); return modeHasBeenTested[iModeIdx][st] ? intraMode[iModeIdx][st].numCompSubParts : -1; } diff --git a/source/Lib/Utilities/program_options_lite.h b/source/Lib/Utilities/program_options_lite.h index 696a6cdb1..dfd082cb7 100644 --- a/source/Lib/Utilities/program_options_lite.h +++ b/source/Lib/Utilities/program_options_lite.h @@ -114,7 +114,7 @@ namespace df template<typename T> struct Option : public OptionBase { - Option(const std::string& name, T& storage, T default_val, const std::string& desc) // qqqqq + Option(const std::string& name, T& storage, T default_val, const std::string& desc) : OptionBase(name, desc), opt_storage(storage), opt_default_val(default_val) {} -- GitLab