HEVC殘差係數解碼代碼詳解

來源:互聯網
上載者:User

標籤:hevc   變換   殘差係數   hm   代碼詳解   

上一篇中主要介紹了編碼中的原理,這裡主要是結合HM中的代碼介紹讀殘差係數的方法

HM變換係數熵解碼簡介:

 

初始一個TU對象

成員變數介紹:

 

public:

    typedef enum TU_SPLIT_MODE { DONT_SPLIT=0, VERTICAL_SPLIT=1, QUAD_SPLIT=2, NUMBER_OF_SPLIT_MODES=3 } SPLIT_MODE;  //<TU在遞迴過程中的三種劈分方式

    static const UInt NUMBER_OF_SECTIONS[NUMBER_OF_SPLIT_MODES];

  protected:

    ChromaFormat  mChromaFormat;

    Bool          mbProcessLastOfLevel; // if true, then if size n/2 x n/2 is invalid, the nxn block for a channel is processed only for the last block, not the first.

    UInt          mCuDepth;  //<CU是TU的根節點,記錄CU深度

    UInt          mTrDepthRelCU[MAX_NUM_COMPONENT]; //<記錄TU相對於CU的深度

    UInt          mSection;//<如果進行劈分,那麼劈分後處理SubCU的index

    TU_SPLIT_MODE mSplitMode;//< the split mode

    TComRectangle mRect[MAX_NUM_COMPONENT]; //<當前TU的位置資訊    Bool          mCodeAll[MAX_NUM_COMPONENT];

    UInt          mOrigWidth[MAX_NUM_COMPONENT];

    UInt          mOffsets[MAX_NUM_COMPONENT];//<cur TU 與 CU左上方的位移量,比如TU 為8*8,那麼處理第二個TU則位移64個bit

    UInt          mAbsPartIdxCU;//<the abs index of CU in LCU

    UInt          mAbsPartIdxTURelCU;//<the abs index of TU in cur CU

    UInt          mAbsPartIdxStep;//<if split, the added index

    TComDataCU   *mpcCU;

    UInt          mLog2TrLumaSize;//< relative to the size of Cur TU

TComTU       *mpParent; //<如果劈分進行遞迴,對應父節點


下面是解碼的這個外圍的流程圖




其中涉及到兩個比較重要得函數:

pareseCBF 和 parseCoeffNxN,前一個函數比較簡單,後面將重點分析一下第二個函數

因為涉及好多的表格,這裡不好編輯,我就直接把放上來



文檔下載連結

http://download.csdn.net/detail/xietingcandice/8329321



HEVC殘差係數解碼代碼詳解

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.