HK40001158B - Video encoding and decoding apparatus using a quantization matrix - Google Patents
Video encoding and decoding apparatus using a quantization matrix Download PDFInfo
- Publication number
- HK40001158B HK40001158B HK19124462.3A HK19124462A HK40001158B HK 40001158 B HK40001158 B HK 40001158B HK 19124462 A HK19124462 A HK 19124462A HK 40001158 B HK40001158 B HK 40001158B
- Authority
- HK
- Hong Kong
- Prior art keywords
- quantization matrix
- matrix
- quantization
- scaling
- list
- Prior art date
Links
Description
本专利申请是下列发明专利申请的分案申请:This patent application is a divisional application of the following invention patent applications:
申请号:201380014811.0Application number: 201380014811.0
申请日:2013年1月21日Application date: January 21, 2013
发明名称:用于编码和解码量化矩阵的方法和使用其的设备Invention Title: Method for encoding and decoding quantization matrix and device using the same
技术领域Technical Field
本发明涉及图像编码和解码技术,并更具体地,涉及用于编码和解码量化索引的方法和设备。The present invention relates to image encoding and decoding technology, and more particularly, to a method and apparatus for encoding and decoding a quantization index.
背景技术Background Art
具有高清晰度(HD)分辨率的广播服务最近已在全世界以及本地扩展。因此,许多用户已变得习惯于具有高分辨率和高画面质量的图像,并且许多机构激励下一代图像装置的开发。Broadcast services with high definition (HD) resolution have recently been expanding worldwide and locally. As a result, many users have become accustomed to images with high resolution and high picture quality, and many organizations are encouraging the development of next-generation image devices.
因为存在对于具有比HDTV高四倍的分辨率的超高清晰度(UHD)以及HDTV的增长兴趣,所以存在对于具有更高分辨率和更高画面质量的图像的压缩技术的需求。As there is growing interest in ultra high definition (UHD) having a resolution four times higher than that of HDTV as well as HDTV, there is a demand for compression technology for images with higher resolution and higher picture quality.
关于图像压缩,可通过预测来编码关于当前画面的像素的信息。例如,能使用其中根据时间上在前和/或时间上在后的画面来预测当前画面中包括的像素值的帧间预测技术、和其中使用关于当前画面中的像素的信息来预测当前画面中包括的像素值的帧内预测技术。Regarding image compression, information about pixels of a current picture can be encoded by prediction. For example, an inter-frame prediction technique in which pixel values included in the current picture are predicted based on temporally previous and/or temporally subsequent pictures, and an intra-frame prediction technique in which pixel values included in the current picture are predicted using information about pixels in the current picture can be used.
此外,使用其中向具有高出现频率的码元分配短符号并向具有低出现频率的码元分配长符号的熵编码技术,能改进编码效率和降低传送信息的数量。Furthermore, using an entropy coding technique in which short symbols are assigned to symbols with a high frequency of occurrence and long symbols are assigned to symbols with a low frequency of occurrence, encoding efficiency can be improved and the amount of transmitted information can be reduced.
在该情况下,更有效地执行通过预测生成的残差块的变换系数的量化的方法是有问题的。In this case, a method of more efficiently performing quantization of transform coefficients of a residual block generated by prediction is problematic.
发明内容Summary of the Invention
本发明的目的是提供用于基于可用的变换块的尺寸来限制量化矩阵编码/解码的方法和设备。An object of the present invention is to provide a method and apparatus for limiting quantization matrix encoding/decoding based on the size of an available transform block.
本发明的另一目的是提供编码/解码方法和设备,其中能在序列、画面或片段中根据每一变换块的尺寸或量化矩阵的类型,来混合和使用缺省量化矩阵和非缺省量化矩阵。Another object of the present invention is to provide an encoding/decoding method and apparatus, in which a default quantization matrix and a non-default quantization matrix can be mixed and used according to the size of each transform block or the type of quantization matrix in a sequence, picture or slice.
本发明的另一目的是提供编码/解码方法和设备,其中基于参考量化矩阵ID来使用缺省量化矩阵。Another object of the present invention is to provide an encoding/decoding method and apparatus in which a default quantization matrix is used based on a reference quantization matrix ID.
本发明的另一目的是提供编码/解码方法和设备,其通过仅当存在参考量化矩阵时才执行量化矩阵的预测来增加编码效率。Another object of the present invention is to provide an encoding/decoding method and apparatus which increase encoding efficiency by performing prediction of a quantization matrix only when a reference quantization matrix exists.
本发明的另一目的是提供用于对DC矩阵系数有效执行预测和编码/解码的方法和设备。Another object of the present invention is to provide a method and apparatus for efficiently performing prediction and encoding/decoding on DC matrix coefficients.
本发明的另一目的是提供用于从和当执行编码/解码时的量化矩阵具有相同尺寸的量化矩阵、执行量化矩阵的预测的编码/解码方法和设备。Another object of the present invention is to provide an encoding/decoding method and apparatus for performing prediction of a quantization matrix from a quantization matrix having the same size as a quantization matrix when encoding/decoding is performed.
本发明的另一目的是提供用于基于量化矩阵内的第一系数来执行预测和编码/解码的方法和设备。Another object of the present invention is to provide a method and apparatus for performing prediction and encoding/decoding based on a first coefficient within a quantization matrix.
本发明的实施例提供了一种视频编码装置,该视频编码装置可包括:量化模块,配置为确定在量化中要使用的量化矩阵并执行量化;以及熵编码模块,配置为根据量化矩阵的预测方案来编码关于该量化矩阵的信息,其中所述量化矩阵的预测方案是量化矩阵中的系数之间的预测方案和量化矩阵拷贝方案中的任一个,其中所述量化矩阵具有4×4、8×8、16×16或32×32的尺寸。An embodiment of the present invention provides a video encoding device, which may include: a quantization module, configured to determine a quantization matrix to be used in quantization and perform quantization; and an entropy encoding module, configured to encode information about the quantization matrix according to a prediction scheme of the quantization matrix, wherein the prediction scheme of the quantization matrix is any one of a prediction scheme between coefficients in the quantization matrix and a quantization matrix copy scheme, wherein the quantization matrix has a size of 4×4, 8×8, 16×16 or 32×32.
本发明的另一实施例提供了一种视频解码装置,该视频解码装置可包括:熵解码模块,配置为根据量化矩阵的预测方案来解码量化矩阵;以及逆量化模块,被配置为使用量化矩阵执行逆量化,其中所述量化矩阵的预测方案是量化矩阵中的系数之间的预测方案和量化矩阵拷贝方案中的任一个,其中所述量化矩阵具有4×4、8×8、16×16或32×32的尺寸。Another embodiment of the present invention provides a video decoding device, which may include: an entropy decoding module configured to decode a quantization matrix according to a prediction scheme of the quantization matrix; and an inverse quantization module configured to perform inverse quantization using the quantization matrix, wherein the prediction scheme of the quantization matrix is any one of a prediction scheme between coefficients in the quantization matrix and a quantization matrix copy scheme, wherein the quantization matrix has a size of 4×4, 8×8, 16×16 or 32×32.
本发明的实施例提供了一种用于编码量化矩阵的方法,包括:确定在量化中要使用的量化矩阵并量化,确定在量化中使用的量化矩阵的预测方法,和根据确定的预测方法来编码关于量化矩阵的信息,其中该预测方法可以是预测量化矩阵中的系数间预测方法的方法和量化矩阵的拷贝中的任一个。An embodiment of the present invention provides a method for encoding a quantization matrix, comprising: determining a quantization matrix to be used in quantization and quantizing it, determining a prediction method for the quantization matrix used in quantization, and encoding information about the quantization matrix according to the determined prediction method, wherein the prediction method can be any one of a method of predicting an inter-coefficient prediction method in a quantization matrix and a copy of the quantization matrix.
本发明的另一实施例提供了一种用于解码量化矩阵的方法,包括:确定要在反量化中使用的量化矩阵的预测方法,和根据确定的预测方法来解码要在反量化中使用的量化矩阵,其中该量化矩阵的预测方法可以是量化矩阵内的系数间预测方法和量化矩阵的拷贝中的任一个。Another embodiment of the present invention provides a method for decoding a quantization matrix, comprising: determining a prediction method of a quantization matrix to be used in inverse quantization, and decoding the quantization matrix to be used in inverse quantization according to the determined prediction method, wherein the prediction method of the quantization matrix can be any one of an inter-coefficient prediction method within the quantization matrix and a copy of the quantization matrix.
根据本发明,通过基于可用的变换块的尺寸限制量化矩阵的编码,能改进编码效率并能降低计算的复杂程度。According to the present invention, by limiting the encoding of the quantization matrix based on the size of an available transform block, encoding efficiency can be improved and computational complexity can be reduced.
根据本发明,通过根据序列、画面、或片段内的每一变换块的尺寸或量化矩阵的类型混合和使用缺省量化矩阵和非缺省量化矩阵,能改进编码效率并能增加编码器选择量化矩阵时的自由度。According to the present invention, by mixing and using default quantization matrices and non-default quantization matrices according to the size or type of quantization matrix of each transform block within a sequence, picture, or segment, encoding efficiency can be improved and the freedom of the encoder in selecting a quantization matrix can be increased.
根据本发明,通过基于参考量化矩阵ID编码/解码关于是否将使用缺省量化矩阵的信息、或者仅当存在参考量化矩阵时才执行量化矩阵的预测,能改进编码效率,能降低计算的复杂程度,并能增加编码器选择量化矩阵时的自由度。According to the present invention, by encoding/decoding information about whether a default quantization matrix will be used based on a reference quantization matrix ID, or performing prediction of the quantization matrix only when a reference quantization matrix exists, coding efficiency can be improved, calculation complexity can be reduced, and the encoder's freedom in selecting a quantization matrix can be increased.
根据本发明,通过预测和编码/解码DC矩阵系数或从和当执行编码/解码时的量化矩阵具有相同尺寸的量化矩阵执行量化矩阵的预测,能改进编码效率,能降低计算的复杂程度,并能增加编码器选择量化矩阵时的自由度。According to the present invention, by predicting and encoding/decoding DC matrix coefficients or performing prediction of the quantization matrix from a quantization matrix having the same size as the quantization matrix when encoding/decoding is performed, the coding efficiency can be improved, the complexity of calculation can be reduced, and the freedom of the encoder in selecting the quantization matrix can be increased.
此外,根据本发明,通过使用频繁出现的系数值编码/解码量化矩阵内的第一系数,能改进编码效率并能降低计算的复杂程度。Furthermore, according to the present invention, by encoding/decoding the first coefficient within a quantization matrix using frequently occurring coefficient values, encoding efficiency can be improved and computational complexity can be reduced.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是示出了根据其中应用本发明的图像编码设备的实施例的构造的框图。FIG. 1 is a block diagram showing a configuration according to an embodiment of an image encoding apparatus to which the present invention is applied.
图2是示出了根据其中应用本发明的图像解码设备的实施例的构造的框图。FIG. 2 is a block diagram showing a configuration according to an embodiment of an image decoding apparatus to which the present invention is applied.
图3是示意性图示了其中将一个单元分区为多个下级单元的实施例的概念图。FIG. 3 is a conceptual diagram schematically illustrating an embodiment in which one unit is partitioned into a plurality of lower-level units.
图4是示意性图示了根据本发明的图像编码方法的流程图。FIG4 is a flowchart schematically illustrating an image encoding method according to the present invention.
图5是示意性图示了用于解码关于量化矩阵的信息并通过使用解码的信息来执行解码的解码器的操作的示例的流程图。FIG. 5 is a flowchart schematically illustrating an example of the operation of a decoder for decoding information about a quantization matrix and performing decoding by using the decoded information.
图6是示意性图示了根据本发明的执行反量化的方法的示例的流程图。FIG6 is a flowchart schematically illustrating an example of a method of performing inverse quantization according to the present invention.
图7是示意性图示了当在参数集中存在量化矩阵时获得关于量化矩阵的信息、并通过使用该信息来执行反量化的方法的示例的图。FIG. 7 is a diagram schematically illustrating an example of a method of obtaining information on a quantization matrix when the quantization matrix exists in a parameter set, and performing inverse quantization by using the information.
图8是示意性图示了当在参数集中存在量化矩阵时获得关于量化矩阵的信息、并通过使用该信息来执行反量化的方法的另一示例的图。FIG8 is a diagram schematically illustrating another example of a method of obtaining information on a quantization matrix when the quantization matrix exists in a parameter set, and performing inverse quantization by using the information.
具体实施方式DETAILED DESCRIPTION
其后,参考附图来详细描述本发明的实施例。此外,在描述本发明的实施例时,将省略已知功能和构造的详细描述,如果认为它们使得本发明的要义不必要的模糊的话。Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In addition, in describing the embodiments of the present invention, detailed descriptions of known functions and configurations will be omitted if they are deemed to make the gist of the present invention unnecessarily obscure.
在该说明书中,当认为一个元件与另一元件“连接”、“组合”或“耦接”时,所述一个元件可与所述另一元件直接连接或耦接,但是还应理解的是,第三元件可在这两个元件之间“连接”、“组合”或“耦接”。此外,在该说明书中,描述“包括(或包含)”特定元件的内容不意味着排除除了该特定元件之外的元件,而是意味着附加元件可包括在本发明的实现或本发明的技术精神的范围中。In this specification, when an element is referred to as being “connected,” “combined,” or “coupled” to another element, the element may be directly connected or coupled to the other element, but it should also be understood that a third element may be “connected,” “combined,” or “coupled” between the two elements. In addition, in this specification, descriptions of “including (or comprising)” specific elements do not mean excluding elements other than the specific elements, but rather mean that additional elements may be included within the scope of implementation of the present invention or the technical spirit of the present invention.
诸如“第一”和“第二”的术语可被用来描述各种元件,但是这些元件不限于这些术语。使用这些术语将一个元件与另一元件进行区分。例如,第一元件可被称为第二元件,并且同样,第二元件可被称为第一元件,而不脱离本发明的范围。Terms such as "first" and "second" may be used to describe various elements, but the elements are not limited to these terms. These terms are used to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the present invention.
此外,独立示出本发明的实施例中描述的元件,以便指示不同和特征功能,并且这不意味着每一元件组成单独硬件或一个软件模块。即,为了便于描述来安排这些元件,并且这些元件中的至少两个可组合以形成一个元件,或者一个元件可被划分为多个元件,并且所述多个元件可执行功能。其中组合元件或者划分每一元件的实施例被包括在本发明的范围中,而不脱离本发明的精髓。In addition, the elements described in the embodiments of the present invention are shown separately to indicate different and characteristic functions, and this does not mean that each element constitutes a separate hardware or software module. That is, these elements are arranged for ease of description, and at least two of these elements can be combined to form one element, or one element can be divided into multiple elements, and the multiple elements can perform functions. Embodiments in which the elements are combined or each element is divided are included in the scope of the present invention without departing from the spirit of the present invention.
此外,在本发明中,一些元件可以不是执行必要功能的必要元件,而可以是仅用于改进功能的可选元件。本发明可仅使用用于实现本发明的精髓的必要元件而不是仅用来改进性能的元件来实现,并且仅包括这些必要元件而不包括仅用于改进功能的可选元件的结构被包括在本发明的范围中。In addition, in the present invention, some elements may not be essential elements for performing essential functions, but may be optional elements for merely improving functions. The present invention may be implemented using only essential elements for achieving the essence of the present invention rather than elements for merely improving performance, and a structure including only these essential elements without including optional elements for merely improving functions is included in the scope of the present invention.
首先,为了便于描述和为了帮助理解本发明,简要描述该说明书中使用的术语。First, for the convenience of description and to help understanding of the present invention, terms used in this specification are briefly described.
单元意味着图像编码和解码的单元。换言之,在图像编码/解码中,当对一个图像进行细分和编码或解码时,编码单元或解码单元表示分区的单元。该单元也被称为块、宏块、编码单元、预测单元、变换单元、编码块、预测块、变换块等。一个单元可被分区为较小下级单元。A unit refers to a unit of image encoding and decoding. In other words, in image encoding/decoding, when a picture is subdivided and encoded or decoded, a coding unit or decoding unit represents a partitioned unit. This unit is also called a block, macroblock, coding unit, prediction unit, transform unit, coding block, prediction block, transform block, etc. A unit can be partitioned into smaller units.
变换单元是执行残差块的编码/解码(诸如变换、逆变换、量化、反量化、和变换系数编码/解码)的基本单元。一个变换单元可被分区为多个较小变换单元。此外,变换单元可被用作与变换块相同的含义。包括与用于亮度和色度信号的变换块相关的语法元素的形式可被称为变换单元。A transform unit is a basic unit for performing encoding/decoding of a residual block (such as transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding/decoding). One transform unit can be partitioned into multiple smaller transform units. In addition, a transform unit can be used to have the same meaning as a transform block. A form including syntax elements related to transform blocks for luminance and chrominance signals can be called a transform unit.
量化矩阵意味着为了改进图像的主观画面质量或客观画面质量而在量化或逆量化处理中使用的矩阵。量化矩阵也被称为缩放列表。并且逆量化处理与反量化处理相同。A quantization matrix is a matrix used in quantization or inverse quantization to improve the subjective or objective image quality of an image. A quantization matrix is also called a scaling matrix. Inverse quantization is the same as inverse quantization.
量化/反量化中使用的量化矩阵可按照比特流的形式传送,并且可使用已在编码器和/或解码器中包括的缺省矩阵作为量化矩阵。根据每一量化矩阵的尺寸或其中通过序列参数集(SPS)或画面参数集(PPS)应用量化矩阵的变换块的尺寸,关于量化矩阵的信息可一次全部(in a lump)传送。例如,可传送用于4x4变换块的4x4量化矩阵,可传送用于8x8变换块的8x8矩阵,可传送用于16x16变换块的16x16矩阵,并可传送用于32x32变换块的32x32矩阵。The quantization matrix used in quantization/inverse quantization can be transmitted in the form of a bitstream, and a default matrix already included in the encoder and/or decoder can be used as the quantization matrix. Depending on the size of each quantization matrix or the size of the transform block to which the quantization matrix is applied via a sequence parameter set (SPS) or a picture parameter set (PPS), information about the quantization matrix can be transmitted all at once (in a lump). For example, a 4x4 quantization matrix for a 4x4 transform block can be transmitted, an 8x8 matrix for an 8x8 transform block can be transmitted, a 16x16 matrix for a 16x16 transform block can be transmitted, and a 32x32 matrix for a 32x32 transform block can be transmitted.
向当前块施加的量化矩阵可(1)通过拷贝具有相同尺寸的量化矩阵来获得和(2)通过根据量化矩阵中的先前矩阵系数进行预测来生成。具有相同尺寸的矩阵可以是已先前编码或解码或使用的量化矩阵、参考量化矩阵、或缺省量化矩阵。或者,可以通过包括已先前编码或解码或使用的量化矩阵、参考量化矩阵、和缺省量化矩阵中的至少两个的组合,来选择性确定具有相同尺寸的矩阵。The quantization matrix applied to the current block may be (1) obtained by copying a quantization matrix having the same size and (2) generated by predicting based on previous matrix coefficients in the quantization matrix. The matrix having the same size may be a quantization matrix that has been previously encoded, decoded, or used, a reference quantization matrix, or a default quantization matrix. Alternatively, the matrix having the same size may be selectively determined by a combination including at least two of a quantization matrix that has been previously encoded, decoded, or used, a reference quantization matrix, and a default quantization matrix.
参数集对应于关于比特流中的结构的报头的信息,并具有共同表示序列参数集、画面参数集、自适应参数集等的含义。The parameter set corresponds to information on a header of a structure in a bitstream, and has a meaning collectively indicating a sequence parameter set, a picture parameter set, an adaptation parameter set, and the like.
量化参数是在量化和反量化中使用的值,并可以是映射到量化步长尺寸的值。The quantization parameter is a value used in quantization and inverse quantization, and may be a value mapped to a quantization step size.
缺省矩阵可意味着已在编码器和/或解码器中先前定义的特定量化矩阵。本说明书中稍后要描述的缺省量化矩阵可被用作和缺省矩阵相同的含义。非缺省矩阵可意味着还没有在编码器和/或解码器中先前定义、并从编码器传送到解码器(即,用户传送/接收)的量化矩阵。本说明书中稍后要描述的非缺省量化矩阵能被用作和非缺省矩阵相同的含义。A default matrix may refer to a specific quantization matrix that has been previously defined in an encoder and/or decoder. A default quantization matrix to be described later in this specification may be used as the same as a default matrix. A non-default matrix may refer to a quantization matrix that has not been previously defined in an encoder and/or decoder and is transmitted from the encoder to the decoder (i.e., transmitted/received by a user). A non-default quantization matrix to be described later in this specification can be used as the same as a non-default matrix.
图1是示出了根据其中应用本发明的图像编码设备的实施例的构造的框图。FIG. 1 is a block diagram showing a configuration according to an embodiment of an image encoding apparatus to which the present invention is applied.
参考图1,图像编码设备100包括运动预测模块111、运动补偿模块112、帧内预测模块120、开关115、减法器125、变换模块130、量化模块140、熵编码模块150、反量化(逆量化)模块160、逆变换模块170、加法器175、滤波器模块180、和参考图像缓冲器190。1 , the image encoding apparatus 100 includes a motion prediction module 111, a motion compensation module 112, an intra-prediction module 120, a switch 115, a subtractor 125, a transform module 130, a quantization module 140, an entropy encoding module 150, an inverse quantization (dequantization) module 160, an inverse transform module 170, an adder 175, a filter module 180, and a reference image buffer 190.
图像编码设备100可按照帧内模式或帧间模式对输入图像执行编码并输出比特流。帧内预测意味着帧内部预测,而帧间预测意味着帧之间预测。在帧内模式的情况下,开关115可切换到帧内模式,而在帧间模式的情况下,开关115可切换到帧间模式。在生成用于输入图像的输入块的预测块之后,图像编码设备100可编码输入块和预测块之间的差。这里,输入图像可意味着原始图像。The image encoding apparatus 100 may encode an input image in intra mode or inter mode and output a bitstream. Intra prediction refers to prediction within a frame, while inter prediction refers to prediction between frames. In the case of intra mode, the switch 115 may switch to intra mode, while in the case of inter mode, the switch 115 may switch to inter mode. After generating a prediction block for an input block of the input image, the image encoding apparatus 100 may encode the difference between the input block and the prediction block. Here, the input image may refer to the original image.
在帧内模式的情况下,帧内预测模块120可通过基于与当前块相邻的已编码块的像素值执行空间预测,来生成预测块。In case of the intra mode, the intra prediction module 120 may generate a predicted block by performing spatial prediction based on pixel values of encoded blocks adjacent to the current block.
在帧间模式的情况下,运动预测模块111可在运动预测处理中在参考图像缓冲器190中存储的参考图像中搜索与输入块最佳匹配的区域,并基于检索的区域来获得运动向量。运动补偿模块112能通过使用运动向量执行运动补偿,来生成预测块。这里,运动向量是在帧间预测中使用的2维向量,并且运动向量可指示当前块和参考图像中的块之间的偏移。In the case of inter-frame mode, the motion prediction module 111 can search for an area that best matches the input block in the reference image stored in the reference image buffer 190 during the motion prediction process and obtain a motion vector based on the retrieved area. The motion compensation module 112 can generate a predicted block by performing motion compensation using a motion vector. Here, a motion vector is a 2-dimensional vector used in inter-frame prediction and can indicate the offset between the current block and a block in the reference image.
减法器125可基于输入块和生成的预测块之间的差来生成残差块。变换模块130可通过对残差块执行变换来输出变换系数。接下来,量化模块140可通过使用量化参数和量化矩阵中的至少一个对接收的变换系数进行量化,来输出量化后的系数。这里,量化矩阵可被输入到编码器,并且可以确定在编码器中使用输入的量化矩阵。The subtractor 125 may generate a residual block based on the difference between the input block and the generated prediction block. The transform module 130 may output transform coefficients by performing a transform on the residual block. Next, the quantization module 140 may output quantized coefficients by quantizing the received transform coefficients using at least one of a quantization parameter and a quantization matrix. Here, the quantization matrix may be input to the encoder, and the input quantization matrix may be determined to be used in the encoder.
熵编码模块150可通过基于量化模块140所计算的值或在编码处理中计算的编码参数值等执行熵编码,来输出比特流。如果施加熵编码,则可通过向具有高出现概率的码元分配小数目比特并向具有低出现概率的码元分配大数目比特,来表示码元,以便降低用于编码要编码的码元的比特流的尺寸。因此,能通过熵编码来增加图像编码的压缩性能。熵编码模块150可使用诸如指数哥伦布编码、上下文自适应可变长度编码(CAVLC)和上下文自适应二进制算术编码(CABAC)的编码方法用于熵编码。The entropy coding module 150 can output a bit stream by performing entropy coding based on the value calculated by the quantization module 140 or the coding parameter value calculated in the coding process. If entropy coding is applied, the codewords can be represented by allocating a small number of bits to codewords with a high probability of occurrence and a large number of bits to codewords with a low probability of occurrence, so as to reduce the size of the bit stream used to encode the codewords to be encoded. Therefore, the compression performance of the image encoding can be increased by entropy coding. The entropy coding module 150 can use coding methods such as exponential Golomb coding, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) for entropy coding.
根据图1的实施例的图像编码设备(其后称为编码器)执行帧间预测编码(即,帧间预测编码),并由此当前编码的图像需要被解码和存储,以便用作参考图像。因此,量化后的系数经受反量化模块160的反量化并经受逆变换模块170的逆变换。逆量化和逆变换后的系数成为重构后的残差块,并且通过加法器175将重构后的残差块添加到预测块,由此生成重构块。The image encoding device (hereinafter referred to as an encoder) according to the embodiment of FIG. 1 performs inter-frame prediction encoding (i.e., inter-frame prediction encoding), and thus the currently encoded image needs to be decoded and stored so as to be used as a reference image. Therefore, the quantized coefficients are dequantized by the dequantization module 160 and inversely transformed by the inverse transform module 170. The dequantized and inversely transformed coefficients become a reconstructed residual block, and the reconstructed residual block is added to the prediction block by the adder 175, thereby generating a reconstructed block.
重构块经过(experiences)滤波器模块180。滤波器模块180可向重构块或重构画面应用解块滤波器、样本自适应偏移(SAO)、和自适应环路滤波器(ALF)中的一个或多个。滤波器模块180也可被称为环内滤波器。解块滤波器可去除在块的边界处已出现的块的失真。SAO可向像素值添加适当偏移值以便补偿编码误差。ALF可基于通过比较重构图像与原始图像而获得的值,来执行滤波。已经过滤波器模块180的重构块可被存储在参考图像缓冲器190中。The reconstructed block experiences a filter module 180. The filter module 180 may apply one or more of a deblocking filter, sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstructed block or picture. The filter module 180 may also be referred to as an in-loop filter. The deblocking filter may remove block distortion that occurs at block boundaries. The SAO may add an appropriate offset value to pixel values to compensate for coding errors. The ALF may perform filtering based on a value obtained by comparing the reconstructed image with the original image. The reconstructed block that has passed through the filter module 180 may be stored in the reference image buffer 190.
图2是示出了根据其中应用本发明的图像解码设备的实施例的构造的框图。FIG. 2 is a block diagram showing a configuration according to an embodiment of an image decoding apparatus to which the present invention is applied.
参考图2,图像解码设备200包括熵解码模块210、反量化(逆量化)模块220、逆变换模块230、帧内预测模块240、运动补偿模块250、加法器255、滤波器模块260、和参考图像缓冲器270。2 , the image decoding apparatus 200 includes an entropy decoding module 210 , an inverse quantization (dequantization) module 220 , an inverse transform module 230 , an intra prediction module 240 , a motion compensation module 250 , an adder 255 , a filter module 260 , and a reference image buffer 270 .
图像解码设备200可接收从编码器输出的比特流,按照帧内模式或帧间模式来对比特流执行解码,并输出重构的图像。在帧内模式的情况下,开关可切换到帧内模式。在帧间模式的情况下,开关可切换到帧间模式。图像解码设备200可从接收的比特流获得重构的残差块,生成预测块,并通过将重构的残差块添加到预测块来生成重构块。The image decoding apparatus 200 may receive a bitstream output from an encoder, decode the bitstream in intra mode or inter mode, and output a reconstructed image. In the case of intra mode, the switch may be switched to intra mode. In the case of inter mode, the switch may be switched to inter mode. The image decoding apparatus 200 may obtain a reconstructed residual block from the received bitstream, generate a prediction block, and generate a reconstructed block by adding the reconstructed residual block to the prediction block.
熵解码模块210可通过根据概率分布对输入比特流执行熵解码,来生成包括具有量化后的系数形式的码元的码元。熵解码方法与上述熵编码方法类似。The entropy decoding module 210 may generate symbols including symbols in the form of quantized coefficients by performing entropy decoding on the input bitstream according to a probability distribution. The entropy decoding method is similar to the above-mentioned entropy encoding method.
如果应用熵解码方法,则可通过向具有高出现概率的码元分配小数目比特并向具有低出现概率的码元分配大数目比特来表示码元,以便降低每一码元的比特流的尺寸。If the entropy decoding method is applied, symbols may be represented by allocating a small number of bits to symbols having a high probability of occurrence and a large number of bits to symbols having a low probability of occurrence, so as to reduce the size of a bit stream per symbol.
量化后的系数可经受反量化模块220基于量化参数的反量化,并可经受逆变换模块230的逆变换。作为对量化后的系数的反量化/逆变换的结果,可生成重构的残差块。The quantized coefficients may be subjected to inverse quantization based on a quantization parameter by the inverse quantization module 220 and may be subjected to inverse transformation by the inverse transformation module 230. As a result of the inverse quantization/inverse transformation of the quantized coefficients, a reconstructed residual block may be generated.
反量化中使用的量化矩阵也被称为缩放列表。反量化模块220能通过向量化后的系数应用量化矩阵,来生成逆量化后的系数。The quantization matrix used in inverse quantization is also called a scaling list. The inverse quantization module 220 can generate inverse quantized coefficients by applying the quantization matrix to the quantized coefficients.
这里,反量化模块220可响应于编码器应用的量化来执行反量化。例如,反量化模块220可通过向量化后的系数相反应用编码器所应用的量化矩阵,来执行反量化。Here, the inverse quantization module 220 may perform inverse quantization in response to the quantization applied by the encoder. For example, the inverse quantization module 220 may perform inverse quantization by applying the quantization matrix applied by the encoder to the quantized coefficients.
图像解码设备200(其后称为解码器)在反量化中使用的量化矩阵可从比特流接收,并且已在编码器和/或解码器中包括的缺省矩阵可被用作量化矩阵。根据每一量化矩阵的尺寸或其中通过序列参数集或画面参数集应用量化矩阵的变换块的尺寸,所传送的关于量化矩阵的信息可一次全部接收。例如,可接收用于4x4变换块的4x4量化矩阵,可接收用于8x8变换块的8x8矩阵,可接收用于16x16变换块的16x16矩阵,并可接收用于32x32变换块的32x32矩阵。The image decoding apparatus 200 (hereinafter referred to as a decoder) may receive the quantization matrix used for inverse quantization from the bitstream, and a default matrix already included in the encoder and/or decoder may be used as the quantization matrix. The transmitted information about the quantization matrix may be received all at once, depending on the size of each quantization matrix or the size of the transform block to which the quantization matrix is applied by a sequence parameter set or a picture parameter set. For example, a 4x4 quantization matrix for a 4x4 transform block may be received, an 8x8 matrix for an 8x8 transform block may be received, a 16x16 matrix for a 16x16 transform block may be received, and a 32x32 matrix for a 32x32 transform block may be received.
在帧内模式的情况下,帧内预测模块240可通过使用当前块周围的已解码块的像素值执行空间预测,来生成预测块。在帧间模式的情况下,运动补偿模块250可通过使用运动向量和参考图像缓冲器270中存储的参考图像执行运动补偿,来生成预测块。In the case of intra mode, the intra prediction module 240 can generate a prediction block by performing spatial prediction using pixel values of decoded blocks around the current block. In the case of inter mode, the motion compensation module 250 can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference image buffer 270.
加法器255将重构的残差块和预测块相加到一起,并且相加的块能经过滤波器模块260。滤波器模块260可向重构的块或重构的画面应用解块滤波器、SAO、和ALF中的一个或多个。滤波器模块260能输出重构的图像(即,恢复的图像)。重构的图像可被存储在参考图像缓冲器270中并用于帧间预测。The adder 255 adds the reconstructed residual block and the prediction block together, and the added block can pass through the filter module 260. The filter module 260 can apply one or more of a deblocking filter, SAO, and ALF to the reconstructed block or reconstructed picture. The filter module 260 can output a reconstructed image (i.e., a restored image). The reconstructed image can be stored in the reference image buffer 270 and used for inter-frame prediction.
其间,块分区信息可包括关于单元的深度的信息。该深度信息可指示单元被分区的次数和/或单元被分区的程度。Meanwhile, the block partition information may include information about the depth of the unit. The depth information may indicate the number of times the unit is partitioned and/or the extent to which the unit is partitioned.
图3是示意性图示了其中将一个单元分区为多个下级单元的实施例的概念图。FIG. 3 is a conceptual diagram schematically illustrating an embodiment in which one unit is partitioned into a plurality of lower-level units.
可利用深度信息基于树结构来对一个单元或块进行分级分区。每一分区的下级单元可具有深度信息。该深度信息可包括关于下级单元的尺寸的信息,因为它指示单元被分区的次数和/或单元被分区的程度。Depth information can be used to hierarchically partition a unit or block based on a tree structure. The lower-level units of each partition may have depth information. The depth information may include information about the size of the lower-level unit, as it indicates the number of times the unit is partitioned and/or the degree to which the unit is partitioned.
参考图3的310,最高节点可被称为根节点,而最高节点能具有最小深度值。这里,最高节点能具有级别0的深度,并能指示还没有分区的第一单元。3 , the highest node may be referred to as a root node, and the highest node may have a minimum depth value. Here, the highest node may have a depth of level 0 and may indicate a first unit that has not yet been partitioned.
具有级别1的深度的下级节点能指示从第一单元分区一次的单元,并且具有级别2的深度的下级节点能指示从第一单元分区两次的单元。例如,在图3的320中,对应于节点“a”的单元“a”是从第一单元分区一次的单元,并且单元“a”能具有级别1的深度。A lower-level node having a depth of level 1 can indicate a cell partitioned once from the first cell, and a lower-level node having a depth of level 2 can indicate a cell partitioned twice from the first cell. For example, in 320 of FIG. 3 , cell “a” corresponding to node “a” is a cell partitioned once from the first cell, and cell “a” can have a depth of level 1.
级别3的叶节点能指示从第一单元分区三次的单元。例如,在图3的320中,对应于节点“d”的单元“d”是从第一单元分区三次的单元,并且单元“d”能具有级别3的深度。因此,级别3的叶节点(即,最低节点)能具有最深深度。The leaf nodes at level 3 can indicate cells partitioned three times from the first cell. For example, in 320 of FIG3 , cell “d” corresponding to node “d” is a cell partitioned three times from the first cell, and cell “d” can have a depth of level 3. Therefore, the leaf nodes at level 3 (i.e., the lowest nodes) can have the deepest depth.
迄今已描述了示意性编码/解码方法。如同编码/解码的其他处理,编码/解码处理的量化和逆量化处理中使用的量化矩阵编码/解码方法对编码效率具有大影响。因此,必须通过考虑编码效率来改进量化/反量化。The above descriptions illustrate exemplary encoding/decoding methods. Like other encoding/decoding processes, the quantization matrix used in the quantization and inverse quantization processes of the encoding/decoding method significantly affects coding efficiency. Therefore, improvements in quantization/inverse quantization must be made with coding efficiency in mind.
更具体地,传统上,通过不考虑可用的变换单元的最小尺寸和最大尺寸,来对所有变换的量化矩阵进行编码/解码。此外,传统上,一次全部应用量化矩阵,而不在序列、画面或片段中根据变换的尺寸或量化矩阵的类型来混合和使用缺省矩阵和非缺省矩阵。因此,存在的缺点在于,编码器选择量化矩阵时的自由度低,并且编码效率低,因为不需要编码/解码的缺省矩阵必须被编码和传送。More specifically, conventionally, quantization matrices for all transforms are encoded/decoded without regard to the minimum and maximum sizes of available transform units. Furthermore, conventionally, quantization matrices are applied all at once, without mixing and using default matrices and non-default matrices depending on the size of the transform or the type of quantization matrix in a sequence, picture, or slice. Consequently, there are disadvantages in that the encoder has limited freedom in selecting quantization matrices, and coding efficiency is low because default matrices that do not need to be encoded/decoded must be encoded and transmitted.
如上所述,根据传统方法,在应用量化矩阵时,自由度和编码效率低,并且复杂程度高。As described above, according to the conventional method, when a quantization matrix is applied, the degree of freedom and encoding efficiency are low, and the degree of complexity is high.
为了解决这些问题,需要考虑有效使用量化矩阵的方法,以便改进编码效率并降低量化/反量化中的复杂程度。In order to solve these problems, it is necessary to consider a method of effectively using a quantization matrix in order to improve encoding efficiency and reduce complexity in quantization/inverse quantization.
图4是示意性图示了根据本发明的图像编码方法的流程图。FIG4 is a flowchart schematically illustrating an image encoding method according to the present invention.
参考图4,在步骤S410,编码器确定关于当前序列或画面的变换单元的尺寸的信息并编码该信息。4 , in step S410 , the encoder determines information about the size of a transform unit of a current sequence or picture and encodes the information.
关于变换单元的尺寸的信息意味着变换单元的最小尺寸和最大尺寸中的至少一个。当编码图像时,编码器能确定变换单元的最小尺寸和最大尺寸。The information about the size of the transformation unit means at least one of a minimum size and a maximum size of the transformation unit. When encoding an image, the encoder can determine the minimum size and the maximum size of the transformation unit.
例如,编码器能将正方形变换单元的最小尺寸确定为4x4块或者能将正方形变换单元的最大尺寸确定为32x32块。此外,编码器可将正方形变换单元的最小尺寸和最大尺寸分别确定为4x4块和32x32块。编码器能根据正方形变换单元的最小尺寸和最大尺寸执行编码。For example, the encoder can determine the minimum size of the square transformation unit as a 4x4 block or the maximum size of the square transformation unit as a 32x32 block. In addition, the encoder can determine the minimum size and maximum size of the square transformation unit as a 4x4 block and a 32x32 block, respectively. The encoder can perform encoding according to the minimum size and maximum size of the square transformation unit.
编码器能对对于比特流所确定的关于变换单元的尺寸的信息执行熵编码。例如,编码器能在比特流中将所确定的关于变换单元的尺寸的信息编码为参数集。The encoder can perform entropy coding on the information about the size of the transform unit determined for the bitstream.For example, the encoder can encode the information about the size of the transform unit determined as a parameter set in the bitstream.
如上所述,关于变换单元的尺寸的信息表示关于变换单元的最小尺寸和最大尺寸中的至少一个的信息。因此,编码器能将关于变换单元的最小尺寸和最大尺寸的信息作为关于变换单元的尺寸的信息编码到比特流中。这里,变换单元的最大尺寸能使用变换单元的最大尺寸和变换单元的最小尺寸之间的差值来指定。As described above, the information about the size of the transformation unit represents information about at least one of the minimum size and the maximum size of the transformation unit. Therefore, the encoder can encode the information about the minimum size and the maximum size of the transformation unit into the bitstream as the information about the size of the transformation unit. Here, the maximum size of the transformation unit can be specified using the difference between the maximum size of the transformation unit and the minimum size of the transformation unit.
表格1示意性示出了已被熵编码为比特流的序列参数集的关于变换单元的尺寸的信息的示例。Table 1 schematically shows an example of information on the size of a transform unit that has been entropy-coded as a sequence parameter set of a bitstream.
<表格1><Table 1>
如同表格1中图示的语法元素中那样,在通过向正方形变换单元的最小水平或垂直尺寸应用Log2函数来计算Log2MinTrafoSize之后,编码器能指定通过使用log2_min_transform_block_size_minus2从Log2MinTrafoSize减去2而获得的值。此外,在通过向正方形变换单元的最大水平或垂直尺寸应用Log2函数来计算Log2MaxTrafoSize之后,编码器能通过使用log2_diff_max_min_transform_block_size来指定Log2MaxTrafoSize和Log2MinTrafoSize之间的差值。编码器能将log2_min_transform_block_size_minus2和log2_diff_max_min_transform_block_size(即,语法元素)编码为比特流,并将得到的比特流发送到解码器。换言之,编码器能编码log2_min_transform_block_size_minus2和log2_diff_max_min_transform_block_size所指示的值,并按照比特流的形式来发送所编码的值。As in the syntax elements illustrated in Table 1, after calculating Log2MinTrafoSize by applying the Log2 function to the minimum horizontal or vertical size of a square transform unit, the encoder can specify a value obtained by subtracting 2 from Log2MinTrafoSize using log2_min_transform_block_size_minus2. Furthermore, after calculating Log2MaxTrafoSize by applying the Log2 function to the maximum horizontal or vertical size of a square transform unit, the encoder can specify the difference between Log2MaxTrafoSize and Log2MinTrafoSize using log2_diff_max_min_transform_block_size. The encoder can encode log2_min_transform_block_size_minus2 and log2_diff_max_min_transform_block_size (i.e., syntax elements) into a bitstream and transmit the resulting bitstream to the decoder. In other words, the encoder can encode the values indicated by log2_min_transform_block_size_minus2 and log2_diff_max_min_transform_block_size and transmit the encoded values in the form of a bitstream.
编码器能在步骤S420编码关于量化矩阵的信息。编码器能编码关于量化矩阵的信息,包括以下的一个或多个:(1)关于是否已使用量化矩阵的信息、(2)关于是否存在量化矩阵的信息、(3)关于是否已编码量化矩阵以及是否已使用缺省矩阵的信息、(4)预测编码方法和量化矩阵的类型、(5)参考量化矩阵ID(标识符)、和(6)已先前编码的量化矩阵的系数值和量化矩阵中要编码的量化矩阵的系数值之间的差值。The encoder can encode information about the quantization matrix in step S420. The encoder can encode information about the quantization matrix, including one or more of the following: (1) information about whether the quantization matrix has been used, (2) information about whether the quantization matrix exists, (3) information about whether the quantization matrix has been encoded and whether a default matrix has been used, (4) a predictive encoding method and a type of quantization matrix, (5) a reference quantization matrix ID (identifier), and (6) a difference between coefficient values of a previously encoded quantization matrix and coefficient values of a quantization matrix to be encoded in the quantization matrix.
这里,编码器可基于关于变换单元的尺寸的信息,来编码关于量化矩阵的信息。Here, the encoder may encode information about the quantization matrix based on information about the size of the transform unit.
其后,参考图和下面的表格来详细描述用于编码关于量化矩阵的信息的方法。Hereinafter, a method for encoding information about a quantization matrix is described in detail with reference to the drawings and the following tables.
关于量化矩阵的信息指示编码器所确定或使用的方法。例如,编码器能确定是否使用量化矩阵,并能将关于是否已使用量化矩阵的信息编码为参数集。因此,所编码的关于是否已使用量化矩阵的信息指示是否已使用编码器所确定的量化矩阵。The information about the quantization matrix indicates the method determined or used by the encoder. For example, the encoder can determine whether to use a quantization matrix and can encode the information about whether the quantization matrix has been used as a parameter set. Therefore, the encoded information about whether the quantization matrix has been used indicates whether the quantization matrix determined by the encoder has been used.
表格2示出其中将关于是否已使用量化矩阵的信息编码为序列参数的示例。Table 2 shows an example in which information on whether a quantization matrix has been used is encoded as a sequence parameter.
<表格2><Table 2>
如同表格2的语法中那样,编码器能将scaling_list_enabled_flag(即,关于是否已使用量化矩阵的信息)编码为序列参数集,并将编码的信息发送到解码器。当scaling_list_enabled_flag的值是1时,它可指示对于所有序列在变换系数的反量化/缩放中使用该量化矩阵。当scaling_list_enabled_flag的值是0时,它可指示在变换系数的反量化/缩放中不使用该量化矩阵。这里,语法能意味着语法元素。As in the syntax of Table 2, the encoder can encode scaling_list_enabled_flag (i.e., information on whether a quantization matrix is used) as a sequence parameter set and transmit the encoded information to the decoder. When the value of scaling_list_enabled_flag is 1, it can indicate that the quantization matrix is used in the inverse quantization/scaling of transform coefficients for all sequences. When the value of scaling_list_enabled_flag is 0, it can indicate that the quantization matrix is not used in the inverse quantization/scaling of transform coefficients. Here, syntax can mean a syntax element.
在确定是否存在量化矩阵之后,编码器能将关于是否存在量化矩阵的信息编码为参数集。After determining whether a quantization matrix exists, the encoder can encode information on whether the quantization matrix exists as a parameter set.
表格3示出其中将关于是否存在量化矩阵的信息编码为参数集的示例。Table 3 shows an example in which information on whether a quantization matrix exists is encoded as a parameter set.
<表格3><Table 3>
如同表格3的语法中那样,编码器能将aps_scaling_list_data_present_flag(即,关于是否存在量化矩阵的信息)编码为参数集。在表格3中,已图示了其中将关于是否存在量化矩阵的信息编码为自适应参数集的示例,但是本发明不限于此。例如,编码器可将关于是否存在量化矩阵的信息编码为另一参数集。As in the syntax of Table 3, the encoder can encode aps_scaling_list_data_present_flag (i.e., information on whether a quantization matrix exists) as a parameter set. In Table 3, an example in which information on whether a quantization matrix exists is encoded as an adaptive parameter set is illustrated, but the present invention is not limited thereto. For example, the encoder may encode information on whether a quantization matrix exists as another parameter set.
在表格3中,当aps_scaling_list_data_present_flag的值是1时,它指示在该自适应参数集中存在该量化矩阵。当aps_scaling_list_data_present_flag的值是0时,它指示在该自适应参数集中不存在该量化矩阵。如果scaling_list_enabled_flag的值是1并且aps_scaling_list_data_present_flag的值是0,则这可意味着当执行反量化时使用缺省矩阵。此外,关于是否存在量化矩阵的信息能在不同参数集中存在。例如,如果使用指示是否在序列中存在量化矩阵的sps_scaling_list_data_present_flag和指示是否在画面中存在量化矩阵的pps_scaling_list_data_present_flag,则当sps_scaling_list_data_present_flag的值为1并且pps_scaling_list_data_present_flag的值为0时,当执行量化/反量化时,能使用与该序列对应的量化矩阵。即,如果通过几个参数集传送量化矩阵并且在一些参数集中不存在量化矩阵,则当执行量化/反量化时,能使用在活动参数集中存在或不存在的量化矩阵。从稍后要描述的实施例中,以上内容也能应用到其中对关于是否存在量化矩阵的信息进行编码/解码的内容。In Table 3, when the value of aps_scaling_list_data_present_flag is 1, it indicates that the quantization matrix exists in the adaptive parameter set. When the value of aps_scaling_list_data_present_flag is 0, it indicates that the quantization matrix does not exist in the adaptive parameter set. If the value of scaling_list_enabled_flag is 1 and the value of aps_scaling_list_data_present_flag is 0, this may mean that a default matrix is used when performing inverse quantization. In addition, information about whether a quantization matrix exists can exist in different parameter sets. For example, if sps_scaling_list_data_present_flag indicating whether a quantization matrix exists in a sequence and pps_scaling_list_data_present_flag indicating whether a quantization matrix exists in a picture are used, when the value of sps_scaling_list_data_present_flag is 1 and the value of pps_scaling_list_data_present_flag is 0, the quantization matrix corresponding to the sequence can be used when performing quantization/inverse quantization. That is, if a quantization matrix is transmitted through several parameter sets and the quantization matrix does not exist in some parameter sets, when performing quantization/inverse quantization, the quantization matrix that exists or does not exist in the active parameter set can be used. From the embodiments to be described later, the above can also be applied to content in which information on the presence or absence of a quantization matrix is encoded/decoded.
在确定是否编码量化矩阵以及是否使用缺省矩阵之后,编码器能将关于是否已编码量化矩阵和是否已使用缺省矩阵的信息编码为参数集。After determining whether to encode the quantization matrix and whether to use the default matrix, the encoder can encode information on whether the quantization matrix has been encoded and whether the default matrix has been used as a parameter set.
表格4示出其中将关于是否已编码量化矩阵和是否已使用缺省矩阵的信息编码为参数集的示例。Table 4 shows an example in which information on whether a quantization matrix has been encoded and whether a default matrix has been used is encoded as a parameter set.
<表格4><Table 4>
如同表格4的语法中那样,编码器能将use_default_scaling_list_flag(即,关于是否已编码量化矩阵和是否已使用缺省矩阵的信息)编码为自适应参数集。当use_default_scaling_list_flag的值为1时,不编码量化矩阵并由此所有量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。当use_default_scaling_list_flag的值为0时,编码量化矩阵并且不使用编码器和/或解码器中定义的缺省矩阵。As in the syntax of Table 4, the encoder can encode use_default_scaling_list_flag (i.e., information about whether the quantization matrix has been encoded and whether the default matrix has been used) as an adaptation parameter set. When the value of use_default_scaling_list_flag is 1, the quantization matrix is not encoded and thus the coefficient values of all quantization matrices are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. When the value of use_default_scaling_list_flag is 0, the quantization matrix is encoded and the default matrix defined in the encoder and/or decoder is not used.
表格4图示了其中将use_default_scaling_list_flag编码为自适应参数集的示例。这仅是为了便于描述的示例。在一些实施例中,use_default_scaling_list_flag可被编码为另一参数集。Table 4 illustrates an example in which use_default_scaling_list_flag is encoded as an adaptive parameter set. This is merely an example for ease of description. In some embodiments, use_default_scaling_list_flag may be encoded as another parameter set.
可通过考虑变换单元的尺寸或变换块的尺寸、编码模式、和颜色分量,来确定关于量化矩阵的信息。此外,关于量化矩阵的信息可指示对应信息是亮度分量(Y,luma)还是色度分量(Cb,Cr,chroma)。The information about the quantization matrix can be determined by considering the size of the transform unit or the size of the transform block, the encoding mode, and the color component. In addition, the information about the quantization matrix can indicate whether the corresponding information is a luminance component (Y, luma) or a chrominance component (Cb, Cr, chroma).
例如,编码器能通过使用SizeID(即,与量化矩阵的尺寸对应的信息)和MatrixID(即,与量化矩阵的类型对应的信息),来确定量化矩阵的编码、是否使用缺省矩阵、和预测编码方法中的至少一个。这里,SizeID可被解释为关于与变换单元的尺寸对应的量化矩阵的信息或关于与变换块的尺寸对应的量化矩阵的信息。此外,该说明书中使用的SizeID与sizeID和sizeId相同,并且MatrixID与matrixID和matrixId相同。For example, the encoder can determine at least one of encoding of the quantization matrix, whether to use a default matrix, and a predictive encoding method by using SizeID (i.e., information corresponding to the size of the quantization matrix) and MatrixID (i.e., information corresponding to the type of the quantization matrix). Here, SizeID can be interpreted as information about the quantization matrix corresponding to the size of the transform unit or information about the quantization matrix corresponding to the size of the transform block. In addition, SizeID used in this specification is the same as sizeID and sizeId, and MatrixID is the same as matrixID and matrixId.
这里,编码器可使用其中存储的表格和/或解码器中存储的表格。Here, the encoder may use a table stored therein and/or a table stored in the decoder.
表格5示出了用来指示变换块的尺寸或与变换块对应的量化矩阵的尺寸的表格的示例。Table 5 shows an example of a table used to indicate the size of a transform block or the size of a quantization matrix corresponding to the transform block.
<表格5><Form 5>
在表格5的示例中,SizeID值指定变换单元的尺寸、变换块的尺寸、或量化矩阵的尺寸。In the example of Table 5, the SizeID value specifies the size of a transform unit, the size of a transform block, or the size of a quantization matrix.
表格6示出了其中使用量化矩阵的块的编码模式、和映射到颜色分量的量化矩阵的类型的表格的示例。Table 6 shows an example of a table of encoding modes of blocks in which quantization matrices are used, and types of quantization matrices mapped to color components.
<表格6><Table 6>
在表格6的示例中,MatrixID值可指示在量化矩阵中使用的编码模式和指定颜色分量的量化矩阵的类型。这里,编码模式可意味着预测模式。In the example of Table 6, the MatrixID value may indicate the encoding mode used in the quantization matrix and the type of the quantization matrix of the specified color component. Here, the encoding mode may mean the prediction mode.
表格7和8是基于表格5和6中确定的SizeID和MatrixID来指定缺省量化矩阵所使用的缺省量化矩阵表格的示例。这里,表格中的每一值意味着通过ScalingList[SizeID][MatrixID][i]指定的值。Tables 7 and 8 are examples of default quantization matrix tables used to specify a default quantization matrix based on SizeID and MatrixID determined in Tables 5 and 6. Here, each value in the table means a value specified by ScalingList[SizeID][MatrixID][i].
<表格7><Form 7>
<表格8><Table 8>
表格7涉及其中SizeID值是0(即,4x4块)的缺省量化矩阵,而表格8涉及其中SizeID值是1(即,8x8块)、2(即,16x16块)、和3(即,32x32块)的缺省量化矩阵。在表格7和8中,SizeID和MatrixID值是在表格5和6中指定的值。Table 7 relates to the default quantization matrix where the SizeID value is 0 (i.e., 4x4 blocks), while Table 8 relates to the default quantization matrix where the SizeID value is 1 (i.e., 8x8 blocks), 2 (i.e., 16x16 blocks), and 3 (i.e., 32x32 blocks). In Tables 7 and 8, the SizeID and MatrixID values are the values specified in Tables 5 and 6.
在表格7和8中,“i”指定量化矩阵中每一系数的位置。在量化矩阵的情况下,例如,在用于16x16块或32x32块的量化矩阵的情况下,不指定用于所有16x16块和32x32块的量化矩阵值,但是可指定仅用于8x8块的量化矩阵系数,并且可基于8x8块来导出未指定的量化矩阵系数并使用。表格8示出了其中对于每一8x8块指定缺省量化矩阵的示例。用于16x16块或32x32块的量化矩阵系数可被内插并从对于每一8x8块存储的量化矩阵中导出,或可按照特定方式导出。如果通过内插从8x8尺寸的量化矩阵导出16x16尺寸或32x32尺寸的量化矩阵,则不使用内插值,而是可使用附加值作为DC位置处的量化矩阵系数。In Tables 7 and 8, "i" specifies the position of each coefficient in the quantization matrix. In the case of a quantization matrix, for example, in the case of a quantization matrix for a 16x16 block or a 32x32 block, quantization matrix values for all 16x16 blocks and 32x32 blocks are not specified, but quantization matrix coefficients for only 8x8 blocks can be specified, and unspecified quantization matrix coefficients can be derived based on the 8x8 blocks and used. Table 8 shows an example in which a default quantization matrix is specified for each 8x8 block. The quantization matrix coefficients for the 16x16 block or the 32x32 block can be interpolated and derived from the quantization matrix stored for each 8x8 block, or can be derived in a specific manner. If a quantization matrix of 16x16 size or 32x32 size is derived from an 8x8 size quantization matrix by interpolation, the interpolated values are not used, and instead, additional values can be used as quantization matrix coefficients at the DC position.
其间,如果通过考虑可用的变换单元的最小尺寸和最大尺寸而不使用量化矩阵,则必须编码具有所有尺寸的变换单元的量化矩阵。在该情况下,编码效率可恶化,并且计算的复杂程度可增加。Meanwhile, if the quantization matrix is not used by considering the minimum and maximum sizes of the available transform units, the quantization matrices of the transform units of all sizes must be encoded. In this case, encoding efficiency may deteriorate and the complexity of calculation may increase.
为了解决这些问题,编码器可通过考虑变换单元的尺寸来编码关于量化矩阵的信息。例如,编码器可基于关于变换单元的尺寸的多条信息之中的、最小尺寸和最大尺寸来限制SizeID。To address these issues, the encoder may encode information about the quantization matrix by considering the size of the transform unit. For example, the encoder may limit SizeID based on the minimum size and the maximum size among multiple pieces of information about the size of the transform unit.
编码器能通过使用限制SizeID执行量化矩阵的编码、关于是否已使用缺省矩阵的信息的编码、以及关于预测编码方法的类型的信息的编码中的一个或多个。The encoder can perform one or more of encoding of a quantization matrix, encoding of information on whether a default matrix has been used, and encoding of information on the type of a prediction encoding method by using the restricted SizeID.
表格9示出了当通过限制SizeID执行量化矩阵的编码时使用的语法结构的示例。Table 9 shows an example of a syntax structure used when encoding of a quantization matrix is performed by limiting SizeID.
<表格9><Form 9>
如同表格9的示例中那样,编码器能基于关于变换单元的尺寸的多条信息之中的、最小尺寸和最大尺寸来限制SizeID,并按照特定变换单元尺寸来执行量化矩阵的编码、关于是否已使用缺省矩阵的信息的编码、以及关于预测编码方法的类型的信息的编码中的一个或多个。As in the example of Table 9, the encoder can limit SizeID based on the minimum size and the maximum size among multiple information about the sizes of the transform unit, and perform one or more of encoding of the quantization matrix, encoding of information about whether a default matrix has been used, and encoding of information about the type of prediction encoding method according to the specific transform unit size.
例如,当Log2MinTrafoSize的值是3并且Log2MaxTrafoSize的值是4时,编码器能执行与8x8变换单元到16x16变换单元对应的量化矩阵的编码、关于是否已使用缺省矩阵的信息的编码、以及关于预测编码方法的类型的信息的编码中的一个或多个。For example, when the value of Log2MinTrafoSize is 3 and the value of Log2MaxTrafoSize is 4, the encoder can perform one or more of encoding of a quantization matrix corresponding to an 8x8 transform unit to a 16x16 transform unit, encoding of information about whether a default matrix has been used, and encoding of information about the type of predictive encoding method.
其间,在表格9的示例中,可以不编码use_default_scaling_list_flag。Meanwhile, in the example of Table 9, use_default_scaling_list_flag may not be encoded.
此外,编码器能基于关于变换单元的尺寸的多条信息之中的、最大尺寸和最小尺寸之间的差值来限制SizeID,并执行量化矩阵的编码、关于是否已使用缺省矩阵的信息的编码、以及关于预测编码方法的类型的信息的编码中的一个或多个。In addition, the encoder can limit SizeID based on the difference between the maximum size and the minimum size among multiple information about the size of the transform unit, and perform one or more of encoding of the quantization matrix, encoding of information about whether a default matrix has been used, and encoding of information about the type of prediction encoding method.
表格10示意性示出了通过基于关于变换单元的尺寸的多条信息之中的、最大尺寸和最小尺寸之间的差值限制SizeID、来编码关于量化矩阵的多条信息所使用的语法结构的示例Table 10 schematically shows an example of a syntax structure used to encode pieces of information about a quantization matrix by limiting SizeID based on the difference between the maximum size and the minimum size among pieces of information about the size of a transform unit.
<表格10><Form 10>
在表格10的语法示例中,基于关于变换单元的尺寸的多条信息之中的、最大尺寸和最小尺寸之间的差值来限制SizeID。编码器能基于关于变换单元的尺寸的多条信息之中的、最大尺寸和最小尺寸之间的差值来限制SizeID,并能基于受限SizeID仅仅在特定变换单元的尺寸的范围上、编码关于量化矩阵的信息、关于是否已使用缺省矩阵的信息、以及关于预测编码方法的类型的信息中的一个或多个。In the syntax example of Table 10, SizeID is limited based on the difference between the maximum size and the minimum size among multiple pieces of information about the sizes of the transform unit. The encoder can limit SizeID based on the difference between the maximum size and the minimum size among multiple pieces of information about the sizes of the transform unit, and can encode one or more of information about the quantization matrix, information about whether a default matrix has been used, and information about the type of prediction encoding method only within the range of the size of a specific transform unit based on the limited SizeID.
在表格10的示例中,当Log2MinTrafoSize的值为3并且Log2MaxTrafoSize的值为4时,能执行与8x8变换单元到16x16变换单元对应的量化矩阵的编码、关于是否已使用缺省矩阵的信息的编码、以及关于预测编码方法的类型的信息的编码中的一个或多个。In the example of Table 10, when the value of Log2MinTrafoSize is 3 and the value of Log2MaxTrafoSize is 4, one or more of encoding of a quantization matrix corresponding to an 8x8 transform unit to a 16x16 transform unit, encoding of information about whether a default matrix has been used, and encoding of information about the type of predictive encoding method can be performed.
这里,Log2MaxTrafoSize和Log2MinTrafoSize之间的差值是变换单元的最大尺寸和最小值之间的差值,并能与log2_diff_max_min_transform_block_size相同。此外,Log2MinTrafoSize-2能与log2_min_transform_block_size_minus2相同。Here, the difference between Log2MaxTrafoSize and Log2MinTrafoSize is the difference between the maximum size and the minimum size of the transform unit, and can be the same as log2_diff_max_min_transform_block_size. In addition, Log2MinTrafoSize-2 can be the same as log2_min_transform_block_size_minus2.
在表格10的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 10, use_default_scaling_list_flag may not be encoded.
其间,如果没有在序列、画面或片段中根据每一变换块(或单元)的尺寸或量化矩阵的类型、来混合和使用缺省矩阵和非缺省矩阵,则降低当编码器选择量化矩阵时的自由度。例如,为了使用片段中具有特定尺寸的变换块的缺省矩阵和片段中具有特定尺寸的另一变换块的非缺省矩阵,必须编码缺省矩阵并将其传送到解码器。结果,编码效率恶化。Meanwhile, if default matrices and non-default matrices are not mixed and used according to the size or type of quantization matrix for each transform block (or unit) in a sequence, picture, or slice, the encoder's freedom in selecting quantization matrices is reduced. For example, in order to use a default matrix for a transform block of a specific size in a slice and a non-default matrix for another transform block of a specific size in the slice, the default matrix must be encoded and transmitted to the decoder. As a result, coding efficiency deteriorates.
为了在序列、画面或片段中根据每一变换尺寸或量化矩阵的类型、来混合和使用缺省矩阵和非缺省矩阵,编码器能基于SizeID将关于是否已编码量化矩阵的信息和关于是否已使用缺省矩阵的信息编码为参数集。In order to mix and use default matrices and non-default matrices according to each transform size or type of quantization matrix in a sequence, picture, or slice, the encoder can encode information about whether the quantization matrix has been encoded and information about whether the default matrix has been used as a parameter set based on SizeID.
表格11示出了当基于SizeID编码关于量化矩阵的信息时能使用的语法结构的示例。Table 11 shows an example of a syntax structure that can be used when encoding information about a quantization matrix based on SizeID.
<表格11><Form 11>
如同表格11的示例中那样,编码器能基于SizeID将sid_use_default_scaling_list_flag[SizeID][MatrixID](即,关于是否已编码量化矩阵和是否已使用缺省矩阵的信息)编码为自适应参数集。MatrixID指示表格6中的特定量化矩阵的类型。As in the example of Table 11, the encoder can encode sid_use_default_scaling_list_flag[SizeID][MatrixID] (ie, information on whether the quantization matrix has been encoded and whether the default matrix has been used) as an adaptation parameter set based on SizeID. MatrixID indicates the type of a specific quantization matrix in Table 6.
当sid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,不编码与SizeID对应的量化矩阵,并且能将与SizeID对应的量化矩阵的系数值确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。当sid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,编码与SizeID对应的量化矩阵,并且可以不在与SizeID对应的量化矩阵中使用编码器和/或解码器中定义的缺省矩阵。When the value of sid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the quantization matrix corresponding to SizeID is not encoded, and the coefficient values of the quantization matrix corresponding to SizeID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. When the value of sid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the quantization matrix corresponding to SizeID is encoded, and the default matrix defined in the encoder and/or decoder may not be used in the quantization matrix corresponding to SizeID.
在表格11的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 11, use_default_scaling_list_flag may not be encoded.
此外,编码器能基于SizeID将关于是否已编码量化矩阵和关于是否已使用缺省矩阵的信息编码为参数集。Furthermore, the encoder can encode information on whether a quantization matrix has been encoded and on whether a default matrix has been used as a parameter set based on SizeID.
表格12示意性示出了当使用MatrixID编码关于量化矩阵的信息时能使用的语法结构的示例。Table 12 schematically shows an example of a syntax structure that can be used when encoding information about a quantization matrix using MatrixID.
<表格12><Form 12>
如同表格12的示例中那样,编码器能基于MatrixID将mid_use_default_scaling_list_flag[SizeID][MatrixID](即,关于是否已编码量化矩阵和是否已使用缺省矩阵的信息)编码为自适应参数集。As in the example of Table 12, the encoder can encode mid_use_default_scaling_list_flag[SizeID][MatrixID] (ie, information on whether the quantization matrix has been encoded and whether the default matrix has been used) as an adaptive parameter set based on the MatrixID.
当mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,不编码与MatrixID对应的量化矩阵,并且能将与MatrixID对应的量化矩阵的系数值确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。当mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,编码与MatrixID对应的量化矩阵,并且不使用编码器和/或解码器中定义的缺省矩阵作为MatrixID对应的量化矩阵。When the value of mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the quantization matrix corresponding to MatrixID is not encoded, and the coefficient values of the quantization matrix corresponding to MatrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. When the value of mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the quantization matrix corresponding to MatrixID is encoded, and the default matrix defined in the encoder and/or decoder is not used as the quantization matrix corresponding to MatrixID.
在表格12的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 12, use_default_scaling_list_flag may not be encoded.
此外,编码器能基于SizeID和MatrixID来将关于是否已编码量化矩阵和是否已使用缺省矩阵的信息编码为参数集。Furthermore, the encoder can encode information on whether a quantization matrix has been encoded and whether a default matrix has been used as a parameter set based on SizeID and MatrixID.
表格13示意性示出了当使用SizeID和MatrixID来编码关于量化矩阵的信息时能使用的语法结构的示例。Table 13 schematically shows an example of a syntax structure that can be used when SizeID and MatrixID are used to encode information about a quantization matrix.
<表格13><Form 13>
如同表格13的示例中那样,编码器能基于SizeID和MatrixID来将sid_mid_use_default_scaling_list_flag[SizeID][MatrixID](即,关于是否已编码量化矩阵和是否已使用缺省矩阵的信息)编码为自适应参数集。As in the example of Table 13, the encoder can encode sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] (ie, information on whether the quantization matrix has been encoded and whether the default matrix has been used) as an adaptation parameter set based on SizeID and MatrixID.
当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,不编码与SizeID和MatrixID对应的量化矩阵,并且能将与SizeID和MatrixID对应的量化矩阵的系数值确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。When the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the quantization matrix corresponding to SizeID and MatrixID is not encoded, and the coefficient values of the quantization matrix corresponding to SizeID and MatrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder.
当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,编码与SizeID和MatrixID对应的量化矩阵,并且不使用编码器和/或解码器中定义的缺省矩阵作为与SizeID和MatrixID对应的量化矩阵。When the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the quantization matrix corresponding to SizeID and MatrixID is encoded, and the default matrix defined in the encoder and/or decoder is not used as the quantization matrix corresponding to SizeID and MatrixID.
在表格13的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 13, use_default_scaling_list_flag may not be encoded.
其间,与表格13的示例中不同,编码器能基于SizeID和MatrixID来将关于是否已编码量化矩阵和是否已使用缺省矩阵的信息编码为参数集。编码器能基于关于变换单元的尺寸的多条信息之中的、最小尺寸和最大尺寸,来限制SizeID,并基于受限SizeID执行量化矩阵的编码、关于是否已使用缺省矩阵的信息的编码、以及关于预测编码方法的类型的信息的编码中的一个或多个。Meanwhile, unlike the example of Table 13, the encoder can encode information on whether the quantization matrix has been encoded and whether the default matrix has been used as a parameter set based on SizeID and MatrixID. The encoder can limit SizeID based on the minimum size and the maximum size among multiple pieces of information on the size of the transform unit, and perform one or more of encoding the quantization matrix, encoding the information on whether the default matrix has been used, and encoding the information on the type of the prediction encoding method based on the limited SizeID.
表格14示意性示出了当通过使用SizeID和MatrixID编码关于量化矩阵的信息时能使用的另一语法结构的示例。Table 14 schematically shows an example of another syntax structure that can be used when encoding information about a quantization matrix by using SizeID and MatrixID.
<表格14><Form 14>
在表格14的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 14, use_default_scaling_list_flag may not be encoded.
此外,编码器能基于关于变换单元的尺寸的多条信息之中的、最大尺寸和最小值之间的差值来限制SizeID,并执行量化矩阵的编码、关于是否已使用缺省矩阵的信息的编码、以及关于预测编码方法的类型的信息的编码中的一个或多个。In addition, the encoder can limit SizeID based on the difference between the maximum size and the minimum value among multiple information about the size of the transform unit, and perform one or more of encoding of the quantization matrix, encoding of information about whether a default matrix has been used, and encoding of information about the type of prediction encoding method.
表格15示意性示出了当通过使用SizeID和MatrixID编码关于量化矩阵的信息时能使用的另一语法结构的示例。Table 15 schematically shows an example of another syntax structure that can be used when encoding information about a quantization matrix by using SizeID and MatrixID.
<表格15><Form 15>
在表格15的示例中,Log2MaxTrafoSize(指定变换单元的最大尺寸)和Log2MinTrafoSize(指定变换单元的最小尺寸)之间的差值是变换单元的最大尺寸和最小值之间的差值,并且与log2_diff_max_min_transform_block_size相同。Log2MinTrafoSize-2与log2_min_transform_block_size_minus2相同。In the example of Table 15, the difference between Log2MaxTrafoSize (specifying the maximum size of a transform unit) and Log2MinTrafoSize (specifying the minimum size of a transform unit) is the difference between the maximum and minimum sizes of a transform unit and is the same as log2_diff_max_min_transform_block_size. Log2MinTrafoSize-2 is the same as log2_min_transform_block_size_minus2.
在表格15的示例中,编码器能基于通过Log2MaxTrafoSize-Log2MinTrafoSize+1所限制的SizeID和MatrixID,来将关于是否已编码量化矩阵和是否已使用缺省矩阵的信息编码为参数。In the example of Table 15, the encoder can encode information on whether the quantization matrix has been encoded and whether the default matrix has been used as parameters based on SizeID and MatrixID limited by Log2MaxTrafoSize-Log2MinTrafoSize+1.
在表格15的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 15, use_default_scaling_list_flag may not be encoded.
其间,关于在要编码的参数集中是否存在关于量化矩阵的信息或者是否将更新关于量化矩阵的信息的信息可被编码为参数集并在编码/解码中使用。Meanwhile, information on whether information on the quantization matrix exists in a parameter set to be encoded or whether information on the quantization matrix is to be updated may be encoded as a parameter set and used in encoding/decoding.
表格16示意性示出了当编码关于是否存在量化矩阵的信息时能使用的语法结构的示例。Table 16 schematically shows an example of a syntax structure that can be used when encoding information on whether a quantization matrix exists.
<表格16><Form 16>
在表格16的示例中,编码器能通过使用语法元素scaling_list_update_flag[SizeID][MatrixID]来指定在要编码的参数中是否存在关于量化矩阵的信息。In the example of Table 16, the encoder can specify whether information on the quantization matrix exists in the parameters to be encoded by using the syntax element scaling_list_update_flag[SizeID][MatrixID].
例如,当scaling_list_update_flag[SizeID][MatrixID]的值为1时,它能指示存在关于与SizeID和MatrixID对应的量化矩阵的信息。当scaling_list_update_flag[SizeID][MatrixID]的值为1时,它可指示将关于与SizeID和MatrixID对应的并且先前编码的量化矩阵的信息更新为要编码的参数集中的关于与SizeID和MatrixID对应的量化矩阵的信息。该更新能意味着将关于已先前编码的量化矩阵的信息替换为要编码的参数集中的关于量化矩阵的信息。For example, when the value of scaling_list_update_flag[SizeID][MatrixID] is 1, it can indicate that there is information about the quantization matrix corresponding to SizeID and MatrixID. When the value of scaling_list_update_flag[SizeID][MatrixID] is 1, it can indicate that the information about the quantization matrix corresponding to SizeID and MatrixID and previously encoded is updated with the information about the quantization matrix corresponding to SizeID and MatrixID in the parameter set to be encoded. This update can mean replacing the information about the quantization matrix that has been previously encoded with the information about the quantization matrix in the parameter set to be encoded.
当scaling_list_update_flag[SizeID][MatrixID]的值为0时,它可指示不存在关于与SizeID和MatrixID对应的量化矩阵的信息。当scaling_list_update_flag[SizeID][MatrixID]的值为0时,它可指示不更新关于编码矩阵的信息。When the value of scaling_list_update_flag[SizeID][MatrixID] is 0, it may indicate that there is no information about the quantization matrix corresponding to SizeID and MatrixID. When the value of scaling_list_update_flag[SizeID][MatrixID] is 0, it may indicate that information about the encoding matrix is not updated.
当scaling_list_update_flag[SizeID][MatrixID]的值为0时,解码器不知道它不得不通过使用关于哪个量化矩阵的信息对与SizeID和MatrixID对应的量化后变换系数执行反量化,因为在参数集中不存在关于与SizeID和MatrixID对应的量化矩阵的信息、并且还没有对关于量化矩阵的信息进行编码。因此,当scaling_list_update_flag[SizeID][MatrixID]的值为0时,与SizeID和MatrixID对应的量化矩阵可意味着使用缺省矩阵或不使用量化矩阵,因为不存在关于与SizeID和MatrixID对应的量化矩阵的信息。When the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the decoder does not know which quantization matrix it has to use to perform inverse quantization on the quantized transform coefficient corresponding to SizeID and MatrixID, because there is no information about the quantization matrix corresponding to SizeID and MatrixID in the parameter set, and the information about the quantization matrix has not been encoded. Therefore, when the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the quantization matrix corresponding to SizeID and MatrixID may mean using a default matrix or not using a quantization matrix, because there is no information about the quantization matrix corresponding to SizeID and MatrixID.
在表格16的示例中,当scaling_list_update_flag[SizeID][MatrixID]的值为1时,因为基于SizeID和MatrixID来编码scaling_list_update_flag[SizeID][MatrixID],所以编码器能编码关于量化矩阵的信息、关于是否已使用缺省矩阵的信息、以及关于预测编码方法的类型的信息中的一个或多个。In the example of Table 16, when the value of scaling_list_update_flag[SizeID][MatrixID] is 1, because scaling_list_update_flag[SizeID][MatrixID] is encoded based on SizeID and MatrixID, the encoder can encode one or more of information about the quantization matrix, information about whether a default matrix has been used, and information about the type of prediction encoding method.
当scaling_list_update_flag[SizeID][MatrixID]的值为0时,编码器不编码关于量化矩阵的信息、关于是否已使用缺省矩阵的信息、以及关于预测编码方法的类型的信息中的一个或多个。即,编码器可以不通过使用scaling_list_update_flag[SizeID][MatrixID]来编码不必要的量化矩阵。When the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the encoder does not encode one or more of information about the quantization matrix, information about whether a default matrix is used, and information about the type of prediction encoding method. That is, the encoder may not encode unnecessary quantization matrices by using scaling_list_update_flag[SizeID][MatrixID].
由于不能仅通过使用scaling_list_update_flag[SizeID][MatrixID]对于序列、画面、或片段中的每一变换尺寸或每一量化矩阵的类型、来混合和使用缺省矩阵和非缺省矩阵,所以存在的缺点在于,当编码器选择量化矩阵时的自由度低。Since it is not possible to mix and use default matrices and non-default matrices for each transform size or each quantization matrix type in a sequence, picture, or slice simply by using scaling_list_update_flag[SizeID][MatrixID], there is a disadvantage in that the degree of freedom when the encoder selects a quantization matrix is low.
因此,编码器能基于SizeID和MatrixID将sid_mid_use_default_scaling_list_flag[SizeID][MatrixID](即,关于是否已编码量化矩阵和是否已使用缺省矩阵的信息)编码为参数集。Therefore, the encoder can encode sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] (ie, information on whether the quantization matrix has been encoded and whether the default matrix has been used) as a parameter set based on SizeID and MatrixID.
例如,在表格16的示例中,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,不编码与SizeID和MatrixID对应的量化矩阵,并且与SizeID和MatrixID对应的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵系数值相同。当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,编码与SizeID和MatrixID对应的量化矩阵,并且编码器和/或解码器中定义的缺省矩阵不被用作与SizeID和MatrixID对应的量化矩阵。For example, in the example of Table 16, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the quantization matrix corresponding to SizeID and MatrixID is not encoded, and the coefficient value of the quantization matrix corresponding to SizeID and MatrixID can be determined to be the same as the default matrix coefficient value defined in the encoder and/or decoder. When the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the quantization matrix corresponding to SizeID and MatrixID is encoded, and the default matrix defined in the encoder and/or decoder is not used as the quantization matrix corresponding to SizeID and MatrixID.
在表格16的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 16, use_default_scaling_list_flag may not be encoded.
此外,编码器能基于SizeID和MatrixID将关于是否已编码量化矩阵和关于是否已使用缺省矩阵的信息编码到参数集中。此外,编码器可使用scaling_list_update_flag[SizeID][MatrixID](即,这样的信息,该信息指示关于量化矩阵的信息是否将被更新为要编码的参数中的关于与SizeID和MatrixID对应的量化矩阵的信息)。In addition, the encoder can encode information about whether the quantization matrix has been encoded and whether the default matrix has been used in the parameter set based on SizeID and MatrixID. In addition, the encoder can use scaling_list_update_flag[SizeID][MatrixID] (i.e., such information indicating whether the information about the quantization matrix will be updated as the information about the quantization matrix corresponding to SizeID and MatrixID in the parameters to be encoded).
表格17示意性示出了如上所述当使用SizeID和MatrixID编码关于量化矩阵的信息时能使用的语法结构的示例。Table 17 schematically shows an example of a syntax structure that can be used when encoding information on a quantization matrix using SizeID and MatrixID as described above.
<表格17><Form 17>
在表格17的示例中,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0并且scaling_list_update_flag[SizeID][MatrixID]的值为0时,编码与SizeID和MatrixID对应的量化矩阵。与SizeID和MatrixID对应的先前已编码的量化矩阵不被更新为与要编码的参数中的SizeID和MatrixID对应的量化矩阵,并且没有改变地使用与编码的SizeID和MatrixID对应的先前已编码的量化矩阵。In the example of Table 17, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0 and the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the quantization matrix corresponding to SizeID and MatrixID is encoded. The previously encoded quantization matrix corresponding to SizeID and MatrixID is not updated to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be encoded, and the previously encoded quantization matrix corresponding to the encoded SizeID and MatrixID is used without change.
此外,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0并且scaling_list_update_flag[SizeID][MatrixID]的值为1时,编码与SizeID和MatrixID对应的量化矩阵,并且将与SizeID和MatrixID对应的先前已编码的量化矩阵更新为与要编码的参数中的SizeID和MatrixID对应的量化矩阵。In addition, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0 and the value of scaling_list_update_flag[SizeID][MatrixID] is 1, the quantization matrix corresponding to SizeID and MatrixID is encoded, and the previously encoded quantization matrix corresponding to SizeID and MatrixID is updated to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be encoded.
此外,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1并且scaling_list_update_flag[SizeID][MatrixID]的值为0时,不编码与SizeID和MatrixID对应的量化矩阵,并且量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。与SizeID和MatrixID对应的先前已编码的量化矩阵不被更新为与要编码的参数中的SizeID和MatrixID对应的量化矩阵,并且编码器和解码器使用与SizeID和MatrixID对应的先前已编码的量化矩阵。In addition, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1 and the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the quantization matrix corresponding to SizeID and MatrixID is not encoded, and the coefficient value of the quantization matrix is determined to be the same as the coefficient value of the default matrix defined in the encoder and/or decoder. The previously encoded quantization matrix corresponding to SizeID and MatrixID is not updated to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be encoded, and the encoder and decoder use the previously encoded quantization matrix corresponding to SizeID and MatrixID.
此外,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1并且scaling_list_update_flag[SizeID][MatrixID]的值也为1时,不编码与SizeID和MatrixID对应的量化矩阵,并且量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。与SizeID和MatrixID对应的先前已编码的量化矩阵被更新为与要编码的参数中的SizeID和MatrixID对应的量化矩阵。In addition, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1 and the value of scaling_list_update_flag[SizeID][MatrixID] is also 1, the quantization matrix corresponding to SizeID and MatrixID is not encoded, and the coefficient values of the quantization matrix are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. The previously encoded quantization matrix corresponding to SizeID and MatrixID is updated to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be encoded.
在表格17的示例中,可以不编码use_default_scaling_list_flag。In the example of Table 17, use_default_scaling_list_flag may not be encoded.
此外,在确定预测和编码量化矩阵的方法的类型之后,编码器能将关于预测和编码量化矩阵的方法的信息编码到参数集中。Furthermore, after determining the type of a method of predicting and encoding a quantization matrix, the encoder can encode information on the method of predicting and encoding the quantization matrix into a parameter set.
表格18和19示意性示出了当将预测和编码量化矩阵的方法编码到参数集中时能使用的语法的示例。Tables 18 and 19 schematically show examples of syntax that can be used when encoding the method of predicting and encoding the quantization matrix in a parameter set.
<表格18><Form 18>
<表格19><Form 19>
如同表格18的示例中那样,编码器能将pred_mode_flag(即,关于预测和编码量化矩阵的方法的信息)编码到自适应参数集。该说明书中稍后描述的scaling_list_pred_mode_flag能被解释为和pred_mode_flag具有相同含义。The encoder can encode pred_mode_flag (ie, information on a method of predicting and encoding a quantization matrix) to the adaptation parameter set as in the example of Table 18. scaling_list_pred_mode_flag described later in this specification can be interpreted as having the same meaning as pred_mode_flag.
例如,在表格18的示例中,当pred_mode_flag的值为1时,编码器能根据差分脉码调制(DPCM)方法和指数哥伦布编码方法来编码量化矩阵。当pred_mode_flag的值为0时,编码器能确定要编码的量化矩阵的系数值,使得它们和先前编码的量化矩阵的系数值具有相同值。这里,量化矩阵的系数值和先前编码的量化矩阵的系数值可以是不同量化矩阵内的值。For example, in the example of Table 18, when the value of pred_mode_flag is 1, the encoder can encode the quantization matrix according to the differential pulse code modulation (DPCM) method and the exponential Golomb coding method. When the value of pred_mode_flag is 0, the encoder can determine the coefficient values of the quantization matrix to be encoded so that they have the same values as the coefficient values of the previously encoded quantization matrix. Here, the coefficient values of the quantization matrix and the coefficient values of the previously encoded quantization matrix may be values within different quantization matrices.
如果pred_mode_flag的值为0,则编码器能将关于要编码的量化矩阵的参考量化矩阵ID的信息编码到参数集中。If the value of pred_mode_flag is 0, the encoder can encode information on the reference quantization matrix ID of the quantization matrix to be encoded into the parameter set.
因此,如同表格18的示例中那样,编码器能将pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码到自适应参数集中。Therefore, as in the example of Table 18, the encoder can encode pred_matrix_id_delta (ie, the reference quantization matrix ID of the quantization matrix to be encoded) into the adaptation parameter set.
该说明书中要描述的scaling_list_pred_matrix_id_delta能被解释为和pred_matrix_id_delta具有相同含义。这里,编码器和解码器能通过使用pred_matrix_id_delta和等式1,来确定指示要编码的量化矩阵的参考量化矩阵的RefMatrixID的值。Scaling_list_pred_matrix_id_delta to be described in this specification can be interpreted as having the same meaning as pred_matrix_id_delta. Here, the encoder and the decoder can determine the value of RefMatrixID indicating the reference quantization matrix of the quantization matrix to be encoded by using pred_matrix_id_delta and Equation 1.
<等式1><Equation 1>
RefMatrixID=MatrixID-(1+pred_matrix_id_delta)RefMatrixID=MatrixID-(1+pred_matrix_id_delta)
如果用于预测和编码量化矩阵的方法是根据DPCM和指数哥伦布编码方法来编码量化矩阵的方法,则编码器能将已先前编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,先前编码的量化矩阵的系数值可以是要编码的量化矩阵内的系数值。即,先前编码的量化矩阵的系数值和要编码的量化矩阵的系数值可以是相同量化矩阵内的值。If the method for predicting and encoding a quantization matrix is a method for encoding a quantization matrix based on DPCM and the Exponential Golomb coding method, the encoder can encode the difference between the coefficient values of a previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded as a parameter set. Here, the coefficient values of the previously encoded quantization matrix may be the coefficient values within the quantization matrix to be encoded. In other words, the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded may be values within the same quantization matrix.
因此,如同表格19的示例中那样,编码器能将delta_coef(即,先前编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为自适应参数集。该说明书中稍后描述的delta_coef可被解释为和scaling_list_delta_coef具有相同含义。Therefore, the encoder can encode delta_coef (i.e., the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) as an adaptive parameter set, as in the example of Table 19. delta_coef described later in this specification can be interpreted as having the same meaning as scaling_list_delta_coef.
编码器能通过使用以下方法来混合和使用序列、画面、或片段中的缺省量化矩阵和非缺省量化矩阵,并能防止传送不必要的量化矩阵。The encoder can mix and use the default quantization matrix and the non-default quantization matrix in a sequence, a picture, or a slice by using the following method, and can prevent unnecessary quantization matrices from being transmitted.
如果用于预测和编码量化矩阵的方法是确定缺省矩阵使得缺省矩阵与编码器中已包括的并先前编码的量化矩阵相同(pred_mode_flag=0)的方法,则编码器能通过使用要编码的量化矩阵的参考量化矩阵ID,来将关于是否已使用缺省矩阵的信息编码为参数集。If the method for predicting and encoding the quantization matrix is a method of determining a default matrix so that the default matrix is the same as the quantization matrix already included in the encoder and previously encoded (pred_mode_flag=0), the encoder can encode information about whether the default matrix has been used as a parameter set by using the reference quantization matrix ID of the quantization matrix to be encoded.
因此,如同表格18的示例中那样,编码器能将pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码为参数集。这里,编码器和解码器能通过使用pred_matrix_id_delta和等式2来确定指示要编码的量化矩阵的参考量化矩阵或缺省矩阵的RefMatrixID,并确定是否使用缺省矩阵。Therefore, as in the example of Table 18, the encoder can encode pred_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be encoded) as a parameter set. Here, the encoder and decoder can determine the RefMatrixID indicating the reference quantization matrix or the default matrix of the quantization matrix to be encoded by using pred_matrix_id_delta and Equation 2, and determine whether to use the default matrix.
<等式2><Equation 2>
RefMatrixID=MatrixID-pred_matrix_id_deltaRefMatrixID=MatrixID-pred_matrix_id_delta
在等式2中,如果RefMatrixID的值与MatrixID值相同,则与SizeID和RefMatrixID对应的量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。这里,缺省矩阵意味着通过SizeID和RefMatrixID所指定的缺省矩阵。In Equation 2, if the value of RefMatrixID is the same as the value of MatrixID, the coefficient value of the quantization matrix corresponding to SizeID and RefMatrixID is determined to be the same as the coefficient value of the default matrix defined in the encoder and/or decoder. Here, the default matrix means the default matrix specified by SizeID and RefMatrixID.
此外,当pred_matrix_id_delta的值为0时,RefMatrixID的值变得与MatrixID值相同。如果RefMatrixID的值与MatrixID值不相同,则编码器能将与RefMatrixID对应的量化矩阵确定为要编码的量化矩阵的参考量化矩阵。在该情况下,编码器能确定要编码的量化矩阵的系数值,使得它们和参考量化矩阵的系数值具有相同值。In addition, when the value of pred_matrix_id_delta is 0, the value of RefMatrixID becomes the same as the value of MatrixID. If the value of RefMatrixID is different from the value of MatrixID, the encoder can determine the quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be encoded. In this case, the encoder can determine the coefficient values of the quantization matrix to be encoded so that they have the same values as the coefficient values of the reference quantization matrix.
如果与SizeID对应的量化矩阵的尺寸被包括在解码器可用的变换单元的最小尺寸和最大尺寸中,则通过使用以上方法能确定要编码的量化矩阵的参考量化矩阵以及是否使用缺省矩阵。如果与SizeID对应的量化矩阵的尺寸没有被包括在解码器可用的变换单元的最小尺寸和最大尺寸中,则用于编码与SizeID对应的量化矩阵的方法可以不被确定为与缺省矩阵相同。当基于SizeID以及变换单元的最大尺寸和变换单元的最小尺寸之间的差值来编码关于量化矩阵的信息、关于是否已使用量化矩阵的信息、和关于预测编码方法的类型的信息中的一个或多个时,能执行确定处理。If the size of the quantization matrix corresponding to SizeID is included in the minimum size and maximum size of the transform unit available to the decoder, the reference quantization matrix of the quantization matrix to be encoded and whether to use the default matrix can be determined by using the above method. If the size of the quantization matrix corresponding to SizeID is not included in the minimum size and maximum size of the transform unit available to the decoder, the method for encoding the quantization matrix corresponding to SizeID may not be determined to be the same as the default matrix. When one or more of information about the quantization matrix, information about whether the quantization matrix has been used, and information about the type of predictive encoding method are encoded based on SizeID and the difference between the maximum size of the transform unit and the minimum size of the transform unit, the determination process can be performed.
在确定是否使用量化矩阵之后,编码器能将关于是否已使用量化矩阵的信息编码为参数集。After determining whether to use the quantization matrix, the encoder can encode information on whether the quantization matrix has been used as a parameter set.
表格20示意性示出了其中将关于是否已使用量化矩阵的信息编码为参数集的示例。Table 20 schematically shows an example in which information on whether a quantization matrix has been used is encoded as a parameter set.
<表格20><Form 20>
如同表格20的示例中那样,编码器能将scaling_list_enable_flag(即,关于是否已使用量化矩阵的信息)编码为参数集。As in the example of Table 20, the encoder can encode scaling_list_enable_flag (ie, information on whether the quantization matrix has been used) as a parameter set.
在表格20的示例中,当scaling_list_enable_flag的值为1时,能在量化/反量化中使用诸如缺省矩阵或非缺省矩阵的量化矩阵。当scaling_list_enable_flag的值为0时,在量化/反量化中不使用量化矩阵,或者所有系数值能使用相同量化矩阵。这里,所有系数值可以是16。In the example of Table 20, when the value of scaling_list_enable_flag is 1, a quantization matrix such as a default matrix or a non-default matrix can be used in quantization/dequantization. When the value of scaling_list_enable_flag is 0, no quantization matrix is used in quantization/dequantization, or the same quantization matrix can be used for all coefficient values. Here, all coefficient values can be 16.
此外,如果用于预测和编码量化矩阵的方法是根据DPCM和指数哥伦布编码方法来编码量化矩阵的方法,则编码器能将先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,先前编码的量化矩阵的系数值可以是要编码的量化矩阵内的系数值。即,先前编码的量化矩阵的系数值和要编码的量化矩阵的系数值可以是相同量化矩阵内的值。Furthermore, if the method for predicting and encoding a quantization matrix is a method for encoding a quantization matrix based on DPCM and the Exponential Golomb coding method, the encoder can encode the difference between the coefficient values of a previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded as a parameter set. Here, the coefficient values of the previously encoded quantization matrix may be the coefficient values within the quantization matrix to be encoded. In other words, the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded may be values within the same quantization matrix.
表格21示意性示出了当通过使用先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值来编码关于量化矩阵的信息时、能使用的语法结构的示例。Table 21 schematically shows an example of a syntax structure that can be used when encoding information on a quantization matrix by using a difference between coefficient values of a previously encoded quantization matrix and coefficient values of a quantization matrix to be encoded.
<表格21><Form 21>
在表格21的示例中,delta_coef(即,先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)被编码为参数集。In the example of Table 21, delta_coef (ie, the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) is encoded as a parameter set.
在表格21的示例中,能使用等式3来计算量化矩阵的系数值。In the example of Table 21, the coefficient values of the quantization matrix can be calculated using Equation 3.
<等式3><Equation 3>
Nextcoef=(nextcoef+delta_coef+256)%256Nextcoef=(nextcoef+delta_coef+256)%256
如果nextcoef(即,使用等式3计算的量化矩阵的系数值)与(1)特定值和(2)量化矩阵的第一值相同,则量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。If nextcoef (i.e., the coefficient value of the quantization matrix calculated using Equation 3) is the same as (1) the specific value and (2) the first value of the quantization matrix, the coefficient value of the quantization matrix can be determined to be the same as the coefficient value of the default matrix defined in the encoder and/or decoder.
即,如果nextcoef的值与(1)特定值和(2)量化矩阵的第一值相同,则能使用对应量化矩阵作为缺省矩阵。That is, if the value of nextcoef is identical to (1) a specific value and (2) the first value of the quantization matrix, the corresponding quantization matrix can be used as a default matrix.
这里,特定值可以是0。此外,缺省矩阵可以是与SizeID和MatrixID对应的缺省矩阵。因此,如果nextcoef(即,量化矩阵的系数值)与0相同并且量化矩阵的系数值对应于量化矩阵的第一值,则能停止对应量化矩阵和量化矩阵之间的差值的编码。Here, the specific value may be 0. In addition, the default matrix may be a default matrix corresponding to SizeID and MatrixID. Therefore, if nextcoef (i.e., the coefficient value of the quantization matrix) is the same as 0 and the coefficient value of the quantization matrix corresponds to the first value of the quantization matrix, encoding of the difference between the corresponding quantization matrix and the quantization matrix can be stopped.
如果用于预测和编码量化矩阵的方法是根据根据DPCM和指数哥伦布编码方法来编码量化矩阵的方法,则编码器能将先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,先前已编码的量化矩阵的系数值可以是要编码的量化矩阵内的系数值。即,先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值可以是相同量化矩阵内的值。If the method for predicting and encoding a quantization matrix is a method for encoding a quantization matrix using DPCM and the Exponential Golomb coding method, the encoder can encode the difference between the coefficient values of a previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded as a parameter set. Here, the coefficient values of the previously encoded quantization matrix may be the coefficient values within the quantization matrix to be encoded. In other words, the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded may be values within the same quantization matrix.
表格22示意性示出了当使用先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差时的语法结构的示例。Table 22 schematically shows an example of a syntax structure when the difference between the coefficient values of a previously encoded quantization matrix and the coefficient values of a quantization matrix to be encoded is used.
<表格22><Form 22>
在表格22的示例中,delta_coef(即,先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)被编码为参数集。在表格22的示例中,如果nextcoef(即,使用等式3计算的量化矩阵的系数值)与特定值相同并且是量化矩阵的第一值,则量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。In the example of Table 22, delta_coef (i.e., the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) is encoded as a parameter set. In the example of Table 22, if nextcoef (i.e., the coefficient value of the quantization matrix calculated using Equation 3) is the same as a specific value and is the first value of the quantization matrix, the coefficient value of the quantization matrix can be determined to be the same as the coefficient value of the default matrix defined in the encoder and/or decoder.
即,如果nextcoef的值与(1)特定值和(2)量化矩阵的第一值相同,则能使用该量化矩阵作为缺省矩阵。这里,特定值可以是0,并且使用等式3计算的量化矩阵的系数值可以是具有4x4和8x8的量化矩阵尺寸或变换尺寸的量化矩阵的系数值。That is, if the value of nextcoef is the same as (1) the specific value and (2) the first value of the quantization matrix, the quantization matrix can be used as a default matrix. Here, the specific value may be 0, and the coefficient value of the quantization matrix calculated using Equation 3 may be a coefficient value of a quantization matrix having a quantization matrix size of 4x4 and 8x8 or a transform size.
此外,量化矩阵的第一值可以是使用scaling_list_dc_coef_minus8的值,并且该特定值可以是与scaling_list_dc_coef_minus8+8对应的值。Also, the first value of the quantization matrix may be a value using scaling_list_dc_coef_minus8, and the specific value may be a value corresponding to scaling_list_dc_coef_minus8+8.
这里,scaling_list_dc_coef_minus8可以意味着具有16x16尺寸的量化矩阵或具有32x32尺寸的量化矩阵的第一值。即,scaling_list_dc_coef_minus8可以意味着用于DC矩阵系数的量化矩阵的系数值并可意味着DC矩阵系数。在该说明书中,DC矩阵系数存在于当执行反量化时使用的量化矩阵中,并且DC矩阵系数可以意味着用于变换块内的DC变换系数的量化矩阵系数。Here, scaling_list_dc_coef_minus8 may refer to the first value of a quantization matrix having a size of 16x16 or a quantization matrix having a size of 32x32. That is, scaling_list_dc_coef_minus8 may refer to the coefficient value of the quantization matrix used for the DC matrix coefficient and may refer to the DC matrix coefficient. In this specification, the DC matrix coefficient exists in the quantization matrix used when performing inverse quantization, and the DC matrix coefficient may refer to the quantization matrix coefficient used for the DC transform coefficient within the transform block.
例如,当sizeID为2时,scaling_list_dc_coef_minus8[sizeID-2][matrixID]可意味着具有16x16尺寸或变换尺寸的量化矩阵中的DC矩阵系数的量化矩阵的系数值。当sizeID为3时,scaling_list_dc_coef_minus8[sizeID-2][matrixID]可意味着具有32x32尺寸或变换尺寸的量化矩阵中的DC矩阵系数的量化矩阵的系数值。For example, when sizeID is 2, scaling_list_dc_coef_minus8[sizeID-2][matrixID] may mean the coefficient value of the quantization matrix of the DC matrix coefficient in the quantization matrix having a size of 16×16 or a transform size. When sizeID is 3, scaling_list_dc_coef_minus8[sizeID-2][matrixID] may mean the coefficient value of the quantization matrix of the DC matrix coefficient in the quantization matrix having a size of 32×32 or a transform size.
此外,前述缺省矩阵可意味着与SizeID和MatrixID对应的缺省矩阵。如上所述,如果量化矩阵的系数值nextcoef与0相同并且是量化矩阵的第一值,则能停止对应量化矩阵和量化矩阵之间的差值的编码。In addition, the aforementioned default matrix may mean a default matrix corresponding to SizeID and MatrixID. As described above, if the coefficient value nextcoef of the quantization matrix is the same as 0 and is the first value of the quantization matrix, encoding of the difference between the corresponding quantization matrix and the quantization matrix can be stopped.
如果使用该方法,则不管是否编码code scaling_list_dc_coef_minus8(即,用于DC矩阵系数的量化矩阵的系数值),并且能根据量化矩阵的尺寸或变换尺寸,来不同地执行关于是否已使用缺省矩阵的信息的编码。If this method is used, it does not matter whether code scaling_list_dc_coef_minus8 (ie, coefficient values of the quantization matrix for DC matrix coefficients) is encoded, and encoding of information on whether a default matrix has been used can be performed differently according to the size of the quantization matrix or the transform size.
其间,用于通过使用量化矩阵的系数值来确定是否使用缺省矩阵的量化矩阵的编码/解码方法的缺点在于,量化矩阵的系数值的编码/解码处理中的复杂度增加。Meanwhile, an encoding/decoding method for determining whether to use a quantization matrix of a default matrix by using coefficient values of the quantization matrix has a disadvantage in that complexity in encoding/decoding processing of the coefficient values of the quantization matrix increases.
以下方法提供了用于在图像编码/解码中使用参考量化矩阵ID来确定是否使用缺省矩阵的方法。因此,如果使用以下方法,则当编码/解码量化矩阵时能降低计算的复杂度。The following method provides a method for determining whether to use a default matrix using a reference quantization matrix ID in image encoding/decoding. Therefore, if the following method is used, the computational complexity can be reduced when encoding/decoding a quantization matrix.
表格23和24示意性示出了当使用参考量化矩阵ID时能使用的语法结构的示例。Tables 23 and 24 schematically show examples of syntax structures that can be used when a reference quantization matrix ID is used.
<表格23><Form 23>
<表格24><Form 24>
首先,编码器能将关于是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information about whether a quantization matrix exists as a parameter set.
如同表格23的示例中那样,编码器能将scaling_list_present_flag(即,关于在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且将量化矩阵确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the example of Table 23, the encoder can encode scaling_list_present_flag (i.e., information about whether a quantization matrix exists in the bitstream) as a parameter set. For example, if the quantization matrix does not exist and the quantization matrix is determined to be the default quantization matrix, the encoder can encode the value of scaling_list_present_flag as 0. If the quantization matrix exists, the encoder can encode the value of scaling_list_present_flag as 1.
编码器能确定用于量化矩阵的预测编码方法的类型,并将关于所确定的用于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于用于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。The encoder can determine the type of predictive coding method used for the quantization matrix and encode information about the determined method for predicting and encoding the quantization matrix into a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded can be an adaptive parameter set.
如同表格23的示例中那样,编码器能将scaling_list_pred_mode_flag(即,指定用于预测和编码量化矩阵的方法的信息)编码为参数集。例如,如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵的系数值以便预测和编码量化矩阵,则编码器将scaling_list_pred_mode_flag的值编码为1。此外,如果参考量化矩阵和要编码的量化矩阵被确定为具有相同值、或者要编码的量化矩阵的系数值被确定为和缺省矩阵的系数值相同,则编码器能将scaling_list_pred_mode_flag的值编码为0。As in the example of Table 23, the encoder can encode scaling_list_pred_mode_flag (i.e., information specifying a method for predicting and encoding a quantization matrix) as a parameter set. For example, if the coefficient values of the quantization matrix are encoded according to the DPCM and Exponential Golomb coding methods by scanning the quantization matrix to predict and encode the quantization matrix, the encoder encodes the value of scaling_list_pred_mode_flag to 1. In addition, if the reference quantization matrix and the quantization matrix to be encoded are determined to have the same value, or the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix, the encoder can encode the value of scaling_list_pred_mode_flag to 0.
这里,确定矩阵或系数值使得它们具有相同值可意味着使用这样的量化矩阵预测方法,其将特定量化矩阵的系数值拷贝到要编码的量化矩阵的系数值。Here, determining the matrix or coefficient values so that they have the same value may mean using a quantization matrix prediction method that copies coefficient values of a specific quantization matrix to coefficient values of a quantization matrix to be encoded.
如果scaling_list_pred_mode_flag的值为0,则编码器能将要编码的量化矩阵的参考量化矩阵ID和关于是否已使用缺省矩阵的信息编码为参数集。这里,参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the encoder can encode the reference quantization matrix ID of the quantization matrix to be encoded and information on whether a default matrix has been used as a parameter set. Here, the parameter set may be an adaptive parameter set.
如同表格23的示例中那样,如果scaling_list_pred_mode_flag的值为0,则编码器能将scaling_list_pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码为参数集。As in the example of Table 23, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode scaling_list_pred_matrix_id_delta (ie, the reference quantization matrix ID of the quantization matrix to be encoded) as a parameter set.
这里,编码器能通过使用指示要编码的量化矩阵的matrixID、指示参考量化矩阵或缺省矩阵的RefMatrixID、以及等式4,来确定scaling_list_pred_matrix_id_delta(即,量化矩阵ID)的值。Here, the encoder can determine the value of scaling_list_pred_matrix_id_delta (ie, quantization matrix ID) by using matrixID indicating a quantization matrix to be encoded, RefMatrixID indicating a reference quantization matrix or a default matrix, and Equation 4.
<等式4><Equation 4>
scaling_list_pred_matrix_id_delta=matrixID–RefMatrixIDscaling_list_pred_matrix_id_delta=matrixID–RefMatrixID
如果要编码的量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同,则编码器通过将scaling_list_pred_matrix_id_delta的值编码为0,来使得RefMatrixID的值与matrixID的值相同。这里,缺省矩阵能意味着与sizeID和matrixID对应的缺省矩阵。If the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder, the encoder makes the value of RefMatrixID the same as the value of matrixID by encoding the value of scaling_list_pred_matrix_id_delta to 0. Here, the default matrix can mean the default matrix corresponding to sizeID and matrixID.
如果要编码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同(即,被确定为与先前已编码的量化矩阵的系数值相同),则编码器能将scaling_list_pred_matrix_id_delta的值编码为非0的值使得RefMatrixID的值与matrixID的值不相同。这里,scaling_list_pred_matrix_id_delta的值可以是正整数。If the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the reference quantization matrix (that is, determined to be the same as the coefficient values of the previously encoded quantization matrix), the encoder can encode the value of scaling_list_pred_matrix_id_delta to a non-zero value so that the value of RefMatrixID is different from the value of matrixID. Here, the value of scaling_list_pred_matrix_id_delta can be a positive integer.
如果用于预测和编码量化矩阵的方法是根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数的方法,则编码器能将量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,差值所编码成的参数集可以是自适应参数集。If the method for predicting and encoding the quantization matrix is a method for encoding the quantization matrix according to the DPCM and the Exponential Golomb coding method so as to predict and encode the coefficients in the quantization matrix, the encoder can encode the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix as a parameter set. Here, the parameter set encoded by the difference may be an adaptive parameter set.
如同表格24的示例中那样,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则编码器能将scaling_list_dc_coef_minus8(即,DC矩阵系数)编码为参数集。As in the example of Table 24, if the size of the quantization matrix to be encoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the encoder can encode scaling_list_dc_coef_minus8 (ie, DC matrix coefficients) as a parameter set.
如同表格24的示例中那样,编码器能将scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为参数集。在表格23和24中,已图示了其中将关于量化矩阵的信息编码为自适应参数集的示例,但是本发明不限于此。例如,编码器能将关于量化矩阵的信息编码为另一参数集(即,包括序列参数集和画面参数集中的至少一个的参数集)。As in the example of Table 24, the encoder can encode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix) as a parameter set. In Tables 23 and 24, an example in which information about the quantization matrix is encoded as an adaptive parameter set has been illustrated, but the present invention is not limited thereto. For example, the encoder can encode information about the quantization matrix as another parameter set (i.e., a parameter set including at least one of a sequence parameter set and a picture parameter set).
如上所述,传统量化矩阵编码/解码方法的缺点在于,恶化编码效率,因为当预测量化矩阵时编码/解码不必要的信息。As described above, the conventional quantization matrix encoding/decoding method has a disadvantage in that encoding efficiency is deteriorated because unnecessary information is encoded/decoded when predicting the quantization matrix.
然而,在本发明中,当通过取决于是否存在参考量化矩阵不同地执行量化矩阵的编码/解码、而编码/解码量化矩阵时,能改进编码效率。However, in the present invention, when the quantization matrix is encoded/decoded by performing encoding/decoding of the quantization matrix differently depending on whether a reference quantization matrix exists, encoding efficiency can be improved.
表格25和26示意性示出了当取决于是否存在参考量化矩阵不同地执行量化矩阵的编码/解码时能使用的语法结构的示例。Tables 25 and 26 schematically show examples of syntax structures that can be used when encoding/decoding of a quantization matrix is performed differently depending on whether a reference quantization matrix exists.
<表格25><Form 25>
<表格26><Form 26>
首先,编码器能将指示是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information indicating whether a quantization matrix exists as a parameter set.
如同表格25的示例中那样,编码器能将scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且将所有量化矩阵确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在编码的量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the example of Table 25, the encoder can encode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) as a parameter set. For example, if there is no quantization matrix and all quantization matrices are determined to be default quantization matrices, the encoder can encode the value of scaling_list_present_flag as 0. If there is an encoded quantization matrix, the encoder can encode the value of scaling_list_present_flag as 1.
在确定用于预测和编码量化矩阵的方法的类型之后,如果matrixID的值大于0,则编码器能将关于用于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于用于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。After determining the type of method for predicting and encoding the quantization matrix, if the value of matrixID is greater than 0, the encoder can encode information about the method for predicting and encoding the quantization matrix into a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded may be an adaptive parameter set.
如同表格25的示例中那样,仅当matrixID的值大于0时,编码器能将scaling_list_pred_mode_flag(即,指定用于预测和编码量化矩阵的方法的信息)编码为参数集。如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵内的系数,则编码器将scaling_list_pred_mode_flag的值编码为1。此外,如果参考量化矩阵被确定为和要编码的量化矩阵被具有相同值,则编码器能将scaling_list_pred_mode_flag的值编码为0。这里,确定矩阵使得它们具有相同值可意味着,使用将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值的量化矩阵预测方法。As in the example of Table 25, the encoder can encode scaling_list_pred_mode_flag (i.e., information specifying a method for predicting and encoding a quantization matrix) as a parameter set only when the value of matrixID is greater than 0. If the quantization matrix is encoded according to the DPCM and Exponential Golomb coding method by scanning the quantization matrix to predict and encode the coefficients within the quantization matrix, the encoder encodes the value of scaling_list_pred_mode_flag to 1. In addition, if the reference quantization matrix is determined to have the same value as the quantization matrix to be encoded, the encoder can encode the value of scaling_list_pred_mode_flag to 0. Here, determining the matrices so that they have the same value may mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果matrixID的值为0,则scaling_list_pred_mode_flag的值成为真,如同表格23的示例中那样。因此,编码器不对scaling_list_pred_mode_flag的值进行编码,并能通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵。If the value of matrixID is 0, the value of scaling_list_pred_mode_flag becomes true as in the example of Table 23. Therefore, the encoder does not encode the value of scaling_list_pred_mode_flag and can encode the quantization matrix according to the DPCM and Exponential Golomb coding method by scanning the quantization matrix.
如果scaling_list_pred_mode_flag的值为0并且matrixID的值大于0,则编码器能将要编码的量化矩阵的参考量化矩阵ID编码为参数集。这里,参考量化矩阵ID所编码成的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0 and the value of matrixID is greater than 0, the encoder can encode the reference quantization matrix ID of the quantization matrix to be encoded as a parameter set. Here, the parameter set encoded with the reference quantization matrix ID may be an adaptive parameter set.
如同表格25的示例中那样,如果scaling_list_pred_mode_flag的值为0,则仅当matrixID的值大于0时,编码器能将scaling_list_pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码为参数集。这里,编码器和解码器能通过使用指示要编码的量化矩阵的matrixID、指示参考量化矩阵的RefMatrixID、以及等式5,来确定scaling_list_pred_matrix_id_delta(即,量化矩阵ID)的值。As in the example of Table 25, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode scaling_list_pred_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be encoded) as a parameter set only when the value of matrixID is greater than 0. Here, the encoder and decoder can determine the value of scaling_list_pred_matrix_id_delta (i.e., the quantization matrix ID) by using matrixID indicating the quantization matrix to be encoded, RefMatrixID indicating the reference quantization matrix, and Equation 5.
<等式5><Equation 5>
scaling_list_pred_matrix_id_delta=matrixID-(RefMatrixID+1)scaling_list_pred_matrix_id_delta=matrixID-(RefMatrixID+1)
当matrixID的值为0时,对于每一sizeID指示第一量化矩阵。由于仅能从先前已编码的具有相同sizeID的量化矩阵预测量化矩阵,所以针对每一sizeID的第一量化矩阵不存在具有相同sizeID的参考量化矩阵。因此,不能执行量化矩阵的预测,诸如矩阵拷贝方法。结果,仅当matrixID的值大于0时,编码器才能编码作为参考量化矩阵ID的scaling_list_pred_matrix_id_delta,基于编码的参考量化矩阵ID来确定RefMatrixID,并确定要编码的量化矩阵的系数值,使得它们和参考量化矩阵的系数值具有相同的值。When the value of matrixID is 0, the first quantization matrix is indicated for each sizeID. Since the quantization matrix can only be predicted from the quantization matrix with the same sizeID that has been previously encoded, there is no reference quantization matrix with the same sizeID for the first quantization matrix of each sizeID. Therefore, prediction of the quantization matrix, such as the matrix copy method, cannot be performed. As a result, only when the value of matrixID is greater than 0, the encoder can encode scaling_list_pred_matrix_id_delta as the reference quantization matrix ID, determine RefMatrixID based on the encoded reference quantization matrix ID, and determine the coefficient values of the quantization matrix to be encoded so that they have the same values as the coefficient values of the reference quantization matrix.
确定要编码的量化矩阵的系数值使得它们和参考量化矩阵的系数值具有相同值可意味着这样的量化矩阵预测方法,其将参考量化矩阵(对应RefMatrixID)确定为要编码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值。Determining the coefficient values of the quantization matrix to be encoded so that they have the same values as the coefficient values of the reference quantization matrix may mean a quantization matrix prediction method that determines the reference quantization matrix (corresponding to RefMatrixID) as the reference quantization matrix of the quantization matrix to be encoded, and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果用于预测和编码量化矩阵的方法是通过扫描根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵内的系数的方法,则编码器能将量化矩阵内先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,差值所编码到的参数集可以是自适应参数集。If the method for predicting and encoding a quantization matrix is a method for predicting and encoding coefficients within the quantization matrix by scanning the quantization matrix according to the DPCM and Exponential Golomb coding method, the encoder can encode the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded within the quantization matrix as a parameter set. Here, the parameter set into which the difference is encoded may be an adaptive parameter set.
如同表格26的示例中那样,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则编码器能将scaling_list_dc_coef_minus8(即,DC矩阵系数)编码为参数集。As in the example of Table 26, if the size of the quantization matrix to be encoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the encoder can encode scaling_list_dc_coef_minus8 (ie, DC matrix coefficients) as a parameter set.
如同表格26的示例中那样,编码器能将scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为参数集。As in the example of Table 26, the encoder can encode scaling_list_delta_coef (ie, the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) as a parameter set.
此外,编码器能通过使用用来计算scaling_list_dc_coef_minus8或nextCoef的scaling_list_delta_coef来编码关于是否已使用缺省矩阵的信息。即,编码器能编码scaling_list_dc_coef_minus8的值,使得其成为-8,以便命令解码器使用缺省矩阵,并能编码scaling_list_delta_coef使得第一nextCoef值成为0,以便命令解码器使用缺省矩阵。In addition, the encoder can encode information about whether the default matrix has been used by using scaling_list_delta_coef used to calculate scaling_list_dc_coef_minus8 or nextCoef. That is, the encoder can encode the value of scaling_list_dc_coef_minus8 so that it becomes -8 to instruct the decoder to use the default matrix, and can encode scaling_list_delta_coef so that the first nextCoef value becomes 0 to instruct the decoder to use the default matrix.
其间,其中通过使用量化矩阵的系数值而确定是否使用缺省矩阵的编码/解码量化矩阵的方法具有的缺点在于,它增加编码/解码量化矩阵的系数值的处理中的复杂程度。此外,存在的缺点在于,恶化编码效率,因为当预测量化矩阵时编码/解码不必要的信息。Meanwhile, the method of encoding/decoding a quantization matrix in which whether to use a default matrix is determined by using the coefficient values of the quantization matrix has a disadvantage in that it increases the complexity of the processing of encoding/decoding the coefficient values of the quantization matrix. In addition, there is a disadvantage in that coding efficiency is deteriorated because unnecessary information is encoded/decoded when predicting the quantization matrix.
然而,本发明能降低当编码/解码量化矩阵时的计算的复杂度,因为通过在图像编码/解码中使用参考量化矩阵的ID来确定是否使用缺省矩阵。此外,本发明能通过取决于是否存在参考量化矩阵不同地编码/解码量化矩阵,而改进编码/解码量化矩阵时的编码效率。However, the present invention can reduce the complexity of calculation when encoding/decoding a quantization matrix because it determines whether to use a default matrix by using the ID of a reference quantization matrix in image encoding/decoding. In addition, the present invention can improve the encoding efficiency when encoding/decoding a quantization matrix by encoding/decoding the quantization matrix differently depending on whether a reference quantization matrix exists.
表格27和28示意性示出了当使用参考量化矩阵的ID时能使用的语法结构的示例。Tables 27 and 28 schematically show examples of syntax structures that can be used when the ID of the reference quantization matrix is used.
<表格27><Form 27>
<表格28><Form 28>
首先,编码器能将指示是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information indicating whether a quantization matrix exists as a parameter set.
如同表格27的示例中那样,编码器能将scaling_list_present_flag(即,指定在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且所有量化矩阵被确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在编码的量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the example of Table 27, the encoder can encode scaling_list_present_flag (i.e., information specifying whether a quantization matrix exists in the bitstream) as a parameter set. For example, if there is no quantization matrix and all quantization matrices are determined to be default quantization matrices, the encoder can encode the value of scaling_list_present_flag as 0. If there is an encoded quantization matrix, the encoder can encode the value of scaling_list_present_flag as 1.
在确定用于量化矩阵的预测编码方法的类型之后,编码器能将关于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。After determining the type of predictive coding method for the quantization matrix, the encoder can encode information about the method for predicting and encoding the quantization matrix into a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded can be an adaptive parameter set.
如同表格27的示例中那样,编码器能将scaling_list_pred_mode_flag(即,关于量化矩阵的预测编码方法的信息)编码为参数集。例如,如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数,则编码器能将scaling_list_pred_mode_flag的值编码为1。如果参考量化矩阵和要编码的量化矩阵被确定为具有相同值、或者要编码的量化矩阵的系数值被确定为和缺省矩阵的系数值相同,则编码器能将scaling_list_pred_mode_flag的值编码为0。这里,确定这些值使得它们具有相同值可意味着使用这样的量化矩阵预测方法,其将特定量化矩阵的系数值拷贝到要编码的量化矩阵的系数值。As in the example of Table 27, the encoder can encode scaling_list_pred_mode_flag (i.e., information about the prediction encoding method of the quantization matrix) as a parameter set. For example, if the quantization matrix is encoded according to the DPCM and Exponential Golomb coding method by scanning the quantization matrix to predict and encode the coefficients in the quantization matrix, the encoder can encode the value of scaling_list_pred_mode_flag to 1. If the reference quantization matrix and the quantization matrix to be encoded are determined to have the same value, or if the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix, the encoder can encode the value of scaling_list_pred_mode_flag to 0. Here, determining these values so that they have the same value may mean using a quantization matrix prediction method that copies the coefficient values of a specific quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果scaling_list_pred_mode_flag的值为0并且matrixID的值大于0,则编码器能将关于要编码的量化矩阵的参考量化矩阵ID和是否使用缺省矩阵的信息编码为参数集。这里,关于参考量化矩阵ID和是否使用缺省矩阵的信息所编码成的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0 and the value of matrixID is greater than 0, the encoder can encode the reference quantization matrix ID of the quantization matrix to be encoded and information on whether to use a default matrix as a parameter set. Here, the parameter set encoded with the information on the reference quantization matrix ID and whether to use a default matrix may be an adaptive parameter set.
如同表格27的示例中那样,如果scaling_list_pred_mode_flag的值为0,则仅当matrixID的值大于0时,编码器能将scaling_list_pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码为参数集。As in the example of Table 27, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode scaling_list_pred_matrix_id_delta (ie, the reference quantization matrix ID of the quantization matrix to be encoded) as a parameter set only when the value of matrixID is greater than 0.
这里,编码器能通过使用指示要编码的量化矩阵的matrixID、指示参考量化矩阵或缺省矩阵的RefMatrixID、以及等式6,来确定scaling_list_pred_matrix_id_delta(即,量化矩阵ID)。Here, the encoder can determine scaling_list_pred_matrix_id_delta (ie, quantization matrix ID) by using matrixID indicating a quantization matrix to be encoded, RefMatrixID indicating a reference quantization matrix or a default matrix, and Equation 6.
<等式6><Equation 6>
scaling_list_pred_matrix_id_delta=matrixID–RefMatrixIDscaling_list_pred_matrix_id_delta=matrixID–RefMatrixID
如果要编码的量化矩阵的系数值已被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同,则编码器能将scaling_list_pred_matrix_id_delta的值编码为0使得RefMatrixID的值与matrixID的值相同。这里,缺省矩阵意味着与sizeID和matrixID对应的缺省矩阵。If the coefficient values of the quantization matrix to be encoded have been determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder, the encoder can encode the value of scaling_list_pred_matrix_id_delta to 0 so that the value of RefMatrixID is the same as the value of matrixID. Here, the default matrix means the default matrix corresponding to sizeID and matrixID.
如果要编码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同,则编码器能将scaling_list_pred_matrix_id_delta的值编码为非0使得RefMatrixID的值与matrixID的值彼此不同。If the coefficient values of the quantization matrix to be encoded are determined to be the same as those of the reference quantization matrix, the encoder can encode the value of scaling_list_pred_matrix_id_delta as non-0 so that the value of RefMatrixID and the value of matrixID are different from each other.
此外,当scaling_list_pred_mode_flag的值为0时,它指示执行用于预测和编码量化矩阵的方法,以将量化矩阵确定为与参考量化矩阵或缺省矩阵相同。在该情况下,可从先前已编码的、具有相同sizeID的量化矩阵或缺省矩阵来预测量化矩阵。In addition, when the value of scaling_list_pred_mode_flag is 0, it indicates that the method for predicting and encoding the quantization matrix is performed to determine the quantization matrix to be the same as the reference quantization matrix or the default matrix. In this case, the quantization matrix can be predicted from a previously encoded quantization matrix with the same sizeID or the default matrix.
当matrixID的值为0时,它意味着用于每一sizeID的第一量化矩阵。由此,当scaling_list_pred_mode_flag的值为0并且matrixID的值为0时,不存在用于每一sizeID的第一量化矩阵的具有相同sizeID值的参考量化矩阵。因此,不能对用于每一sizeID的第一量化矩阵执行诸如矩阵拷贝方法的量化矩阵的预测。When the value of matrixID is 0, it means the first quantization matrix for each sizeID. Therefore, when the value of scaling_list_pred_mode_flag is 0 and the value of matrixID is 0, there is no reference quantization matrix with the same sizeID value for the first quantization matrix for each sizeID. Therefore, quantization matrix prediction such as the matrix copy method cannot be performed on the first quantization matrix for each sizeID.
在该情况下,编码器能导出scaling_list_pred_matrix_id_delta的值作为0,而不编码scaling_list_pred_matrix_id_delta。当scaling_list_pred_matrix_id_delta的值为0时,与sizeID和matrixID对应的要编码的量化矩阵的系数值能被确定为与编码器和/或解码器中已定义的缺省矩阵的系数值相同,因为RefMatrixID的值与matrixID的值相同。这里,缺省矩阵能意味着与sizeID和matrixID对应的缺省矩阵。In this case, the encoder can derive the value of scaling_list_pred_matrix_id_delta as 0 without encoding scaling_list_pred_matrix_id_delta. When the value of scaling_list_pred_matrix_id_delta is 0, the coefficient values of the quantization matrix to be encoded corresponding to sizeID and matrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder because the value of RefMatrixID is the same as the value of matrixID. Here, the default matrix can mean the default matrix corresponding to sizeID and matrixID.
如果用于预测和编码量化矩阵的方法是通过扫描根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数的方法,则编码器能将量化矩阵中先前已编码的量化矩阵的系数值、和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,差值所编码成的参数集可以是自适应参数集。If the method for predicting and encoding a quantization matrix is a method for encoding a quantization matrix by scanning according to a DPCM and an exponential Golomb coding method so as to predict and encode coefficients in the quantization matrix, the encoder can encode the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix as a parameter set. Here, the parameter set encoded by the difference may be an adaptive parameter set.
如同表格28的示例中那样,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则编码器能将scaling_list_dc_coef_minus8(即,DC矩阵系数)编码为参数集。As in the example of Table 28, if the size of the quantization matrix to be encoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the encoder can encode scaling_list_dc_coef_minus8 (ie, DC matrix coefficients) as a parameter set.
如同表格28的示例中那样,scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)能被编码为参数集。As in the example of Table 28, scaling_list_delta_coef (ie, the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix) can be encoded as a parameter set.
在传统量化矩阵编码/解码方法中,当发送量化矩阵时,对矩阵内的所有系数和DC矩阵系数进行编码/解码。在该情况下,限制编码效率的改进,因为不对DC矩阵系数执行预测和编码/解码。In conventional quantization matrix encoding/decoding methods, when a quantization matrix is transmitted, all coefficients within the matrix and the DC matrix coefficients are encoded/decoded. In this case, improvement in coding efficiency is limited because prediction and encoding/decoding are not performed on the DC matrix coefficients.
相反,如果对量化矩阵内的DC矩阵系数执行预测和编码/解码,则能改进编码效率。In contrast, if prediction and encoding/decoding are performed on DC matrix coefficients within a quantization matrix, encoding efficiency can be improved.
这里,本发明提供了用于通过使用相邻系数之间的高相关性从相邻AC系数来预测DC矩阵系数的方法,而不从常数8来预测DC矩阵系数。本发明能通过该方法来改进编码效率。Here, the present invention provides a method for predicting DC matrix coefficients from adjacent AC coefficients by using high correlation between adjacent coefficients, instead of predicting the DC matrix coefficients from a constant 8. The present invention can improve encoding efficiency through this method.
表格29和30示意性示出了当通过使用相邻系数之间的相关性来预测DC矩阵系数时能使用的语法结构的示例。Tables 29 and 30 schematically show examples of syntax structures that can be used when predicting DC matrix coefficients by using correlations between adjacent coefficients.
<表格29><Form 29>
<表格30><Form 30>
在表格29和30的示例中,使得量化矩阵的编码/解码序列与量化矩阵的恢复序列相同。在该情况下,能降低用于存储DC矩阵系数的存储空间。此外,在表格29和30的示例中,当指示是否使用缺省矩阵时,能仅使用语法元素“scaling_list_delta_coef”,而不使用几个语法元素。In the examples of Tables 29 and 30, the encoding/decoding sequence of the quantization matrix is made the same as the restoration sequence of the quantization matrix. In this case, the storage space for storing DC matrix coefficients can be reduced. In addition, in the examples of Tables 29 and 30, when indicating whether to use the default matrix, only the syntax element "scaling_list_delta_coef" can be used instead of using several syntax elements.
首先,编码器能将指示是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information indicating whether a quantization matrix exists as a parameter set.
如同表格28的示例中那样,编码器能将scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且所有量化矩阵被确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在编码的量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the example of Table 28, the encoder can encode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) as a parameter set. For example, if there is no quantization matrix and all quantization matrices are determined to be default quantization matrices, the encoder can encode the value of scaling_list_present_flag as 0. If there is an encoded quantization matrix, the encoder can encode the value of scaling_list_present_flag as 1.
在确定用于预测和编码量化矩阵的方法的类型之后,编码器能将关于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。After determining the type of method for predicting and encoding the quantization matrix, the encoder can encode information about the method for predicting and encoding the quantization matrix into a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded can be an adaptive parameter set.
如同表格29的示例中那样,编码器能将scaling_list_pred_mode_flag(即,关于预测和编码量化矩阵的方法的信息)编码为参数集。例如,如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数,则编码器能将scaling_list_pred_mode_flag的值编码为1。如果参考量化矩阵被确定为和要编码的量化矩阵具有相同值,则编码器能将scaling_list_pred_mode_flag的值编码为0。这里,确定这些值使得它们具有相同值能意味着,使用将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值的量化矩阵预测方法。As in the example of Table 29, the encoder can encode scaling_list_pred_mode_flag (i.e., information about a method for predicting and encoding a quantization matrix) as a parameter set. For example, if the quantization matrix is encoded according to the DPCM and Exponential Golomb coding method by scanning the quantization matrix to predict and encode the coefficients in the quantization matrix, the encoder can encode the value of scaling_list_pred_mode_flag as 1. If the reference quantization matrix is determined to have the same value as the quantization matrix to be encoded, the encoder can encode the value of scaling_list_pred_mode_flag as 0. Here, determining these values so that they have the same value can mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果scaling_list_pred_mode_flag的值为0,则编码器能将要编码的量化矩阵的参考量化矩阵ID编码为参数集。这里,参考量化矩阵ID所编码成的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the encoder can encode the reference quantization matrix ID of the quantization matrix to be encoded as a parameter set. Here, the parameter set encoded with the reference quantization matrix ID may be an adaptive parameter set.
如同表格29的示例中那样,如果scaling_list_pred_mode_flag的值为0,则编码器能将scaling_list_pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码为参数集。这里,编码器能通过使用指示要编码的量化矩阵的matrixID、指示参考量化矩阵的RefMatrixID、以及下面的等式7,来确定scaling_list_pred_matrix_id_delta(即,量化矩阵ID)。As in the example of Table 29, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode scaling_list_pred_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be encoded) as a parameter set. Here, the encoder can determine scaling_list_pred_matrix_id_delta (i.e., the quantization matrix ID) by using matrixID indicating the quantization matrix to be encoded, RefMatrixID indicating the reference quantization matrix, and the following equation 7.
<等式7><Equation 7>
scaling_list_pred_matrix_id_delta=matrixID-(RefMatrixID+1)scaling_list_pred_matrix_id_delta=matrixID-(RefMatrixID+1)
确定要编码的量化矩阵的系数值使得它们和参考量化矩阵的系数值具有相同值能意味着这样的量化矩阵预测方法,其将与RefMatrixID对应的参考量化矩阵确定为要编码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值。Determining the coefficient values of the quantization matrix to be encoded so that they have the same values as the coefficient values of the reference quantization matrix can mean a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be encoded, and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果用于预测和编码量化矩阵的方法是通过扫描根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵内的系数的方法,则编码器能将量化矩阵内先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,差值所编码到的参数集可以是自适应参数集。If the method for predicting and encoding a quantization matrix is a method for predicting and encoding coefficients within the quantization matrix by scanning the quantization matrix according to the DPCM and Exponential Golomb coding method, the encoder can encode the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded within the quantization matrix as a parameter set. Here, the parameter set into which the difference is encoded may be an adaptive parameter set.
如同表格30的示例中那样,编码器能将scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为参数集。As in the example of Table 30, the encoder can encode scaling_list_delta_coef (ie, the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) as a parameter set.
这里,编码器能通过使用用来计算nextCoef的scaling_list_delta_coef来编码关于是否使用缺省矩阵的信息。例如,编码器能编码scaling_list_delta_coef使得第一nextCoef值成为0以便命令解码器使用缺省矩阵。Here, the encoder can encode information on whether to use the default matrix by using scaling_list_delta_coef used to calculate nextCoef. For example, the encoder can encode scaling_list_delta_coef so that the first nextCoef value becomes 0 in order to instruct the decoder to use the default matrix.
如同表格30的示例中那样,编码器能将scaling_list_dc_coef_res(即,与DC矩阵系数对应的量化矩阵的系数值之间的差值)编码为参数集。这里,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3)量化矩阵并且不使用缺省矩阵,则能将scaling_list_dc_coef_res编码为(useDefaultScalingMatrixFlag=0)。As in the example of Table 30, the encoder can encode scaling_list_dc_coef_res (i.e., the difference between the coefficient values of the quantization matrix corresponding to the DC matrix coefficient) as a parameter set. Here, if the size of the quantization matrix to be encoded is a 16x16 (sizeID=2) or 32x32 (sizeID=3) quantization matrix and the default matrix is not used, scaling_list_dc_coef_res can be encoded as (useDefaultScalingMatrixFlag=0).
在表格30的示例中,能通过使用DC矩阵系数的值和在DC位置处存在的矩阵系数之间的差,来计算用于单独编码DC矩阵系数的16x16尺寸或32x32尺寸的量化矩阵的scaling_list_dc_coef_res的值。In the example of Table 30, the value of scaling_list_dc_coef_res of a 16x16-sized or 32x32-sized quantization matrix for encoding the DC matrix coefficient alone can be calculated by using the difference between the value of the DC matrix coefficient and the matrix coefficient existing at the DC position.
其间,通过使用量化矩阵的系数值来确定是否使用缺省矩阵的用于编码/解码量化矩阵的方法的缺点在于,其增加在编码/解码量化矩阵的系数值的处理中的复杂程度。此外,传统上,当发送量化矩阵时,编码/解码矩阵内的所有系数和DC矩阵系数。在该情况下,限制编码效率的改进,因为不对DC矩阵系数执行预测和编码/解码。Meanwhile, the method for encoding/decoding a quantization matrix that determines whether to use a default matrix by using the coefficient values of the quantization matrix has the disadvantage of increasing the complexity of processing the coefficient values of the quantization matrix for encoding/decoding. In addition, conventionally, when the quantization matrix is transmitted, all coefficients within the matrix and the DC matrix coefficients are encoded/decoded. In this case, improvement in coding efficiency is limited because prediction and encoding/decoding are not performed on the DC matrix coefficients.
在本发明中,在图像编码/解码中,通过使用参考量化矩阵的ID来确定是否使用缺省矩阵。因此,能降低当编码/解码量化矩阵时的计算复杂度。此外,在本发明中,由于对量化矩阵内的DC矩阵系数执行预测和编码/解码,所以能改进编码效率。此外,能改进编码效率,因为用于通过使用相邻AC系数之间的高相关性从相邻AC系数来预测DC矩阵系数,而不预测常数8。In the present invention, whether to use a default matrix is determined by using the ID of a reference quantization matrix during image encoding/decoding. This reduces the computational complexity of encoding/decoding the quantization matrix. Furthermore, the present invention improves coding efficiency by predicting and encoding/decoding the DC matrix coefficients within the quantization matrix. Furthermore, coding efficiency can be improved by predicting the DC matrix coefficients from adjacent AC coefficients using the high correlation between the adjacent AC coefficients, rather than predicting a constant 8.
表格31和32示意性示出了当应用所有前述特性时能使用的语法结构的示例。Tables 31 and 32 schematically show examples of syntax structures that can be used when all of the aforementioned features are applied.
<表格31><Form 31>
<表格32><Form 32>
在表格31和32的示例中,使得量化矩阵的编码/解码顺序与量化矩阵的恢复顺序相同。因此,能降低用于存储DC矩阵系数的存储空间。此外,在表格31和32的示例中,当指示是否使用缺省矩阵时,不使用几个语法元素,而能仅使用语法元素scaling_list_delta_coef。In the examples of Tables 31 and 32, the encoding/decoding order of the quantization matrix is made the same as the restoration order of the quantization matrix. Therefore, the memory space used to store DC matrix coefficients can be reduced. In addition, in the examples of Tables 31 and 32, when indicating whether to use the default matrix, instead of using several syntax elements, only the syntax element scaling_list_delta_coef can be used.
首先,编码器能将指示是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information indicating whether a quantization matrix exists as a parameter set.
如同表格31的示例中那样,编码器能将scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且所有量化矩阵被确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在编码的量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the example of Table 31, the encoder can encode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) as a parameter set. For example, if there is no quantization matrix and all quantization matrices are determined to be default quantization matrices, the encoder can encode the value of scaling_list_present_flag as 0. If there is an encoded quantization matrix, the encoder can encode the value of scaling_list_present_flag as 1.
在确定用于量化矩阵的预测编码方法的类型之后,编码器能将关于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。After determining the type of predictive coding method for the quantization matrix, the encoder can encode information about the method for predicting and encoding the quantization matrix into a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded can be an adaptive parameter set.
如同表格31的示例中那样,编码器能将scaling_list_pred_mode_flag(即,指定预测和编码量化矩阵的方法的信息)编码为参数集。例如,如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数,则编码器能将scaling_list_pred_mode_flag的值编码为1。此外,如果参考量化矩阵和要编码的量化矩阵被确定为具有相同值或者如果要编码的量化矩阵的系数值被确定为和缺省矩阵的系数值相同,则编码器能将scaling_list_pred_mode_flag的值编码为0。这里,确定这些值使得它们具有相同值能意味着,使用将特定量化矩阵的系数值拷贝到要编码的量化矩阵的系数值的量化矩阵预测方法。As in the example of Table 31, the encoder can encode scaling_list_pred_mode_flag (i.e., information specifying a method for predicting and encoding a quantization matrix) as a parameter set. For example, if the quantization matrix is encoded according to the DPCM and Exponential Golomb coding method by scanning the quantization matrix to predict and encode the coefficients in the quantization matrix, the encoder can encode the value of scaling_list_pred_mode_flag as 1. In addition, if the reference quantization matrix and the quantization matrix to be encoded are determined to have the same value or if the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix, the encoder can encode the value of scaling_list_pred_mode_flag as 0. Here, determining these values so that they have the same value can mean using a quantization matrix prediction method that copies the coefficient values of a specific quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果scaling_list_pred_mode_flag的值为0,则编码器能将要编码的量化矩阵的参考量化矩阵ID和关于是否使用缺省矩阵的信息编码为参数集。这里,对其执行编码的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the encoder can encode the reference quantization matrix ID of the quantization matrix to be encoded and information on whether to use a default matrix as a parameter set. Here, the parameter set on which encoding is performed may be an adaptive parameter set.
如同表格31的示例中那样,如果scaling_list_pred_mode_flag的值为0,则编码器能将scaling_list_pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码为参数集。As in the example of Table 31, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode scaling_list_pred_matrix_id_delta (ie, the reference quantization matrix ID of the quantization matrix to be encoded) as a parameter set.
这里,编码器和解码器能通过使用指示要编码的量化矩阵的matrixID、指示参考量化矩阵或缺省矩阵的RefMatrixID、以及等式8,来确定scaling_list_pred_matrix_id_delta(即,量化矩阵ID)的值。Here, the encoder and the decoder can determine the value of scaling_list_pred_matrix_id_delta (ie, quantization matrix ID) by using matrixID indicating a quantization matrix to be encoded, RefMatrixID indicating a reference quantization matrix or a default matrix, and Equation 8.
<等式8><Equation 8>
scaling_list_pred_matrix_id_delta=matrixID–RefMatrixIDscaling_list_pred_matrix_id_delta=matrixID–RefMatrixID
如果要编码的量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同,则编码器能将scaling_list_pred_matrix_id_delta的值编码为0使得RefMatrixID的值与matrixID的值相同。这里,缺省矩阵意味着与sizeID和matrixID对应的缺省矩阵。If the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder, the encoder can encode the value of scaling_list_pred_matrix_id_delta to 0 so that the value of RefMatrixID is the same as the value of matrixID. Here, the default matrix means the default matrix corresponding to sizeID and matrixID.
如果scaling_list_pred_matrix_id_delta的值为0,则编码器能将scaling_list_pred_matrix_id_delta的值编码为非0的值,使得RefMatrixID的值与matrixID的值不同。If the value of scaling_list_pred_matrix_id_delta is 0, the encoder can encode the value of scaling_list_pred_matrix_id_delta as a non-zero value so that the value of RefMatrixID is different from the value of matrixID.
如果用于预测和编码量化矩阵的方法是通过扫描根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数的方法,则编码器能将量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,差值所编码成的参数集可以是自适应参数集。If the method for predicting and encoding a quantization matrix is a method for predicting and encoding coefficients in a quantization matrix by scanning a quantization matrix encoded according to a DPCM and an exponential Golomb coding method, the encoder can encode the difference between the coefficient values of a previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix as a parameter set. Here, the parameter set encoded as the difference may be an adaptive parameter set.
如同表格32的示例中那样,编码器能将scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为参数集。As in the example of Table 32, the encoder can encode scaling_list_delta_coef (ie, the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) as a parameter set.
如同表格32的示例中那样,编码器能将scaling_list_dc_coef_res(即,与DC矩阵系数对应的量化矩阵的系数值之间的差值)编码为参数集。这里,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3)并且不使用缺省矩阵,则能将scaling_list_dc_coef_res编码为(useDefaultScalingMatrixFlag=0)。As in the example of Table 32, the encoder can encode scaling_list_dc_coef_res (i.e., the difference between the coefficient values of the quantization matrix corresponding to the DC matrix coefficient) as a parameter set. Here, if the size of the quantization matrix to be encoded is 16x16 (sizeID=2) or 32x32 (sizeID=3) and the default matrix is not used, scaling_list_dc_coef_res can be encoded as (useDefaultScalingMatrixFlag=0).
能通过使用DC矩阵系数的值和在DC位置处存在的矩阵系数之间的差,来计算用于单独编码DC矩阵系数的16x16尺寸量化矩阵或32x32尺寸量化矩阵的scaling_list_dc_coef_res的值。The value of scaling_list_dc_coef_res of a 16×16 sized quantization matrix or a 32×32 sized quantization matrix for separately encoding a DC matrix coefficient can be calculated by using a difference between a value of the DC matrix coefficient and a matrix coefficient existing at a DC position.
其间,在传统量化矩阵编码/解码方法中,通过使用当执行量化和反量化时的量化矩阵的尺寸、而不是当执行编码/解码时的量化矩阵的尺寸,来拷贝量化矩阵。因此,从有限数目的量化矩阵来拷贝量化矩阵。结果,当编码/解码量化矩阵时,限制编码效率的改进。Meanwhile, in conventional quantization matrix encoding/decoding methods, quantization matrices are copied by using the size of the quantization matrix used when performing quantization and inverse quantization, rather than the size of the quantization matrix used when performing encoding/decoding. Therefore, quantization matrices are copied from a limited number of quantization matrices. As a result, improvements in coding efficiency are limited when encoding/decoding quantization matrices.
然而,在本发明中,能改进编码效率并能增加预测量化矩阵时的自由度,因为从和当执行编码/解码时的量化矩阵具有相同尺寸的量化矩阵预测量化矩阵。However, in the present invention, encoding efficiency can be improved and the degree of freedom in predicting a quantization matrix can be increased because the quantization matrix is predicted from a quantization matrix having the same size as a quantization matrix when encoding/decoding is performed.
表格33和34示意性示出了当从和当执行编码/解码时的量化矩阵具有相同尺寸的量化矩阵预测量化矩阵时、能使用的语法结构的示例。Tables 33 and 34 schematically show examples of syntax structures that can be used when a quantization matrix is predicted from a quantization matrix having the same size as a quantization matrix when encoding/decoding is performed.
<表格33><Form 33>
<表格34><Form 34>
首先,编码器能将指示是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information indicating whether a quantization matrix exists as a parameter set.
如同表格33或34的示例中那样,编码器能将scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且所有量化矩阵被确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在编码的量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the examples of Tables 33 or 34, the encoder can encode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) as a parameter set. For example, if there is no quantization matrix and all quantization matrices are determined to be default quantization matrices, the encoder can encode the value of scaling_list_present_flag to 0. If there is an encoded quantization matrix, the encoder can encode the value of scaling_list_present_flag to 1.
在确定用于量化矩阵的预测编码方法的类型之后,编码器能将关于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。例如,如同表格33或34的示例中那样,编码器能将scaling_list_pred_mode_flag(即,关于预测和编码量化矩阵的方法的信息)编码为参数集。详细举例,如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数,则编码器能将scaling_list_pred_mode_flag的值编码为1。如果参考量化矩阵和要编码的量化矩阵被确定为具有相同值,则编码器能将scaling_list_pred_mode_flag的值编码为0。这里,确定这些值使得它们具有相同值能意味着,使用将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值的量化矩阵预测方法。After determining the type of predictive encoding method used for the quantization matrix, the encoder can encode information about the method for predicting and encoding the quantization matrix as a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded can be an adaptive parameter set. For example, as in the examples of Tables 33 or 34, the encoder can encode scaling_list_pred_mode_flag (i.e., information about the method for predicting and encoding the quantization matrix) as a parameter set. For example, if the quantization matrix is encoded using DPCM and Exponential Golomb coding by scanning the quantization matrix to predict and encode the coefficients in the quantization matrix, the encoder can encode scaling_list_pred_mode_flag as 1. If the reference quantization matrix and the quantization matrix to be encoded are determined to have the same value, the encoder can encode scaling_list_pred_mode_flag as 0. Here, determining these values so that they have the same value can mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be encoded.
此外,如果scaling_list_pred_mode_flag的值为0,则编码器能将要编码的量化矩阵的参考量化矩阵ID编码为参数集。这里,指定要编码的量化矩阵的参考量化矩阵的尺寸的信息、和指定参考量化矩阵的信息中的至少一个可作为关于参考量化矩阵的ID信息(标识符)被编码为参数集。编码的参数集可以是自适应参数集。In addition, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode the reference quantization matrix ID of the quantization matrix to be encoded as a parameter set. Here, at least one of the information specifying the size of the reference quantization matrix of the quantization matrix to be encoded and the information specifying the reference quantization matrix can be encoded as the parameter set as ID information (identifier) about the reference quantization matrix. The encoded parameter set can be an adaptive parameter set.
例如,如同表格33的示例中那样,如果要编码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同,则编码器能将scaling_list_pred_size_matrix_id_delta(即,关于要编码的量化矩阵的参考量化矩阵的ID信息)编码为参数集。这里,能通过使用RefSizeID(即,要编码的量化矩阵的参考量化矩阵的尺寸)、指示参考量化矩阵的RefMatrixID、和等式9,来确定scaling_list_pred_size_matrix_id_delta(即,关于量化矩阵的ID信息)的值。For example, as in the example of Table 33, if the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the reference quantization matrix, the encoder can encode scaling_list_pred_size_matrix_id_delta (i.e., ID information of the reference quantization matrix of the quantization matrix to be encoded) as a parameter set. Here, the value of scaling_list_pred_size_matrix_id_delta (i.e., ID information of the quantization matrix) can be determined by using RefSizeID (i.e., the size of the reference quantization matrix of the quantization matrix to be encoded), RefMatrixID indicating the reference quantization matrix, and Equation 9.
<等式9><Equation 9>
scaling_list_pred_size_matrix_id_delta=6*(RefSizeID-sizeID)+(RefMatrixID%6)scaling_list_pred_size_matrix_id_delta=6*(RefSizeID-sizeID)+(RefMatrixID%6)
举另一例子,如同表格34的示例中那样,如果要编码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同,则编码器能将scaling_list_pred_size_id_delta和scaling_list_pred_size_matrix_id_delta(即,关于要编码的量化矩阵的参考量化矩阵的ID信息)编码为参数集。这里,能通过使用RefSizeID和等式10,来确定scaling_list_pred_size_id_delta的值,并且能通过使用指示要编码的量化矩阵的参考量化矩阵的RefMatrixID、和等式11,来确定scaling_list_pred_matrix_id_delta的值。For another example, as in the example of Table 34, if the coefficient value of the quantization matrix to be encoded is determined to be the same as the coefficient value of the reference quantization matrix, the encoder can encode scaling_list_pred_size_id_delta and scaling_list_pred_size_matrix_id_delta (i.e., ID information of the reference quantization matrix of the quantization matrix to be encoded) as a parameter set. Here, the value of scaling_list_pred_size_id_delta can be determined by using RefSizeID and Equation 10, and the value of scaling_list_pred_matrix_id_delta can be determined by using RefMatrixID indicating the reference quantization matrix of the quantization matrix to be encoded and Equation 11.
<等式10><Equation 10>
scaling_list_pred_size_id_delta=sizeID–RefSizeIDscaling_list_pred_size_id_delta=sizeID–RefSizeID
<等式11><Equation 11>
scaling_list_pred_matrix_id_delta=matrixID–RefMatrixIDscaling_list_pred_matrix_id_delta=matrixID–RefMatrixID
将要编码的量化矩阵的系数值确定为与参考量化矩阵的系数值相同可意味着,使用将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值的方法。Determining the coefficient values of the quantization matrix to be encoded to be the same as the coefficient values of the reference quantization matrix may mean using a method of copying the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be encoded.
因此,不允许仅从具有相同sizeID的量化矩阵预测量化矩阵,但是通过表格33或表格34的示例,可在执行编码/解码时从具有相同矩阵尺寸但是不同sizeID的量化矩阵预测量化矩阵。Therefore, it is not allowed to predict the quantization matrix only from quantization matrices with the same sizeID, but through the example of Table 33 or Table 34, the quantization matrix can be predicted from quantization matrices with the same matrix size but different sizeID when performing encoding/decoding.
此外,在表格33或表格34的示例中,语法元素的值的范围可限于特定值。例如,在表格33或表格34的示例中,scaling_list_pred_size_matrix_id_delta可限于从0到17的范围的值,scaling_list_pred_size_id_delta可限于从0到2的范围的值,并且scaling_list_pred_matrix_id_delta可限于从0到5的范围的值。Furthermore, in the examples of Table 33 or Table 34, the range of values of the syntax elements may be limited to specific values. For example, in the examples of Table 33 or Table 34, scaling_list_pred_size_matrix_id_delta may be limited to values ranging from 0 to 17, scaling_list_pred_size_id_delta may be limited to values ranging from 0 to 2, and scaling_list_pred_matrix_id_delta may be limited to values ranging from 0 to 5.
此外,在表格33或表格34的示例中,编码器可以不根据比要编码的量化矩阵具有更大尺寸的量化矩阵来预测量化矩阵。Furthermore, in the example of Table 33 or Table 34, the encoder may not predict a quantization matrix from a quantization matrix having a larger size than a quantization matrix to be encoded.
此外,编码器可根据每一量化矩阵的尺寸将量化矩阵分类为DC矩阵系数和AC矩阵系数,并预测用于DC矩阵系数和AC矩阵系数的量化矩阵。例如,具有8x8尺寸的量化矩阵能被分类为DC矩阵系数和AC矩阵系数并然后预测,并且DC矩阵系数和AC矩阵系数两者能与具有剩余尺寸的量化矩阵相关地被预测。换言之,当根据具有8x8尺寸的量化矩阵执行预测时,编码器能通过将与8x8尺寸的量化矩阵中的DC矩阵系数的位置对应的值确定为要编码的量化矩阵的DC矩阵系数,来预测对应位置处的值。如果根据具有16x16或32x32尺寸的量化矩阵执行预测,则编码器也能预测量化矩阵的DC矩阵系数。In addition, the encoder can classify the quantization matrix into DC matrix coefficients and AC matrix coefficients according to the size of each quantization matrix, and predict the quantization matrix for the DC matrix coefficients and AC matrix coefficients. For example, a quantization matrix with an 8x8 size can be classified into DC matrix coefficients and AC matrix coefficients and then predicted, and both the DC matrix coefficients and the AC matrix coefficients can be predicted in relation to the quantization matrix with the remaining size. In other words, when prediction is performed based on a quantization matrix with an 8x8 size, the encoder can predict the value at the corresponding position by determining the value corresponding to the position of the DC matrix coefficient in the 8x8 size quantization matrix as the DC matrix coefficient of the quantization matrix to be encoded. If prediction is performed based on a quantization matrix with a 16x16 or 32x32 size, the encoder can also predict the DC matrix coefficient of the quantization matrix.
其间,如果预测和编码量化矩阵的方法是通过扫描根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数的方法,则编码器能将量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,该参数集可以是自适应参数集。Meanwhile, if the method for predicting and encoding a quantization matrix is a method for predicting and encoding coefficients in a quantization matrix by scanning a quantization matrix encoded according to a DPCM and an exponential Golomb coding method, the encoder can encode the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix as a parameter set. Here, the parameter set may be an adaptive parameter set.
表格35示出了当通过使用量化矩阵中先前已编码的量化矩阵的系数值来预测量化矩阵中的系数时、能使用的语法结构的示例。Table 35 shows an example of a syntax structure that can be used when predicting coefficients in a quantization matrix by using coefficient values of a quantization matrix that has been previously encoded in the quantization matrix.
<表格35><Form 35>
如同表格35的示例中那样,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)or32x32(sizeID=3),则编码器能将scaling_list_dc_coef_minus8(即,关于DC矩阵系数的信息)编码为参数集。As in the example of Table 35, if the size of the quantization matrix to be encoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the encoder can encode scaling_list_dc_coef_minus8 (ie, information about DC matrix coefficients) as a parameter set.
如同表格35的示例中那样,编码器能将scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为参数集。As in the example of Table 35, the encoder can encode scaling_list_delta_coef (ie, the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) as a parameter set.
此外,编码器能通过使用用来导出scaling_list_dc_coef_minus8或nextCoef的值的scaling_list_delta_coef,来编码关于是否使用缺省矩阵的信息。例如,编码器能将scaling_list_dc_coef_minus8的值编码为-8,以便命令解码器使用缺省矩阵,并且能编码scaling_list_delta_coef使得第一nextCoef值为0,以便命令解码器使用缺省矩阵。In addition, the encoder can encode information about whether to use the default matrix by using scaling_list_delta_coef used to derive the value of scaling_list_dc_coef_minus8 or nextCoef. For example, the encoder can encode the value of scaling_list_dc_coef_minus8 as -8 to instruct the decoder to use the default matrix, and can encode scaling_list_delta_coef so that the first nextCoef value is 0 to instruct the decoder to use the default matrix.
换言之,其中通过使用量化矩阵的系数值而确定是否使用缺省矩阵的编码/解码量化矩阵的方法具有的缺点在于,它增加编码/解码量化矩阵的系数值的处理中的复杂程度。此外,存在的缺点在于,恶化编码效率,因为当预测量化矩阵时编码/解码不必要的信息。此外,通过使用当执行量化和反量化时的量化矩阵的尺寸、而不是当执行编码/解码时的量化矩阵的尺寸,来拷贝量化矩阵。由于从有限数目的量化矩阵拷贝量化矩阵,所以当编码/解码量化矩阵时限制编码效率的改进。In other words, the method of encoding/decoding a quantization matrix in which the coefficient values of the quantization matrix are used to determine whether to use a default matrix has the disadvantage of increasing the complexity of the processing of encoding/decoding the coefficient values of the quantization matrix. Furthermore, there is the disadvantage of deteriorating coding efficiency because unnecessary information is encoded/decoded when predicting the quantization matrix. Furthermore, the quantization matrix is copied by using the size of the quantization matrix used when performing quantization and inverse quantization, rather than the size of the quantization matrix used when performing encoding/decoding. Since the quantization matrix is copied from a limited number of quantization matrices, the improvement in coding efficiency when encoding/decoding the quantization matrix is limited.
在本发明中,在图像编码/解码中,能通过使用参考量化矩阵的ID来确定是否使用缺省矩阵。因此,能降低当编码/解码量化矩阵时计算的复杂程度。此外,能改进编码效率并且能增加预测量化矩阵的自由度,因为当编码/解码量化矩阵时,根据和量化矩阵具有相同尺寸的量化矩阵来预测量化矩阵。In the present invention, whether to use a default matrix can be determined by using the ID of a reference quantization matrix during image encoding/decoding. Therefore, the complexity of calculations when encoding/decoding the quantization matrix can be reduced. Furthermore, encoding efficiency can be improved and the degree of freedom in predicting the quantization matrix can be increased because, when encoding/decoding the quantization matrix, the quantization matrix is predicted based on a quantization matrix of the same size as the quantization matrix.
表格36和37示意性示出了当通过使用参考量化矩阵的ID、并通过使用与当编码/解码量化矩阵时具有相同尺寸的量化矩阵来预测量化矩阵时、能使用的语法结构的示例。Tables 36 and 37 schematically show examples of syntax structures that can be used when predicting a quantization matrix by using the ID of a reference quantization matrix and by using a quantization matrix having the same size as when encoding/decoding the quantization matrix.
<表格36><Form 36>
<表格37><Form 37>
首先,编码器能将指示是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information indicating whether a quantization matrix exists as a parameter set.
如同表格36或37的示例中那样,编码器能将scaling_list_present_flag(即,关于在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且所有量化矩阵被确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在编码的量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the examples of Tables 36 or 37, the encoder can encode scaling_list_present_flag (i.e., information about whether a quantization matrix exists in the bitstream) as a parameter set. For example, if there is no quantization matrix and all quantization matrices are determined to be default quantization matrices, the encoder can encode the value of scaling_list_present_flag as 0. If there is an encoded quantization matrix, the encoder can encode the value of scaling_list_present_flag as 1.
在确定用于量化矩阵的预测编码方法的类型之后,编码器能将关于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。After determining the type of predictive coding method for the quantization matrix, the encoder can encode information about the method for predicting and encoding the quantization matrix into a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded can be an adaptive parameter set.
如同表格36或表格37的示例中那样,编码器能将scaling_list_pred_mode_flag(即,指定预测和编码量化矩阵的方法的信息)编码为参数集。例如,如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数,则编码器能将scaling_list_pred_mode_flag的值编码为1。此外,如果参考量化矩阵和要编码的量化矩阵被确定为具有相同值、或者如果要编码的量化矩阵的系数值被确定为和缺省矩阵的系数值相同,则编码器能将scaling_list_pred_mode_flag的值编码为0。这里,确定这些值使得它们具有相同值可意味着使用这样的量化矩阵预测方法,其将特定量化矩阵的系数值拷贝到要编码的量化矩阵的系数值。As in the examples of Table 36 or Table 37, the encoder can encode scaling_list_pred_mode_flag (i.e., information specifying a method for predicting and encoding a quantization matrix) as a parameter set. For example, if the quantization matrix is encoded according to the DPCM and Exponential Golomb coding method by scanning the quantization matrix to predict and encode the coefficients in the quantization matrix, the encoder can encode the value of scaling_list_pred_mode_flag to 1. In addition, if the reference quantization matrix and the quantization matrix to be encoded are determined to have the same value, or if the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix, the encoder can encode the value of scaling_list_pred_mode_flag to 0. Here, determining these values so that they have the same value may mean using a quantization matrix prediction method that copies the coefficient values of a specific quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果scaling_list_pred_mode_flag的值为0,则编码器能将要编码的量化矩阵的参考量化矩阵ID编码为参数集。这里,指定要编码的量化矩阵的参考量化矩阵的尺寸的信息、和指定参考量化矩阵的信息中的至少一个可作为关于参考量化矩阵的ID信息被编码为参数集。编码的参数集可以是自适应参数集。此外,ID或ID信息所编码到的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the encoder can encode the reference quantization matrix ID of the quantization matrix to be encoded as a parameter set. Here, at least one of information specifying the size of the reference quantization matrix of the quantization matrix to be encoded and information specifying the reference quantization matrix can be encoded as ID information about the reference quantization matrix in the parameter set. The encoded parameter set may be an adaptive parameter set. Furthermore, the ID or the parameter set into which the ID information is encoded may be an adaptive parameter set.
例如,如同表格36的示例中那样,如果scaling_list_pred_mode_flag的值为0,则编码器能将scaling_list_pred_size_matrix_id_delta(即,关于要编码的量化矩阵的参考量化矩阵的ID信息)编码为参数集。这里,编码器能通过使用RefSizeID和指示参考量化矩阵或缺省矩阵的RefMatrixID、以及等式12,来确定scaling_list_pred_size_matrix_id_delta(即,关于量化矩阵的ID信息)。For example, as in the example of Table 36, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode scaling_list_pred_size_matrix_id_delta (i.e., ID information of the reference quantization matrix of the quantization matrix to be encoded) as a parameter set. Here, the encoder can determine scaling_list_pred_size_matrix_id_delta (i.e., ID information of the quantization matrix) by using RefSizeID and RefMatrixID indicating the reference quantization matrix or the default matrix and Equation 12.
<等式12><Equation 12>
scaling_list_pred_size_matrix_id_delta=6*(RefSizeID-sizeID)+(RefMatrixID%6)scaling_list_pred_size_matrix_id_delta=6*(RefSizeID-sizeID)+(RefMatrixID%6)
举另一例子,如同表格37中那样,如果要编码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同、或者如果要编码的量化矩阵的系数值被确定为与缺省矩阵的系数值相同,则编码器能将scaling_list_pred_size_id_delta和scaling_list_pred_size_matrix_id_delta(即,关于要编码的量化矩阵的参考量化矩阵的ID信息)编码为参数集。这里,编码器能通过使用RefSizeID和等式13,来导出scaling_list_pred_size_id_delta的值,并且能通过使用指示要编码的量化矩阵的参考量化矩阵或缺省矩阵的RefMatrixID、和等式14,来导出scaling_list_pred_matrix_id_delta的值。For another example, as in Table 37, if the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the reference quantization matrix, or if the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix, the encoder can encode scaling_list_pred_size_id_delta and scaling_list_pred_size_matrix_id_delta (i.e., ID information of the reference quantization matrix of the quantization matrix to be encoded) as a parameter set. Here, the encoder can derive the value of scaling_list_pred_size_id_delta by using RefSizeID and Equation 13, and can derive the value of scaling_list_pred_matrix_id_delta by using RefMatrixID indicating the reference quantization matrix or the default matrix of the quantization matrix to be encoded and Equation 14.
<等式13><Equation 13>
scaling_list_pred_size_id_delta=sizeID–RefSizeIDscaling_list_pred_size_id_delta=sizeID–RefSizeID
<等式14><Equation 14>
scaling_list_pred_matrix_id_delta=matrixID–RefMatrixIDscaling_list_pred_matrix_id_delta=matrixID–RefMatrixID
如果要编码的量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同,则编码器能将scaling_list_pred_matrix_id_delta的值编码为0,使得RefMatrixID的值和matrixID的值彼此相同。这里,缺省矩阵意味着与sizeID和matrixID对应的缺省矩阵。If the coefficient values of the quantization matrix to be encoded are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder, the encoder can encode the value of scaling_list_pred_matrix_id_delta to 0 so that the value of RefMatrixID and the value of matrixID are the same. Here, the default matrix means the default matrix corresponding to sizeID and matrixID.
如果要编码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同,则编码器能将scaling_list_pred_matrix_id_delta的值编码为非0的值,使得RefMatrixID的值和matrixID的值彼此不相同。If the coefficient values of the quantization matrix to be encoded are determined to be the same as those of the reference quantization matrix, the encoder can encode the value of scaling_list_pred_matrix_id_delta as a non-zero value so that the value of RefMatrixID and the value of matrixID are different from each other.
因此,通过表格36或表格37的示例,能从具有相同sizeID的量化矩阵预测量化矩阵,并且能从在执行编码/解码时具有相同矩阵尺寸但是不同sizeID的量化矩阵预测量化矩阵。Therefore, through the example of Table 36 or Table 37, the quantization matrix can be predicted from the quantization matrix having the same sizeID, and the quantization matrix can be predicted from the quantization matrix having the same matrix size but different sizeID when encoding/decoding is performed.
此外,在表格36或表格37的示例中,scaling_list_pred_size_matrix_id_delta、scaling_list_pred_size_id_delta和scaling_list_pred_matrix_id_delta的值的范围可受限。例如,scaling_list_pred_size_matrix_id_delta可限于从0到17的范围的值,scaling_list_pred_size_id_delta可限于从0到2的范围的值,并且scaling_list_pred_matrix_id_delta可限于从0到5的范围的值。In addition, in the examples of Table 36 or Table 37, the ranges of the values of scaling_list_pred_size_matrix_id_delta, scaling_list_pred_size_id_delta, and scaling_list_pred_matrix_id_delta may be limited. For example, scaling_list_pred_size_matrix_id_delta may be limited to values ranging from 0 to 17, scaling_list_pred_size_id_delta may be limited to values ranging from 0 to 2, and scaling_list_pred_matrix_id_delta may be limited to values ranging from 0 to 5.
此外,可以不根据比要编码的量化矩阵具有较大尺寸的量化矩阵来执行量化矩阵的预测。Furthermore, prediction of the quantization matrix may not be performed based on a quantization matrix having a larger size than a quantization matrix to be encoded.
在预测量化矩阵时,可以通过考虑矩阵的尺寸来不同地执行预测量化矩阵的方法。例如,当根据具有8x8尺寸的量化矩阵执行预测时,编码器能通过将与8x8尺寸的量化矩阵中的DC矩阵系数的位置对应的值确定为DC矩阵系数,来预测对应位置处的值。如果根据具有16x16或32x32尺寸的量化矩阵执行预测,则编码器也能预测DC矩阵系数。When predicting a quantization matrix, the method of predicting the quantization matrix can be performed differently by considering the size of the matrix. For example, when predicting based on a quantization matrix having an 8x8 size, the encoder can predict the value at the corresponding position by determining the value corresponding to the position of the DC matrix coefficient in the 8x8 quantization matrix as the DC matrix coefficient. If prediction is performed based on a quantization matrix having a 16x16 or 32x32 size, the encoder can also predict the DC matrix coefficient.
其间,如果预测和编码量化矩阵的方法是通过扫描根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数的方法,则编码器能将量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,该差值所编码成的参数集可以是自适应参数集。Meanwhile, if the method for predicting and encoding the quantization matrix is a method for predicting and encoding the coefficients in the quantization matrix by scanning the quantization matrix according to the DPCM and Exponential Golomb coding method, the encoder can encode the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix as a parameter set. Here, the parameter set encoded by the difference may be an adaptive parameter set.
表格38示出了当通过使用量化矩阵中先前已编码的量化矩阵的系数值来预测量化矩阵中的系数时、能使用的语法结构的示例。Table 38 shows an example of a syntax structure that can be used when predicting coefficients in a quantization matrix by using coefficient values of a quantization matrix that has been previously encoded in the quantization matrix.
<表格38><Form 38>
如同表格38的示例中那样,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则编码器能将scaling_list_dc_coef_minus8(即,指定DC矩阵系数的信息)编码为参数集。As in the example of Table 38, if the size of the quantization matrix to be encoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the encoder can encode scaling_list_dc_coef_minus8 (ie, information specifying DC matrix coefficients) as a parameter set.
如同表格38的示例中那样,编码器能将scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为参数集。As in the example of Table 38, the encoder can encode scaling_list_delta_coef (ie, the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) as a parameter set.
在传统量化矩阵编码/解码方法中,通过不考虑当编码/解码量化矩阵中的第一系数时频繁出现的系数值,来编码量化矩阵的系数值。因此,在传统量化矩阵编码/解码方法中,限制编码效率的改进。In conventional quantization matrix encoding/decoding methods, the coefficient values of the quantization matrix are encoded by ignoring the coefficient values that frequently appear when encoding/decoding the first coefficient in the quantization matrix. Therefore, in conventional quantization matrix encoding/decoding methods, the improvement of coding efficiency is limited.
在本发明中,能通过使用频繁出现的系数值,来预测和编码/解码量化矩阵内的第一系数。此外,在本发明中,如果将缺省矩阵的第一系数值或DC矩阵系数值定义为16、或者非缺省矩阵的第一系数值或DC矩阵系数值分布在16周围,则要编码/解码的量化矩阵中的第一系数值或DC矩阵系数值能通过常数16来预测并然后编码/解码。在该情况下,本发明能改进编码效率。In the present invention, the first coefficient in the quantization matrix can be predicted and encoded/decoded by using a frequently occurring coefficient value. In addition, in the present invention, if the first coefficient value or DC matrix coefficient value of the default matrix is defined as 16, or the first coefficient value or DC matrix coefficient value of the non-default matrix is distributed around 16, then the first coefficient value or DC matrix coefficient value in the quantization matrix to be encoded/decoded can be predicted by a constant of 16 and then encoded/decoded. In this case, the present invention can improve encoding efficiency.
表格39和40示意性示出了当考虑量化矩阵中的第一系数时能使用的语法结构的示例。Tables 39 and 40 schematically show examples of syntax structures that can be used when considering the first coefficient in the quantization matrix.
<表格39><Form 39>
<表格40><Form 40>
首先,编码器能将指示是否存在量化矩阵的信息编码为参数集。First, the encoder can encode information indicating whether a quantization matrix exists as a parameter set.
如同表格39的示例中那样,编码器能将scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)编码为参数集。例如,如果不存在量化矩阵并且所有量化矩阵被确定为缺省量化矩阵,则编码器能将scaling_list_present_flag的值编码为0。如果存在编码的量化矩阵,则编码器能将scaling_list_present_flag的值编码为1。As in the example of Table 39, the encoder can encode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) as a parameter set. For example, if there is no quantization matrix and all quantization matrices are determined to be default quantization matrices, the encoder can encode the value of scaling_list_present_flag as 0. If there is an encoded quantization matrix, the encoder can encode the value of scaling_list_present_flag as 1.
在确定用于量化矩阵的预测编码方法的类型之后,编码器能将关于预测和编码量化矩阵的方法的信息编码为参数集。这里,关于预测和编码量化矩阵的方法的信息所编码成的参数集可以是自适应参数集。After determining the type of predictive coding method for the quantization matrix, the encoder can encode information about the method for predicting and encoding the quantization matrix into a parameter set. Here, the parameter set into which the information about the method for predicting and encoding the quantization matrix is encoded can be an adaptive parameter set.
如同表格39的示例中那样,编码器能将scaling_list_pred_mode_flag(即,关于预测和编码量化矩阵的方法的信息)编码为参数集。例如,如果通过扫描量化矩阵根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵中的系数,则编码器能将scaling_list_pred_mode_flag的值编码为1。此外,如果参考量化矩阵和要编码的量化矩阵被确定为具有相同值,则编码器能将scaling_list_pred_mode_flag的值编码为0。这里,确定这些值使得它们具有相同值可意味着使用这样的量化矩阵预测方法,其将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值。As in the example of Table 39, the encoder can encode scaling_list_pred_mode_flag (i.e., information about a method for predicting and encoding a quantization matrix) as a parameter set. For example, if the quantization matrix is encoded according to the DPCM and Exponential Golomb coding method by scanning the quantization matrix to predict and encode the coefficients in the quantization matrix, the encoder can encode the value of scaling_list_pred_mode_flag to 1. In addition, if the reference quantization matrix and the quantization matrix to be encoded are determined to have the same value, the encoder can encode the value of scaling_list_pred_mode_flag to 0. Here, determining these values so that they have the same value may mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be encoded.
如果scaling_list_pred_mode_flag的值为0,则编码器能将量化矩阵的参考量化矩阵ID编码为参数集。这里,参考量化矩阵ID所编码到的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the encoder can encode the reference quantization matrix ID of the quantization matrix as a parameter set. Here, the parameter set into which the reference quantization matrix ID is encoded may be an adaptive parameter set.
如同表格39的示例中那样,如果scaling_list_pred_mode_flag的值为0,则编码器能将scaling_list_pred_matrix_id_delta(即,要编码的量化矩阵的参考量化矩阵ID)编码为参数集。这里,编码器能通过使用指示要编码的量化矩阵的matrixID、指示参考量化矩阵的RefMatrixID、以及等式15,来确定scaling_list_pred_matrix_id_delta(即,量化矩阵ID)。As in the example of Table 39, if the value of scaling_list_pred_mode_flag is 0, the encoder can encode scaling_list_pred_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be encoded) as a parameter set. Here, the encoder can determine scaling_list_pred_matrix_id_delta (i.e., the quantization matrix ID) by using matrixID indicating the quantization matrix to be encoded, RefMatrixID indicating the reference quantization matrix, and Equation 15.
<等式15><Equation 15>
scaling_list_pred_matrix_id_delta=matrixID-(RefMatrixID+1)scaling_list_pred_matrix_id_delta=matrixID-(RefMatrixID+1)
确定要编码的量化矩阵的系数值使得它们和参考量化矩阵的系数值具有相同值能意味着使用将参考量化矩阵的系数值拷贝到要编码的量化矩阵的系数值。Determining the coefficient values of the quantization matrix to be encoded so that they have the same values as the coefficient values of the reference quantization matrix can mean using coefficient values of the reference quantization matrix copied to the coefficient values of the quantization matrix to be encoded.
如果用于预测和编码量化矩阵的方法是通过扫描根据DPCM和指数哥伦布编码方法来编码量化矩阵以便预测和编码量化矩阵内的系数的方法,则编码器能将量化矩阵内先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值编码为参数集。这里,差值所编码到的参数集可以是自适应参数集。If the method for predicting and encoding a quantization matrix is a method for predicting and encoding coefficients within the quantization matrix by scanning the quantization matrix according to the DPCM and Exponential Golomb coding method, the encoder can encode the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded within the quantization matrix as a parameter set. Here, the parameter set into which the difference is encoded may be an adaptive parameter set.
如同表格40的示例中那样,如果要编码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则编码器能将scaling_list_dc_coef_minus16(即,与DC矩阵系数对应的量化矩阵的系数值)编码为参数集。这里,scaling_list_dc_coef_minus16的值指示假设预测值为16的情况下、计算的DC矩阵系数。As in the example of Table 40, if the size of the quantization matrix to be encoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the encoder can encode scaling_list_dc_coef_minus16 (i.e., the coefficient value of the quantization matrix corresponding to the DC matrix coefficient) as a parameter set. Here, the value of scaling_list_dc_coef_minus16 indicates the DC matrix coefficient calculated assuming a prediction value of 16.
如同表格40的示例中那样,编码器能将scaling_list_delta_coef(即,量化矩阵中已先前编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)编码为参数集。如同表格40的示例中那样,编码器能设置“nextCoef=16”,即,将第一系数值的预测值设置为16。As in the example of Table 40, the encoder can encode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded in the quantization matrix) as a parameter set. As in the example of Table 40, the encoder can set "nextCoef=16", that is, set the predicted value of the first coefficient value to 16.
此外,编码器能通过使用用来计算scaling_list_dc_coef_minus16或nextCoef的scaling_list_delta_coef,来确定是否使用缺省矩阵。即,编码器能将scaling_list_dc_coef_minus16的值编码为-16,以便命令解码器使用缺省矩阵,并能编码scaling_list_delta_coef使得第一nextCoef的值成为0,以便命令解码器使用缺省矩阵。In addition, the encoder can determine whether to use the default matrix by using scaling_list_delta_coef used to calculate scaling_list_dc_coef_minus16 or nextCoef. That is, the encoder can encode the value of scaling_list_dc_coef_minus16 to -16 to instruct the decoder to use the default matrix, and can encode scaling_list_delta_coef so that the value of the first nextCoef becomes 0 to instruct the decoder to use the default matrix.
在以上表格和以下表格以及表格39和40的示例的实施例中,编码器能将nextCoef设置为16,并且scaling_list_dc_coef_minus16的值能意味着在假设预测值为16的情况下、计算的DC矩阵系数。此外,在以上表格和以下表格的实施例中,编码器能将scaling_list_dc_coef_minus16的值编码为-16,以便命令解码器使用缺省矩阵。In the embodiments of the examples of the above and following tables and Tables 39 and 40, the encoder can set nextCoef to 16, and the value of scaling_list_dc_coef_minus16 can mean the DC matrix coefficient calculated assuming the prediction value is 16. In addition, in the embodiments of the above and following tables, the encoder can encode the value of scaling_list_dc_coef_minus16 as -16 to instruct the decoder to use the default matrix.
迄今已描述了用于编码关于量化矩阵的信息并用信号通知所编码的信息的编码器的操作的示例。其后,通过使用前述表格的示例来描述其中解码器解码关于量化矩阵的信息并获得量化矩阵的示例。An example of the operation of an encoder for encoding information about a quantization matrix and signaling the encoded information has been described so far. Hereinafter, an example in which a decoder decodes information about a quantization matrix and obtains a quantization matrix is described by using an example of the aforementioned table.
图5是示意性图示了用于解码关于量化矩阵的信息并通过使用解码的信息来执行解码的解码器的操作的示例的流程图。FIG. 5 is a flowchart schematically illustrating an example of the operation of a decoder for decoding information about a quantization matrix and performing decoding by using the decoded information.
参考图5,解码器在步骤S510解码关于变换单元的尺寸的信息,并基于解码的信息来确定变换单元的尺寸。5 , the decoder decodes information about the size of a transformation unit and determines the size of the transformation unit based on the decoded information in step S510 .
解码器对来自接收的比特流的关于变换单元的尺寸的信息执行熵解码。解码器能从比特流中的参数集解码关于变换单元的尺寸的信息。The decoder performs entropy decoding on the information about the size of the transform unit from the received bitstream.The decoder can decode the information about the size of the transform unit from the parameter set in the bitstream.
例如,解码器可从比特流解码关于变换单元的最小尺寸和最大尺寸的信息。For example, the decoder may decode information about the minimum size and the maximum size of the transform unit from the bitstream.
如同表格1的示例中那样,解码器能通过使用比特流中的语法元素“log2_min_transform_block_size_minus2”,来解码已向其应用Log2函数的正方形变换单元的水平或垂直方向的最小尺寸。此外,解码器可通过使用比特流中的语法元素“log2_diff_max_min_transform_block_size”,来解码已向其应用Log2函数的正方形变换单元的水平或垂直方向的最大尺寸、和正方形变换单元的水平或垂直方向的最小尺寸之间的差值。As in the example of Table 1, the decoder can decode the minimum size in the horizontal or vertical direction of a square transform unit to which the Log2 function has been applied by using the syntax element "log2_min_transform_block_size_minus2" in the bitstream. In addition, the decoder can decode the difference between the maximum size in the horizontal or vertical direction of a square transform unit to which the Log2 function has been applied and the minimum size in the horizontal or vertical direction of the square transform unit by using the syntax element "log2_diff_max_min_transform_block_size" in the bitstream.
解码器能确定解码的变换单元的最小尺寸和最大尺寸。这里,变换单元的最大尺寸可通过所解码的最大尺寸和最小值之间的差值、和所解码的最小尺寸来确定。The decoder can determine the minimum size and maximum size of the decoded transform unit. Here, the maximum size of the transform unit can be determined by the difference between the decoded maximum size and the minimum value, and the decoded minimum size.
例如,解码器能通过将2添加到解码的log2_min_transform_block_size_minus2来计算Log2MinTrafoSize,并确定使用1<<Log2MinTrafoSize所计算的值作为正方形变换单元的水平或垂直方向的最小尺寸。解码器能基于解码的log2_diff_max_min_transform_block_size的值和通过将2添加到解码的log2_min_transform_block_size_minus2所获得的值,来计算Log2MaxTrafoSize,并确定使用1<<Log2MaxTrafoSize所计算的值作为正方形变换单元的水平或垂直方向的最大尺寸。For example, the decoder can calculate Log2MinTrafoSize by adding 2 to the decoded log2_min_transform_block_size_minus2, and determine the value calculated using 1<<Log2MinTrafoSize as the minimum size in the horizontal or vertical direction of the square transform unit. The decoder can calculate Log2MaxTrafoSize based on the value of the decoded log2_diff_max_min_transform_block_size and the value obtained by adding 2 to the decoded log2_min_transform_block_size_minus2, and determine the value calculated using 1<<Log2MaxTrafoSize as the maximum size in the horizontal or vertical direction of the square transform unit.
这里,变换单元的最小尺寸可意味着使用Log2MinTrafoSize或1<<Log2MinTrafoSize所计算的值,而变换单元的最大尺寸可意味着使用Log2MaxTrafoSize或1<<Log2MaxTrafoSize所计算的值。Here, the minimum size of the transform unit may mean a value calculated using Log2MinTrafoSize or 1<<Log2MinTrafoSize, and the maximum size of the transform unit may mean a value calculated using Log2MaxTrafoSize or 1<<Log2MaxTrafoSize.
解码器在步骤S520解码关于量化矩阵的信息。解码器能解码关于量化矩阵的信息,包括以下的一个或多个:(1)关于是否已使用量化矩阵的信息、(2)关于是否存在量化矩阵的信息、(3)关于是否已解码量化矩阵以及是否已使用缺省矩阵的信息、(4)关于用于预测和解码量化矩阵的方法的类型的信息、(5)关于参考量化矩阵ID的信息、和(6)关于量化矩阵中先前已编码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值的信息。这里,关于量化矩阵的信息可取决于变换单元的尺寸。The decoder decodes information about the quantization matrix in step S520. The decoder can decode information about the quantization matrix, including one or more of the following: (1) information about whether the quantization matrix has been used, (2) information about whether the quantization matrix exists, (3) information about whether the quantization matrix has been decoded and whether a default matrix has been used, (4) information about the type of method for predicting and decoding the quantization matrix, (5) information about the reference quantization matrix ID, and (6) information about the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix. Here, the information about the quantization matrix may depend on the size of the transform unit.
首先,解码器能通过从参数集解码关于是否已使用量化矩阵的信息,来确定是否已使用量化矩阵。如同表格2的示例中那样,解码器能从序列参数集解码scaling_list_enabled_flag(即,关于是否已使用量化矩阵的信息)。这里,当scaling_list_enabled_flag的值为1时,解码器能使用在变换系数的反量化/缩放中的量化矩阵用于整个序列。当scaling_list_enabled_flag的值为0时,解码器可以不使用在变换系数的反量化/缩放中的量化矩阵。First, the decoder can determine whether a quantization matrix has been used by decoding information about whether a quantization matrix has been used from a parameter set. As in the example of Table 2, the decoder can decode scaling_list_enabled_flag (i.e., information about whether a quantization matrix has been used) from a sequence parameter set. Here, when the value of scaling_list_enabled_flag is 1, the decoder can use the quantization matrix used in the inverse quantization/scaling of transform coefficients for the entire sequence. When the value of scaling_list_enabled_flag is 0, the decoder may not use the quantization matrix used in the inverse quantization/scaling of transform coefficients.
解码器能通过从参数集解码关于是否存在量化矩阵的信息,来确定是否存在量化矩阵。如同表格3的示例中那样,解码器能从自适应参数集解码aps_scaling_list_data_present_flag(即,关于是否存在量化矩阵的信息)。例如,当aps_scaling_list_data_present_flag的值为1时,它意味着在自适应参数集中存在量化矩阵。当aps_scaling_list_data_present_flag的值为0时,它意味着在自适应参数集中不存在量化矩阵。如果scaling_list_enabled_flag为1并且aps_scaling_list_data_present_flag为0,则它能意味着当执行反量化时使用缺省矩阵。此外,尽管已图示了其中从自适应参数集解码关于是否存在量化矩阵的信息的示例,但是本发明不限于此。解码器可以从另一参数集解码关于是否存在量化矩阵的信息。The decoder can determine whether a quantization matrix exists by decoding information about whether a quantization matrix exists from a parameter set. As in the example of Table 3, the decoder can decode aps_scaling_list_data_present_flag (i.e., information about whether a quantization matrix exists) from an adaptive parameter set. For example, when the value of aps_scaling_list_data_present_flag is 1, it means that a quantization matrix exists in the adaptive parameter set. When the value of aps_scaling_list_data_present_flag is 0, it means that a quantization matrix does not exist in the adaptive parameter set. If scaling_list_enabled_flag is 1 and aps_scaling_list_data_present_flag is 0, it can mean that a default matrix is used when performing inverse quantization. In addition, although an example has been illustrated in which information about whether a quantization matrix exists is decoded from an adaptive parameter set, the present invention is not limited thereto. The decoder can decode information about whether a quantization matrix exists from another parameter set.
解码器能通过从参数集解码关于是否已解码量化矩阵以及是否已使用缺省矩阵的信息,来确定是否已解码量化矩阵以及是否已使用缺省矩阵。如同表格4的示例中那样,解码器能从自适应参数集解码use_default_scaling_list_flag(即,关于是否已解码量化矩阵以及是否已使用缺省矩阵的信息)。例如,当use_default_scaling_list_flag的值为1时,不解码量化矩阵,并且所有量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省量化矩阵的系数值相同。当use_default_scaling_list_flag的值为0时,解码量化矩阵,并且可以不使用编码器和/或解码器中定义的缺省矩阵The decoder can determine whether the quantization matrix has been decoded and whether the default matrix has been used by decoding information about whether the quantization matrix has been decoded and whether the default matrix has been used from the parameter set. As in the example of Table 4, the decoder can decode use_default_scaling_list_flag (i.e., information about whether the quantization matrix has been decoded and whether the default matrix has been used) from the adaptive parameter set. For example, when the value of use_default_scaling_list_flag is 1, the quantization matrix is not decoded, and the coefficient values of all quantization matrices can be determined to be the same as the coefficient values of the default quantization matrix defined in the encoder and/or decoder. When the value of use_default_scaling_list_flag is 0, the quantization matrix is decoded, and the default matrix defined in the encoder and/or decoder may not be used.
解码器能通过使用SizeID和MatrixID,来确定是否解码量化矩阵、是否使用缺省矩阵、和是否执行预测编码中的一个或多个。The decoder can determine one or more of whether to decode a quantization matrix, whether to use a default matrix, and whether to perform predictive coding by using SizeID and MatrixID.
如同表格5和6的示例中那样,SizeID的值能通过使用表格根据变换单元的尺寸或量化矩阵的尺寸来指定量化矩阵,而MatrixID的值能指定其中使用量化矩阵的编码模式和与颜色分量对应的量化矩阵的类型。As in the examples of Tables 5 and 6, the value of SizeID can specify the quantization matrix according to the size of the transform unit or the size of the quantization matrix by using a table, while the value of MatrixID can specify the encoding mode in which the quantization matrix is used and the type of quantization matrix corresponding to the color component.
其间,能使用表格7和8来指示缺省量化矩阵。Meanwhile, Tables 7 and 8 can be used to indicate the default quantization matrix.
如果不考虑可用的变换单元的最小尺寸和最大尺寸,则必须解码具有所有尺寸的变换单元的量化矩阵。在该情况下,编码效率恶化,并且计算的复杂度增加。If the minimum size and maximum size of the available transform units are not considered, the quantization matrices of the transform units of all sizes must be decoded, which deteriorates the coding efficiency and increases the complexity of the calculation.
根据本发明,能通过考虑变换单元的尺寸来解码关于量化矩阵的信息。According to the present invention, information about a quantization matrix can be decoded by considering the size of a transform unit.
在表格9的示例中,基于关于变换单元的多条信息之中的、变换单元的最小尺寸和最大尺寸,来限制与每一变换单元的尺寸对应的SizeID,并且基于限制的SizeID,来执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测和解码方法的类型的信息的解码中的一个或多个。In the example of Table 9, the SizeID corresponding to the size of each transform unit is limited based on the minimum size and the maximum size of the transform unit among multiple information about the transform unit, and based on the limited SizeID, one or more of decoding of the quantization matrix, decoding of information about whether a default matrix has been used, and decoding of information about the type of prediction and decoding methods are performed.
如同表格9的示例中那样,能基于关于变换单元的多条信息之中的、变换单元的最小尺寸和最大尺寸,来限制SizeID,并且能仅与具有特定尺寸的变换单元相关地,解码关于是否已使用量化矩阵或缺省矩阵的信息、以及关于预测解码方法的类型的信息中的一个或多个。As in the example of Table 9, SizeID can be limited based on the minimum size and maximum size of the transform unit among multiple information about the transform unit, and one or more of the information about whether a quantization matrix or a default matrix has been used and the information about the type of prediction decoding method can be decoded only in relation to a transform unit having a specific size.
例如,如果指定变换单元的最小尺寸的Log2MinTrafoSize的值为3并且指定变换单元的最大尺寸的Log2MaxTrafoSize的值为4,则解码器能执行与从8x8尺寸到16x16尺寸的变换单元对应的量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。For example, if the value of Log2MinTrafoSize specifying the minimum size of the transform unit is 3 and the value of Log2MaxTrafoSize specifying the maximum size of the transform unit is 4, the decoder can perform one or more of decoding of quantization matrices corresponding to transform units ranging from 8x8 size to 16x16 size, decoding of information about whether a default matrix has been used, and decoding of information about the type of predictive decoding method.
在表格9的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 9, use_default_scaling_list_flag may not be decoded.
此外,与该示例中不同,解码器可基于变换单元的最大尺寸和最小值之间的差值来限制SizeID,并基于限制的SizeID,来执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。In addition, unlike in this example, the decoder may limit the SizeID based on the difference between the maximum size and the minimum value of the transform unit, and based on the limited SizeID, perform one or more of decoding of the quantization matrix, decoding of information about whether a default matrix has been used, and decoding of information about the type of predictive decoding method.
如同表格10的示例中那样,解码器能基于变换单元的最小尺寸和最大尺寸之间的差值,来限制SizeID,并且对仅具有特定尺寸的变换单元(即,仅变换单元的特定尺寸)执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。As in the example of Table 10, the decoder can limit SizeID based on the difference between the minimum size and the maximum size of the transform unit, and perform one or more of decoding of the quantization matrix, decoding of information about whether a default matrix has been used, and decoding of information about the type of predictive decoding method on only transform units having a specific size (i.e., only a specific size of the transform unit).
例如,如果指定变换单元的最小尺寸的Log2MinTrafoSize的值为3并且指定变换单元的最大尺寸的Log2MaxTrafoSize的值为4,则解码器能执行与从8x8尺寸到16x16尺寸的变换单元对应的量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。For example, if the value of Log2MinTrafoSize specifying the minimum size of the transform unit is 3 and the value of Log2MaxTrafoSize specifying the maximum size of the transform unit is 4, the decoder can perform one or more of decoding of quantization matrices corresponding to transform units ranging from 8x8 size to 16x16 size, decoding of information about whether a default matrix has been used, and decoding of information about the type of predictive decoding method.
这里,Log2MaxTrafoSize和Log2MinTrafoSize之间的差值是变换单元的最大尺寸和最小值之间的差值,并能通过log2_diff_max_min_transform_block_size来指定。此外,Log2MinTrafoSize-2与log2_min_transform_block_size_minus2相同。Here, the difference between Log2MaxTrafoSize and Log2MinTrafoSize is the difference between the maximum size and the minimum size of the transform unit and can be specified by log2_diff_max_min_transform_block_size. In addition, Log2MinTrafoSize-2 is the same as log2_min_transform_block_size_minus2.
在表格10的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 10, use_default_scaling_list_flag may not be decoded.
其间,如果不在序列、画面或片段中根据每一变换块的尺寸或量化矩阵的类型来混合和使用缺省矩阵和非缺省矩阵,则当编码器选择量化矩阵时降低自由度。例如,为了使用片段内的特定变换尺寸的缺省矩阵和为了使用片段内的另一特定变换尺寸的非缺省矩阵,可恶化编码效率,因为必须编码和传送缺省矩阵。Meanwhile, if the default matrix and the non-default matrix are not mixed and used according to the size of each transform block or the type of quantization matrix in a sequence, picture, or slice, the degree of freedom when the encoder selects the quantization matrix is reduced. For example, if a default matrix for a specific transform size within a slice is used and a non-default matrix for another specific transform size within the slice is used, coding efficiency may be degraded because the default matrix must be encoded and transmitted.
在本发明中,能在序列、画面或片段中根据每一变换块的尺寸或量化矩阵的类型,来混合和使用缺省矩阵和非缺省矩阵。In the present invention, a default matrix and a non-default matrix can be mixed and used according to the size of each transform block or the type of quantization matrix in a sequence, a picture, or a slice.
例如,解码器能基于SizeID从参数集解码关于是否已解码量化矩阵以及是否已使用缺省矩阵的信息。如同表格11的示例中那样,解码器能基于SizeID从自适应参数集解码sid_use_default_scaling_list_flag[SizeID][MatrixID](即,指定是否已解码量化矩阵以及是否已使用缺省矩阵的信息)。例如,当sid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,解码器不解码与SizeID对应的量化矩阵,并且与SizeID对应的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。当sid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,解码器能解码与SizeID对应的量化矩阵,但是不使用编码器和/或解码器中定义的缺省矩阵作为与SizeID对应的量化矩阵。For example, the decoder can decode information about whether the quantization matrix has been decoded and whether the default matrix has been used from the parameter set based on SizeID. As in the example of Table 11, the decoder can decode sid_use_default_scaling_list_flag[SizeID][MatrixID] (i.e., information specifying whether the quantization matrix has been decoded and whether the default matrix has been used) from the adaptive parameter set based on SizeID. For example, when the value of sid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the decoder does not decode the quantization matrix corresponding to SizeID, and the coefficient values of the quantization matrix corresponding to SizeID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. When the value of sid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the decoder can decode the quantization matrix corresponding to SizeID, but does not use the default matrix defined in the encoder and/or decoder as the quantization matrix corresponding to SizeID.
其间,在表格11的示例中,可以不解码use_default_scaling_list_flag。Meanwhile, in the example of Table 11, use_default_scaling_list_flag may not be decoded.
此外,解码器可基于MatrixID而不是SizeID来从参数集解码关于是否已解码量化矩阵和是否已使用缺省矩阵的信息。Furthermore, the decoder may decode information on whether a quantization matrix has been decoded and whether a default matrix has been used from a parameter set based on MatrixID instead of SizeID.
如同表格12的示例中那样,解码器能基于MatrixID从自适应参数集解码mid_use_default_scaling_list_flag[SizeID][MatrixID](即,指定是否已解码量化矩阵以及是否已使用缺省矩阵的信息)。例如,当mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,解码器不解码与MatrixID对应的量化矩阵,并且与MatrixID对应的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。当sid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,解码器解码与MatrixID对应的量化矩阵,但是不使用编码器和/或解码器中定义的缺省矩阵作为与MatrixID对应的量化矩阵。As in the example of Table 12, the decoder can decode mid_use_default_scaling_list_flag[SizeID][MatrixID] (i.e., information specifying whether the quantization matrix has been decoded and whether the default matrix has been used) from the adaptive parameter set based on MatrixID. For example, when the value of mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the decoder does not decode the quantization matrix corresponding to MatrixID, and the coefficient values of the quantization matrix corresponding to MatrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. When the value of sid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the decoder decodes the quantization matrix corresponding to MatrixID, but does not use the default matrix defined in the encoder and/or decoder as the quantization matrix corresponding to MatrixID.
在表格12的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 12, use_default_scaling_list_flag may not be decoded.
此外,解码器可通过考虑SizeID和MatrixID两者(而不是仅考虑SizeID或仅考虑MatrixID),基于SizeID和MatrixID来从参数集解码关于是否已解码量化矩阵和是否已使用缺省矩阵的信息。Furthermore, the decoder can decode information on whether a quantization matrix has been decoded and whether a default matrix has been used from a parameter set based on SizeID and MatrixID by considering both SizeID and MatrixID, rather than only SizeID or only MatrixID.
如同表格13的示例中那样,解码器能基于SizeID和MatrixID从自适应参数集解码sid_mid_use_default_scaling_list_flag[SizeID][MatrixID](即,指定是否已解码量化矩阵以及是否已使用缺省矩阵的信息)。例如,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,解码器不解码与SizeID和MatrixID对应的量化矩阵,并且与SizeID和MatrixID对应的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,解码器解码与SizeID和MatrixID对应的量化矩阵,并且不使用编码器和/或解码器中定义的缺省矩阵作为与SizeID和MatrixID对应的量化矩阵。As in the example of Table 13, the decoder can decode sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] (i.e., information specifying whether the quantization matrix has been decoded and whether the default matrix has been used) from the adaptation parameter set based on SizeID and MatrixID. For example, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the decoder does not decode the quantization matrix corresponding to SizeID and MatrixID, and the coefficient values of the quantization matrix corresponding to SizeID and MatrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. When the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the decoder decodes the quantization matrix corresponding to SizeID and MatrixID and does not use the default matrix defined in the encoder and/or decoder as the quantization matrix corresponding to SizeID and MatrixID.
在表格13的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 13, use_default_scaling_list_flag may not be decoded.
其间,如同表格14的示例中那样,解码器根据变换单元的最小尺寸和最大尺寸来限制SizeID,并基于限制的SizeID,来执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。此外,解码器能基于SizeID和MatrixID从参数集解码关于是否已解码量化矩阵的信息以及关于是否已使用缺省矩阵的信息。Meanwhile, as in the example of Table 14, the decoder limits SizeID according to the minimum size and maximum size of the transform unit, and based on the limited SizeID, performs one or more of decoding of the quantization matrix, decoding of information on whether a default matrix has been used, and decoding of information on the type of predictive decoding method. In addition, the decoder can decode information on whether the quantization matrix has been decoded and information on whether the default matrix has been used from the parameter set based on SizeID and MatrixID.
在表格14的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 14, use_default_scaling_list_flag may not be decoded.
如同表格15的示例中那样,解码器能基于关于变换单元的多条信息之中的、变换单元的最大小尺寸和最小值之间的差值,来限制SizeID,并且基于限制的SizeID,来执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。例如,Log2MaxTrafoSize和Log2MinTrafoSize之间的差值是变换单元的最大尺寸和最小值之间的差值,并且与log2_diff_max_min_transform_block_size相同,而Log2MinTrafoSize-2与log2_min_transform_block_size_minus2相同。此外,解码器能基于SizeID和MatrixID从参数集解码关于是否已解码量化矩阵以及是否已使用缺省矩阵的信息。As in the example of Table 15, the decoder can limit SizeID based on the difference between the maximum size and the minimum size of the transform unit among multiple pieces of information about the transform unit, and based on the limited SizeID, perform one or more of decoding the quantization matrix, decoding information on whether a default matrix is used, and decoding information on the type of predictive decoding method. For example, the difference between Log2MaxTrafoSize and Log2MinTrafoSize is the difference between the maximum size and the minimum size of the transform unit and is the same as log2_diff_max_min_transform_block_size, while Log2MinTrafoSize-2 is the same as log2_min_transform_block_size_minus2. In addition, the decoder can decode information on whether the quantization matrix has been decoded and whether the default matrix has been used from the parameter set based on SizeID and MatrixID.
在表格15的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 15, use_default_scaling_list_flag may not be decoded.
此外,如同表格16的示例中那样,解码器能基于参数集中的scaling_list_update_flag[SizeID][MatrixID],来确定在要解码的参数集中是否存在关于量化矩阵的信息或者是否要更新量化矩阵。例如,具有值1的scaling_list_update_flag[SizeID][MatrixID]指示在要解码的参数集中存在关于SizeID和MatrixID所指定的量化矩阵的信息,或者指示关于与SizeID和MatrixID对应并且先前解码的量化矩阵的信息应被更新为要解码的参数集中关于与SizeID和MatrixID对应的量化矩阵的信息。这里,更新关于量化矩阵的信息能意味着用要解码的参数集中的关于量化矩阵的信息来替代关于先前已解码的量化矩阵的信息。此外,具有值0的scaling_list_update_flag[SizeID][MatrixID]指示在要解码的参数集中不存在与SizeID和MatrixID对应的量化矩阵、或者不更新关于先前已解码的量化矩阵的信息。例如,当scaling_list_update_flag[SizeID][MatrixID]的值为0时,解码器不知道应在SizeID和MatrixID所指定的量化矩阵的系数的反量化中使用关于哪个量化矩阵的信息,因为在参数集中不存在与SizeID和MatrixID对应的量化矩阵、并且还没有解码关于量化矩阵的信息。因此,当scaling_list_update_flag[SizeID][MatrixID]的值为0时,能命令将缺省矩阵用作与SizeID和MatrixID对应的量化矩阵或者不使用量化矩阵,因为在要解码的参数集中不存在关于与SizeID和MatrixID对应的量化矩阵的信息。In addition, as in the example of Table 16, the decoder can determine whether information about the quantization matrix exists in the parameter set to be decoded or whether the quantization matrix is to be updated based on scaling_list_update_flag[SizeID][MatrixID] in the parameter set. For example, scaling_list_update_flag[SizeID][MatrixID] having a value of 1 indicates that information about the quantization matrix specified by SizeID and MatrixID exists in the parameter set to be decoded, or indicates that information about the quantization matrix corresponding to SizeID and MatrixID and previously decoded should be updated with information about the quantization matrix corresponding to SizeID and MatrixID in the parameter set to be decoded. Here, updating the information about the quantization matrix can mean replacing the information about the previously decoded quantization matrix with the information about the quantization matrix in the parameter set to be decoded. In addition, scaling_list_update_flag[SizeID][MatrixID] having a value of 0 indicates that the quantization matrix corresponding to SizeID and MatrixID does not exist in the parameter set to be decoded, or that information about the previously decoded quantization matrix is not to be updated. For example, when the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the decoder does not know which quantization matrix should be used for the inverse quantization of the coefficients of the quantization matrix specified by SizeID and MatrixID because the quantization matrix corresponding to SizeID and MatrixID does not exist in the parameter set and the information about the quantization matrix has not yet been decoded. Therefore, when the value of scaling_list_update_flag[SizeID][MatrixID] is 0, it is possible to instruct the use of a default matrix as the quantization matrix corresponding to SizeID and MatrixID or not to use a quantization matrix because the information about the quantization matrix corresponding to SizeID and MatrixID does not exist in the parameter set to be decoded.
这里,基于与每一变换单元的尺寸对应的SizeID和MatrixID来解码scaling_list_update_flag[SizeID][MatrixID]。因此,当scaling_list_update_flag[SizeID][MatrixID]的值为1时,解码器能执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。当scaling_list_update_flag[SizeID][MatrixID]的值为0时,解码器不执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、以及关于预测解码方法的类型的信息的解码中的一个或多个。即,解码器可以不基于scaling_list_update_flag[SizeID][MatrixID]的指示来解码不必要的量化矩阵。Here, scaling_list_update_flag[SizeID][MatrixID] is decoded based on the SizeID and MatrixID corresponding to the size of each transform unit. Therefore, when the value of scaling_list_update_flag[SizeID][MatrixID] is 1, the decoder can perform one or more of decoding the quantization matrix, decoding the information on whether the default matrix has been used, and decoding the information on the type of prediction decoding method. When the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the decoder does not perform one or more of decoding the quantization matrix, decoding the information on whether the default matrix has been used, and decoding the information on the type of prediction decoding method. That is, the decoder may not decode unnecessary quantization matrices based on the indication of scaling_list_update_flag[SizeID][MatrixID].
其间,存在的缺点在于,选择量化矩阵的自由度低,因为不通过仅使用scaling_list_update_flag[SizeID][MatrixID]在序列、画面或片段中根据每一变换块的尺寸或量化矩阵的类型来混合和使用缺省矩阵和非缺省矩阵。因此,解码器能基于SizeID和MatrixID从参数集解码sid_mid_use_default_scaling_list_flag[SizeID][MatrixID](即,关于是否已解码量化矩阵和是否已使用缺省矩阵的信息)。例如,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1时,解码器不解码SizeID和MatrixID所指定的量化矩阵,并且与SizeID和MatrixID对应的量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0时,解码器解码SizeID和MatrixID所指定的量化矩阵,并且不使用编码器和/或解码器中定义的缺省矩阵作为与SizeID和MatrixID对应的量化矩阵。Meanwhile, there is a disadvantage in that the degree of freedom in selecting a quantization matrix is low because the default matrix and the non-default matrix are not mixed and used according to the size of each transform block or the type of the quantization matrix in a sequence, picture or fragment by using only scaling_list_update_flag[SizeID][MatrixID]. Therefore, the decoder can decode sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] (i.e., information about whether the quantization matrix has been decoded and whether the default matrix has been used) from the parameter set based on SizeID and MatrixID. For example, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1, the decoder does not decode the quantization matrix specified by SizeID and MatrixID, and the coefficient values of the quantization matrix corresponding to SizeID and MatrixID are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. When the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0, the decoder decodes the quantization matrix specified by SizeID and MatrixID, and does not use the default matrix defined in the encoder and/or decoder as the quantization matrix corresponding to SizeID and MatrixID.
在表格16的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 16, use_default_scaling_list_flag may not be decoded.
此外,如同表格17的示例中那样,解码器能基于SizeID和MatrixID从参数集解码关于是否已解码量化矩阵和是否已使用缺省矩阵的信息。此外,能在要解码的参数中使用关于更新为与SizeID和MatrixID对应的量化矩阵的信息的scaling_list_update_flag[SizeID][MatrixID]。In addition, as in the example of Table 17, the decoder can decode information about whether the quantization matrix has been decoded and whether the default matrix has been used from the parameter set based on SizeID and MatrixID. In addition, scaling_list_update_flag[SizeID][MatrixID] about information updated to the quantization matrix corresponding to SizeID and MatrixID can be used in the parameters to be decoded.
例如,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0并且scaling_list_update_flag[SizeID][MatrixID]的值为0时,解码器解码与SizeID和MatrixID对应的量化矩阵,不将先前解码的与SizeID和MatrixID对应的量化矩阵更新为与要解码的参数中的SizeID和MatrixID对应的量化矩阵,并使用先前解码的与SizeID和MatrixID对应的量化矩阵。For example, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0 and the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the decoder decodes the quantization matrix corresponding to SizeID and MatrixID, does not update the previously decoded quantization matrix corresponding to SizeID and MatrixID to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be decoded, and uses the previously decoded quantization matrix corresponding to SizeID and MatrixID.
此外,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为0并且scaling_list_update_flag[SizeID][MatrixID]的值为1时,解码器解码与SizeID和MatrixID对应的量化矩阵,并将先前解码的与SizeID和MatrixID对应的量化矩阵更新为与要解码的参数中的SizeID和MatrixID对应的量化矩阵。In addition, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 0 and the value of scaling_list_update_flag[SizeID][MatrixID] is 1, the decoder decodes the quantization matrix corresponding to SizeID and MatrixID, and updates the previously decoded quantization matrix corresponding to SizeID and MatrixID to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be decoded.
此外,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1并且scaling_list_update_flag[SizeID][MatrixID]的值为0时,解码器不解码与SizeID和MatrixID对应的量化矩阵,将量化矩阵的系数值确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同,不将与SizeID和MatrixID对应并且先前解码的量化矩阵更新为与要解码的参数中的SizeID和MatrixID对应的量化矩阵,并使用先前已解码的与SizeID和MatrixID对应的量化矩阵。In addition, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1 and the value of scaling_list_update_flag[SizeID][MatrixID] is 0, the decoder does not decode the quantization matrix corresponding to SizeID and MatrixID, determines the coefficient values of the quantization matrix to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder, does not update the quantization matrix corresponding to SizeID and MatrixID and previously decoded to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be decoded, and uses the previously decoded quantization matrix corresponding to SizeID and MatrixID.
此外,当sid_mid_use_default_scaling_list_flag[SizeID][MatrixID]的值为1并且scaling_list_update_flag[SizeID][MatrixID]的值为1时,解码器不解码与SizeID和MatrixID对应的量化矩阵,将量化矩阵的系数值确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同,将与SizeID和MatrixID对应并且先前解码的量化矩阵更新为与要解码的参数中的SizeID和MatrixID对应的量化矩阵。In addition, when the value of sid_mid_use_default_scaling_list_flag[SizeID][MatrixID] is 1 and the value of scaling_list_update_flag[SizeID][MatrixID] is 1, the decoder does not decode the quantization matrix corresponding to SizeID and MatrixID, determines the coefficient values of the quantization matrix to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder, and updates the quantization matrix corresponding to SizeID and MatrixID and previously decoded to the quantization matrix corresponding to SizeID and MatrixID in the parameters to be decoded.
在表格17的示例中,可以不解码use_default_scaling_list_flag。In the example of Table 17, use_default_scaling_list_flag may not be decoded.
此外,解码器能从参数集解码关于预测和解码量化矩阵的方法的信息。并能基于解码的信息来确定用于量化矩阵的预测解码方法的类型。如同表格18的示例中那样,解码器能从自适应参数集解码pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。例如,当pred_mode_flag的值为1时,解码器能根据指数哥伦布方法和逆差分脉码调制(DPCM)方法来解码量化矩阵。当pred_mode_flag的值为0时,解码器将量化矩阵的系数值确定为与已先前解码的量化矩阵的系数值相同。这里,量化矩阵的系数值和已先前解码的量化矩阵的系数值可以是不同量化矩阵中的值,并且先前解码的量化矩阵可以意味着参考量化矩阵。In addition, the decoder can decode information about the method of predicting and decoding the quantization matrix from the parameter set. And can determine the type of prediction decoding method used for the quantization matrix based on the decoded information. As in the example of Table 18, the decoder can decode pred_mode_flag (i.e., information about the method of predicting and decoding the quantization matrix) from the adaptive parameter set. For example, when the value of pred_mode_flag is 1, the decoder can decode the quantization matrix according to the exponential Golomb method and the inverse differential pulse code modulation (DPCM) method. When the value of pred_mode_flag is 0, the decoder determines the coefficient values of the quantization matrix to be the same as the coefficient values of the previously decoded quantization matrix. Here, the coefficient values of the quantization matrix and the coefficient values of the previously decoded quantization matrix can be values in different quantization matrices, and the previously decoded quantization matrix can mean a reference quantization matrix.
如果pred_mode_flag的值为0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID。如同表格18的示例中那样,解码器能从自适应参数集解码pred_matrix_id_delta(即,要解码的量化矩阵的参考量化矩阵ID)。这里,解码器能通过使用pred_matrix_id_delta和等式16,来确定指示要解码的量化矩阵的参考量化矩阵的RefMatrixID。If the value of pred_mode_flag is 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded from the parameter set. As in the example of Table 18, the decoder can decode pred_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be decoded) from the adaptation parameter set. Here, the decoder can determine the RefMatrixID indicating the reference quantization matrix of the quantization matrix to be decoded by using pred_matrix_id_delta and Equation 16.
<等式16><Equation 16>
RefMatrixID=MatrixID-(1+pred_matrix_id_delta)RefMatrixID=MatrixID-(1+pred_matrix_id_delta)
如果用于预测和解码量化矩阵的方法是根据指数哥伦布编码和逆DPCM方法来解码量化矩阵的方法,则解码器能从参数集解码已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,已先前解码的量化矩阵的系数值可以是要解码的量化矩阵中的系数值。如同表格19的示例中那样,解码器能从自适应参数集解码delta_coef(即,已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。If the method for predicting and decoding the quantization matrix is a method for decoding the quantization matrix based on the Exponential Golomb coding and inverse DPCM method, the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded from the parameter set. Here, the coefficient values of the previously decoded quantization matrix can be the coefficient values of the quantization matrix to be decoded. As in the example of Table 19, the decoder can decode delta_coef (i.e., the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded) from the adaptive parameter set.
其间,能通过使用以下方法在序列、画面、或片段中混合和使用缺省量化矩阵和非缺省量化矩阵,并且能防止不必要量化矩阵的接收。Meanwhile, the default quantization matrix and the non-default quantization matrix can be mixed and used in a sequence, a picture, or a slice by using the following method, and reception of an unnecessary quantization matrix can be prevented.
例如,如果用于预测和解码量化矩阵的方法是将量化矩阵确定为与解码器中已包括并且已先前解码的量化矩阵相同的方法(pred_mode_flag=0),则解码器能从参数集使用要解码的量化矩阵的参考量化矩阵ID,来解码关于是否已使用缺省量化矩阵的信息。For example, if the method used to predict and decode the quantization matrix is a method of determining the quantization matrix as the same as the quantization matrix included in the decoder and previously decoded (pred_mode_flag=0), the decoder can use the reference quantization matrix ID of the quantization matrix to be decoded from the parameter set to decode information about whether the default quantization matrix has been used.
如同表格18的示例中那样,解码器能从参数集解码pred_matrix_id_delta(即,要解码的量化矩阵的参考量化矩阵ID)。这里,解码器能通过使用pred_matrix_id_delta和等式17,来确定RefMatrixID(即,指定要解码的量化矩阵的参考量化矩阵或缺省矩阵的信息、和关于是否已使用缺省矩阵的信息)。As in the example of Table 18, the decoder can decode pred_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be decoded) from the parameter set. Here, the decoder can determine RefMatrixID (i.e., information specifying the reference quantization matrix or default matrix of the quantization matrix to be decoded, and information on whether the default matrix has been used) by using pred_matrix_id_delta and Equation 17.
<等式17><Equation 17>
RefMatrixID=MatrixID-pred_matrix_id_deltaRefMatrixID=MatrixID-pred_matrix_id_delta
例如,当RefMatrixID的值与MatrixID的值相同时,与SizeID和RefMatrixID对应的量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。这里,缺省矩阵意味着与SizeID和RefMatrixID对应的缺省矩阵。此外,当pred_matrix_id_delta的值为0时,RefMatrixID的值变得与MatrixID的值相同。如果RefMatrixID的值与MatrixID的值不相同,则与RefMatrixID对应的量化矩阵被确定为要解码的量化矩阵的参考量化矩阵,并且要解码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同。For example, when the value of RefMatrixID is the same as the value of MatrixID, the coefficient values of the quantization matrix corresponding to SizeID and RefMatrixID are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. Here, the default matrix means the default matrix corresponding to SizeID and RefMatrixID. In addition, when the value of pred_matrix_id_delta is 0, the value of RefMatrixID becomes the same as the value of MatrixID. If the value of RefMatrixID is different from the value of MatrixID, the quantization matrix corresponding to RefMatrixID is determined to be the reference quantization matrix of the quantization matrix to be decoded, and the coefficient values of the quantization matrix to be decoded are determined to be the same as the coefficient values of the reference quantization matrix.
如果与SizeID对应的量化矩阵的尺寸被包括在解码器可用的最小尺寸和最大尺寸中,则能通过以上方法来确定要解码的量化矩阵的参考量化矩阵以及是否已使用缺省矩阵。如果与SizeID对应的量化矩阵的尺寸没有被包括在解码器可用的变换单元的最小尺寸和最大尺寸中,则与SizeID对应的量化矩阵可以不被确定为与缺省矩阵相同。如果基于关于变换单元的多条信息之中的、变换单元的最大尺寸和最小值之间的差值、来执行量化矩阵的解码、关于是否已使用缺省矩阵的信息的解码、和关于预测解码方法的类型的信息的解码中的一个或多个,则能执行用于SizeID的以上确定处理。If the size of the quantization matrix corresponding to SizeID is included in the minimum size and maximum size available to the decoder, the reference quantization matrix of the quantization matrix to be decoded and whether the default matrix has been used can be determined by the above method. If the size of the quantization matrix corresponding to SizeID is not included in the minimum size and maximum size of the transform unit available to the decoder, the quantization matrix corresponding to SizeID may not be determined to be the same as the default matrix. If one or more of decoding of the quantization matrix, decoding of information on whether the default matrix has been used, and decoding of information on the type of predictive decoding method are performed based on the difference between the maximum size and the minimum value of the transform unit among multiple pieces of information about the transform unit, the above determination processing for SizeID can be performed.
在确定是否已使用量化矩阵之后,解码器能从参数集解码关于是否已使用量化矩阵的信息。After determining whether the quantization matrix has been used, the decoder can decode information on whether the quantization matrix has been used from the parameter set.
如同表格20的示例中那样,解码器能从参数集解码scaling_list_enable_flag(即,关于是否已使用量化矩阵的信息)。这里,当scaling_list_enable_flag的值为1时,解码器能在反量化中使用量化矩阵(诸如缺省矩阵或非缺省矩阵)。当scaling_list_enable_flag的值为0时,解码器不使用该量化矩阵,或者能使用在反量化中具有所有相同系数值的量化矩阵。这里,所有系数值可以是16。As in the example of Table 20, the decoder can decode scaling_list_enable_flag (i.e., information about whether a quantization matrix is used) from the parameter set. Here, when the value of scaling_list_enable_flag is 1, the decoder can use a quantization matrix (such as a default matrix or a non-default matrix) in inverse quantization. When the value of scaling_list_enable_flag is 0, the decoder does not use the quantization matrix, or can use a quantization matrix with all the same coefficient values in inverse quantization. Here, all coefficient values can be 16.
此外,如果用于预测和解码量化矩阵的方法是根据逆DPCM和指数哥伦布编码方法来解码量化矩阵的方法,则解码器能从参数集解码已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。已先前解码的量化矩阵的系数值可以是要解码的量化矩阵中的系数值。即,已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值可以是相同量化矩阵中的值。Furthermore, if the method for predicting and decoding a quantization matrix is a method for decoding a quantization matrix based on an inverse DPCM and an exponential Golomb coding method, the decoder can decode the difference between the coefficient values of a previously decoded quantization matrix and the coefficient values of a quantization matrix to be decoded from a parameter set. The coefficient values of the previously decoded quantization matrix may be the coefficient values of the quantization matrix to be decoded. In other words, the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded may be values of the same quantization matrix.
如同表格21的示例中那样,解码器能从参数集解码delta_coef(即,已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。如同表格21的示例中那样,如果量化矩阵的系数值“nextcoef”(1)与特定值相同并且(2)是量化矩阵的第一值,则能通过使用等式18将对应量化矩阵的系数值确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。As in the example of Table 21, the decoder can decode delta_coef (i.e., the difference between the coefficient value of the previously decoded quantization matrix and the coefficient value of the quantization matrix to be decoded) from the parameter set. As in the example of Table 21, if the coefficient value "nextcoef" of the quantization matrix (1) is the same as the specific value and (2) is the first value of the quantization matrix, the coefficient value of the corresponding quantization matrix can be determined to be the same as the coefficient value of the default matrix defined in the encoder and/or decoder by using Equation 18.
<等式18><Equation 18>
nextcoef=(nextcoef+delta_coef+256)%256nextcoef=(nextcoef+delta_coef+256)%256
即,如果量化矩阵的系数值“nextcoef”(1)与特定值相同并且(2)是量化矩阵的第一值,则解码器能使用对应量化矩阵作为缺省矩阵。这里,特定值可以是0。此外,缺省矩阵可意味着SizeID和MatrixID所指定的缺省矩阵。因此,如果量化矩阵的系数值“nextcoef”与0相同并且是量化矩阵的第一值,则解码器能停止对应量化矩阵和量化矩阵之间的差值的解码。That is, if the coefficient value "nextcoef" of the quantization matrix (1) is the same as a specific value and (2) is the first value of the quantization matrix, the decoder can use the corresponding quantization matrix as a default matrix. Here, the specific value may be 0. In addition, the default matrix may mean a default matrix specified by SizeID and MatrixID. Therefore, if the coefficient value "nextcoef" of the quantization matrix is the same as 0 and is the first value of the quantization matrix, the decoder can stop decoding the difference between the corresponding quantization matrix and the quantization matrix.
其间,如果用于预测和解码量化矩阵的方法是根据逆DPCM和指数哥伦布编码方法来解码量化矩阵的方法,则解码器能从参数集解码已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。已先前解码的量化矩阵的系数值可以是要解码的量化矩阵中的系数值。即,已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值可以是相同量化矩阵中的值。Meanwhile, if the method for predicting and decoding the quantization matrix is a method for decoding the quantization matrix based on the inverse DPCM and exponential Golomb coding method, the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded from the parameter set. The coefficient values of the previously decoded quantization matrix may be the coefficient values of the quantization matrix to be decoded. In other words, the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded may be values of the same quantization matrix.
如同表格22的示例中那样,解码器能从参数集解码delta_coef(即,已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。例如,如同表格22的示例中那样,如果使用等式18计算的量化矩阵的系数值“nextcoef”(即,(nextcoef+delta_coef+256)%256)与特定值相同、并且是量化矩阵的第一值,则解码器能将对应量化矩阵的系数值确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。即,如果nextcoef(1)与特定值相同并且(2)是量化矩阵的第一值,则解码器能使用对应量化矩阵作为缺省矩阵。这里,特定值可以是0,并且使用(nextcoef+delta_coef+256)%256计算的量化矩阵的系数值可以是具有4x4或8x8尺寸的量化矩阵的系数值As in the example of Table 22, the decoder can decode delta_coef (i.e., the difference between the coefficient value of the previously decoded quantization matrix and the coefficient value of the quantization matrix to be decoded) from the parameter set. For example, as in the example of Table 22, if the coefficient value "nextcoef" of the quantization matrix calculated using Equation 18 (i.e., (nextcoef+delta_coef+256)%256) is the same as the specific value and is the first value of the quantization matrix, the decoder can determine the coefficient value of the corresponding quantization matrix to be the same as the coefficient value of the default matrix defined in the encoder and/or decoder. That is, if nextcoef (1) is the same as the specific value and (2) is the first value of the quantization matrix, the decoder can use the corresponding quantization matrix as the default matrix. Here, the specific value may be 0, and the coefficient value of the quantization matrix calculated using (nextcoef+delta_coef+256)%256 may be the coefficient value of a quantization matrix having a size of 4x4 or 8x8.
此外,量化矩阵的第一值可以是使用scaling_list_dc_coef_minus8的值,并且该特定值可以是与scaling_list_dc_coef_minus8+8对应的值。Also, the first value of the quantization matrix may be a value using scaling_list_dc_coef_minus8, and the specific value may be a value corresponding to scaling_list_dc_coef_minus8+8.
scaling_list_dc_coef_minus8能意味着具有16x16或32x32尺寸的量化矩阵的第一值,这可意味着DC矩阵系数值。scaling_list_dc_coef_minus8 can mean the first value of a quantization matrix having a size of 16x16 or 32x32, which may mean a DC matrix coefficient value.
当sizeID的值是2时,scaling_list_dc_coef_minus8[sizeID-2][matrixID]能对应于具有16x16尺寸的DC矩阵系数值。这里,16x16可以是与量化矩阵对应的变换块的尺寸。当SizeID的尺寸是3时,scaling_list_dc_coef_minus8[sizeID-2][matrixID]能对应于具有32x32尺寸的量化矩阵中的DC矩阵系数值。这里,32x32尺寸可以是与量化矩阵对应的变换块的尺寸。在每一情况下,缺省矩阵能意味着与SizeID和MatrixID对应的缺省矩阵。因此,如果量化矩阵的系数值“nextcoef”与0相同并且是量化矩阵的第一值,则解码器能停止对应量化矩阵和量化矩阵之间的差值(即,系数值之间的差)的解码。When the value of sizeID is 2, scaling_list_dc_coef_minus8[sizeID-2][matrixID] can correspond to a DC matrix coefficient value having a size of 16x16. Here, 16x16 can be the size of a transform block corresponding to the quantization matrix. When the size of SizeID is 3, scaling_list_dc_coef_minus8[sizeID-2][matrixID] can correspond to a DC matrix coefficient value in a quantization matrix having a size of 32x32. Here, the size of 32x32 can be the size of a transform block corresponding to the quantization matrix. In each case, the default matrix can mean a default matrix corresponding to SizeID and MatrixID. Therefore, if the coefficient value "nextcoef" of the quantization matrix is the same as 0 and is the first value of the quantization matrix, the decoder can stop decoding the difference between the corresponding quantization matrix and the quantization matrix (i.e., the difference between the coefficient values).
解码器能通过使用该方法、根据量化矩阵的尺寸或变换尺寸、不同地执行是否解码scaling_list_dc_coef_minus8(即,DC矩阵系数值)、和关于是否已使用缺省矩阵的信息的解码。The decoder can differently perform decoding of whether to decode scaling_list_dc_coef_minus8 (ie, DC matrix coefficient value) and information on whether a default matrix has been used, according to the size of the quantization matrix or the transform size, by using this method.
其间,用于通过使用量化矩阵的系数值来确定是否使用缺省矩阵的编码/解码量化矩阵的方法的缺点在于,增加编码/解码量化矩阵的系数值的处理中的复杂度。相反,在本发明中,在图像编码/解码中,可通过使用参考量化矩阵ID来确定是否使用缺省矩阵。因此,能降低编码/解码量化矩阵的处理中的计算复杂度。The disadvantage of the method for encoding/decoding quantization matrices that uses quantization matrix coefficient values to determine whether to use a default matrix is that it increases the complexity of processing the coefficient values of the encoding/decoding quantization matrix. In contrast, the present invention can determine whether to use a default matrix by using a reference quantization matrix ID during image encoding/decoding. Therefore, the computational complexity of encoding/decoding quantization matrix processing can be reduced.
首先,解码器能从参数集解码指示是否存在量化矩阵的信息。如同表格23的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)。例如,当scaling_list_present_flag的值为0时,它意味着不存在量化矩阵并将该量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它意味着存在编码的量化矩阵。First, the decoder can decode information indicating whether a quantization matrix exists from the parameter set. As in the example of Table 23, the decoder can decode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) from the parameter set. For example, when the value of scaling_list_present_flag is 0, it means that there is no quantization matrix and the quantization matrix is determined as the default quantization matrix. When the value of scaling_list_present_flag is 1, it means that an encoded quantization matrix exists.
解码器能从参数集解码关于预测和解码量化矩阵的方法的信息,并能基于解码的信息来确定用于该量化矩阵的预测解码方法的类型。这里,从其解码关于预测解码方法的信息的参数集可以是自适应参数集。如同表格23的示例中那样,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。例如,当scaling_list_pred_mode_flag的值为1时,解码器通过扫描根据指数哥伦布编码和逆DPCM方法解码量化矩阵,来预测和解码量化矩阵内的系数。当scaling_list_pred_mode_flag的值为0时,解码器确定要解码的量化矩阵的系数值,使得它们和参考量化矩阵的系数值具有相同值,或者确定要解码的量化矩阵的系数值,使得它们和缺省矩阵的系数值具有相同值。这里,确定这些值使得它们具有相同值可意味着使用将特定量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。The decoder can decode information about the method for predicting and decoding the quantization matrix from a parameter set and, based on the decoded information, determine the type of prediction decoding method used for the quantization matrix. Here, the parameter set from which the information about the prediction decoding method is decoded may be an adaptive parameter set. As in the example of Table 23, the decoder can decode scaling_list_pred_mode_flag (i.e., information about the method for predicting and decoding the quantization matrix) from the parameter set. For example, when scaling_list_pred_mode_flag has a value of 1, the decoder predicts and decodes the coefficients within the quantization matrix by scanning the quantization matrix decoded using the Exponential Golomb coding and inverse DPCM methods. When scaling_list_pred_mode_flag has a value of 0, the decoder determines the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix, or determines the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the default matrix. Determining these values so that they have the same values may mean using a quantization matrix prediction method that copies the coefficient values of a specific quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果scaling_list_pred_mode_flag的值为0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID、和关于是否已使用缺省矩阵的信息。这里,从其解码参考量化矩阵ID和信息的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded and information on whether the default matrix has been used from the parameter set. Here, the parameter set from which the reference quantization matrix ID and information are decoded may be an adaptive parameter set.
即,如同表格23的示例中那样,解码器能从参数集解码scaling_list_pred_matrix_id_delta(即,指定要解码的量化矩阵的参考量化矩阵ID的信息、和关于是否已使用缺省矩阵的信息)。这里,解码器能通过使用scaling_list_pred_matrix_id_delta和等式19,来确定指示要解码的量化矩阵的参考量化矩阵或缺省矩阵的RefMatrixID。That is, as in the example of Table 23, the decoder can decode scaling_list_pred_matrix_id_delta (i.e., information specifying the reference quantization matrix ID of the quantization matrix to be decoded, and information on whether a default matrix has been used) from the parameter set. Here, the decoder can determine the RefMatrixID indicating the reference quantization matrix or the default matrix of the quantization matrix to be decoded by using scaling_list_pred_matrix_id_delta and Equation 19.
<等式19><Equation 19>
RefMatrixID=matrixID-scaling_list_pred_matrix_id_deltaRefMatrixID=matrixID-scaling_list_pred_matrix_id_delta
如果RefMatrixID的值与matrixID的值相同,则与sizeID和matrixID对应的要解码的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。这里,缺省矩阵可以是与sizeID和matrixID对应的缺省矩阵。参考等式19,当scaling_list_pred_matrix_id_delta的值为0时,它意味着RefMatrixID的值与matrixID的值相同。If the value of RefMatrixID is the same as the value of matrixID, the coefficient value of the quantization matrix to be decoded corresponding to sizeID and matrixID can be determined to be the same as the coefficient value of the default matrix defined in the encoder and/or decoder. Here, the default matrix can be a default matrix corresponding to sizeID and matrixID. Referring to Equation 19, when the value of scaling_list_pred_matrix_id_delta is 0, it means that the value of RefMatrixID is the same as the value of matrixID.
如果RefMatrixID的值与matrixID的值不相同,则解码器能确定与RefMatrixID对应的量化矩阵作为要解码的量化矩阵的参考量化矩阵,并确定要解码的量化矩阵的系数值,使得它们与参考量化矩阵的系数值具有相同值。确定要解码的量化矩阵的系数值使得它们与参考量化矩阵的系数值具有相同值可意味着,使用这样的量化矩阵预测方法,其将与RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。这里,scaling_list_pred_matrix_id_delta的值可以是正整数值。If the value of RefMatrixID is different from the value of matrixID, the decoder can determine the quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded, and determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Determining the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix may mean using a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded, and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded. Here, the value of scaling_list_pred_matrix_id_delta can be a positive integer value.
如果用于预测和解码量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来预测和解码量化矩阵中的系数的方法,则解码器能从参数集解码量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,解码器从其解码该差值的参数集可以是自适应参数集。If the method for predicting and decoding a quantization matrix is a method for predicting and decoding coefficients in a quantization matrix by scanning according to an Exponential Golomb coding and inverse DPCM method, the decoder can decode the difference between the coefficient values of a previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix from a parameter set. Here, the parameter set from which the decoder decodes the difference may be an adaptive parameter set.
如同表格24的示例中那样,如果要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则解码器能从参数集解码scaling_list_dc_coef_minus8(即,DC矩阵系数)。此外,如同表格24的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。在表格23和24的示例中,已图示了其中从自适应参数集解码关于量化矩阵的信息的示例,但是本发明不限于此。解码器可从另一参数集(即,包括序列参数集和画面参数集的至少一个的参数集)解码关于量化矩阵的信息。As in the example of Table 24, if the size of the quantization matrix to be decoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the decoder can decode scaling_list_dc_coef_minus8 (i.e., DC matrix coefficient) from the parameter set. In addition, as in the example of Table 24, the decoder can decode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix) from the parameter set. In the examples of Tables 23 and 24, an example in which information about the quantization matrix is decoded from an adaptive parameter set has been illustrated, but the present invention is not limited thereto. The decoder can decode information about the quantization matrix from another parameter set (i.e., a parameter set including at least one of a sequence parameter set and a picture parameter set).
如上面在编码器的示例中描述的,在传统量化矩阵编码/解码方法中,恶化编码效率,因为当预测量化矩阵时编码/解码不必要的信息。然而,在本发明中,当编码/解码量化矩阵时能改进编码效率,因为能取决于是否存在参考量化矩阵而不同地执行量化矩阵的编码/解码。As described above in the example of the encoder, in the conventional quantization matrix encoding/decoding method, encoding efficiency deteriorates because unnecessary information is encoded/decoded when predicting the quantization matrix. However, in the present invention, encoding efficiency can be improved when encoding/decoding the quantization matrix because encoding/decoding of the quantization matrix can be performed differently depending on whether a reference quantization matrix exists.
更具体地,解码器能从参数集解码指示是否存在量化矩阵的信息。如同表格25的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,关于在比特流中是否存在量化矩阵的信息)。例如,当scaling_list_present_flag的值为0时,它意味着不存在量化矩阵并且将所有量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它意味着存在编码的量化矩阵。More specifically, the decoder can decode information indicating whether a quantization matrix exists from the parameter set. As in the example of Table 25, the decoder can decode scaling_list_present_flag (i.e., information about whether a quantization matrix exists in the bitstream) from the parameter set. For example, when the value of scaling_list_present_flag is 0, it means that there is no quantization matrix and all quantization matrices are determined to be default quantization matrices. When the value of scaling_list_present_flag is 1, it means that a coded quantization matrix exists.
此外,当matrixID的值大于0时,解码器能从参数集解码关于预测和编码量化矩阵的方法的信息,并基于解码的信息来确定用于量化矩阵的预测解码方法的类型。这里,从其解码关于预测解码方法的信息的参数集可以是自适应参数集。In addition, when the value of matrixID is greater than 0, the decoder can decode information about the method of predicting and encoding the quantization matrix from the parameter set and determine the type of predictive decoding method used for the quantization matrix based on the decoded information. Here, the parameter set from which the information about the predictive decoding method is decoded may be an adaptive parameter set.
例如,如同表格25的示例中那样,当matrixID的值大于0时,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。在表格25的示例中,当scaling_list_pred_mode_flag的值为1时,解码器能通过扫描根据指数哥伦布编码和逆DPCM方法解码量化矩阵,来预测和解码量化矩阵内的系数。当scaling_list_pred_mode_flag的值为0时,解码器能确定要解码的量化矩阵的系数值,使得它们和参考量化矩阵的系数值具有相同值。这里,确定这些值使得它们具有相同值可意味着使用将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。For example, as in the example of Table 25, when the value of matrixID is greater than 0, the decoder can decode scaling_list_pred_mode_flag (i.e., information about a method of predicting and decoding a quantization matrix) from the parameter set. In the example of Table 25, when the value of scaling_list_pred_mode_flag is 1, the decoder can predict and decode the coefficients within the quantization matrix by scanning the quantization matrix decoded according to the Exponential Golomb coding and inverse DPCM method. When the value of scaling_list_pred_mode_flag is 0, the decoder can determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Here, determining these values so that they have the same values may mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
此外,在表格25的示例中,当matrixID的值为0时,scaling_list_pred_mode_flag的值成为真。因此,解码器不解码scaling_list_pred_mode_flag,并且能根据逆DPCM和指数哥伦布编码方法通过扫描量化矩阵来解码量化矩阵。Furthermore, in the example of Table 25, the value of scaling_list_pred_mode_flag becomes true when the value of matrixID is 0. Therefore, the decoder does not decode scaling_list_pred_mode_flag, and can decode the quantization matrix by scanning the quantization matrix according to the inverse DPCM and exponential Golomb coding method.
如果scaling_list_pred_mode_flag的值为0并且matrixID的值大于0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID。这里,从其解码参考量化矩阵ID的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0 and the value of matrixID is greater than 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded from the parameter set. Here, the parameter set from which the reference quantization matrix ID is decoded may be an adaptive parameter set.
例如,如同表格25的示例中那样,当matrixID的值大于0时,解码器能从参数集解码scaling_list_pred_matrix_id_delta(即,要解码的量化矩阵的参考量化矩阵ID)。这里,能通过使用scaling_list_pred_matrix_id_delta和等式20,来确定指示要解码的量化矩阵的参考量化矩阵的RefMatrixID。For example, as in the example of Table 25, when the value of matrixID is greater than 0, the decoder can decode scaling_list_pred_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be decoded) from the parameter set. Here, RefMatrixID indicating the reference quantization matrix of the quantization matrix to be decoded can be determined by using scaling_list_pred_matrix_id_delta and Equation 20.
<等式20><Equation 20>
RefMatrixID=matrixID-(1+scaling_list_pred_matrix_id_delta)RefMatrixID=matrixID-(1+scaling_list_pred_matrix_id_delta)
在表格25的示例中,具有值0的matrixID指示用于每一sizeID的第一量化矩阵。可仅从具有相同sizeID的先前解码的量化矩阵预测量化矩阵,并且不能对用于每一sizeID的第一量化矩阵执行使用诸如矩阵拷贝的方法的量化矩阵的预测,因为不存在具有相同sizeID值的参考量化矩阵。因此,当matrixID的值大于0时,解码器能解码scaling_list_pred_matrix_id_delta(即,参考量化矩阵ID),基于解码的参考量化矩阵ID确定与RefMatrixID对应的量化矩阵作为要解码的量化矩阵的参考量化矩阵,并确定要解码的量化矩阵的系数值使得它们和参考量化矩阵的系数值具有相同值。确定要解码的量化矩阵的系数值使得它们和参考量化矩阵的系数值具有相同值能意味着使用这样的量化矩阵预测方法,其将与RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。In the example of Table 25, matrixID with a value of 0 indicates the first quantization matrix for each sizeID. Quantization matrices can be predicted only from previously decoded quantization matrices with the same sizeID, and quantization matrix prediction using a method such as matrix copying cannot be performed for the first quantization matrix for each sizeID because there is no reference quantization matrix with the same sizeID value. Therefore, when the value of matrixID is greater than 0, the decoder can decode scaling_list_pred_matrix_id_delta (i.e., reference quantization matrix ID), determine the quantization matrix corresponding to RefMatrixID as the reference quantization matrix for the quantization matrix to be decoded based on the decoded reference quantization matrix ID, and determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Determining the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix can mean using a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefMatrixID as the reference quantization matrix for the quantization matrix to be decoded and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果用于预测和解码量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来预测和解码量化矩阵中的系数的方法,则解码器能从参数集解码量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,从其解码差值的参数集可以是自适应参数集。If the method for predicting and decoding a quantization matrix is a method for predicting and decoding coefficients in a quantization matrix by scanning according to an Exponential Golomb coding and inverse DPCM method, the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix from a parameter set. Here, the parameter set from which the difference is decoded may be an adaptive parameter set.
例如,如同表格26的示例中那样,当要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3)时,解码器能从参数集解码scaling_list_dc_coef_minus8(即,DC矩阵系数)。此外,如同表格26的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。For example, as in the example of Table 26, when the size of the quantization matrix to be decoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the decoder can decode scaling_list_dc_coef_minus8 (i.e., DC matrix coefficients) from the parameter set. In addition, as in the example of Table 26, the decoder can decode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded) from the parameter set.
此外,解码器能通过使用用来计算scaling_list_dc_coef_minus8或nextCoef的scaling_list_delta_coef,来确定是否已使用缺省矩阵。例如,将scaling_list_dc_coef_minus8的值解码为-8,解码器能将对应量化矩阵确定为缺省矩阵。当通过解码scaling_list_delta_coef而计算的第一nextCoef的值为0时,解码器能将对应量化矩阵确定为缺省矩阵。In addition, the decoder can determine whether the default matrix is used by using scaling_list_delta_coef used to calculate scaling_list_dc_coef_minus8 or nextCoef. For example, if the value of scaling_list_dc_coef_minus8 is decoded as -8, the decoder can determine the corresponding quantization matrix as the default matrix. When the value of the first nextCoef calculated by decoding scaling_list_delta_coef is 0, the decoder can determine the corresponding quantization matrix as the default matrix.
如上面在编码器的示例中描述的,其中通过使用量化矩阵的系数值而确定是否已使用缺省矩阵的编码/解码量化矩阵的方法具有的缺点在于,它增加编码/解码量化矩阵的系数值的处理中的复杂程度。此外,恶化编码效率,因为当预测量化矩阵时编码/解码不必要的信息。然而,在本发明中,在图像编码/解码中,能降低当编码/解码量化矩阵时的计算的复杂度,因为能基于参考量化矩阵ID来确定是否已使用缺省矩阵,并且能改进编码/解码量化矩阵的编码效率,因为取决于是否存在参考量化矩阵而不同地编码/解码量化矩阵。As described above in the example of the encoder, the method of encoding/decoding a quantization matrix in which the coefficient values of the quantization matrix are used to determine whether a default matrix has been used has the disadvantage that it increases the complexity of processing the coefficient values of the quantization matrix for encoding/decoding. In addition, coding efficiency is deteriorated because unnecessary information is encoded/decoded when predicting the quantization matrix. However, in the present invention, in image encoding/decoding, the complexity of calculations when encoding/decoding the quantization matrix can be reduced because it can be determined based on the reference quantization matrix ID whether a default matrix has been used, and the coding efficiency of the encoding/decoding quantization matrix can be improved because the quantization matrix is encoded/decoded differently depending on whether a reference quantization matrix exists.
更具体地,首先,解码器从参数集解码指示是否存在量化矩阵的信息。如同表格27的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)。例如,当scaling_list_present_flag的值为0时,它指示不存在量化矩阵并且将所有量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它指示编码的量化矩阵。More specifically, first, the decoder decodes information indicating whether a quantization matrix exists from a parameter set. As in the example of Table 27, the decoder can decode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) from the parameter set. For example, when the value of scaling_list_present_flag is 0, it indicates that no quantization matrix exists and all quantization matrices are determined to be default quantization matrices. When the value of scaling_list_present_flag is 1, it indicates the encoded quantization matrix.
此外,解码器能从参数集解码关于预测和解码量化矩阵的方法的信息,并能基于解码的信息来确定用于量化矩阵的预测解码方法的类型。这里,从其解码关于预测解码方法的信息的参数集可以是自适应参数集。In addition, the decoder can decode information about the method of predicting and decoding the quantization matrix from the parameter set, and can determine the type of prediction decoding method used for the quantization matrix based on the decoded information. Here, the parameter set from which the information about the prediction decoding method is decoded can be an adaptive parameter set.
更具体地,如同表格27的示例中那样,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。例如,当scaling_list_pred_mode_flag的值为1时,解码器能通过扫描根据指数哥伦布编码和逆DPCM方法解码量化矩阵,来预测和解码量化矩阵内的系数。当scaling_list_pred_mode_flag的值为0时,解码器能确定要解码的量化矩阵的系数值,使得它们和参考量化矩阵的系数值具有相同值,或者确定要解码的量化矩阵的系数值,使得它们和缺省矩阵的系数值具有相同值。这里,确定这些值使得它们具有相同值可意味着使用将特定量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。More specifically, as in the example of Table 27, the decoder can decode scaling_list_pred_mode_flag (i.e., information about a method of predicting and decoding a quantization matrix) from a parameter set. For example, when the value of scaling_list_pred_mode_flag is 1, the decoder can predict and decode coefficients within a quantization matrix by scanning the quantization matrix decoded according to the Exponential Golomb coding and inverse DPCM methods. When the value of scaling_list_pred_mode_flag is 0, the decoder can determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix, or determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the default matrix. Here, determining these values so that they have the same values may mean using a quantization matrix prediction method that copies the coefficient values of a specific quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果scaling_list_pred_mode_flag的值为0并且matrixID的值大于0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID和关于是否已使用缺省矩阵的信息。这里,从其解码参考量化矩阵ID和关于是否已使用缺省矩阵的信息的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0 and the value of matrixID is greater than 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded and the information on whether the default matrix has been used from the parameter set. Here, the parameter set from which the reference quantization matrix ID and the information on whether the default matrix has been used are decoded may be an adaptive parameter set.
在该情况下,如同表格27的示例中那样,当scaling_list_pred_mode_flag的值为0并且matrixID的值大于0时,解码器能从参数集解码scaling_list_pred_matrix_id_delta(即,指示要解码的量化矩阵的参考量化矩阵ID和关于是否已使用缺省矩阵的信息)。这里,能通过使用scaling_list_pred_matrix_id_delta和等式21,来确定指示要解码的量化矩阵的参考量化矩阵或缺省矩阵的RefMatrixID。In this case, as in the example of Table 27, when the value of scaling_list_pred_mode_flag is 0 and the value of matrixID is greater than 0, the decoder can decode scaling_list_pred_matrix_id_delta (i.e., the reference quantization matrix ID indicating the quantization matrix to be decoded and information on whether the default matrix has been used) from the parameter set. Here, RefMatrixID indicating the reference quantization matrix or the default matrix of the quantization matrix to be decoded can be determined by using scaling_list_pred_matrix_id_delta and Equation 21.
<等式21><Equation 21>
RefMatrixID=matrixID-scaling_list_pred_matrix_id_deltaRefMatrixID=matrixID-scaling_list_pred_matrix_id_delta
如果RefMatrixID的值等于matrixID的值,则与sizeID和matrixID对应的要解码的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。这里,缺省矩阵意味着与sizeID和matrixID对应的缺省矩阵。根据等式21,当scaling_list_pred_matrix_id_delta的值为0时,它意味着RefMatrixID的值与matrixID的值相同。If the value of RefMatrixID is equal to the value of matrixID, the coefficient values of the quantization matrix to be decoded corresponding to sizeID and matrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. Here, the default matrix means the default matrix corresponding to sizeID and matrixID. According to Equation 21, when the value of scaling_list_pred_matrix_id_delta is 0, it means that the value of RefMatrixID is the same as the value of matrixID.
如果RefMatrixID的值与matrixID的值不相同,则与RefMatrixID对应的量化矩阵被确定为要解码的量化矩阵的参考量化矩阵,并将要解码的量化矩阵的系数值确定为与参考量化矩阵的系数值相同。将要解码的量化矩阵的系数值确定为与参考量化矩阵的系数值相同可意味着,使用这样的量化矩阵预测方法,其将与RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。If the value of RefMatrixID is different from the value of matrixID, the quantization matrix corresponding to RefMatrixID is determined as the reference quantization matrix of the quantization matrix to be decoded, and the coefficient values of the quantization matrix to be decoded are determined to be the same as the coefficient values of the reference quantization matrix. Determining the coefficient values of the quantization matrix to be decoded to be the same as the coefficient values of the reference quantization matrix may mean using a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
这里,当scaling_list_pred_mode_flag的值为0时,它指示预测和解码量化矩阵的方法是将量化矩阵确定为与先前解码的量化矩阵相同的方法。在该情况下,能从具有相同sizeID的先前解码的量化矩阵来预测量化矩阵。Here, when the value of scaling_list_pred_mode_flag is 0, it indicates that the method of predicting and decoding the quantization matrix is to determine the quantization matrix as the same as the previously decoded quantization matrix. In this case, the quantization matrix can be predicted from the previously decoded quantization matrix with the same sizeID.
当matrixID的值为0时,对于每一sizeID指示第一量化矩阵。如果scaling_list_pred_mode_flag的值为0并且matrixID的值为0,则不能对用于每一sizeID的第一量化矩阵执行使用诸如矩阵拷贝的方法的量化矩阵的预测,因为不存在具有相同sizeID的参考量化矩阵。在该情况下,编码器不编码scaling_list_pred_matrix_id_delta,并导出scaling_list_pred_matrix_id_delta的值作为0。当scaling_list_pred_matrix_id_delta的值为0时,与sizeID和matrixID对应的要解码的量化矩阵的系数值被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同,因为RefMatrixID的值与matrixID的值相同。这里,缺省矩阵意味着与sizeID和matrixID对应的缺省矩阵。When the value of matrixID is 0, the first quantization matrix is indicated for each sizeID. If the value of scaling_list_pred_mode_flag is 0 and the value of matrixID is 0, prediction of the quantization matrix using a method such as matrix copy cannot be performed on the first quantization matrix for each sizeID because there is no reference quantization matrix with the same sizeID. In this case, the encoder does not encode scaling_list_pred_matrix_id_delta and derives the value of scaling_list_pred_matrix_id_delta as 0. When the value of scaling_list_pred_matrix_id_delta is 0, the coefficient values of the quantization matrix to be decoded corresponding to sizeID and matrixID are determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder because the value of RefMatrixID is the same as the value of matrixID. Here, the default matrix means the default matrix corresponding to sizeID and matrixID.
如果用于预测和解码所解码的量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来预测和解码量化矩阵中的系数的方法,则解码器能从参数集解码量化矩阵中先前已解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,从其解码差值的参数集可以是自适应参数集。If the method for predicting and decoding the decoded quantization matrix is a method for predicting and decoding coefficients in the quantization matrix by scanning based on the Exponential Golomb coding and inverse DPCM method, the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix from the parameter set. Here, the parameter set from which the difference is decoded may be an adaptive parameter set.
例如,如同表格28的示例中那样,如果要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则解码器能从参数集解码scaling_list_dc_coef_minus8(即,DC矩阵系数)。如同表格28的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中先前已解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。For example, as in the example of Table 28, if the size of the quantization matrix to be decoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the decoder can decode scaling_list_dc_coef_minus8 (i.e., DC matrix coefficients) from the parameter set. As in the example of Table 28, the decoder can decode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded) from the parameter set.
如同上面在编码器的示例中描述的,在传统量化矩阵编码/解码方法中,当发送量化矩阵时,对矩阵内的所有系数和DC矩阵系数进行编码/解码。在该情况下,限制编码效率的改进,因为不对DC矩阵系数进行预测和编码/解码。在本发明中,能预测和编码/解码量化矩阵内的DC矩阵系数,并由此能改进编码效率。例如,在表格29和30的示例中,能改进编码效率,因为不从常数8预测DC矩阵系数,而是通过使用相邻系数之间的高相关性来从相邻AC系数预测DC矩阵系数。此外,在表格29和30的示例中,能降低用于存储DC矩阵系数的存储空间,因为使得量化矩阵的编码/解码序列与量化矩阵的恢复序列相同。此外,在表格29和30的示例中,能通过语法元素“scaling_list_delta_coef”、而不使用几个语法元素,来指示是否已使用缺省矩阵。As described above in the encoder example, in conventional quantization matrix encoding/decoding methods, when a quantization matrix is transmitted, all coefficients within the matrix and the DC matrix coefficients are encoded/decoded. This limits improvements in coding efficiency because the DC matrix coefficients are not predicted and encoded/decoded. In the present invention, the DC matrix coefficients within the quantization matrix can be predicted and encoded/decoded, thereby improving coding efficiency. For example, in the examples of Tables 29 and 30, coding efficiency can be improved because the DC matrix coefficients are not predicted from the constant 8, but rather predicted from adjacent AC coefficients by utilizing the high correlation between adjacent coefficients. Furthermore, in the examples of Tables 29 and 30, the storage space required to store the DC matrix coefficients can be reduced because the encoding/decoding sequence of the quantization matrix is made the same as the recovery sequence of the quantization matrix. Furthermore, in the examples of Tables 29 and 30, whether a default matrix is used can be indicated using the syntax element "scaling_list_delta_coef" rather than using several syntax elements.
更具体地,解码器能从参数集解码指示是否存在量化矩阵的信息。例如,如同表格29的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)。然后,当scaling_list_present_flag的值为0时,它指示不存在量化矩阵并且由此将所有量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它指示存在编码的量化矩阵。More specifically, the decoder can decode information indicating whether a quantization matrix exists from the parameter set. For example, as in the example of Table 29, the decoder can decode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) from the parameter set. Then, when the value of scaling_list_present_flag is 0, it indicates that no quantization matrix exists and thus all quantization matrices are determined to be default quantization matrices. When the value of scaling_list_present_flag is 1, it indicates that a coded quantization matrix exists.
解码器能从参数集解码关于预测和解码量化矩阵的方法的信息,并能基于解码的信息来确定量化矩阵的预测解码方法的类型。这里,从其解码关于预测和解码量化矩阵的方法的信息的参数集可以是自适应参数集。The decoder can decode information about the method of predicting and decoding the quantization matrix from the parameter set, and can determine the type of prediction decoding method of the quantization matrix based on the decoded information. Here, the parameter set from which the information about the method of predicting and decoding the quantization matrix is decoded can be an adaptive parameter set.
更具体地,如同表格29的示例中那样,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。例如,当scaling_list_pred_mode_flag的值为1时,解码器能通过扫描根据指数哥伦布编码和逆DPCM方法来预测和解码量化矩阵中的系数。当scaling_list_pred_mode_flag的值为0时,解码器能确定要解码的量化矩阵的系数值,使得它们和参考量化矩阵的系数值具有相同值。这里,确定这些值使得它们具有相同值能意味着,使用将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。More specifically, as in the example of Table 29, the decoder can decode scaling_list_pred_mode_flag (i.e., information about a method of predicting and decoding a quantization matrix) from a parameter set. For example, when the value of scaling_list_pred_mode_flag is 1, the decoder can predict and decode coefficients in the quantization matrix by scanning according to the Exponential Golomb coding and inverse DPCM method. When the value of scaling_list_pred_mode_flag is 0, the decoder can determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Here, determining these values so that they have the same values can mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果scaling_list_pred_mode_flag的值为0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID。这里,从其解码参考量化矩阵ID的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded from the parameter set. Here, the parameter set from which the reference quantization matrix ID is decoded may be an adaptive parameter set.
更具体地,如同表格29的示例中那样,解码器能从参数集解码scaling_list_pred_matrix_id_delta(即,要解码的量化矩阵的参考量化矩阵ID)。这里,能通过使用scaling_list_pred_matrix_id_delta和等式22来确定指示要解码的量化矩阵的参考量化矩阵的RefMatrixID。More specifically, as in the example of Table 29, the decoder can decode scaling_list_pred_matrix_id_delta (ie, the reference quantization matrix ID of the quantization matrix to be decoded) from the parameter set. Here, RefMatrixID indicating the reference quantization matrix of the quantization matrix to be decoded can be determined by using scaling_list_pred_matrix_id_delta and Equation 22.
<等式22><Equation 22>
RefMatrixID=matrixID-(1+scaling_list_pred_matrix_id_delta)RefMatrixID=matrixID-(1+scaling_list_pred_matrix_id_delta)
解码器能将与RefMatrixID对应的量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并确定要解码的量化矩阵的系数值,使得它们和参考量化矩阵的系数值具有相同值。确定要解码的量化矩阵的系数值使得它们和参考量化矩阵的系数值具有相同值可意味着,使用这样的量化矩阵预测方法,其将与RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。The decoder can determine the quantization matrix corresponding to RefMatrixID as a reference quantization matrix for the quantization matrix to be decoded, and determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Determining the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix may mean using a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefMatrixID as the reference quantization matrix for the quantization matrix to be decoded, and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果用于预测和解码所解码的量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来预测和解码量化矩阵中的系数的方法,则解码器能从参数集解码量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,从其解码差值的参数集可以是自适应参数集。If the method for predicting and decoding the decoded quantization matrix is a method for predicting and decoding coefficients in the quantization matrix by scanning based on the Exponential Golomb coding and inverse DPCM method, the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix from the parameter set. Here, the parameter set from which the difference is decoded may be an adaptive parameter set.
例如,如同表格30的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。这里,编码器能通过使用用来计算nextCoef的scaling_list_delta_coef来确定是否已使用缺省矩阵。即,当通过解码scaling_list_delta_coef而计算的第一nextCoef的值为0时,解码器能将对应量化矩阵确定为缺省矩阵。For example, as in the example of Table 30, the decoder can decode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix) from the parameter set. Here, the encoder can determine whether the default matrix is used by using scaling_list_delta_coef used to calculate nextCoef. That is, when the value of the first nextCoef calculated by decoding scaling_list_delta_coef is 0, the decoder can determine that the corresponding quantization matrix is the default matrix.
此外,如同表格30的示例中那样,解码器能从参数集解码scaling_list_dc_coef_res(即,与DC矩阵系数对应的量化矩阵的系数值之间的差值)。这里,当要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3)并且不使用缺省矩阵时,能从(useDefaultScalingMatrixFlag=0)解码scaling_list_dc_coef_res。In addition, as in the example of Table 30, the decoder can decode scaling_list_dc_coef_res (i.e., the difference between the coefficient values of the quantization matrix corresponding to the DC matrix coefficient) from the parameter set. Here, when the size of the quantization matrix to be decoded is 16x16 (sizeID=2) or 32x32 (sizeID=3) and the default matrix is not used, scaling_list_dc_coef_res can be decoded from (useDefaultScalingMatrixFlag=0).
与其DC矩阵系数被单独解码的具有16x16或32x32尺寸的量化矩阵相关地,能根据等式23通过使用scaling_list_dc_coef_res的值和在DC位置处存在的矩阵系数之和,来计算DC矩阵系数。In relation to a quantization matrix having a size of 16×16 or 32×32 whose DC matrix coefficient is separately decoded, a DC matrix coefficient can be calculated according to Equation 23 by using a value of scaling_list_dc_coef_res and a sum of matrix coefficients existing at a DC position.
<等式23><Equation 23>
ScalingFactor[2][matrixID][0][0]=scaling_list_dc_coef_res[0][matrixID]+ScalingFactor[2][matrixID][0][0]其中matrixID=0..5ScalingFactor[2][matrixID][0][0]=scaling_list_dc_coef_res[0][matrixID]+ScalingFactor[2][matrixID][0][0]where matrixID=0..5
ScalingFactor[3][matrixID][0][0]=scaling_list_dc_coef_res[1][matrixID]+ScalingFactor[3][matrixID][0][0]其中matrixID=0..1ScalingFactor[3][matrixID][0][0]=scaling_list_dc_coef_res[1][matrixID]+ScalingFactor[3][matrixID][0][0]where matrixID=0..1
在等式23中,ScalingFactor[2]表示具有16x16尺寸的量化矩阵,而ScalingFactor[3]表示具有32x32的量化矩阵。此外,ScalingFactor[2][matrixID][0][0]表示与matrixID对应的具有16x16尺寸的量化矩阵内的DC矩阵系数。ScalingFactor[3][matrixID][0][0]表示与matrixID对应的具有32x32尺寸的量化矩阵内的DC矩阵系数。In Equation 23, ScalingFactor[2] represents a quantization matrix with a size of 16x16, and ScalingFactor[3] represents a quantization matrix with a size of 32x32. In addition, ScalingFactor[2][matrixID][0][0] represents the DC matrix coefficient within the quantization matrix with a size of 16x16 corresponding to matrixID. ScalingFactor[3][matrixID][0][0] represents the DC matrix coefficient within the quantization matrix with a size of 32x32 corresponding to matrixID.
其间,通过使用量化矩阵的系数值来确定是否已使用缺省矩阵的用于编码/解码量化矩阵的方法的缺点在于,其增加在编码/解码量化矩阵的系数值的处理中的复杂程度。此外,当发送量化矩阵时,编码/解码量化矩阵内的所有系数和DC矩阵系数。在该情况下,限制编码效率的改进,因为不对DC矩阵系数进行预测和编码/解码。Meanwhile, the method for encoding/decoding a quantization matrix that uses the coefficient values of the quantization matrix to determine whether a default matrix is being used has the disadvantage that it increases the complexity of processing the coefficient values of the quantization matrix for encoding/decoding. In addition, when the quantization matrix is transmitted, all coefficients within the quantization matrix and the DC matrix coefficients are encoded/decoded. In this case, the improvement in coding efficiency is limited because the DC matrix coefficients are not predicted and encoded/decoded.
在本发明中,在图像编码/解码中,通过基于参考量化矩阵ID确定是否已使用缺省矩阵,能降低当编码/解码量化矩阵时的复杂程度。此外,通过对量化矩阵内的DC矩阵系数进行预测和编码/解码,能改进编码效率。例如,在表格31和32的示例中,通过基于相邻系数之间的高相关性从相邻AC系数预测量化矩阵中的DC矩阵系数,而不是从常数8预测DC矩阵系数,能改进编码效率。此外,在表格31和32的示例中,能降低用于存储DC矩阵系数的存储空间,因为使得量化矩阵的编码/解码序列与量化矩阵的恢复序列相同。此外,在表格31和32的示例中,能通过语法元素“scaling_list_delta_coef”、而不使用几个语法元素,来指示是否已使用缺省矩阵。In the present invention, in image encoding/decoding, by determining whether a default matrix has been used based on a reference quantization matrix ID, the complexity when encoding/decoding the quantization matrix can be reduced. In addition, by predicting and encoding/decoding the DC matrix coefficient within the quantization matrix, the coding efficiency can be improved. For example, in the examples of Tables 31 and 32, the coding efficiency can be improved by predicting the DC matrix coefficient in the quantization matrix from adjacent AC coefficients based on the high correlation between adjacent coefficients, rather than predicting the DC matrix coefficient from a constant 8. In addition, in the examples of Tables 31 and 32, the storage space used to store the DC matrix coefficient can be reduced because the encoding/decoding sequence of the quantization matrix is made the same as the recovery sequence of the quantization matrix. In addition, in the examples of Tables 31 and 32, it is possible to indicate whether the default matrix has been used by the syntax element "scaling_list_delta_coef" instead of using several syntax elements.
更具体地,解码器能从参数集解码指示是否存在量化矩阵的信息。如同表格31的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)编码为参数集。这里,当scaling_list_present_flag的值为0时,它指示不存在量化矩阵并且由此将所有量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它指示存在编码的量化矩阵。More specifically, the decoder can decode information indicating whether a quantization matrix exists from a parameter set. As in the example of Table 31, the decoder can decode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) from a parameter set, which is encoded as a parameter set. Here, when the value of scaling_list_present_flag is 0, it indicates that no quantization matrix exists and thus all quantization matrices are determined to be default quantization matrices. When the value of scaling_list_present_flag is 1, it indicates that an encoded quantization matrix exists.
解码器能从参数集解码关于预测和解码量化矩阵的方法的信息,并能基于解码的信息来确定量化矩阵的预测解码方法的类型。这里,从其解码关于预测解码方法的信息的参数集可以是自适应参数集。The decoder can decode information about the method of predicting and decoding the quantization matrix from the parameter set, and can determine the type of prediction decoding method of the quantization matrix based on the decoded information. Here, the parameter set from which the information about the prediction decoding method is decoded can be an adaptive parameter set.
例如,如同表格31的示例中那样,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。在表格31的示例中,当scaling_list_pred_mode_flag的值为1时,解码器能通过扫描根据指数哥伦布编码和逆DPCM方法解码量化矩阵,来预测和解码量化矩阵中的系数。当scaling_list_pred_mode_flag的值为0时,要解码的量化矩阵的系数值能被确定为与参考量化矩阵的系数值相同,或者要解码的量化矩阵的系数值能被确定为与缺省矩阵的系数值相同。这里,确定这些值使得它们具有相同值能意味着,使用将特定量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。For example, as in the example of Table 31, the decoder can decode scaling_list_pred_mode_flag (i.e., information about a method of predicting and decoding a quantization matrix) from a parameter set. In the example of Table 31, when the value of scaling_list_pred_mode_flag is 1, the decoder can predict and decode coefficients in the quantization matrix by scanning the quantization matrix decoded according to the Exponential Golomb coding and inverse DPCM method. When the value of scaling_list_pred_mode_flag is 0, the coefficient values of the quantization matrix to be decoded can be determined to be the same as the coefficient values of the reference quantization matrix, or the coefficient values of the quantization matrix to be decoded can be determined to be the same as the coefficient values of the default matrix. Here, determining these values so that they have the same value can mean using a quantization matrix prediction method that copies the coefficient values of a specific quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果scaling_list_pred_mode_flag的值为0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID和关于是否已使用缺省矩阵的信息。这里,所解码的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded and information on whether a default matrix has been used from the parameter set. Here, the decoded parameter set may be an adaptive parameter set.
更具体地,如同表格31的示例中那样,解码器能从参数集解码scaling_list_pred_matrix_id_delta(即,关于要解码的量化矩阵的参考量化矩阵ID和是否已使用缺省矩阵的信息)。这里,能通过使用scaling_list_pred_matrix_id_delta和等式24,来确定指示要解码的量化矩阵的参考量化矩阵或缺省矩阵的RefMatrixID。More specifically, as in the example of Table 31, the decoder can decode scaling_list_pred_matrix_id_delta (i.e., information about the reference quantization matrix ID of the quantization matrix to be decoded and whether a default matrix has been used) from the parameter set. Here, the RefMatrixID indicating the reference quantization matrix or the default matrix of the quantization matrix to be decoded can be determined by using scaling_list_pred_matrix_id_delta and Equation 24.
<等式24><Equation 24>
RefMatrixID=matrixID-scaling_list_pred_matrix_id_deltaRefMatrixID=matrixID-scaling_list_pred_matrix_id_delta
如果RefMatrixID的值与matrixID的值相同,则与sizeID和matrixID对应的要解码的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。这里,缺省矩阵表示与sizeID和matrixID对应的缺省矩阵。此外,在等式24中,当scaling_list_pred_matrix_id_delta的值为0时,它意味着RefMatrixID的值与matrixID的值相同。当RefMatrixID的值与matrixID的值不相同时,与RefMatrixID对应的量化矩阵能被确定为要解码的量化矩阵的参考量化矩阵,并且要解码的量化矩阵的系数值被确定为与参考量化矩阵的系数值相同。将要解码的量化矩阵的系数值确定为与参考量化矩阵的系数值相同可意味着,使用这样的量化矩阵预测方法,其将与RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。If the value of RefMatrixID is the same as the value of matrixID, the coefficient values of the quantization matrix to be decoded corresponding to sizeID and matrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. Here, the default matrix represents the default matrix corresponding to sizeID and matrixID. In addition, in Equation 24, when the value of scaling_list_pred_matrix_id_delta is 0, it means that the value of RefMatrixID is the same as the value of matrixID. When the value of RefMatrixID is different from the value of matrixID, the quantization matrix corresponding to RefMatrixID can be determined as the reference quantization matrix of the quantization matrix to be decoded, and the coefficient values of the quantization matrix to be decoded are determined to be the same as the coefficient values of the reference quantization matrix. Determining the coefficient values of the quantization matrix to be decoded to be the same as the coefficient values of the reference quantization matrix can mean using such a quantization matrix prediction method, which determines the reference quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded, and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果用于预测和解码所解码的量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来解码量化矩阵以便预测和解码量化矩阵中的系数的方法,则解码器能从参数集中解码量化矩阵中先前已解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,从其解码差值的参数集可以是自适应参数集。If the method for predicting and decoding the decoded quantization matrix is a method for predicting and decoding the coefficients in the quantization matrix by scanning the quantization matrix according to the Exponential Golomb coding and inverse DPCM method, then the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix from the parameter set. Here, the parameter set from which the difference is decoded may be an adaptive parameter set.
此外,如同表格32的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。如同表格32的示例中那样,解码器能从参数集解码scaling_list_dc_coef_res(即,与DC矩阵系数对应的量化矩阵的系数值之间的差值)。这里,当要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3)量化矩阵并且不使用缺省矩阵时,能从(useDefaultScalingMatrixFlag=0)解码scaling_list_dc_coef_res。In addition, as in the example of Table 32, the decoder can decode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix) from the parameter set. As in the example of Table 32, the decoder can decode scaling_list_dc_coef_res (i.e., the difference between the coefficient values of the quantization matrix corresponding to the DC matrix coefficient) from the parameter set. Here, when the size of the quantization matrix to be decoded is a 16x16 (sizeID=2) or 32x32 (sizeID=3) quantization matrix and the default matrix is not used, scaling_list_dc_coef_res can be decoded from (useDefaultScalingMatrixFlag=0).
与其DC矩阵系数被单独解码的具有16x16尺寸的量化矩阵或具有32x32尺寸的量化矩阵相关地,能根据等式25通过使用scaling_list_dc_coef_res的值和在DC位置处存在的矩阵的系数之和,来计算DC矩阵系数。In relation to a quantization matrix having a 16×16 size or a quantization matrix having a 32×32 size whose DC matrix coefficient is separately decoded, a DC matrix coefficient can be calculated according to Equation 25 by using the value of scaling_list_dc_coef_res and the sum of coefficients of a matrix existing at a DC position.
<等式25><Equation 25>
ScalingFactor[2][matrixID][0][0]=scaling_list_dc_coef_res[0][matrixID]+ScalingFactor[2][matrixID][0][0]其中matrixID=0..5ScalingFactor[2][matrixID][0][0]=scaling_list_dc_coef_res[0][matrixID]+ScalingFactor[2][matrixID][0][0]where matrixID=0..5
ScalingFactor[3][matrixID][0][0]=scaling_list_dc_coef_res[1][matrixID]+ScalingFactor[3][matrixID][0][0]其中matrixID=0..1ScalingFactor[3][matrixID][0][0]=scaling_list_dc_coef_res[1][matrixID]+ScalingFactor[3][matrixID][0][0]where matrixID=0..1
在等式25中,ScalingFactor[2]表示16x16尺寸的量化矩阵,而ScalingFactor[3]表示32x32尺寸的量化矩阵。此外,ScalingFactor[2][matrixID][0][0]表示与对应matrixID对应的16x16尺寸的量化矩阵内的DC矩阵系数,而ScalingFactor[3][matrixID][0][0]表示与对应matrixID对应的32x32尺寸的量化矩阵内的DC矩阵系数。In Equation 25, ScalingFactor[2] represents a quantization matrix of 16x16 size, and ScalingFactor[3] represents a quantization matrix of 32x32 size. In addition, ScalingFactor[2][matrixID][0][0] represents the DC matrix coefficient within the quantization matrix of 16x16 size corresponding to the corresponding matrixID, and ScalingFactor[3][matrixID][0][0] represents the DC matrix coefficient within the quantization matrix of 32x32 size corresponding to the corresponding matrixID.
如同上面与编码器相关的示例中描述的,在传统量化矩阵编码/解码方法中,通过使用当执行量化和反量化时的量化矩阵的尺寸(而不是使用当执行编码/解码时的量化矩阵的尺寸)来拷贝量化矩阵。因此,限制量化矩阵的编码效率,因为必须从有限数目的量化矩阵拷贝量化矩阵。然而,在本发明中,能改进编码效率并能增加预测量化矩阵的自由度,因为能从和当执行编码/解码时的量化矩阵具有相同尺寸的量化矩阵预测量化矩阵。As described above in the example related to the encoder, in conventional quantization matrix encoding/decoding methods, the quantization matrix is copied by using the size of the quantization matrix when performing quantization and inverse quantization (rather than using the size of the quantization matrix when performing encoding/decoding). Therefore, the encoding efficiency of the quantization matrix is limited because the quantization matrix must be copied from a limited number of quantization matrices. However, in the present invention, the encoding efficiency can be improved and the degree of freedom of predicting the quantization matrix can be increased because the quantization matrix can be predicted from a quantization matrix having the same size as the quantization matrix when performing encoding/decoding.
更具体地,解码器能从参数集解码指示是否存在量化矩阵的信息。如同表格33和34的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)。例如,当scaling_list_present_flag的值为0时,它指示不存在量化矩阵并且由此将所有量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它指示存在编码的量化矩阵。More specifically, the decoder can decode information indicating whether a quantization matrix exists from the parameter set. As in the examples of Tables 33 and 34, the decoder can decode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) from the parameter set. For example, when the value of scaling_list_present_flag is 0, it indicates that no quantization matrix exists and thus all quantization matrices are determined to be default quantization matrices. When the value of scaling_list_present_flag is 1, it indicates that a coded quantization matrix exists.
此外,解码器能从参数集解码关于预测和解码量化矩阵的方法的信息,并能基于解码的信息来确定量化矩阵的预测解码方法的类型。这里,从其解码关于预测解码方法的信息的参数集可以是自适应参数集。In addition, the decoder can decode information about the method of predicting and decoding the quantization matrix from the parameter set, and can determine the type of prediction decoding method of the quantization matrix based on the decoded information. Here, the parameter set from which the information about the prediction decoding method is decoded can be an adaptive parameter set.
更具体地,如同表格33和34的示例中那样,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。例如,当scaling_list_pred_mode_flag的值为1时,解码器能通过扫描根据指数哥伦布编码和逆DPCM方法解码量化矩阵,来预测和解码量化矩阵中的系数。当scaling_list_pred_mode_flag的值为0时,解码器能确定要解码的量化矩阵的系数值使得它们与参考量化矩阵的系数值具有相同值。这里,确定这些值使得它们具有相同值能意味着,使用将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。More specifically, as in the examples of Tables 33 and 34, the decoder can decode scaling_list_pred_mode_flag (i.e., information about a method of predicting and decoding a quantization matrix) from a parameter set. For example, when the value of scaling_list_pred_mode_flag is 1, the decoder can predict and decode coefficients in the quantization matrix by scanning the quantization matrix decoded according to the Exponential Golomb coding and inverse DPCM methods. When the value of scaling_list_pred_mode_flag is 0, the decoder can determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Here, determining these values so that they have the same values can mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果scaling_list_pred_mode_flag的值为0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID。这里,关于参考量化矩阵的ID信息(标识符)能包括要解码的量化矩阵的参考量化矩阵的尺寸和参考量化矩阵中的一个或多个。此外,从其解码参考量化矩阵ID的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded from the parameter set. Here, the ID information (identifier) about the reference quantization matrix can include one or more of the size of the reference quantization matrix of the quantization matrix to be decoded and the reference quantization matrix. In addition, the parameter set from which the reference quantization matrix ID is decoded may be an adaptive parameter set.
例如,如同表格33的示例中那样,解码器能从参数集解码scaling_list_pred_matrix_id_delta(即,关于要解码的量化矩阵的参考量化矩阵的ID信息)。这里,能通过使用scaling_list_pred_size_matrix_id_delta和等式26,来确定RefSizeID(即,要解码的量化矩阵的参考量化矩阵的尺寸)和指示参考量化矩阵的RefMatrixID。For example, as in the example of Table 33, the decoder can decode scaling_list_pred_matrix_id_delta (i.e., ID information about the reference quantization matrix of the quantization matrix to be decoded) from the parameter set. Here, RefSizeID (i.e., the size of the reference quantization matrix of the quantization matrix to be decoded) and RefMatrixID indicating the reference quantization matrix can be determined by using scaling_list_pred_size_matrix_id_delta and Equation 26.
<等式26><Equation 26>
RefSizeID=sizeID-(scaling_list_pred_size_matrix_id_delta/6)RefSizeID=sizeID-(scaling_list_pred_size_matrix_id_delta/6)
RefMatrixID=scaling_list_pred_size_matrix_id_delta%6RefMatrixID=scaling_list_pred_size_matrix_id_delta%6
此外,如同表格34的示例中那样,解码器能从参数集解码scaling_list_pred_size_id_delta和scaling_list_pred_size_matrix_id_delta(即,关于要解码的量化矩阵的参考量化矩阵的ID信息)。这里,RefSizeID可以通过使用scaling_list_pred_size_id_delta的值和等式27来确定,并且指示要解码的量化矩阵的参考量化矩阵的RefMatrixID可通过使用scaling_list_pred_matrix_id_delta和等式28来确定。In addition, as in the example of Table 34, the decoder can decode scaling_list_pred_size_id_delta and scaling_list_pred_size_matrix_id_delta (i.e., ID information of the reference quantization matrix of the quantization matrix to be decoded) from the parameter set. Here, RefSizeID can be determined by using the value of scaling_list_pred_size_id_delta and Equation 27, and RefMatrixID indicating the reference quantization matrix of the quantization matrix to be decoded can be determined by using scaling_list_pred_matrix_id_delta and Equation 28.
<等式27><Equation 27>
RefSizeID=sizeID-scaling_list_pred_size_id_deltaRefSizeID=sizeID-scaling_list_pred_size_id_delta
<等式28><Equation 28>
RefMatrixID=matrixID-scaling_list_pred_matrix_id_deltaRefMatrixID=matrixID-scaling_list_pred_matrix_id_delta
要解码的量化矩阵的系数值可同样通过其sizeID等于RefSizeID并且matrixID等于RefMatrixID的参考量化矩阵的系数值来确定。即,解码器能将参考量化矩阵拷贝到要解码的量化矩阵。确定要解码的量化矩阵的系数值使得它们和参考量化矩阵的系数值具有相同值可意味着,使用这样的量化矩阵预测方法,其将与RefSizeID和RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。The coefficient values of the quantization matrix to be decoded can also be determined by the coefficient values of the reference quantization matrix whose sizeID is equal to RefSizeID and whose matrixID is equal to RefMatrixID. That is, the decoder can copy the reference quantization matrix to the quantization matrix to be decoded. Determining the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix can mean using a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefSizeID and RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded, and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
通过表格33和34的示例,能从具有相同sizeID的量化矩阵预测量化矩阵,并还能从具有当执行编码/解码时相同的矩阵尺寸但是具有不同sizeID的量化矩阵预测量化矩阵Through the examples of Tables 33 and 34, the quantization matrix can be predicted from the quantization matrix having the same sizeID, and can also be predicted from the quantization matrix having the same matrix size when performing encoding/decoding but having a different sizeID.
此外,在表格33和34的示例中,scaling_list_pred_size_matrix_id_delta的值、scaling_list_pred_size_id_delta的值、和scaling_list_pred_matrix_id_delta的值可限于特定范围的值。例如,scaling_list_pred_size_matrix_id_delta可限于从0到17的范围的值,scaling_list_pred_size_id_delta可限于从0到2的范围的值,而scaling_list_pred_matrix_id_delta可限于从0到5的范围的值。Furthermore, in the examples of Tables 33 and 34, the values of scaling_list_pred_size_matrix_id_delta, scaling_list_pred_size_id_delta, and scaling_list_pred_matrix_id_delta may be limited to values within a specific range. For example, scaling_list_pred_size_matrix_id_delta may be limited to values within a range of 0 to 17, scaling_list_pred_size_id_delta may be limited to values within a range of 0 to 2, and scaling_list_pred_matrix_id_delta may be limited to values within a range of 0 to 5.
此外,在表格33和34的示例中,解码器可以不从比要解码的量化矩阵具有更大尺寸的量化矩阵预测要解码的量化矩阵。Furthermore, in the examples of Tables 33 and 34 , the decoder may not predict the quantization matrix to be decoded from a quantization matrix having a larger size than the quantization matrix to be decoded.
此外,在表格33和34的示例中,当从具有8x8尺寸的量化矩阵预测要解码的量化矩阵时,解码器能通过将与8x8尺寸的量化矩阵内的DC矩阵系数的位置对应的值确定为DC矩阵系数,来预测对应位置处的值。此外,当从具有16x16或32x32尺寸的量化矩阵预测要解码的量化矩阵时,解码器也能预测DC矩阵系数。In addition, in the examples of Tables 33 and 34, when the quantization matrix to be decoded is predicted from a quantization matrix having an 8x8 size, the decoder can predict the value at the corresponding position by determining the value corresponding to the position of the DC matrix coefficient within the 8x8 size quantization matrix as the DC matrix coefficient. In addition, when the quantization matrix to be decoded is predicted from a quantization matrix having a 16x16 or 32x32 size, the decoder can also predict the DC matrix coefficient.
其间,如果用于预测和解码量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来解码量化矩阵以便预测和解码量化矩阵内的系数的方法,则解码器能从参数集解码量化矩阵内先前已解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,从其解码差值的参数集可以是自适应参数集。Meanwhile, if the method for predicting and decoding a quantization matrix is a method for predicting and decoding coefficients within a quantization matrix by scanning a quantization matrix according to an Exponential Golomb coding and inverse DPCM method, the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded within the quantization matrix from a parameter set. Here, the parameter set from which the difference is decoded may be an adaptive parameter set.
更具体地,如同表格35的示例中那样,如果要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则解码器能从参数集解码scaling_list_dc_coef_minus8(即,DC矩阵系数)。More specifically, as in the example of Table 35, if the size of the quantization matrix to be decoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the decoder can decode scaling_list_dc_coef_minus8 (ie, DC matrix coefficient) from the parameter set.
此外,如同表格35的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中先前已解码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)。Furthermore, as in the example of Table 35, the decoder can decode scaling_list_delta_coef (ie the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be encoded) from the parameter set.
此外,解码器能通过使用用来计算scaling_list_dc_coef_minus8或nextCoef的scaling_list_delta_coef来确定是否已使用缺省矩阵。即,如果scaling_list_dc_coef_minus8的值被解码为-8,则对应量化矩阵能被确定为缺省矩阵。如果通过解码scaling_list_delta_coef而计算的第一nextCoef的值是0,则对应量化矩阵能被确定为缺省矩阵。In addition, the decoder can determine whether the default matrix has been used by using scaling_list_delta_coef used to calculate scaling_list_dc_coef_minus8 or nextCoef. That is, if the value of scaling_list_dc_coef_minus8 is decoded as -8, the corresponding quantization matrix can be determined as the default matrix. If the value of the first nextCoef calculated by decoding scaling_list_delta_coef is 0, the corresponding quantization matrix can be determined as the default matrix.
如同上面在编码器的示例中描述的,在传统量化矩阵编码/解码方法中,增加编码/解码量化矩阵的系数值的处理中的复杂程度,因为使用量化矩阵的系数值来确定是否已使用缺省矩阵。此外,从有限数目的量化矩阵拷贝量化矩阵,因为通过使用当执行量化和反量化时的量化矩阵的尺寸(而不是使用当执行编码/解码时的量化矩阵的尺寸)来拷贝量化矩阵。然而,在本发明中,通过基于参考量化矩阵ID确定是否已使用缺省矩阵,能降低当编码/解码量化矩阵时计算的复杂度。此外,在本发明中,通过从和当执行编码/解码时的量化矩阵具有相同尺寸的量化矩阵来预测量化矩阵,能改进编码效率并能增加预测量化矩阵的自由度。As described above in the example of the encoder, in the conventional quantization matrix encoding/decoding method, the complexity in the processing of the coefficient values of the encoding/decoding quantization matrix is increased because the coefficient values of the quantization matrix are used to determine whether a default matrix has been used. In addition, the quantization matrix is copied from a limited number of quantization matrices because the quantization matrix is copied by using the size of the quantization matrix when quantization and inverse quantization are performed (instead of using the size of the quantization matrix when encoding/decoding is performed). However, in the present invention, by determining whether a default matrix has been used based on a reference quantization matrix ID, the complexity of calculation when encoding/decoding the quantization matrix can be reduced. In addition, in the present invention, by predicting the quantization matrix from a quantization matrix having the same size as the quantization matrix when encoding/decoding is performed, the coding efficiency can be improved and the degree of freedom of predicting the quantization matrix can be increased.
更具体地,解码器能从参数集解码指示是否存在量化矩阵的信息。如同表格36和37的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)。例如,当scaling_list_present_flag的值为0时,它指示不存在量化矩阵,并且由此能将所有量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它指示存在编码的量化矩阵。More specifically, the decoder can decode information indicating whether a quantization matrix exists from the parameter set. As in the examples of Tables 36 and 37, the decoder can decode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) from the parameter set. For example, when the value of scaling_list_present_flag is 0, it indicates that there is no quantization matrix, and thus all quantization matrices can be determined as default quantization matrices. When the value of scaling_list_present_flag is 1, it indicates that a coded quantization matrix exists.
解码器能从参数集解码关于预测和解码量化矩阵的方法的信息,并能基于解码的信息来确定预测和解码量化矩阵的方法的类型。这里,解码的参数集可以是自适应参数集。The decoder can decode information about a method of predicting and decoding a quantization matrix from a parameter set, and can determine the type of method of predicting and decoding a quantization matrix based on the decoded information. Here, the decoded parameter set may be an adaptive parameter set.
如同表格36和37的示例中那样,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。这里,当scaling_list_pred_mode_flag的值为1时,解码器能通过扫描根据指数哥伦布编码和逆DPCM方法来解码量化矩阵,以便预测和解码量化矩阵中的系数。当scaling_list_pred_mode_flag的值为0时,解码器能确定要解码的量化矩阵的系数值,使得它们与参考量化矩阵的系数值具有相同值,或者确定要解码的量化矩阵的系数值,使得它们与缺省矩阵的系数值具有相同值。这里,确定这些值使得它们具有相同值能意味着,使用将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。As in the examples of Tables 36 and 37, the decoder can decode scaling_list_pred_mode_flag (i.e., information about a method of predicting and decoding a quantization matrix) from a parameter set. Here, when the value of scaling_list_pred_mode_flag is 1, the decoder can decode the quantization matrix by scanning according to the Exponential Golomb coding and inverse DPCM method so as to predict and decode the coefficients in the quantization matrix. When the value of scaling_list_pred_mode_flag is 0, the decoder can determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix, or determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the default matrix. Here, determining these values so that they have the same values can mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果scaling_list_pred_mode_flag的值为0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID和关于是否已使用缺省矩阵的信息。这里,关于参考量化矩阵的ID信息(标识符)能包括要解码的量化矩阵的参考量化矩阵的尺寸和参考量化矩阵中的一个或多个。此外,解码的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded and information on whether a default matrix has been used from the parameter set. Here, the ID information (identifier) about the reference quantization matrix can include one or more of the size of the reference quantization matrix of the quantization matrix to be decoded and the reference quantization matrix. In addition, the decoded parameter set can be an adaptive parameter set.
例如,如同表格36的示例中那样,解码器能从参数集解码scaling_list_pred_size_matrix_id_delta(即,要解码的量化矩阵的参考量化矩阵ID和关于是否已使用缺省矩阵的信息)。这里,能通过使用scaling_list_pred_size_matrix_id_delta和等式29,来确定RefSizeID和指示参考量化矩阵的RefMatrixID。For example, as in the example of Table 36, the decoder can decode scaling_list_pred_size_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be decoded and information on whether the default matrix has been used) from the parameter set. Here, RefSizeID and RefMatrixID indicating the reference quantization matrix can be determined by using scaling_list_pred_size_matrix_id_delta and Equation 29.
<等式29><Equation 29>
RefSizeID=sizeID-(scaling_list_pred_size_matrix_id_delta/6)RefSizeID=sizeID-(scaling_list_pred_size_matrix_id_delta/6)
RefMatrixID=scaling_list_pred_size_matrix_id_delta%6RefMatrixID=scaling_list_pred_size_matrix_id_delta%6
此外,如同表格37的示例中那样,解码器可从参数集解码scaling_list_pred_size_id_delta和scaling_list_pred_size_matrix_id_delta(即,要解码的量化矩阵的参考量化矩阵ID和关于是否已使用缺省矩阵的信息)。这里,RefSizeID可以通过使用scaling_list_pred_size_id_delta的值和等式30来确定,并且指示要解码的量化矩阵的参考量化矩阵或缺省矩阵的RefMatrixID可通过使用scaling_list_pred_matrix_id_delta的值和等式31来确定。In addition, as in the example of Table 37, the decoder can decode scaling_list_pred_size_id_delta and scaling_list_pred_size_matrix_id_delta (i.e., the reference quantization matrix ID of the quantization matrix to be decoded and information on whether the default matrix is used) from the parameter set. Here, RefSizeID can be determined by using the value of scaling_list_pred_size_id_delta and Equation 30, and RefMatrixID indicating the reference quantization matrix or the default matrix of the quantization matrix to be decoded can be determined by using the value of scaling_list_pred_matrix_id_delta and Equation 31.
<等式30><Equation 30>
RefSizeID=sizeID-scaling_list_pred_size_id_deltaRefSizeID=sizeID-scaling_list_pred_size_id_delta
<等式31><Equation 31>
RefMatrixID=matrixID-scaling_list_pred_matrix_id_deltaRefMatrixID=matrixID-scaling_list_pred_matrix_id_delta
如果RefMatrixID的值等于matrixID的值,则与sizeID和matrixID对应的要解码的量化矩阵的系数值能被确定为与编码器和/或解码器中定义的缺省矩阵的系数值相同。这里,缺省矩阵表示与sizeID和matrixID对应的缺省矩阵。此外,在等式31中,当scaling_list_pred_matrix_id_delta的值为0时,它意味着RefMatrixID的值等于matrixID的值。If the value of RefMatrixID is equal to the value of matrixID, the coefficient values of the quantization matrix to be decoded corresponding to sizeID and matrixID can be determined to be the same as the coefficient values of the default matrix defined in the encoder and/or decoder. Here, the default matrix represents the default matrix corresponding to sizeID and matrixID. In addition, in Equation 31, when the value of scaling_list_pred_matrix_id_delta is 0, it means that the value of RefMatrixID is equal to the value of matrixID.
如果RefMatrixID的值与matrixID的值不相同,则将与RefSizeID和RefMatrixID对应的量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并能将要解码的量化矩阵的系数值确定为与参考量化矩阵的系数值相同。将要解码的量化矩阵的系数值确定为与参考量化矩阵的系数值相同可意味着,使用这样的量化矩阵预测方法,其将与RefSizeID和RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。If the value of RefMatrixID is different from the value of matrixID, the quantization matrix corresponding to RefSizeID and RefMatrixID is determined as the reference quantization matrix of the quantization matrix to be decoded, and the coefficient values of the quantization matrix to be decoded can be determined to be the same as the coefficient values of the reference quantization matrix. Determining the coefficient values of the quantization matrix to be decoded to be the same as the coefficient values of the reference quantization matrix may mean using a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefSizeID and RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
根据表格36或37的示例,能从具有相同sizeID的量化矩阵来预测量化矩阵,并且还能从具有当执行编码/解码时相同的矩阵尺寸但是具有不同sizeID的量化矩阵来预测量化矩阵According to the example of Table 36 or 37, the quantization matrix can be predicted from the quantization matrix having the same sizeID, and the quantization matrix can also be predicted from the quantization matrix having the same matrix size when performing encoding/decoding but having a different sizeID.
此外,在表格36或37的示例中,scaling_list_pred_size_matrix_id_delta的值、scaling_list_pred_size_id_delta的值、和scaling_list_pred_matrix_id_delta的值可限于特定范围的值。例如,scaling_list_pred_size_matrix_id_delta可限于从0到17的范围的值,scaling_list_pred_size_id_delta可限于从0到2的范围的值,而scaling_list_pred_matrix_id_delta可限于从0到5的范围的值。Furthermore, in the examples of Tables 36 or 37, the values of scaling_list_pred_size_matrix_id_delta, scaling_list_pred_size_id_delta, and scaling_list_pred_matrix_id_delta may be limited to values within a specific range. For example, scaling_list_pred_size_matrix_id_delta may be limited to values within a range of 0 to 17, scaling_list_pred_size_id_delta may be limited to values within a range of 0 to 2, and scaling_list_pred_matrix_id_delta may be limited to values within a range of 0 to 5.
此外,在表格36或37的示例中,解码器可以不从比要解码的量化矩阵具有更大尺寸的量化矩阵预测量化矩阵。Furthermore, in the example of Table 36 or 37, the decoder may not predict a quantization matrix from a quantization matrix having a larger size than a quantization matrix to be decoded.
此外,当从具有8x8尺寸的量化矩阵执行预测时,解码器能通过将与8x8尺寸的量化矩阵内的DC矩阵系数的位置对应的值确定为DC矩阵系数,来预测对应位置处的值。此外,当从16x16尺寸的量化矩阵或32x32尺寸的量化矩阵执行预测时,解码器也能预测DC矩阵系数。In addition, when prediction is performed from a quantization matrix having an 8x8 size, the decoder can predict the value at the corresponding position by determining the value corresponding to the position of the DC matrix coefficient within the 8x8 size quantization matrix as the DC matrix coefficient. In addition, when prediction is performed from a quantization matrix having a 16x16 size or a 32x32 size, the decoder can also predict the DC matrix coefficient.
其间,如果用于预测和解码量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来解码量化矩阵以便预测和解码量化矩阵内的系数的方法,则解码器能从参数集解码量化矩阵内先前已解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,从其解码差值的参数集可以是自适应参数集。Meanwhile, if the method for predicting and decoding a quantization matrix is a method for predicting and decoding coefficients within a quantization matrix by scanning a quantization matrix according to an Exponential Golomb coding and inverse DPCM method, the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded within the quantization matrix from a parameter set. Here, the parameter set from which the difference is decoded may be an adaptive parameter set.
如同表格38的示例中那样,如果要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则解码器能从参数集解码scaling_list_dc_coef_minus8(即,DC矩阵系数)。As in the example of Table 38, if the size of the quantization matrix to be decoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the decoder can decode scaling_list_dc_coef_minus8 (ie, DC matrix coefficients) from the parameter set.
如同表格38的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中先前已编码的量化矩阵的系数值和要编码的量化矩阵的系数值之间的差值)。As in the example of Table 38, the decoder can decode scaling_list_delta_coef (ie the difference between the coefficient values of the previously encoded quantization matrix and the coefficient values of the quantization matrix to be encoded) from the parameter set.
如同上面在编码器的示例中描述的,在传统量化矩阵编码/解码方法中,限制编码效率的改进,因为当编码/解码量化矩阵中的第一系数时,通过不考虑频繁出现的系数值来编码量化矩阵的系数值。然而,在本发明中,能改进编码效率,因为能使用频繁出现的系数值来预测和编码/解码量化矩阵中的第一系数。如果缺省矩阵的第一系数值或DC矩阵系数值被定义为16并且非缺省矩阵的第一系数值或DC矩阵系数值基于16分布,如果通过从常数16预测第一系数值或DC矩阵系数值、来编码/解码要编码/解码的量化矩阵中的第一系数值或DC矩阵系数值,则能改进编码效率。As described above in the example of the encoder, in the conventional quantization matrix encoding/decoding method, the improvement of encoding efficiency is limited because the coefficient value of the quantization matrix is encoded by not considering the frequently occurring coefficient value when encoding/decoding the first coefficient in the quantization matrix. However, in the present invention, encoding efficiency can be improved because the first coefficient in the quantization matrix can be predicted and encoded/decoded using the frequently occurring coefficient value. If the first coefficient value or DC matrix coefficient value of the default matrix is defined as 16 and the first coefficient value or DC matrix coefficient value of the non-default matrix is distributed based on 16, if the first coefficient value or DC matrix coefficient value in the quantization matrix to be encoded/decoded is encoded/decoded by predicting the first coefficient value or DC matrix coefficient value from the constant 16, encoding efficiency can be improved.
更具体地,解码器能从参数集解码指示是否存在量化矩阵的信息。如同表格39的示例中那样,解码器能从参数集解码scaling_list_present_flag(即,指示在比特流中是否存在量化矩阵的信息)。例如,当scaling_list_present_flag的值为0时,它指示不存在量化矩阵并且由此能将所有量化矩阵确定为缺省量化矩阵。当scaling_list_present_flag的值为1时,它指示存在编码的量化矩阵。More specifically, the decoder can decode information indicating whether a quantization matrix exists from the parameter set. As in the example of Table 39, the decoder can decode scaling_list_present_flag (i.e., information indicating whether a quantization matrix exists in the bitstream) from the parameter set. For example, when the value of scaling_list_present_flag is 0, it indicates that there is no quantization matrix and thus all quantization matrices can be determined as default quantization matrices. When the value of scaling_list_present_flag is 1, it indicates that a coded quantization matrix exists.
此外,解码器能从参数集解码关于预测和解码量化矩阵的方法的信息,并能基于解码的信息来确定用于量化矩阵的预测解码方法的类型。这里,从其解码关于预测编码方法的信息的参数集可以是自适应参数集。In addition, the decoder can decode information about the method of predicting and decoding the quantization matrix from the parameter set, and can determine the type of predictive decoding method used for the quantization matrix based on the decoded information. Here, the parameter set from which the information about the predictive encoding method is decoded can be an adaptive parameter set.
如同表格39的示例中那样,解码器能从参数集解码scaling_list_pred_mode_flag(即,关于预测和解码量化矩阵的方法的信息)。例如,当scaling_list_pred_mode_flag的值为1时,解码器通过扫描根据指数哥伦布编码和逆DPCM方法来解码量化矩阵,以便预测和解码量化矩阵中的系数。当scaling_list_pred_mode_flag的值为0时,解码器确定要解码的量化矩阵的系数值,使得它们与参考量化矩阵的系数值具有相同值。这里,确定这些值使得它们具有相同值能意味着,使用将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值的量化矩阵预测方法。As in the example of Table 39, the decoder can decode scaling_list_pred_mode_flag (i.e., information about a method of predicting and decoding a quantization matrix) from a parameter set. For example, when the value of scaling_list_pred_mode_flag is 1, the decoder decodes the quantization matrix by scanning according to the Exponential Golomb coding and inverse DPCM method to predict and decode coefficients in the quantization matrix. When the value of scaling_list_pred_mode_flag is 0, the decoder determines the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Here, determining these values so that they have the same values can mean using a quantization matrix prediction method that copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded.
如果scaling_list_pred_mode_flag的值为0,则解码器能从参数集解码要解码的量化矩阵的参考量化矩阵ID。这里,从其解码参考量化矩阵ID的参数集可以是自适应参数集。If the value of scaling_list_pred_mode_flag is 0, the decoder can decode the reference quantization matrix ID of the quantization matrix to be decoded from the parameter set. Here, the parameter set from which the reference quantization matrix ID is decoded may be an adaptive parameter set.
此外,如同表格39的示例中那样,解码器可从参数集解码scaling_list_pred_matrix_id_delta(即,要解码的量化矩阵的参考量化矩阵ID)。这里,能通过使用scaling_list_pred_matrix_id_delta和等式32,来确定指示要解码的量化矩阵的参考量化矩阵的RefMatrixID。In addition, as in the example of Table 39, the decoder can decode scaling_list_pred_matrix_id_delta (ie, the reference quantization matrix ID of the quantization matrix to be decoded) from the parameter set. Here, RefMatrixID indicating the reference quantization matrix of the quantization matrix to be decoded can be determined by using scaling_list_pred_matrix_id_delta and Equation 32.
<等式32><Equation 32>
RefMatrixID=matrixID-(1+scaling_list_pred_matrix_id_delta)RefMatrixID=matrixID-(1+scaling_list_pred_matrix_id_delta)
解码器能确定与RefMatrixID对应的量化矩阵作为要解码的量化矩阵的参考量化矩阵,并确定要解码的量化矩阵的系数值,使得它们与参考量化矩阵的系数值具有相同值。确定要解码的量化矩阵的系数值使得它们与参考量化矩阵的系数值具有相同值可意味着,使用这样的量化矩阵预测方法,其将与RefMatrixID对应的参考量化矩阵确定为要解码的量化矩阵的参考量化矩阵,并将参考量化矩阵的系数值拷贝到要解码的量化矩阵的系数值。这里,scaling_list_pred_matrix_id_delta的值可以是正整数值。The decoder can determine the quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded, and determine the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix. Determining the coefficient values of the quantization matrix to be decoded so that they have the same values as the coefficient values of the reference quantization matrix may mean using a quantization matrix prediction method that determines the reference quantization matrix corresponding to RefMatrixID as the reference quantization matrix of the quantization matrix to be decoded and copies the coefficient values of the reference quantization matrix to the coefficient values of the quantization matrix to be decoded. Here, the value of scaling_list_pred_matrix_id_delta can be a positive integer value.
如果用于预测和解码所解码的量化矩阵的方法是通过扫描根据指数哥伦布编码和逆DPCM方法来解码量化矩阵以便预测和解码量化矩阵中的系数的方法,则解码器能从参数集解码量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值。这里,从其解码差值的参数集可以是自适应参数集。If the method for predicting and decoding the decoded quantization matrix is a method for predicting and decoding the coefficients in the quantization matrix by scanning the quantization matrix according to the Exponential Golomb coding and inverse DPCM method, then the decoder can decode the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded in the quantization matrix from the parameter set. Here, the parameter set from which the difference is decoded may be an adaptive parameter set.
如同表格40的示例中那样,解码器能从参数集解码scaling_list_delta_coef(即,量化矩阵中已先前解码的量化矩阵的系数值和要解码的量化矩阵的系数值之间的差值)。这里,解码器可将第一系数值的预测值设置为16,如同nextCoef=16中那样。As in the example of Table 40, the decoder can decode scaling_list_delta_coef (i.e., the difference between the coefficient values of the previously decoded quantization matrix and the coefficient values of the quantization matrix to be decoded) from the parameter set. Here, the decoder can set the predicted value of the first coefficient value to 16, as in nextCoef=16.
此外,如同表格40的示例中那样,如果要解码的量化矩阵的尺寸是16x16(sizeID=2)或32x32(sizeID=3),则解码器能从参数集解码scaling_list_dc_coef_minus16(即,与DC矩阵系数对应的量化矩阵的系数值)。scaling_list_dc_coef_minus16的值意味着在假设预测值为16的情况下计算的DC矩阵系数。In addition, as in the example of Table 40, if the size of the quantization matrix to be decoded is 16x16 (sizeID=2) or 32x32 (sizeID=3), the decoder can decode scaling_list_dc_coef_minus16 (i.e., the coefficient value of the quantization matrix corresponding to the DC matrix coefficient) from the parameter set. The value of scaling_list_dc_coef_minus16 means the DC matrix coefficient calculated assuming that the prediction value is 16.
此外,解码器能通过使用用来计算scaling_list_dc_coef_minus16或nextCoef的scaling_list_delta_coef来确定是否已使用缺省矩阵。例如,如果将scaling_list_dc_coef_minus16的值解码为-16,则对应量化矩阵能被确定为缺省矩阵。如果通过解码scaling_list_delta_coef而计算的第一nextCoef值为0,则对应量化矩阵能被确定为缺省矩阵。In addition, the decoder can determine whether the default matrix is used by using scaling_list_delta_coef used to calculate scaling_list_dc_coef_minus16 or nextCoef. For example, if the value of scaling_list_dc_coef_minus16 is decoded as -16, the corresponding quantization matrix can be determined as the default matrix. If the first nextCoef value calculated by decoding scaling_list_delta_coef is 0, the corresponding quantization matrix can be determined as the default matrix.
在这些表格的示例以及表格39和40的示例中,nextCoef能被设置为16并且scaling_list_dc_coef_minus16的值能意味着在假设预测值为16的情况下计算的DC矩阵系数。如果将scaling_list_dc_coef_minus16的值解码为-16,则解码器能将对应量化矩阵能确定为缺省矩阵。In the examples of these tables and the examples of Tables 39 and 40, nextCoef can be set to 16 and the value of scaling_list_dc_coef_minus16 can mean the DC matrix coefficient calculated assuming that the prediction value is 16. If the value of scaling_list_dc_coef_minus16 is decoded as -16, the decoder can determine the corresponding quantization matrix as the default matrix.
迄今已参考表格和图描述了根据本发明的关于量化矩阵的信息的编码/解码和传送/接收的实施例。The embodiments of encoding/decoding and transmission/reception of information on a quantization matrix according to the present invention have been described so far with reference to tables and drawings.
在表格18和19的示例、表格20和21的示例、表格23和24的示例、表格25和26的示例、表格27和28的示例、表格29和30的示例、表格31和32的示例、表格33和34的示例、表格36和38的示例、表格37和38的示例、以及表格39和40的示例中,已参考两个表格描述了根据本发明的语法结构的示例,但是这仅是为了便于描述,并且本发明不限于这些示例。In the examples of Tables 18 and 19, the examples of Tables 20 and 21, the examples of Tables 23 and 24, the examples of Tables 25 and 26, the examples of Tables 27 and 28, the examples of Tables 29 and 30, the examples of Tables 31 and 32, the examples of Tables 33 and 34, the examples of Tables 36 and 38, the examples of Tables 37 and 38, and the examples of Tables 39 and 40, examples of the grammatical structure according to the present invention have been described with reference to two tables, but this is only for convenience of description, and the present invention is not limited to these examples.
例如,在语法结构的示例中,图示了scaling_list_pred_mode_flag以指示预测量化矩阵的方法。当scaling_list_pred_mode_flag的值为0时,通过矩阵拷贝获得量化矩阵,并且当scaling_list_pred_mode_flag的值为1时,通过从量化矩阵内的先前矩阵系数预测矩阵系数来获得量化矩阵For example, in the example of the syntax structure, scaling_list_pred_mode_flag is illustrated to indicate a method of predicting a quantization matrix. When the value of scaling_list_pred_mode_flag is 0, the quantization matrix is obtained by matrix copying, and when the value of scaling_list_pred_mode_flag is 1, the quantization matrix is obtained by predicting the matrix coefficients from the previous matrix coefficients within the quantization matrix.
例如,在表格23和24的示例中,当scaling_list_pred_mode_flag的值为1时,通过取得量化矩阵的语法(即,缩放列表“scaling_list”的语法)来获得量化矩阵,但这可在单一语法结构中解决。应注意的是,使用具有相同含义的一个语法结构来构造两个或多个语法结构不改变本发明的内容,但是落入本发明的范围中。For example, in the examples of Tables 23 and 24, when the value of scaling_list_pred_mode_flag is 1, the quantization matrix is obtained by obtaining the syntax of the quantization matrix (that is, the syntax of the scaling list "scaling_list"). However, this can be solved in a single syntax structure. It should be noted that constructing two or more syntax structures using one syntax structure having the same meaning does not change the content of the present invention, but falls within the scope of the present invention.
表格41示出了其中将表格23和24的两个语法结构形成为一个语法结构的示例。和表格23和24的示例中类似,编码器能将关于表格41的量化矩阵的信息编码为包括序列参数集和画面参数集中的至少一个的参数集,并且解码器能从包括序列参数集和画面参数集中的至少一个的参数集解码表格41的关于量化矩阵的信息。Table 41 shows an example in which two syntax structures of Tables 23 and 24 are formed into one syntax structure. Similar to the examples of Tables 23 and 24, the encoder can encode information about the quantization matrix of Table 41 as a parameter set including at least one of a sequence parameter set and a picture parameter set, and the decoder can decode information about the quantization matrix of Table 41 from the parameter set including at least one of a sequence parameter set and a picture parameter set.
<表格41><Form 41>
如上所述,表格23和24的示例与表格41的示例相同,除了语法结构的数目是两个或一个。As described above, the examples of Tables 23 and 24 are the same as the example of Table 41 except that the number of grammatical structures is two or one.
如同表格41的示例中那样,编码器能通过scaling_list_pred_mode_flag指示矩阵的预测模式。例如,当执行量化矩阵之间的拷贝时,将scaling_list_pred_mode_flag的值确定为0并编码。当在量化矩阵中预测和编码矩阵的系数时,将scaling_list_pred_mode_flag的值确定为1并编码。如上所述,量化矩阵的拷贝意味着将缺省量化矩阵用作要编码的量化矩阵或者将参考量化矩阵用作要编码的量化矩阵。如上所述,预测矩阵的系数的方法意味着预测和编码量化矩阵中的系数的方法。As in the example of Table 41, the encoder can indicate the prediction mode of the matrix through scaling_list_pred_mode_flag. For example, when copying between quantization matrices, the value of scaling_list_pred_mode_flag is determined to be 0 and encoded. When the coefficients of the matrix are predicted and encoded in the quantization matrix, the value of scaling_list_pred_mode_flag is determined to be 1 and encoded. As described above, copying the quantization matrix means using the default quantization matrix as the quantization matrix to be encoded or using the reference quantization matrix as the quantization matrix to be encoded. As described above, the method of predicting the coefficients of the matrix means the method of predicting and encoding the coefficients in the quantization matrix.
如果执行量化矩阵的拷贝(scaling_list_pred_mode_flag==0),则传送scaling_list_pred_matrix_id_delta。如上所述,scaling_list_pred_matrix_id_delta指定用来导出当前编码的量化矩阵的参考量化矩阵或缺省量化矩阵。If copying of the quantization matrix is performed (scaling_list_pred_mode_flag==0), scaling_list_pred_matrix_id_delta is transmitted. As described above, scaling_list_pred_matrix_id_delta specifies a reference quantization matrix or a default quantization matrix used to derive the currently encoded quantization matrix.
例如,如果将要编码的量化矩阵确定为缺省量化矩阵,则能将scaling_list_pred_matrix_id_delta的值确定为0并编码。即,这对应于其中从缺省量化矩阵之中推断要当前编码的量化矩阵的情况。缺省量化矩阵能由表格7和8指定。For example, if the quantization matrix to be encoded is determined to be the default quantization matrix, the value of scaling_list_pred_matrix_id_delta can be determined to be 0 and encoded. In other words, this corresponds to the case where the quantization matrix to be currently encoded is inferred from the default quantization matrix. The default quantization matrix can be specified by Tables 7 and 8.
如果从参考量化矩阵确定要当前编码的量化矩阵,则能将scaling_list_pred_matrix_id_delta的值确定为非0的值并编码。即,这对应于其中如同等式33中那样从参考量化矩阵确定要当前编码的量化矩阵(即,ScalingList)的情况。If the quantization matrix to be currently encoded is determined from the reference quantization matrix, the value of scaling_list_pred_matrix_id_delta can be determined to a value other than 0 and encoded. That is, this corresponds to the case where the quantization matrix to be currently encoded (i.e., ScalingList) is determined from the reference quantization matrix as in Equation 33.
<等式33><Equation 33>
RefMatrixID=matrixID-scaling_list_pred_matrix_id_delta[sizeID][matrixID]RefMatrixID=matrixID-scaling_list_pred_matrix_id_delta[sizeID][matrixID]
ScalingList[sizeID][matrixID][i]=ScalingList[sizeID][RefMatrixId][i]ScalingList[sizeID][matrixID][i]=ScalingList[sizeID][RefMatrixId][i]
在等式33中,scaling_list_pred_matrix_id_delta的值通过sizeID和matrixID指定,并且索引“i”指定量化矩阵内的系数的位置。In Equation 33, the value of scaling_list_pred_matrix_id_delta is specified by sizeID and matrixID, and the index 'i' specifies the position of the coefficient within the quantization matrix.
如果在量化矩阵内执行预测和编码(scaling_list_pred_mode_flag==1),则能编码用于具有4x4尺寸的量化矩阵的矩阵系数、用于具有8x8尺寸的量化矩阵的矩阵系数、包括DC矩阵系数的用于具有16x16尺寸的量化矩阵的矩阵系数、和包括DC矩阵系数的用于具有32x32尺寸的量化矩阵的矩阵系数。这里,能使用coefNum=Min(64,(1<<(4+(sizeId<<1))))来计算编码的矩阵系数的总数。此外,16x16尺寸量化矩阵和32x32尺寸量化矩阵中的每一个能被下采样为8x8尺寸量化矩阵并编码。If prediction and encoding are performed within the quantization matrix (scaling_list_pred_mode_flag == 1), matrix coefficients for a 4x4 quantization matrix, matrix coefficients for an 8x8 quantization matrix, matrix coefficients for a 16x16 quantization matrix including a DC matrix coefficient, and matrix coefficients for a 32x32 quantization matrix including a DC matrix coefficient can be encoded. Here, the total number of matrix coefficients to be encoded can be calculated using coefNum=Min(64,(1<<(4+(sizeId<<1)))). In addition, each of the 16x16 quantization matrix and the 32x32 quantization matrix can be downsampled to an 8x8 quantization matrix and encoded.
解码器能从比特流解码表格41的语法元素,对解码的语法元素执行反量化,并使用这些结果重构图像。The decoder can decode the syntax elements of table 41 from the bitstream, perform inverse quantization on the decoded syntax elements, and reconstruct the image using these results.
如同表格41的示例中那样,解码器能确定接收的scaling_list_pred_mode_flag所指示的矩阵的预测模式。例如,当scaling_list_pred_mode_flag的值为0时,解码器能执行量化矩阵之间的拷贝。当scaling_list_pred_mode_flag的值为1时,解码器能预测量化矩阵中的矩阵系数。因此,解码器能获得要在反量化中使用的(逆)量化矩阵。应注意的是,在该说明书中,在量化的情况下应用的要编码的量化矩阵和在反量化的情况下应用的要解码的量化矩阵两者被称为量化矩阵,但是这仅是为了便于描述。应用于量化的矩阵和应用于反量化的矩阵能具有逆关系,并且反量化中使用的量化矩阵可被称为缩放列表。As in the example of Table 41, the decoder can determine the prediction mode of the matrix indicated by the received scaling_list_pred_mode_flag. For example, when the value of scaling_list_pred_mode_flag is 0, the decoder can perform a copy between quantization matrices. When the value of scaling_list_pred_mode_flag is 1, the decoder can predict the matrix coefficients in the quantization matrix. Therefore, the decoder can obtain the (inverse) quantization matrix to be used in inverse quantization. It should be noted that in this specification, the quantization matrix to be encoded applied in the case of quantization and the quantization matrix to be decoded applied in the case of inverse quantization are both referred to as quantization matrices, but this is only for ease of description. The matrix applied to quantization and the matrix applied to inverse quantization can have an inverse relationship, and the quantization matrix used in inverse quantization can be referred to as a scaling list.
如上所述,量化矩阵的拷贝意味着将缺省量化矩阵确定为要解码的量化矩阵或者将参考量化矩阵确定为要解码的量化矩阵。如上所述,预测矩阵的系数的方法意味着预测和解码量化矩阵中的系数的方法。As described above, the copy of the quantization matrix means determining a default quantization matrix as the quantization matrix to be decoded or determining a reference quantization matrix as the quantization matrix to be decoded. As described above, the method of predicting coefficients of a matrix means a method of predicting and decoding coefficients in a quantization matrix.
如果执行量化矩阵的拷贝(scaling_list_pred_mode_flag==0),则解码器指定用来导出要当前解码的量化矩阵的参考量化矩阵或缺省量化矩阵。If copying of the quantization matrix is performed (scaling_list_pred_mode_flag==0), the decoder specifies a reference quantization matrix or a default quantization matrix used to derive a quantization matrix to be currently decoded.
例如,当scaling_list_pred_matrix_id_delta的值为0时,解码器能将要解码的量化矩阵确定为缺省量化矩阵。即,能从缺省量化矩阵之中推断要当前解码的量化矩阵。缺省量化矩阵能由表格7和8指定。For example, when the value of scaling_list_pred_matrix_id_delta is 0, the decoder can determine the quantization matrix to be decoded as the default quantization matrix. That is, the quantization matrix to be currently decoded can be inferred from the default quantization matrix. The default quantization matrix can be specified by Tables 7 and 8.
当scaling_list_pred_matrix_id_delta的值是非0时,解码器能从参考量化矩阵确定要当前解码的量化矩阵。即,能如同等式34那样从参考量化矩阵确定要当前解码的量化矩阵,即,ScalingList。When the value of scaling_list_pred_matrix_id_delta is non-zero, the decoder can determine the quantization matrix to be currently decoded from the reference quantization matrix. That is, the quantization matrix to be currently decoded, ie, ScalingList, can be determined from the reference quantization matrix as in Equation 34.
<等式34><Equation 34>
RefMatrixID=matrixID-scaling_list_pred_matrix_id_delta[sizeID][matrixID]RefMatrixID=matrixID-scaling_list_pred_matrix_id_delta[sizeID][matrixID]
ScalingList[sizeID][matrixID][i]=ScalingList[sizeID][RefMatrixId][i]ScalingList[sizeID][matrixID][i]=ScalingList[sizeID][RefMatrixId][i]
在等式34中,scaling_list_pred_matrix_id_delta的值由sizeID和matrixID指定,并且索引“i”指定量化矩阵内的系数的位置。In Equation 34, the value of scaling_list_pred_matrix_id_delta is specified by sizeID and matrixID, and the index 'i' specifies the position of the coefficient within the quantization matrix.
如果执行量化矩阵内的预测和解码(scaling_list_pred_mode_flag==1),则解码器能解码用于具有4x4尺寸的量化矩阵的矩阵系数、用于具有8x8尺寸的量化矩阵的矩阵系数、包括DC矩阵系数的用于具有16x16尺寸的量化矩阵的矩阵系数、和包括DC矩阵系数的用于具有32x32尺寸的量化矩阵的矩阵系数。这里,能使用coefNum=Min(64,(1<<(4+(sizeId<<1))))来计算解码的矩阵系数的总数。这里,由于当编码16x16尺寸量化矩阵和32x32尺寸量化矩阵时、16x16尺寸量化矩阵和32x32尺寸量化矩阵的每一个被下采样为8x8尺寸量化矩阵,所以通过上采样或内插8x8尺寸量化矩阵、能将8x8尺寸量化矩阵恢复为16x16尺寸量化矩阵和32x32尺寸量化矩阵。此外,如果使用上采样或内插,则DC矩阵系数不使用内插值,而是能用从附加用信号传送的值导出的值(诸如,scaling_list_dc_coef_minus8)来替代。If prediction and decoding within the quantization matrix are performed (scaling_list_pred_mode_flag == 1), the decoder can decode matrix coefficients for a 4x4 quantization matrix, matrix coefficients for an 8x8 quantization matrix, matrix coefficients for a 16x16 quantization matrix including a DC matrix coefficient, and matrix coefficients for a 32x32 quantization matrix including a DC matrix coefficient. Here, the total number of decoded matrix coefficients can be calculated using coefNum=Min(64,(1<<(4+(sizeId<<1)))). Here, since each of the 16x16 quantization matrix and the 32x32 quantization matrix is downsampled to an 8x8 quantization matrix when encoding, the 8x8 quantization matrix can be restored to a 16x16 quantization matrix and a 32x32 quantization matrix by upsampling or interpolating the 8x8 quantization matrix. Furthermore, if upsampling or interpolation is used, the DC matrix coefficients do not use interpolated values, but can be replaced with values derived from additional signaled values (such as scaling_list_dc_coef_minus8).
迄今已参考表格描述了语法结构的实施例以及使用语法结构编码和解码的示例。在前述示例中,已使用语法结构描述了编码的示例和解码的示例,但是本发明不限于此。例如,可仅在编码或解码中使用语法结构的表格。The embodiments of the syntax structure and examples of encoding and decoding using the syntax structure have been described so far with reference to tables. In the aforementioned examples, examples of encoding and decoding have been described using the syntax structure, but the present invention is not limited thereto. For example, only the syntax structure table may be used in encoding or decoding.
图6是示意性图示了根据本发明的执行反量化的方法的示例的流程图。FIG6 is a flowchart schematically illustrating an example of a method of performing inverse quantization according to the present invention.
参考图6,解码器能在步骤S610获得指示在参数集中是否存在量化矩阵的标识符。指示在参数集中是否存在量化矩阵的信息在前述表格的示例中可以是scaling_list_present_flag。6 , the decoder can obtain an identifier indicating whether a quantization matrix exists in a parameter set at step S610. The information indicating whether a quantization matrix exists in a parameter set may be scaling_list_present_flag in the example of the aforementioned table.
这里,参数集中量化矩阵的存在包括关于在参数集中存在量化矩阵的信息(例如,scaling_list_pred_mode_flag、scaling_list_pred_matrix_id_delta、scaling_list_dc_coef_minus8、和scaling_list_delta_coef)。此外,在获得指示是否存在量化矩阵的标识符之前,能获得scaling_list_enable_flag(即,指示是否使用量化矩阵的标识符)。如果通过获得scaling_list_enable_flag来使用量化矩阵,则能获得指示是否存在量化矩阵的标识符。Here, the presence of the quantization matrix in the parameter set includes information about the presence of the quantization matrix in the parameter set (e.g., scaling_list_pred_mode_flag, scaling_list_pred_matrix_id_delta, scaling_list_dc_coef_minus8, and scaling_list_delta_coef). In addition, before obtaining the identifier indicating whether the quantization matrix exists, scaling_list_enable_flag (i.e., an identifier indicating whether the quantization matrix is used) can be obtained. If the quantization matrix is used by obtaining scaling_list_enable_flag, an identifier indicating whether the quantization matrix exists can be obtained.
这里,参数集可以是通过其传送关于量化矩阵的信息的序列参数集或画面参数集。Here, the parameter set may be a sequence parameter set or a picture parameter set through which information on a quantization matrix is transmitted.
解码器能在步骤S620基于标识符来确定参数集中是否存在量化矩阵。例如,当scaling_list_present_flag的值为1时,解码器能确定参数集中存在量化矩阵。当scaling_list_present_flag的值为0时,解码器能确定参数集中不存在量化矩阵。The decoder can determine whether the quantization matrix exists in the parameter set based on the identifier in step S620. For example, when the value of scaling_list_present_flag is 1, the decoder can determine that the quantization matrix exists in the parameter set. When the value of scaling_list_present_flag is 0, the decoder can determine that the quantization matrix does not exist in the parameter set.
如果作为确定的结果在参数集中不存在量化矩阵(即,如果确定在参数集中不存在量化矩阵),则解码器在步骤S630可以不使用反量化中的量化矩阵、可以使用反量化中具有相同矩阵系数16的量化矩阵(即,扁平矩阵)、或者可以确定所有量化矩阵作为反量化中的缺省量化矩阵。If the quantization matrix does not exist in the parameter set as a result of the determination (i.e., if it is determined that the quantization matrix does not exist in the parameter set), the decoder may not use the quantization matrix in inverse quantization in step S630, may use a quantization matrix with the same matrix coefficient 16 in inverse quantization (i.e., a flat matrix), or may determine all quantization matrices as default quantization matrices in inverse quantization.
如果作为确定的结果在参数集中存在量化矩阵(即,如果确定在参数集中存在量化矩阵),则解码器可以在步骤S640根据每一量化矩阵的尺寸或缺省量化矩阵的类型,来获得关于量化矩阵的信息。这里,量化矩阵的类型可包括用于帧内残差块的变换系数的反量化的量化矩阵、用于帧间残差块的变换系数的反量化的量化矩阵、用于亮度残差块的变换系数的反量化的量化矩阵、以及用于色度残差块的变换系数的反量化的量化矩阵中的至少一个、或其组合。If the quantization matrix exists in the parameter set as a result of the determination (i.e., if it is determined that the quantization matrix exists in the parameter set), the decoder may obtain information about the quantization matrix according to the size of each quantization matrix or the type of the default quantization matrix in step S640. Here, the type of the quantization matrix may include at least one of a quantization matrix for inverse quantization of a transform coefficient of an intra residual block, a quantization matrix for inverse quantization of a transform coefficient of an inter residual block, a quantization matrix for inverse quantization of a transform coefficient of a luma residual block, and a quantization matrix for inverse quantization of a transform coefficient of a chroma residual block, or a combination thereof.
解码器可在步骤S650通过使用获得的量化矩阵来执行反量化。如果在参数集中不存在量化矩阵,则解码器能不使用步骤S630所确定的量化矩阵来执行反量化,或者能执行反量化,使得在反量化中执行具有相同矩阵系数16的量化矩阵(即,扁平矩阵),或者使用所有量化矩阵作为反量化中的缺省量化矩阵。上面已结合前述实施例描述了量化矩阵的系数的预测和缺省量化矩阵的使用。如果在参数集中存在量化矩阵,则解码器能获得对应量化矩阵,并在反量化中使用获得的量化矩阵。解码器能基于上面参考图2描述的逆量化的信号来重构图像。The decoder can perform inverse quantization in step S650 by using the obtained quantization matrix. If the quantization matrix does not exist in the parameter set, the decoder can perform inverse quantization without using the quantization matrix determined in step S630, or can perform inverse quantization so that a quantization matrix with the same matrix coefficient of 16 (i.e., a flat matrix) is performed in the inverse quantization, or all quantization matrices are used as default quantization matrices in the inverse quantization. The prediction of the coefficients of the quantization matrix and the use of the default quantization matrix have been described above in conjunction with the aforementioned embodiments. If the quantization matrix exists in the parameter set, the decoder can obtain the corresponding quantization matrix and use the obtained quantization matrix in the inverse quantization. The decoder can reconstruct the image based on the inverse quantized signal described above with reference to FIG2.
其间,在图6中,已图示了其中编码器传送指示是否存在量化矩阵的标识符的示例,但是这仅是本发明的示例。如上所述,如果传送关于量化矩阵的信息,则可以不附加传送指示是否存在量化矩阵的信息。6, an example in which the encoder transmits an identifier indicating whether a quantization matrix exists is illustrated, but this is merely an example of the present invention. As described above, if information about the quantization matrix is transmitted, information indicating whether a quantization matrix exists may not be transmitted in addition.
图7是示意性图示了当在参数集中存在量化矩阵时获得关于量化矩阵的信息、并通过使用该信息执行反量化的方法的示例的图。图7的方法可对应于(1)包括图6的步骤S640和S650的方法,以及(2)获得量化矩阵并使用获得的量化矩阵执行反量化的方法,尽管不传送指示是否存在量化矩阵的附加指示符,但是在参数集中存在量化矩阵,并且编码器传送关于量化矩阵的信息。方法(1)与方法(2)相同,除了是否通过附加标识符传送关于是否存在量化矩阵的信息。在图7中,解码器能从包括序列参数集和画面参数集的至少一个的参数集解码关于量化矩阵的信息。7 is a diagram schematically illustrating an example of a method of obtaining information about a quantization matrix when a quantization matrix exists in a parameter set, and performing inverse quantization by using the information. The method of FIG7 may correspond to (1) a method including steps S640 and S650 of FIG6 , and (2) a method of obtaining a quantization matrix and performing inverse quantization using the obtained quantization matrix, although an additional indicator indicating whether a quantization matrix exists is not transmitted, a quantization matrix exists in a parameter set, and the encoder transmits information about the quantization matrix. Method (1) is the same as method (2) except whether information about whether a quantization matrix exists is transmitted through an additional identifier. In FIG7 , the decoder can decode information about the quantization matrix from a parameter set including at least one of a sequence parameter set and a picture parameter set.
在图7的示例中,为了降低当编码/解码量化矩阵时的复杂程度,如果用于预测要解码的量化矩阵的参考量化矩阵的ID值与要解码的量化矩阵的ID值相同,则解码器不解码要解码的量化矩阵,而是能使用当执行反量化时已在解码器中包括的量化矩阵。这里,已在解码器中包括的量化矩阵可以是缺省量化矩阵。In the example of FIG7, in order to reduce the complexity when encoding/decoding the quantization matrix, if the ID value of the reference quantization matrix used to predict the quantization matrix to be decoded is the same as the ID value of the quantization matrix to be decoded, the decoder does not decode the quantization matrix to be decoded, but can use the quantization matrix already included in the decoder when performing inverse quantization. Here, the quantization matrix already included in the decoder may be a default quantization matrix.
更具体地,参考图7,如果在参数集中存在量化矩阵,则解码器能在步骤S710确定用于预测量化矩阵的方法。参数集中量化矩阵的存在包括参数集中关于量化矩阵的信息(例如,scaling_list_pred_mode_flag、scaling_list_pred_matrix_id_delta、scaling_list_dc_coef_minus8、和scaling_list_delta_coef)的存在。More specifically, referring to Figure 7, if the quantization matrix exists in the parameter set, the decoder can determine the method for predicting the quantization matrix in step S710. The presence of the quantization matrix in the parameter set includes the presence of information about the quantization matrix in the parameter set (e.g., scaling_list_pred_mode_flag, scaling_list_pred_matrix_id_delta, scaling_list_dc_coef_minus8, and scaling_list_delta_coef).
参考前述示例,能基于从编码器接收的语法元素“pred_mode_flag”的值,来确定用于预测量化矩阵的方法。为了阐明该预测方法用于该量化矩阵,pred_mode_flag可被表示为前述示例中的scaling_list_pred_mode_flag等。由pred_mode_flag指示的用于预测量化矩阵的方法可以是以下任何一个(1)没有改变地使用解码器中已包括的量化矩阵的方法和(2)接收量化矩阵的值并执行量化矩阵中量化矩阵的系数值之间的逆DPCM的方法。Referring to the aforementioned example, a method for predicting a quantization matrix can be determined based on the value of the syntax element "pred_mode_flag" received from the encoder. To clarify that the prediction method is used for the quantization matrix, pred_mode_flag may be represented as scaling_list_pred_mode_flag in the aforementioned example, etc. The method for predicting the quantization matrix indicated by pred_mode_flag may be any of the following: (1) a method of using a quantization matrix already included in the decoder without change and (2) a method of receiving a value of a quantization matrix and performing inverse DPCM between coefficient values of the quantization matrix in the quantization matrix.
例如,当pred_mode_flag的值为0时,解码器能使用其中已包括的量化矩阵(即,已解码的量化矩阵(或参考矩阵)或缺省矩阵)。当pred_mode_flag的值为1时,解码器能基于接收的信息来预测和解码量化矩阵中的系数。For example, when the value of pred_mode_flag is 0, the decoder can use the quantization matrix included therein (i.e., the decoded quantization matrix (or reference matrix) or the default matrix). When the value of pred_mode_flag is 1, the decoder can predict and decode the coefficients in the quantization matrix based on the received information.
如果用于预测量化矩阵的方法是没有改变地使用解码器中已包括的量化矩阵的方法,则解码器能在步骤S720获得关于量化矩阵的ID信息。量化矩阵的ID信息是关于能标识解码器中已包括的量化矩阵的信息,并且ID信息能对应于已在前述示例中描述的scaling_list_pred_matrix_id_delta、pred_matrix_id_delta等。If the method for predicting the quantization matrix is a method of using the quantization matrix already included in the decoder without change, the decoder can obtain ID information about the quantization matrix in step S720. The ID information of the quantization matrix is information about the quantization matrix already included in the decoder, and the ID information can correspond to scaling_list_pred_matrix_id_delta, pred_matrix_id_delta, etc. described in the above example.
解码器能在步骤S730确定该ID信息所指定的量化矩阵是否与要当前解码的量化矩阵相同。pred_matrix_id_delta指定用来导出量化矩阵的参考量化矩阵。为了阐明pred_matrix_id_delta是用于量化矩阵的,pred_matrix_id_delta可如同前述示例中那样被表示为scaling_list_pred_matrix_id_delta。The decoder can determine in step S730 whether the quantization matrix specified by the ID information is the same as the quantization matrix to be currently decoded. pred_matrix_id_delta specifies the reference quantization matrix used to derive the quantization matrix. To clarify that pred_matrix_id_delta is for the quantization matrix, pred_matrix_id_delta can be expressed as scaling_list_pred_matrix_id_delta as in the above example.
当scaling_list_pred_matrix_id_delta的值为0时,解码器能使用关于量化矩阵的信息(SizeID和/或MatrixID)所指定的缺省量化矩阵作为要解码的量化矩阵。When the value of scaling_list_pred_matrix_id_delta is 0, the decoder can use the default quantization matrix specified by the information on the quantization matrix (SizeID and/or MatrixID) as the quantization matrix to be decoded.
当scaling_list_pred_matrix_id_delta的值为非0时,解码器能从已解码的参考量化矩阵导出要解码的量化矩阵,因为参考前述示例指定要解码的量化矩阵(或量化矩阵的类型)的matrixID和指定参考量化矩阵的RefMatrixID具有关系“scaling_list_pred_matrix_id_delta=matrixID-RefMatrixID”。When the value of scaling_list_pred_matrix_id_delta is non-zero, the decoder can derive the quantization matrix to be decoded from the decoded reference quantization matrix, because the matrixID specifying the quantization matrix to be decoded (or the type of quantization matrix) and the RefMatrixID specifying the reference quantization matrix have the relationship "scaling_list_pred_matrix_id_delta = matrixID - RefMatrixID" with reference to the aforementioned example.
如果作为步骤S730的确定结果、量化矩阵的ID信息所指定的量化矩阵被确定为不与要解码的量化矩阵相同(即,!scaling_list_pred_matrix_id_delta==0或matrixID!=RefMatrixID),则解码器能在步骤S740使用量化矩阵的ID信息来确定当执行反量化时将使用的量化矩阵。在该情况下,解码器能基于量化矩阵的ID信息“scaling_list_pred_matrix_id_delta”如同前述表格那样来确定当执行反量化时要使用的量化矩阵。If, as a result of the determination in step S730, the quantization matrix specified by the quantization matrix ID information is determined to be not the same as the quantization matrix to be decoded (i.e., !scaling_list_pred_matrix_id_delta == 0 or matrixID != RefMatrixID), the decoder can use the quantization matrix ID information to determine the quantization matrix to be used when performing inverse quantization in step S740. In this case, the decoder can determine the quantization matrix to be used when performing inverse quantization based on the quantization matrix ID information "scaling_list_pred_matrix_id_delta" as in the aforementioned table.
如果作为步骤S730的确定结果、量化矩阵的ID信息所指定的量化矩阵被确定为与要解码的量化矩阵相同(即,scaling_list_pred_matrix_id_delta==0或matrixID==RefMatrixID),则解码器能在步骤S750使用其中已包括的缺省量化矩阵。这里,能通过使用表格7和8来确定缺省量化矩阵。If, as a result of the determination in step S730, the quantization matrix specified by the quantization matrix ID information is determined to be the same as the quantization matrix to be decoded (i.e., scaling_list_pred_matrix_id_delta == 0 or matrixID == RefMatrixID), the decoder can use the default quantization matrix included therein in step S750. Here, the default quantization matrix can be determined by using Tables 7 and 8.
如果在步骤S710用于预测量化矩阵的方法是使用量化矩阵的系数值之间的逆DPCM方法的方法,则解码器能在步骤S760初始化量化矩阵的系数值。例如,解码器能通过将系数值设置为常数,来初始化量化矩阵的系数值“nextcoef”。当初始化系数值“nextcoef”时设置的常数可以是8和16中的任一个,如同前述表格的示例中那样。If the method used to predict the quantization matrix in step S710 is a method using an inverse DPCM method between the coefficient values of the quantization matrix, the decoder can initialize the coefficient values of the quantization matrix in step S760. For example, the decoder can initialize the coefficient value "nextcoef" of the quantization matrix by setting the coefficient value to a constant. The constant set when initializing the coefficient value "nextcoef" can be either 8 or 16, as in the example of the aforementioned table.
解码器能在步骤S770解码从编码器接收的量化矩阵中的系数之间的差值。量化矩阵中的系数之间的差值可以由诸如delta_coef的语法元素指定。为了阐明该语法元素是用于量化矩阵的,delta_coef可如同前述表格的示例中那样被称为scaling_list_delta_coef。The decoder can decode the differences between the coefficients in the quantization matrix received from the encoder at step S770. The differences between the coefficients in the quantization matrix can be specified by a syntax element such as delta_coef. To clarify that this syntax element is for the quantization matrix, delta_coef can be referred to as scaling_list_delta_coef as in the example of the previous table.
解码器能在步骤S780导出量化矩阵的系数值。解码器能通过向先前已解码的量化矩阵的系数值添加量化矩阵内系数之间的差值,来导出要解码的量化矩阵(即,当前量化矩阵)的系数值。例如,解码器能通过如同前述等式那样使用关系“nextcoef=(nextcoef=delta_coef+256)%256”来导出当前量化矩阵的系数值。The decoder can derive the coefficient values of the quantization matrix at step S780. The decoder can derive the coefficient values of the quantization matrix to be decoded (i.e., the current quantization matrix) by adding the difference between the coefficients in the quantization matrix to the coefficient values of the previously decoded quantization matrix. For example, the decoder can derive the coefficient values of the current quantization matrix by using the relationship "nextcoef = (nextcoef = delta_coef + 256) % 256" as in the aforementioned equation.
解码器能在步骤S790确定是否已导出量化矩阵。如果作为确定结果确定还没有导出量化矩阵(即,如果还没有解码量化矩阵内的所有系数值),则解码器返回到步骤S770并执行随后步骤。The decoder can determine whether the quantization matrix has been derived in step S790. If it is determined as a result of the determination that the quantization matrix has not been derived (ie, if all coefficient values within the quantization matrix have not been decoded), the decoder returns to step S770 and performs subsequent steps.
解码器能在步骤S650通过使用获得的量化矩阵来执行反量化。The decoder can perform inverse quantization by using the obtained quantization matrix at step S650.
其间,尽管在图7的示例中没有清楚描述,但是当导出量化矩阵的系数值时,可如同前述实施例中那样首先导出具有特定尺寸的量化矩阵的DC矩阵系数。Meanwhile, although not clearly described in the example of FIG. 7 , when deriving coefficient values of a quantization matrix, a DC matrix coefficient of a quantization matrix having a specific size may be first derived as in the aforementioned embodiment.
图8是示意性图示了当在参数集中存在量化矩阵时获得关于量化矩阵的信息并通过使用该信息来执行反量化的方法的另一示例的图。图8的方法可对应于(1)包括图6的步骤S640和S650的方法,以及(2)获得量化矩阵并使用获得的量化矩阵执行反量化的方法,尽管不传送指示是否存在量化矩阵的附加指示符,但是在参数集中存在量化矩阵,并且编码器传送关于量化矩阵的信息。方法(1)与方法(2)相同,除了是否通过附加标识符传送关于是否存在量化矩阵的信息。FIG8 is a diagram schematically illustrating another example of a method of obtaining information about a quantization matrix when a quantization matrix exists in a parameter set and performing inverse quantization by using the information. The method of FIG8 may correspond to (1) a method including steps S640 and S650 of FIG6 , and (2) a method of obtaining a quantization matrix and performing inverse quantization using the obtained quantization matrix, although an additional indicator indicating whether a quantization matrix exists is not transmitted, a quantization matrix exists in a parameter set, and the encoder transmits information about the quantization matrix. Method (1) is the same as method (2) except for whether information about whether a quantization matrix exists is transmitted by an additional identifier.
在图8的示例中,为了防止传送不必要的量化矩阵,如果要解码的量化矩阵的第一值是特定值,则解码器不解码要解码的量化矩阵,并且能使用当执行反量化时已在其中包括的缺省量化矩阵。In the example of FIG. 8 , in order to prevent transmission of unnecessary quantization matrices, if the first value of the quantization matrix to be decoded is a specific value, the decoder does not decode the quantization matrix to be decoded and can use a default quantization matrix already included therein when performing inverse quantization.
更具体地,参考图8,如果在参数集中存在量化矩阵,则解码器能在步骤S810确定用于预测量化矩阵的方法。参数集中量化矩阵的存在包括参数集中关于量化矩阵的信息的存在。8 , if a quantization matrix exists in a parameter set, the decoder can determine a method for predicting the quantization matrix in step S810. The existence of the quantization matrix in the parameter set includes the existence of information on the quantization matrix in the parameter set.
如果用于预测量化矩阵的方法是没有改变地使用解码器中已包括的量化矩阵的方法,则解码器能在步骤S820获得关于量化矩阵的ID信息。If the method for predicting the quantization matrix is a method of using the quantization matrix already included in the decoder without change, the decoder can obtain ID information on the quantization matrix in step S820.
量化矩阵的ID信息是关于能标识解码器中已包括的量化矩阵的信息,并且ID信息能对应于已在前述示例中描述的scaling_list_pred_matrix_id_delta、pred_matrix_id_delta等。The ID information of the quantization matrix is information about a quantization matrix that can be identified in the decoder, and the ID information can correspond to scaling_list_pred_matrix_id_delta, pred_matrix_id_delta, etc. that have been described in the aforementioned example.
解码器能在步骤S830通过使用量化矩阵的ID信息,来确定当执行反量化时要使用的量化矩阵。解码器能确定ID信息(诸如scaling_list_pred_matrix_id_delta或pred_matrix_id_delta)所指示的量化矩阵。The decoder can determine a quantization matrix to be used when performing inverse quantization by using the ID information of the quantization matrix in step S830. The decoder can determine a quantization matrix indicated by ID information such as scaling_list_pred_matrix_id_delta or pred_matrix_id_delta.
如果在步骤S810用于预测量化矩阵的方法是使用量化矩阵的系数值之间的逆DPCM方法的方法,则解码器能在步骤S840初始化量化矩阵的系数值。例如,解码器能通过将系数值设置为常数,来初始化量化矩阵的系数值“nextcoef”。当初始化系数值“nextcoef”时设置的常数可以是8和16中的任一个,如同前述表格的示例中那样。If the method used to predict the quantization matrix in step S810 is a method using an inverse DPCM method between the coefficient values of the quantization matrix, the decoder can initialize the coefficient values of the quantization matrix in step S840. For example, the decoder can initialize the coefficient value "nextcoef" of the quantization matrix by setting the coefficient value to a constant. The constant set when initializing the coefficient value "nextcoef" can be either 8 or 16, as in the example of the aforementioned table.
解码器能在步骤S850解码从编码器接收的量化矩阵中的系数之间的差值。量化矩阵中的系数之间的差值可以由诸如delta_coef的语法元素指定。The decoder can decode the difference between the coefficients in the quantization matrix received from the encoder at step S850. The difference between the coefficients in the quantization matrix can be specified by a syntax element such as delta_coef.
解码器能在步骤S860导出量化矩阵的系数值。解码器能通过向先前已解码的量化矩阵的系数值添加量化矩阵内系数之间的差值,来导出要解码的量化矩阵(即,当前量化矩阵)的系数值。例如,解码器能通过如同前述等式那样使用关系“nextcoef=(nextcoef=delta_coef+256)%256”,来导出当前量化矩阵的系数值。The decoder can derive the coefficient values of the quantization matrix at step S860. The decoder can derive the coefficient values of the quantization matrix to be decoded (i.e., the current quantization matrix) by adding the difference between the coefficients in the quantization matrix to the coefficient values of the previously decoded quantization matrix. For example, the decoder can derive the coefficient values of the current quantization matrix by using the relationship "nextcoef = (nextcoef = delta_coef + 256) % 256" as in the aforementioned equation.
解码器能在步骤S870确定导出的系数是否是量化矩阵的第一系数值或者导出的系数是否与特定值相同。这里,特定值可以是0。The decoder can determine whether the derived coefficient is the first coefficient value of the quantization matrix or whether the derived coefficient is the same as a specific value at step S870. Here, the specific value may be 0.
如果作为步骤S870的确定结果,导出的系数被确定为是量化矩阵的第一系数值并且与特定值相同,则解码器能在步骤S880确定在反量化中使用其中已包括的缺省量化矩阵。If, as a result of the determination in step S870, the derived coefficient is determined to be the first coefficient value of the quantization matrix and is identical to the specific value, the decoder can determine to use the default quantization matrix included therein in inverse quantization in step S880.
如果作为步骤S870的确定结果,导出的系数被确定为不是量化矩阵的第一系数值并且不与特定值相同,则解码器在步骤S890检查是否已解码了量化矩阵中的系数的所有差值。如果作为检查结果、并非所有差值被确定为已解码,则解码器能返回到步骤S850并执行随后步骤。If the derived coefficient is determined not to be the first coefficient value of the quantization matrix and is not the same as the specific value as a result of the determination in step S870, the decoder checks whether all the difference values of the coefficients in the quantization matrix have been decoded in step S890. If, as a result of the check, not all the difference values are determined to be decoded, the decoder can return to step S850 and perform the subsequent steps.
解码器能在步骤S650通过使用获得的量化矩阵来执行反量化。The decoder can perform inverse quantization by using the obtained quantization matrix at step S650.
在前述实施例中,关于量化矩阵的信息意味着量化矩阵或关于能导出量化矩阵的信息。这里,关于能导出量化矩阵的信息能意味着关于是否已使用缺省矩阵的信息、预测编码/解码方法的类型、参考量化矩阵ID、参考量化矩阵等。In the aforementioned embodiment, the information about the quantization matrix means the quantization matrix or the information about the quantization matrix that can be derived. Here, the information about the quantization matrix that can be derived can mean information about whether a default matrix has been used, the type of predictive encoding/decoding method, the reference quantization matrix ID, the reference quantization matrix, etc.
在以上示范系统中,尽管已基于具有一系列步骤或块的形式的流程图描述了这些方法,但是本发明不限于这些步骤的顺序,并且一些步骤可按照与其他步骤不同的顺序来执行或者可与其他步骤同时执行。此外,本领域技术人员将理解的是,流程图中示出的步骤不是排他性的,并且这些步骤可包括附加步骤,或者可删除流程图中的一个或多个步骤,而不影响本发明的范围。In the above exemplary systems, although the methods have been described based on flowcharts in the form of a series of steps or blocks, the present invention is not limited to the order of these steps, and some steps may be performed in a different order than other steps or may be performed simultaneously with other steps. In addition, it will be understood by those skilled in the art that the steps shown in the flowcharts are not exclusive, and the steps may include additional steps, or one or more steps in the flowcharts may be deleted without affecting the scope of the present invention.
Claims (6)
Applications Claiming Priority (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2012-0006564 | 2012-01-20 | ||
| KR10-2012-0011672 | 2012-02-06 | ||
| KR10-2012-0013462 | 2012-02-09 | ||
| KR10-2012-0013996 | 2012-02-10 | ||
| KR10-2012-0038971 | 2012-04-16 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40001158A HK40001158A (en) | 2020-02-21 |
| HK40001158B true HK40001158B (en) | 2021-12-10 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7735353B2 (en) | Video decoding method, video encoding method, and recording medium | |
| HK40001158B (en) | Video encoding and decoding apparatus using a quantization matrix | |
| HK40001159B (en) | Video encoding and decoding devices using quantization matrix | |
| HK40001161B (en) | Video encoding and decoding method using a quantization matrix | |
| HK40001160B (en) | Video encoding and decoding method using quantization matrix | |
| HK1262348B (en) | Video encoding and decoding method using a quantization matrix | |
| HK40001158A (en) | Video encoding and decoding apparatus using a quantization matrix | |
| HK40001159A (en) | Video encoding and decoding devices using quantization matrix | |
| HK40001161A (en) | Video encoding and decoding method using a quantization matrix | |
| HK40001160A (en) | Video encoding and decoding method using quantization matrix | |
| HK1262348A1 (en) | Video encoding and decoding method using a quantization matrix |