| 1827 | |
| 1828 | } |
| 1829 | bool 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 | |
| 1858 | void WelsMdInterMb (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SSlice* pSlice, SMB* pCurMb, SMbCache* pUnused) { |
| 1859 | SDqLayer* pCurDqLayer = pEncCtx->pCurDqLayer; |
nothing calls this directly
no test coverage detected