diff --git a/source/App/DecoderApp/DecAppCfg.cpp b/source/App/DecoderApp/DecAppCfg.cpp index 439517aba9f0cc0bd8e921da84adcc3158ac6833..c4ad90ebf6e0f622a4910c6c241af4d4c7ff7a79 100644 --- a/source/App/DecoderApp/DecAppCfg.cpp +++ b/source/App/DecoderApp/DecAppCfg.cpp @@ -97,7 +97,7 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] ) ("TarDecLayerIdSetFile,l", cfg_TargetDecLayerIdSetFile, string(""), "targetDecLayerIdSet file name. The file should include white space separated LayerId values to be decoded. Omitting the option or a value of -1 in the file decodes all layers.") ("SEIColourRemappingInfoFilename", m_colourRemapSEIFileName, string(""), "Colour Remapping YUV output file name. If empty, no remapping is applied (ignore SEI message)\n") #if JVET_V0108 - ("SEICTIFilename", m_SEICTIFileName, string(""), "CTI YUV output file name. If empty, no Colour Transform is applied (ignore SEI message)\n") + ("SEICTIFilename", m_SEICTIFileName, string(""), "CTI YUV output file name. If empty, no Colour Transform is applied (ignore SEI message)\n") #endif ("SEIAnnotatedRegionsInfoFilename", m_annotatedRegionsSEIFileName, string(""), "Annotated regions output file name. If empty, no object information will be saved (ignore SEI message)\n") ("OutputDecodedSEIMessagesFilename", m_outputDecodedSEIMessagesFilename, string(""), "When non empty, output decoded SEI messages to the indicated file. If file is '-', then output to stdout\n") diff --git a/source/App/EncoderApp/EncApp.cpp b/source/App/EncoderApp/EncApp.cpp index 3031126cc80babf0f510925900e4997f250e0a23..956a27123d1722d75bc9b9f25c15efb0dcdf83e6 100644 --- a/source/App/EncoderApp/EncApp.cpp +++ b/source/App/EncoderApp/EncApp.cpp @@ -991,7 +991,8 @@ void EncApp::xInitLibCfg() m_cEncLib.setCtiSEICrossComponentInferred(m_ctiSEICrossComponentInferred); m_cEncLib.setCtiSEINbChromaLut(m_ctiSEINumberChromaLut); m_cEncLib.setCtiSEIChromaOffset(m_ctiSEIChromaOffset); - for (int i = 0; i < MAX_NUM_COMPONENT; i++) { + for (int i = 0; i < MAX_NUM_COMPONENT; i++) + { m_cEncLib.setCtiSEILut(m_ctiSEILut[i], i); } #endif diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp index 77d5b400e16392ba26280768b9ea9f0d74887077..017d693a0adddc6df1441a66bb73a04aec461a36 100644 --- a/source/App/EncoderApp/EncAppCfg.cpp +++ b/source/App/EncoderApp/EncAppCfg.cpp @@ -2415,7 +2415,8 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) } } #if JVET_V0108 - if (m_ctiSEIEnabled) { + if (m_ctiSEIEnabled) + { CHECK(!m_ctiSEICrossComponentFlag && m_ctiSEICrossComponentInferred, "CTI CrossComponentFlag is 0, but CTI CrossComponentInferred is 1 (must be 0 for CrossComponentFlag 0)"); CHECK(!m_ctiSEICrossComponentFlag && !m_ctiSEICrossComponentInferred && !m_ctiSEINumberChromaLut, "For CTI CrossComponentFlag = 0, CTI NumberChromaLut needs to be specified (1 or 2) "); CHECK(m_ctiSEICrossComponentFlag && !m_ctiSEICrossComponentInferred && !m_ctiSEINumberChromaLut, "For CTI CrossComponentFlag = 1 and CrossComponentInferred = 0, CTI NumberChromaLut needs to be specified (1 or 2) "); @@ -2425,29 +2426,34 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] ) m_ctiSEILut[0].numLutValues = (int)cfg_SEICTILut0.values.size(); m_ctiSEILut[0].lutValues = cfg_SEICTILut0.values; - if (!m_ctiSEICrossComponentFlag || (m_ctiSEICrossComponentFlag && !m_ctiSEICrossComponentInferred)) { + if (!m_ctiSEICrossComponentFlag || (m_ctiSEICrossComponentFlag && !m_ctiSEICrossComponentInferred)) + { CHECK(cfg_SEICTILut1.values.empty(), "SEI CTI LUT1 not specified"); m_ctiSEILut[1].presentFlag = true; m_ctiSEILut[1].numLutValues = (int)cfg_SEICTILut1.values.size(); m_ctiSEILut[1].lutValues = cfg_SEICTILut1.values; - if (m_ctiSEINumberChromaLut == 1) { // Cb lut the same as Cr lut + if (m_ctiSEINumberChromaLut == 1) + { // Cb lut the same as Cr lut m_ctiSEILut[2].presentFlag = true; m_ctiSEILut[2].numLutValues = m_ctiSEILut[1].numLutValues; m_ctiSEILut[2].lutValues = m_ctiSEILut[1].lutValues; } - else if (m_ctiSEINumberChromaLut == 2) { // read from cfg + else if (m_ctiSEINumberChromaLut == 2) + { // read from cfg CHECK(cfg_SEICTILut2.values.empty(), "SEI CTI LUT2 not specified"); m_ctiSEILut[2].presentFlag = true; m_ctiSEILut[2].numLutValues = (int)cfg_SEICTILut2.values.size(); m_ctiSEILut[2].lutValues = cfg_SEICTILut2.values; } - else { + else + { CHECK(m_ctiSEINumberChromaLut < 1 && m_ctiSEINumberChromaLut > 2, "Number of chroma LUTs is missing or out of range!"); } } // check if lut size is power of 2 - for (int idx = 0; idx < MAX_NUM_COMPONENT; idx++) { + for (int idx = 0; idx < MAX_NUM_COMPONENT; idx++) + { int n = m_ctiSEILut[idx].numLutValues - 1; CHECK(n > 0 && (n & (n - 1)) != 0, "Size of LUT minus 1 should be power of 2!"); CHECK(n > MAX_CTI_LUT_SIZE, "LUT size minus 1 is larger than MAX_CTI_LUT_SIZE (64)!"); @@ -4293,9 +4299,9 @@ void EncAppCfg::xPrintParameter() msg(VERBOSE, "MIP:%d ", m_MIP); msg(VERBOSE, "EncDbOpt:%d ", m_encDbOpt); #if JVET_V0108 - msg(VERBOSE, "\nSEI CTI:%d ", m_ctiSEIEnabled); + msg(VERBOSE, "SEI CTI:%d ", m_ctiSEIEnabled); #endif - msg( VERBOSE, "\nFAST TOOL CFG: " ); + msg( VERBOSE, "FAST TOOL CFG: " ); msg( VERBOSE, "LCTUFast:%d ", m_useFastLCTU ); msg( VERBOSE, "FastMrg:%d ", m_useFastMrg ); msg( VERBOSE, "PBIntraFast:%d ", m_usePbIntraFast ); diff --git a/source/App/Parcat/parcat.cpp b/source/App/Parcat/parcat.cpp index 17bbac025622c8a55246f08442536edf4458dcff..db9c5d5b9ab04a3ed37b396e987ee128bd7506d2 100644 --- a/source/App/Parcat/parcat.cpp +++ b/source/App/Parcat/parcat.cpp @@ -352,10 +352,6 @@ std::vector<uint8_t> filter_segment(const std::vector<uint8_t> & v, int idx, int } else { -#if JVET_V0108 - if (nalu_type == NAL_UNIT_PREFIX_SEI) - printf("insert NAL_UNIT_PREFIX_SEI\n"); -#endif out.insert(out.end(), p - nal_start, p); out.insert(out.end(), nalu.begin(), nalu.end()); } diff --git a/source/Lib/CommonLib/Picture.cpp b/source/Lib/CommonLib/Picture.cpp index 2582ed360a432cc108f609a3330b9e1513e00ad2..2b0ed2028fd1af0b070deed3cafe5e870649dfd6 100644 --- a/source/Lib/CommonLib/Picture.cpp +++ b/source/Lib/CommonLib/Picture.cpp @@ -64,7 +64,7 @@ Picture::Picture() precedingDRAP = false; nonReferencePictureFlag = false; #if JVET_V0108 - m_colourTranfParams = NULL; + m_colourTranfParams = NULL; #endif for( int i = 0; i < MAX_NUM_CHANNEL_TYPE; i++ ) diff --git a/source/Lib/CommonLib/Picture.h b/source/Lib/CommonLib/Picture.h index 51c838dff6b388dfb6bd0a05e39f69281e7c7154..414df3efc9e65c4c20989f65e68a5fec1d8ec7d7 100644 --- a/source/Lib/CommonLib/Picture.h +++ b/source/Lib/CommonLib/Picture.h @@ -73,7 +73,7 @@ struct Picture : public UnitArea void destroyTempBuffers(); #if JVET_V0108 SEIColourTransformApply* m_colourTranfParams; - PelStorage* m_invColourTransfBuf; + PelStorage* m_invColourTransfBuf; void createColourTransfProcessor(bool firstPictureInSequence, SEIColourTransformApply* ctiCharacteristics, PelStorage* ctiBuf, int width, int height, ChromaFormat fmt, int bitDepth); PelUnitBuf getDisplayBuf(); #endif diff --git a/source/Lib/CommonLib/SEIColourTransform.cpp b/source/Lib/CommonLib/SEIColourTransform.cpp index 028c6ae73a2c69a24052bdfe3fbed366e8b237a2..1e463b4281a4bb2b9a390dfa622a0cea45b8c68d 100644 --- a/source/Lib/CommonLib/SEIColourTransform.cpp +++ b/source/Lib/CommonLib/SEIColourTransform.cpp @@ -69,12 +69,12 @@ SEIColourTransformApply::~SEIColourTransformApply() { } -void SEIColourTransformApply::inverseColourTransform(PelStorage* pTransformBuf) +void SEIColourTransformApply::inverseColourTransform(PelStorage* transformBuf) { uint8_t numComp = m_chromaFormat ? MAX_NUM_COMPONENT : 1; - PelBuf* buffY = &pTransformBuf->Y(); - PelBuf* buffCb = &pTransformBuf->Cb(); - PelBuf* buffCr = &pTransformBuf->Cr(); + PelBuf* buffY = &transformBuf->Y(); + PelBuf* buffCb = &transformBuf->Cb(); + PelBuf* buffCr = &transformBuf->Cr(); if (numComp == 3) { diff --git a/source/Lib/CommonLib/SEIColourTransform.h b/source/Lib/CommonLib/SEIColourTransform.h index 86f03b0d841ea16e084a8b38815ddb4e8c06298c..83bf8190d5e4eaf1db93360152e9a608c3df114b 100644 --- a/source/Lib/CommonLib/SEIColourTransform.h +++ b/source/Lib/CommonLib/SEIColourTransform.h @@ -64,7 +64,7 @@ public: virtual ~SEIColourTransformApply(); void create (uint32_t width, uint32_t height, ChromaFormat fmt, uint8_t bitDepth); - void inverseColourTransform (PelStorage* pTransformBuf); + void inverseColourTransform (PelStorage* transformBuf); void generateColourTransfLUTs (); };// END CLASS DEFINITION SEIColourTransformApply