History

add the condition branch for screen content

ruil2 committed 12 years ago

Commit 27da2b21 parent c43e1c83 files · +29 −7Browse files

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

Unified · Split

codec/encoder/core/src/wels_preprocess.cpp+10−6
@@ -279,7 +279,11 @@ int32_t CWelsPreProcess::AllocSpatialPictures (sWelsEncCtx* pCtx, SWelsSvcCoding · 278 unmodified lines
279279 ++ i;
280280 } while (i < kuiRefNumInTemporal);
281281
282− m_uiSpatialLayersInTemporal[iDlayerIndex] = kuiLayerInTemporal;
282+ if(pParam->iUsageType == SCREEN_CONTENT_REAL_TIME)
283+ m_uiSpatialLayersInTemporal[iDlayerIndex] = 1;
284+ else
285+ m_uiSpatialLayersInTemporal[iDlayerIndex] = kuiLayerInTemporal;
286+
283287 m_uiSpatialPicNum[iDlayerIndex] = kuiRefNumInTemporal;
284288 ++ iDlayerIndex;
285289 } while (iDlayerIndex < kiDlayerCount);
@@ -363,12 +367,12 @@ int32_t CWelsPreProcess::AnalyzeSpatialPic (sWelsEncCtx* pCtx, const int32_t kiD · 77 unmodified lines
363367 AdaptiveQuantCalculation (pCtx->pVaa, pCurPic, pRefPic);
364368 }
365369
366− if (pSvcParam->bEnableRc) {
367− AnalyzePictureComplexity (pCtx, pCurPic, pRefPic, kiDidx, bCalculateBGD);
370+ if(pSvcParam->iUsageType != SCREEN_CONTENT_REAL_TIME){
371+ if (pSvcParam->bEnableRc) {
372+ AnalyzePictureComplexity (pCtx, pCurPic, pRefPic, kiDidx, bCalculateBGD);
373+ }
374+ WelsExchangeSpatialPictures (&m_pLastSpatialPicture[kiDidx][1], &m_pLastSpatialPicture[kiDidx][0]);
368375 }
369−
370− WelsExchangeSpatialPictures (&m_pLastSpatialPicture[kiDidx][1], &m_pLastSpatialPicture[kiDidx][0]);
371−
372376 return 0;
373377 }
374378

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