History

add some traces

ruil2 committed 11 years ago

Commit 3025c581 parent a0b08661 file · +13 −10Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+13−10
@@ -494,7 +494,8 @@ void WelsEncoderApplyBitRate (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, · 493 unmodified lines
494494 pLayerParam = & (pParam->sSpatialLayers[i]);
495495 fRatio = pLayerParam->iSpatialBitrate / (static_cast<float> (iOrigTotalBitrate));
496496 pLayerParam->iSpatialBitrate = static_cast<int32_t> (pParam->iTargetBitrate * fRatio);
497− if ( UNSPECIFIED_BIT_RATE != pLayerParam->iMaxSpatialBitrate && pLayerParam->iSpatialBitrate > pLayerParam->iMaxSpatialBitrate ) {
497+ if (UNSPECIFIED_BIT_RATE != pLayerParam->iMaxSpatialBitrate
498+ && pLayerParam->iSpatialBitrate > pLayerParam->iMaxSpatialBitrate) {
498499 WelsLog (pLogCtx, WELS_LOG_WARNING,
499500 "WelsEncoderApplyBitRate(), iSpatialBitrate(%d) > iMaxSpatialBitrate(%d) at Layer %d, limiting iSpatialBitrate to iMaxSpatialBitrate!",
500501 pLayerParam->iSpatialBitrate, pLayerParam->iMaxSpatialBitrate, iLayer);
@@ -503,7 +504,8 @@ void WelsEncoderApplyBitRate (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, · 2 unmodified lines
503504 }
504505 } else {
505506 SSpatialLayerConfig* pLayerParam = & (pParam->sSpatialLayers[iLayer]);
506− if ( UNSPECIFIED_BIT_RATE != pLayerParam->iMaxSpatialBitrate && pLayerParam->iSpatialBitrate > pLayerParam->iMaxSpatialBitrate ) {
507+ if (UNSPECIFIED_BIT_RATE != pLayerParam->iMaxSpatialBitrate
508+ && pLayerParam->iSpatialBitrate > pLayerParam->iMaxSpatialBitrate) {
507509 WelsLog (pLogCtx, WELS_LOG_WARNING,
508510 "WelsEncoderApplyBitRate(), iSpatialBitrate(%d) > iMaxSpatialBitrate(%d) at Layer %d, limiting iSpatialBitrate to iMaxSpatialBitrate!",
509511 pLayerParam->iSpatialBitrate, pLayerParam->iMaxSpatialBitrate, iLayer);
@@ -3087,24 +3089,24 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 2577 unmodified lines
30873089 if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
30883090 ++ pCtx->iCodingIndex;
30893091 pFbi->eFrameType = videoFrameTypeSkip;
3090− WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld",
3091− pSrcPic->uiTimeStamp);
3092+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld, Frame type =%d",
3093+ pSrcPic->uiTimeStamp, pFbi->eFrameType);
30923094 return ENC_RETURN_SUCCESS;
30933095 }
30943096
30953097 eFrameType = DecideFrameType (pCtx, iSpatialNum);
30963098 if (eFrameType == videoFrameTypeSkip) {
30973099 pFbi->eFrameType = eFrameType;
3098− WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld",
3099− pSrcPic->uiTimeStamp);
3100+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld, Frame type =%d",
3101+ pSrcPic->uiTimeStamp, pFbi->eFrameType);
31003102 return ENC_RETURN_SUCCESS;
31013103 }
31023104
31033105 //loop each layer to check if have skip frame when RC and frame skip enable
31043106 if (CheckFrameSkipBasedMaxbr (pCtx, iSpatialNum, eFrameType, pSrcPic->uiTimeStamp)) {
31053107 pFbi->eFrameType = videoFrameTypeSkip;
3106− WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld",
3107− pSrcPic->uiTimeStamp);
3108+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld, Frame type =%d",
3109+ pSrcPic->uiTimeStamp, pFbi->eFrameType);
31083110 return ENC_RETURN_SUCCESS;
31093111 }
31103112 InitFrameCoding (pCtx, eFrameType);
@@ -3701,8 +3703,9 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 590 unmodified lines
37013703 pFbi->iLayerNum = iLayerNum;
37023704 pFbi->iSubSeqId = GetSubSequenceId (pCtx, eFrameType);
37033705
3704− WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsEncoderEncodeExt() OutputInfo iLayerNum = %d,iSubSeqId = %d", iLayerNum,
3705− pFbi->iSubSeqId);
3706+ WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsEncoderEncodeExt() OutputInfo iLayerNum = %d,iSubSeqId = %d,iFrameSize = %d",
3707+ iLayerNum,
3708+ pFbi->iSubSeqId, iFrameSize);
37063709 for (int32_t i = 0; i < iLayerNum; i++)
37073710 WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsEncoderEncodeExt() OutputInfo iLayerId = %d,iNalType = %d,iNalCount = %d", i,
37083711 pFbi->sLayerInfo[i].uiLayerType, pFbi->sLayerInfo[i].iNalCount);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t