From 647fff6e2b0f74e3aa9392e452d01920bae1a8a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 18 Feb 2014 11:08:16 +0200 Subject: [PATCH] Remove useless ifdefs This is in practice always enabled on all currently supported platforms. --- codec/console/enc/src/welsenc.cpp | 8 -------- codec/encoder/plus/inc/welsEncoderExt.h | 2 -- codec/encoder/plus/src/welsEncoderExt.cpp | 6 ------ 3 files changed, 16 deletions(-) diff --git a/codec/console/enc/src/welsenc.cpp b/codec/console/enc/src/welsenc.cpp index 6d5e26d6..64f66d26 100644 --- a/codec/console/enc/src/welsenc.cpp +++ b/codec/console/enc/src/welsenc.cpp @@ -889,10 +889,8 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) { int8_t iDlayerIdx = 0; uint8_t* pYUV[MAX_DEPENDENCY_LAYER] = { 0 }; SSourcePicture** pSrcPicList = NULL; -#if (defined(RUN_SIMULATOR) || defined(_WIN32)||defined(_MACH_PLATFORM) || (defined(__GNUC__))) // Inactive with sink with output file handler FILE* pFpBs = NULL; -#endif #if defined(COMPARE_DATA) //For getting the golden file handle FILE* fpGolden = NULL; @@ -944,7 +942,6 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) { iRet = 1; goto INSIDE_MEM_FREE; } -#if (defined(RUN_SIMULATOR) || defined(_WIN32)||defined(_MACH_PLATFORM) || (defined(__GNUC__))) // Inactive with sink with output file handler if (fs.strBsFile.length() > 0) { pFpBs = fopen (fs.strBsFile.c_str(), "wb"); @@ -954,7 +951,6 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) { goto INSIDE_MEM_FREE; } } -#endif #if defined(COMPARE_DATA) //For getting the golden file handle @@ -1108,9 +1104,7 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) { delete [] pUCArry; } #endif -#if (defined(RUN_SIMULATOR) || defined(_WIN32)||defined(_MACH_PLATFORM) || (defined(__GNUC__))) fwrite (pLayerBsInfo->pBsBuf, 1, iLayerSize, pFpBs); // write pure bit stream into file -#endif iFrameSize += iLayerSize; } ++ iLayer; @@ -1136,12 +1130,10 @@ int ProcessEncodingSvcWithConfig (ISVCEncoder* pPtrEnc, int argc, char** argv) { } INSIDE_MEM_FREE: { -#if (defined(RUN_SIMULATOR) || defined(_WIN32)||defined(_MACH_PLATFORM) || (defined(__GNUC__))) if (pFpBs) { fclose (pFpBs); pFpBs = NULL; } -#endif #if defined (STICK_STREAM_SIZE) if (fTrackStream) { fclose (fTrackStream); diff --git a/codec/encoder/plus/inc/welsEncoderExt.h b/codec/encoder/plus/inc/welsEncoderExt.h index 7b0edbe9..4b8b43fb 100644 --- a/codec/encoder/plus/inc/welsEncoderExt.h +++ b/codec/encoder/plus/inc/welsEncoderExt.h @@ -104,9 +104,7 @@ class CWelsH264SVCEncoder : public ISVCEncoder { private: sWelsEncCtx* m_pEncContext; -#if defined(_WIN32)||defined(_MACH_PLATFORM)||defined(__GNUC__) welsCodecTrace* m_pWelsTrace; -#endif SSourcePicture** m_pSrcPicList; int32_t m_iSrcListSize; diff --git a/codec/encoder/plus/src/welsEncoderExt.cpp b/codec/encoder/plus/src/welsEncoderExt.cpp index 07f1b7e3..5ac4e5cf 100644 --- a/codec/encoder/plus/src/welsEncoderExt.cpp +++ b/codec/encoder/plus/src/welsEncoderExt.cpp @@ -60,9 +60,7 @@ namespace WelsSVCEnc { */ CWelsH264SVCEncoder::CWelsH264SVCEncoder() : m_pEncContext (NULL), -#if defined(_WIN32)||defined(_MACH_PLATFORM)||defined(__GNUC__) m_pWelsTrace (NULL), -#endif m_pSrcPicList (NULL), m_iSrcListSize (0), m_iMaxPicWidth (0), @@ -145,13 +143,11 @@ CWelsH264SVCEncoder::CWelsH264SVCEncoder() CWelsH264SVCEncoder::~CWelsH264SVCEncoder() { WelsLog (NULL, WELS_LOG_INFO, "CWelsH264SVCEncoder::~CWelsH264SVCEncoder()\n"); -#if defined(_WIN32)||defined(_MACH_PLATFORM)||defined(__GNUC__) if (m_pWelsTrace != NULL) { delete m_pWelsTrace; m_pWelsTrace = NULL; } -#endif #ifdef REC_FRAME_COUNT WelsLog (m_pEncContext, WELS_LOG_INFO, "CWelsH264SVCEncoder::~CWelsH264SVCEncoder(), m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n", m_uiCountFrameNum, @@ -180,7 +176,6 @@ CWelsH264SVCEncoder::~CWelsH264SVCEncoder() { } void CWelsH264SVCEncoder::InitEncoder (void) { -#if defined(_WIN32)||defined(_MACH_PLATFORM)||defined(__GNUC__) #ifdef REC_FRAME_COUNT WelsLog (m_pEncContext, WELS_LOG_INFO, @@ -198,7 +193,6 @@ void CWelsH264SVCEncoder::InitEncoder (void) { // initialization WelsSetLogLevel (WELS_LOG_DEFAULT); // no output, WELS_LOG_QUIET -#endif } /* Interfaces override from ISVCEncoder */