Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1044,7 +1044,8 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 1043 unmodified lines | ||
| 1044 | 1044 | break; |
| 1045 | 1045 | case ENCODER_OPTION_BITS_VARY_PERCENTAGE: { |
| 1046 | 1046 | int32_t iValue = * (static_cast<int32_t*> (pOption)); |
| 1047 | − m_pEncContext->pSvcParam->iBitsVaryPercentage = iValue; | |
| 1047 | + m_pEncContext->pSvcParam->iBitsVaryPercentage = WELS_CLIP3(iValue,0,100); | |
| 1048 | + WelsEncoderApplyBitVaryRang(&m_pWelsTrace->m_sLogCtx, m_pEncContext->pSvcParam, m_pEncContext->pSvcParam->iBitsVaryPercentage); | |
| 1048 | 1049 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 1049 | 1050 | "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITS_VARY_PERCENTAGE,iBitsVaryPercentage = %d", iValue); |
| 1050 | 1051 | } |