MCPcopy Create free account
hub / github.com/cisco/openh264 / WelsEncoderApplyBitVaryRang

Function WelsEncoderApplyBitVaryRang

codec/encoder/core/src/encoder_ext.cpp:726–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724 return ENC_RETURN_SUCCESS;
725}
726int32_t WelsEncoderApplyBitVaryRang (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iRang) {
727 SSpatialLayerConfig* pLayerParam;
728 const int32_t iNumLayers = pParam->iSpatialLayerNum;
729 for (int32_t i = 0; i < iNumLayers; i++) {
730 pLayerParam = & (pParam->sSpatialLayers[i]);
731 pLayerParam->iMaxSpatialBitrate = WELS_MIN ((int) (pLayerParam->iSpatialBitrate * (1 + iRang / 100.0)),
732 pLayerParam->iMaxSpatialBitrate);
733 if (WelsBitRateVerification (pLogCtx, pLayerParam, i) != ENC_RETURN_SUCCESS)
734 return ENC_RETURN_UNSUPPORTED_PARA;
735 WelsLog (pLogCtx, WELS_LOG_INFO,
736 "WelsEncoderApplyBitVaryRang:UpdateMaxBitrate layerId= %d,iMaxSpatialBitrate = %d", i, pLayerParam->iMaxSpatialBitrate);
737 }
738 return ENC_RETURN_SUCCESS;
739}
740
741/*!
742 * \brief acquire count number of layers and NALs based on configurable paramters dependency

Callers 1

SetOptionMethod · 0.85

Calls 2

WelsBitRateVerificationFunction · 0.85
WelsLogFunction · 0.85

Tested by

no test coverage detected