HM编码架构
首先進(jìn)入編碼encmain.cpp里的int main 函數(shù),主函數(shù)的入口,里面包含的重要函數(shù)是時(shí)間計(jì)數(shù)函數(shù)和encode()函數(shù)。
在encode函數(shù)中開始編碼。encode函數(shù)中,首先輸入YUV序列,初始化內(nèi)部類和成員變量,轉(zhuǎn)換色彩空間,創(chuàng)建原始的YUV緩沖區(qū),讀取YUV文件,然后開始編碼每一幀。最后刪除原始YUV緩沖區(qū)及使用的類,打印總的碼率。里面包含的重要函數(shù)是TEncTop::encode()。
在encode函數(shù)中,重要函數(shù)是compressGOP()。
compressGOP 中重要函數(shù)是predcompressSlice()和compressSlice().
compressSlice()中重要函數(shù)是compressCTU()。
compressCTU()中重要函數(shù)是xcompressCU().
xcompressCU()包含的重要函數(shù)是xComputeQP()、xCheckRDCostInter(),xCheckRDCostMerge2Nx2N()、xCheckRDCostIntra()、xCheckIntraPCM()、?xCheckBestMode()。
在xCheckRDCostInter()中重要函數(shù)是xCheckBestMode()用于檢驗(yàn)是否是CU最優(yōu)深度,以及predInterSearch()主要進(jìn)行ME和MC。
predInterSearch()中重要函數(shù)是xEstimateMvPredAMVP()、?xMotionEstimation ()、xCheckBestMVP()、motionCompensation()、xMergeEstimation()、setWpScalingDistParam()。
?xMotionEstimation ()中重要函數(shù)?xPatternSearch ()全搜索、xPatternSearchFast()快速搜索、xSetSearchRange()。
xPatternSearchFast()中重要函數(shù)?xTZSearch()、xTZSearchSelective()。
xTZSearch()中重要函數(shù)是xTZSearchHelp()、xTZ8PointDiamondSearch()?、?xTZ8PointSquareSearch()。
xEstimateMvPredAMVP()中重要函數(shù)是fillMvpCand()。
在xCheckRDCostMerge2Nx2N重要函數(shù)是motionCompensation()和encodeResAndCalcRdInterCU(),以及最重要的函數(shù)getInterMergeCandidates(),xCheckBestMode()。
xCheckRDCostIntra()中重要函數(shù)是estIntraPredLumaQT()、estIntraPredChromaQT()、xCheckBestMode()。
estIntraPredLumaQT()中重要函數(shù)是?predIntraAng()。
predIntraAng()中重要函數(shù)xPredIntraPlanar()、xPredIntraAng()。
總結(jié)