HK1215641B - Method and apparatus for image decoding - Google Patents
Method and apparatus for image decoding Download PDFInfo
- Publication number
- HK1215641B HK1215641B HK16103546.5A HK16103546A HK1215641B HK 1215641 B HK1215641 B HK 1215641B HK 16103546 A HK16103546 A HK 16103546A HK 1215641 B HK1215641 B HK 1215641B
- Authority
- HK
- Hong Kong
- Prior art keywords
- intra
- mode
- block
- prediction mode
- prediction
- Prior art date
Links
Description
本申请是申请号为201280047319.9、国际申请号为PCT/KR2012/003078、申请日为2012年4月20日、发明名称为“用于图像解码的方法和装置”的发明专利申请的分案申请。This application is a divisional application of the invention patent application with application number 201280047319.9, international application number PCT/KR2012/003078, application date April 20, 2012, and invention name “Method and device for image decoding”.
技术领域Technical Field
本发明涉及图像解码方法和图像解码装置,更具体地,涉及使用预测块的大小信息创建当前块的各子块的帧内预测块并创建重构块的方法和装置。The present invention relates to an image decoding method and an image decoding device, and more particularly, to a method and a device for creating an intra-frame prediction block of each sub-block of a current block and creating a reconstructed block using size information of a prediction block.
背景技术Background Art
图像数据必须被编码以有效地存储或发送图像数据。MPEG-1、MPEG-2、MPEG-4、H.264/MPEG-4AVC(高级视频编码)等被已知为对图像数据编码的技术。在这些技术中,画面被划分成宏块,按宏块为单位确定应该执行帧内编码或帧间编码中的哪一个,并且利用确定的编码方法对宏块编码。Image data must be encoded to efficiently store or transmit it. MPEG-1, MPEG-2, MPEG-4, H.264/MPEG-4 AVC (Advanced Video Coding), and the like are known as technologies for encoding image data. In these technologies, a picture is divided into macroblocks, and whether intra-frame coding or inter-frame coding should be performed is determined for each macroblock. The macroblocks are then encoded using the specified coding method.
在作为最新的图像压缩技术的H.264中,执行帧内预测以增强帧内编码的效率。即,代替参照参考画面对当前块编码,利用与将被编码的当前块空间相邻的像素值创建预测块。具体地,利用相邻像素值通过与原始宏块的比较来选择具有小的失真的帧内预测模式,并且利用选择的帧内预测模式和相邻像素值来创建将被编码的当前块的预测块。创建包括当前块和预测块之间的差信号(difference signal)的残差块,并且对残差块进行变换、量化和熵编码。还对用于创建预测块的帧内预测模式进行编码。In H.264, the latest image compression technology, intra-frame prediction is performed to enhance the efficiency of intra-frame coding. That is, instead of encoding the current block with reference to a reference picture, a prediction block is created using pixel values spatially adjacent to the current block to be encoded. Specifically, using the adjacent pixel values, an intra-frame prediction mode with minimal distortion is selected by comparison with the original macroblock. The selected intra-frame prediction mode and the adjacent pixel values are then used to create a prediction block for the current block to be encoded. A residual block is created, containing the difference signal between the current block and the prediction block, and the residual block is transformed, quantized, and entropy encoded. The intra-frame prediction mode used to create the prediction block is also encoded.
然而,在H.264中,不管当前块的左块和上块的帧内预测模式的方向性来对当前块的帧内预测模式进行编码,因此存在编码效率低的问题。当帧内预测模式的数量增加以增强残差块的编码效率时,需要一种具有比H.264的帧内预测模式编码方法的效率更高的效率的帧内预测编码方法。However, in H.264, the intra-frame prediction mode of the current block is encoded regardless of the directionality of the intra-frame prediction mode of the left block and the upper block of the current block, so there is a problem of low coding efficiency. When the number of intra-frame prediction modes increases to enhance the coding efficiency of the residual block, an intra-frame prediction coding method with higher efficiency than the intra-frame prediction mode coding method of H.264 is needed.
在H.264中,利用当前块的帧内预测模式仅创建一个具有等于当前块的大小的重构块。因此,在当前块的大小增加时,存在的问题是预测块和原始块之间的残差信号增加并且编码效率降低。因此,需要用于创建与原始块更类似的预测块的新的帧内预测编码/解码方法。In H.264, using the intra prediction mode of the current block only creates a reconstructed block of the same size as the current block. Therefore, as the size of the current block increases, there is a problem in that the residual signal between the predicted block and the original block increases and coding efficiency decreases. Therefore, a new intra prediction encoding/decoding method for creating a predicted block more similar to the original block is needed.
发明内容Summary of the Invention
技术问题Technical issues
本发明的一个目的在于提供一种能够通过利用当前块的左块和上块的帧内预测模式减少对当前块的帧内预测模式编码所需的比特数来增强图像的压缩效率的方法和装置。An object of the present invention is to provide a method and apparatus capable of enhancing image compression efficiency by reducing the number of bits required to encode the intra-frame prediction mode of the current block by utilizing the intra-frame prediction modes of the left block and the upper block of the current block.
本发明的另一个目的在于提供一种能够通过利用当前块的帧内预测模式创建与当前块更类似的预测块以减少用于对残差块编码所需的比特数来增强图像的压缩效率的方法和装置。Another object of the present invention is to provide a method and apparatus capable of enhancing image compression efficiency by creating a prediction block more similar to the current block using an intra prediction mode of the current block to reduce the number of bits required for encoding the residual block.
针对问题的方案Solutions to the problem
根据本发明的一方面,提供了一种图像解码方法,所述图像解码方法包括:重构当前块的帧内预测模式组指示符和预测模式索引;利用所述当前块的左块和上块的有效的帧内预测模式来构造第一组(MPM组);当所述帧内预测模式组指示符指示所述第一组时,将所述第一组中的与所述预测模式索引相对应的帧内预测模式确定为所述当前块的帧内预测模式,并且当所述帧内预测模式组指示符指示第二组时,确定第二组中的与所述预测模式索引相对应的帧内预测模式;以及创建预测块,其中,根据变换大小信息来确定所述预测块的大小。According to one aspect of the present invention, an image decoding method is provided, which includes: reconstructing an intra-frame prediction mode group indicator and a prediction mode index of a current block; constructing a first group (MPM group) using the valid intra-frame prediction modes of the left block and the upper block of the current block; when the intra-frame prediction mode group indicator indicates the first group, determining the intra-frame prediction mode corresponding to the prediction mode index in the first group as the intra-frame prediction mode of the current block, and when the intra-frame prediction mode group indicator indicates the second group, determining the intra-frame prediction mode corresponding to the prediction mode index in the second group; and creating a prediction block, wherein the size of the prediction block is determined according to transform size information.
在图像解码方法中,第一组可以包括三个帧内预测模式。当所述当前块的所述左块和所述上块的帧内预测模式中的仅一个有效时,可以将两个帧内预测模式添加到所述第一组。可以根据有效的帧内预测模式来确定添加的两个帧内预测模式。In the image decoding method, a first group may include three intra-frame prediction modes. When only one of the intra-frame prediction modes of the left block and the upper block of the current block is valid, two intra-frame prediction modes may be added to the first group. The two added intra-frame prediction modes may be determined based on the valid intra-frame prediction mode.
有益效果Beneficial effects
根据本发明的图像解码方法包括:重构当前块的帧内预测模式组指示符和预测模式索引;利用所述当前块的左块和上块的有效的帧内预测模式来构造第一组(MPM组);当所述帧内预测模式组指示符指示所述第一组时,将所述第一组中的与所述预测模式索引相对应的帧内预测模式确定为所述当前块的帧内预测模式,并且当所述帧内预测模式组指示符指示第二组时,确定第二组中的与所述预测模式索引相对应的帧内预测模式;以及创建预测块。根据变换大小信息来确定所述预测块的大小。The image decoding method according to the present invention includes: reconstructing an intra-frame prediction mode group indicator and a prediction mode index of a current block; constructing a first group (MPM group) using valid intra-frame prediction modes of a left block and an upper block of the current block; when the intra-frame prediction mode group indicator indicates the first group, determining the intra-frame prediction mode corresponding to the prediction mode index in the first group as the intra-frame prediction mode of the current block, and when the intra-frame prediction mode group indicator indicates the second group, determining the intra-frame prediction mode corresponding to the prediction mode index in the second group; and creating a prediction block. The size of the prediction block is determined according to transform size information.
因此,通过基于当前块的左块和上块的有效的帧内预测模式使第一组包括很大可能与当前块的预测模式相等的模式,并且利用第一组确定将被编码的帧内预测模式组指示符和预测模式索引,可以减小将被编码的帧内预测模式的信息量。通过创建与当前块类似的预测块,可以减少将被编码/解码的残差块的比特数,以增强编码和解码效率。Therefore, by making the first group include a mode that is highly likely to be equal to the prediction mode of the current block based on the valid intra prediction modes of the left block and the upper block of the current block, and determining the intra prediction mode group indicator and the prediction mode index to be encoded using the first group, the amount of information of the intra prediction mode to be encoded can be reduced. By creating a prediction block similar to the current block, the number of bits of the residual block to be encoded/decoded can be reduced, thereby enhancing encoding and decoding efficiency.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是示出根据本发明的一个实施方式的运动图像编码装置的框图。FIG. 1 is a block diagram illustrating a moving picture encoding apparatus according to an embodiment of the present invention.
图2是示出根据本发明的另一个实施方式的运动图像解码装置的框图。FIG. 2 is a block diagram illustrating a moving picture decoding apparatus according to another embodiment of the present invention.
图3是示出根据本发明的一个实施方式的在运动图像解码装置中创建帧内预测块的方法的示图。FIG. 3 is a diagram illustrating a method of creating an intra prediction block in a moving picture decoding apparatus according to one embodiment of the present invention.
图4是示出根据本发明的一个实施方式的帧内预测模式的概念示图。FIG. 4 is a conceptual diagram illustrating an intra prediction mode according to one embodiment of the present invention.
图5是示出根据本发明的一个实施方式的帧内预测块创建单元300的框图。FIG. 5 is a block diagram illustrating the intra prediction block creating unit 300 according to one embodiment of the present invention.
图6是示出根据本发明的一个实施方式重构块创建过程的示图。FIG6 is a diagram illustrating a reconstruction block creation process according to one embodiment of the present invention.
图7是示出根据本发明的另一个实施方式的重构块创建过程的示图。FIG. 7 is a diagram illustrating a reconstruction block creation process according to another embodiment of the present invention.
具体实施方式DETAILED DESCRIPTION
下面,将参照附图详细描述本发明的各种实施方式。本发明可以以各种形式被修改,并且可以具有各种实施方式。这些实施方式没有意图限制本发明,而应该被理解为本发明包括属于本发明的精神和技术范围的所有修改、等同形式和替换。在参照附图对本发明的描述中,用相同的编号表示相同的构成。Below, various embodiments of the present invention will be described in detail with reference to the accompanying drawings. The present invention may be modified in various forms and may have various embodiments. These embodiments are not intended to limit the present invention, but should be understood as including all modifications, equivalents, and alternatives that fall within the spirit and technical scope of the present invention. In the description of the present invention with reference to the accompanying drawings, the same reference numerals represent the same components.
根据本发明的运动图像编码装置和运动图像解码装置可以是诸如个人电脑、笔记本PC、个人数字助理、便携式多媒体播放器、智能电话、无线通信终端和TV的用户终端或提供服务的服务器。运动图像编码装置和运动图像解码装置可以是具有如下部件的设备:诸如用于与各种设备或者无线或有线通信网络通信的通信调制解调器的通信装置、存储用于对图像编码和解码的各种程序和数据的存储器、以及执行所述程序以执行操作和控制的微处理器。The motion picture encoding device and the motion picture decoding device according to the present invention can be user terminals such as personal computers, notebook PCs, personal digital assistants, portable multimedia players, smart phones, wireless communication terminals, and TVs, or servers providing services. The motion picture encoding device and the motion picture decoding device can be devices having the following components: a communication device such as a communication modem for communicating with various devices or a wireless or wired communication network, a memory for storing various programs and data for encoding and decoding images, and a microprocessor for executing the programs to perform operations and controls.
图1是示出根据本发明的实施方式的运动图像编码装置的框图。FIG. 1 is a block diagram illustrating a moving picture encoding apparatus according to an embodiment of the present invention.
根据本发明的实施方式的运动图像编码装置100包括帧内预测模块110、帧间预测模块120、变换和量化模块130、熵编码模块140、逆量化和逆变换模块150、后处理模块160、画面缓冲器170、减法模块、以及加法模块。According to an embodiment of the present invention, the motion picture encoding device 100 includes an intra-frame prediction module 110, an inter-frame prediction module 120, a transform and quantization module 130, an entropy encoding module 140, an inverse quantization and inverse transform module 150, a post-processing module 160, a picture buffer 170, a subtraction module, and an addition module.
帧内预测模块110利用当前块所属的画面或片(slice)的重构像素来创建帧内预测块。帧内预测模块110根据将被预测编码的当前块的大小来选择预定数量的帧内预测模式中的一种帧内预测模式,并且根据选择的帧内预测模式来创建预测块。The intra prediction module 110 creates an intra prediction block using reconstructed pixels of a picture or slice to which the current block belongs. The intra prediction module 110 selects one of a predetermined number of intra prediction modes according to the size of the current block to be predictively encoded, and creates a prediction block according to the selected intra prediction mode.
帧间预测模块120利用存储在画面缓冲器170中的参考画面来执行运动估计操作,并且针对运动估计操作确定参考画面索引和运动矢量。然后,帧间预测模块120利用参考画面索引和运动矢量来创建当前块的帧内预测块。The inter prediction module 120 performs a motion estimation operation using a reference picture stored in the picture buffer 170 and determines a reference picture index and a motion vector for the motion estimation operation. The inter prediction module 120 then creates an intra prediction block of the current block using the reference picture index and the motion vector.
变换和量化模块130对由帧内预测模块110或帧间预测模块120所创建的预测块的残差块进行变换和量化。在水平和垂直方向上利用一维变换矩阵来执行变换。利用根据变换块的大小(即,残差块的大小)和帧内预测模式所确定的变换矩阵来对用于帧内预测的残差块进行变换。利用预定的变换矩阵来对用于帧间预测的残差块进行变换。The transform and quantization module 130 transforms and quantizes the residual block of the prediction block created by the intra prediction module 110 or the inter prediction module 120. Transformation is performed using a one-dimensional transform matrix in the horizontal and vertical directions. The residual block used for intra prediction is transformed using a transform matrix determined according to the size of the transform block (i.e., the size of the residual block) and the intra prediction mode. The residual block used for inter prediction is transformed using a predetermined transform matrix.
变换和量化模块130利用量化步长对变换块进行量化。可以按等于或大于预定大小的编码单元来改变量化步长。The transform and quantization module 130 quantizes the transform block using a quantization step size. The quantization step size may be changed per coding unit equal to or larger than a predetermined size.
向逆量化和逆变换模块150以及熵编码模块140提供量化的变换块。The quantized transform block is provided to the inverse quantization and inverse transform module 150 and the entropy encoding module 140 .
逆量化和逆变换模块150对量化的变换块进行逆量化并且对经逆量化的变换块进行逆变换,以重构残差块。加法模块将由逆量化和逆变换模块150重构的残差块与来自帧内预测模块110或帧间预测模块120的预测块相加以创建重构块。The inverse quantization and inverse transform module 150 inversely quantizes the quantized transform block and inversely transforms the inverse quantized transform block to reconstruct the residual block. The addition module adds the residual block reconstructed by the inverse quantization and inverse transform module 150 to the prediction block from the intra prediction module 110 or the inter prediction module 120 to create a reconstructed block.
后处理模块160用于提高重构画面的图像质量,并且包括去块滤波器模块161、偏移模块162和环路滤波器模块163。The post-processing module 160 is used to improve the image quality of the reconstructed picture, and includes a deblocking filter module 161 , an offset module 162 , and a loop filter module 163 .
去块滤波器模块161自适应地向预测块和变换块的边界应用去块滤波器。所述边界可以被限制为8x8网格的边界。去块滤波器模块161确定将被滤波的边界,确定所述边界的边界强度,并且当边界强度大于0时,确定是否应该向所述边界应用去块滤波器。当确定边界应该被滤波时,去块滤波器模块161选择将被应用于边界的滤波器,并且利用选择的滤波器对边界滤波。The deblocking filter module 161 adaptively applies a deblocking filter to the boundaries between prediction blocks and transform blocks. The boundaries can be limited to boundaries of an 8x8 grid. The deblocking filter module 161 determines the boundaries to be filtered, determines the boundary strength of the boundaries, and, when the boundary strength is greater than 0, determines whether a deblocking filter should be applied to the boundaries. If it is determined that the boundaries should be filtered, the deblocking filter module 161 selects a filter to be applied to the boundaries and filters the boundaries using the selected filter.
偏移模块162确定应该由画面还是片来应用偏移以减小经受去块滤波器模块的图像中的像素与相应原始像素之间的失真。另选地,片被划分成多个偏移区域,并且可以确定各偏移区域的偏移类型。偏移类型可以包括预定数量个的边缘偏移类型和带偏移类型。当偏移类型是边缘偏移类型时,确定各像素所属的边缘类型并且应用与其相对应的偏移。基于与当前像素相邻的两个像素值的分布来确定边缘类型。The offset module 162 determines whether an offset should be applied by picture or slice to reduce distortion between pixels in an image subjected to the deblocking filter module and the corresponding original pixels. Alternatively, the slice is divided into a plurality of offset regions, and an offset type can be determined for each offset region. The offset type can include a predetermined number of edge offset types and band offset types. When the offset type is an edge offset type, the edge type to which each pixel belongs is determined and the corresponding offset is applied. The edge type is determined based on the distribution of the values of two pixels adjacent to the current pixel.
环路滤波器模块163基于经历了偏移模块162的重构图像与原始图像的比较结果来对重构图像进行自适应地环路滤波。确定是否应该按编码单元对重构图像进行环路滤波。可以按编码单元改变将被应用的环路滤波器的大小和系数。指示是否应该按编码单元应用自适应环路滤波的信息可以包括在各片报头中。在色度信号的情况下,可以确定是否应该按画面应用自适应环路滤波。因此,指示色度分量是否被滤波的信息可以包括在片报头或画面报头中。The loop filter module 163 adaptively loop filters the reconstructed image based on the comparison result between the reconstructed image that has undergone the offset module 162 and the original image. Whether loop filtering should be performed on the reconstructed image is determined for each coding unit. The size and coefficients of the loop filter to be applied can be changed for each coding unit. Information indicating whether adaptive loop filtering should be applied for each coding unit can be included in each slice header. In the case of chroma signals, whether adaptive loop filtering should be applied for each picture can be determined. Therefore, information indicating whether chroma components are filtered can be included in a slice header or a picture header.
画面缓冲器170从后处理模块160接收经后处理的图像数据,并且以画面为单位重构和存储图像。画面可以是以帧为单位的图像或以场为单位的图像。The picture buffer 170 receives the post-processed image data from the post-processing module 160 and reconstructs and stores the image in units of pictures. The picture may be an image in units of frames or an image in units of fields.
熵编码模块140对通过变换和量化模块130量化的量化系数信息、从帧内预测模块110接收到的帧内预测信息、从帧间预测模块120接收到的运动信息等进行熵编码。熵编码模块140包括扫描模块145,所述扫描模块145用于将量化的变换块的系数变换成一维量化系数。The entropy encoding module 140 performs entropy encoding on the quantized coefficient information quantized by the transform and quantization module 130, the intra prediction information received from the intra prediction module 110, the motion information received from the inter prediction module 120, etc. The entropy encoding module 140 includes a scanning module 145 for transforming the coefficients of the quantized transform block into one-dimensional quantized coefficients.
扫描模块145确定用于将量化的变换块的系数变换成一维量化系数的扫描类型。所述扫描类型可以根据方向性帧内预测模式和变换块的大小而变化。按向后方向扫描量化系数。The scanning module 145 determines the scanning type used to transform the coefficients of the quantized transform block into one-dimensional quantized coefficients. The scanning type may vary depending on the directional intra prediction mode and the size of the transform block. The quantized coefficients are scanned in a backward direction.
当量化的变换块大于预定大小时,变换系数被划分成多个子块并被扫描。应用于这些子块的变换系数的扫描类型是相同的。应用于子块的扫描类型可以是Z字形扫描,或者可以是与应用于子块的变换系数的扫描类型相同的扫描类型。When the quantized transform block is larger than a predetermined size, the transform coefficients are divided into a plurality of sub-blocks and scanned. The scan type applied to the transform coefficients of these sub-blocks is the same. The scan type applied to the sub-blocks may be a zigzag scan, or may be the same scan type as the scan type applied to the transform coefficients of the sub-blocks.
图2是示出根据本发明的实施方式的运动图像解码装置200的框图。FIG. 2 is a block diagram illustrating a moving picture decoding apparatus 200 according to an embodiment of the present invention.
根据本发明的实施方式的运动图像解码装置200包括熵解码模块210、逆量化模块220、逆变换模块230、帧内预测模块240、帧间预测模块250、后处理模块260、画面缓冲器270和加法模块280。The motion picture decoding device 200 according to an embodiment of the present invention includes an entropy decoding module 210, an inverse quantization module 220, an inverse transform module 230, an intra-frame prediction module 240, an inter-frame prediction module 250, a post-processing module 260, a picture buffer 270 and an addition module 280.
熵解码模块210对接收到的比特流进行解码,并且将比特流区分成帧内预测信息、帧间预测信息、量化系数信息等。熵解码模块210向帧内预测模块240提供解码的帧内预测信息,并且向帧间预测模块250提供解码的帧间预测信息。熵解码模块210包括逆扫描模块215,所述逆扫描模块215用于对解码的量化系数信息进行逆向地扫描。The entropy decoding module 210 decodes the received bitstream and divides the bitstream into intra-frame prediction information, inter-frame prediction information, quantization coefficient information, etc. The entropy decoding module 210 provides the decoded intra-frame prediction information to the intra-frame prediction module 240 and provides the decoded inter-frame prediction information to the inter-frame prediction module 250. The entropy decoding module 210 includes an inverse scanning module 215 for inversely scanning the decoded quantization coefficient information.
逆扫描模块215将量化系数信息转换成二维量化块。针对转换选择多个扫描类型中的一种扫描类型。扫描类型可以根据方向性帧内预测模式和变换块的大小而改变。按向后方向扫描量化系数。当量化的变换块大于预定大小时,变换系数被划分成多个子块并且被扫描。应用于这些子块的变换系数的扫描类型是相同的。应用于子块的扫描类型可以是Z字形扫描,或者可以是与应用于子块的变换系数的扫描类型相同的扫描类型。The inverse scanning module 215 converts the quantized coefficient information into a two-dimensional quantized block. One of multiple scan types is selected for the conversion. The scan type can vary depending on the directional intra prediction mode and the size of the transform block. The quantized coefficients are scanned in a backward direction. When the quantized transform block is larger than a predetermined size, the transform coefficients are divided into a plurality of sub-blocks and scanned. The scan type applied to the transform coefficients of these sub-blocks is the same. The scan type applied to the sub-blocks can be a zigzag scan or can be the same scan type as the scan type applied to the transform coefficients of the sub-blocks.
逆量化模块220确定当前编码单元的量化步长预测因子,并且将确定的量化步长预测因子与接收到的残差量化步长相加以重构当前编码单元的量化步长。逆量化模块220利用量化步长和逆量化矩阵对量化块进行逆量化。量化矩阵根据量化块的大小和预测模式来确定。即,基于当前块的预测模式和用于具有预定大小的量化块的帧内预测模式中的至少一方来选择量化矩阵。The inverse quantization module 220 determines a quantization step size prediction factor for the current coding unit and adds the determined quantization step size prediction factor to the received residual quantization step size to reconstruct the quantization step size for the current coding unit. The inverse quantization module 220 inverse quantizes the quantized block using the quantization step size and the inverse quantization matrix. The quantization matrix is determined based on the size of the quantized block and the prediction mode. Specifically, the quantization matrix is selected based on at least one of the prediction mode for the current block and the intra-frame prediction mode for a quantized block of a predetermined size.
逆变换模块230对经逆量化的变换块进行逆变换以重构残差块。可以根据预测模式和帧内预测模式来确定将应用于逆量化块的逆变换矩阵。The inverse transform module 230 inversely transforms the inverse quantized transform block to reconstruct a residual block. An inverse transform matrix to be applied to the inverse quantized block may be determined according to a prediction mode and an intra prediction mode.
加法模块280将由帧内预测模块240或帧间预测模块250创建的预测块与由逆变换模块230重构的残差块相加,以创建重构块。The addition module 280 adds the prediction block created by the intra prediction module 240 or the inter prediction module 250 and the residual block reconstructed by the inverse transform module 230 to create a reconstructed block.
帧内预测模块240基于从熵解码模块210接收到的帧内预测信息来重构当前块的帧内预测模式。然后,帧内预测模块240根据重构的帧内预测模式来创建预测块。The intra prediction module 240 reconstructs the intra prediction mode of the current block based on the intra prediction information received from the entropy decoding module 210. Then, the intra prediction module 240 creates a prediction block according to the reconstructed intra prediction mode.
帧间预测模块250基于从熵解码模块210接收到的帧间预测信息来重构参考画面索引和运动矢量。然后,帧间预测模块250利用参考画面索引和运动矢量来创建当前块的预测块。当应用具有十进制预测的运动补偿时,应用选择的插值滤波器以创建预测块。The inter-frame prediction module 250 reconstructs the reference picture index and motion vector based on the inter-frame prediction information received from the entropy decoding module 210. The inter-frame prediction module 250 then uses the reference picture index and motion vector to create a prediction block for the current block. When motion compensation with decimal prediction is applied, the selected interpolation filter is applied to create the prediction block.
后处理模块260的操作与图1中示出的后处理模块160的操作相同,因此不再进行描述。The operation of the post-processing module 260 is the same as the operation of the post-processing module 160 shown in FIG. 1 , and thus will not be described again.
画面缓冲器270以画面为单位存储经后处理模块260进行了后处理的解码图像。The picture buffer 270 stores the decoded image post-processed by the post-processing module 260 in units of pictures.
图3是示出根据本发明的实施方式的创建帧内预测块的方法的示图。FIG. 3 is a diagram illustrating a method of creating an intra prediction block according to an embodiment of the present invention.
首先,对来自接收的比特流的帧内预测信息进行熵解码(S110)。First, intra prediction information from a received bitstream is entropy decoded ( S110 ).
帧内预测信息包括帧内预测模式组指示符和预测模式索引。帧内预测模式组指示符指示当前块的帧内预测模式是属于MPM组还是属于除了MPM组之外的组。预测模式索引是指示通过帧内预测模式组指示符所指示的帧内预测模式组中的特定帧内预测模式的信息。The intra prediction information includes an intra prediction mode group indicator and a prediction mode index. The intra prediction mode group indicator indicates whether the intra prediction mode of the current block belongs to an MPM group or a group other than the MPM group. The prediction mode index is information indicating a specific intra prediction mode in the intra prediction mode group indicated by the intra prediction mode group indicator.
可以以无符号整数的形式接收帧内预测模式组指示符。在这种情况下,帧内预测模式组指示符可以在不进行熵解码的情况下被使用。另选地,可以根据当前片的类型对帧内预测模式组指示符自适应地进行熵编码。例如,可以利用根据片类型所确定的上下文来对帧内预测模式组指示符进行熵编码。因此,可以利用根据当前片的类型所确定的上下文来对帧内预测模式组指示符进行解码。预测模式索引的熵编码方法根据帧内预测模式是否属于MPM组而变化。因此,利用不同的方法来对预测模式索引进行熵解码。具体地,当帧内预测模式组指示符表示当前块的帧内预测模式属于MPM组时,预测模式索引以截断指数哥伦布码(Exp-Golomb code)方式或截断一元码(unary)方式被二值化,并随后被熵编码。因此,在通过执行熵解码获取了二进制信息之后,利用上面提到的方法来重构预测模式索引。当帧内预测模式组指示符表示当前块的帧内预测模式不属于MPM组时,预测模式索引可以被二值化为固定长度。因此,在通过执行熵解码获取了二进制信息之后,可以重构预测模式索引。The intra-frame prediction mode group indicator can be received in the form of an unsigned integer. In this case, the intra-frame prediction mode group indicator can be used without entropy decoding. Alternatively, the intra-frame prediction mode group indicator can be adaptively entropy encoded according to the type of the current slice. For example, the intra-frame prediction mode group indicator can be entropy encoded using the context determined according to the slice type. Therefore, the intra-frame prediction mode group indicator can be decoded using the context determined according to the type of the current slice. The entropy encoding method of the prediction mode index varies depending on whether the intra-frame prediction mode belongs to the MPM group. Therefore, different methods are used to entropy decode the prediction mode index. Specifically, when the intra-frame prediction mode group indicator indicates that the intra-frame prediction mode of the current block belongs to the MPM group, the prediction mode index is binarized in a truncated exponential Golomb code manner or a truncated unary code manner, and then entropy encoded. Therefore, after the binary information is obtained by performing entropy decoding, the prediction mode index is reconstructed using the above-mentioned method. When the intra prediction mode group indicator indicates that the intra prediction mode of the current block does not belong to the MPM group, the prediction mode index may be binarized to a fixed length. Therefore, after obtaining binary information by performing entropy decoding, the prediction mode index may be reconstructed.
然后,利用与当前块相邻的块的帧内预测模式来创建MPM组,然后利用MPM组来重构当前块的帧内预测模式(S120)。MPM组包括三个帧内预测模式。这将参照图4进行描述。图4是示出根据本发明的实施方式的帧内预测模式的示图。Then, an MPM group is created using the intra prediction modes of blocks adjacent to the current block, and then the intra prediction mode of the current block is reconstructed using the MPM group (S120). The MPM group includes three intra prediction modes. This will be described with reference to FIG4. FIG4 is a diagram illustrating intra prediction modes according to an embodiment of the present invention.
(1)在当前块的上块和左块的帧内预测模式都存在并且彼此不同时,MPM组包括这两个帧内预测模式和一个附加帧内预测模式。(1) When the intra prediction modes of the upper block and the left block of the current block both exist and are different from each other, the MPM group includes these two intra prediction modes and one additional intra prediction mode.
当这两个帧内预测模式中的一个是DC模式并且另一个不是平面模式时,附加帧内预测模式可以是平面模式。类似地,当这两个帧内预测模式中的一个帧内预测模式是平面模式并且另一个不是DC模式时,附加帧内预测模式可以是DC模式。When one of the two intra-frame prediction modes is DC mode and the other is not planar mode, the additional intra-frame prediction mode may be planar mode. Similarly, when one of the two intra-frame prediction modes is planar mode and the other is not DC mode, the additional intra-frame prediction mode may be DC mode.
当这两个帧内预测模式是DC模式和平面模式时,附加帧内预测模式可以是垂直模式或水平模式。When the two intra prediction modes are the DC mode and the planar mode, the additional intra prediction mode may be the vertical mode or the horizontal mode.
当这两个帧内预测模式不是DC模式也不是平面模式时,附加帧内预测模式可以是在这两个帧内预测模式之间具有方向性的帧内预测模式、或DC模式、或平面模式。When the two intra prediction modes are neither the DC mode nor the planar mode, the additional intra prediction mode may be an intra prediction mode having directionality between the two intra prediction modes, the DC mode, or the planar mode.
(2)在当前块的上块和左块的帧内预测模式都存在并且彼此相等时,MPM组包括该帧内预测模式和两个附加帧内预测模式。(2) When the intra prediction modes of the upper block and the left block of the current block both exist and are equal to each other, the MPM group includes the intra prediction mode and two additional intra prediction modes.
当该帧内预测模式既不是DC模式也不是平面模式时,两个附加帧内预测模式被设置为与该帧内预测模式相邻的两个帧内预测模式。当该帧内预测模式是DC模式时,两个附加帧内预测模式可以是平面模式和垂直模式。When the intra prediction mode is neither DC mode nor planar mode, two additional intra prediction modes are set as two intra prediction modes adjacent to the intra prediction mode. When the intra prediction mode is DC mode, the two additional intra prediction modes may be planar mode and vertical mode.
(3)在当前块的上块和左块的帧内预测模式中仅一个帧内预测模式存在时,MPM组包括该帧内预测模式和两个附加帧内预测模式。两个附加帧内预测模式根据该帧内预测模式来确定。(3) When only one intra prediction mode exists among the intra prediction modes of the upper block and the left block of the current block, the MPM group includes the intra prediction mode and two additional intra prediction modes. The two additional intra prediction modes are determined according to the intra prediction mode.
(4)在当前块的上块和左块的帧内预测模式都不存在时,MPM组包括DC模式、平面模式和垂直模式。(4) When the intra prediction mode of the upper block and the left block of the current block does not exist, the MPM group includes the DC mode, the planar mode, and the vertical mode.
当帧内预测模式组指示符指示MPM组时,从MPM组中选择由预测模式索引所指示的帧内预测模式,并且选择的帧内预测模式被确定为当前块的帧内预测模式。帧内预测模式组指示符可以是表示当前块的帧内预测模式是属于MPM组还是属于除了MPM组之外的组的标记信息。When the intra prediction mode group indicator indicates the MPM group, the intra prediction mode indicated by the prediction mode index is selected from the MPM group, and the selected intra prediction mode is determined as the intra prediction mode of the current block. The intra prediction mode group indicator may be flag information indicating whether the intra prediction mode of the current block belongs to the MPM group or to a group other than the MPM group.
当帧内预测模式组指示符不指示MPM组时,帧内预测模块240将除了属于MPM组的帧内预测模式之外的帧内预测模式(下面称为残差帧内预测模式)中的由预测模式索引所指示的帧内预测模式确定为当前块的帧内预测模式。分配给残差帧内预测模式的预测模式索引根据MPM组的配置而变化。即,解码的预测模式索引指示根据MPM组的配置重新排列的残差帧内预测模式的索引。因此,帧内预测模块240根据解码的预测模式索引和属于MPM组的帧内预测模式从残差帧内预测模式中选择当前块的帧内预测模式。When the intra-frame prediction mode group indicator does not indicate the MPM group, the intra-frame prediction module 240 determines the intra-frame prediction mode indicated by the prediction mode index among the intra-frame prediction modes other than the intra-frame prediction modes belonging to the MPM group (hereinafter referred to as the residual intra-frame prediction mode) as the intra-frame prediction mode of the current block. The prediction mode index assigned to the residual intra-frame prediction mode varies according to the configuration of the MPM group. That is, the decoded prediction mode index indicates the index of the residual intra-frame prediction mode rearranged according to the configuration of the MPM group. Therefore, the intra-frame prediction module 240 selects the intra-frame prediction mode of the current block from the residual intra-frame prediction mode according to the decoded prediction mode index and the intra-frame prediction mode belonging to the MPM group.
具体地,按模式编号顺序重新排列当前块的残差帧内预测模式,并且将与接收的预测模式索引相对应的帧内预测模式选择作为当前块的帧内预测模式。在这种情况下,可以重新排列残差帧内预测模式,但可以通过将属于MPM组的帧内预测模式编号与当前块的帧内预测模式索引进行比较来确定当前块的帧内预测模式。Specifically, the residual intra prediction modes of the current block are rearranged in mode number order, and the intra prediction mode corresponding to the received prediction mode index is selected as the intra prediction mode of the current block. In this case, the residual intra prediction modes may be rearranged, but the intra prediction mode of the current block may be determined by comparing the intra prediction mode numbers belonging to the MPM group with the intra prediction mode index of the current block.
该方法可以应用于将模式编号2分配给非方向性模式中的DC模式、将模式编号34分配给平面模式并且将方向性模式编号分配给其它模式的情况。然而,由于选择平面模式和DC模式作为当前块的帧内预测模式的可能性高于选择其它方向性模式作为当前块的帧内预测模式的可能性,所以将小的模式编号(例如,模式编码0)分配给平面模式并且可以应用上面提到的方法。在这种情况下,其它排名较低模式的模式编号增加1。This method can be applied to the case where mode number 2 is assigned to the DC mode among the non-directional modes, mode number 34 is assigned to the planar mode, and directional mode numbers are assigned to other modes. However, since the probability of selecting the planar mode and the DC mode as the intra-frame prediction mode of the current block is higher than the probability of selecting the other directional modes as the intra-frame prediction mode of the current block, a small mode number (for example, mode code 0) is assigned to the planar mode and the above-mentioned method can be applied. In this case, the mode numbers of other lower-ranked modes are increased by 1.
另选地,可以将最低的索引分配给非方向性模式。例如,在当前块的帧内预测模式是平面模式并且残差帧内预测模式包括平面模式时,帧内预测模式索引可以包括0。例如,当残差帧内预测模式包括平面模式和DC模式时,在平面模式、DC模式和方向性模式按该顺序排列的状态下与预测模式索引相对应的帧内预测模式可以被设置为当前块的帧内预测模式。例如,可以将模式编号0和模式编号1分别分配给平面模式和DC模式,或者可以将模式编号0和模式编号1分别分配给DC模式和平面模式。在这种情况下,可以将当前块的帧内预测模式索引与属于MPM组的帧内预测模式编号相比较,以确定当前块的帧内预测模式。Alternatively, the lowest index may be assigned to the non-directional mode. For example, when the intra-frame prediction mode of the current block is the planar mode and the residual intra-frame prediction mode includes the planar mode, the intra-frame prediction mode index may include 0. For example, when the residual intra-frame prediction mode includes the planar mode and the DC mode, the intra-frame prediction mode corresponding to the prediction mode index in a state where the planar mode, the DC mode, and the directional mode are arranged in this order may be set as the intra-frame prediction mode of the current block. For example, mode number 0 and mode number 1 may be assigned to the planar mode and the DC mode, respectively, or mode number 0 and mode number 1 may be assigned to the DC mode and the planar mode, respectively. In this case, the intra-frame prediction mode index of the current block may be compared with the intra-frame prediction mode number belonging to the MPM group to determine the intra-frame prediction mode of the current block.
然后,利用指示当前块的变换大小的信息来确定预测块的大小(S130)。Then, the size of the prediction block is determined using information indicating the transform size of the current block (S130).
当预测块的大小等于当前块的大小时,利用当前块的帧内预测模式和当前块的参考像素来创建预测块。参考像素是在当前块之前重构或创建的像素。When the size of the prediction block is equal to the size of the current block, the prediction block is created using the intra prediction mode of the current block and the reference pixels of the current block. Reference pixels are pixels reconstructed or created before the current block.
当预测块的大小小于当前块的大小时,即在当前块可以被划分成多个子块并且对子块执行帧内预测时,使用相同的帧内预测模式(即,当前块的帧内预测模式)以创建各子块的预测块。利用先前子块的重构像素来创建第二子块或按解码顺序在第二子块之后的子块的预测块。因此,在以子块为单位创建了预测块、残差块和重构块之后,创建下一子块的预测块。When the size of the prediction block is smaller than the size of the current block, that is, when the current block can be divided into multiple subblocks and intra prediction is performed on the subblocks, the same intra prediction mode (that is, the intra prediction mode of the current block) is used to create the prediction blocks of each subblock. The prediction blocks of the second subblock or the subblocks following the second subblock in decoding order are created using the reconstructed pixels of the previous subblock. Therefore, after the prediction blocks, residual blocks, and reconstructed blocks are created in units of subblocks, the prediction blocks of the next subblock are created.
然后,确定与预测块的大小相对应的块的参考像素是否都是有效的(S140)。参考像素是先前被解码和重构的像素。当确定参考像素中的至少一个是无效的时,创建参考像素(S150)。Then, it is determined whether all reference pixels of the block corresponding to the size of the prediction block are valid (S140). Reference pixels are pixels that have been previously decoded and reconstructed. When it is determined that at least one of the reference pixels is invalid, a reference pixel is created (S150).
具体地,当确定参考像素都不有效时,用值2L-1来代替参考像素值。这里,L表示的是表示亮度分量的灰阶的比特数。Specifically, when it is determined that none of the reference pixels are valid, the reference pixel value is replaced by a value of 2 L - 1. Here, L represents the number of bits representing the grayscale of the luminance component.
当相对于无效参考像素的位置仅在一个方向上存在有效参考像素时,有效参考像素中的最近的参考像素被复制以创建参考像素。When valid reference pixels exist only in one direction with respect to the position of the invalid reference pixel, the nearest reference pixel among the valid reference pixels is copied to create the reference pixel.
当相对于无效参考像素的位置在两个方向上存在有效参考像素时,在预定方向上位于最近位置的参考像素可以被复制,或者在两个方向上的两个最近的参考像素可以被取平均,以创建参考像素。When valid reference pixels exist in two directions relative to the position of an invalid reference pixel, a reference pixel located closest in a predetermined direction may be copied, or two closest reference pixels in two directions may be averaged to create a reference pixel.
然后,确定参考像素是否应被滤波(S160)。根据重构的帧内预测模式和预测块的大小来对参考像素进行自适应地滤波。Then, it is determined whether the reference pixels should be filtered (S160). The reference pixels are adaptively filtered according to the reconstructed intra prediction mode and the size of the prediction block.
当帧内预测模式是DC模式时,不对参考像素进行滤波。当帧内预测模式是垂直模式和水平模式时,帧内预测模块240也不对参考像素滤波。然而,当帧内预测模式是除了垂直模式和水平模式之外的方向性模式时,根据帧内预测模式和预测块的大小来对参考像素进行自适应地滤波。当预测块的大小是4x4时,为了减小复杂度,不管帧内预测模式都不对参考像素滤波。滤波用于使参考像素之间的像素值的变化平滑并且使用低通滤波器。低通滤波器可以是作为3抽头滤波器的[1,2,1]或者作为5抽头滤波器的[1,2,4,2,1]。当预测块的大小在8x8到32x32的范围内时,随着预测块大小的增加按更多的帧内预测模式来对参考像素进行滤波。When the intra prediction mode is DC mode, the reference pixels are not filtered. When the intra prediction mode is vertical mode and horizontal mode, the intra prediction module 240 also does not filter the reference pixels. However, when the intra prediction mode is a directional mode other than vertical mode and horizontal mode, the reference pixels are adaptively filtered according to the intra prediction mode and the size of the prediction block. When the size of the prediction block is 4x4, in order to reduce complexity, the reference pixels are not filtered regardless of the intra prediction mode. Filtering is used to smooth the changes in pixel values between reference pixels and a low-pass filter is used. The low-pass filter can be [1, 2, 1] as a 3-tap filter or [1, 2, 4, 2, 1] as a 5-tap filter. When the size of the prediction block is in the range of 8x8 to 32x32, the reference pixels are filtered according to more intra prediction modes as the prediction block size increases.
然后,根据帧内预测模式来创建预测块(S180)。用于预测块的参考像素可以是根据预测块的大小和帧内预测模式被自适应滤波的像素。Then, a prediction block is created according to the intra prediction mode (S180). Reference pixels used for the prediction block may be pixels adaptively filtered according to the size of the prediction block and the intra prediction mode.
在DC模式下,可以将位于(x=0,…,N-1,y=-1)位置的N个上参考像素、位于(x=-1,y=0,…,M-1)位置的M个左参考像素、和位于(x=-1,y=-1)位置的中心像素的平均值确定为预测块的预测像素。然而,可以利用平均值和与预测像素相邻的参考像素的加权平均来创建与参考像素相邻的预测像素。在平面模式下,可以与在DC模式相同的方式创建预测像素。In DC mode, the average value of the N upper reference pixels located at (x=0, ..., N-1, y=-1), the M left reference pixels located at (x=-1, y=0, ..., M-1), and the center pixel located at (x=-1, y=-1) can be determined as the predicted pixel of the prediction block. However, the predicted pixel adjacent to the reference pixel can be created using the average value and a weighted average of the reference pixels adjacent to the predicted pixel. In planar mode, the predicted pixel can be created in the same manner as in DC mode.
在垂直模式下,将位于垂直方向的参考像素设置为预测像素。然而,可以利用位于垂直方向的参考像素以及左参考像素之间的变化来创建与左参考像素相邻的预测像素。所述变化表示中心参考像素和与预测像素相邻的左参考像素之间的变化。在水平模式下,除了方向,可以按与垂直模式相同的方式创建预测像素。In vertical mode, reference pixels located in the vertical direction are set as predicted pixels. However, a predicted pixel adjacent to the left reference pixel can be created by using the change between the reference pixels located in the vertical direction and the left reference pixel. The change refers to the change between the center reference pixel and the left reference pixel adjacent to the predicted pixel. In horizontal mode, predicted pixels can be created in the same manner as in vertical mode, except for the direction.
图5是示出根据本发明实施方式的帧内预测块创建单元300的框图。根据本发明的帧内预测块创建单元300包括解析模块310、预测模式解码模块320、预测块大小确定模块330、参考像素有效性确定模块340、参考像素创建模块350、参考像素滤波模块360、预测块创建模块370。5 is a block diagram illustrating an intra-frame prediction block creation unit 300 according to an embodiment of the present invention. The intra-frame prediction block creation unit 300 according to the present invention includes a parsing module 310, a prediction mode decoding module 320, a prediction block size determination module 330, a reference pixel validity determination module 340, a reference pixel creation module 350, a reference pixel filtering module 360, and a prediction block creation module 370.
解析模块310对接收到的比特流进行熵解码,以获取帧内预测信息和变换块大小信息。The parsing module 310 performs entropy decoding on the received bitstream to obtain intra-frame prediction information and transform block size information.
帧内预测信息包括帧内预测模式组指示符和预测模式索引。帧内预测模式组指示符表示当前块的帧内预测模式属于MPM组和除了MPM组之外的组中的哪一个。预测模式索引是表示由帧内预测模式组指示符指示的帧预测模式组中的特定帧内预测模式的信息。对帧内预测信息进行熵解码的方法与图3的步骤S110中相同。The intra-frame prediction information includes an intra-frame prediction mode group indicator and a prediction mode index. The intra-frame prediction mode group indicator indicates to which of the MPM group and the group other than the MPM group the intra-frame prediction mode of the current block belongs. The prediction mode index is information indicating a specific intra-frame prediction mode in the prediction mode group indicated by the intra-frame prediction mode group indicator. The method for entropy decoding the intra-frame prediction information is the same as in step S110 of Figure 3.
变换块大小信息包括表示变换块大小以及从编码器发送的至少一个标记(split_transform_flag)。The transform block size information includes information indicating the transform block size and at least one flag (split_transform_flag) transmitted from the encoder.
预测模式解码模块320利用与当前块相邻的块的帧内预测模式来创建MPM组,并且利用MPM组和经熵解码的帧内预测信息来重构当前块的帧内预测模式。MPM组包括三个帧内预测模式。The prediction mode decoding module 320 creates an MPM group using the intra prediction modes of blocks adjacent to the current block, and reconstructs the intra prediction mode of the current block using the MPM group and the entropy-decoded intra prediction information. The MPM group includes three intra prediction modes.
(1)在当前块的上块和左块的帧内预测模式都存在并且彼此不同时,MPM组包括这两个帧内预测模式和一个附加帧内预测模式。(1) When the intra prediction modes of the upper block and the left block of the current block both exist and are different from each other, the MPM group includes these two intra prediction modes and one additional intra prediction mode.
当这两个帧内预测模式中的一个是DC模式并且另一个不是平面模式时,附加帧内预测模式可以是平面模式。类似地,当这两个帧内预测模式中的一个帧内预测模式是平面模式并且另一个不是DC模式时,附加帧内预测模式可以是DC模式。When one of the two intra-frame prediction modes is DC mode and the other is not planar mode, the additional intra-frame prediction mode may be planar mode. Similarly, when one of the two intra-frame prediction modes is planar mode and the other is not DC mode, the additional intra-frame prediction mode may be DC mode.
当这两个帧内预测模式是DC模式和平面模式时,附加帧内预测模式可以是垂直模式或水平模式。When the two intra prediction modes are the DC mode and the planar mode, the additional intra prediction mode may be the vertical mode or the horizontal mode.
当这两个帧内预测模式不是DC模式也不是平面模式时,附加帧内预测模式可以是在这两个帧内预测模式之间具有方向性的帧内预测模式、或DC模式、或平面模式。When the two intra prediction modes are neither the DC mode nor the planar mode, the additional intra prediction mode may be an intra prediction mode having directionality between the two intra prediction modes, the DC mode, or the planar mode.
(2)在当前块的上块和左块的帧内预测模式都存在并且彼此相等时,MPM组包括该帧内预测模式和两个附加帧内预测模式。(2) When the intra prediction modes of the upper block and the left block of the current block both exist and are equal to each other, the MPM group includes the intra prediction mode and two additional intra prediction modes.
当该帧内预测模式既不是DC模式也不是平面模式时,两个附加帧内预测模式被设置为与该帧内预测模式相邻的两个帧内预测模式。当该帧内预测模式是DC模式时,两个附加帧内预测模式可以是平面模式和垂直模式。When the intra prediction mode is neither DC mode nor planar mode, two additional intra prediction modes are set as two intra prediction modes adjacent to the intra prediction mode. When the intra prediction mode is DC mode, the two additional intra prediction modes may be planar mode and vertical mode.
(3)在当前块的上块和左块的帧内预测模式中仅一个帧内预测模式存在时,MPM组包括该帧内预测模式和两个附加帧内预测模式。两个附加帧内预测模式根据该帧内预测模式来确定。(3) When only one intra prediction mode exists among the intra prediction modes of the upper block and the left block of the current block, the MPM group includes the intra prediction mode and two additional intra prediction modes. The two additional intra prediction modes are determined according to the intra prediction mode.
(4)在当前块的上块和左块的帧内预测模式都不存在时,MPM组包括DC模式、平面模式和垂直模式。(4) When the intra prediction mode of the upper block and the left block of the current block does not exist, the MPM group includes the DC mode, the planar mode, and the vertical mode.
当帧内预测模式组指示符指示MPM组时,从MPM组中选择由预测模式索引所指示的帧内预测模式,并且选择的帧内预测模式被确定为当前块的帧内预测模式。帧内预测模式组指示符可以是表示当前块的帧内预测模式是属于MPM组还是属于除了MPM组之外的组的标记信息。When the intra prediction mode group indicator indicates the MPM group, the intra prediction mode indicated by the prediction mode index is selected from the MPM group, and the selected intra prediction mode is determined as the intra prediction mode of the current block. The intra prediction mode group indicator may be flag information indicating whether the intra prediction mode of the current block belongs to the MPM group or to a group other than the MPM group.
当帧内预测模式组指示符不指示MPM组时,帧内预测模块240将除了属于MPM组的帧内预测模式之外的帧内预测模式(下面称为残差帧内预测模式)中的由预测模式索引所指示的帧内预测模式确定为当前块的帧内预测模式。分配给残差帧内预测模式的预测模式索引根据MPM组的配置而变化。即,解码的预测模式索引指示根据MPM组的配置重新排列的残差帧内预测模式的索引。因此,帧内预测模块240根据解码的预测模式索引和属于MPM组的帧内预测模式从残差帧内预测模式中选择当前块的帧内预测模式。When the intra-frame prediction mode group indicator does not indicate the MPM group, the intra-frame prediction module 240 determines the intra-frame prediction mode indicated by the prediction mode index among the intra-frame prediction modes other than the intra-frame prediction modes belonging to the MPM group (hereinafter referred to as the residual intra-frame prediction mode) as the intra-frame prediction mode of the current block. The prediction mode index assigned to the residual intra-frame prediction mode varies according to the configuration of the MPM group. That is, the decoded prediction mode index indicates the index of the residual intra-frame prediction mode rearranged according to the configuration of the MPM group. Therefore, the intra-frame prediction module 240 selects the intra-frame prediction mode of the current block from the residual intra-frame prediction mode according to the decoded prediction mode index and the intra-frame prediction mode belonging to the MPM group.
具体地,按模式编号顺序重新排列当前块的残差帧内预测模式,并且将与接收的预测模式索引相对应的帧内预测模式选择作为当前块的帧内预测模式。在这种情况下,可以重新排列残差帧内预测模式,但可以通过将属于MPM组的帧内预测模式编号与当前块的帧内预测模式索引进行比较来确定当前块的帧内预测模式。Specifically, the residual intra prediction modes of the current block are rearranged in mode number order, and the intra prediction mode corresponding to the received prediction mode index is selected as the intra prediction mode of the current block. In this case, the residual intra prediction modes may be rearranged, but the intra prediction mode of the current block may be determined by comparing the intra prediction mode numbers belonging to the MPM group with the intra prediction mode index of the current block.
MPM组构造方法可以应用于将模式编号2分配给非方向性模式中的DC模式、将模式编号34分配给平面模式并且将方向性模式编号分配给其它模式的情况。然而,由于选择平面模式和DC模式作为当前块的帧内预测模式的可能性高于选择其它方向性模式作为当前块的帧内预测模式的可能性,所以将小的模式编号(例如,模式编码0)分配给平面模式并且可以应用上面提到的方法。在这种情况下,其它排名较低的模式的模式编号增加1。The MPM group construction method can be applied to a case where the mode number 2 is assigned to the DC mode among the non-directional modes, the mode number 34 is assigned to the planar mode, and the directional mode numbers are assigned to other modes. However, since the probability of selecting the planar mode and the DC mode as the intra-frame prediction mode of the current block is higher than the probability of selecting the other directional modes as the intra-frame prediction mode of the current block, a small mode number (for example, mode code 0) is assigned to the planar mode and the above-mentioned method can be applied. In this case, the mode numbers of other lower-ranked modes are increased by 1.
另选地,可以将最低的索引分配给无方向性模式。例如,在当前块的帧内预测模式是平面模式并且残差帧内预测模式包括平面模式时,帧内预测模式索引可以包括0。例如,当残差帧内预测模式包括平面模式和DC模式时,在平面模式、DC模式和方向性模式按该顺序排列的状态下与预测模式索引相对应的帧内预测模式可以被设置为当前块的帧内预测模式。例如,可以将模式编号0和模式编号1分别分配给平面模式和DC模式,或者可以将模式编号0和模式编号1分别分配给DC模式和平面模式。在这种情况下,可以将当前块的帧内预测模式索引与属于MPM组的帧内预测模式编号相比较,以确定当前块的帧内预测模式。Alternatively, the lowest index may be assigned to the non-directional mode. For example, when the intra-frame prediction mode of the current block is the planar mode and the residual intra-frame prediction mode includes the planar mode, the intra-frame prediction mode index may include 0. For example, when the residual intra-frame prediction mode includes the planar mode and the DC mode, the intra-frame prediction mode corresponding to the prediction mode index in a state where the planar mode, the DC mode and the directional mode are arranged in this order may be set as the intra-frame prediction mode of the current block. For example, mode number 0 and mode number 1 may be assigned to the planar mode and the DC mode, respectively, or mode number 0 and mode number 1 may be assigned to the DC mode and the planar mode, respectively. In this case, the intra-frame prediction mode index of the current block may be compared with the intra-frame prediction mode number belonging to the MPM group to determine the intra-frame prediction mode of the current block.
预测块大小确定模块330利用块变换大小确定当前块的预测块的大小。预测块的大小可以具有当前块的大小或当前块的子块的大小。The prediction block size determination module 330 determines the size of the prediction block of the current block using the block transform size. The size of the prediction block may have the size of the current block or the size of a subblock of the current block.
当预测块的大小等于当前块的大小时,利用当前块的帧内预测模式和当前块的参考像素来创建预测块。参考像素是在当前块之前重构或创建的像素。When the size of the prediction block is equal to the size of the current block, the prediction block is created using the intra prediction mode of the current block and the reference pixels of the current block. Reference pixels are pixels reconstructed or created before the current block.
当预测块的大小小于当前块的大小时,即在当前块可以被划分成多个子块并且对子块执行帧内预测时,使用相同的帧内预测模式(即,当前块的帧内预测模式)以创建各子块的预测块。利用先前子块的重构像素来创建第二子块或按解码顺序在第二子块之后的子块的预测块。因此,在以子块为单位创建了预测块、残差块和重构块之后,创建下一子块的预测块。When the size of the prediction block is smaller than the size of the current block, that is, when the current block can be divided into multiple subblocks and intra prediction is performed on the subblocks, the same intra prediction mode (that is, the intra prediction mode of the current block) is used to create the prediction blocks of each subblock. The prediction blocks of the second subblock or the subblocks following the second subblock in decoding order are created using the reconstructed pixels of the previous subblock. Therefore, after the prediction blocks, residual blocks, and reconstructed blocks are created in units of subblocks, the prediction blocks of the next subblock are created.
后面将描述上述操作的特定步骤。Specific steps of the above operation will be described later.
接着,参考像素有效性确定模块340确定与预测块的大小相对应的块的参考像素是否都是有效的。参考像素是先前被解码和重构的像素。Next, the reference pixel validity determination module 340 determines whether all reference pixels of a block corresponding to the size of the prediction block are valid. Reference pixels are pixels that have been previously decoded and reconstructed.
当确定参考像素中的至少一个是无效的时,参考像素有效性确定模块340创建参考像素。When it is determined that at least one of the reference pixels is invalid, the reference pixel validity determination module 340 creates a reference pixel.
具体地,当确定参考像素都不有效时,用值2L-1来代替参考像素值。这里,L表示的是表示亮度分量的灰阶的比特数。Specifically, when it is determined that none of the reference pixels are valid, the reference pixel value is replaced by a value of 2 L - 1. Here, L represents the number of bits representing the grayscale of the luminance component.
当相对于无效参考像素的位置仅在一个方向上存在有效参考像素时,有效参考像素中的最近的参考像素被复制以创建参考像素。When valid reference pixels exist only in one direction with respect to the position of the invalid reference pixel, the nearest reference pixel among the valid reference pixels is copied to create the reference pixel.
当相对于无效参考像素的位置在两个方向上存在有效参考像素时,在预定方向上位于最近位置的参考像素可以被复制,或者在两个方向上的两个最近的参考像素可以被取平均,以创建参考像素。When valid reference pixels exist in two directions relative to the position of an invalid reference pixel, a reference pixel located closest in a predetermined direction may be copied, or two closest reference pixels in two directions may be averaged to create a reference pixel.
参考像素滤波模块360确定参考像素是否应被滤波。根据重构的帧内预测模式和预测块的大小来对参考像素进行自适应地滤波。The reference pixel filtering module 360 determines whether the reference pixel should be filtered. The reference pixel is adaptively filtered according to the reconstructed intra prediction mode and the size of the prediction block.
当帧内预测模式是DC模式时,不对参考像素进行滤波。当帧内预测模式是垂直模式和水平模式时,帧内预测模块240也不对参考像素滤波。然而,当帧内预测模式是除了垂直模式和水平模式之外的方向性模式时,根据帧内预测模式和预测块的大小来对参考像素进行自适应地滤波。当预测块的大小是4x4时,为了减小复杂度,不管帧内预测模式都不对参考像素滤波。滤波用于使参考像素之间的像素值的变化平滑并且使用低通滤波器。低通滤波器可以是作为3抽头滤波器的[1,2,1]或者作为5抽头滤波器的[1,2,4,2,1]。当预测块的大小在8x8到32x32的范围内时,随着预测块大小的增加按更多的帧内预测模式来对参考像素进行滤波。When the intra prediction mode is DC mode, the reference pixels are not filtered. When the intra prediction mode is vertical mode and horizontal mode, the intra prediction module 240 also does not filter the reference pixels. However, when the intra prediction mode is a directional mode other than vertical mode and horizontal mode, the reference pixels are adaptively filtered according to the intra prediction mode and the size of the prediction block. When the size of the prediction block is 4x4, in order to reduce complexity, the reference pixels are not filtered regardless of the intra prediction mode. Filtering is used to smooth the changes in pixel values between reference pixels and a low-pass filter is used. The low-pass filter can be [1, 2, 1] as a 3-tap filter or [1, 2, 4, 2, 1] as a 5-tap filter. When the size of the prediction block is in the range of 8x8 to 32x32, the reference pixels are filtered according to more intra prediction modes as the prediction block size increases.
预测块创建模块370根据帧内预测模式来创建预测块。用于预测块的参考像素可以是根据预测块的大小和帧内预测模式被自适应滤波的像素。The prediction block creation module 370 creates a prediction block according to the intra prediction mode. Reference pixels used for the prediction block may be pixels adaptively filtered according to the size of the prediction block and the intra prediction mode.
在DC模式下,可以将位于(x=0,…,N-1,y=-1)位置的N个上参考像素、位于(x=-1,y=0,…,M-1)位置的M个左参考像素、和位于(x=-1,y=-1)位置的中心像素的平均值确定为预测块的预测像素。然而,可以利用平均值和与预测像素相邻的参考像素的加权平均来创建与参考像素相邻的预测像素。在平面模式下,可以与在DC模式相同的方式创建预测像素。In DC mode, the average value of the N upper reference pixels located at (x=0, ..., N-1, y=-1), the M left reference pixels located at (x=-1, y=0, ..., M-1), and the center pixel located at (x=-1, y=-1) can be determined as the predicted pixel of the prediction block. However, the predicted pixel adjacent to the reference pixel can be created using the average value and a weighted average of the reference pixels adjacent to the predicted pixel. In planar mode, the predicted pixel can be created in the same manner as in DC mode.
在垂直模式下,将位于垂直方向的参考像素设置为预测像素。然而,可以利用位于垂直方向的参考像素以及左参考像素之间的变化来创建与左参考像素相邻的各预测像素。所述变化表示中心参考像素和与预测像素相邻的左参考像素之间的变化。在水平模式下,除了方向,可以按与垂直模式相同的方式创建预测像素。In vertical mode, reference pixels located in the vertical direction are set as predicted pixels. However, each predicted pixel adjacent to the left reference pixel can be created using the change between the reference pixels located in the vertical direction and the left reference pixel. The change refers to the change between the center reference pixel and the left reference pixel adjacent to the predicted pixel. In horizontal mode, predicted pixels can be created in the same manner as in vertical mode, except for the direction.
图6是示出根据本发明的实施方式的重构块创建过程的示图。图6示出当预测块的大小等于当前块的大小时的重构块创建过程。Fig. 6 is a diagram illustrating a reconstructed block creation process according to an embodiment of the present invention. Fig. 6 illustrates a reconstructed block creation process when the size of a prediction block is equal to that of a current block.
首先,重构当前块的帧内预测模式(S210)。利用图3的步骤S120中描述的相同方法来重构帧内预测模式。First, the intra prediction mode of the current block is reconstructed (S210). The intra prediction mode is reconstructed using the same method described in step S120 of FIG. 3 .
然后,确定在当前块的预定位置的所有参考像素是否都有效(S220)。当在所述预定位置的参考像素中的至少一个无效时,创建在相应位置的无效的参考像素(S230)。创建参考像素的方法与图3的步骤S150中的相同。这里,预测块的大小等于当前块的大小。Then, it is determined whether all reference pixels at predetermined positions of the current block are valid (S220). When at least one of the reference pixels at the predetermined positions is invalid, an invalid reference pixel is created at the corresponding position (S230). The method of creating the reference pixel is the same as that in step S150 of Figure 3. Here, the size of the prediction block is equal to the size of the current block.
随后,确定当前块的参考像素是否被滤波(S240)。根据重构的帧内预测模式和当前块的大小,来确定参考像素是否应该被滤波。使用图3的步骤S170中描述的方法来确定参考像素是否应该被滤波。当确定当前块的参考像素应该被滤波时,对当前块的参考像素进行滤波(S250)。Subsequently, it is determined whether the reference pixels of the current block should be filtered (S240). Whether the reference pixels should be filtered is determined based on the reconstructed intra prediction mode and the size of the current block. Whether the reference pixels should be filtered is determined using the method described in step S170 of Figure 3. When it is determined that the reference pixels of the current block should be filtered, the reference pixels of the current block are filtered (S250).
然后,利用重构的帧内预测模式来创建当前块的预测块(S260)。利用重构的帧内预测模式来创建残差块(S270)。残差块的大小等于当前块的大小。Then, a prediction block of the current block is created using the reconstructed intra prediction mode (S260). A residual block is created using the reconstructed intra prediction mode (S270). The size of the residual block is equal to the size of the current block.
最后,将当前块的预测块和当前块的残差块相加以创建重构块(S280)。Finally, the prediction block of the current block and the residual block of the current block are added to create a reconstructed block (S280).
图7是示出根据本发明的另一个实施方式的重构块创建过程的示图。图7示出当预测块的大小小于当前块的大小时的当前块的重构块创建过程。FIG7 is a diagram illustrating a reconstructed block creation process according to another embodiment of the present invention. FIG7 illustrates a reconstructed block creation process of a current block when the size of a prediction block is smaller than that of the current block.
首先,重构当前块的帧内预测模式(S310)。利用与图3的步骤S120中的方法相同的方法来重构帧内预测模式。First, the intra prediction mode of the current block is reconstructed (S310). The intra prediction mode is reconstructed using the same method as that in step S120 of FIG. 3 .
确定将被解码的当前块的子块(S320)。A subblock of the current block to be decoded is determined (S320).
然后,确定在子块的预定位置的所有参考像素是否都有效(S330)。当在所述预定位置的参考像素中的至少一个无效时,创建在相应位置的无效的参考像素(S340)。创建参考像素的方法与图3的步骤S150中的相同。这里,预测块的大小等于当前块的大小。Then, it is determined whether all reference pixels at predetermined positions of the sub-block are valid (S330). When at least one of the reference pixels at the predetermined positions is invalid, an invalid reference pixel is created at the corresponding position (S340). The method of creating the reference pixel is the same as that in step S150 of FIG. 3. Here, the size of the prediction block is equal to the size of the current block.
随后,确定子块的参考像素是否应被滤波(S350)。根据重构的帧内预测模式和当前块的大小,来确定参考像素是否应该被滤波。使用图3的步骤S170中描述的方法来确定参考像素是否应该被滤波。当确定子块的参考像素应该被滤波时,对子块的参考像素进行滤波(S360)。Subsequently, it is determined whether the reference pixels of the sub-block should be filtered (S350). Whether the reference pixels should be filtered is determined based on the reconstructed intra prediction mode and the size of the current block. Whether the reference pixels should be filtered is determined using the method described in step S170 of Figure 3. If it is determined that the reference pixels of the sub-block should be filtered, the reference pixels of the sub-block are filtered (S360).
然后,利用重构的帧内预测模式来创建子块的预测块(S370)。利用重构的帧内预测模式来创建子块的残差块(S380)。Then, a prediction block of the sub-block is created using the reconstructed intra prediction mode (S370). A residual block of the sub-block is created using the reconstructed intra prediction mode (S380).
随后,将当前块的预测块和当前块的残差块相加以创建重构块(S390)。Subsequently, the prediction block of the current block and the residual block of the current block are added to create a reconstructed block (S390).
然后,确定子块是否为当前块的最后的子块(S395)。当子块不是当前块的最后子块时,重复执行从按编码顺序确定下一个子块的处理(S320)到创建子块的预测块的处理(S390)的过程。在这种情况下,按解码顺序在第一子块之后的子块使用重构的先前子块的一些像素作为子块的参考像素。由于在第一子块之后的子块中总存在无效的参考像素,所以可以在不执行步骤S330的处理的情况下执行步骤S340的处理。当子块的大小相同时,可以对第一子块执行参考像素滤波处理,但可以对后面的子块不执行参考像素滤波处理。Then, it is determined whether the subblock is the last subblock of the current block (S395). When the subblock is not the last subblock of the current block, the process from determining the next subblock in the encoding order (S320) to creating a prediction block for the subblock (S390) is repeated. In this case, subblocks subsequent to the first subblock in the decoding order use some pixels of the reconstructed previous subblock as reference pixels for the subblock. Since invalid reference pixels always exist in subblocks subsequent to the first subblock, the process of step S340 can be performed without performing the process of step S330. When the subblocks are of the same size, reference pixel filtering can be performed on the first subblock, but reference pixel filtering can be omitted for subsequent subblocks.
尽管已参照实施方式描述了本发明,但本领域技术人员能够理解的是,在不脱离所附权利要求描述的本发明的精神和范围的情况下,可以按各种形式修改和改变本发明。While the present invention has been described with reference to the embodiments, it will be apparent to those skilled in the art that the present invention can be modified and changed in various forms without departing from the spirit and scope of the invention as described in the appended claims.
Claims (9)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20110108455 | 2011-10-24 | ||
| KR10-2011-0108455 | 2011-10-24 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK1215641A1 HK1215641A1 (en) | 2016-09-02 |
| HK1215641B true HK1215641B (en) | 2019-09-13 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102292591B1 (en) | Method and apparatus for decoding image | |
| CN103931195B (en) | Method and apparatus for decoding intra prediction mode | |
| CN103931180B (en) | Image decoding apparatus | |
| CN103931186B (en) | image decoding device | |
| HK1215641B (en) | Method and apparatus for image decoding | |
| HK1215639B (en) | Method and apparatus for image decoding | |
| HK1215640B (en) | Method and apparatus for image decoding | |
| HK1215634B (en) | Method and apparatus for image decoding | |
| HK1215637B (en) | Method and apparatus for image decoding | |
| HK1215635B (en) | Method and apparatus for image decoding | |
| HK1215636B (en) | Method and apparatus for image decoding | |
| HK1215638B (en) | Method and apparatus for image decoding |