[go: up one dir, main page]

CN104702957B - Motion vector compression method and device - Google Patents

Motion vector compression method and device Download PDF

Info

Publication number
CN104702957B
CN104702957B CN201510091702.XA CN201510091702A CN104702957B CN 104702957 B CN104702957 B CN 104702957B CN 201510091702 A CN201510091702 A CN 201510091702A CN 104702957 B CN104702957 B CN 104702957B
Authority
CN
China
Prior art keywords
motion vector
pixel precision
area
pixel
precision
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.)
Expired - Fee Related
Application number
CN201510091702.XA
Other languages
Chinese (zh)
Other versions
CN104702957A (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.)
Peking University
Original Assignee
Peking University
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 Peking University filed Critical Peking University
Priority to CN201510091702.XA priority Critical patent/CN104702957B/en
Publication of CN104702957A publication Critical patent/CN104702957A/en
Application granted granted Critical
Publication of CN104702957B publication Critical patent/CN104702957B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明公开了一种运动矢量的压缩方法和装置,以解决现有技术中对运动矢量压缩编码时间耗时长、性能局限的问题。所述方法包括搜索运动矢量的像素精度区域,对所述运动矢量按照两个不同的像素精度区域进行搜索;对第一区域的MV采用第一表示法进行表示,对第二区域的MV采用第二表示法进行表示。本发明通过在运动搜索的过程中对所述运动矢量按照不同像素精度区域的方式进行分区搜索,对低像素精度区域的部分像素进行舍弃,而后对不同像素精度区域的MV进行适当的转换并采用不同的表示方法进行表示,从而达到压缩运动矢量的目的,对压缩后的运动矢量进行编码,减少了码流,优化了运动估计性能,提高了运动估计速度,实现编码性能的增益。

The invention discloses a method and device for compressing motion vectors to solve the problems of long time-consuming compression and encoding of motion vectors and limited performance in the prior art. The method includes searching the pixel precision area of the motion vector, searching the motion vector according to two different pixel precision areas; expressing the MV of the first area by using the first expression, and using the second expression for the MV of the second area Two notation for representation. In the process of motion search, the present invention performs partition search on the motion vector according to different pixel precision regions, discards some pixels in the low pixel precision region, and then properly converts the MV of different pixel precision regions and uses Different representation methods are used to express, so as to achieve the purpose of compressing the motion vector, encoding the compressed motion vector, reducing the code stream, optimizing the performance of motion estimation, improving the speed of motion estimation, and realizing the gain of coding performance.

Description

运动矢量压缩方法和装置Motion vector compression method and device

技术领域technical field

本发明属于数据压缩技术领域,具体涉及一种运动矢量的压缩方法和装置。The invention belongs to the technical field of data compression, and in particular relates to a motion vector compression method and device.

背景技术Background technique

在视频压缩技术领域,国际上的主流编码标准是H.264/AVC,我国的第一代视频压缩编码标准是MPEG-2,AVS是我国具备自主知识产权的第二代信源编码标准。2012年,AVS+引入了先进的场技术和熵编码技术,正式成为了广电行业标准。目前,我国即将推出的AVS2标准则是AVS的下一代标准。In the field of video compression technology, the international mainstream coding standard is H.264/AVC, the first generation video compression coding standard in my country is MPEG-2, and AVS is the second generation source coding standard with independent intellectual property rights in my country. In 2012, AVS+ introduced advanced field technology and entropy coding technology, and officially became the broadcasting industry standard. At present, my country's upcoming AVS2 standard is the next-generation standard of AVS.

AVS2基于四叉树的分块模式和灵活的参考帧,使得AVS2对高清视频序列的编码性能有巨大的提高,从而相比之前国际上的主流编码标准H.264/AVC带宽节省可达到50%以上,主观质量也得到大幅提升,具有更广阔的应用空间。例如,对于块大小来说,最大编码单元(CTU,Coding Tree Unit)从AVS的16x16增加到了AVS2的64x64,编码单元可从64x64划分到8x8大小,使得编码能够适应更多变的分辨率和更复杂的图像纹理。AVS2's quadtree-based block mode and flexible reference frames greatly improve the coding performance of AVS2 for high-definition video sequences, thus saving up to 50% of the bandwidth compared to the previous international mainstream coding standard H.264/AVC Above, the subjective quality has also been greatly improved, and has a broader application space. For example, for the block size, the largest coding unit (CTU, Coding Tree Unit) has been increased from 16x16 of AVS to 64x64 of AVS2, and the coding unit can be divided from 64x64 to 8x8, so that the coding can adapt to more variable resolutions and more Complex image textures.

但是,AVS2整个编码器的复杂度随着性能的提高呈数倍的增加,其中帧间编码占据了编码的主要时间(除了全I帧的编码配置)。帧间编码最耗时的部分是运动估计,这来源于在整像素和分像素精度上搜索匹配块的过程。现有的AVS2的数据压缩过程中对运动矢量的压缩编码,目前还存在耗时过长的问题。另外,帧间预测过程中最终运动矢量的压缩性能是影响AVS2的压缩性能的主要因素,由于现有技术中对运动矢量的压缩性能存在一定的局限性,使得帧间预测准确性不高,从而使得AVS2标准相对于ITU-T VCEG和ISO/IEC MPEG标准化组织联合发布的最新的视频编码标准HEVC,还有一定差距。However, the complexity of the entire encoder of AVS2 increases several times with the improvement of performance, and inter-frame encoding occupies the main time of encoding (except for the encoding configuration of all I frames). The most time-consuming part of inter-coding is motion estimation, which comes from the process of searching for matching blocks at integer and sub-pixel precision. The compression encoding of the motion vector in the existing AVS2 data compression process still has the problem of taking too long. In addition, the compression performance of the final motion vector in the inter-frame prediction process is the main factor affecting the compression performance of AVS2. Because there are certain limitations in the compression performance of the motion vector in the prior art, the accuracy of the inter-frame prediction is not high, thus There is still a gap between the AVS2 standard and the latest video coding standard HEVC jointly released by the ITU-T VCEG and the ISO/IEC MPEG standardization organization.

发明内容Contents of the invention

本发明的目的是提供一种运动矢量的压缩方法和装置,通过引入渐进的运动矢量精度,以优化运动估计性能,提高运动估计速度,实现编码性能的增益。The purpose of the present invention is to provide a motion vector compression method and device, by introducing progressive motion vector accuracy, to optimize the motion estimation performance, improve the motion estimation speed, and realize the gain of coding performance.

根据本发明的一个方面,提供了一种运动矢量的压缩方法,所述方法包括:According to one aspect of the present invention, a method for compressing motion vectors is provided, the method comprising:

搜索所述运动矢量的像素精度区域,将所述运动矢量分为两个区域,并对两个区域使用不同的像素精度进行搜索;searching the pixel precision region of the motion vector, dividing the motion vector into two regions, and searching the two regions using different pixel precision;

对第一区域的MV采用第一表示法进行表示,对第二区域的MV采用第二表示法进行表示。The MV of the first region is represented by the first notation, and the MV of the second region is represented by the second notation.

上述方案中,所述两个不同的像素精度区域,进一步为1/4像素精度的第一区域和1/2像素精度的第二区域。In the above solution, the two different pixel precision regions are further a first region with 1/4 pixel precision and a second region with 1/2 pixel precision.

上述方案中,当所述运动矢量位于1/2像素精度的第二区域且本身为1/4像素精度时,则舍弃所述运动矢量所对应的像素点。In the above solution, when the motion vector is located in the second area with 1/2 pixel precision and itself has 1/4 pixel precision, the pixel corresponding to the motion vector is discarded.

上述方案中,所述搜索所述运动矢量的像素精度区域,通过阈值来实现。In the above solution, the search for the pixel-accurate region of the motion vector is realized by a threshold.

上述方案中,所述对第二区域的MV采用第二表示法进行表示,进一步为,在编码端对所述MV进行压缩,在解码端对所述MV进行恢复。In the above solution, the MV of the second region is represented by the second representation, further, the MV is compressed at the encoding end, and the MV is restored at the decoding end.

上述方案中,所述在编码端对所述MV进行压缩,进一步为采用Algorithm 1公式对所述MV进行转换,所述在在解码端对所述MV进行恢复,进一步为采用Algorithm 2公式对所述MV进行转换。In the above scheme, the MV is compressed at the encoding end, and the MV is further converted using the Algorithm 1 formula, and the MV is restored at the decoding end, and the MV is further converted using the Algorithm 2 formula The above MV is converted.

根据本发明的另一个方面,还提供了一种运动矢量的压缩装置,所述装置包括:According to another aspect of the present invention, a motion vector compression device is also provided, the device comprising:

搜索单元,用于搜索所述运动矢量的像素精度区域,将所述运动矢量分为两个区域,并对两个区域使用不同的像素精度进行搜索;a search unit, configured to search for a pixel precision region of the motion vector, divide the motion vector into two regions, and search the two regions using different pixel precision;

转换单元,所述转换单元与所述搜索单元相连,用于对第一区域的MV采用第一表示法进行表示,对第二区域的MV采用第二表示法进行表示。A conversion unit, which is connected to the search unit and configured to express the MV of the first area by using the first notation, and express the MV of the second area by using the second notation.

上述方案中,所述搜索单元进一步用于对所述运动矢量按照为1/4像素精度的第一区域和1/2像素精度的第二区域的不同区域进行搜索。In the solution above, the search unit is further configured to search the motion vector according to different areas of the first area with 1/4 pixel precision and the second area with 1/2 pixel precision.

上述方案中,所述搜索单元进一步用于当搜索的所述运动矢量位于1/2像素精度的第二区域且所述运动矢量本身为1/4像素精度时,则舍弃所述运动矢量所对应的像素点。In the above solution, the search unit is further configured to discard the motion vector corresponding to the motion vector when the searched motion vector is located in the second area of 1/2 pixel precision and the motion vector itself is 1/4 pixel precision. of pixels.

上述方案中,所述转换单元所述对第二区域的MV采用第二表示法进行表示,进一步为,在编码端对所述MV进行压缩,在解码端对所述MV进行恢复。In the above solution, the conversion unit expresses the MV of the second area using the second representation, and further comprises: compressing the MV at the encoding end, and recovering the MV at the decoding end.

由以上本发明实施例的技术方案可以看出,本发明运动矢量的压缩方法,通过在运动搜索的过程中,对所述运动矢量按照不同像素精度区域的方式进行分区搜索,对低像素精度区域的部分像素进行弃,而后对不同像素精度区域的MV进行适当的转换并采用不同的表示方法进行表示,从而达到压缩运动矢量的目的,对压缩后的运动矢量进行编码,减少了码流,优化了运动估计性能,提高了运动估计速度,实现编码性能的增益。It can be seen from the above technical solutions of the embodiments of the present invention that the motion vector compression method of the present invention performs partition search on the motion vector according to different pixel precision regions during the motion search process, and the low pixel precision region Part of the pixels are discarded, and then the MVs in different pixel precision areas are properly converted and represented by different representation methods, so as to achieve the purpose of compressing the motion vector, encoding the compressed motion vector, reducing the code stream, optimizing The performance of motion estimation is improved, the speed of motion estimation is improved, and the gain of coding performance is realized.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without any creative effort.

图1为本发明第一实施例的运动矢量压缩方法流程示意图;FIG. 1 is a schematic flow chart of a motion vector compression method according to a first embodiment of the present invention;

图2为本发明第二实施例的运动矢量压缩方法流程示意图;FIG. 2 is a schematic flowchart of a motion vector compression method according to a second embodiment of the present invention;

图3为本发明第二实施例中的运动矢量压缩前的示意图;FIG. 3 is a schematic diagram before motion vector compression in the second embodiment of the present invention;

图4为本发明第二实施例中的运动矢量压缩后的示意图;4 is a schematic diagram of compressed motion vectors in the second embodiment of the present invention;

图5为本发明第三实施例的运动矢量压缩装置结构示意图。FIG. 5 is a schematic structural diagram of a motion vector compression device according to a third embodiment of the present invention.

具体实施方式Detailed ways

下面详细描述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语)具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样定义,不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It should also be understood that terms such as those defined in commonly used dictionaries should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless defined as herein explain.

本发明要解决的技术问题是提高帧间预测过程中最终运动矢量的压缩速率和压缩性。AVS2标准中,帧间预测过程中存在的运动估计复杂度和运动矢量编码比特过多的双重问题,因此,运动估计性能的优化和运动速度的提高还有很大空间。在实际的压缩编码过程中,统计并分析帧间预测最终运动矢量的行为,得出运动矢量的分布规律,呈现出运动矢量聚集在MVP附近的趋势,这使得利用运动矢量的统计信息来优化运动矢量成为了可能。本发明在上述统计结果的基础之上,通过提出渐近的运动矢量精度的概念并将其引入到运动矢量的压缩中,根据运动矢量(MV,Motion Vector)与运动矢量预测值(MVP,Motion VectorPredictor)相对位置的不同对MV搜索的精度进行不同的限制,从而调整运动矢量的搜索过程,同时还提高了MV幅值的压缩效果,进而降低编码码率。The technical problem to be solved by the present invention is to improve the compression rate and compressibility of the final motion vector in the inter-frame prediction process. In the AVS2 standard, there are dual problems of motion estimation complexity and too many motion vector coding bits in the inter-frame prediction process. Therefore, there is still a lot of room for optimization of motion estimation performance and improvement of motion speed. In the actual compression coding process, statistics and analysis of the inter-frame prediction behavior of the final motion vector, the distribution of the motion vector is obtained, showing the trend of motion vectors gathered near the MVP, which makes the use of motion vector statistical information to optimize motion Vectors became possible. On the basis of the above-mentioned statistical results, the present invention proposes the concept of asymptotic motion vector accuracy and introduces it into the compression of motion vectors, according to motion vector (MV, Motion Vector) and motion vector prediction value (MVP, Motion The difference in the relative position of VectorPredictor) imposes different restrictions on the accuracy of the MV search, thereby adjusting the search process of the motion vector, and at the same time improving the compression effect of the MV amplitude, thereby reducing the encoding bit rate.

目前,在AVS标准中,MV固定的用1/4像素精度来表示,而本发明对相对接近MVP的MV使用较高的精度,对相对远离MVP的MV使用较低的精度,使得越靠近MVP的MV越有可能获得最优的率失真代价。在编码器中具体实现时,对接近MVP的在一定范围内的MV使用高的像素精度,如1/4像素精度,对远离MVP的在一定范围内的MV使用低的像素精度,如1/2像素精度。这里的高和低是相对于接近和远离时而言,是一个相对的概念,在实际实现时,可以进行无限小的范围区分,以实现MV相对MVP距离从近到远,相对的用于表示MV的像素精度从高到低的渐近过程,即渐进的运动矢量精度(PMVR,Progressive Motion VectorResolution)。At present, in the AVS standard, MVs are fixedly represented by 1/4 pixel precision, and the present invention uses higher precision for MVs relatively close to the MVP, and uses lower precision for MVs relatively far away from the MVP, so that the closer to the MVP The MV of is more likely to obtain the optimal rate-distortion cost. When specifically implemented in the encoder, use high pixel precision for MVs within a certain range that are close to the MVP, such as 1/4 pixel precision, and use low pixel precision for MVs that are far away from the MVP within a certain range, such as 1/4 2 pixel precision. The high and low here are relative concepts relative to approach and distance. In actual implementation, an infinitely small range can be distinguished to realize the distance between MV and MVP from near to far. Relatively used to represent MV The asymptotic process of pixel precision from high to low, that is, progressive motion vector precision (PMVR, Progressive Motion Vector Resolution).

下面结合附图和具体实施例对本发明的技术方案作详细的说明。The technical scheme of the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

图1是本发明第一实施例的运动矢量压缩方法流程示意图。FIG. 1 is a schematic flowchart of a motion vector compression method according to a first embodiment of the present invention.

如图1所示,本实施例的运动矢量压缩方法包括如下步骤:As shown in Figure 1, the motion vector compression method of the present embodiment includes the following steps:

步骤S1,搜索运动矢量的像素精度区域,将所述运动矢量分为两个区域,所述两个区域包括第一区域和第二区域,并对所述两个区域使用不同的像素精度进行搜索。Step S1, searching the pixel precision area of the motion vector, dividing the motion vector into two areas, the two areas include a first area and a second area, and searching the two areas using different pixel accuracy .

本步骤中,将所述运动矢量分为两个区域,可以通过阈值(TH)来实现。在实际实现的过程中,所述将所述运动矢量限制为两个区域时,可以为1/4像素精度和1/2像素精度,如[CTR-TH,CTR+TH]区域内用1/4像素精度搜索运动矢量,区域外用1/2像素精度搜索运动矢量。其中,所述CTR表示矢量表示的起始点。In this step, the motion vector is divided into two regions, which can be realized by a threshold (TH). In the actual implementation process, when the motion vector is limited to two areas, it can be 1/4 pixel precision and 1/2 pixel precision, such as [CTR-TH, CTR+TH] area with 1/ Search for motion vectors with 4-pixel precision, and search for motion vectors with 1/2-pixel precision outside the area. Wherein, the CTR represents the starting point of the vector representation.

在上述区域限制的基础上,当进行运动搜索时,可以对现有技术中的逐步求精方法进行调整,如设定第一区域为较高精度,而第二区域为较低精度,当候选的MV超过了第一区域的精度范围时,则该MV被忽略,不用被搜索,从而剔除了一部分第一区域精度的MV的搜索,降低了运动估计的复杂度。在具体的实现过程中,表现为对MV进行判断,若|MVx-CTRx|>TH或|MVy–CTRy|>TH,且MV为1/4像素精度,则该点舍弃,不参与最佳MV的决策,降低了运动估计的复杂度。On the basis of the above-mentioned area limitation, when performing motion search, the stepwise refinement method in the prior art can be adjusted, such as setting the first area to be of higher precision, and the second area to be of lower precision, when the candidate When the MV of MV exceeds the accuracy range of the first area, the MV is ignored and does not need to be searched, thereby eliminating part of the MV search of the accuracy of the first area, and reducing the complexity of motion estimation. In the specific implementation process, it is shown to judge the MV. If |MVx-CTRx|>TH or |MVy–CTRy|>TH, and the MV is 1/4 pixel precision, then this point is discarded and does not participate in the best MV The decision-making reduces the complexity of motion estimation.

步骤S2,对第一区域的MV采用第一表示法进行表示,对第二区域的MV采用第二表示法进行表示。In step S2, the MV of the first area is represented by the first notation, and the MV of the second area is represented by the second notation.

这里的表示法,是在对所述运动矢量限制不同精度区域的基础上,对不同精度的区域采用不同的表示方法,减少了编码的比特数而不会丢失MV的信息量。例如,对1/4像素精度的第一区域中的MV,采用1/4精度方式进行表示;而对1/2像素精度的第二区域中的MVD或MV,采用Algorithm 1公式或Algorithm 2公式进行转换。其中,所述MVD的Algorithm 1公式转换对应于编码端,MV的Algorithm 2公式转换对应解码端。The expression method here is to use different representation methods for the regions with different precisions on the basis of restricting the regions with different precisions for the motion vector, so as to reduce the number of encoded bits without losing the information amount of the MV. For example, for MV in the first area with 1/4 pixel precision, use 1/4 precision to express; and for MVD or MV in the second area with 1/2 pixel precision, use Algorithm 1 formula or Algorithm 2 formula to convert. Wherein, the Algorithm 1 formula conversion of the MVD corresponds to the encoding end, and the Algorithm 2 formula conversion of the MV corresponds to the decoding end.

需要说明的是,本发明适用于任何编码标准的编码器中的运动矢量。It should be noted that the present invention is applicable to motion vectors in encoders of any encoding standard.

本实施例的运动矢量压缩方法,通过对MVP不同距离的MV划分不同的精度区域,降低了编码端的复杂度,通过如阈值等方法实现上述区域的限制或分割,进而采用不同的表示方法,优化运动估计性能,提高运动估计速度,同时还提高了MV幅值的压缩效果,进而降低编码码率,从而实现编码性能的增益。The motion vector compression method of this embodiment reduces the complexity of the encoding end by dividing MVs with different distances into different precision areas, and realizes the limitation or segmentation of the above-mentioned areas through methods such as thresholds, and then uses different representation methods to optimize The performance of motion estimation improves the speed of motion estimation, and at the same time improves the compression effect of MV amplitude, thereby reducing the encoding bit rate, thereby achieving the gain of encoding performance.

图2所示为本发明第二实施例的运动矢量压缩方法流程示意图。FIG. 2 is a schematic flowchart of a motion vector compression method according to a second embodiment of the present invention.

如图2所示,本实施例以一个运动矢量为例,通过PMVR方法,对所述运动矢量进行压缩。这里的运动矢量,其运动矢量可以是任意标准的。As shown in FIG. 2 , this embodiment takes a motion vector as an example, and uses the PMVR method to compress the motion vector. The motion vector here, the motion vector can be any standard.

所述运动矢量的压缩方法,包括如下步骤:The compression method of described motion vector, comprises the steps:

步骤S21,对所述运动矢量进行搜索,获得1/4像素精度的MV第一区域和1/2像素精度的MV第二区域。Step S21, searching the motion vector to obtain the first MV region with 1/4 pixel precision and the second MV region with 1/2 pixel precision.

本步骤中,PMVR方法通过设定一个阈值TH表示1/4MV精度的使用区域,本实施例中TH取值为2,如图3和图4所示。TH是一个控制1/4像素精度可用范围的阈值(以1/4像素为单位,TH取值为非负整数且值为2的整数倍),其红色方框中的区域即为阈值TH所限定的范围,即红色方框所圈定的区域内,即第一区域,使用1/4像素精度对所述MV进行搜索。第一区域之外的MV都只能使用1/2像素精度进行搜索,所属区域即为第二区域。CTR(CenTer of theRange)是第一区域的中心。In this step, the PMVR method indicates the use area of 1/4MV precision by setting a threshold TH. In this embodiment, the value of TH is 2, as shown in FIG. 3 and FIG. 4 . TH is a threshold that controls the available range of 1/4 pixel precision (in units of 1/4 pixel, TH is a non-negative integer and the value is an integer multiple of 2), and the area in the red box is the threshold TH Within the limited range, that is, the area enclosed by the red square, that is, the first area, the MV is searched with a precision of 1/4 pixel. MVs outside the first area can only be searched with 1/2 pixel accuracy, and the area they belong to is the second area. CTR (CenTer of the Range) is the center of the first area.

如图3所示,当MVP指向半像素或整像素精度位置时,CTR和MVP是重叠的;如图4所示,当MVP指向1/4像素位置时,CTR与MVP各占一个像素点的位置,不重叠。As shown in Figure 3, when the MVP points to a half-pixel or full-pixel precision position, the CTR and MVP overlap; as shown in Figure 4, when the MVP points to a 1/4 pixel position, the CTR and MVP each occupy a pixel. position, not overlapping.

当CTR与MVP不重叠时,CTR由MVP通过式(1)-(2)舍入得到,式(1)-(2)如下:When the CTR does not overlap with the MVP, the CTR is obtained by rounding the MVP through formula (1)-(2), and the formula (1)-(2) is as follows:

CTRx=MVPx>>1<<1 (1)CTRx=MVPx>>1<<1 (1)

CTRy=MVPy>>1<<1 (2)CTRy=MVPy>>1<<1 (2)

其中,所述CTRx表示CTR在X方向上的分量,MVPx表示MVP在X方向上的分量;所述CTRy表示CTR在Y方向上的分量,MVPy表示MVP在Y方向上的分量。下述涉及到上述符号的表达式均为上述所述的涵义。Wherein, the CTRx indicates the component of the CTR in the X direction, MVPx indicates the component of the MVP in the X direction; the CTRy indicates the component of the CTR in the Y direction, and MVPy indicates the component of the MVP in the Y direction. The following expressions related to the above-mentioned symbols all have the above-mentioned meanings.

对于一种极端的情况,当TH=0时,1/4像素精度范围缩小为零,即1/2像素精度会应用到除了SKIP/DIRECT模式MV外的所有MV中,在这种情况下,MVP本身会被舍入到半像素精度,如式(3)-(4)所示:For an extreme case, when TH=0, the 1/4 pixel accuracy range is reduced to zero, that is, the 1/2 pixel accuracy will be applied to all MVs except SKIP/DIRECT mode MVs. In this case, The MVP itself is rounded to half-pixel precision, as shown in equations (3)-(4):

MVPx=MVPx>>1<<1 (3)MVPx=MVPx>>1<<1 (3)

MVPy=MVPy>>1<<1 (4)MVPy=MVPy>>1<<1 (4)

由于对1/4像素区域的限制,PMVR减少了1/4像素的MV被选的机率,从而减少亚像素插值的使用,降低了编解码过程的复杂度。Due to the limitation of 1/4 pixel area, PMVR reduces the probability of 1/4 pixel MV being selected, thereby reducing the use of sub-pixel interpolation and reducing the complexity of the encoding and decoding process.

对于任意运动搜索过程,无论来自单向、对称还是双向编码模式,都采取该步骤。在运动搜索过程中,AVS2采用逐步求精的方法,先搜1/2像素精度点,再搜1/4像素精度点。PMVR对1/4像素精度点的搜索过程进行了调整,如果候选的1/4精度像素点MV超过了1/4像素精度的范围,则该MV被忽略从而不用被搜索,即该点舍弃,不参与最佳MV的决策。这种方法剔除了一部分1/4像素精度位置的搜索,使得运动估计的复杂度下降了。This step is taken for any motion search process, whether from unidirectional, symmetric or bidirectional encoding modes. In the motion search process, AVS2 adopts a step-by-step refinement method, first searches for 1/2 pixel precision points, and then searches for 1/4 pixel precision points. PMVR adjusts the search process of 1/4 pixel precision points. If the candidate 1/4 precision pixel point MV exceeds the range of 1/4 pixel precision, the MV is ignored and does not need to be searched, that is, the point is discarded. Do not participate in the decision of the best MV. This method eliminates part of the search for 1/4 pixel precision positions, which reduces the complexity of motion estimation.

步骤S22,对所述第一区域和第二区域的MV进行转换并根据相应的转换进行表示。Step S22, converting the MVs of the first area and the second area and representing according to the corresponding conversion.

在具体的实现过程中,本步骤用于搜索完成后计算MV Cost,或者最终MVD的编码。In a specific implementation process, this step is used to calculate the MV Cost after the search is completed, or to encode the final MVD.

在本实施例中,对于第一区域中的MV,简单的使用MV–MVP的表示方式,进行编码;对于1/4像素精度范围外的MV,即第二区域中,MVD可以用一种更有效的方式进行转换,而不是简单等于MV–MVP。因为超出范围的MV分量一定是半像素精度的,即在1/4像素单位下是偶数的,所以超出的部分可以缩小一倍而不丢失MV的信息量。In this embodiment, for the MV in the first area, simply use the representation of MV-MVP to encode; Effective way to convert, not simply equal to MV–MVP. Because the MV components that exceed the range must be half-pixel precision, that is, they are even numbers in 1/4 pixel units, so the excess part can be doubled without losing the information of the MV.

优选的,在编码端,对于第二区域的MV,即此方法中特定的MV,MVD采用Algorithm1公式进行调整。所述MVD具体的转换过程如下:Preferably, at the encoding end, for the MV of the second region, that is, the specific MV in this method, the MVD is adjusted using the Algorithm1 formula. The specific conversion process of the MVD is as follows:

将上述转换过程应用于图3和图4所示运动矢量。图3中示出了转换前的A、B和C位置,用上述推导过程对图3中的所述A、B和C位置进行转换后,得到图4的位置。在实际的操作过程中,采用现有AVS2标准对图3所示的运动矢量进行转换,并采用本实施例所述的PMVR方法对图3所示的运动矢量进行转换,将转换结果中的MVD值列入表1,如表1所示:Apply the conversion process described above to the motion vectors shown in Figures 3 and 4. Figure 3 shows the positions of A, B and C before conversion, and the positions of Figure 4 are obtained after converting the positions of A, B and C in Figure 3 through the above derivation process. In the actual operation process, the existing AVS2 standard is used to convert the motion vector shown in Figure 3, and the PMVR method described in this embodiment is used to convert the motion vector shown in Figure 3, and the MVD in the conversion result The values are listed in Table 1, as shown in Table 1:

表1Table 1

从表1中可以看出,MVD的值通过PMVR方法的Algorithm 1转换,可以压缩为更小的值,从而减少编码MVD的bit数。需要说明的是,当所述运动矢量MV为AVS2编码标准时,压缩过后的MVD值仍然采用AVS2原本的CABAC熵编码模型进行编码,只是编码的幅值变小了。It can be seen from Table 1 that the value of MVD can be compressed into a smaller value through Algorithm 1 conversion of PMVR method, thereby reducing the number of bits for encoding MVD. It should be noted that when the motion vector MV is in the AVS2 encoding standard, the compressed MVD value is still encoded using the original CABAC entropy encoding model of AVS2, but the encoding amplitude becomes smaller.

相应的,当对所压缩的MV进行解码时,即在解码端,对于特定MVD,即与所述第二区域中特定的MV相对应的MVD,采用Algorithm 2公式进行恢复或转换。解码每个块时,首先从码流中读取MVD,然后使用与Algorithm 1对应的反推算法获取MV,而不是简单的MVD+MVP,具体的转换过程如下:Correspondingly, when decoding the compressed MV, that is, at the decoding end, for a specific MVD, that is, the MVD corresponding to the specific MV in the second area, the Algorithm 2 formula is used to restore or convert. When decoding each block, first read the MVD from the code stream, and then use the inversion algorithm corresponding to Algorithm 1 to obtain the MV instead of simple MVD+MVP. The specific conversion process is as follows:

利用本实施例的PMVR方法在AVS2参考软件RD8.0上作性能测试,表2中列出了PMVR在AVS2参考软件RD8.0上的实验结果(RA,TH=2)。其中,采用的测试序列是AVS2标准测试序列,第1列是视频序列分辨率,第2、3、4列分别是Y、U、V分量的BD-Rate性能结果。如表2所示:The PMVR method of this embodiment is used for performance testing on the AVS2 reference software RD8.0. Table 2 lists the experimental results of PMVR on the AVS2 reference software RD8.0 (RA, TH=2). Among them, the test sequence used is the AVS2 standard test sequence, the first column is the video sequence resolution, and the second, third, and fourth columns are the BD-Rate performance results of the Y, U, and V components respectively. As shown in table 2:

表2Table 2

从表2中可以看出,本实施例中压缩过后的MVD值仍然采用AVS2原本的CABAC熵编码模型进行编码,但是,编码的幅值变小了,提高了MV幅值的压缩效果,进而降低编码码率,从而实现编码性能的增益。It can be seen from Table 2 that the compressed MVD value in this embodiment still adopts the original CABAC entropy coding model of AVS2 for coding, but the coding amplitude becomes smaller, which improves the compression effect of the MV amplitude, thereby reducing Encoding rate, so as to achieve the gain of encoding performance.

图5是本发明第三实施例的运动矢量压缩装置结构示意图。Fig. 5 is a schematic structural diagram of a motion vector compression device according to a third embodiment of the present invention.

如图5所示,本实施例的运动矢量压缩装置,包括:搜索单元11、转换单元12,其中,As shown in FIG. 5, the motion vector compression device of this embodiment includes: a search unit 11 and a conversion unit 12, wherein,

所述搜索单元11用于搜索运动矢量的像素精度区域,将所述运动矢量分为两个区域,所述两个区域包括第一区域和第二区域,并对所述两个区域使用不同的像素精度进行搜索。The search unit 11 is used to search the pixel precision area of the motion vector, divide the motion vector into two areas, the two areas include a first area and a second area, and use different Search with pixel precision.

所述转换单元12所述搜索单元11相连,用于对第一区域的MV采用第一表示法进行表示,对第二区域的MV采用第二表示法进行表示。The converting unit 12 is connected to the searching unit 11, and is used to express the MV of the first area by using the first notation, and express the MV of the second area by using the second notation.

进一步地,所述搜索单元11还用于对所述运动矢量按照为1/4像素精度的第一区域和1/2像素精度的第二区域的不同区域进行搜索。Further, the searching unit 11 is further configured to search the motion vector according to different areas of the first area with 1/4 pixel precision and the second area with 1/2 pixel precision.

进一步地,所述搜索单元11还用于当搜索的所述运动矢量位于1/2像素精度的第二区域且所述运动矢量本身为1/4像素精度时,则舍弃所述运动矢量所对应的像素点。Further, the search unit 11 is further configured to discard the motion vector corresponding to the motion vector when the searched motion vector is located in the second area of 1/2 pixel precision and the motion vector itself is 1/4 pixel precision. of pixels.

进一步的,所述转换单元12在编码端对所述MV进行压缩,在解码端对所述MV进行恢复。Further, the conversion unit 12 compresses the MV at the encoding end, and restores the MV at the decoding end.

本领域普通技术人员可以理解:附图只是一个实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。Those skilled in the art can understand that the accompanying drawing is only a schematic diagram of an embodiment, and the modules or processes in the accompanying drawing are not necessarily necessary for implementing the present invention.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。It can be seen from the above description of the implementation manners that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the present invention.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。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.

Claims (5)

1.一种运动矢量的压缩方法,其特征在于,所述方法包括:1. a compression method of motion vector, it is characterized in that, described method comprises: 基于AVS2编码标准,搜索运动矢量的像素精度区域,对接近MVP的在一定范围内的MV使用高的像素精度,对远离MVP的在一定范围内的MV使用低的像素精度,将所述运动矢量分为1/4像素精度的第一区域和1/2像素精度的第二区域的两个区域,且仅为两个区域,不包含1/8像素精度的第三个区域,并对所述两个区域使用不同的像素精度,采用逐步求精的方法,先搜1/2像素精度点,再搜1/4像素精度点,并通过阈值来实现搜索;Based on the AVS2 encoding standard, search the pixel precision area of the motion vector, use high pixel precision for MVs within a certain range close to the MVP, use low pixel precision for MVs within a certain range far away from the MVP, and convert the motion vector Divided into two areas of the first area of 1/4 pixel precision and the second area of 1/2 pixel accuracy, and only two areas, excluding the third area of 1/8 pixel accuracy, and to the The two areas use different pixel precision, adopt the method of step-by-step refinement, first search for 1/2 pixel precision points, then search for 1/4 pixel precision points, and realize the search through the threshold; 对所述第一区域的运动矢量采用第一表示法进行表示,对所述第二区域的运动矢量采用第二表示法进行表示;当所述运动矢量位于1/2像素精度的第二区域且本身为1/4像素精度时,则舍弃所述运动矢量所对应的像素点;通过先搜1/2像素精度点,再搜1/4像素精度点,当候选的1/4精度像素点MV超过了1/4像素精度的范围,则该MV被忽略从而不用被搜索,该点舍弃,不参与最佳MV的决策,剔除了一部分1/4像素精度位置的搜索,从而降低了运动估计的复杂度。expressing the motion vector of the first area by using the first notation, and expressing the motion vector of the second area by using the second notation; when the motion vector is located in the second area with 1/2 pixel precision and When the precision itself is 1/4 pixel, the pixel corresponding to the motion vector is discarded; by first searching for 1/2 pixel precision point, and then searching for 1/4 pixel precision point, when the candidate 1/4 precision pixel point MV If it exceeds the range of 1/4 pixel precision, the MV is ignored so that it does not need to be searched. This point is discarded and does not participate in the decision of the best MV. Part of the search for 1/4 pixel precision positions is eliminated, thereby reducing the cost of motion estimation. the complexity. 2.根据权利要求1所述的运动矢量压缩方法,其特征在于,所述对第二区域的运动矢量采用第二表示法进行表示,进一步为,在编码端对所述运动矢量进行压缩,在解码端对所述运动矢量进行恢复。2. The motion vector compression method according to claim 1, wherein the motion vector of the second region is represented by a second representation, further, the motion vector is compressed at the encoding end, and the motion vector is compressed at the coding end. The decoding end restores the motion vector. 3.根据权利要求2所述的运动矢量压缩方法,其特征在于,所述在编码端对所述运动矢量进行压缩,进一步为采用Algorithm1公式对所述运动矢量进行转换,所述在解码端对所述运动矢量进行恢复,进一步为采用Algorithm2公式对所述运动矢量进行转换。3. motion vector compression method according to claim 2, is characterized in that, described motion vector is compressed at encoding end, is further to adopt Algorithm1 formula to convert described motion vector, described at decoding end to The motion vector is restored, and the motion vector is further converted by using an Algorithm2 formula. 4.一种运动矢量的压缩装置,其特征在于,所述装置包括:4. A compression device of a motion vector, characterized in that said device comprises: 搜索单元,用于搜索运动矢量的像素精度区域,对接近MVP的在一定范围内的MV使用高的像素精度,对远离MVP的在一定范围内的MV使用低的像素精度,将所述运动矢量分为1/4像素精度的第一区域和1/2像素精度的第二区域的两个区域,且仅为两个区域,不包含1/8像素精度的第三个区域,并对两个区域使用不同的像素精度,采用逐步求精的方法,先搜1/2像素精度点,再搜1/4像素精度点,并通过阈值来实现搜索;The search unit is used to search the pixel precision area of the motion vector, using high pixel precision for MVs within a certain range close to the MVP, using low pixel precision for MVs within a certain range far away from the MVP, and converting the motion vector Divided into two areas of the first area of 1/4 pixel accuracy and the second area of 1/2 pixel accuracy, and only two areas, excluding the third area of 1/8 pixel accuracy, and for both The area uses different pixel precision, and adopts the method of step-by-step refinement, first searches for 1/2 pixel precision points, then searches for 1/4 pixel precision points, and realizes the search through the threshold; 并用于当搜索的所述运动矢量位于1/2像素精度的第二区域且所述运动矢量本身为1/4像素精度时,则舍弃所述运动矢量所对应的像素点;and for discarding the pixel corresponding to the motion vector when the searched motion vector is located in the second area with 1/2 pixel precision and the motion vector itself is 1/4 pixel precision; 并用于,当候选的1/4精度像素点MV超过了1/4像素精度的范围,则该MV被忽略从而不用被搜索,该点舍弃,不参与最佳MV的决策,剔除了一部分1/4像素精度位置的搜索,从而降低了运动估计的复杂度;And used, when the candidate 1/4 precision pixel point MV exceeds the range of 1/4 pixel precision, the MV is ignored so that it does not need to be searched, this point is discarded, and does not participate in the decision of the best MV, and a part of 1/4 4-pixel precision position search, thus reducing the complexity of motion estimation; 转换单元,所述转换单元与所述搜索单元相连,用于对所述第一区域的运动矢量采用第一表示法进行表示,对所述第二区域的运动矢量采用第二表示法进行表示。A conversion unit, the conversion unit is connected to the search unit, and is configured to express the motion vector of the first area by using a first representation, and express the motion vector of the second area by using a second representation. 5.根据权利要求4所述的运动矢量的压缩装置,其特征在于,所述转换单元所述对第二区域的运动矢量采用第二表示法进行表示,进一步为,在编码端对所述运动矢量进行压缩,在解码端对所述运动矢量进行恢复。5. The device for compressing motion vectors according to claim 4, wherein the conversion unit uses a second representation to represent the motion vectors of the second region, and further comprises: at the encoding end, the motion vector The vector is compressed, and the motion vector is restored at the decoding end.
CN201510091702.XA 2015-02-28 2015-02-28 Motion vector compression method and device Expired - Fee Related CN104702957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510091702.XA CN104702957B (en) 2015-02-28 2015-02-28 Motion vector compression method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510091702.XA CN104702957B (en) 2015-02-28 2015-02-28 Motion vector compression method and device

Publications (2)

Publication Number Publication Date
CN104702957A CN104702957A (en) 2015-06-10
CN104702957B true CN104702957B (en) 2018-10-16

Family

ID=53349669

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510091702.XA Expired - Fee Related CN104702957B (en) 2015-02-28 2015-02-28 Motion vector compression method and device

Country Status (1)

Country Link
CN (1) CN104702957B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104967858B (en) * 2015-06-30 2018-01-26 北京奇艺世纪科技有限公司 A kind of sub-pixel motion is to amount estimation method and device
CN106331703B (en) * 2015-07-03 2020-09-08 华为技术有限公司 Video encoding and decoding method, video encoding and decoding device
CN111083491B (en) 2018-10-22 2024-09-20 北京字节跳动网络技术有限公司 Use of refined motion vectors
EP3857879A4 (en) 2018-11-12 2022-03-16 Beijing Bytedance Network Technology Co., Ltd. SIMPLIFICATION OF COMBINED INTER-INTRA PREDICTION
KR20210091161A (en) 2018-11-20 2021-07-21 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 Difference calculation based on partial location
CN111010581B (en) * 2018-12-07 2022-08-12 北京达佳互联信息技术有限公司 Motion vector information processing method and device, electronic equipment and storage medium
CN113545065B (en) 2019-03-06 2023-12-12 北京字节跳动网络技术有限公司 Use of converted uni-directional prediction candidates

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101860747A (en) * 2010-03-31 2010-10-13 北京大学 Sub-pixel motion estimation system and method
CN102647595A (en) * 2012-04-19 2012-08-22 北京大学 A device for sub-pixel motion estimation based on AVS

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040070490A (en) * 2003-02-03 2004-08-11 삼성전자주식회사 Method and apparatus for encoding/decoding video signal in interlaced video

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101860747A (en) * 2010-03-31 2010-10-13 北京大学 Sub-pixel motion estimation system and method
CN102647595A (en) * 2012-04-19 2012-08-22 北京大学 A device for sub-pixel motion estimation based on AVS

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Progressive motion vector resolution for HEVC;马俊铖;《IEEE》;20131120;摘要,正文第三部分 *

Also Published As

Publication number Publication date
CN104702957A (en) 2015-06-10

Similar Documents

Publication Publication Date Title
CN104702957B (en) Motion vector compression method and device
TWI840401B (en) Pruning in multi-motion model based skip and direct mode coded video blocks
CN113632464B (en) Method and apparatus for inter-component prediction
KR102535747B1 (en) Method for intra prediction and apparatus thereof
CN113924780B (en) Method and device for affine inter-frame prediction of chroma sub-blocks
CN112913250B (en) Encoder, decoder and corresponding methods using IBC search range optimization for arbitrary CTU sizes
KR102070719B1 (en) Method for inter prediction and apparatus thereof
CN117812270A (en) Encoder, decoder and corresponding methods
CN104038764B (en) A kind of H.264 arrive video transcoding method H.265 and transcoder
CN108055548A (en) For the method and apparatus of encoding/decoding image
CN113170143A (en) A Corresponding Derivation Method for Boundary Strength of Encoder, Decoder and Deblocking Filter
EP4099696A1 (en) Video decoding method, video coding method, electronic device, and storage medium
CN114125468A (en) Intra-frame prediction method and device
CN104837019B (en) AVS to HEVC optimization video transcoding methods based on SVMs
CN116746145A (en) Method, device and non-transitory computer-readable storage medium for geometric division mode motion vector refinement
CN115348449B (en) Encoders, decoders and corresponding methods for using compressed MV storage
CN112715031A (en) Encoder, decoder and corresponding methods using history-based motion vector prediction
CN113597769A (en) Video inter-frame prediction based on optical flow
KR20210107109A (en) Inter-frame prediction method, device, and corresponding encoder and decoder
CN111263166B (en) Video image prediction method and device
CN111355959A (en) Image block division method and device
CN118075450A (en) Bidirectional prediction correction system and method
WO2024113708A1 (en) Video processing method and apparatus
WO2012121575A2 (en) Method and device for intra-prediction
WO2024119821A1 (en) Video data processing method and apparatus, storage medium, device, and program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181016