HEVC,也有叫H.265,MPEG-H 第二部分(ISO/IEC 23008-2)的,指的都是同一個(gè)東西。一個(gè)不錯(cuò)的概論 出版了(一開始并不容易看懂,譯者注)。同時(shí)一個(gè)參考的實(shí)現(xiàn)你也可以看看。一些活躍的討論可以在這里 查看。國際標(biāo)準(zhǔn)終稿將期望在2013年一月制作。
然而,一樣,制定標(biāo)準(zhǔn)的作者都喜歡一些像是加密的簡(jiǎn)寫??赡芰ⅠR會(huì)讓讀者泄氣的就是一些塊結(jié)構(gòu)編碼的屬于,比如 CTU,CU,CTB,CB,PB,還有TB。
他們基本上是代替了之前標(biāo)準(zhǔn)里的宏塊(Macroblocks )和塊(blocks )。不像十年前,現(xiàn)在我們視頻的尺寸很大。4K已經(jīng)變成現(xiàn)實(shí),人們開始談?wù)?K。甚至移動(dòng)設(shè)備也有如高于 HD 幀尺寸的 2048 x 1530 的尺寸。我們需要更大的宏塊來為這些大尺寸的幀進(jìn)行有效的編碼。另一方面,小的細(xì)節(jié)也很重要,我們有時(shí)想在4x4的尺度上進(jìn)行預(yù)測(cè)和轉(zhuǎn)換。
我們?nèi)绾斡行У刂С指鞣N各樣的塊大小?這就是HEVC想用那些帶縮寫名詞的東西來解決的。
讓我們從高等級(jí)的開始。假設(shè)我們有一個(gè)圖像要編碼。HEVC將這個(gè)圖片分成很多CTU(Coding Tree Unit,編碼樹單元)

一個(gè)序列參數(shù)集將告訴我們CTU的寬和高,同時(shí)也意味著在一個(gè)視頻序列里有相同的尺寸:64×64, 32×32, 或 16×16。

我們需要好好理解一下這里的一個(gè)重要的命名習(xí)慣。在HEVC標(biāo)準(zhǔn)里,如果一個(gè)東西叫 xxx單元,這就表示一個(gè)依次編碼成HEVC比特流的編碼邏輯單元。
CTU--編碼樹單元就是這樣一個(gè)邏輯單元。它通常包括三個(gè)塊,也就是一個(gè)亮度塊(Y)塊兩個(gè)色度塊(Cb and Cr),除此之外它還包括相關(guān)的語法元素。這樣的一個(gè)塊就叫做CTB(Coding Tree Block 編碼樹塊)。

每個(gè) 編碼樹塊(CTB)都有和編碼樹單元(CTU )一樣的大小--64×64, 32×32, 或 16×16。然而,編碼樹塊(CTB)--也取決于視頻幀的哪一個(gè)部分--可能太大以至于很難決定我們應(yīng)該施以幀間預(yù)測(cè)或者幀內(nèi)預(yù)測(cè)。因此,每個(gè)編碼樹塊(CTB)又可以相應(yīng)的被分割成很多編碼塊(Coding Blocks,CB ),這樣每個(gè)編碼塊(CB)就成了決定預(yù)測(cè)類型的決定點(diǎn)。比如,一部分編碼樹塊(CTB)被分成一些16×16的編碼塊(CB)而另一部分被分割成一些8×8 的編碼快(CB)。HEVC支持的編碼塊(CB)尺寸從編碼樹塊(CTB)的所有尺寸直到小至8×8的尺寸。
下面這這張圖片說明了 64×64 的編碼樹塊(CTB)可以被分割成很多編碼塊(CB)。

編碼塊(CB)是判斷執(zhí)行幀間預(yù)測(cè)還是幀內(nèi)預(yù)測(cè)的決定點(diǎn)。更精確地說,預(yù)測(cè)類型是被編碼在編碼單元(Coding Unit,CU)里的,編碼單元(CU)包括三個(gè)編碼塊(Y,Cb和Cr)和相關(guān)的語法元素。

編碼塊對(duì)于預(yù)測(cè)類型的判定是足夠好的了,但是對(duì)于存儲(chǔ)運(yùn)動(dòng)向量(幀間預(yù)測(cè)時(shí)要用到的)或幀內(nèi)預(yù)測(cè)的模式來說還是太大了。比如,一個(gè)非常小的目標(biāo),像是下落的雪,可能總是在8×8的編碼塊的中間移動(dòng)--而我們想要的是根據(jù)CB的不位置得來的不同的運(yùn)動(dòng)向量。

因此就引入了預(yù)測(cè)塊(Prediction Block , PB)。每個(gè)編碼塊可以以不同的方式分割成多個(gè)預(yù)測(cè)塊,而如何分割取決于時(shí)域和/或空域的可預(yù)測(cè)性。

一旦做出了預(yù)測(cè),我們需要對(duì)殘差(預(yù)測(cè)圖像和實(shí)際圖像不一樣的地方)經(jīng)過類似離散余弦變換后進(jìn)行編碼。

讓我們閱讀一個(gè)跟這些屬于相關(guān)的標(biāo)準(zhǔn)草案文本?,F(xiàn)在它們應(yīng)該更容易理解了。
下面直接上原文吧:)
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.