Movatterモバイル変換


[0]ホーム

URL:


CN101500161B - Inter-frame prediction method and apparatus based on adaptive block transformation - Google Patents

Inter-frame prediction method and apparatus based on adaptive block transformation
Download PDF

Info

Publication number
CN101500161B
CN101500161BCN 200810057281CN200810057281ACN101500161BCN 101500161 BCN101500161 BCN 101500161BCN 200810057281CN200810057281CN 200810057281CN 200810057281 ACN200810057281 ACN 200810057281ACN 101500161 BCN101500161 BCN 101500161B
Authority
CN
China
Prior art keywords
block
intra
prediction mode
image block
frame prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 200810057281
Other languages
Chinese (zh)
Other versions
CN101500161A (en
Inventor
王云飞
何芸
毛煦楠
郑萧桢
郑建铧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Huawei Technologies Co Ltd
Original Assignee
Tsinghua University
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University, Huawei Technologies Co LtdfiledCriticalTsinghua University
Priority to CN 200810057281priorityCriticalpatent/CN101500161B/en
Priority to PCT/CN2009/070287prioritypatent/WO2009097809A1/en
Publication of CN101500161ApublicationCriticalpatent/CN101500161A/en
Application grantedgrantedCritical
Publication of CN101500161BpublicationCriticalpatent/CN101500161B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

一种基于自适应块变换的帧内预测方法及装置,其主要包括:获取相邻图像块的帧内预测模式;在相邻图像块与当前图像块的块尺寸不一致时,则根据相邻图像块帧内预测模式映射得到在当前图像块尺寸下的映射帧内预测模式;并根据所述得到的映射帧内预测模式获得当前图像块帧内预测模式。本发明实施例中,由于采用了根据相邻图像块采用的帧内预测模式为当前图像块选择帧内预测模式的实现方式,从而使得在当前图像块与相邻图像块尺寸不一致,且相邻图像块与当前图像块帧内预测模式也不一致时,仍然能够为当前图像块确定相应的帧内预测模式。

Figure 200810057281

A method and device for intra-frame prediction based on adaptive block transformation, which mainly includes: obtaining the intra-frame prediction mode of an adjacent image block; when the block size of the adjacent image block is inconsistent with that of the current image block, The intra prediction mode of the block is mapped to obtain the mapped intra prediction mode under the size of the current image block; and the intra prediction mode of the current image block is obtained according to the obtained mapped intra prediction mode. In the embodiment of the present invention, since the implementation of selecting the intra-frame prediction mode for the current image block according to the intra-frame prediction mode adopted by the adjacent image block is adopted, the size of the current image block is inconsistent with that of the adjacent image block, and the adjacent image block When the intra-frame prediction mode of the image block is not consistent with that of the current image block, the corresponding intra-frame prediction mode can still be determined for the current image block.

Figure 200810057281

Description

Translated fromChinese
基于自适应块变换的帧内预测方法及装置Intra prediction method and device based on adaptive block transform

技术领域technical field

本发明涉及视频编解码技术领域,尤其涉及一种视频压缩编解码技术。 The present invention relates to the technical field of video coding and decoding, in particular to a video compression coding and decoding technology. the

背景技术Background technique

在视频和图像编解码过程中,为减小视频和图像数据在传输或存储时的数据量,通常需要采用相应的压缩编解码技术。在视频和图像压缩编码过程中需要采用变换技术将一副图像、一个区域中的图像内容及信息经变换后集中于某一特定区域,以便在视频压缩算法对相应内容进行有效的压缩。具体可以将一幅图像或图像中的一个区域被划分成若干小块或子区域(称为子块,亦可称之为图像块),之后再子块为单位进行变换。其中,子块的大小可以但不限于为4×4或8×8等,相应的4和8均以图像像素为单位。在视频和图像编码解码中通常以16×16的图像块为一个编解码处理单元,这个单元成为宏块。一个宏块还有可能会进一步划分成若干尺寸更小的子块,在现有文献中,子块和宏块都可统称为图像块。 In the process of video and image encoding and decoding, in order to reduce the data volume of video and image data during transmission or storage, it is usually necessary to adopt corresponding compression encoding and decoding technologies. In the process of video and image compression and encoding, transformation technology is needed to concentrate an image, image content and information in a region in a specific region after transformation, so that the corresponding content can be effectively compressed in the video compression algorithm. Specifically, an image or an area in the image may be divided into several small blocks or sub-areas (called sub-blocks, or image blocks), and then transformed in units of sub-blocks. Wherein, the size of the sub-block may be, but not limited to, 4×4 or 8×8, and the corresponding 4 and 8 are both in units of image pixels. In video and image coding and decoding, a 16×16 image block is usually used as a codec processing unit, and this unit becomes a macroblock. A macroblock may be further divided into several sub-blocks with smaller sizes. In the existing literature, both sub-blocks and macroblocks can be collectively referred to as image blocks. the

在进行子块划分过程中,具体可以将一个特定区域分别按照不同的子块大小进行划分,然后针对不同大小的子块进行不同的变换处理,称为自适应块大小的变换技术。这里所说的变换是指具有一定数学特性的数据处理方法,例如DCT(离散余弦变换)、小波变换、整数变换等。在视频和图像编码解码中这些变换通常以矩阵形式表示。 In the process of sub-block division, specifically, a specific area can be divided according to different sub-block sizes, and then different transformation processes are performed on sub-blocks of different sizes, which is called adaptive block size transformation technology. The transformation mentioned here refers to a data processing method with certain mathematical characteristics, such as DCT (discrete cosine transform), wavelet transform, integer transform, etc. These transformations are usually expressed in matrix form in video and image coding and decoding. the

在自适应块尺寸变换技术中存在多种变换模式时,部分宏块可以单独使用一种变换模式,所述的变换模式是指变换及变换相应的编解码处理方式,例如,一个大小为16×16的宏块中所有子块都划分成8×8大小,并且所有子块均采用8×8的变换及与变换相应的编码及解码技术(即采用一种变换模式)。 同时,部分宏块中的子块可以使用不同的变换模式,例如:在一个16×16的宏块中若含有4×4、4×8、8×4及8×8几种子块类型,则可以分别使用4×4、4×8、8×4及8×8各自对应的变换模式。 When there are multiple transformation modes in the adaptive block size transformation technology, some macroblocks can use one transformation mode alone. The transformation mode refers to the transformation and the corresponding codec processing method for transformation. For example, a All sub-blocks in the 16-macroblock are divided into 8×8 sizes, and all sub-blocks adopt 8×8 transformation and encoding and decoding techniques corresponding to the transformation (that is, adopt a transformation mode). At the same time, sub-blocks in some macroblocks can use different transformation modes, for example: if a 16×16 macroblock contains 4×4, 4×8, 8×4 and 8×8 sub-block types, Then the transform modes corresponding to 4×4, 4×8, 8×4 and 8×8 can be used respectively. the

自适应块大小的变换技术可以与帧内预测技术相结合。在帧内编解码技术中,对于当前待编码或解码图像块需要预测得到一个帧内预测模式,以用于进行相应的编码或解码操作。预测得到的帧内预测模式是根据当前图像块相邻图像块的帧内预测模式确定。通常情况下,当前图像块需要获得当前图像块上边块和/或左边块的帧内预测模式,通过事先设定好的方法得到当前图像块的帧内预测模式。在得到当前图像块的帧内预测模式之后,在编码端还会计算当前图像块的最佳帧内编码模式,若最佳的帧内模式与当前图像块的帧内预测模式不同,则所述最佳帧内预测模式会与当前图像块的帧内预测模式进行事先设定好的逻辑运算与数学运算,计算所得结果会写入码流中;在解码端则会根据码流中信息,通过与编码端相同的方法得到当前图像块的帧内预测模式,将得到当前的帧内预测模式与码流中信息进行预先设定好的逻辑运算与数学运算得到当前图像块的最佳帧内预测模式。在自适应块变换技术中,当前待编码图像块与相邻图像块的编码图像块尺寸不一致时,例如,当前图像块大小为8×8,相邻图像块大小为4×4时,则取与8×8块最近的4×4块帧内预测模式作为8×8块的帧内预测模式。 Adaptive block size transform technology can be combined with intra prediction technology. In the intra-frame encoding and decoding technology, an intra-frame prediction mode needs to be predicted for the current image block to be encoded or decoded, so as to perform corresponding encoding or decoding operations. The predicted intra-frame prediction mode is determined according to the intra-frame prediction modes of adjacent image blocks of the current image block. Usually, the current image block needs to obtain the intra prediction mode of the upper block and/or the left block of the current image block, and obtain the intra prediction mode of the current image block through a preset method. After obtaining the intra-frame prediction mode of the current image block, the encoding end will also calculate the best intra-frame coding mode of the current image block, if the best intra-frame mode is different from the intra-frame prediction mode of the current image block, then the The optimal intra-frame prediction mode will perform pre-set logical and mathematical operations with the intra-frame prediction mode of the current image block, and the calculated results will be written into the code stream; at the decoding end, it will be based on the information in the code stream, through Get the intra-frame prediction mode of the current image block in the same way as the encoding side, and perform pre-set logical and mathematical operations on the obtained current intra-frame prediction mode and the information in the code stream to obtain the best intra-frame prediction of the current image block model. In the adaptive block transformation technology, when the size of the current image block to be encoded is inconsistent with that of the adjacent image block, for example, when the size of the current image block is 8×8 and the size of the adjacent image block is 4×4, the The nearest 4x4 block intra prediction mode to the 8x8 block is used as the intra prediction mode of the 8x8 block. the

在实现本发明过程中,发明人发现现有技术中至少存在如下问题: In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art:

上述现有技术提供的确定当前图像块的帧内预测模式的方式的前提是:不同尺寸的块采用的各种预测模式一致。因此,在当前图像块与相邻图像块尺寸不一致,且相邻图像块与当前图像块各种预测模式也不一致时,则无法使用上述方式预测确定当前图像块的帧内预测模式。 The premise of the manner of determining the intra prediction mode of the current image block provided by the above prior art is that the various prediction modes adopted by blocks of different sizes are consistent. Therefore, when the size of the current image block is inconsistent with that of the adjacent image block, and the various prediction modes of the adjacent image block and the current image block are also inconsistent, the above method cannot be used to predict and determine the intra prediction mode of the current image block. the

发明内容Contents of the invention

本发明的实施例提供了一种基于自适应块变换的帧内预测方法及装置,以使得在当前图像块与相邻图像块尺寸不一致,且相邻图像块与当前图像块各种预测模式也不一致时,仍然能够为当前图像块准确确定相应的帧内预测模式。 Embodiments of the present invention provide an intra-frame prediction method and device based on adaptive block transformation, so that the size of the current image block is inconsistent with that of the adjacent image block, and the various prediction modes of the adjacent image block and the current image block are also When they are inconsistent, the corresponding intra-frame prediction mode can still be accurately determined for the current image block. the

一种帧内预测方法,包括: A method for intra-frame prediction, comprising:

获取相邻图像块的帧内预测模式; Obtain the intra prediction mode of the adjacent image block;

相邻图像块与当前图像块的块尺寸不一致时,根据相邻图像块帧内预测模式映射得到在当前图像块尺寸下的映射帧内预测模式; When the block size of the adjacent image block is inconsistent with the block size of the current image block, the intra prediction mode of the current image block size is mapped according to the intra prediction mode mapping of the adjacent image block;

根据所述得到的映射帧内预测模式获得当前图像块帧内预测模式。 The intra prediction mode of the current image block is obtained according to the obtained mapped intra prediction mode. the

一种基于自适应块变换的帧内预测装置,包括: A device for intra prediction based on adaptive block transform, comprising:

模式获取单元,用于获取相邻图像块的帧内预测模式; A mode acquisition unit, used to acquire the intra prediction mode of adjacent image blocks;

模式预测单元,用于在相邻图像块与当前图像块的块尺寸不一致时,根据所述模式获取单元获取的相邻图像块帧内预测模式映射得到在当前图像块尺寸下的映射帧内预测模式,根据得到的映射帧内预测模式获得当前图像块帧内预测模式。 The mode prediction unit is used to obtain the mapped intra prediction under the size of the current image block according to the intra prediction mode mapping of the adjacent image block acquired by the mode acquisition unit when the block size of the adjacent image block is inconsistent with that of the current image block mode, and obtain the intra prediction mode of the current image block according to the obtained mapping intra prediction mode. the

由上述本发明的实施例提供的技术方案可以看出,由于采用了根据相邻图像块采用的帧内预测模式为当前图像块选择帧内预测模式的实现方式,从而使得在当前图像块与相邻图像块尺寸不一致,且相邻图像块与当前图像块各种预测模式也不一致时,仍然能够为当前图像块准确确定相应的帧内预测模式;同时,还可以提高为当前图像块选择的帧内预测模式的准确性。 It can be seen from the above-mentioned technical solutions provided by the embodiments of the present invention that since the implementation of selecting the intra prediction mode for the current image block according to the intra prediction mode adopted by the adjacent image blocks is adopted, the current image block and the corresponding When the size of adjacent image blocks is inconsistent, and the various prediction modes of adjacent image blocks and the current image block are also inconsistent, the corresponding intra-frame prediction mode can still be accurately determined for the current image block; at the same time, the frame selected for the current image block can also be improved. The accuracy of the intra-prediction model. the

附图说明Description of drawings

图1为本发明实施例中应用的8×8块能够采用的帧内预测模式的方向角度示意图; Fig. 1 is a schematic diagram of the directions and angles of the intra prediction modes that can be used in the 8×8 block applied in the embodiment of the present invention;

图2为本发明实施例中应用的4×4块能够采用的帧内预测模式的方向角度示意图; FIG. 2 is a schematic diagram of the direction and angle of the intra prediction mode that can be used by the 4×4 block applied in the embodiment of the present invention;

图3为本发明实施例提供的装置的结构示意图一; Fig. 3 is the structural representation one of the device that the embodiment of the present invention provides;

图4为本发明实施例提供的装置的结构示意图二。 Fig. 4 is a second structural schematic diagram of the device provided by the embodiment of the present invention. the

具体实施方式Detailed ways

本发明实施例中,根据相邻图像块与当前图像块采用的帧内预测模式(即帧内编码模式)的方向性相关的特点,提供了一种为当前图像块选择帧内预测模式的实现机制,以使得在相邻图像块与当前图像块大小不一致时,仍然能够为当前图像块选择相应的帧内预测模式。 In the embodiment of the present invention, according to the characteristics of the directional correlation between adjacent image blocks and the intra prediction mode (ie intra coding mode) adopted by the current image block, an implementation of selecting an intra prediction mode for the current image block is provided Mechanism, so that when the size of the adjacent image block is inconsistent with the size of the current image block, the corresponding intra prediction mode can still be selected for the current image block. the

进一步地,在自适应块变换技术中,若当前图像块与相邻图像块大小不一致时,当前图像块的帧内预测过程包括:在获取相邻图像块的帧内预测模式后,将相邻图像块帧内预测模式映射得到该相邻图像块在当前图像块尺寸下的映射帧内预测模式,并可以根据该相邻图像块的映射帧内预测模式确定当前图像块的帧内预测模式;具体可以在当前图像块对应的帧内预测模式集合(即当前图像块能够选择的帧内预测模式)中选择一种与该相邻图像块的帧内预测模式方向最接近的帧内预测模式作为相邻图像块的映射帧内预测模式,进而确定相应的当前图像块帧内预测模式。 Furthermore, in the adaptive block transformation technology, if the size of the current image block is inconsistent with that of the adjacent image block, the intra-frame prediction process of the current image block includes: after obtaining the intra-frame prediction mode of the adjacent image block, the adjacent image block The intra prediction mode mapping of the image block obtains the mapped intra prediction mode of the adjacent image block under the size of the current image block, and can determine the intra prediction mode of the current image block according to the mapped intra prediction mode of the adjacent image block; Specifically, an intra prediction mode closest to the direction of the intra prediction mode of the adjacent image block may be selected from the intra prediction mode set corresponding to the current image block (that is, the intra prediction mode that can be selected by the current image block) as The intra-frame prediction mode of the adjacent image block is mapped to determine the corresponding intra-frame prediction mode of the current image block. the

当相邻图像块中包含多个上边块或左边块时,则相应的相邻图像块帧内预测模式具体可以根据上边块帧内预测模式和左边块帧内预测模式确定,其中,相应的上边块帧内预测模式或左边块帧内预测模式的确定方式可以包括:计算多个上边块或左边块对应的帧内预测模式的方向角度的平均值,根据所述平均值在当前图像块可以选择的帧内预测模式中选择方向角度与该平均值最相似的帧内预测模式,即选择与该平均值的方向角度最接近的帧内预测模式,以作为相应的上边块帧内预测模式或左边块帧内预测模式。 When the adjacent image block contains multiple upper blocks or left blocks, the corresponding intra prediction mode of the adjacent image block can be specifically determined according to the intra prediction mode of the upper block and the intra prediction mode of the left block, wherein the corresponding upper block The method for determining the intra-frame prediction mode of the block or the intra-frame prediction mode of the left block may include: calculating the average value of the direction angles of the intra-frame prediction modes corresponding to the upper block or the left block, and the current image block can be selected according to the average value Select the intra-frame prediction mode whose direction angle is most similar to the average value among the intra-frame prediction modes, that is, select the intra-frame prediction mode whose direction angle is the closest to the average value, as the corresponding intra-frame prediction mode of the upper block or the left Block intra prediction mode. the

本发明实施例中,相邻图像块的上边块可以为水平方向上与当前图像块左上角距离最近的图像块,当存在两个或多个与当前图像块左上角等距离的图像块时,则取光栅扫描顺序下最先获得的图像块作为相邻图像块;或者,相邻图像块的左边块可以为垂直方向上与当前图像块左上角距离最近的图像块,当存在两个或多个与当前图像块左上角等距离的图像块时,则取光栅扫描顺序下最先获得的图像块作为相邻图像块。 In the embodiment of the present invention, the upper block of the adjacent image block may be the image block closest to the upper left corner of the current image block in the horizontal direction. When there are two or more image blocks equidistant from the upper left corner of the current image block, Then take the image block obtained first in the raster scan sequence as the adjacent image block; or, the left block of the adjacent image block can be the image block closest to the upper left corner of the current image block in the vertical direction, when there are two or more If there is an image block equidistant from the upper left corner of the current image block, the image block obtained first in the raster scan order is taken as the adjacent image block. the

本发明实施例中,若相邻图像块帧内预测模式为根据上边块帧内预测模式和左边块帧内预测模式确定,则可以将相应的上边块帧内预测模式和左边块帧内预测模式中的最小值作为当前图像块的帧内预测模式,即选择两者中的较小值作为当前图像块的帧内预测模式。 In the embodiment of the present invention, if the intra prediction mode of the adjacent image block is determined according to the intra prediction mode of the upper block and the intra prediction mode of the left block, the corresponding intra prediction mode of the upper block and the intra prediction mode of the left block can be determined The minimum value among is used as the intra-frame prediction mode of the current image block, that is, the smaller value of the two is selected as the intra-frame prediction mode of the current image block. the

在上述实现方案中,可选地,为便于相邻图像块帧内预测模式的快速确定,还可以预先保存当前图像块能够选择的帧内预测模式与相邻图像块能够选择的帧内预测模式之间的对应关系,以便于利用相应的对应关系直接查找确定相应的相邻图像块帧内预测模式,进而准确确定相应的当前图像块帧内预测模式。 In the above implementation scheme, optionally, in order to facilitate the rapid determination of the intra-frame prediction modes of adjacent image blocks, the intra-frame prediction modes that can be selected by the current image block and the intra-frame prediction modes that can be selected by adjacent image blocks can also be saved in advance The corresponding relationship between them is used to directly search and determine the corresponding intra-frame prediction mode of the adjacent image block by using the corresponding corresponding relationship, and then accurately determine the corresponding intra-frame prediction mode of the current image block. the

上述本发明实施例提供的基于自适应块变换的帧内预测方案既可以应用于编码端,也可以应用于解码端,以有效提高编解码的性能及效率。 The intra-frame prediction scheme based on adaptive block transformation provided by the above-mentioned embodiments of the present invention can be applied to both the encoding end and the decoding end, so as to effectively improve the performance and efficiency of encoding and decoding. the

为便于对本发明实施例的理解,下面将结合附图以具体的例子对本发明实施例的具体应用进行详细说明。 In order to facilitate the understanding of the embodiments of the present invention, the specific application of the embodiments of the present invention will be described in detail below with specific examples in conjunction with the accompanying drawings. the

首先,举例对不同大小的块可以采用的帧内预测模式进行说明,具体以8×8块和4×4块为例进行说明: First, an example is given to illustrate the intra prediction modes that can be used for blocks of different sizes, specifically taking 8×8 blocks and 4×4 blocks as examples:

若当前图像块的大小为8×8,则当前图像块的帧内预测模式,即8×8块的帧内预测模式可以如表1所示: If the size of the current image block is 8×8, the intra prediction mode of the current image block, that is, the intra prediction mode of the 8×8 block can be shown in Table 1:

                表1  Table 1

  IntraLumaPredMode  (帧内预测模式的序号)IntraLumaPredMode (the serial number of the intra prediction mode) 名称name  00 Intra_8×8_VerticalIntra_8×8_Vertical  1 1 Intra_8×8_HorizontalIntra_8×8_Horizontal  2 2 Intra_8×8_DCIntra_8×8_DC  33 Intra_8×8_Down_LeftIntra_8×8_Down_Left  44 Intra_8×8_Down_RightIntra_8×8_Down_Right

如图1所示,在8×8块帧内预测模式中,各个帧内预测模式的方向如相应的箭头线所示。 As shown in FIG. 1 , in the 8×8 block intra-frame prediction mode, the directions of each intra-frame prediction mode are indicated by corresponding arrow lines. the

若当前图像块的大小为4×4,则当前图像块的帧内预测模式,即4×4块的 帧内预测模式可以如表2所示: If the size of the current image block is 4×4, the intra prediction mode of the current image block, that is, the intra prediction mode of the 4×4 block can be shown in Table 2:

                        表2  Table 2

  IntraLumaPredMode  (帧内预测模式的序号)IntraLumaPredMode (the serial number of the intra prediction mode)  名称name  00  Intra_LumaDown_LeftIntra_LumaDown_Left  1 1  Intra_Luma_Vertical_LeftIntra_Luma_Vertical_Left  2 2  Intra_Luma_VerticalIntra_Luma_Vertical  33  Intra_Luma_Vertical_RightIntra_Luma_Vertical_Right  44  Intra_Luma_Down_RightIntra_Luma_Down_Right  55  Intra_Luma_Horizontal_DownIntra_Luma_Horizontal_Down  66  Intra_Luma_HorizontalIntra_Luma_Horizontal  77  Intra_Luma_Horizontal_UpIntra_Luma_Horizontal_Up  8 8  Intra_Luma_DCIntra_Luma_DC

如图2所示,在4×4块帧内预测模式中,各个帧内预测模式的方向如相应的箭头线所示。 As shown in FIG. 2 , in the 4×4 block intra-frame prediction mode, the direction of each intra-frame prediction mode is indicated by the corresponding arrow lines. the

本发明实施例中,在4×4及8×8帧内预测时,均需获得当前图像块的上边块和左边块的帧内预测模式,记为IntraPredModeA和IntraPredModeB,然后通过一定的计算公式获得当前图像块的帧内预测模式IntraPredMode,具体可为: In the embodiment of the present invention, when performing 4×4 and 8×8 intra-frame prediction, it is necessary to obtain the intra-frame prediction modes of the upper block and the left block of the current image block, which are recorded as IntraPredModeA and IntraPredModeB, and then obtained through a certain calculation formula The intra prediction mode IntraPredMode of the current image block, specifically:

IntraPredMode=Min(IntraPredModeA,IntraPredModeB); IntraPredMode = Min(IntraPredModeA, IntraPredModeB);

在上述计算公式中,若上边块或左边块的大小与当前图像块的大小不同,则需要将相应的上边块或左边块的帧内预测模式转换到与当前图像块大小对应的帧内预测模式,即IntraPredModeA和IntraPredModeB分别为当前图像块大小对应的帧内预测模式。 In the above calculation formula, if the size of the upper or left block is different from the size of the current image block, the intra prediction mode of the corresponding upper or left block needs to be converted to the intra prediction mode corresponding to the size of the current image block , that is, IntraPredModeA and IntraPredModeB are the intra prediction modes corresponding to the size of the current image block, respectively. the

下面将对相应的转换处理过程的实现进行说明。 The implementation of the corresponding conversion process will be described below. the

参见图1和图2可知,相应的4×4和8×8的各种帧内预测模式在方向上具有相似性,例如,8×8块的预测模式3、1、4、0分别与4×4块的模式7(或0,这两种帧内预测模式的方向与8×8的模式3相似)、6、4、2相似。 Referring to Figure 1 and Figure 2, it can be seen that the corresponding 4×4 and 8×8 intra-frame prediction modes are similar in direction, for example, the prediction modes 3, 1, 4, and 0 of 8×8 blocks are respectively related to 4 Mode 7 (or 0, the direction of these two intra prediction modes is similar to mode 3 for 8×8), 6, 4, and 2 for a ×4 block are similar. the

若当前图像块为4×4块,相邻图像块为8×8块,则当前的4×4块的相邻图像块预测模式可以在4×4块所有可以采用的帧内预测模式中寻找与相邻图像块 的帧内预测模式的方向最相似的帧内预测模式作为当前图像块的帧内预测模式,例如,8×8块的帧内预测模式4与4×4块中的帧内预测模式4方向一致。 If the current image block is a 4×4 block and the adjacent image block is an 8×8 block, then the prediction mode of the adjacent image block of the current 4×4 block can be found in all available intra prediction modes of the 4×4 block The intra prediction mode most similar to the direction of the intra prediction mode of the adjacent image block is used as the intra prediction mode of the current image block, for example, the intra prediction mode 4 of the 8×8 block is the same as the intra prediction mode of the 4×4 block Forecast mode 4 is in the same direction. the

若当前图像块为8×8块,相邻图像块为4×4块,则也可以通过寻找4×4块的帧内预测模式在8×8块对应的各帧内预测模式中的方向最相似的帧内预测模式,并以此作为当前的8×8块的相邻图像块的帧内预测模式,即Intra8×8PredModeA或Intra8×8PredModeB,可以称为Intra8×8PredModeN。例如,相邻的4×4块的帧内预测模式为3或4,则用于确定当前图像块的帧内预测模式的参数Intra8×8PredModeA或Intra8×8PredModeB的值为4。 If the current image block is an 8×8 block and the adjacent image block is a 4×4 block, then the direction of the intra prediction mode of the 4×4 block in each intra prediction mode corresponding to the 8×8 block can also be found to be the best. A similar intra-frame prediction mode is used as the intra-frame prediction mode of the adjacent image block of the current 8×8 block, that is, Intra8×8PredModeA or Intra8×8PredModeB, which may be called Intra8×8PredModeN. For example, if the intra prediction mode of the adjacent 4×4 block is 3 or 4, the value of the parameter Intra8×8PredModeA or Intra8×8PredModeB used to determine the intra prediction mode of the current image block is 4. the

进一步地,对于不同块尺寸间帧内预测模式的转换方式,下面将再以相应的具体转换实例进行说明。 Further, for the conversion manner of the intra prediction mode between different block sizes, the corresponding specific conversion examples will be described below. the

转换实例一 Conversion example one

相应的8×8块和4×4块分别使用如图1、2所示的帧内预测模式。若当前图像块为8×8块且当前图像块上边块或左边块(即当前图像块的相邻图像块)为4×4块,则当前图像块的上边(或左边)块的预测模式Intra8×8PredModeN(N为A或B,A和B分别代指上边块和左边块)的求解方式可以包括步骤: Corresponding 8×8 blocks and 4×4 blocks use intra-frame prediction modes as shown in Figures 1 and 2, respectively. If the current image block is an 8×8 block and the upper or left block of the current image block (that is, the adjacent image block of the current image block) is a 4×4 block, then the prediction mode of the upper (or left) block of the current image block is Intra8 The solution method of ×8PredModeN (N is A or B, A and B refer to the upper block and the left block respectively) may include steps:

(1)获得与当前图像块相邻的上边(或左边)4×4块的帧内预测模式,记为Intra4×4PredModeN(N为A或B,A和B分别指代上边块和左边块),其中所述相邻的4×4块可定义为与当前图像块左上角最近的4×4块,当存在两个或多个与当前图像块左上角等距的4×4块时,则取光栅扫描顺序下最先获得的4×4块; (1) Obtain the intra prediction mode of the upper (or left) 4×4 block adjacent to the current image block, denoted as Intra4×4PredModeN (N is A or B, and A and B refer to the upper block and the left block respectively) , wherein the adjacent 4×4 block can be defined as the nearest 4×4 block to the upper left corner of the current image block, when there are two or more 4×4 blocks equidistant from the upper left corner of the current image block, then Take the first obtained 4×4 block in raster scan order;

(2)根据4×4块和8×8块间的帧内预测模式的方向相似性将相应的Intra4×4PredModeN映射为8×8尺寸下的帧内预测模式Intra8×8PredModeN作为4×4块的映射帧内预测模式。 (2) Map the corresponding Intra4×4PredModeN to the intra prediction mode Intra8×8PredModeN under the 8×8 size according to the directional similarity of the intra prediction mode between the 4×4 block and the 8×8 block as the 4×4 block Maps intra prediction modes. the

其中,为了提高编解码端效率,便于上述转换过程的实现,具体可以在编解码端分别设置一张查询表,以用于实现块尺寸为4×4和8×8之间的帧内预 测模式映射,例如,在上述步骤(2)中可以根据Intra4×4PredModeN查表获取相应的4×4块的映射帧内预测模式Intra8×8PredModeN,具体地,相应的Intra4×4PredModeN到Intra8×8PredModeN的映射关系表,即映射过程中应用的查询表可以如表3所示: Among them, in order to improve the efficiency of the codec end and facilitate the realization of the above conversion process, specifically, a lookup table can be set at the codec end to realize intra prediction with a block size between 4×4 and 8×8 Mode mapping, for example, in the above step (2), the mapping intra prediction mode Intra8×8PredModeN of the corresponding 4×4 block can be obtained according to the Intra4×4PredModeN table lookup, specifically, the mapping from the corresponding Intra4×4PredModeN to Intra8×8PredModeN The relational table, that is, the query table applied in the mapping process can be shown in Table 3:

                            表3  table 3

 Intra4×4PredModeNIntra4×4PredModeN  00  1 1  2 2  33  44  55  66  77  8 8 Intra8×8PredModeNIntra8×8PredModeN  33  00  00  00  44  1 1  1 1  1 1  2 2

其中,表内数字为帧内预测模式的序号。 Wherein, the numbers in the table are the serial numbers of the intra prediction modes. the

其中,Intra4×4PredModeN中的帧内预测模式8和Intra8×8PredModeN中的帧内预测模式2均对应为DC模式,DC模式为一种特殊的帧内预测模式。 Wherein, the intra prediction mode 8 in Intra4×4PredModeN and the intra prediction mode 2 in Intra8×8PredModeN both correspond to the DC mode, and the DC mode is a special intra prediction mode. the

可见,通过上述表3,则在编解码过程中,可以快速、准确地获得当前图像块的帧内预测模式。 It can be seen that from the above Table 3, the intra prediction mode of the current image block can be quickly and accurately obtained during the encoding and decoding process. the

转换实例二 Conversion example two

当前图像块为8×8块且当前图像块上边块或左边块(即当前图像块的相邻图像块)为4×4块时,当前图像块的边界(上边界或左边界)与两个4×4块的边界重合。由于该两个4×4块均与当前8×8块相邻,此时,相应的获取Intra8×8PredModeN的处理过程可以包括步骤: When the current image block is an 8×8 block and the upper or left block of the current image block (that is, the adjacent image block of the current image block) is a 4×4 block, the boundary (upper boundary or left boundary) of the current image block and two The boundaries of the 4×4 blocks coincide. Since the two 4×4 blocks are adjacent to the current 8×8 block, at this time, the corresponding process of obtaining Intra8×8PredModeN may include steps:

(1)需要确定与当前图像块相邻的两个4×4块的帧内预测模式,记为Intra4×4PredModeN1和Intra4×4PredModeN2; (1) It is necessary to determine the intra prediction modes of two 4×4 blocks adjacent to the current image block, which are recorded as Intra4×4PredModeN1 and Intra4×4PredModeN2;

(2)根据相应的Intra4×4PredModeN1和Intra4×4PredModeN2计算所述Intra8×8PredModeN,具体的计算方式可以为:计算Intra4×4PredModeN1和Intra4×4PredModeN2所对应预测方向角度的平均值,根据所述平均值查找8×8块对应的帧内预测模式中与该平均值最相似的方向的帧内预测模式作为所述Intra8×8PredModeN;例如: (2) Calculate the Intra8×8PredModeN according to the corresponding Intra4×4PredModeN1 and Intra4×4PredModeN2. The specific calculation method can be: calculate the average value of the predicted direction angle corresponding to the Intra4×4PredModeN1 and Intra4×4PredModeN2, and search according to the average value Among the intra prediction modes corresponding to the 8×8 block, the intra prediction mode in the direction most similar to the average value is used as the Intra8×8PredModeN; for example:

若所述的Intra4×4PredModeN1和Intra4×4PredModeN2分别为0和4,则其所对应的角度分别为左下45度和右下45度,平均值垂直向下(即对应相应 的帧内预测模式2),可见,其与8×8块对应的帧内预测模式中的0模式相对应,故Intra8×8PredModeN值为0; If the Intra4×4PredModeN1 and Intra4×4PredModeN2 are 0 and 4 respectively, the corresponding angles are respectively 45 degrees to the lower left and 45 degrees to the lower right, and the average value is vertically downward (that is, corresponding to the corresponding intra prediction mode 2) , it can be seen that it corresponds to the 0 mode in the intra prediction mode corresponding to the 8×8 block, so the value of Intra8×8PredModeN is 0; 

若Intra4×4PredModeN1和Intra4×4PredModeN2分别为0和7,则其所对应的角度分别为左下45度和右上22.5度,则平均值为左下33.75度,此时,对应于8×8块的帧内预测模式中的帧内预测模式4(左下45度)与所获得平均值最为接近,故Intra8×8PredModeN值为帧内预测模式4。 If Intra4×4PredModeN1 and Intra4×4PredModeN2 are 0 and 7 respectively, the corresponding angles are 45 degrees to the lower left and 22.5 degrees to the upper right, and the average value is 33.75 degrees to the lower left. At this time, it corresponds to the intra frame of 8×8 blocks The intra prediction mode 4 (lower left 45 degrees) among the prediction modes is closest to the obtained average value, so the value of Intra8×8PredModeN is intra prediction mode 4. the

转换实例三 Conversion example three

相应的8×8块和4×4块分别使用如图1、2所示的帧内预测模式。若当前图像块为4×4块且当前图像块上边块或左边块(即当前图像块的相邻图像块)为8×8块,则当前图像块的上边(或左边)块的预测模式Intra4×4PredModeN(N为A或B,A和B分别代指上边块和左边块)的求解方式可以包括步骤: Corresponding 8×8 blocks and 4×4 blocks use intra-frame prediction modes as shown in Figures 1 and 2, respectively. If the current image block is a 4×4 block and the upper or left block of the current image block (that is, the adjacent image block of the current image block) is an 8×8 block, then the prediction mode of the upper (or left) block of the current image block is Intra4 The solution method of ×4PredModeN (N is A or B, A and B refer to the upper block and the left block respectively) may include steps:

(1)获得与当前图像块相邻的上边(或左边)8×8块的帧内预测模式,记为Intra8×8PredModeN(N为A或B,A和B分别指代上边块和左边块),其中,相邻的8×8块可定义为与当前图像块左上角最近的8×8块,当存在两个或多个与当前图像块左上角等距的8×8块时,则取光栅扫描顺序下最先获得的8×8块; (1) Obtain the intra prediction mode of the upper (or left) 8×8 block adjacent to the current image block, which is recorded as Intra8×8PredModeN (N is A or B, and A and B refer to the upper block and the left block respectively) , where the adjacent 8×8 block can be defined as the nearest 8×8 block to the upper left corner of the current image block, when there are two or more 8×8 blocks equidistant from the upper left corner of the current image block, then take The first 8×8 block obtained in raster scan order;

(2)根据4×4块和8×8块间的帧内预测模式的方向相似性将Intra8×8PredModeN映射为4×4块尺寸下的帧内预测模式Intra4×4PredModeN作为8×8块的映射帧内预测模式。 (2) Map Intra8×8PredModeN to the intra prediction mode Intra4×4PredModeN under the 4×4 block size according to the directional similarity of the intra prediction mode between the 4×4 block and the 8×8 block as the mapping of the 8×8 block Intra prediction mode. the

其中,为了提高编解码端效率,便于上述转换过程的实现,具体可以在编解码端分别设置一张查询表,以用于实现块尺寸为4×4和8×8之间的帧内预测模式映射,例如,在上述步骤(2)中可以根据Intra8×8PredModeN查表获取相应的8×8块的映射帧内预测模式Intra4×4PredModeN,具体地,相应的Intra8×8PredModeN到Intra4×4PredModeN的映射关系表,即映射过程中应用的查询表可以如表4所示: Among them, in order to improve the efficiency of the codec end and facilitate the realization of the above conversion process, specifically, a lookup table can be set at the codec end to realize the intra prediction mode with a block size between 4×4 and 8×8 Mapping, for example, in the above step (2), the mapping intra prediction mode Intra4×4PredModeN of the corresponding 8×8 block can be obtained according to the Intra8×8PredModeN lookup table, specifically, the corresponding mapping relationship from Intra8×8PredModeN to Intra4×4PredModeN Table, that is, the query table applied in the mapping process can be as shown in Table 4:

                表4  Table 4

 Intra8×8PredModeNIntra8×8PredModeN  00  1 1  2 2  33  44 Intra4×4PredModeNIntra4×4PredModeN  2 2  66  8 8  00  44

其中,表内数字为帧内预测模式的序号。 Wherein, the numbers in the table are the serial numbers of the intra prediction modes. the

除通过上述在编解码端建立固定的映射表的实现方式实现8×8块与4×4块等不同尺寸块之间的帧内预测模式映射外,也可通过不同块尺寸的预测方向间的关系进行不同尺寸块之间的帧内预测模式映射。 In addition to realizing the intra-frame prediction mode mapping between blocks of different sizes such as 8×8 blocks and 4×4 blocks through the above-mentioned implementation method of establishing a fixed mapping table at the codec end, it is also possible to realize the intra-frame prediction mode mapping between prediction directions of different block sizes. Intra-frame prediction mode mapping between blocks of different sizes. the

转换实例四 Conversion example four

在该转换实例中,相应的转换获得当前图像块帧内预测模式的处理过程具体可以包括四种情况,以相应的8×8块和4×4块为例,相应的8×8块和4×4块分别使用如图1、2所示的帧内预测模式。 In this conversion example, the corresponding conversion process to obtain the intra prediction mode of the current image block may specifically include four situations, taking the corresponding 8×8 block and 4×4 block as an example, the corresponding 8×8 block and 4 The ×4 blocks use the intra prediction modes shown in Figures 1 and 2, respectively. the

相应的当前图像块与相邻图像块的尺寸大小将有四种不同可能,根据不同的情况具体可以采用不同的当前块的帧内预测模式确定方案,下面将分别对该四种情况下的当前块的帧内预测模式的确定方式进行说明: There are four different possibilities for the size of the corresponding current image block and adjacent image blocks. According to different situations, different intra prediction mode determination schemes for the current block can be used. The current The method of determining the intra prediction mode of the block is explained:

(1)当前图像块为8×8块,与当前图像块左上角最接近的上边块和左边块皆为4×4块,若存在两个或多个与当前图像块左上角等距的相邻图像块时,则取光栅扫描顺序下最先获得的相邻图像块; (1) The current image block is an 8×8 block, and the upper and left blocks closest to the upper left corner of the current image block are both 4×4 blocks. If there are two or more equidistant from the upper left corner of the current image block, When adjacent image blocks, take the first adjacent image block obtained in the raster scan sequence;

在情况(1)下,可以通过所述前图像块的上边块和左边块的帧内预测模式按预定的规则得到第一帧内预测模式,在当前图像块对应的帧内预测模式集合中得到与第一帧内预测模式对应的帧内预测模式(即映射得到的相邻图像块的映射帧内预测模式)作为当前图像块帧内预测模式,其中,相应的预定的规则可以为按上边块和左边块的尺寸进行帧内预测;具体可以为:先通过事先设定好的方法取得当前图像块尺寸为4×4时的当前图像块帧内预测模式,记为Intra4×4PredMode;由于当前图像块的尺寸为8×8,故还需将已取得的4×4块帧内预测模式Intra4×4PredMode映射成当前图像块的帧内预测模式(即4×4块的映射帧内预测模式),相应的映射方法同转换实例一,进而获 得相应的当前图像块帧内预测模式。 In case (1), the first intra-frame prediction mode can be obtained according to a predetermined rule through the intra-frame prediction modes of the upper block and the left block of the previous image block, and obtained in the intra-frame prediction mode set corresponding to the current image block The intra-frame prediction mode corresponding to the first intra-frame prediction mode (that is, the mapped intra-frame prediction mode of the adjacent image block obtained by mapping) is used as the intra-frame prediction mode of the current image block, wherein the corresponding predetermined rule can be as follows: Perform intra-frame prediction with the size of the left block; specifically, it can be: first obtain the intra-frame prediction mode of the current image block when the size of the current image block is 4×4 through a pre-set method, which is recorded as Intra4×4PredMode; because the current image The size of the block is 8×8, so it is necessary to map the obtained 4×4 block intra prediction mode Intra4×4PredMode into the intra prediction mode of the current image block (that is, the mapping intra prediction mode of the 4×4 block), The corresponding mapping method is the same as conversion example 1, and then the corresponding intra prediction mode of the current image block is obtained. the

(2)当前图像块为4×4块,与当前图像块左上角最接近的上边块和左边块皆为8×8块,若存在两个或多个与当前图像块左上角等距的相邻图像块时,则取光栅扫描顺序下最先获得的相邻图像块; (2) The current image block is a 4×4 block, and the upper block and the left block closest to the upper left corner of the current image block are both 8×8 blocks. If there are two or more equidistant from the upper left corner of the current image block, When adjacent image blocks, take the first adjacent image block obtained in the raster scan sequence;

在情况(2)下,即若当前图像块的上边块和左边块与当前块尺寸不同,则根据上边块和左边块帧内预测模式在当前图像块对应的帧内预测模式集合中得到上边块和左边块对应的帧内预测模式(即映射获得上边块和左边块对应的映射帧内预测模式),并根据得到的上边块和左边块的映射帧内预测模式获得当前图像块帧内预测模式;具体可以为:先对块尺寸为8×8的相邻图像块(上边块和左边块)的帧内预测模式进行映射,以获得尺寸为8×8的相邻图像块的映射帧内预测模式,映射方法同转换实例三,然后,再根据映射后的相邻图像块的帧内预测模式确定当前图像块帧内预测模式; In case (2), that is, if the size of the upper block and the left block of the current image block is different from that of the current block, the upper block is obtained in the intra prediction mode set corresponding to the current image block according to the intra prediction mode of the upper block and the left block The intra prediction mode corresponding to the left block (that is, the mapping to obtain the mapped intra prediction mode corresponding to the upper block and the left block), and obtain the intra prediction mode of the current image block according to the obtained mapping intra prediction mode of the upper block and the left block ; Specifically, it may be: first map the intra prediction mode of the adjacent image block (the upper block and the left block) with a block size of 8×8, so as to obtain the mapped intra prediction of the adjacent image block with a size of 8×8 Mode, the mapping method is the same as the conversion example 3, and then determine the intra prediction mode of the current image block according to the intra prediction mode of the adjacent image block after mapping;

(3)当前图像块为8×8块,与当前图像块左上角最接近的上边块或左边块为4×4块,与当前图像块左上角最接近的左边块或上边块为8×8块,即与当前图像块的左上角最接近的上边块和左边块中一个为4×4块,另一个为8×8块,若存在两个或多个与当前图像块左上角等距的相邻图像块时,则取光栅扫描顺序下最先获得的相邻图像块; (3) The current image block is an 8×8 block, the upper or left block closest to the upper left corner of the current image block is a 4×4 block, and the left or upper block closest to the upper left corner of the current image block is 8×8 block, that is, one of the upper block and the left block closest to the upper left corner of the current image block is a 4×4 block, and the other is an 8×8 block. If there are two or more equidistant from the upper left corner of the current image block For adjacent image blocks, the adjacent image block obtained first in the raster scan sequence is taken;

在情况(3)下,即若当前图像块的上边块或左边块中的一个块的尺寸与当前块的尺寸不一致,另一个块的尺寸与当前块的尺寸一致,则将与当前块的尺寸一致的上边块或左边块的帧内预测模式作为当前块帧内预测模式,参照该实施例,则当前图像块帧内预测模式等于块尺寸为8×8的相邻图像块的帧内预测模式; In case (3), that is, if the size of one of the blocks above or to the left of the current image block is inconsistent with the size of the current block, and the size of the other block is consistent with the size of the current block, then the size of the current block will be The intra-frame prediction mode of the consistent upper block or left block is used as the intra-frame prediction mode of the current block. Referring to this embodiment, the intra-frame prediction mode of the current image block is equal to the intra-frame prediction mode of the adjacent image block whose block size is 8×8 ;

(4)当前图像块为4×4块,与当前图像块左上角最接近的上边块或左边块为8×8块,与当前图像块左上角最接近的左边块或上边块为4×4块,即与当前图像块的左上角最接近的上边块和左边块中一个为4×4块,另一个为8×8 块,若存在两个或多个与当前图像块左上角等距的相邻图像块时,则取光栅扫描顺序下最先获得的相邻图像块。 (4) The current image block is a 4×4 block, the upper or left block closest to the upper left corner of the current image block is an 8×8 block, and the left or upper block closest to the upper left corner of the current image block is 4×4 block, that is, one of the upper block and the left block closest to the upper left corner of the current image block is a 4×4 block, and the other is an 8×8 block. If there are two or more equidistant from the upper left corner of the current image block In the case of adjacent image blocks, the adjacent image block obtained first in the raster scan order is taken. the

在情况(4)下,根据与当前块的尺寸不一致的上边块或左边块帧内预测模式,在当前图像块对应的内预测模式集合中得到该上边块或左边块对应的帧内预测模式(即映射得到该上边块或左边块对应的映射帧内预测模式),根据得到的上边块或左边块的映射帧内预测模式,以及与当前块尺寸一致的相邻块帧内预测模式获得当前图像块帧内预测模式;具体可以为:先将块尺寸为8×8的相邻图像块的帧内预测模式进行映射,以获得块尺寸为8×8的相邻图像块的映射帧内预测模式,映射方法同转换实例三,然后,根据相邻图像块中的8×8块映射获得的帧内预测模式和相邻图像块中的4×4块对应的帧内预测模式取得当前图像块帧内预测模式。 In case (4), according to the intra prediction mode of the upper block or the left block inconsistent with the size of the current block, the intra prediction mode corresponding to the upper block or the left block is obtained in the intra prediction mode set corresponding to the current image block ( That is, the mapping intra prediction mode corresponding to the upper block or the left block is obtained by mapping), and the current image is obtained according to the obtained mapping intra prediction mode of the upper block or the left block, and the adjacent block intra prediction mode consistent with the current block size Block intra prediction mode; specifically, it may be: first map the intra prediction mode of the adjacent image block with the block size of 8×8 to obtain the mapped intra prediction mode of the adjacent image block with the block size of 8×8 , the mapping method is the same as the conversion example 3, and then, according to the intra prediction mode obtained by mapping the 8×8 block in the adjacent image block and the intra prediction mode corresponding to the 4×4 block in the adjacent image block, the current image block frame is obtained Intra-prediction mode. the

通过以上方法得到当前图像块的帧内预测模式之后,在编码端还会计算当前图像块的最佳帧内编码模式,若最佳的帧内模式与当前图像块的帧内预测模式不同,则所述最佳帧内预测模式会与当前图像块的帧内预测模式进行事先设定好的逻辑运算与数学运算,计算所得结果会写入码流中;在解码端,可以根据接收到编码码流中的信息,获得所述进行预定的逻辑运算和数学运算的结果,并根据该结果采用所述逻辑运算和数学运算的逆运算得到当前图像块的最佳帧内预测模式,具体可以根据码流中信息,通过与编码端相同的方法得到当前图像块的帧内预测模式,将得到当前的帧内预测模式与码流中信息进行与先设定好的逻辑运算与数学运算得到当前图像块的最佳帧内预测模式。 After obtaining the intra-frame prediction mode of the current image block through the above method, the best intra-frame coding mode of the current image block will also be calculated at the encoding end, if the best intra-frame mode is different from the intra-frame prediction mode of the current image block, then The optimal intra-frame prediction mode will perform pre-set logical operations and mathematical operations with the intra-frame prediction mode of the current image block, and the calculated results will be written into the code stream; at the decoding end, according to the received coded code Information in the stream, obtain the result of the predetermined logical operation and mathematical operation, and use the inverse operation of the logical operation and mathematical operation according to the result to obtain the best intra prediction mode of the current image block, specifically according to the code The information in the stream obtains the intra-frame prediction mode of the current image block through the same method as the encoding side, and performs logical and mathematical operations on the current intra-frame prediction mode and the information in the code stream to obtain the current image block The best intra prediction mode for . the

本发明实施例中还提供了一种帧内预测装置,其具体实现结构如图3和图4所示,可以包括: An intra-frame prediction device is also provided in the embodiment of the present invention, and its specific implementation structure is shown in Figure 3 and Figure 4, which may include:

(1)模式获取单元,用于获取相邻图像块的帧内预测模式,具体地,相邻图像块可以包括至少一个上边块和至少一个左边块; (1) mode acquisition unit, used to acquire the intra prediction mode of adjacent image blocks, specifically, adjacent image blocks may include at least one upper block and at least one left block;

(2)模式预测单元,用于在相邻图像块与当前图像块的块尺寸不一致时,根据所述模式获取单元获取的相邻图像块帧内预测模式映射得到在当前图像块尺寸下的映射帧内预测模式;例如,根据相邻图像块帧内预测模式在当前图像块对应的帧内预测模式集合(即当前图像块能够选择的帧内预测模式)中选择一帧内预测模式用于获得当前图像块帧内预测模式; (2) A mode prediction unit, used to obtain the mapping under the size of the current image block according to the intra-frame prediction mode mapping of the adjacent image block acquired by the mode acquisition unit when the block size of the adjacent image block is inconsistent with that of the current image block Intra-frame prediction mode; for example, select an intra-frame prediction mode from the intra-frame prediction mode set corresponding to the current image block (that is, the intra-frame prediction mode that the current image block can select) according to the intra-frame prediction mode of the adjacent image block to obtain Intra prediction mode of the current image block;

如图3所示,相应的模式预测单元具体可以包括以下四个单元中的至少一个,相应的四个单元包括: As shown in Figure 3, the corresponding mode prediction unit may specifically include at least one of the following four units, and the corresponding four units include:

第一模式预测单元,用于在当前图像块的相邻块包括上边块和左边块,且上边块和左边块与当前块尺寸不同的情况下,通过所述当前图像块的上边块和左边块的帧内预测模式按预定的规则得到第一帧内预测模式,在当前图像块对应的帧内预测模式集合中得到与第一帧内预测模式对应的帧内预测模式(即根据第一帧内预测模式映射得到对应的在当前图像块尺寸下的映射帧内预测模式)作为当前图像块帧内预测模式; The first mode prediction unit is configured to pass the upper block and the left block of the current image block when the adjacent blocks of the current image block include the upper block and the left block, and the size of the upper block and the left block is different from that of the current block The intra-frame prediction mode of the first intra-frame prediction mode is obtained according to a predetermined rule, and the intra-frame prediction mode corresponding to the first intra-frame prediction mode is obtained in the intra-frame prediction mode set corresponding to the current image block (that is, according to the first intra-frame prediction mode The prediction mode mapping obtains the corresponding mapping intra prediction mode under the current image block size) as the intra prediction mode of the current image block;

第二模式预测单元,用于在当前图像块的相邻块包括上边块和左边块,且上边块和左边块与当前块尺寸不同的情况下,根据上边块和左边块帧内预测模式在当前图像块对应的帧内预测模式集合中得到上边块和左边块对应的帧内预测模式(即根据上边块和左边块帧内预测模式映射得到上边块和左边块对应的映射帧内预测模式),根据得到的上边块和左边块的映射帧内预测模式获得当前图像块帧内预测模式; The second mode prediction unit is used to, when the adjacent blocks of the current image block include the upper block and the left block, and the sizes of the upper block and the left block are different from the current block, according to the intra prediction mode of the upper block and the left block in the current The intra prediction mode corresponding to the upper block and the left block is obtained from the intra prediction mode set corresponding to the image block (that is, the mapped intra prediction mode corresponding to the upper block and the left block is obtained according to the intra prediction mode mapping of the upper block and the left block), Obtain the intra prediction mode of the current image block according to the obtained mapping intra prediction mode of the upper block and the left block;

第三模式预测单元,用于在当前图像块的相邻块包括上边块和左边块,且上边块或左边块中的一个块的尺寸与当前块的尺寸不一致,另一个块的尺寸与当前块的尺寸一致的情况下,将与当前块的尺寸一致的上边块或左边块的帧内预测模式作为当前块帧内预测模式; The third mode prediction unit is used to include an upper block and a left block in the adjacent blocks of the current image block, and the size of one of the upper block or the left block is inconsistent with the size of the current block, and the size of the other block is the same as the current block. When the size of the current block is the same, the intra prediction mode of the upper block or the left block that is consistent with the size of the current block is used as the intra prediction mode of the current block;

第四模式预测单元,用于在当前图像块的相邻块包括上边块和左边块,且上边块或左边块中的一个块的尺寸与当前块的尺寸不一致,另一个块的尺 寸与当前块的尺寸一致的情况下,根据与当前块的尺寸不一致的上边块或左边块帧内预测模式,在当前图像块对应的帧内预测模式集合中得到该上边块或左边块对应的帧内预测模式(即根据当前块的尺寸不一致的上边块或左边块帧内预测模式映射得到该上边块或左边块对应的映射帧内预测模式),根据得到的上边块或左边块的映射帧内预测模式,以及与当前块尺寸一致的相邻块帧内预测模式获得当前图像块帧内预测模式。 The fourth mode prediction unit is used to include the upper block and the left block in the adjacent blocks of the current image block, and the size of one block in the upper block or the left block is inconsistent with the size of the current block, and the size of the other block is the same as the current block When the size of the block is consistent, according to the intra prediction mode of the upper block or the left block that is inconsistent with the size of the current block, the intra prediction corresponding to the upper block or the left block is obtained in the intra prediction mode set corresponding to the current image block mode (that is, according to the intra-frame prediction mode of the upper block or the left block whose size is inconsistent with the current block to obtain the mapped intra-frame prediction mode corresponding to the upper block or the left block), according to the obtained mapping intra-frame prediction mode of the upper block or the left block , and the intra prediction mode of the adjacent block consistent with the size of the current block to obtain the intra prediction mode of the current image block. the

进一步地,如图4所示,该模式预测单元具体可以包括: Further, as shown in Figure 4, the mode prediction unit may specifically include:

模式获取单元,用于在当前图像块能够选择的帧内预测模式中选择一种与所述模式获取单元获取的相邻图像块的帧内预测模式方向最接近的帧内预测模式作为相邻图像块帧内预测模式; A mode acquisition unit, configured to select an intra prediction mode closest to the direction of the intra prediction mode of the adjacent image block acquired by the mode acquisition unit among the intra prediction modes that can be selected by the current image block as an adjacent image block intra prediction mode;

模式确定单元,用于根据所述模式获取单元获得的相邻图像块帧内预测模式确定当前图像块的帧内预测模式。 A mode determination unit, configured to determine the intra prediction mode of the current image block according to the intra prediction mode of the adjacent image block obtained by the mode acquisition unit. the

其中,若当所述相邻图像块中包含多个上边块或左边块时,则相应的模式获取单元需要分别根据多个上边块或左边块确定相应的上边块帧内预测模式和左边块帧内预测模式,故该模式获取单元具体可以包括: Wherein, if the adjacent image block contains multiple upper blocks or left blocks, the corresponding mode acquisition unit needs to determine the corresponding upper block intra-frame prediction mode and left block frame according to the multiple upper blocks or left blocks, respectively. Intra-prediction mode, so the mode acquisition unit can specifically include:

平均值计算单元,用于计算多个上边块或左边块对应的帧内预测模式的方向角度的平均值; The average value calculation unit is used to calculate the average value of the direction angles of the intra-frame prediction modes corresponding to the upper block or the left block;

相邻图像块模式确定单元,用于根据所述平均值计算单元获得的平均值,在当前图像块能够选择的帧内预测模式中选择方向角度与该平均值最相似的帧内预测模式,即在当前图像块能够选择的帧内预测模式中确定与该方向角度的平均值最接近的方向角度对应的帧内预测模式,作为上边块帧内预测模式或左边块帧内预测模式。 The adjacent image block mode determination unit is configured to select the intra prediction mode whose direction angle is most similar to the average value among the intra prediction modes selectable by the current image block according to the average value obtained by the average value calculation unit, namely Among the selectable intra prediction modes of the current image block, the intra prediction mode corresponding to the direction angle closest to the average value of the direction angle is determined as the upper block intra prediction mode or the left block intra prediction mode. the

在模式确定单元中,为能够根据相邻图像块帧内预测模式确定当前图像块的帧内预测模式,则该模式确定单元具体可以包括以下单元: In the mode determination unit, in order to be able to determine the intra prediction mode of the current image block according to the intra prediction mode of the adjacent image block, the mode determination unit may specifically include the following units:

比较单元,用于在相邻图像块包含上边块和左边块时,比较上边块帧内 预测模式和左边块帧内预测模式; The comparison unit is used to compare the intra prediction mode of the upper block and the intra prediction mode of the left block when the adjacent image block contains the upper block and the left block;

当前模式确定单元,用于根据所述比较单元的比较结果,将上边块帧内预测模式和左边块帧内预测模式中的最小值作为所述当前图像块的帧内预测模式,即选择两者中的较小值作为当前图像块的帧内预测模式。 The current mode determination unit is configured to use the minimum value of the intra prediction mode of the upper block and the intra prediction mode of the left block as the intra prediction mode of the current image block according to the comparison result of the comparison unit, that is, select both The smaller value in is used as the intra prediction mode of the current image block. the

需要说明的是,在相应的帧内预测装置中,相应的模式预测单元具体可以同时包含图3和图4中模式预测单元各自所包含的各个单元。 It should be noted that, in the corresponding intra prediction apparatus, the corresponding mode prediction unit may specifically include each unit included in each of the mode prediction units in FIG. 3 and FIG. 4 . the

可选地,在该装置中还可以包括对应关系保存单元,用于保存当前图像块能够选择的帧内预测模式与相邻图像块能够选择的帧内预测模式之间的对应关系,该对应关系具体用于提供给所述模式预测单元,以便于在当前图像块与相邻图像块尺寸不同时,可以用于确定相应相邻图像块帧内预测模式(即在当前块可以选择的帧内预测模式中根据相邻图像块对应的帧内预测模式为相邻图像块选择确定对应的帧内预测模式作为相邻图像块的帧内预测模式),进而确定当前块的帧内预测模式。 Optionally, the device may further include a correspondence storage unit, configured to store the correspondence between the selectable intra-frame prediction modes of the current image block and the selectable intra-frame prediction modes of adjacent image blocks, the correspondence It is specifically used to provide to the mode prediction unit, so that when the size of the current image block is different from that of the adjacent image block, it can be used to determine the intra prediction mode of the corresponding adjacent image block (that is, the intra prediction mode that can be selected in the current block In the mode, according to the intra prediction mode corresponding to the adjacent image block, select and determine the corresponding intra prediction mode for the adjacent image block as the intra prediction mode of the adjacent image block), and then determine the intra prediction mode of the current block. the

可选地,为进一步准确选择确定相邻图像块,则该装置还可以包括相邻图像块选择单元,用于将与当前图像块左上角距离最近的图像块作为相邻图像块,当存在两个或多个与当前图像块左上角等距离的图像块时,则取光栅扫描顺序下最先获得的图像块作为相邻图像块。 Optionally, for further accurate selection and determination of adjacent image blocks, the device may also include an adjacent image block selection unit for using the image block closest to the upper left corner of the current image block as an adjacent image block, when there are two When there are one or more image blocks equidistant from the upper left corner of the current image block, the image block obtained first in the raster scan order is taken as the adjacent image block. the

上述基于自适应块变换的帧内预测装置具体可以设置于编码端的编码装置中,也可以设置于解码端的解码装置中,以便于提高编解码系统中的编解码性能及效率。 The above-mentioned intra-frame prediction device based on adaptive block transformation can be specifically set in the encoding device at the encoding end, and can also be set in the decoding device at the decoding end, so as to improve the encoding and decoding performance and efficiency in the encoding and decoding system. the

若设置于编码装置中,则相应的帧内预测装置还可以包括模式编码单元,用于计算当前图像块的最佳帧内编码模式,若该最佳帧内编码模式与获得的当前图像块帧内预测模式不同,则将所述最佳帧内预测模式与当前图像块帧内预测模式进行预定的逻辑运算和数学运算,并将计算获得的结果会写入编码码流中。 If it is set in the coding device, the corresponding intra prediction device may also include a mode coding unit, which is used to calculate the best intra coding mode of the current image block, if the best intra coding mode is consistent with the obtained current image block frame If the intra-prediction modes are different, predetermined logic operations and mathematical operations are performed on the optimal intra-frame prediction mode and the intra-frame prediction mode of the current image block, and the calculated results are written into the coded bit stream. the

若设置于解码装置中,则相应的帧内预测装置还可以包括模式解码单元,用于根据接收到编码码流中的信息,获得所述进行预定的逻辑运算和数学运算的结果,并根据该结果采用所述逻辑运算和数学运算的逆运算得到当前图像块的最佳帧内预测模式。 If it is set in the decoding device, the corresponding intra prediction device may also include a mode decoding unit, which is used to obtain the result of the predetermined logic operation and mathematical operation according to the information received in the encoded code stream, and according to the As a result, the best intra-frame prediction mode of the current image block is obtained by adopting the inverse operation of the logical operation and the mathematical operation. the

上述编码装置和解码装置可以组成一个系统使用。 The above encoding device and decoding device can be used as a system. the

综上所述,本发明实施例的实现,使得在当前图像块与相邻图像块之间为不同尺寸块,且不同尺寸块各自采用的帧内预测模式不同情况下,仍然可以准确地确定当前图像块的帧内预测模式,从而便于编解码操作过程的实现,提高编解码的性能。而且,本发明实施例中,还可以将确定当前图像块帧内预测模式中需要的对应关系预先保存,从而可以进一步提高相应的编解码效率。 To sum up, the implementation of the embodiment of the present invention makes it possible to accurately determine the current image block and the adjacent image block when there are blocks of different sizes, and the intra prediction modes adopted by the blocks of different sizes are different. The intra-frame prediction mode of the image block facilitates the realization of the encoding and decoding operation process and improves the encoding and decoding performance. Moreover, in the embodiment of the present invention, the corresponding relationship required for determining the intra-frame prediction mode of the current image block can also be saved in advance, so that the corresponding encoding and decoding efficiency can be further improved. the

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。 The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims. the

Claims (21)

CN 2008100572812008-01-312008-01-31Inter-frame prediction method and apparatus based on adaptive block transformationActiveCN101500161B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN 200810057281CN101500161B (en)2008-01-312008-01-31Inter-frame prediction method and apparatus based on adaptive block transformation
PCT/CN2009/070287WO2009097809A1 (en)2008-01-312009-01-22Method and apparatus of intra-frame prediction based on adaptive block transform

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN 200810057281CN101500161B (en)2008-01-312008-01-31Inter-frame prediction method and apparatus based on adaptive block transformation

Publications (2)

Publication NumberPublication Date
CN101500161A CN101500161A (en)2009-08-05
CN101500161Btrue CN101500161B (en)2012-03-21

Family

ID=40947005

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN 200810057281ActiveCN101500161B (en)2008-01-312008-01-31Inter-frame prediction method and apparatus based on adaptive block transformation

Country Status (2)

CountryLink
CN (1)CN101500161B (en)
WO (1)WO2009097809A1 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR101452860B1 (en)2009-08-172014-10-23삼성전자주식회사Method and apparatus for image encoding, and method and apparatus for image decoding
KR20110068792A (en)*2009-12-162011-06-22한국전자통신연구원 Adaptive Image Coding Apparatus and Method
CN102300088B (en)*2010-06-252013-11-06财团法人工业技术研究院 Intra-picture prediction mode optimization method, image compression method and device
CN106231308B (en)*2010-08-172019-04-12M&K控股株式会社Method for encoding intra prediction mode
US9204155B2 (en)*2010-09-302015-12-01Futurewei Technologies, Inc.Multiple predictor set for intra coding with intra mode prediction
CN101977317B (en)*2010-10-272012-07-04无锡中星微电子有限公司Intra-frame prediction method and device
EP2661880A4 (en)2011-01-072016-06-29Mediatek Singapore Pte LtdMethod and apparatus of improved intra luma prediction mode coding
CN105872551B (en)*2011-01-072018-09-25寰发股份有限公司 Encoding method and device and decoding method and device
CN102857764B (en)*2011-07-012016-03-09华为技术有限公司The method and apparatus of intra prediction mode process
CN102970526B (en)*2011-08-312016-12-14华为技术有限公司A kind of method obtaining transform block size and module
WO2013106986A1 (en)*2012-01-162013-07-25Mediatek Singapore Pte. Ltd.Methods and apparatuses of intra mode coding
CN102761742B (en)*2012-07-032017-06-06华为技术有限公司Transform block division methods, transform block divides coding method and the coding/decoding method of parameter
CN106375768B (en)*2015-07-232019-05-17中国科学院信息工程研究所Video steganalysis method based on intra prediction mode calibration
CN105357535B (en)*2015-11-052019-09-03广东中星微电子有限公司A kind of intra prediction mode decoding method and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1615020A (en)*2004-11-102005-05-11华中科技大学Method for pridicting sortable complex in frame
CN1674680A (en)*2005-03-312005-09-28华中科技大学An enhanced in-frame predictive mode coding method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR20060008523A (en)*2004-07-212006-01-27삼성전자주식회사 Intra prediction method of video and its device
JP2006304102A (en)*2005-04-222006-11-02Renesas Technology CorpImage coding unit and image coding method
KR100703200B1 (en)*2005-06-292007-04-06한국산업기술대학교산학협력단 Intra encoding device and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1615020A (en)*2004-11-102005-05-11华中科技大学Method for pridicting sortable complex in frame
CN1674680A (en)*2005-03-312005-09-28华中科技大学An enhanced in-frame predictive mode coding method

Also Published As

Publication numberPublication date
WO2009097809A1 (en)2009-08-13
CN101500161A (en)2009-08-05

Similar Documents

PublicationPublication DateTitle
CN101500161B (en)Inter-frame prediction method and apparatus based on adaptive block transformation
CN102857764B (en)The method and apparatus of intra prediction mode process
CN102970526B (en)A kind of method obtaining transform block size and module
WO2011124156A1 (en)Video encoding and decoding method and apparatus
EP2202986A1 (en)An adaptive predicting device and method
CN101014125A (en)Method of and apparatus for deciding intraprediction mode
WO2022104498A1 (en)Intra-frame prediction method, encoder, decoder and computer storage medium
CN102685477B (en)Method and device for obtaining image blocks for merging mode
CN102547290B (en)Video image coding/decoding method based on geometric partitioning
CN104243997B (en)Method for quality scalable HEVC (high efficiency video coding)
KR20110044487A (en) Video encoding method and apparatus according to the size of hierarchical coding unit, and video decoding method and apparatus
CN102685487B (en)Image coding and decoding methods, image coding and decoding equipment and network system
CN103533355B (en)A kind of HEVC fast encoding method
CN104702958A (en)HEVC intraframe coding method and system based on spatial correlation
CN105898332B (en)For the fast deep figure frame mode decision method of 3D-HEVC coding standards
WO2009094946A1 (en)Code stream marking method and device, and coding-decoding system
CN103108177A (en)Image coding method and image coding device
CN102447896B (en) Image residual block processing method, device and system
CN102215392B (en) Intra prediction method or device for estimating pixel value
CN101783954B (en)Video image encoding and decoding method
CN109819260A (en) Video Steganography Method and Device Based on Multi-Embedding Domain Fusion
CN101841722B (en)Detection method of detection device of filtering boundary strength
CN104754343A (en)Image processing method and system, decoding method, encoder and decoder
CN112449181A (en)Encoding and decoding method, device and equipment
CN106303548A (en)HEVC intra-frame predictive encoding method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp