HEVC Z scan和Raster掃瞄方式的轉換

2021-10-23 22:10:16 字數 1928 閱讀 8867

背景補充:

hevc中,cu採用遞迴的四叉樹劃分結構,zscan掃瞄可以很好地適應該種編碼結構,有利於cu的定址。

光柵掃瞄,也叫逐行掃瞄,形象直觀,容易計算x、y座標,有利於畫素點的定址。

在不同的應用中,為方便計算,需要採用不同的掃瞄方式,故有相互轉換之需求。

hm**中的 initzscantoraster() 和initrastertozscan() 函式(附個人注釋):

void initzscantoraster (int imaxdepth, int idepth, uint uistartval, uint*

& rpuicurridx)

else

}

void initrastertozscan (uint uimaxcuwidth, uint uimaxcuheight, uint uimaxdepth)

}

16x16的zscan見下圖:

注:8x8zscan和4x4zscan可在16x16zscan中找到,此處略。

16x16的光柵掃瞄見下圖:

8x8的光柵掃瞄見下圖:

4x4的光柵掃瞄見下圖:

zscantoraster16x16 的對應關係示例:

g_auizscantoraster[0]

=0;g_auizscantoraster[1]

=1;g_auizscantoraster[2]

=16;g_auizscantoraster[3]

=17;g_auirastertozscan[0]

=0;g_auirastertozscan[1]

=1;g_auirastertozscan[16]

=2;g_auirastertozscan[17]=3;

zscantoraster8x8 的對應關係示例:

g_auizscantoraster[0]

=0;g_auizscantoraster[1]

=1;g_auizscantoraster[2]

=8;g_auizscantoraster[3]

=9;g_auirastertozscan[0]

=0;g_auirastertozscan[1]

=1;g_auirastertozscan[8]

=2;g_auirastertozscan[9]=3;

zscantoraster4x4 的對應關係示例:

g_auizscantoraster[0]

=0;g_auizscantoraster[1]

=1;g_auizscantoraster[2]

=4;g_auizscantoraster[3]

=5;g_auirastertozscan[0]

=0;g_auirastertozscan[1]

=1;g_auirastertozscan[4]

=2;g_auirastertozscan[5]=3;

和 區別和聯絡, 和 區別和聯絡

和 區別和聯絡,和 區別和聯絡,實際專案中,什麼情況用哪種?首先,和 的聯絡 共同點 和 都可以用作 邏輯與 運算子,都是雙目運算子。具體要看使用時的具體條件來決定。無論使用哪種運算子,對最終的運算結果都沒有影響。情況1 當上述的運算元是boolean型別變數時,和 都可以用作邏輯與運算子。情況2 ...

rpx和樣式和class和flex

5 style 靜態的樣式統一寫到 class 中。style 接收動態的樣式,在執行時會進行解析,請盡量避免將靜態的樣式寫進 style 中,以免影響渲染速度。例 6 class 用於指定樣式規則,其屬性值是樣式規則中類選擇器名 樣式類名 的集合,樣式類名不需要帶上.樣式類名之間用空格分隔。關於f...

if和switch和for語句

if和switch很像。具體什麼場景下,應用那個語句呢?如果判斷的具體數值不多,而是符合byte,short,int,char,字串。這五種型別。雖然兩個語句都可以使用,建議使用switch語句,因為效率稍高。其他情況,對區間判斷,對結果為boolean型別判斷,使用if,if的使用範圍更廣。whi...