Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 8 files). Show all
Unified · Split
| @@ -196,6 +196,12 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 195 unmodified lines | ||
| 196 | 196 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d", pCodingParam->iUsageType); |
| 197 | 197 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 198 | 198 | } |
| 199 | + if ((pCodingParam->iUsageType == SCREEN_CONTENT_REAL_TIME) && (!pCodingParam->bIsLosslessLink | |
| 200 | + && pCodingParam->bEnableLongTermReference)) { | |
| 201 | + WelsLog (pLogCtx, WELS_LOG_WARNING, | |
| 202 | + "ParamValidationExt(), setting lossy link for LTR under screen, which is not supported yet! Auto disabled LTR!"); | |
| 203 | + pCodingParam->bEnableLongTermReference = false; | |
| 204 | + } | |
| 199 | 205 | if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) { |
| 200 | 206 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!", |
| 201 | 207 | pCodingParam->iSpatialLayerNum); |
| @@ -2593,7 +2599,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2391 unmodified lines | ||
| 2593 | 2599 | pFeatureSearchPreparation->pRefBlockFeature = pScreenBlockFeatureStorage; |
| 2594 | 2600 | if (pFeatureSearchPreparation->bFMESwitchFlag |
| 2595 | 2601 | && !pScreenBlockFeatureStorage->bRefBlockFeatureCalculated) { |
| 2596 | − PerformFMEPreprocess (pFuncList, pCurLayer->pRefOri[0], pFeatureSearchPreparation->pFeatureOfBlock, | |
| 2602 | + SPicture* pRef = (pCtx->pSvcParam->bEnableLongTermReference ? pCurLayer->pRefOri[0] : pCurLayer->pRefPic); | |
| 2603 | + PerformFMEPreprocess (pFuncList, pRef, pFeatureSearchPreparation->pFeatureOfBlock, | |
| 2597 | 2604 | pScreenBlockFeatureStorage); |
| 2598 | 2605 | } |
| 2599 | 2606 | |
| @@ -3164,6 +3171,9 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 564 unmodified lines | ||
| 3164 | 3171 | pCtx->iEncoderError = ENC_RETURN_CORRECTED; |
| 3165 | 3172 | return ENC_RETURN_CORRECTED; |
| 3166 | 3173 | } |
| 3174 | + if (pCtx->eSliceType != I_SLICE) { | |
| 3175 | + pCtx->pFuncList->pAfterBuildRefList (pCtx); | |
| 3176 | + } | |
| 3167 | 3177 | #ifdef LONG_TERM_REF_DUMP |
| 3168 | 3178 | DumpRef (pCtx); |
| 3169 | 3179 | #endif |