diff --git a/source/App/DecoderApp/DecApp.cpp b/source/App/DecoderApp/DecApp.cpp index a0d06527851020545b789b95914f8168af532349..1bf0b0f2477873265e956ec8f48252f67e9fa343 100644 --- a/source/App/DecoderApp/DecApp.cpp +++ b/source/App/DecoderApp/DecApp.cpp @@ -48,6 +48,8 @@ #endif #include "CommonLib/dtrace_codingstruct.h" +using namespace std; + //! \ingroup DecoderApp //! \{ diff --git a/source/App/DecoderApp/DecApp.h b/source/App/DecoderApp/DecApp.h index 6d83fcb4773452ec1b841434a7b7e9fb61c4f124..22e26063ac729a6baece0f83a2bc50ad2412e3bd 100644 --- a/source/App/DecoderApp/DecApp.h +++ b/source/App/DecoderApp/DecApp.h @@ -113,8 +113,12 @@ private: void xDestroyDecLib (); ///< destroy internal classes void xWriteOutput ( PicList* pcListPic , uint32_t tId); ///< write YUV to file void xFlushOutput( PicList* pcListPic, const int layerId = NOT_VALID ); ///< flush all remaining decoded pictures to file - bool isNewPicture(ifstream *bitstreamFile, class InputByteStream *bytestream); ///< check if next NAL unit will be the first NAL unit from a new picture - bool isNewAccessUnit(bool newPicture, ifstream *bitstreamFile, class InputByteStream *bytestream); ///< check if next NAL unit will be the first NAL unit from a new access unit + + // check if next NAL unit will be the first NAL unit from a new picture + bool isNewPicture(std::ifstream *bitstreamFile, class InputByteStream *bytestream); + + // check if next NAL unit will be the first NAL unit from a new access unit + bool isNewAccessUnit(bool newPicture, std::ifstream *bitstreamFile, class InputByteStream *bytestream); void writeLineToOutputLog(Picture * pcPic); void xOutputAnnotatedRegions(PicList* pcListPic); diff --git a/source/App/DecoderApp/decmain.cpp b/source/App/DecoderApp/decmain.cpp index 76d0b5242e791256656897f258b0d984e406b5e1..7e2e55303367c73e60db158c4ebaee700d689601 100644 --- a/source/App/DecoderApp/decmain.cpp +++ b/source/App/DecoderApp/decmain.cpp @@ -41,6 +41,8 @@ #include "DecApp.h" #include "program_options_lite.h" +using namespace std; + //! \ingroup DecoderApp //! \{ diff --git a/source/App/EncoderApp/EncApp.h b/source/App/EncoderApp/EncApp.h index 76f8cbd0f33ae28128da369193fc991157f95b34..af18f8b7e354f8f62c9c6d8c87f11a9aab44c8f9 100644 --- a/source/App/EncoderApp/EncApp.h +++ b/source/App/EncoderApp/EncApp.h @@ -77,7 +77,7 @@ private: int m_iFrameRcvd; ///< number of received frames uint32_t m_essentialBytes; uint32_t m_totalBytes; - fstream& m_bitstream; + std::fstream &m_bitstream; #if JVET_O0756_CALCULATE_HDRMETRICS std::chrono::duration<long long, ratio<1, 1000000000>> m_metricTime; #endif @@ -109,7 +109,7 @@ private: bool m_flush; public: - EncApp( fstream& bitStream, EncLibCommon* encLibCommon ); + EncApp(std::fstream &bitStream, EncLibCommon *encLibCommon); virtual ~EncApp(); int getMaxLayers() const { return m_maxLayers; } diff --git a/source/App/EncoderApp/EncAppCfg.h b/source/App/EncoderApp/EncAppCfg.h index 052dbda4417218e1d3b17f4d08c62ccd320a7607..677166d99240330fbc659e4bf44bf615879f8821 100644 --- a/source/App/EncoderApp/EncAppCfg.h +++ b/source/App/EncoderApp/EncAppCfg.h @@ -728,7 +728,7 @@ protected: bool m_gcmpSEIGuardBandBoundaryExteriorFlag; uint32_t m_gcmpSEIGuardBandSamplesMinus1; - CfgSEISubpictureLevel m_cfgSubpictureLevelInfoSEI; + EncCfgParam::CfgSEISubpictureLevel m_cfgSubpictureLevelInfoSEI; bool m_nnPostFilterSEICharacteristicsEnabled; int m_nnPostFilterSEICharacteristicsNumFilters; @@ -943,7 +943,7 @@ protected: int m_numPtlsInVps; - CfgVPSParameters m_cfgVPSParameters; + EncCfgParam::CfgVPSParameters m_cfgVPSParameters; Level::Name m_levelPtl[MAX_NUM_OLSS]; int m_olsPtlIdx[MAX_NUM_OLSS]; diff --git a/source/App/EncoderApp/encmain.cpp b/source/App/EncoderApp/encmain.cpp index fb3345ecefc76228cf7a3122bb4776f81ca98857..1f391feac7bce0049f46abf17ead34f9c77f84e2 100644 --- a/source/App/EncoderApp/encmain.cpp +++ b/source/App/EncoderApp/encmain.cpp @@ -91,9 +91,7 @@ int main(int argc, char* argv[]) #if ENABLE_SIMD_OPT std::string SIMD; df::program_options_lite::Options opts; - opts.addOptions() - ( "SIMD", SIMD, string( "" ), "" ) - ( "c", df::program_options_lite::parseConfigFile, "" ); + opts.addOptions()("SIMD", SIMD, std::string(""), "")("c", df::program_options_lite::parseConfigFile, ""); df::program_options_lite::SilentReporter err; df::program_options_lite::scanArgv( opts, argc, ( const char** ) argv, err ); fprintf( stdout, "[SIMD=%s] ", read_x86_extension( SIMD ) ); diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp index 9c55401d8c33a851926f8ae1c63d046a075968df..acbb18c2e6b6d036b3dbbb1a3663b426a35cb883 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.cpp @@ -44,6 +44,8 @@ #include "DecoderLib/AnnexBread.h" #include "EncoderLib/AnnexBwrite.h" +using namespace std; + //! \ingroup SEIFilmGrainApp //! \{ diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h index 4156e29a67314b311deb5a755abfcad3e7e92887..9383d0c5288bc84a7e5fdc8fc836fb6334b12e4c 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainApp.h @@ -54,8 +54,6 @@ #include "DecoderLib/SEIread.h" #include "EncoderLib/SEIwrite.h" -using namespace std; - // ==================================================================================================================== // Class definition // ==================================================================================================================== diff --git a/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp b/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp index 8d50571a842c9963382413d1fc2f34c561b7d53d..f66024dbe0d646a9e45511cc02b8fd232b0867e2 100644 --- a/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp +++ b/source/App/SEIFilmGrainApp/SEIFilmGrainMain.cpp @@ -60,7 +60,7 @@ int main(int argc, char* argv[]) #if ENABLE_SIMD_OPT std::string SIMD; df::program_options_lite::Options optsSimd; - optsSimd.addOptions()( "SIMD", SIMD, string( "" ), "" ); + optsSimd.addOptions()("SIMD", SIMD, std::string(""), ""); df::program_options_lite::SilentReporter err; df::program_options_lite::scanArgv( optsSimd, argc, ( const char** ) argv, err ); fprintf( stdout, "[SIMD=%s] ", read_x86_extension( SIMD ) ); diff --git a/source/App/SEIRemovalApp/SEIRemovalApp.cpp b/source/App/SEIRemovalApp/SEIRemovalApp.cpp index 9d755f1fe32a924d3e9ed5b04b1fe66fd3a06a14..a9a5855226a3ed3866655de6c588a3d5b376ae38 100644 --- a/source/App/SEIRemovalApp/SEIRemovalApp.cpp +++ b/source/App/SEIRemovalApp/SEIRemovalApp.cpp @@ -44,6 +44,8 @@ #include "DecoderLib/AnnexBread.h" #include "DecoderLib/NALread.h" +using namespace std; + //! \ingroup DecoderApp //! \{ diff --git a/source/App/SEIRemovalApp/SEIRemovalApp.h b/source/App/SEIRemovalApp/SEIRemovalApp.h index c49ffed847c2cf272105ea610c0b6e60a46bc5ad..964f4c2139f9a0ea97eb29174e0e8d7f0a6f1bb0 100644 --- a/source/App/SEIRemovalApp/SEIRemovalApp.h +++ b/source/App/SEIRemovalApp/SEIRemovalApp.h @@ -49,8 +49,6 @@ #include "SEIRemovalAppCfg.h" -using namespace std; - // ==================================================================================================================== // Class definition // ==================================================================================================================== diff --git a/source/App/SEIRemovalApp/seiremovalmain.cpp b/source/App/SEIRemovalApp/seiremovalmain.cpp index 94b000f4ca5d03eef701d5157fc87953f13af240..4173f15be2f1cbf344a5b1fd236cd831938c9f70 100644 --- a/source/App/SEIRemovalApp/seiremovalmain.cpp +++ b/source/App/SEIRemovalApp/seiremovalmain.cpp @@ -61,7 +61,7 @@ int main(int argc, char* argv[]) #if ENABLE_SIMD_OPT std::string SIMD; df::program_options_lite::Options optsSimd; - optsSimd.addOptions()( "SIMD", SIMD, string( "" ), "" ); + optsSimd.addOptions()("SIMD", SIMD, std::string(""), ""); df::program_options_lite::SilentReporter err; df::program_options_lite::scanArgv( optsSimd, argc, ( const char** ) argv, err ); fprintf( stdout, "[SIMD=%s] ", read_x86_extension( SIMD ) ); diff --git a/source/App/StreamMergeApp/StreamMergeApp.cpp b/source/App/StreamMergeApp/StreamMergeApp.cpp index 131d4b6a076be42d260dcac146681535b88842f5..27db563ee77bd8b4a6c3603fcd3fbfd27aacc3be 100644 --- a/source/App/StreamMergeApp/StreamMergeApp.cpp +++ b/source/App/StreamMergeApp/StreamMergeApp.cpp @@ -47,12 +47,14 @@ #include "CommonLib/CodingStatistics.h" #endif - //! \ingroup DecoderApp - //! \{ +using namespace std; - // ==================================================================================================================== - // Constructor / destructor / initialization / destroy - // ==================================================================================================================== +//! \ingroup DecoderApp +//! \{ + +// ==================================================================================================================== +// Constructor / destructor / initialization / destroy +// ==================================================================================================================== StreamMergeApp::StreamMergeApp() { diff --git a/source/App/StreamMergeApp/StreamMergeApp.h b/source/App/StreamMergeApp/StreamMergeApp.h index e649a135bf0828c9948053d91d664dff1ac5775a..e8bc14535021199f656cc566a892749fc1cb3a1e 100644 --- a/source/App/StreamMergeApp/StreamMergeApp.h +++ b/source/App/StreamMergeApp/StreamMergeApp.h @@ -53,13 +53,9 @@ #include "VLCWriter.h" #include "StreamMergeAppCfg.h" -using namespace std; - - - struct MergeLayer; class SingleLayerStream; -typedef map<uint32_t, uint32_t> OldToNewIdMapping; +using OldToNewIdMapping = std::map<uint32_t, uint32_t>; // ==================================================================================================================== // Class definition @@ -95,16 +91,16 @@ struct MergeLayer { int id; - ifstream * fp; + std::ifstream *fp; InputByteStream * bs; bool firstSliceInPicture = true; bool doneReading = false; - vector<AnnexBStats> stats; + std::vector<AnnexBStats> stats; ParameterSetManager oldIDsPsManager; ParameterSetManager psManager; - vector<int> vpsIds; - vector<int> spsIds; - vector<int> ppsIds; + std::vector<int> vpsIds; + std::vector<int> spsIds; + std::vector<int> ppsIds; OldToNewIdMapping vpsIdMapping; OldToNewIdMapping spsIdMapping; @@ -231,7 +227,7 @@ private: uint32_t m_futureBytes; /* bytes that have been peeked */ }; -bool byteStreamNALUnit(SingleLayerStream& bs, std::istream& istream, vector<uint8_t>& nalUnit, AnnexBStats& stats); +bool byteStreamNALUnit(SingleLayerStream &bs, std::istream &istream, std::vector<uint8_t> &nalUnit, AnnexBStats &stats); #endif // __STREAMMERGEAPP__ diff --git a/source/Lib/EncoderLib/Analyze.h b/source/Lib/EncoderLib/Analyze.h index 126730528a38b60fb0202d3d9d79723718b654c7..22493546bcbff5cf6767979e6d6d85c2d2c30d8b 100644 --- a/source/Lib/EncoderLib/Analyze.h +++ b/source/Lib/EncoderLib/Analyze.h @@ -223,9 +223,8 @@ public: auto hexValue=[](double x) { uint64_t ui; - copy(reinterpret_cast<uint8_t *>(&x), - reinterpret_cast<uint8_t *>(&x) + sizeof(x), - reinterpret_cast<uint8_t *>(&ui)); + std::copy(reinterpret_cast<uint8_t *>(&x), reinterpret_cast<uint8_t *>(&x) + sizeof(x), + reinterpret_cast<uint8_t *>(&ui)); return ui; }; // diff --git a/source/Lib/EncoderLib/CABACWriter.cpp b/source/Lib/EncoderLib/CABACWriter.cpp index 36be21ca637e563c4ceb8865a3c7eef99e209f3f..da4551ab39a066ee2f282385cd63572632306be0 100644 --- a/source/Lib/EncoderLib/CABACWriter.cpp +++ b/source/Lib/EncoderLib/CABACWriter.cpp @@ -3213,7 +3213,8 @@ void CABACWriter::residual_coding_subblockTS( CoeffCodingContext& cctx, const TC { unsigned gt2 = (absLevel >= (cutoffVal + 2)); m_BinEncoder.encodeBin(gt2, cctx.greaterXCtxIdAbsTS(cutoffVal >> 1)); - DTRACE(g_trace_ctx, D_SYNTAX_RESI, "ts_gt%d_flag() bin=%d ctx=%d sp=%d coeff=%d\n", i, gt2, cctx.greaterXCtxIdAbsTS(cutoffVal >> 1), scanPos, min<int>(absLevel, cutoffVal + 2)); + DTRACE(g_trace_ctx, D_SYNTAX_RESI, "ts_gt%d_flag() bin=%d ctx=%d sp=%d coeff=%d\n", i, gt2, + cctx.greaterXCtxIdAbsTS(cutoffVal >> 1), scanPos, std::min<int>(absLevel, cutoffVal + 2)); cctx.decimateNumCtxBins(1); } cutoffVal += 2; diff --git a/source/Lib/EncoderLib/EncCfg.h b/source/Lib/EncoderLib/EncCfg.h index 0c9e6ba93f39aea6bd7b62ac0e6076facc571b8f..f705a6cabfaa8e8a5106750bc30fe3289a2bb45c 100644 --- a/source/Lib/EncoderLib/EncCfg.h +++ b/source/Lib/EncoderLib/EncCfg.h @@ -49,8 +49,6 @@ #include "EncCfgParam.h" -using namespace EncCfgParam; - #if JVET_O0756_CALCULATE_HDRMETRICS #include "HDRLib/inc/DistortionMetric.H" #endif @@ -643,7 +641,7 @@ protected: uint8_t m_gcmpSEIGuardBandType; bool m_gcmpSEIGuardBandBoundaryExteriorFlag; uint8_t m_gcmpSEIGuardBandSamplesMinus1; - CfgSEISubpictureLevel m_cfgSubpictureLevelInfoSEI; + EncCfgParam::CfgSEISubpictureLevel m_cfgSubpictureLevelInfoSEI; bool m_sampleAspectRatioInfoSEIEnabled; bool m_sariCancelFlag; bool m_sariPersistenceFlag; @@ -934,7 +932,7 @@ protected: int m_debugCTU; ///< dbg ctu bool m_bs2ModPOCAndType; - CfgVPSParameters m_cfgVPSParameters; + EncCfgParam::CfgVPSParameters m_cfgVPSParameters; int m_maxNumAlfAps; bool m_constantJointCbCrSignFlag; @@ -2042,8 +2040,14 @@ public: bool getGcmpSEIGuardBandBoundaryExteriorFlag() { return m_gcmpSEIGuardBandBoundaryExteriorFlag; } void setGcmpSEIGuardBandSamplesMinus1( uint8_t u ) { m_gcmpSEIGuardBandSamplesMinus1 = u; } uint8_t getGcmpSEIGuardBandSamplesMinus1() { return m_gcmpSEIGuardBandSamplesMinus1; } - const CfgSEISubpictureLevel& getSubpicureLevelInfoSEICfg() const { return m_cfgSubpictureLevelInfoSEI; } - void setSubpicureLevelInfoSEICfg(const CfgSEISubpictureLevel& cfg) { m_cfgSubpictureLevelInfoSEI = cfg; } + const EncCfgParam::CfgSEISubpictureLevel &getSubpicureLevelInfoSEICfg() const + { + return m_cfgSubpictureLevelInfoSEI; + } + void setSubpicureLevelInfoSEICfg(const EncCfgParam::CfgSEISubpictureLevel &cfg) + { + m_cfgSubpictureLevelInfoSEI = cfg; + } bool getSampleAspectRatioInfoSEIEnabled() const { return m_sampleAspectRatioInfoSEIEnabled; } void setSampleAspectRatioInfoSEIEnabled(const bool val) { m_sampleAspectRatioInfoSEIEnabled = val; } bool getSariCancelFlag() const { return m_sariCancelFlag; } @@ -2594,8 +2598,14 @@ public: void setAvoidIntraInDepLayer(bool b) { m_avoidIntraInDepLayer = b; } bool getAvoidIntraInDepLayer() const { return m_avoidIntraInDepLayer; } - const CfgVPSParameters& getVPSParameters() const { return m_cfgVPSParameters; } - void setVPSParameters(const CfgVPSParameters& cfg) { m_cfgVPSParameters = cfg; } + const EncCfgParam::CfgVPSParameters &getVPSParameters() const + { + return m_cfgVPSParameters; + } + void setVPSParameters(const EncCfgParam::CfgVPSParameters &cfg) + { + m_cfgVPSParameters = cfg; + } }; //! \} diff --git a/source/Lib/EncoderLib/EncCu.cpp b/source/Lib/EncoderLib/EncCu.cpp index 0b14281bdf5845144d1079e030119ecdb1118c0c..0b0d3c5b9d752cd0b96753cee590e52a08379147 100644 --- a/source/Lib/EncoderLib/EncCu.cpp +++ b/source/Lib/EncoderLib/EncCu.cpp @@ -53,7 +53,7 @@ #include <cmath> #include <algorithm> - +using namespace std; //! \ingroup EncoderLib //! \{ diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index a847551acae4726b4ad6f1acab94154e2b9a5c28..b89ba1fd595cdce0ec75739be07df4b3e9d19235 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -46,6 +46,8 @@ #include "EncLibCommon.h" #include "CommonLib/ProfileLevelTier.h" +using namespace std; + //! \ingroup EncoderLib //! \{ diff --git a/source/Lib/EncoderLib/EncModeCtrl.cpp b/source/Lib/EncoderLib/EncModeCtrl.cpp index f0268e5d4b35ebe411428dc29a93a70f1b6f0c1e..4ef95008c48a984f096954ba146e6235373b4e35 100644 --- a/source/Lib/EncoderLib/EncModeCtrl.cpp +++ b/source/Lib/EncoderLib/EncModeCtrl.cpp @@ -49,6 +49,8 @@ #include <cmath> +using namespace std; + void EncModeCtrl::init( EncCfg *pCfg, RateCtrl *pRateCtrl, RdCost* pRdCost ) { m_pcEncCfg = pCfg; diff --git a/source/Lib/EncoderLib/EncSlice.cpp b/source/Lib/EncoderLib/EncSlice.cpp index 3545b5d6a0930fc43901feac28da7ac5c9d4b7f0..49fe934b08be498cb3f5f3ef76210e08339e4ae3 100644 --- a/source/Lib/EncoderLib/EncSlice.cpp +++ b/source/Lib/EncoderLib/EncSlice.cpp @@ -766,7 +766,7 @@ void EncSlice::initEncSlice(Picture *pcPic, const int pocLast, const int pocCurr int offset = (curPoc < gdrPocStart) ? 0 : (((curPoc - gdrPocStart) / gdrPeriod) * gdrPeriod); int actualGdrStart = gdrPocStart + offset; - int actualGdrInterval = min(gdrInterval, (int)(pcPic->getPicWidthInLumaSamples() / 8)); + int actualGdrInterval = std::min(gdrInterval, (int) (pcPic->getPicWidthInLumaSamples() / 8)); int recoveryPocCnt = actualGdrInterval - 1; int recoveryPicPoc = actualGdrStart + recoveryPocCnt; diff --git a/source/Lib/EncoderLib/EncTemporalFilter.cpp b/source/Lib/EncoderLib/EncTemporalFilter.cpp index a80c84db715932bd6117eef80db56a6fc962f41c..5360ed74fde68001d0d8cd81a8709f809d24d975 100644 --- a/source/Lib/EncoderLib/EncTemporalFilter.cpp +++ b/source/Lib/EncoderLib/EncTemporalFilter.cpp @@ -139,7 +139,8 @@ bool EncTemporalFilter::filter(PelStorage *orgPic, int receivedPoc) bool isFilterThisFrame = false; if (m_QP >= 17) // disable filter for QP < 17 { - for (map<int, double>::iterator it = m_temporalFilterStrengths.begin(); it != m_temporalFilterStrengths.end(); ++it) + for (std::map<int, double>::iterator it = m_temporalFilterStrengths.begin(); it != m_temporalFilterStrengths.end(); + ++it) { int filteredFrame = it->first; if (receivedPoc % filteredFrame == 0) @@ -206,7 +207,8 @@ bool EncTemporalFilter::filter(PelStorage *orgPic, int receivedPoc) PelStorage newOrgPic; newOrgPic.create(m_chromaFormatIDC, m_area, 0, m_padding); double overallStrength = -1.0; - for (map<int, double>::iterator it = m_temporalFilterStrengths.begin(); it != m_temporalFilterStrengths.end(); ++it) + for (std::map<int, double>::iterator it = m_temporalFilterStrengths.begin(); it != m_temporalFilterStrengths.end(); + ++it) { int frame = it->first; double strength = it->second; diff --git a/source/Lib/EncoderLib/InterSearch.cpp b/source/Lib/EncoderLib/InterSearch.cpp index fab02f6781ee1466a474eb4200384fb8692b5c83..8d268226d25e70ef315eaa437642365f6f6eaac3 100644 --- a/source/Lib/EncoderLib/InterSearch.cpp +++ b/source/Lib/EncoderLib/InterSearch.cpp @@ -53,9 +53,10 @@ #include <math.h> #include <limits> +using namespace std; - //! \ingroup EncoderLib - //! \{ +//! \ingroup EncoderLib +//! \{ static const Mv s_acMvRefineH[9] = { diff --git a/source/Lib/EncoderLib/RateCtrl.h b/source/Lib/EncoderLib/RateCtrl.h index a5c1381c7102f1ce8fb4b80a77c5c9bc09443203..fcf5d8646e98e90dc2ca239ec4d6878ec9f0c789 100644 --- a/source/Lib/EncoderLib/RateCtrl.h +++ b/source/Lib/EncoderLib/RateCtrl.h @@ -48,8 +48,6 @@ #include <vector> #include <algorithm> -using namespace std; - //! \ingroup EncoderLib //! \{ @@ -233,13 +231,13 @@ public: ~EncRCPic(); public: - void create( EncRCSeq* encRCSeq, EncRCGOP* encRCGOP, int frameLevel, list<EncRCPic*>& listPreviousPictures ); + void create(EncRCSeq *encRCSeq, EncRCGOP *encRCGOP, int frameLevel, std::list<EncRCPic *> &listPreviousPictures); void destroy(); - int estimatePicQP ( double lambda, list<EncRCPic*>& listPreviousPictures ); + int estimatePicQP(double lambda, std::list<EncRCPic *> &listPreviousPictures); int getRefineBitsForIntra(int orgBits); double calculateLambdaIntra(double alpha, double beta, double MADPerPixel, double bitsPerPixel); - double estimatePicLambda( list<EncRCPic*>& listPreviousPictures, bool isIRAP); + double estimatePicLambda(std::list<EncRCPic *> &listPreviousPictures, bool isIRAP); void updateAlphaBetaIntra(double *alpha, double *beta); @@ -253,13 +251,13 @@ public: double clipRcAlpha(const int bitdepth, const double alpha); double clipRcBeta(const double beta); - void addToPictureLsit( list<EncRCPic*>& listPreviousPictures ); + void addToPictureLsit(std::list<EncRCPic *> &listPreviousPictures); double calAverageQP(); double calAverageLambda(); private: int xEstPicTargetBits( EncRCSeq* encRCSeq, EncRCGOP* encRCGOP ); - int xEstPicHeaderBits( list<EncRCPic*>& listPreviousPictures, int frameLevel ); + int xEstPicHeaderBits(std::list<EncRCPic *> &listPreviousPictures, int frameLevel); #if V0078_ADAPTIVE_LOWER_BOUND int xEstPicLowerBound( EncRCSeq* encRCSeq, EncRCGOP* encRCGOP ); #endif @@ -362,7 +360,7 @@ public: CHECK(m_encRCPic == nullptr, "Object does not exist"); return m_encRCPic; } - list<EncRCPic*>& getPicList() { return m_listRCPictures; } + std::list<EncRCPic *> &getPicList() { return m_listRCPictures; } #if U0132_TARGET_BITS_SATURATION bool getCpbSaturationEnabled() { return m_CpbSaturationEnabled; } uint32_t getCpbState() { return m_cpbState; } @@ -376,7 +374,7 @@ private: EncRCSeq* m_encRCSeq; EncRCGOP* m_encRCGOP; EncRCPic* m_encRCPic; - list<EncRCPic*> m_listRCPictures; + std::list<EncRCPic *> m_listRCPictures; int m_RCQP; #if U0132_TARGET_BITS_SATURATION bool m_CpbSaturationEnabled; // Enable target bits saturation to avoid CPB overflow and underflow diff --git a/source/Lib/EncoderLib/SEIEncoder.cpp b/source/Lib/EncoderLib/SEIEncoder.cpp index 3c2d82597f7a12118f824854c5a5ebe8d8106db3..76d96354c86f6df88cf0955c0b176963d453fbaf 100644 --- a/source/Lib/EncoderLib/SEIEncoder.cpp +++ b/source/Lib/EncoderLib/SEIEncoder.cpp @@ -37,6 +37,8 @@ #include "EncLib.h" #include <fstream> +using namespace std; + uint32_t calcMD5(const CPelUnitBuf& pic, PictureHash &digest, const BitDepths &bitDepths); uint32_t calcCRC(const CPelUnitBuf& pic, PictureHash &digest, const BitDepths &bitDepths); uint32_t calcChecksum(const CPelUnitBuf& pic, PictureHash &digest, const BitDepths &bitDepths); diff --git a/source/Lib/EncoderLib/SEIFilmGrainAnalyzer.cpp b/source/Lib/EncoderLib/SEIFilmGrainAnalyzer.cpp index 1d1dc0969f138ee9de7d5c65c82d78257fd5e4e2..ae383dfc7cfd2e09035ad744c1fb732df7d28116 100644 --- a/source/Lib/EncoderLib/SEIFilmGrainAnalyzer.cpp +++ b/source/Lib/EncoderLib/SEIFilmGrainAnalyzer.cpp @@ -37,6 +37,7 @@ #include "SEIFilmGrainAnalyzer.h" +using namespace std; // ==================================================================================================================== // Edge detection - Canny diff --git a/source/Lib/Utilities/VideoIOYuv.h b/source/Lib/Utilities/VideoIOYuv.h index f874c7fdb73efd0ddd63a836fdfac871f08707ee..3a1ac57ce6309427a3b93b45f0842a0291c4c569 100644 --- a/source/Lib/Utilities/VideoIOYuv.h +++ b/source/Lib/Utilities/VideoIOYuv.h @@ -44,8 +44,6 @@ #include "CommonLib/CommonDef.h" #include "CommonLib/Unit.h" -using namespace std; - // ==================================================================================================================== // Class definition // ==================================================================================================================== @@ -57,7 +55,7 @@ using namespace std; class VideoIOYuv { private: - fstream m_cHandle; ///< file handle + std::fstream m_cHandle; ///< file handle int m_fileBitdepth[MAX_NUM_CHANNEL_TYPE]; ///< bitdepth of input/output video file int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bitdepth after addition of MSBs (with value 0) int m_bitdepthShift[MAX_NUM_CHANNEL_TYPE]; ///< number of bits to increase or decrease image by before/after write/read diff --git a/source/Lib/Utilities/program_options_lite.h b/source/Lib/Utilities/program_options_lite.h index aceb0679d1a155addfdec786b59f72cb300aa160..2b1f4cfb11fa416e360084f581c22fb22fda611d 100644 --- a/source/Lib/Utilities/program_options_lite.h +++ b/source/Lib/Utilities/program_options_lite.h @@ -45,7 +45,6 @@ //! \ingroup TAppCommon //! \{ -using namespace std; template <class T> struct SMultiValueInput @@ -68,7 +67,7 @@ struct SMultiValueInput T readValue(const char *&pStr, bool &bSuccess); - istream& readValues(std::istream &in); + std::istream &readValues(std::istream &in); }; namespace df