From d2b58bae00ac60526939e9db6fd11b49e6860b79 Mon Sep 17 00:00:00 2001 From: Frank Bossen <fbossen@gmail.com> Date: Mon, 24 Oct 2022 12:42:30 +0200 Subject: [PATCH] remove macro JVET_AA0054_SPECIFY_NN_POST_FILTER_DATA --- source/App/EncoderApp/EncApp.cpp | 2 -- source/App/EncoderApp/EncAppCfg.cpp | 2 -- source/App/EncoderApp/EncAppCfg.h | 2 -- source/Lib/CommonLib/SEI.h | 4 ---- source/Lib/CommonLib/TypeDef.h | 3 --- source/Lib/DecoderLib/SEIread.cpp | 4 ---- source/Lib/DecoderLib/SEIread.h | 2 -- source/Lib/DecoderLib/VLCReader.cpp | 4 ---- source/Lib/DecoderLib/VLCReader.h | 12 ------------ source/Lib/EncoderLib/EncCfg.h | 4 ---- source/Lib/EncoderLib/SEIEncoder.cpp | 2 -- source/Lib/EncoderLib/SEIwrite.cpp | 2 -- source/Lib/EncoderLib/VLCWriter.cpp | 4 ---- source/Lib/EncoderLib/VLCWriter.h | 8 -------- 14 files changed, 55 deletions(-) diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 5fe4c1fa9..191d57845 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 24d0262af..c21773921 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 113dc0523..35f47d60d 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 ee25b3e59..3d64f7b3a 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 37ac22bbf..184707fb7 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 f556aa479..402b8eb6c 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 a41cc959c..11c8f0ff7 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 5cedb398e..26d5fe2c6 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 def82819d..1e905a7fc 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 1b7f9226a..fb10f9a62 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 e0652eb9f..807b7ffd1 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 170c91818..3517907db 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 004c60514..01ba0b519 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 9df0bfb1d..967e82e25 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); } ; -- GitLab