VTM中的cu、pu和tu在使用时都是作为CodingStructure类的成员变量来使用的,即作为CS中cus、pus和tus数组中的一个变量来使用的,毕竟VTM中的操作都是以CS作为最基本的类来执行的。
VTM不会像JEM中那样将cu、pu和tu区分起来看待:JEM中在划分完cu后,在处理pu时会有8种划分模式,tu也会根据pu的划分方式有自己的划分。VTM则移除了这种对cu、pu和tu的严格区分,只是将cu、pu和tu视为当前块cs的三种类型的数据,CTU划分树得到cu之后不再进行pu和tu的继续划分了(当然tu会因为变换块的大小关系可能划分为小块)
CU、PU和TU的结构体中包含的数据如下:
( 由于VTM3.0中添加了很多的编码工具,所以cu、pu、tu中所保存记录的信息也有相应的添加。)
struct CodingUnit : public UnitArea
{
CodingStructure *cs; //所归属的cs
Slice *slice;
ChannelType chType;
PredMode predMode; //intra、inter
PartSize partSize; //VTM中均为2Nx2N
uint8_t depth; //所有划分模式的depth
uint8_t qtDepth; //QT深度
// a triple split would increase the mtDepth by 1, but the qtDepth by 2 in the first and last part and by 1 in the middle part (because of the 1-2-1 split proportions)
uint8_t btDepth; //BT深度
uint8_t mtDepth; //TT+BT深度
int8_t chromaQpAdj;
int8_t qp; //量化参数
SplitSeries splitSeries; //64位长整数,记录ctu划分树划分到cu时的各个depth的划分模式
bool skip; //是否为skip模式
#if JVET_L0054_MMVD
bool mmvdSkip; //mmvd模式flag
#endif
bool affine; //affine模式flag
int affineType; //affine模式类型,4/6参数
#