diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 5fe4c1fa972e86b5c556ff41dbbcc22421d56f27..191d57845473a66ccb85dd63f2a6b9c5d59b4f5f 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -1180,10 +1180,8 @@ void EncApp::xInitLibCfg() m_cEncLib.setNNPostFilterSEICharacteristicsNumParametersIdc ( m_nnPostFilterSEICharacteristicsNumParametersIdc[i], i); m_cEncLib.setNNPostFilterSEICharacteristicsNumKmacOperationsIdc ( m_nnPostFilterSEICharacteristicsNumKmacOperationsIdc[i], i); } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA m_cEncLib.setNNPostFilterSEICharacteristicsUriTag ( m_nnPostFilterSEICharacteristicsUriTag[i], i); m_cEncLib.setNNPostFilterSEICharacteristicsUri ( m_nnPostFilterSEICharacteristicsUri[i], i); -#endif } if (m_cEncLib.getNNPostFilterSEICharacteristicsModeIdc(i) == 1) { diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 24d0262afceece0facc0b13191dfd4e84aa0d319..c217739217b88f094d15ce25e28c9998858ddf45 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -1798,7 +1798,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) complexityIdc << "SEINNPostFilterCharacteristicsComplexityIdc" << i; opts.addOptions()(complexityIdc.str(), m_nnPostFilterSEICharacteristicsComplexityIdc[i], 0u, "Specifies the value of nnpfc_complexity_idc in the Neural Network Post Filter Characteristics SEI message"); -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA std::ostringstream uriTag; uriTag << "SEINNPostFilterCharacteristicsUriTag" << i; opts.addOptions()(uriTag.str(), m_nnPostFilterSEICharacteristicsUriTag[i], string(""), "Specifies the neural network uri tag in the Neural Network Post Filter Characteristics SEI message"); @@ -1806,7 +1805,6 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) std::ostringstream uri; uri << "SEINNPostFilterCharacteristicsUri" << i; opts.addOptions()(uri.str(), m_nnPostFilterSEICharacteristicsUri[i], string(""), "Specifies the neural network information uri in the Neural Network Post Filter Characteristics SEI message"); -#endif std::ostringstream parameterTypeIdc; parameterTypeIdc << "SEINNPostFilterCharacteristicsParameterTypeIdc" << i; diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 113dc0523d29c52b6f81561424b175b21032c803..35f47d60d4852f066a86bff143b2d898d44bd57a 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -761,10 +761,8 @@ protected: uint32_t m_nnPostFilterSEICharacteristicsCrPadding[MAX_NUM_NN_POST_FILTERS]; std::string m_nnPostFilterSEICharacteristicsPayloadFilename[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsComplexityIdc[MAX_NUM_NN_POST_FILTERS]; -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA std::string m_nnPostFilterSEICharacteristicsUriTag[MAX_NUM_NN_POST_FILTERS]; std::string m_nnPostFilterSEICharacteristicsUri[MAX_NUM_NN_POST_FILTERS]; -#endif uint32_t m_nnPostFilterSEICharacteristicsParameterTypeIdc[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsLog2ParameterBitLengthMinus3[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsNumParametersIdc[MAX_NUM_NN_POST_FILTERS]; diff --git a/source/Lib/CommonLib/SEI.h b/source/Lib/CommonLib/SEI.h index ee25b3e59132a18eec14357aa8181fe82585521f..3d64f7b3a9eac989a83a0adc314ada9c446c3866 100644 --- a/source/Lib/CommonLib/SEI.h +++ b/source/Lib/CommonLib/SEI.h @@ -1134,10 +1134,8 @@ public: , m_crPadding(0) , m_payloadByte(nullptr) , m_complexityIdc(0) -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA , m_uriTag("") , m_uri("") -#endif , m_parameterTypeIdc(0) , m_log2ParameterBitLengthMinus3(0) , m_numParametersIdc(0) @@ -1185,10 +1183,8 @@ public: uint64_t m_payloadLength; char* m_payloadByte; uint32_t m_complexityIdc; -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA std::string m_uriTag; std::string m_uri; -#endif uint32_t m_parameterTypeIdc; uint32_t m_log2ParameterBitLengthMinus3; uint32_t m_numParametersIdc; diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index 37ac22bbfe334655669effa08d50fa890485bee9..184707fb7fdf1c148d8e9bb8d78b468f69edbed7 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -54,7 +54,6 @@ //########### place macros to be removed in next cycle below this line ############### -#define JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA 1 // JVET-AA0054_PROPOSAL1: Method to specify neural network post filter data via an external URL //########### place macros to be be kept below this line ############### @@ -683,14 +682,12 @@ enum NNPC_PaddingType FIXED_PADDING = 4 }; -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA enum POST_FILTER_MODE { EXTERNAL = 0, INTERNAL = 1, URI =2 }; -#endif #define NUM_SAO_BO_CLASSES_LOG2 5 #define NUM_SAO_BO_CLASSES (1<<NUM_SAO_BO_CLASSES_LOG2) diff --git a/source/Lib/DecoderLib/SEIread.cpp b/source/Lib/DecoderLib/SEIread.cpp index f556aa479bc1c47b554dd5762125a9822ba81cfc..402b8eb6c7b83eae3c17c8787fed4dbe8cd79f82 100644 --- a/source/Lib/DecoderLib/SEIread.cpp +++ b/source/Lib/DecoderLib/SEIread.cpp @@ -95,7 +95,6 @@ void SEIReader::sei_read_flag(std::ostream *pOS, uint32_t& ruiCode, const char * } } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void SEIReader::sei_read_string(std::ostream* os, std::string& code, const char* symbolName) { READ_STRING(code, symbolName); @@ -105,7 +104,6 @@ void SEIReader::sei_read_string(std::ostream* os, std::string& code, const char* } } -#endif static inline void output_sei_message_header(SEI &sei, std::ostream *pDecodedMessageOutputStream, uint32_t payloadSize) { @@ -2692,7 +2690,6 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC } } } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA if (sei.m_modeIdc == POST_FILTER_MODE::URI) { std::string val2; @@ -2709,7 +2706,6 @@ void SEIReader::xParseSEINNPostFilterCharacteristics(SEINeuralNetworkPostFilterC sei_read_string(pDecodedMessageOutputStream, val2, "nnpfc_uri"); sei.m_uri = val2; } -#endif if (sei.m_modeIdc == 1) { diff --git a/source/Lib/DecoderLib/SEIread.h b/source/Lib/DecoderLib/SEIread.h index a41cc959cbdda78fe07d3e5a5b87e59186089cc1..11c8f0ff7bfc0ceb00a928576fbd55210c0cd316 100644 --- a/source/Lib/DecoderLib/SEIread.h +++ b/source/Lib/DecoderLib/SEIread.h @@ -114,9 +114,7 @@ protected: void sei_read_uvlc(std::ostream *pOS, uint32_t& ruiCode, const char *pSymbolName); void sei_read_svlc(std::ostream *pOS, int& ruiCode, const char *pSymbolName); void sei_read_flag(std::ostream *pOS, uint32_t& ruiCode, const char *pSymbolName); -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void sei_read_string(std::ostream* os, std::string& code, const char* symbolName); -#endif protected: HRD m_nestedHrd; diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 5cedb398e53a52758b6c2ab2d35ceac4f3ba5d92..26d5fe2c602c5958ee2ca3f65814245bd350b0d9 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -97,7 +97,6 @@ void VLCReader::xReadFlagTr(uint32_t& rValue, const char *pSymbolName) DTRACE( g_trace_ctx, D_HEADER, "%-50s u(1) : %d\n", pSymbolName, rValue ); } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void VLCReader::xReadStringTr(std::string& rValue, const char* pSymbolName) { #if RExt__DECODER_DEBUG_BIT_STATISTICS @@ -107,7 +106,6 @@ void VLCReader::xReadStringTr(std::string& rValue, const char* pSymbolName) #endif DTRACE(g_trace_ctx, D_HEADER, "%-50s u(1) : %s\n", pSymbolName, rValue.c_str()); } -#endif #endif @@ -240,7 +238,6 @@ void VLCReader::xReadFlag (uint32_t& ruiCode) CodingStatistics::IncrementStatisticEP(pSymbolName, 1, int(/*ruiCode*/0)); #endif } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA #if RExt__DECODER_DEBUG_BIT_STATISTICS void VLCReader::xReadString(std::string& code, const char* symbolName) #else @@ -257,7 +254,6 @@ void VLCReader::xReadString(std::string& code) code.append(codeIn); } } -#endif void VLCReader::xReadRbspTrailingBits() { diff --git a/source/Lib/DecoderLib/VLCReader.h b/source/Lib/DecoderLib/VLCReader.h index def82819d9cc4f2d67e86dbf6cb2f3cd98f2cdd6..1e905a7fcfc6a7794816afd868f2c153fbc1152a 100644 --- a/source/Lib/DecoderLib/VLCReader.h +++ b/source/Lib/DecoderLib/VLCReader.h @@ -52,9 +52,7 @@ #define READ_UVLC( code, name) xReadUvlcTr ( code, name ) #define READ_SVLC( code, name) xReadSvlcTr ( code, name ) #define READ_FLAG( code, name) xReadFlagTr ( code, name ) -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA #define READ_STRING( code, name) xReadStringTr ( code, name ) -#endif #else @@ -65,9 +63,7 @@ #define READ_UVLC( code, name) xReadUvlc ( code, name ) #define READ_SVLC( code, name) xReadSvlc ( code, name ) #define READ_FLAG( code, name) xReadFlag ( code, name ) -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA #define READ_STRING( code, name) xReadString ( code, name ) -#endif #else @@ -76,9 +72,7 @@ #define READ_UVLC( code, name) xReadUvlc ( code ) #define READ_SVLC( code, name) xReadSvlc ( code ) #define READ_FLAG( code, name) xReadFlag ( code ) -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA #define READ_STRING( code, name) xReadString ( code ) -#endif #endif @@ -104,27 +98,21 @@ protected: void xReadUvlc ( uint32_t& val, const char *pSymbolName ); void xReadSvlc ( int& val, const char *pSymbolName ); void xReadFlag ( uint32_t& val, const char *pSymbolName ); -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void xReadString ( std::string& val, const char* symbolName); -#endif #else void xReadCode ( uint32_t length, uint32_t& val ); void xReadUvlc ( uint32_t& val ); void xReadSvlc ( int& val ); void xReadFlag ( uint32_t& val ); -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void xReadString ( std::string& val); #endif -#endif #if ENABLE_TRACING void xReadCodeTr ( uint32_t length, uint32_t& rValue, const char *pSymbolName ); void xReadUvlcTr ( uint32_t& rValue, const char *pSymbolName ); void xReadSvlcTr ( int& rValue, const char *pSymbolName ); void xReadFlagTr ( uint32_t& rValue, const char *pSymbolName ); -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void xReadStringTr(std::string& value, const char* symbolName); #endif -#endif #if RExt__DECODER_DEBUG_BIT_STATISTICS || ENABLE_TRACING void xReadSCode ( uint32_t length, int& val, const char *pSymbolName ); #else diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 1b7f9226a2f345065a5ab032c4d70eba6abf16a4..fb10f9a62ec9aae738b6ed72af95b043898d327c 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -701,10 +701,8 @@ protected: uint32_t m_nnPostFilterSEICharacteristicsCbPadding[MAX_NUM_NN_POST_FILTERS]; std::string m_nnPostFilterSEICharacteristicsPayloadFilename[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsComplexityIdc[MAX_NUM_NN_POST_FILTERS]; -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA std::string m_nnPostFilterSEICharacteristicsUriTag[MAX_NUM_NN_POST_FILTERS]; std::string m_nnPostFilterSEICharacteristicsUri[MAX_NUM_NN_POST_FILTERS]; -#endif uint32_t m_nnPostFilterSEICharacteristicsParameterTypeIdc[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsLog2ParameterBitLengthMinus3[MAX_NUM_NN_POST_FILTERS]; uint32_t m_nnPostFilterSEICharacteristicsNumParametersIdc[MAX_NUM_NN_POST_FILTERS]; @@ -1858,12 +1856,10 @@ public: void setNNPostFilterSEICharacteristicsComplexityIdc (uint32_t complexityIdc , int filterIdx) { m_nnPostFilterSEICharacteristicsComplexityIdc[filterIdx] = complexityIdc ; } uint32_t getNNPostFilterSEICharacteristicsComplexityIdc (int filterIdx) const { return m_nnPostFilterSEICharacteristicsComplexityIdc[filterIdx]; } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void setNNPostFilterSEICharacteristicsUriTag(std::string uriTag, int filterIdx) { m_nnPostFilterSEICharacteristicsUriTag[filterIdx] = uriTag; } std::string getNNPostFilterSEICharacteristicsUriTag(int filterIdx) const { return m_nnPostFilterSEICharacteristicsUriTag[filterIdx]; } void setNNPostFilterSEICharacteristicsUri(std::string uri, int filterIdx) { m_nnPostFilterSEICharacteristicsUri[filterIdx] = uri; } std::string getNNPostFilterSEICharacteristicsUri(int filterIdx) const { return m_nnPostFilterSEICharacteristicsUri[filterIdx]; } -#endif void setNNPostFilterSEICharacteristicsParameterTypeIdc(uint32_t parameterTypeIdc, int filterIdx) { m_nnPostFilterSEICharacteristicsParameterTypeIdc[filterIdx] = parameterTypeIdc; } uint32_t getNNPostFilterSEICharacteristicsParameterTypeIdc(int filterIdx) const { return m_nnPostFilterSEICharacteristicsParameterTypeIdc[filterIdx]; } void setNNPostFilterSEICharacteristicsLog2ParameterBitLengthMinus3 (uint32_t log2ParameterBitLengthMinus3 , int filterIdx) { m_nnPostFilterSEICharacteristicsLog2ParameterBitLengthMinus3[filterIdx] = log2ParameterBitLengthMinus3 ; } diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index e0652eb9fe14cba5e352875de646fa3793253f5e..807b7ffd1bb8adfbd364b32a038e29d267e14f60 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -1258,10 +1258,8 @@ void SEIEncoder::initSEINeuralNetworkPostFilterCharacteristics(SEINeuralNetworkP sei->m_numKmacOperationsIdc = m_pcCfg->getNNPostFilterSEICharacteristicsNumKmacOperationsIdc(filterIdx); } } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA sei->m_uriTag = m_pcCfg->getNNPostFilterSEICharacteristicsUriTag(filterIdx); sei->m_uri = m_pcCfg->getNNPostFilterSEICharacteristicsUri(filterIdx); -#endif } if (sei->m_modeIdc == 1) { diff --git a/source/Lib/EncoderLib/SEIwrite.cpp b/source/Lib/EncoderLib/SEIwrite.cpp index 170c918185cf8ca2b3a54390232853775cc22065..3517907dbd5c6d455a4b0fb10fb0ffc5674e83ed 100644 --- a/source/Lib/EncoderLib/SEIwrite.cpp +++ b/source/Lib/EncoderLib/SEIwrite.cpp @@ -1478,7 +1478,6 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN xWriteNNPFCComplexityElement(sei); } } -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA if (sei.m_modeIdc == POST_FILTER_MODE::URI) { while (!isByteAligned()) @@ -1488,7 +1487,6 @@ void SEIWriter::xWriteSEINeuralNetworkPostFilterCharacteristics(const SEINeuralN WRITE_STRING(sei.m_uriTag, "nnpfc_uri_tag"); WRITE_STRING(sei.m_uri, "nnpfc_uri"); } -#endif if (sei.m_modeIdc == 1) { while (!isByteAligned()) diff --git a/source/Lib/EncoderLib/VLCWriter.cpp b/source/Lib/EncoderLib/VLCWriter.cpp index 004c6051472439bbc98fe57b6d3211ed8a69ffd6..01ba0b5198dce5f8c46d2a8c92c020e252dea7dd 100644 --- a/source/Lib/EncoderLib/VLCWriter.cpp +++ b/source/Lib/EncoderLib/VLCWriter.cpp @@ -111,7 +111,6 @@ void VLCWriter::xWriteFlagTr(uint32_t value, const char *pSymbolName) } } -#ifdef JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void VLCWriter::xWriteStringTr(std::string value, const char* pSymbolName) { xWriteString(value); @@ -120,7 +119,6 @@ void VLCWriter::xWriteStringTr(std::string value, const char* pSymbolName) DTRACE(g_trace_ctx, D_HEADER, "%-50s st(v) : %s\n", pSymbolName, value.c_str()); } } -#endif bool g_HLSTraceEnable = true; @@ -167,7 +165,6 @@ void VLCWriter::xWriteFlag( uint32_t uiCode ) m_pcBitIf->write( uiCode, 1 ); } -#ifdef JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void VLCWriter::xWriteString(std::string code) { for (int i = 0; i < code.length(); ++i) @@ -176,7 +173,6 @@ void VLCWriter::xWriteString(std::string code) } m_pcBitIf->write('\0', 8); } -#endif void VLCWriter::xWriteRbspTrailingBits() { diff --git a/source/Lib/EncoderLib/VLCWriter.h b/source/Lib/EncoderLib/VLCWriter.h index 9df0bfb1d6abe3fdfe5cbdaede244d600c7372b8..967e82e252c887c425a4230315453fc4c0f463ef 100644 --- a/source/Lib/EncoderLib/VLCWriter.h +++ b/source/Lib/EncoderLib/VLCWriter.h @@ -54,9 +54,7 @@ #define WRITE_UVLC( value, name) xWriteUvlcTr ( value, name ) #define WRITE_SVLC( value, name) xWriteSvlcTr ( value, name ) #define WRITE_FLAG( value, name) xWriteFlagTr ( value, name ) -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA #define WRITE_STRING( value, name) xWriteStringTr ( value, name ) -#endif extern bool g_HLSTraceEnable; #else @@ -65,9 +63,7 @@ extern bool g_HLSTraceEnable; #define WRITE_UVLC( value, name) xWriteUvlc ( value ) #define WRITE_SVLC( value, name) xWriteSvlc ( value ) #define WRITE_FLAG( value, name) xWriteFlag ( value ) -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA #define WRITE_STRING( value, name) xWriteString ( value ) -#endif #endif @@ -91,18 +87,14 @@ protected: void xWriteUvlc ( uint32_t uiCode ); void xWriteSvlc ( int iCode ); void xWriteFlag ( uint32_t uiCode ); -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void xWriteString(std::string code); -#endif #if ENABLE_TRACING void xWriteSCodeTr ( int value, uint32_t length, const char *pSymbolName); void xWriteCodeTr ( uint32_t value, uint32_t length, const char *pSymbolName); void xWriteUvlcTr ( uint32_t value, const char *pSymbolName); void xWriteSvlcTr ( int value, const char *pSymbolName); void xWriteFlagTr ( uint32_t value, const char *pSymbolName); -#if JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA void xWriteStringTr (std::string value, const char* symbolName); -#endif #endif void xWriteRbspTrailingBits(); bool isByteAligned() { return (m_pcBitIf->getNumBitsUntilByteAligned() == 0); } ;