diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index b1dca0bbbf8e60277098f2238c68c706e8f1da91..48b4c1149520e921ad77303d383b3d65c66b6c02 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -356,9 +356,7 @@ void EncApp::xInitLibCfg() m_cEncLib.setUseBLambdaForNonKeyLowDelayPictures ( m_bUseBLambdaForNonKeyLowDelayPictures ); m_cEncLib.setPCMLog2MinSize ( m_uiPCMLog2MinSize); m_cEncLib.setUsePCM ( m_usePCM ); -#if INCLUDE_ISP_CFG_FLAG m_cEncLib.setUseISP ( m_ISP ); -#endif m_cEncLib.setUseFastISP ( m_useFastISP ); // set internal bit-depth and constants diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 18e3d67f0fd00ad61c3162722a1aba0fc6f96e05..c545ae37127e41222372bcbc2cd57e09b0ca905b 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -877,9 +877,7 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("MTSInterMaxCand", m_MTSInterMaxCand, 4, "Number of additional candidates to test in encoder search for MTS in inter slices\n") ("MTSImplicit", m_MTSImplicit, 0, "Enable implicit MTS (when explicit MTS is off)\n") ( "SBT", m_SBT, false, "Enable Sub-Block Transform for inter blocks\n" ) -#if INCLUDE_ISP_CFG_FLAG ( "ISP", m_ISP, false, "Enable Intra Sub-Partitions\n" ) -#endif ("SMVD", m_SMVD, false, "Enable Symmetric MVD\n") ("CompositeLTReference", m_compositeRefEnabled, false, "Enable Composite Long Term Reference Frame") ("GBi", m_GBi, false, "Enable Generalized Bi-prediction(GBi)") @@ -3307,9 +3305,7 @@ void EncAppCfg::xPrintParameter() } msg( VERBOSE, "MTS: %1d(intra) %1d(inter) ", m_MTS & 1, ( m_MTS >> 1 ) & 1 ); msg( VERBOSE, "SBT:%d ", m_SBT ); -#if INCLUDE_ISP_CFG_FLAG msg( VERBOSE, "ISP:%d ", m_ISP ); -#endif msg( VERBOSE, "SMVD:%d ", m_SMVD ); msg( VERBOSE, "CompositeLTReference:%d ", m_compositeRefEnabled); msg( VERBOSE, "GBi:%d ", m_GBi ); @@ -3366,11 +3362,7 @@ void EncAppCfg::xPrintParameter() msg( VERBOSE, "PBIntraFast:%d ", m_usePbIntraFast ); if( m_ImvMode ) msg( VERBOSE, "IMV4PelFast:%d ", m_Imv4PelFast ); if( m_MTS ) msg( VERBOSE, "MTSMaxCand: %1d(intra) %1d(inter) ", m_MTSIntraMaxCand, m_MTSInterMaxCand ); -#if INCLUDE_ISP_CFG_FLAG if( m_ISP ) msg( VERBOSE, "ISPFast:%d ", m_useFastISP ); -#else - msg( VERBOSE, "ISPFast:%d ", m_useFastISP ); -#endif if( m_LFNST ) msg( VERBOSE, "FastLFNST:%d ", m_useFastLFNST ); msg( VERBOSE, "AMaxBT:%d ", m_useAMaxBT ); msg( VERBOSE, "E0023FastEnc:%d ", m_e0023FastEnc ); diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 5c0b86f7e0da8b199e810dc7239cf216f0c266fa..99eacd0a148545ebba0a34ebae784c64173a3bc2 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -186,9 +186,7 @@ protected: 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; -#if INCLUDE_ISP_CFG_FLAG bool m_ISP; -#endif bool m_useFastISP; ///< flag for enabling fast methods for ISP // coding quality diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 7df07132187c79166a38bd30bc5531b1e0663a31..69f8ad486478bad67ef99c3e0a464f5fa869146c 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -1378,9 +1378,7 @@ SPS::SPS() , m_MMVD ( false ) , m_SBT ( false ) , m_MaxSbtSize ( 32 ) -#if INCLUDE_ISP_CFG_FLAG , m_ISP ( false ) -#endif , m_chromaFormatIdc (CHROMA_420) , m_uiMaxTLayers ( 1) // Structure diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 10df41576dbf1ca483545d83f0805c08708d5ffd..bc2a32a401272391e60beda3dd5120a8c134075f 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -661,9 +661,7 @@ private: bool m_MMVD; bool m_SBT; uint8_t m_MaxSbtSize; -#if INCLUDE_ISP_CFG_FLAG bool m_ISP; -#endif ChromaFormat m_chromaFormatIdc; uint32_t m_uiMaxTLayers; // maximum number of temporal layers @@ -967,10 +965,8 @@ public: unsigned getIBCFlag() const { return m_IBCFlag; } void setUseSBT( bool b ) { m_SBT = b; } bool getUseSBT() const { return m_SBT; } -#if INCLUDE_ISP_CFG_FLAG void setUseISP( bool b ) { m_ISP = b; } bool getUseISP() const { return m_ISP; } -#endif void setMaxSbtSize( uint8_t val ) { m_MaxSbtSize = val; } uint8_t getMaxSbtSize() const { return m_MaxSbtSize; } diff --git a/source/Lib/CommonLib/TrQuant.cpp b/source/Lib/CommonLib/TrQuant.cpp index 09e24b0afa08feb3307f99c6a2dc01472d9fd218..fa1c829d17cf56b88b5b7d10d54375ca7c4b7dbc 100644 --- a/source/Lib/CommonLib/TrQuant.cpp +++ b/source/Lib/CommonLib/TrQuant.cpp @@ -1223,11 +1223,7 @@ void TrQuant::transformNxN( TransformUnit &tu, const ComponentID &compID, const void TrQuant::xGetCoeffEnergy( TransformUnit &tu, const ComponentID &compID, const CoeffBuf& coeffs, double* diagRatio, double* horVerRatio ) { if( nullptr == diagRatio || nullptr == horVerRatio ) return; -#if INCLUDE_ISP_CFG_FLAG if( tu.cu->predMode == MODE_INTRA && !tu.cu->ispMode && isLuma( compID ) && tu.cs->sps->getUseISP() && CU::canUseISPSplit( *tu.cu, compID ) != NOT_INTRA_SUBPARTITIONS ) -#else - if( tu.cu->predMode == MODE_INTRA && !tu.cu->ispMode && isLuma( compID ) && CU::canUseISPSplit( *tu.cu, compID ) != NOT_INTRA_SUBPARTITIONS ) -#endif { const int width = tu.cu->blocks[compID].width; const int height = tu.cu->blocks[compID].height; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 6b8a75fc60a47a86c69840bb49e912cc0b4f3f59..45092af08085e96cfeea5d0848bd2f6c2a3f049b 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -159,7 +159,6 @@ typedef std::pair<int, bool> TrMode; typedef std::pair<int, int> TrCost; // clang-format off -#define INCLUDE_ISP_CFG_FLAG 1 #define ENABLE_JVET_L0283_MRL 1 // 1: Enable MRL, 0: Disable MRL #define JVET_L0090_PAIR_AVG 1 // Add pairwise average candidates, replace HEVC combined candidates #define REUSE_CU_RESULTS 1 diff --git a/source/Lib/DecoderLib/CABACReader.cpp b/source/Lib/DecoderLib/CABACReader.cpp index ff58d71a67dc0a7725c26d60cfa5c3ed011223fe..f3d3936f56782abc55a4a8b0ceb46c5d58f4175a 100644 --- a/source/Lib/DecoderLib/CABACReader.cpp +++ b/source/Lib/DecoderLib/CABACReader.cpp @@ -2754,11 +2754,7 @@ void CABACReader::mts_coding( TransformUnit& tu, ComponentID compID ) void CABACReader::isp_mode( CodingUnit& cu ) { -#if INCLUDE_ISP_CFG_FLAG if( !CU::isIntra( cu ) || !isLuma( cu.chType ) || cu.firstPU->multiRefIdx || cu.ipcm || !cu.cs->sps->getUseISP() || cu.bdpcmMode ) -#else - if( !CU::isIntra( cu ) || !isLuma( cu.chType ) || cu.firstPU->multiRefIdx || cu.ipcm || cu.bdpcmMode ) -#endif { cu.ispMode = NOT_INTRA_SUBPARTITIONS; return; diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 0ca063edabfa8e97fe8236841dfdd226f32223a3..e606d25ed7facec27413be61f30e85e18de30777 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1271,9 +1271,7 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) } // KJS: not in draft yet READ_FLAG(uiCode, "sps_reshaper_enable_flag"); pcSPS->setUseReshaper(uiCode == 1); -#if INCLUDE_ISP_CFG_FLAG READ_FLAG(uiCode, "isp_enable_flag"); pcSPS->setUseISP(uiCode != 0); -#endif #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET READ_FLAG( uiCode, "sps_ladf_enabled_flag" ); pcSPS->setLadfEnabled( uiCode != 0 ); diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index 0b3fb50bd5f1a1f349713206264d4f470a0132c9..46e061a5ec3af8dcf688d87b7169dbc5b8b77dbe 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -2656,11 +2656,7 @@ void CABACWriter::mts_coding( const TransformUnit& tu, ComponentID compID ) void CABACWriter::isp_mode( const CodingUnit& cu ) { -#if INCLUDE_ISP_CFG_FLAG if( !CU::isIntra( cu ) || !isLuma( cu.chType ) || cu.firstPU->multiRefIdx || cu.ipcm || !cu.cs->sps->getUseISP() || cu.bdpcmMode ) -#else - if( !CU::isIntra( cu ) || !isLuma( cu.chType ) || cu.firstPU->multiRefIdx || cu.ipcm || cu.bdpcmMode ) -#endif { CHECK( cu.ispMode != NOT_INTRA_SUBPARTITIONS, "error: cu.intraSubPartitions != 0" ); return; diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 9c10f9b7dbf7c9d26c2764a0a2f8b54c7d323b9f..080d5aeb660d4859cfaedbf7d74b7facff91610c 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -426,9 +426,7 @@ protected: int* m_aidQP; uint32_t m_uiDeltaQpRD; bool m_bFastDeltaQP; -#if INCLUDE_ISP_CFG_FLAG bool m_ISP; -#endif bool m_useFastISP; bool m_bUseConstrainedIntraPred; @@ -893,10 +891,8 @@ public: unsigned getVirtualBoundariesPosX ( unsigned idx ) const { return m_virtualBoundariesPosX[idx]; } void setVirtualBoundariesPosY ( unsigned u, unsigned idx ) { m_virtualBoundariesPosY[idx] = u; } unsigned getVirtualBoundariesPosY ( unsigned idx ) const { return m_virtualBoundariesPosY[idx]; } -#if INCLUDE_ISP_CFG_FLAG void setUseISP ( bool b ) { m_ISP = b; } bool getUseISP () const { return m_ISP; } -#endif void setReshaper ( bool b ) { m_lumaReshapeEnable = b; } bool getReshaper () const { return m_lumaReshapeEnable; } void setReshapeSignalType ( uint32_t signalType ) { m_reshapeSignalType = signalType; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 5f32fb1a845d2eba48323e70d5dc6322e3c383f4..e3525a90b447fb46a9d370c365a89d584085f276 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -941,9 +941,7 @@ void EncLib::xInitSPS(SPS &sps) sps.setWrapAroundEnabledFlag ( m_wrapAround ); sps.setWrapAroundOffset ( m_wrapAroundOffset ); // ADD_NEW_TOOL : (encoder lib) set tool enabling flags and associated parameters here -#if INCLUDE_ISP_CFG_FLAG sps.setUseISP ( m_ISP ); -#endif sps.setUseReshaper ( m_lumaReshapeEnable ); sps.setUseMIP ( m_MIP ); int minCUSize = sps.getMaxCUWidth() >> sps.getLog2DiffMaxMinCodingBlockSize(); diff --git a/source/Lib/EncoderLib/IntraSearch.cpp b/source/Lib/EncoderLib/IntraSearch.cpp index 6a0ad7b3fab29f64b596001082afbef6539b98db..324e654c97d1be6324febab440cf2821c918252b 100644 --- a/source/Lib/EncoderLib/IntraSearch.cpp +++ b/source/Lib/EncoderLib/IntraSearch.cpp @@ -317,11 +317,7 @@ bool IntraSearch::estIntraPredLumaQT( CodingUnit &cu, Partitioner &partitioner, { mtsUsageFlag = 0; } -#if INCLUDE_ISP_CFG_FLAG int nOptionsForISP = ( sps.getUseISP() && cu.mtsFlag == 0 && cu.lfnstIdx == 0 ) ? NUM_INTRA_SUBPARTITIONS_MODES : 1; -#else - int nOptionsForISP = ( cu.mtsFlag == 0 && cu.lfnstIdx == 0 ) ? NUM_INTRA_SUBPARTITIONS_MODES : 1; -#endif double bestCurrentCost = bestCostSoFar; int ispOptions[NUM_INTRA_SUBPARTITIONS_MODES] = { 0 }; @@ -1823,11 +1819,7 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp const bool bUseCrossCPrediction = pps.getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() && isChroma( compID ) && PU::isChromaIntraModeCrossCheckMode( pu ) && checkCrossCPrediction; const bool ccUseRecoResi = m_pcEncCfg->getUseReconBasedCrossCPredictionEstimate(); -#if INCLUDE_ISP_CFG_FLAG const bool ispSplitIsAllowed = sps.getUseISP() && CU::canUseISPSplit( *tu.cu, compID ); -#else - const bool ispSplitIsAllowed = CU::canUseISPSplit( *tu.cu, compID ); -#endif //===== init availability pattern ===== @@ -2034,11 +2026,7 @@ void IntraSearch::xIntraCodingTUBlock(TransformUnit &tu, const ComponentID &comp tu.mtsIdx = trModes->at(0).first; } m_pcTrQuant->transformNxN( tu, compID, cQP, uiAbsSum, m_CABACEstimator->getCtx(), loadTr, &diagRatio, &horVerRatio ); -#if INCLUDE_ISP_CFG_FLAG if ( !tu.cu->ispMode && isLuma(compID) && ispSplitIsAllowed && tu.mtsIdx == MTS_DCT2_DCT2 && ispSplitIsAllowed ) -#else - if ( !tu.cu->ispMode && isLuma(compID) && ispSplitIsAllowed && tu.mtsIdx == MTS_DCT2_DCT2 ) -#endif { m_intraModeDiagRatio .push_back(diagRatio); m_intraModeHorVerRatio .push_back(horVerRatio); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index d84db1de74503d98bd2fabfce392ffd4e5d21571..c7d6b350d9b1fd73af7fbaf263732422e6890972 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -864,9 +864,7 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) } // KJS: not in draft yet WRITE_FLAG(pcSPS->getUseReshaper() ? 1 : 0, "sps_reshaper_enable_flag"); -#if INCLUDE_ISP_CFG_FLAG WRITE_FLAG( pcSPS->getUseISP() ? 1 : 0, "isp_enable_flag"); -#endif #if LUMA_ADAPTIVE_DEBLOCKING_FILTER_QP_OFFSET WRITE_FLAG( pcSPS->getLadfEnabled() ? 1 : 0, "sps_ladf_enabled_flag" );