Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -818,16 +818,20 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 817 unmodified lines | ||
| 818 | 818 | FilterLTRMarkingFeedback (m_pEncContext, fb); |
| 819 | 819 | } |
| 820 | 820 | break; |
| 821 | − case ENCOCER_LTR_MARKING_PERIOD: { | |
| 821 | + case ENCODER_LTR_MARKING_PERIOD: { | |
| 822 | 822 | uint32_t iValue = * ((uint32_t*) (pOption)); |
| 823 | 823 | m_pEncContext->pSvcParam->iLtrMarkPeriod = iValue; |
| 824 | 824 | } |
| 825 | 825 | break; |
| 826 | 826 | case ENCODER_OPTION_LTR: { |
| 827 | − uint32_t iValue = * ((uint32_t*) (pOption)); | |
| 828 | − m_pEncContext->pSvcParam->bEnableLongTermReference = iValue ? true : false; | |
| 829 | − WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, " CWelsH264SVCEncoder::SetOption enable LTR = %d", | |
| 830 | − m_pEncContext->pSvcParam->bEnableLongTermReference); | |
| 827 | + SLTRConfig* pLTRValue = ((SLTRConfig*) (pOption)); | |
| 828 | + SWelsSvcCodingParam sConfig; | |
| 829 | + memcpy (&sConfig, m_pEncContext->pSvcParam, sizeof (SWelsSvcCodingParam)); | |
| 830 | + sConfig.bEnableLongTermReference = pLTRValue->bEnableLongTermReference; | |
| 831 | + sConfig.iLTRRefNum = pLTRValue->iLTRRefNum; | |
| 832 | + WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, " CWelsH264SVCEncoder::SetOption enable LTR = %d,ltrnum = %d", | |
| 833 | + sConfig.bEnableLongTermReference, sConfig.iLTRRefNum); | |
| 834 | + WelsEncoderParamAdjust (&m_pEncContext, &sConfig); | |
| 831 | 835 | } |
| 832 | 836 | break; |
| 833 | 837 | case ENCODER_OPTION_ENABLE_SSEI: { |