Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 8 files). Show all
Unified · Split
| @@ -2085,6 +2085,8 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 2084 unmodified lines | ||
| 2085 | 2085 | ); |
| 2086 | 2086 | #endif//MEMORY_MONITOR |
| 2087 | 2087 | |
| 2088 | + pCtx->iStatisticsLogInterval = STATISTICS_LOG_INTERVAL_MS; | |
| 2089 | + | |
| 2088 | 2090 | *ppCtx = pCtx; |
| 2089 | 2091 | |
| 2090 | 2092 | WelsLog (pLogCtx, WELS_LOG_DEBUG, "WelsInitEncoderExt(), pCtx= 0x%p.", (void*)pCtx); |
| @@ -3736,6 +3738,8 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 1645 unmodified lines | ||
| 3736 | 3738 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage |
| 3737 | 3739 | uiTmpIdrPicId = (*ppCtx)->sPSOVector.uiIdrPicId; |
| 3738 | 3740 | |
| 3741 | + SEncoderStatistics sTempEncoderStatistics = (*ppCtx)->sEncoderStatistics; | |
| 3742 | + | |
| 3739 | 3743 | WelsUninitEncoderExt (ppCtx); |
| 3740 | 3744 | |
| 3741 | 3745 | /* Update new parameters */ |
| @@ -3746,10 +3750,13 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 4 unmodified lines | ||
| 3746 | 3750 | (*ppCtx)->pVpp->WelsPreprocessReset (*ppCtx); |
| 3747 | 3751 | //if WelsInitEncoderExt succeed |
| 3748 | 3752 | |
| 3753 | + //load back the needed structure | |
| 3749 | 3754 | //for FLEXIBLE_PARASET_ID |
| 3750 | 3755 | memcpy ((*ppCtx)->sPSOVector.sParaSetOffsetVariable, sTmpPsoVariable, |
| 3751 | 3756 | (PARA_SET_TYPE)*sizeof (SParaSetOffsetVariable)); // confirmed_safe_unsafe_usage |
| 3752 | 3757 | (*ppCtx)->sPSOVector.uiIdrPicId = uiTmpIdrPicId; |
| 3758 | + //for sEncoderStatistics | |
| 3759 | + (*ppCtx)->sEncoderStatistics = sTempEncoderStatistics; | |
| 3753 | 3760 | } else { |
| 3754 | 3761 | /* maybe adjustment introduced in bitrate or little settings adjustment and so on.. */ |
| 3755 | 3762 | pNewParam->iNumRefFrame = WELS_CLIP3 (pNewParam->iNumRefFrame, MIN_REF_PIC_COUNT, |