ref: 647fff6e2b0f74e3aa9392e452d01920bae1a8a6
parent: bbb6ffd9117ddbf02232ebdd4477dbc162c6c411
author: Martin Storsjö <[email protected]>
date: Tue Feb 18 06:08:16 EST 2014
Remove useless ifdefs This is in practice always enabled on all currently supported platforms.
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -889,10 +889,8 @@
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 @@
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 @@
goto INSIDE_MEM_FREE;
}
}
-#endif
#if defined(COMPARE_DATA)
//For getting the golden file handle
@@ -1108,9 +1104,7 @@
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 @@
}
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);
--- a/codec/encoder/plus/inc/welsEncoderExt.h
+++ b/codec/encoder/plus/inc/welsEncoderExt.h
@@ -104,9 +104,7 @@
private:
sWelsEncCtx* m_pEncContext;
-#if defined(_WIN32)||defined(_MACH_PLATFORM)||defined(__GNUC__)
welsCodecTrace* m_pWelsTrace;
-#endif
SSourcePicture** m_pSrcPicList;
int32_t m_iSrcListSize;
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -60,9 +60,7 @@
*/
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() {
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 @@
}
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 @@
// initialization
WelsSetLogLevel (WELS_LOG_DEFAULT); // no output, WELS_LOG_QUIET
-#endif
}
/* Interfaces override from ISVCEncoder */