History

fix wrong setting at encoder SetOption ENCODER_OPTION_IDR_INTERVAL

sijchen@cisco.com committed 8 years ago

Commit cb346fe1 parent b578def3 files · +23 −5Browse files

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

Unified · Split

codec/encoder/plus/src/welsEncoderExt.cpp+7−4
@@ -715,19 +715,22 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 714 unmodified lines
715 715
716 m_iCspInternal = iColorspace;716 m_iCspInternal = iColorspace;
717 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,717 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
718 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_DATAFORMAT, m_iCspInternal= 0x%x", m_iCspInternal);718 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_DATAFORMAT, m_iCspInternal = 0x%x", m_iCspInternal);
719 }719 }
720 break;720 break;
721 case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval721 case ENCODER_OPTION_IDR_INTERVAL: { // IDR Interval
722 int32_t iValue = * ((int32_t*)pOption);722 int32_t iValue = * ((int32_t*)pOption);
723 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,723 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
724 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_IDR_INTERVAL iValue= %d", iValue);724 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_IDR_INTERVAL iValue = %d", iValue);
725 if (iValue < -1 || iValue == 0)725 if (iValue <= -1 || iValue == 0) {
726 iValue = 1;726 iValue = 0;
727 }
727 if (iValue == (int32_t)m_pEncContext->pSvcParam->uiIntraPeriod) {728 if (iValue == (int32_t)m_pEncContext->pSvcParam->uiIntraPeriod) {
728 return cmResultSuccess;729 return cmResultSuccess;
729 }730 }
730 m_pEncContext->pSvcParam->uiIntraPeriod = (uint32_t)iValue;731 m_pEncContext->pSvcParam->uiIntraPeriod = (uint32_t)iValue;
732 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
733 "CWelsH264SVCEncoder::SetOption():ENCODER_OPTION_IDR_INTERVAL uiIntraPeriod updated to %d", m_pEncContext->pSvcParam->uiIntraPeriod);
731 }734 }
732 break;735 break;
733 case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter736 case ENCODER_OPTION_SVC_ENCODE_PARAM_BASE: { // SVC Encoding Parameter

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