History

add basic strategy for lossy+no LTR route

Sijia Chen committed 12 years ago

Commit cf2cf9e1 parent 6ae38da8 files · +165 −23Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 8 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+11−1
@@ -196,6 +196,12 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 195 unmodified lines
196196 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(),Invalid usage type = %d", pCodingParam->iUsageType);
197197 return ENC_RETURN_UNSUPPORTED_PARA;
198198 }
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+ }
199205 if (pCodingParam->iSpatialLayerNum < 1 || pCodingParam->iSpatialLayerNum > MAX_DEPENDENCY_LAYER) {
200206 WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), monitor invalid pCodingParam->iSpatialLayerNum: %d!",
201207 pCodingParam->iSpatialLayerNum);
@@ -2593,7 +2599,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2391 unmodified lines
25932599 pFeatureSearchPreparation->pRefBlockFeature = pScreenBlockFeatureStorage;
25942600 if (pFeatureSearchPreparation->bFMESwitchFlag
25952601 && !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,
25972604 pScreenBlockFeatureStorage);
25982605 }
25992606
@@ -3164,6 +3171,9 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 564 unmodified lines
31643171 pCtx->iEncoderError = ENC_RETURN_CORRECTED;
31653172 return ENC_RETURN_CORRECTED;
31663173 }
3174+ if (pCtx->eSliceType != I_SLICE) {
3175+ pCtx->pFuncList->pAfterBuildRefList (pCtx);
3176+ }
31673177 #ifdef LONG_TERM_REF_DUMP
31683178 DumpRef (pCtx);
31693179 #endif

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