History

add maxbitrate verification

ruil2 committed 11 years ago

Commit d543ae81 parent 305a24211 files · +5739 −8499Browse files

Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 11 files). Show all

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+19−7
@@ -834,9 +834,16 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 833 unmodified lines
834 break;834 break;
835 }835 }
836 //adjust to valid range836 //adjust to valid range
837 WelsEncoderApplyBitRate (&m_pWelsTrace->m_sLogCtx, m_pEncContext->pSvcParam, pInfo->iLayer);837 if (WelsEncoderApplyBitRate (&m_pWelsTrace->m_sLogCtx, m_pEncContext->pSvcParam, pInfo->iLayer)) {
838 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,838 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
839 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE layerId= %d,iSpatialBitrate = %d", pInfo->iLayer, iBitrate);839 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE layerId= %d,iSpatialBitrate = %d", pInfo->iLayer, iBitrate);
840 return cmInitParaError;
841 } else {
842 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
843 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE layerId= %d,iSpatialBitrate = %d", pInfo->iLayer, iBitrate);
844
845 }
846
840 }847 }
841 break;848 break;
842 case ENCODER_OPTION_MAX_BITRATE: { // Target bit-rate849 case ENCODER_OPTION_MAX_BITRATE: { // Target bit-rate
@@ -879,10 +886,15 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 36 unmodified lines
879 break;886 break;
880 }887 }
881 //adjust to valid range888 //adjust to valid range
882 WelsEncoderApplyBitRate (&m_pWelsTrace->m_sLogCtx, m_pEncContext->pSvcParam, pInfo->iLayer);889 if (WelsEncoderApplyBitRate (&m_pWelsTrace->m_sLogCtx, m_pEncContext->pSvcParam, pInfo->iLayer)) {
883 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,890 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
884 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_MAX_BITRATE layerId= %d,iMaxSpatialBitrate = %d", pInfo->iLayer,891 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE layerId= %d,iMaxSpatialBitrate = %d", pInfo->iLayer, iBitrate);
885 iBitrate);892 return cmInitParaError;
893 } else {
894 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
895 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_BITRATE layerId= %d,iMaxSpatialBitrate = %d", pInfo->iLayer, iBitrate);
896
897 }
886 }898 }
887 break;899 break;
888 case ENCODER_OPTION_RC_MODE: { // 0:quality mode;1:bit-rate mode;2:bitrate limited mode900 case ENCODER_OPTION_RC_MODE: { // 0:quality mode;1:bit-rate mode;2:bitrate limited mode

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