Partitioner类在VTM中用于记录ctu编码和解码的递归过程中的划分树,具体在compressCU、encodeCU、decodeCU过程中。
JEM中记录ctu的划分树,使用一个二维列表记录的,VTM中则用Partitioner类的堆栈,可以在递归编解码过程中,有效的释放空间。
对Partitioner的各种操作,其实都是对其中堆栈的操作:
enum PartSplit
{
CTU_LEVEL = 0,
CU_QUAD_SPLIT,
CU_HORZ_SPLIT,
CU_VERT_SPLIT,
CU_TRIH_SPLIT,
CU_TRIV_SPLIT, //ctu的几种划分方式
#if ENABLE_BMS
TU_MAX_TR_SPLIT, //tu的划分
#endif
NUM_PART_SPLIT, //可以进行的划分种类数
CU_MT_SPLIT = 1000, ///< 表示BT/TT划分
CU_BT_SPLIT = 1001, ///< 表示BT划分
CU_DONT_SPLIT = 2000 ///< dummy element to indicate no splitting
};
typedef static_vector<UnitArea, MAX_CU_TILING_PARTITIONS> Partitioning;
struct PartLevel
{
PartSplit split; //划分方式
Partitioning parts;