CN103338373A - Adjacent boundary length deducing method and device - Google Patents
Adjacent boundary length deducing method and device Download PDFInfo
- Publication number
- CN103338373A CN103338373A CN2013102409136A CN201310240913A CN103338373A CN 103338373 A CN103338373 A CN 103338373A CN 2013102409136 A CN2013102409136 A CN 2013102409136A CN 201310240913 A CN201310240913 A CN 201310240913A CN 103338373 A CN103338373 A CN 103338373A
- Authority
- CN
- China
- Prior art keywords
- adjacent
- current pixel
- blocks
- boundary
- length
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 239000013598 vector Substances 0.000 claims abstract description 128
- 230000004927 fusion Effects 0.000 claims description 3
- 239000012466 permeate Substances 0.000 claims 2
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000009795 derivation Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 14
- 238000012545 processing Methods 0.000 description 13
- 238000004364 calculation method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明实施例提供了一种相邻边界长度导出的方法及装置,该相邻边界长度导出方法包括:根据连续相邻块中的预测信息是否一致决定是否将连续相邻块融合为一个相邻单元并导出所述相邻单元边界信息,根据所述相邻单元与当前块相邻边的边界信息计算相邻边界长度。通过所述相邻边界长度计算方法,能在节省内存开销的情况下,计算得到相邻边界长度信息。得到的相邻边界长度信息,可以应用在后续视频编解码技术如运动矢量预测和帧内最可能模式预测中,提高视频编码效率。
An embodiment of the present invention provides a method and device for deriving adjacent boundary lengths. The adjacent boundary length derivation method includes: determining whether to merge consecutive adjacent blocks into one adjacent block according to whether the prediction information in consecutive adjacent blocks is consistent. unit and derive the adjacent unit boundary information, and calculate the adjacent boundary length according to the boundary information of the adjacent unit and the current block adjacent edge. Through the method for calculating the adjacent boundary length, the adjacent boundary length information can be calculated while saving memory overhead. The obtained adjacent boundary length information can be applied to subsequent video coding and decoding technologies such as motion vector prediction and intra-frame most probable mode prediction to improve video coding efficiency.
Description
技术领域technical field
本发明涉及一种视频编解码技术,尤其涉及一种视频编解码中相邻边界长度导出方法及装置。The present invention relates to a video encoding and decoding technology, in particular to a method and a device for deriving adjacent boundary lengths in video encoding and decoding.
背景技术Background technique
在视频编解码技术中,相邻边界的长度反映了两个相邻块之间相关性的强弱,利用这种相关性,我们可以通过已经编码的相邻块来预测当前块的编码信息。这使得相邻边界长度可以在视频编解码中发挥作用。基于相邻边界长度的运动矢量预测方法,即选择当前像素块的相邻块中与当前像素相邻边界最长的块的运动矢量为当前块的运动矢量预测值。相比于原来视频编码标准AVS中AVS MEDIAN的技术,基于相邻边界长度的运动矢量预测方法能够获得更好的性能。In video coding and decoding technology, the length of the adjacent boundary reflects the strength of the correlation between two adjacent blocks. Using this correlation, we can predict the coding information of the current block through the coded adjacent blocks. This enables adjacent boundary lengths to play a role in video codecs. The motion vector prediction method based on the length of the adjacent boundary is to select the motion vector of the block with the longest adjacent boundary with the current pixel among the adjacent blocks of the current pixel block as the motion vector predictor of the current block. Compared with the technology of AVS MEDIAN in the original video coding standard AVS, the motion vector prediction method based on the adjacent boundary length can obtain better performance.
然而,在原来的基于相邻边界长度的运动矢量预测方法中,相邻边界的导出是根据当前块相邻的PU(预测单元)块的边界坐标位置以及当前块边界的坐标位置来导出的。即相邻PU块与当前像素块重合边界的长度为相邻边界长度。这种导出方式需要事先存储额外的CU(编码单元)块尺寸信息以及CU块的块划分信息,增加了内存开销。However, in the original motion vector prediction method based on the adjacent boundary length, the adjacent boundary is derived according to the boundary coordinate position of the PU (prediction unit) block adjacent to the current block and the coordinate position of the current block boundary. That is, the length of the overlapping boundary between the adjacent PU block and the current pixel block is the length of the adjacent boundary. This derivation method needs to store additional CU (coding unit) block size information and block division information of the CU block in advance, which increases memory overhead.
发明内容Contents of the invention
本发明的目的在于针对现有技术的不足,提出根据连续相邻块中的预测信息是否一致决定是否将连续相邻块融合为一个相邻单元并导出所述相邻单元边界信息,然后根据边界信息计算相邻边界长度的方法。通过所述相邻边界长度计算方法,能在节省内存开销的情况下,计算得到相邻边界长度信息。得到的相邻边界长度信息,可以应用在后续视频编解码技术如运动矢量预测和帧内最可能模式预测中,提高视频编码效率。The purpose of the present invention is to address the deficiencies in the prior art, and proposes to decide whether to merge the continuous adjacent blocks into one adjacent unit according to whether the prediction information in the continuous adjacent blocks is consistent and derive the boundary information of the adjacent units, and then according to the boundary Information on how to calculate the length of adjacent boundaries. Through the method for calculating the adjacent boundary length, the adjacent boundary length information can be calculated while saving memory overhead. The obtained adjacent boundary length information can be applied to subsequent video coding and decoding technologies such as motion vector prediction and intra-frame most probable mode prediction to improve video coding efficiency.
本发明第一目的在于提供一种相邻边界长度导出方法,其包括以下步骤:The first purpose of the present invention is to provide a method for deriving adjacent boundary lengths, which includes the following steps:
获得当前像素块的至少两个相邻块;Obtain at least two adjacent blocks of the current pixel block;
将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元;Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit;
计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the resulting length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
进一步的,所述连续相邻块中的预测信息一致是指帧间预测块的运动信息一样或偏差在一个小的范围内。Further, the consistent prediction information in the continuous adjacent blocks means that the motion information of inter-frame prediction blocks is the same or the deviation is within a small range.
进一步的,所述连续相邻块中的预测信息一致是指帧内预测块的帧内预测模式一样或方向偏差在一个小的范围内。Further, the consistent prediction information in the consecutive adjacent blocks means that the intra prediction modes of the intra prediction blocks are the same or the direction deviation is within a small range.
进一步的,所述帧间预测块的运动信息为:帧间预测块的运动矢量或帧间预测块的运动矢量根据所述帧间预测块与所述帧间预测块参考块之间的帧间距离缩放后得到的值。Further, the motion information of the inter-prediction block is: the motion vector of the inter-prediction block or the motion vector of the inter-prediction block according to the The value obtained after distance scaling.
本发明另一目的在于提供一种相邻边界长度导出装置,其特征在于,包括:Another object of the present invention is to provide a device for deriving adjacent boundary lengths, which is characterized in that it includes:
用于获得当前像素块的至少两个相邻块的输入模块;An input module for obtaining at least two adjacent blocks of the current pixel block;
用于将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元的相邻单元融合模块;An adjacent unit fusion module for merging adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit;
用于计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度的相邻边界长度计算模块。The adjacent boundary length calculation module is used to calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the resulting length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
进一步的,所述的连续相邻块中的预测信息一致是指帧间预测块的运动矢量一样或偏差在一个小的范围内。Further, the consistent prediction information in the continuous adjacent blocks means that the motion vectors of inter-frame prediction blocks are the same or the deviation is within a small range.
进一步的,所述的连续相邻块中的预测信息一致是指帧内预测块的帧内预测模式一样或方向偏差在一个小的范围内。Further, the consistent prediction information in consecutive adjacent blocks means that the intra prediction modes of the intra prediction blocks are the same or the direction deviation is within a small range.
进一步的,所述帧间预测块的运动信息为:帧间预测块的运动矢量或帧间预测块的运动矢量根据所述帧间预测块与所述帧间预测块参考块之间的帧间距离缩放后得到的值。Further, the motion information of the inter-prediction block is: the motion vector of the inter-prediction block or the motion vector of the inter-prediction block according to the The value obtained after distance scaling.
本发明的有益效果是,本发明实施例提供的相邻相邻边界长度导出方法和装置通过根据连续相邻块中的预测信息是否相同判断连续相邻块是否属于同一个相邻单元并导出所述相邻单元边界信息,根据边界信息计算相邻边界长度,根据得到的相邻边界长度信息,可以应用在后续视频编解码技术如运动矢量预测和帧内最可能模式预测中,提高视频编码效率。The beneficial effect of the present invention is that the adjacent adjacent boundary length derivation method and device provided by the embodiment of the present invention judge whether the consecutive adjacent blocks belong to the same adjacent unit according to whether the prediction information in the consecutive adjacent blocks is the same, and derive the Adjacent unit boundary information is described, and the adjacent boundary length is calculated according to the boundary information. According to the obtained adjacent boundary length information, it can be applied to subsequent video coding and decoding technologies such as motion vector prediction and intra-frame most probable mode prediction to improve video coding efficiency. .
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1为本发明实施例提供的一种帧间当前像素块及其相邻块示意图;FIG. 1 is a schematic diagram of a current inter-frame pixel block and its adjacent blocks provided by an embodiment of the present invention;
图2为本发明实施例提供的一种帧间当前像素块及其相邻运动矢量存储单元示意图;FIG. 2 is a schematic diagram of an inter-frame current pixel block and its adjacent motion vector storage unit provided by an embodiment of the present invention;
图3为本发明实施例提供的另一种帧间当前像素块及其相邻块示意图;FIG. 3 is a schematic diagram of another inter-frame current pixel block and its adjacent blocks provided by an embodiment of the present invention;
图4为本发明实施例提供的一种帧内当前像素块及其周围相邻块示意图;FIG. 4 is a schematic diagram of a current pixel block in a frame and its surrounding adjacent blocks provided by an embodiment of the present invention;
图5为本发明实施例提供的一种视频编解码中相邻边界信息导出装置结构示意图。FIG. 5 is a schematic structural diagram of an apparatus for deriving adjacent boundary information in video coding and decoding according to an embodiment of the present invention.
具体实施方式Detailed ways
在帧间预测中,视频数据可以被划分为不同大小的像素块进行运动估计。例如,4X4,4X8,8X4,8X8,4X16,8X16,12X16,16X16,16X32,32X32,32X64,64X64等。在帧内预测中,视频数据能被划分成64X64,32X32,16X16,8X8等。待编码像素块或待解码像素块称为待处理像素块;已编码像素块或已解码像素块被称为已处理像素块。待编码像素块周围可以有多个已编码像素块,这些已编码像素块中有帧内编码模式的像素块也有帧间编码模式的像素块。In inter prediction, video data can be divided into pixel blocks of different sizes for motion estimation. For example, 4X4, 4X8, 8X4, 8X8, 4X16, 8X16, 12X16, 16X16, 16X32, 32X32, 32X64, 64X64, etc. In intra prediction, video data can be divided into 64X64, 32X32, 16X16, 8X8, etc. A pixel block to be encoded or decoded is called a pixel block to be processed; a pixel block that has been encoded or decoded is called a processed pixel block. There may be multiple coded pixel blocks around the pixel block to be coded, and among these coded pixel blocks, there are pixel blocks in intra-frame coding mode and pixel blocks in inter-frame coding mode.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
实施例1Example 1
图1为当前像素块及其空间域相邻像素块的示意图。FIG. 1 is a schematic diagram of a current pixel block and its adjacent pixel blocks in the spatial domain.
本实例提供的视频编解码中帧间预测块相邻边界长度导出方法,具体包括:This example provides a method for deriving the adjacent boundary length of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图1所示,当前像素块的空间域相邻块有A1,A2,……,AN,B1,B2,……BM,N、M为大于0的自然数。其中有K个块是帧间预测块,0≤K≤N+M。将K个帧间预测块中与当前像素块参考帧方向相同的块的运动信息存储到输入装置中。Specifically, as shown in FIG. 1 , adjacent blocks in the spatial domain of the current pixel block include A1, A2, ... , AN, B1, B2, ... BM, where N and M are natural numbers greater than 0. Among them, K blocks are inter-frame prediction blocks, 0≤K≤N+M. The motion information of the block in the same direction as the reference frame of the current pixel block among the K inter-frame prediction blocks is stored in the input device.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2……AN,B1,B2,……BM,中连续相邻块中的运动矢量是否相同,如果任意个连续相邻块的运动矢量相同,则将它们融合为一个相邻单元。如果一个相邻块的运动矢量不同于任何与其相连的相邻块,则它自身作为一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。Specifically, a possible implementation method is to compare whether the motion vectors in consecutive adjacent blocks in A1, A2 ... AN, B1, B2, ... BM are the same, if the motion vectors of any consecutive adjacent blocks are the same , then merge them into one adjacent unit. A neighboring block counts itself as a neighboring unit if its motion vector is different from any neighboring blocks connected to it. According to the method, several adjacent units are obtained, denoted as P1, P2, P3....
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
此后处理不在本专利权利要求中,但为使实施例更清晰完整,将其加入实施例中。The subsequent processing is not included in the patent claims, but it is added to the embodiments in order to make the embodiments clearer and more complete.
具体地,将相邻单元中与当前像素块相邻边界最长的相邻单元作为参考相邻单元。取出这个相邻单元中的运动矢量作为当前像素块的运动矢量预测值或运动矢量或运动矢量预测值候选或运动矢量候选。如果取出的是运动矢量预测值或运动矢量,则将所述参考相邻块的运动矢量直接作为当前块的运动矢量预测值或运动矢量。如果取出的是运动矢量预测值候选或运动矢量候选,则将所述参考相邻块的运动矢量放入当前块的运动矢量预测值候选或运动矢量候选列表中。在得到运动矢量预测值候选或运动矢量候选或运动矢量预测值或运动矢量后,需要对运动矢量预测值候选或运动矢量候选或运动矢量预测值或运动矢量做相应后处理。保留空间域相邻块运动矢量中与当前像素块参考帧相同的运动矢量;对空间域相邻块运动矢量中与当前像素块参考帧方向相同但参考帧不同的运动矢量,做如下的处理,该运动矢量×当前帧与其参考帧距离÷该运动矢量所在帧与参考帧距离。Specifically, among the adjacent units, the adjacent unit with the longest border with the current pixel block is used as the reference adjacent unit. The motion vector in this adjacent unit is taken out as the motion vector predictor or motion vector or motion vector predictor candidate or motion vector candidate of the current pixel block. If the motion vector predictor or motion vector is fetched, the motion vector of the reference adjacent block is directly used as the motion vector predictor or motion vector of the current block. If the motion vector predictor candidate or motion vector candidate is fetched, put the motion vector of the reference adjacent block into the motion vector predictor candidate or motion vector candidate list of the current block. After obtaining the motion vector predictor candidate or the motion vector predictor or the motion vector predictor or the motion vector, corresponding post-processing needs to be performed on the motion vector predictor candidate or the motion vector candidate or the motion vector predictor or the motion vector. Retain the same motion vector as the reference frame of the current pixel block in the motion vector of the neighboring block in the space domain; for the motion vector in the motion vector of the adjacent block in the space domain, which is in the same direction as the reference frame of the current pixel block but different from the reference frame, do the following processing, The motion vector×the distance between the current frame and its reference frame÷the distance between the frame where the motion vector is located and the reference frame.
实施例2Example 2
图2为一种当前像素块以及其空间域相邻运动矢量存储单元的示意图。FIG. 2 is a schematic diagram of a current pixel block and its adjacent motion vector storage units in the spatial domain.
本实例提供的视频编解码中帧间预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图2所示,当前像素块周围有A1~A4、B1~B4和C1~C3运动矢量存储单元。这些运动矢量存储单元为所述的相邻块。首先获得这些运动矢量存储单元中的运动矢量。Specifically, as shown in FIG. 2, there are motion vector storage units A1-A4, B1-B4, and C1-C3 around the current pixel block. These motion vector storage units are said adjacent blocks. First obtain the motion vectors in these motion vector storage units.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,由步骤一获得多个相邻块后,检查A1~A4中的块是否为连续且运动矢量相同的块,将连续且运动矢量相同的块融合为一个相邻单元。检查B1~B4中的块是否为连续且运动矢量相同的块,将连续且运动矢量相同的块融合为一个相邻单元。如果一个相邻块的运动矢量不同于任何与其相连的相邻块,则它自身作为一个相邻单元。得到相邻单元P1、P2、P3……。Specifically, after obtaining a plurality of adjacent blocks in step 1, check whether the blocks in A1-A4 are consecutive blocks with the same motion vector, and fuse the consecutive blocks with the same motion vector into one adjacent unit. Check whether the blocks in B1-B4 are continuous blocks with the same motion vector, and fuse the continuous blocks with the same motion vector into one adjacent unit. A neighboring block counts itself as a neighboring unit if its motion vector is different from any neighboring blocks connected to it. Neighboring units P1, P2, P3... are obtained.
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,计算P1、P2、P3……包含的与当前像素块相邻的运动矢量存储单元的个数,所得个数即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the number of motion vector storage units adjacent to the current pixel block included in P1, P2, P3..., and the obtained number is the number of adjacent units to the current pixel block border length.
此后处理不在本专利权利要求中,但为使实施例更清晰完整,将其加入实施例中。The subsequent processing is not included in the patent claims, but it is added to the embodiments in order to make the embodiments clearer and more complete.
具体地,将相邻单元中与当前像素块相邻边界最长的两个相邻单元作为参考相邻单元。取出这两个相邻单元中的运动矢量作为运动矢量预测值候选或运动矢量候选。将所述参考相邻单元的运动矢量放入运动矢量预测值候选或运动矢量候选列表中。在得到运动矢量预测值候选或运动矢量候选后,需要对运动矢量预测值候选或运动矢量候选做相应后处理。保留空间域相邻块运动矢量中与当前像素块参考帧相同的运动矢量;对空间域参考相邻单元运动矢量中与当前像素块参考帧方向相同但参考帧不同的运动矢量,做如下的处理,该运动矢量×当前帧与其参考帧距离÷该运动矢量所在帧与参考帧距离。Specifically, among the adjacent units, the two adjacent units with the longest boundaries adjacent to the current pixel block are used as reference adjacent units. The motion vectors in these two adjacent units are taken out as motion vector predictor candidates or motion vector candidates. Putting the motion vector of the reference neighboring unit into a motion vector predictor candidate or a motion vector candidate list. After the motion vector predictor candidate or the motion vector candidate is obtained, corresponding post-processing needs to be performed on the motion vector predictor candidate or the motion vector candidate. Keep the same motion vector as the reference frame of the current pixel block in the motion vector of the adjacent block in the space domain; for the motion vector in the motion vector of the reference adjacent block in the space domain, which is in the same direction as the reference frame of the current pixel block but different from the reference frame, do the following processing , the motion vector × the distance between the current frame and its reference frame ÷ the distance between the frame where the motion vector is located and the reference frame.
实施例3Example 3
图3为一种当前像素块以及其空间域相邻块的示意图。FIG. 3 is a schematic diagram of a current pixel block and its neighboring blocks in the spatial domain.
本实例提供的视频编解码中帧间预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图3所示,当前像素块周围有A1、A2、A3,B1、B2、B3共6个相邻块。首先获得这些相邻块中的运动矢量。Specifically, as shown in FIG. 3 , there are six adjacent blocks A1, A2, A3, B1, B2, and B3 around the current pixel block. Motion vectors in these neighboring blocks are obtained first.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2,A3中连续相邻块中的运动矢量是否相同,比较B1,B2,B3中连续相邻块中的运动矢量是否相同,如果任意个连续相邻块的运动矢量相同,则将它们融合为一个相邻单元。如果一个相邻块的运动矢量不同于任何与其相连的相邻块,则它自身作为一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。例如:一种情况可以是,A2、A3两个连续相邻块中的运动矢量相同,则记为P1;B1、B2两个连续相邻块中的运动矢量相同,记为P2,A1记为P3,B3记为P4。也可以是,A1、A2、A3的运动矢量相同,记为相邻单元P1,B1、B2、B3的运动矢量相同,记为相邻单元P2。Specifically, a possible implementation method is to compare whether the motion vectors in consecutive adjacent blocks in A1, A2, and A3 are the same, compare whether the motion vectors in consecutive adjacent blocks in B1, B2, and B3 are the same, and if any If the motion vectors of consecutive adjacent blocks are the same, they are merged into one adjacent unit. A neighboring block counts itself as a neighboring unit if its motion vector is different from any neighboring blocks connected to it. According to the method, several adjacent units are obtained, denoted as P1, P2, P3.... For example: a situation can be that the motion vectors in two consecutive adjacent blocks of A2 and A3 are the same, which is recorded as P1; the motion vectors in the two consecutive adjacent blocks of B1 and B2 are the same, which is recorded as P2, and A1 is recorded as P3 and B3 are recorded as P4. It may also be that the motion vectors of A1, A2, and A3 are the same, which is marked as the adjacent unit P1, and the motion vectors of B1, B2, and B3 are the same, which is marked as the adjacent unit P2.
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
此后处理过程同实施例1最后一段所述,在此不赘述。The subsequent processing is the same as that described in the last paragraph of Embodiment 1, and will not be repeated here.
实施例4Example 4
图4为一种当前像素块以及其空间域相邻块的示意图。FIG. 4 is a schematic diagram of a current pixel block and its neighboring blocks in the spatial domain.
本实例提供的视频编解码中帧内预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of intra prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图4所示,当前像素块周围有A1、A2、A3,B1、B2、B3六个相邻块。首先获得这些相邻块中帧内预测块的帧内预测模式信息。Specifically, as shown in FIG. 4, there are six adjacent blocks A1, A2, A3, B1, B2, and B3 around the current pixel block. Firstly, the intra prediction mode information of the intra prediction blocks in these adjacent blocks is obtained.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2,A3中连续相邻块中的帧内预测模式是否相同,比较B1,B2,B3中连续相邻块中的帧内预测模式是否相同,如果两个连续相邻块的帧内预测模式相同,则将它们融合为一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。例如:一种情况可以是,A2、A3两个连续相邻块中的运动矢量相同,则记为P1,B1、B2两个连续相邻块中的运动矢量相同,记为P2。也可以是,只有A1、A2连续相邻块中的运动矢量相同,记为P1。也可以是,A1、A2、A3的运动矢量相同,记为相邻单元P1,B1、B2、B3的运动矢量相同,记为相邻单元P2。Specifically, a possible implementation method is to compare whether the intra-frame prediction modes in consecutive adjacent blocks in A1, A2, and A3 are the same, and compare whether the intra-frame prediction modes in consecutive adjacent blocks in B1, B2, and B3 are the same , if two consecutive adjacent blocks have the same intra prediction mode, they are fused into one adjacent unit. According to the method, several adjacent units are obtained, denoted as P1, P2, P3.... For example, a situation may be that the motion vectors in two consecutive adjacent blocks A2 and A3 are the same, which is denoted as P1, and the motion vectors in two consecutive adjacent blocks B1 and B2 are the same, which is denoted as P2. It is also possible that only the motion vectors in the consecutive adjacent blocks of A1 and A2 are the same, which is denoted as P1. It may also be that the motion vectors of A1, A2, and A3 are the same, which is marked as the adjacent unit P1, and the motion vectors of B1, B2, and B3 are the same, which is marked as the adjacent unit P2.
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
此后处理不在本专利权利要求中,但为使实施例更清晰完整,将其加入实施例中。The subsequent processing is not included in the patent claims, but it is added to the embodiments in order to make the embodiments clearer and more complete.
具体地,将相邻单元中与当前像素块相邻边界最长相邻块作为参考相邻单元。取出这个参考相邻单元中的帧内预测模式信息作为当前块的最可能帧内预测模式。Specifically, the adjacent block with the longest boundary adjacent to the current pixel block is used as the reference adjacent unit. Take the intra prediction mode information in the reference neighboring unit as the most probable intra prediction mode of the current block.
实施例5Example 5
本实例提供的视频编解码中帧间预测块相邻边界长度导出方法,具体包括:This example provides a method for deriving the adjacent boundary length of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图1所示,当前像素块的空间域相邻块有A1,A2,……,AN,B1,B2,……BM,其中有K个块是帧间预测块,K≥0。将K个帧间预测块中与当前像素块参考帧方向相同的块的运动信息存储到输入装置中。Specifically, as shown in Figure 1, the adjacent blocks in the spatial domain of the current pixel block include A1, A2, ..., AN, B1, B2, ... BM, among which K blocks are inter-frame prediction blocks, K≥0 . The motion information of the block in the same direction as the reference frame of the current pixel block among the K inter-frame prediction blocks is stored in the input device.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2……AN,B1,B2,……BM,中连续相邻块中的运动矢量偏差是否在一个较小的范围内,如果两个连续相邻块的运动矢量偏差在一个较小范围内,如运动矢量x和y分量的差值的绝对值之和不超过一个给定的阈值,可以是5。则它们属于同一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。Specifically, a possible implementation method is to compare whether the motion vector deviations in consecutive adjacent blocks in A1, A2 ... AN, B1, B2, ... BM, are within a small range, if two consecutive The motion vector deviation of adjacent blocks is within a small range, for example, the sum of the absolute values of the differences between the x and y components of the motion vector does not exceed a given threshold, which may be 5. Then they belong to the same adjacent unit. According to the method, several adjacent units are obtained, denoted as P1, P2, P3....
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
此后处理过程同实施例1最后一段所述,在此不赘述。The subsequent processing is the same as that described in the last paragraph of Embodiment 1, and will not be repeated here.
实施例6Example 6
图4为一种当前像素块以及其空间域相邻块的示意图。FIG. 4 is a schematic diagram of a current pixel block and its neighboring blocks in the spatial domain.
本实例提供的视频编解码中帧内预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of intra prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图4所示,当前像素块周围有A1、A2、A3,B1、B2、B3六个相邻块。首先获得这些相邻块中帧内预测块的帧内预测模式信息。Specifically, as shown in FIG. 4, there are six adjacent blocks A1, A2, A3, B1, B2, and B3 surrounding the current pixel block. Firstly, the intra prediction mode information of the intra prediction blocks in these adjacent blocks is obtained.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2,A3中连续相邻块中的帧内预测模式的角度是否相差不大,比较B1,B2,B3中连续相邻块中的帧内预测模式角度是否相差不大,如果两个连续相邻块的帧内预测模式角度相差不大,如帧内预测模式的角度差在一个给定阈值内,可以是10度。则它们属于同一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。Specifically, a possible implementation method is to compare whether the angles of intra prediction modes in consecutive adjacent blocks in A1, A2, and A3 are not much different, and compare the angles of intra prediction modes in consecutive adjacent blocks in B1, B2, and B3. Whether the angles of the prediction modes are not much different, if the angles of the intra-frame prediction modes of two consecutive adjacent blocks are not much different, for example, the angle difference of the intra-frame prediction modes is within a given threshold, which may be 10 degrees. Then they belong to the same adjacent unit. According to the method, several adjacent units are obtained, denoted as P1, P2, P3....
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
此后处理不在本专利权利要求中,但为使实施例更清晰完整,将其加入实施例中。The subsequent processing is not included in the patent claims, but it is added to the embodiments in order to make the embodiments clearer and more complete.
具体地,将相邻单元中与当前像素块相邻边界最长相邻块作为参考相邻单元。取出这个参考相邻单元中的预测角度位于中间的帧内预测模式信息作为当前块的最可能帧内预测模式。Specifically, the adjacent block with the longest boundary adjacent to the current pixel block is used as the reference adjacent unit. The intra-frame prediction mode information whose prediction angle in the reference neighboring unit is in the middle is taken out as the most probable intra-frame prediction mode of the current block.
实施例7Example 7
图2为一种当前像素块以及其空间域相邻运动矢量存储单元的示意图。FIG. 2 is a schematic diagram of a current pixel block and its adjacent motion vector storage units in the spatial domain.
本实例提供的视频编解码中帧间预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块存在的至少两个相邻块。Step 1, at least two adjacent blocks existing in the current pixel block are obtained.
具体地,如图2所示,当前像素块周围有A1~A4,B1~B4,C1~C3运动矢量存储单元。这些运动矢量存储单元为所述的相邻块。首先获得这些运动矢量存储单元中的运动矢量。Specifically, as shown in FIG. 2, there are motion vector storage units A1-A4, B1-B4, and C1-C3 around the current pixel block. These motion vector storage units are said adjacent blocks. First obtain the motion vectors in these motion vector storage units.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,由步骤一获得多个相邻块后,检查所有相邻运动矢量存储单元A1~A4,B1~B4,C1~C3中的连续且运动矢量相同的运动矢量存储单元,连续且运动矢量相同的运动矢量存储单元属于同一个相邻单元。在图2中,一种可能的情况为A4,C3,B4的预测信息一致,则它们融合成一个相邻单元。Specifically, after obtaining a plurality of adjacent blocks in step 1, check all adjacent motion vector storage units A1-A4, B1-B4, and C1-C3 that are continuous and have the same motion vector. The same motion vector storage unit belongs to the same neighboring unit. In Fig. 2, a possible situation is that the prediction information of A4, C3, and B4 are consistent, so they are fused into one adjacent unit.
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
此后处理过程同实施例1最后一段所述,在此不赘述。The subsequent processing is the same as that described in the last paragraph of Embodiment 1, and will not be repeated here.
实施例8Example 8
本实例提供的视频编解码中帧间预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图1所示,当前像素块的空间域相邻块有A1,A2,……,AN,B1,B2,……BM,其中有K个块是帧间预测块,K≥0。将K个帧间预测块中与当前像素块参考帧方向相同的块的运动信息存储到输入装置中。Specifically, as shown in Figure 1, the adjacent blocks in the spatial domain of the current pixel block include A1, A2, ..., AN, B1, B2, ... BM, among which K blocks are inter-frame prediction blocks, K≥0 . The motion information of the block in the same direction as the reference frame of the current pixel block among the K inter-frame prediction blocks is stored in the input device.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2……AN,B1,B2,……BM,中连续相邻块中的运动矢量偏差是否在一个较小的范围内,如运动矢量x和y分量的差值的绝对值之和不超过一个给定的阈值,可以是10。,则它们属于同一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。Specifically, a possible implementation method is to compare whether the motion vector deviations in consecutive adjacent blocks in A1, A2 ... AN, B1, B2, ... BM, are within a small range, such as the motion vector x The sum of the absolute values of the differences with the y component does not exceed a given threshold, which can be 10. , they belong to the same adjacent unit. According to the method, several adjacent units are obtained, denoted as P1, P2, P3....
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
此后处理过程同实施例1最后一段所述,在此不赘述。The subsequent processing is the same as that described in the last paragraph of Embodiment 1, and will not be repeated here.
实施例9Example 9
本实例提供的视频编解码中帧间预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图1所示,当前像素块的空间域相邻块有A1,A2,……,AN,B1,B2,……BM,其中有K个块是帧间预测块,K≥0。将K个帧间预测块中与当前像素块参考帧方向相同的块的运动信息存储到输入装置中。Specifically, as shown in Figure 1, the adjacent blocks in the spatial domain of the current pixel block include A1, A2, ..., AN, B1, B2, ... BM, among which K blocks are inter-frame prediction blocks, K≥0 . The motion information of the block in the same direction as the reference frame of the current pixel block among the K inter-frame prediction blocks is stored in the input device.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2……AN,B1,B2,……BM,中连续相邻块中的运动矢量偏差是否在一个较小的范围内,如运动矢量x和y分量的差值的绝对值中较大的数不超过一个给定的阈值,可以是10,则它们属于同一个相邻单元。一种可能的情况为,A1、A2运动矢量x和y分量的差值的绝对值中较大的数为5,小于10。则将A1、A2融合为一个相邻单元,此相邻单元记为P1,其的运动矢量为A1和A2运动矢量的平均值。一种可能的情况为P1与A3运动矢量x和y分量的差值的绝对值中较大的数为3,小于10。则将P1与A3融合为一个相邻单元,仍然记为P1,其运动矢量为原P1与A3运动矢量的平均值。如此循环迭代处理。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。Specifically, a possible implementation method is to compare whether the motion vector deviations in consecutive adjacent blocks in A1, A2 ... AN, B1, B2, ... BM, are within a small range, such as the motion vector x The larger number in the absolute value of the difference with the y component does not exceed a given threshold, which can be 10, then they belong to the same adjacent unit. A possible situation is that the larger number of the absolute value of the difference between the x and y components of the A1 and A2 motion vectors is 5 and less than 10. Then A1 and A2 are merged into one adjacent unit, and this adjacent unit is marked as P1, and its motion vector is the average value of the motion vectors of A1 and A2. A possible situation is that the greater number in the absolute value of the difference between the x and y components of the motion vectors P1 and A3 is 3, which is less than 10. Then P1 and A3 are fused into one adjacent unit, which is still recorded as P1, and its motion vector is the average value of the original P1 and A3 motion vectors. Such a loop iterative processing. According to the method, several adjacent units are obtained, denoted as P1, P2, P3....
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。此后处理过程同实施例1最后一段所述,在此不赘述。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block. The subsequent processing is the same as that described in the last paragraph of Embodiment 1, and will not be repeated here.
实施例10Example 10
图3为一种当前像素块以及其空间域相邻块的示意图。FIG. 3 is a schematic diagram of a current pixel block and its neighboring blocks in the spatial domain.
本实例提供的视频编解码中帧间预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of inter-frame prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图3所示,当前像素块周围有A1、A2、A3,B1、B2、B3六个相邻块。首先获得这些相邻块中的运动矢量。Specifically, as shown in FIG. 3, there are six adjacent blocks A1, A2, A3, B1, B2, and B3 around the current pixel block. Motion vectors in these neighboring blocks are first obtained.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2,A3中连续相邻块中的缩放后的运动矢量是否相同,比较B1,B2,B3中连续相邻块中的缩放后的运动矢量是否相同。所述的运动矢量缩放方法为:相邻块的运动矢量乘以当前块与当前块参考块之间的距离,再除以相邻块与相邻块参考块之间距离得到的值。Specifically, a possible implementation method is to compare whether the scaled motion vectors in consecutive adjacent blocks in A1, A2, and A3 are the same, and compare the scaled motion vectors in consecutive adjacent blocks in B1, B2, and B3 Is it the same. The motion vector scaling method is as follows: the motion vector of the adjacent block is multiplied by the distance between the current block and the reference block of the current block, and then divided by the distance between the adjacent block and the reference block of the adjacent block.
如果任意个连续相邻块缩放后的运动矢量相同,则它们属于同一个相邻单元。如果一个相邻块的缩放后的运动矢量不同于任何与其相连的相邻块缩放后的运动矢量,则它自身作为一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。例如:一种情况可以是,A2、A3两个连续相邻块中的缩放后的运动矢量相同,则记为P1,B1、B2两个连续相邻块中的运动矢量相同,记为P2,A1记为P3,B3记为P4。也可以是,A1、A2、A3缩放后的运动矢量相同,记为相邻单元P1,B1、B2、B3缩放后的运动矢量相同,记为相邻单元P2。If the scaled motion vectors of any consecutive adjacent blocks are the same, they belong to the same adjacent unit. If the scaled motion vector of a neighboring block is different from the scaled motion vectors of any neighboring blocks to which it is connected, it is considered as a neighboring unit by itself. According to the method, several adjacent units are obtained, denoted as P1, P2, P3.... For example: a situation may be that the scaled motion vectors in two consecutive adjacent blocks A2 and A3 are the same, which is recorded as P1, and the motion vectors in two consecutive adjacent blocks B1 and B2 are the same, which is recorded as P2, A1 is recorded as P3, and B3 is recorded as P4. It may also be that the scaled motion vectors of A1, A2, and A3 are the same, which is marked as the adjacent unit P1, and the scaled motion vectors of B1, B2, and B3 are the same, which is marked as the adjacent unit P2.
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。此后处理过程同实施例1最后一段所述,在此不赘述。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block. The subsequent processing is the same as that described in the last paragraph of Embodiment 1, and will not be repeated here.
实施例11Example 11
图4为一种当前像素块以及其空间域相邻块的示意图。FIG. 4 is a schematic diagram of a current pixel block and its neighboring blocks in the spatial domain.
本实例提供的视频编解码中帧内预测块相邻边界导出方法,具体包括:This example provides a method for deriving adjacent boundaries of intra prediction blocks in video encoding and decoding, including:
步骤一,获得当前像素块的至少两个相邻块。Step 1, at least two adjacent blocks of the current pixel block are obtained.
具体地,如图4所示,当前像素块周围有A1、A2、A3,B1、B2、B3六个相邻块。首先获得这些相邻块中帧内预测块的帧内预测模式信息。Specifically, as shown in FIG. 4, there are six adjacent blocks A1, A2, A3, B1, B2, and B3 around the current pixel block. Firstly, the intra prediction mode information of the intra prediction blocks in these adjacent blocks is obtained.
步骤二,将相邻块为连续且其预测信息一致的相邻块融合为一个相邻单元。Step 2: Merge adjacent blocks whose adjacent blocks are continuous and whose prediction information is consistent into one adjacent unit.
具体地,一种可能的实现方法为,比较A1,A2,A3中连续相邻块中的帧内预测模式的角度是否相差不大,比较B1,B2,B3中连续相邻块中的帧内预测模式角度是否相差在30度以内,如果两个连续相邻块的帧内预测模式角度相差不大,则它们属于同一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。Specifically, a possible implementation method is to compare whether the angles of intra prediction modes in consecutive adjacent blocks in A1, A2, and A3 are not much different, and compare the angles of intra prediction modes in consecutive adjacent blocks in B1, B2, and B3. Whether the difference between prediction mode angles is within 30 degrees. If the difference between the intra prediction mode angles of two consecutive adjacent blocks is not large, they belong to the same adjacent unit. According to the method, several adjacent units are obtained, denoted as P1, P2, P3....
步骤三,计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Step 3: Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the obtained length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,一种可能的实现方法为,根据P1,P2,P3……边界点的坐标位置以及当前像素块边界点的坐标位置,计算出相邻单元与当前像素块的重合边界的长度,所得长度即相邻单元与当前像素块的相邻边界长度。Specifically, a possible implementation method is to calculate the length of the coincident boundary between the adjacent unit and the current pixel block according to the coordinate positions of the boundary points P1, P2, P3... and the coordinate positions of the current pixel block boundary points, and the obtained The length is the adjacent boundary length between the adjacent unit and the current pixel block.
实施例12Example 12
图5为本发明实施例提供的一种视频编解码中相邻边界长度导出装置结构示意图。如图5所示,本实施例中,所述视频编解码中运动矢量导出装置包括输入模块310,融合模块320,计算相邻边界长度的相邻边界长度计算模块330。FIG. 5 is a schematic structural diagram of an apparatus for deriving adjacent boundary lengths in video coding and decoding according to an embodiment of the present invention. As shown in FIG. 5 , in this embodiment, the apparatus for deriving motion vectors in video coding and decoding includes an
本实施例提供的输入模块310,具体用于:如图1所示,当前像素块的空间域相邻块有A1,A2,……,AN,B1,B2,……BM,其中有K个块是帧间预测块,K≥0。将K个帧间预测块中与当前像素块参考帧方向相同的块的运动信息存储到输入装置中。The
本实施例提供的相邻块融合模块320,具体用于:将获得相邻块中的连续相邻块中预测信息一致的相邻块融合为一个相邻单元相邻单元。具体地,如图1所示,比较A1,A2……AN,B1,B2,……BM,中连续相邻块中的运动矢量是否相同,如果两个连续相邻块的运动矢量相同,则它们属于同一个相邻单元。根据所述方法,得到若干个相邻单元,记为P1,P2,P3……。The adjacent
本实施例提供的参考相邻块选择单元输出单元330,具体用于:The reference adjacent block selection
计算相邻单元与当前像素块重合边界的长度,所得长度即相邻单元与当前像素块相邻边界长度。Calculate the length of the overlapping boundary between the adjacent unit and the current pixel block, and the resulting length is the length of the adjacent boundary between the adjacent unit and the current pixel block.
具体地,根据所述得到的相邻单元的边界点坐标以及当前像素块的边界点坐标,计算出所述相邻单元与当前像素块的重合边界,即为所述的相邻边界长度。Specifically, according to the obtained boundary point coordinates of the adjacent unit and the boundary point coordinates of the current pixel block, the coincident boundary between the adjacent unit and the current pixel block is calculated, which is the adjacent boundary length.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310240913.6A CN103338373B (en) | 2013-06-15 | 2013-06-15 | A kind of adjacent boundary length deriving method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310240913.6A CN103338373B (en) | 2013-06-15 | 2013-06-15 | A kind of adjacent boundary length deriving method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103338373A true CN103338373A (en) | 2013-10-02 |
CN103338373B CN103338373B (en) | 2016-05-04 |
Family
ID=49246459
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310240913.6A Active CN103338373B (en) | 2013-06-15 | 2013-06-15 | A kind of adjacent boundary length deriving method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103338373B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020244425A1 (en) * | 2019-06-05 | 2020-12-10 | 杭州海康威视数字技术股份有限公司 | Encoding and decoding method and apparatus, and devices thereof |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004512596A (en) * | 2000-10-21 | 2004-04-22 | 韓國電子通信研究院 | Non-linear quantization and similarity matching method for image information retrieval |
CN1929611A (en) * | 2005-09-06 | 2007-03-14 | 三星电子株式会社 | Methods and apparatus for video intraprediction encoding and decoding |
CN101873500A (en) * | 2009-04-24 | 2010-10-27 | 华为技术有限公司 | Inter-frame predictive encoding method, inter-frame predictive decoding method and device |
CN102263951A (en) * | 2011-07-06 | 2011-11-30 | 北京航空航天大学 | A Fast Fractal Video Compression and Decompression Method |
-
2013
- 2013-06-15 CN CN201310240913.6A patent/CN103338373B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004512596A (en) * | 2000-10-21 | 2004-04-22 | 韓國電子通信研究院 | Non-linear quantization and similarity matching method for image information retrieval |
CN1929611A (en) * | 2005-09-06 | 2007-03-14 | 三星电子株式会社 | Methods and apparatus for video intraprediction encoding and decoding |
CN101873500A (en) * | 2009-04-24 | 2010-10-27 | 华为技术有限公司 | Inter-frame predictive encoding method, inter-frame predictive decoding method and device |
CN102263951A (en) * | 2011-07-06 | 2011-11-30 | 北京航空航天大学 | A Fast Fractal Video Compression and Decompression Method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020244425A1 (en) * | 2019-06-05 | 2020-12-10 | 杭州海康威视数字技术股份有限公司 | Encoding and decoding method and apparatus, and devices thereof |
Also Published As
Publication number | Publication date |
---|---|
CN103338373B (en) | 2016-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103024378B (en) | Movable information deriving method and device in a kind of coding and decoding video | |
US20230131933A1 (en) | Method and apparatus for candidate list pruning | |
WO2020134968A1 (en) | Encoding and decoding method and device thereof | |
TWI493975B (en) | System and method for low complexity motion vector derivation | |
JP2017535180A5 (en) | ||
JP2016504864A5 (en) | ||
WO2013060471A1 (en) | Method and device for determining parameters for encoding or decoding of an image of a video sequence | |
CN103139564A (en) | Methods for encoding/decoding of video using common merging candidate set of asymmetric partitions | |
CN104717513A (en) | Bidirectional interframe predicting method and device | |
WO2020259372A1 (en) | Coding and decoding method, apparatus and devicethereof | |
WO2015039440A1 (en) | Inter-frame prediction encoding method and encoder | |
CN104883566B (en) | The fast algorithm that a kind of intra prediction block size suitable for HEVC standard divides | |
Wang et al. | A fast intra prediction algorithm for 360-degree equirectangular panoramic video | |
CN101257625B (en) | Method for indexing position in video decoder and video decoder | |
CN102143361A (en) | Video coding method and video coding device | |
CN103338373B (en) | A kind of adjacent boundary length deriving method and device | |
CN102946535A (en) | Method and device for obtaining disparity vector predictors of prediction units | |
CN101986714B (en) | Self-adaptive error concealing method | |
WO2022116574A1 (en) | Motion vector prediction method and system based on quadratic polynomial and computer medium | |
CN104618715B (en) | A kind of method and device obtaining minimum rate distortion costs | |
CN104486633B (en) | Video error hides method and device | |
US20150036741A1 (en) | Method for storing movement prediction-related information in an interscreen prediction method, and method for calculating the movement prediction-related information in the inter-screen prediction method | |
CN105516724B (en) | A kind of motion information storage compacting method | |
CN116962716A (en) | Video processing method and device, electronic equipment and storage medium | |
CN101626505B (en) | Mode processing method and device thereof of duplex-prediction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |