diff --git a/cfg/encoder_intra_nnvc.cfg b/cfg/encoder_intra_nnvc.cfg index ba8f6335795802b8cd36c985c8abfe160832ce4a..2a7336e499f93df30be96a4cf2ba48421b9f3801 100644 --- a/cfg/encoder_intra_nnvc.cfg +++ b/cfg/encoder_intra_nnvc.cfg @@ -109,7 +109,7 @@ FastMIP : 1 FastLFNST : 1 NnIntraPred : 1 -NnlfOption : 1 +NnlfOption : 3 # Encoder optimization tools AffineAmvrEncOpt : 0 diff --git a/cfg/encoder_lowdelay_P_nnvc.cfg b/cfg/encoder_lowdelay_P_nnvc.cfg index b198d4cf06c8bb5d8e460fdd02518afb7ffa315d..dfc2e9469fb1ddb6e64dbcf76a641b24dbed4c92 100644 --- a/cfg/encoder_lowdelay_P_nnvc.cfg +++ b/cfg/encoder_lowdelay_P_nnvc.cfg @@ -135,7 +135,7 @@ FastMIP : 0 FastLocalDualTreeMode : 2 NnIntraPred : 1 -NnlfOption : 1 +NnlfOption : 3 # Encoder optimization tools AffineAmvrEncOpt : 0 diff --git a/cfg/encoder_lowdelay_nnvc.cfg b/cfg/encoder_lowdelay_nnvc.cfg index 6658fa05d86dfe5892ea2584cd3ae342b2ba6347..8dfda0b67a18929fccd17253faad16da3c534981 100644 --- a/cfg/encoder_lowdelay_nnvc.cfg +++ b/cfg/encoder_lowdelay_nnvc.cfg @@ -139,7 +139,7 @@ FastMIP : 0 FastLocalDualTreeMode : 2 NnIntraPred : 1 -NnlfOption : 1 +NnlfOption : 3 # Encoder optimization tools AffineAmvrEncOpt : 0 diff --git a/cfg/encoder_randomaccess_nnvc.cfg b/cfg/encoder_randomaccess_nnvc.cfg index 61de524aed0a3d83086234826306d38044d7c4f0..cac5e183abf589993670880efc8f76528daaf926 100644 --- a/cfg/encoder_randomaccess_nnvc.cfg +++ b/cfg/encoder_randomaccess_nnvc.cfg @@ -164,7 +164,7 @@ FastLocalDualTreeMode : 1 ChromaTS : 1 NnIntraPred : 1 -NnlfOption : 1 +NnlfOption : 3 # Encoder optimization tools AffineAmvrEncOpt : 1 diff --git a/cfg/encoder_randomaccess_nnvc_gop16.cfg b/cfg/encoder_randomaccess_nnvc_gop16.cfg index 606a38c3c4d129495a2048009afcae86f1e35f21..aef6160b2353ec58d8563a64276529ebe7a5032f 100644 --- a/cfg/encoder_randomaccess_nnvc_gop16.cfg +++ b/cfg/encoder_randomaccess_nnvc_gop16.cfg @@ -148,7 +148,7 @@ FastLocalDualTreeMode : 1 ChromaTS : 1 NnIntraPred : 1 -NnlfOption : 1 +NnlfOption : 3 # Encoder optimization tools AffineAmvrEncOpt : 1 diff --git a/cfg/nn-based/HOP.cfg b/cfg/nn-based/HOP.cfg index e872d584852e4706d0177023b5dddafbb0390313..a110f1ec6aa3bd2860c9d16938129c60a7046c86 100644 --- a/cfg/nn-based/HOP.cfg +++ b/cfg/nn-based/HOP.cfg @@ -2,4 +2,4 @@ NnlfOption : 1 NnlfModelName : models/nnlf_hop3_model_int16.sadl CbQpOffset : 1 CrQpOffset : 1 -NnlfTransInput : 0 + diff --git a/cfg/nn-based/vlop.cfg b/cfg/nn-based/vlop.cfg index d4a1473717a2445750ba418b51fe671be115c39e..a9ea708a518df1a03fbb3758645c36b30cce2deb 100644 --- a/cfg/nn-based/vlop.cfg +++ b/cfg/nn-based/vlop.cfg @@ -1,3 +1,3 @@ NnlfOption : 1 NnlfModelName : models/nnlf_vlop_model_int16.sadl -NnlfTransInput : 0 + diff --git a/sadl b/sadl index ed737f9b945954c806be8077e43441d7a4a056ee..e068b52b28d73e70010af57a8df54d8e17f143eb 160000 --- a/sadl +++ b/sadl @@ -1 +1 @@ -Subproject commit ed737f9b945954c806be8077e43441d7a4a056ee +Subproject commit e068b52b28d73e70010af57a8df54d8e17f143eb diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp index 4a5cbadfa4258fc2893e407d50f39d4383582a9a..0cd85e0539678f8a70d6c394f73dbc96807231f0 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -742,9 +742,11 @@ void DecApp::xCreateDecLib() #if NN_LF_FORCE_USE m_cDecLib.setNnlfDebugOption(m_nnlfDebugOption); #endif +#if !NN_LF_UNIFIED_ID #if JVET_AH0080_TRANS_INPUT m_cDecLib.setUseNnlfTransInput(m_nnlfTransInput); #endif +#endif #if JVET_AH0096_CONTENT_ADAPTIVE_LOP m_cDecLib.setNnfuOutputFileStem(m_nnfuOutputFileStem); #endif diff --git a/source/App/DecoderApp/DecAppCfg.cpp b/source/App/DecoderApp/DecAppCfg.cpp index 1c03f10dbfe3872b05d8bd829a95df14d87442d4..c01ab0b189befbe12ba428bdf0dc9bc9a08d6b26 100644 --- a/source/App/DecoderApp/DecAppCfg.cpp +++ b/source/App/DecoderApp/DecAppCfg.cpp @@ -85,9 +85,11 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) #if NN_LF_FORCE_USE ( "NnlfUnifiedDebugOption", m_nnlfDebugOption, 0, "Option used to debug stage 1 model. 0: default, 1: apply only on I slice, 2: apply on all slices using I type as input" ) #endif +#if !NN_LF_UNIFIED_ID #if JVET_AH0080_TRANS_INPUT ( "NnlfTransInput", m_nnlfTransInput, true, "apply DCT transform to inputs" ) #endif +#endif #if NN_HOP_UNIFIED_TEMPORAL_FILTERING ("NnlfHopTemporalModelName", m_nnModel[NnModel::HOP_UNIFIED_TEMPORA_FILTER], string("models/nnlf_hop_temporal_model_int16.sadl"), "HOP temporal loop filter model name\n") #endif diff --git a/source/App/DecoderApp/DecAppCfg.h b/source/App/DecoderApp/DecAppCfg.h index 76bc244bf6e34143e15208ee355e614f25b744d4..477b67242907fecef5c3cd93dbc4ef6c86723432 100644 --- a/source/App/DecoderApp/DecAppCfg.h +++ b/source/App/DecoderApp/DecAppCfg.h @@ -67,9 +67,11 @@ protected: #if NN_LF_FORCE_USE int m_nnlfDebugOption; #endif +#if !NN_LF_UNIFIED_ID #if JVET_AH0080_TRANS_INPUT bool m_nnlfTransInput; #endif +#endif #if JVET_AH0096_CONTENT_ADAPTIVE_LOP std::string m_nnfuOutputFileStem; ///< Directory to save the NNR bitstream and the reconstructed model #endif diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index bcef89d4df4588b61247d6f4e29f4efeda9b23b4..fdd5164a9461bc78f7c0bb827d7692fc157dabb5 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1190,8 +1190,12 @@ void EncApp::xInitLibCfg() #if NN_COMMON_SPS m_cEncLib.setUseNnlf (m_nnlf); +#if NN_LF_UNIFIED_ID + m_cEncLib.setUseNnlfId (m_nnlfId); +#else m_cEncLib.setUseNnlfSet (m_nnlfSet); #endif +#endif #if NN_LF_UNIFIED m_cEncLib.setUseNnlfUnified (m_nnlfUnified); diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 3807e5ceb8032923eb07b5b3e4a67482d185515e..7d3d67a17c6b78a16b695297f002341ef5d8e90a 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1180,8 +1180,12 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) ("GolombRiceParameterAdaptation", m_persistentRiceAdaptationEnabledFlag, false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice") ("AlignCABACBeforeBypass", m_cabacBypassAlignmentEnabledFlag, false, "Align the CABAC engine to a defined fraction of a bit prior to coding bypass data. Must be 1 in high bit rate profile, 0 otherwise") #if NN_COMMON_SPS +#if NN_LF_UNIFIED_ID + ("NnlfOption", m_nnlfOption, 3, "NN-based in-loop filter option (0:disable nnlf, 1: enable unified nnlf, 3: enable LOP3, 4: enable HOP4 [legacy: 10: enable nnlf-0, 11: enable nnlf-1, 12: enable nnlf-LC])") +#else ("NnlfOption", m_nnlfOption, 1, "NN-based in-loop filter option (0:disable nnlf, 1: enable unified nnlf, [legacy: 10: enable nnlf-0, 11: enable nnlf-1, 12: enable nnlf-LC])") - ("NnlfModelName", m_nnModel[NnModel::LOP_UNIFIED_FILTER], string("models/nnlf_lop3_model_int16.sadl"), "unified nnlf model name." ) +#endif + ("NnlfModelName", m_nnModel[NnModel::LOP_UNIFIED_FILTER], string("models/nnlf_lop3_model_int16.sadl"), "unified nnlf model name." ) #endif #if NN_LF_UNIFIED ( "NnlfBlockSize", m_nnlfBlockSize, 128u, "Base inference size of NN-based in-loop filter") @@ -1201,9 +1205,11 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #if JVET_AF0193_DECODER_OPTIMIZATION ( "NnlfDecOpt", m_nnlfDecOpt, false, "Decoder complexity optimization for NNVC in-loop filter") #endif +#if !NN_LF_UNIFIED #if JVET_AH0080_TRANS_INPUT ( "NnlfTransInput", m_nnlfTransInput, true, "Apply transform to inputs of loop filter" ) #endif +#endif #endif ("SAO", m_bUseSAO, true, "Enable Sample Adaptive Offset") ("TestSAODisableAtPictureLevel", m_bTestSAODisableAtPictureLevel, false, "Enables the testing of disabling SAO at the picture level after having analysed all blocks") @@ -2855,11 +2861,62 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) #if NN_LF_UNIFIED m_nnlfUnified = false; #endif +#if NN_LF_UNIFIED_ID + m_nnlfId=NNLFUnifiedID::UNDEFINED; + switch(m_nnlfOption) { + case 0: + m_nnlf =false; + break; + case 1: + m_nnlf = true; + m_nnlfId = NNLFUnifiedID::HOPLOP; + m_nnlfUnified = true; + break; + case 3: + m_nnlf = true; + m_nnlfId = NNLFUnifiedID::LOP3; + m_nnlfUnified = true; + m_nnlfTransInput = true; + break; + case 4: + m_nnlf = true; + m_nnlfId = NNLFUnifiedID::HOP4; + m_nnlfUnified = true; + break; +#if NN_FILTERING_SET_0 + case 10: + m_nnlf = true; + m_nnlfId = NNLFUnifiedID::FILTERSET0; + m_nnlfSet0 = true; + break; +#endif +#if NN_FILTERING_SET_1 + case 11: + m_nnlf = true; + m_nnlfId = NNLFUnifiedID::FILTERSET1; + m_nnlfSet1 = true; + m_encDbOpt = true; + break; +#endif +#if NN_FILTERING_SET_LC + case 12: + m_nnlf = true; + m_nnlfId = NNLFUnifiedID::LOP1; + m_nnlfSetLC = true; + break; +#endif + default: + std::cerr<<"[ERROR] unknown NNLF type "<<m_nnlfOption<<std::endl; + exit(-1); + break; + } +#endif +#else switch(m_nnlfOption) { case 0: break; #if NN_LF_UNIFIED case 1: - m_nnlf = true; + m_nnlf = true; m_nnlfSet = 3; m_nnlfUnified = true; break; diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index e1103697459f21556cb3a8f3728883d69ac5066d..690174f38e0c1069f36406ba60289e8f93ce84fc 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -756,8 +756,12 @@ protected: #if NN_COMMON_SPS int m_nnlfOption; bool m_nnlf; +#if NN_LF_UNIFIED_ID + NNLFUnifiedID m_nnlfId; +#else uint32_t m_nnlfSet; #endif +#endif #if NN_LF_UNIFIED bool m_nnlfUnified; diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 413c251f2fa9624e932272ee2004ce899d643470..bdeef36ced11ed31f4abe66e14377d61ed0945ab 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -1497,8 +1497,12 @@ private: #if NN_COMMON_SPS bool m_nnlfEnabledFlag; +#if NN_LF_UNIFIED_ID + NNLFUnifiedID m_nnlfid; +#else uint32_t m_nnlfSet; #endif +#endif #if NN_LF_UNIFIED bool m_nnlfUnifiedEnabledFlag; @@ -1789,9 +1793,14 @@ public: #if NN_COMMON_SPS bool getNnlfEnabledFlag() const { return m_nnlfEnabledFlag; } void setNnlfEnabledFlag(bool b) { m_nnlfEnabledFlag = b; } +#if NN_LF_UNIFIED_ID + NNLFUnifiedID getNnlfId() const { return m_nnlfid; } + void setNnlfId(NNLFUnifiedID ui) { m_nnlfid = ui; } +#else uint32_t getNnlfSet() const { return m_nnlfSet; } void setNnlfSet(uint32_t ui) { m_nnlfSet = ui; } #endif +#endif #if NN_LF_UNIFIED bool getNnlfUnifiedEnabledFlag() const { return m_nnlfUnifiedEnabledFlag; } void setNnlfUnifiedEnabledFlag( bool b ) { m_nnlfUnifiedEnabledFlag = b; } diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 39bf5cbfc2e451b273bc68ad63e9f46412dbb5d6..90f23174fdd9a04dd467cc04555bcdf334f288b5 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -63,6 +63,7 @@ using TypeSadlLFUnified=int16_t; #define JVET_AF0193_DECODER_OPTIMIZATION 1 // JVET-AF0193: decoder complexity optimization for NNVC in-loop filter #define JVET_AH0080_TRANS_INPUT 1 // JVET-AH0080: joint LOP model with inputs transformed #define JVET_AH0096_CONTENT_ADAPTIVE_LOP 1 // JVET-AH0096: Content-adaptive loop-filter +#define NN_LF_UNIFIED_ID 1 // unified the model switch using sps ID #endif @@ -620,6 +621,19 @@ enum NNInputType }; #endif +#if NN_LF_UNIFIED_ID +enum class NNLFUnifiedID +{ + FILTERSET0 = 0, + FILTERSET1 = 1, + LOP1 = 2, + HOPLOP = 3, + LOP3 = 4, + HOP4 = 5, + UNDEFINED = 6 +}; +#endif + #define MAP_CHROMA(c) (ComponentID(c)) enum InputColourSpaceConversion // defined in terms of conversion prior to input of encoder. diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 3ead65ac16ca2a4c4360c26fba09adaf23d7b94a..1a1db422d64632680e3968626e857d0f71b1b823 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -790,9 +790,13 @@ void DecLib::executeLoopFilters() #if NN_LF_FORCE_USE m_nnfilterUnified.forceIntraType(getNnlfDebugOption() == 2 ? true : false); #endif +#if NN_LF_UNIFIED_ID + m_nnfilterUnified.nnlfTransInput(cs.sps->getNnlfId()==NNLFUnifiedID::LOP3); +#else #if JVET_AH0080_TRANS_INPUT m_nnfilterUnified.nnlfTransInput(getUseNnlfTransInput() == 1 ? true : false); #endif +#endif #if JVET_AH0096_CONTENT_ADAPTIVE_LOP int picIntraPeriod = m_nnfuIntraPeriod == 0 ? 0 : int(cs.slice->getPOC() / m_nnfuIntraPeriod); @@ -1969,9 +1973,13 @@ void DecLib::xActivateParameterSets( const InputNALUnit nalu ) m_nnfilterUnified.initTemporal(m_nnModel[NnModel::HOP_UNIFIED_TEMPORA_FILTER]); } #endif +#if NN_LF_UNIFIED_ID + m_nnfilterUnified.nnlfTransInput(sps->getNnlfId()==NNLFUnifiedID::LOP3); +#else #if JVET_AH0080_TRANS_INPUT m_nnfilterUnified.nnlfTransInput(getUseNnlfTransInput() == 1 ? true : false); #endif +#endif #endif } else diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h index 79d077de0b039d0e808062cadfbb4fe1fa12d0c9..f9addd106cd52fdc2e327b98f7196f72a9c5e301 100644 --- a/source/Lib/DecoderLib/DecLib.h +++ b/source/Lib/DecoderLib/DecLib.h @@ -290,7 +290,7 @@ public: void setNnlfDebugOption( int i ) { m_nnlfDebugOption = i; } int getNnlfDebugOption() const { return m_nnlfDebugOption; } #endif -#if JVET_AH0080_TRANS_INPUT +#if JVET_AH0080_TRANS_INPUT && !NN_LF_UNIFIED_ID void setUseNnlfTransInput(bool b) { m_nnlfTransInput = b; } int getUseNnlfTransInput() const { return m_nnlfTransInput; } #endif diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index eedc3c6f1d3abf5e00d6149f111f214815c770d8..11469f33136bbb29fa3de0419f408b60d4a7a674 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -1779,8 +1779,28 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) READ_FLAG(uiCode, "sps_nnlf_enabled_flag"); pcSPS->setNnlfEnabledFlag ( uiCode ? true : false ); if (pcSPS->getNnlfEnabledFlag()) { - READ_UVLC(uiCode, "sps_nnlf_set"); pcSPS->setNnlfSet ( uiCode); +#if NN_LF_UNIFIED_ID + READ_UVLC(uiCode, "sps_nnlf_model_id"); + assert(uiCode<(int)NNLFUnifiedID::UNDEFINED); + pcSPS->setNnlfId ( (NNLFUnifiedID)uiCode); // dangerous cast + // for backward compatiblity +#if NN_FILTERING_SET_0 + pcSPS->setNnlfSet0EnabledFlag( pcSPS->getNnlfId() == NNLFUnifiedID::FILTERSET0 ); +#endif +#if NN_FILTERING_SET_1 + pcSPS->setNnlfSet1EnabledFlag( pcSPS->getNnlfId() == NNLFUnifiedID::FILTERSET1 ); +#endif +#if NN_FILTERING_SET_LC + pcSPS->setNnlfSetLCEnabledFlag( pcSPS->getNnlfId() == NNLFUnifiedID::LOP1 ); +#endif + pcSPS->setNnlfUnifiedEnabledFlag( pcSPS->getNnlfId() == NNLFUnifiedID::HOPLOP ); +#endif +#else + READ_UVLC(uiCode, "sps_nnlf_set"); + pcSPS->setNnlfSet ( uiCode); +#endif } +#if !NN_LF_UNIFIED_ID #if NN_FILTERING_SET_0 pcSPS->setNnlfSet0EnabledFlag(pcSPS->getNnlfEnabledFlag() && pcSPS->getNnlfSet() == 0 ? true : false); #endif @@ -1790,10 +1810,8 @@ void HLSyntaxReader::parseSPS(SPS* pcSPS) #if NN_FILTERING_SET_LC pcSPS->setNnlfSetLCEnabledFlag(pcSPS->getNnlfEnabledFlag() && pcSPS->getNnlfSet() == 2 ? true : false); #endif -#if NN_LF_UNIFIED pcSPS->setNnlfUnifiedEnabledFlag(pcSPS->getNnlfEnabledFlag() && pcSPS->getNnlfSet() == 3 ? true : false); #endif -#endif #if NN_LF_UNIFIED #if !NN_COMMON_SPS diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 52d67a3874cc4ec7c20010c8ee3df7ab5bf79099..bc7c37c4a1679010cbc0b3f8f0494d953f1def5f 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -816,8 +816,12 @@ protected: #if NN_COMMON_SPS bool m_nnlf; +#if NN_LF_UNIFIED_ID + NNLFUnifiedID m_nnlfId; +#else uint32_t m_nnlfSet; #endif +#endif #if NN_LF_UNIFIED bool m_nnlfUnified; uint32_t m_nnlfUnifiedBlockSize; @@ -2225,8 +2229,12 @@ public: #if NN_COMMON_SPS void setUseNnlf(bool b) { m_nnlf = b; } +#if NN_LF_UNIFIED_ID + void setUseNnlfId(NNLFUnifiedID ui) { m_nnlfId = ui; } +#else void setUseNnlfSet(uint32_t ui) { m_nnlfSet = ui; } #endif +#endif #if NN_LF_UNIFIED void setUseNnlfUnified( bool b ) { m_nnlfUnified = b; } diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 47deb594c6a99d572e6ad0319ab5b9cf083a5f18..5c145f88f2a8811727c1bcc22808f7af1052e919 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -1611,8 +1611,12 @@ void EncLib::xInitSPS( SPS& sps ) #if NN_COMMON_SPS sps.setNnlfEnabledFlag(m_nnlf); +#if NN_LF_UNIFIED_ID + sps.setNnlfId(m_nnlfId); +#else sps.setNnlfSet(m_nnlfSet); #endif +#endif #if NN_LF_UNIFIED sps.setNnlfUnifiedEnabledFlag(m_nnlfUnified); diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index c5adef0f0df774928eef81da5d82f53b2d0a8869..f48e77182fc691afa150cef6133eb6e8f77dc96f 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -1048,7 +1048,11 @@ void HLSWriter::codeSPS( const SPS* pcSPS ) WRITE_FLAG(pcSPS->getNnlfEnabledFlag(), "sps_nnlf_enabled_flag"); if (pcSPS->getNnlfEnabledFlag()) { +#if NN_LF_UNIFIED_ID + WRITE_UVLC((uint32_t)pcSPS->getNnlfId(), "sps_nnlf_model_id"); +#else WRITE_UVLC(pcSPS->getNnlfSet(), "sps_nnlf_set"); +#endif } #endif