In the previous article mainly introduced the principle of coding, here is mainly a combination of HM code to introduce the method of reading residual coefficient
Introduction to the entropy decoding of HM transformation coefficients:
Initial one Tu object
Member Variable Description:
Public:
typedef enum Tu_split_mode { dont_split=0, vertical_split=1, quad_split=2, number_of_split_modes= 3} Split_mode; three kinds of splitting methods of//<tu in the process of recursion
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 are invalid, the NXN block for a channel are processed only for the last block, not t He first.
UInt mcudepth; //<CU is the root node of Tu, recording cu depth
UInt mtrdepthrelcu[max_num_component]; //< Record the depth of Tu relative to Cu
UInt msection; //< If split, then the SUBCU index is processed after splitting
Tu_split_mode Msplitmode; //< the split mode
tcomrectangle mrect[max_num_component]; //< Position information of the current TU Bool mcodeall[max_num_component];
UInt morigwidth[max_num_component];
UInt moffsets[max_num_component]; //<cur Tu is offset from the upper left corner of the Cu, for example tu is 8*8, then the second TU is offset by 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; //< If the split is recursive, the corresponding parent node
The following is the decoded flowchart of this peripheral
There are two more important functions involved:
PARESECBF and parsecoeffnxn, the previous function is relatively simple, the next one will focus on the second function
Because it involves a lot of forms, it's not good to edit here, I just put it up.
Document Download link
http://download.csdn.net/detail/xietingcandice/8329321
An explanation of the HEVC residual coefficient decoding code