astyle two files
This commit is contained in:
parent
2c69638773
commit
b932547fe8
@ -95,8 +95,8 @@ int32_t WelsBitRateVerification (SLogContext* pLogCtx, SSpatialLayerConfig* pLay
|
|||||||
pLayerParam->iMaxSpatialBitrate);
|
pLayerParam->iMaxSpatialBitrate);
|
||||||
}
|
}
|
||||||
WelsLog (pLogCtx, WELS_LOG_INFO,
|
WelsLog (pLogCtx, WELS_LOG_INFO,
|
||||||
"Level is changed from (%d) to (%d) according to the maxbitrate",
|
"Level is changed from (%d) to (%d) according to the maxbitrate",
|
||||||
iCurLevel, pLayerParam->uiLevelIdc);
|
iCurLevel, pLayerParam->uiLevelIdc);
|
||||||
}
|
}
|
||||||
if (pLayerParam->iMaxSpatialBitrate < pLayerParam->iSpatialBitrate) {
|
if (pLayerParam->iMaxSpatialBitrate < pLayerParam->iSpatialBitrate) {
|
||||||
WelsLog (pLogCtx, WELS_LOG_ERROR,
|
WelsLog (pLogCtx, WELS_LOG_ERROR,
|
||||||
@ -533,18 +533,19 @@ int32_t WelsEncoderApplyBitRate (SLogContext* pLogCtx, SWelsSvcCodingParam* pPar
|
|||||||
}
|
}
|
||||||
return ENC_RETURN_SUCCESS;
|
return ENC_RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
int32_t WelsEncoderApplyBitVaryRang(SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iRang){
|
int32_t WelsEncoderApplyBitVaryRang (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iRang) {
|
||||||
SSpatialLayerConfig* pLayerParam;
|
SSpatialLayerConfig* pLayerParam;
|
||||||
const int32_t iNumLayers = pParam->iSpatialLayerNum;
|
const int32_t iNumLayers = pParam->iSpatialLayerNum;
|
||||||
for (int32_t i = 0; i < iNumLayers; i++) {
|
for (int32_t i = 0; i < iNumLayers; i++) {
|
||||||
pLayerParam = & (pParam->sSpatialLayers[i]);
|
pLayerParam = & (pParam->sSpatialLayers[i]);
|
||||||
pLayerParam->iMaxSpatialBitrate = WELS_MIN((int) (pLayerParam->iSpatialBitrate * (1+ iRang/100.0)),pLayerParam->iMaxSpatialBitrate);
|
pLayerParam->iMaxSpatialBitrate = WELS_MIN ((int) (pLayerParam->iSpatialBitrate * (1 + iRang / 100.0)),
|
||||||
if (WelsBitRateVerification (pLogCtx, pLayerParam, i) != ENC_RETURN_SUCCESS)
|
pLayerParam->iMaxSpatialBitrate);
|
||||||
return ENC_RETURN_UNSUPPORTED_PARA;
|
if (WelsBitRateVerification (pLogCtx, pLayerParam, i) != ENC_RETURN_SUCCESS)
|
||||||
WelsLog (pLogCtx, WELS_LOG_INFO,
|
return ENC_RETURN_UNSUPPORTED_PARA;
|
||||||
"WelsEncoderApplyBitVaryRang:UpdateMaxBitrate layerId= %d,iMaxSpatialBitrate = %d", i, pLayerParam->iMaxSpatialBitrate);
|
WelsLog (pLogCtx, WELS_LOG_INFO,
|
||||||
}
|
"WelsEncoderApplyBitVaryRang:UpdateMaxBitrate layerId= %d,iMaxSpatialBitrate = %d", i, pLayerParam->iMaxSpatialBitrate);
|
||||||
return ENC_RETURN_SUCCESS;
|
}
|
||||||
|
return ENC_RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -2293,8 +2294,8 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) {
|
|||||||
WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
|
WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
|
||||||
res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
|
res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
|
||||||
WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",
|
WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",
|
||||||
iThreadIdx,
|
iThreadIdx,
|
||||||
res);
|
res);
|
||||||
(*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] = 0;
|
(*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] = 0;
|
||||||
}
|
}
|
||||||
++ iThreadIdx;
|
++ iThreadIdx;
|
||||||
@ -3101,7 +3102,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
|
|||||||
iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, pSrcPic);
|
iSpatialNum = pCtx->pVpp->BuildSpatialPicList (pCtx, pSrcPic);
|
||||||
|
|
||||||
if (pCtx->pSvcParam->bEnableFrameSkip) {
|
if (pCtx->pSvcParam->bEnableFrameSkip) {
|
||||||
UpdateMaxBrCheckWindowStatus(pCtx, iSpatialNum, pSrcPic->uiTimeStamp);
|
UpdateMaxBrCheckWindowStatus (pCtx, iSpatialNum, pSrcPic->uiTimeStamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
|
if (iSpatialNum < 1) { // skip due to temporal layer settings (different frame rate)
|
||||||
@ -3114,10 +3115,10 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
|
|||||||
|
|
||||||
eFrameType = DecideFrameType (pCtx, iSpatialNum);
|
eFrameType = DecideFrameType (pCtx, iSpatialNum);
|
||||||
if (eFrameType == videoFrameTypeSkip) {
|
if (eFrameType == videoFrameTypeSkip) {
|
||||||
UpdateBufferWhenFrameSkipped(pCtx, iSpatialNum);
|
UpdateBufferWhenFrameSkipped (pCtx, iSpatialNum);
|
||||||
pFbi->eFrameType = eFrameType;
|
pFbi->eFrameType = eFrameType;
|
||||||
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld, skip one frame, continual skipped %d frames",
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld, skip one frame, continual skipped %d frames",
|
||||||
pSrcPic->uiTimeStamp, pCtx->iContinualSkipFrames);
|
pSrcPic->uiTimeStamp, pCtx->iContinualSkipFrames);
|
||||||
return ENC_RETURN_SUCCESS;
|
return ENC_RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3125,7 +3126,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
|
|||||||
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 = %lld, skip one frame, continual skipped %d frames",
|
WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, "[Rc] Frame timestamp = %lld, skip one frame, continual skipped %d frames",
|
||||||
pSrcPic->uiTimeStamp, pCtx->iContinualSkipFrames);
|
pSrcPic->uiTimeStamp, pCtx->iContinualSkipFrames);
|
||||||
return ENC_RETURN_SUCCESS;
|
return ENC_RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user