From 1286af0fe5ba2da12723f5329a8c98cd1db868a1 Mon Sep 17 00:00:00 2001 From: Hendry <fnu.hendry@huawei.com> Date: Tue, 5 Mar 2019 14:19:03 -0800 Subject: [PATCH] Fix the compilation error in Linux and change some variable to not have type prefix --- source/Lib/CommonLib/Slice.cpp | 4 ++-- source/Lib/CommonLib/Slice.h | 12 ++++++------ source/Lib/DecoderLib/VLCReader.cpp | 17 +++++++++-------- source/Lib/EncoderLib/EncLib.cpp | 4 ++-- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp index 4327c885d..ff2bad281 100644 --- a/source/Lib/CommonLib/Slice.cpp +++ b/source/Lib/CommonLib/Slice.cpp @@ -140,8 +140,8 @@ Slice::Slice() , m_uiMaxTTSizeIChroma ( 0 ) , m_uiMaxBTSize ( 0 ) #if JVET_M0132 -, m_iAPSId ( -1 ) -, m_pcAPS (NULL) +, m_apsId ( -1 ) +, m_aps (NULL) #endif , m_MotionCandLut (NULL) #if JVET_M0170_MRG_SHARELIST diff --git a/source/Lib/CommonLib/Slice.h b/source/Lib/CommonLib/Slice.h index 54ba6b5e4..313cf4037 100644 --- a/source/Lib/CommonLib/Slice.h +++ b/source/Lib/CommonLib/Slice.h @@ -1749,8 +1749,8 @@ private: uint32_t m_uiMaxBTSize; #if JVET_M0132 - int m_iAPSId; - APS* m_pcAPS; + int m_apsId; + APS* m_aps; #endif AlfSliceParam m_alfSliceParam; LutMotionCand* m_MotionCandLut; @@ -1779,10 +1779,10 @@ public: void setPPSId( int PPSId ) { m_iPPSId = PPSId; } int getPPSId() const { return m_iPPSId; } #if JVET_M0132 - void setAPS(APS* pcAPS) { m_pcAPS = pcAPS; m_iAPSId = (pcAPS) ? pcAPS->getAPSId() : -1; } - APS* getAPS() { return m_pcAPS; } - void setAPSId(int APSId) { m_iAPSId = APSId; } - int getAPSId() const { return m_iAPSId; } + void setAPS(APS* aps) { m_aps = aps; m_apsId = (aps) ? aps->getAPSId() : -1; } + APS* getAPS() { return m_aps; } + void setAPSId(int apsId) { m_apsId = apsId; } + int getAPSId() const { return m_apsId; } #endif void setPicOutputFlag( bool b ) { m_PicOutputFlag = b; } bool getPicOutputFlag() const { return m_PicOutputFlag; } diff --git a/source/Lib/DecoderLib/VLCReader.cpp b/source/Lib/DecoderLib/VLCReader.cpp index 3c4351e78..9ff972e00 100644 --- a/source/Lib/DecoderLib/VLCReader.cpp +++ b/source/Lib/DecoderLib/VLCReader.cpp @@ -608,15 +608,15 @@ void HLSyntaxReader::parsePPS( PPS* pcPPS ) } #if JVET_M0132 -void HLSyntaxReader::parseAPS(APS* pcAPS) +void HLSyntaxReader::parseAPS(APS* aps) { - uint32_t uiCode; + uint32_t code; - READ_CODE(5, uiCode, "adaptation_parameter_set_id"); - pcAPS->setAPSId(uiCode); + READ_CODE(5, code, "adaptation_parameter_set_id"); + aps->setAPSId(code); - uint32_t code = 1; - AlfSliceParam param = pcAPS->getAlfAPSParam(); + //uint32_t code = 1; + AlfSliceParam param = aps->getAlfAPSParam(); param.enabledFlag[COMPONENT_Y] = true; int alfChromaIdc = truncatedUnaryEqProb(3); //alf_chroma_idc @@ -644,7 +644,7 @@ void HLSyntaxReader::parseAPS(APS* pcAPS) { alfFilter(param, true); } - pcAPS->setAlfAPSParam(param); + aps->setAlfAPSParam(param); xReadRbspTrailingBits(); } @@ -1651,7 +1651,8 @@ void HLSyntaxReader::parseSliceHeader (Slice* pcSlice, ParameterSetManager *para READ_CODE(5, uiCode, "tile_group_aps_id"); pcSlice->setAPSId(uiCode); pcSlice->setAPS(parameterSetManager->getAPS(uiCode)); - pcSlice->setAlfSliceParam(pcSlice->getAPS()->getAlfAPSParam()); + AlfSliceParam alfParam = pcSlice->getAPS()->getAlfAPSParam(); + pcSlice->setAlfSliceParam(alfParam); pcSlice->getAlfSliceParam().enabledFlag[COMPONENT_Y] = true; } else diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index b73b3ac67..c1112a201 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -1902,9 +1902,9 @@ void EncLib::setParamSetChanged(int spsId, int ppsId) #if JVET_M0132 bool EncLib::APSNeedsWriting(int apsId) { - bool bChanged = m_apsMap.getChangedFlag(apsId); + bool isChanged = m_apsMap.getChangedFlag(apsId); m_apsMap.clearChangedFlag(apsId); - return bChanged; + return isChanged; } #endif -- GitLab