[go: up one dir, main page]

TWI748201B - Entropy coding of transform coefficients suitable for dependent scalar quantization - Google Patents

Entropy coding of transform coefficients suitable for dependent scalar quantization Download PDF

Info

Publication number
TWI748201B
TWI748201B TW108123315A TW108123315A TWI748201B TW I748201 B TWI748201 B TW I748201B TW 108123315 A TW108123315 A TW 108123315A TW 108123315 A TW108123315 A TW 108123315A TW I748201 B TWI748201 B TW I748201B
Authority
TW
Taiwan
Prior art keywords
flag
transform coefficient
transform coefficients
transform
predetermined
Prior art date
Application number
TW108123315A
Other languages
Chinese (zh)
Other versions
TW202007169A (en
Inventor
希可 史瓦茲
法恩 H T 尼古彥
迪特利夫 馬皮
湯瑪士 威剛德
Original Assignee
弗勞恩霍夫爾協會
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 弗勞恩霍夫爾協會 filed Critical 弗勞恩霍夫爾協會
Publication of TW202007169A publication Critical patent/TW202007169A/en
Application granted granted Critical
Publication of TWI748201B publication Critical patent/TWI748201B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

Concepts for transform coefficient block coding are described which enable coding of coefficients of a transform block in a manner suitable for dependent quantization and effectively implementable by entropy coding in terms of coding efficiency.

Description

適於相依純量量化之變換係數熵寫碼技術Entropy coding technology for transform coefficients suitable for dependent scalar quantization

發明領域 Invention field

本申請案係關於諸如用於寫碼圖像或視訊之變換係數層級之熵寫碼。 This application is related to entropy coding such as the transformation coefficient level used for coding images or videos.

發明背景 Background of the invention

在設定量化參數時,編碼器必須進行綜合考慮。粗略呈現量化會降低位元速率,但提高量化失真,而較精細呈現量化會降低失真,但提高位元速率。即將得出針對可用量化層級之給定域提高寫碼效率之概念將為有利的。一個此可能性為使用相依量化,其中量化取決於先前經量化及經寫碼資料而不斷地調適,但量化之相依性亦影響待量化及寫碼之資料項之間的相互關係,且因此影響資訊對於上下文自適應性熵寫碼之可用性。獲得實現以適於相依量化且就寫碼效率而言可藉由熵寫碼有效地實施之方式寫碼變換區塊之係數的概念將為有利的。 When setting the quantization parameters, the encoder must consider comprehensively. Coarse rendering quantization will reduce the bit rate but increase the quantization distortion, while finer rendering quantization will reduce the distortion but increase the bit rate. It will be advantageous to arrive at the concept of improving coding efficiency for a given domain of available quantization levels. One such possibility is to use dependent quantization, where the quantization depends on the previously quantized and coded data and is continuously adjusted, but the dependence of the quantization also affects the interrelationship between the data items to be quantified and coded, and therefore affects Information on the availability of context-adaptive entropy coding. It would be advantageous to obtain a concept that realizes the coding of the coefficients of the transform block in a way that is suitable for dependent quantization and can be effectively implemented by entropy coding in terms of coding efficiency.

發明概要 Summary of the invention

本發明之目標為提供用於寫碼變換係數之區塊的此概念。 The object of the present invention is to provide this concept for coding transform coefficient blocks.

此目標係藉由本申請案之獨立請求項之標的物來達成。 This goal is achieved by the subject matter of the independent claim of this application.

10:變換區塊 10: Transform block

12:變換係數 12: transform coefficient

14:子區塊 14: sub-block

16、28、30:解碼/任務 16, 28, 30: Decoding/task

18、24'、24":解碼 18, 24', 24": Decoding

20:第一掃描遍次/有效值/同位遍次 20: The first scan pass/effective value/coordinate pass

20'、20":遍次 20', 20": times

22:第二遍次/大小程度旗標遍次 22: The second time / the level of the flag again and again

22':第一掃描遍次 22': first scan pass

22":第二掃描遍次 22": second scan pass

26:第三遍次/掃描遍次 26: Third pass/scan pass

27:第三遍次 27: The third time

32、34:檢查 32, 34: check

40:更新 40: update

42:假定 42: Assumption

44:箭頭/寫碼次序 44: Arrow/code order

45:查找 45: Find

46:狀態 46: State

50:預定變換係數 50: predetermined transformation coefficient

51:相鄰變換係數 51: Adjacent transform coefficient

52:局部範本 52: Partial template

有利態樣為附屬請求項之標的。下文中關於諸圖描述本申請案之較佳實施例,在圖中:圖1 展示可體現為根據下文所描述之實施例中之任一者而操作的作為圖像編碼器之實例之例示性視訊編碼器的方塊圖。 The favorable aspect is the subject of the subsidiary claim. Hereinafter, a preferred embodiment of the application will be described with reference to the figures. In the figure: Figure 1 shows an illustrative example of an image encoder which can be embodied as an operation according to any of the embodiments described below The block diagram of the video encoder.

圖2 展示(a)變換編碼器;及(b)變換解碼器之方塊圖以說明基於區塊之變換寫碼之基本方法;圖3 展示說明均一重構量化器之分佈的直方圖。 Figure 2 shows (a) a transform encoder; and (b) a block diagram of a transform decoder to illustrate the basic method of block-based transform coding; Figure 3 shows a histogram illustrating the distribution of uniformly reconstructed quantizers.

圖4 展示(a)細分成子區塊之變換區塊及(b)子區塊之示意圖,以便說明用於變換係數層級之掃描的實例,在此例示性地為用於H.265|MPEG-H HEVC中之一個實例;特定言之,(a)展示16×16變換區塊分割成4×4子區塊及子區塊之寫碼次序;(b)展示4×4子區塊內部之變換係數層級之寫碼次序。細分可例示性地用於本申請案之實施例,在解碼係數之旗標及餘數(remainder)時用於係數之遍次且在對該等係數解量化時用於狀態轉換。 Figure 4 shows (a) a schematic diagram of a transform block subdivided into sub-blocks and (b) sub-blocks to illustrate an example of scanning for transform coefficient levels, which is illustratively used in H.265|MPEG- An example of H HEVC; in particular, (a) show the 16×16 transform block divided into 4×4 sub-blocks and the coding order of the sub-blocks; (b) show the internal code of the 4×4 sub-blocks The coding order of the transform coefficient level. Subdivision can be exemplarily used in the embodiments of the present application, used for the pass of coefficients when decoding the flags and remainders of coefficients, and used for state transition when dequantizing these coefficients.

圖5 展示各變換係數由一個軸線橫跨之多維輸出空間及針對以下二個變換係數之簡單狀況可容許的重構向量 之位置的示意圖:(a)非相依純量量化;(b)相依純量量化之實例。 Figure 5 shows the multi-dimensional output space spanned by one axis for each transform coefficient and the allowable reconstruction vector for the simple conditions of the following two transform coefficients Schematic diagram of the position: (a) Non-dependent scalar quantification; (b) An example of dependent scalar quantification.

圖6 展示使用相依純量量化藉此形成根據本申請案之媒體解碼器之實施例的變換解碼器之方塊圖。關於習知變換寫碼(利用非相依純量量化器)之修改可藉由與圖2b進行比較而導出。以對應方式,可同樣藉由修改圖2a之編碼器來獲得使用相依純量量化編碼變換區塊之實施例。 Figure 6 shows a block diagram of a transform decoder that uses dependent scalar quantization to form an embodiment of the media decoder according to the present application. The modification of conventional transform coding (using non-dependent scalar quantizer) can be derived by comparing with Fig. 2b. Correspondingly, an embodiment using dependent scalar quantization coding transformation block can be obtained by modifying the encoder of FIG. 2a as well.

圖7 為說明完全由單量化步長△判定之重構層級之二個相依量化集合之實施例的示意圖。重構層級之二個可用集合突出顯示為集合0(頂線)及集合1(底線)。指示集合內部之重構層級的量化索引之實例係由圓下方之數字給出。空心圓及實心圓指示重構層級之集合內部的二個不同子集;該等子集可用於判定重構次序中之下一變換係數的重構層級之集合。二個集合皆包括等於零之重構層級,但另外不相交;二個集合圍繞零對稱。 FIG. 7 is a schematic diagram illustrating an embodiment of two dependent quantization sets of a reconstruction level determined entirely by a single quantization step size Δ. The two available sets of the reconstruction level are highlighted as set 0 (top line) and set 1 (bottom line). An example of a quantization index indicating the reconstruction level within the set is given by the number below the circle. Open circles and filled circles indicate two different subsets within the set of reconstruction levels; these subsets can be used to determine the set of reconstruction levels of the next transform coefficient in the reconstruction order. Both sets include reconstruction levels equal to zero, but are otherwise disjoint; the two sets are symmetrical around zero.

圖8 展示說明變換係數之重構程序之實例的偽碼。k表示指定當前變換係數之重構次序的索引,當前變換係數之量化索引係由level[k]表示,適用於當前變換係數之量化步長 k 係由quant_step_size[k]表示,且trec[k]表示經重構變換係數

Figure 108123315-A0305-02-0005-29
之值。變數setId[k]指定適用於當前變換係數之重構層級之集合。其係基於重構次序中之在前變換係數來判定;setId[k]之可能值為0及1。變數n指定量化步長之整數因子;其係由重構層級之所選集合(亦即,setId[k]之值)及所傳輸之量化索引level[k]給定。 Figure 8 shows a pseudo code illustrating an example of the reconstruction procedure of transform coefficients. k represents the index that specifies the reconstruction order of the current transform coefficient, the quantization index of the current transform coefficient is represented by level[k], the quantization step size k applicable to the current transform coefficient is represented by quant_step_size[k], and trec[k ] Represents the reconstructed transform coefficient
Figure 108123315-A0305-02-0005-29
The value. The variable setId[k] specifies the set of reconstruction levels applicable to the current transform coefficient. It is determined based on the previous transform coefficient in the reconstruction order; the possible values of setId[k] are 0 and 1. The variable n specifies an integer factor of the quantization step size; it is given by the selected set of reconstruction levels (ie, the value of setId[k]) and the transmitted quantization index level[k].

圖9 展示說明圖8中之偽碼之替代實施的偽碼。主要變化為使用運用尺度及移位參數之整數實施來表示與量化步長相乘。通常,移位參數(由shift表示)對於變換區塊係恆定的,且僅尺度參數(由scale[k]給定)可取決於變換係數之位置。變數add表示捨入偏移,其通常被設定為等於add=(1<<(shift-1))。其中 k 為變換係數之標稱量化步長,參數shift及scale[k]係以吾人獲得 k

Figure 108123315-A0305-02-0006-30
scale[k].2-shift 之方式來選擇。 Figure 9 shows a pseudo code illustrating an alternative implementation of the pseudo code in Figure 8. The main change is to use integer implementation of scale and shift parameters to represent multiplication with quantization step size. Generally, the shift parameter (represented by shift) is constant for the transform block, and only the scale parameter (given by scale[k]) can depend on the position of the transform coefficient. The variable add represents the rounding offset, which is usually set equal to add=(1<<(shift-1)). Wherein k is the nominal transformation ratio of the quantization step, and the shift parameter scale [k] based k to obtain I
Figure 108123315-A0305-02-0006-30
scale [ k ]. 2 - The way of shift to choose.

圖10展示將重構層級之集合分裂成二個子集之實例的示意圖。二個所展示之量化集合為圖7之實例之量化集合。量化集合0之二個子集係使用「A」及「B」標註,且量化集合1之二個子集係使用「C」及「D」來標註。 Figure 10 shows a schematic diagram of an example of splitting the set of reconstruction levels into two subsets. The two quantized sets shown are the quantized sets of the example in FIG. 7. The two subsets of quantized set 0 are labeled with "A" and "B", and the two subsets of quantized set 1 are labeled with "C" and "D".

圖11展示說明變換區塊之變換係數之重構程序之實例的偽碼。陣列level表示變換區塊之所傳輸變換係數層級(量化索引),且陣列trec表示對應的經重構變換係數。2d表state_trans_table指定狀態轉換表,且表setId指定與狀態相關聯之量化集合。 Fig. 11 shows a pseudo code illustrating an example of a reconstruction procedure of transform coefficients of a transform block. The array level represents the transmitted transform coefficient level (quantization index) of the transform block, and the array trec represents the corresponding reconstructed transform coefficient. The 2d table state_trans_table specifies the state transition table, and the table setId specifies the quantized set associated with the state.

圖12展示說明作為網格(trellis)結構的相依純量量化之狀態轉換的示意圖。存在之水平線表示重構次序中之不同變換係數。豎直軸線表示相依量化及重構程序中之不同可能狀態。所展示之連接指定不同變換係數之狀態之間的可用路徑。 FIG. 12 shows a schematic diagram illustrating the state transition of dependent scalar quantization as a trellis structure. The existing horizontal lines represent different transform coefficients in the reconstruction order. The vertical axis represents the different possible states in the dependent quantization and reconstruction procedures. The connections shown specify the available paths between the states of different transform coefficients.

圖13展示基本網格胞元之實例。 Figure 13 shows an example of a basic grid cell.

圖14展示用於說明以寫碼次序傳信第一非零量化索引之位置的變換區塊之示意圖,該位置係藉由回填(back filling)說明。除了第一非零變換係數之位置之外,僅傳輸陰影係數之位元子(bin),推斷經白色標記之係數等於0。 FIG. 14 shows a schematic diagram of the transform block used to explain the position of the first non-zero quantization index transmitted in the coding order, and the position is obtained by backfilling (back filling) description. Except for the position of the first non-zero transform coefficient, only the bin of the shadow coefficient is transmitted, and it is inferred that the coefficient marked in white is equal to zero.

圖15展示說明用於係數區塊之變換係數層級之寫碼之比較實例的偽碼,該區塊諸如可易於轉移至解碼未被劃分成子區塊之變換區塊及轉移至係數之解碼(亦即,藉由以「解碼」替換「寫碼」)的子區塊。此處,遍次(on pass)用以寫碼係數中除符號旗標以外之所有旗標及餘數。 Figure 15 shows a pseudo code illustrating a comparative example of coding at the transform coefficient level of a coefficient block, such as a block that can be easily transferred to decode transform blocks that are not divided into sub-blocks and transfer to coefficient decoding (also That is, by replacing the sub-blocks of "code writing" with "decoding". Here, the on pass is used to write all the flags and remainders in the code coefficient except for the sign flags.

圖16展示變換區塊之示意圖且說明用於選擇機率模型之範本。黑色正方形指定當前掃描位置,且陰影正方形表示用於導出上下文模型之局部鄰域。 Figure 16 shows a schematic diagram of the transformation block and illustrates a template for the selection probability model. The black square designates the current scan position, and the shaded square represents the local neighborhood used to derive the context model.

圖17展示可用於判定量化索引之序列(或區塊)之實例網格結構的示意圖,該等量化索引使成本度量(諸如拉格朗日成本度量D+λ.R)最小化。展示用於8個變換係數(或量化索引)之網格。第一狀態(在極左側)表示經設定為等於0之初始狀態。 Figure 17 shows a schematic diagram of an example grid structure that can be used to determine a sequence (or block) of quantization indexes that minimize cost metrics (such as the Lagrangian cost metric D+λ.R). Show a grid for 8 transform coefficients (or quantization indexes). The first state (on the extreme left) represents the initial state set equal to zero.

圖18展示說明用於係數區塊之變換係數層級之寫碼之實施例的偽碼,該區塊諸如可易於轉移至解碼未被劃分成子區塊之變換區塊及轉移至係數之解碼(亦即,藉由以「解碼」替換「寫碼」)的子區塊。此處,遍次用以寫碼係數中除符號旗標以外之所有旗標及餘數。此處,圖15之共同遍次分裂成三個遍次。 Figure 18 shows a pseudo code that illustrates an embodiment of coding the transform coefficient level of a coefficient block, such as a block that can be easily transferred to decode transform blocks that are not divided into sub-blocks and transfer to coefficient decoding (also That is, by replacing the sub-blocks of "code writing" with "decoding". Here, it is used to write all the flags and remainders in the code coefficient except for the symbol flags. Here, the common pass in Figure 15 is split into three passes.

圖19展示說明用於係數區塊之變換係數層級之寫碼之實施例的偽碼,該區塊諸如可易於轉移至解碼未被劃分成子區塊之變換區塊及轉移至係數之解碼(亦即,藉由以 「解碼」替換「寫碼」)的子區塊。此處,遍次用以寫碼係數中除符號旗標以外之所有旗標及餘數。此處,圖15之共同遍次分裂成二個遍次,一個遍次用於餘數,另一遍次用於除符號旗標以外之旗標。 Figure 19 shows the pseudo code for an embodiment of coding the transform coefficient level of the coefficient block, such as the block that can be easily transferred to decode the transform block that is not divided into sub-blocks and transfer to the decoding of the coefficients (also That is, by "Decode" replaces the sub-blocks of "Write code"). Here, it is used to write all the flags and remainders in the code coefficient except for the symbol flags. Here, the common pass in FIG. 15 is split into two passes, one pass is used for the remainder, and the other pass is used for flags other than the symbol flag.

圖20展示說明用於係數區塊之變換係數層級之寫碼之實施例的偽碼,該區塊諸如可易於轉移至解碼未被劃分成子區塊之變換區塊及轉移至係數之解碼(亦即,藉由以「解碼」替換「寫碼」)的子區塊。此處,遍次用以寫碼係數中除符號旗標以外之所有旗標及餘數。此處,圖15之共同遍次分裂成若干遍次,且同位旗標分別在絕對層級之前經寫碼或在任何其他旗標之前經寫碼。 Figure 20 shows the pseudo code for an embodiment of coding the transform coefficient level of the coefficient block, such as the block that can be easily transferred to decode the transform block that is not divided into sub-blocks and transfer to the decoding of the coefficients (also That is, by replacing the sub-blocks of "code writing" with "decoding". Here, it is used to write all the flags and remainders in the code coefficient except for the symbol flags. Here, the common pass in FIG. 15 is split into several passes, and the co-location flags are respectively coded before the absolute level or before any other flags.

較佳實施例之詳細說明 Detailed description of the preferred embodiment

根據接下來所描述之實施例,以適於有效實施以及相依量化及諸如上下文自適應性二進位算術寫碼之上下文自適應性熵寫碼的方式進行變換係數層級之熵寫碼。該等實施例特別有利於在利用相依純量量化之變換寫碼的上下文中對變換係數層級進行熵寫碼。然而,該等實施例在連同習知非相依純量量化一起使用之情況下亦為可用的且有利的。亦即,該等實施例亦適用於在利用習知非相依純量量化之變換寫碼的上下文中對變換係數層級進行熵寫碼。此外,下文中所描述之實施例適用於支援利用相依量化之變換寫碼與利用習知非相依量化之變換寫碼之間的切換(例如,在序列、圖像、圖塊、影像塊或區塊層級上)之編解碼 器。 According to the embodiment described below, transform coefficient-level entropy coding is performed in a manner suitable for effective implementation and dependent quantization and context-adaptive entropy coding such as context-adaptive binary arithmetic coding. These embodiments are particularly advantageous for entropy coding of transform coefficient levels in the context of transform coding using dependent scalar quantization. However, these embodiments are also usable and advantageous when used in conjunction with the conventional non-dependent scalar quantification. That is, these embodiments are also suitable for entropy coding of transform coefficient levels in the context of transform coding using conventional non-dependent scalar quantization. In addition, the embodiments described below are suitable for supporting the switch between transform coding using dependent quantization and transform coding using conventional non-dependent quantization (for example, in sequence, image, tile, image block or region). Block level) encoding and decoding Device.

在下文所描述之實施例中,變換寫碼用以變換樣本集合。可實施為相依純量量化或替代地實施為非相依純量量化之量化用以量化所得變換係數,且進行所獲得量化索引之熵寫碼。在解碼器側,經重構樣本之集合係藉由量化索引之熵解碼、變換係數之相依重構(或替代地,非相依重構)及反變換而獲得。相依純量量化與習知非相依純量量化之間的差異在於,對於相依純量量化,變換係數之可容許重構層級之集合取決於在重構次序中先於當前變換係數的所傳輸變換係數層級。此態樣係藉由使用不同可容許重構層級集合之不同機率模型集合而用於熵寫碼中。為了實現高效硬體實施,以多個遍次寫碼與區塊或子區塊之變換係數層級有關的二進位決策(被稱作位元子)。變換係數層級之二進位化及二進位決策(亦被稱作位元子)在多個遍次上之分佈係以在第一遍次中經寫碼之資料唯一地判定下一掃描位置之可容許重構層級之集合的方式選擇。此具有以下優點:可取決於可容許重構層級之集合(對於對應變換係數)選擇第一遍次中之位元子之一部分的機率模型。 In the embodiment described below, the transform coding is used to transform the sample set. It can be implemented as dependent scalar quantization or alternatively implemented as non-dependent scalar quantization to quantize the resulting transform coefficients and perform entropy coding of the obtained quantization index. On the decoder side, the set of reconstructed samples is obtained by entropy decoding of quantization index, dependent reconstruction of transform coefficients (or alternatively, non-dependent reconstruction), and inverse transformation. The difference between dependent scalar quantization and conventional non-dependent scalar quantization is that for dependent scalar quantization, the set of allowable reconstruction levels of transform coefficients depends on the transmitted transform before the current transform coefficient in the reconstruction order Coefficient level. This aspect is used in entropy coding by using different sets of probability models with different sets of allowable reconstruction levels. In order to achieve high-efficiency hardware implementation, the binary decision (referred to as bit sub) related to the transformation coefficient level of the block or sub-block is written in multiple passes. The binarization of transform coefficient levels and the distribution of binary decision (also known as bit elements) over multiple passes are based on the data written in the first pass to uniquely determine the possibility of the next scan position. Allows the choice of the way to reconstruct the set of levels. This has the advantage that it may depend on the set of allowable reconstruction levels (for the corresponding transform coefficients) to select the probability model of a part of the bits in the first pass.

以下實施例之描述主要以影像及視訊編解碼器中之預測誤差樣本之區塊的有損寫碼為目標,但實施例亦可應用於有損寫碼之其他區域。特定言之,不存在對形成矩形區塊之樣本集合的限制,且不存在對表示預測誤差樣本(亦即,原始信號與預測信號之間的差)之樣本集合的限制。 The description of the following embodiment mainly targets the lossy coding of blocks of prediction error samples in image and video codecs, but the embodiment can also be applied to other areas of lossy coding. In particular, there is no restriction on the set of samples forming a rectangular block, and no restriction on the set of samples representing the prediction error samples (that is, the difference between the original signal and the predicted signal).

諸如國際視訊寫碼標準H.264|MPEG-4 AVC[1]及H.265|MPEG-H HEVC[2]之所有目前先進技術視訊編解碼器皆遵循混合式視訊寫碼之基本方法。將視訊圖像分割成區塊,區塊之樣本係使用圖像內預測或框間預測來預測,且所得預測誤差信號(原始樣本與預測信號樣本之間的差)之樣本係使用變換寫碼進行寫碼。 All current advanced technology video codecs such as the international video coding standards H.264|MPEG-4 AVC[1] and H.265|MPEG-H HEVC[2] follow the basic method of hybrid video coding. The video image is divided into blocks. The samples of the blocks are predicted using intra-image prediction or inter-frame prediction, and the samples of the obtained prediction error signal (the difference between the original sample and the predicted signal sample) are coded using transform Write code.

圖1展示典型現代視訊編碼器之簡化方塊圖。以某一次序對視訊序列之視訊圖像進行寫碼,該次序被稱作寫碼次序。圖像之寫碼次序可不同於捕捉及顯示次序。對於實際寫碼,將各視訊圖像分割成區塊。區塊包含特定色彩分量之矩形區域之樣本。對應於相同矩形區域之所有色彩分量之區塊的實體常常被稱作單元。取決於區塊分割之目的,在H.265|MPEG-H HEVC中,可區分出寫碼樹型區塊(CTB)、寫碼區塊(CB)、預測區塊(PB)與變換區塊(TB)。相關聯單元被稱作寫碼樹型單元(CTU)、寫碼單元(CU)、預測單元(PU),及變換單元(TU)。 Figure 1 shows a simplified block diagram of a typical modern video encoder. The video images of the video sequence are coded in a certain order, which is called the coding order. The order of image coding can be different from the order of capture and display. For actual coding, each video image is divided into blocks. A block contains samples of a rectangular area of a specific color component. The entity corresponding to the block of all color components in the same rectangular area is often called a unit. Depending on the purpose of block division, in H.265|MPEG-H HEVC, coding tree block (CTB), coding block (CB), prediction block (PB) and transform block can be distinguished (TB). The associated units are referred to as a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and a transformation unit (TU).

通常,視訊圖像最初被分割成固定大小單元(亦即,針對所有色彩分量之經對準之固定大小區塊)。在H.265|MPEG-H HEVC中,此等固定大小單元被稱作寫碼樹型單元(CTU)。各CTU可進一步分裂成多個寫碼單元(CU)。寫碼單元為選定寫碼模式(例如,圖像內或圖像間寫碼)之實體。在H.265|MPEG-H HEVC中,CTU分解成一個或多個CU係藉由四叉樹(QT)語法指定且作為位元串流之部分而傳輸。CTU之CU係以所謂的z掃描次序處 理。彼意謂由分裂產生之四個區塊係以光柵掃描次序進行處理;且若區塊中之任一者進一步經分割,則對應四個區塊(包括所包括較小區塊)係在處理較高分裂層級之下一區塊之前進行處理。 Generally, a video image is initially divided into fixed-size units (ie, aligned fixed-size blocks for all color components). In H.265|MPEG-H HEVC, these fixed-size units are called Code Tree Units (CTU). Each CTU can be further split into multiple code writing units (CU). The code writing unit is the entity of the selected code writing mode (for example, code writing within or between images). In H.265|MPEG-H HEVC, the CTU is decomposed into one or more CUs which are specified by the Quadtree (QT) syntax and transmitted as part of the bit stream. The CU of the CTU is located in the so-called z-scan order reason. It means that the four blocks generated by splitting are processed in raster scan order; and if any of the blocks is further divided, the corresponding four blocks (including the smaller blocks included) are being processed Processing is performed before a block under a higher split level.

若CU係在框內寫碼模式中經寫碼,則傳輸用於明度信號之框內預測模式,且若視訊信號包括色度分量,則傳輸用於色度信號之另一框內預測模式。在ITU-T H.265|MPEG-H HEVC中,若CU大小等於最小CU大小(如序列參數集中所傳信),則明度區塊亦可分裂成四個大小相等區塊,在此狀況下,對於此等區塊中之各者,傳輸單獨明度框內預測模式。實際框內預測及寫碼係基於變換區塊進行。對於經圖像內寫碼CU之各變換區塊,使用同一色彩分量之已經重構樣本導出預測信號。用於產生變換區塊之預測信號的演算法係藉由所傳輸框內預測模式而判定。 If the CU is coded in the in-frame coding mode, the intra-frame prediction mode for the luma signal is transmitted, and if the video signal includes chrominance components, another intra-frame prediction mode for the chrominance signal is transmitted. In ITU-T H.265|MPEG-H HEVC, if the CU size is equal to the minimum CU size (as signaled in the sequence parameter set), the brightness block can also be split into four blocks of equal size. In this case , For each of these blocks, a separate brightness intra-frame prediction mode is transmitted. The actual intra-frame prediction and code writing are based on the transformation block. For each transformation block of the CU coded in the image, the reconstructed samples of the same color component are used to derive the prediction signal. The algorithm used to generate the prediction signal of the transformed block is determined by the transmitted intra-frame prediction mode.

在圖像間寫碼模式中寫碼之CU可進一步分裂成多個預測單元(PU)。預測單元為明度之實體,且對於彩色視訊,為使用單一預測參數集之二個相關聯色度區塊(覆蓋同一圖像區域)。CU可經寫碼為單一預測單元,或其可分裂成二個非正方形預測單元(支援對稱及不對稱分裂)或四個正方形預測單元。對於各PU,傳輸個別運動參數集。各運動參數集包括數個運動假設(H.265|MPEG-H HEVC中之一個或二個運動假設),且對於各運動假設,包括參考圖像(經由至參考圖像清單中之參考圖像索引指示) 及相關聯運動向量。另外,H.265|MPEG-H HEVC提供所謂的合併模式,其中運動參數並未明確地傳輸,而是基於空間或時間相鄰區塊之運動參數而導出。若CU或PU在合併模式中經寫碼,則僅傳輸至運動參數候選者清單中之索引(此清單係使用空間及時間相鄰區塊之運動資料導出)。該索引完全判定所使用之運動參數集。經框間寫碼之PU之預測信號係藉由運動補償之預測形成。對於各運動假設(藉由參考圖像及運動向量指定),預測信號由指定參考圖像中之位移區塊形成,其中相對於當前PU之位移係由運動向量指定。位移通常藉由子樣本準確度指定(在H.265|MPEG-H HEVC中,運動向量具有四分之一明度樣本之精確度)。對於非整數運動向量,預測信號係藉由內插經重構參考圖像(通常使用可分離FIR濾波器)而產生。利用多假設預測的PU之最終預測信號係由個別運動假設之預測信號之加權和形成。通常,將同一運動參數集用於PU之明度及色度區塊。即使目前先進技術視訊寫碼標準使用平移位移向量來指定當前區域(樣本之區塊)相對於參考圖像之運動,亦有可能採用高階運動模型(例如,仿射運動模型)。在彼狀況下,必須針對運動假設傳輸額外運動參數。 In the inter-picture coding mode, the coded CU can be further split into multiple prediction units (PU). The prediction unit is the entity of brightness, and for color video, two associated chroma blocks (covering the same image area) using a single prediction parameter set. The CU can be coded as a single prediction unit, or it can be split into two non-square prediction units (supporting symmetric and asymmetric splitting) or four square prediction units. For each PU, an individual motion parameter set is transmitted. Each motion parameter set includes several motion hypotheses (one or two motion hypotheses in H.265|MPEG-H HEVC), and for each motion hypothesis, it includes a reference image (via the reference image in the reference image list) Index indication) And the associated motion vector. In addition, H.265|MPEG-H HEVC provides a so-called merge mode, in which the motion parameters are not explicitly transmitted, but are derived based on the motion parameters of adjacent blocks in space or time. If the CU or PU is coded in the merge mode, it will only be transmitted to the index in the motion parameter candidate list (this list is derived using the motion data of space and time adjacent blocks). The index completely determines the set of motion parameters used. The prediction signal of the PU coded between frames is formed by the prediction of motion compensation. For each motion hypothesis (specified by the reference image and motion vector), the prediction signal is formed by the displacement block in the specified reference image, where the displacement relative to the current PU is specified by the motion vector. The displacement is usually specified by the accuracy of the sub-sample (in H.265|MPEG-H HEVC, the motion vector has the accuracy of a quarter of the brightness sample). For non-integer motion vectors, the prediction signal is generated by interpolating the reconstructed reference image (usually using a separable FIR filter). The final prediction signal of the PU using multiple hypothesis prediction is formed by the weighted sum of the prediction signals of the individual motion hypotheses. Generally, the same motion parameter set is used for the lightness and chroma blocks of the PU. Even if the current advanced video coding standards use translational displacement vectors to specify the motion of the current region (block of samples) relative to the reference image, it is possible to use higher-order motion models (for example, affine motion models). In that situation, additional motion parameters must be transmitted for motion assumptions.

對於經圖像內及圖像間寫碼之CU二者,預測誤差信號(亦被稱作殘差信號)通常經由變換寫碼傳輸。在H.265|MPEG-H HEVC中,CU之明度殘差樣本之區塊以及色度殘差樣本之區塊(若存在)被分割成變換區塊(TB)。CU分割成變換區塊係藉由四叉樹語法指示,該四 叉樹語法亦被稱作殘差四叉樹(RQT)。所得變換區塊係使用變換寫碼來進行寫碼:將2d變換應用於殘差樣本之區塊,使用非相依純量量化來量化所得變換係數,且對所得變換係數層級(量化索引)進行熵寫碼。在P及B圖塊中,在CU語法之開頭處,傳輸skip_flag。若此旗標等於1,則其指示對應CU由在合併模式中經寫碼之單一預測單元組成(亦即,推斷merge_flag等於1)且所有變換係數等於零(亦即,重構信號等於預測信號)。在彼狀況下,除skip_flag之外,僅傳輸merge_idx。若skip_flag等於0,則傳信預測模式(框間或框內),繼之以上文所描述之語法特徵。 For both CUs that are coded within and between images, the prediction error signal (also referred to as the residual signal) is usually transmitted via transform coding. In H.265|MPEG-H HEVC, the block of luma residual samples and the block of chroma residual samples (if any) of the CU are divided into transform blocks (TB). The division of CU into transform blocks is indicated by the quadtree syntax. The four The fork tree syntax is also called residual quadtree (RQT). The resultant transform block uses transform coding to write codes: apply 2d transform to the block of residual samples, use non-dependent scalar quantization to quantize the transform coefficients, and perform entropy on the transform coefficient level (quantization index) obtained Write code. In the P and B blocks, skip_flag is transmitted at the beginning of the CU syntax. If this flag is equal to 1, it indicates that the corresponding CU is composed of a single prediction unit coded in the merge mode (ie, inferred that merge_flag is equal to 1) and all transform coefficients are equal to zero (ie, the reconstructed signal is equal to the predicted signal) . In that case, except for skip_flag, only merge_idx is transmitted. If skip_flag is equal to 0, then the prediction mode (inter-frame or in-frame) is signaled, followed by the grammatical features described above.

由於已經寫碼圖像可用於以下圖像中之區塊之運動補償預測,因此圖像必須在編碼器中完全經重構。將區塊之經重構預測誤差信號(藉由重構給定量化索引之變換係數及反變換而獲得)添加至對應預測信號且將結果寫入至當前圖像之緩衝區。在圖像之所有區塊經重構之後,可應用一或多個迴路內濾波器(例如,解塊濾波器及樣本自適應性偏移濾波器)。接著將最終經重構圖像儲存於經解碼圖像緩衝區中。 Since the coded image can be used for the motion compensation prediction of the block in the following image, the image must be completely reconstructed in the encoder. Add the reconstructed prediction error signal of the block (obtained by reconstructing the transform coefficient of the given quantitative index and the inverse transform) to the corresponding prediction signal and write the result into the buffer of the current image. After all blocks of the image are reconstructed, one or more in-loop filters (for example, deblocking filters and sample adaptive offset filters) can be applied. The final reconstructed image is then stored in the decoded image buffer.

下文所描述之實施例呈現變換寫碼之概念,諸如預測誤差信號之變換寫碼。該概念適用於圖像內及圖像間寫碼區塊二者。其亦適用於非矩形樣本區之變換寫碼。與習知變換寫碼相比,根據下文所描述之實施例,變換係數並非經非相依地量化。其至少適用於使用相依量 化來量化。根據相依量化,特定變換係數之可用重構層級之集合取決於其他變換係數之所選量化索引。下文描述對量化索引之熵寫碼之修改,此提高了寫碼效率且維持了與相依純量量化組合之能力。 The embodiments described below present the concept of transform coding, such as transform coding of prediction error signals. This concept is applicable to both in-image and inter-image coding blocks. It is also suitable for the conversion and coding of non-rectangular sample areas. Compared with conventional transform coding, according to the embodiment described below, transform coefficients are not quantized non-dependently. It applies at least to the use of dependent quantities To quantify. According to dependent quantization, the set of available reconstruction levels for a particular transform coefficient depends on the selected quantization index of other transform coefficients. The following describes the modification of the entropy coding of the quantization index, which improves the coding efficiency and maintains the ability to combine with dependent scalar quantization.

所有主要視訊寫碼標準(包括目前先進技術標準H.265|MPEG-H HEVC)皆利用變換寫碼之概念以對預測誤差樣本之區塊進行寫碼。區塊之預測誤差樣本表示原始信號之樣本與區塊之預測信號之樣本之間的差。預測信號係藉由圖像內預測(在此狀況下當前區塊之預測信號之樣本係基於同一圖像內部之相鄰區塊之已經重構樣本而導出)或藉由圖像間預測(在此狀況下預測信號之樣本係基於已經重構圖像之樣本而導出)而獲得。原始預測誤差信號之樣本係藉由自當前區塊之原始信號之樣本值減去預測信號之樣本值而獲得。 All major video coding standards (including the current advanced technology standard H.265|MPEG-H HEVC) use the concept of transform coding to code blocks of prediction error samples. The prediction error sample of the block represents the difference between the sample of the original signal and the sample of the prediction signal of the block. The prediction signal is by intra-image prediction (in this case, the samples of the prediction signal of the current block are derived based on the reconstructed samples of adjacent blocks in the same image) or by inter-image prediction (in In this case, the samples of the prediction signal are derived based on the samples of the reconstructed image). The sample of the original prediction error signal is obtained by subtracting the sample value of the prediction signal from the sample value of the original signal of the current block.

樣本區塊之變換寫碼可由量化索引之線性變換、純量量化及熵寫碼組成。在編碼器側(參見圖2a),使用線性分析變換 A 變換原始樣本之N×M區塊。結果為變換係數之N×M區塊。變換係數t k表示不同信號空間(或不同座標系)中之原始預測誤差樣本。N×M變換係數係使用N×M非相依純量量化器來進行量化。各變換係數t k映射至量化索引q k,該量化索引亦被稱作變換係數層級。所獲得之量化索引q k經熵寫碼且寫入至位元串流。 The transformation code of the sample block can be composed of the linear transformation of the quantization index, the scalar quantization and the entropy code. On the encoder side (see Figure 2a), a linear analysis transform A is used to transform the N×M block of the original sample. The result is an N×M block of transform coefficients. The transform coefficient t k represents the original prediction error samples in different signal spaces (or different coordinate systems). The N×M transform coefficients are quantized using an N×M non-dependent scalar quantizer. Each transform coefficient t k is mapped to a quantization index q k , and the quantization index is also called a transform coefficient level. The obtained quantization index q k is entropy-coded and written into the bit stream.

在圖2b中所描繪之解碼器側,自所接收之位元串流解碼變換係數層級q k。各變換係數層級q k映射 至經重構變換係數t' k 。經重構樣本之N×M區塊係藉由使用線性合成變換 B 變換經重構變換係數之區塊而獲得。 On the decoder side depicted in Figure 2b, the transform coefficient level q k is decoded from the received bit stream. Each transform coefficient levels q k mapped to the reconstructed transform coefficients t 'k. The N×M blocks of reconstructed samples are obtained by transforming the blocks of reconstructed transform coefficients using linear composite transform B.

即使視訊寫碼標準僅指定合成變換 B ,慣例亦為將合成變換 B 之反變換用作編碼器中之分析變換 A ,亦即, A = B -1。此外,實際視訊寫碼系統中所使用之變換表示正交變換( B -1= B T )或接近正交的變換。對於正交變換,信號空間中之均方誤差(MSE)失真等於變換域中之MSE失真。正交性具有以下重要優點:可使用非相依純量量化器使原始樣本區塊與經重構樣本區塊之間的MSE失真最小化。即使用於編碼器中之實際量化程序考慮了變換係數層級(由以上熵寫碼描述介紹)之間的相依性,正交變換之使用亦顯著簡化了量化演算法。 Even if the video coding standard only specifies synthetic transformation B , the convention is to use the inverse transformation of synthetic transformation B as the analytical transformation A in the encoder, that is, A = B -1 . In addition, the transformation used in the actual video coding system represents an orthogonal transformation ( B -1 = B T ) or a transformation close to orthogonal. For orthogonal transform, the mean square error (MSE) distortion in the signal space is equal to the MSE distortion in the transform domain. Orthogonality has the following important advantages: a non-dependent scalar quantizer can be used to minimize the MSE distortion between the original sample block and the reconstructed sample block. Even if the actual quantization procedure used in the encoder considers the dependence between the transformation coefficient levels (introduced by the entropy code description above), the use of orthogonal transformation also significantly simplifies the quantization algorithm.

對於典型預測誤差信號,變換具有以下效應:信號能量集中於若干變換係數中。相比於原始預測誤差樣本,所得變換係數之間的統計相依性降低。 For a typical prediction error signal, transformation has the following effect: the signal energy is concentrated in several transformation coefficients. Compared with the original prediction error samples, the statistical dependence between the obtained transform coefficients is reduced.

在目前先進技術視訊寫碼標準中,使用可分離離散餘弦變換(II型)或其整數近似。然而,變換可易於替換而不會修改變換寫碼系統之其他態樣。文獻或標準化文件中已提出之改良之實例包括: In the current advanced technology video coding standard, the separable discrete cosine transform (Type II) or its integer approximation is used. However, the transformation can be easily replaced without modifying other aspects of the transformation coding system. Examples of improvements that have been proposed in the literature or standardization documents include:

.用於經圖像內預測區塊之離散正弦變換(DST)之使用(有可能取決於框內預測模式及/或區塊大小)。應注意,H.265|MPEG-H HEVC已包括用於經圖像內預測之4×4變換區塊之DST。 . The use of Discrete Sine Transform (DST) for intra-image prediction blocks (may depend on the intra-frame prediction mode and/or block size). It should be noted that H.265|MPEG-H HEVC already includes DST for 4×4 transform blocks for intra-picture prediction.

.切換變換:編碼器在一組預定義變換當中選擇實際上 使用之變換。可用變換之集合為編碼器及解碼器二者所已知,使得其可使用至可用變換清單中之索引高效地傳信。可用變換之集合及其在清單中之排序可取決於區塊之其他寫碼參數,諸如所選框內預測模式。在特殊狀況下,藉由諸如框內預測模式之寫碼參數完全判定所使用之變換,使得無需傳輸用於指定變換之語法元素。 . Switching transformation: the encoder chooses among a set of predefined transformations actually Use the transformation. The set of available transforms is known to both the encoder and the decoder so that it can use the index into the list of available transforms to communicate efficiently. The set of available transforms and their order in the list may depend on other coding parameters of the block, such as the selected intra-frame prediction mode. Under special circumstances, the transformation used is completely determined by coding parameters such as the intra-frame prediction mode, so that there is no need to transmit syntax elements for specifying the transformation.

.不可分離變換:編碼器及解碼器中所使用之變換表示不可分離變換。應注意,切換變換之概念可包含一或多個不可分離變換。歸因於複雜度原因,不可分離變換之使用可能受限於某些區塊大小。 . Inseparable transform: The transform used in the encoder and decoder means inseparable transform. It should be noted that the concept of switching transformations may include one or more inseparable transformations. Due to complexity, the use of inseparable transforms may be limited to certain block sizes.

.多層級變換:實際變換由二個或更多個變換階段構成。第一變換階段可由在計算上複雜度低的可分離變換組成。且在第二階段中,使用不可分離變換進一步變換所得變換係數之子集。相較於用於整個變換區塊之不可分離變換,雙階段方法具有以下優點:將較複雜的不可分離變換應用於較少數目之樣本。多層級變換之概念可與切換變換之概念高效地組合。 . Multi-level transformation: The actual transformation consists of two or more transformation stages. The first transformation stage can be composed of separable transformations with low computational complexity. And in the second stage, an inseparable transform is used to further transform a subset of the obtained transform coefficients. Compared with the inseparable transformation used for the entire transformation block, the two-stage method has the advantage of applying more complex inseparable transformation to a smaller number of samples. The concept of multi-level transformation can be efficiently combined with the concept of switching transformation.

使用純量量化器來量化變換係數。作為量化之結果,變換係數之容許值之集合減小。換言之,變換係數映射至所謂的重構層級之可計數集合(實際上,有限集合)。重構層級之集合表示可能變換係數值之集合的恰當子集。為了簡化以下熵寫碼,可容許重構層級由量化索引(亦被稱作變換係數層級)表示,該等量化索引作為位元串流之部分而傳輸。在解碼器側,量化索引(變換係數層級)映射 至經重構變換係數。經重構變換係數之可能值對應於重構層級之集合。在編碼器側,純量量化之結果為變換係數層級(量化索引)之區塊。 A scalar quantizer is used to quantize the transform coefficients. As a result of quantization, the set of allowable values of transform coefficients is reduced. In other words, the transform coefficients are mapped to a countable set (actually, a finite set) of the so-called reconstruction level. The set of reconstruction levels represents an appropriate subset of the set of possible transform coefficient values. In order to simplify the following entropy coding, the permissible reconstruction levels are represented by quantization indexes (also called transform coefficient levels), which are transmitted as part of the bit stream. On the decoder side, quantization index (transform coefficient level) mapping To reconstructed transform coefficients. The possible values of the reconstructed transform coefficients correspond to the set of reconstruction levels. On the encoder side, the result of scalar quantization is a block of transform coefficient level (quantization index).

在目前先進技術視訊寫碼標準中,使用均一重構量化器(URQ)。其基本設計說明於圖3中。URQ具有以下性質:重構層級相等地間隔開。二個相鄰重構層級之間的距離△被稱作量化步長。重構層級中之一者等於0。因此,可用重構層級之完整集合係由量化步長△唯一地指定。量化索引q至經重構變換係數t'之解碼器映射原則上由以下簡單公式給定t'=q.△。 In the current advanced technology video coding standard, uniform reconstruction quantizer (URQ) is used. The basic design is illustrated in Figure 3. URQ has the following properties: the reconstruction levels are equally spaced. The distance Δ between two adjacent reconstruction levels is called the quantization step size. One of the reconstruction levels is equal to 0. Therefore, the complete set of available reconstruction levels is uniquely specified by the quantization step Δ. Quantization index q to the reconstructed transform coefficients t 'of the decoder mapping principles given by the following simple equation t' = q. △.

在此上下文中,術語「非相依純量量化」係指以下性質:在給定任何變換係數之量化索引q之情況下,可獨立於其他變換係數之所有量化索引而判定相關聯經重構變換係數t'In this context, the term "independent scalar quantization" refers to the following property: given the quantization index q of any transform coefficient, the associated reconstructed transform can be determined independently of all the quantization indexes of other transform coefficients The coefficient t' .

由於視訊解碼器通常利用具有標準精確度(例如,32位元)之整數算術,因此標準中所使用之實際公式可略微不同於簡單乘法。當忽略對變換係數之所支援動態範圍的截割(clipping)時,藉由下式獲得H.265|MPEG-H HEVC中之經重構變換係數t'=(scale.q+(1≪(shift-1)))≫shift,其中運算子「<<」及「>>」分別表示向左及向右之位元移位。當忽略整數算術時,量化步長△對應於以下項:△=scale.2-shiftSince video decoders usually use integer arithmetic with standard accuracy (for example, 32 bits), the actual formula used in the standard may be slightly different from simple multiplication. When ignoring the clipping of the supported dynamic range of the transform coefficients, the reconstructed transform coefficients in H.265|MPEG-H HEVC t' = (scale. q + (1≪( shift-1)))≫shift, where the operators "<<" and ">>" represent bit shifts to the left and right, respectively. When ignoring integer arithmetic, the quantization step size △ corresponds to the following term: △=scale. 2 -shift .

諸如H.262|MPEG-2 Video之早期視訊寫碼標準亦指定經修改URQ,由此重構層級零與第一非零重構層級之間的距離相對於標稱量化步長增加(例如,增加至標稱量化步長△之二分之三)。 Early video coding standards such as H.262|MPEG-2 Video also specify a modified URQ so that the distance between reconstruction level zero and the first non-zero reconstruction level is increased relative to the nominal quantization step size (for example, Increase to three-half of the nominal quantization step size △).

變換係數之量化步長(或尺度及移位參數)係由以下二個因子判定:‧量化參數QP:量化步長可通常基於區塊進行修改。出於彼目的,視訊寫碼標準提供量化步長之預定義集合。所使用之量化步長(或等效地,上文介紹之參數「尺度」及「移位」)係使用至量化步長之預定義清單中的索引來指示。該索引被稱作量化參數(QP)。在H.265|MPEG-H HEVC中,QP與量化步長之間的關係大致由下式給定

Figure 108123315-A0305-02-0018-59
The quantization step size (or scale and shift parameter) of the transform coefficient is determined by the following two factors: ‧Quantization parameter QP: The quantization step size can usually be modified based on the block. For that purpose, the video coding standard provides a predefined set of quantization steps. The quantization step used (or equivalently, the parameters "scale" and "shift" introduced above) are indicated by using the index in the predefined list of quantization steps. This index is called quantization parameter (QP). In H.265|MPEG-H HEVC, the relationship between QP and quantization step size is roughly given by the following formula
Figure 108123315-A0305-02-0018-59

圖塊QP通常在圖塊標頭中傳輸。一般而言,有可能基於區塊修改量化參數QP。出於彼目標,可傳輸差量量化參數(DQP)。所使用量化參數係藉由所傳輸DQP及經預測QP值判定,該經預測QP值係使用已經寫碼(通常相鄰)區塊之QP導出。 The tile QP is usually transmitted in the tile header. Generally speaking, it is possible to modify the quantization parameter QP based on the block. For that goal, the difference quantization parameter (DQP) can be transmitted. The quantization parameter used is determined by the transmitted DQP and the predicted QP value, which is derived using the QP of the coded (usually adjacent) block.

量化加權矩陣:視訊寫碼標準通常提供針對個別變換係數使用不同量化步長之可能性。此係藉由指定所謂的量化加權矩陣 w 來達成,該等量化加權矩陣可通常在序列或圖像層級上由編碼器選擇,且作為位元串流之部分而傳輸。量化加權矩陣 w 具有與變換係數之對應區塊相同的大小。變換係數t ik 之量化步長△ ik 由下式給定 △ik=w ik.△block,其中△block表示所考慮區塊之量化步長(由區塊量化參數QP指示),ik表示指定變換區塊內部之當前變換係數的座標,且w ik表示量化加權矩陣 w 中之對應輸入項。 Quantization weighting matrix: Video coding standards usually provide the possibility of using different quantization step sizes for individual transform coefficients. This is achieved by specifying so-called quantization weighting matrices w , which can usually be selected by the encoder at the sequence or image level and transmitted as part of the bit stream. The quantization weighting matrix w has the same size as the corresponding block of the transform coefficient. The quantization step △ ik of the transform coefficient t ik is given by the following formula △ ik = w ik . △ block , where △ block represents the quantization step size of the block under consideration (indicated by the block quantization parameter QP), i and k represent the coordinates of the current transformation coefficient within the specified transformation block, and w ik represents the quantization weighting matrix w The corresponding input item.

量化加權矩陣之主要意圖為提供用於以在感知上有意義的方式引入量化雜訊之可能性。藉由使用適當加權矩陣,可利用人類視覺之空間對比敏感性來達成位元速率與主觀重構品質之間的較佳權衡。儘管如此,許多編碼器使用所謂的平坦量化矩陣(其可使用高層級語法元素高效地傳輸)。在此狀況下,針對區塊中之所有變換係數使用相同量化步長△。接著藉由量化參數QP完全指定量化步長。 The main purpose of the quantization weighting matrix is to provide the possibility for introducing quantization noise in a perceptually meaningful way. By using an appropriate weighting matrix, the spatial contrast sensitivity of human vision can be used to achieve a better trade-off between bit rate and subjective reconstruction quality. Nevertheless, many encoders use so-called flat quantization matrices (which can be efficiently transmitted using high-level syntax elements). In this case, the same quantization step size Δ is used for all transform coefficients in the block. Then, the quantization step size is fully specified by the quantization parameter QP.

變換係數層級(變換係數之量化索引)之區塊經熵寫碼(亦即,其以無損方式作為位元串流之部分而傳輸)。由於線性變換僅可降低線性相依性,因此通常以可採用區塊中變換係數層級之間的剩餘非線性相依性以用於高效寫碼的方式設計對變換係數層級之熵寫碼。熟知實例為MPEG-2 Video中之運行層級(run-level)寫碼、H.263及MPEG-4 Visual中之運行層級最末(run-level-last)寫碼、H.264|MPEG-4 AVC中之上下文自適應性可變長度寫碼(CAVLC),及H.264|MPEG-4 AVC及H.265|MPEG-H HEVC中之基於上下文之自適應性二進位算術寫碼(CABAC)。 The blocks of the transform coefficient level (quantization index of the transform coefficient) are entropy coded (that is, they are transmitted as part of the bit stream in a lossless manner). Since the linear transformation can only reduce the linear dependence, the entropy coding of the transformation coefficient level is usually designed in such a way that the remaining non-linear dependence between the transformation coefficient levels in the block can be used for efficient coding. Well-known examples are run-level coding in MPEG-2 Video, run-level-last coding in H.263 and MPEG-4 Visual, H.264|MPEG-4 Context-adaptive variable length coding (CAVLC) in AVC, and context-based adaptive binary arithmetic coding (CABAC) in H.264|MPEG-4 AVC and H.265|MPEG-H HEVC .

目前先進技術視訊寫碼標準 H.265|MPEG-H HEVC中指定之CABAC遵循可應用於各種變換區塊大小之通用概念。大於4×4樣本之變換區塊經分割成4×4子區塊。圖4a及圖4b中說明16×16變換區塊之實例之分割。圖4a中所展示之4×4子區塊的寫碼次序以及圖4b中所展示之子區塊內部之變換係數層級的寫碼次序大體上藉由圖式中所展示之反向對角線掃描指定。對於某些經圖像內預測區塊,使用水平或豎直掃描模式(取決於實際框內預測模式)。寫碼階數始終以高頻率位置開始。 Current advanced technology video coding standards The CABAC specified in H.265|MPEG-H HEVC follows a general concept that can be applied to various transform block sizes. Transformation blocks larger than 4×4 samples are divided into 4×4 sub-blocks. Fig. 4a and Fig. 4b illustrate the division of an example of a 16×16 transform block. The coding order of the 4×4 sub-blocks shown in Fig. 4a and the coding order of the transform coefficient levels inside the sub-blocks shown in Fig. 4b are roughly based on the reverse diagonal scanning shown in the diagram Specify. For some intra-image prediction blocks, horizontal or vertical scanning mode (depending on the actual intra-frame prediction mode) is used. The write code order always starts at the high frequency position.

在H.265|MPEG-H HEVC中,基於4×4子區塊傳輸變換係數層級。變換係數層級之無損寫碼包括以下步驟: In H.265|MPEG-H HEVC, the transform coefficient hierarchy is transmitted based on 4×4 sub-blocks. Lossless coding of transform coefficient levels includes the following steps:

1.傳輸語法元素coded_block_flag,其傳信變換區塊中是否存在任何非零變換係數層級。若coded_block_flag等於0,則不進一步針對變換區塊對資料進行寫碼。 1. The transmission syntax element coded_block_flag, which signals whether there is any non-zero transform coefficient level in the transform block. If coded_block_flag is equal to 0, no further coding is performed on the data for the transformed block.

2.傳輸寫碼次序(例如,圖4中所說明之逐區塊反向對角線掃描次序)中之第一非零變換係數層級之x及y座標。將座標之傳輸分裂成首碼及尾碼部分。標準使用語法元素last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix,及last_sig_coeff_x_suffix。 2. Transmit the x and y coordinates of the first non-zero transform coefficient level in the coding order (for example, the block-by-block reverse diagonal scanning order illustrated in FIG. 4). Split the transmission of coordinates into the first code and the last code part. The standard uses the syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_x_suffix.

3.以含有寫碼次序中之第一非零變換係數層級的4×4子區塊開始,以寫碼次序處理4×4子區塊,其中子區塊之寫碼包括以下主要步驟: 3. Start with the 4×4 sub-block containing the first non-zero transform coefficient level in the coding order, and process the 4×4 sub-blocks in the coding order. The coding of the sub-blocks includes the following main steps:

a.傳輸語法元素coded_sub_block_flag,其指示子區 塊是否含有任何非零變換係數層級。對於第一及最末4×4子區塊(亦即,含有第一非零變換係數層級或DC層級之子區塊),不傳輸此旗標但推斷其等於一。 a. Transmission syntax element coded_sub_block_flag, which indicates the sub-area Whether the block contains any non-zero transform coefficient levels. For the first and last 4×4 sub-blocks (ie, sub-blocks containing the first non-zero transform coefficient level or DC level), this flag is not transmitted but it is inferred to be equal to one.

b.對於coded_sub_block_flag等於一之子區塊內部之所有變換係數層級,語法元素significant_coeff_flag指示對應變換係數層級是否不等於零。若無法基於已經傳輸資料推斷此旗標之值,則僅傳輸此旗標。特定言之,若DC係數位於與第一非零係數(以寫碼次序)不同的子區塊中且最末子區塊之所有其他significant_coeff_flag等於零,則不針對第一重要掃描位置(由經傳輸x及y座標指定)傳輸旗標且不針對DC係數傳輸旗標。 b. For all transform coefficient levels in the sub-block whose coded_sub_block_flag is equal to one, the syntax element significant_coeff_flag indicates whether the corresponding transform coefficient level is not equal to zero. If the value of this flag cannot be inferred based on the transmitted data, only this flag will be transmitted. In particular, if the DC coefficient is located in a sub-block different from the first non-zero coefficient (in the coding order) and all other significant_coeff_flags of the last sub-block are equal to zero, then the first important scan position (by transmitted x And the y coordinate designation) transmits the flag and does not transmit the flag for the DC coefficient.

c.對於significant_coeff_flag等於一(若存在)之前八個變換係數層級,傳輸旗標coeff_abs_level_greater1_flag。其指示變換係數層級之絕對值是否大於一。 c. For the eight transform coefficient levels before the significant_coeff_flag is equal to one (if any), the flag coeff_abs_level_greater1_flag is transmitted. It indicates whether the absolute value of the transform coefficient level is greater than one.

d.對於coeff_abs_level_greater1_flag等於一(若存在)之第一變換係數層級,傳輸旗標coeff_abs_level_greater2_flag。其指示變換係數層級之絕對值是否大於二。 d. For the first transform coefficient level whose coeff_abs_level_greater1_flag is equal to one (if any), the flag coeff_abs_level_greater2_flag is transmitted. It indicates whether the absolute value of the transform coefficient level is greater than two.

e.對於significant_coeff_flag等於一之所有層級(例外狀況描述於下文中),傳輸語法元素coeff_sign_flag,其指定變換係數層級之符號。 e. For all levels where significant_coeff_flag is equal to one (exceptions are described below), the syntax element coeff_sign_flag is transmitted, which specifies the sign of the transform coefficient level.

f.對於絕對值尚未完全由significant_coeff_flag、coeff_abs_level_greater1_flag及coeff_abs_level_greater2_flag之值 指定(若經傳輸旗標中之任一者等於零,則絕對值完全經指定)的所有變換係數層級,使用多層級語法元素coeff_abs_level_remaining傳輸絕對值之餘數。 f. The absolute value has not been completely determined by the values of significant_coeff_flag, coeff_abs_level_greater1_flag and coeff_abs_level_greater2_flag All transform coefficient levels that are specified (if any of the transmitted flags are equal to zero, the absolute value is completely specified), the remainder of the absolute value is transmitted using the multi-level syntax element coeff_abs_level_remaining.

在H.265|MPEG-H HEVC中,所有語法元素均使用基於上下文之自適應性二進位算術寫碼(CABAC)進行寫碼。所有非二進位語法元素首先映射至一系列二進位決策上,該等二進位決策亦被稱作位元子。所得位元子序列係使用二進位算術寫碼進行寫碼。出於彼目標,各位元子與機率模型(二進位機率質量函數)相關聯,該機率模型亦被稱作上下文。對於大部分位元子,上下文表示自適應性機率模型,此意謂相關聯二進位機率質量函數係基於實際上經寫碼之位元子值而更新。可藉由基於已經傳輸資料針對某些位元子切換上下來利用條件機率。CABAC亦包括所謂的旁路模式,在旁路模式中使用固定機率質量函數(0.5,0.5)。 In H.265|MPEG-H HEVC, all syntax elements are written using context-based adaptive binary arithmetic coding (CABAC). All non-binary syntax elements are first mapped to a series of binary decisions, which are also called bits. The obtained bit subsequence is written using binary arithmetic coding. For this goal, each element is associated with a probability model (binary probability mass function), which is also called a context. For most bits, the context represents an adaptive probability model, which means that the associated binary probability quality function is updated based on the bit value actually written. The conditional probability can be used by switching up and down for certain bits based on the transmitted data. CABAC also includes the so-called bypass mode, in which a fixed probability mass function (0.5, 0.5) is used.

針對coded_sub_block_flag之寫碼選擇的上下文取決於已經寫碼之相鄰子區塊之coded_sub_block_flag之值。significant_coeff_flag之上下文係基於子區塊內部之掃描位置(x及y座標)、變換區塊之大小,及相鄰子區塊中coded_sub_block_flag之值而選擇。對於旗標coeff_abs_level_greater1_flag及coeff_abs_level_greater2_flag,上下文選擇取決於當前子區塊是否包括DC係數及是否已經針對相鄰子區塊傳輸等於一之任何coeff_abs_level_greater1_flag。對於 coeff_abs_level_greater1_flag,上下文選擇進一步取決於子區塊之已經寫碼之coeff_abs_level_greater1_flag's之數目及值。 The context of code selection for coded_sub_block_flag depends on the value of coded_sub_block_flag of adjacent sub-blocks that have been coded. The context of significant_coeff_flag is selected based on the scan position (x and y coordinates) within the sub-block, the size of the transform block, and the value of coded_sub_block_flag in the adjacent sub-block. For the flags coeff_abs_level_greater1_flag and coeff_abs_level_greater2_flag, the context selection depends on whether the current sub-block includes DC coefficients and whether any coeff_abs_level_greater1_flag equal to one has been transmitted for adjacent sub-blocks. for coeff_abs_level_greater1_flag, the context selection further depends on the number and value of the coded coeff_abs_level_greater1_flag's of the sub-block.

符號coeff_sign_flag及絕對值之餘數coeff_abs_level_remaining係在二進位算術寫碼器之旁路模式中進行寫碼。為了將coeff_abs_level_remaining映射至位元子(二進位決策)之序列上,使用自適應性二進位化方案。二進位化由單一參數控制,該參數係基於子區塊之已經寫碼值而調適。 The sign coeff_sign_flag and the remainder of the absolute value coeff_abs_level_remaining are coded in the bypass mode of the binary arithmetic code writer. In order to map coeff_abs_level_remaining to the sequence of bits (binary decision), an adaptive binarization scheme is used. Binaryization is controlled by a single parameter, which is adjusted based on the coded value of the sub-block.

H.265| MPEG-H HEVC亦包括所謂的符號資料隱藏模式,在符號資料隱藏模式中(在某些條件下),省略用於子區塊內部之彼最末非零層級之符號的傳輸。替代地,用於此層級之符號嵌入於對應子區塊之層級的絕對值之總和之同位中。應注意,編碼器必須在判定適當變換係數層級時考慮此態樣。 H.265| MPEG-H HEVC also includes the so-called symbol data hiding mode. In symbol data hiding mode (under certain conditions), the transmission of symbols used for the last non-zero level within the sub-block is omitted. Alternatively, the symbol for this level is embedded in the same bit of the sum of the absolute values of the level of the corresponding sub-block. It should be noted that the encoder must consider this aspect when determining the appropriate transform coefficient level.

視訊寫碼標準僅指定位元串流語法及重構程序。若考慮針對原始預測誤差樣本之給定區塊及給定量化步長之變換寫碼,則編碼器具有較高自由度。在給定變換區塊之量化索引q k之情況下,熵寫碼必須遵循用於將資料寫入至位元串流(亦即,建構算術碼字)之唯一界定演算法。但給定預測誤差樣本之原始區塊之用於獲得量化索引q k之編碼器演算法在視訊寫碼標準範疇之外。此外,編碼器能夠基於區塊自由選擇量化參數QP。對於以下描述,假定給定量化參數QP及量化加權矩陣。因此,各變換係 數之量化步長係已知的。進一步假定編碼器執行分析變換,該分析變換為用於獲得原始變換係數t k之指定合成變換之反變換(或反變換之極接近近似)。即使在此等條件下,編碼器亦能夠針對各原始變換係數t k自由選擇量化器索引q k。由於變換係數層級之選擇判定失真(或重構/近似品質)及位元速率二者,因此所使用之量化演算法對所產生之位元串流之速率-失真效能具有實質影響。 Video coding standards only specify bit stream syntax and reconstruction procedures. If considering the transformation and coding of a given block and given quantization step size of the original prediction error sample, the encoder has a higher degree of freedom. Given the quantization index q k of the transform block, the entropy writing code must follow a unique defining algorithm for writing data to the bit stream (ie, constructing an arithmetic codeword). However, the encoder algorithm used to obtain the quantization index q k for the original block of the given prediction error sample is outside the scope of the video coding standard. In addition, the encoder can freely select the quantization parameter QP based on the block. For the following description, it is assumed that the quantization parameter QP and the quantization weight matrix are given. Therefore, the quantization step size of each transform coefficient is known. It is further assumed that the encoder performs an analytical transformation, which is an inverse transformation (or a very close approximation of the inverse transformation) of the designated synthetic transformation used to obtain the original transformation coefficient t k. Even under these conditions, for each encoder is also capable of original transform coefficient t k freely chosen quantizer index q k. Since the choice of transform coefficient level determines both distortion (or reconstruction/approximation quality) and bit rate, the quantization algorithm used has a substantial impact on the rate-distortion performance of the generated bit stream.

最簡單的量化方法將原始變換係數t k捨入至最接近重構層級。對於通常使用之URQ,可根據下式判定對應量化索引q k

Figure 108123315-A0305-02-0024-7
其中sgn()為符號函數,且運算子
Figure 108123315-A0305-02-0024-32
Figure 108123315-A0305-02-0024-33
返回小於或等於其自變量之最大整數。此量化方法保證MSE失真
Figure 108123315-A0305-02-0024-8
The simplest quantization method rounds the original transform coefficient t k to the nearest reconstruction level. For the commonly used URQ, the corresponding quantization index q k can be determined according to the following formula
Figure 108123315-A0305-02-0024-7
Where sgn() is a symbolic function, and the operator
Figure 108123315-A0305-02-0024-32
.
Figure 108123315-A0305-02-0024-33
Returns the largest integer less than or equal to its argument. This quantization method guarantees MSE distortion
Figure 108123315-A0305-02-0024-8

經最小化,但其完全忽略了傳輸所得變換係數層級q k 所需之位元速率。通常,若捨入朝向零偏置,則獲得較佳結果:

Figure 108123315-A0305-02-0024-9
其中0
Figure 108123315-A0305-02-0024-34
a<
Figure 108123315-A0305-02-0024-25
. It is minimized, but it completely ignores the bit rate required for the transmission of the transform coefficient level q k. Generally, better results are obtained if the rounding is biased towards zero:
Figure 108123315-A0305-02-0024-9
Where 0
Figure 108123315-A0305-02-0024-34
a <
Figure 108123315-A0305-02-0024-25
.

若量化程序使拉格朗日函數D+λR最小化,則獲得速率-失真感測中之最佳結果,其中D表示變換區塊之失真(例如,MSE失真),R指定傳輸區塊之變換係數層級所需的位元之數目,且λ為拉格朗日乘數。 對於使用QP與量化步長之間的關係式

Figure 108123315-A0305-02-0025-5
之編 解碼器(諸如H.264 | MPEG-4 AVC或H.265 | MPEG-H HEVC),常常使用拉格朗日乘數λ與量化參數QP之間的以下關係式
Figure 108123315-A0305-02-0025-4
其中c 1c 2表示圖塊或圖像之常數因子。 If the quantization program makes the Lagrangian function D + λ . R is minimized to obtain the best result in rate-distortion sensing, where D represents the distortion of the transform block (for example, MSE distortion), R specifies the number of bits required for the transform coefficient level of the transmission block, and λ is the Lagrangian multiplier. For the relationship between QP and quantization step size
Figure 108123315-A0305-02-0025-5
The codec (such as H.264 | MPEG-4 AVC or H.265 | MPEG-H HEVC) often uses the following relationship between the Lagrangian multiplier λ and the quantization parameter QP
Figure 108123315-A0305-02-0025-4
Where c 1 and c 2 represent the constant factors of the tiles or images.

旨在使失真及速率之拉格朗日函數D+λR最小化之量化演算法亦被稱作速率-失真最佳化量化(RDOQ)。若使用MSE或加權MSE量測失真,則應以使得以下成本度量最小化之方式判定變換區塊之量化索引q k

Figure 108123315-A0305-02-0025-3
Aim to make the Lagrangian function of distortion and rate D + λ . The quantization algorithm for minimizing R is also called rate-distortion optimized quantization (RDOQ). If MSE or weighted MSE is used to measure distortion, the quantization index q k of the transformed block should be determined in a way that minimizes the following cost metrics:
Figure 108123315-A0305-02-0025-3

此處,變換係數索引k指定變換係數層級之寫碼次序(或掃描次序)。項R(q k |q k-1 ,q k-2 ,…)表示傳輸量化索引q k 所需的位元之數目(或其估計值)。條件說明(歸因於組合或條件機率之使用),特定變換係數層級q k 之位元之數目通常取決於寫碼次序中之在前變換係數層級q k-1 ,q k-2等之所選值。上式中之因子α k 可用於對個別變換係數之貢獻進行加權,例如用於模型化人類視覺之對比敏感性。在下文中,通常假定所有加權因子α k 皆等於1(但可以可考慮不同加權因子之方式直接修改演算法)。 Here, the transform coefficient index k specifies the coding order (or scanning order) of the transform coefficient hierarchy. The term R ( q k | q k -1 , q k -2 , ...) represents the number of bits (or its estimated value) required to transmit the quantization index q k. Conditional description (due to the use of combination or conditional probability), the number of bits in a specific transform coefficient level q k usually depends on the previous transform coefficient levels q k -1 , q k -2, etc. in the coding order Choose value. The factor α k in the above formula can be used to weight the contribution of individual transform coefficients, for example, to model the contrast sensitivity of human vision. In the following, it is generally assumed that all weighting factors α k are equal to 1 (but the algorithm can be directly modified by considering different weighting factors).

對於H.265|MPEG-H HEVC中之變換係數寫碼,速率項之準確計算非常複雜,此係由於大部分二進 位決策係使用自適應性機率模型進行寫碼。但若忽略機率模型選擇之一些態樣且忽略機率模型在變換區塊內部經調適,則有可能設計複雜度合理的RDOQ演算法。以H.265|MPEG-H HEVC之參考軟體實施之RDOQ演算法由以下基本處理步驟組成: For the coding of transform coefficients in H.265|MPEG-H HEVC, the accurate calculation of the rate term is very complicated. This is because most of the binary The bit decision system uses an adaptive probability model to write codes. However, if some aspects of the probability model selection are ignored and the probability model is adjusted within the transformation block, it is possible to design an RDOQ algorithm with reasonable complexity. The RDOQ algorithm implemented with H.265|MPEG-H HEVC reference software consists of the following basic processing steps:

1.對於各掃描位置k,藉由在層級未被推斷為等於零之假定下使拉格朗日成本D k (q k )+λR k (q k )最小化來選擇變換係數層級q k D k (q k )表示經加權均方誤差D k (q k )=α k .(t k -△ k q k )2,且R k (q k )表示傳輸q k 所需之位元之數目的估計值。 1. For each scanning position k , make the Lagrangian cost D k ( q k ) + λ under the assumption that the level is not inferred to be equal to zero. R k ( q k ) is minimized to select the transform coefficient level q k . D k ( q k ) represents the weighted mean square error D k ( q k ) = α k . ( t k- k . q k ) 2 , and R k ( q k ) represents the estimated value of the number of bits required to transmit q k.

2.藉由比較以下二個狀況之拉格朗日成本來判定4×4子區塊之旗標coded_sub_block_flag:(a)使用在步驟1中所選擇之變換係數層級;(b)將語法元素coded_sub_block_flag設定為等於零,且因此將4×4子區塊之所有變換係數層級皆設定為等於零。 2. Determine the coded_sub_block_flag of the 4×4 sub-block by comparing the Lagrangian cost of the following two conditions: (a) Use the transform coefficient level selected in step 1; (b) Coded_sub_block_flag the syntax element It is set equal to zero, and therefore all transform coefficient levels of the 4×4 sub-blocks are set equal to zero.

3.藉由比較拉格朗日成本來判定第一非零變換係數層級之位置,拉格朗日成本係藉由選擇非零變換係數層級中之一者(在步驟2之後)作為寫碼次序中之第一非零變換係數層級而獲得(將在前變換係數層級設定為等於零)。 3. Determine the position of the first non-zero transform coefficient level by comparing the Lagrangian cost. The Lagrangian cost is determined by selecting one of the non-zero transform coefficient levels (after step 2) as the coding order The first non-zero transform coefficient level in (set the previous transform coefficient level to be equal to zero).

4.藉由比較在步驟3及變換區塊內部之所有變換係數層級皆設定為等於零之狀況之後所獲得的變換係數層級之序列的拉格朗日成本來判定coded_block_flag。 4. Determine the coded_block_flag by comparing the Lagrangian cost of the sequence of transform coefficient levels obtained after step 3 and the condition that all transform coefficient levels inside the transform block are set equal to zero.

在[3]中,提出用於變換寫碼之經修改概念,其在下文中更詳細地描述。相對於習知變換寫碼之主要改 變為變換係數並未經非相依地量化及重構。替代地,變換係數之可容許重構層級取決於針對重構次序中之在前變換係數所選擇的量化索引。將相依純量量化之概念與經修改熵寫碼組合,其中變換係數之機率模型選擇(或替代地,碼字表選擇)取決於可容許重構層級之集合。 In [3], a modified concept for transform coding is proposed, which is described in more detail below. The main changes compared to the conventional coding The transform coefficients are not quantized and reconstructed non-dependently. Alternatively, the allowable reconstruction level of transform coefficients depends on the quantization index selected for the preceding transform coefficient in the reconstruction order. The concept of dependent scalar quantization is combined with modified entropy coding, where the probability model selection (or alternatively, the codeword table selection) of the transform coefficients depends on the set of allowable reconstruction levels.

變換係數之相依量化之優點在於可容許重構向量更密集地封裝於N維信號空間中(其中N表示變換區塊中樣本或變換係數之數目)。變換區塊之重構向量係指變換區塊之經定序重構變換係數(或替代地,經定序重構樣本)。圖5a及圖5b中針對二個變換係數之最簡單狀況說明此效應。圖5a展示用於非相依純量量化之可容許重構向量(其表示2d平面中之點)。如可見,第二變換係數

Figure 108123315-A0305-02-0027-35
之可容許值之集合不取決於第一經重構變換係數
Figure 108123315-A0305-02-0027-36
之所選值。圖5b展示相依純量量化之實例。應注意,相比於非相依純量量化,第二變換係數
Figure 108123315-A0305-02-0027-37
之可選擇重構值取決於第一變換係數
Figure 108123315-A0305-02-0027-38
之所選重構層級。在圖5b之實施例中,針對第二變換係數
Figure 108123315-A0305-02-0027-39
存在二個不同可用重構層級集合(由不同色彩說明)。若第一變換係數
Figure 108123315-A0305-02-0027-41
之量化索引為偶數(…,-2,0,2,...),則可針對第二變換係數
Figure 108123315-A0305-02-0027-42
選擇第一集合(藍色點)之任何重構層級。且若第一變換係數
Figure 108123315-A0305-02-0027-43
之量化索引為奇數(...,-3,-1,1,3,...),則可針對第二變換係數
Figure 108123315-A0305-02-0027-44
選擇第二集合(紅色點)之任何重構層級。在實例中,將第一集合及第二集合之重構層級移位一半量化步長(第二集合之任何重構層級位於第一集合之二個重構層級之間)。 The advantage of dependent quantization of transform coefficients is that it allows the reconstructed vector to be more densely packed in the N -dimensional signal space (where N represents the number of samples or transform coefficients in the transform block). The reconstruction vector of the transformation block refers to the ordered reconstruction transform coefficient of the transformation block (or alternatively, the ordered reconstruction sample). Figures 5a and 5b illustrate this effect for the simplest case of two transform coefficients. Figure 5a shows the allowable reconstruction vector (which represents a point in the 2d plane) for non-dependent scalar quantization. As can be seen, the second transform coefficient
Figure 108123315-A0305-02-0027-35
The set of allowable values does not depend on the first reconstructed transform coefficient
Figure 108123315-A0305-02-0027-36
The selected value. Figure 5b shows an example of dependent scalar quantification. It should be noted that compared to non-dependent scalar quantization, the second transform coefficient
Figure 108123315-A0305-02-0027-37
The selectable reconstruction value depends on the first transform coefficient
Figure 108123315-A0305-02-0027-38
The selected reconstruction level. In the embodiment of Figure 5b, for the second transform coefficient
Figure 108123315-A0305-02-0027-39
There are two different sets of available reconstruction levels (illustrated by different colors). If the first transform coefficient
Figure 108123315-A0305-02-0027-41
If the quantization index is an even number (...,-2,0,2,...), it can be used for the second transform coefficient
Figure 108123315-A0305-02-0027-42
Select any reconstruction level of the first set (blue dots). And if the first transform coefficient
Figure 108123315-A0305-02-0027-43
If the quantization index is an odd number (...,-3,-1,1,3,...), it can be used for the second transform coefficient
Figure 108123315-A0305-02-0027-44
Select any reconstruction level of the second set (red dots). In the example, the reconstruction levels of the first set and the second set are shifted by half the quantization step (any reconstruction level of the second set is located between the two reconstruction levels of the first set).

變換係數之相依純量量化具有以下效應:對於各N維單位體積之給定平均數目之重構向量,變換係數之給定輸入向量與最接近的可用重構向量之間的距離之預期值減小。因此,對於給定平均數目之位元,變換係數之輸入向量與重構變換係數之向量之間的平均失真可減小。在向量量化中,此效應被稱作空間填充增益。在針對變換區塊使用相依純量量化之情況下,可利用高維向量量化之潛在空間填充增益之主要部分。且,相比於向量量化,重構程序(或解碼程序)之實施複雜度與利用非相依純量量化器之習知變換寫碼之複雜度相當。 The dependent scalar quantization of transform coefficients has the following effect: For a given average number of reconstruction vectors of each N -dimensional unit volume, the expected value of the distance between the given input vector of the transform coefficient and the closest available reconstruction vector is reduced small. Therefore, for a given average number of bits, the average distortion between the input vector of transform coefficients and the vector of reconstructed transform coefficients can be reduced. In vector quantization, this effect is called space filling gain. In the case of using dependent scalar quantization for transform blocks, the latent space of high-dimensional vector quantization can be used to fill the main part of the gain. Moreover, compared to vector quantization, the implementation complexity of the reconstruction process (or the decoding process) is equivalent to the complexity of coding with the conventional transformation using a non-dependent scalar quantizer.

圖6中說明利用相依純量量化之變換解碼器之方塊圖。主要改變係關於通向自上而下指向之箭頭的相依量化。如此等豎直箭頭所指示,在重構次序索引k>0之情況下,經重構變換係數

Figure 108123315-A0305-02-0028-45
不僅取決於相關聯量化索引q k ,且亦取決於重構次序中之先前變換係數的量化索引q 0 ,q 1 ,,q k-1。應注意,在相依量化中,必須唯一地定義變換係數之重構次序。若在熵寫碼中亦利用關於與量化索引q k 相關聯之重構層級集合的知識,則可改良總體變換編解碼器之效能。彼意謂基於適用於變換係數之重構層級集合而切換上下文(機率模型)或碼字表係有利的。 Figure 6 illustrates the block diagram of a transform decoder using dependent scalar quantization. The main change is about the dependent quantification of arrows that lead from top to bottom. As indicated by the vertical arrow, in the case of reconstruction order index k >0, the reconstructed transform coefficient
Figure 108123315-A0305-02-0028-45
It not only depends on the associated quantization index q k , but also depends on the quantization index q 0 , q 1 , ... , q k -1 of the previous transform coefficients in the reconstruction order. It should be noted that in dependent quantization, the reconstruction order of transform coefficients must be uniquely defined. If the knowledge about the reconstruction level set associated with the quantization index q k is also used in the entropy coding, the performance of the overall transform codec can be improved. This means that it is advantageous to switch the context (probability model) or codeword table based on the set of reconstruction levels applicable to the transform coefficients.

如在習知變換寫碼中,除分析變換以外,根據本文中概述之實施例的變換編碼亦涉及量化演算法及熵寫碼。通常使用合成變換之反變換(或反變換之接近近似)作為分析變換,且在給定熵解碼程序之情況下通常唯一地 指定熵寫碼。但,類似於在習知變換寫碼中,在給定原始變換係數之情況下,存在用於選擇量化索引之較高自由度。 As in the conventional transform coding, in addition to the analysis transform, the transform coding according to the embodiments outlined in this article also involves a quantization algorithm and entropy coding. The inverse transform of the synthetic transform (or the close approximation of the inverse transform) is usually used as the analysis transform, and in the case of a given entropy decoding program, it is usually unique Specify the entropy to write the code. However, similar to the conventional transform coding, given the original transform coefficients, there is a higher degree of freedom for selecting the quantization index.

變換係數之相依量化係指以下概念:變換係數之可用重構層級之集合取決於針對重構次序中之在前變換係數所選的量化索引(在同一變換區塊內部)。在重構層級之二個預定義集合中選擇當前變換係數之可容許重構層級之集合(基於寫碼次序中之在前變換係數的量化索引)。 The dependent quantization of transform coefficients refers to the following concept: the set of available reconstruction levels of transform coefficients depends on the quantization index selected for the previous transform coefficient in the reconstruction order (within the same transform block). Select the set of allowable reconstruction levels of the current transform coefficient from the two predefined sets of reconstruction levels (based on the quantization index of the previous transform coefficient in the coding order).

類似於對於習知非相依純量量化,基於區塊之量化參數(QP)判定量化步長△(或如上文所描述之對應尺度及移位參數),且所有重構層級(在所有重構層級集合中)表示量化步長△之整數倍。祢但各重構層級集合僅包括量化步長△之整數倍之子集。所有重構層級集合之所有可能重構層級表示量化步長之整數倍的相依量化之此組態可被視為均一重構量化器(URQ)之擴展。其基本優點在於經重構變換係數可藉由具有極低計算複雜度之演算法計算。 Similar to the conventional non-dependent scalar quantization, the quantization step size △ (or the corresponding scale and shift parameter as described above) is determined based on the quantization parameter (QP) of the block, and all reconstruction levels (in all reconstructions) In the level set) represents an integer multiple of the quantization step size △. However, each reconstruction level set only includes a subset of integer multiples of the quantization step △. This configuration in which all possible reconstruction levels in the set of all reconstruction levels represent integer multiples of the quantization step size can be regarded as an extension of the uniform reconstruction quantizer (URQ). The basic advantage is that the reconstructed transform coefficients can be calculated by an algorithm with extremely low computational complexity.

不僅可藉由區塊量化參數QP判定特定變換係數t k 之量化步長△ k (其中k指示重構次序),且亦有可能藉由量化加權矩陣及區塊量化參數判定特定變換係數t k 之量化步長△ k 。通常,特定變換係數t k 之量化步長△ k 係由變換係數t k 之加權因子w k (由量化加權矩陣指定)與區塊量化步長△block(由區塊量化參數指定)之乘積給定,△ k =w k .△blockNot only can specific quantization parameter QP determination block transform coefficients by the quantization step size T k k (where k indicates the order of reconstruction), and may also block by the quantization matrix and the quantization weighting parameter k determines particular transform coefficients T The quantization step size △ k . Generally, the quantization step size Δ k of a specific transform coefficient t k is given by the product of the weighting factor w k of the transform coefficient t k (specified by the quantization weighting matrix) and the block quantization step size Δ block (specified by the block quantization parameter) Set, △ k = w k . △ block .

應注意,歸因於整數實施或其他實施態樣, 經重構變換係數

Figure 108123315-A0305-02-0030-46
之實際計算(重構層級之實際計算)可略微偏離理想乘法。使△ k 為特定變換係數t k 之量化步長且使n k 指定量化步長之標稱整數因子(例如,由量化索引q k 給定)。在理想乘法之情況下,經重構變換係數
Figure 108123315-A0305-02-0030-47
由下式給定
Figure 108123315-A0305-02-0030-60
It should be noted that due to integer implementation or other implementation aspects, the reconstructed transform coefficient
Figure 108123315-A0305-02-0030-46
The actual calculation (reconstruction level actual calculation) may slightly deviate from the ideal multiplication. Let Δ k be the quantization step size of the specific transform coefficient t k and let n k designate the nominal integer factor of the quantization step size (for example, given by the quantization index q k ). In the case of ideal multiplication, the reconstructed transform coefficient
Figure 108123315-A0305-02-0030-47
Given by
Figure 108123315-A0305-02-0030-60

歸因於對整數實施之限制,經重構變換係數

Figure 108123315-A0305-02-0030-49
(或對應重構層級)實際上可根據下式
Figure 108123315-A0305-02-0030-57
,其中scale.2-shift
Figure 108123315-A0305-02-0030-52
k 。 Due to restrictions on the implementation of integers, reconstructed transform coefficients
Figure 108123315-A0305-02-0030-49
(Or corresponding reconstruction level) can actually be based on the following formula
Figure 108123315-A0305-02-0030-57
, Where scale. 2 -shift
Figure 108123315-A0305-02-0030-52
k .

或相似程序進行判定。若在以下描述中提及量化步長之整數倍,則對應文本亦適用於類似於上文指定之近似值的整數近似值。 Or similar procedures for judgment. If an integer multiple of the quantization step is mentioned in the following description, the corresponding text also applies to an integer approximation similar to the approximation specified above.

[3]中所提出之變換係數之相依純量量化使用重構層級之二個不同集合,且變換係數tk之二個集合之所有重構層級表示此變換係數之量化步長△k之整數倍(其至少部分地由基於區塊之量化參數判定)。應注意,量化步長△k僅表示二個集合中之可容許重構值之比例因子。除了變換區塊內部之不同變換係數tk之可能個別量化步長△k(及因此個別比例因子)之外,相同的二個重構層級集合用於所有變換係數。 The dependent scalar quantization of transform coefficients proposed in [3] uses two different sets of reconstruction levels, and all reconstruction levels of the two sets of transform coefficients t k represent integers of the quantization step △ k of this transform coefficient Times (which is determined at least in part by block-based quantization parameters). It is noted that the quantization step △ k shows only two of the set of reconstructed value of allowable ratio factor. In addition to the different transform blocks of transformation coefficient t may be inside individual outside (and hence the individual scale factors), the same two-level set of reconstructed quantization step △ k k for all of the transform coefficients.

在圖7中,說明二個重構層級集合t之較佳組態。含於第一量化集合(在圖式中標註為集合0)中之重構層級表示量化步長之偶整數倍。第二量化集合(在圖式中標註為集合1)含有量化步長之所有奇整數倍且另外含有 等於零之重構層級。應注意,二個重構集合圍繞零對稱。二個重構集合中含有等於零之重構層級,否則重構集合不相交。二個重構集合之並集含有量化步長之所有整數倍。 In FIG. 7, the preferred configuration of the two reconstruction level sets t is illustrated. The reconstruction level contained in the first quantization set (marked as set 0 in the figure) represents an even integer multiple of the quantization step. The second quantization set (marked as set 1 in the diagram) contains all odd integer multiples of the quantization step and additionally contains Reconstruction level equal to zero. It should be noted that the two reconstruction sets are symmetric around zero. The two reconstruction sets contain a reconstruction level equal to zero, otherwise the reconstruction sets do not intersect. The union of the two reconstruction sets contains all integer multiples of the quantization step.

編碼器在可容許重構層級當中選擇之重構層級係在位元串流內部傳輸。如在習知非相依純量量化中,此可使用所謂的量化索引來達成,量化索引亦被稱作變換係數層級。量化索引(或變換係數層級)為唯一地識別量化集合內部(亦即,重構層級集合內部)之可用重構層級的整數。將量化索引作為位元串流之部分發送至解碼器(使用任何熵寫碼技術)。在解碼器側,可基於重構層級之當前集合(其藉由寫碼/重構次序中之在前量化索引判定)及當前變換係數之所傳輸量化索引唯一地計算經重構變換係數。 The reconstruction level selected by the encoder among the allowable reconstruction levels is transmitted within the bit stream. As in the conventional non-dependent scalar quantization, this can be achieved by using so-called quantization indexes, which are also called transform coefficient levels. The quantization index (or transform coefficient level) is an integer that uniquely identifies the available reconstruction level within the quantization set (that is, the reconstruction level set). The quantization index is sent to the decoder as part of the bit stream (using any entropy coding technique). On the decoder side, the reconstructed transform coefficient can be uniquely calculated based on the current set of reconstruction levels (which is determined by the previous quantization index in the coding/reconstruction order) and the transmitted quantization index of the current transform coefficient.

量化索引至重構層級集合(或量化集合)內部之重構層級的指派可遵循如在圖7中可見之以下規則:將等於0之量化索引指派至等於0之重構層級。將等於1之量化索引指派至大於0之最小重構層級,將等於2之量化索引指派至大於0之下一重構層級(亦即,大於0之第二小的重構層級),等。或者,換言之,將大於0之重構層級以其值之遞增次序用大於0之整數(亦即,1、2、3等)標註。類似地,將量化索引-1指派至小於0之最大重構層級,將量化索引-2指派至小於0之下一個(亦即,第二大的)重構層級,等。或者,換言之,將小於0之重構層級以其值之遞減次序藉由小於0之整數(亦即,-1、-2、-3等)標註。 變換係數之重構程序可類似於圖8之偽碼中所指定之演算法而實施。 The assignment of the quantization index to the reconstruction level inside the reconstruction level set (or quantization set) can follow the following rule as can be seen in FIG. 7: the quantization index equal to 0 is assigned to the reconstruction level equal to 0. Assign a quantization index equal to 1 to the smallest reconstruction level greater than 0, assign a quantization index equal to 2 to a reconstruction level greater than 0 (ie, the second smallest reconstruction level greater than 0), and so on. Or, in other words, the reconstruction levels greater than 0 are marked with integers greater than 0 (that is, 1, 2, 3, etc.) in the increasing order of their values. Similarly, the quantization index -1 is assigned to the largest reconstruction level less than 0, the quantization index -2 is assigned to the reconstruction level below 0 (ie, the second largest), and so on. Or, in other words, the reconstruction levels less than 0 are marked with integers less than 0 (ie, -1, -2, -3, etc.) in the descending order of their values. The reconstruction procedure of the transform coefficients can be implemented similarly to the algorithm specified in the pseudo code of FIG. 8.

在圖8之偽碼中,level[k]表示針對變換係數t k 所傳輸之量化索引,且setId[k](等於0或1)指定當前重構層級集合之識別符(其係基於重構次序中之先前量化索引而判定,如將在下文更詳細地描述)。變數n表示由量化索引level[k]及集合識別符setId[k]給定之量化步長之整數倍。若使用含有量化步長△ k 之偶整數倍之第一重構層級集合對變換係數進行寫碼(setId[k]==0),則變數n為所傳輸量化索引之兩倍。若使用第二重構層級集合對變換係數進行寫碼(setId[k]==1),則存在以下三個狀況:(a)若level[k]等於0,則n亦等於0;(b)若level[k]大於0,則n等於量化索引level[k]之兩倍減去1;及(c)若level[k]小於0,則n等於量化索引level[k]之兩倍加上1。此可使用以下符號函數來指定:

Figure 108123315-A0305-02-0032-11
In the pseudo code of Figure 8, level[k] represents the quantization index transmitted for the transform coefficient t k , and setId[k] (equal to 0 or 1) specifies the identifier of the current reconstruction level set (which is based on the reconstruction The previous quantization index in the order is determined, as will be described in more detail below). The variable n represents an integer multiple of the quantization step given by the quantization index level[k] and the set identifier setId[k]. When reconstituted using the first level of the coupling comprises an integral multiple of the quantization step △ k of the set of transform coefficient code write (setId [k] == 0) , the variable n is the index of the transmitted quantization twice. If the second reconstruction level set is used to write the transform coefficients (setId[k]==1), there are the following three conditions: (a) If level[k] is equal to 0, then n is also equal to 0; (b) ) If level[k] is greater than 0, then n is equal to twice the quantization index level[k] minus 1; and (c) if level[k] is less than 0, then n is equal to twice the quantization index level[k] plus 1. This can be specified using the following symbolic functions:
Figure 108123315-A0305-02-0032-11

接著,若使用第二量化集合,則變數n等於量化索引level[k]之兩倍減去量化索引之符號函數sign(level[k])。 Then, if the second quantization set is used, the variable n is equal to twice the quantization index level[k] minus the sign function sign(level[k]) of the quantization index.

一旦判定了變數n(指定量化步長之整數因子),則藉由將n與量化步長△ k 相乘來獲得經重構變換係數

Figure 108123315-A0305-02-0032-53
。 Once the variable n (an integer factor specifying the quantization step size) is determined, the reconstructed transform coefficient is obtained by multiplying n and the quantization step size △ k
Figure 108123315-A0305-02-0032-53
.

如上文所提及,經重構變換係數

Figure 108123315-A0305-02-0032-54
可藉由整 數近似獲得,而非與量化步長△k精確相乘。此說明於圖9中之偽碼中。此處,變數移位表示向右的位元移位。其值通常僅取決於區塊之量化參數(但移位參數可針對區塊內部之不同變換係數改變亦係可能的)。變數scale[k]表示變換係數t k 之縮放因子;除區塊量化參數以外,其亦可例如取決於量化加權矩陣之對應輸入項。變數「add」指定捨入偏移,其通常被設定為等於add=(1<<(shift-1))。應注意,除了捨入之外,圖9之偽碼(最末行)中所之指定的整數算術等效於與由下式給定之量化步長△k相乘△k=scale[k].2-shift. As mentioned above, the reconstructed transform coefficients
Figure 108123315-A0305-02-0032-54
May be approximated by an integer, instead of the quantization step size is multiplied with the exact △ k. This is illustrated in the pseudo code in Figure 9. Here, variable shift means bit shift to the right. Its value usually depends only on the quantization parameter of the block (but it is also possible that the shift parameter can be changed for different transform coefficients within the block). The variable scale[k] represents the scaling factor of the transform coefficient t k ; in addition to the block quantization parameter, it can also depend on the corresponding input item of the quantization weighting matrix, for example. The variable "add" specifies the rounding offset, which is usually set equal to add=(1<<(shift-1)). It should be noted that, except for rounding, the integer arithmetic specified in the pseudocode (the last row) of Figure 9 is equivalent to multiplying by the quantization step △ k given by the following formula △ k =scale[ k ]. 2 -shift .

圖9中相對於圖8之另一(僅外觀)改變為,使用三進位if-then-else運算子(a?b:c)來實施二個重構層級集合之間的切換,此運算子自諸如C程式設計語言之程式設計語言已知。 Another (appearance only) change in Figure 9 compared to Figure 8 is to use a ternary if-then-else operator (a?b:c) to switch between the two reconstruction level sets. This operator Known from programming languages such as the C programming language.

除上文所論述之重構層級集合之選擇以外,變換寫碼中之相依純量量化中之另一任務為用於在經定義量化集合(重構層級集合)之間進行切換之演算法。所使用之演算法判定可在變換係數之N維空間中(及因此,亦在經重構樣本之N維空間中)達成之「封裝密度」。較高封裝密度最終致使寫碼效率提高。 In addition to the selection of reconstruction level sets discussed above, another task in dependent scalar quantization in transform coding is an algorithm for switching between defined quantization sets (reconstruction level sets). The algorithm used determines the "packaging density" that can be achieved in the N -dimensional space of the transform coefficients (and therefore also in the N-dimensional space of the reconstructed samples). The higher packing density ultimately leads to improved coding efficiency.

在[3]中所呈現之概念中,基於量化集合之分割而判定下一變換係數之重構層級集合,如圖10中所說明。將二個量化集合中之各者分割成二個子集。將第一量化集合(標註為集合0)分割成二個子集(標註為A及B), 且亦將第二量化集合(標註為集合1)分割成二個子集(標註為C及D)。在圖7及圖10中,量化集合分割成子集係由空心圓及實心圓指示。以下分割規則適用:‧子集A由量化集合0之所有偶數量化索引組成;‧子集B由量化集合0之所有奇數量化索引組成;‧子集C由量化集合1之所有偶數量化索引組成;‧子集D由量化集合1之所有奇數量化索引組成;所使用之子集未在位元串流內部明確地指示。替代地,其可基於所使用之量化集合(例如,集合0或集合1)及實際上傳輸之量化索引而導出。子集可由所傳輸量化索引層級與1之逐位元「與(and)」運算導出。子集A由(level&1)等於0之集合0之所有量化索引組成,子集B由(level&1)等於1之集合0之所有量化索引組成,子集C由(level&1)等於0之集合1之所有量化索引組成,且子集D由(level&1)等於1之集合1之所有量化索引組成。 In the concept presented in [3], the reconstruction level set of the next transform coefficient is determined based on the division of the quantized set, as illustrated in FIG. 10. Divide each of the two quantized sets into two subsets. The first quantized set (labeled as set 0) is divided into two subsets (labeled as A and B), and the second quantized set (labeled as set 1) is also divided into two subsets (labeled as C and D) ). In Figures 7 and 10, the division of the quantized set into subsets is indicated by open circles and solid circles. The following segmentation rules apply: ‧Subset A is composed of all the even quantization indexes of quantization set 0; ‧Subset B is composed of all the odd quantization indexes of quantization set 0; ‧Subset C is composed of all the even quantization indexes of quantization set 1 ‧Subset D is composed of all odd quantization indexes of quantization set 1; the used subset is not clearly indicated in the bit stream. Alternatively, it can be derived based on the quantization set used (for example, set 0 or set 1) and the quantization index actually transmitted. The subset can be derived from the bitwise "and" operation of the transmitted quantization index level and 1. Subset A is composed of all quantization indexes of set 0 where (level&1) is equal to 0, subset B is composed of all quantization indexes of set 0 where (level&1) is equal to 1, and subset C is composed of all quantization indexes of set 1 where (level&1) is equal to 0 It is composed of quantization indexes, and subset D is composed of all quantization indexes of set 1 whose (level&1) is equal to 1.

量化集合(集合0及集合1)之間的轉換由狀態變數表示;該狀態變數具有四個可能值(0、1、2、3)。一方面,狀態變數指定用於當前變換係數之量化集合。當且僅當狀態變數等於0或1時,使用量化集合0,且當且僅當狀態變數等於2或3時,使用量化集合1。另一方面,狀態變數亦指定量化集合之間的可能轉換。表1展示所使用之狀態轉換表。在給定當前狀態之情況下,其指定當前變換係數之量化集合(第二行)。其進一步基於與所選量化索引相關聯之路徑指定狀態轉換(若給定量化集合,則路徑 指定所使用之子集A、B、C或D)。在重構區塊之變換係數時,其足以更新狀態變數且判定所使用之量化索引之路徑。 The transition between quantized sets (set 0 and set 1) is represented by a state variable; the state variable has four possible values (0, 1, 2, 3). On the one hand, the state variable specifies the quantized set for the current transform coefficient. If and only if the state variable is equal to 0 or 1, the quantization set 0 is used, and if and only if the state variable is equal to 2 or 3, the quantization set 1 is used. On the other hand, state variables also specify possible transitions between quantized sets. Table 1 shows the state transition table used. Given the current state, it specifies the quantized set of current transform coefficients (the second line). It further specifies a state transition based on the path associated with the selected quantization index (if the quantization set is given, the path Specify the subset A, B, C, or D used). When reconstructing the transform coefficients of the block, it is sufficient to update the state variables and determine the path of the quantization index used.

Figure 108123315-A0305-02-0035-12
Figure 108123315-A0305-02-0035-12

路徑由量化索引之同位給定。在level[k]為當前量化索引之情況下,其可根據下式進行判定path=(level[k]&1),其中運算子&表示二補碼整數算術中之逐位元「與」。 The path is given by the parity of the quantization index. In the case that level[k] is the current quantization index, it can be determined according to the following formula path=(level[k]&1), where the operator & represents the bitwise “and” in two's complement integer arithmetic.

使用狀態轉換之概念,藉由先前狀態(以重構次序)及先前量化索引,諸如其在本實例中之同位,唯一地判定當前狀態及因此當前量化集合。變換區塊之第一狀態被設定為等於0。 Using the concept of state transition, the current state and therefore the current quantization set are uniquely determined by the previous state (in reconstruction order) and the previous quantization index, such as its parity in this example. The first state of the transformation block is set equal to 0.

用於相依純量量化之狀態轉換概念允許用於在解碼器中重構變換係數之低複雜度實施。單一變換區塊之變換係數之重構程序的較佳實例使用C-樣式偽碼展示於圖11中。 The concept of state transition for dependent scalar quantization allows low-complexity implementation for reconstructing transform coefficients in the decoder. A preferred example of the reconstruction procedure of the transform coefficients of a single transform block is shown in FIG. 11 using C-style pseudo code.

在圖11之偽碼中,索引k指定變換係數之重構次序。應注意,在實例程式碼中,索引k以重構次序減小。最末變換係數具有等於k=0之索引。第一索引kstart指定第一經重構變換係數之重構索引(或更準確地,反重構索引)。變數kstart可設定為等於變換區塊中 變換係數之數目減去1,或其可設定為等於寫碼/重構次序中之第一非零量化索引之索引(例如,若以所應用之熵寫碼方法傳輸第一非零量化索引之位置)。在後一狀況下,推斷所有在前變換係數(其中索引k>kstart)等於0。各單一變換係數之重構程序與圖9之實例中之重構程序相同。對於圖9中之實例,量化索引由level[k]表示,且相關聯經重構變換由trec[k]表示。狀態變數由狀態表示。應注意,在圖11之實例中,狀態在變換區塊之開頭處設定為等於0。1d表格setId[]指定與狀態變數之不同值相關聯的量化集合,且2d表格state_trans_table[][]指定給定當前狀態(第一自變量)及路徑(第二自變量)之狀態轉換。路徑由量化索引之同位給定(使用逐位元及運算子&)。 In the pseudo code of FIG. 11, the index k specifies the reconstruction order of transform coefficients. It should be noted that in the example code, the index k decreases in reconstruction order. The last transform coefficient has an index equal to k =0. The first index kstart specifies the reconstruction index (or more accurately, the inverse reconstruction index) of the first reconstructed transform coefficient. The variable kstart can be set equal to the number of transform coefficients in the transform block minus 1, or it can be set equal to the index of the first non-zero quantization index in the coding/reconstruction order (for example, if writing with the applied entropy The coding method transmits the position of the first non-zero quantization index). In the latter case, it is inferred that all previous transform coefficients (where index k > kstart ) are equal to zero. The reconstruction procedure of each single transform coefficient is the same as the reconstruction procedure in the example of FIG. 9. For the example in FIG. 9, the quantization index is represented by level[k], and the associated reconstructed transform is represented by trec[k]. State variables are represented by states. It should be noted that in the example of Figure 11, the state is set equal to 0 at the beginning of the transform block. The 1d table setId[] specifies the quantization set associated with the different values of the state variables, and the 2d table state_trans_table[][] specifies Given the current state (the first argument) and the state transition of the path (the second argument). The path is given by the parity of the quantization index (using the bitwise and operator &).

可使用簡單算術運算而非表setId[];例如,向右的位元移位:setId[state]=state>>1 Simple arithmetic operations can be used instead of the table setId[]; for example, bit shift to the right: setId[state]=state>>1

類似地,亦可使用簡單算術運算來實施表state_trans_table[][]。例如,state_trans_table[state][path]=(32040>>((state<<2)+(path<<1)))&3 Similarly, simple arithmetic operations can also be used to implement the table state_trans_table[][]. For example, state_trans_table[state][path]=(32040>>((state<<2)+(path<<1)))&3

此處,由16-位元值「32040」給出完整狀態轉換表。應注意,藉由用「0」替換值「32040」,可易於在相依量化與非相依量化之間進行切換。值「0」表示始終選擇狀態0且因此選擇習知均一重構量化器Q0之狀態轉換表。 Here, the complete state transition table is given by the 16-bit value "32040". It should be noted that by replacing the value "32040" with "0", it is easy to switch between dependent quantization and non-dependent quantization. The value "0" means that the state 0 is always selected and therefore the state transition table of the conventional uniform reconstruction quantizer Q0 is selected.

相依量化中之狀態轉換亦可使用網格結構表示,如圖12中所說明。此圖中所展示之網格對應於表1中所指定之狀態轉換。對於各狀態,存在連接當前變換係數之狀態與重構次序中之下一變換係數之二個可能狀態的二個路徑。該等路徑用路徑0及路徑1標註,此編號對應於上文所介紹之路徑變數(對於路徑變數等於量化索引之同位的較佳實施例)。應注意,各路徑唯一地指定量化索引之子集(A、B、C或D)。在圖12中,在圓括號中指定子集。在給定初始狀態(狀態0)之情況下,藉由所傳輸之量化索引唯一地指定通過網格之路徑。 The state transition in dependent quantization can also be represented by a grid structure, as illustrated in Figure 12. The grid shown in this figure corresponds to the state transitions specified in Table 1. For each state, there are two paths connecting the state of the current transform coefficient and the two possible states of the next transform coefficient in the reconstruction order. The paths are labeled with path 0 and path 1, and this number corresponds to the path variable introduced above (for the preferred embodiment where the path variable is equal to the quantization index). It should be noted that each path uniquely specifies a subset (A, B, C, or D) of the quantization index. In Figure 12, the subset is specified in parentheses. Given the initial state (state 0), the transmitted quantization index uniquely specifies the path through the grid.

舉例而言,在圖12中,狀態(0、1、2及3)具有以下性質: For example, in Figure 12, the states (0, 1, 2, and 3) have the following properties:

狀態0:先前量化索引level[k-1]指定集合0之重構層級,且當前定量索引level[k]指定集合0之重構層級。 ‧State 0 : The previous quantization index level[k-1] specifies the reconstruction level of set 0, and the current quantitative index level[k] specifies the reconstruction level of set 0.

狀態1:先前量化索引level[k-1]指定集合1之重構層級,且當前定量索引level[k]指定集合0之重構層級。 ‧State 1 : The previous quantitative index level[k-1] specifies the reconstruction level of set 1, and the current quantitative index level[k] specifies the reconstruction level of set 0.

狀態2:先前量化索引level[k-1]指定集合0之重構層級,且當前定量索引level[k]指定集合1之重構層級。 ‧State 2 : The previous quantitative index level[k-1] specifies the reconstruction level of set 0, and the current quantitative index level[k] specifies the reconstruction level of set 1.

狀態0:先前量化索引level[k-1]指定集合1之重構層級,且當前定量索引level[k]指定集合1之重構層級。 ‧State 0 : The previous quantization index level[k-1] specifies the reconstruction level of set 1, and the current quantitative index level[k] specifies the reconstruction level of set 1.

網格由一系列所謂的基本網格胞元組成。基本網格胞元展示於圖13中。 The grid consists of a series of so-called basic grid cells. The basic grid cell is shown in Figure 13.

如上文所概述之相依純量量化之態樣為,針對變換係數存在不同的可容許重構層級集合(亦被稱作量 化集合)。基於在前變換係數之量化索引之值而判定當前變換係數之量化集合。若比較二個量化集合,則顯而易見的是,相比於集合1中之情況,在集合0中,等於零之重構層級與相鄰重構層級之間的距離更大。因此,若使用集合0,則量化索引等於0之機率較大,且若使用集合1,則該機率較小。對於高效寫碼,藉由基於用於當前量化索引之量化集合(或狀態)切換機率模型而將此態樣用於熵寫碼。 As outlined above, the aspect of dependent scalar quantization is that there are different sets of allowable reconstruction levels for transform coefficients (also known as quantitative 化集). The quantization set of the current transform coefficient is determined based on the value of the quantization index of the previous transform coefficient. Comparing the two quantized sets, it is obvious that in set 0, the distance between the reconstruction level equal to zero and the adjacent reconstruction level is greater than in the case of set 1. Therefore, if set 0 is used, the probability that the quantization index is equal to 0 is greater, and if set 1, the probability is smaller. For efficient coding, this aspect is used for entropy coding by switching probability models based on the quantization set (or state) used for the current quantization index.

應注意,為了合適地切換機率模型,當對當前量化索引(或當前量化索引之對應二進位決策)進行熵解碼時,所有在前量化索引之路徑(與所使用量化集合之子集相關聯)必須已知。出於彼目的,在[3]中所提出之編解碼器中,以重構次序對變換係數進行寫碼。使用類似於H.264|MPEG-4 AVC或H.265|MPEG-H HEVC之二進位算術寫碼對量化索引進行寫碼。非二進位量化索引首先映射至一系列二進位決策(其通常被稱作位元子)上。量化索引作為絕對值傳輸且在絕對值大於0之情況下作為符號傳輸。 It should be noted that in order to properly switch the probability model, when entropy decoding the current quantization index (or the corresponding binary decision of the current quantization index), all the paths of the previous quantization index (associated with the subset of the used quantization set) must A known. For that purpose, in the codec proposed in [3], the transform coefficients are written in reconstruction order. Use binary arithmetic coding code similar to H.264|MPEG-4 AVC or H.265|MPEG-H HEVC to code the quantization index. The non-binary quantization index is first mapped to a series of binary decisions (which are usually referred to as bits). The quantization index is transmitted as an absolute value and as a symbol when the absolute value is greater than 0.

類似地,對於HEVC,基於子區塊對變換區塊之變換係數層級進行寫碼。首先,傳輸旗標coded_block_flag,其指定變換區塊是否含有任何非零變換係數層級。若coded_block_flag等於0(亦即,區塊不含有任何非零層級),則不針對變換區塊傳輸另外資訊。否則(coded_block_flag等於1),以下適用: Similarly, for HEVC, the transform coefficient level of the transform block is coded based on the sub-block. First, the transmission flag coded_block_flag, which specifies whether the transform block contains any non-zero transform coefficient levels. If coded_block_flag is equal to 0 (that is, the block does not contain any non-zero levels), no additional information is transmitted for the transformed block. Otherwise (coded_block_flag is equal to 1), the following applies:

‧寫碼次序中之第一非零層級的x及y座標。如圖14 中所說明,第一非零層級之所傳輸位置指定,推斷在寫碼次序中先於經識別係數的所有變換係數(在圖14中經白色標記)等於零。僅針對指定位置處之係數(在圖14中經黑色標記)及寫碼次序中在此係數之後的係數(在圖14中經陰影標記)傳輸另外資料。圖14中之實例展示具有4×4子區塊之16×16變換區塊;所使用之寫碼次序為H.265|MPEG-H HEVC中所指定之逐子區塊對角線掃描。 ‧The x and y coordinates of the first non-zero level in the coding sequence. As shown in Figure 14 As explained in, the transmitted position designation of the first non-zero level is inferred that all transform coefficients (marked in white in FIG. 14) that precede the identified coefficients in the coding order are equal to zero. Additional data is transmitted only for the coefficient at the designated position (marked in black in FIG. 14) and the coefficient after this coefficient in the coding order (marked by hatching in FIG. 14). The example in Figure 14 shows a 16×16 transform block with 4×4 sub-blocks; the coding order used is the sub-block diagonal scan specified in H.265|MPEG-H HEVC.

‧對於先於含有第一非零層級(由所傳輸之x及y座標指示)之彼子區塊的子區塊,傳輸旗標coded_subblock_flag,其指定子區塊是否含有任何非零變換係數層級。作為例外狀況,不針對含有DC係數之子區塊傳輸coded_subblock_flag。對於此子區塊,推斷coded_subblock_flag等於1。 ‧For the sub-block that precedes the other sub-block that contains the first non-zero level (indicated by the transmitted x and y coordinates), the transmission flag coded_subblock_flag, which specifies whether the sub-block contains any non-zero transform coefficient levels. As an exception, coded_subblock_flag is not transmitted for sub-blocks containing DC coefficients. For this subblock, it is inferred that coded_subblock_flag is equal to 1.

最後,對於coded_subblock_flag等於1之所有子區塊以及含有寫碼次序中之第一非零層級之子區塊,對變換係數層級之值進行寫碼,如圖15中之偽碼所說明。此處,firstScanIdSbb表示子區塊內部之第一掃描索引。對於含有第一非零層級(由所傳輸之x及y座標指示)之子區塊,firstScanIdSbb等於對應於所傳輸之(x,y)座標的掃描索引firstNonZero。對於其他所傳輸子區塊,firstScanIdSbb指定子區塊內部之第一掃描索引。掃描索引lastScanIdSbb指定子區塊內部之最末掃描索引。應注意,在對寫碼次序中之下一子區塊之任何係數進行寫碼之前對子區塊內部之所有係數進行寫碼。 Finally, for all sub-blocks with coded_subblock_flag equal to 1 and sub-blocks containing the first non-zero level in the coding order, the value of the transform coefficient level is coded, as illustrated by the pseudo code in FIG. 15. Here, firstScanIdSbb represents the first scan index inside the sub-block. For the sub-block containing the first non-zero level (indicated by the transmitted x and y coordinates), firstScanIdSbb is equal to the scan index firstNonZero corresponding to the transmitted (x, y) coordinates. For other transmitted sub-blocks, firstScanIdSbb specifies the first scan index within the sub-block. The scan index lastScanIdSbb specifies the last scan index within the sub-block. It should be noted that all coefficients in the sub-block are written before any coefficients of the next sub-block in the coding order are written.

在二個遍次中對子區塊之層級進行寫碼。在第一遍次中傳輸絕對值,且在第二遍次中針對絕對值不等於零之所有係數傳輸符號。如下對絕對值進行寫碼: In the second pass, the level of the sub-block is coded. The absolute value is transmitted in the first pass, and the symbol is transmitted for all coefficients whose absolute value is not equal to zero in the second pass. Write the absolute value as follows:

‧傳輸旗標sig_flag,其指定絕對層級是否大於零。若可推斷旗標等於1,亦即,當以下條件中之任一者適用時,不傳輸此旗標:○當前掃描索引k等於第一非零層級(如由所傳輸之x及y座標指示)之掃描索引;○當前掃描索引為子區塊內部之最末掃描索引,已針對子區塊傳輸等於1之coded_subblock_flag,且子區塊中之所有先前層級等於0。 ‧Transmission flag sig_flag, which specifies whether the absolute level is greater than zero. If it can be inferred that the flag is equal to 1, that is, this flag is not transmitted when any of the following conditions apply: ○ The current scan index k is equal to the first non-zero level (as indicated by the transmitted x and y coordinates ) Scan index; ○ The current scan index is the last scan index inside the sub-block, coded_subblock_flag equal to 1 has been transmitted for the sub-block, and all previous levels in the sub-block are equal to 0.

‧若sig_flag等於1(亦即,絕對層級大於0),則傳輸另一旗標gt1_flag,其指定絕對層級是否大於一。 ‧If sig_flag is equal to 1 (that is, the absolute level is greater than 0), then another flag gt1_flag is transmitted, which specifies whether the absolute level is greater than one.

‧若sig_flag及gt1_flag等於1(亦即,絕對層級大於1),則傳輸另一旗標gt2_flag,其指定絕對層級是否大於二。 ‧If sig_flag and gt1_flag are equal to 1 (that is, the absolute level is greater than 1), another flag gt2_flag is transmitted, which specifies whether the absolute level is greater than two.

‧若sig_flag、gt1_flag及gt2_flag等於1(亦即,絕對層級大於2),則傳輸另一旗標gt3_flag,其指定絕對層級是否大於三。 ‧If sig_flag, gt1_flag and gt2_flag are equal to 1 (that is, the absolute level is greater than 2), then another flag gt3_flag is transmitted, which specifies whether the absolute level is greater than three.

‧若sig_flag、gt1_flag、gt2_flag及gt3_flag等於1(亦即,絕對層級大於3),則傳輸另一旗標gt4_flag,其指定絕對層級是否大於四。 ‧If sig_flag, gt1_flag, gt2_flag, and gt3_flag are equal to 1 (that is, the absolute level is greater than 3), then another flag gt4_flag is transmitted, which specifies whether the absolute level is greater than four.

‧若sig_flag、gt1_flag、gt2_flag、gt3_flag及gt4_flag等於1(亦即,絕對層級大於4),則傳輸語法元 素gt3_flag,其指定絕對值減去5。 ‧If sig_flag, gt1_flag, gt2_flag, gt3_flag, and gt4_flag are equal to 1 (that is, the absolute level is greater than 4), the syntax element is transmitted The prime gt3_flag, which specifies the absolute value minus 5.

在傳輸子區塊之所有層級的絕對值之後,針對絕對層級不等於零之所有係數傳輸符號位元sign_flag。 After transmitting the absolute values of all levels of the sub-block, the sign bit sign_flag is transmitted for all coefficients whose absolute level is not equal to zero.

使用自適應性機率模型(亦被稱作上下文)對旗標sig_flag、gt1_flag、gt2_flag、gt3_flag及gt4_flag進行寫碼。對於此等旗標,如下選擇多個自適應性機率模型中之一者:使狀態為變換係數之狀態變數之當前值(狀態變數係基於寫碼次序中已經寫碼層級之同位而判定)。使diag指定當前掃描位置之對角線位置(diag=x+y,其中x及y指定掃描位置之x及y座標)。此外,使sumAbsTemplate為16圖中所說明之局部鄰域中之已經寫碼絕對值的總和,其中對應鄰域係藉助於對屬於係數鄰域之彼等係數加陰影來指示,該等係數之位元子當前經寫碼,該位元子又以黑色繪示。且使numSigTemplate為同一局部鄰域中大於0的絕對層級數目。 Use an adaptive probability model (also called context) to write the flags sig_flag, gt1_flag, gt2_flag, gt3_flag, and gt4_flag. For these flags, one of multiple adaptive probability models is selected as follows: the state is the current value of the state variable of the transformation coefficient (the state variable is determined based on the parity of the code level in the coding sequence). Make diag specify the diagonal position of the current scan position (diag=x+y, where x and y specify the x and y coordinates of the scan position). In addition, let sumAbsTemplate be the sum of the absolute values of the written codes in the local neighborhood illustrated in Figure 16, where the corresponding neighborhood is indicated by shading the coefficients belonging to the neighborhood of the coefficients. Yuanzi is currently writing the code, and the position is again shown in black. And let numSigTemplate be the absolute number of levels greater than 0 in the same local neighborhood.

對於sig_flag,所選擇之機率模型取決於:‧當前掃描位置之對角線(由x及y座標之總和給定);‧用於當前變換係數之量化器(Q0或Q1,由state>>1給定);‧由sumAbsTemplate給定之局部鄰域中之已經寫碼絕對層級的總和。 For sig_flag, the selected probability model depends on: ‧The diagonal of the current scan position (given by the sum of x and y coordinates); ‧The quantizer used for the current transform coefficient (Q0 or Q1, by state>>1 Given); ‧The sum of the absolute levels of code written in the local neighborhood given by sumAbsTemplate.

對於gt1_flag,所選擇之機率模型取決於:‧當前掃描位置之對角線(由x及y座標之總和給定); ‧用於當前變換係數之量化器(Q0或Q1,由state>>1給定);‧值sumAbsTemplate-numSigTemplate(亦即,局部鄰域中之絕對值之總和減去局部鄰域中大於0的絕對層級數目)。 For gt1_flag, the selected probability model depends on: ‧The diagonal of the current scan position (given by the sum of x and y coordinates); ‧Quantizer used for the current transform coefficient (Q0 or Q1, given by state>>1); ‧Value sumAbsTemplate-numSigTemplate (that is, the sum of the absolute values in the local neighborhood minus the value greater than 0 in the local neighborhood Absolute number of levels).

對於gt2_flag、gt3_flag及gt4_flag,使用同一機率模型。其取決於以下各者來選擇:‧當前掃描位置之對角線(由x及y座標之總和給定);‧值sumAbsTemplate-numSigTemplate(亦即,局部鄰域中之絕對值之總和減去局部鄰域中大於0的絕對層級數目)。 For gt2_flag, gt3_flag, and gt4_flag, the same probability model is used. It depends on the following to choose: ‧The diagonal of the current scan position (given by the sum of the x and y coordinates); ‧The value sumAbsTemplate-numSigTemplate (that is, the sum of the absolute values in the local neighborhood minus the local The absolute number of levels in the neighborhood greater than 0).

首先使非二進位語法元素二進位化(亦即,映射至位元子之序列),且在算術寫碼引擎之旁路模式中(使用具有pmf{0.5,0.5}之非自適應性機率模型)對位元子進行寫碼。對於二進位化,使用萊斯-哥倫布(Rice-Golomb)碼,其藉由所謂的萊斯參數來參數化。取決於(sumAbsTemplate-numSigTemplate)之值選擇萊斯參數。最後,使用算術寫碼引擎之旁路模式對符號旗標進行寫碼。 First, the non-binary syntax elements are binarized (that is, mapped to the sequence of bit subs), and in the bypass mode of the arithmetic coding engine (using the non-adaptive probability model with pmf{0.5,0.5} ) Write code to the bit. For binarization, Rice-Golomb codes are used, which are parameterized by so-called Rice parameters. The Rice parameter is selected depending on the value of (sumAbsTemplate-numSigTemplate). Finally, use the bypass mode of the arithmetic coding engine to code the symbol flag.

為了獲得提供失真(重構品質)與位元速率之間的極好權衡的位元串流,應以使得拉格朗日成本度量

Figure 108123315-A0305-02-0042-13
In order to obtain a bit stream that provides an excellent trade-off between distortion (reconstruction quality) and bit rate, the Lagrangian cost metric should be
Figure 108123315-A0305-02-0042-13

最小化的方式選擇量化索引。對於非相依純量量化, 此量化演算法(被稱作速率-失真最佳化量化或RDOQ)論述於前文中。但相比於非相依純量量化,具有額外困難。經重構變換係數

Figure 108123315-A0305-02-0043-55
且因此其失真
Figure 108123315-A0305-02-0043-56
不僅取決於相關聯量化索引q k ,且亦取決於寫碼次序中之先前量化索引之值。 Select the quantization index in a minimized way. For non-dependent scalar quantization, this quantization algorithm (called rate-distortion optimized quantization or RDOQ) is discussed above. But compared with non-dependent scalar quantification, it has additional difficulties. Reconstructed transform coefficient
Figure 108123315-A0305-02-0043-55
And therefore its distortion
Figure 108123315-A0305-02-0043-56
It depends not only on the associated quantization index q k , but also on the value of the previous quantization index in the coding order.

然而,如上文已論述,變換係數之間的相依性可使用網格結構表示。對於進一步描述,吾人使用圖10中給定之較佳實施例作為一實例。8個變換係數之區塊之實例的網格結構展示於圖17中。通過網格(自左至右)之路徑表示量化索引之可能狀態轉換。應注意,二個節點之間的各連接表示特定子集(A、B、C、D)之量化索引。若自子集(A、B、C、D)中之各者選擇量化索引q k 且將對應速率-失真成本J k =D k (q k |q k-1 ,q k-2 ,…)+λR k (q k |q k-1 ,q k-2 ,…) However, as discussed above, the dependency between transform coefficients can be expressed using a grid structure. For further description, we use the preferred embodiment given in FIG. 10 as an example. The grid structure of an example of blocks of 8 transform coefficients is shown in FIG. 17. The path through the grid (from left to right) represents the possible state transitions of the quantization index. It should be noted that each connection between two nodes represents the quantization index of a specific subset (A, B, C, D). If the quantization index q k is selected from each of the subsets (A, B, C, D) and the corresponding rate-distortion cost J k = D k ( q k | q k -1 ,q k -2 , …) + λR k ( q k | q k -1 ,q k -2 , …)

指派至二個網格節點之間的相關聯連接,則判定使總速率-失真成本D+λR最小化之量化索引之向量/區塊的問題等效於找到具有通過網格(在圖17中自左至右)之最小成本路徑的路徑。若忽略熵寫碼之一些相依性(類似於RDOQ),則可使用熟知維特比(Viterbi)演算法來解決此最小化問題。 Assigned to the associated connection between two grid nodes, it is determined to make the total rate-distortion cost D + λ . The problem of the vector/block of the quantization index for minimizing R is equivalent to finding the path with the least cost path through the grid (from left to right in Figure 17). If some dependencies of entropy coding (similar to RDOQ) are ignored, the well-known Viterbi algorithm can be used to solve this minimization problem.

用於選擇變換區塊之合適量化索引之實例編碼演算法可由以下主要步驟組成: The example coding algorithm used to select the appropriate quantization index of the transform block can consist of the following main steps:

1.將初始狀態之速率-失真成本設定為等於0。 1. Set the initial state rate-distortion cost equal to zero.

2.對於寫碼次序中之所有變換係數,執行以下操作: 2. For all transform coefficients in the coding sequence, perform the following operations:

a.對於各子集A、B、C、D,判定使給定原始變換係數之失真最小化的量化索引。 a. For each subset A, B, C, and D, determine the quantization index that minimizes the distortion of the given original transform coefficient.

b.對於當前變換係數之所有網格節點(0、1、2、3),執行以下操作: b. For all grid nodes (0, 1, 2, 3) of the current transformation coefficient, perform the following operations:

i.計算連接在前變換係數之狀態與當前狀態之二個路徑的速率-失真成本。成本給定為在前狀態之成本與D k +λR k 的總和,其中D k R k 表示用於選擇與所考慮連接相關聯之子集(A、B、C、D)之量化索引的失真及速率。 i. Calculate the rate-distortion cost of the two paths connecting the state of the previous transform coefficient and the current state. The cost is given as the cost of the previous state and D k + λ . The sum of R k , where D k and R k represent the distortion and rate of the quantization index used to select the subset (A, B, C, D) associated with the connection under consideration.

ii.將計算出的成本之最小值指派至當前節點且將連接修剪成並不表示最小成本路徑之先前變換係數之狀態。 ii. Assign the minimum value of the calculated cost to the current node and trim the connection to a state that does not represent the previous transformation coefficient of the least cost path.

應注意:在此步驟之後,當前變換係數之所有節點皆具有至在前變換係數之任何節點之單一連接。 It should be noted that after this step, all nodes of the current transform coefficient have a single connection to any node of the previous transform coefficient.

3.比較4個最終節點(針對寫碼次序中之最末係數)之成本且選擇具有最小成本之節點。應注意,此節點與通過網格之唯一路徑相關聯(所有其他連接皆在先前步驟中經修剪)。 3. Compare the cost of the 4 final nodes (for the last coefficient in the coding order) and select the node with the smallest cost. It should be noted that this node is associated with a unique path through the grid (all other connections are trimmed in the previous step).

4.遵循所選路徑(由最終節點指定)為反向次序且收集與網格節點之間的連接相關聯之量化索引。 4. Follow the selected path (specified by the final node) in reverse order and collect the quantized index associated with the connection between the grid nodes.

現在,描述本申請案之實施例。其以獨立方式呈現,但有時參考上文所論述之圖式。特定言之,以下描述聚焦於與以上實例之差異,且因此,此等差異可用於修改以上描述以得到其他實施例,且反之亦然,可個別地或組合地使用上文所描述之個別任務,諸如關於上下文選 擇、量化、解量化、變換、重新變換、熵寫碼/解碼之任務,以修改或進一步指定隨後解釋之實施例以得到甚至其他實施例。 Now, embodiments of the present application will be described. It is presented in a standalone manner, but sometimes with reference to the schema discussed above. In particular, the following description focuses on the differences from the above examples, and therefore, these differences can be used to modify the above description to obtain other embodiments, and vice versa, the individual tasks described above can be used individually or in combination , Such as about context selection Select, quantize, dequantize, transform, retransform, entropy coding/decoding tasks to modify or further specify the subsequently explained embodiments to obtain even other embodiments.

相比於利用習知非相依純量量化之變換寫碼,如上文所描述之利用相依純量量化[3]的變換寫碼通常改良寫碼效率。然而,上圖15中所描述之相依量化索引(變換係數層級)之熵寫碼具有二個問題,此使得難以達成高處理量硬體設計: Compared with conventional code writing using non-dependent scalar quantization, the conversion code using dependent scalar quantization [3] as described above generally improves coding efficiency. However, the entropy coding of the dependent quantization index (transform coefficient level) described in Figure 15 has two problems, which make it difficult to achieve a high-throughput hardware design:

‧在算術寫碼引擎之常規寫碼模式中寫碼的位元子(sig_flag、gt1_flag、gt2_flag、gt3_flag及gt4_flag)與在旁路模式中寫碼之位元子(語法元素餘數之位元子)交錯。算術寫碼引擎之旁路模式可相比於常規模式更高效地實施。且此外,當連續地對相當大量數目之旁路位元子進行寫碼時,可特別高效地實施算術寫碼之旁路模式。常規模式與旁路模式之間的頻繁切換不利於硬體實施。 ‧Bits (sig_flag, gt1_flag, gt2_flag, gt3_flag and gt4_flag) for writing codes in the regular coding mode of the arithmetic coding engine and for writing codes in bypass mode (bits of the remainder of the syntax element) staggered. The bypass mode of the arithmetic coding engine can be implemented more efficiently than the conventional mode. And in addition, when a relatively large number of bypass bits are continuously written, the bypass mode of arithmetic coding can be implemented particularly efficiently. Frequent switching between normal mode and bypass mode is not conducive to hardware implementation.

‧大多數位元子之機率模型直接取決於正前方之位元子的值。舉例而言,用於sig_flag之機率模型取決於先前絕對層級之同位(其在讀取先前層級之最末位元子之前為未知的)。接著,sig_flag之值判定下一位元子為gt1_flag抑或另一sig_flag。若讀取gt1_flag,則其值判定下一位元子為gt2_flag抑或sig_flag等。此等直接相依性防止算術解碼程序之高效管線化。將較佳的是減少直接相依性之數目,使得位元子之算術解碼可在一定程度上管線化。 ‧The probability model of most bits directly depends on the value of the bits directly in front. For example, the probability model used for sig_flag depends on the parity of the previous absolute level (which is unknown before the last bit of the previous level is read). Then, the value of sig_flag determines whether the next bit is gt1_flag or another sig_flag. If gt1_flag is read, its value determines whether the next bit is gt2_flag or sig_flag. These direct dependencies prevent efficient pipelineization of arithmetic decoding procedures. It would be better to reduce the number of direct dependencies so that the arithmetic decoding of bits can be pipelined to a certain extent.

降低目前先進技術殘差寫碼設計之複雜度 的方法為若干掃描遍次中之寫碼。在各掃描遍次中,傳輸層級之部分資訊,使得完整層級資訊僅在最終掃描遍次之後可用。然而,此設計並不與相依量化技術相容。應注意,歸因於以下原因,位元子之重排序對於相依量化而言並不簡單: Reduce the complexity of the current advanced technology residual coding design The method is to write a code in several scan passes. In each scan pass, part of the level information is transmitted so that the complete level information is only available after the final scan pass. However, this design is not compatible with dependent quantization techniques. It should be noted that the reordering of bits is not simple for dependent quantification due to the following reasons:

‧特定言之,對於旗標sig_flag,針對二個支援量化器具有顯著不同的機率質量函數。若不知曉當前變換係數之量化器(Q0或Q1),則壓縮效率將顯著降級。但所使用之量化器取決於所有變換係數層級之同位,該等同位僅在所有先前變換係數之所有位元子係在當前變換係數之第一位元子(sig_flag)之前寫碼的情況下為已知的。 ‧In particular, for the flag sig_flag, there are significantly different probability quality functions for the two supporting quantizers. If the quantizer (Q0 or Q1) of the current transform coefficient is not known, the compression efficiency will be significantly degraded. But the quantizer used depends on the parity of all transform coefficient levels. The parity is only when all the bits of all previous transform coefficients are written before the first bit (sig_flag) of the current transform coefficient. known.

‧位元子之上下文模型化亦取決於關於局部鄰域中之已經傳輸絕對層級的知識。通常,關於相鄰變換係數層級之較好知識改良寫碼效率。 ‧The contextual modelling of bit sons also depends on the knowledge of the absolute level that has been transmitted in the local neighborhood. Generally, better knowledge about adjacent transform coefficient levels improves coding efficiency.

坦白言之,下文進一步描述之實施例藉由以下設計態樣中之一或多者克服了所提及問題: Frankly speaking, the embodiments described further below overcome the problems mentioned by one or more of the following design aspects:

‧在遍及所有掃描位置之多個遍次中對與子區塊(或區塊)之變換係數層級相關的位元子進行寫碼。 ‧Write the bits related to the transformation coefficient level of the sub-block (or block) in multiple passes over all scanning positions.

‧遍及掃描位置之一或多個第一遍次包括sig_flag之寫碼,且若sig_flag等於1,則包括同位旗標par_flag(指定變換係數層級之同位)之寫碼。其可包括或可不包括額外資料。應注意,藉由寫碼專用同位旗標,用於變換係數之量化器係已知的,且此知識可用於sig_flag's之高效上下文模型化。 ‧The first pass includes the writing code of sig_flag in one or more scanning positions, and if sig_flag is equal to 1, it includes the code writing of the parity flag par_flag (the parity of the specified transform coefficient level). It may or may not include additional information. It should be noted that with the dedicated parity flag for coding, the quantizer used for transform coefficients is known, and this knowledge can be used for efficient context modeling of sig_flag's.

‧在單獨遍次中對子區塊(或區塊)之語法元素餘數之所有旁路位元子進行寫碼。彼意謂,連續地對子區塊(或區塊)之所有旁路位元子進行寫碼。 ‧Write all the bypass bits of the remainder of the syntax element of the sub-block (or block) in a single pass. This means that all bypass bits of the sub-block (or block) are written continuously.

在下文中,描述了一種設計方法,其首先與需要同位資訊之量化方法相容,且其次相比於完整絕對層級資訊之寫碼繼承較低複雜度。中心概念為傳輸各絕對層級之同位資訊作為專用語法元素。不同位置係可能的,例如在有效值旗標之前,在有效值旗標之後,在任何「係大於……之層級」資訊之後。遵循同位資訊之語法元素之語義取決於用於傳輸同位語法元素之所選擇位置而交替。當同位資訊可用時,剩餘絕對層級資訊可除以二,從而產生用於語法元素之不同條件機率。 In the following, a design method is described, which is firstly compatible with quantization methods that require co-location information, and secondly, it inherits a lower complexity than the coding of complete absolute-level information. The central concept is to transmit the parity information of each absolute level as a special syntax element. Different positions are possible, such as before the effective value flag, after the effective value flag, and after any "level greater than..." information. The semantics of the syntax elements that follow the parity information alternate depending on the selected position for transmitting the parity syntax elements. When parity information is available, the remaining absolute level information can be divided by two to generate different conditional probabilities for syntax elements.

下文中描述關於位元子及相關聯上下文模型化之寫碼次序的其他細節。 The following describes other details about the coding order of bit elements and associated context modeling.

在實施例中,類似於HEVC,基於子區塊對變換區塊之變換係數層級進行寫碼。首先,傳輸旗標coded_block_flag,其指定變換區塊是否含有任何非零變換係數層級。若coded_block_flag等於0(亦即,區塊不含有任何非零層級),則不針對變換區塊傳輸另外資訊。否則(coded_block_flag等於1),以下適用: In the embodiment, similar to HEVC, the transform coefficient level of the transform block is coded based on sub-blocks. First, the transmission flag coded_block_flag, which specifies whether the transform block contains any non-zero transform coefficient levels. If coded_block_flag is equal to 0 (that is, the block does not contain any non-zero levels), no additional information is transmitted for the transformed block. Otherwise (coded_block_flag is equal to 1), the following applies:

‧傳輸寫碼次序中之第一非零層級的x及y座標。如圖14中所說明,第一非零層級之所傳輸位置指定,推斷在寫碼次序中先於經識別係數的所有變換係數(在圖14中經白色標記)等於零。 ‧Transmit the x and y coordinates of the first non-zero level in the coding sequence. As illustrated in FIG. 14, the transmitted position designation of the first non-zero level is inferred that all transform coefficients (marked in white in FIG. 14) that precede the identified coefficients in the coding order are equal to zero.

‧對於在含有寫碼次序中之第一非零層級(由所傳輸之x及y座標指示)之彼子區塊之後的子區塊,傳輸旗標coded_subblock_flag,其指定子區塊是否含有任何非零變換係數層級。作為例外狀況,不針對含有DC係數之子區塊傳輸coded_subblock_flag。對於此子區塊,推斷coded_subblock_flag等於1。 ‧For the sub-block that contains the first non-zero level in the coding sequence (indicated by the transmitted x and y coordinates), the transmission flag coded_subblock_flag, which specifies whether the sub-block contains any non-zero Zero transform coefficient level. As an exception, coded_subblock_flag is not transmitted for sub-blocks containing DC coefficients. For this subblock, it is inferred that coded_subblock_flag is equal to 1.

最後,對於coded_subblock_flag等於1之所有子區塊以及含有寫碼次序中之第一非零層級之子區塊,對變換係數層級之值進行寫碼,如下文將描述。 Finally, for all sub-blocks with coded_subblock_flag equal to 1 and sub-blocks containing the first non-zero level in the coding order, the value of the transform coefficient level is coded, as described below.

用於對子區塊之變換係數層級進行寫碼之較佳實施例由圖18中之偽碼說明。此處,firstScanIdSbb表示子區塊內部之第一掃描索引。對於含有第一非零層級(由所傳輸之x及y座標指示)之子區塊,firstScanIdSbb等於對應於所傳輸之(x,y)座標的掃描索引firstNonZero。對於其他所傳輸子區塊,firstScanIdSbb指定子區塊內部之第一掃描索引。掃描索引lastScanIdSbb指定子區塊內部之最末掃描索引。 The preferred embodiment for coding the transform coefficient level of the sub-block is illustrated by the pseudo code in FIG. 18. Here, firstScanIdSbb represents the first scan index inside the sub-block. For the sub-block containing the first non-zero level (indicated by the transmitted x and y coordinates), firstScanIdSbb is equal to the scan index firstNonZero corresponding to the transmitted (x, y) coordinates. For other transmitted sub-blocks, firstScanIdSbb specifies the first scan index within the sub-block. The scan index lastScanIdSbb specifies the last scan index within the sub-block.

使level[k]及absLevel[k]=abs(level[k])表示掃描位置k處之變換係數層級及變換係數層級之絕對值。變換係數層級之寫碼在遍及子區塊內部之掃描位置的四個遍次中繼續進行:在第一遍次中,傳輸二進位語法元素sig_flag、par_flag及gt1_flag: ‧二進位語法元素sig_flag[k]指定掃描位置k處之變 換係數層級之絕對值是否大於0,亦即,sig_flag[k]=(absLevel[k]>0?1:0)。 Let level[k] and absLevel[k]=abs(level[k]) represent the absolute value of the transform coefficient level and the transform coefficient level at the scanning position k. The coding of the transform coefficient level continues in four passes throughout the scan position inside the sub-block: In the first pass, the binary syntax elements sig_flag, par_flag, and gt1_flag are transmitted: ‧The binary syntax element sig_flag[k] specifies the change at scan position k Is the absolute value of the conversion factor level greater than 0, that is, sig_flag[k]=(absLevel[k]>0? 1:0).

若可推斷sig_flag等於1,亦即,當以下條件中之任一者適用時,則不傳輸sig_flag:○當前掃描索引k等於第一非零層級(如由所傳輸之x及y座標指示)之掃描索引;○當前掃描索引為子區塊內部之最末掃描索引,已針對子區塊傳輸等於1之coded_subblock_flag,且子區塊中之所有先前層級等於0。 If it can be inferred that sig_flag is equal to 1, that is, when any of the following conditions applies, sig_flag is not transmitted: ○ The current scan index k is equal to the first non-zero level (as indicated by the transmitted x and y coordinates) Scan index; ○ The current scan index is the last scan index within the sub-block, coded_subblock_flag equal to 1 has been transmitted for the sub-block, and all previous levels in the sub-block are equal to 0.

‧若sig_flag[k]等於1,則傳輸二進位語法元素par_flag[k]及gt1_flag[k]。 ‧If sig_flag[k] is equal to 1, then the binary syntax elements par_flag[k] and gt1_flag[k] are transmitted.

par_flag[k]指定變換係數層級之同位。在本發明之一較佳實施例中,par_flag[k]被設定為等於絕對值減去1之同位(其表示變換係數層級之反向同位):par_flag[k]=(absLevel[k]-1)&1。 par_flag[k] specifies the parity of transform coefficient levels. In a preferred embodiment of the present invention, par_flag[k] is set to the parity equal to the absolute value minus 1 (which represents the inverse parity of the transform coefficient level): par_flag[k]=(absLevel[k]-1 )&1.

gt1_flag[k]指定餘數(由sig_flag[k]=1及par_flag[k]之值給定)是否大於零:gt1_flag[k]=(((absLevel[k]-1)>>1)>0?1:0),其中運算子「>>」指定向右之位元移位(亦即,由2整除)。 gt1_flag[k] specifies whether the remainder (given by the value of sig_flag[k]=1 and par_flag[k]) is greater than zero: gt1_flag[k]=(((absLevel[k]-1)>>1)>0? 1: 0), where the operator ">>" specifies the bit shift to the right (that is, divisible by 2).

在第二遍次中,傳輸二進位語法元素gt2_flag:.僅針對彼等掃描位置k對二進位語法元素gt2_flag[k]進行寫碼,其中在第一遍次中傳輸等於1之 gt1_flag[k]。gt2_flag[k]指定餘數(由sig_flag[k]=1及par_flag[k]之值給定)是否大於一:gt2_flag[k]=(((absLevel[k]-1)>>1)>1?1:0)。 In the second pass, the binary syntax element gt2_flag is transmitted:. Write the binary syntax element gt2_flag[k] only for their scan position k, where the transmission is equal to 1 in the first pass gt1_flag[k]. gt2_flag[k] specifies whether the remainder (given by the value of sig_flag[k]=1 and par_flag[k]) is greater than one: gt2_flag[k]=(((absLevel[k]-1)>>1)>1? 1:0).

在第三遍次中,傳輸語法元素餘數:.僅針對彼等掃描位置k對語法元素remainder[k]進行寫碼,其中在第二遍次中傳輸等於1之gt2_flag[k]。remainder[k]指定絕對值之餘數(由sig_flag[k]=1、gt1_flag[k]=1、gt2_flag[k]=1及par_flag[k]之值給定):remainder[k]=((absLevel[k]-1)>>1)-2。 In the third pass, transfer the remainder of the syntax element:. Write code to the syntax element remainder[k] only for their scan position k, where gt2_flag[k] equal to 1 is transmitted in the second pass. remainder[k] specifies the remainder of the absolute value (given by the value of sig_flag[k]=1, gt1_flag[k]=1, gt2_flag[k]=1 and par_flag[k]): remainder[k]=((absLevel [k]-1)>>1)-2.

最後,在第四遍次中,傳輸語法元素sign_flag:‧僅針對彼等掃描位置k對語法元素sign_flag[k]進行寫碼,其中在第一遍次中推斷傳輸等於1之sig_flag[k]。sign_flag[k]指定變換係數層級是否為負:sign_flag[k]=(level[k]<0?1:0)。 Finally, in the fourth pass, the syntax element sign_flag is transmitted: • Write the syntax element sign_flag[k] only for their scan position k, and in the first pass, it is inferred to transmit sig_flag[k] equal to 1. sign_flag[k] specifies whether the transform coefficient level is negative: sign_flag[k]=(level[k]<0? 1:0).

在解碼器側,類似地自位元串流解碼語法元素sig_flag[k]、par_flag[k]、gt1_flag[k]、gt2_flag[k]、remainder[k]及sign_flag[k]。應注意,推斷未傳輸之語法元素par_flag[k]、gt1_flag[k]、gt2_flag[k]、remainder[k]及sign_flag[k]之所有值等於0。在不針對coded_subblock_flag等於1之子區塊傳輸sig_flag[k]的狀況下,推斷其值等於1。 On the decoder side, the syntax elements sig_flag[k], par_flag[k], gt1_flag[k], gt2_flag[k], remainder[k], and sign_flag[k] are similarly decoded from the bit stream. It should be noted that all values of the syntax elements par_flag[k], gt1_flag[k], gt2_flag[k], remainder[k], and sign_flag[k] that have not been transmitted are inferred to be equal to zero. Under the condition that sig_flag[k] is not transmitted for the sub-block whose coded_subblock_flag is equal to 1, it is inferred that its value is equal to 1.

在給定經寫碼及經推斷值之情況下,可如下重構掃描位置k處之變換係數層級之絕對值: absLevel[k]=sig_flag[k]+par_flag[k]+2*(gt1_flag[k]+gt2_flag[k]+remainder[k])。 Given the written code and the inferred value, the absolute value of the transform coefficient level at the scan position k can be reconstructed as follows: absLevel[k]=sig_flag[k]+par_flag[k]+2*(gt1_flag[k]+gt2_flag[k]+remainder[k]).

且在給定絕對層級之sign_flag[k]不等於0的情況下,由下式給定變換係數層級level[k]=(sign_flag[k]?-absLevel[k]:absLevel[k])。 And when the sign_flag[k] of the given absolute level is not equal to 0, the transform coefficient level level[k]=(sign_flag[k]?-absLevel[k]: absLevel[k]) is given by the following formula.

可在一或多個態樣中修改上文所描述之特定實施例,例如: The specific embodiments described above can be modified in one or more aspects, for example:

‧變換係數層級之寫碼可不基於子區塊。彼意謂,可一次寫碼變換區塊之所有變換係數層級,而非將變換係數層級之寫碼分裂成子區塊。在此狀況下,上文所描述之遍次表示遍及完整變換區塊內部之所有掃描位置的遍次。此方法可仍與coded_block_flag之寫碼組合以及與寫碼次序中之第一非零層級之掃描位置之指示組合(例如,藉由傳輸x及y位置或藉由任何其他方式)。此方法亦可與指定大區內部之所有變換係數層級等於0的指示(類似於coded_block_flag's)組合。該等區可表示變換係數位置之子區塊、連續掃描位置或任何其他定義明確之子集。對應指示可在實際變換係數層級之前經寫碼,或其可與第一遍次之位元子交錯地寫碼。 ‧The coding of transform coefficient level can not be based on sub-blocks. This means that all transform coefficient levels of a transform block can be coded at once, instead of splitting the coding of the transform coefficient level into sub-blocks. In this situation, the pass described above means the pass of all scanning positions inside the complete transformation block. This method can still be combined with the coding combination of coded_block_flag and the indication of the scanning position of the first non-zero level in the coding sequence (for example, by transmitting the x and y positions or by any other means). This method can also be combined with an indication (similar to coded_block_flag's) that all transform coefficient levels within the designated large area are equal to 0. These regions can represent sub-blocks of transform coefficient positions, continuous scan positions, or any other well-defined subsets. The corresponding indication can be coded before the actual transform coefficient level, or it can be coded alternately with the bits of the first pass.

‧可改變旗標par_flag及gt1_flag旗標之寫碼次序。應注意,此等旗標不取決於彼此,且因此,可在gt1_flag之前對par_flag進行寫碼,或可在par_flag之前對gt1_flag進行寫碼。 ‧The coding sequence of flag par_flag and gt1_flag can be changed. It should be noted that these flags do not depend on each other, and therefore, par_flag can be written before gt1_flag, or gt1_flag can be written before par_flag.

‧可改變同位旗標par_flag之含義。可傳輸絕對層級之同位(其與絕對層級減去2之同位相同),而非傳信絕對層級減去1之同位。 ‧The meaning of par_flag can be changed. The parity of the absolute level (which is the same as the parity of the absolute level minus 2) can be transmitted instead of the parity of the absolute level minus 1.

‧可改變gt1_flag之含義。亦可傳信(absLevel-1-par_flag)是否大於0,而非傳信(absLevel-1)>>1是否大於0(參見上文)。或者,若如上文所指示改變含義par_flag,則gt1_flag可指示(absLevel-1)是否大於0。在二種狀況下,重構式將改變為absLevel[k]=sig_flag[k]+par_flag[k]+gt1_flag[k]+2*(gt2_flag[k]+remainder[k]) ‧The meaning of gt1_flag can be changed. It is also possible to transmit whether (absLevel-1-par_flag) is greater than 0, but not whether (absLevel-1)>>1 is greater than 0 (see above). Or, if the meaning par_flag is changed as indicated above, gt1_flag may indicate whether (absLevel-1) is greater than 0. In the two cases, the reconstruction formula will be changed to absLevel[k]=sig_flag[k]+par_flag[k]+gt1_flag[k]+2*(gt2_flag[k]+remainder[k])

且gt2_flag及餘數之含義將改變為gt2_flag[k]=(((absLevel[k]-2)>>1)>0?1:0) And the meaning of gt2_flag and remainder will be changed to gt2_flag[k]=(((absLevel[k]-2)>>1)>0? 1:0)

remainder[k]=((absLevel[k]-2)>>1)-1 remainder[k]=((absLevel[k]-2)>>1)-1

參見例如圖19,其中旗標以不同方式分佈至遍次上,且量化索引之重構涉及absQIdx=sig_flag+gt1_flag+par_flag+2 *(gt3_flag+remainder),其中在圖19中所展示之第一遍次之後可行的部分重構為absQIdx1=sig_flag+gt1_flag+par_flag+2 * gt3_flag。 See, for example, Figure 19, where the flags are distributed in different ways on the pass, and the reconstruction of the quantization index involves absQIdx=sig_flag+gt1_flag+par_flag+2 *(gt3_flag+remainder), of which the first shown in Figure 19 The feasible part reconstruction after the pass is absQIdx1=sig_flag+gt1_flag+par_flag+2 * gt3_flag.

‧第一遍次可以僅在此遍次中傳輸sig_flag及par_flag之方式修改。gt1_flag可移動至第二遍次,或其可在所描述之第一遍次與第二遍次之間的單獨遍次中傳輸。 替代地,可將額外旗標(例如,gt2_flag)寫碼為第一遍次之部分。 ‧The first pass can only be modified by transmitting sig_flag and par_flag in this pass. The gt1_flag can be moved to the second pass, or it can be transmitted in a separate pass between the first pass and the second pass described. Alternatively, an additional flag (for example, gt2_flag) may be coded as a second part of the first pass.

‧可省略第二遍次(具有gt2_flag's),在此狀況下,將在第一遍次之後直接寫碼具有語法元素餘數之遍次。在一個實施例中,省略第二遍次,此係因為gt2_flag已經寫碼為第一遍次之部分(參見上文)。在另一實施例中,省略第二遍次,此係因為根本不傳輸gt2_flag。在後一狀況下,語法元素餘數含義改變為remainder[k]=((absLevel[k]-1)>>1)-1 ‧The second pass (with gt2_flag's) can be omitted. In this case, the pass with the remainder of the syntax element will be written directly after the first pass. In one embodiment, the second pass is omitted because gt2_flag has already been coded as part of the first pass (see above). In another embodiment, the second pass is omitted because gt2_flag is not transmitted at all. In the latter case, the meaning of the remainder of the grammatical element is changed to remainder[k]=((absLevel[k]-1)>>1)-1

且重構式改變為absLevel[k]=sig_flag[k]+par_flag[k]+2*(gt1_flag[k]+remainder[k]) And the reconstruction type is changed to absLevel[k]=sig_flag[k]+par_flag[k]+2*(gt1_flag[k]+remainder[k])

或者,當gt1_flag之含義如上文所描述而改變時,重構式改變為absLevel[k]=sig_flag[k]+par_flag[k]+gt1_flag[k]+2*remainder[k] Or, when the meaning of gt1_flag is changed as described above, the reconstruction formula is changed to absLevel[k]=sig_flag[k]+par_flag[k]+gt1_flag[k]+2*remainder[k]

替代地,第二遍次可包含額外旗標。舉例而言,含義如下之額外gt3_flag gt3_flag[k]=(((absLevel[k]-1)>>1)>2?1:0) Alternatively, the second pass may include additional flags. For example, the meaning is the following additional gt3_flag gt3_flag[k]=(((absLevel[k]-1)>>1)>2? 1:0)

可經傳輸。或者,如上文所提及,gt1_flag可自第一遍次移動至第二遍次。此亦可與gt3_flag組合。 Can be transmitted. Or, as mentioned above, gt1_flag can be moved from the first pass to the second pass. This can also be combined with gt3_flag.

亦有可能基於已經寫碼資料(例如,基於可基於已經寫碼資料導出之局部鄰域中之絕對值的總和)自適應性地判定針對當前掃描位置傳輸之gtx_flag的最大數 目。 It is also possible to adaptively determine the maximum number of gtx_flags transmitted for the current scanning position based on the coded data (for example, based on the sum of the absolute values in the local neighborhood derived from the coded data) Item.

‧具有常規經寫碼位元子之一或多個額外遍次可在第二遍次(具有gt2_flag's)與第三遍次(語法元素餘數)之間寫碼。舉例而言,gt3_flag's可在額外遍次中傳輸。 ‧One or more additional passes with regular writing code positions can write code between the second pass (with gt2_flag's) and the third pass (syntax element remainder). For example, gt3_flag's can be transmitted in additional passes.

‧可在單一遍次中交錯地寫碼語法元素餘數之經旁路寫碼位元子及經旁路寫碼sign_flag's。 ‧The bypass code bits and the bypass code sign_flag's of the remainder of the syntax element can be written alternately in a single pass.

亦可組合上文所列之二個或更多個點。 It is also possible to combine two or more points listed above.

簡單概述以上實施例,在下文中,同樣描述其他實施例。藉此,使用指向上文論述之圖式的參考符號。 The above embodiments are briefly summarized, and in the following, other embodiments are also described. In this way, reference symbols that point to the above-discussed diagrams are used.

特定言之,以上實施例描述用於對變換係數12之區塊(10)進行解碼的概念,其中變換區塊10可或可不細分成子區塊14。 In particular, the above embodiments describe the concept for decoding the block (10) of transform coefficients 12, in which the transform block 10 may or may not be subdivided into sub-blocks 14.

解碼係在遍次中進行。在掃描變換係數之一或多個第一遍次中,進行當前變換係數之指示變換係數之量化索引是否為零之有效值旗標的解碼,以及變換係數之指示變換係數之同位之同位旗標的解碼。由於圖式中之偽碼類似地展示藉由將「寫碼」變成「解碼」之解碼程序,故僅提及之任務分別在16及18處進行。其含於圖18中之一個第一遍次20中,但根據替代方案可分佈至二個單獨遍次上。使用上下文自適應性熵解碼來進行任務16及8二者,上下文自適應性熵解碼可為上下文自適應性二進位算術解碼。 Decoding is performed in passes. In one or more first passes of scan transform coefficients, decode the effective value flag of the current transform coefficient indicating whether the quantization index of the transform coefficient is zero, and decode the parity flag of the transform coefficient indicating the parity of the transform coefficient . Since the pseudo code in the diagram similarly shows the decoding process by turning "code writing" into "decoding", only the tasks mentioned are performed at 16 and 18 respectively. It is contained in one of the first passes 20 in FIG. 18, but can be distributed to two separate passes according to an alternative scheme. Context-adaptive entropy decoding is used to perform both tasks 16 and 8. The context-adaptive entropy decoding can be context-adaptive binary arithmetic decoding.

在掃描變換係數之一或多個第二遍次22中,解碼24變換係數之一或多個大小程度(greatness)旗 標,該等變換係數之量化索引不為零。在圖18中,存在二個此類遍次22'及22"。一或多個大小程度旗標遍次22無需與一或多個第一遍次20分離。在圖18中,在遍次22'中進行gt1_flag解碼24',遍次22'同時為第一遍次20,而在單獨遍次22"中進行gt3_flag解碼24'。圖19展示一或多個第一遍次20及一或多個第二遍次22可重合。此處,在圖19中,在相同遍次中進行解碼16、18及24。在圖19中,例示性地存在一個此類遍次,其由指示充當有效值/同位遍次20以及大小程度旗標遍次22之遍次的大括號指示。同樣,使用上下文自適應性熵解碼來進行任務24,上下文自適應性熵解碼可為上下文自適應性二進位算術解碼。在圖18及圖19中,例示性地解碼二個大小程度旗標,但此僅為實例。 In the second pass 22 of one or more of the scan transform coefficients, one or more of the greatness flags of the 24 transform coefficients are decoded. Mark, the quantization index of these transform coefficients is not zero. In FIG. 18, there are two such passes 22' and 22". One or more magnitude flag passes 22 need not be separated from one or more first passes 20. In FIG. 18, in pass In 22', gt1_flag decoding 24' is performed, pass 22' is the first pass 20 at the same time, and gt3_flag decoding 24' is performed in a single pass 22". Figure 19 shows that one or more first passes 20 and one or more second passes 22 may coincide. Here, in FIG. 19, decoding 16, 18, and 24 are performed in the same pass. In FIG. 19, there is exemplarily one such pass, which is indicated by the braces indicating the pass as the valid value/parity pass 20 and the magnitude flag pass 22. Similarly, context adaptive entropy decoding is used to perform task 24, and context adaptive entropy decoding can be context adaptive binary arithmetic decoding. In FIG. 18 and FIG. 19, two size level flags are exemplarily decoded, but this is only an example.

在一或多個第三遍次26、27中,亦即在圖24及圖26之狀況下相互分離的與遍次20、22分離的二個遍次,進行變換係數之量化索引之餘數的解碼28,該等變換係數之一或多個大小程度旗標為正,諸如由一指示,亦即,大小程度確認/批准大小程度之彼等係數之解碼,且進行變換係數之量化索引之符號的解碼30,該等變換係數之量化索引並不為零。使用等機率熵解碼來進行任務28及30,等機率熵解碼可為等機率二進位算術解碼。特定言之,解碼28可涉及使用二進位化之位元子及變換係數之量化索引之絕對值之餘數之二進位化之位元子的等機率二進位算術解碼,該等變換係數之一或多個大小程度旗標為 正。 In one or more third passes 26 and 27, that is, the two passes separated from each other and passes 20 and 22 under the conditions of Fig. 24 and Fig. 26, the remainder of the quantization index of the transform coefficient is calculated Decoding 28. One or more of the transform coefficients are marked as positive, such as by an indication, that is, the decoding of the coefficients whose size is confirmed/approved, and the sign of the quantization index of the transform coefficient is performed For decoding 30, the quantization index of the transform coefficients is not zero. Use equal-probability entropy decoding to perform tasks 28 and 30, and equal-probability entropy decoding can be equal-probability binary arithmetic decoding. In particular, decoding 28 may involve equal-probability binary arithmetic decoding using binary bits and the remainder of the absolute value of the quantization index of the transform coefficients. One of the transform coefficients or The multiple size flags are just.

以上述方式中之任一種分離遍次的優點已在上文促成,且亦將自執行例如解量化及/或上下文導出方面之以下可能性的描述變得清楚,然而,該等細節被視為不限制後續申請專利範圍之範疇。優點在於提供可使用相依量化及諸如上下文自適應性二進位算術編碼之上下文自適應性熵寫碼有效地寫碼的變換區塊描述之基礎。 The advantages of separating the passes in any of the above-mentioned ways have been promoted above, and it will also become clear from the description of the following possibilities in terms of implementation such as dequantization and/or context derivation, however, these details are regarded as Does not limit the scope of subsequent patent applications. The advantage is to provide a basis for transforming block descriptions that can be efficiently coded using dependent quantization and context-adaptive entropy coding such as context-adaptive binary arithmetic coding.

如圖18及圖19中所展示,在一個第一遍次20中,針對當前經掃描變換係數,可使用上下文自適應性熵解碼對當前經掃描變換係數之有效值旗標進行解碼16,且接著,若有效值旗標指示當前經掃描變換係數之量化索引不為零,則如在32處所檢查,針對當前經掃描變換係數,使用上下文自適應性熵解碼對當前經掃描變換係數之同位旗標進行解碼18。替代地,單獨的第一遍次20可能已用於二個旗標。在一或多個第二遍次22中之一者中,亦即在圖18中之22'及22"及圖19之狀況下同時為遍次20的22中,若當前經掃描變換係數之量化索引不為零,該情形係在32處檢查,則針對當前經掃描變換係數,使用上下文自適應性熵解碼對當前經掃描變換係數之大小程度旗標進行解碼24'、24"。應注意,此第一大小程度旗標可具有如上文所解釋之不同定義,且可為gt1_flag或gt3_flag。在圖19之狀況下的解碼18,以及在圖18及圖19之狀況下的解碼24"甚至僅在當前經掃描變換係數之大小程度旗標gt1_flag已為正之狀況下進行,該情形係在 34處檢查。亦即,對於當前經掃描係數,旗標之寫碼/解碼次序為:有效值旗標、大小程度旗標gt1_flag、同位旗標,及在圖18之狀況下的大小程度旗標gt2_flag,以及在圖19之狀況下的大小程度旗標gt3_flag。 As shown in Figures 18 and 19, in a first pass 20, for the current scanned transform coefficients, context-adaptive entropy decoding can be used to decode the effective value flags of the current scanned transform coefficients 16, and Then, if the effective value flag indicates that the quantization index of the current scanned transform coefficient is not zero, then as checked at 32, for the current scanned transform coefficient, use context adaptive entropy decoding for the parity flag of the current scanned transform coefficient标 to decode 18. Alternatively, a single first pass 20 may have been used for two flags. In one or more of the second pass 22, that is, 22' and 22" in FIG. 18 and 22 in pass 20 at the same time under the conditions of FIG. 19, if the current scanned transform coefficient is The quantization index is not zero. If this situation is checked at 32, for the current scanned transform coefficients, context adaptive entropy decoding is used to decode the magnitude flags of the current scanned transform coefficients 24', 24". It should be noted that this first size level flag may have different definitions as explained above, and may be gt1_flag or gt3_flag. The decoding 18 under the conditions of Fig. 19 and the decoding 24" under the conditions of Fig. 18 and Fig. 19 are even performed only under the condition that the magnitude flag gt1_flag of the current scanned transform coefficient is already positive. 34 inspections. That is, for the current scanned coefficient, the coding/decoding order of the flags is: the effective value flag, the size level flag gt1_flag, the parity flag, and the size level flag gt2_flag under the condition of FIG. 18, and The size level flag gt3_flag in the situation of FIG. 19.

如上文所提及,自所提及旗標,對於預定變換係數,量化索引之計算在圖18及圖19之狀況下可涉及總和,其加數係藉由以下形成:一個加數係由預定變換係數之有效值旗標形成,一個加數係由預定變換係數之同位旗標形成,且一個加數係由預定變換係數之餘數與一個大小程度旗標(亦即,圖18之狀況下的gt2_flag及圖19之狀況下的gt3_flag)之總和的兩倍形成。 As mentioned above, from the mentioned flag, for the predetermined transform coefficient, the calculation of the quantization index may involve the sum under the conditions of Fig. 18 and Fig. 19, and the addend is formed by the following: an addend is predetermined The effective value flag of the transform coefficient is formed, an addend is formed by the parity flag of the predetermined transform coefficient, and an addend is formed by the remainder of the predetermined transform coefficient and a magnitude flag (that is, in the situation of FIG. 18 gt2_flag and gt3_flag in the situation of FIG. 19) are formed by twice the sum.

在一或多個第二遍次22中之一者中,亦即在圖18中之22"及圖19之狀況下同時為遍次20之22中,針對當前經掃描變換係數進行解碼,且若當前經掃描變換係數之先前大小程度旗標為正,則使用上下文自適應性熵解碼對當前經掃描變換係數之另一大小程度旗標,亦即圖18之狀況下的gt2_flag及圖19之狀況下的gt3_flag,進行解碼24"。在圖18之狀況下,針對預定變換係數,根據總和計算量化索引之絕對值,該總和之加數係藉由以下形成:一個加數為預定變換係數之有效值旗標,一個加數為預定變換係數之同位旗標,一個加數為預定變換係數之餘數、第一大小程度旗標與第二大小程度旗標之總和的兩倍。然而,使用大小程度旗標之不同定義,諸如根據圖19,例如但非排他地,其中使用上下文自適應 性熵解碼對當前經掃描變換係數之有效值旗標進行解碼16,且接著,若有效值旗標指示當前經掃描變換係數之量化索引不為零,則如在32處所檢查,針對當前經掃描變換係數,使用上下文自適應性熵解碼對當前經掃描變換係數之大小程度旗標gt1_flag進行解碼24',且接著,若此大小程度旗標為正,則如在34處所檢查,針對當前經掃描變換係數,使用上下文自適應性熵解碼對同位旗標進行解碼18,且針對當前經掃描變換係數,使用上下文自適應性熵解碼對當前經掃描變換係數之另一大小程度旗標gt3_flag進行解碼24",針對預定變換係數,諸如當前預定變換係數,根據總和計算量化索引之絕對值,該總和之加數係藉由以下形成:一個加數為預定變換係數之有效值旗標,一個加數為預定變換係數之同位旗標,一個加數為預定變換係數之大小程度旗標gt1_flag,且一個加數為預定變換係數之餘數與另一大小程度旗標gt3_flag之總和的兩倍。第一大小程度旗標及第二大小程度旗標之解碼24'及24"可在如圖18中所說明之單獨第二遍次22'及22"中或在如圖19中所說明之一個遍次上進行。 In one or more of the second pass 22, that is, in the conditions of 22" in FIG. 18 and at the same time as pass 20 in the conditions of FIG. 19, the current scanned transform coefficient is decoded, and If the previous size flag of the current scanned transform coefficient is positive, then use context adaptive entropy decoding for another size flag of the current scanned transform coefficient, that is, gt2_flag in the situation of FIG. 18 and that of FIG. 19 Under gt3_flag, decode 24". In the situation of Figure 18, for the predetermined transform coefficient, the absolute value of the quantization index is calculated from the sum. The addend of the sum is formed by the following: one addend is the effective value flag of the predetermined transform coefficient, and one addend is the predetermined For the parity flag of the transform coefficient, an addend is twice the sum of the remainder of the predetermined transform coefficient, the first degree flag and the second degree flag. However, a different definition of the size level flag is used, such as according to Figure 19, for example, but not exclusively, where context adaptation is used Sexual entropy decoding decodes the effective value flag of the currently scanned transform coefficient 16, and then, if the effective value flag indicates that the quantization index of the currently scanned transform coefficient is not zero, as checked at 32, for the current scanned transform coefficient Transform coefficients, use context-adaptive entropy decoding to decode the size flag gt1_flag of the currently scanned transform coefficient 24', and then, if the size flag is positive, as checked at 34, for the current scanned Transform coefficients, use context adaptive entropy decoding to decode the parity flag 18, and for the current scanned transform coefficients, use context adaptive entropy decoding to decode another size flag gt3_flag of the current scanned transform coefficients 24 "For a predetermined transform coefficient, such as the current predetermined transform coefficient, the absolute value of the quantization index is calculated according to the sum. The addend of the sum is formed by the following: an addend is the effective value flag of the predetermined transform coefficient, and an addend is The parity flag of the predetermined transform coefficient, one addend is the size flag gt1_flag of the predetermined transform coefficient, and one addend is twice the sum of the remainder of the predetermined transform coefficient and another size flag gt3_flag. The first size level The decoding of the flags and the second-level flags 24' and 24" can be performed in a separate second pass 22' and 22" as illustrated in FIG. 18 or in one pass as illustrated in FIG. 19 .

作為圖12之替代方案,將有可能在一或多個第一遍次中之一者中,針對當前經掃描變換係數,使用上下文自適應性熵解碼對當前經掃描變換係數之有效值旗標進行解碼16,且接著在一個第一遍次之後,在一或多個第二遍次中,使用上下文自適應性熵解碼對變換係數之多於一個大小程度旗標之序列進行解碼24'、24",且接著, 在一或多個第二遍次之後,在一或多個第一遍次中之另一者中,使用等機率熵解碼對變換係數之同位旗標進行解碼,該等變換係數之量化索引不為零。 As an alternative to Figure 12, it will be possible to use context-adaptive entropy decoding to flag the effective value of the current scanned transform coefficient for the current scanned transform coefficient in one of one or more of the first passes. Perform decoding 16, and then after a first pass, in one or more second passes, use context-adaptive entropy decoding to decode sequences of transform coefficients with more than one magnitude flag 24', 24", and then, After one or more second passes, in the other of the one or more first passes, equal-probability entropy decoding is used to decode the parity flags of the transform coefficients, and the quantization indexes of these transform coefficients are not Is zero.

如上文已提及,可在子區塊中進行寫碼/解碼,使得變換係數經逐子區塊解碼,其中在對下一子區塊之第一遍次進行解碼之前對遍及子區塊之掃描位置的所有遍次進行解碼。 As mentioned above, coding/decoding can be performed in sub-blocks, so that the transform coefficients are decoded sub-block by sub-block. All passes of the scan position are decoded.

各係數可藉由以下操作來重構:藉由針對各別變換係數自多個重構層級集合,亦即自以上實例中圖7及圖10中之「集合0」及「集合1」選擇一重構層級集合,解量化量化索引不為零之各變換係數之量化索引,各係數之二進位化,亦即所有有效值、同位及大小程度旗標以及餘數及符號已經解碼。根據「setId[state]」,此操作係藉由使用當前狀態狀態來進行。該狀態轉而取決於沿掃描次序先於各別變換係數的變換係數之量化索引之同位而導出,亦即,例如藉由在圖11中之40處由各別變換係數之同位更新用於先前經解量化係數之狀態。在選擇之後,將各別變換係數解量化至所選擇之重構層級集合之一個層級上,該層級由setId索引化。此層級為由各別變換係數之量化索引索引化的層級。如所描述,針對各別變換係數,藉由以下操作而使用狀態轉換自重構層級集合選擇重構層級集合:唯一地基於一狀態自多個重構層級集合選擇正確重構層級集合,該狀態轉換針對各別變換係數,亦即在圖11中之42處假定該狀態,且取決於各別變換係數之量化 索引之同位,針對掃描次序中在後的變換係數更新40狀態轉換之狀態。因此,掃描次序在此同樣用於遍次20、22、27及30。上文已呈現實例。已在圖4中藉由箭頭44例示。同樣,子區塊細分係任選的,正如係數之逐子區塊解碼一樣,亦即,各遍次可替代地在下一遍次開始之前繼續周遊(traverse)子區塊,而非在前進至下一遍次之前執行針對一個子區塊執行所有遍次。可存在用於狀態轉換之四個相異狀態。轉換可使用如表1中所說明的表且在執行查找以產生用於以下係數之狀態的45處,或使用如圖12中所說明之網格圖來實施,例如,其中狀態出現在46處。 Each coefficient can be reconstructed by the following operation: by selecting one from the "set 0" and "set 1" in Fig. 7 and Fig. 10 in the above example for each transformation coefficient from multiple reconstruction levels. Reconstruct the level set, dequantize the quantization index of each transform coefficient whose quantization index is not zero, and the binarization of each coefficient, that is, all effective values, parity and magnitude flags, remainders and signs have been decoded. According to "setId[state]", this operation is performed by using the current state state. This state in turn depends on the parity of the quantization index of the transform coefficients that precede the individual transform coefficients along the scanning order, that is, for example, by updating the parity of the individual transform coefficients at 40 in FIG. 11 for the previous The state of the dequantized coefficients. After the selection, the respective transform coefficients are dequantized to a level of the selected reconstruction level set, and the level is indexed by setId. This level is the level indexed by the quantization index of each transform coefficient. As described, for each transformation coefficient, the state transition is used to select the reconstruction level set from the reconstruction level set by the following operation: the correct reconstruction level set is selected from multiple reconstruction level sets uniquely based on a state, the state The conversion is for individual transform coefficients, that is, the state is assumed at 42 in Figure 11, and depends on the quantization of the individual transform coefficients The parity of the index updates the state of 40 state transitions for the subsequent transform coefficients in the scan order. Therefore, the scan order is also used here for passes 20, 22, 27, and 30. Examples have been presented above. This is illustrated by arrow 44 in FIG. 4. Similarly, the sub-block subdivision is optional, just like the sub-block decoding of coefficients, that is, each pass can alternatively continue to traverse the sub-blocks before the start of the next pass instead of advancing to the next Execute all passes for a sub-block before execution. There can be four distinct states for state transitions. The conversion can be implemented using the table as illustrated in Table 1 and at 45 where the lookup is performed to generate the states for the following coefficients, or using a trellis diagram as illustrated in Figure 12, for example, where the state appears at 46 .

如上文所描述,多個重構層級集合可藉助於如圖7及圖10中所展示之預定量化步長△而參數化。關於預定量化步長之資訊可在資料串流中傳達。重構層級集合中之各者可由針對如圖7及圖10中所說明之使用共同水平軸線t之多個重構層級集合或在該等多個重構層級集合當中相等的此預定量化步長之倍數組成。重構層級集合之數目可為二,如圖7及圖10中所說明,且第一重構層級集合可包含零及預定量化步長之偶數倍,諸如圖7及圖10中之集合0,且第二重構層級集合可包含零及預定量化步長之奇數倍,如圖7及圖10中之集合1。可針對狀態值0及1選擇第一重構層級集合,且可針對狀態值2及3選擇第二重構層級集合,如表1所說明。 As described above, multiple reconstruction level sets can be parameterized by means of a predetermined quantization step size Δ as shown in FIGS. 7 and 10. Information about the predetermined quantization step size can be communicated in the data stream. Each of the reconstruction level sets may be for multiple reconstruction level sets using a common horizontal axis t as illustrated in FIGS. 7 and 10 or the predetermined quantization step size that is equal among the multiple reconstruction level sets The multiples of the composition. The number of reconstruction level sets can be two, as illustrated in FIGS. 7 and 10, and the first reconstruction level set may include zero and an even multiple of the predetermined quantization step, such as set 0 in FIGS. 7 and 10. And the second reconstruction level set may include zero and odd multiples of the predetermined quantization step, as shown in set 1 in FIG. 7 and FIG. 10. The first reconstruction level set can be selected for the state values 0 and 1, and the second reconstruction level set can be selected for the state values 2 and 3, as illustrated in Table 1.

應注意,若使用以上相依量化方案,則在解碼18某一係數之同位之後,定義下一係數之量化集合的 狀態變數狀態經定義或可經判定,且此狀態可用於寫碼下一係數之有效值及同位旗標。 It should be noted that if the above dependent quantization scheme is used, after the parity of a certain coefficient is decoded, the quantization set of the next coefficient is defined The state of the state variable is defined or can be determined, and this state can be used to write the effective value and parity flag of the next coefficient.

現在關注用於執行解碼16、18及24之上下文選擇,且描述有利上下文模型化概念。 Now focus on the context selection for performing decoding 16, 18, and 24, and describe the concept of favorable context modeling.

在較佳實施例中,用於常規寫碼位元子之自適應性機率模型係選自多個自適應性機率模型之集合。機率模型亦被稱作上下文,且機率模型之選擇亦被稱作上下文模型化。在較佳實施例中,所選擇之機率模型取決於以下性質中之一或多者: In a preferred embodiment, the adaptive probability model used for conventional code-writing bits is selected from a set of multiple adaptive probability models. The probability model is also called context, and the choice of the probability model is also called context modeling. In a preferred embodiment, the selected probability model depends on one or more of the following properties:

‧色彩平面。通常,明度變換係數及色度變換係數具有不同統計性質,且因此,若針對明度及色度使用不同機率模型集合,則可通常改良寫碼效率。亦有可能針對各色彩平面(例如,Y、Cb、Cr)使用單獨機率模型集合。 ‧Color plane. Generally, the brightness transformation coefficient and the chrominance transformation coefficient have different statistical properties, and therefore, if different probability model sets are used for the brightness and chrominance, the coding efficiency can generally be improved. It is also possible to use a separate set of probability models for each color plane (for example, Y, Cb, Cr).

‧由變換區塊內部之x及y座標之總和給定的對角線位置,diag=x+y。平均而言,變換係數之絕對值隨對角線位置diag減小而增大。歸因於彼原因,若對角線位置經分割成二個或更多個類別且針對各類別使用機率模型之單獨集合,則壓縮效率可通常得以提高。 ‧The diagonal position given by the sum of the x and y coordinates inside the transformation block, diag=x+y. On average, the absolute value of the transform coefficient increases as the diagonal position diag decreases. For that reason, if the diagonal position is divided into two or more categories and a separate set of probability models is used for each category, the compression efficiency can generally be improved.

‧適用於當前變換係數之狀態變數。如上文所提及,二個量化器Q0及Q1具有不同的可容許重構層級集合。因此,二個量化器之機率質量函數顯著不同。此態樣對sig_flag(其指示變換係數層級是否不等於0)之機率具有最大影響。因此,若中的二個量化器使用不同機率模型集合,則壓縮效率可提高。作為此概念之擴展,可針對狀態 變數之不同值(其可採用4個可能值:0、1、2、3)使用不同機率模型集合。或可針對狀態變數之經定義函數之不同值使用不同機率模型集合。應注意,針對二個不同量化器使用不同機率模型集合表示後一方法之特殊狀況。 ‧Applicable to the state variables of the current transformation coefficients. As mentioned above, the two quantizers Q0 and Q1 have different sets of allowable reconstruction levels. Therefore, the probability mass functions of the two quantizers are significantly different. This aspect has the greatest impact on the probability of sig_flag (which indicates whether the transform coefficient level is not equal to 0). Therefore, if the two quantizers use different probability model sets, the compression efficiency can be improved. As an extension of this concept, state Different values of variables (which can take 4 possible values: 0, 1, 2, 3) use different probability model sets. Or, different sets of probability models can be used for different values of defined functions of state variables. It should be noted that different sets of probability models are used for two different quantizers to represent the special situation of the latter method.

狀態變數之相依性可能不適於所有位元子,此係由於其增加機率模型之總數目且因此,降低機率適應速度。因此,狀態變數之函數之不同值的不同機率模型集合可僅用於常規寫碼位元子之子集。舉例而言,僅針對sig_flag's。或僅針對sig_flag's及par_flag's(或任何其他子集)。 The dependence of state variables may not be suitable for all bits, because it increases the total number of probability models and therefore reduces the speed of probability adaptation. Therefore, the set of different probability models with different values of the function of the state variable can only be used for a subset of the conventional code-writing bits. For example, only for sig_flag's. Or only for sig_flag's and par_flag's (or any other subset).

‧圍繞當前掃描位置之局部鄰域內部的活動度量。通常,當前變換係數之絕對值超出某一臨限值的可能性隨局部鄰域內部之活動增加,其中活動係指例如鄰域中之絕對變換係數層級的總和。態樣可用於藉由針對不同局部活動度量使用不同機率度量來提高壓縮效率。然而,應注意,由於在多個遍次中對絕對值進行寫碼,因此僅可使用在某一遍次中可用的彼等資料。 ‧A measure of the activity inside the local neighborhood around the current scan position. Generally, the probability that the absolute value of the current transform coefficient exceeds a certain threshold increases with the activity within the local neighborhood, where the activity refers to, for example, the sum of the absolute transform coefficient levels in the neighborhood. Aspects can be used to improve compression efficiency by using different probability metrics for different local activity metrics. However, it should be noted that since the absolute value is coded in multiple passes, only those data available in a certain pass can be used.

在下文中,更詳細地描述上下文模型化(機率模型之選擇)之例示性設置。實例係指在圖18中指定的位元子之寫碼次序。然而,此概念不限於此特定實例,且可例如容易地轉移至上文所描述之寫碼次序的修改,諸如,圖19所指之寫碼次序。 In the following, an exemplary setting of context modeling (choice of probability model) is described in more detail. The example refers to the coding order of the bits specified in Figure 18. However, this concept is not limited to this specific example, and can be easily transferred to the modification of the coding order described above, such as the coding order indicated in FIG. 19, for example.

為了導出局部活動度量,在較佳實施例中可使用圖16中所展示之局部範本。亦有可能使用不同範本,例如包括較多或較少相鄰掃描位置之範本。通常,較佳的 是所使用範本確實僅包括在寫碼次序44中先於當前掃描位置之掃描位置。 In order to derive the local activity metric, the local template shown in FIG. 16 can be used in a preferred embodiment. It is also possible to use different templates, such as templates that include more or fewer adjacent scan positions. Usually, better The template used indeed only includes the scanning position that precedes the current scanning position in the coding sequence 44.

使T(k)表示局部範本52中之掃描位置之集合。接著使sumAbs為局部範本中之絕對值之總和,其由下式給定

Figure 108123315-A0305-02-0063-14
Let T(k) denote the set of scanning positions in the local template 52. Then let sumAbs be the sum of absolute values in the local template, which is given by
Figure 108123315-A0305-02-0063-14

此外,使numSig為局部範本中大於零的絕對層級數目。 In addition, let numSig be the absolute number of levels greater than zero in the local template.

Figure 108123315-A0305-02-0063-15
Figure 108123315-A0305-02-0063-15

推斷指當前變換區塊外部之位置的absLevel[i]及sig_flag[i]之值等於0。 It is inferred that the values of absLevel[i] and sig_flag[i] of the position outside the current transformation block are equal to 0.

度量numSig可能已經基於sig_flag's之值導出。然而,絕對層級sumAbs之總和僅在第三(及第四)遍次26及27中可用。在第一遍次20及第二遍次22"中僅對資訊之子集進行寫碼,且因此,僅此資訊子集可用於上下文模型化。 The metric numSig may have been derived based on the value of sig_flag's. However, the sum of absolute level sumAbs is only available in the third (and fourth) pass 26 and 27. In the first pass 20 and the second pass 22", only a subset of information is coded, and therefore, only this subset of information can be used for context modeling.

根據圖18之偽碼中所展示的較佳實施例,在第一遍次20/22'中傳輸位元子sig_flag、par_flag及gt1_flag。基於某一變換係數層級之此等資料,可得出以下結論:‧若sig_flag等於0,則變換係數層級等於0:level=0;‧若sig_flag等於1,par_flag等於0,且gt1_flag 等於0,則變換係數層級等於1:level=1;‧若sig_flag等於1,par_flag等於1,且gt1_flag等於0,則變換係數層級等於2:level=2;‧若sig_flag等於1,par_flag等於0,且gt1_flag等於1,則變換係數層級大於或等於3:level>=3;‧若sig_flag等於1,par_flag等於1,且gt1_flag等於1,則變換係數層級大於或等於4:level>=4;因此,可至少根據下式導出絕對變換係數層級之最小值minAbs1[k]=sig_flag[k]+par_flag[k]+2*gt1_flag[k]。 According to the preferred embodiment shown in the pseudo code of FIG. 18, the bits sig_flag, par_flag, and gt1_flag are transmitted in the first pass 20/22'. Based on this data of a certain transform coefficient level, the following conclusions can be drawn: ‧If sig_flag is equal to 0, then the transform coefficient level is equal to 0: level=0; ‧If sig_flag is equal to 1, par_flag is equal to 0, and gt1_flag Equal to 0, the transform coefficient level is equal to 1: level=1; ‧If sig_flag is equal to 1, par_flag is equal to 1, and gt1_flag is equal to 0, then the transform coefficient level is equal to 2: level=2; ‧If sig_flag is equal to 1, par_flag is equal to 0, And gt1_flag is equal to 1, then the transform coefficient level is greater than or equal to 3: level>=3; ‧If sig_flag is equal to 1, par_flag is equal to 1, and gt1_flag is equal to 1, then the transform coefficient level is greater than or equal to 4: level>=4; therefore, The minimum value of the absolute transform coefficient level minAbs1[k]=sig_flag[k]+par_flag[k]+2*gt1_flag[k] can be derived at least according to the following formula.

在第二遍次中,另外知曉gt2_flag之值且可因此導出以下最小值:minAbs2[k]=sig_flag[k]+par_flag[k]+2*(gt1_flag[k]+gt2_flag[k])。 In the second pass, the value of gt2_flag is also known and the following minimum value can be derived accordingly: minAbs2[k]=sig_flag[k]+par_flag[k]+2*(gt1_flag[k]+gt2_flag[k]).

最小絕對值之對應總和由sumAbs1及sumAbs2表示且由下式給定

Figure 108123315-A0305-02-0064-16
The corresponding sum of the minimum absolute value is represented by sumAbs1 and sumAbs2 and is given by the following formula
Figure 108123315-A0305-02-0064-16

Figure 108123315-A0305-02-0064-17
and
Figure 108123315-A0305-02-0064-17

推斷指當前變換區塊外部之位置的minAbs1[i]及minAbs2[i]之值等於0。 It is inferred that the values of minAbs1[i] and minAbs2[i] at the position outside the current transformation block are equal to 0.

在此上下文中,應注意,用於計算minAbs1[k]及minAbs2[k]之確切方程式(且因此, sumAbs1[k]及sumAbs2[k]之最終值)取決於哪些位元子包括於第一遍次中以及包括於此等位元子之語義(亦即,含義)上。舉例而言,若gt2_flag[k]包括於第一遍次中或若gt1_flag[k]之含義經修改(上文已描述二個替代方案),則用於計算minAbs1[k]之方程式必須相應地改變。舉例而言,在圖19之狀況下,在第一遍次20/22期間,此最小值為minAbs1=sig_flag+gt1_flag+par_flag+2 *(gt3_flag+餘數)。在任何狀況下,minAbs1[k]表示可基於在第一遍次中經寫碼之位元子而導出的絕對層級之最小值。 In this context, it should be noted that the exact equations used to calculate minAbs1[k] and minAbs2[k] (and therefore, The final value of sumAbs1[k] and sumAbs2[k]) depends on which bits are included in the first pass and are included in the semantics (ie, meaning) of these bits. For example, if gt2_flag[k] is included in the first pass or if the meaning of gt1_flag[k] is modified (two alternatives have been described above), the equation used to calculate minAbs1[k] must be correspondingly Change. For example, in the situation of FIG. 19, during the first pass 20/22, the minimum value is minAbs1=sig_flag+gt1_flag+par_flag+2*(gt3_flag+remainder). In any case, minAbs1[k] represents the minimum value of the absolute level that can be derived based on the bits of the code written in the first pass.

值sumAbs、numSig、sumAbs1及sumAbs2或此等值之函數可用作上下文模型化之局部活動度量。下文描述詳細實例。 The values sumAbs, numSig, sumAbs1 and sumAbs2 or functions of these values can be used as local activity measures for context modeling. A detailed example is described below.

在替代實施例中,不基於所傳輸之變換係數層級,而是基於量化步長之相關聯乘法因子(絕對值)而判定值sumAbs、minAbs1及minAbs2。此等資料可基於變換係數層級及相關聯狀態變數而導出。在給定絕對層級absLevel[k]及相關聯狀態變數state[k]之情況下,可根據下式確定量化步長qIdx[k]之乘法因子qIdx[k]=2 * absLevel[k]-(state[k]>>1) In an alternative embodiment, the values sumAbs, minAbs1, and minAbs2 are determined not based on the transmitted transform coefficient level, but based on the associated multiplication factor (absolute value) of the quantization step. Such data can be derived based on the transformation coefficient levels and associated state variables. Given the absolute level absLevel[k] and the associated state variable state[k], the multiplication factor qIdx[k]=2 * absLevel[k]-( state[k]>>1)

替換minAbs1及minAbs2之類似值可根據下式導出minQIdx1[k]=2 * minAbs1[k]-(state[k]>>1) Replacing similar values of minAbs1 and minAbs2 can be derived according to the following formula minQIdx1[k]=2 * minAbs1[k]-(state[k]>>1)

minQIdx2[k]=2 * minAbs2[k]-(state[k]>>1) minQIdx2[k]=2 * minAbs2[k]-(state[k]>>1)

在給定此等值之情況下,代替sumAbs、sumAbs1及 sumAbs2之替代值sumQAbs、sumQAbs1及sumQAbs2可根據下式導出:

Figure 108123315-A0305-02-0066-18
Given these equivalent values, the substitute values sumQAbs, sumQAbs1 and sumQAbs2 in place of sumAbs, sumAbs1 and sumAbs2 can be derived according to the following formula:
Figure 108123315-A0305-02-0066-18

在以下描述中,使用值sumAbs、sumAbs1及sumAbs2。但應記住,此等值可用值sumQAbs、sumQAbs1及sumQAbs2替換。當使用值sumQAbs、sumQAbs1及sumQAbs2時,在上下文導出中可較佳地使用此等值之不同函數。 In the following description, the values sumAbs, sumAbs1, and sumAbs2 are used. But it should be remembered that these equivalent values can be replaced with the values sumQAbs, sumQAbs1 and sumQAbs2. When the values sumQAbs, sumQAbs1, and sumQAbs2 are used, different functions of these equivalent values can be preferably used in the context derivation.

用於有效值旗標sig_flag之上下文模型化Used for the context modeling of the effective value flag sig_flag

用於寫碼當前sig_flag之自適應性機率模型係選自機率模型集合。為簡單起見,假定可用機率模型係以以下4維陣列組織probModelSig[cSig][sSig][dSig][aSig],其中cSig指定取決於當前色彩頻道之索引,sSig指定取決於狀態變數之索引,dSig指定取決於變換區塊內部之對角線位置(或更一般而言,x及y位置)的索引,且aSig指定取決於局部活動度量之索引。機率模型之實際組織為實際實施之態樣。其可例如組織為1-d陣列,在此狀況下,可基於cSig、sSig、dSig及aSig之值而導出經組合索引。 The adaptive probability model used to write the current sig_flag is selected from the probability model set. For simplicity, assume that the available probability model is organized in the following 4-dimensional array probModelSig[cSig][sSig][dSig][aSig], where cSig designation depends on the index of the current color channel, and sSig designation depends on the index of the state variable. The dSig designation depends on the index of the diagonal position (or more generally, the x and y positions) inside the transform block, and the aSig designation depends on the index of the local activity metric. The actual organization of the probability model is the state of actual implementation. It can be organized as a 1-d array, for example, in this case, the combined index can be derived based on the values of cSig, sSig, dSig, and aSig.

在下文中,描述用於導出索引cSig、sSig、dSig及aSig之實例方法。然而,應注意,導出此等索引(或索引之一部分)之不同方式係可能的。 In the following, example methods for deriving indexes cSig, sSig, dSig, and aSig are described. However, it should be noted that different ways of deriving these indexes (or parts of indexes) are possible.

色彩頻道索引cSigColor channel index cSig

在較佳實施例中,當且僅當當前色彩頻道表示明度信道(或者,更一般而言第一色彩頻道)時,色彩頻道索引cSig設定為等於0。且當且僅當當前色彩頻道表示色度頻道(或者,更一般而言,並非第一色彩頻道),cSig被設定為等於1:cSig=(current channel is lumaa?0:1) In a preferred embodiment, the color channel index cSig is set to be equal to 0 if and only if the current color channel represents the lightness channel (or, more generally, the first color channel). And if and only if the current color channel represents the chroma channel (or, more generally, not the first color channel), cSig is set equal to 1: cSig=(current channel is lumaa? 0:1)

作為替代方案,cSig可被設定為針對明度頻道等於0,針對Cb頻道等於1,且針對Cr頻道等於2。 As an alternative, cSig can be set to be equal to 0 for the brightness channel, equal to 1 for the Cb channel, and equal to 2 for the Cr channel.

狀態索引sSigState index sSig

在較佳實施例中,索引sSig被設定為等於

Figure 108123315-A0305-02-0067-19
In the preferred embodiment, the index sSig is set equal to
Figure 108123315-A0305-02-0067-19

彼意謂,一個機率模型集合用於等於0及1之狀態變數,第二集合用於等於2之狀態變數,且第三集合用於等於3之狀態變數。 That means, a set of probability models is used for state variables equal to 0 and 1, the second set is used for state variables equal to 2, and the third set is used for state variables equal to 3.

作為替代方案,索引sSig可被設定為等於狀態變數(sSig=state),在此狀況下單獨機率模型集合將用於狀態變數之各可能值。或作為另一替代方案,可根據sSig=state>>1設定索引sSig,在此狀況下,單獨上下文模型集合將用於二個量化器Q0及Q1中之各者(應注意, 當狀態等於0或1時,使用量化器Q0,且當狀態等於2或3時,使用量化器Q1)。 As an alternative, the index sSig can be set equal to the state variable (sSig=state), in which case a separate probability model set will be used for each possible value of the state variable. Or as another alternative, the index sSig can be set according to sSig=state>>1. In this case, a separate context model set will be used for each of the two quantizers Q0 and Q1 (note that When the state is equal to 0 or 1, the quantizer Q0 is used, and when the state is equal to 2 or 3, the quantizer Q1) is used.

位置索引dSigLocation index dSig

在較佳實施例中,索引dSig被如下設定: In the preferred embodiment, the index dSig is set as follows:

‧若索引cSig等於0(亦即,當前色彩頻道表示明度頻道),則根據下式設定dSig

Figure 108123315-A0305-02-0068-21
‧If the index cSig is equal to 0 (that is, the current color channel represents the brightness channel), set dSig according to the following formula
Figure 108123315-A0305-02-0068-21

‧若索引cSig等於1(亦即,當前色彩頻道表示色度頻道),則根據下式設定dSig

Figure 108123315-A0305-02-0068-20
‧If the index cSig is equal to 1 (that is, the current color channel represents the chroma channel), set dSig according to the following formula
Figure 108123315-A0305-02-0068-20

此處,diag表示由diag=x+y給定之對角線位置,其中x及y表示變換區塊內部之當前掃描位置之x及y座標。 Here, diag represents the diagonal position given by diag=x+y, where x and y represent the x and y coordinates of the current scan position inside the transformation block.

替代地,對角線位置之任何其他叢集皆為可能的。或者,變換區塊內部之(x,y)位置可分割成多個類別,且索引dSig可被設定為等於對應類別索引。 Alternatively, any other clustering of diagonal positions is possible. Alternatively, the (x, y) position inside the transformation block can be divided into multiple categories, and the index dSig can be set equal to the corresponding category index.

局部活動索引aSigLocal activity index aSig

最後,在本發明之一較佳實施例中,根據下式設定索引aSig aSig=min(5,sumAbs1),其中sumAbs1係指局部範本中由第一遍次中所傳輸之資料給定之最小絕對變換係數層級的總和(參見上文)。 Finally, in a preferred embodiment of the present invention, the index aSig aSig=min(5,sumAbs1) is set according to the following formula, where sumAbs1 refers to the minimum absolute transformation given by the data transmitted in the first pass in the partial template The sum of the coefficient levels (see above).

作為替代方案,可使用sumAbs1之不同最大值或不同函數。 As an alternative, different maximum values or different functions of sumAbs1 can be used.

用於同位旗標par_flag之上下文模型化Used for context modeling of par_flag

用於寫碼當前par_flag之自適應性機率模型係選自機率模型集合。類似地,對於有效值旗標,假定可用機率模型係以以下4維陣列組織probModelPar[cPar][sPar][dPar][aPar],其中cPar指定取決於當前色彩頻道之索引,sPar指定取決於狀態變數之索引,dPar指定取決於變換區塊內部之對角線位置(或更一般而言,x及y位置)的索引,且aPar指定取決於局部活動度量之索引。 The adaptive probability model used to write the current par_flag is selected from the set of probability models. Similarly, for the effective value flag, it is assumed that the available probability model is organized in the following 4-dimensional array probModelPar[cPar][sPar][dPar][aPar], where the cPar specification depends on the index of the current color channel, and the sPar specification depends on the state The index of the variable, dPar designation depends on the index of the diagonal position (or more generally, the x and y position) inside the transformation block, and the index of aPar designation depends on the local activity metric.

色彩頻道索引cParColor channel index cPar

類似地,對於有效值旗標,在較佳實施例中,根據下式設定色彩頻道索引cSig:cPar=(current channel is luma?0:1) Similarly, for the effective value flag, in a preferred embodiment, the color channel index cSig is set according to the following formula: cPar=(current channel is luma? 0:1)

替代地,可使用上文針對cSig所描述之替代方案。 Alternatively, the alternatives described above for cSig can be used.

狀態索引sParState index sPar

在較佳實施例中,索引sPar被設定為等於0。彼意謂,所選機率模型不取決於狀態變數。 In a preferred embodiment, the index sPar is set equal to zero. This means that the selected probability model does not depend on state variables.

替代地,可使用上文針對sPar所描述之方法中之任一者。 Alternatively, any of the methods described above for sPar can be used.

位置索引dParLocation index dPar

在較佳實施例中,索引dPar被如下設定: In a preferred embodiment, the index dPar is set as follows:

‧若索引cPar等於0(亦即,當前色彩頻道表示明度頻道),則根據下式設定dPar

Figure 108123315-A0305-02-0070-23
‧If the index cPar is equal to 0 (that is, the current color channel represents the brightness channel), set dPar according to the following formula
Figure 108123315-A0305-02-0070-23

‧若索引cPar等於1(亦即,當前色彩頻道表示色度頻道),則根據下式設定dPar

Figure 108123315-A0305-02-0070-22
‧If the index cPar is equal to 1 (that is, the current color channel represents the chroma channel), set dPar according to the following formula
Figure 108123315-A0305-02-0070-22

在此,diag表示由diag=x+y給定之對角線位置,其中x及y表示變換區塊內部之當前掃描位置之x及y座標。布林變數firstNonZero指定當前掃描位置是否表示寫碼次序中之第一非零層級之掃描位置(亦即,由在經寫碼區塊旗標之後傳輸之x及y座標(或類似方式)識別的位置)。因此,對於寫碼次序中之第一非零層級,使用不同機率模型集合(獨立於對角線位置)。 Here, diag represents the diagonal position given by diag=x+y, where x and y represent the x and y coordinates of the current scan position inside the transformation block. The Boolean variable firstNonZero specifies whether the current scan position represents the scan position of the first non-zero level in the coding sequence (that is, identified by the x and y coordinates (or similar methods) transmitted after the code block flag Location). Therefore, for the first non-zero level in the coding order, a set of different probability models (independent of the diagonal position) is used.

替代地,對角線位置之任何其他叢集皆為可能的。或者,變換區塊內部之(x,y)位置可分割成多個類別,且索引dPar可被設定為等於對應類別索引。 Alternatively, any other clustering of diagonal positions is possible. Alternatively, the (x, y) position inside the transformation block can be divided into multiple categories, and the index dPar can be set equal to the corresponding category index.

局部活動索引aParLocal activity index aPar

最後,在本發明之一較佳實施例中,根據下式設定索引aPar aPar=min(4,sumAbs1-numSig),其中sumAbs1係指局部範本中由第一遍次中所傳輸 之資料給定之最小絕對變換係數層級的總和(參見上文)。且numSig係指局部範本中之非零層級數目(亦即,等於1之sig_flag's之數目)(參見以上描述)。作為替代方案,可使用sumAbs1及numSig之不同最大值或不同函數。 Finally, in a preferred embodiment of the present invention, the index aPar aPar=min(4,sumAbs1-numSig) is set according to the following formula, where sumAbs1 refers to the partial template transmitted in the first pass The sum of the minimum absolute transform coefficient levels given by the data (see above). And numSig refers to the number of non-zero levels in the local template (that is, the number of sig_flag's equal to 1) (see the description above). As an alternative, different maximum values or different functions of sumAbs1 and numSig can be used.

旗標gt1_flag之上下文模型化Context modeling of flag gt1_flag

用於寫碼當前gt1_flag之自適應性機率模型係選自機率模型集合。類似地,對於有效值旗標,假定可用機率模型係以以下4維陣列組織probModelGt1[cGt1][sGt1][dGt1][aGt1],其中cGt1指定取決於當前色彩頻道之索引,sGt1指定取決於狀態變數之索引,dGt1指定取決於變換區塊內部之對角線位置(或更一般而言,x及y位置)的索引,且aGt1指定取決於局部活動度量之索引。 The adaptive probability model used to write the current gt1_flag is selected from the probability model set. Similarly, for the effective value flag, it is assumed that the available probability model is organized in the following 4-dimensional array probModelGt1[cGt1][sGt1][dGt1][aGt1], where the cGt1 specification depends on the index of the current color channel, and the sGt1 specification depends on the state The index of the variable, dGt1 specifies the index that depends on the diagonal position (or more generally, the x and y positions) inside the transform block, and the aGt1 specifies the index that depends on the local activity metric.

在本發明之一較佳實施例中,以與上文所描述之索引cPar、sPar、dPar、aPar相同的方式導出索引cGt1、sGt1、dGt1及aGt1:cGt1=cPar In a preferred embodiment of the present invention, the indexes cGt1, sGt1, dGt1, and aGt1 are derived in the same manner as the indexes cPar, sPar, dPar, and aPar described above: cGt1=cPar

sGt1=sPar sGt1=sPar

dGt1=dPar dGt1=dPar

aGt1=aPar aGt1=aPar

應注意,使用相同上下文索引不同於使用相同機率模型。雖然上下文模型索引之導出對於gt1_flag及par_flag為相同的,但機率模型之集合不相交。彼意謂,針對par_flag使用一個機率模型集合,且針對gt1_flag 使用另一機率模型集合。 It should be noted that using the same context index is different from using the same probability model. Although the derivation of the context model index is the same for gt1_flag and par_flag, the sets of probability models do not intersect. That means, use a set of probability models for par_flag, and for gt1_flag Use another set of probability models.

應注意,gt1_flag之上下文選擇不取決於正前方之par_flag的值。 It should be noted that the context selection of gt1_flag does not depend on the value of par_flag directly in front.

替代地,索引cGt1、sGt1、dGt1及aGt1可藉由上文關於有效值旗標所描述之方法中之任一者導出。 Alternatively, the indexes cGt1, sGt1, dGt1, and aGt1 can be derived by any of the methods described above with respect to the effective value flag.

此外,所選擇之機率模型可另外取決於正前方之同位旗標par_flag之值,使得針對二個同位值中之各者使用不同機率模型集合。然而,此將在par_flag與gt1_flag之間引入直接相依性。 In addition, the selected probability model may additionally depend on the value of the par_flag directly in front, so that a different set of probability models is used for each of the two parity values. However, this will introduce a direct dependency between par_flag and gt1_flag.

旗標gt2_flag之上下文模型化Context modeling of flag gt2_flag

用於寫碼當前gt2_flag之自適應性機率模型係選自機率模型集合。類似地,對於有效值旗標,假定可用機率模型係以以下4維陣列組織probModelGt2[cGt2][sGt2][dGt2][aGt2],其中cGt2指定取決於當前色彩頻道之索引,sGt2指定取決於狀態變數之索引,dGt2指定取決於變換區塊內部之對角線位置(或更一般而言,x及y位置)的索引,且aGt2指定取決於局部活動度量之索引。 The adaptive probability model used to write the current gt2_flag is selected from the probability model set. Similarly, for the effective value flag, it is assumed that the available probability model is organized in the following 4-dimensional array probModelGt2[cGt2][sGt2][dGt2][aGt2], where the cGt2 specification depends on the index of the current color channel, and the sGt2 specification depends on the state The index of the variable, dGt2 specifies the index that depends on the diagonal position (or more generally, the x and y positions) inside the transform block, and the aGt2 specifies the index that depends on the local activity metric.

在較佳實施例中,以與上文所描述之索引cGt1、sGt1、dGt1、aGt1相同的方式導出索引cGt2、sGt2、dGt2及aGt2:cGt2=cGt1 In a preferred embodiment, the indexes cGt2, sGt2, dGt2, and aGt2 are derived in the same way as the indexes cGt1, sGt1, dGt1, and aGt1 described above: cGt2=cGt1

sGr2=sGt1 sGr2=sGt1

dGt2=dGt1 dGt2=dGt1

aGt2=aGt1 aGt2=aGt1

類似地,對於gt1_flag,應注意,(即使上下文索引對於寫碼gt2_flag及gt2_flag為相同的),一般而言,針對gt1_flag及gt2_flag使用不同機率模型集合。然而,作為特殊狀況,亦有可能針對此二個旗標使用完全相同的機率模型。 Similarly, for gt1_flag, it should be noted that (even if the context index is the same for writing codes gt2_flag and gt2_flag), generally speaking, different probability model sets are used for gt1_flag and gt2_flag. However, as a special situation, it is also possible to use exactly the same probability model for the two flags.

替代地,索引cGt2、sGt2、dGt2及aGt2可藉由上文關於前述旗標所描述之方法中之任一者導出。 Alternatively, the indexes cGt2, sGt2, dGt2, and aGt2 can be derived by any of the methods described above with respect to the aforementioned flags.

此外,為了導出局部活動索引aGt2,可使用局部鄰域中之gt2_flag之額外資訊(在此狀況下,在第二遍次中對gt2_flag進行寫碼)。舉例而言,可根據下式設定活動索引:aGt2=min(4,sumAbs2-numSig),其中sumAbs2係指由在第一遍次及第二遍次中傳輸之資料給定的局部範本中之最小絕對變換係數層級之總和(參見上文)。 In addition, in order to derive the local activity index aGt2, additional information of gt2_flag in the local neighborhood can be used (in this case, gt2_flag is written in the second pass). For example, the activity index can be set according to the following formula: aGt2=min(4,sumAbs2-numSig), where sumAbs2 refers to the smallest value in the local template given by the data transmitted in the first pass and the second pass The sum of absolute transform coefficient levels (see above).

作為替代方案,可使用sumAbs2、sumAbs1及numSig之不同最大值或不同函數。 As an alternative, different maximum values or different functions of sumAbs2, sumAbs1, and numSig can be used.

現在轉向圖18及圖19之論述,換言之,此意謂以下內容。 Turning now to the discussion of FIGS. 18 and 19, in other words, this means the following.

如所描述,預定變換係數之有效值旗標之解碼16可涉及取決於變換區塊內部之預定變換係數之係數位置而選擇用於執行解碼16之上下文。此位置由圖18及 圖19中之參數k索引化。另外或替代地,如上文關於圖16所說明,預定變換係數50之有效值旗標係藉由以下操作解碼:基於在圍繞預定變換係數50或位於該預定變換係數之位置處之局部範本52內之一組相鄰變換係數51之預定變換係數之有效值旗標之前經解碼的旗標集合判定局部活動,且取決於局部活動選擇上下文。如圖18及圖19中所進行,例如有效值旗標、同位旗標及一或多個大小程度旗標中之一者,或如在圖19狀況下的所有大小程度旗標可在一個遍次中經寫碼/解碼,使得針對範本52中之係數51解碼的旗標集合包含如針對範本52中之相鄰變換係數51之集合解碼的此等旗標,且活動可基於針對相鄰變換係數51中之各者具有加數的總和而計算,加數指示用於各別相鄰變換係數51之最低限度地假定之索引或最低限度地假定之重構層級,該索引或重構層級係基於先前針對各別相鄰變換係數解碼的該等旗標而判定。最低限度地假定之值意謂用於量化索引或重構層級之最小臨限值,各別相鄰係數基於先前針對各別相鄰係數51而導出之旗標之分析而最低限度地假定該量化索引或重構層級。最小值可在絕對意義上定義。在圖19之狀況下,舉例而言,此最小值可計算為各係數51之sig_flag+gt1_flag+par_flag+2 * gt3_flag,因為僅餘數可缺失任何係數。對於先前經寫碼/解碼旗標集合由於gt1_flag為零而不包括諸如par_flag及gt3_flag之某些旗標的係數51,各別旗標具有默認值零。可使用上下文寫碼/解碼預定變換係數 之有效值旗標,該上下文甚至另外或替代地取決於狀態轉換假定此預定變換係數之狀態46而選擇。舉例而言,可針對狀態0及1定義及選擇一個上下文集合,針對狀態2定義及選擇另一上下文集合,且針對狀態3定義及選擇第三上下文集合。在所選擇之上下文集合內,可接著諸如取決於局部活動使用先前提及之相依性中之任一者執行對最終使用之上下文的選擇。可使用當前所選重構集合,例如setId,而非狀態。 As described, the decoding 16 of the effective value flag of the predetermined transform coefficient may involve selecting the context for performing the decoding 16 depending on the coefficient position of the predetermined transform coefficient within the transform block. This position is shown in Figure 18 and The parameter k in Figure 19 is indexed. Additionally or alternatively, as explained above with respect to FIG. 16, the effective value flag of the predetermined transform coefficient 50 is decoded by the following operation: The set of decoded flags before the effective value flag of the predetermined transform coefficient of a set of adjacent transform coefficients 51 determines the local activity, and depends on the local activity selection context. As shown in Figure 18 and Figure 19, for example, one of the effective value flag, the parity flag, and one or more size flags, or all the size flags under the condition of Figure 19 can be in one pass Secondly, code/decode so that the set of flags decoded for the coefficient 51 in the template 52 includes such flags as decoded for the set of adjacent transform coefficients 51 in the template 52, and the activity can be based on the adjacent transform Each of the coefficients 51 is calculated with the sum of the addends. The addends indicate the minimally assumed index or the minimally assumed reconstruction level for each adjacent transformation coefficient 51. The index or reconstruction level system The decision is based on the previously decoded flags for the respective adjacent transform coefficients. The minimally assumed value means the minimum threshold value for the quantization index or reconstruction level. The respective adjacent coefficients are minimally assumed based on the analysis of the previously derived flags for the respective adjacent coefficients 51 Index or restructure hierarchy. The minimum value can be defined in an absolute sense. In the situation of FIG. 19, for example, this minimum value can be calculated as sig_flag+gt1_flag+par_flag+2*gt3_flag of each coefficient 51, because only the remainder can be missing any coefficient. For the previously written code/decoding flag set because gt1_flag is zero, the coefficient 51 does not include certain flags such as par_flag and gt3_flag, and each flag has a default value of zero. Can use context to code/decode predetermined transform coefficients The effective value flag, the context is even additionally or alternatively selected depending on the state 46 of the state transition assuming the predetermined transformation coefficient. For example, one context set may be defined and selected for states 0 and 1, another context set may be defined and selected for state 2, and a third context set may be defined and selected for state 3. Within the selected context set, the selection of the final use context can then be performed, such as depending on the local activity using any of the previously mentioned dependencies. You can use the currently selected reconstruction set, such as setId, instead of the state.

對於同位旗標,可類似地設計上下文選擇性。亦即,可使用取決於以下各者中之一或多者而選擇的上下文對預定變換係數之同位旗標進行寫碼/解碼:1)預定變換係數之係數位置,2)局部活動,其係基於在圍繞預定變換係數50之局部範本52內之一組相鄰變換係數51之預定變換係數之同位旗標之前經解碼的旗標集合而判定,3)圍繞預定變換係數之局部範本52內之變換係數51之數目,該等變換係數之重構層級不為零,且取決於局部活動及/或變換係數之數目而選擇上下文,或4)局部活動與變換係數之數目之間的差。 For parity flags, context selectivity can be similarly designed. That is, a context selected depending on one or more of the following can be used to code/decode the parity flag of the predetermined transform coefficient: 1) the coefficient position of the predetermined transform coefficient, 2) the local activity, which is Determined based on the set of decoded flags before the parity flags of the predetermined transform coefficients of a group of adjacent transform coefficients 51 in the local template 52 surrounding the predetermined transform coefficient 50, 3) within the local template 52 surrounding the predetermined transform coefficient The number of transform coefficients 51, the reconstruction level of these transform coefficients is not zero, and the selection context depends on the number of local activities and/or transform coefficients, or 4) the difference between the number of local activities and the number of transform coefficients.

對於諸如gt1_flag、gt2_flag及gt3_flag中之任一者的大小程度旗標,可類似地設計上下文選擇性。亦即,可使用取決於以下各者中之一或多者而選擇的上下文對預定變換係數之大小程度旗標進行寫碼/解碼:1)預定變換係數之係數位置,2)局部活動,其係基於在圍繞預定變換係數或位於預定變換係數處之局部範本52內之 一組相鄰變換係數51之預定變換係數之大小程度旗標之前經解碼的一旗標集合而判定,3)局部範本52內之變換係數51之數目,該等預定變換係數之重構層級不為零,及/或4)局部活動與變換係數之數目之間的差。 For the size degree flags such as any one of gt1_flag, gt2_flag, and gt3_flag, context selectivity can be similarly designed. That is, a context selected depending on one or more of the following can be used to code/decode the magnitude flag of the predetermined transform coefficient: 1) the coefficient position of the predetermined transform coefficient, 2) the local activity, which It is based on the local template 52 surrounding or located at the predetermined transform coefficient The magnitude of the predetermined transform coefficients of a group of adjacent transform coefficients 51 is determined by a set of decoded flags before the flag, 3) the number of transform coefficients 51 in the local template 52, and the reconstruction level of these predetermined transform coefficients is not Is zero, and/or 4) The difference between the number of local activities and the number of transform coefficients.

關於餘數之二進位化,可使用以下有利概念。 Regarding the binarization of the remainder, the following advantageous concepts can be used.

在較佳實施例中,在算術寫碼引擎之旁路模式中對語法元素餘數進行寫碼(參見上文)。壓縮效率取決於所使用之二進位化。在HEVC中,使用被稱作哥倫布-萊斯碼之一類二進位化碼對類似語法元素進行寫碼。此類別之碼由所謂的萊斯參數來參數化。在HEVC中,在寫碼期間調整萊斯參數,使得所使用之二進位化取決於先前語法元素。 In a preferred embodiment, the remainder of the syntax element is coded in the bypass mode of the arithmetic coding engine (see above). The compression efficiency depends on the binarization used. In HEVC, a type of binary code called Columbus-Rice code is used to code similar syntax elements. The codes of this category are parameterized by so-called Rice parameters. In HEVC, the Rice parameter is adjusted during coding so that the binarization used depends on the previous syntax elements.

在較佳實施例中,使用與HEVC中之碼類別相同(或類別極類似)的哥倫布-萊斯碼以使語法元素剩餘部分二進位化。相比於HEVC,自餘數之層級資訊除以二以後,必須修改萊斯參數之導出。 In a preferred embodiment, Golomb-Rice codes of the same (or very similar) code type to HEVC are used to binarize the rest of the syntax elements. Compared with HEVC, after dividing the level information of the remainder by two, the derivation of Rice parameters must be modified.

在較佳組態中,使用由局部範本覆蓋之相鄰層級的絕對值總和sumAbs來導出萊斯參數(參見上文)。在尤其較佳實施例中,根據下式導出萊斯參數RP。 In a preferred configuration, the sumAbs of the absolute value of the adjacent levels covered by the partial template is used to derive the Rice parameter (see above). In a particularly preferred embodiment, the Rice parameter RP is derived according to the following formula.

Figure 108123315-A0305-02-0076-24
Figure 108123315-A0305-02-0076-24

在其他組態中,可修改用於切換萊斯參數之臨限值。或可基於局部範本之其他活動度量而導出萊斯參 數。此外,可另外指定在子區塊內不允許萊斯參數變得較小。 In other configurations, the threshold value used to switch Rice parameters can be modified. Or it can be derived based on other activity measures of the local template. number. In addition, it may be additionally specified that the Rice parameter is not allowed to become smaller in the sub-block.

作為替代方案,可以與HEVC中類似的方式修改萊斯參數。 As an alternative, the Rice parameter can be modified in a similar way as in HEVC.

亦即,可在解碼28餘數時執行萊斯參數選擇。 That is, the Rice parameter selection can be performed when the 28 remainder is decoded.

在例如上文所描述之圖18之實施例中,在有效值資訊之後直接傳輸同位語法元素。在此組態中,直接位元子間相依性僅存在於有效值資訊與同位資訊之間。在同位資訊之寫碼/解碼之後,對gt1_flag進行寫碼,藉此停止第一遍次中針對當前掃描位置之層級資訊之寫碼。在結束第一掃描遍次20/22'之後,在第二掃描遍次22'中傳輸gt2_flags。最後,在掃描遍次26中傳輸餘數。此設計最小化與有效值及同位語法元素之直接位元子間相依性。此外,可針對有效值旗標之上下文模型化評估較多層級資訊,藉此實現較高壓縮效率。同位旗標之上下文模型化與gt1及gt2旗標之上下文模型化完全相同,從而產生較小邏輯,且因此產生較低複雜度。 In the embodiment of FIG. 18 described above, for example, the parity syntax element is transmitted directly after the effective value information. In this configuration, the direct inter-bit dependency only exists between the effective value information and the parity information. After the coding/decoding of the parity information, the gt1_flag is coded, thereby stopping the coding of the level information of the current scanning position in the first pass. After finishing the first scan pass 20/22', gt2_flags is transmitted in the second scan pass 22'. Finally, the remainder is transmitted in scan pass 26. This design minimizes the direct bit-subdependency with valid values and parsing syntax elements. In addition, more levels of information can be modeled and evaluated against the context of the effective value flag, thereby achieving higher compression efficiency. The context modeling of the parity flag is exactly the same as the context modeling of the gt1 and gt2 flags, resulting in less logic and therefore less complexity.

在替代實施例中,在絕對層級資訊之前首先傳輸同位資訊,如圖20之偽碼中所說明。此處,在遍次20'中傳輸有效值旗標,接著在遍次20"中傳輸同位旗標,接著在遍次22'中傳輸第一大小程度旗標,隨後在遍次22"中傳輸第二大小程度旗標。當同位資訊等於0時,僅需要有效值旗標,而當同位旗標等於1時,推斷有效值旗標等 於1。此組態之優點為不存在直接位元子間相依性。在第一遍次中傳輸同位旗標之後,狀態變數之值及因此用於個別變換係數之量化器係已知的。 In an alternative embodiment, the parity information is transmitted first before the absolute level information, as illustrated in the pseudo code of FIG. 20. Here, the effective value flag is transmitted in the pass 20', then the parity flag is transmitted in the pass 20", and then the first magnitude flag is transmitted in the pass 22', and then the flag is transmitted in the pass 22" The second largest degree flag. When the parity information is equal to 0, only the effective value flag is required, and when the parity flag is equal to 1, the effective value flag is inferred, etc. At 1. The advantage of this configuration is that there is no direct inter-bit dependency. After the parity flag is transmitted in the first pass, the values of the state variables and therefore the quantizers used for the individual transform coefficients are known.

利用sig_flags之遍次與利用經旁通寫碼之remainder's之遍次之間的遍次數目可選擇為諸如在圖19之狀況下等於零或等於大於零之任何值。此外,可在一遍次內傳輸多個旗標。 The number of passes between the pass using sig_flags and the pass using the remainder's pass-by-code writing can be selected to be equal to zero or equal to any value greater than zero under the condition of FIG. 19. In addition, multiple flags can be transmitted in one pass.

以上描述之進一步修改係關於以下各者。用於同位旗標par_flag之所選擇機率模型可取決於以下參數中之一或多者:‧色彩頻道;‧狀態變數;‧圍繞當前掃描位置之局部範本中之同位旗標;‧掃描位置(例如,藉由叢集對角線位置)。 The further modifications described above are related to the following. The selected probability model used for par_flag can depend on one or more of the following parameters: ‧color channel; ‧state variables; ‧parity flag in the local template surrounding the current scan position; ‧scan position (e.g. , By the diagonal position of the cluster).

用於遵循同位之語法元素的上下文模型化可基於同位資訊進行調節,使得取決於同位而採用不同上下文模型集合。另外,該等語法元素可取決於在同位旗標之前所描述之參數中之任一者。 The context modeling for grammatical elements that follow parity can be adjusted based on parity information, so that different sets of context models are used depending on parity. In addition, the syntax elements may depend on any of the parameters described before the parity flag.

在此組態中,使用上下文模型之位元子之數目增加例如至六(最末經上下文寫碼語法元素接著為GT5)。接著,在旁路模式中傳輸同位資訊,此係由於條件機率幾乎為等機率的。此組態具有如下益處:可達成針對各掃描位置傳輸完整資訊的設計之壓縮效率。 In this configuration, the number of bits using the context model is increased, for example, to six (the last context-coded syntax element is then GT5). Then, the parity information is transmitted in the bypass mode, which is almost equal due to the conditional probability. This configuration has the following benefits: it can achieve the compression efficiency of a design that transmits complete information for each scanning position.

關於在使用非相依純量量化之狀況下的熵 寫碼,表述以下內容。 Regarding entropy in the case of non-dependent scalar quantification Write the code and state the following.

即使上文所描述之熵寫碼對於利用相依量化之變換寫碼特別有利,但其亦可有利地應用於利用習知非相依量化之變換寫碼。需要修改之唯一態樣為狀態變數之導出。實際上,對於習知非相依量化,狀態變數可始終設定為等於0。應注意,量化器Q0表示習知均一重構量化器。 Even though the entropy coding described above is particularly advantageous for coding with dependent quantization, it can also be advantageously applied to coding with conventional non-dependent quantization. The only aspect that needs to be modified is the derivation of state variables. In fact, for conventional non-dependent quantization, the state variable can always be set equal to zero. It should be noted that the quantizer Q0 represents a conventional uniform reconstruction quantizer.

退回至習知純量量化亦可藉由將狀態轉換表修改成下式來達成state_trans_table[4][2]={{0,0},{0,0},{0,0},{0,0}} Back to the conventional scalar quantization can also be achieved by modifying the state transition table to the following formula state_trans_table[4][2]={{0,0},{0,0},{0,0},{0,0 }}

由於狀態轉換表可表示為單一16位元整數(參見以上描述),可針對相依及非相依純量量化使用相同實施。所使用之量化方法可藉由表示狀態轉換表之16位元值組態。因此,用於熵寫碼之所描述方法亦適於支援相依量化與非相依量化之間的切換(例如,在序列、圖像、圖塊、影像塊或區塊層級上)之編解碼器。 Since the state transition table can be expressed as a single 16-bit integer (see the description above), the same implementation can be used for dependent and non-dependent scalar quantization. The quantization method used can be configured by representing the 16-bit value of the state transition table. Therefore, the described method for entropy coding is also suitable for codecs that support switching between dependent quantization and non-dependent quantization (for example, at the sequence, image, tile, image block, or block level).

其他實施例係關於以下各者。 The other embodiments relate to the following.

1.一種用於對變換係數之一區塊進行解碼的設備,其經組配以:a)在掃描該等變換係數之一或多個第一遍次中,使用上下文自適應性二進位算術解碼對該等變換係數之一有效值旗標、該等變換係數之一同位旗標以及量化索引不為零之變換係數之一或多個大小程度旗標進行解碼,該有效值旗標指示該等變換係數之一量化索引是否為零,該同位旗標指示該等變換係數之一同位;及b) 在一或多個第二遍次中,使用等機率二進位算術解碼對該等變換係數之該量化索引之一絕對值之一餘數之一二進位化的位元子以及該等變換係數之該量化索引之一符號進行解碼,該等變換係數之該一或多個大小程度旗標為正,該等變換係數之該量化索引不為零。 1. A device for decoding a block of transform coefficients, which is configured with: a) In the first pass of scanning one or more of the transform coefficients, context-adaptive binary arithmetic is used Decoding decodes one of the effective value flags of the transform coefficients, one of the parity flags of the transform coefficients, and one or more magnitude flags of the transform coefficients whose quantization index is not zero. The effective value flag indicates the Whether the quantization index of one of the transform coefficients is zero, the parity flag indicates that one of the transform coefficients is in the same position; and b) In one or more second passes, using equal-probability binary arithmetic decoding on the transform coefficients, one of the absolute value of the quantization index, one of the remainder, and one of the binary bits of the transform coefficients A symbol of the quantization index is decoded, the one or more magnitude flags of the transform coefficients are positive, and the quantization index of the transform coefficients is not zero.

2.如實施例1之設備,其經組配以在一個第一遍次中,針對一當前經掃描變換係數,使用上下文自適應性二進位算術解碼對該當前經掃描變換係數之有效值旗標進行解碼,且若該有效值旗標指示該當前經掃描變換係數之量化索引不為零,則針對該當前經掃描變換係數,使用上下文自適應性二進位算術解碼對該當前經掃描變換係數之同位旗標進行解碼。 2. The device as in embodiment 1, which is configured to use context-adaptive binary arithmetic decoding for a current scanned transform coefficient in a first pass to decode the effective value flag of the current scanned transform coefficient If the effective value flag indicates that the quantization index of the current scanned transform coefficient is not zero, then for the current scanned transform coefficient, use context-adaptive binary arithmetic decoding for the current scanned transform coefficient The parity flag is decoded.

3.如實施例1或2之設備,其經組配以在該一或多個第一遍次中,針對一當前經掃描變換係數,若該當前經掃描變換係數之該量化索引不為零,則使用上下文自適應性二進位算術解碼對該當前經掃描變換係數之一第一大小程度旗標進行解碼。 3. The device of embodiment 1 or 2, which is configured to target a current scanned transform coefficient in the one or more first passes, if the quantization index of the current scanned transform coefficient is not zero , Then use context adaptive binary arithmetic decoding to decode the first magnitude flag of one of the current scanned transform coefficients.

4.如實施例3之設備,其經組配以針對一預定變換係數,根據一總和計算該量化索引之該絕對值,該總和之加數係藉由以下形成:該預定變換係數之有效值旗標、該預定變換係數之同位旗標,及該預定變換係數之餘數與該第一大小程度旗標之一總和的兩倍。 4. As the device of embodiment 3, it is configured to calculate the absolute value of the quantization index based on a sum for a predetermined transform coefficient, and the addend of the sum is formed by: the effective value of the predetermined transform coefficient The flag, the parity flag of the predetermined transform coefficient, and twice the sum of the remainder of the predetermined transform coefficient and one of the first magnitude flags.

5.如實施例3之設備,其經組配以在該一或多個第二遍次中,針對一當前經掃描變換係數,若該當前 經掃描變換係數之該第一大小程度旗標為正,則使用上下文自適應性二進位算術解碼對該當前經掃描變換係數之一第二大小程度旗標進行解碼。 5. As the device of embodiment 3, it is configured to, in the one or more second passes, for a current scanned transform coefficient, if the current If the first magnitude flag of the scanned transform coefficient is positive, the second magnitude flag of one of the current scanned transform coefficients is decoded using context adaptive binary arithmetic decoding.

6.如實施例5之設備,其經組配以針對一預定變換係數,根據一總和計算該量化索引之該絕對值,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標、該預定變換係數之該同位旗標、該預定變換係數之該第一大小程度旗標,及該預定變換係數之該餘數與該第二大小程度旗標之一總和的兩倍。 6. The device of embodiment 5 is configured to calculate the absolute value of the quantization index based on a sum for a predetermined transform coefficient, and the addend of the sum is formed by: the effective value of the predetermined transform coefficient The value flag, the parity flag of the predetermined transform coefficient, the first degree flag of the predetermined transform coefficient, and the remainder of the predetermined transform coefficient twice the sum of the second degree flag.

7.如實施例1至6中任一項之設備,其經組配以在該一或多個第一遍次中之各者之後執行該一或多個第二遍次中之各者。 7. The device of any one of embodiments 1 to 6, which is configured to perform each of the one or more second passes after each of the one or more first passes.

8.如前述實施例中任一項之設備,其中一變換區塊之變換係數被分割成子區塊,且該等變換係數經逐子區塊解碼,其中遍及一子區塊之掃描位置的所有遍次係在下一子區塊之第一遍次經解碼之前經解碼。 8. The device as in any one of the preceding embodiments, in which the transform coefficients of a transform block are divided into sub-blocks, and the transform coefficients are decoded sub-block by sub-block, wherein all the scanning positions of a sub-block are The pass is decoded before the first pass of the next sub-block is decoded.

9.如實施例1至8中任一項之設備,其經組配以藉由以下操作解量化量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於該各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多個重構層級集合選擇一重構層級集合,且將該各別變換係數解量化至該重構層級集合之一個層級上,該層級由該各別變換係數之該量化索引索引化。 9. The device as in any one of embodiments 1 to 8, which is configured to dequantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depending on a scan order before each For the parity of the quantization index of the transform coefficient of the individual transform coefficient, select a reconstruction level set from a plurality of reconstruction level sets for the individual transform coefficient, and dequantize the individual transform coefficient to a level of the reconstruction level set Above, the level is indexed by the quantization index of the respective transform coefficient.

10.如實施例9之設備,其經組配以針對該 各別變換係數,藉由以下操作而使用一狀態轉換執行自多個重構層級集合選擇該重構層級集合:唯一地基於該狀態轉換針對該各別變換係數假定之一狀態自該等多個重構層級集合選擇該重構層級集合,且取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態。 10. The device as in Example 9, which is configured for the The individual transform coefficients are selected from a plurality of reconstruction level sets using a state transition by the following operation: the state transition is uniquely based on the assumption of a state from the plurality of reconstruction level sets for the individual transform coefficients. The reconstruction level set selects the reconstruction level set, and depends on the parity of the quantization index of the respective transform coefficient, and updates the state of the state transition for a transform coefficient subsequent to the scan order.

11.如實施例10之設備,其經組配以沿該掃描次序執行該一或多個第一遍次及/或該一或多個第二遍次。 11. The device of embodiment 10, which is configured to perform the one or more first passes and/or the one or more second passes along the scanning order.

12.如實施例10或11之設備,其經組配以執行四個相異狀態之間的狀態轉換轉換。 12. The device of embodiment 10 or 11 is configured to perform state transitions between four different states.

13.如實施例9至12中任一項之設備,其經組配以藉助於一預定量化步長使該等多個(50)重構層級集合(52)參數化且自資料串流(14)導出關於該預定量化步長之資訊。 13. The device of any one of embodiments 9 to 12, which is configured to parameterize and stream the multiple (50) reconstruction level sets (52) by means of a predetermined quantization step size ( 14) Derive information about the predetermined quantization step.

14.如實施例9至13中任一項之設備,其中該等多個(50)重構層級集合(52)中之各者由一預定量化步長之整數倍組成,該預定量化步長對於該等多個(50)重構層級集合(52)係恆定的。 14. The device of any one of embodiments 9 to 13, wherein each of the multiple (50) reconstruction level sets (52) is composed of an integer multiple of a predetermined quantization step size, and the predetermined quantization step size The set of reconstruction levels (52) is constant for these multiple (50) reconstruction levels.

15.如實施例9至14中任一項之設備,其中該等多個(50)重構層級集合(52)中之重構層級集合(52)之數目為二,且該等多個重構層級集合包含:一第一重構層級集合,其包含零及一預定量化步長之偶數倍,及一第二重構層級集合,其包含零及該預定量化步長之奇數倍。 15. The device of any one of embodiments 9 to 14, wherein the number of reconstruction level sets (52) in the plurality (50) of reconstruction level sets (52) is two, and the multiple The structure level set includes: a first reconstruction level set including zero and an even multiple of a predetermined quantization step, and a second reconstruction level set including zero and an odd multiple of the predetermined quantization step.

16.如實施例15之設備,其經組配以針對狀態值0及1選擇該第一重構層級集合,且針對狀態值2及3選擇該第二重構層級集合。 16. The device of embodiment 15, which is configured to select the first reconstruction level set for state values 0 and 1, and select the second reconstruction level set for state values 2 and 3.

17.如實施例1至16中任一項之設備,其經組配以藉由取決於該變換區塊內部之該預定變換係數之一係數位置選擇一上下文而使用上下文自適應性二進位算術解碼對一預定變換係數之有效值旗標進行解碼。 17. The device of any one of embodiments 1 to 16, which is configured to use context-adaptive binary arithmetic by selecting a context depending on the position of a coefficient of the predetermined transform coefficient inside the transform block Decoding decodes the effective value flag of a predetermined transform coefficient.

18.如實施例1至17中任一項之設備,其經組配以藉由以下操作而使用上下文自適應性二進位算術解碼對一預定變換係數之有效值旗標進行解碼:基於在圍繞該預定變換係數之一局部範本內之一組相鄰變換係數之預定變換係數之有效值旗標之前經解碼的一旗標集合判定一局部活動,且取決於該局部活動選擇一上下文。 18. The device as in any one of embodiments 1 to 17, which is configured to use context adaptive binary arithmetic decoding to decode the effective value flag of a predetermined transform coefficient by the following operation: A set of decoded flags before the effective value flag of a predetermined transform coefficient of a group of adjacent transform coefficients in a local template of the predetermined transform coefficient determines a local activity, and a context is selected depending on the local activity.

19.如實施例18之設備,其經組配以在一個第一遍次中對該有效值旗標、該同位旗標及該一或多個大小程度旗標進行解碼,使得該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標,且基於該等相鄰變換係數中之各者之一加數的一總和而計算該局部活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標而判定。 19. The device of embodiment 18 is configured to decode the effective value flag, the parity flag, and the one or more magnitude flags in a first pass, so that the flag set Contains the effective value flag, the parity flag, and the one or more magnitude flags decoded for the set of adjacent transform coefficients, and is based on a sum of one of the addends of each of the adjacent transform coefficients To calculate the local activity, the addends indicate a minimally assumed index or a minimally assumed reconstruction level for one of the adjacent transformation coefficients, and the index or reconstruction level is based on the corresponding Determine the effective value flag, the parity flag, and the one or more magnitude flags of the adjacent transform coefficient decoding.

20.如實施例1至19中任一項之設備,其經 組配以:a)針對該各別變換係數,藉由以下操作而使用一狀態轉換執行自多個重構層級集合選擇該重構層級集合:唯一地基於該狀態轉換針對該各別變換係數假定之一狀態自該等多個重構層級集合選擇該重構層級集合,且取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態;b)沿該掃描次序執行該一或多個第一遍次;及c)藉由取決於該狀態轉換針對預定變換係數(13')假定之狀態選擇一上下文而使用上下文自適應性二進位算術解碼對一預定變換係數之有效值旗標進行解碼。 20. As the device of any one of Examples 1 to 19, it has been Combine with: a) For the individual transform coefficient, select the reconstruction level set from a plurality of reconstruction level sets using a state transition by performing the following operations: uniquely assume for the individual transform coefficient based on the state transition A state selects the reconstruction level set from the plurality of reconstruction level sets, and depends on the parity of the quantization index of the respective transform coefficient, and updates the state transition for a subsequent transform coefficient in the scanning order The state; b) perform the one or more first passes along the scan order; and c) use context adaptation by selecting a context depending on the state transition for the state assumed by the predetermined transform coefficient (13') The binary arithmetic decoding decodes the effective value flag of a predetermined transform coefficient.

21.如實施例20之設備,其經組配以藉由取決於該狀態選擇包含該上下文之一上下文集合而使用上下文自適應性熵解碼對一預定變換係數之有效值旗標進行解碼,且取決於圍繞該預定變換係數之一局部活動或該預定變換係數之一係數位置自該上下文集合選擇該上下文。 21. The device of embodiment 20, which is configured to decode the effective value flag of a predetermined transform coefficient by using context adaptive entropy decoding by selecting a context set including the context depending on the state, and The context is selected from the set of contexts depending on the local activity around one of the predetermined transform coefficients or the position of one of the predetermined transform coefficients.

22.如實施例21之設備,其中針對狀態0及1選擇一第一上下文集合,針對狀態2選擇一第二上下文集合,且針對狀態3選擇一第三上下文集合。 22. The device of embodiment 21, wherein a first context set is selected for states 0 and 1, a second context set is selected for state 2, and a third context set is selected for state 3.

23.如實施例1至22中任一項之設備,其經組配以:a)藉由以下操作解量化量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於該各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多個重構層級集合選擇一重構層級集合,且將該各別變換係數解量化至該重構層級集合之一個層級上,該層級由 該各別變換係數之該量化索引索引化;b)沿該掃描次序執行該一或多個第一遍次;及c)藉由取決於針對一預定變換係數選擇之該重構層級集合選擇一上下文而使用上下文自適應性二進位算術解碼對該預定變換係數之該有效值旗標進行解碼。 23. The device as in any one of embodiments 1 to 22, which is configured with: a) Dequantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depending on the first scan order In the parity of the quantization index of the transform coefficient of the respective transform coefficient, a reconstruction level set is selected from a plurality of reconstruction level sets for the respective transform coefficient, and the respective transform coefficient is dequantized to the reconstruction level set On one level, the level consists of The quantization indexing of the individual transform coefficients; b) perform the one or more first passes along the scanning order; and c) select one by depending on the set of reconstruction levels selected for a predetermined transform coefficient Context-adaptive binary arithmetic decoding is used to decode the effective value flag of the predetermined transform coefficient.

24.如實施例1至23中任一項之設備,其經組配以藉由取決於該變換區塊內部之該預定變換係數之一係數位置選擇一上下文而使用上下文自適應性二進位算術解碼對一預定變換係數之同位旗標進行解碼。 24. The device of any one of embodiments 1 to 23, which is configured to use context-adaptive binary arithmetic by selecting a context depending on the position of a coefficient of the predetermined transform coefficient inside the transform block Decoding decodes the parity flag of a predetermined transform coefficient.

25.如實施例1至24中任一項之設備,其經組配以藉由以下操作而使用上下文自適應性二進位算術解碼對一預定變換係數之同位旗標進行解碼:基於在圍繞該預定變換係數之一局部範本內之一組相鄰變換係數的預定變換係數之同位旗標之前經解碼的一旗標集合判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之重構層級不為零;且取決於該局部活動及/或變換係數之該數目選擇一上下文。 25. The device as in any one of embodiments 1 to 24, which is configured to use context-adaptive binary arithmetic decoding to decode the parity flag of a predetermined transform coefficient by the following operation: A set of flags decoded before the parity flag of a predetermined transform coefficient of a set of adjacent transform coefficients in a local template of a predetermined transform coefficient determines a local activity, and/or determines a local activity around the predetermined transform coefficient in the local template For a number of transform coefficients, the reconstruction level of the predetermined transform coefficients is not zero; and a context is selected depending on the local activity and/or the number of transform coefficients.

26.如實施例25之設備,其經組配以取決於該局部活動與變換係數之該數目之間的一差選擇該上下文。 26. The device of embodiment 25, which is configured to select the context depending on a difference between the local activity and the number of transform coefficients.

27.如實施例25或26之設備,其經組配以在一個第一遍次中對該有效值旗標、該同位旗標及該一或多個大小程度旗標進行解碼,使得該旗標集合包含針對該 組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標,且基於該等相鄰變換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標而判定。 27. The device of embodiment 25 or 26, which is configured to decode the effective value flag, the parity flag, and the one or more magnitude flags in a first pass, so that the flag The target set contains the Set the effective value flag, the parity flag, and the one or more magnitude flags decoded by adjacent transform coefficients, and calculate the sum based on a summation of one of the adjacent transform coefficients Activity, the addends indicate a minimally assumed index or a minimally assumed reconstruction level for one of the adjacent transform coefficients, the index or reconstruction level based on decoding for the adjacent transform coefficients The effective value flag, the parity flag, and the one or more magnitude flags are determined.

28.如實施例1至27中任一項之設備,其經組配以藉由取決於該變換區塊內部之該預定變換係數之一係數位置選擇一上下文而使用上下文自適應性二進位算術解碼對一預定變換係數之一或多個大小程度旗標中之一第一大小程度旗標進行解碼。 28. The device of any one of embodiments 1 to 27, which is configured to use context-adaptive binary arithmetic by selecting a context depending on the position of a coefficient of the predetermined transform coefficient inside the transform block Decoding decodes a first size flag of one of one or more size flags of a predetermined transform coefficient.

29.如實施例1至28中任一項之設備,其經組配以藉由以下操作而使用上下文自適應性二進位算術解碼對一預定變換係數之第一大小程度旗標進行解碼:基於在圍繞該預定變換係數之一局部範本內之一組相鄰變換係數的預定變換係數之第一大小程度旗標之前經解碼的一旗標集合判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之重構層級不為零;且取決於該局部活動及/或變換係數之該數目選擇一上下文。 29. The device as in any one of embodiments 1 to 28, which is configured to use context-adaptive binary arithmetic decoding to decode the first magnitude flag of a predetermined transform coefficient by the following operations: based on A set of decoded flags before the first magnitude flag of a predetermined transform coefficient of a group of adjacent transform coefficients in a local template surrounding the predetermined transform coefficient determines a local activity, and/or determines a local activity around the predetermined transform A number of transform coefficients in the local template of coefficients, the reconstruction level of the predetermined transform coefficients is not zero; and a context is selected depending on the local activity and/or the number of transform coefficients.

30.如實施例29之設備,其經組配以取決於該局部活動與該變換區塊內部之變換係數之該數目之間的一差選擇該上下文。 30. The device of embodiment 29, which is configured to select the context depending on a difference between the local activity and the number of transform coefficients inside the transform block.

31.如實施例29或30之設備,其經組配以在一個第一遍次中對該有效值旗標、該同位旗標及該一或多個大小程度旗標進行解碼,使得該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標,且基於該等相鄰變換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標而判定。 31. The device of embodiment 29 or 30 is configured to decode the effective value flag, the parity flag, and the one or more magnitude flags in a first pass, so that the flag The flag set includes the effective value flag, the parity flag, and the one or more magnitude flags decoded for the set of adjacent transform coefficients, and is based on the addend of one of the adjacent transform coefficients The activity is calculated as a sum, and the addends indicate a minimally assumed index or a minimally assumed reconstruction level for one of the adjacent transform coefficients, the index or reconstruction level being based on the The effective value flag, the parity flag, and the one or more magnitude flags of adjacent transform coefficients are decoded.

32.如實施例1至31中任一項之設備,其經組配以使用一哥倫布-萊斯碼且使用一萊斯參數對一預定變換係數之餘數進行解碼,該萊斯參數取決於圍繞該預定變換係數之一局部範本內的一組相鄰變換係數中之各者之一加數的一總和,該加數取決於各別相鄰變換係數之一量化索引或一重構層級。 32. The device as in any one of embodiments 1 to 31, which is configured to use a Columbus-Rice code and use a Rice parameter to decode the remainder of a predetermined transform coefficient, the Rice parameter depends on the surrounding A sum of the addends of each of a group of adjacent transform coefficients in a local template of the predetermined transform coefficient, and the addend depends on a quantization index or a reconstruction level of the respective adjacent transform coefficients.

33.一種用於對變換係數之一區塊進行編碼的設備,其經組配以:a)在掃描該等變換係數之一或多個第一遍次中,使用上下文自適應性二進位算術編碼對當前變換係數之一有效值旗標(例如,sig_flag[k])、該等變換係數之一同位旗標(例如,par_flag[k])以及量化索引不為零之變換係數之一或多個大小程度旗標(例如,gt#_flag[k])進行編碼,該有效值旗標指示該當前變換係數之一量化索引(例如,level[k])是否為零,該同位旗標指 示該等變換係數之一同位;及b)在一或多個第三遍次中,使用等機率二進位算術編碼對該等變換係數之該量化索引之一餘數(例如,remainder[k])以及該等變換係數之該量化索引之一符號(例如,sign[k])進行編碼,該等變換係數之該一或多個大小程度旗標為正,該等變換係數之該量化索引不為零。 33. A device for encoding a block of transform coefficients, which is configured to: a) use context adaptive binary arithmetic in scanning one or more first passes of the transform coefficients Encoding one or more of the effective value flag of the current transform coefficient (for example, sig_flag[k]), the parity flag of one of the transform coefficients (for example, par_flag[k]), and the transform coefficient whose quantization index is not zero A size level flag (for example, gt#_flag[k]) is coded, and the effective value flag indicates whether one of the quantization indexes of the current transform coefficient (for example, level[k]) is zero, and the parity flag indicates Show that one of the transform coefficients is in the same position; and b) in one or more third passes, use equal-probability binary arithmetic coding for the remainder of the quantization index of the transform coefficients (for example, remainder[k]) And one of the quantization indexes of the transform coefficients (for example, sign[k]) is coded, the one or more magnitude flags of the transform coefficients are positive, and the quantization index of the transform coefficients is not zero.

34.如實施例33之設備,其經組配以在一個第一遍次中,針對一當前經掃描變換係數,a)使用上下文自適應性二進位算術編碼對該當前經掃描變換係數之有效值旗標進行解碼,且b)若該有效值旗標指示該當前經掃描變換係數之量化索引不為零,則針對該當前經掃描變換係數,使用上下文自適應性二進位算術編碼對該當前經掃描變換係數之同位旗標進行編碼。 34. The device of embodiment 33, which is configured to, in a first pass, for a current scanned transform coefficient, a) Use context adaptive binary arithmetic coding to be valid for the current scanned transform coefficient Value flag for decoding, and b) if the effective value flag indicates that the quantization index of the current scanned transform coefficient is not zero, then for the current scanned transform coefficient, use context-adaptive binary arithmetic coding for the current The parity flag of the scan transform coefficient is coded.

35.如實施例33或34之設備,其經組配以在該一或多個第二遍次中,針對一當前經掃描變換係數,若該當前經掃描變換係數之該量化索引不為零,則使用上下文自適應性二進位算術編碼對該當前經掃描變換係數之一第一大小程度旗標進行編碼。 35. The device of embodiment 33 or 34, which is configured to target a current scanned transform coefficient in the one or more second passes, if the quantization index of the current scanned transform coefficient is not zero , Then use context-adaptive binary arithmetic coding to encode the first magnitude flag of one of the current scanned transform coefficients.

36.如實施例35之設備,其經組配以使得針對一預定變換係數,可根據一總和獲得該量化索引,該總和之加數係由藉由以下形成:該預定變換係數之有效值旗標、該預定變換係數之同位旗標,及該預定變換係數之餘數與該第一大小程度旗標之一總和的兩倍。 36. The device of embodiment 35, which is configured so that for a predetermined transform coefficient, the quantization index can be obtained according to a sum, and the addend of the sum is formed by: the effective value flag of the predetermined transform coefficient The parity flag of the predetermined transform coefficient, and twice the sum of the remainder of the predetermined transform coefficient and one of the first magnitude flags.

37.如實施例36之設備,其經組配以在該一 或多個第二遍次中,針對一當前經掃描變換係數,若該當前經掃描變換係數之該第一大小程度旗標為正,則使用上下文自適應性二進位算術編碼對該當前經掃描變換係數之一第二大小程度旗標進行編碼。 37. As the device of embodiment 36, it is assembled in the one In the second or multiple second passes, for a current scanned transform coefficient, if the first magnitude flag of the current scanned transform coefficient is positive, then context adaptive binary arithmetic coding is used for the current scanned transform coefficient One of the transform coefficients is encoded with a second magnitude flag.

38.如實施例37之設備,其經組配以針對一預定變換係數,可根據一總和獲得該量化索引,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標、該預定變換係數之該同位旗標、該預定變換係數之該第一大小程度旗標,及該預定變換係數之該餘數與該第二大小程度旗標之一總和的兩倍。 38. The device of embodiment 37, which is configured for a predetermined transform coefficient to obtain the quantization index according to a sum, and the addend of the sum is formed by: the effective value flag of the predetermined transform coefficient , The parity flag of the predetermined transform coefficient, the first degree flag of the predetermined transform coefficient, and twice the sum of the remainder of the predetermined transform coefficient and the second degree flag.

39.如實施例33至38中任一項之設備,其經組配以在該一或多個第一遍次中之各者之後執行該一或多個第二遍次中之各者。 39. The device of any one of embodiments 33 to 38, which is configured to perform each of the one or more second passes after each of the one or more first passes.

40.如前述實施例中任一項之設備,其中一變換區塊之變換係數被分割成子區塊,且該等變換係數經逐子區塊解碼,其中遍及一子區塊之掃描位置的所有遍次係在下一子區塊之第一遍次經解碼之前經解碼。 40. The device as in any one of the preceding embodiments, wherein the transform coefficients of a transform block are divided into sub-blocks, and the transform coefficients are decoded sub-block by sub-block, wherein all the scan positions of a sub-block are The pass is decoded before the first pass of the next sub-block is decoded.

41.如實施例33至40中任一項之設備,其經組配以藉由以下操作量化量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於該各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多個重構層級集合選擇一重構層級集合,及將該各別變換係數量化至該重構層級集合之一個層級上,該層級由該各別變換係數之該量化索引索引化。 41. The device of any one of embodiments 33 to 40, which is configured to quantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depending on the order of scanning before the individual For the parity of the quantization index of the transform coefficient of the transform coefficient, a reconstruction level set is selected from a plurality of reconstruction level sets for the respective transform coefficient, and the respective transform coefficient is quantized to a level of the reconstruction level set, The level is indexed by the quantization index of the respective transform coefficient.

42.如實施例47之設備,其經組配以針對該各別變換係數,藉由以下操作使用一狀態轉換執行自多個重構層級集合選擇該重構層級集合:唯一地基於該狀態轉換針對該各別變換係數假定之一狀態自該等多個重構層級集合選擇該重構層級集合,且取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態。 42. The device of embodiment 47, which is configured to select the reconstruction level set from a plurality of reconstruction level sets using a state transition for the respective transformation coefficient by the following operation: uniquely based on the state transition For the respective transform coefficient, assume a state to select the reconstruction level set from the plurality of reconstruction level sets, and depend on the parity of the quantization index of the respective transform coefficient, for the latter in the scan order A transformation coefficient updates the state of the state transition.

43.如實施例42之設備,其經組配以沿該掃描次序執行該一或多個第一遍次及該一或多個第二遍次。 43. The device of embodiment 42, which is configured to perform the one or more first passes and the one or more second passes along the scanning order.

44.如實施例42或43之設備,其經組配以執行四個相異狀態之間的狀態轉換轉換。 44. The device of embodiment 42 or 43 is configured to perform state transitions between four different states.

45.如實施例40至43中任一項之設備,其經組配以藉助於一預定量化步長使該等多個重構層級集合參數化且自資料串流導出關於該預定量化步長之資訊。 45. The device of any one of embodiments 40 to 43, which is configured to parameterize the multiple reconstruction level sets by means of a predetermined quantization step size and derive information about the predetermined quantization step size from the data stream的信息。 Information.

46.如實施例40至45中任一項之設備,其中該等多個重構層級集合中之各者由一預定量化步長之倍數組成,該預定量化步長對於該等多個重構層級集合係恆定的。 46. The device of any one of embodiments 40 to 45, wherein each of the plurality of reconstruction level sets is composed of a multiple of a predetermined quantization step, and the predetermined quantization step is for the plurality of reconstructions The set of levels is constant.

47.如實施例40至46中任一項之設備,其中該等多個重構層級集合中之重構層級集合之數目為二,且該等多個重構層級集合包含:一第一重構層級集合,其包含零及一預定量化步長之偶數倍,及一第二重構層級集合,其包含零及該預定量化步長之奇數倍。 47. The device of any one of embodiments 40 to 46, wherein the number of reconstruction level sets in the plurality of reconstruction level sets is two, and the plurality of reconstruction level sets includes: a first layer The structure level set includes zero and an even multiple of a predetermined quantization step, and a second reconstruction level set includes zero and an odd multiple of the predetermined quantization step.

48.如實施例47之設備,其經組配以針對狀 態值0及1選擇該第一重構層級集合,且針對狀態值2及3選擇該第二重構層級集合。 48. The device as in Example 47, which is equipped with a targeted state The state values 0 and 1 select the first reconstruction level set, and for the state values 2 and 3, the second reconstruction level set is selected.

49.如實施例33至48中任一項之設備,其經組配以藉由取決於該變換區塊內部之該預定變換係數之一係數位置選擇一上下文而使用上下文自適應性二進位算術編碼對一預定變換係數之有效值旗標進行編碼。 49. The device of any one of embodiments 33 to 48, which is configured to use context-adaptive binary arithmetic by selecting a context depending on the position of a coefficient of the predetermined transform coefficient inside the transform block The encoding encodes the effective value flag of a predetermined transform coefficient.

50.如實施例33至49中任一項之設備,其經組配以藉由以下操作而使用上下文自適應性二進位算術編碼對一預定變換係數之有效值旗標進行編碼:基於在圍繞該預定變換係數之一局部範本內之一組相鄰變換係數之預定變換係數之有效值旗標之前經解碼的一旗標集合判定一局部活動,且取決於該局部活動選擇一上下文。 50. The device as in any one of embodiments 33 to 49, which is configured to use context-adaptive binary arithmetic coding to encode the effective value flag of a predetermined transform coefficient by the following operation: A set of decoded flags before the effective value flag of a predetermined transform coefficient of a group of adjacent transform coefficients in a local template of the predetermined transform coefficient determines a local activity, and a context is selected depending on the local activity.

51.如實施例50之設備,其經組配以在一個第一遍次中對該有效值旗標、該同位旗標及該一或多個大小程度旗標進行編碼,使得該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標,且基於該等相鄰變換係數中之各者之一加數的一總和而計算該局部活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標而判定。 51. The device of embodiment 50 is configured to encode the effective value flag, the parity flag, and the one or more magnitude flags in a first pass, so that the flag set Contains the effective value flag, the parity flag, and the one or more magnitude flags decoded for the set of adjacent transform coefficients, and is based on a sum of one of the addends of each of the adjacent transform coefficients To calculate the local activity, the addends indicate a minimally assumed index or a minimally assumed reconstruction level for one of the adjacent transformation coefficients, and the index or reconstruction level is based on the corresponding Determine the effective value flag, the parity flag, and the one or more magnitude flags of the adjacent transform coefficient decoding.

52.如實施例33至51中任一項之設備,其經組配以:a)針對該各別變換係數,藉由以下操作而使用 一狀態轉換執行自多個重構層級集合選擇該重構層級集合:唯一地基於該狀態轉換針對該各別變換係數假定之一狀態自該等多個重構層級集合選擇該重構層級集合,取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態;b)沿該掃描次序執行該一或多個第一遍次;及c)藉由取決於該狀態轉換針對預定變換係數(13')假定之狀態選擇一上下文而使用上下文自適應性二進位算術編碼對一預定變換係數之有效值旗標進行編碼。 52. The device of any one of embodiments 33 to 51, which is configured with: a) For the respective transform coefficient, use the following operations A state transition is performed to select the reconstruction level set from multiple reconstruction level sets: the reconstruction level set is selected from the multiple reconstruction level sets uniquely based on the state transition assuming a state for the respective transformation coefficients, Depending on the parity of the quantization index of the respective transform coefficient, update the state of the state transition for a transform coefficient subsequent to the scan order; b) perform the one or more first passes along the scan order And c) by using context adaptive binary arithmetic coding to encode the effective value flag of a predetermined transform coefficient by selecting a context depending on the state of the state transition assumed for the predetermined transform coefficient (13').

53.如實施例52之設備,其經組配以藉由取決於該狀態選擇包含該上下文之一上下文集合而使用上下文自適應性熵編碼對一預定變換係數之有效值旗標進行編碼,且取決於圍繞該預定變換係數之一局部活動或該預定變換係數之一係數位置自該上下文集合選擇該上下文。 53. The device of embodiment 52, which is configured to use context-adaptive entropy coding to encode the effective value flag of a predetermined transform coefficient by selecting a context set that includes the context depending on the state, and The context is selected from the set of contexts depending on the local activity around one of the predetermined transform coefficients or the position of one of the predetermined transform coefficients.

54.如實施例53之設備,其中針對狀態0及1選擇一第一上下文集合,針對狀態2選擇一第二上下文集合,且針對狀態3選擇一第三上下文集合。 54. The device of embodiment 53, wherein a first context set is selected for states 0 and 1, a second context set is selected for state 2, and a third context set is selected for state 3.

55.如實施例33至54中任一項之設備,其經組配以:a)藉由以下操作量化量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於該各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多個重構層級集合選擇一重構層級集合,且將該各別變換係數解量化至該重構層級集合之一個層級上,該層級由該各別變換係數之該量化索引索引化;b)沿該掃描次序執 行該一或多個第一遍次;及c)藉由取決於針對該預定變換係數(13')選擇之重構層級集合(48)選擇一上下文而使用上下文自適應性二進位算術編碼對一預定變換係數之有效值旗標進行編碼。 55. The device of any one of embodiments 33 to 54, which is configured with: a) quantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depends on the quantization index along a scan order For the parity of the quantization index of the transform coefficient of the respective transform coefficient, a reconstruction level set is selected from a plurality of reconstruction level sets for the respective transform coefficient, and the respective transform coefficient is dequantized to the reconstruction level set On a level, the level is indexed by the quantization index of the respective transform coefficient; b) execute along the scan order Perform the one or more first passes; and c) use a context-adaptive binary arithmetic coding pair by selecting a context depending on the reconstruction level set (48) selected for the predetermined transform coefficient (13') The effective value flag of a predetermined transform coefficient is coded.

56.如實施例33至55中任一項之設備,其經組配以藉由取決於該變換區塊內部之該預定變換係數之一係數位置選擇一上下文而使用上下文自適應性二進位算術編碼對一預定變換係數之同位旗標進行編碼。 56. The device of any one of embodiments 33 to 55, which is configured to use context-adaptive binary arithmetic by selecting a context depending on the position of a coefficient of the predetermined transform coefficient inside the transform block The encoding encodes the parity flag of a predetermined transform coefficient.

57.如實施例33至56中任一項之設備,其經組配以藉由以下操作而使用上下文自適應性二進位算術編碼對一預定變換係數之同位旗標進行編碼:基於在圍繞該預定變換係數之一局部範本內之一組相鄰變換係數的預定變換係數之同位旗標之前經解碼的一旗標集合判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之重構層級不為零;且取決於該局部活動及/或變換係數之該數目選擇一上下文。 57. The device as in any one of embodiments 33 to 56, which is configured to use context-adaptive binary arithmetic coding to encode the parity flag of a predetermined transform coefficient by the following operation: A set of flags decoded before the parity flag of a predetermined transform coefficient of a set of adjacent transform coefficients in a local template of a predetermined transform coefficient determines a local activity, and/or determines a local activity around the predetermined transform coefficient in the local template For a number of transform coefficients, the reconstruction level of the predetermined transform coefficients is not zero; and a context is selected depending on the local activity and/or the number of transform coefficients.

58.如實施例57之設備,其經組配以取決於該局部活動與變換係數之該數目之間的一差選擇該上下文。 58. The device of embodiment 57, which is configured to select the context depending on a difference between the local activity and the number of transform coefficients.

59.如實施例57或58之設備,其經組配以在一個第一遍次中對該有效值旗標、該同位旗標及該一或多個大小程度旗標進行編碼,使得該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一 或多個大小程度旗標,且基於該等相鄰變換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標而判定。 59. The device of embodiment 57 or 58, which is configured to encode the effective value flag, the parity flag, and the one or more magnitude flags in a first pass, so that the flag The flag set includes the effective value flag, the parity flag, and the one decoded for the group of adjacent transform coefficients. Or multiple magnitude flags, and the activity is calculated based on a sum of the addends of each of the adjacent transform coefficients, the addends indicating the minimum for one of the adjacent transform coefficients A hypothetical index or a minimally hypothetical reconstruction level based on the effective value flag, the parity flag, and the one or more magnitude flags decoded for the adjacent transform coefficients Standard and judgment.

60.如實施例33至59中任一項之設備,其經組配以藉由取決於該變換區塊內部之該預定變換係數之一係數位置選擇一上下文而使用上下文自適應性二進位算術編碼對一預定變換係數之一或多個大小程度旗標中之一第一大小程度旗標進行編碼。 60. The device of any one of embodiments 33 to 59, which is configured to use context-adaptive binary arithmetic by selecting a context depending on the position of a coefficient of the predetermined transform coefficient inside the transform block The encoding encodes the first size flag of one of one or more size flags of a predetermined transform coefficient.

61.如實施例33至60中任一項之設備,其經組配以藉由以下操作而使用上下文自適應性二進位算術編碼對一預定變換係數之第一大小程度旗標進行編碼:基於在圍繞該預定變換係數之一局部範本內之一組相鄰變換係數的預定變換係數之第一大小程度旗標之前經解碼的一旗標集合判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之重構層級不為零;且取決於該局部活動及/或變換係數之該數目選擇一上下文。 61. The device of any one of embodiments 33 to 60, which is configured to use context-adaptive binary arithmetic coding to encode the first magnitude flag of a predetermined transform coefficient by the following operations: based on A set of decoded flags before the first magnitude flag of a predetermined transform coefficient of a group of adjacent transform coefficients in a local template surrounding the predetermined transform coefficient determines a local activity, and/or determines a local activity around the predetermined transform A number of transform coefficients in the local template of coefficients, the reconstruction level of the predetermined transform coefficients is not zero; and a context is selected depending on the local activity and/or the number of transform coefficients.

62.如實施例61之設備,其經組配以取決於該局部活動與變換係數之該數目之間的一差選擇該上下文。 62. The device of embodiment 61, which is configured to select the context depending on a difference between the local activity and the number of transform coefficients.

63.如實施例61或62之設備,其經組配以 在一個第一遍次中依序地對該有效值旗標、該同位旗標及該一或多個大小程度旗標進行編碼,使得該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標,且基於該等相鄰變換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標而判定。 63. Such as the equipment of embodiment 61 or 62, which is equipped with In a first pass, the effective value flag, the parity flag, and the one or more magnitude flags are sequentially encoded, so that the flag set includes the decoded set of adjacent transform coefficients The effective value flag, the parity flag, and the one or more magnitude flags are calculated based on a sum of the addends of each of the adjacent transformation coefficients, and the addends are indicated by A minimally assumed index or a minimally assumed reconstruction level at one of the adjacent transform coefficients, the index or reconstruction level being based on the effective value flag, the The parity flag and the one or more size and degree flags are determined.

64.如實施例33至63中任一項之設備,其經組配以使用一哥倫布-萊斯碼且使用一萊斯參數對一預定變換係數之餘數進行編碼,該萊斯參數取決於圍繞該預定變換係數之一局部範本內的一組相鄰變換係數中之各者之一加數的一總和,該加數取決於各別相鄰變換係數之一量化索引或一重構層級。 64. The device of any one of embodiments 33 to 63, which is configured to use a Columbus-Rice code and use a Rice parameter to encode the remainder of a predetermined transform coefficient, the Rice parameter depends on the surrounding A sum of the addends of each of a group of adjacent transform coefficients in a local template of the predetermined transform coefficient, and the addend depends on a quantization index or a reconstruction level of the respective adjacent transform coefficients.

65.一種方法,其由如以上實施例中任一項之設備執行。 65. A method which is executed by a device as in any one of the above embodiments.

66.一種電腦程式,其用於發指令給一電腦,該電腦執行該電腦程式以執行如實施例65之方法。 66. A computer program for sending instructions to a computer, and the computer executes the computer program to perform the method in embodiment 65.

67.一種資料串流,其係由如實施例33至64中任一項之設備產生。 67. A data stream generated by the device as in any one of Embodiments 33 to 64.

儘管已在設備之上下文中描述一些態樣,但顯然,此等態樣亦表示對應方法之描述,其中區塊或裝置對應於方法步驟或方法步驟之特徵。類似地,方法步驟之 上下文中所描述的態樣亦表示對應區塊或項目或對應設備之特徵的描述。可由(或使用)硬體設備(比如微處理器、可規劃電腦或電子電路)執行方法步驟中之一些或全部。在一些實施例中,可由此設備執行最重要之方法步驟中之一或多者。 Although some aspects have been described in the context of the device, it is obvious that these aspects also represent the description of the corresponding method, where the block or device corresponds to the method step or the feature of the method step. Similarly, one of the method steps The aspect described in the context also represents the description of the characteristics of the corresponding block or item or the corresponding device. Some or all of the method steps can be executed by (or using) hardware devices (such as microprocessors, programmable computers, or electronic circuits). In some embodiments, one or more of the most important method steps can be executed by this device.

本發明的經編碼資料串流可儲存於數位儲存媒體上或可在諸如無線傳輸媒體之傳輸媒體或諸如網際網路之有線傳輸媒體上傳輸。 The encoded data stream of the present invention can be stored on a digital storage medium or can be transmitted on a transmission medium such as a wireless transmission medium or a wired transmission medium such as the Internet.

取決於某些實施要求,本發明之實施例可以硬體或以軟體實施。可使用例如軟碟、DVD、藍光、CD、ROM、PROM、EPROM、EEPROM或快閃記憶體之數位儲存媒體來執行實施,其上儲存有與可規劃電腦系統協作(或能夠協作)之電子可讀控制信號,使得執行各別方法之。因此,數位儲存媒體可為電腦可讀的。 Depending on certain implementation requirements, the embodiments of the present invention can be implemented in hardware or in software. It can be implemented using digital storage media such as floppy disks, DVDs, Blu-rays, CDs, ROMs, PROM, EPROM, EEPROM or flash memory, on which are stored electronic data that can cooperate with (or can cooperate) with programmable computer systems. Read the control signal to execute each method. Therefore, the digital storage medium can be computer readable.

根據本發明之一些實施例包含具有電子可讀控制信號之資料載體,該等控制信號能夠與可規劃電腦系統協作,使得執行本文中所描述之方法中之一者。 Some embodiments according to the invention comprise a data carrier with electronically readable control signals that can cooperate with a programmable computer system to perform one of the methods described herein.

大體而言,本發明之實施例可實施為具有程式碼之電腦程式產品,當電腦程式產品運行於電腦上時,程式碼操作性地用於執行該等方法中之一者。程式碼可例如儲存於機器可讀載體上。 Generally speaking, the embodiments of the present invention can be implemented as a computer program product with a program code. When the computer program product runs on a computer, the program code is operatively used to execute one of these methods. The program code can be stored on a machine-readable carrier, for example.

其他實施例包含儲存於機器可讀載體上,用於執行本文中所描述之方法中的一者的電腦程式。 Other embodiments include a computer program stored on a machine-readable carrier for executing one of the methods described herein.

換言之,本發明方法之實施例因此為電腦程 式,其具有用於在電腦程式於電腦上執行時執行本文中所描述之方法中之一者的程式碼。 In other words, the embodiment of the method of the present invention is therefore a computer program A formula, which has code for executing one of the methods described in this article when the computer program is executed on the computer.

因此,本發明方法之另一實施例為資料載體(或數位儲存媒體,或電腦可讀媒體),其包含記錄於其上的用於執行本文中所描述之方法中之一者的電腦程式。資料載體、數位儲存媒體或所記錄媒體通常係有形的及/或非暫時性的。 Therefore, another embodiment of the method of the present invention is a data carrier (or a digital storage medium, or a computer-readable medium), which includes a computer program recorded on it for performing one of the methods described herein. Data carriers, digital storage media, or recorded media are usually tangible and/or non-transitory.

因此,本發明之方法之另一實施例為表示用於執行本文中所描述之方法中的一者之電腦程式之資料串流或信號序列。資料串流或信號序列可例如經組配以經由資料通訊連接,例如經由網際網路而傳送。 Therefore, another embodiment of the method of the present invention represents a data stream or signal sequence of a computer program used to execute one of the methods described herein. The data stream or signal sequence may for example be configured to be connected via data communication, for example via the Internet.

另一實施例包含處理構件,例如經組配或經調適以執行本文中所描述之方法中之一者的電腦或可規劃邏輯裝置。 Another embodiment includes processing components, such as a computer or programmable logic device that is configured or adapted to perform one of the methods described herein.

另一實施例包含上面安裝有用於執行本文中所描述之方法中之一者的電腦程式之電腦。 Another embodiment includes a computer on which a computer program for executing one of the methods described herein is installed.

根據本發明之另一實施例包含經組配以(例如,電子地或光學地)將用於執行本文中所描述之方法中之一者的電腦程式傳送至接收器的裝置或系統。接收器可例如為電腦、行動裝置、記憶體裝置或類似者。設備或系統可例如包含用於將電腦程式傳送至接收器之檔案伺服器。 Another embodiment according to the present invention includes a device or system configured to (for example, electronically or optically) transmit a computer program for performing one of the methods described herein to a receiver. The receiver can be, for example, a computer, a mobile device, a memory device, or the like. The device or system may, for example, include a file server for sending computer programs to the receiver.

在一些實施例中,可規劃邏輯裝置(例如,場可規劃閘陣列)可用以執行本文中所描述之方法的功能性中之一些或全部。在一些實施例中,場可規劃閘陣列可與 微處理器協作,以便執行本文中所描述之方法中之一者。通常,該等方法較佳地由任何硬體設備來執行。 In some embodiments, a programmable logic device (eg, a field programmable gate array) can be used to perform some or all of the functionality of the methods described herein. In some embodiments, the field programmable gate array can be combined with The microprocessors cooperate to perform one of the methods described herein. Generally, these methods are preferably executed by any hardware device.

本文中所描述之設備可使用硬體設備或使用電腦或使用硬體設備與電腦之組合來實施。 The devices described in this article can be implemented using hardware devices, computers, or a combination of hardware devices and computers.

本文中所描述之設備或本文中所描述之設備的任何組件可至少部分地以硬體及/或以軟體來實施。 The device described herein or any component of the device described herein may be implemented at least partially in hardware and/or in software.

本文中所描述之方法可使用硬體設備或使用電腦或使用硬體設備與電腦的組合來進行。 The method described in this article can be performed using hardware equipment or using a computer or a combination of hardware equipment and a computer.

本文中所描述之方法或本文中所描述之設備的任何組件可至少部分地由硬體及/或由軟體來執行。 The method described herein or any component of the device described herein may be executed at least in part by hardware and/or software.

上述實施例僅說明本發明之原理。應理解,對本文中所描述之配置及細節的修改及變化將對本領域熟習此項技術者顯而易見。因此,意圖為僅受到接下來之申請專利範圍之範疇限制,而不受到藉由本文中之實施例之描述解釋所呈現的特定細節限制。 The above embodiments only illustrate the principle of the present invention. It should be understood that modifications and changes to the configuration and details described herein will be obvious to those skilled in the art. Therefore, it is intended to be limited only by the scope of the following patent applications, and not limited by the specific details presented by the description and explanation of the embodiments herein.

參考文獻 references

[1] ITU-T and ISO|IEC, “Advanced video coding for audiovisual services,” ITU-T Roc. H.264 and ISO|IEC 14406-10 (AVC), 2003. [1] ITU-T and ISO|IEC, "Advanced video coding for audiovisual services," ITU-T Roc. H.264 and ISO|IEC 14406-10 (AVC), 2003.

[2] ITU-T and ISO|IEC, “High efficiency video coding,” ITU-T Rec. H.265 and ISO|IEC 23008-10 (HEVC), 2013. [2] ITU-T and ISO|IEC, "High efficiency video coding," ITU-T Rec. H.265 and ISO|IEC 23008-10 (HEVC), 2013.

[3] Abrecht, et. al., “Description of SDR, HDR, and 360° video coding technology proposal by Fraunhofer HHI,” Joint Video Experts Team (JVET), doc. JVET-J0014, Apr. 2018. [3] Abrecht, et. al., “Description of SDR, HDR, and 360° video coding technology proposal by Fraunhofer HHI,” Joint Video Experts Team (JVET), doc. JVET-J0014, Apr. 2018.

Claims (82)

一種用於對變換係數之一區塊進行解碼的設備,該設備經組配以在掃描該等變換係數之一或多個第一遍次中,使用上下文自適應性熵解碼對該等變換係數之一有效值旗標進行解碼,該有效值旗標指示該等變換係數之一量化索引是否為零,對該等變換係數之一同位旗標進行解碼,該同位旗標指示該等變換係數之一同位,在包括或不包括該一或多個第一遍次中之一或多者的掃描該等變換係數之一或多個第二遍次中,使用上下文自適應性熵解碼對該量化索引不為零之變換係數之一或多個大小程度旗標進行解碼,在一或多個第三遍次中,使用等機率熵解碼對以下各者進行解碼,該等變換係數之該量化索引之一餘數,該等變換係數之該一或多個大小程度旗標為正,以及該等變換係數之該量化索引之一符號,該等變換係數之該量化索引不為零。 A device for decoding a block of transform coefficients. The device is configured to use context-adaptive entropy decoding to decode the transform coefficients in one or more first passes of the transform coefficients. A valid value flag is decoded, the valid value flag indicates whether a quantization index of the transform coefficients is zero, and the parity flag of one of the transform coefficients is decoded, and the parity flag indicates the value of the transform coefficients. Together, in one or more second passes of scanning the transform coefficients including or not including one or more of the one or more first passes, the quantization is performed using context-adaptive entropy decoding The transform coefficients whose index is not zero are decoded with one or more magnitude flags. In one or more third passes, the following are decoded using equal-probability entropy decoding. The quantization index of the transform coefficients A remainder, the one or more magnitude flags of the transform coefficients are positive, and a sign of the quantization index of the transform coefficients, the quantization index of the transform coefficients is not zero. 如請求項1之設備,其經組配以在一個第一遍次中,針對一當前經掃描變換係數,使用上下文自適應性熵解碼對該當前經掃描變換係數之該有效值旗標進行解碼,且若該有效值旗標指示該當前經掃描變換係數之 該量化索引不為零,則針對該當前經掃描變換係數,使用上下文自適應性熵解碼對該當前經掃描變換係數之該同位旗標進行解碼。 For example, the device of claim 1, which is configured to decode the effective value flag of the current scanned transform coefficient using context-adaptive entropy decoding for a current scanned transform coefficient in a first pass , And if the effective value flag indicates the current scanned transform coefficient If the quantization index is not zero, then for the current scanned transform coefficient, use context adaptive entropy decoding to decode the parity flag of the current scanned transform coefficient. 如請求項1之設備,其經組配以在該一或多個第一遍次中之一者中,針對一當前經掃描變換係數,使用上下文自適應性熵解碼對該當前經掃描變換係數之該同位旗標進行解碼,且在該一或多個第一遍次中之另一者中,針對一當前經掃描變換係數,若該同位旗標指示該當前經掃描變換係數之該量化索引為偶數,則針對該當前經掃描變換係數,使用上下文自適應性熵解碼對該當前經掃描變換係數之該有效值旗標進行解碼。 Such as the device of claim 1, which is configured to use context-adaptive entropy decoding for a current scanned transform coefficient in one of the one or more first passes The parity flag is decoded, and in the other of the one or more first passes, for a current scanned transform coefficient, if the parity flag indicates the quantization index of the current scanned transform coefficient If it is an even number, for the current scanned transform coefficient, use context adaptive entropy decoding to decode the effective value flag of the current scanned transform coefficient. 如請求項1之設備,其經組配以在該一或多個第二遍次中,針對一當前經掃描變換係數,若該當前經掃描變換係數之該量化索引不為零,則使用上下文自適應性熵解碼對該當前經掃描變換係數之一第一大小程度旗標進行解碼。 For example, the device of claim 1, which is configured to, in the one or more second passes, for a current scanned transform coefficient, if the quantization index of the current scanned transform coefficient is not zero, use the context The adaptive entropy decoding decodes the first magnitude flag of one of the currently scanned transform coefficients. 如請求項4之設備,其經組配以針對一預定變換係數,根據一總和計算該量化索引,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標, 該預定變換係數之該同位旗標,該預定變換係數之該餘數與該第一大小程度旗標之一總和的兩倍。 For example, the device of claim 4 is configured to calculate the quantization index based on a sum for a predetermined transform coefficient, and the addend of the sum is formed by the following: the effective value flag of the predetermined transform coefficient, The parity flag of the predetermined transform coefficient, the remainder of the predetermined transform coefficient and the sum of one of the first magnitude flags are twice the sum. 如請求項4之設備,其經組配以在該一或多個第二遍次中,針對一當前經掃描變換係數,若該當前經掃描變換係數之該第一大小程度旗標為正,則使用上下文自適應性熵解碼對該當前經掃描變換係數之一第二大小程度旗標進行解碼。 For example, the device of claim 4, which is configured for a current scanned transform coefficient in the one or more second passes, if the first magnitude flag of the current scanned transform coefficient is positive, Then use context adaptive entropy decoding to decode the second magnitude flag of one of the currently scanned transform coefficients. 如請求項6之設備,其經組配以針對一預定變換係數,根據一總和計算該量化索引之絕對值,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標,該預定變換係數之該同位旗標,該預定變換係數之該餘數、該第一大小程度旗標與該第二大小程度旗標之一總和的兩倍。 For example, the device of claim 6, which is configured to calculate the absolute value of the quantization index based on a sum for a predetermined transformation coefficient, and the addend of the sum is formed by the following: the effective value flag of the predetermined transformation coefficient , The parity flag of the predetermined transform coefficient, the remainder of the predetermined transform coefficient, the first magnitude flag, and the second magnitude flag are twice the sum of one. 如請求項6之設備,其經組配以針對一預定變換係數,根據一總和計算該量化索引之絕對值,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標,該預定變換係數之該同位旗標,該預定變換係數之該第一大小程度旗標,以及該預定變換係數之該餘數與該第二大小程度旗標之一總和的兩倍。 For example, the device of claim 6, which is configured to calculate the absolute value of the quantization index based on a sum for a predetermined transformation coefficient, and the addend of the sum is formed by the following: the effective value flag of the predetermined transformation coefficient , The parity flag of the predetermined transform coefficient, the first degree flag of the predetermined transform coefficient, and the remainder of the predetermined transform coefficient twice the sum of the second degree flag. 如請求項6之設備,其經組配以在單獨第二遍次中執行該第一大小程度旗標及該第二大小程度旗標之該解碼,及/或其中該一或多個第二遍次不包括該一或多個第一遍次。 For example, the device of claim 6, which is configured to perform the decoding of the first magnitude flag and the second magnitude flag in a single second pass, and/or the one or more second The pass does not include the one or more first passes. 如請求項1之設備,其經組配以在該一或多個第一遍次中之各者之後執行該一或多個第二遍次中之各者,且在該一或多個第二遍次中之各者之後執行該一或多個第三遍次中之各者。 For example, the device of claim 1, which is configured to execute each of the one or more second passes after each of the one or more first passes, and in the one or more first passes Each of the second passes is followed by each of the one or more third passes. 如請求項1之設備,其中該一或多個第一遍次包括於該一或多個第二遍次中。 Such as the device of claim 1, wherein the one or more first passes are included in the one or more second passes. 如請求項11之設備,其中該等變換係數之該有效值旗標、該同位旗標及該一或多個大小程度旗標在一個遍次中經解碼。 Such as the device of claim 11, wherein the effective value flag, the parity flag, and the one or more magnitude flags of the transform coefficients are decoded in one pass. 如請求項1之設備,其經組配以在該一或多個第一遍次中之一者中,針對一當前經掃描變換係數,使用上下文自適應性熵解碼對該當前經掃描變換係數之該有效值旗標進行解碼,在該一個第一遍次之後,在該一或多個第二遍次中,使用上下文自適應性熵解碼對該等變換係數之多於一個大小程度旗標之一序列進行解碼,在該一或多個第二遍次之後,在該一或多個第一遍次 中之另一者中,使用等機率熵解碼對該等變換係數之該同位旗標進行解碼,該等變換係數之該量化索引不為零。 Such as the device of claim 1, which is configured to use context-adaptive entropy decoding for a current scanned transform coefficient in one of the one or more first passes The effective value flag is decoded, and after the first pass, in the one or more second passes, context adaptive entropy decoding is used to flag more than one magnitude of the transform coefficients A sequence is decoded, after the one or more second passes, after the one or more first passes In the other of them, equal-probability entropy decoding is used to decode the parity flags of the transform coefficients, and the quantization index of the transform coefficients is not zero. 如請求項1之設備,其中該區塊之該變換係數被分割成子區塊,且該等變換係數經逐子區塊解碼,以至於一子區塊之各變換係數係在下一子區塊之該等變換係數之前經解碼。 Such as the device of claim 1, wherein the transform coefficients of the block are divided into sub-blocks, and the transform coefficients are decoded sub-block by sub-block, so that the transform coefficients of one sub-block are in the next sub-block The transform coefficients have been decoded before. 如請求項1之設備,其中二進位算術解碼用作熵解碼,且該餘數係藉由解碼該等變換係數之該量化索引的一絕對值之一二進位化的位元子而解碼。 Such as the device of claim 1, wherein binary arithmetic decoding is used for entropy decoding, and the remainder is decoded by decoding one of the binary bits of an absolute value of the quantization index of the transform coefficients. 如請求項1之設備,其經組配以藉由以下操作解量化該量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多個重構層級集合選擇一重構層級集合,以及將該各別變換係數解量化至該重構層級集合之一個層級上,該層級由該各別變換係數之該量化索引來索引化。 For example, the device of claim 1, which is configured to dequantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depends on the quantization of the transform coefficients that precede the individual transform coefficients along a scanning order For index parity, select a reconstruction level set from multiple reconstruction level sets for the individual transform coefficient, and dequantize the individual transform coefficient to a level of the reconstruction level set, and the level is determined by the individual transform coefficient. The quantization index of the transform coefficient is indexed. 如請求項16之設備,其經組配以藉由以下操作而使用一狀態轉換來執行該針對該各別變換係數自多個重構層級集合選擇該重構層級集合之操作:唯一地基於該狀態轉換針對該各別變換係數假 定之一狀態自該等多個重構層級集合選擇該重構層級集合,取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態。 For example, the device of claim 16, which is configured to use a state transition to perform the operation of selecting the reconstruction level set from a plurality of reconstruction level sets for the respective transform coefficient by the following operation: uniquely based on the The state transition is false for the individual transform coefficient Determine a state to select the reconstruction level set from the plurality of reconstruction level sets, depending on the parity of the quantization index of the respective transform coefficient, and update the state transition for the subsequent transform coefficient in the scan order The state. 如請求項17之設備,其經組配以沿該掃描次序而執行該一或多個第一遍次,及/或該一或多個第二遍次,及/或該一或多個第三遍次。 For example, the device of claim 17, which is configured to execute the one or more first passes, and/or the one or more second passes, and/or the one or more first passes along the scanning order Three times. 如請求項17之設備,其經組配以執行四個相異狀態之間的狀態轉換轉換。 For example, the device of claim 17, which is configured to perform state transitions between four different states. 如請求項16之設備,其經組配以藉助於一預定量化步長使該等多個重構層級集合參數化且自資料串流導出關於該預定量化步長之資訊。 For example, the device of claim 16, which is configured to parameterize the multiple reconstruction level sets by means of a predetermined quantization step size and derive information about the predetermined quantization step size from the data stream. 如請求項17之設備,其中該等多個重構層級集合中之各者由一預定量化步長之倍數組成,該預定量化步長對於該等多個重構層級集合係恆定的。 Such as the device of claim 17, wherein each of the multiple reconstruction level sets is composed of a multiple of a predetermined quantization step size, and the predetermined quantization step size is constant for the multiple reconstruction level sets. 如請求項16之設備,其中該等多個重構層級集合中之重構層級集合之數目為二,且該等多個重構層級集合包含一第一重構層級集合,其包含零及一預定量化步長之偶數倍,以及一第二重構層級集合,其包含零及該預定量化步長之 奇數倍。 Such as the device of claim 16, wherein the number of reconstruction level sets in the multiple reconstruction level sets is two, and the multiple reconstruction level sets include a first reconstruction level set, which includes zero and one An even multiple of the predetermined quantization step size, and a second reconstruction level set, which includes zero and the predetermined quantization step size Odd multiples. 如請求項22之設備,其經組配以針對狀態值0及1選擇該第一重構層級集合,且針對狀態值2及3選擇該第二重構層級集合。 For example, the device of request 22 is configured to select the first reconstruction level set for state values 0 and 1, and select the second reconstruction level set for state values 2 and 3. 如請求項1之設備,其經組配以藉由取決於下者選擇一上下文而使用上下文自適應性熵解碼對一預定變換係數之該有效值旗標進行解碼:變換區塊內部之該預定變換係數之一係數位置。 For example, the device of claim 1, which is configured to decode the effective value flag of a predetermined transform coefficient by using context-adaptive entropy decoding by selecting a context depending on the following: the predetermined inside the transform block The position of one of the transform coefficients. 如請求項1之設備,其經組配以藉由以下操作,使用上下文自適應性熵解碼對一預定變換係數之該有效值旗標進行解碼:基於在圍繞該預定變換係數之一局部範本內的一組相鄰變換係數之該預定變換係數之該有效值旗標之前經解碼的一旗標集合判定一局部活動,以及取決於該局部活動選擇一上下文。 For example, the device of claim 1, which is configured to use context-adaptive entropy decoding to decode the effective value flag of a predetermined transform coefficient by the following operation: based on a local template surrounding the predetermined transform coefficient A set of flags decoded before the effective value flag of the predetermined transform coefficient of a set of adjacent transform coefficients determines a local activity, and a context is selected depending on the local activity. 如請求項25之設備,其經組配以在一個第一遍次中依序地對該有效值旗標、該同位旗標及該一或多個大小程度旗標中之一第一大小程度旗標進行解碼,以至於該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標,且經組配以基於該等相鄰變換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基 於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標而判定。 For example, the device of claim 25, which is configured to be one of the effective value flag, the parity flag, and the one or more size flags in order in a first pass. The flag is decoded so that the flag set includes the effective value flag, the parity flag, and the first size flag of the one or more size flags decoded for the set of adjacent transform coefficients , And is configured to calculate the activity based on a sum of the addends of each of the adjacent transform coefficients, the addends indicating the minimum hypothetical index for one of the adjacent transform coefficients Or a minimally assumed reconstruction level, the index or reconstruction level is based on It is determined on the first magnitude flag among the effective value flag, the parity flag, and the one or more magnitude flags decoded for the adjacent transform coefficients. 如請求項1之設備,其經組配以藉由以下操作而使用一狀態轉換來執行該針對該各別變換係數自多個重構層級集合選擇該重構層級集合之操作:唯一地基於該狀態轉換針對該各別變換係數假定之一狀態自該等多個重構層級集合選擇該重構層級集合,取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態,沿該掃描次序執行該一或多個第一遍次,且藉由取決於下者選擇一上下文而使用上下文自適應性熵解碼對一預定變換係數之該有效值旗標進行解碼:該狀態轉換針對該預定變換係數假定之該狀態。 For example, the device of claim 1, which is configured to use a state transition to perform the operation of selecting the reconstruction level set from a plurality of reconstruction level sets for the respective transform coefficient by the following operation: uniquely based on the The state transition assumes a state for the respective transform coefficient to select the reconstruction level set from the plurality of reconstruction level sets, depending on the parity of the quantization index of the respective transform coefficient, for the latter in the scan order Update the state of the state transition with a transform coefficient of, perform the one or more first passes along the scanning order, and use context-adaptive entropy decoding on a predetermined transform coefficient by selecting a context depending on the following The effective value flag is decoded: the state transition is based on the state assumed for the predetermined transform coefficient. 如請求項27之設備,其經組配以藉由取決於該狀態選擇包含該上下文之一上下文集合而使用上下文自適應性熵解碼對一預定變換係數之該有效值旗標進行解碼,且取決於圍繞該預定變換係數之一局部活動或該預定變換係數之一係數位置自該上下文集合選擇該上下文。 For example, the device of claim 27, which is configured to decode the effective value flag of a predetermined transform coefficient by using context adaptive entropy decoding by selecting a context set containing the context depending on the state, and depending on the state The context is selected from the context set at a local activity surrounding one of the predetermined transformation coefficients or a coefficient position of the predetermined transformation coefficient. 如請求項28之設備,其經組配以針對狀 態0及1選擇一第一上下文集合,針對狀態2選擇一第二上下文集合,且針對狀態3選擇一第三上下文集合。 Such as the equipment of claim 28, which is equipped with targeted status States 0 and 1 select a first context set, for state 2, a second context set, and for state 3, a third context set. 如請求項1之設備,其經組配以藉由以下操作解量化該量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於該各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多個重構層級集合選擇一重構層級集合,以及將該各別變換係數解量化至該重構層級集合之一個層級上,該層級由該各別變換係數之該量化索引來索引化,沿該掃描次序執行該一或多個第一遍次,且藉由取決於下者選擇一上下文而使用上下文自適應性熵解碼對一預定變換係數之該有效值旗標進行解碼:針對該預定變換係數選擇之該重構層級集合。 For example, the device of claim 1, which is configured to dequantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depends on the transform coefficients that precede the respective transform coefficient along a scanning order For the parity of the quantization index, a reconstruction level set is selected from a plurality of reconstruction level sets for the respective transform coefficient, and the respective transform coefficient is dequantized to a level of the reconstruction level set, and the level is determined by each The quantization index of the transform coefficient is indexed, the one or more first passes are performed along the scanning order, and the context-adaptive entropy decoding is used to determine the conversion of a predetermined transform coefficient by selecting a context depending on the following The effective value flag is decoded: the reconstruction level set selected for the predetermined transform coefficient. 如請求項1之設備,其經組配以藉由取決於下者選擇一上下文而使用上下文自適應性熵解碼對一預定變換係數之該同位旗標進行解碼:該預定變換係數之一係數位置。 For example, the device of claim 1, which is configured to decode the parity flag of a predetermined transform coefficient by using context-adaptive entropy decoding by selecting a context depending on the following: a coefficient position of the predetermined transform coefficient . 如請求項1之設備,其經組配以藉由以下操作,使用上下文自適應性熵解碼對一預定變換係數之該同位旗標進行解碼:基於在圍繞該預定變換係數之一局部範本內的一組相鄰變換係數之該預定變換係數之該同位旗標 之前經解碼的一旗標集合判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之該重構層級不為零,以及取決於該局部活動及/或變換係數之該數目選擇一上下文。 For example, the device of claim 1, which is configured to use context-adaptive entropy decoding to decode the parity flag of a predetermined transform coefficient by the following operation: based on a local template surrounding the predetermined transform coefficient The parity flag of the predetermined transform coefficient of a group of adjacent transform coefficients A previously decoded flag set determines a local activity, and/or determines a number of transform coefficients in the local template surrounding the predetermined transform coefficients, the reconstruction level of the predetermined transform coefficients is not zero, and depends Choose a context in the local activity and/or the number of transform coefficients. 如請求項32之設備,其經組配以取決於該局部活動與變換係數之該數目之間的一差選擇該上下文。 Such as the device of claim 32, which is configured to select the context depending on a difference between the local activity and the number of transform coefficients. 如請求項32之設備,其經組配以在一個第一遍次中依序地對該有效值旗標、該同位旗標及該一或多個大小程度旗標中之一第一大小程度旗標進行解碼,以至於該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標,且經組配以基於該等相鄰變換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標而判定。 For example, the device of claim 32, which is configured to be one of the effective value flag, the parity flag, and the one or more size flags in a first pass. The flag is decoded so that the flag set includes the effective value flag, the parity flag, and the first size flag of the one or more size flags decoded for the set of adjacent transform coefficients , And is configured to calculate the activity based on a sum of the addends of each of the adjacent transform coefficients, the addends indicating the minimum hypothetical index for one of the adjacent transform coefficients Or a minimally assumed reconstruction level based on the effective value flag, the parity flag, and the one or more magnitude flags decoded for the adjacent transform coefficients The first degree flag is determined. 如請求項1之設備,其經組配以藉由取決於下者選擇一上下文而使用上下文自適應性熵解碼對一預定變換係數之該一或多個大小程度旗標中之 一第一大小程度旗標進行解碼:該預定變換係數之一係數位置。 Such as the device of claim 1, which is configured to use context-adaptive entropy decoding for one or more of the one or more magnitude flags of a predetermined transform coefficient by selecting a context depending on the following A first magnitude flag is decoded: a coefficient position of the predetermined transform coefficient. 如請求項1之設備,其經組配以藉由以下操作,使用上下文自適應性熵解碼對一預定變換係數之該第一大小程度旗標進行解碼:基於在圍繞該預定變換係數之一局部範本內的一組相鄰變換係數之該預定變換係數之該第一大小程度旗標之前經解碼的一旗標集合判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之該重構層級不為零,以及取決於該局部活動及/或變換係數之該數目選擇一上下文。 For example, the device of claim 1, which is configured to decode the first magnitude flag of a predetermined transform coefficient using context-adaptive entropy decoding by the following operation: A set of flags decoded before the first magnitude flag of the predetermined transformation coefficient of a set of adjacent transformation coefficients in a template determines a local activity, and/or determines a local activity in the local template surrounding the predetermined transformation coefficient A number of transform coefficients, the reconstruction level of the predetermined transform coefficients is not zero, and a context is selected depending on the local activity and/or the number of transform coefficients. 如請求項36之設備,其經組配以取決於該局部活動與變換係數之該數目之間的一差選擇該上下文。 Such as the device of claim 36, which is configured to select the context depending on a difference between the local activity and the number of transform coefficients. 如請求項36之設備,其經組配以在一個第一遍次中依序地對該有效值旗標、該同位旗標及該一或多個大小程度旗標中之一第一大小程度旗標進行解碼,以至於該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標,且經組配以基於該等相鄰變換係數中之各者之一加數的一總和而計算該局部活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之 索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標而判定。 For example, the device of claim 36, which is configured to be one of the effective value flag, the parity flag, and the one or more size flags in a first pass. The flag is decoded so that the flag set includes the effective value flag, the parity flag, and the first size flag of the one or more size flags decoded for the set of adjacent transform coefficients , And is configured to calculate the local activity based on a sum of the addends of each of the adjacent transformation coefficients, and the addend indications are used for one of the adjacent transformation coefficients, which is minimally assumed Index or a minimally assumed reconstruction level based on the effective value flag, the parity flag, and the one or more magnitude flags decoded for the adjacent transform coefficients It is determined by the first level flag. 如請求項1之設備,其經組配以使用一哥倫布-萊斯碼且使用一萊斯參數對一預定變換係數之該餘數進行解碼,該萊斯參數取決於圍繞該預定變換係數之一局部範本內的一組相鄰變換係數中之各者之一加數的一總和,該加數取決於各別相鄰變換係數之一量化索引或一重構層級。 For example, the device of claim 1, which is configured to use a Columbus-Rice code and use a Rice parameter to decode the remainder of a predetermined transform coefficient. The Rice parameter depends on a part of the predetermined transform coefficient. A sum of the addends of each of a group of adjacent transform coefficients in the template, and the addend depends on a quantization index or a reconstruction level of each adjacent transform coefficient. 一種用於對變換係數之一區塊進行編碼的設備,該設備經組配以在掃描該等變換係數之一或多個第一遍次中,使用上下文自適應性熵編碼對當前變換係數之一有效值旗標進行編碼,該有效值旗標指示該等當前變換係數之一量化索引是否為零,對該等變換係數之一同位旗標進行編碼,該同位旗標指示該等變換係數之一同位,在包括或不包括該一或多個第一遍次中之一或多者的掃描該等變換係數之一或多個第二遍次中,使用上下文自適應性熵編碼對該量化索引不為零之變換係數之一或多個大小程度旗標進行編碼,在一或多個第三遍次中,使用等機率熵編碼對以下各者進行編碼, 該等變換係數之該量化索引之一餘數,該等變換係數之該一或多個大小程度旗標為正,以及該等變換係數之該量化索引之一符號,該等變換係數之該量化索引不為零。 A device for encoding a block of transform coefficients. The device is configured to use context-adaptive entropy coding to encode the current transform coefficient in one or more first passes of the transform coefficients. A valid value flag is coded, the valid value flag indicates whether a quantization index of the current transform coefficients is zero, and a parity flag of one of the transform coefficients is encoded, and the parity flag indicates the value of the transform coefficients. Together, in one or more second passes of scanning the transform coefficients including or not including one or more of the one or more first passes, the quantization is performed using context-adaptive entropy coding One of the transform coefficients whose index is not zero or multiple magnitude flags are coded, and in one or more third passes, the following are coded using equal-probability entropy coding, The remainder of the quantization index of the transform coefficients, the one or more magnitude flags of the transform coefficients are positive, and a sign of the quantization index of the transform coefficients, the quantization index of the transform coefficients Not zero. 如請求項40之設備,其經組配以在一個第一遍次中,針對一當前經掃描變換係數,使用上下文自適應性熵編碼對該當前經掃描變換係數之該有效值旗標進行解碼,且若該有效值旗標指示該當前經掃描變換係數之該量化索引不為零,則針對該當前經掃描變換係數,使用上下文自適應性熵編碼對該當前經掃描變換係數之該同位旗標進行編碼。 For example, the device of claim 40, which is configured to decode the effective value flag of the current scanned transform coefficient by using context adaptive entropy coding for a current scanned transform coefficient in a first pass And if the effective value flag indicates that the quantization index of the current scanned transform coefficient is not zero, then for the current scanned transform coefficient, use context adaptive entropy coding for the parity flag of the current scanned transform coefficient Mark to be coded. 如請求項40之設備,其經組配以在該一或多個第一遍次中之一者中,針對一當前經掃描變換係數,使用上下文自適應性熵編碼對該當前經掃描變換係數之該同位旗標進行編碼,且在該一或多個第一遍次中之另一者中,針對一當前經掃描變換係數,若該同位旗標指示該當前經掃描變換係數之該量化索引為偶數,則針對該當前經掃描變換係數,使用上下文自適應性熵編碼對該當前經掃描變換係數之該有效值旗標進行編碼。 For example, the device of claim 40, which is configured to use context-adaptive entropy coding for a current scanned transform coefficient in one of the one or more first passes The parity flag is encoded, and in the other of the one or more first passes, for a current scanned transform coefficient, if the parity flag indicates the quantization index of the current scanned transform coefficient If it is an even number, for the current scanned transform coefficient, use context adaptive entropy coding to encode the effective value flag of the current scanned transform coefficient. 如請求項33之設備,其經組配以 在該一或多個第二遍次中,針對一當前經掃描變換係數,若該當前經掃描變換係數之該量化索引不為零,則使用上下文自適應性熵編碼對該當前經掃描變換係數之一第一大小程度旗標進行編碼。 Such as the equipment of claim 33, which is assembled with In the one or more second passes, for a current scanned transform coefficient, if the quantization index of the current scanned transform coefficient is not zero, context adaptive entropy coding is used for the current scanned transform coefficient One of the first size level flags is encoded. 如請求項43之設備,其經組配以至於針對一預定變換係數,能夠根據一總和獲得該量化索引,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標,該預定變換係數之該同位旗標,該預定變換係數之該餘數與該第一大小程度旗標之一總和的兩倍。 For example, the device of claim 43 is configured so that for a predetermined transform coefficient, the quantization index can be obtained according to a sum, and the addend of the sum is formed by: the effective value flag of the predetermined transform coefficient, The parity flag of the predetermined transform coefficient, the remainder of the predetermined transform coefficient and the sum of one of the first magnitude flags are twice the sum. 如請求項44之設備,其經組配以在該一或多個第二遍次中,針對一當前經掃描變換係數,若該當前經掃描變換係數之該第一大小程度旗標為正,則使用上下文自適應性熵編碼對該當前經掃描變換係數之一第二大小程度旗標進行編碼。 For example, the device of claim 44, which is configured for a current scanned transform coefficient in the one or more second passes, if the first magnitude flag of the current scanned transform coefficient is positive, Then use context adaptive entropy coding to encode the second magnitude flag of one of the currently scanned transform coefficients. 如請求項45之設備,其經組配以針對一預定變換係數,能夠根據一總和獲得該量化索引,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標,該預定變換係數之該同位旗標,該預定變換係數之該餘數、該第一大小程度旗標 與該第二大小程度旗標之一總和的兩倍。 For example, the device of claim 45, which is configured to obtain the quantization index for a predetermined transform coefficient according to a sum, and the addend of the sum is formed by the following: the effective value flag of the predetermined transform coefficient, the The parity flag of the predetermined transform coefficient, the remainder of the predetermined transform coefficient, the first magnitude flag Twice the sum of one of the second size degree flags. 如請求項45之設備,其經組配以針對一預定變換係數,能夠根據一總和獲得該量化索引,該總和之加數係藉由以下形成:該預定變換係數之該有效值旗標,該預定變換係數之該同位旗標,該預定變換係數之該第一大小程度旗標,以及該預定變換係數之該餘數與該第二大小程度旗標之一總和的兩倍。 For example, the device of claim 45, which is configured to obtain the quantization index for a predetermined transform coefficient according to a sum, and the addend of the sum is formed by the following: the effective value flag of the predetermined transform coefficient, the The parity flag of the predetermined transform coefficient, the first degree flag of the predetermined transform coefficient, and the remainder of the predetermined transform coefficient twice the sum of the second degree flag. 如請求項45之設備,其經組配以其經組配以在單獨第二遍次中執行該第一大小程度旗標及該第二大小程度旗標之該編碼,及/或其中該一或多個第二遍次不包括該一或多個第一遍次。 For example, the device of claim 45 is configured to execute the coding of the first size flag and the second size flag in a single second pass, and/or one of them The one or more second passes do not include the one or more first passes. 如請求項33之設備,其經組配以在該一或多個第一遍次中之各者之後執行該一或多個第二遍次中之各者,且在該一或多個第二遍次中之各者之後執行該一或多個第三遍次中之各者。 For example, the device of claim 33 is configured to execute each of the one or more second passes after each of the one or more first passes, and in the one or more first passes, Each of the second passes is followed by each of the one or more third passes. 如請求項40之設備,其中該一或多個第一遍次包括於該一或多個第二遍次中。 Such as the device of claim 40, wherein the one or more first passes are included in the one or more second passes. 如請求項50之設備,其中該等變換係數之該有效值旗標、該同位旗標及該一或多個大小程度旗標在一個遍次中經解碼。 Such as the device of claim 50, wherein the effective value flag, the parity flag, and the one or more magnitude flags of the transform coefficients are decoded in one pass. 如請求項40之設備,其經組配以在該一或多個第一遍次中之一者中,針對一當前經掃描變換係數,使用上下文自適應性熵編碼對該當前經掃描變換係數之該有效值旗標進行編碼,在該一個第一遍次之後,在該一或多個第二遍次中,使用上下文自適應性熵解碼對該等變換係數之多於一個大小程度旗標之一序列進行編碼,在該一或多個第二遍次之後,在該一或多個第一遍次中之另一者中,使用等機率熵編碼對該等變換係數之該同位旗標進行編碼,該等變換係數之該量化索引不為零。 For example, the device of claim 40, which is configured to use context-adaptive entropy coding for a current scanned transform coefficient in one of the one or more first passes The effective value flag is encoded, and after the first pass, in the one or more second passes, context adaptive entropy decoding is used to flag more than one magnitude of the transform coefficients A sequence is coded, and after the one or more second passes, in the other of the one or more first passes, the parity flag of the transform coefficients is marked with equal-probability entropy coding When encoding, the quantization index of the transform coefficients is not zero. 如請求項40之設備,其中該區塊之該等變換係數被分割成子區塊,且該等變換係數經逐子區塊編碼,以至於一子區塊之各變換係數係在下一子區塊之該等變換係數之前經編碼。 Such as the device of claim 40, wherein the transform coefficients of the block are divided into sub-blocks, and the transform coefficients are coded sub-block by sub-block, so that the transform coefficients of one sub-block are in the next sub-block The transform coefficients have been coded before. 如請求項40之設備,其中二進位算術編碼用作熵編碼,且該餘數係藉由編碼該等變換係數之該量化索引的一絕對值之一二進位化的位元子而編碼。 Such as the device of claim 40, wherein binary arithmetic coding is used for entropy coding, and the remainder is coded by coding a binary bit of an absolute value of the quantization index of the transform coefficients. 如請求項40之設備,其經組配以藉由以下操作量化該量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於該各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多 個重構層級集合選擇一重構層級集合,以及將該各別變換係數量化至該重構層級集合之一個層級上,該層級由該各別變換係數之該量化索引來索引化。 For example, the device of claim 40, which is configured to quantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depends on the quantization of the transform coefficient that precedes the individual transform coefficient along a scanning order The parity of the index, for the individual transform coefficients A set of reconstruction levels is selected from a set of reconstruction levels, and the respective transform coefficient is quantized to a level of the set of reconstruction levels, and the level is indexed by the quantization index of the respective transform coefficient. 如請求項55之設備,其經組配以藉由以下操作而使用一狀態轉換來執行該針對該各別變換係數自多個重構層級集合選擇該重構層級集合之操作:唯一地基於該狀態轉換針對該各別變換係數假定之一狀態自該等多個重構層級集合選擇該重構層級集合,取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態。 For example, the device of claim 55 is configured to use a state transition to perform the operation of selecting the reconstruction level set from a plurality of reconstruction level sets for the respective transform coefficient by the following operation: uniquely based on the The state transition assumes a state for the respective transform coefficient to select the reconstruction level set from the plurality of reconstruction level sets, depending on the parity of the quantization index of the respective transform coefficient, for the latter in the scan order A transform coefficient of updates the state of the state transition. 如請求項56之設備,其經組配以沿該掃描次序而執行該一或多個第一遍次,及/或該一或多個第二遍次,及/或該一或多個第三遍次。 For example, the device of claim 56, which is configured to execute the one or more first passes, and/or the one or more second passes, and/or the one or more second passes along the scanning order Three times. 如請求項56之設備,其經組配以執行四個相異狀態之間的狀態轉換轉換。 For example, the device of claim 56 is configured to perform state transitions between four different states. 如請求項55之設備,其經組配以藉助於一預定量化步長使該等多個重構層級集合參數化且自資料串流導出關於該預定量化步長之資訊。 For example, the equipment of claim 55 is configured to parameterize the multiple reconstruction level sets by means of a predetermined quantization step size and derive information about the predetermined quantization step size from the data stream. 如請求項56之設備,其中該等多個重構層級集合中之各者由一預定量化步長之倍數組成,該預定量化步長對於該等多個重構層級集合係恆定的。 Such as the device of claim 56, wherein each of the multiple reconstruction level sets is composed of a multiple of a predetermined quantization step size, and the predetermined quantization step size is constant for the multiple reconstruction level sets. 如請求項55之設備,其中該等多個重構層級集合中之重構層級集合之數目為二,且該等多個重構層級集合包含一第一重構層級集合,其包含零及一預定量化步長之偶數倍,以及一第二重構層級集合,其包含零及該預定量化步長之奇數倍。 Such as the device of claim 55, wherein the number of reconstruction level sets in the multiple reconstruction level sets is two, and the multiple reconstruction level sets include a first reconstruction level set, which includes zero and one An even multiple of a predetermined quantization step, and a second reconstruction level set, which includes zero and an odd multiple of the predetermined quantization step. 如請求項61之設備,其經組配以針對狀態值0及1選擇該第一重構層級集合,且針對狀態值2及3選擇該第二重構層級集合。 For example, the device of request 61 is configured to select the first reconstruction level set for state values 0 and 1, and select the second reconstruction level set for state values 2 and 3. 如請求項40之設備,其經組配以藉由取決於下者選擇一上下文而使用上下文自適應性熵編碼對一預定變換係數之該有效值旗標進行編碼:變換區塊內部之該預定變換係數之一係數位置。 For example, the device of claim 40, which is configured to use context-adaptive entropy coding to encode the effective value flag of a predetermined transformation coefficient by selecting a context depending on the following: the predetermined within the transformation block The position of one of the transform coefficients. 如請求項40之設備,其經組配以藉由以下操作,使用上下文自適應性熵編碼對一預定變換係數之該有效值旗標進行編碼:基於在圍繞該預定變換係數之一局部範本內的一組相鄰變換係數之該預定變換係數之該有效值旗標之前經解碼的一旗標集合判定一局部活動,以及取決於該局部活動選擇一上下文。 For example, the device of claim 40, which is configured to use context adaptive entropy coding to encode the effective value flag of a predetermined transform coefficient by the following operation: based on a local template surrounding the predetermined transform coefficient A set of flags decoded before the effective value flag of the predetermined transform coefficient of a set of adjacent transform coefficients determines a local activity, and a context is selected depending on the local activity. 如請求項64之設備,其經組配以在一個第一遍次中依序地對該有效值旗標、該同位旗標及該一或多個大小程度旗標中之一第一大小程度旗標進行編碼,以至於該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標,且經組配以基於該等相鄰變換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標而判定。 For example, the device of claim 64 is configured to sequentially in a first pass, one of the effective value flag, the parity flag, and the one or more size flags is the first size level The flags are encoded so that the flag set includes the effective value flag, the parity flag, and the first size flag of the one or more size flags decoded for the set of adjacent transform coefficients , And is configured to calculate the activity based on a sum of the addends of each of the adjacent transform coefficients, the addends indicating the minimum hypothetical index for one of the adjacent transform coefficients Or a minimally assumed reconstruction level based on the effective value flag, the parity flag, and the one or more magnitude flags decoded for the adjacent transform coefficients The first degree flag is determined. 如請求項40之設備,其經組配以藉由以下操作而使用一狀態轉換來執行該針對該各別變換係數自多個重構層級集合選擇該重構層級集合之操作:唯一地基於該狀態轉換針對該各別變換係數假定之一狀態自該等多個重構層級集合選擇該重構層級集合,取決於該各別變換係數之該量化索引之該同位,針對該掃描次序中在後的一變換係數更新該狀態轉換之該狀態,沿該掃描次序執行該一或多個第一遍次,且藉由取決於下者選擇一上下文而使用上下文自適應性 熵編碼對一預定變換係數之該有效值旗標進行編碼:該狀態轉換針對該預定變換係數假定之該狀態。 For example, the device of claim 40 is configured to use a state transition to perform the operation of selecting the reconstruction level set from a plurality of reconstruction level sets for the respective transform coefficient by the following operation: uniquely based on the The state transition assumes a state for the respective transform coefficient to select the reconstruction level set from the plurality of reconstruction level sets, depending on the parity of the quantization index of the respective transform coefficient, for the latter in the scan order Update the state of the state transition with a transform coefficient of, perform the one or more first passes along the scan order, and use context adaptivity by selecting a context depending on the following Entropy coding encodes the effective value flag of a predetermined transform coefficient: the state transition is for the state assumed by the predetermined transform coefficient. 如請求項66之設備,其經組配以藉由取決於該狀態選擇包含該上下文之一上下文集合而使用上下文自適應性熵編碼對一預定變換係數之該有效值旗標進行編碼,且取決於圍繞該預定變換係數之一局部活動或該預定變換係數之一係數位置自該上下文集合選擇該上下文。 For example, the device of claim 66 is configured to encode the effective value flag of a predetermined transform coefficient by using context adaptive entropy coding by selecting a context set containing the context depending on the state, and depending on the state The context is selected from the context set at a local activity surrounding one of the predetermined transformation coefficients or a coefficient position of the predetermined transformation coefficient. 如請求項67之設備,其經組配以針對狀態0及1選擇一第一上下文集合,針對狀態2選擇一第二上下文集合,且針對狀態3選擇一第三上下文集合。 For example, the device of request 67 is configured to select a first context set for states 0 and 1, a second context set for state 2, and a third context set for state 3. 如請求項40之設備,其經組配以藉由以下操作量化該量化索引不為零之各變換係數之該量化索引:取決於沿一掃描次序先於該各別變換係數之變換係數之量化索引的同位,針對該各別變換係數自多個重構層級集合選擇一重構層級集合,以及將該各別變換係數解量化至該重構層級集合之一個層級上,該層級由該各別變換係數之該量化索引來索引化,沿該掃描次序執行該一或多個第一遍次,且藉由取決於下者選擇一上下文而使用上下文自適應性熵編碼對一預定變換係數之該有效值旗標進行編碼:針對該預定變換係數選擇之該重構層級集合。 For example, the device of claim 40, which is configured to quantize the quantization index of each transform coefficient whose quantization index is not zero by the following operation: depends on the quantization of the transform coefficient that precedes the individual transform coefficient along a scanning order For index parity, select a reconstruction level set from multiple reconstruction level sets for the individual transform coefficient, and dequantize the individual transform coefficient to a level of the reconstruction level set, and the level is determined by the individual transform coefficient. The quantization index of the transform coefficient is indexed, the one or more first passes are executed along the scan order, and the context-adaptive entropy coding is used to select a context depending on the following to apply the context adaptive entropy coding to the predetermined transform coefficient The effective value flag is coded: the reconstruction level set selected for the predetermined transform coefficient. 如請求項40之設備,其經組配以藉由取決於下者選擇一上下文而使用上下文自適應性熵編碼對一預定變換係數之該同位旗標進行編碼:該預定變換係數之一係數位置。 Such as the device of claim 40, which is configured to use context-adaptive entropy coding to encode the parity flag of a predetermined transform coefficient by selecting a context depending on the following: a coefficient position of the predetermined transform coefficient . 如請求項40之設備,其經組配以藉由以下操作,使用上下文自適應性熵編碼對一預定變換係數之該同位旗標進行編碼:基於在圍繞該預定變換係數之一局部範本內的一組相鄰變換係數之該預定變換係數之該同位旗標之前經解碼的一旗標集合而判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之該重構層級不為零,以及取決於該局部活動及/或變換係數之該數目選擇一上下文。 For example, the device of claim 40, which is configured to use context adaptive entropy coding to encode the parity flag of a predetermined transform coefficient by the following operation: based on a local template surrounding the predetermined transform coefficient A set of flags decoded before the parity flag of the predetermined transform coefficient of a set of adjacent transform coefficients determines a local activity, and/or determines a number of transform coefficients in the local template surrounding the predetermined transform coefficient , The reconstruction level of the predetermined transform coefficients is not zero, and a context is selected depending on the local activity and/or the number of transform coefficients. 如請求項71之設備,其經組配以取決於該局部活動與變換係數之該數目之間的一差選擇該上下文。 Such as the device of claim 71, which is configured to select the context depending on a difference between the local activity and the number of transform coefficients. 如請求項71之設備,其經組配以在一個第一遍次中依序地對該有效值旗標、該同位旗標及該一或多個大小程度旗標中之一第一大小程度旗標進行編碼,以至於該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標,且經組配以基於該等相鄰變 換係數中之各者之一加數的一總和而計算該活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標而判定。 For example, the device of claim 71, which is configured to be one of the effective value flag, the parity flag, and the one or more size flags in a first pass. The flags are encoded so that the flag set includes the effective value flag, the parity flag, and the first size flag of the one or more size flags decoded for the set of adjacent transform coefficients , And are combined to be based on these adjacent changes The activity is calculated by converting a sum of one of the addends of each of the coefficients, the addends indicating a minimally assumed index or a minimally assumed reconstruction level for one of the adjacent transformation coefficients, The index or reconstruction level is determined based on the first magnitude flag among the effective value flag, the parity flag, and the one or more magnitude flags decoded for the adjacent transform coefficients. 如請求項40之設備,其經組配以藉由取決於下者選擇一上下文而使用上下文自適應性熵編碼對一預定變換係數之該一或多個大小程度旗標中之一第一大小程度旗標進行編碼:該預定變換係數之一係數位置。 Such as the device of claim 40, which is configured to use context-adaptive entropy coding to first size one of the one or more size flags of a predetermined transform coefficient by selecting a context depending on the following The degree flag is coded: the position of one of the predetermined transform coefficients. 如請求項40之設備,其經組配以藉由以下操作,使用上下文自適應性熵編碼對一預定變換係數之該第一大小程度旗標進行編碼:基於在圍繞該預定變換係數之一局部範本內的一組相鄰變換係數之該預定變換係數之該第一大小程度旗標之前經解碼的一旗標集合而判定一局部活動,及/或判定圍繞該預定變換係數之該局部範本內之變換係數的一數目,該等預定變換係數之重構層級不為零,以及取決於該局部活動及/或變換係數之該數目選擇一上下文。 For example, the device of claim 40 is configured to use context adaptive entropy coding to encode the first magnitude flag of a predetermined transform coefficient by the following operation: A set of flags decoded before the first magnitude flag of the predetermined transformation coefficient of a group of adjacent transformation coefficients in a template determines a local activity, and/or determines a local activity around the predetermined transformation coefficient in the local template A number of transform coefficients, the reconstruction level of the predetermined transform coefficients is not zero, and a context is selected depending on the local activity and/or the number of transform coefficients. 如請求項75之設備,其經組配以取決於該局部活動與變換係數之該數目之間的一差選擇該上下 文。 For example, the device of claim 75 is configured to select the upper and lower values depending on the difference between the local activity and the number of transform coefficients Arts. 如請求項75之設備,其經組配以在一個第一遍次中依序地對該有效值旗標、該同位旗標及該一或多個大小程度旗標中之一第一大小程度旗標進行編碼,以至於該旗標集合包含針對該組相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標,且經組配以基於該等相鄰變換係數中之各者之一加數的一總和而計算該局部活動,該等加數指示用於該等相鄰變換係數之一最低限度地假定之索引或一最低限度地假定之重構層級,該索引或重構層級係基於針對該等相鄰變換係數解碼之該有效值旗標、該同位旗標及該一或多個大小程度旗標中之該第一大小程度旗標而判定。 For example, the device of claim 75 is configured to sequentially in a first pass, one of the effective value flag, the parity flag, and the one or more size flags is the first size level The flags are encoded so that the flag set includes the effective value flag, the parity flag, and the first size flag of the one or more size flags decoded for the set of adjacent transform coefficients , And is configured to calculate the local activity based on a sum of the addends of each of the adjacent transformation coefficients, and the addend indications are used for one of the adjacent transformation coefficients, which is minimally assumed Index or a minimally assumed reconstruction level based on the effective value flag, the parity flag, and the one or more magnitude flags decoded for the adjacent transform coefficients It is determined by the first level flag. 如請求項40之設備,其經組配以使用一哥倫布-萊斯碼且使用一萊斯參數對一預定變換係數之該餘數進行編碼,該萊斯參數取決於圍繞該預定變換係數之一局部範本內的一組相鄰變換係數中之各者之一加數的一總和,該加數取決於各別相鄰變換係數之一量化索引或一重構層級。 For example, the device of claim 40, which is configured to use a Columbus-Rice code and use a Rice parameter to encode the remainder of a predetermined transform coefficient, the Rice parameter depends on a part around the predetermined transform coefficient A sum of the addends of each of a group of adjacent transform coefficients in the template, and the addend depends on a quantization index or a reconstruction level of each adjacent transform coefficient. 一種用於對變換係數之一區塊進行解碼的方法,該方法經組配以在掃描該等變換係數之一或多個第一遍次中,使用上下文自適應性熵解碼對該等變換係數之一有效值旗標進行解碼,該有效值旗標指示該等變換 係數之一量化索引是否為零,對該等變換係數之一同位旗標進行解碼,該同位旗標指示該等變換係數之一同位,在包括或不包括該一或多個第一遍次中之一或多者的掃描該等變換係數之一或多個第二遍次中,使用上下文自適應性熵解碼對該量化索引不為零之變換係數之一或多個大小程度旗標進行解碼,在一或多個第三遍次中,使用等機率熵解碼對以下各者進行解碼,該等變換係數之該量化索引之一餘數,該等變換係數之該一或多個大小程度旗標為正,以及該等變換係數之該量化索引之一符號,該等變換係數之該量化索引不為零。 A method for decoding a block of transform coefficients. The method is configured to use context-adaptive entropy decoding to decode the transform coefficients in one or more first passes of the transform coefficients. One of the effective value flags is decoded, and the effective value flag indicates the transformations Whether the quantization index of one of the coefficients is zero, decode a parity flag of one of the transform coefficients, and the parity flag indicates that one of the transform coefficients is parity, in the first pass including or not including the one or more In one or more second passes of scanning one or more of the transform coefficients, use context-adaptive entropy decoding to decode one or more magnitude flags of the transform coefficients whose quantization index is not zero In one or more third passes, use equal-probability entropy decoding to decode each of the following, the remainder of the quantization index of the transform coefficients, and the one or more magnitude flags of the transform coefficients Is positive, and a sign of the quantization index of the transform coefficients, the quantization index of the transform coefficients is not zero. 一種用於對變換係數之一區塊進行編碼的方法,該方法經組配以在掃描該等變換係數之一或多個第一遍次中,使用上下文自適應性熵編碼對當前變換係數之一有效值旗標進行編碼,該有效值旗標指示該等當前變換係數之一量化索引是否為零,對該等變換係數之一同位旗標進行編碼,該同位旗標指示該等變換係數之一同位,在包括或不包括該一或多個第一遍次中之一或多者的掃描該等變換係數之一或多個第二遍次中,使用上下文自適應性熵編碼對該量化索引不為 零之變換係數之一或多個大小程度旗標進行編碼,在一或多個第三遍次中,使用等機率熵編碼對以下各者進行編碼,該等變換係數之該量化索引之一餘數,該等變換係數之該一或多個大小程度旗標為正,以及該等變換係數之該量化索引之一符號,該等變換係數之該量化索引不為零。 A method for encoding a block of transform coefficients. The method is configured to use context-adaptive entropy coding to encode the current transform coefficient in one or more first passes of scanning the transform coefficients. A valid value flag is coded, the valid value flag indicates whether a quantization index of the current transform coefficients is zero, and a parity flag of one of the transform coefficients is encoded, and the parity flag indicates the value of the transform coefficients. Together, in one or more second passes of scanning the transform coefficients including or not including one or more of the one or more first passes, the quantization is performed using context-adaptive entropy coding Index is not One or more magnitude flags of zero transform coefficients are coded. In one or more third passes, the following are coded using equal-probability entropy coding. The remainder of the quantization index of the transform coefficients , The one or more magnitude flags of the transform coefficients are positive, and the quantization index of the transform coefficients is a sign, and the quantization index of the transform coefficients is not zero. 一種電腦程式,其用於發指令給一電腦,該電腦執行該電腦程式以執行如請求項79或80之一方法。 A computer program used to send instructions to a computer, and the computer executes the computer program to perform a method such as request item 79 or 80. 一種資料串流,其係藉由如請求項80之一方法產生。 A data stream generated by a method such as request item 80.
TW108123315A 2018-07-02 2019-07-02 Entropy coding of transform coefficients suitable for dependent scalar quantization TWI748201B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
EP18181293.4 2018-07-02
EP18181293 2018-07-02

Publications (2)

Publication Number Publication Date
TW202007169A TW202007169A (en) 2020-02-01
TWI748201B true TWI748201B (en) 2021-12-01

Family

ID=62845994

Family Applications (2)

Application Number Title Priority Date Filing Date
TW110141790A TWI810707B (en) 2018-07-02 2019-07-02 Entropy coding of transform coefficients suitable for dependent scalar quantization
TW108123315A TWI748201B (en) 2018-07-02 2019-07-02 Entropy coding of transform coefficients suitable for dependent scalar quantization

Family Applications Before (1)

Application Number Title Priority Date Filing Date
TW110141790A TWI810707B (en) 2018-07-02 2019-07-02 Entropy coding of transform coefficients suitable for dependent scalar quantization

Country Status (7)

Country Link
US (3) US11611750B2 (en)
EP (1) EP3818703A1 (en)
JP (3) JP7127160B2 (en)
KR (3) KR20240059000A (en)
CN (2) CN112655209B (en)
TW (2) TWI810707B (en)
WO (1) WO2020007785A1 (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20240059000A (en) * 2018-07-02 2024-05-07 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. Entropy coding of transform coefficients suitable for dependent scalar quantization
US11405650B2 (en) 2018-08-22 2022-08-02 Hfi Innovation Inc. Method and apparatus of transform coefficient coding
KR102725917B1 (en) 2018-09-11 2024-11-04 엘지전자 주식회사 Residual coding method and device for same
CN116723334A (en) 2018-09-20 2023-09-08 Lg电子株式会社 Image decoding equipment, image encoding equipment and bit stream sending equipment
BR112021005161A2 (en) 2018-09-21 2021-06-15 Guangdong Oppo Mobile Telecommunications Corp., Ltd. video decoding method, and video encoding method
EP3854082A1 (en) 2018-09-21 2021-07-28 InterDigital VC Holdings, Inc. Scalar quantizer decision scheme for dependent scalar quantization
WO2020156515A1 (en) * 2019-01-31 2020-08-06 Beijing Bytedance Network Technology Co., Ltd. Refined quantization steps in video coding
CN119011872A (en) * 2020-02-25 2024-11-22 Lg电子株式会社 Image encoding/decoding apparatus and apparatus for transmitting data
CN119946287A (en) * 2020-04-08 2025-05-06 Oppo广东移动通信有限公司 Coding method, decoding method, encoder, decoder and storage medium
US11558617B2 (en) * 2020-11-30 2023-01-17 Tencent America LLC End-to-end dependent quantization with deep reinforcement learning
CN112995671B (en) * 2021-02-21 2022-10-28 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, computer readable medium and electronic equipment
WO2022178405A1 (en) * 2021-02-22 2022-08-25 Innopeak Technology, Inc. Dependent quantization and residual coding method
CN116982317A (en) * 2021-03-17 2023-10-31 Oppo广东移动通信有限公司 Coefficient encoding and decoding method, encoder, decoder and computer storage medium
EP4099651B1 (en) * 2021-06-01 2024-03-27 Mitsubishi Electric R & D Centre Europe B.V. Method and device for transmitting binary data
WO2022257142A1 (en) * 2021-06-11 2022-12-15 Oppo广东移动通信有限公司 Video decoding and coding method, device and storage medium
KR20240132290A (en) * 2022-01-05 2024-09-03 주식회사 윌러스표준기술연구소 Video signal processing method using dependent quantization and device therefor
WO2024013109A1 (en) * 2022-07-11 2024-01-18 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Encoder, decoder and methods for coding a data structure
US20250350725A1 (en) * 2023-04-23 2025-11-13 Quasistatics Inc. Method and system for energy-efficient approximate digital jpeg and mjpeg-compression
WO2025127632A1 (en) * 2023-12-11 2025-06-19 주식회사 윌러스표준기술연구소 Video signal processing method and device therefor
WO2025149595A1 (en) * 2024-01-09 2025-07-17 Interdigital Ce Patent Holdings, Sas Enhanced states dependent quantization
WO2025240358A1 (en) * 2024-05-14 2025-11-20 Netflix, Inc. Techniques for selecting between scalar quantization and trellis coded quantization when encoding video data
WO2025240350A1 (en) * 2024-05-14 2025-11-20 Netflix, Inc. Techniques for performing both scalar quantization and trellis coded quantization when encoding video data

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2680580B1 (en) * 2012-06-28 2016-06-01 BlackBerry Limited Reduced worst-case context-coded bins in video compression with parity hiding

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4189748A (en) * 1977-08-23 1980-02-19 Northrop Corporation Video bandwidth reduction system using a two-dimensional transformation, and an adaptive filter with error correction
US7120254B2 (en) * 2000-10-30 2006-10-10 Geocodex Llc Cryptographic system and method for geolocking and securing digital information
US20110041148A1 (en) * 2009-08-13 2011-02-17 At&T Intellectual Property I, L.P. Blackouts of pay per view multimedia content
US20120230396A1 (en) * 2011-03-11 2012-09-13 Mitsubishi Electric Research Laboratories, Inc. Method for Embedding Decoding Information in Quantized Transform Coefficients
MX338671B (en) * 2011-11-04 2016-04-27 Sharp Kk Arithmetic decoding device, image decoding device, arithmetic coding device, image coding device, and arithmetic decoding method.
FR2982447A1 (en) * 2011-11-07 2013-05-10 France Telecom METHOD FOR ENCODING AND DECODING IMAGES, CORRESPONDING ENCODING AND DECODING DEVICE AND COMPUTER PROGRAMS
CN104205646B (en) * 2012-01-20 2017-09-22 Ge视频压缩有限责任公司 Coding of transform coefficients
US9313498B2 (en) * 2012-04-16 2016-04-12 Qualcomm Incorporated Sign hiding techniques for quantized transform coefficients in video coding
US9294779B2 (en) * 2012-06-15 2016-03-22 Blackberry Limited Multi-bit information hiding using overlapping subsets
US9088769B2 (en) * 2012-06-28 2015-07-21 Blackberry Limited Reduced worst-case context-coded bins in video compression with parity hiding
US20140133574A1 (en) * 2012-11-13 2014-05-15 Mediatek Inc. Method and Apparatus for Sign Data Hiding of Video and Image Data
US9014499B2 (en) * 2013-09-25 2015-04-21 Mitsubishi Electric Research Laboratories, Inc. Distributed source coding using prediction modes obtained from side information
AU2015417837B2 (en) * 2015-12-23 2019-07-18 Huawei Technologies Co., Ltd. Method and apparatus for transform coding with block-level transform selection and implicit signaling within hierarchical partitioning
US11451840B2 (en) * 2018-06-18 2022-09-20 Qualcomm Incorporated Trellis coded quantization coefficient coding
KR20240059000A (en) 2018-07-02 2024-05-07 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. Entropy coding of transform coefficients suitable for dependent scalar quantization

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2680580B1 (en) * 2012-06-28 2016-06-01 BlackBerry Limited Reduced worst-case context-coded bins in video compression with parity hiding

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Detlev Marpe et.al, Unified PIPE-Based Entropy Coding for HEVC, JCTVC-F268, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 6th Meeting: Torino, IT, 14-22 July, 2011, *

Also Published As

Publication number Publication date
KR20230070064A (en) 2023-05-19
US12375674B2 (en) 2025-07-29
EP3818703A1 (en) 2021-05-12
CN112655209B (en) 2024-03-29
JP7127160B2 (en) 2022-08-29
US20230199188A1 (en) 2023-06-22
JP2025061204A (en) 2025-04-10
US11611750B2 (en) 2023-03-21
WO2020007785A1 (en) 2020-01-09
KR102662646B1 (en) 2024-05-03
JP2022169656A (en) 2022-11-09
CN112655209A (en) 2021-04-13
KR102533654B1 (en) 2023-05-18
US20210136385A1 (en) 2021-05-06
KR20240059000A (en) 2024-05-07
JP7620597B2 (en) 2025-01-23
JP2021530155A (en) 2021-11-04
TWI810707B (en) 2023-08-01
TW202234892A (en) 2022-09-01
CN118354077A (en) 2024-07-16
US20250324058A1 (en) 2025-10-16
KR20210025106A (en) 2021-03-08
TW202007169A (en) 2020-02-01

Similar Documents

Publication Publication Date Title
TWI748201B (en) Entropy coding of transform coefficients suitable for dependent scalar quantization
JP7776584B2 (en) Dependent Quantization
JP7661406B2 (en) Efficient coding of transform coefficients for use in or suitable for combination with dependent scalar quantization - Patents.com
HK40107598A (en) Apparatus and method for decoding or encoding transform coefficients of a block
HK40111367A (en) Efficient coding of transform coefficients using or suitable for a combination with dependent scalar quantization
HK40102793A (en) Efficient coding of transform coefficients using or suitable for a combination with dependent scalar quantization