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