ref: a1f6e158ef972c9ae07d125813c8332879f13e91
parent: fc970418faee38029b5609daabb6be875f32e598
author: Martin Storsjö <[email protected]>
date: Tue Feb 18 06:31:55 EST 2014
Move REC_FRAME_COUNT logging into the Initialize2 method
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -233,8 +233,25 @@
return cmInitParaError;
}
}
+
+ return Initialize2 (&sConfig);
+}
+
+int CWelsH264SVCEncoder::Initialize2 (SWelsSvcCodingParam* pCfg) {
+ if (NULL == pCfg) {
+ WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), invalid argv= 0x%p.\n",
+ pCfg);
+ return cmInitParaError;
+ }
+
+ if (m_bInitialFlag) {
+ WelsLog (m_pEncContext, WELS_LOG_WARNING, "CWelsH264SVCEncoder::Initialize(), reinitialize, m_bInitialFlag= %d.\n",
+ m_bInitialFlag);
+ Uninitialize();
+ }
+
#ifdef REC_FRAME_COUNT
- SWelsSvcCodingParam &sEncodingParam = sConfig;
+ SWelsSvcCodingParam &sEncodingParam = *pCfg;
WelsLog (m_pEncContext, WELS_LOG_INFO, "CWelsH264SVCEncoder::Initialize, m_uiCountFrameNum= %d, m_iCspInternal= 0x%x\n",
m_uiCountFrameNum, m_iCspInternal);
WelsLog (m_pEncContext, WELS_LOG_INFO,
@@ -276,22 +293,6 @@
++ i;
}
#endif//REC_FRAME_COUNT
-
- return Initialize2 (&sConfig);
-}
-
-int CWelsH264SVCEncoder::Initialize2 (SWelsSvcCodingParam* pCfg) {
- if (NULL == pCfg) {
- WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), invalid argv= 0x%p.\n",
- pCfg);
- return cmInitParaError;
- }
-
- if (m_bInitialFlag) {
- WelsLog (m_pEncContext, WELS_LOG_WARNING, "CWelsH264SVCEncoder::Initialize(), reinitialize, m_bInitialFlag= %d.\n",
- m_bInitialFlag);
- Uninitialize();
- }
const int32_t iColorspace = pCfg->iInputCsp;
if (0 == iColorspace) {