add basic strategy for lossy+no LTR route

This commit is contained in:
Sijia Chen
2014-09-26 16:40:19 +08:00
parent 6ae38da3ab
commit cf2cf9efd9
8 changed files with 165 additions and 23 deletions

View File

@@ -196,6 +196,12 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa
WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d", pCodingParam->iUsageType);
return ENC_RETURN_UNSUPPORTED_PARA;
}
if ((pCodingParam->iUsageType == SCREEN_CONTENT_REAL_TIME) && (!pCodingParam->bIsLosslessLink
&& pCodingParam->bEnableLongTermReference)) {
WelsLog (pLogCtx, WELS_LOG_WARNING,
"ParamValidationExt(), setting lossy link for LTR under screen, which is not supported yet! Auto disabled LTR!");
pCodingParam->bEnableLongTermReference = false;
}
if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) {
WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!",
pCodingParam->iSpatialLayerNum);
@@ -2593,7 +2599,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) {
pFeatureSearchPreparation->pRefBlockFeature = pScreenBlockFeatureStorage;
if (pFeatureSearchPreparation->bFMESwitchFlag
&& !pScreenBlockFeatureStorage->bRefBlockFeatureCalculated) {
PerformFMEPreprocess (pFuncList, pCurLayer->pRefOri[0], pFeatureSearchPreparation->pFeatureOfBlock,
SPicture* pRef = (pCtx->pSvcParam->bEnableLongTermReference ? pCurLayer->pRefOri[0] : pCurLayer->pRefPic);
PerformFMEPreprocess (pFuncList, pRef, pFeatureSearchPreparation->pFeatureOfBlock,
pScreenBlockFeatureStorage);
}
@@ -3164,6 +3171,9 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour
pCtx->iEncoderError = ENC_RETURN_CORRECTED;
return ENC_RETURN_CORRECTED;
}
if (pCtx->eSliceType != I_SLICE) {
pCtx->pFuncList->pAfterBuildRefList (pCtx);
}
#ifdef LONG_TERM_REF_DUMP
DumpRef (pCtx);
#endif