| 724 | return ENC_RETURN_SUCCESS; |
| 725 | } |
| 726 | int32_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 |
no test coverage detected