MCPcopy Create free account
hub / github.com/cisco/openh264 / WelsMdFirstIntraMode

Function WelsMdFirstIntraMode

codec/encoder/core/src/svc_base_layer_md.cpp:1829–1856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1827
1828}
1829bool WelsMdFirstIntraMode (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* pCurMb, SMbCache* pMbCache) {
1830 SWelsFuncPtrList* pFunc = pEncCtx->pFuncList;
1831
1832 int32_t iCostI16x16 = WelsMdI16x16 (pFunc, pEncCtx->pCurDqLayer, pMbCache, pWelsMd->iLambda);
1833
1834 //compare cost_p16x16 with cost_i16x16
1835 if (iCostI16x16 < pWelsMd->iCostLuma) {
1836 pCurMb->uiMbType = MB_TYPE_INTRA16x16;
1837 pWelsMd->iCostLuma = iCostI16x16;
1838
1839 pFunc->pfIntraFineMd (pEncCtx, pWelsMd, pCurMb, pMbCache);
1840
1841 //add pEnc&rec to MD--2010.3.15
1842 if (IS_INTRA16x16 (pCurMb->uiMbType)) {
1843 pCurMb->uiCbp = 0;
1844 WelsEncRecI16x16Y (pEncCtx, pCurMb, pMbCache);
1845 }
1846
1847 //chroma
1848 pWelsMd->iCostChroma = WelsMdIntraChroma (pFunc, pEncCtx->pCurDqLayer, pMbCache, pWelsMd->iLambda);
1849 WelsIMbChromaEncode (pEncCtx, pCurMb, pMbCache); //add pEnc&rec to MD--2010.3.15
1850 pCurMb->uiChromPredMode = pMbCache->uiChmaI8x8Mode;
1851 pCurMb->pSadCost[0] = 0;
1852 return true; //intra_mb_type is best
1853 }
1854
1855 return false;
1856}
1857
1858void WelsMdInterMb (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pUnused) {
1859 SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer;

Callers

nothing calls this directly

Calls 4

WelsMdI16x16Function · 0.85
WelsEncRecI16x16YFunction · 0.85
WelsMdIntraChromaFunction · 0.85
WelsIMbChromaEncodeFunction · 0.85

Tested by

no test coverage detected