Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project 2 JMVC code tracing

Similar presentations


Presentation on theme: "Project 2 JMVC code tracing"— Presentation transcript:

1 Project 2 JMVC code tracing
Group5 Block2 楊宜展

2 Functions MotionCompensation::compensateMb
2011/5/27 楊宜展 Functions MotionCompensation::compensateMb MotionCompensation::xGetMbPredData MotionCompensation::compensateSubMb MotionCompensation::xPredLuma QuarterPelFilter::predBlk MotionCompensation::xPredChroma MotionCompensation::xPredMb8x8Mode SampleWeighting:: weightLumaSamples SampleWeighting:: weightChromaSamples

3 MotionCompensation::xGetMbPredData
2011/5/27 楊宜展 MotionCompensation::xGetMbPredData Function name MotionCompensation::xGetMbPredData Location \H264AVCCommonLib\MotionCompensation.cpp Target 將(參考用的)index, MV, MVD, (參考用的)frame buffer等用於預測的參數資料寫入變數結構rcMC8x8D中 Input MbDataAccess& rcMbDataAccess, const IntFrame* pcRefFrame0, const IntFrame* pcRefFrame1, IntMC8x8D& rcMC8x8D Output Void

4 MotionCompensation::xGetMbPredData
2011/5/27 楊宜展 MotionCompensation::xGetMbPredData 初始化 依序(List0, 1)寫入參考用frame的相關參數 寫入List0, 1的相關參數

5 MotionCompensation::xGetMbPredData
2011/5/27 楊宜展 MotionCompensation::xGetMbPredData 以index資訊取得資料計算MV 以所參考frame的資訊取得其他參數

6 MotionCompensation::xPredMb8x8Mode
2011/5/27 楊宜展 MotionCompensation::xPredMb8x8Mode Function name MotionCompensation::xPredMb8x8Mode Location \H264AVCCommonLib\MotionCompensation.cpp Target 8x8 mode下的MB Prediction Input B8x8Idx c8x8Idx, MbDataAccess& rcMbDataAccess, const IntFrame* pcRefFrame0, const IntFrame* pcRefFrame1, IntYuvMbBuffer* pcRecBuffer Output Void

7 MotionCompensation::xPredMb8x8Mode
2011/5/27 楊宜展 MotionCompensation::xPredMb8x8Mode 初始化 switch by BlkMode Weighted Mix Function

8 MotionCompensation::xPredMb8x8Mode
2011/5/27 楊宜展 MotionCompensation::xPredMb8x8Mode 先確認direct flag是否set 是, 則依序傳入8x8的Luma, Chroma區塊給Pred函式 否, 則依序傳入4x4的Luma, Chroma區塊給Pred函式 對應的index (4x8 & 4x4 省略)

9 MotionCompensation::xPredLuma
2011/5/27 楊宜展 MotionCompensation::xPredLuma Function name MotionCompensation::xPredLuma Location \H264AVCCommonLib\MotionCompensation.cpp Target 根據輸入的資訊得到預測的亮度MB Input IntYuvMbBuffer* apcTarBuffer[2], Int iSizeX, Int iSizeY, IntMC8x8D& rcMc8x8D, SParIdx4x4 eSParIdx Output Void

10 MotionCompensation::xPredLuma
2011/5/27 楊宜展 MotionCompensation::xPredLuma 依序參考List0, 1進行預測 以前面算出的index計算MV

11 QuarterPelFilter::predBlk
2011/5/27 楊宜展 QuarterPelFilter::predBlk Function name QuarterPelFilter::predBlk Location \H264AVCCommonLib\QuarterPelFilter.cpp Target 根據輸入的MV取得(預測)對應的Block, 該Block視情況將需要以內插法生成 Input IntYuvMbBuffer* pcDesBuffer, IntYuvPicBuffer* pcSrcBuffer, LumaIdx cIdx, Mv cMv, Int iSizeY, Int iSizeX Output Void

12 QuarterPelFilter::predBlk
2011/5/27 楊宜展 QuarterPelFilter::predBlk 若之前有設定內插類型則呼叫對應函式 初始化 對MV的x, y分量取最後兩bits進行後續判斷 (Case Switch…)

13 2011/5/27 楊宜展 Observe this 4x4 block

14 QuarterPelFilter::predBlk
2011/5/27 楊宜展 QuarterPelFilter::predBlk (iDx, iDy) 1 2 3 G a b c d e f g h i j k n p q r 對應函式 (iDx, iDy) 1 2 3 Direct Copy xPredDx0Dy13 xPredDx0Dy2 xPredDy0Dx13 xPredElse xPredDy2Dx13 xPredDy0Dx2 xPredDx2Dy13 xPredDx2Dy2

15 QuarterPelFilter::xPredDy0Dx2
2011/5/27 楊宜展 QuarterPelFilter::xPredDy0Dx2 對應向量(2, 0) 計算h1 rounding 算出h

16 MotionCompensation::xPredChroma
2011/5/27 楊宜展 MotionCompensation::xPredChroma Function name MotionCompensation::xPredChroma Location \H264AVCCommonLib\MotionCompensation.cpp Target 根據輸入的資訊得到預測的彩度MB Input IntYuvMbBuffer* apcTarBuffer[2], Int iSizeX, Int iSizeY, IntMC8x8D& rcMc8x8D, SParIdx4x4 eSParIdx Output Void

17 MotionCompensation::xPredChroma
2011/5/27 楊宜展 MotionCompensation::xPredChroma 依序參考List0, 1進行預測 以前面算出的index計算MV 將MV的垂直分量加上亮度與彩度間的Offset

18 SampleWeighting::weightLumaSamples
2011/5/27 楊宜展 SampleWeighting::weightLumaSamples Function name SampleWeighting::weightLumaSamples Location \H264AVCCommonLib\SampleWeighting.cpp Target 根據輸入的資訊對亮度資料進行Weighted Mix Input IntYuvMbBuffer* pcRecBuffer, Int iSizeX, Int iSizeY, LumaIdx cIdx, const PW* pcPW0, const PW* pcPW1 Output Void

19 SampleWeighting::weightLumaSamples
2011/5/27 楊宜展 SampleWeighting::weightLumaSamples 雙向 or 單向參考 若不weighted則直接Mix Weighted Mix

20 SampleWeighting::weightLumaSamples
2011/5/27 楊宜展 SampleWeighting::weightLumaSamples 判斷單向參考是後向還是前向 Weighted Mix

21 SampleWeighting::weightChromaSamples
2011/5/27 楊宜展 SampleWeighting::weightChromaSamples Function name SampleWeighting::weightChromaSamples Location \H264AVCCommonLib\SampleWeighting.cpp Target 根據輸入的資訊對彩度資料進行Weighted Mix Input IntYuvMbBuffer* pcRecBuffer, Int iSizeX, Int iSizeY, LumaIdx cIdx, const PW* pcPW0, const PW* pcPW1 Output Void

22 SampleWeighting::weightChromaSamples
2011/5/27 楊宜展 SampleWeighting::weightChromaSamples 基本同weightLumaSamples, 差異在U, V需要各做一次

23 SampleWeighting::weightChromaSamples
2011/5/27 楊宜展 SampleWeighting::weightChromaSamples 基本同weightLumaSamples, 差異在U, V需要各做一次

24 2011/5/27 楊宜展 Thanks for listening!


Download ppt "Project 2 JMVC code tracing"

Similar presentations


Ads by Google