Merge pull request #1493 from ruil2/printf

use %lld instead of %8d for longlong type
This commit is contained in:
sijchen 2014-11-04 14:30:36 +08:00
commit b896faa47c
3 changed files with 10 additions and 10 deletions

View File

@ -3059,24 +3059,24 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate) if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
++ pCtx->iCodingIndex; ++ pCtx->iCodingIndex;
pFbi->eFrameType = videoFrameTypeSkip; pFbi->eFrameType = videoFrameTypeSkip;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %8" PRId64", skip one frame", WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld",
(int64_t)pSrcPic->uiTimeStamp); pSrcPic->uiTimeStamp);
return ENC_RETURN_SUCCESS; return ENC_RETURN_SUCCESS;
} }
eFrameType = DecideFrameType (pCtx, iSpatialNum); eFrameType = DecideFrameType (pCtx, iSpatialNum);
if (eFrameType == videoFrameTypeSkip) { if (eFrameType == videoFrameTypeSkip) {
pFbi->eFrameType = eFrameType; pFbi->eFrameType = eFrameType;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %8" PRId64", skip one frame", WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld",
(int64_t)pSrcPic->uiTimeStamp); pSrcPic->uiTimeStamp);
return ENC_RETURN_SUCCESS; return ENC_RETURN_SUCCESS;
} }
//loop each layer to check if have skip frame when RC and frame skip enable //loop each layer to check if have skip frame when RC and frame skip enable
if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum, eFrameType, (uint32_t)pSrcPic->uiTimeStamp)) { if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum, eFrameType, (uint32_t)pSrcPic->uiTimeStamp)) {
pFbi->eFrameType = videoFrameTypeSkip; pFbi->eFrameType = videoFrameTypeSkip;
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %8" PRId64", skip one frame", WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld",
(int64_t)pSrcPic->uiTimeStamp); pSrcPic->uiTimeStamp);
return ENC_RETURN_SUCCESS; return ENC_RETURN_SUCCESS;
} }

View File

@ -767,9 +767,9 @@ void RcTraceFrameBits (void* pCtx, long long uiTimeStamp) {
SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId]; SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG, WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG,
"[Rc] Frame timestamp = %8d, Frame type =%d, encoding_qp%d, average qp = %3d, max qp = %3d, min qp = %3d, index = %8d,\ "[Rc] Frame timestamp = %lld, Frame type =%d, encoding_qp%d, average qp = %3d, max qp = %3d, min qp = %3d, index = %8d,\
iTid = %1d, used = %8d, bitsperframe = %8d, target = %8d, remaingbits = %8d, skipbuffersize = %8d", iTid = %1d, used = %8d, bitsperframe = %8d, target = %8d, remaingbits = %8d, skipbuffersize = %8d",
(uint32_t)uiTimeStamp,pEncCtx->eSliceType, pEncCtx->uiDependencyId, pWelsSvcRc->iAverageFrameQp,pWelsSvcRc->iMaxFrameQp,pWelsSvcRc->iMinFrameQp, uiTimeStamp,pEncCtx->eSliceType, pEncCtx->uiDependencyId, pWelsSvcRc->iAverageFrameQp,pWelsSvcRc->iMaxFrameQp,pWelsSvcRc->iMinFrameQp,
pEncCtx->iFrameIndex, pEncCtx->uiTemporalId, pWelsSvcRc->iFrameDqBits,WELS_DIV_ROUND (pWelsSvcRc->iBitsPerFrame, INT_MULTIPLY), pEncCtx->iFrameIndex, pEncCtx->uiTemporalId, pWelsSvcRc->iFrameDqBits,WELS_DIV_ROUND (pWelsSvcRc->iBitsPerFrame, INT_MULTIPLY),
pWelsSvcRc->iTargetBits, pWelsSvcRc->iRemainingBits, pWelsSvcRc->iBufferSizeSkip); pWelsSvcRc->iTargetBits, pWelsSvcRc->iRemainingBits, pWelsSvcRc->iBufferSizeSkip);

View File

@ -382,7 +382,7 @@ class OpenH264VideoEncoder : public GMPVideoEncoder {
src.pData[3] = nullptr; src.pData[3] = nullptr;
src.iPicWidth = inputImage->Width(); src.iPicWidth = inputImage->Width();
src.iPicHeight = inputImage->Height(); src.iPicHeight = inputImage->Height();
src.uiTimeStamp = inputImage->Timestamp(); src.uiTimeStamp = inputImage->Timestamp()/1000; //encoder needs millisecond
const SSourcePicture* pics = &src; const SSourcePicture* pics = &src;
int result = encoder_->EncodeFrame (pics, &encoded); int result = encoder_->EncodeFrame (pics, &encoded);