History

completing and bug-fixing the screen content MD/ME process

Sijia Chen committed 12 years ago

Commit a964ae81 parent 2eb65d717 files · +404 −289Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+62−35
@@ -46,6 +46,7 @@ · 45 unmodified lines
4646 #include "picture_handle.h"
4747 #include "svc_base_layer_md.h"
4848 #include "svc_encode_slice.h"
49+#include "svc_mode_decision.h"
4950 #include "decode_mb_aux.h"
5051 #include "deblocking.h"
5152 #include "ref_list_mgr_svc.h"
@@ -527,7 +528,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 475 unmodified lines
527528 iCountNumNals += kiNumOfSlice;
528529 assert (iCountNumNals - iOrgNumNals <= MAX_NAL_UNITS_IN_LAYER);
529530 if (kiNumOfSlice > MAX_SLICES_NUM) {
530− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_ERROR,
531+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_ERROR,
531532 "AcquireLayersNals(), num_of_slice(%d) > MAX_SLICES_NUM(%d) per (iDid= %d, qid= %d) settings!\n",
532533 kiNumOfSlice, MAX_SLICES_NUM, iDIndex, 0);
533534 return 1;
@@ -535,7 +536,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 1 unmodified line
535536 }
536537
537538 if (iCountNumNals - iOrgNumNals > MAX_NAL_UNITS_IN_LAYER) {
538− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_ERROR,
539+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_ERROR,
539540 "AcquireLayersNals(), num_of_nals(%d) > MAX_NAL_UNITS_IN_LAYER(%d) per (iDid= %d, qid= %d) settings!\n",
540541 (iCountNumNals - iOrgNumNals), MAX_NAL_UNITS_IN_LAYER, iDIndex, 0);
541542 return 1;
@@ -551,7 +552,7 @@ static inline int32_t AcquireLayersNals (sWelsEncCtx** ppCtx, SWelsSvcCodingPara · 9 unmodified lines
551552
552553 // to check number of layers / nals / slices dependencies, 12/8/2010
553554 if (iCountNumLayers > MAX_LAYER_NUM_OF_FRAME) {
554− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_ERROR, "AcquireLayersNals(), iCountNumLayers(%d) > MAX_LAYER_NUM_OF_FRAME(%d)!",
555+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_ERROR, "AcquireLayersNals(), iCountNumLayers(%d) > MAX_LAYER_NUM_OF_FRAME(%d)!",
555556 iCountNumLayers, MAX_LAYER_NUM_OF_FRAME);
556557 return 1;
557558 }
@@ -955,7 +956,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 397 unmodified lines
955956 & (pDlayerParam->sSliceCfg),
956957 pPps);
957958 if (iResult) {
958− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "InitDqLayers(), InitSlicePEncCtx failed(%d)!", iResult);
959+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "InitDqLayers(), InitSlicePEncCtx failed(%d)!", iResult);
959960 FreeMemorySvc (ppCtx);
960961 return 1;
961962 }
@@ -1278,21 +1279,22 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 316 unmodified lines
12781279 (*ppCtx)->iMvRange = pParam->iUsageType ? EXPANDED_MV_RANGE : CAMERA_STARTMV_RANGE;
12791280 const int32_t kiMvdRange = (pParam->iUsageType ? EXPANDED_MVD_RANGE : ((kiNumDependencyLayers == 1) ? CAMERA_MVD_RANGE :
12801281 CAMERA_HIGHLAYER_MVD_RANGE));
1281− const uint32_t kuiMvdInterTableSize = 1 + (kiMvdRange << 3);//intepel*4=qpel; qpel_mv_range*2=(+/-);
1282− const uint32_t kuiMvdCacheAlignedSize = kuiMvdInterTableSize * sizeof (uint16_t);
1282+ const uint32_t kuiMvdInterTableSize = (kiMvdRange << 2); //intepel*4=qpel
1283+ const uint32_t kuiMvdInterTableStride = 1 + (kuiMvdInterTableSize << 1);//qpel_mv_range*2=(+/-);
1284+ const uint32_t kuiMvdCacheAlignedSize = kuiMvdInterTableStride * sizeof (uint16_t);
12831285 int32_t iVclLayersBsSizeCount = 0;
12841286 int32_t iNonVclLayersBsSizeCount = 0;
12851287 int32_t iTargetSpatialBsSize = 0;
12861288
12871289 if (kiNumDependencyLayers < 1 || kiNumDependencyLayers > MAX_DEPENDENCY_LAYER) {
1288− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc() failed due to invalid iNumDependencyLayers(%d)!\n",
1290+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc() failed due to invalid iNumDependencyLayers(%d)!\n",
12891291 kiNumDependencyLayers);
12901292 FreeMemorySvc (ppCtx);
12911293 return 1;
12921294 }
12931295
12941296 if (pParam->uiGopSize == 0 || (pParam->uiIntraPeriod && ((pParam->uiIntraPeriod % pParam->uiGopSize) != 0))) {
1295− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING,
1297+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING,
12961298 "RequestMemorySvc() failed due to invalid uiIntraPeriod(%d) (=multipler of uiGopSize(%d)!",
12971299 pParam->uiIntraPeriod, pParam->uiGopSize);
12981300 FreeMemorySvc (ppCtx);
@@ -1306,7 +1308,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 7 unmodified lines
13061308
13071309 iResult = AcquireLayersNals (ppCtx, pParam, &iCountLayers, &iCountNals);
13081310 if (iResult) {
1309− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AcquireLayersNals failed(%d)!", iResult);
1311+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AcquireLayersNals failed(%d)!", iResult);
13101312 FreeMemorySvc (ppCtx);
13111313 return 1;
13121314 }
@@ -1359,7 +1361,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 46 unmodified lines
13591361
13601362 // for pSlice bs buffers
13611363 if (pParam->iMultipleThreadIdc > 1 && RequestMtResource (ppCtx, pParam, iCountBsLen, iTargetSpatialBsSize)) {
1362− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMtResource failed!");
1364+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMtResource failed!");
13631365 FreeMemorySvc (ppCtx);
13641366 return 1;
13651367 }
@@ -1406,7 +1408,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 40 unmodified lines
14061408
14071409 // stride tables
14081410 if (AllocStrideTables (ppCtx, kiNumDependencyLayers)) {
1409− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AllocStrideTables failed!");
1411+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), AllocStrideTables failed!");
14101412 FreeMemorySvc (ppCtx);
14111413 return 1;
14121414 }
@@ -1422,7 +1424,7 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 9 unmodified lines
14221424 (*ppCtx)->pVaa = (SVAAFrameInfoExt*)pMa->WelsMallocz (sizeof (SVAAFrameInfoExt), "pVaa");
14231425 WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pVaa), FreeMemorySvc (ppCtx))
14241426 if (RequestMemoryVaaScreen ((*ppCtx)->pVaa, pMa, (*ppCtx)->pSvcParam->iMaxNumRefFrame, iCountMaxMbNum << 2)) {
1425− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMemoryVaaScreen failed!");
1427+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), RequestMemoryVaaScreen failed!");
14261428 FreeMemorySvc (ppCtx);
14271429 return 1;
14281430 }
@@ -1471,20 +1473,22 @@ int32_t RequestMemorySvc (sWelsEncCtx** ppCtx) { · 42 unmodified lines
14711473
14721474 iResult = InitDqLayers (ppCtx);
14731475 if (iResult) {
1474− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitDqLayers failed(%d)!", iResult);
1476+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitDqLayers failed(%d)!", iResult);
14751477 FreeMemorySvc (ppCtx);
14761478 return iResult;
14771479 }
14781480
14791481 if (InitMbListD (ppCtx)) {
1480− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitMbListD failed!");
1482+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_WARNING, "RequestMemorySvc(), InitMbListD failed!");
14811483 FreeMemorySvc (ppCtx);
14821484 return 1;
14831485 }
14841486
1485− (*ppCtx)->pMvdCostTableInter = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTableInter");
1486− WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pMvdCostTableInter), FreeMemorySvc (ppCtx))
1487− MvdCostInit ((*ppCtx)->pMvdCostTableInter, kuiMvdInterTableSize); //should put to a better place?
1487+ (*ppCtx)->iMvdCostTableSize = kuiMvdInterTableSize;
1488+ (*ppCtx)->iMvdCostTableStride = kuiMvdInterTableStride;
1489+ (*ppCtx)->pMvdCostTable = (uint16_t*)pMa->WelsMallocz (52 * kuiMvdCacheAlignedSize, "pMvdCostTable");
1490+ WELS_VERIFY_RETURN_PROC_IF (1, (NULL == (*ppCtx)->pMvdCostTable), FreeMemorySvc (ppCtx))
1491+ MvdCostInit ((*ppCtx)->pMvdCostTable, kuiMvdInterTableStride); //should put to a better place?
14881492
14891493 if ((*ppCtx)->ppRefPicListExt[0] != NULL && (*ppCtx)->ppRefPicListExt[0]->pRef[0] != NULL)
14901494 (*ppCtx)->pDecPic = (*ppCtx)->ppRefPicListExt[0]->pRef[0];
@@ -1741,9 +1745,9 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 250 unmodified lines
17411745 }
17421746
17431747 /* MVD cost tables for Inter */
1744− if (NULL != pCtx->pMvdCostTableInter) {
1745− pMa->WelsFree (pCtx->pMvdCostTableInter, "pMvdCostTableInter");
1746− pCtx->pMvdCostTableInter = NULL;
1748+ if (NULL != pCtx->pMvdCostTable) {
1749+ pMa->WelsFree (pCtx->pMvdCostTable, "pMvdCostTable");
1750+ pCtx->pMvdCostTable = NULL;
17471751 }
17481752
17491753 FreeCodingParam (&pCtx->pSvcParam, pMa);
@@ -1757,7 +1761,7 @@ void FreeMemorySvc (sWelsEncCtx** ppCtx) { · 7 unmodified lines
17571761 #endif//MEMORY_MONITOR
17581762
17591763 if ((*ppCtx)->pMemAlign != NULL) {
1760− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_INFO, "FreeMemorySvc(), verify memory usage (%d bytes) after free..\n",
1764+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "FreeMemorySvc(), verify memory usage (%d bytes) after free..\n",
17611765 (*ppCtx)->pMemAlign->WelsGetMemoryUsage());
17621766 delete (*ppCtx)->pMemAlign;
17631767 (*ppCtx)->pMemAlign = NULL;
@@ -2150,7 +2154,8 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 386 unmodified lines
21502154 if (NULL == ppCtx || NULL == *ppCtx)
21512155 return;
21522156
2153− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pCtx= %p, iThreadCount= %d, iMultipleThreadIdc= %d.\n",
2157+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO,
2158+ "WelsUninitEncoderExt(), pCtx= %p, iThreadCount= %d, iMultipleThreadIdc= %d.\n",
21542159 (void*) (*ppCtx), (*ppCtx)->pSvcParam->iCountThreadsNum, (*ppCtx)->pSvcParam->iMultipleThreadIdc);
21552160
21562161 #if defined(STAT_OUTPUT)
@@ -2168,7 +2173,8 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 11 unmodified lines
21682173 WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);
21692174 WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
21702175 res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
2171− WelsLog (&(*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..\n", iThreadIdx,
2176+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..\n",
2177+ iThreadIdx,
21722178 res);
21732179 (*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx] = 0;
21742180 }
@@ -2333,7 +2339,7 @@ void WelsInitCurrentDlayerMltslc (sWelsEncCtx* pCtx, int32_t iPartitionNum) { · 158 unmodified lines
23332339 / (pSliceCtx->iMaxSliceNumConstraint))
23342340 ) {
23352341
2336− WelsLog (&(pCtx->sLogCtx),
2342+ WelsLog (& (pCtx->sLogCtx),
23372343 WELS_LOG_WARNING,
23382344 "Set-SliceConstraint(%d) too small for current resolution (MB# %d) under QP/BR!\n",
23392345 pSliceCtx->uiSliceSizeConstraint,
@@ -2492,16 +2498,21 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 152 unmodified lines
24922498 const bool kbHighestSpatialLayer =
24932499 (pCtx->pSvcParam->iSpatialLayerNum == (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1));
24942500 SWelsFuncPtrList* pFuncList = pCtx->pFuncList;
2495− SLogContext* pLogCtx = &(pCtx->sLogCtx);
2501+ SLogContext* pLogCtx = & (pCtx->sLogCtx);
24962502 /* function pointers conditional assignment under sWelsEncCtx, layer_mb_enc_rec (in stack) is exclusive */
2497− if (kbHighestSpatialLayer && pCtx->pSvcParam->iUsageType == CAMERA_VIDEO_REAL_TIME) {
2503+ if ((pCtx->pSvcParam->iUsageType == CAMERA_VIDEO_REAL_TIME && kbHighestSpatialLayer) ||
2504+ (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME && P_SLICE == pCtx->eSliceType
2505+ && kbHighestSpatialLayer) //TODO: here is for sync with the origin code, consider the design again with more tests
2506+ ) {
24982507 SetFastCodingFunc (pFuncList);
24992508 } else {
25002509 SetNormalCodingFunc (pFuncList);
25012510 }
25022511
25032512 if (P_SLICE == pCtx->eSliceType) {
2504− pFuncList->pfMotionSearch[0] = WelsMotionEstimateSearch;
2513+ for (int i = 0; i < BLOCK_STATIC_IDC_ALL; i++) {
2514+ pFuncList->pfMotionSearch[i] = WelsMotionEstimateSearch;
2515+ }
25052516 pFuncList->pfSearchMethod[BLOCK_16x16] =
25062517 pFuncList->pfSearchMethod[BLOCK_16x8] =
25072518 pFuncList->pfSearchMethod[BLOCK_8x16] =
@@ -2509,6 +2520,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 1 unmodified line
25092520 pFuncList->pfSearchMethod[BLOCK_4x4] = WelsDiamondSearch;
25102521 pFuncList->pfFirstIntraMode = WelsMdFirstIntraMode;
25112522 pFuncList->sSampleDealingFuncs.pfMeCost = pCtx->pFuncList->sSampleDealingFuncs.pfSampleSatd;
2523+ pFuncList->pfSetScrollingMv = SetScrollingMvToMdNull;
2524+
25122525 if (kbHighestSpatialLayer) {
25132526 pFuncList->pfCalculateSatd = NotCalculateSatdCost;
25142527 pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaa;
@@ -2518,7 +2531,6 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 3 unmodified lines
25182531 }
25192532 }
25202533
2521− return;
25222534 //to init at each frame will be needed when dealing with hybrid content (camera+screen)
25232535 if (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
25242536 if (P_SLICE == pCtx->eSliceType) {
@@ -2526,6 +2538,17 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 1 unmodified line
25262538 pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaaOnScreen;
25272539
25282540 //ME related func pointers
2541+ SVAAFrameInfoExt* pVaaExt = static_cast<SVAAFrameInfoExt*> (pCtx->pVaa);
2542+ if (pVaaExt->sScrollDetectInfo.bScrollDetectFlag
2543+ && (pVaaExt->sScrollDetectInfo.iScrollMvX | pVaaExt->sScrollDetectInfo.iScrollMvY)) {
2544+ pFuncList->pfSetScrollingMv = SetScrollingMvToMd;
2545+ } else {
2546+ pFuncList->pfSetScrollingMv = SetScrollingMvToMdNull;
2547+ }
2548+
2549+ pFuncList->pfMotionSearch[NO_STATIC] = WelsMotionEstimateSearch;
2550+ pFuncList->pfMotionSearch[COLLOCATED_STATIC] = WelsMotionEstimateSearchStatic;
2551+ pFuncList->pfMotionSearch[SCROLLED_STATIC] = WelsMotionEstimateSearchScrolled;
25292552 //ME16x16
25302553 if (!SetMeMethod (ME_DIA_CROSS, pFuncList->pfSearchMethod[BLOCK_16x16])) {
25312554 WelsLog (pLogCtx, WELS_LOG_WARNING, "SetMeMethod(BLOCK_16x16) ME_DIA_CROSS unsuccessful, switched to default search\n");
@@ -2547,8 +2570,7 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 15 unmodified lines
25472570 pFeatureSearchPreparation->pRefBlockFeature = pScreenBlockFeatureStorage;
25482571 if (pFeatureSearchPreparation->bFMESwitchFlag
25492572 && !pScreenBlockFeatureStorage->bRefBlockFeatureCalculated) {
2550− //TODO: use ORIGIN of reference when preprocessing is ready
2551− PerformFMEPreprocess (pFuncList, pCurLayer->pRefPic, pFeatureSearchPreparation->pFeatureOfBlock,
2573+ PerformFMEPreprocess (pFuncList, pCurLayer->pRefOri[0], pFeatureSearchPreparation->pFeatureOfBlock,
25522574 pScreenBlockFeatureStorage);
25532575 }
25542576
@@ -2556,7 +2578,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 1 unmodified line
25562578 if (pFeatureSearchPreparation->bFMESwitchFlag && pScreenBlockFeatureStorage->bRefBlockFeatureCalculated
25572579 && (!pScreenBlockFeatureStorage->iIs16x16)) {
25582580 if (!SetMeMethod (ME_DIA_CROSS_FME, pFuncList->pfSearchMethod[BLOCK_8x8])) {
2559− WelsLog (pLogCtx, WELS_LOG_WARNING, "SetMeMethod(BLOCK_8x8) ME_DIA_CROSS_FME unsuccessful, switched to default search\n");
2581+ WelsLog (pLogCtx, WELS_LOG_WARNING,
2582+ "SetMeMethod(BLOCK_8x8) ME_DIA_CROSS_FME unsuccessful, switched to default search\n");
25602583 }
25612584 }
25622585
@@ -2833,7 +2856,7 @@ int32_t WritePadding (sWelsEncCtx* pCtx, int32_t iLen, int32_t& iSize) { · 270 unmodified lines
28332856
28342857 if ((pBs->pBufEnd - pBs->pBufPtr) < iLen || iNal >= pCtx->pOut->iCountNals) {
28352858 #if GOM_TRACE_FLAG
2836− WelsLog (&(pCtx->sLogCtx), WELS_LOG_ERROR,
2859+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR,
28372860 "[RC] paddingcal pBuffer overflow, bufferlen=%lld, paddinglen=%d, iNalIdx= %d, iCountNals= %d\n",
28382861 static_cast<long long int> (pBs->pBufEnd - pBs->pBufPtr), iLen, iNal, pCtx->pOut->iCountNals);
28392862 #endif
@@ -2947,7 +2970,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 107 unmodified lines
29472970 int8_t iCurDid = 0;
29482971 int8_t iCurTid = 0;
29492972 bool bAvcBased = false;
2950− SLogContext* pLogCtx = &(pCtx->sLogCtx);
2973+ SLogContext* pLogCtx = & (pCtx->sLogCtx);
29512974 #if defined(ENABLE_PSNR_CALC)
29522975 float fSnrY = .0f, fSnrU = .0f, fSnrV = .0f;
29532976 #endif//ENABLE_PSNR_CALC
@@ -3366,6 +3389,12 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 412 unmodified lines
33663389 PerformDeblockingFilter (pCtx);
33673390 }
33683391
3392+ pCtx->pFuncList->pfRc.pfWelsRcPictureInfoUpdate (pCtx, iLayerSize);
3393+ pCtx->pDecPic->iFrameAverageQp = pCtx->pWelsSvcRc->iAverageFrameQp;
3394+
3395+ //update scc related
3396+ pCtx->pFuncList->pfUpdateFMESwitch (pCtx->pCurDqLayer);
3397+
33693398 // reference picture list update
33703399 if (eNalRefIdc != NRI_PRI_LOWEST) {
33713400 if (!pCtx->pFuncList->pUpdateRefList (pCtx)) {
@@ -3380,8 +3409,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 8 unmodified lines
33803409
33813410 iFrameSize += iLayerSize;
33823411
3383− pCtx->pFuncList->pfRc.pfWelsRcPictureInfoUpdate (pCtx, iLayerSize);
3384−
33853412 #ifdef ENABLE_FRAME_DUMP
33863413 // Dump reconstruction picture for each sQualityStat layer
33873414 if (iCurDid + 1 < pSvcParam->iSpatialLayerNum)

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