ref: 52419bd13eb806740f933f79bd785f13056dc3c5
parent: 8c8cd50c964332c6cecfe5add23174a3d62bd7d3
parent: 0affe66f938f6fa3ee56e7b3e117552750638ef3
author: Ethan Hugg <ethanhugg@gmail.com>
date: Thu Oct 2 08:26:45 EDT 2014
Merge pull request #1400 from mstorsjo/warning-fix Fix compiler warnings
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3029,7 +3029,7 @@
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
++ pCtx->iCodingIndex;
pFbi->eFrameType = videoFrameTypeSkip;
- WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,"[Rc] Frame timestamp = %8d, skip one frame",pSrcPic->uiTimeStamp);
+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,"[Rc] Frame timestamp = %8"PRId64", skip one frame", (int64_t)pSrcPic->uiTimeStamp);
return ENC_RETURN_SUCCESS;
}
@@ -3036,7 +3036,7 @@
eFrameType = DecideFrameType (pCtx, iSpatialNum);
if (eFrameType == videoFrameTypeSkip) {
pFbi->eFrameType = eFrameType;
- WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,"[Rc] Frame timestamp = %8d, skip one frame",pSrcPic->uiTimeStamp);
+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,"[Rc] Frame timestamp = %8"PRId64", skip one frame", (int64_t)pSrcPic->uiTimeStamp);
return ENC_RETURN_SUCCESS;
}
@@ -3043,7 +3043,7 @@
//loop each layer to check if have skip frame when RC and frame skip enable
if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum, eFrameType, (uint32_t)pSrcPic->uiTimeStamp)) {
pFbi->eFrameType = videoFrameTypeSkip;
- WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,"[Rc] Frame timestamp = %8d, skip one frame",pSrcPic->uiTimeStamp);
+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,"[Rc] Frame timestamp = %8"PRId64", skip one frame", (int64_t)pSrcPic->uiTimeStamp);
return ENC_RETURN_SUCCESS;
}
--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -161,8 +161,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
- int frameSize = p.width * p.height * 3 / 2;
-
int32_t iTraceLevel = WELS_LOG_QUIET;
encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -199,7 +197,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
- int frameSize = p.width * p.height * 3 / 2;
int32_t iTraceLevel = WELS_LOG_QUIET;
encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -239,7 +236,6 @@
//init for encoder
// I420: 1(Y) + 1/4(U) + 1/4(V)
- int frameSize = p.width * p.height * 3 / 2;
int32_t iTraceLevel = WELS_LOG_QUIET;
encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -482,7 +478,6 @@
encoder_->Uninitialize();
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
@@ -578,7 +573,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
@@ -644,7 +638,6 @@
rv = decoder_->Initialize (&decParam);
ASSERT_EQ (0, rv);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
int32_t iTraceLevel = WELS_LOG_QUIET;
@@ -701,7 +694,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
int32_t iTraceLevel = WELS_LOG_QUIET;
@@ -760,7 +752,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
int32_t iTraceLevel = WELS_LOG_QUIET;
encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &iTraceLevel);
@@ -833,7 +824,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
int32_t iTraceLevel = WELS_LOG_QUIET;
@@ -896,7 +886,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
int32_t iTraceLevel = WELS_LOG_QUIET;
@@ -954,7 +943,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
int32_t iTraceLevel = WELS_LOG_QUIET;
@@ -1020,7 +1008,6 @@
int rv = encoder_->InitializeExt (¶m_);
ASSERT_TRUE (rv == cmResultSuccess);
m_LTR_Recover_Request.uiFeedbackType = NO_RECOVERY_REQUSET;
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
@@ -1094,7 +1081,6 @@
EXPECT_EQ (uiGet, uiEcIdc);
//Start for enc/dec
- int frameSize = p.width * p.height * 3 / 2;
prepareEncDecParam(p);
int32_t iTraceLevel = WELS_LOG_QUIET;
@@ -1180,7 +1166,6 @@
EXPECT_EQ (uiGet, uiEcIdc);
//Start for enc/dec
- int frameSize = p.width * p.height * 3 / 2;
int iIdx = 0;
int len = 0;
unsigned char* pData[3] = { NULL };
@@ -1316,7 +1301,6 @@
decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
//Start for enc/dec
- int frameSize = p.width * p.height * 3 / 2;
int iIdx = 0;
int len = 0;
unsigned char* pData[3] = { NULL };
@@ -1451,7 +1435,6 @@
decoder_->SetOption (DECODER_OPTION_TRACE_LEVEL, &iTraceLevel);
//Start for enc/dec
- int frameSize = p.width * p.height * 3 / 2;
int iIdx = 0;
int len = 0;
unsigned char* pData[3] = { NULL };