HEVC - CTU CU CTB CB PB TB 概述

作者:Moto,2012年10月28日

原文链接:https://codesequoia.wordpress.com/2012/10/28/hevc-ctu-cu-ctb-cb-pb-and-tb/

译者:Jared

最后修订:2021年9月26日

HEVC,也被称为 H.265 或 MPEG-H Part 2(ISO/IEC 23008-2),即将问世。一篇综述文章已经发表,参考实例也火速赶到。在JCT-VC文件管理系统中可以看到如火如荼的讨论。国际标准最终草案(FDIS)将于2013年1月出台。

然而,和过去一样,标准作者们都是热衷首字母缩写的谜语人。让读者望而却步的第一组缩写词可能就是块结构(Block structure)编码术语,即 CTU、CU、CTB、CB、PB、TB。

它们基本取代了之前标准中的宏块(Macroblocks)和块(Blocks)。不同于10年前,我们有更大的帧尺寸(Frame sizes)需要处理。4K制作被提上日程,人们开始讨论8K。甚至移动设备上,也有帧尺寸高于 HD,例如 2048x1530。我们需要更大的宏块来高效的编码这些帧尺寸的运动矢量。另一方面,微小细节仍然很重要,我们有时希望以 4×4 的颗粒度执行预测和变换。

我们如何以高效的方式支持多种块大小(Block sizes)?这就是 HEVC 试图用这些缩写词来解决的挑战。

我们从更宏观的层次开始。假设我们有一张要编码的图片。HEVC 将图片划分为编码树单元(Coding Tree Unit,CTU)。

CTU 的宽度和高度表示在序列参数集中,这意味着视频序列中的所有 CTU 具有相同的尺寸:64×64、32×32、16×16。

在这里,我们需要理解一个重要的命名规则。在 HEVC 标准中,如果某样东西被称为“xxxxx Unit”,那么它表示一个编码逻辑单元,然后编码成 HEVC 比特流。另外,如果某样东西被称为“xxxxx Block”,则表示进程所面向的是视频帧缓冲区的一部分。

*译者注:"Unit"是大的单元,"Block"是小的组块,"Block"是"Unit"的一部分!

因此,编码树单元(CTU)是逻辑单元。它通常由三个块组成,即亮度(Y)和两个色度样本(Cb、Cr),以及相关的语法元素(Syntax elements)。每个块被称为编码树块(Coding Tree Block,CTB)。

CTB 的尺寸与 CTU 仍然相同,即 64×64、32×32、16×16。然而,取决于视频帧的不同,CTB可能太大了,我们无法决定应该执行帧间(Inter-picture)预测还是帧内(Intra-picture)预测。因此,CTB还可以被不同地分割成多个编码块(Coding Blocks,CB),每个CB成为预测类型的决策点。例如,一些CTB被分割为 16×16 CB,另一些则被分割为 8×8 CB。HEVC支持从至多与 CTB 相同尺寸到至少 8x8 的 CB 尺寸。

下图介绍了如何将 64×64 CTB分割为 CB。

CB是执行帧间预测或帧内预测的决策点。更确切点,预测类型在编码单元(Coding Unit,CU)中编码的。CU包括三个CB(Y、Cb、Cr)和相关的语法元素。

CB 对于预测类型的决策已经够好了,但是对于存储运动矢量*(帧间预测,Inter prediction)或帧内预测模式来说,它仍可能太大了。例如,一个极小的运动——降雪,可能在 8×8 CB 的中间移动,我们希望依据 CB 划分使用不同的运动矢量(MVs)。

*译者注:运动矢量(Motion Vectors, MVs)预测是一种常用帧间预测算法。

因此,预测块(Prediction block,PB)应运而生。根据时间和/或空间可预测性,可以将每个CB以不同的方式分割为多个PB。

一旦做出预测,我们需要用类DCT变换*对残差(预测图像与实际图像之间的差异)进行编码。同样地,CB 可能太大了,因为 CB 可能包含详细部分(高频)和平面部分(低频)。因此,每个CB可以被不同地划分为变换块(Transform Block,TB)。注意, TB 不需要与 PB 对齐。执行单一变换跨越多个PB的残差是可能的,而且通常是有意义的。

*译者注:离散余弦变换(Discrete Cosine Transformation,DCT)

让我们阅读有关这些术语的标准草案。现在它们应该更容易理解了。

鄙人能力有限,此片段不会翻译。原文附上

CTU (coding tree unit): A coding tree block of luma samples, two corresponding coding tree blocks of chroma samples of a picture that has three sample arrays, or a coding tree block of samples of a monochrome picture or a picture that is coded using three separate colour planes and syntax structures used to code the samples. The division of a slice into coding tree units is a partitioning.

CTB (coding tree block): An NxN block of samples for some value of N. The division of one of the arrays that compose a picture that has three sample arrays or of the array that compose a picture in monochrome format or a picture that is coded using three separate colour planes into coding tree blocks is a partitioning.

CB (coding block): An NxN block of samples for some value of N. The division of a coding tree block into coding blocks is a partitioning.

CU (coding unit): A coding block of luma samples, two corresponding coding blocks of chroma samples of a picture that has three sample arrays, or a coding block of samples of a monochrome picture or a picture that is coded using three separate colour planes and syntax structures used to code the samples. The division of a coding tree unit into coding units is a partitioning.

PB (prediction block): A rectangular MxN block of samples on which the same prediction is applied. The division of a coding block into prediction blocks is a partitioning.

TB (transform block): A rectangular MxN block of samples on which the same transform is applied. The division of a coding block into transform blocks is a partitioning.

最后修改:2021 年 11 月 23 日
如果觉得我的文章对你有用,请随意赞赏