Merge pull request #302 from mstorsjo/remove-useless-ifdef

Remove useless ifdefs
This commit is contained in:
volvet 2014-02-18 18:54:12 +08:00
commit e495debcd8
3 changed files with 0 additions and 16 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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 */