+

CN117336483A - Encoding method, decoding method, encoding device, and decoding device - Google Patents

Encoding method, decoding method, encoding device, and decoding device Download PDF

Info

Publication number
CN117336483A
CN117336483A CN202311245984.5A CN202311245984A CN117336483A CN 117336483 A CN117336483 A CN 117336483A CN 202311245984 A CN202311245984 A CN 202311245984A CN 117336483 A CN117336483 A CN 117336483A
Authority
CN
China
Prior art keywords
motion information
current coding
candidate motion
unit
coding tree
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.)
Pending
Application number
CN202311245984.5A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202311245984.5A priority Critical patent/CN117336483A/en
Publication of CN117336483A publication Critical patent/CN117336483A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention provides an encoding method, a decoding method, an encoding device, and a decoding device, including: initializing a history candidate motion information list corresponding to a current coding tree unit, wherein the history candidate motion information list comprises N storage spaces, the initialized history candidate motion information list comprises at least M empty storage spaces, M is less than or equal to N, the current coding tree unit is contained in a coding tree unit set (Slice) formed by a plurality of coding tree units, and the current coding tree unit is not the first in the coding tree unit set according to a preset processing sequence; adding motion information at L positions in an adjacent block of a space domain of the current coding tree unit to the history candidate motion information list according to a preset sequence, wherein M is less than or equal to L and less than or equal to N; inter-prediction is performed on the current coding tree unit or the current coding unit based on the historical candidate motion information list.

Description

编码方法、解码方法以及编码装置、解码装置Encoding method, decoding method, encoding device, and decoding device

本申请是申请号为201810990347.3,申请日为2018年08月28日、名称为“帧间预测方法、装置及其应用的编/解方法及装置”的专利申请的分案申请。This application is a divisional application of a patent application with application number 201810990347.3 and a filing date of August 28, 2018, titled "Inter-frame prediction method, device and encoding/decoding method and device for its application".

技术领域Technical field

本申请实施例上涉及视频编码领域,更确切地说,涉及编码方法、解码方法以及编码装置、解码装置。The embodiments of the present application relate to the field of video coding, and more specifically, to coding methods, decoding methods, coding devices, and decoding devices.

背景技术Background technique

视频编码(视频编码和解码)广泛用于数字视频应用,例如广播数字电视、互联网和移动网络上的视频传播、视频聊天和视频会议等实时会话应用、DVD和蓝光光盘、视频内容采集和编辑系统以及可携式摄像机的安全应用。Video encoding (video encoding and decoding) is widely used in digital video applications such as broadcast digital television, video dissemination on the Internet and mobile networks, real-time conversation applications such as video chat and video conferencing, DVD and Blu-ray discs, and video content capture and editing systems and security applications for camcorders.

随着1990年H.261标准中基于块的混合型视频编码方式的发展,新的视频编码技术和工具得到发展并形成了后续视频编码标准演进的基础。视频编码标准包括MPEG-1视频、MPEG-2视频、ITU-TH.262/MPEG-2、ITU-T H.263、ITU-T H.264/MPEG-4第10部分高级视频编码(Advanced Video Coding,AVC)、ITU-T H.265/高效视频编码(High EfficiencyVideo Coding,HEVC)…以及此类标准的扩展,例如可扩展性和/或3D(three-dimensional)扩展。随着视频创作和分享变得越来越广泛,视频流量成为通信网络和数据存储的最大负担。因此大多数视频编码标准的目标之一是相较之前的标准,在不降低图片的主观质量的前提下减少比特率。即使最新的高效视频编码(High Efficiency video coding,HEVC)可以在不降低图片的主观质量的前提下比AVC大约多压缩视频一倍,仍然亟需新技术相对HEVC进一步压缩视频,新一代的视频编码技术VVC(Versatile Video Coding)技术正在制定过程中,其目标在于相较于HEVC能够在图片的主观质量不下降的前提下,进一步将压缩率提升50%左右。With the development of the block-based hybrid video coding method in the H.261 standard in 1990, new video coding technologies and tools have been developed and formed the basis for the subsequent evolution of video coding standards. Video coding standards include MPEG-1 video, MPEG-2 video, ITU-TH.262/MPEG-2, ITU-T H.263, ITU-T H.264/MPEG-4 Part 10 Advanced Video Coding (Advanced Video Coding (AVC), ITU-T H.265/High Efficiency Video Coding (HEVC)... and extensions to such standards, such as scalability and/or 3D (three-dimensional) extensions. As video creation and sharing become more widespread, video traffic becomes the largest burden on communication networks and data storage. Therefore one of the goals of most video coding standards is to reduce the bitrate compared to previous standards without reducing the subjective quality of the picture. Even though the latest High Efficiency video coding (HEVC) can compress video approximately twice as much as AVC without reducing the subjective quality of the picture, there is still an urgent need for new technologies to further compress video compared to HEVC, and a new generation of video coding Technology VVC (Versatile Video Coding) technology is in the process of being formulated. Its goal is to further increase the compression rate by about 50% compared to HEVC without reducing the subjective quality of the picture.

HEVC/H.265视频编码标准、或者正在制定的VVC/H.266视频编码标准,一帧图像会被分割成互不重叠的编码树单元(Coding Tree Unit,CTU),CTU的大小可以设置为64×64或128×128大小。以64×64大小的CTU为例,其包含64列像素,每列包含64个像素,每个像素包含亮度分量或/和色度分量。一个CTU被划分为一个或多个编码单元(Coding Unit,CU)。一个CU包含基本的编码信息,包括预测模式、变换系数等信息。解码端可以按照这些编码信息对CU进行相应的预测、反量化、反变换、重建、滤波等解码处理,产生这个CU对应的重建图像。一个CU对应有预测图像和残差图像,预测图像与残差图像相加得到重建图像。预测图像通过帧内预测或帧间预测生成,残差图像通过对变换系数进行反量化和反变换处理生成。In the HEVC/H.265 video coding standard, or the VVC/H.266 video coding standard under development, a frame of image will be divided into non-overlapping Coding Tree Units (CTU). The size of the CTU can be set to 64×64 or 128×128 size. Taking a 64×64 size CTU as an example, it contains 64 columns of pixels, each column contains 64 pixels, and each pixel contains a luminance component or/and a chrominance component. A CTU is divided into one or more coding units (Coding Unit, CU). A CU contains basic coding information, including prediction mode, transform coefficients and other information. The decoder can perform corresponding prediction, inverse quantization, inverse transformation, reconstruction, filtering and other decoding processes on the CU based on these encoding information to generate a reconstructed image corresponding to the CU. A CU corresponds to a predicted image and a residual image, and the predicted image and the residual image are added to obtain a reconstructed image. The prediction image is generated by intra prediction or inter prediction, and the residual image is generated by inverse quantization and inverse transformation of the transform coefficients.

帧间预测是基于运动补偿(motion compensation)的预测技术,。在帧间预测编码中,由于图像邻近帧中的相同物体存在一定时域相关性,可将图像序列的每一帧划分成许多互不重叠的块,并认为块内所有像素点的运动都相同。主要处理过程为确定当前块的运动信息,根据运动信息从当前块的参考帧中获取参考图像块,产生当前块的预测图像,其中,当前块(current block)是指正在进行编码/解码处理的图像块,其中所述当前块可以是一个编码单元中的亮度块或者色度块。运动信息包含帧间预测方向、参考帧索引(reference index,ref_idx)、运动矢量(motion vector,MV)等,其中帧间预测方向指示当前块使用前向预测、后向预测或双向预测其中的何种预测方向,运动矢量指示了参考帧中用于预测当前块的参考图像块相对于当前块的位移矢量,因而一个运动矢量对应有一个参考帧中的一个参考图像块。一个图像块的帧间预测可以只通过一个运动矢量,使用一个参考帧中的像素来生成预测图像,称为单向预测;也可以通过两个运动矢量,使用两个参考帧中的像素来组合生成预测图像,称为双向预测。也就是说,一个图像块通常可包含一个或两个运动矢量。对于一些多假设帧间预测(multi-hypothesis inter prediction)技术,一个图像块可能包含多于两个运动矢量。Inter-frame prediction is a prediction technology based on motion compensation. In inter-frame predictive coding, since there is a certain temporal correlation between the same objects in adjacent frames of the image, each frame of the image sequence can be divided into many non-overlapping blocks, and the motion of all pixels in the block is considered to be the same. . The main processing process is to determine the motion information of the current block, obtain the reference image block from the reference frame of the current block according to the motion information, and generate the predicted image of the current block, where the current block (current block) refers to the encoding/decoding process being performed. Image block, where the current block may be a luma block or a chroma block in a coding unit. Motion information includes inter-frame prediction direction, reference frame index (reference index, ref_idx), motion vector (motion vector, MV), etc., where the inter-frame prediction direction indicates whether the current block uses forward prediction, backward prediction, or bidirectional prediction. A prediction direction, the motion vector indicates the displacement vector of the reference image block used to predict the current block in the reference frame relative to the current block, so a motion vector corresponds to a reference image block in a reference frame. Inter-frame prediction of an image block can only use one motion vector to generate a predicted image using pixels in a reference frame, which is called unidirectional prediction; it can also use two motion vectors to use pixels in two reference frames to combine Generating predicted images is called bidirectional prediction. That is, an image block may typically contain one or two motion vectors. For some multi-hypothesis inter prediction techniques, one image block may contain more than two motion vectors.

一个MV是二维矢量,包含水平方向位移分量和竖直方向位移分量;一个MV对应于两个帧,每一帧具有一个图像顺序号(picture order count,POC),用于表示图像在显示顺序上的编号,所以一个MV也对应于一个POC差值。POC差值与时间间隔呈线性关系。运动矢量的缩放通常采用基于POC差值的缩放方式,将一对图像之间的运动矢量转换成另一对图像之间的运动矢量。An MV is a two-dimensional vector, including a horizontal displacement component and a vertical displacement component; an MV corresponds to two frames, each frame has a picture order count (POC), which is used to represent the display order of the image. number, so an MV also corresponds to a POC difference. The POC difference has a linear relationship with the time interval. The scaling of motion vectors usually uses a scaling method based on POC differences to convert the motion vectors between a pair of images into the motion vectors between another pair of images.

在编码时,H.265/HEVC、H.266/VVC等视频编码标准把一帧图像分割成互不重叠的编码树单元(Coding Tree Unit,CTU),一个CTU被划分为一个或多个编码单元(CodingUnit,CU)。一个CU包含编码信息,包括预测模式、变换系数等信息。解码端:按照这些编码信息对CU进行相应的预测、反量化、反变换等解码处理,产生这个CU对应的重建图像。During encoding, video coding standards such as H.265/HEVC and H.266/VVC divide a frame of image into non-overlapping Coding Tree Units (CTU). A CTU is divided into one or more coding Unit(CodingUnit,CU). A CU contains coding information, including prediction mode, transform coefficients and other information. Decoding end: According to these coding information, the CU is subjected to corresponding prediction, inverse quantization, inverse transformation and other decoding processes to generate the reconstructed image corresponding to the CU.

码流中,运动信息占有大量的数据量。为了降低所需数据量,通常采用预测的方式传送运动信息,预测方式分为帧间预测和帧内预测,帧内预测是采用同一帧图像内的参考块作为预测块,而帧间预测则是采用不同帧内的参考块作为预测块。In the code stream, motion information occupies a large amount of data. In order to reduce the amount of data required, prediction is usually used to transmit motion information. The prediction methods are divided into inter-frame prediction and intra-frame prediction. Intra-frame prediction uses the reference block in the same frame image as the prediction block, while inter-frame prediction uses Reference blocks in different frames are used as prediction blocks.

常用的帧间预测模式有以下三种:There are three commonly used inter prediction modes:

1)高级运动矢量预测模式(Advanced Motion Vector Prediction,AMVP):在码流中标识当前块使用的帧间预测方向(前向、后向或双向)、参考帧索引(reference index)、运动矢量预测值索引(motion vector predictor index,MVP index)、运动矢量残差值(motion vector difference,MVD);由帧间预测方向确定使用的参考帧队列,由参考帧索引确定当前块MV指向的参考帧,由运动矢量预测值索引指示MVP列表中的一个MVP作为当前块MV的预测值,一个MVP与一个MVD相加得到一个MV。1) Advanced Motion Vector Prediction (AMVP) mode: identifies the inter-frame prediction direction (forward, backward or bidirectional), reference frame index (reference index), and motion vector prediction used by the current block in the code stream Value index (motion vector predictor index, MVP index), motion vector residual value (motion vector difference, MVD); the reference frame queue used is determined by the inter-frame prediction direction, and the reference frame pointed to by the current block MV is determined by the reference frame index. The motion vector predictor index indicates an MVP in the MVP list as the predictor of the current block MV, and an MVP is added to an MVD to obtain an MV.

2)merge/skip模式:码流中标识融合索引(merge index),根据merge index从融合候选者列表(mergecandidate list)中选择一个merge candidate,当前块的运动信息(包括预测方向、参考帧、运动矢量)由这个merge candidate确定。merge模式和skip模式的主要区别在于,merge模式隐含当前块有残差信息,也即,从运动候选者列表中获取的运动矢量作为当前块的运动矢量预测值,而当前块的运动矢量由该运动矢量的预测值与运动矢量的残差值相加得到,运动矢量的残差通过解码码流得到;而skip模式隐含当前块没有残差信息(或者说残差为0),即从运动矢量列表中获得的运动矢量直接作为当前块的运动矢量进行帧间预测;这两种模式导出运动信息的方式是一样的。2) Merge/skip mode: The code stream identifies the fusion index (merge index), selects a merge candidate from the fusion candidate list (mergecandidate list) according to the merge index, and the motion information of the current block (including prediction direction, reference frame, motion vector) is determined by this merge candidate. The main difference between merge mode and skip mode is that merge mode implies that the current block has residual information, that is, the motion vector obtained from the motion candidate list is used as the motion vector predictor of the current block, and the motion vector of the current block is The predicted value of the motion vector is obtained by adding the residual value of the motion vector. The residual value of the motion vector is obtained by decoding the code stream; and the skip mode implies that the current block has no residual information (or the residual is 0), that is, from The motion vector obtained in the motion vector list is directly used as the motion vector of the current block for inter-frame prediction; the two modes derive motion information in the same way.

3)仿射变换模式:通过仿射变换由两个或三个控制点运动矢量得到当前块中各个子块的运动矢量。3) Affine transformation mode: The motion vector of each sub-block in the current block is obtained from the motion vectors of two or three control points through affine transformation.

在AMVP模式以及merge/skip模式中,各自都需要首先建立一个候选者列表,对于AMVP,一个候选运动矢量列表(AMVP候选者列表)需要建立,一个较优的运动矢量将会被选出作为当前块的运动矢量预测值,而该运动矢量的索引值将会被写入码流中;而对于Merge/skip模式,需要建议一个运动候选者列表(Merge candidate list)需要被建立,而该当前候选运动信息列表中的候选运动信息包括有,单向或者双向参考信息,参考帧索引,以及与参考方向对应的运动矢量信息。图6展示了在AMVP以及merge/skip模式下,建立候选运动矢量列表以及当前候选运动信息列表所需要参考的空域的候选块以及时域的候选块的具体位置,图6左边的图显示已确定当前块的右下方和中心处的块为最适合提供良好的时间运动矢量预测值(TMVP),图6右边的图显示从五个空间相邻块导出两个空间MVP候选者A和B。AMVP允许最多两个候选的运动矢量,即AMVP候选者列表的最大值为2,而merge/skip模式则允许更多的候选运动信息,在HEVC中所允许的最多的候选运动信息为5个,即,当前候选运动信息列表的最大值为5。In AMVP mode and merge/skip mode, each needs to first establish a candidate list. For AMVP, a candidate motion vector list (AMVP candidate list) needs to be established, and a better motion vector will be selected as the current The motion vector prediction value of the block, and the index value of the motion vector will be written into the code stream; for the Merge/skip mode, it is recommended that a motion candidate list (Merge candidate list) needs to be established, and the current candidate Candidate motion information in the motion information list includes unidirectional or bidirectional reference information, reference frame index, and motion vector information corresponding to the reference direction. Figure 6 shows the specific positions of the candidate blocks in the spatial domain and the candidate blocks in the time domain that need to be referenced to establish the candidate motion vector list and the current candidate motion information list in AMVP and merge/skip modes. The picture on the left of Figure 6 shows that it has been determined The blocks at the lower right and center of the current block are the most suitable to provide good temporal motion vector predictors (TMVP). The right diagram of Figure 6 shows that two spatial MVP candidates A and B are derived from five spatial neighboring blocks. AMVP allows up to two candidate motion vectors, that is, the maximum value of the AMVP candidate list is 2, while the merge/skip mode allows more candidate motion information, and the maximum candidate motion information allowed in HEVC is 5. That is, the maximum value of the current candidate motion information list is 5.

在最新的视频编码技术,多用途视频编码(versatile video coding),开发过程中,提出了采用历史运动信息来扩展上述AMVP以及Merge/skip模式下的可选的运动矢量或者候选运动信息。JVET-K0104提案中提出了在融合运动信息候选列表和候选运动矢量预测列表中加入历史候选运动信息(history candidate)的方法,增加了merge/skip的融合运动信息候选和Inter MVP模式的运动矢量预测候选的数量,提高了预测效率。历史候选运动信息列表是由历史候选运动信息组成,其中历史候选运动信息为先前编码块的运动信息。JVET-K0104提案中,介绍了历史候选运动信息列表(history candidate list)的使用方法以及历史候选运动信息列表的构建方法。In the development process of the latest video coding technology, versatile video coding (versatile video coding), it is proposed to use historical motion information to expand the above-mentioned AMVP and optional motion vectors or candidate motion information in Merge/skip mode. The JVET-K0104 proposal proposes a method of adding historical candidate motion information (history candidates) to the fused motion information candidate list and candidate motion vector prediction list, adding merge/skip fused motion information candidates and Inter MVP mode motion vector prediction. The number of candidates improves prediction efficiency. The historical candidate motion information list is composed of historical candidate motion information, where the historical candidate motion information is the motion information of previously encoded blocks. In the JVET-K0104 proposal, the use of the history candidate motion information list (history candidate list) and the construction method of the history candidate motion information list are introduced.

加入历史候选运动信息的融合运动信息候选列表的构建方式(历史候选运动信息列表的使用方法)如下:The construction method of the fused motion information candidate list that adds historical candidate motion information (how to use the historical candidate motion information list) is as follows:

步骤1:将与当前块空域相邻的空间候选和时域候选加入当前块的融合运动信息候选列表,其方法与HEVC中的方法相同。如图6所示,空间候选包含A0、A1、B0、B1、和B2,时域候选包括T0和T1。在VTM中,时域候选也包括自适应时域运动矢量预测(ATMVP)技术提供的候选。Step 1: Add the spatial candidates and temporal candidates adjacent to the current block's spatial domain to the fused motion information candidate list of the current block, the method is the same as that in HEVC. As shown in Figure 6, the spatial candidates include A0, A1, B0, B1, and B2, and the time domain candidates include T0 and T1. In VTM, temporal candidates also include candidates provided by adaptive temporal motion vector prediction (ATMVP) technology.

步骤2:将历史候选运动信息列表中的历史候选运动信息按照加入到融合运动信息候选列表中,按照从历史候选运动信息列表尾部到头部的顺序检查预设数目的历史候选运动信息,如图7所示。从历史候选运动信息列表尾部的历史候选运动信息开始,检查其与步骤1得到的融合运动信息候选列表中融合运动信息候选是否相同,如果不同则加入到融合运动信息候选列表中,如果相同则检查历史候选运动信息列表中下一个历史候选运动信息。Step 2: Add the historical candidate motion information in the historical candidate motion information list to the fused motion information candidate list, and check the preset number of historical candidate motion information in order from the tail to the head of the historical candidate motion information list, as shown in the figure 7 shown. Starting from the historical candidate motion information at the end of the historical candidate motion information list, check whether it is the same as the fused motion information candidate in the fused motion information candidate list obtained in step 1. If it is different, add it to the fused motion information candidate list. If it is the same, check The next historical candidate motion information in the historical candidate motion information list.

步骤3:加入其它类型的融合运动信息候选,如双向预测候选(bi-predictivecandidate)和零运动矢量候选(zero motion vector candidate)。Step 3: Add other types of fused motion information candidates, such as bi-predictive candidates and zero motion vector candidates.

JVET-K0104提案中,历史候选运动信息列表利用当前帧中已编码块的运动信息构建,采用先进先出的方式对于历史候选运动信息列表进行访问。编码/解码端中总体的历史候选运动信息列表构建和使用方式如下:In the JVET-K0104 proposal, the historical candidate motion information list is constructed using the motion information of the encoded blocks in the current frame, and the historical candidate motion information list is accessed in a first-in, first-out manner. The overall historical candidate motion information list in the encoding/decoding end is constructed and used as follows:

步骤1:在片(SLICE)解码开始的时候初始化历史候选运动信息列表,将其清空。Step 1: Initialize the historical candidate motion information list at the beginning of slice (SLICE) decoding and clear it.

步骤2:解码当前CU,如果当前CU或当前块为merge或inter帧间预测模式,则生成融合运动信息候选列表或候选运动矢量预测列表,同时将历史候选运动信息列表中的历史候选运动信息加入到融合运动信息候选列表或候选运动矢量预测列表中。Step 2: Decode the current CU. If the current CU or the current block is in the merge or inter prediction mode, generate a fusion motion information candidate list or a candidate motion vector prediction list, and add the historical candidate motion information in the historical candidate motion information list. to the fused motion information candidate list or candidate motion vector prediction list.

步骤3:在解码完当前CU或当前块之后,将当前块的运动信息作为新的历史候选运动信息,加入到历史候选运动信息列表中,更新历史候选运动信息列表,如图8所示。首先,从历史候选运动信息列表头部开始,将当前块的运动信息与历史候选运动信息列表中历史候选运动信息进行比较。如果某个历史候选运动信息(例如图3中的MV2)与当前块的运动信息相同,则将这个历史候选运动信息MV2移除。然后,检查历史候选运动信息列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选运动信息移除。最后,将当前块的运动信息加入到历史候选运动信息列表的尾部。Step 3: After decoding the current CU or current block, use the motion information of the current block as new historical candidate motion information, add it to the historical candidate motion information list, and update the historical candidate motion information list, as shown in Figure 8. First, starting from the head of the historical candidate motion information list, the motion information of the current block is compared with the historical candidate motion information in the historical candidate motion information list. If a certain historical candidate motion information (for example, MV2 in Figure 3) is the same as the motion information of the current block, then this historical candidate motion information MV2 is removed. Then, the size of the historical candidate motion information list is checked. If the size of the list exceeds a preset size, the historical candidate motion information located at the head of the list is removed. Finally, the motion information of the current block is added to the end of the historical candidate motion information list.

然而,在构建上述的历史候选运动信息列表过程中,现有技术采用的每个片开始编解码时初始化历史候选运动信息列表,不利于行级以及CTU级的编解码并行。而且该方法在每一个编码块都进行历史候选运动信息列表格更新,历史候选运动信息列表较长时,其构造和更新花销时间较长。However, in the process of constructing the above-mentioned historical candidate motion information list, the existing technology uses the historical candidate motion information list to be initialized when each slice starts encoding and decoding, which is not conducive to parallel encoding and decoding at the row level and CTU level. Moreover, this method updates the historical candidate motion information list table in each coding block. When the historical candidate motion information list is long, its construction and update take a long time.

发明内容Contents of the invention

有鉴于次,本发明提供一种帧间预测方法及装置,以及应用该方法的编解码方法以及应用该装置的编解码装置。本发明的第一方面,提供一种帧间预测的方法,其包括:初始化与当前编码树单元对应的历史候选运动信息列表,其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,其所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,M≤L≤N,所述空域相邻块内L个位置根据预设的规则得到;构建所述当前编码树单元的当前候选运动信息列表或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;以及根据所述当前编码树单元的当前候选运动信息列表和所述历史候选运动信息列表的组合或者当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合,对所述当前编码树单元或者当前编码单元进行帧间预测。In view of this, the present invention provides an inter-frame prediction method and device, a coding and decoding method using the method, and a coding and decoding device using the device. A first aspect of the present invention provides an inter-frame prediction method, which includes: initializing a historical candidate motion information list corresponding to the current coding tree unit, wherein the historical candidate motion information list includes N storage spaces, so The N storage spaces are used to store historical candidate motion information. The initialized historical candidate motion information list includes at least M vacant storage spaces, where M≤N, M and N are integers, and the current coding tree unit includes In a coding tree unit set (Slice) composed of multiple coding tree units, the current coding tree unit is not the first one in the coding tree unit set according to a predetermined processing order; all the coding tree units are processed in a predetermined order. The motion information at L positions in the spatial adjacent blocks of the current coding tree unit is added to the historical candidate motion information list, where M≤L≤N, and the L positions in the spatial adjacent blocks are based on the preset The rules are obtained; constructing the current candidate motion information list of the current coding tree unit or the current candidate motion information list of the current coding unit, wherein the coding unit is divided by the coding tree unit; and according to the current coding tree unit A combination of the current candidate motion information list and the historical candidate motion information list, or a combination of the current candidate motion information list of the current coding unit and the historical candidate motion information list, performs frame processing on the current coding tree unit or the current coding unit. prediction.

该方法中,在进行当前编码树单元的编码过程中,对历史候选运动信息列表进行初始化操作,即,将构建与当前编码树单元对应的独立的历史候选运动信息列表,从而切断编码树单元编码过程中由于构建历史候选运动信息列表而造成的依赖关系,以使得编码树单元可以根据自己的历史候选运动信息列表进行独立的编码,在具有相当的编码效率的同时,更有利于设计行级以及CTU级的编解码并行,通过并行处理,能够在保证编码质量基本不受损失的情况下,极大的降低编解码时间。In this method, during the coding process of the current coding tree unit, the historical candidate motion information list is initialized, that is, an independent historical candidate motion information list corresponding to the current coding tree unit is constructed, thereby cutting off the coding of the coding tree unit. The dependency relationship caused by constructing the historical candidate motion information list during the process allows the coding tree unit to independently encode according to its own historical candidate motion information list. While having considerable coding efficiency, it is more conducive to the design of row-level and CTU-level encoding and decoding parallelism, through parallel processing, can greatly reduce encoding and decoding time without basically losing the encoding quality.

在结合本发明的第一方面的一可选实施方式,所述初始化与当前编码树单元对应的历史候选运动信息列表包括,清空所述历史候选运动信息列表,使得M=N。该方式使得当前编码树单元可以构建全新的历史候选运动信息列表,以增加帧间预测的准确性。In an optional implementation combined with the first aspect of the present invention, the initializing the historical candidate motion information list corresponding to the current coding tree unit includes clearing the historical candidate motion information list such that M=N. This method allows the current coding tree unit to construct a new historical candidate motion information list to increase the accuracy of inter-frame prediction.

在结合本发明的第一方面的或者基于第一方面的可选实施方式的另一可选的实施方式,采用所述空域内相邻块内的M个预定的位置作为所述M个历史候选运动信息的来源位置,具体地,所述空域相邻块内M个位置为,从所述空域相邻块内预设位置获取第一个候选运动信息,以获取所述第一个候选运动信息的位置为起点,以预设的步长为间隔获取剩余的M-1个候选运动信息。在构建所述历史候选运动信息列表过程中为了能够和现有的历史候选运动信息列表构建方式统一并具有较为简化的算法,所述M个位置处的运动矢量通常是从一个起点位置以预设的间隔依次获取M个位置处的运动矢量,其中所述预设的间隔也可以称之为步长,该步长可以是固定的,例如,采用4个或者8个像素为单位;此外,所述步长也可以是变化的,例如,根据当前编码树单元的大小来设置不同的步长。In another optional implementation combined with the first aspect of the present invention or based on the first aspect, M predetermined positions in adjacent blocks in the airspace are used as the M historical candidates. The source position of the motion information, specifically, the M positions in the adjacent block in the spatial domain are, and the first candidate motion information is obtained from the preset position in the adjacent block in the spatial domain to obtain the first candidate motion information. The position is the starting point, and the remaining M-1 candidate motion information is obtained at preset step intervals. In the process of constructing the historical candidate motion information list, in order to be consistent with the existing historical candidate motion information list construction method and have a relatively simplified algorithm, the motion vectors at the M positions are usually calculated from a starting position to a preset The motion vectors at M positions are obtained sequentially at intervals, where the preset interval can also be called a step size, and the step size can be fixed, for example, using 4 or 8 pixels as a unit; in addition, the The step size can also be changed, for example, different step sizes are set according to the size of the current coding tree unit.

在结合本发明的第一方面的或者基于第一方面任意可选实施方式的另一可选实施方式中,所述M位置的运动信息的添加顺序可是预设的顺序,例如,按照顺时针的顺序,以所述当前编码树单元的左下角的空域相邻块为起点,以所述当前编码树单元右上角的空域相邻块为终点,将所述空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中。该获取方式以能够很好的匹配空域相邻块的处理顺序以及简化历史运动信息的读写逻辑为目标,因此,可以采用多种不同的方式。例如,采用逆时针的方式,或者,从两个端点处的空域相邻块为起点同时以相对的方向读取。In another optional implementation combined with the first aspect of the present invention or based on any optional implementation of the first aspect, the adding order of the motion information of the M position may be in a preset order, for example, in a clockwise manner. In order, taking the spatial adjacent block in the lower left corner of the current coding tree unit as the starting point, taking the spatial adjacent block in the upper right corner of the current coding tree unit as the end point, convert the spatial adjacent blocks at L positions in the spatial adjacent block The motion information is added to the historical candidate motion information list. This acquisition method aims to well match the processing order of adjacent blocks in the spatial domain and simplify the reading and writing logic of historical motion information. Therefore, a variety of different methods can be used. For example, in a counterclockwise manner, or by simultaneously reading in opposite directions starting from adjacent blocks of space at both endpoints.

在结合本发明的第一方面的或者基于第一方面任意可选实施方式的另一可选实施方式中,在对所述当前编码树单元或者当前编码单元进行帧间预测之前,该方法还可以将所述当前编码树单元的当前候选运动信息列表和所述历史候选运动信息列表的组合进行组合或者将当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表进行组合,其具体可以是:将所述历史候选运动信息加入所述当前编码树单元的当前候选运动信息列表或者前编码单元的当前候选运动信息列表中,然后基于所述当前编码树单元的当前候选运动信息列表或者前编码单元的当前候选运动信息列表中,进行所述的帧间预测。这种处理方式可以简化当前运动编码树单元或者编码单元的运动信息的索引操作,将所述历史候选运动信息列表中的运动信息加入所述当前运动编码树单元或者编码单元的当前候选运动信息列表后,原始的候选运动信息和历史候选运动信息采用了统一的索引顺序及索引号,不需要建立额外的当前候选运动信息列表索引,从而能够有效简化索引的过程。In another optional implementation combined with the first aspect of the present invention or based on any optional implementation of the first aspect, before performing inter prediction on the current coding tree unit or the current coding unit, the method may also Combining the current candidate motion information list of the current coding tree unit and the historical candidate motion information list or combining the current candidate motion information list of the current coding unit and the historical candidate motion information list, which specifically may be Yes: Add the historical candidate motion information to the current candidate motion information list of the current coding tree unit or the current candidate motion information list of the previous coding unit, and then based on the current candidate motion information list of the current coding tree unit or the previous The inter-frame prediction is performed in the current candidate motion information list of the coding unit. This processing method can simplify the indexing operation of the motion information of the current motion coding tree unit or coding unit, and add the motion information in the historical candidate motion information list to the current candidate motion information list of the current motion coding tree unit or coding unit. Finally, the original candidate motion information and historical candidate motion information adopt a unified index sequence and index number, and there is no need to establish an additional current candidate motion information list index, which can effectively simplify the indexing process.

在结合本发明的第一方面的或者基于第一方面任意可选实施方式的另一可选实施方式中,若当前的编码树单元还需要进一步划分为编码单元进行编码的情况下,所述方法除了根据所获取的运动信息对所述当前编码单元进行帧间预测之外,所述方法还可以包括基于所述当前编码单元运动信息更新所述历史候选运动信息列表。该方法可以使得当前编码树单元对应的历史候选运动信息列表能够持续的获得更新,以提高帧间预测的准确性。In another optional implementation combined with the first aspect of the present invention or based on any optional implementation of the first aspect, if the current coding tree unit needs to be further divided into coding units for coding, the method In addition to performing inter prediction on the current coding unit according to the acquired motion information, the method may further include updating the historical candidate motion information list based on the current coding unit motion information. This method can enable the historical candidate motion information list corresponding to the current coding tree unit to be continuously updated to improve the accuracy of inter-frame prediction.

在结合本发明的第一方面的或者基于第一方面任意可选实施方式的另一可选实施方式中,上述的对历史候选运动信息列表的跟新可以分为两种情况,即,若所述M个位置并未填满,则将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表内所述M个位置中距离N-M位置最近的空置的存储空间内;或者;若所述M个位置已填满,则按照先入先出的原则将最早加入所述历史候选运动信息列表内的历史运动信息移除,并将剩余历史运动信息超被移除的历史运动信息位置移位后将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表的尾部,其中,所述历史候选运动信息列表中包含最新加入的历史运动信息的一端为所述历史候选运动信息列表的尾部。该方法提供的历史候选运动信息列表应用的灵活性,即,历史候选运动信息列表在不完全填满的时候也可以用于当前块的帧间预测,而在历史候选运动信息列表填满的情况下,当前编码块的运动信息/运动矢量依然可以用于更新所述历史候选运动信息列表。In another optional implementation combined with the first aspect of the present invention or based on any optional implementation of the first aspect, the above-mentioned updating of the historical candidate motion information list can be divided into two situations, that is, if If the M positions are not filled, add the current coding unit motion information as historical motion information to the vacant storage space closest to the N-M position among the M positions in the historical candidate motion information list; or; If the M positions have been filled, the historical motion information that was first added to the historical candidate motion information list will be removed according to the first-in, first-out principle, and the remaining historical motion information will exceed the position of the removed historical motion information. After the shift, the current coding unit motion information is added to the end of the historical candidate motion information list as historical motion information, wherein the end of the historical candidate motion information list containing the latest added historical motion information is the historical candidate The end of the sports information list. This method provides flexibility in the application of the historical candidate motion information list, that is, the historical candidate motion information list can also be used for inter-frame prediction of the current block when it is not completely filled, and when the historical candidate motion information list is full, Under this condition, the motion information/motion vector of the current coding block can still be used to update the historical candidate motion information list.

在结合本发明的第一方面的或者基于第一方面任意可选实施方式的另一可选实施方式中,在历史候选运动信息列表填满的情况下,当前编码块的运动信息/运动矢量依然可以不再对所述历史候选运动信息列表更新,即,基于与所述当前编码单元相同的方法对另一编码单元进行帧间预测,其中,所述另一个编码单元按照预设处理顺序位于所述当前编码单元之后且与所述当前编码单元属于所述编码树单元,所述另一编码单元的帧间预测所采用的历史运动信息列表包括所述当前编码单元的帧间预测所采用的历史运动信息列表中的历史运动信息。具体地可以是,若所述M个位置并未填满,则将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表内所述M个位置中距离N-M位置最近的空置的存储空间内;若所述M个位置并已填满,则基于所述当前候选运动信息列表对下一个编码单元进行帧间预测处理。这种处理方式可以允许在当前编码树单元内的编码块的并行处理,In another optional implementation combined with the first aspect of the present invention or based on any optional implementation of the first aspect, when the historical candidate motion information list is filled, the motion information/motion vector of the current coding block remains The historical candidate motion information list may no longer be updated, that is, inter prediction is performed on another coding unit based on the same method as the current coding unit, wherein the another coding unit is located in the preset processing order. After the current coding unit and belonging to the coding tree unit with the current coding unit, the historical motion information list used in the inter-frame prediction of the other coding unit includes the history used in the inter-frame prediction of the current coding unit. Historical sports information in the sports information list. Specifically, if the M positions are not filled, the current coding unit motion information is added as historical motion information to the vacancy closest to the N-M position among the M positions in the historical candidate motion information list. within the storage space; if the M positions are filled, perform inter-frame prediction processing on the next coding unit based on the current candidate motion information list. This processing method allows parallel processing of coding blocks within the current coding tree unit,

在结合本发明的第一方面的或者基于第一方面任意可选实施方式的另一可选实施方式中,如果在遍历完所述空域相邻图像块之后历史候选运动信息列表并没有填满的情况下、或者若当前编码树单元位于一帧图像最上侧,或者若当前编码树单元位于一帧图像的最左则,可以参考如下任意一种方法来处理历史候选运动信息列表中没有填满的部分。方式一:不再填充任何其他来源的运动信息,在编解码当前编码树单元内的当前编码单元时所获取的当前编码单元的运动信息作为所述历史候选运动信息加入到所述历史候选运动信息列表中。方式二:填充当前编码树单元空域预设非临近位置的编码块的运动信息。预设非临近位置可以是与临近位置固定间隔,也可以是预设模板。方式三:填充来自于参考帧中,当前编码树单元对应位置和当前编码树单元临近编码块对应位置中预设位置的编码块时域运动信息。当前编码树单元对应位置中的预设位置可以是固定间隔抽取,也可以是以特定规则或顺序抽取。当前编码树单元临近编码块对应位置中预设位置可以是一特定规则特定顺序抽取。方式四:填充来自于参考帧中,当前编码树单元对应位置和前编码树单元预设非临近位置的编码块对应位置中预设位置的编码块时域运动信息。当前前编码树单元对应位置中的预设位置可以是固定间隔抽取,也可以是以特定规则或顺序抽取。当前前编码树单元预设非临近位置的编码块对应位置中预设位置可以是一特定规则特定顺序抽取。方式五:填充来自于当前编码树单元邻近的编码树单元的历史候选运动信息列表中的历史候选运动信息。以上任意一种对未填充满的历史候选信息运动列表的填充方式都能够丰富所述历史候选运动信息列表内的历史候选运动信息,能够在空域相邻块不足或者空域相邻块的MV不足的情况下补足当前候选运动信息列表从而能够充分发挥历史候选运动信息列表所能够带来的编解码增益。In another optional implementation combined with the first aspect of the present invention or based on any optional implementation of the first aspect, if the historical candidate motion information list is not filled after traversing the spatial adjacent image blocks, In this case, or if the current coding tree unit is located at the top of a frame of image, or if the current coding tree unit is located at the left of a frame of image, you can refer to any of the following methods to handle unfilled historical candidate motion information lists. part. Method 1: No more motion information from other sources is filled, and the motion information of the current coding unit obtained when encoding and decoding the current coding unit in the current coding tree unit is added to the historical candidate motion information as the historical candidate motion information. List. Method 2: Fill in the motion information of the coding block at a preset non-nearby position in the current coding tree unit spatial domain. The preset non-adjacent location can be a fixed interval from the adjacent location, or it can be a preset template. Method 3: Fill in the coding block time domain motion information from the preset position corresponding to the current coding tree unit in the reference frame and the corresponding position of the current coding tree unit adjacent to the coding block. The preset positions in the corresponding positions of the current coding tree unit may be extracted at fixed intervals, or may be extracted in a specific rule or order. The preset position in the corresponding position of the current coding tree unit adjacent to the coding block may be extracted in a specific order according to a specific rule. Method 4: Fill in the coding block time domain motion information from the preset position in the reference frame, the corresponding position of the current coding tree unit and the coding block corresponding to the preset non-adjacent position of the previous coding tree unit. The preset positions in the corresponding positions of the current coding tree unit may be extracted at fixed intervals, or may be extracted in a specific rule or order. The preset positions in the coding blocks corresponding to the preset non-adjacent positions of the current coding tree unit may be extracted in a specific order according to a specific rule. Method 5: Fill in the historical candidate motion information from the historical candidate motion information list of coding tree units adjacent to the current coding tree unit. Any of the above filling methods for the unfilled historical candidate information motion list can enrich the historical candidate motion information in the historical candidate motion information list, and can be used when there are insufficient adjacent blocks in the spatial domain or insufficient MVs of adjacent blocks in the spatial domain. In this case, the current candidate motion information list is supplemented so that the encoding and decoding gains brought by the historical candidate motion information list can be fully utilized.

本发明第二方面提供一种采用本发明第一方面的帧间预测进行编码的方法:其包括:基于本发明的第一方面的帧间预测方法对当前的编码树单元或者编码单元进行帧间预测以获得帧间预测图像;将当前编码树单元或者所述当前编码单元的原始图像与将所获得的帧间预测图像相减获得残差图像;对所述残差图像以及所述运动信息索引进行编码形成码流。其中,需要说明的是作为解码方法,在进行所述帧间预测的过程中,需要,从所述历史候选运动信息列表与所述当前候选运动信息列表的组合中获取所述当前编码树单元或者当前编码单元的运动信息,根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测获得帧间预测图像,其中,获取所述运动信息的具体可以通过解析码流,所述当前编码树单元或者当前编码单元对应的运动信息索引,根据所述从所述历史候选运动信息列表与所述当前候选运动信息列表的组合中获取所述当前编码树单元或者当前编码单元的运动信息。A second aspect of the present invention provides a method for encoding using the inter-frame prediction of the first aspect of the present invention: it includes: performing inter-frame prediction on the current coding tree unit or coding unit based on the inter-frame prediction method of the first aspect of the present invention. Predict to obtain an inter-frame prediction image; subtract the current coding tree unit or the original image of the current coding unit from the obtained inter-frame prediction image to obtain a residual image; index the residual image and the motion information Encode to form a code stream. Wherein, it should be noted that as a decoding method, during the inter-frame prediction process, it is necessary to obtain the current coding tree unit from a combination of the historical candidate motion information list and the current candidate motion information list or Motion information of the current coding unit, according to the motion information of the current coding tree unit or the current coding unit, perform inter-frame prediction on the current coding tree unit or the current coding unit to obtain an inter-frame prediction image, wherein the motion information is obtained Specifically, the code stream can be parsed, the current coding tree unit or the motion information index corresponding to the current coding unit, and the current candidate motion information list is obtained from the combination of the historical candidate motion information list and the current candidate motion information list. Coding tree unit or motion information of the current coding unit.

本发明第三方面提供一种采用本发明第一方面的帧间预测进行编码的方法:其包括:基于本发明的第一方面的帧间预测方法对当前的编码树单元或者编码单元进行帧间预测以获得帧间预测图像,将当前编码树单元或者所述当前编码单元的原始图像与将所获得的帧间预测图像相减获得残差图像;对所述残差图像进行编码形成码流。其中,在基于第一方面的帧间预测方法获取帧间预测图像过程中,该方法还包括:从所述历史候选运动信息列表与所述当前候选运动信息列表的组合中获取所述当前编码树单元或者当前编码单元的运动信息,以及所述运动信息的运动信息索引;根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测获得帧间预测图像;以及,对所述运动索引进行编码。A third aspect of the present invention provides a method for encoding using the inter-frame prediction of the first aspect of the present invention: it includes: performing inter-frame prediction on the current coding tree unit or coding unit based on the inter-frame prediction method of the first aspect of the present invention. Predict to obtain an inter-frame prediction image, subtract the current coding tree unit or the original image of the current coding unit from the obtained inter-frame prediction image to obtain a residual image; encode the residual image to form a code stream. Wherein, in the process of obtaining the inter-frame prediction image based on the inter-frame prediction method of the first aspect, the method further includes: obtaining the current coding tree from a combination of the historical candidate motion information list and the current candidate motion information list. The motion information of the unit or the current coding unit, and the motion information index of the motion information; according to the motion information of the current coding tree unit or the current coding unit, perform inter-frame prediction on the current coding tree unit or the current coding unit to obtain inter-predicted images; and encoding the motion index.

相比于现有技术,上述编码/解码方法中,采用了在编码树级别的历史候选运动信息列表的更新,允许行级以及CTU级的编解码并行,能够有效降低编码的时间。Compared with the existing technology, the above encoding/decoding method adopts the update of the historical candidate motion information list at the coding tree level, allowing parallel encoding and decoding at the row level and CTU level, which can effectively reduce the encoding time.

此外,本发明还提供了与本发明第一、第二及第三方面对应的阵间预测装置,编码装置以及编码设备以及与本发明第三方面对应的解码装置接解码设备。In addition, the present invention also provides inter-array prediction devices, encoding devices and encoding equipment corresponding to the first, second and third aspects of the present invention, and a decoding device and decoding equipment corresponding to the third aspect of the present invention.

此外,本发明还提供了与本发明第一、第二及第三方面对应的阵间预测设备,编码设备以及编码设备,其包括数字处理器以及存储器,在所述存储器中存储有可执行的指令集,所述数字处理器读取存储在所述存储器中的指令集用于实现本发明第一、第二或第三方面提供的方法。In addition, the present invention also provides an inter-array prediction device, an encoding device and an encoding device corresponding to the first, second and third aspects of the invention, which include a digital processor and a memory, and executable programs are stored in the memory. Instruction set, the digital processor reads the instruction set stored in the memory to implement the method provided by the first, second or third aspect of the present invention.

附图说明Description of drawings

图1是用于实现本发明实施例的视频编码系统实例的框图;Figure 1 is a block diagram of an example of a video encoding system for implementing an embodiment of the present invention;

图2是用于实现本发明实施例的视频编码器实例结构的框图;Figure 2 is a block diagram of an example structure of a video encoder used to implement an embodiment of the present invention;

图3是用于实现本发明实施例的视频解码器实例结构的框图;Figure 3 is a block diagram of an example structure of a video decoder used to implement an embodiment of the present invention;

图4是显示包含图2的编码器20和图3的解码器30FIG. 4 shows a diagram including the encoder 20 of FIG. 2 and the decoder 30 of FIG. 3

图5是显示另一种编码装置或解码装置实例的框图;Figure 5 is a block diagram showing another example of an encoding device or a decoding device;

图6是为当前块空域相邻块以及时域相邻块的位置示意图;Figure 6 is a schematic diagram of the positions of adjacent blocks in the spatial domain and adjacent blocks in the time domain of the current block;

图7是历史候选运动信息加入融合当前候选运动信息列表的示意图;Figure 7 is a schematic diagram of historical candidate motion information added to the current candidate motion information list;

图8是历史候选运动信息列表构建的示意图;Figure 8 is a schematic diagram of the construction of a historical candidate motion information list;

图9为前编码树单元左侧和上方空域相邻图像块的运动信息;Figure 9 shows the motion information of adjacent image blocks in the left and upper spatial areas of the front coding tree unit;

图10为两个空间候选运动信息A和B的获取流程。Figure 10 shows the acquisition process of two spatial candidate motion information A and B.

图11是根据一实施例的视频编码器实现本发明帧间预测方法的实例操作的流程图;Figure 11 is a flowchart of an example operation of a video encoder implementing the inter-frame prediction method of the present invention according to an embodiment;

图12是根据另一实施例的视频解码器基于图11的阵间预测方法进行解码的方法流程图;Figure 12 is a flow chart of a method for decoding by a video decoder based on the inter-array prediction method of Figure 11 according to another embodiment;

图13是根据另一实施例的视频解码器基于图11的阵间预测方法进行编码的方法流程图;Figure 13 is a flow chart of a method for encoding by a video decoder based on the inter-array prediction method of Figure 11 according to another embodiment;

图14是根据另一实施例提供的具备实现图11中所述方法的帧间预测装置的示意图;FIG. 14 is a schematic diagram of an inter-frame prediction device for implementing the method described in FIG. 11 according to another embodiment;

图15是根据另一实施例提供的具备实现图12中所述方法的帧间预测装置的示意图;FIG. 15 is a schematic diagram of an inter-frame prediction device for implementing the method described in FIG. 12 provided according to another embodiment;

图16是根据另一实施例提供的具备实现图13中所述方法的帧间预测装置的示意图;Figure 16 is a schematic diagram of an inter-frame prediction device provided according to another embodiment to implement the method described in Figure 13;

图17是根据另一实施例提供的具备实现图11~13中任意方法的设备的示意图。FIG. 17 is a schematic diagram of a device for implementing any of the methods in FIGS. 11 to 13 provided according to another embodiment.

以下如果没有关于相同参考符号的具体注释,相同的参考符号是指相同或至少功能上等效的特征。In the following, if there is no specific note regarding the same reference signs, the same reference signs refer to the same or at least functionally equivalent features.

具体实施方式Detailed ways

以下,参考附图来说明本发明具体的实施方式以及使用本发明具体实施方式的应用实例。Hereinafter, specific embodiments of the present invention and application examples using the specific embodiments of the present invention will be described with reference to the accompanying drawings.

应理解,本发明实施例并不局限于在本文中所列举处的实例中,其可在其它方面中使用,并可包括附图中未显示的结构或逻辑变化。It should be understood that the embodiments of the present invention are not limited to the examples listed herein, but may be used in other aspects and may include structural or logical changes not shown in the drawings.

例如,应理解,本文中帧间预测方法所包含的内容可以同样适用于用于执行所述方法的对应设备或系统,且反之亦然。例如,当描述一个或多个具体方法步骤,则对应的设备可以包含如功能单元等一个或多个单元,来执行所描述的一个或多个方法步骤(例如,一个单元执行一个或多个步骤,或多个单元,其中每个都执行多个步骤中的一个或多个),即使附图中未明确描述或说明这种一个或多个单元。另一方面,例如,如果基于如功能单元等一个或多个单元描述具体装置,则对应的方法可以包含一个步骤来执行一个或多个单元的功能性(例如,一个步骤执行一个或多个单元的功能性,或多个步骤,其中每个执行多个单元中一个或多个单元的功能性),即使附图中未明确描述或说明这种一个或多个步骤。进一步,应理解的是,除非另外明确提出,本文中所描述的各示例性实施例和/或方面的特征可以相互组合。For example, it should be understood that content contained in inter prediction methods herein may equally apply to corresponding devices or systems for performing said methods, and vice versa. For example, when one or more specific method steps are described, the corresponding device may include one or more units, such as functional units, to perform the one or more described method steps (for example, one unit performs one or more steps , or a plurality of units, each of which performs one or more of a plurality of steps), even if such unit or units are not explicitly depicted or illustrated in the drawings. On the other hand, for example, if a specific apparatus is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of the one or more units (e.g., a step to perform the functionality of the one or more units) functionality, or a plurality of steps, each of which performs the functionality of one or more of a plurality of units), even if such one or more steps are not explicitly depicted or illustrated in the drawings. Further, it should be understood that features of various exemplary embodiments and/or aspects described herein may be combined with each other unless expressly stated otherwise.

视频编码通常是指处理形成视频或视频序列的图片序列。在视频编码领域,术语“图片(picture)”、“帧(frame)”或“图像(image)”可以用作同义词。本申请(或本公开)中使用的视频编码表示视频编码或视频解码。视频编码在源侧执行,通常包括处理(例如,通过压缩)原始视频图片以减少表示该视频图片所需的数据量(从而更高效地存储和/或传输)。视频解码在目的地侧执行,通常包括相对于编码器作逆处理,以重构视频图片。实施例涉及的视频图片(或总称为图片,下文将进行解释)“编码”应理解为涉及视频序列的“编码”或“解码”。编码部分和解码部分的组合也称为编解码(编码和解码)。Video coding generally refers to the processing of sequences of pictures that form a video or video sequence. In the field of video coding, the terms "picture", "frame" or "image" may be used as synonyms. Video coding as used in this application (or this disclosure) means video encoding or video decoding. Video encoding is performed on the source side and typically involves processing (eg, by compressing) the original video picture to reduce the amount of data required to represent the video picture (and thereby store and/or transmit it more efficiently). Video decoding is performed on the destination side and typically involves inverse processing relative to the encoder to reconstruct the video picture. The "encoding" of video pictures (or pictures in general, as will be explained below) referred to in the embodiments shall be understood to refer to the "encoding" or "decoding" of a video sequence. The combination of encoding part and decoding part is also called codec (encoding and decoding).

无损视频编码情况下,可以重构原始视频图片,即经重构视频图片具有与原始视频图片相同的质量(假设存储或传输期间没有传输损耗或其它数据丢失)。在有损视频编码情况下,通过例如量化执行进一步压缩,来减少表示视频图片所需的数据量,而解码器侧无法完全重构视频图片,即经重构视频图片的质量相比原始视频图片的质量较低或较差。In the case of lossless video encoding, the original video picture can be reconstructed, that is, the reconstructed video picture has the same quality as the original video picture (assuming no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression is performed by e.g. quantization to reduce the amount of data required to represent the video picture, while the decoder side cannot fully reconstruct the video picture, i.e. the quality of the reconstructed video picture is compared to the original video picture of lower or poorer quality.

H.261~H.265的几个视频编码标准属于“有损混合型视频编解码”(即,将样本域中的空间和时间预测与变换域中用于应用量化的2D变换编码结合)。视频序列的每个图片通常分割成不重叠的块集合,通常在块层级上进行编码。换句话说,编码器侧通常在块(视频块)层级处理亦即编码视频,例如,通过空间(图片内)预测和时间(图片间)预测来产生预测块,从当前块(当前处理或待处理的块)减去预测块以获取残差块,在变换域变换残差块并量化残差块,以减少待传输(压缩)的数据量,而解码器侧将相对于编码器的逆处理部分应用于经编码或经压缩块,以重构用于表示的当前块。另外,编码器复制解码器处理循环,使得编码器和解码器生成相同的预测(例如帧内预测和帧间预测)和/或重构,用于处理亦即编码后续块。Several video coding standards from H.261 to H.265 belong to "lossy hybrid video coding" (that is, combining spatial and temporal prediction in the sample domain with 2D transform coding in the transform domain for applying quantization). Each picture of a video sequence is usually divided into a set of non-overlapping blocks, which are usually encoded at the block level. In other words, the encoder side usually processes i.e. encodes the video at the block (video block) level, e.g. by spatial (intra-picture) prediction and temporal (inter-picture) prediction to generate prediction blocks, starting from the current block (currently processed or to be processed). The processed block) subtracts the prediction block to obtain the residual block, transforms the residual block in the transform domain and quantizes the residual block to reduce the amount of data to be transmitted (compressed), while the decoder side will perform the inverse processing relative to the encoder Partially applied to encoded or compressed blocks to reconstruct the current block for representation. Additionally, the encoder-decoder processing loop is replicated such that the encoder and decoder generate the same predictions (eg, intra- and inter-prediction) and/or reconstructions for processing, ie encoding, subsequent blocks.

如本文中所用,术语“块”可以为图片或帧的一部分。为便于描述,参考VVC或由ITU-T视频编码专家组(Video Coding Experts Group,VCEG)和ISO/IEC运动图像专家组(Motion Picture Experts Group,MPEG)的视频编码联合工作组(Joint CollaborationTeam on Video Coding,JCT-VC)开发的高效视频编码(High-Efficiency Video Coding,HEVC)描述本发明实施例。本领域普通技术人员理解本发明实施例不限于HEVC或VVC。可以指CU、PU和TU。在HEVC中,通过使用表示为编码树的四叉树结构将CTU拆分为多个CU。在CU层级处作出是否使用图片间(时间)或图片内(空间)预测对图片区域进行编码的决策。每个CU可以根据PU拆分类型进一步拆分为一个、两个或四个PU。一个PU内应用相同的预测过程,并在PU基础上将相关信息传输到解码器。在通过基于PU拆分类型应用预测过程获取残差块之后,可以根据类似于用于CU的编码树的其它四叉树结构将CU分割成变换单元(transformunit,TU)。在视频压缩技术最新的发展中,使用四叉树和二叉树(Quad-tree and binarytree,QTBT)分割帧来分割编码块。在QTBT块结构中,CU可以为正方形或矩形形状。在VVC中,编码树单元(coding tree unit,CTU)首先由四叉树结构分割。四叉树叶节点进一步由二进制树结构分割。二进制树叶节点称为编码单元(coding unit,CU),所述分段用于预测和变换处理,无需其它任何分割。这表示CU、PU和TU在QTBT编码块结构中的块大小相同。同时,还提出与QTBT块结构一起使用多重分割,例如三叉树分割。As used herein, the term "block" may be a portion of a picture or frame. For ease of description, refer to VVC or the Joint Collaboration Team on Video by the ITU-T Video Coding Experts Group (VCEG) and the ISO/IEC Motion Picture Experts Group (MPEG). High-Efficiency Video Coding (HEVC) developed by JCT-VC (JCT-VC) describes the embodiment of the present invention. Persons of ordinary skill in the art understand that embodiments of the present invention are not limited to HEVC or VVC. Can refer to CU, PU and TU. In HEVC, a CTU is split into multiple CUs by using a quadtree structure represented as a coding tree. The decision is made at the CU level whether to code a picture region using inter-picture (temporal) or intra-picture (spatial) prediction. Each CU can be further split into one, two or four PUs depending on the PU split type. The same prediction process is applied within a PU and the relevant information is transferred to the decoder on a PU basis. After obtaining the residual block by applying a prediction process based on the PU split type, the CU may be split into transform units (TUs) according to other quadtree structures similar to the coding tree for the CU. In the latest development of video compression technology, quad-tree and binary tree (QTBT) are used to segment frames to segment coding blocks. In QTBT block structure, CU can be in square or rectangular shape. In VVC, a coding tree unit (CTU) is first divided by a quadtree structure. Quad leaf nodes are further divided by a binary tree structure. The binary leaf node is called a coding unit (CU), and the segmentation is used for prediction and transformation processing without any other segmentation. This means that CU, PU and TU have the same block size in the QTBT encoding block structure. At the same time, it is also proposed to use multiple partitioning, such as ternary tree partitioning, together with the QTBT block structure.

以下基于图1到3描述编码器20、解码器30和编码系统10的实施例(在基于图6更详细描述本发明实施例之前)。Embodiments of the encoder 20, the decoder 30 and the encoding system 10 are described below based on Figures 1 to 3 (before embodiments of the invention are described in more detail based on Figure 6).

图1为示例性编码系统10的概念性或示意性框图,例如,可以利用本申请(本公开)技术的视频编码系统10。视频编码系统10的编码器20(例如,视频编码器20)和解码器30(例如,视频解码器30)表示可用于根据本申请中描述的各种实例执行用于进行融合候选者列表构建,以及基于该融合后选择列表进行编解码的技术的设备实例。如图1中所示,编码系统10包括源设备12,用于向例如解码经编码数据13的目的地设备14提供经编码数据13,例如,经编码图片13。1 is a conceptual or schematic block diagram of an exemplary encoding system 10, such as a video encoding system 10, that may utilize the techniques of the present disclosure. The encoder 20 (eg, video encoder 20 ) and decoder 30 (eg, video decoder 30 ) representations of the video encoding system 10 may be used to perform fusion candidate list construction in accordance with the various examples described in this application, and a device instance of the technology for encoding and decoding based on the fused selection list. As shown in Figure 1, encoding system 10 includes a source device 12 for providing encoded data 13, eg, encoded pictures 13, to a destination device 14, eg, decoding the encoded data 13.

源设备12包括编码器20,另外亦即可选地,可以包括图片源16,例如图片预处理单元18的预处理单元18,以及通信接口或通信单元22。The source device 12 includes an encoder 20 and, optionally, a picture source 16 , such as a pre-processing unit 18 such as a picture pre-processing unit 18 , and a communication interface or unit 22 .

图片源16可以包括或可以为任何类别的图片捕获设备,用于例如捕获现实世界图片,和/或任何类别的图片或评论(对于屏幕内容编码,屏幕上的一些文字也认为是待编码的图片或图像的一部分)生成设备,例如,用于生成计算机动画图片的计算机图形处理器,或用于获取和/或提供现实世界图片、计算机动画图片(例如,屏幕内容、虚拟现实(virtualreality,VR)图片)的任何类别设备,和/或其任何组合(例如,实景(augmented reality,AR)图片)。Picture source 16 may include or be any class of picture capture device, used for example to capture real world pictures, and/or any class of pictures or comments (for screen content encoding, some text on the screen is also considered to be a picture to be encoded or part of an image) generating device, for example, a computer graphics processor for generating computer animated pictures, or for acquiring and/or providing real world pictures, computer animated pictures (for example, screen content, virtual reality (VR) images), and/or any combination thereof (e.g., augmented reality (AR) images).

(数字)图片为或者可以视为具有亮度值的采样点的二维阵列或矩阵。阵列中的采样点也可以称为像素(pixel)(像素(picture element)的简称)或像素(pel)。阵列或图片在水平和垂直方向(或轴线)上的采样点数目定义图片的尺寸和/或分辨率。为了表示颜色,通常采用三个颜色分量,即图片可以表示为或包含三个采样阵列。RBG格式或颜色空间中,图片包括对应的红色、绿色及蓝色采样阵列。但是,在视频编码中,每个像素通常以亮度/色度格式或颜色空间表示,例如,YCbCr,包括Y指示的亮度分量(有时也可以用L指示)以及Cb和Cr指示的两个色度分量。亮度(简写为luma)分量Y表示亮度或灰度水平强度(例如,在灰度等级图片中两者相同),而两个色度(简写为chroma)分量Cb和Cr表示色度或颜色信息分量。相应地,YCbCr格式的图片包括亮度采样值(Y)的亮度采样阵列,和色度值(Cb和Cr)的两个色度采样阵列。RGB格式的图片可以转换或变换为YCbCr格式,反之亦然,该过程也称为色彩变换或转换。如果图片是黑白的,该图片可以只包括亮度采样阵列。A (digital) picture is or can be viewed as a two-dimensional array or matrix of sample points with brightness values. The sampling points in the array can also be called pixels (short for picture element) or pels. The number of sample points in the horizontal and vertical directions (or axes) of an array or image defines the size and/or resolution of the image. In order to represent color, three color components are usually used, that is, the picture can be represented as or contain three sample arrays. In RBG format or color space, the picture includes corresponding red, green and blue sample arrays. However, in video coding, each pixel is usually represented in a luminance/chrominance format or color space, for example, YCbCr, including a luminance component indicated by Y (sometimes also indicated by L) and two chrominances indicated by Cb and Cr Portion. The luminance (abbreviated luma) component Y represents brightness or gray level intensity (for example, in a grayscale picture they are the same), while the two chrominance (abbreviated chroma) components Cb and Cr represent chrominance or color information components . Correspondingly, a picture in YCbCr format includes a brightness sample array of brightness sample values (Y), and two chroma sample arrays of chroma values (Cb and Cr). Pictures in RGB format can be converted or transformed into YCbCr format and vice versa, this process is also called color transformation or conversion. If the picture is black and white, the picture may only include an array of luminance samples.

图片源16(例如,视频源16)可以为,例如用于捕获图片的相机,例如图片存储器的存储器,包括或存储先前捕获或产生的图片,和/或获取或接收图片的任何类别的(内部或外部)接口。相机可以为,例如,本地的或集成在源设备中的集成相机,存储器可为本地的或例如集成在源设备中的集成存储器。接口可以为,例如,从外部视频源接收图片的外部接口,外部视频源例如为外部图片捕获设备,比如相机、外部存储器或外部图片生成设备,外部图片生成设备例如为外部计算机图形处理器、计算机或服务器。接口可以为根据任何专有或标准化接口协议的任何类别的接口,例如有线或无线接口、光接口。获取图片数据17的接口可以是与通信接口22相同的接口或是通信接口22的一部分。Picture source 16 (eg, video source 16) may be, for example, a camera for capturing pictures, a memory such as a picture memory, including or storing previously captured or generated pictures, and/or any class (internal) of acquiring or receiving pictures. or external) interface. The camera may be, for example, local or an integrated camera integrated in the source device, and the memory may be local or, for example, an integrated memory integrated in the source device. The interface may be, for example, an external interface that receives pictures from an external video source, such as an external picture capture device, such as a camera, an external memory, or an external picture generation device, such as an external computer graphics processor, computer or server. The interface may be any class of interface according to any proprietary or standardized interface protocol, such as wired or wireless interfaces, optical interfaces. The interface for obtaining the picture data 17 may be the same interface as the communication interface 22 or a part of the communication interface 22 .

区别于预处理单元18和预处理单元18执行的处理后的图片或者图片数据,图片或图片数据17(例如,视频数据16)也可以称为原始图片或原始图片数据17。Different from the preprocessing unit 18 and the processed pictures or picture data performed by the preprocessing unit 18 , the pictures or picture data 17 (eg, video data 16 ) may also be referred to as original pictures or original picture data 17 .

预处理单元18用于接收(原始)图片数据17并对图片数据17执行预处理,以获取经预处理的图片19或经预处理的图片数据19。例如,预处理单元18执行的预处理可以包括整修、色彩格式转换(例如,从RGB转换为YCbCr)、调色或去噪。可以理解,预处理单元18可以是可选组件。The preprocessing unit 18 is configured to receive (original) picture data 17 and perform preprocessing on the picture data 17 to obtain preprocessed pictures 19 or preprocessed picture data 19 . For example, the preprocessing performed by preprocessing unit 18 may include trimming, color format conversion (eg, from RGB to YCbCr), color grading, or denoising. It is understood that the preprocessing unit 18 may be an optional component.

编码器20(例如,视频编码器20)用于接收经预处理的图片数据19并提供经编码图片数据21(下文将进一步描述细节,例如,基于图2或图4、5)。在一个实例中,编码器20可以根据率失真代价评估选择对当前块(当前待编码图像块)最适合的预测方式,例如,采用帧内预测或者采用帧间预测。在编码器20选择采用帧间预测模式时,所述编码器可以执行以下的方法来对当前块进行帧间预测,即,所述编码器20,首先,初始化与当前编码树单元对应的历史候选运动信息列表,其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,其所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;接着,按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,M≤L≤N,所述空域相邻块内L个位置根据预设的规则得到;构建所述当前编码树单元或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;最后,根据所述当前编码树单元或者当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合,对所述当前编码树单元或者当前编码单元进行帧间预测。基于上述的方法,编码器20在进行编码过程中可以获取更加多样的运动信息,来对当前块进行预测,在历史候选运动信息列表的应用过程中并不需要等待前一个编码树单元编码完毕之后才开始处理后一个编码树单元,从而能够提升帧间预测中编码树单元并行处理的能力,提升编码效率。An encoder 20 (eg video encoder 20) is configured to receive pre-processed picture data 19 and provide encoded picture data 21 (details will be described further below, eg based on Figure 2 or Figures 4, 5). In one example, the encoder 20 may select the most suitable prediction method for the current block (current image block to be encoded) based on rate-distortion cost evaluation, for example, using intra prediction or inter prediction. When the encoder 20 chooses to use the inter prediction mode, the encoder may perform the following method to perform inter prediction on the current block. That is, the encoder 20 first initializes the historical candidates corresponding to the current coding tree unit. A motion information list, wherein the historical candidate motion information list includes N storage spaces, the N storage spaces are used to store historical candidate motion information, and the initialized historical candidate motion information list includes at least M vacant storage space, the M≤N, M and N are integers, the current coding tree unit is included in a coding tree unit set (Slice) composed of multiple coding tree units, and the current coding tree unit is not the coding tree unit. The first one in the tree unit set according to the predetermined processing order; then, according to the predetermined order, the motion information at L positions in the spatial domain adjacent blocks of the current coding tree unit is added to the historical candidate motion information list , where M≤L≤N, the L positions in the spatial adjacent blocks are obtained according to preset rules; construct the current candidate motion information list of the current coding tree unit or the current coding unit, wherein the coding unit It is obtained by dividing the coding tree unit; finally, according to the combination of the current candidate motion information list of the current coding tree unit or the current coding unit and the historical candidate motion information list, the current coding tree unit or the current coding unit is Perform inter-frame prediction. Based on the above method, the encoder 20 can obtain more diverse motion information during the encoding process to predict the current block. In the application process of the historical candidate motion information list, there is no need to wait for the previous coding tree unit to be encoded. Only then starts processing the last coding tree unit, which can improve the parallel processing capability of coding tree units in inter-frame prediction and improve coding efficiency.

源设备12的通信接口22可以用于接收经编码图片数据21并传输至其它设备,例如,目的地设备14或任何其它设备,以用于存储或直接重构,或用于在对应地存储经编码数据13和/或传输经编码数据13至其它设备之前处理经编码图片数据21,其它设备例如为目的地设备14或任何其它用于解码或存储的设备。The communication interface 22 of the source device 12 may be used to receive and transmit the encoded picture data 21 to other devices, such as the destination device 14 or any other device, for storage or direct reconstruction, or for storing the encoded picture data 21 in a corresponding manner. The encoded picture data 21 is processed before encoding the data 13 and/or transmitting the encoded data 13 to other devices, such as the destination device 14 or any other device for decoding or storage.

目的地设备14包括解码器30(例如,视频解码器30),另外亦即可选地,可以包括通信接口或通信单元28、后处理单元32和显示设备34。Destination device 14 includes a decoder 30 (eg, video decoder 30) and, optionally, a communication interface or unit 28, a post-processing unit 32, and a display device 34.

目的地设备14的通信接口28用于例如,直接从源设备12或任何其它源接收经编码图片数据21或经编码数据13,任何其它源例如为存储设备,存储设备例如为经编码图片数据存储设备。The communication interface 28 of the destination device 14 is used, for example, to receive the encoded picture data 21 or the encoded data 13 directly from the source device 12 or any other source, such as a storage device, such as a storage device for encoded picture data. equipment.

通信接口22和通信接口28可以用于藉由源设备12和目的地设备14之间的直接通信链路或藉由任何类别的网络传输或接收经编码图片数据21或经编码数据13,直接通信链路例如为直接有线或无线连接,任何类别的网络例如为有线或无线网络或其任何组合,或任何类别的私网和公网,或其任何组合。Communication interface 22 and communication interface 28 may be used to transmit or receive encoded picture data 21 or encoded data 13 directly via a direct communication link between source device 12 and destination device 14 or over any type of network. The link may be, for example, a direct wired or wireless connection, any type of network, such as a wired or wireless network or any combination thereof, or any type of private network or public network, or any combination thereof.

通信接口22可以例如用于将经编码图片数据21封装成合适的格式,例如包,以在通信链路或通信网络上传输。The communication interface 22 may, for example, be used to encapsulate the encoded picture data 21 into a suitable format, such as a packet, for transmission over a communication link or communication network.

形成通信接口22的对应部分的通信接口28可以例如用于解封装经编码数据13,以获取经编码图片数据21。The communication interface 28 forming a corresponding part of the communication interface 22 may, for example, be used to depackage the encoded data 13 to obtain the encoded picture data 21 .

通信接口22和通信接口28都可以配置为单向通信接口,如图1中用于经编码图片数据13的从源设备12指向目的地设备14的箭头所指示,或配置为双向通信接口,以及可以用于例如发送和接收消息来建立连接、确认和交换任何其它与通信链路和/或例如经编码图片数据传输的数据传输有关的信息。Both communication interface 22 and communication interface 28 may be configured as a one-way communication interface, as indicated by the arrow from source device 12 to destination device 14 for encoded picture data 13 in FIG. 1 , or as a bi-directional communication interface, and May be used, for example, to send and receive messages to establish connections, confirm and exchange any other information related to the communication link and/or data transmission, such as encoded picture data transmission.

解码器30用于接收经编码图片数据21并提供经解码图片数据31或经解码图片31(下文将进一步描述细节,例如,基于图3或图5)。在一个实例中,解码器30可以用于解码经过编码器编码的数据,其具体可以是,解析码流获取融合候选者索引;根据所述融合候选者索引从所述融合候选者列表中获取对应的融合候选者并将所述融合候选者作为所述当前块的运动信息;根据所述当前块的运动信息对当前块进行帧间预测获得所述当前块的预测图像;获取所述当前块的残差图像;将所述当前块的预测图像以及所述当前块的残差图像相加得到所述当前块的重建图像。Decoder 30 is configured to receive encoded picture data 21 and provide decoded picture data 31 or decoded pictures 31 (details will be described further below, eg based on Figure 3 or Figure 5). In one example, the decoder 30 may be used to decode the data encoded by the encoder. Specifically, the decoder 30 may parse the code stream to obtain the fusion candidate index; and obtain the corresponding fusion candidate list from the fusion candidate list according to the fusion candidate index. fusion candidate and use the fusion candidate as the motion information of the current block; perform inter-frame prediction on the current block according to the motion information of the current block to obtain the predicted image of the current block; obtain the prediction image of the current block Residual image: Add the prediction image of the current block and the residual image of the current block to obtain the reconstructed image of the current block.

目的地设备14的后处理器32用于后处理经解码图片数据31(也称为经重构图片数据),例如,经解码图片131,以获取经后处理图片数据33,例如,经后处理图片33。后处理单元32执行的后处理可以包括,例如,色彩格式转换(例如,从YCbCr转换为RGB)、调色、整修或重采样,或任何其它处理,用于例如准备经解码图片数据31以由显示设备34显示。Post-processor 32 of destination device 14 is used to post-process decoded picture data 31 (also referred to as reconstructed picture data), e.g., decoded picture 131, to obtain post-processed picture data 33, e.g., post-processed Picture 33. Post-processing performed by post-processing unit 32 may include, for example, color format conversion (eg, from YCbCr to RGB), color correction, trimming or resampling, or any other processing, for example, to prepare decoded picture data 31 for processing by Display device 34 displays.

目的地设备14的显示设备34用于接收经后处理图片数据33以向例如用户或观看者显示图片。显示设备34可以为或可以包括任何类别的用于呈现经重构图片的显示器,例如,集成的或外部的显示器或监视器。例如,显示器可以包括液晶显示器(liquid crystaldisplay,LCD)、有机发光二极管(organic light emitting diode,OLED)显示器、等离子显示器、投影仪、微LED显示器、硅基液晶(liquid crystal on silicon,LCoS)、数字光处理器(digital light processor,DLP)或任何类别的其它显示器。The display device 34 of the destination device 14 is used to receive the post-processed picture data 33 for displaying the picture to a user or viewer, for example. Display device 34 may be or may include any type of display for presenting reconstructed pictures, such as an integrated or external display or monitor. For example, the display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro-LED display, a liquid crystal on silicon (LCoS), a digital Digital light processor (DLP) or other display of any kind.

虽然图1将源设备12和目的地设备14显示为单独的设备,但设备实施例也可以同时包括源设备12和目的地设备14或同时包括两者的功能性,即源设备12或对应的功能性以及目的地设备14或对应的功能性。在此类实施例中,可以使用相同硬件和/或软件,或使用单独的硬件和/或软件,或其任何组合来实施源设备12或对应的功能性以及目的地设备14或对应的功能性。Although FIG. 1 shows source device 12 and destination device 14 as separate devices, device embodiments may also include both source device 12 and destination device 14 or the functionality of both, ie, source device 12 or the corresponding functionality and the destination device 14 or corresponding functionality. In such embodiments, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and/or software, or using separate hardware and/or software, or any combination thereof. .

本领域技术人员基于描述明显可知,不同单元的功能性或图1所示的源设备12和/或目的地设备14的功能性的存在和(准确)划分可能根据实际设备和应用有所不同。Based on the description, it will be obvious to a person skilled in the art that the existence and (accurate) division of the functionality of the different units or the functionality of the source device 12 and/or the destination device 14 shown in Figure 1 may vary depending on the actual device and application.

编码器20(例如,视频编码器20)和解码器30(例如,视频解码器30)都可以实施为各种合适电路中的任一个,例如,一个或多个微处理器、数字信号处理器(digital signalprocessor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)、离散逻辑、硬件或其任何组合。如果部分地以软件实施所述技术,则设备可将软件的指令存储于合适的非暂时性计算机可读存储介质中,且可使用一或多个处理器以硬件执行指令从而执行本公开的技术。前述内容(包含硬件、软件、硬件与软件的组合等)中的任一者可视为一或多个处理器。视频编码器20和视频解码器30中的每一个可以包含在一或多个编码器或解码器中,所述编码器或解码器中的任一个可以集成为对应设备中的组合编码器/解码器(编解码器)的一部分。Both encoder 20 (e.g., video encoder 20) and decoder 30 (e.g., video decoder 30) may be implemented as any of a variety of suitable circuits, e.g., one or more microprocessors, digital signal processors (digital signal processor, DSP), application-specific integrated circuit (application-specific integrated circuit, ASIC), field-programmable gate array (field-programmable gate array, FPGA), discrete logic, hardware, or any combination thereof. If the techniques are implemented partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable storage medium, and may execute the instructions in hardware using one or more processors to perform the techniques of the present disclosure. . Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be regarded as one or more processors. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as a combined encoder/decoder in the corresponding device. part of the codec.

源设备12可称为视频编码设备或视频编码装置。目的地设备14可称为视频解码设备或视频解码装置。源设备12以及目的地设备14可以是视频编码设备或视频编码装置的实例。Source device 12 may be referred to as a video encoding device or video encoding device. Destination device 14 may be referred to as a video decoding device or video decoding device. Source device 12 and destination device 14 may be examples of video encoding devices or video encoding apparatuses.

源设备12和目的地设备14可以包括各种设备中的任一个,包含任何类别的手持或静止设备,例如,笔记本或膝上型计算机、移动电话、智能电话、平板或平板计算机、摄像机、台式计算机、机顶盒、电视、显示设备、数字媒体播放器、视频游戏控制台、视频流式传输设备(例如内容服务服务器或内容分发服务器)、广播接收器设备、广播发射器设备等,并可以不使用或使用任何类别的操作系统。Source device 12 and destination device 14 may include any of a variety of devices, including any class of handheld or stationary device, such as a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a video camera, a desktop Computers, set-top boxes, televisions, display devices, digital media players, video game consoles, video streaming devices (such as content serving servers or content distribution servers), broadcast receiver devices, broadcast transmitter devices, etc., and can be used without Or use any kind of operating system.

在一些情况下,源设备12和目的地设备14可以经装备以用于无线通信。因此,源设备12和目的地设备14可以为无线通信设备。In some cases, source device 12 and destination device 14 may be equipped for wireless communications. Accordingly, source device 12 and destination device 14 may be wireless communication devices.

在一些情况下,图1中所示视频编码系统10仅为示例,本申请的技术可以适用于不必包含编码和解码设备之间的任何数据通信的视频编码设置(例如,视频编码或视频解码)。在其它实例中,数据可从本地存储器检索、在网络上流式传输等。视频编码设备可以对数据进行编码并且将数据存储到存储器,和/或视频解码设备可以从存储器检索数据并且对数据进行解码。在一些实例中,由并不彼此通信而是仅编码数据到存储器和/或从存储器检索数据且解码数据的设备执行编码和解码。In some cases, the video encoding system 10 shown in FIG. 1 is only an example, and the techniques of this application may be applicable to video encoding settings (eg, video encoding or video decoding) that do not necessarily involve any data communication between encoding and decoding devices. . In other instances, data can be retrieved from local storage, streamed over a network, etc. The video encoding device may encode the data and store the data to memory, and/or the video decoding device may retrieve the data from memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but merely encode data to and/or retrieve data from memory and decode data.

应理解,对于以上参考视频编码器20所描述的实例中的每一个,视频解码器30可以用于执行相反过程。关于信令语法元素,视频解码器30可以用于接收并解析这种语法元素,相应地解码相关视频数据。在本发明一些例子中,视频编码器20可以将一个或多个定义融合候选者在融合候选者列表中的具体位置的语法元素以及当前块的空间非相邻块的帧间编码类型的语法元素熵编码成经编码视频比特流。在此类实例中,视频解码器30可以解析这种语法元素,并相应地解码相关视频数据。It should be understood that for each of the examples described above with reference to video encoder 20, video decoder 30 may be used to perform the reverse process. Regarding signaling syntax elements, video decoder 30 may be configured to receive and parse such syntax elements and decode related video data accordingly. In some examples of the present invention, video encoder 20 may combine one or more syntax elements that define the specific position of the fusion candidate in the fusion candidate list and the syntax element of the inter-frame coding type of the spatially non-adjacent block of the current block. Entropy encoding into an encoded video bitstream. In such instances, video decoder 30 may parse such syntax elements and decode the associated video data accordingly.

编码器&编码方法Encoders & Encoding Methods

图2示出用于实现本发明技术的视频编码器20的实例的示意性/概念性框图。在图2的实例中,视频编码器20包括残差计算单元204、变换处理单元206、量化单元208、逆量化单元210、逆变换处理单元212、重构单元214、缓冲器216、环路滤波器单元220、经解码图片缓冲器(decoded picture buffer,DPB)230、预测处理单元260和熵编码单元270。预测处理单元260可以包含帧间预测单元244、帧内预测单元254和模式选择单元262。帧间预测单元244可以包含运动估计单元和运动补偿单元(未图示)。图2所示的视频编码器20也可以称为混合型视频编码器或根据混合型视频编解码器的视频编码器。2 illustrates a schematic/conceptual block diagram of an example of video encoder 20 for implementing the techniques of this disclosure. In the example of FIG. 2, video encoder 20 includes residual calculation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, buffer 216, loop filtering processor unit 220, decoded picture buffer (DPB) 230, prediction processing unit 260, and entropy encoding unit 270. Prediction processing unit 260 may include inter prediction unit 244, intra prediction unit 254, and mode selection unit 262. Inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in FIG. 2 may also be called a hybrid video encoder or a video encoder according to a hybrid video codec.

例如,残差计算单元204、变换处理单元206、量化单元208、预测处理单元260和熵编码单元270形成编码器20的前向信号路径,而例如逆量化单元210、逆变换处理单元212、重构单元214、缓冲器216、环路滤波器220、经解码图片缓冲器(decoded picture buffer,DPB)230、预测处理单元260形成编码器的后向信号路径,其中编码器的后向信号路径对应于解码器的信号路径(参见图3中的解码器30)。For example, residual calculation unit 204, transform processing unit 206, quantization unit 208, prediction processing unit 260, and entropy encoding unit 270 form the forward signal path of encoder 20, while, for example, inverse quantization unit 210, inverse transform processing unit 212, re- The structural unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (decoded picture buffer, DPB) 230, and the prediction processing unit 260 form a backward signal path of the encoder, where the backward signal path of the encoder corresponds to in the signal path of the decoder (see decoder 30 in Figure 3).

编码器20通过例如输入202,接收图片201或图片201的块203,例如,形成视频或视频序列的图片序列中的图片。图片块203也可以称为当前图片块或待编码图片块,图片201可以称为当前图片或待编码图片(尤其是在视频编码中将当前图片与其它图片区分开时,其它图片例如同一视频序列亦即也包括当前图片的视频序列中的先前经编码和/或经解码图片)。The encoder 20 receives, for example via an input 202, a picture 201 or a block 203 of a picture 201, for example a picture in a sequence of pictures forming a video or video sequence. The picture block 203 can also be called the current picture block or the picture block to be encoded, and the picture 201 can be called the current picture or the picture to be encoded (especially when the current picture is distinguished from other pictures in video encoding, other pictures such as the same video sequence That is, also including previously encoded and/or decoded pictures in the video sequence of the current picture).

分割segmentation

编码器20的实施例可以包括分割单元(图2中未显示),用于将图片201分割成多个例如块203的块,通常分割成多个不重叠的块。分割单元可以用于对视频序列中所有图片使用相同的块大小以及定义块大小的对应栅格,或用于在图片或子集或图片群组之间更改块大小,并将每个图片分割成对应的块。在VVC中引入了由J.An等人的在用于下一代视频编码的分块结构(Block partitioning structure for next generation video coding)”(国际电信联盟,COM16-C966,2015年9月,以下称作“VCEG建议书COM16-C966”)中提出的四叉树二叉树(quad-tree-binary-tree,QTBT)划分技术。模拟已展示出提出的QTBT结构比所用的HEVC中的四叉树结构更高效。此外,在QTBT中,CU可具有正方形或矩形形状。如图3中所示,编码树单元(coding tree unit,CTU)首先通过四叉树结构划分。四叉树叶节点可进一步通过二叉树结构划分。在二叉树划分中存在两种划分类型:对称水平划分和对称竖直划分。在每种情况下,通过沿着中部水平地或竖直地平分节点来划分节点。二叉树叶节点称为编码单元(coding unit,CU),且分别在无任何进一步划分的情况下的预测和变换处理。这意味着CU、PU和TU在QTBT编码块结构中具有相同的块尺寸。CU有时由具有不同颜色分量的编码块(coding block,CB)构成,例如,在4:2:0色度格式的P、B条带的情况下,一个CU含有一个亮度CB和两个色度CB,且CU有时由具有单个分量的CB构成,例如,在I条带的情况下,一个CU仅含有一个亮度CB或仅含有两个色度CB。Embodiments of the encoder 20 may include a segmentation unit (not shown in Figure 2) for segmenting the picture 201 into a plurality of blocks, such as block 203, typically into a plurality of non-overlapping blocks. Split units can be used to use the same block size for all pictures in a video sequence and the corresponding raster that defines the block size, or to change the block size between pictures or subsets or groups of pictures and split each picture into corresponding block. The "Block partitioning structure for next generation video coding" proposed by J.An et al. was introduced in VVC (International Telecommunication Union, COM16-C966, September 2015, hereinafter referred to as The quad-tree-binary-tree (QTBT) partitioning technique proposed in "VCEG Recommendation COM16-C966"). Simulations have shown that the proposed QTBT structure is more efficient than the quad-tree structure used in HEVC Efficient. Furthermore, in QTBT, a CU can have a square or rectangular shape. As shown in Figure 3, the coding tree unit (CTU) is first divided through a quad-tree structure. The quad-leaf nodes can be further divided through a binary tree structure Partitioning. There are two types of partitioning in binary tree partitioning: symmetric horizontal partitioning and symmetric vertical partitioning. In each case, a node is divided by bisecting it horizontally or vertically along the middle. Binary leaf nodes are called coding units (coding unit, CU), and prediction and transform processing respectively without any further partitioning. This means that CU, PU and TU have the same block size in the QTBT coding block structure. CU is sometimes composed of different color components It is composed of coding block (CB). For example, in the case of P and B strips in the 4:2:0 chroma format, a CU contains one luma CB and two chroma CBs, and the CU is sometimes composed of A single component CB is constituted, for example, in the case of an I-strip, a CU contains only one luma CB or only two chroma CBs.

另外,在美国专利申请公开案第20170208336号中提出替代基于QT、BT和/或QTBT的CU结构的名为多型树(multi-type-tree,MTT)的块划分结构。MTT划分结构仍是递归树结构。在MTT中,使用多个不同划分结构(例如三个或更多个)。举例来说,根据MTT技术,可在树结构的每个深度针对树结构的每个相应的非叶节点使用三个或更多个不同划分结构。树结构中的节点的深度可指从所述节点到树结构的根部的路径的长度(例如划分次数)。划分结构可大体上指一个块可分成多少个不同块。划分结构可以是可将块分为四个块的四叉树划分结构、可将块分为两个块的二叉树划分结构或可将块分为三个块的三叉树划分结构,此外,三叉树划分结构可能并不通过中心划分块。划分结构可具有多个不同划分类型。划分类型可另外限定如何划分块,包含对称或不对称划分、均匀或不均匀划分和/或水平或竖直划分。In addition, a block partitioning structure named multi-type-tree (MTT) is proposed in US Patent Application Publication No. 20170208336 to replace the CU structure based on QT, BT and/or QTBT. The MTT partition structure is still a recursive tree structure. In MTT, multiple different partitioning structures (eg three or more) are used. For example, according to the MTT technique, three or more different partitioning structures may be used for each corresponding non-leaf node of the tree structure at each depth of the tree structure. The depth of a node in a tree structure may refer to the length of the path (eg, the number of divisions) from the node to the root of the tree structure. The partitioning structure may generally refer to how many different blocks a block can be divided into. The partitioning structure may be a quadtree partitioning structure that can divide a block into four blocks, a binary tree partitioning structure that can divide a block into two blocks, or a ternary tree partitioning structure that can divide a block into three blocks. In addition, a ternary tree The partition structure may not divide the blocks through the center. A partition structure can have multiple different partition types. The partitioning type may additionally define how the block is divided, including symmetrical or asymmetrical partitioning, even or uneven partitioning, and/or horizontal or vertical partitioning.

在MTT中,在树结构的每个深度处,编码器100可用于使用三个另外的划分结构中的一个划分结构的特定划分类型来进一步划分子树。举例来说,编码器100可用于确定来自QT、BT、三叉树(triple-tree,TT)和其它划分结构的特定划分类型。在一个示例中,QT划分结构可包含正方形四叉树或矩形四叉树划分类型。编码器100可使用正方形四叉树划分通过沿着中心水平地和竖直地将块平分为四个均等尺寸的正方形块来对正方形块进行划分。同样,编码器100可使用矩形四叉树划分通过沿着中心水平地和竖直地将矩形块平分为四个均等尺寸的矩形块来对矩形(例如非方形)块进行划分。In MTT, at each depth of the tree structure, the encoder 100 can be used to further partition the subtree using a specific partition type of one of three additional partition structures. For example, the encoder 100 may be used to determine specific partition types from QT, BT, triple-tree (TT), and other partition structures. In one example, the QT partition structure may include a square quadtree or a rectangular quadtree partition type. Encoder 100 may partition a square block using square quadtree partitioning by bisecting the block horizontally and vertically along the center into four equally sized square blocks. Likewise, encoder 100 may use rectangular quadtree partitioning to partition a rectangular (eg, non-square) block by bisecting the rectangular block horizontally and vertically along the center into four equally sized rectangular blocks.

BT划分结构可包含水平对称二叉树、竖直对称二叉树、水平不对称二叉树或竖直不对称二叉树划分类型中的至少一个。对于水平对称二叉树划分类型,编码器100可用于沿着块的中心水平地将块平分为相同尺寸的两个对称块。对于竖直对称二叉树划分类型,编码器100可用于沿着块的中心竖直地将块平分为相同尺寸的两个对称块。对于水平不对称二叉树划分类型,编码器100可用于将块水平地分为不同尺寸的两个块。举例来说,一个块可以是父块尺寸的1/4,而另一块可以是父块尺寸的3/4,类似于PART_2N×nU或PART_2N×nD划分类型。对于竖直不对称二叉树划分类型,编码器100可用于将块竖直地分为不同尺寸的两个块。举例来说,一个块可以是父块尺寸的1/4,而另一块可以是父块尺寸的3/4,类似于PART_nL×2N或PART_nR×2N划分类型。在其它示例中,不对称二叉树划分类型可将父块分为不同尺寸的部分。举例来说,一个子块可以是父块的3/8,而另一子块可以是父块的5/8。当然,此类划分类型可以是竖直型或水平型。The BT partition structure may include at least one of a horizontal symmetric binary tree, a vertical symmetric binary tree, a horizontal asymmetric binary tree or a vertical asymmetric binary tree partition type. For the horizontally symmetric binary tree partitioning type, the encoder 100 may be used to bisect the block horizontally along the center of the block into two symmetric blocks of the same size. For the vertically symmetric binary tree partitioning type, the encoder 100 may be used to bisect the block vertically along the center of the block into two symmetric blocks of the same size. For the horizontal asymmetric binary tree partitioning type, the encoder 100 may be used to horizontally divide the block into two blocks of different sizes. For example, one block can be 1/4 the size of the parent block, while another block can be 3/4 the size of the parent block, similar to the PART_2N×nU or PART_2N×nD partitioning types. For the vertical asymmetric binary tree partitioning type, the encoder 100 may be used to vertically divide the block into two blocks of different sizes. For example, one block can be 1/4 of the parent block size, while another block can be 3/4 of the parent block size, similar to the PART_nL×2N or PART_nR×2N partitioning types. In other examples, an asymmetric binary tree partitioning type may divide a parent block into parts of different sizes. For example, one child block can be 3/8 of the parent block, while another child block can be 5/8 of the parent block. Of course, such division types may be vertical or horizontal.

TT划分结构与QT或BT结构的类型的不同之处在于,TT划分结构并不沿着中心划分块。块的中心区域一起保持在同一子块中。不同于产生四个块的QT或产生两个块的二叉树,根据TT划分结构的划分产生三个块。根据TT划分结构的示例划分类型包含对称划分类型(水平和竖直两种)以及不对称划分类型(水平和竖直两种)。此外,根据TT划分结构的对称划分类型可以是不均等/不均匀或均等/均匀的。根据TT划分结构的不对称划分类型是不均等/不均匀的。在一个示例中,TT划分结构可包含以下划分类型中的至少一个:水平均等/均匀对称三叉树,竖直均等/均匀对称三叉树,水平不均等/不均匀对称三叉树,竖直不均等/不均匀对称三叉树,水平不均等/不均匀不对称三叉树,或竖直不均等/不均匀不对称三叉树划分类型。TT partition structures differ from types of QT or BT structures in that TT partition structures do not divide blocks along the center. The central areas of the blocks are kept together in the same sub-block. Unlike QT, which produces four blocks, or binary tree, which produces two blocks, partitioning according to the TT partition structure produces three blocks. Example division types according to the TT division structure include symmetric division types (two types, horizontal and vertical) and asymmetric division types (two types, horizontal and vertical). Furthermore, the symmetric partition type according to the TT partition structure can be unequal/uneven or equal/uniform. The asymmetric partition type according to the TT partition structure is uneven/uneven. In one example, the TT partition structure may include at least one of the following partition types: horizontal equal/uniform symmetric ternary tree, vertical equal/uniform symmetric ternary tree, horizontal uneven/uneven symmetric ternary tree, vertical uneven/ Uneven symmetric ternary tree, horizontal uneven/uneven asymmetric ternary tree, or vertical uneven/uneven asymmetric ternary tree partition type.

总的来说,不均等/不均匀对称三叉树划分类型是围绕块的中心线对称但其中所得三个块中的至少一个的尺寸与另两个不相同的划分类型。一个优选示例是其中侧边块是块尺寸的1/4,而中心块是块尺寸的1/2。均等/均匀对称三叉树划分类型是围绕块的中心线对称且所得块的尺寸全都相同的划分类型。此类划分在块高度或宽度——依竖直或水平划分而定——是3的整倍数的情况下是可能的。不均等/不均匀不对称三叉树划分类型是并不围绕块的中心线对称且其中所得块中的至少一个并非与另两个同等尺寸的划分类型。In general, the unequal/uneven symmetric ternary tree partitioning type is a partitioning type that is symmetrical about the center line of the block but where at least one of the resulting three blocks is not the same size as the other two. A preferred example is where the side pieces are 1/4 the size of the block and the center piece is 1/2 the size of the block. The equal/uniformly symmetric ternary tree partitioning type is a partitioning type that is symmetrical around the center line of the blocks and the resulting blocks are all the same size. Such divisions are possible if the block height or width - depending on the vertical or horizontal division - is an integral multiple of 3. The unequal/uneven asymmetric ternary tree partitioning type is a partitioning type that is not symmetrical about the center line of the blocks and where at least one of the resulting blocks is not of the same size as the other two.

在一个实例中,视频编码器20的预测处理单元260可以用于执行上述分割技术的任何组合。In one example, prediction processing unit 260 of video encoder 20 may be used to perform any combination of the above-described segmentation techniques.

如图片201,块203也是或可以视为具有亮度值(采样值)的采样点的二维阵列或矩阵,虽然其尺寸比图片201小。换句话说,块203可以包括,例如,一个采样阵列(例如黑白图片201情况下的亮度阵列)或三个采样阵列(例如,彩色图片情况下的一个亮度阵列和两个色度阵列)或依据所应用的色彩格式的任何其它数目和/或类别的阵列。块203的水平和垂直方向(或轴线)上采样点的数目定义块203的尺寸。Like picture 201 , block 203 is also or can be viewed as a two-dimensional array or matrix of sample points with brightness values (sampling values), although its size is smaller than that of picture 201 . In other words, block 203 may include, for example, one sample array (e.g., a luma array in the case of a black and white picture 201) or three sample arrays (e.g., a luma array and two chrominance arrays in the case of a color picture) or based on Arrays of any other number and/or category of color formats to apply. The number of sample points in the horizontal and vertical directions (or axes) of the block 203 defines the size of the block 203 .

如图2所示的编码器20用于逐块编码图片201,例如,对每个块203执行编码和预测。The encoder 20 as shown in Figure 2 is used to encode the picture 201 block by block, eg, performing encoding and prediction for each block 203.

残差计算Residual calculation

残差计算单元204用于基于图片块203和预测块265(下文提供预测块265的其它细节)计算残差块205,例如,通过逐样本(逐像素)将图片块203的样本值减去预测块265的样本值,以在样本域中获取残差块205。The residual calculation unit 204 is configured to calculate the residual block 205 based on the picture block 203 and the prediction block 265 (additional details of the prediction block 265 are provided below), for example, by subtracting the prediction from the sample value of the picture block 203 on a sample-by-sample (pixel-by-pixel) basis. sample values of block 265 to obtain the residual block 205 in the sample domain.

变换transform

变换处理单元206用于在残差块205的样本值上应用例如离散余弦变换(discretecosine transform,DCT)或离散正弦变换(discrete sine transform,DST)的变换,以在变换域中获取变换系数207。变换系数207也可以称为变换残差系数,并在变换域中表示残差块205。The transform processing unit 206 is configured to apply a transform such as a discrete cosine transform (DCT) or a discrete sine transform (DST) on the sample values of the residual block 205 to obtain the transform coefficients 207 in the transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and represent the residual block 205 in the transform domain.

变换处理单元206可以用于应用DCT/DST的整数近似值,例如为HEVC/H.265指定的变换。与正交DCT变换相比,这种整数近似值通常由某一因子按比例缩放。为了维持经正变换和逆变换处理的残差块的范数,应用额外比例缩放因子作为变换过程的一部分。比例缩放因子通常是基于某些约束条件选择的,例如,比例缩放因子是用于移位运算的2的幂、变换系数的位深度、准确性和实施成本之间的权衡等。例如,在解码器30侧通过例如逆变换处理单元212为逆变换(以及在编码器20侧通过例如逆变换处理单元212为对应逆变换)指定具体比例缩放因子,以及相应地,可以在编码器20侧通过变换处理单元206为正变换指定对应比例缩放因子。Transform processing unit 206 may be operable to apply an integer approximation of DCT/DST, such as the transform specified for HEVC/H.265. In contrast to the orthogonal DCT transform, this integer approximation is usually scaled by some factor. In order to maintain the norm of the forward and inverse transformed residual blocks, additional scaling factors are applied as part of the transformation process. The scaling factor is usually chosen based on certain constraints, e.g. the scaling factor is a power of 2 used for the shift operation, the bit depth of the transform coefficients, the trade-off between accuracy and implementation cost, etc. For example, a specific scaling factor may be specified on the decoder 30 side for the inverse transform (and for the corresponding inverse transform on the encoder 20 side for example by the inverse transform processing unit 212), and accordingly, the inverse transform may be specified at the encoder 30 On the side 20, a corresponding scaling factor is specified for the forward transformation through the transformation processing unit 206.

量化Quantify

量化单元208用于例如通过应用标量量化或向量量化来量化变换系数207,以获取经量化变换系数209。经量化变换系数209也可以称为经量化残差系数209。量化过程可以减少与部分或全部变换系数207有关的位深度。例如,可在量化期间将n位变换系数向下舍入到m位变换系数,其中n大于m。可通过调整量化参数(quantization parameter,QP)修改量化程度。例如,对于标量量化,可以应用不同的标度来实现较细或较粗的量化。较小量化步长对应较细量化,而较大量化步长对应较粗量化。可以通过量化参数(quantizationparameter,QP)指示合适的量化步长。例如,量化参数可以为合适的量化步长的预定义集合的索引。例如,较小的量化参数可以对应精细量化(较小量化步长),较大量化参数可以对应粗糙量化(较大量化步长),反之亦然。量化可以包含除以量化步长以及例如通过逆量化210执行的对应的量化或逆量化,或者可以包含乘以量化步长。根据例如HEVC的一些标准的实施例可以使用量化参数来确定量化步长。一般而言,可以基于量化参数使用包含除法的等式的定点近似来计算量化步长。可以引入额外比例缩放因子来进行量化和反量化,以恢复可能由于在用于量化步长和量化参数的等式的定点近似中使用的标度而修改的残差块的范数。在一个实例实施方式中,可以合并逆变换和反量化的标度。或者,可以使用自定义量化表并在例如比特流中将其从编码器通过信号发送到解码器。量化是有损操作,其中量化步长越大,损耗越大。Quantization unit 208 is used to quantize transform coefficients 207, such as by applying scalar quantization or vector quantization, to obtain quantized transform coefficients 209. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all transform coefficients 207. For example, n-bit transform coefficients may be rounded down to m-bit transform coefficients during quantization, where n is greater than m. The degree of quantization can be modified by adjusting the quantization parameter (QP). For example, with scalar quantization, different scales can be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The appropriate quantization step size can be indicated by a quantization parameter (QP). For example, the quantization parameter may be an index into a predefined set of suitable quantization steps. For example, a smaller quantization parameter can correspond to fine quantization (smaller quantization step size), and a larger quantization parameter can correspond to coarse quantization (larger quantization step size), and vice versa. Quantization may include dividing by the quantization step size and corresponding quantization or inverse quantization, such as performed by inverse quantization 210, or may include multiplying by the quantization step size. Embodiments according to some standards such as HEVC may use quantization parameters to determine the quantization step size. In general, the quantization step size can be calculated based on the quantization parameters using a fixed-point approximation of the equation involving division. Additional scaling factors can be introduced for quantization and inverse quantization to recover the norm of the residual block that may be modified due to the scaling used in the fixed-point approximation of the equations for quantization step size and quantization parameters. In one example implementation, inverse transformation and inverse quantization scaling may be combined. Alternatively, one can use a custom quantization table and signal it from the encoder to the decoder in e.g. the bitstream. Quantization is a lossy operation, where the larger the quantization step size, the greater the loss.

逆量化单元210用于在经量化系数上应用量化单元208的逆量化,以获取经反量化系数211,例如,基于或使用与量化单元208相同的量化步长,应用量化单元208应用的量化方案的逆量化方案。经反量化系数211也可以称为经反量化残差系数211,对应于变换系数207,虽然由于量化造成的损耗通常与变换系数不相同。The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 on the quantized coefficients to obtain the inverse quantized coefficients 211 , for example, applying the quantization scheme applied by the quantization unit 208 based on or using the same quantization step size as the quantization unit 208 inverse quantization scheme. The inverse quantized coefficients 211 may also be called inverse quantized residual coefficients 211, corresponding to the transform coefficients 207, although the loss due to quantization is generally not the same as the transform coefficients.

逆变换处理单元212用于应用变换处理单元206应用的变换的逆变换,例如,逆离散余弦变换(discrete cosine transform,DCT)或逆离散正弦变换(discrete sinetransform,DST),以在样本域中获取逆变换块213。逆变换块213也可以称为逆变换经反量化块213或逆变换残差块213。The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), to obtain in the sample domain Inverse transform block 213. The inverse transform block 213 may also be referred to as the inverse transform inverse quantized block 213 or the inverse transform residual block 213.

重构单元214(例如,求和器214)用于将逆变换块213(即经重构残差块213)添加至预测块265,以在样本域中获取经重构块215,例如,将经重构残差块213的样本值与预测块265的样本值相加。The reconstruction unit 214 (eg, summer 214) is used to add the inverse transform block 213 (ie, the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, eg, The sample values of reconstructed residual block 213 are added to the sample values of prediction block 265 .

可选地,例如线缓冲器216的缓冲器单元216(或简称“缓冲器”216)用于缓冲或存储经重构块215和对应的样本值,用于例如帧内预测。在其它的实施例中,编码器可以用于使用存储在缓冲器单元216中的未经滤波的经重构块和/或对应的样本值来进行任何类别的估计和/或预测,例如帧内预测。Optionally, a buffer unit 216 (or simply "buffer" 216), such as line buffer 216, is used to buffer or store reconstructed block 215 and corresponding sample values, for example, intra prediction. In other embodiments, the encoder may be used to perform any class of estimation and/or prediction using the unfiltered reconstructed blocks and/or corresponding sample values stored in buffer unit 216, such as intra predict.

例如,编码器20的实施例可以经配置以使得缓冲器单元216不只用于存储用于帧内预测254的经重构块215,也用于环路滤波器单元220(在图2中未示出),和/或,例如使得缓冲器单元216和经解码图片缓冲器单元230形成一个缓冲器。其它实施例可以用于将经滤波块221和/或来自经解码图片缓冲器230的块或样本(图2中均未示出)用作帧内预测254的输入或基础。For example, embodiments of encoder 20 may be configured such that buffer unit 216 is used not only to store reconstructed block 215 for intra prediction 254, but also for loop filter unit 220 (not shown in FIG. 2 out), and/or, for example, causing buffer unit 216 and decoded picture buffer unit 230 to form one buffer. Other embodiments may be used for using filtered block 221 and/or blocks or samples from decoded picture buffer 230 (neither shown in FIG. 2 ) as the input or basis for intra prediction 254 .

环路滤波器单元220(或简称“环路滤波器”220)用于对经重构块215进行滤波以获取经滤波块221,从而顺利进行像素转变或提高视频质量。环路滤波器单元220旨在表示一个或多个环路滤波器,例如去块滤波器、样本自适应偏移(sample-adaptive offset,SAO)滤波器或其它滤波器,例如双边滤波器、自适应环路滤波器(adaptive loop filter,ALF),或锐化或平滑滤波器,或协同滤波器。尽管环路滤波器单元220在图2中示出为环内滤波器,但在其它配置中,环路滤波器单元220可实施为环后滤波器。经滤波块221也可以称为经滤波的经重构块221。经解码图片缓冲器230可以在环路滤波器单元220对经重构编码块执行滤波操作之后存储经重构编码块。The loop filter unit 220 (or simply "loop filter" 220) is used to filter the reconstructed block 215 to obtain the filtered block 221, thereby smoothly performing pixel conversion or improving video quality. Loop filter unit 220 is intended to represent one or more loop filters, such as deblocking filters, sample-adaptive offset (SAO) filters, or other filters, such as bilateral filters, automatic Adaptive loop filter (ALF), or sharpening or smoothing filter, or collaborative filter. Although loop filter unit 220 is shown in FIG. 2 as an in-loop filter, in other configurations, loop filter unit 220 may be implemented as a post-loop filter. Filtered block 221 may also be referred to as filtered reconstructed block 221. The decoded picture buffer 230 may store the reconstructed encoding block after the loop filter unit 220 performs a filtering operation on the reconstructed encoding block.

编码器20(对应地,环路滤波器单元220)的实施例可以用于输出环路滤波器参数(例如,样本自适应偏移信息),例如,直接输出或由熵编码单元270或任何其它熵编码单元熵编码后输出,例如使得解码器30可以接收并应用相同的环路滤波器参数用于解码。Embodiments of encoder 20 (correspondingly, loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), e.g., directly or by entropy encoding unit 270 or any other The entropy encoding unit entropy encodes the output, for example, so that the decoder 30 can receive and apply the same loop filter parameters for decoding.

经解码图片缓冲器(decoded picture buffer,DPB)230可以为存储参考图片数据供视频编码器20编码视频数据之用的参考图片存储器。DPB 230可由多种存储器设备中的任一个形成,例如动态随机存储器(dynamic random access memory,DRAM)(包含同步DRAM(synchronous DRAM,SDRAM)、磁阻式RAM(magnetoresistive RAM,MRAM)、电阻式RAM(resistive RAM,RRAM))或其它类型的存储器设备。可以由同一存储器设备或单独的存储器设备提供DPB 230和缓冲器216。在某一实例中,经解码图片缓冲器(decoded picturebuffer,DPB)230用于存储经滤波块221。经解码图片缓冲器230可以进一步用于存储同一当前图片或例如先前经重构图片的不同图片的其它先前的经滤波块,例如先前经重构和经滤波块221,以及可以提供完整的先前经重构亦即经解码图片(和对应参考块和样本)和/或部分经重构当前图片(和对应参考块和样本),例如用于帧间预测。在某一实例中,如果经重构块215无需环内滤波而得以重构,则经解码图片缓冲器(decoded picture buffer,DPB)230用于存储经重构块215。Decoded picture buffer (DPB) 230 may be a reference picture memory that stores reference picture data for use by video encoder 20 in encoding video data. DPB 230 may be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM) (resistive RAM, RRAM)) or other types of memory devices. DPB 230 and buffer 216 may be provided by the same memory device or separate memory devices. In one example, decoded picture buffer (DPB) 230 is used to store filtered block 221 . The decoded picture buffer 230 may further be used to store other previous filtered blocks of the same current picture or different pictures such as a previous reconstructed picture, such as the previously reconstructed and filtered block 221, and may provide a complete previous filtered block. Reconstruction is a decoded picture (and corresponding reference blocks and samples) and/or a partially reconstructed current picture (and corresponding reference blocks and samples), for example for inter prediction. In one example, if reconstructed block 215 is reconstructed without in-loop filtering, decoded picture buffer (DPB) 230 is used to store reconstructed block 215 .

预测处理单元260,也称为块预测处理单元260,用于接收或获取块203(当前图片201的当前块203)和经重构图片数据,例如来自缓冲器216的同一(当前)图片的参考样本和/或来自经解码图片缓冲器230的一个或多个先前经解码图片的参考图片数据231,以及用于处理这类数据进行预测,即提供可以为经帧间预测块245或经帧内预测块255的预测块265。Prediction processing unit 260, also referred to as block prediction processing unit 260, for receiving or retrieving block 203 (current block 203 of current picture 201) and reconstructed picture data, such as a reference to the same (current) picture from buffer 216 samples and/or reference picture data 231 of one or more previously decoded pictures from the decoded picture buffer 230, and for processing such data for prediction, i.e. providing an inter-predicted block 245 or an intra-predicted block 245. Prediction block 265 of prediction block 255.

模式选择单元262可以用于选择预测模式(例如帧内或帧间预测模式)和/或对应的用作预测块265的预测块245或255,以计算残差块205和重构经重构块215。Mode selection unit 262 may be used to select a prediction mode (eg, intra or inter prediction mode) and/or corresponding prediction block 245 or 255 used as prediction block 265 to calculate residual block 205 and reconstruct the reconstructed block 215.

模式选择单元262的实施例可以用于选择预测模式(例如,从预测处理单元260所支持的那些预测模式中选择),所述预测模式提供最佳匹配或者说最小残差(最小残差意味着传输或存储中更好的压缩),或提供最小信令开销(最小信令开销意味着传输或存储中更好的压缩),或同时考虑或平衡以上两者。模式选择单元262可以用于基于码率失真优化(rate distortion optimization,RDO)确定预测模式,即选择提供最小码率失真优化的预测模式,或选择相关码率失真至少满足预测模式选择标准的预测模式。Embodiments of mode selection unit 262 may be used to select a prediction mode (e.g., from those supported by prediction processing unit 260) that provides the best match or minimum residual (minimum residual means better compression in transmission or storage), or provide minimal signaling overhead (minimum signaling overhead means better compression in transmission or storage), or consider or balance both at the same time. The mode selection unit 262 may be configured to determine a prediction mode based on rate distortion optimization (RDO), that is, select a prediction mode that provides minimum rate distortion optimization, or select a prediction mode whose associated rate distortion at least meets the prediction mode selection criteria. .

下文将详细解释编码器20的实例(例如,通过预测处理单元260)执行的预测处理和(例如,通过模式选择单元262)执行的模式选择。Prediction processing performed (e.g., by prediction processing unit 260) and mode selection performed (e.g., by mode selection unit 262) by an example of encoder 20 will be explained in detail below.

如上文所述,编码器20用于从(预先确定的)预测模式集合中确定或选择最好或最优的预测模式。预测模式集合可以包括例如帧内预测模式和/或帧间预测模式。As mentioned above, the encoder 20 is used to determine or select the best or optimal prediction mode from a (predetermined) set of prediction modes. The set of prediction modes may include, for example, intra prediction modes and/or inter prediction modes.

帧内预测模式集合可以包括35种不同的帧内预测模式,例如,如DC(或均值)模式和平面模式的非方向性模式,或如H.265中定义的方向性模式,或者可以包括67种不同的帧内预测模式,例如,如DC(或均值)模式和平面模式的非方向性模式,或如正在发展中的H.266中定义的方向性模式。The intra prediction mode set may include 35 different intra prediction modes, for example, non-directional modes such as DC (or mean) mode and planar mode, or directional modes as defined in H.265, or may include 67 Different intra prediction modes, for example, non-directional modes such as DC (or mean) mode and planar mode, or directional modes as defined in the developing H.266.

(可能的)帧间预测模式集合取决于可用参考图片(即,例如前述存储在DBP 230中的至少部分经解码图片)和其它帧间预测参数,例如取决于是否使用整个参考图片或只使用参考图片的一部分,例如围绕当前块的区域的搜索窗区域,来搜索最佳匹配参考块,和/或例如取决于是否应用如半像素和/或四分之一像素内插的像素内插。The set of (possible) inter-prediction modes depends on the available reference pictures (i.e. at least part of the decoded pictures stored in DBP 230, for example) and other inter-prediction parameters, e.g. on whether the entire reference picture or only the reference picture is used A portion of the picture, such as a search window area surrounding the area of the current block, is searched for the best matching reference block, and/or e.g. depending on whether pixel interpolation such as half-pixel and/or quarter-pixel interpolation is applied.

除了以上预测模式,也可以应用跳过模式和/或直接模式。In addition to the above prediction modes, skip mode and/or direct mode can also be applied.

预测处理单元260可以进一步用于将块203分割成较小的块分区或子块,例如,通过迭代使用四叉树(quad-tree,QT)分割、二进制树(binary-tree,BT)分割或三叉树(triple-tree,TT)分割,或其任何组合,以及用于例如为块分区或子块中的每一个执行预测,其中模式选择包括选择分割的块203的树结构和选择应用于块分区或子块中的每一个的预测模式。Prediction processing unit 260 may further be used to partition block 203 into smaller block partitions or sub-blocks, for example, by iteratively using quad-tree (QT) partitioning, binary-tree (BT) partitioning, or Triple-tree (TT) partitioning, or any combination thereof, and for performing prediction, for example, for each of the block partitions or sub-blocks, wherein the mode selection includes selecting the tree structure of the partitioned block 203 and selecting the tree structure to be applied to the block. Prediction mode for each of the partitions or sub-blocks.

帧间预测单元244可以包含运动估计(motion estimation,ME)单元(图2中未示出)和运动补偿(motion compensation,MC)单元(图2中未示出)。运动估计单元用于接收或获取图片块203(当前图片201的当前图片块203)和经解码图片231,或至少一个或多个先前经重构块,例如,一个或多个其它/不同先前经解码图片231的经重构块,来进行运动估计。例如,视频序列可以包括当前图片和先前经解码图片31,或换句话说,当前图片和先前经解码图片31可以是形成视频序列的图片序列的一部分,或者形成该图片序列。本申请的融合候选者列表的构建可以通过该该运动估计模块来实现。The inter prediction unit 244 may include a motion estimation (ME) unit (not shown in FIG. 2) and a motion compensation (MC) unit (not shown in FIG. 2). The motion estimation unit is operable to receive or obtain the picture block 203 (the current picture block 203 of the current picture 201) and the decoded picture 231, or at least one or more previously reconstructed blocks, eg, one or more other/different previously reconstructed blocks. The reconstructed blocks of picture 231 are decoded for motion estimation. For example, the video sequence may comprise the current picture and the previously decoded picture 31, or in other words, the current picture and the previously decoded picture 31 may be part of a sequence of pictures forming the video sequence, or form the sequence of pictures. The construction of the fusion candidate list in this application can be implemented through the motion estimation module.

例如,编码器20可以用于从多个其它图片中的同一或不同图片的多个参考块中选择参考块,并向运动估计单元(图2中未示出)提供参考图片(或参考图片索引……)和/或提供参考块的位置(X、Y坐标)与当前块的位置之间的偏移(空间偏移)作为帧间预测参数。该偏移也称为运动向量(motion vector,MV)。For example, encoder 20 may be configured to select a reference block from a plurality of reference blocks of the same or different pictures in a plurality of other pictures and provide a reference picture (or reference picture index) to the motion estimation unit (not shown in FIG. 2 ) ...) and/or provide the offset (spatial offset) between the position of the reference block (X, Y coordinates) and the position of the current block as an inter prediction parameter. This offset is also called a motion vector (MV).

运动补偿单元用于获取,例如接收帧间预测参数,并基于或使用帧间预测参数执行帧间预测来获取帧间预测块245。由运动补偿单元(图2中未示出)执行的运动补偿可以包含基于通过运动估计(可能执行对子像素精确度的内插)确定的运动/块向量取出或生成预测块。内插滤波可从已知像素样本产生额外像素样本,从而潜在地增加可用于编码图片块的候选预测块的数目。一旦接收到用于当前图片块的PU的运动向量,运动补偿单元246可以在一个参考图片列表中定位运动向量指向的预测块。运动补偿单元246还可以生成与块和视频条带相关联的语法元素,以供视频解码器30在解码视频条带的图片块时使用。The motion compensation unit is configured to obtain, for example, receive inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to obtain the inter prediction block 245 . Motion compensation performed by a motion compensation unit (not shown in Figure 2) may involve fetching or generating prediction blocks based on motion/block vectors determined by motion estimation (possibly performing interpolation to sub-pixel accuracy). Interpolation filtering can generate additional pixel samples from known pixel samples, potentially increasing the number of candidate prediction blocks available for encoding a picture block. Upon receiving the motion vector for the PU of the current picture block, motion compensation unit 246 may locate the prediction block to which the motion vector points in a reference picture list. Motion compensation unit 246 may also generate syntax elements associated with the blocks and the video slice for use by video decoder 30 when decoding the picture blocks of the video slice.

帧内预测单元254用于获取,例如接收同一图片的图片块203(当前图片块)和一个或多个先前经重构块,例如经重构相邻块,以进行帧内估计。例如,编码器20可以用于从多个(预定)帧内预测模式中选择帧内预测模式。The intra prediction unit 254 is configured to obtain, eg, receive a picture block 203 of the same picture (the current picture block) and one or more previously reconstructed blocks, eg, reconstructed neighboring blocks, for intra estimation. For example, the encoder 20 may be used to select an intra prediction mode from a plurality of (predetermined) intra prediction modes.

编码器20的实施例可以用于基于优化标准选择帧内预测模式,例如基于最小残差(例如,提供最类似于当前图片块203的预测块255的帧内预测模式)或最小码率失真(例如……)。Embodiments of encoder 20 may be used to select an intra prediction mode based on optimization criteria, such as minimum residual (e.g., an intra prediction mode that provides prediction block 255 that is most similar to current picture block 203) or minimum code rate distortion ( For example……).

帧内预测单元254进一步用于基于如所选择的帧内预测模式的帧内预测参数确定帧内预测块255。在任何情况下,在选择用于块的帧内预测模式之后,帧内预测单元254还用于向熵编码单元270提供帧内预测参数,即提供指示所选择的用于块的帧内预测模式的信息。在一个实例中,帧内预测单元254可以用于执行下文描述的帧内预测技术的任意组合。Intra-prediction unit 254 is further operable to determine intra-prediction block 255 based on intra-prediction parameters as selected for the intra-prediction mode. In any case, after selecting an intra prediction mode for a block, intra prediction unit 254 is also operable to provide intra prediction parameters to entropy encoding unit 270 , ie, providing an indication of the selected intra prediction mode for the block. Information. In one example, intra prediction unit 254 may be used to perform any combination of intra prediction techniques described below.

熵编码单元270用于将熵编码算法或方案(例如,可变长度编码(variable lengthcoding,VLC)方案、上下文自适应VLC(context adaptive VLC,CAVLC)方案、算术编码方案、上下文自适应二进制算术编码(context adaptive binary arithmetic coding,CABAC)、基于语法的上下文自适应二进制算术编码(syntax-based context-adaptive binaryarithmetic coding,SBAC)、概率区间分割熵(probability interval partitioningentropy,PIPE)编码或其它熵编码方法或技术)应用于经量化残差系数209、帧间预测参数、帧内预测参数和/或环路滤波器参数中的单个或所有上(或不应用),以获取可以通过输出272以例如经编码比特流21的形式输出的经编码图片数据21。可以将经编码比特流传输到视频解码器30,或将其存档稍后由视频解码器30传输或检索。熵编码单元270还可用于熵编码正被编码的当前视频条带的其它语法元素。The entropy coding unit 270 is used to apply an entropy coding algorithm or scheme (for example, a variable length coding (VLC) scheme, a context adaptive VLC (CAVLC) scheme, an arithmetic coding scheme, a context adaptive binary arithmetic coding (context adaptive binary arithmetic coding, CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding or other entropy coding methods, or technique) is applied (or not applied) to any or all of the quantized residual coefficients 209, the inter prediction parameters, the intra prediction parameters and/or the loop filter parameters to obtain a code that can be encoded via the output 272, for example. The encoded picture data 21 is output in the form of a bit stream 21. The encoded bitstream may be transmitted to video decoder 30 or archived for later transmission or retrieval by video decoder 30. Entropy encoding unit 270 may also be used to entropy encode other syntax elements of the current video slice being encoded.

视频编码器20的其它结构变型可用于编码视频流。例如,基于非变换的编码器20可以在没有针对某些块或帧的变换处理单元206的情况下直接量化残差信号。在另一实施方式中,编码器20可具有组合成单个单元的量化单元208和逆量化单元210。Other architectural variations of video encoder 20 may be used to encode video streams. For example, the non-transform based encoder 20 may directly quantize the residual signal without the transform processing unit 206 for certain blocks or frames. In another embodiment, encoder 20 may have quantization unit 208 and inverse quantization unit 210 combined into a single unit.

图3示出示例性视频解码器30,用于实现本申请的技术,即进行待解码块(当前块)的融合候选者列表构造以及基于构造的融合候选者列表进行压缩图像的解码。视频解码器30用于接收例如由编码器20编码的经编码图片数据(例如,经编码比特流)21,以获取经解码图片231。在解码过程期间,视频解码器30从视频编码器20接收视频数据,例如表示经编码视频条带的图片块的经编码视频比特流及相关联的语法元素。FIG. 3 illustrates an exemplary video decoder 30 for implementing the techniques of the present application, namely, fusion candidate list construction of a block to be decoded (current block) and decoding of a compressed image based on the constructed fusion candidate list. Video decoder 30 is configured to receive encoded picture data (eg, encoded bitstream) 21 , such as encoded by encoder 20 , to obtain decoded picture 231 . During the decoding process, video decoder 30 receives video data from video encoder 20, such as an encoded video bitstream representing picture blocks of an encoded video slice and associated syntax elements.

在图3的实例中,解码器30包括熵解码单元304、逆量化单元310、逆变换处理单元312、重构单元314(例如求和器314)、缓冲器316、环路滤波器320、经解码图片缓冲器330以及预测处理单元360。预测处理单元360可以包含帧间预测单元344、帧内预测单元354和模式选择单元362。在一些实例中,视频解码器30可执行大体上与参照图2的视频编码器20描述的编码遍次互逆的解码遍次。In the example of Figure 3, decoder 30 includes entropy decoding unit 304, inverse quantization unit 310, inverse transform processing unit 312, reconstruction unit 314 (eg, summer 314), buffer 316, loop filter 320, Decoded picture buffer 330 and prediction processing unit 360. Prediction processing unit 360 may include inter prediction unit 344, intra prediction unit 354, and mode selection unit 362. In some examples, video decoder 30 may perform a decoding pass that is generally reciprocal to the encoding pass described with reference to video encoder 20 of FIG. 2 .

熵解码单元304用于对经编码图片数据21执行熵解码,以获取例如经量化系数309和/或经解码的编码参数(图3中未示出),例如,帧间预测、帧内预测参数、环路滤波器参数和/或其它语法元素中(经解码)的任意一个或全部。熵解码单元304进一步用于将帧间预测参数、帧内预测参数和/或其它语法元素转发至预测处理单元360。视频解码器30可接收视频条带层级和/或视频块层级的语法元素。The entropy decoding unit 304 is configured to perform entropy decoding on the encoded picture data 21 to obtain, for example, quantized coefficients 309 and/or decoded encoding parameters (not shown in FIG. 3 ), such as inter prediction, intra prediction parameters. , loop filter parameters, and/or other syntax elements (decoded). Entropy decoding unit 304 is further configured to forward inter prediction parameters, intra prediction parameters, and/or other syntax elements to prediction processing unit 360 . Video decoder 30 may receive syntax elements at the video slice level and/or the video block level.

逆量化单元310功能上可与逆量化单元110相同,逆变换处理单元312功能上可与逆变换处理单元212相同,重构单元314功能上可与重构单元214相同,缓冲器316功能上可与缓冲器216相同,环路滤波器320功能上可与环路滤波器220相同,经解码图片缓冲器330功能上可与经解码图片缓冲器230相同。The inverse quantization unit 310 may be functionally the same as the inverse quantization unit 110 , the inverse transform processing unit 312 may be functionally the same as the inverse transform processing unit 212 , the reconstruction unit 314 may be functionally the same as the reconstruction unit 214 , and the buffer 316 may be functionally the same. Like buffer 216, loop filter 320 may be functionally identical to loop filter 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230.

预测处理单元360可以包括帧间预测单元344和帧内预测单元354,其中帧间预测单元344功能上可以类似于帧间预测单元244,帧内预测单元354功能上可以类似于帧内预测单元254。预测处理单元360通常用于执行块预测和/或从经编码数据21获取预测块365,以及从例如熵解码单元304(显式地或隐式地)接收或获取预测相关参数和/或关于所选择的预测模式的信息。Prediction processing unit 360 may include inter prediction unit 344 , which may be functionally similar to inter prediction unit 244 , and intra prediction unit 354 , which may be functionally similar to intra prediction unit 254 . Prediction processing unit 360 is generally operable to perform block predictions and/or obtain prediction blocks 365 from encoded data 21 , and to receive or obtain prediction-related parameters and/or information about the prediction blocks 365 from, for example, entropy decoding unit 304 (explicitly or implicitly). Information about the selected prediction mode.

当视频条带经编码为经帧内编码(I)条带时,预测处理单元360的帧内预测单元354用于基于信号表示的帧内预测模式及来自当前帧或图片的先前经解码块的数据来产生用于当前视频条带的图片块的预测块365。当视频帧经编码为经帧间编码(即B或P)条带时,预测处理单元360的帧间预测单元344(例如,运动补偿单元)用于基于运动向量及从熵解码单元304接收的其它语法元素生成用于当前视频条带的视频块的预测块365。对于帧间预测,可从一个参考图片列表内的一个参考图片中产生预测块。视频解码器30可基于存储于DPB 330中的参考图片,使用默认建构技术来建构参考帧列表:列表0和列表1。When a video slice is encoded as an intra-coded (I) slice, intra-prediction unit 354 of prediction processing unit 360 is used to represent an intra-prediction mode based on the signal and a previously decoded block from the current frame or picture. data to generate prediction blocks 365 for the picture blocks of the current video slice. When a video frame is encoded as an inter-coded (i.e., B or P) slice, inter prediction unit 344 (eg, motion compensation unit) of prediction processing unit 360 operates based on the motion vectors and the motion vectors received from entropy decoding unit 304 Other syntax elements generate prediction blocks 365 for the video blocks of the current video slice. For inter prediction, the prediction block can be generated from a reference picture within a reference picture list. Video decoder 30 may construct the reference frame lists: List 0 and List 1 based on the reference pictures stored in DPB 330 using default construction techniques.

预测处理单元360用于通过解析运动向量和其它语法元素,确定用于当前视频条带的视频块的预测信息,并使用预测信息产生用于正经解码的当前视频块的预测块。例如,预测处理单元360使用接收到的一些语法元素确定用于编码视频条带的视频块的预测模式(例如,帧内或帧间预测)、帧间预测条带类型(例如,B条带、P条带或GPB条带)、用于条带的参考图片列表中的一个或多个的建构信息、用于条带的每个经帧间编码视频块的运动向量、条带的每个经帧间编码视频块的帧间预测状态以及其它信息,以解码当前视频条带的视频块。Prediction processing unit 360 is configured to determine prediction information for the video block of the current video slice by parsing the motion vectors and other syntax elements, and use the prediction information to generate prediction blocks for the current video block being decoded. For example, prediction processing unit 360 uses some of the received syntax elements to determine a prediction mode (eg, intra or inter prediction), an inter prediction slice type (eg, B slice, B slice, P slice or GPB slice), construction information for one or more of the reference picture lists for the slice, motion vectors for each inter-coded video block of the slice, each inter-coded video block of the slice The inter prediction state and other information of inter-encoded video blocks are used to decode the video blocks of the current video slice.

逆量化单元310可用于逆量化(即,反量化)在比特流中提供且由熵解码单元304解码的经量化变换系数。逆量化过程可包含使用由视频编码器20针对视频条带中的每一视频块所计算的量化参数来确定应该应用的量化程度并同样确定应该应用的逆量化程度。Inverse quantization unit 310 may be used to inversely quantize (ie, inversely quantize) the quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304 . The inverse quantization process may include using quantization parameters calculated by video encoder 20 for each video block in the video slice to determine the degree of quantization that should be applied and likewise determine the degree of inverse quantization that should be applied.

逆变换处理单元312用于将逆变换(例如,逆DCT、逆整数变换或概念上类似的逆变换过程)应用于变换系数,以便在像素域中产生残差块。The inverse transform processing unit 312 is configured to apply an inverse transform (eg, inverse DCT, inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to generate a residual block in the pixel domain.

重构单元314(例如,求和器314)用于将逆变换块313(即经重构残差块313)添加到预测块365,以在样本域中获取经重构块315,例如通过将经重构残差块313的样本值与预测块365的样本值相加。Reconstruction unit 314 (eg, summer 314) is used to add inverse transform block 313 (ie, reconstructed residual block 313) to prediction block 365 to obtain reconstructed block 315 in the sample domain, e.g., by The sample values of reconstructed residual block 313 are added to the sample values of prediction block 365 .

环路滤波器单元320(在编码循环期间或在编码循环之后)用于对经重构块315进行滤波以获取经滤波块321,从而顺利进行像素转变或提高视频质量。环路滤波器单元320旨在表示一个或多个环路滤波器,例如去块滤波器、样本自适应偏移(sample-adaptiveoffset,SAO)滤波器或其它滤波器,例如双边滤波器、自适应环路滤波器(adaptive loopfilter,ALF),或锐化或平滑滤波器,或协同滤波器。尽管环路滤波器单元320在图3中示出为环内滤波器,但在其它配置中,环路滤波器单元320可实施为环后滤波器。The loop filter unit 320 (during or after the encoding loop) is used to filter the reconstructed block 315 to obtain the filtered block 321, thereby smoothing the pixel conversion or improving the video quality. Loop filter unit 320 is intended to represent one or more loop filters, such as deblocking filters, sample-adaptive offset (SAO) filters, or other filters, such as bilateral filters, adaptive Adaptive loop filter (ALF), or sharpening or smoothing filter, or collaborative filter. Although loop filter unit 320 is shown in FIG. 3 as an in-loop filter, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.

随后将给定帧或图片中的经解码视频块321存储在存储用于后续运动补偿的参考图片的经解码图片缓冲器330中。The decoded video blocks 321 in a given frame or picture are then stored in a decoded picture buffer 330 that stores reference pictures for subsequent motion compensation.

解码器30用于例如,藉由输出332输出经解码图片31,以向用户呈现或供用户查看。The decoder 30 is configured to output the decoded picture 31 , for example via an output 332 , for presentation to or viewing by a user.

视频解码器30的其它变型可用于对压缩的比特流进行解码。例如,解码器30可以在没有环路滤波器单元320的情况下生成输出视频流。例如,基于非变换的解码器30可以在没有针对某些块或帧的逆变换处理单元312的情况下直接逆量化残差信号。在另一实施方式中,视频解码器30可以具有组合成单个单元的逆量化单元310和逆变换处理单元312。Other variations of video decoder 30 may be used to decode compressed bitstreams. For example, decoder 30 may generate the output video stream without loop filter unit 320. For example, the non-transform based decoder 30 may directly inverse-quantize the residual signal without the inverse-transform processing unit 312 for certain blocks or frames. In another embodiment, video decoder 30 may have inverse quantization unit 310 and inverse transform processing unit 312 combined into a single unit.

图4是根据一示例性实施例的包含图2的编码器20和/或图3的解码器30的视频编码系统40的实例的说明图。系统40可以实现本申请的技术,用于基于本发明提出的融合候选者构造方法来构建当前块的融合候选者列表,并基于所述的融合候选者列表进行图像的编码或者解码。在所说明的实施方式中,视频编码系统40可以包含成像设备41、视频编码器20、视频解码器30(和/或藉由处理单元46的逻辑电路47实施的视频编码器)、天线42、一个或多个处理器43、一个或多个存储器44和/或显示设备45。FIG. 4 is an illustration of an example of a video encoding system 40 including the encoder 20 of FIG. 2 and/or the decoder 30 of FIG. 3 according to an exemplary embodiment. The system 40 can implement the technology of the present application, and is used to construct a fusion candidate list of the current block based on the fusion candidate construction method proposed by the present invention, and perform image encoding or decoding based on the fusion candidate list. In the illustrated embodiment, video encoding system 40 may include imaging device 41, video encoder 20, video decoder 30 (and/or a video encoder implemented by logic circuitry 47 of processing unit 46), antenna 42, One or more processors 43, one or more memories 44 and/or display devices 45.

如图所示,成像设备41、天线42、处理单元46、逻辑电路47、视频编码器20、视频解码器30、处理器43、存储器44和/或显示设备45能够互相通信。如所论述,虽然用视频编码器20和视频解码器30显示视频编码系统40,但在不同实例中,视频编码系统40可以只包含视频编码器20或只包含视频解码器30。As shown, imaging device 41, antenna 42, processing unit 46, logic circuit 47, video encoder 20, video decoder 30, processor 43, memory 44 and/or display device 45 are capable of communicating with each other. As discussed, although video encoding system 40 is shown with video encoder 20 and video decoder 30 , in different examples, video encoding system 40 may include only video encoder 20 or only video decoder 30 .

在一些实例中,如图所示,视频编码系统40可以包含天线42。例如,天线42可以用于传输或接收视频数据的经编码比特流。另外,在一些实例中,视频编码系统40可以包含显示设备45。显示设备45可以用于呈现视频数据。在一些实例中,如图所示,逻辑电路47可以通过处理单元46实施。处理单元46可以包含专用集成电路(application-specificintegrated circuit,ASIC)逻辑、图形处理器、通用处理器等。视频编码系统40也可以包含可选处理器43,该可选处理器43类似地可以包含专用集成电路(application-specificintegrated circuit,ASIC)逻辑、图形处理器、通用处理器等。在一些实例中,逻辑电路47可以通过硬件实施,如视频编码专用硬件等,处理器43可以通过通用软件、操作系统等实施。另外,存储器44可以是任何类型的存储器,例如易失性存储器(例如,静态随机存取存储器(Static Random Access Memory,SRAM)、动态随机存储器(Dynamic Random AccessMemory,DRAM)等)或非易失性存储器(例如,闪存等)等。在非限制性实例中,存储器44可以由超速缓存内存实施。在一些实例中,逻辑电路47可以访问存储器44(例如用于实施图像缓冲器)。在其它实例中,逻辑电路47和/或处理单元46可以包含存储器(例如,缓存等)用于实施图像缓冲器等。In some examples, video encoding system 40 may include antenna 42 as shown. For example, antenna 42 may be used to transmit or receive an encoded bitstream of video data. Additionally, in some examples, video encoding system 40 may include display device 45. Display device 45 may be used to present video data. In some examples, logic circuitry 47 may be implemented by processing unit 46 as shown. The processing unit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, or the like. Video encoding system 40 may also include an optional processor 43, which may similarly include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, or the like. In some examples, the logic circuit 47 can be implemented by hardware, such as video encoding dedicated hardware, etc., and the processor 43 can be implemented by general software, operating system, etc. In addition, the memory 44 may be any type of memory, such as volatile memory (eg, static random access memory (Static Random Access Memory, SRAM), dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.) or non-volatile memory. memory (e.g., flash memory, etc.), etc. In a non-limiting example, memory 44 may be implemented by cache memory. In some examples, logic circuitry 47 may access memory 44 (eg, for implementing an image buffer). In other examples, logic circuitry 47 and/or processing unit 46 may include memory (eg, cache, etc.) for implementing image buffers, etc.

在一些实例中,通过逻辑电路实施的视频编码器20可以包含(例如,通过处理单元46或存储器44实施的)图像缓冲器和(例如,通过处理单元46实施的)图形处理单元。图形处理单元可以通信耦合至图像缓冲器。图形处理单元可以包含通过逻辑电路47实施的视频编码器20,以实施参照图2和/或本文中所描述的任何其它编码器系统或子系统所论述的各种模块。逻辑电路可以用于执行本文所论述的各种操作。In some examples, video encoder 20 implemented by logic circuitry may include an image buffer (eg, implemented by processing unit 46 or memory 44) and a graphics processing unit (eg, implemented by processing unit 46). A graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video encoder 20 implemented with logic circuitry 47 to implement the various modules discussed with respect to FIG. 2 and/or any other encoder system or subsystem described herein. Logic circuits can be used to perform the various operations discussed herein.

视频解码器30可以以类似方式通过逻辑电路47实施,以实施参照图3的解码器30和/或本文中所描述的任何其它解码器系统或子系统所论述的各种模块。在一些实例中,逻辑电路实施的视频解码器30可以包含(通过处理单元2820或存储器44实施的)图像缓冲器和(例如,通过处理单元46实施的)图形处理单元。图形处理单元可以通信耦合至图像缓冲器。图形处理单元可以包含通过逻辑电路47实施的视频解码器30,以实施参照图3和/或本文中所描述的任何其它解码器系统或子系统所论述的各种模块。Video decoder 30 may be implemented in a similar manner with logic circuitry 47 to implement the various modules discussed with respect to decoder 30 of FIG. 3 and/or any other decoder system or subsystem described herein. In some examples, logic circuitry implemented video decoder 30 may include an image buffer (implemented by processing unit 2820 or memory 44) and a graphics processing unit (eg, implemented by processing unit 46). A graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video decoder 30 implemented with logic circuitry 47 to implement the various modules discussed with reference to FIG. 3 and/or any other decoder system or subsystem described herein.

在一些实例中,视频编码系统40的天线42可以用于接收视频数据的经编码比特流。如所论述,经编码比特流可以包含本文所论述的与编码视频帧相关的数据、指示符、索引值、模式选择数据等,例如与编码分割相关的数据(例如,变换系数或经量化变换系数,(如所论述的)可选指示符,和/或定义编码分割的数据)。视频编码系统40还可包含耦合至天线42并用于解码经编码比特流的视频解码器30。显示设备45用于呈现视频帧。In some examples, antenna 42 of video encoding system 40 may be used to receive an encoded bitstream of video data. As discussed, the encoded bitstream may include data related to encoded video frames, indicators, index values, mode selection data, etc., as discussed herein, such as data related to encoded partitions (e.g., transform coefficients or quantized transform coefficients , optional indicators (as discussed, and/or data defining encoding splits). Video encoding system 40 may also include video decoder 30 coupled to antenna 42 and for decoding the encoded bitstream. Display device 45 is used to present video frames.

图5是根据一示例性实施例的可用作图1中的源设备12和目的地设备14中的任一个或两个的装置500的简化框图。装置500可以实现本申请的技术,用于进行融合候选者列表的构造以及基于该构造的融合候选者列表进行图像的编码或者解码。装置500可以采用包含多个计算设备的计算系统的形式,或采用例如移动电话、平板计算机、膝上型计算机、笔记本电脑、台式计算机等单个计算设备的形式。FIG. 5 is a simplified block diagram of an apparatus 500 operable as either or both source device 12 and destination device 14 in FIG. 1 , according to an exemplary embodiment. The device 500 can implement the technology of the present application, and is used to construct a fusion candidate list and perform image encoding or decoding based on the constructed fusion candidate list. Apparatus 500 may take the form of a computing system including multiple computing devices, or a single computing device such as a mobile phone, tablet computer, laptop computer, notebook computer, desktop computer, or the like.

装置500中的处理器502可以为中央处理器。或者,处理器502可以为现有的或今后将研发出的能够操控或处理信息的任何其它类型的设备或多个设备。如图所示,虽然可以使用例如处理器502的单个处理器实践所揭示的实施方式,但是使用一个以上处理器可以实现速度和效率方面的优势。The processor 502 in the device 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device or devices that is currently available or may be developed in the future that is capable of manipulating or processing information. As shown, although the disclosed embodiments may be practiced using a single processor, such as processor 502, speed and efficiency advantages may be realized using more than one processor.

在一实施方式中,装置500中的存储器504可以为只读存储器(Read Only Memory,ROM)设备或随机存取存储器(random access memory,RAM)设备。任何其他合适类型的存储设备都可以用作存储器504。存储器504可以包括代码和由处理器502使用总线512访问的数据506。存储器504可进一步包括操作系统508和应用程序510,应用程序510包含至少一个准许处理器502执行本文所描述的方法的程序。例如,应用程序510可以包括应用1到N,应用1到N进一步包括执行本文所描述的融合候选者列表构造的视频编码应用。装置500还可包含采用从存储器514形式的附加存储器,该从存储器514例如可以为与移动计算设备一起使用的存储卡。因为视频通信会话可能含有大量信息,这些信息可以整体或部分存储在从存储器514中,并按需要加载到存储器504用于处理。In one implementation, the memory 504 in the device 500 may be a read only memory (Read Only Memory, ROM) device or a random access memory (random access memory, RAM) device. Any other suitable type of storage device may be used as memory 504. Memory 504 may include code and data 506 accessed by processor 502 using bus 512 . Memory 504 may further include an operating system 508 and application programs 510 including at least one program that permits processor 502 to perform the methods described herein. For example, applications 510 may include Applications 1 through N, which further include a video encoding application that performs fusion candidate list construction as described herein. Apparatus 500 may also include additional memory in the form of slave memory 514, which may be, for example, a memory card for use with a mobile computing device. Because a video communication session may contain a large amount of information, this information may be stored in whole or in part in slave memory 514 and loaded into memory 504 for processing as needed.

装置500还可包含一或多个输出设备,例如显示器518。在一个实例中,显示器518可以为将显示器和可操作以感测触摸输入的触敏元件组合的触敏显示器。显示器518可以通过总线512耦合于处理器502。除了显示器518还可以提供其它准许用户对装置500编程或以其它方式使用装置500的输出设备,或提供其它输出设备作为显示器518的替代方案。当输出设备是显示器或包含显示器时,显示器可以以不同方式实现,包含通过液晶显示器(liquid crystal display,LCD)、阴极射线管(cathode-ray tube,CRT)显示器、等离子显示器或发光二极管(light emitting diode,LED)显示器,如有机LED(organic LED,OLED)显示器。Device 500 may also include one or more output devices, such as display 518. In one example, display 518 may be a touch-sensitive display that combines a display and a touch-sensitive element operable to sense touch input. Display 518 may be coupled to processor 502 via bus 512 . Other output devices may be provided in addition to display 518 or as an alternative to display 518 to permit a user to program or otherwise use device 500 . When the output device is or includes a display, the display may be implemented in different ways, including through a liquid crystal display (LCD), a cathode-ray tube (CRT) display, a plasma display, or a light emitting diode (light emitting diode). diode, LED) display, such as organic LED (organic LED, OLED) display.

装置500还可包含图像感测设备520或与其连通,图像感测设备520例如为相机或为现有的或今后将研发出的可以感测图像的任何其它图像感测设备520,所述图像例如为运行装置500的用户的图像。图像感测设备520可以放置为直接面向运行装置500的用户。在一实例中,可以配置图像感测设备520的位置和光轴以使其视野包含紧邻显示器518的区域且从该区域可见显示器518。The apparatus 500 may also include or be connected to an image sensing device 520, such as a camera or any other image sensing device 520 existing or to be developed in the future that can sense an image, such as is an image of a user running device 500. Image sensing device 520 may be placed directly facing the user running device 500 . In one example, the position and optical axis of image sensing device 520 may be configured so that its field of view includes an area immediately adjacent to display 518 and from which display 518 is visible.

装置500还可包含声音感测设备522或与其连通,声音感测设备522例如为麦克风或为现有的或今后将研发出的可以感测装置500附近的声音的任何其它声音感测设备。声音感测设备522可以放置为直接面向运行装置500的用户,并可以用于接收用户在运行装置500时发出的声音,例如语音或其它发声。The device 500 may also include or be connected to a sound sensing device 522 , such as a microphone or any other sound sensing device that is existing or will be developed in the future and can sense sounds near the device 500 . The sound sensing device 522 may be placed directly facing the user operating the device 500 and may be used to receive sounds, such as speech or other vocalizations, emitted by the user while operating the device 500 .

虽然图5中将装置500的处理器502和存储器504显示为集成在单个单元中,但是还可以使用其它配置。处理器502的运行可以分布在多个可直接耦合的机器中(每个机器具有一个或多个处理器),或分布在本地区域或其它网络中。存储器504可以分布在多个机器中,例如基于网络的存储器或多个运行装置500的机器中的存储器。虽然此处只显示单个总线,但装置500的总线512可以由多个总线形成。进一步地,从存储器514可以直接耦合至装置500的其它组件或可以通过网络访问,并且可包括单个集成单元,例如一个存储卡,或多个单元,例如多个存储卡。因此,可以以多种配置实施装置500。Although the processor 502 and memory 504 of the device 500 are shown in Figure 5 as being integrated in a single unit, other configurations may be used. Operation of processor 502 may be distributed among multiple directly coupled machines (each machine having one or more processors), or distributed over a local area or other network. The memory 504 may be distributed among multiple machines, such as network-based memory or memory among multiple machines running the apparatus 500 . Although only a single bus is shown here, bus 512 of device 500 may be formed from multiple buses. Further, slave memory 514 may be directly coupled to other components of device 500 or accessible through a network, and may comprise a single integrated unit, such as a memory card, or multiple units, such as multiple memory cards. Accordingly, apparatus 500 may be implemented in a variety of configurations.

图11是由根据图1中所示视频编码器20以及视频解码器30实现本发明一实施例中融合候选者列表构造方法的实例操作的流程图。视频编码器20或者视频解码器30的一个或多个功能单元包含预测处理单元260/360,可以用于执行图11的方法。在图11的实例中提出一种改进历史候选运动信息列表的更新方法,该方法应用与帧间预测中,允许在CTU(编码树)级别对于历史候选运动信息列表进行重构,在不增加额外存储区域和具有相当的编码效率的同时,更有利于设计行级以及CTU级的编解码并行,该方法能够保证在帧间编码过程中基本不损失编码质量时,极大的降低编解码时间。该候选者列表的帧间预测方法参考图11包括:FIG. 11 is a flowchart of an example operation of a method for constructing a fusion candidate list according to an embodiment of the present invention implemented by the video encoder 20 and the video decoder 30 shown in FIG. 1 . One or more functional units of video encoder 20 or video decoder 30 include prediction processing units 260/360, which may be used to perform the method of Figure 11. In the example of Figure 11, an update method for improving the historical candidate motion information list is proposed. This method is applied to inter-frame prediction and allows the reconstruction of the historical candidate motion information list at the CTU (coding tree) level without adding additional While the storage area has considerable coding efficiency, it is more conducive to designing row-level and CTU-level encoding and decoding parallelism. This method can greatly reduce encoding and decoding time while ensuring that the encoding quality is basically not lost during the inter-frame encoding process. The inter prediction method of the candidate list includes:

S1101初始化与当前编码树单元对应的历史候选运动信息列表;S1101 initializes the historical candidate motion information list corresponding to the current coding tree unit;

其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,其所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;Wherein, the historical candidate motion information list includes N storage spaces, the N storage spaces are used to store historical candidate motion information, the initialized historical candidate motion information list includes at least M vacant storage spaces, and the M≤N, M and N are integers, the current coding tree unit is included in a coding tree unit set (Slice) composed of multiple coding tree units, and the current coding tree unit is not in the coding tree unit set. First in a predetermined processing sequence;

S1103按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,M≤L≤N,所述空域相邻块内L个位置根据预设的规则得到;S1103 Add the motion information at L positions in the spatial adjacent blocks of the current coding tree unit to the historical candidate motion information list in a predetermined order, where M≤L≤N, the spatial adjacent blocks The inner L positions are obtained according to the preset rules;

S1105构建所述当前编码树单元的当前候选运动信息列表或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;以及S1105 constructs a current candidate motion information list of the current coding tree unit or a current candidate motion information list of the current coding unit, wherein the coding unit is divided by the coding tree unit; and

S1107根据所述当前编码树单元的当前候选运动信息列表和所述历史候选运动信息列表的组合或者当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合,对所述当前编码树单元或者当前编码单元进行帧间预测。S1107 Code the current encoding according to the combination of the current candidate motion information list of the current coding tree unit and the historical candidate motion information list or the combination of the current candidate motion information list of the current coding unit and the historical candidate motion information list. The tree unit or the current coding unit performs inter prediction.

该方法中,在进行当前编码树单元的编码过程中,对历史候选运动信息列表进行初始化操作,即,将构建与当前编码树单元对应的独立的历史候选运动信息列表,从而切断编码树单元编码过程中由于构建历史候选运动信息列表而造成的依赖关系,以使得编码树单元可以根据自己的历史候选运动信息列表进行独立的编码,在具有相当的编码效率的同时,更有利于设计行级以及CTU级的编解码并行,通过并行处理,能够在保证编码质量基本不受损失的情况下,极大的降低编解码时间。In this method, during the coding process of the current coding tree unit, the historical candidate motion information list is initialized, that is, an independent historical candidate motion information list corresponding to the current coding tree unit is constructed, thereby cutting off the coding of the coding tree unit. The dependency relationship caused by constructing the historical candidate motion information list during the process allows the coding tree unit to independently encode according to its own historical candidate motion information list. While having considerable coding efficiency, it is more conducive to the design of row-level and CTU-level encoding and decoding parallelism, through parallel processing, can greatly reduce encoding and decoding time without basically losing the encoding quality.

可选地,所述初始化与当前编码树单元对应的历史候选运动信息列表包括,清空所述历史候选运动信息列表,使得M=N,该方式使得当前编码树单元可以构建全新的历史候选运动信息列表,以增加帧间预测的准确性。Optionally, the initializing the historical candidate motion information list corresponding to the current coding tree unit includes clearing the historical candidate motion information list so that M=N. This method allows the current coding tree unit to construct brand new historical candidate motion information. list to increase the accuracy of inter prediction.

可选地,所述空域相邻块内M个位置为,从所述空域相邻块内预设位置获取第一个候选运动信息,以获取所述第一个候选运动信息的位置为起点,以预设的步长为间隔获取剩余的M-1个候选运动信息。在构建所述历史候选运动信息列表过程中为了能够和现有的历史候选运动信息列表构建方式统一并具有较为简化的算法,所述M个位置处的运动矢量通常是从一个起点位置以预设的间隔依次获取M个位置处的运动矢量,其中所述预设的间隔也可以称之为步长,该步长可以是固定的,例如,采用4个或者8个像素为单位;此外,所述步长也可以是变化的,例如,根据当前编码树单元的大小来设置不同的步长。所述M位置的运动信息/运动矢量的添加顺序可是预设的顺序,例如,按照顺时针的顺序,以所述当前编码树单元的左下角的空域相邻块为起点,以所述当前编码树单元右上角的空域相邻块为终点,将所述空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中。Optionally, the M positions in the spatial adjacent block are to obtain the first candidate motion information from the preset positions in the spatial adjacent block, with the position where the first candidate motion information is obtained as the starting point, The remaining M-1 candidate motion information is obtained at preset step intervals. In the process of constructing the historical candidate motion information list, in order to be consistent with the existing historical candidate motion information list construction method and have a relatively simplified algorithm, the motion vectors at the M positions are usually calculated from a starting position to a preset The motion vectors at M positions are obtained sequentially at intervals, where the preset interval can also be called a step size, and the step size can be fixed, for example, using 4 or 8 pixels as a unit; in addition, the The step size can also be changed, for example, different step sizes are set according to the size of the current coding tree unit. The order in which the motion information/motion vector of the M position is added may be a preset order, for example, in clockwise order, starting from the spatial adjacent block in the lower left corner of the current coding tree unit, starting from the current coding The spatial adjacent block in the upper right corner of the tree unit is the end point, and the motion information at L positions within the spatial adjacent block is added to the historical candidate motion information list.

可选地,根据所述当前编码树单元的当前候选运动信息列表和所述历史候选运动信息列表的组合或者当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合,对所述当前编码树单元或者当前编码单元进行帧间预测之前,该方法还可以将所述当前编码树单元的当前候选运动信息列表和所述历史候选运动信息列表的组合进行组合或者将当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表进行组合,其具体可以是:将所述历史候选运动信息加入所述当前编码树单元的当前候选运动信息列表或者前编码单元的当前候选运动信息列表中,然后基于所述当前编码树单元的当前候选运动信息列表或者前编码单元的当前候选运动信息列表中,进行所述的帧间预测。Optionally, the current candidate motion information list of the current coding tree unit and the historical candidate motion information list are combined, or the current candidate motion information list of the current coding unit and the historical candidate motion information list are combined. Before the current coding tree unit or the current coding unit performs inter-frame prediction, the method may also combine the current candidate motion information list of the current coding tree unit and the historical candidate motion information list or combine the current candidate motion information list of the current coding unit. The current candidate motion information list and the historical candidate motion information list are combined, which may specifically include: adding the historical candidate motion information to the current candidate motion information list of the current coding tree unit or the current candidate motion information of the previous coding unit. In the list, the inter-frame prediction is then performed based on the current candidate motion information list of the current coding tree unit or the current candidate motion information list of the previous coding unit.

若当前的编码树单元还需要进一步划分为编码单元进行编码的情况下,所述的方法还可以包括:根据所述当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合获取所述当前编码单元的运动信息,并根据所获取的运动信息对所述当前编码单元进行帧间预测;以及基于所述当前编码单元运动信息更新所述历史候选运动信息列表。该方法可以使得当前编码树单元对应的历史候选运动信息列表能够持续的获得更新,以提高帧间预测的准确性。可选地,上述的对历史候选运动信息列表的跟新可以分为两种情况,即,若所述M个位置并未填满,则将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表内所述M个位置中距离N-M位置最近的空置的存储空间内;或者;若所述M个位置已填满,则按照先入先出的原则将最早加入所述历史候选运动信息列表内的历史运动信息移除,并将剩余历史运动信息超被移除的历史运动信息位置移位后将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表的尾部,其中,所述历史候选运动信息列表中包含最新加入的历史运动信息的一端为所述历史候选运动信息列表的尾部。该方法提供的历史候选运动信息列表应用的灵活性,即,历史候选运动信息列表在不完全填满的时候也可以用于当前块的帧间预测,而在历史候选运动信息列表填满的情况下,当前编码块的运动信息/运动矢量依然可以用于更新所述历史候选运动信息列表。当然,在历史候选运动信息列表填满的情况下,当前编码块的运动信息/运动矢量依然可以不再对所述历史候选运动信息列表更新,即,若所述M个位置并未填满,则将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表内所述M个位置中距离N-M位置最近的空置的存储空间内;若所述M个位置并已填满,则基于所述当前候选运动信息列表对下一个编码单元进行帧间预测处理。这种处理方式可以允许在当前编码树单元内的编码块的并行处理,具体地可以是,基于与所述当前编码单元相同的方法对另一编码单元进行帧间预测,其中,所述另一个编码单元按照预设处理顺序位于所述当前编码单元之后且与所述当前编码单元属于所述编码树单元,所述另一编码单元的帧间预测所采用的历史运动信息列表包括所述当前编码单元的帧间预测所采用的历史运动信息列表中的历史运动信息。If the current coding tree unit needs to be further divided into coding units for coding, the method may also include: obtaining based on a combination of the current candidate motion information list of the current coding unit and the historical candidate motion information list. motion information of the current coding unit, and perform inter-frame prediction on the current coding unit according to the acquired motion information; and update the historical candidate motion information list based on the motion information of the current coding unit. This method can enable the historical candidate motion information list corresponding to the current coding tree unit to be continuously updated to improve the accuracy of inter-frame prediction. Optionally, the above-mentioned updating of the historical candidate motion information list can be divided into two situations, that is, if the M positions are not filled, the current coding unit motion information is added to all the historical motion information as historical motion information. In the vacant storage space closest to the N-M position among the M positions in the historical candidate motion information list; or if the M positions are filled, the earliest candidate will be added to the historical candidate according to the first-in, first-out principle. Remove the historical motion information in the motion information list, shift the remaining historical motion information beyond the removed historical motion information, and then add the current coding unit motion information as historical motion information to the historical candidate motion information list. Tail, wherein the end of the historical candidate motion information list containing the latest added historical motion information is the tail of the historical candidate motion information list. This method provides flexibility in the application of the historical candidate motion information list, that is, the historical candidate motion information list can also be used for inter-frame prediction of the current block when it is not completely filled, and when the historical candidate motion information list is full, Under this condition, the motion information/motion vector of the current coding block can still be used to update the historical candidate motion information list. Of course, when the historical candidate motion information list is filled, the motion information/motion vector of the current coding block may still no longer be updated on the historical candidate motion information list. That is, if the M positions are not filled, Then add the current coding unit motion information as historical motion information to the vacant storage space closest to the N-M position among the M positions in the historical candidate motion information list; if the M positions have been filled, Then perform inter prediction processing on the next coding unit based on the current candidate motion information list. This processing method may allow parallel processing of coding blocks within the current coding tree unit. Specifically, it may be to perform inter prediction on another coding unit based on the same method as the current coding unit, wherein the other coding unit The coding unit is located after the current coding unit in a preset processing order and belongs to the coding tree unit with the current coding unit. The historical motion information list used in inter prediction of another coding unit includes the current coding unit. The historical motion information in the historical motion information list used for the unit's inter prediction.

发明方案允许在CTU(编码树)级别对于历史候选运动信息列表进行重构,在具有相当的编码效率的同时,更有利于设计行级以及CTU级的编解码并行,该方法能够保证在帧间编码过程中基本不损失编码质量时,极大的降低编解码时间。The inventive solution allows the reconstruction of the historical candidate motion information list at the CTU (coding tree) level. While having considerable coding efficiency, it is more conducive to designing row-level and CTU-level encoding and decoding parallelism. This method can ensure that inter-frame When encoding quality is basically not lost during the encoding process, encoding and decoding time is greatly reduced.

以下为本发明帧间预测方法的具体实施的示例:The following are examples of specific implementations of the inter-frame prediction method of the present invention:

实施例一:Example 1:

在开始编码当前的编码树单元时,将历史候选运动信息列表初始化;When starting to encode the current coding tree unit, initialize the historical candidate motion information list;

历史候选运动信息列表的初始化过程可以参考现有技术,例如,该过程可采用与JVET-K0104提案相同的方法进行(即在片(SLICE)开始的时候,将历史候选运动信息列表清空),也可采用其他历史候选运动信息列表的初始化方法,本发明不作限定;而在本实施例中,所述的初始化为将所述历史候选运动信息列表清空。所述的编码树单元为编码过程中可以基于该单元决定预测模式的待处理图像块,其可以进一步划分也可以不划分,其定义与HEVC和VVC中编码树单元的定义一致,在H.264中为宏块(macroblock)。下文中均用编码树单元,如果该编码树单元进一步划分,则会形成多个编码单元,因此,在这种情况下,所述编码树单元也可以理解为编码单元组合。The initialization process of the historical candidate motion information list can refer to the existing technology. For example, the process can be carried out using the same method as the JVET-K0104 proposal (that is, at the beginning of the slice (SLICE), the historical candidate motion information list is cleared), or Other initialization methods of the historical candidate motion information list may be used, and the present invention is not limited thereto; but in this embodiment, the initialization is to clear the historical candidate motion information list. The coding tree unit is an image block to be processed based on which the prediction mode can be determined during the encoding process. It may or may not be further divided. Its definition is consistent with the definition of the coding tree unit in HEVC and VVC. In H.264 In the middle is a macroblock. Coding tree units are used below. If the coding tree unit is further divided, multiple coding units will be formed. Therefore, in this case, the coding tree unit can also be understood as a coding unit combination.

接着,将当前编码树单元的空域相邻块的运动信息加入到历史候选运动信息列表中。Then, the motion information of the spatial adjacent blocks of the current coding tree unit is added to the historical candidate motion information list.

空域相邻图像块的运动信息包含左侧空域相邻图像块的运动信息(A,An)和上方空域相邻图像块的运动信息(B,Bn,C),如图10所示。图10中的Bn和An为从所有上方和左侧相邻已编/解码图像块中,以预定规则抽取的运动信息。其中,预定规则可以是以固定间隔M和N抽取(M和N为大于0的正整数),间隔M适用于左侧相邻图像块内的运动信息的提取,间隔N适用于上侧相邻图像块内的运动信息的提取,也可以使用其他抽取的预定规则方式,本发明不涉及具体抽取的预定规则方式。以上所述的相邻的图像块优选的指与当前编码树单元位于相同的SLICE中的图像块。The motion information of the adjacent image blocks in the spatial domain includes the motion information of the adjacent image blocks in the left spatial domain (A, An) and the motion information of the adjacent image blocks in the upper spatial domain (B, Bn, C), as shown in Figure 10. Bn and An in Figure 10 are motion information extracted according to predetermined rules from all upper and left adjacent encoded/decoded image blocks. Among them, the predetermined rule may be to extract at fixed intervals M and N (M and N are positive integers greater than 0), the interval M is suitable for extracting motion information in the adjacent image blocks on the left, and the interval N is suitable for the upper adjacent image blocks. Other extraction predetermined rule methods can also be used to extract motion information within image blocks. The present invention does not involve specific extraction predetermined rule methods. The above-mentioned adjacent image blocks preferably refer to image blocks located in the same SLICE as the current coding tree unit.

如果在遍历完所述空域相邻图像块之后历史候选运动信息列表并没有填满的情况下、或者若当前编码树单元位于一帧图像最上侧,或者若当前编码树单元位于一帧图像的最左则,可以参考如下任意一种方法来处理历史候选运动信息列表中没有填满的部分。If the historical candidate motion information list is not filled up after traversing the spatial adjacent image blocks, or if the current coding tree unit is located at the top of a frame of image, or if the current coding tree unit is located at the top of a frame of image On the other hand, you can refer to any of the following methods to deal with the unfilled parts of the historical candidate motion information list.

方法一:method one:

不再填充任何其他来源的运动信息,在编解码当前编码树单元内的当前编码单元时所获取的当前编码单元的运动信息作为所述历史候选运动信息加入到所述历史候选运动信息列表中。Without filling in any other source of motion information, the motion information of the current coding unit acquired when encoding and decoding the current coding unit in the current coding tree unit is added to the historical candidate motion information list as the historical candidate motion information.

方法二:Method Two:

填充当前编码树单元空域预设非临近位置的编码块的运动信息。预设非临近位置可以是与临近位置固定间隔,也可以是预设模板。Fill the motion information of the coding block at a preset non-nearby position in the spatial domain of the current coding tree unit. The preset non-adjacent location can be a fixed interval from the adjacent location, or it can be a preset template.

方法三:Method three:

填充来自于参考帧中,当前编码树单元对应位置和当前编码树单元临近编码块对应位置中预设位置的编码块时域运动信息。当前编码树单元对应位置中的预设位置可以是固定间隔抽取,也可以是以特定规则或顺序抽取。当前编码树单元临近编码块对应位置中预设位置可以是一特定规则特定顺序抽取。The filling comes from the coding block time domain motion information of the preset position corresponding to the current coding tree unit and the coding block adjacent to the current coding tree unit in the reference frame. The preset positions in the corresponding positions of the current coding tree unit may be extracted at fixed intervals, or may be extracted in a specific rule or order. The preset position in the corresponding position of the current coding tree unit adjacent to the coding block may be extracted in a specific order according to a specific rule.

方法四:Method four:

填充来自于参考帧中,当前编码树单元对应位置和前编码树单元预设非临近位置的编码块对应位置中预设位置的编码块时域运动信息。当前前编码树单元对应位置中的预设位置可以是固定间隔抽取,也可以是以特定规则或顺序抽取。当前前编码树单元预设非临近位置的编码块对应位置中预设位置可以是一特定规则特定顺序抽取。The filling comes from the coding block time domain motion information of the preset position in the reference frame, the corresponding position of the current coding tree unit and the coding block corresponding to the preset non-adjacent position of the previous coding tree unit. The preset positions in the corresponding positions of the current coding tree unit may be extracted at fixed intervals, or may be extracted in a specific rule or order. The preset positions in the coding blocks corresponding to the preset non-adjacent positions of the current coding tree unit may be extracted in a specific order according to a specific rule.

方法五:Method five:

填充来自于当前编码树单元邻近的编码树单元的历史候选运动信息列表中的历史候选运动信息。Populate historical candidate motion information from the historical candidate motion information list of coding tree units adjacent to the current coding tree unit.

按照预定顺序将A,An,B,Bn和C加入到历史候选运动信息列表中,直到所有相邻块遍历结束,或者直到历史候选运动信息列表中的历史候选运动信息个数超过预设的最大值,其中,A,An,B,Bn和C加入历史候选运动信息列表的预定顺序可以采取C、An、Bn的顺序,也可以采取C、A0、B0、A1、B1直到An和Bn的顺序,也可以采取其他预定顺序,本发明不涉及具体预定顺序。该实施例中在每个编码树单元开始编码的时候都对所述的历史候选运动信息列表进行初始化,使得每个编码树单元并不需要等待上一个编码树单元的最后一个编码单元编码完成后才能启动处理,而是可以和上一个编码树单元并行的处理,从而极大的节省了处理时间。Add A, An, B, Bn and C to the historical candidate motion information list in a predetermined order until the traversal of all adjacent blocks ends, or until the number of historical candidate motion information in the historical candidate motion information list exceeds the preset maximum value, in which the predetermined order in which A, An, B, Bn and C are added to the historical candidate motion information list can be the order of C, An, Bn, or the order of C, A0, B0, A1, B1 up to An and Bn , other predetermined sequences can also be adopted, and the present invention does not involve specific predetermined sequences. In this embodiment, the historical candidate motion information list is initialized when each coding tree unit starts coding, so that each coding tree unit does not need to wait for the completion of coding of the last coding unit of the previous coding tree unit. Only when processing can be started, it can be processed in parallel with the previous coding tree unit, thus greatly saving processing time.

实施例二:Example 2:

不同于实施例一种在开始编码当前的编码树单元时,将历史候选运动信息列表初始化,本实施例在在始编码当前的编码树单元时,将预设数目的当前编码树单元的空域相邻图像块的运动信息加入到历史候选运动信息列表中,其中预设数目为大于0的正整数。其中,将预设数目的当前编码树单元的空域相邻图像块的运动信息加入到历史候选运动信息列表中的一种可能的实施方式可以是在现有的历史候选运动信息列表中已有的历史候选运动信息的基础上额外补充预定数目的运动信息作为新的历史候选运动信息,不论所述历史候选运动信息列表是已经填满或者没有填满;另一中可能的实施方式可以是将现有的历史候选运动信息列表中已有的历史候选运动信息的按照预定的规则清除预定数目个历史候选运动信息,再将当前编码树单元的空域相邻图像块内预设数目的运动信息作为新的历史候选运动信息加入到历史候选运动信息列表中。Different from the embodiment that initializes the historical candidate motion information list when starting to encode the current coding tree unit, this embodiment initializes the spatial domain of a preset number of current coding tree units when starting to encode the current coding tree unit. The motion information of adjacent image blocks is added to the historical candidate motion information list, where the preset number is a positive integer greater than 0. Among them, a possible implementation method of adding the motion information of a preset number of spatially adjacent image blocks of the current coding tree unit to the historical candidate motion information list may be already in the existing historical candidate motion information list. On the basis of the historical candidate motion information, a predetermined number of motion information is additionally supplemented as new historical candidate motion information, regardless of whether the historical candidate motion information list is filled or not; another possible implementation may be to add the current candidate motion information to the historical candidate motion information. A predetermined number of historical candidate motion information existing in the historical candidate motion information list is cleared according to predetermined rules, and then a preset number of motion information in adjacent image blocks in the spatial domain of the current coding tree unit is used as new The historical candidate sports information is added to the historical candidate sports information list.

实施例三:Embodiment three:

该实施例为实施例一以及实施例二中的历史候选运动信息列表初始化或者重构后应用与当前编码单元的帧间预测中,其具体包括:This embodiment is to initialize or reconstruct the historical candidate motion information list in Embodiment 1 and 2 and apply it to the inter-frame prediction of the current coding unit, which specifically includes:

采用实施例一或者实施例二中的方法对历史候选运动信息列表进行更新或重构。具体重构方法参见实施例一或者实施例二;The method in Embodiment 1 or Embodiment 2 is used to update or reconstruct the historical candidate motion information list. For specific reconstruction methods, please refer to Embodiment 1 or Embodiment 2;

(1)对当前编码树单元中或者当前编码树单元中的至少一个编码单元进行帧间预测;(1) Perform inter-frame prediction on at least one coding unit in the current coding tree unit or in the current coding tree unit;

对当前编码树单元中或者当前编码树单元中的至少一个编码单元进行帧间预测,是以所述以所述编码单元或编码树单元所包含的亮度块或者色度块为基本处理单元,一个编码树单元或编码单元包括一个亮度编码块以及两个色度编码块。正在执行编码或者解码处理的前编码树单元中或者当前编码树单元中的至少一个颜色分量(色度或亮度)编码块称为当前块。Performing inter-frame prediction on at least one coding unit in the current coding tree unit or the current coding tree unit takes the luminance block or chrominance block included in the coding unit or coding tree unit as the basic processing unit. A coding tree unit or coding unit includes one luma coding block and two chroma coding blocks. At least one color component (chrominance or luminance) coding block in the previous coding tree unit or the current coding tree unit in which encoding or decoding processing is being performed is called a current block.

上述对当前编码树单元中或者当前编码树单元中的至少一个编码单元进行帧间预测可以包括:The above-mentioned inter-frame prediction for the current coding tree unit or at least one coding unit in the current coding tree unit may include:

(2)解析当前块的帧间预测模式,若当前块为merge/skip模式,则生成融合运动信息候选列表;若当前CU或当前块为AMVP模式,则生成运候选动矢量预测列表。(2) Analyze the inter prediction mode of the current block. If the current block is in merge/skip mode, generate a fusion motion information candidate list; if the current CU or current block is in AMVP mode, generate a motion vector prediction list.

可选地,将上述历史候选运动信息列表中的历史候选运动信息加入到融合运动信息候选列表或候选运动矢量预测列表中。需要说明的是,也可以不将历史候选运动信息列表中的历史候选运动信息加入到融合运动信息候选列表或候选运动矢量预测列表中,而保持历史候选运动信息列表的独立,并在对当前块进行预测的时候直接索引该历史候选运动信息列表。若将历史候选运动信息列表中的历史候选运动信息加入到融合运动信息候选列表,则可以按照JVET-K0104提案中的方法,也可采用其他方法将历史候选运动信息列表中的历史候选运动信息按照加入到融合运动信息候选列表中,本发明不做限定。需要说明的是,若将历史候选运动信息加入到融合运动信息候选列表,该历史候选运动信息列表中的历史候选运动信息的位置可以是在其它类型的融合候选之前,如双向预测融合候选(bi-predictive merge candidate)和零运动矢量融合候选(zero motion vector mergecandidate)。Optionally, the historical candidate motion information in the above historical candidate motion information list is added to the fused motion information candidate list or the candidate motion vector prediction list. It should be noted that the historical candidate motion information in the historical candidate motion information list may not be added to the fused motion information candidate list or the candidate motion vector prediction list, but the historical candidate motion information list may be kept independent, and the current block may be When making predictions, the historical candidate motion information list is directly indexed. If the historical candidate motion information in the historical candidate motion information list is added to the fused motion information candidate list, the method in the JVET-K0104 proposal can be followed, or other methods can be used to add the historical candidate motion information in the historical candidate motion information list according to Adding to the fused motion information candidate list is not limited by the present invention. It should be noted that if historical candidate motion information is added to the fusion motion information candidate list, the position of the historical candidate motion information in the historical candidate motion information list may be before other types of fusion candidates, such as bidirectional prediction fusion candidates (bi -predictive merge candidate) and zero motion vector fusion candidate (zero motion vector mergecandidate).

上述若当前块为merge/skip模式,生成融合运动信息候选列表的详细过程如下。If the current block is in merge/skip mode, the detailed process of generating a fusion motion information candidate list is as follows.

融合运动信息候选列表基于以下候选者构建:a.从五个空间相邻块得到的最多四个空间融合运动信息候选列表;b.从两个时间同位块得到的一个时间融合运动信息候选;c.包含组合的双向预测候选者和零运动矢量候选者的另外的融合运动信息候选。融合运动信息候选列表中的第一候选者是空间相邻者。根据图6的右侧部分,通过依次循序检查A1、B1、B0、A0和B2,最多可以在合并列表中以所述顺序插入四个候选者。在将相邻块的所有运动数据作为融合运动信息候选之前执行一些另外的冗余检查。这些冗余检查可以分为两类,用于两个不同的目的:a.避免列表中存在具有冗余运动数据的候选者;b.防止合并两个可以用其它方式表示的会产生冗余语法的分区。The fused motion information candidate list is constructed based on the following candidates: a. Up to four spatial fused motion information candidate lists obtained from five spatially adjacent blocks; b. One temporal fused motion information candidate obtained from two temporally co-located blocks; c. .An additional fused motion information candidate containing the combined bidirectional prediction candidate and the zero motion vector candidate. The first candidate in the fused motion information candidate list is the spatial neighbor. According to the right part of Figure 6, by checking A1, B1, B0, A0 and B2 in sequence, up to four candidates can be inserted in the merge list in the stated order. Some additional redundancy checks are performed before considering all motion data of neighboring blocks as candidates for fused motion information. These redundancy checks can be divided into two categories and serve two different purposes: a. To avoid candidates with redundant motion data in the list; b. To prevent the merging of two candidates that can be expressed in other ways to produce redundant syntax. partition.

当N是空间融合运动信息候选列表的数量时,完整的冗余检查将由次运动数据比较组成。在五个潜在空间融合运动信息候选的情况下,将需要十次运动数据比较来确保合并列表中的所有候选者具有不同的运动数据。在开发HEVC期间,对冗余运动数据的检查已经减少到一个子集,从而在比较逻辑明显减少的同时保持编码效率。在最终设计中,对于每个候选者执行不超过两次比较,从而产生总共五次比较。给定{A1,B1,B0,A0,B2}的顺序,B0只检查B1,A0只检查A1,且B2只检查A1和B1。在分区冗余检查的实施例中,通过选择候选者B1来将2N×N分区的底部PU与顶部PU合并。这将产生一个CU具有两个具有相同运动数据的PU,其可以被均等地用信号表示为2N×2N CU。总体而言,这种检查适用于矩形和不对称分区2N×N、2N×nU、2N×nD、N×2N、nR×2N和nL×2N的所有第二PU。应注意,对于空间融合运动信息候选列表,仅执行冗余检查,并且按原样从候选块复制运动数据。因此,这里不需要运动矢量缩放。When N is the number of spatially fused motion information candidate lists, a complete redundancy check will be Comparison of sub-movement data. In the case of five latent space fusion motion information candidates, ten motion data comparisons would be required to ensure that all candidates in the merged list have different motion data. During the development of HEVC, checks for redundant motion data have been reduced to a subset, resulting in significantly reduced comparison logic while maintaining coding efficiency. In the final design, no more than two comparisons were performed for each candidate, resulting in a total of five comparisons. Given the order {A1, B1, B0, A0, B2}, B0 only checks B1, A0 only checks A1, and B2 only checks A1 and B1. In the embodiment of partition redundancy checking, the bottom PU of the 2NxN partition is merged with the top PU by selecting candidate B1. This will result in a CU with two PUs with the same motion data, which can be equally signaled as a 2N×2N CU. Overall, this check applies to all second PUs of rectangular and asymmetric partitions 2N×N, 2N×nU, 2N×nD, N×2N, nR×2N and nL×2N. It should be noted that for the spatial fusion motion information candidate list, only the redundancy check is performed and the motion data is copied from the candidate blocks as is. Therefore, motion vector scaling is not required here.

时间融合运动信息候选列表的运动矢量的得到与TMVP的相同。由于融合运动信息候选列表包括所有运动数据并且TMVP仅是一个运动矢量,因此整个运动数据的得到仅取决于片的类型。对于双向预测片,针对每个参考图片列表得到TMVP。取决于每个列表的TMVP的可用性,将预测类型设置成双向预测或设置成TMVP可用的列表。所有相关的参考图片索引被设置成等于零。因此,对于单向预测片,只连同等于零的参考图片索引一起得到列表0的TMVP。The motion vector of the temporal fusion motion information candidate list is obtained in the same way as that of TMVP. Since the fused motion information candidate list includes all motion data and TMVP is only a motion vector, the acquisition of the entire motion data only depends on the type of slice. For bidirectionally predicted slices, TMVP is obtained for each reference picture list. Depending on the availability of TMVP for each list, set the prediction type to Bidirectional Prediction or to the list where TMVP is available. All relevant reference picture indices are set equal to zero. Therefore, for unidirectional predicted slices, only the TMVP of list 0 is obtained together with the reference picture index equal to zero.

当至少一个TMVP可用并且时间融合运动信息候选列表被添加到列表中时,不执行冗余检查。这使得合并列表构建独立于同位图片,从而提高抗抗误码能力。考虑时间融合运动信息候选列表将是多余的并因此未包含在融合运动信息候选列表列表中的情况。在丢失同位图片的情况下,解码器不能得到时间候选运动信息,因此不检查它是否是冗余的。所有后续候选者的索引将受此影响。When at least one TMVP is available and the temporal fusion motion information candidate list is added to the list, no redundancy check is performed. This allows merge list construction to be independent of co-located images, thereby improving error tolerance. Consider the case where the temporally fused motion information candidate list would be redundant and therefore not included in the fused motion information candidate list list. In the case of missing co-located pictures, the decoder cannot obtain the temporal candidate motion information and therefore does not check whether it is redundant. The indexes of all subsequent candidates will be affected by this.

出于解析鲁棒性原因,融合运动信息候选列表列表的长度是固定的。在已经添加了空间和时间融合运动信息候选列表之后,可能出现所述列表还没有固定长度的情况。为了补偿与非长度自适应列表索引信令一起出现的编码效率损失,生成另外的候选者。取决于片的类型,最多可以使用两种候选者来完全填充列表:a.组合双向预测候选者;b.零运动矢量候选者。For parsing robustness reasons, the length of the fused motion information candidate list is fixed. After the spatial and temporal fusion motion information candidate list has been added, it may occur that the list does not yet have a fixed length. To compensate for the coding efficiency loss that occurs with non-length adaptive list index signaling, additional candidates are generated. Depending on the type of slice, up to two candidates can be used to completely populate the list: a. Combined bidirectional prediction candidates; b. Zero motion vector candidates.

在双向预测片中,通过组合一个候选者的参考图片列表0运动数据与另一候选者的列表1运动数据,可基于现有候选者生成另外的候选者。这通过从第一候选者等一个候选者复制Δx0、Δy0、Δt0并且从第二候选者等另一候选者复制Δx1、Δy1、Δt1来完成。预定义不同的组合并在表1.1中给出。In a bi-predictive slice, additional candidates may be generated based on existing candidates by combining the reference picture list 0 motion data of one candidate with the list 1 motion data of another candidate. This is done by copying Δx 0 , Δy 0 , Δt 0 from one candidate, such as the first candidate, and copying Δx 1 , Δy 1 , Δt 1 from another candidate, such as the second candidate. Different combinations are predefined and given in Table 1.1.

表1.1Table 1.1

当添加组合的双向预测候选者之后或对于单向预测片来说列表仍然不完整时,计算零运动矢量候选者以使列表完整。所有零运动矢量候选者对于单向预测片具有一个零位移运动矢量,对于双向预测片具有两个零位移运动矢量。参考索引被设置成等于零,并且对于每个另外的候选者递增一,直到达到参考索引的最大数量。如果是这种情况,并且还有其它候选者缺失,则使用等于零的参考索引来创建这些候选者。对于所有另外的候选者,不执行冗余检查,因为结果显示省略这些检查不会引起编码效率损失。After adding combined bi-prediction candidates or when the list is still incomplete for uni-prediction slices, zero motion vector candidates are calculated to make the list complete. All zero motion vector candidates have one zero displacement motion vector for unidirectional prediction slices and two zero displacement motion vectors for bidirectional prediction slices. The reference index is set equal to zero and is incremented by one for each additional candidate until the maximum number of reference indices is reached. If this is the case and there are other candidates missing, these candidates are created using a reference index equal to zero. For all additional candidates, redundancy checks are not performed because results show that omitting these checks does not cause a loss in coding efficiency.

对于以图片间预测模式编码的每个PU,所谓的merge_flag指示使用所述块合并来得到运动数据。merge_idx进一步确定合并列表中提供MCP所需的所有运动数据的候选者。除了此PU层级的信令之外,还在片头中用信号表示合并列表中的候选者的数量。由于默认值为五,因此它表示为与五的差(five_minus_max_num_merge_cand)。这样,五利用0的短码字用信号表示,而仅使用一个候选者则利用4的较长码字用信号表示。至于对融合运动信息候选列表列表构建过程的影响,整个过程保持不变,但是在列表含有最大数量融合运动信息候选列表之后,所述过程终止。在初始设计中,合并索引编码的最大值由列表中可用空间和时间候选运动信息的数量给出。当例如只有两个候选者可用时,索引可以高效地编码为一个标志。但是,为了解析合并索引,必须构建整个融合运动信息候选列表列表以了解候选者的实际数量。假设由于发送错误而导致不可用的相邻块,将不可能再解析合并索引。For each PU encoded in inter-picture prediction mode, a so-called merge_flag indicates that the block merge is used to derive motion data. merge_idx further identifies candidates in the merge list that provide all motion data required by the MCP. In addition to this PU-level signaling, the number of candidates in the merge list is also signaled in the slice header. Since the default value is five, it is expressed as the difference from five (five_minus_max_num_merge_cand). This way, five is signaled with the short codeword of 0, while using only one candidate is signaled with the longer codeword of 4. As for the impact on the fused motion information candidate list construction process, the entire process remains unchanged, but the process is terminated after the list contains the maximum number of fused motion information candidate lists. In the initial design, the maximum value of the merge index encoding is given by the number of available spatial and temporal candidate motion information in the list. The index can be efficiently encoded as a flag when, for example, only two candidates are available. However, in order to parse the merge index, the entire list of fused motion information candidate lists must be constructed to know the actual number of candidates. Assuming adjacent blocks are unavailable due to sending errors, it will no longer be possible to parse the merge index.

HEVC中的块合并概念的关键应用是与跳过模式的组合。在先前的视频编码标准中,使用跳过模式指示这样的块:推测而不是显式地用信号表示运动数据,并且预测残差为零,即,不发送变换系数。在HEVC中,在图片间预测片中的每个CU的开始处,用信号表示skip_flag,这意味着以下方面:a.CU仅含有一个PU(2N×2N分区类型);b.使用合并模式来得到运动数据(merge_flag等于1);c.码流中不存在残差数据。The key application of the block merging concept in HEVC is in combination with skip mode. In previous video coding standards, skip mode was used to indicate blocks in which motion data was inferred rather than explicitly signaled, and the prediction residual was zero, i.e., no transform coefficients were sent. In HEVC, skip_flag is signaled at the beginning of each CU in the inter-picture prediction slice, which means the following: a. The CU contains only one PU (2N×2N partition type); b. Use merge mode to Obtain motion data (merge_flag equals 1); c. There is no residual data in the code stream.

在HEVC中引入指示区域的并行合并估计层级,其中可以通过检查候选块是否位于所述合并估计区域(MER)中而独立地得到融合运动信息候选列表列表。相同MER中的候选块不包含在融合运动信息候选列表列表中。因此,它的运动数据不需要在列表构建时可用。当这个层级是例如32时,那么32×32区域中的所有预测单元可以并行构建融合运动信息候选列表列表,因为处于相同32×32MER中的所有融合运动信息候选列表都不插入列表中。如图5所示,存在具有七个CU和十个PU的CTU分区。第一PU0的所有潜在融合运动信息候选列表都可用,因为它们在第一32×32MER之外。对于第二MER,当MER内的合并估计应该独立时,PU2-6的融合运动信息候选列表列表不能包含来自这些PU的运动数据。因此,例如在查看PU5时,没有融合运动信息候选列表可用且因此不插入融合运动信息候选列表列表中。在这种情况下,PU5的合并列表仅由时间候选运动信息(如果可用)和零MV候选者组成。为了使编码器能够权衡并行性和编码效率,并行合并估计层级是自适应的,并且在图片参数集中用信号表示为log2_parallel_merge_level_minus2。A parallel merge estimation hierarchy of indication regions is introduced in HEVC, where the fused motion information candidate list can be obtained independently by checking whether a candidate block is located in the merge estimation region (MER). Candidate blocks in the same MER are not included in the fused motion information candidate list. Therefore, its motion data does not need to be available at list building time. When this level is, for example, 32, then all prediction units in the 32×32 region can construct the fused motion information candidate list list in parallel, because all fused motion information candidate lists in the same 32×32 MER are not inserted into the list. As shown in Figure 5, there is a CTU partition with seven CUs and ten PUs. All potential fused motion information candidate lists for the first PU0 are available because they are outside the first 32×32 MER. For the second MER, when the merged estimates within the MER should be independent, the fused motion information candidate list list for PU2-6 cannot contain motion data from these PUs. Therefore, for example when viewing PU5, no fused motion information candidate list is available and therefore is not inserted into the fused motion information candidate list list. In this case, PU5's merge list consists only of temporal candidate motion information (if available) and zero MV candidates. To enable the encoder to trade off parallelism and coding efficiency, the parallel merge estimation level is adaptive and signaled in the picture parameter set as log2_parallel_merge_level_minus2.

若当前块为Inter MVP模式,也称之为AMVP,则生成候选运动矢量预测列表的详细过程如下。If the current block is in Inter MVP mode, also called AMVP, the detailed process of generating a candidate motion vector prediction list is as follows.

AMVP模式的初始设计包含来自三个不同类别预测值的五个MVP:来自空间相邻者的三个运动矢量、三个空间预测值的中值以及来自同位时间相邻块的缩放运动矢量。此外,通过重新排序以将最可能的运动预测值放在第一位置并通过去除冗余候选者以确保最小的信令开销来修改预测值列表。接着,最初的AMVP经历了多次的简化,例如去除中值预测值、将列表中的候选者数量从五个减少到两个、固定列表中的候选者顺序,以及减少冗余检查的数量。AMVP候选者列表构建的最终设计包含以下两个MVP候选者:a.从五个空间相邻块得到的最多两个空间候选MVP;b.当两个空间候选MVP不可用或它们相同时,从两个时间同位块得到的一个时间候选MVP;c.当空间候选运动信息、时间候选运动信息或这两者都不可用时的零运动矢量。正如已经提到的,从五个空间相邻块得到两个空间MVP候选者A和B,如图6右侧部分所示。对于AMVP和帧间预测块合并,空间候选块的位置是相同的。图10中描绘了两个空间候选运动信息A和B的得到过程流程。对于候选者A,在两遍式方法中考虑来自左下角的两个块A0和A1的运动数据。在第一遍中,检查是否有任何候选块含有的参考索引等于当前块的参考索引。找到的第一运动矢量将作为候选者A。当来自A0和A1的所有参考索引指向与当前块的参考索引不同的参考图片时,相关的运动矢量不能按原样使用。因此,在第二遍中,需要根据候选参考图片与当前参考图片之间的时间距离来缩放运动矢量。方程式(1.1)示出了如何根据缩放因子缩放候选运动矢量mvcand。基于当前图片与候选块td的参考图片之间的时间距离以及当前图片与当前块tb的参考图片之间的时间距离来计算ScaleFactor。时间距离以定义图片显示顺序的图片顺序编号(picture order count,POC)值之间的差表示。缩放操作基本上与H.264/AVC中用于时间直通模式的方案相同。这种分解允许在片层级预先计算ScaleFactor,因为它只取决于片头中用信号表示的参考图片列表结构。应注意,仅在当前参考图片和候选参考图片都是短期参考图片时才执行MV缩放。参数td被定义为同位候选块的同位图片与参考图片之间的POC差。The initial design of the AMVP mode contains five MVPs from three different categories of predictors: three motion vectors from spatial neighbors, the median of the three spatial predictors, and scaled motion vectors from co-located temporal neighboring blocks. Additionally, the predictor list is modified by reordering to place the most likely motion predictor first and by removing redundant candidates to ensure minimal signaling overhead. Subsequently, the original AMVP underwent several simplifications, such as removing the median predictor, reducing the number of candidates in the list from five to two, fixing the order of candidates in the list, and reducing the number of redundant checks. The final design of AMVP candidate list construction contains the following two MVP candidates: a. at most two spatial candidate MVPs obtained from five spatially adjacent blocks; b. when two spatial candidate MVPs are not available or they are the same, from A temporal candidate MVP obtained from two temporally co-located blocks; c. Zero motion vector when spatial candidate motion information, temporal candidate motion information, or both are not available. As already mentioned, two spatial MVP candidates A and B are obtained from five spatial neighboring blocks, as shown in the right part of Figure 6. For AMVP and inter prediction block merging, the positions of spatial candidate blocks are the same. Figure 10 depicts the process flow of obtaining two spatial candidate motion information A and B. For candidate A, motion data from the two blocks A0 and A1 in the lower left corner are considered in a two-pass approach. In the first pass, it is checked whether any candidate block contains a reference index equal to the reference index of the current block. The first motion vector found will be candidate A. When all reference indexes from A0 and A1 point to reference pictures that are different from the reference index of the current block, the associated motion vectors cannot be used as is. Therefore, in the second pass, the motion vectors need to be scaled based on the temporal distance between the candidate reference picture and the current reference picture. Equation (1.1) shows how the candidate motion vector mvcand is scaled according to the scaling factor. ScaleFactor is calculated based on the temporal distance between the current picture and the reference picture of candidate block td and the temporal distance between the current picture and the reference picture of current block tb. The temporal distance is expressed as the difference between picture order count (POC) values that define the order in which pictures are displayed. The scaling operation is basically the same scheme used for time pass-through mode in H.264/AVC. This decomposition allows ScaleFactor to be pre-computed at the slice level, since it only depends on the reference picture list structure signaled in the slice header. It should be noted that MV scaling is only performed when both the current reference picture and the candidate reference picture are short-term reference pictures. The parameter td is defined as the POC difference between the co-located picture of the co-located candidate block and the reference picture.

mv=sign(mvcand·ScaleFactor)·((|mvcand·ScaleFactor|+27)>>8) (1.1)mv=sign(mvcand·ScaleFactor)·((|mvcand·ScaleFactor|+27)>>8) (1.1)

ScaleFactor=clip(-212,212 -1,(tb·tx+25)>>6) (1.2)ScaleFactor=clip(-212,212 -1,(tb·tx+25)>>6) (1.2)

对于候选者B,以与在第一遍中检查A0和A1相同的方式依次检查候选者B0到B2。然而,第二遍仅在块A0和A1不含有任何运动信息时执行,即,不可用或使用图片内预测来编码时执行。接着,如果找到候选者A,则将候选者A设置成等于未缩放的候选者B,并且将候选者B设置成等于候选者B的第二未缩放的或缩放的变体。第二遍搜索从候选者B0到B2得到的未缩放的以及缩放的MV。总体而言,这种设计允许独立于B0、B1和B2来处理A0和A1。B的得到应只了解A0和A1两者的可用性,以便搜索从B0到B2得到的缩放的或另外未缩放的MV。考虑到它明显减少了候选者B的复杂运动矢量缩放操作,这种相依性是可接受的。减少运动矢量缩放的数量表示运动矢量预测值得到过程中显着的复杂度降低。For candidate B, candidates B0 through B2 are checked sequentially in the same way as A0 and A1 were checked in the first pass. However, the second pass is only performed when blocks A0 and A1 do not contain any motion information, ie are not available or are encoded using intra-picture prediction. Next, if candidate A is found, candidate A is set equal to the unscaled candidate B, and candidate B is set equal to the second unscaled or scaled variant of candidate B. The second pass searches the unscaled and scaled MVs from candidates B0 to B2. Overall, this design allows A0 and A1 to be processed independently of B0, B1 and B2. The getter of B should only know the availability of both A0 and A1 in order to search for scaled or otherwise unscaled MVs from B0 to B2. This dependency is acceptable considering that it significantly reduces the complex motion vector scaling operation of candidate B. Reducing the amount of motion vector scaling represents a significant reduction in complexity in deriving motion vector predictors.

在HEVC中,已确定当前块的右下方和中心处的块为最适合提供良好的时间运动矢量预测值(temporal motion vector predictor,TMVP)。这些候选者在图3的左侧部分示出,其中C0表示右下相邻者,C1表示中心块。这里同样首先考虑C0的运动数据,并且如果不可用,则使用来自中心处的同位候选块的运动数据来得到时间MVP候选者C。当相关的PU属于当前CTU行之外的CTU时,C0的运动数据也被视为不可用。这最大限度地减少了存储同位运动数据的内存带宽要求。与运动矢量可能指代相同参考图片的空间MVP候选者对比,运动矢量缩放对于TMVP是强制性的。因此,使用与空间MVP相同的缩放操作。In HEVC, the blocks at the lower right and center of the current block have been determined to be most suitable to provide good temporal motion vector predictors (TMVP). These candidates are shown in the left part of Figure 3, where C0 represents the lower right neighbor and C1 represents the center block. Here again the motion data of C0 is considered first, and if not available, the motion data from the co-located candidate block at the center is used to derive the temporal MVP candidate C. Motion data for C0 is also considered unavailable when the associated PU belongs to a CTU outside the current CTU row. This minimizes memory bandwidth requirements for storing co-located motion data. In contrast to spatial MVP candidates where the motion vectors may refer to the same reference picture, motion vector scaling is mandatory for TMVP. Therefore, the same scaling operation as spatial MVP is used.

虽然H.264/AVC中的时间直通模式总是参考第二参考图片列表、即列表1中的第一参考图片,并且仅在双向预测片中被允许,但HEVC提供了为每个图片指示哪个参考图片被视为同位图片的可能性。这是通过在片头中用信号表示同位参考图片列表和参考图片索引以及要求图片中的所有片中的这些语法元素应指定相同的参考图片来完成的。While the temporal pass-through mode in H.264/AVC always refers to the second reference picture list, i.e. the first reference picture in List 1, and is only allowed in bidirectional predictive slices, HEVC provides an indication for each picture which The possibility that a reference picture is treated as a homotopic picture. This is accomplished by signaling the co-located reference picture list and reference picture index in the slice header and requiring that these syntax elements in all slices in the picture should specify the same reference picture.

由于时间MVP候选者引入了另外的相依性,因此出于差错鲁棒性原因,可能需要禁用其使用。在H.264/AVC中,可能禁用片头中的双向预测片的时间直通模式(direct_spatial_mv_pred_flag)。HEVC语法通过允许在序列层级或在图片层级禁用TMVP(sps/slice_temporal_mvp_enabled_flag)来扩展此信令。尽管在片头中用信号表示标志,但是对于一个图片中的所有片,其值应该是相同的,这是码流一致性的要求。由于图片层级标志的信令取决于SPS标志,因此在PPS中用信号表示图片层级标志将引入SPS与PPS之间的解析相依性。这种片头信令的另一个优点是,如果只想改变PPS中此标志的值而不改变其它参数,则不需要发送第二PPS。Because temporal MVP candidates introduce additional dependencies, its use may need to be disabled for error robustness reasons. In H.264/AVC, it is possible to disable temporal direct mode (direct_spatial_mv_pred_flag) for bidirectionally predicted slices in the slice header. The HEVC syntax extends this signaling by allowing TMVP to be disabled at the sequence level or at the picture level (sps/slice_temporal_mvp_enabled_flag). Although the flag is signaled in the header, its value should be the same for all slices in a picture, which is a requirement for code stream consistency. Since the signaling of picture-level flags depends on the SPS flag, signaling the picture-level flag in PPS will introduce a parsing dependency between SPS and PPS. Another advantage of this kind of preamble signaling is that if you only want to change the value of this flag in the PPS without changing other parameters, you do not need to send a second PPS.

通常,HEVC中的运动数据信令与H.264/AVC中的类似。图片间预测语法元素inter_pred_idc用信号表示是否使用参考列表0、1或这两者。对于从一个参考图片列表获得的每个MCP,对应的参考图片(Δt)由参考图片列表的索引ref_idx_l0/1用信号表示,并且MV(Δx,Δy)由MVP的索引mvp_l0/1_flag及其MVD表示。片头中新引入的标志mvd_l1_zero_flag指示第二参考图片列表的MVD是否等于零且因此不在码流中用信号表示。当运动矢量被完全重构时,最终剪切操作确保最终运动矢量的每个分量的值将始终在-215到215-1的范围内,包含端点值。Generally, motion data signaling in HEVC is similar to that in H.264/AVC. The inter-picture prediction syntax element inter_pred_idc signals whether reference list 0, 1, or both is used. For each MCP obtained from a reference picture list, the corresponding reference picture (Δt) is signaled by the index ref_idx_l0/1 of the reference picture list, and the MV (Δx, Δy) is signaled by the index mvp_l0/1_flag of the MVP and its MVD . The newly introduced flag mvd_l1_zero_flag in the slice header indicates whether the MVD of the second reference picture list is equal to zero and therefore not signaled in the code stream. When the motion vector is completely reconstructed, the final clipping operation ensures that the value of each component of the final motion vector will always be in the range of -215 to 215-1, endpoint values inclusive.

若将历史候选运动信息列表中的历史候选运动信息加入到当前候选运动信息列表,可以按照JVET-K0104提案中的方法,也可采用其他方法将历史候选运动信息列表中的历史候选运动信息按照加入到融合运动信息候选列表中,本发明不作限定。If the historical candidate motion information in the historical candidate motion information list is added to the current candidate motion information list, you can follow the method in the JVET-K0104 proposal, or you can use other methods to add the historical candidate motion information in the historical candidate motion information list as follows The present invention does not limit the list of fused motion information candidates.

(3)获取当前块的运动信息;(3) Obtain the motion information of the current block;

经过上述方式将当前块的当前候选运动信息列表(包括当前块自身的运动信息候选则列表以及历史候选运动信息列表)则可以根据现有的方法从中获取当前块的运动信息。Through the above method, the current candidate motion information list of the current block (including the current block's own motion information candidate list and the historical candidate motion information list) can be obtained from the current block's motion information according to existing methods.

更具体的,解码端:若当前块为merge/skip模式,则根据码流中携带的融合索引确定当前块的运动信息。若当前块为Inter MVP模式,则根据码流中传送的帧间预测方向、参考帧索引、运动矢量预测值索引、运动矢量残差值确定当前块运动信息。More specifically, at the decoding end: if the current block is in merge/skip mode, the motion information of the current block is determined based on the fusion index carried in the code stream. If the current block is in Inter MVP mode, the motion information of the current block is determined based on the inter-frame prediction direction, reference frame index, motion vector predictor index, and motion vector residual value transmitted in the code stream.

(4)根据运动信息得到当前块的帧间预测图像;(4) Obtain the inter-frame prediction image of the current block based on the motion information;

更具体的,解码端:根据运动信息进行运动补偿(motion compensation),得到预测图像;进一步,上述步骤(4)还可以包括,获取当前块的残差图像,以及,将帧间预测图像与残差图像相加,得到当前块的重建图像;如果当前块没有残差,则预测图像为当前块的重建图像。More specifically, the decoding end: performs motion compensation according to the motion information to obtain the predicted image; further, the above step (4) may also include obtaining the residual image of the current block, and combining the inter-frame predicted image with the residual image. The difference images are added to obtain the reconstructed image of the current block; if the current block has no residual, the predicted image is the reconstructed image of the current block.

可选地,上述实施例三,还可包括使用当前块的运动信息对历史候选运动信息列表进行更新,该步骤可以在步骤(4)之前步骤(2)之后,或者在步骤(4)之后;Optionally, the above-described third embodiment may also include updating the historical candidate motion information list using the motion information of the current block. This step may be before step (4) and after step (2), or after step (4);

具体的,可以按照JVET-K0104提案中的方法,也可采用其他方法对历史候选运动信息列表进行更新。JVET-K0104提案中,从历史候选运动信息列表头部开始,将当前块的运动信息与历史候选运动信息列表中的历史候选运动信息进行比较;如有某个历史候选运动信息与当前块运动信息相同,将该历史候选运动信息从历史候选运动信息列表中移除。然后,检查历史候选运动信息列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选运动信息移除,并将当前候选运动信息列表中剩余的历史候选运动信息向所述列表的头部移位后,将所述当前块的运动信息加入到历史候选运动信息列表的尾部。需要说明的是,在本发明中,上述的判断当前块运动信息与历史候选运动信息列表中某个历史候选运动信息是否相同的步骤可以不用执行,即,所述历史候选运动信息列表中可以存在两个完全相同的运动信息,也可以是两个运动信息在某种处理后相同,例如两个运动矢量右移2位后的结果相同。Specifically, the method in the JVET-K0104 proposal can be followed, or other methods can be used to update the historical candidate sports information list. In the JVET-K0104 proposal, starting from the head of the historical candidate motion information list, the motion information of the current block is compared with the historical candidate motion information in the historical candidate motion information list; if there is a certain historical candidate motion information and the current block motion information Similarly, the historical candidate motion information is removed from the historical candidate motion information list. Then, check the size of the historical candidate motion information list. If the list size exceeds the preset size, remove the historical candidate motion information at the head of the list, and remove the remaining historical candidate motion information in the current candidate motion information list. After shifting to the head of the list, the motion information of the current block is added to the tail of the historical candidate motion information list. It should be noted that in the present invention, the above-mentioned step of determining whether the motion information of the current block is the same as a certain historical candidate motion information in the historical candidate motion information list does not need to be performed. That is, the historical candidate motion information list may contain Two identical motion information can also be the same after some kind of processing. For example, the result of two motion vectors right-shifted by 2 bits is the same.

需要说明的是,若在上述实施例三中不包括使用当前块的运动信息对历史候选运动信息列表进行更新,则意味着当前编码树单元内的编码块可采用相同的历史候选运动信息列表进行帧间预测,从而能够允许在编码树单元内部的编码块的处理过程中实现并行操作。It should be noted that if the above-described third embodiment does not include using the motion information of the current block to update the historical candidate motion information list, it means that the coding block in the current coding tree unit can be updated using the same historical candidate motion information list. Inter prediction, thereby allowing parallel operations in the processing of coding blocks within coding tree units.

总的来说,上述实施例一至三可在不增加额外存储区域和具有相当的编码效率的前提下,更有利于行级以及CTU级的编解码并行,能够有效降低编解码的时间。图12是由根据图1中所示视频解码器30实现本发明一实施例中应用图11中的帧间预测方法进行图像解码的实例操作的流程图。视频解码器30的一个或多个功能单元包含预测处理单元360,可以用于执行图12的方法。在图12的实例中,基于图11的方法中的帧间预测方法来进行图片的解码,所述解码方法1200具体包括:In general, the above-mentioned Embodiments 1 to 3 can be more conducive to row-level and CTU-level encoding and decoding parallelism without adding additional storage areas and achieving considerable encoding efficiency, and can effectively reduce encoding and decoding time. FIG. 12 is a flowchart of an example operation of applying the inter-frame prediction method in FIG. 11 to perform image decoding in an embodiment of the present invention implemented by the video decoder 30 shown in FIG. 1 . One or more functional units of video decoder 30 include prediction processing unit 360, which may be used to perform the method of Figure 12. In the example of Figure 12, pictures are decoded based on the inter-frame prediction method in the method of Figure 11. The decoding method 1200 specifically includes:

S1201初始化与当前编码树单元对应的历史候选运动信息列表;S1201 initializes the historical candidate motion information list corresponding to the current coding tree unit;

其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,其所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;Wherein, the historical candidate motion information list includes N storage spaces, the N storage spaces are used to store historical candidate motion information, the initialized historical candidate motion information list includes at least M vacant storage spaces, and the M≤N, M and N are integers, the current coding tree unit is included in a coding tree unit set (Slice) composed of multiple coding tree units, and the current coding tree unit is not in the coding tree unit set. First in a predetermined processing sequence;

S1203按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,M≤L≤N,所述空域相邻块内L个位置根据预设的规则得到;S1203 Add the motion information at L positions in the spatial adjacent blocks of the current coding tree unit to the historical candidate motion information list in a predetermined order, where M≤L≤N, the spatial adjacent blocks The inner L positions are obtained according to the preset rules;

在所述当前编码单元或者所述当前编码树单元的帧间预测类型是AMVP模式或者merge/skip模式时,生成所述当前编码单元或者所述当前编码树单元的当前候选运动信息列表;其中AMVP模式下的所述当前候选运动信息列表中包含运动矢量,而在merge/skip模式下,所述当前候选运动信息列表中包含双向参S考或者单向参考指示,参考帧索引,以及与参考方向对应的运动矢量;When the inter prediction type of the current coding unit or the current coding tree unit is AMVP mode or merge/skip mode, generating a current candidate motion information list of the current coding unit or the current coding tree unit; wherein AMVP In the merge/skip mode, the current candidate motion information list includes a motion vector, and in the merge/skip mode, the current candidate motion information list includes a bidirectional reference or a unidirectional reference indication, a reference frame index, and a reference direction. The corresponding motion vector;

S1205构建所述当前编码树单元或者当前编码单元的当前候选运动信息列表;S1205 constructs the current candidate motion information list of the current coding tree unit or the current coding unit;

S1207从所述历史候选运动信息列表与所述当前候选运动信息列表的组合中获取所述当前编码树单元或者当前编码单元的运动信息,根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测获得帧间预测图像;S1207 Obtains the motion information of the current coding tree unit or the current coding unit from the combination of the historical candidate motion information list and the current candidate motion information list. According to the motion information of the current coding tree unit or the current coding unit, Perform inter-frame prediction on the current coding tree unit or current coding unit to obtain an inter-frame prediction image;

该步骤中包括解析码流,所述当前编码树单元或者当前编码单元对应的运动信息索引,根据所述从所述历史候选运动信息列表与所述当前候选运动信息列表的组合中获取所述当前编码树单元或者当前编码单元的运动信息,并根据该运动信息对所述当前对所述当前编码树单元或者当前编码单元进行帧间预测获得帧间预测图像;This step includes parsing the code stream, the motion information index corresponding to the current coding tree unit or the current coding unit, and obtaining the current candidate motion information list from the combination of the historical candidate motion information list and the current candidate motion information list. Coding the motion information of the current coding tree unit or the current coding unit, and performing inter-frame prediction on the current pair of the current coding tree unit or the current coding unit according to the motion information to obtain an inter-frame prediction image;

S1209将所获得的帧间预测图像与所述当前编码树单元或者所述当前编码单元的残差图像相加,获得所述当前编码树单元或者所述当前编码单元的重建图像。S1209 Add the obtained inter-frame prediction image to the current coding tree unit or the residual image of the current coding unit to obtain a reconstructed image of the current coding tree unit or the current coding unit.

相比于现有技术,上述解码方法中,采用了在CTU级别的历史候选运动信息列表的更新,允许行级以及CTU级的编解码并行,能够有效降低解码的时间。Compared with the existing technology, the above decoding method adopts the update of the historical candidate motion information list at the CTU level, allowing parallel encoding and decoding at the row level and CTU level, which can effectively reduce the decoding time.

图13是由根据图1中所示视频编码器20实现本发明一实施例中应用图11所构造融合候选者列表构造方法进行图像编码的实例操作的流程图。视频编码器20的一个或多个功能单元包含预测处理单元260,可以用于执行图13的方法。在图13的实例中,基于图11的方法中的帧间预测方法来进行图片的编码,,所述编码方法1300具体包括:FIG. 13 is a flowchart of an example operation of image encoding using the fusion candidate list construction method constructed in FIG. 11 in an embodiment of the present invention implemented by the video encoder 20 shown in FIG. 1 . One or more functional units of video encoder 20 include prediction processing unit 260, which may be used to perform the method of Figure 13. In the example of Figure 13, the picture is encoded based on the inter-frame prediction method in the method of Figure 11, and the encoding method 1300 specifically includes:

S1301初始化与当前编码树单元对应的历史候选运动信息列表;S1301 initializes the historical candidate motion information list corresponding to the current coding tree unit;

其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,其所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;Wherein, the historical candidate motion information list includes N storage spaces, the N storage spaces are used to store historical candidate motion information, the initialized historical candidate motion information list includes at least M vacant storage spaces, and the M≤N, M and N are integers, the current coding tree unit is included in a coding tree unit set (Slice) composed of multiple coding tree units, and the current coding tree unit is not in the coding tree unit set. First in a predetermined processing sequence;

S1303按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,M≤L≤N,所述空域相邻块内L个位置根据预设的规则得到;S1303 Add the motion information at L positions in the spatial adjacent blocks of the current coding tree unit to the historical candidate motion information list in a predetermined order, where M≤L≤N, the spatial adjacent blocks The inner L positions are obtained according to the preset rules;

在所述当前编码单元或者所述当前编码树单元的帧间预测类型是AMVP模式或者merge/skip模式时,生成所述当前编码单元或者所述当前编码树单元的当前候选运动信息列表;其中AMVP模式下的所述当前候选运动信息列表中包含运动矢量,而在merge/skip模式下,所述当前候选运动信息列表中包含双向参考或者单向参考指示,参考帧索引,以及与参考方向对应的运动矢量;When the inter prediction type of the current coding unit or the current coding tree unit is AMVP mode or merge/skip mode, generating a current candidate motion information list of the current coding unit or the current coding tree unit; wherein AMVP In the merge/skip mode, the current candidate motion information list includes a motion vector, and in the merge/skip mode, the current candidate motion information list includes a bidirectional reference or a unidirectional reference indication, a reference frame index, and a frame corresponding to the reference direction. motion vector;

S1305构建所述当前编码树单元或者当前编码单元的当前候选运动信息列表;S1305 constructs the current candidate motion information list of the current coding tree unit or the current coding unit;

S1307从所述历史候选运动信息列表与所述当前候选运动信息列表的组合中获取所述当前编码树单元或者当前编码单元的运动信息,以及所述运动信息的运动信息索引;S1307 obtains the motion information of the current coding tree unit or the current coding unit, and the motion information index of the motion information from the combination of the historical candidate motion information list and the current candidate motion information list;

S1309根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测获得帧间预测图像;S1309 Perform inter-frame prediction on the current coding tree unit or current coding unit according to the motion information of the current coding tree unit or current coding unit to obtain an inter-frame prediction image;

S1311将当前编码树单元或者所述当前编码单元的原始图像与将所获得的帧间预测图像相减获得残差图像;S1311 Subtract the original image of the current coding tree unit or the current coding unit from the obtained inter-frame prediction image to obtain a residual image;

S1213对所述残差图像以及所述运动信息索引进行编码形成码流。S1213 Encode the residual image and the motion information index to form a code stream.

相比于现有技术,上述解码方法中,采用了在CTU级别的历史候选运动信息列表的更新,允许行级以及CTU级的编解码并行,能够有效降低编码的时间。Compared with the existing technology, the above decoding method adopts the update of the historical candidate motion information list at the CTU level, allowing parallel encoding and decoding at the row level and CTU level, which can effectively reduce the encoding time.

图14是本发明提供的一种帧间预测装置1400,该帧间预测装置具备实施前述图11中的帧间预测方法的功能,其包括有:初始化模块1401,用于初始化与当前编码树单元对应的历史候选运动信息列表,其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,其所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;历史候选运动信息列表构建模块1403,其用于,按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,所述空域相邻块内M≤L≤N个位置根据预设的规则得到;当前候选运动信息列表构建模块1405,其用于,构建所述当前编码树单元的当前候选运动信息列表或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;以及预测模块1407,其用于,根据所述当前编码树单元的当前候选运动信息列表和所述历史候选运动信息列表的组合或者所述当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合,对所述当前编码树单元或者当前编码单元进行帧间预测。Figure 14 is an inter-frame prediction device 1400 provided by the present invention. The inter-frame prediction device has the function of implementing the inter-frame prediction method in Figure 11. It includes: an initialization module 1401 for initializing the current coding tree unit. Corresponding historical candidate motion information list, wherein the historical candidate motion information list includes N storage spaces, the N storage spaces are used to store historical candidate motion information, and the initialized historical candidate motion information list includes at least M vacant storage space, the M≤N, M and N are integers, the current coding tree unit is included in a coding tree unit set (Slice) composed of multiple coding tree units, and the current coding tree unit is not the first one in the coding tree unit set according to a predetermined processing order; the historical candidate motion information list construction module 1403 is used to convert L in the spatial adjacent blocks of the current coding tree unit in a predetermined order. The motion information at positions is added to the historical candidate motion information list, where M≤L≤N positions in the spatial adjacent block are obtained according to preset rules; the current candidate motion information list construction module 1405, Be used to construct a current candidate motion information list of the current coding tree unit or a current candidate motion information list of the current coding unit, wherein the coding unit is divided by the coding tree unit; and a prediction module 1407, which is used to, According to the combination of the current candidate motion information list of the current coding tree unit and the historical candidate motion information list or the combination of the current candidate motion information list of the current coding unit and the historical candidate motion information list, the current candidate motion information list is The coding tree unit or the current coding unit performs inter prediction.

可选地,所述初始化与当前编码树单元对应的历史候选运动信息列表包括,清空所述历史候选运动信息列表,使得M=N。可选地,所述空域相邻块内M个位置为,从所述空域相邻块内预设位置获取第一个候选运动信息,以获取所述第一个候选运动信息的位置为起点,以预设的步长为间隔获取剩余的M-1个候选运动信息,所述预设的步长为固定值,或者所述预设的步长根据预设规则变化。Optionally, the initializing the historical candidate motion information list corresponding to the current coding tree unit includes clearing the historical candidate motion information list such that M=N. Optionally, the M positions in the spatial adjacent block are to obtain the first candidate motion information from the preset positions in the spatial adjacent block, with the position where the first candidate motion information is obtained as the starting point, The remaining M-1 candidate motion information is obtained at intervals of a preset step size, where the preset step size is a fixed value, or the preset step size changes according to a preset rule.

可选地,所述预测模块1405用于:根据所述当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合获取所述当前编码单元的运动信息,并根据所获取的运动信息对所述当前编码单元进行帧间预测;所述装置1400还包括:历史运动信息列表更新模块1407,其用于,基于所述当前编码单元运动信息更新所述历史候选运动信息列表。Optionally, the prediction module 1405 is configured to: obtain the motion information of the current coding unit according to a combination of the current candidate motion information list of the current coding unit and the historical candidate motion information list, and calculate the motion information based on the obtained motion information. The information performs inter-frame prediction on the current coding unit; the device 1400 further includes: a historical motion information list update module 1407, which is configured to update the historical candidate motion information list based on the current coding unit motion information.

可选地,历史运动信息列表更新模块根据如下规则更新所述历史候选运动信息列表:若所述M个位置并未填满,则将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表内所述M个位置中距离N-M位置最近的空置的存储空间内;或者;若所述M个位置已填满,则按照先入先出的原则将最早加入所述历史候选运动信息列表内的历史运动信息移除,并将剩余历史运动信息向被移除的历史运动信息位置移位后将所述当前编码单元运动信息作为历史运动信息加入所述历史候选运动信息列表的尾部,其中,所述历史候选运动信息列表中包含最新加入的历史运动信息的一端为所述历史候选运动信息列表的尾部。Optionally, the historical motion information list update module updates the historical candidate motion information list according to the following rules: if the M positions are not filled, the current coding unit motion information is added to the history as historical motion information. In the vacant storage space closest to the N-M position among the M positions in the candidate motion information list; or if the M positions are filled, the earliest historical candidate motion information will be added according to the first-in, first-out principle. Remove the historical motion information in the list, shift the remaining historical motion information to the position of the removed historical motion information, and then add the current coding unit motion information to the end of the historical candidate motion information list as historical motion information, Wherein, the end of the historical motion information candidate list containing the latest added historical motion information is the tail of the historical motion candidate information list.

可选地,当前候选运动信息列表构建模块1403还用于;将历史候选运动信息列表中的历史候选运动信息加入所述当前编码单元的当前候选运动信息列表中;对应地,所述预测模块1405将根据所述当前编码单元的当前候选运动信息列表获取所述当前编码单元的运动信息,并根据所获取的运动信息对所述当前编码单元进行帧间预测。Optionally, the current candidate motion information list building module 1403 is also configured to add the historical candidate motion information in the historical candidate motion information list to the current candidate motion information list of the current coding unit; correspondingly, the prediction module 1405 The motion information of the current coding unit will be obtained according to the current candidate motion information list of the current coding unit, and the current coding unit will be inter-predicted based on the obtained motion information.

可选地,所述预测模块1405,用于,根据所述当前编码单元的当前候选运动信息列表和所述历史候选运动信息列表的组合获取所述当前编码单元的运动信息,并根据所获取的运动信息对所述当前编码单元进行帧间预测;所述预测模块1405还用于,基于与所述当前编码单元相同的方法对另一编码单元进行帧间预测,其中,所述另一个编码单元按照预设处理顺序位于所述当前编码单元之后且与所述当前编码单元属于所述编码树单元,所述另一编码单元的帧间预测所采用的历史运动信息列表包括所述当前编码单元的帧间预测所采用的历史运动信息列表中的历史运动信息。Optionally, the prediction module 1405 is configured to obtain the motion information of the current coding unit according to a combination of the current candidate motion information list of the current coding unit and the historical candidate motion information list, and based on the obtained The motion information performs inter-frame prediction on the current coding unit; the prediction module 1405 is also configured to perform inter-frame prediction on another coding unit based on the same method as the current coding unit, wherein the other coding unit Located after the current coding unit according to the preset processing order and belonging to the coding tree unit with the current coding unit, the historical motion information list used in inter prediction of the other coding unit includes the current coding unit's Historical motion information in the historical motion information list used for inter-frame prediction.

可选地,所述历史候选运动信息列表构建模块1403用于,按照顺时针的顺序,以所述当前编码树单元的左下角的空域相邻块为起点,以所述当前编码树单元右上角的空域相邻块为终点,将所述空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中。Optionally, the historical candidate motion information list building module 1403 is configured to, in clockwise order, start from the spatial adjacent block in the lower left corner of the current coding tree unit, and start from the upper right corner of the current coding tree unit. The spatial adjacent block is the end point, and the motion information at L positions within the spatial adjacent block is added to the historical candidate motion information list.

图15是本发明提供的一种编码装置1500,该编码装置具备实施前述图12中的编码方法的功能,其包括有:帧间预测装置1501(与帧间预测装置1400相同),获取当前编码树单元的帧间预测图像或者当前编码单元的帧间预测图像;所述获取当前编码树单元的帧间预测图像或者当前编码单元的帧间预测图像包括:从所述历史候选运动信息列表与所述当前候选运动信息列表的组合中获取所述当前编码树单元或者当前编码单元的运动信息,以及所述运动信息的运动信息索引;根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测获得帧间预测图像;残差计算模块1503,用于,将当前编码树单元或者所述当前编码单元的原始图像与将所获得的帧间预测图像相减获得残差图像;以及编码模块1505,其用于对所述残差图像以及所述运动信息索引进行编码形成码流。Figure 15 is a coding device 1500 provided by the present invention. The coding device has the function of implementing the coding method in Figure 12. It includes: an inter-frame prediction device 1501 (same as the inter-frame prediction device 1400), which obtains the current encoding The inter-frame prediction image of the tree unit or the inter-frame prediction image of the current coding unit; the obtaining the inter-frame prediction image of the current coding tree unit or the inter-frame prediction image of the current coding unit includes: obtaining the inter-frame prediction image from the historical candidate motion information list and the Obtain the motion information of the current coding tree unit or current coding unit and the motion information index of the motion information from a combination of the current candidate motion information lists; according to the motion information of the current coding tree unit or current coding unit, The current coding tree unit or the current coding unit performs inter-frame prediction to obtain an inter-frame prediction image; the residual calculation module 1503 is used to compare the original image of the current coding tree unit or the current coding unit with the obtained inter-frame prediction image. Predicted images are subtracted to obtain a residual image; and an encoding module 1505 is used to encode the residual image and the motion information index to form a code stream.

图16是本发明提供的一种解码装置1600,该解码装置具备实施前述图13中的解码方法的功能,其包括有:帧间预测装置1601(与帧间预测装置1400相同),用于,获取当前编码树单元的帧间预测图像或者当前编码单元的帧间预测图像;以及,重建模块(1603),用于,将所获得的帧间预测图像与所述当前编码树单元或者所述当前编码单元的残差图像相加,获得所述当前编码树单元或者所述当前编码单元的重建图像。Figure 16 is a decoding device 1600 provided by the present invention. The decoding device has the function of implementing the decoding method in Figure 13. It includes: an inter-frame prediction device 1601 (same as the inter-frame prediction device 1400), used for, Obtain the inter-frame prediction image of the current coding tree unit or the inter-frame prediction image of the current coding unit; and, a reconstruction module (1603), used to compare the obtained inter-frame prediction image with the current coding tree unit or the current coding tree unit. The residual images of the coding units are added to obtain the current coding tree unit or the reconstructed image of the current coding unit.

图17是本发明提供的一种用于实施图11至图13中的方法的设备的通用示意图,所述的设备1700可以是,帧间预测设备,编码设备,以及解码设备,所述设备包括有,一种帧间预测设备,其包括数字处理器1701以及存储器1702,在所述存储器中存储有可执行的指令集,所述数字处理器读取存储在所述存储器中的指令集用于实现图11至13中描述的方法。Figure 17 is a general schematic diagram of a device for implementing the methods in Figures 11 to 13 provided by the present invention. The device 1700 can be an inter-frame prediction device, a coding device, and a decoding device. The device includes There is an inter-frame prediction device, which includes a digital processor 1701 and a memory 1702. An executable instruction set is stored in the memory. The digital processor reads the instruction set stored in the memory for use. Implement the methods described in Figures 11 to 13.

在一个或一个以上实例中,所描述功能可以硬件、软件、固件或其任何组合来实施。如果在软件中实施,那么所述功能可作为一或多个指令或代码在计算机可读介质上存储或传输,并且由基于硬件的处理单元执行。计算机可读介质可以包含计算机可读存储介质,其对应于例如数据存储介质或通信介质的有形介质,通信介质例如根据通信协议包含有助于将计算机程序从一处传送到另一处的任何介质。以此方式,计算机可读介质通常可对应于(1)非暂时性的有形计算机可读存储介质,或(2)通信介质,例如,信号或载波。数据存储介质可以是可由一或多个计算机或一或多个处理器存取以检索用于实施本发明中描述的技术的指令、代码和/或数据结构的任何可用介质。计算机程序产品可包含计算机可读介质。In one or more instances, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or transmitted on a computer-readable medium as one or more instructions or code, and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media that correspond to tangible media, such as data storage media or communication media, including any medium that facilitates transfer of a computer program from one place to another according to a communications protocol. . In this manner, computer-readable media generally may correspond to (1) non-transitory tangible computer-readable storage media, or (2) communication media, such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and/or data structures for implementing the techniques described in this disclosure. A computer program product may include computer-readable media.

借助于实例而非限制,此类计算机可读存储介质可包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储器、磁盘存储器或其它磁性存储设备、闪存,或可用以存储呈指令或数据结构形式的所需程序代码且可由计算机存取的任何其它介质。并且,任何连接可适当地称为计算机可读介质。举例来说,如果使用同轴电缆、光纤缆线、双绞线、数字订户线(digitalsubscriber line,DSL)或例如红外线、无线电及微波等无线技术从网站、服务器或其它远程源传输指令,则同轴电缆、光纤缆线、双绞线、DSL或例如红外线、无线电及微波等无线技术包含在介质的定义中。但是,应理解,所述计算机可读存储介质及数据存储介质并不包括连接、载波、信号或其它暂时性介质,而是实际上针对于非暂时性有形存储介质。如本文中所使用,磁盘和光盘包含压缩光盘(compact disc,CD)、激光光盘、光学光盘、数字多功能光盘(digital versatile disc,DVD)、软性磁盘及蓝光光盘,其中磁盘通常以磁性方式再现数据,而光盘用激光以光学方式再现数据。以上各项的组合也应包含于计算机可读介质的范围内。By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or may be used to store instructions or data structures in the form of any other medium that contains the required program code and is accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, if coaxial cables, fiber optic cables, twisted pairs, digital subscriber lines (DSL), or wireless technologies such as infrared, radio, and microwave are used to transmit instructions from a website, server, or other remote source, the same Axial cables, fiber optic cables, twisted pairs, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but are actually directed to non-transitory tangible storage media. As used herein, disks and optical discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks are usually magnetically Reproduce data, whereas discs use lasers to reproduce data optically. Combinations of the above should also be included within the scope of computer-readable media.

指令可以由一或多个处理器执行,所述一或多个处理器例如是一或多个数字信号处理器(digital signal processor,DSP)、通用微处理器、专用集成电路(applicationspecific integrated circuit,ASIC)、现场可编程逻辑阵列(field programmable logicarrays,FPGA)或其它等效的集成或离散逻辑电路。因此,如本文中所使用的术语“处理器”可指代上述结构或适用于实施本文中所描述的技术的任何其它结构中的任一者。另外,在一些方面中,本文中所描述的功能性可在用于编码和解码的专用硬件和/或软件模块内提供,或并入在合成编解码器中。并且,所述技术可完全实施于一或多个电路或逻辑元件中。The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (Application Specific Integrated Circuits). ASIC), field programmable logic arrays (FPGA) or other equivalent integrated or discrete logic circuits. Accordingly, the term "processor" as used herein may refer to any of the structures described above or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein may be provided within dedicated hardware and/or software modules for encoding and decoding, or incorporated into a synthetic codec. Furthermore, the techniques described may be entirely implemented in one or more circuits or logic elements.

本公开的技术可以在包含无线手持机、集成电路(integrated circuit,IC)或IC集合(例如,芯片组)的多种设备或装置中实施。本公开描述各种组件、模块或单元是为了强调用于执行所揭示的技术的设备的功能方面,但未必需要通过不同硬件单元实现。确切地,如上文所描述,各种单元可结合合适的软件和/或固件组合在编解码器硬件单元中,或由互操作硬件单元的集合来提供,所述硬件单元包含如上文所描述的一或多个处理器。The techniques of the present disclosure may be implemented in a variety of devices or devices including wireless handsets, integrated circuits (ICs), or collections of ICs (eg, chipsets). This disclosure describes various components, modules or units in order to emphasize functional aspects of devices for performing the disclosed techniques, but does not necessarily require implementation by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit in conjunction with suitable software and/or firmware, or provided by a collection of interoperating hardware units including One or more processors.

Claims (19)

1.一种编码方法,其特征在于,包括:1. An encoding method, characterized in that it includes: 初始化与当前编码树单元对应的历史候选运动信息列表,其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;Initialize the historical candidate motion information list corresponding to the current coding tree unit, wherein the historical candidate motion information list includes N storage spaces, the N storage spaces are used to store historical candidate motion information, and the initialized history The candidate motion information list includes at least M vacant storage spaces, where M≤N, M and N are integers, and the current coding tree unit is included in a coding tree unit set (Slice) composed of multiple coding tree units, so The current coding tree unit is not the first one in the coding tree unit set according to a predetermined processing order; 按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,所述空域相邻块内M≤L≤N个位置根据预设的规则得到;Add motion information at L positions within the spatial adjacent blocks of the current coding tree unit to the historical candidate motion information list in a predetermined order, where M≤L≤N within the spatial adjacent blocks The position is obtained according to preset rules; 构建所述当前编码树单元的当前候选运动信息列表或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;以及Constructing a current candidate motion information list of the current coding tree unit or a current candidate motion information list of the current coding unit, wherein the coding unit is divided by the coding tree unit; and 从所述历史候选运动信息列表与所述当前编码树单元的当前候选运动信息列表的组合中或者从所述历史候选运动信息列表与所述当前编码单元的当前候选运动信息列表的组合中,获取所述当前编码树单元或者所述当前编码单元的运动信息,以及所述运动信息的运动信息索引;Obtained from a combination of the historical candidate motion information list and a current candidate motion information list of the current coding tree unit or from a combination of the historical candidate motion information list and a current candidate motion information list of the current coding unit The motion information of the current coding tree unit or the current coding unit, and the motion information index of the motion information; 根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者所述当前编码单元进行帧间预测,获得帧间预测块;According to the motion information of the current coding tree unit or the current coding unit, perform inter prediction on the current coding tree unit or the current coding unit to obtain an inter prediction block; 将所述当前编码树单元或者所述当前编码单元与所述获得的帧间预测块相减获得残差块;以及,对所述残差块以及所述运动信息索引进行编码形成码流。Subtract the current coding tree unit or the current coding unit from the obtained inter prediction block to obtain a residual block; and encode the residual block and the motion information index to form a code stream. 2.如权利要求1所述的方法,其特征在于:所述初始化与当前编码树单元对应的历史候选运动信息列表包括,清空所述历史候选运动信息列表,使得M=N。2. The method of claim 1, wherein the initializing the historical candidate motion information list corresponding to the current coding tree unit includes clearing the historical candidate motion information list such that M=N. 3.如权利要求1所述的方法,其特征在于:所述空域相邻块内M个位置为,从所述空域相邻块内预设位置获取第一个候选运动信息,以获取所述第一个候选运动信息的位置为起点,以预设的步长为间隔获取剩余的M-1个候选运动信息。3. The method according to claim 1, characterized in that: the M positions in the adjacent blocks in the spatial domain are: the first candidate motion information is obtained from the preset positions in the adjacent blocks in the spatial domain to obtain the The position of the first candidate motion information is used as the starting point, and the remaining M-1 candidate motion information is obtained at preset step intervals. 4.如权利要求3所述的方法,其特征在于:所述预设的步长为固定值,或者所述预设的步长根据预设规则变化。4. The method of claim 3, wherein the preset step size is a fixed value, or the preset step size changes according to a preset rule. 5.如权利要求1-4任意一项所述的方法,其特征在于:所述方法还包括:5. The method according to any one of claims 1-4, characterized in that: the method further includes: 基于所述当前编码单元的运动信息更新所述历史候选运动信息列表。The historical candidate motion information list is updated based on the motion information of the current coding unit. 6.如权利要求5所述的方法,其特征在于:所述基于所述当前编码单元的运动信息更新所述历史候选运动信息列表,包括:6. The method of claim 5, wherein updating the historical candidate motion information list based on the motion information of the current coding unit includes: 若所述M个位置并未填满,则将所述当前编码单元的运动信息作为历史运动信息,加入所述历史候选运动信息列表内所述M个位置中距离N-M位置最近的空置的存储空间内;或者;If the M positions are not filled, the motion information of the current coding unit is used as historical motion information and added to the vacant storage space closest to the N-M position among the M positions in the historical candidate motion information list. within; or; 若所述M个位置已填满,则按照先入先出的原则将最早加入所述历史候选运动信息列表内的历史运动信息移除,并将剩余历史运动信息向被移除的历史运动信息位置移位后,将所述当前编码单元的运动信息作为历史运动信息加入所述历史候选运动信息列表的尾部,其中,所述历史候选运动信息列表中包含最新加入的历史运动信息的一端为所述历史候选运动信息列表的尾部。If the M positions have been filled, the historical motion information that was first added to the historical candidate motion information list will be removed according to the first-in, first-out principle, and the remaining historical motion information will be moved to the removed historical motion information position. After the shift, the motion information of the current coding unit is added to the end of the historical candidate motion information list as historical motion information, wherein the end of the historical candidate motion information list containing the latest added historical motion information is the The end of the list of historical candidate motion information. 7.如权利要求1-6任意一项所述的方法,其特征在于:所述按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,包括:7. The method according to any one of claims 1 to 6, characterized in that: adding the motion information at L positions in the spatial adjacent blocks of the current coding tree unit to the said The list of historical candidate sports information includes: 按照顺时针的顺序,以所述当前编码树单元的左下角的空域相邻块为起点,以所述当前编码树单元右上角的空域相邻块为终点,将所述空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中。In clockwise order, with the spatial adjacent block in the lower left corner of the current coding tree unit as the starting point and the spatial adjacent block in the upper right corner of the current coding tree unit as the end point, L within the spatial adjacent block is The motion information at positions is added to the historical candidate motion information list. 8.一种解码方法,其特征在于,包括:8. A decoding method, characterized by comprising: 初始化与当前编码树单元对应的历史候选运动信息列表,其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;Initialize the historical candidate motion information list corresponding to the current coding tree unit, wherein the historical candidate motion information list includes N storage spaces, the N storage spaces are used to store historical candidate motion information, and the initialized history The candidate motion information list includes at least M vacant storage spaces, where M≤N, M and N are integers, and the current coding tree unit is included in a coding tree unit set (Slice) composed of multiple coding tree units, so The current coding tree unit is not the first one in the coding tree unit set according to a predetermined processing order; 按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,所述空域相邻块内M≤L≤N个位置根据预设的规则得到;Add motion information at L positions within the spatial adjacent blocks of the current coding tree unit to the historical candidate motion information list in a predetermined order, where M≤L≤N within the spatial adjacent blocks The position is obtained according to preset rules; 构建所述当前编码树单元的当前候选运动信息列表或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;以及Constructing a current candidate motion information list of the current coding tree unit or a current candidate motion information list of the current coding unit, wherein the coding unit is divided by the coding tree unit; and 从所述历史候选运动信息列表与所述当前编码树单元的当前候选运动信息列表的组合中或者从所述历史候选运动信息列表与所述当前编码单元的当前候选运动信息列表的组合中,获取所述当前编码树单元或者所述当前编码单元的运动信息,以及所述运动信息的运动信息索引;Obtained from a combination of the historical candidate motion information list and a current candidate motion information list of the current coding tree unit or from a combination of the historical candidate motion information list and a current candidate motion information list of the current coding unit The motion information of the current coding tree unit or the current coding unit, and the motion information index of the motion information; 根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测,获得帧间预测块;According to the motion information of the current coding tree unit or the current coding unit, perform inter-frame prediction on the current coding tree unit or the current coding unit to obtain an inter-frame prediction block; 将所述获得的帧间预测块与所述当前编码树单元或者所述当前编码单元的残差块相加,获得所述当前编码树单元或者所述当前编码单元的重建块。The obtained inter prediction block is added to the current coding tree unit or the residual block of the current coding unit to obtain the current coding tree unit or the reconstruction block of the current coding unit. 9.一种编码装置,其特征在于包括:9. An encoding device, characterized by comprising: 初始化模块,用于,初始化与当前编码树单元对应的历史候选运动信息列表,其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;An initialization module, configured to initialize a historical candidate motion information list corresponding to the current coding tree unit, wherein the historical candidate motion information list includes N storage spaces, and the N storage spaces are used to store historical candidate motion information, The initialized historical candidate motion information list includes at least M vacant storage spaces, where M≤N, M and N are integers, and the current coding tree unit is included in a coding tree unit set composed of multiple coding tree units. (Slice), the current coding tree unit is not the first one in the coding tree unit set according to the predetermined processing order; 历史候选运动信息列表构建模块,其用于,按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,所述空域相邻块内M≤L≤N个位置根据预设的规则得到;A historical candidate motion information list building module configured to add motion information at L positions within the spatial adjacent blocks of the current coding tree unit to the historical candidate motion information list in a predetermined order, wherein: The M≤L≤N positions in the adjacent blocks in the above-mentioned airspace are obtained according to the preset rules; 当前候选运动信息列表构建模块,其用于,构建所述当前编码树单元的当前候选运动信息列表或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;以及A current candidate motion information list construction module, configured to construct a current candidate motion information list of the current coding tree unit or a current candidate motion information list of the current coding unit, wherein the coding unit is divided by the coding tree unit; as well as 获取模块,用于,从所述历史候选运动信息列表与所述当前编码树单元的当前候选运动信息列表的组合中或者从所述历史候选运动信息列表与所述当前编码单元的当前候选运动信息列表的组合中,获取所述当前编码树单元或者当前编码单元的运动信息,以及所述运动信息的运动信息索引;Obtaining module, configured to obtain from a combination of the historical candidate motion information list and the current candidate motion information list of the current coding tree unit or from the historical candidate motion information list and the current candidate motion information of the current coding unit. In the combination of lists, obtain the motion information of the current coding tree unit or the current coding unit, and the motion information index of the motion information; 预测模块,用于,根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测,获得帧间预测块;A prediction module, configured to perform inter-frame prediction on the current coding tree unit or the current coding unit according to the motion information of the current coding tree unit or the current coding unit, and obtain an inter-frame prediction block; 残差计算模块,用于,将所述当前编码树单元或者所述当前编码单元与将所获得的帧间预测块相减获得残差块;A residual calculation module, configured to subtract the current coding tree unit or the current coding unit from the obtained inter prediction block to obtain a residual block; 编码模块,用于对所述残差块以及所述运动信息索引进行编码形成码流。An encoding module, configured to encode the residual block and the motion information index to form a code stream. 10.如权利要求9所述的装置,其特征在于:所述初始化模块,用于初始化与当前编码树单元对应的历史候选运动信息列表,具体用于,清空所述历史候选运动信息列表,使得M=N。10. The device of claim 9, wherein the initialization module is configured to initialize a historical candidate motion information list corresponding to the current coding tree unit, and is specifically configured to clear the historical candidate motion information list, so that M=N. 11.如权利要求9所述的装置,其特征在于:所述空域相邻块内M个位置为,从所述空域相邻块内预设位置获取第一个候选运动信息,以获取所述第一个候选运动信息的位置为起点,以预设的步长为间隔获取剩余的M-1个候选运动信息。11. The device of claim 9, wherein the M positions in the spatial adjacent block are: the first candidate motion information is obtained from a preset position in the spatial adjacent block to obtain the The position of the first candidate motion information is used as the starting point, and the remaining M-1 candidate motion information is obtained at preset step intervals. 12.如权利要求11所述的装置,其特征在于:所述预设的步长为固定值,或者所述预设的步长根据预设规则变化。12. The device of claim 11, wherein the preset step size is a fixed value, or the preset step size changes according to a preset rule. 13.如权利要求9-12任意一项所述的装置,其特征在于:所述装置还包括:13. The device according to any one of claims 9-12, characterized in that: the device further includes: 历史运动信息列表更新模块,其用于,基于所述当前编码单元的运动信息更新所述历史候选运动信息列表。A historical motion information list update module, configured to update the historical candidate motion information list based on the motion information of the current coding unit. 14.如权利要求13所述的装置,其特征在于:历史运动信息列表更新模块根据如下规则更新所述历史候选运动信息列表:14. The device of claim 13, wherein the historical motion information list update module updates the historical candidate motion information list according to the following rules: 若所述M个位置并未填满,则将所述当前编码单元的运动信息作为历史运动信息加入所述历史候选运动信息列表内所述M个位置中距离N-M位置最近的空置的存储空间内;或者;If the M positions are not filled, the motion information of the current coding unit is added as historical motion information to the vacant storage space closest to the N-M position among the M positions in the historical candidate motion information list. ;or; 若所述M个位置已填满,则按照先入先出的原则将最早加入所述历史候选运动信息列表内的历史运动信息移除,并将剩余历史运动信息向被移除的历史运动信息位置移位后将所述当前编码单元的运动信息作为历史运动信息加入所述历史候选运动信息列表的尾部,其中,所述历史候选运动信息列表中包含最新加入的历史运动信息的一端为所述历史候选运动信息列表的尾部。If the M positions have been filled, the historical motion information that was first added to the historical candidate motion information list will be removed according to the first-in, first-out principle, and the remaining historical motion information will be moved to the removed historical motion information position. After the shift, the motion information of the current coding unit is added to the end of the historical candidate motion information list as historical motion information, wherein the end of the historical candidate motion information list containing the latest added historical motion information is the historical motion information. The end of the list of candidate motion information. 15.如权利要求9-14任意一项所述的装置,其特征在于:所述历史候选运动信息列表构建模块,用于,15. The device according to any one of claims 9-14, characterized in that: the historical candidate motion information list building module is used to, 按照顺时针的顺序,以所述当前编码树单元的左下角的空域相邻块为起点,以所述当前编码树单元右上角的空域相邻块为终点,将所述空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中。In clockwise order, with the spatial adjacent block in the lower left corner of the current coding tree unit as the starting point and the spatial adjacent block in the upper right corner of the current coding tree unit as the end point, L within the spatial adjacent block is The motion information at positions is added to the historical candidate motion information list. 16.一种解码装置,其特征在于,包括:16. A decoding device, characterized in that it includes: 初始化模块,其用于,初始化与当前编码树单元对应的历史候选运动信息列表,其中,所述历史候选运动信息列表中包括N个存储空间,所述N个存储空间用于存储历史候选运动信息,所述初始化后的历史候选运动信息列表包括至少M空置的存储空间,所述M≤N,M及N为整数,所述当前编码树单元包含于由多个编码树单元构成的编码树单元集合(Slice)中,所述当前编码树单元非所述编码树单元集合中按照预定的处理顺序中的第一个;An initialization module configured to initialize a historical candidate motion information list corresponding to the current coding tree unit, wherein the historical candidate motion information list includes N storage spaces, and the N storage spaces are used to store historical candidate motion information. , the initialized historical candidate motion information list includes at least M vacant storage spaces, where M≤N, M and N are integers, and the current coding tree unit is included in a coding tree unit composed of multiple coding tree units. In the set (Slice), the current coding tree unit is not the first one in the set of coding tree units according to the predetermined processing order; 历史候选运动信息列表构建模块,其用于,按照预定的顺序将所述当前编码树单元的空域相邻块内L个位置处的运动信息增加到所述历史候选运动信息列表中,其中,所述空域相邻块内M≤L≤N个位置根据预设的规则得到;A historical candidate motion information list building module configured to add motion information at L positions within the spatial adjacent blocks of the current coding tree unit to the historical candidate motion information list in a predetermined order, wherein: The M≤L≤N positions in the adjacent blocks in the above-mentioned airspace are obtained according to the preset rules; 当前候选运动信息列表构建模块,其用于,构建所述当前编码树单元的当前候选运动信息列表或者当前编码单元的当前候选运动信息列表,其中所述编码单元由所述编码树单元划分得到;以及A current candidate motion information list construction module, configured to construct a current candidate motion information list of the current coding tree unit or a current candidate motion information list of the current coding unit, wherein the coding unit is divided by the coding tree unit; as well as 获取模块,其用于,从所述历史候选运动信息列表与所述当前编码树单元的当前候选运动信息列表的组合中或者从所述历史候选运动信息列表与所述当前编码单元的当前候选运动信息列表的组合中,获取所述当前编码树单元或者当前编码单元的运动信息,以及所述运动信息的运动信息索引;Obtaining module, configured to obtain from a combination of the historical candidate motion information list and the current candidate motion information list of the current coding tree unit or from the historical candidate motion information list and the current candidate motion of the current coding unit. In the combination of information lists, obtain the motion information of the current coding tree unit or the current coding unit, and the motion information index of the motion information; 预测模块,用于,根据所述当前编码树单元或者当前编码单元的运动信息,对所述当前编码树单元或者当前编码单元进行帧间预测,获得帧间预测块;A prediction module, configured to perform inter-frame prediction on the current coding tree unit or the current coding unit according to the motion information of the current coding tree unit or the current coding unit, and obtain an inter-frame prediction block; 重建模块,其用于,将所获得的帧间预测块与所述当前编码树单元或者所述当前编码单元的残差块相加,获得所述当前编码树单元或者所述当前编码单元的重建块。A reconstruction module configured to add the obtained inter prediction block to the current coding tree unit or the residual block of the current coding unit to obtain the reconstruction of the current coding tree unit or the current coding unit. piece. 17.一种编码设备,其特征在于:其包括数字处理器以及存储器,在所述存储器中存储有可执行的指令集,所述数字处理器读取存储在所述存储器中的指令集用于实现如权利要求1-7任意一项所述的编码方法。17. An encoding device, characterized in that: it includes a digital processor and a memory, an executable instruction set is stored in the memory, and the digital processor reads the instruction set stored in the memory for use Implement the encoding method as described in any one of claims 1-7. 18.一种解码设备,其特征在于:其包括数字处理器以及存储器,在所述存储器中存储有可执行的指令集,所述数字处理器读取存储在所述存储器中的指令集用于实现如权利要求8所述的解码方法。18. A decoding device, characterized in that: it includes a digital processor and a memory, an executable instruction set is stored in the memory, and the digital processor reads the instruction set stored in the memory for use Implement the decoding method as claimed in claim 8. 19.一种服务器,其特征在于,所述服务器包括通信接口和存储器,所述通信接口用于接收和/或发送视频码流,所述存储器用于存储所述视频码流,所述视频码流基于权利要求1-7任意一项所述的编码方法所得到。19. A server, characterized in that the server includes a communication interface and a memory, the communication interface is used to receive and/or send a video code stream, the memory is used to store the video code stream, and the video code stream The stream is obtained based on the encoding method described in any one of claims 1-7.
CN202311245984.5A 2018-08-28 2018-08-28 Encoding method, decoding method, encoding device, and decoding device Pending CN117336483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311245984.5A CN117336483A (en) 2018-08-28 2018-08-28 Encoding method, decoding method, encoding device, and decoding device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810990347.3A CN110868589B (en) 2018-08-28 2018-08-28 Inter-frame prediction method and device and coding/decoding method and device applied by same
CN202311245984.5A CN117336483A (en) 2018-08-28 2018-08-28 Encoding method, decoding method, encoding device, and decoding device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201810990347.3A Division CN110868589B (en) 2018-08-28 2018-08-28 Inter-frame prediction method and device and coding/decoding method and device applied by same

Publications (1)

Publication Number Publication Date
CN117336483A true CN117336483A (en) 2024-01-02

Family

ID=69651830

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202311245984.5A Pending CN117336483A (en) 2018-08-28 2018-08-28 Encoding method, decoding method, encoding device, and decoding device
CN202311245945.5A Pending CN117319650A (en) 2018-08-28 2018-08-28 Encoding method, decoding method, encoding device, and decoding device
CN201810990347.3A Active CN110868589B (en) 2018-08-28 2018-08-28 Inter-frame prediction method and device and coding/decoding method and device applied by same

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN202311245945.5A Pending CN117319650A (en) 2018-08-28 2018-08-28 Encoding method, decoding method, encoding device, and decoding device
CN201810990347.3A Active CN110868589B (en) 2018-08-28 2018-08-28 Inter-frame prediction method and device and coding/decoding method and device applied by same

Country Status (1)

Country Link
CN (3) CN117336483A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119788875A (en) * 2020-07-29 2025-04-08 腾讯科技(深圳)有限公司 Method, device and equipment for constructing motion information list in video coding and decoding
CN112055209B (en) * 2020-08-06 2024-08-02 浙江大华技术股份有限公司 Image encoding method, image processing apparatus, and computer-readable storage medium
CN114079788B (en) 2020-08-20 2024-09-20 腾讯科技(深圳)有限公司 Method, device and equipment for constructing motion information list in video coding and decoding
CN112312131B (en) * 2020-12-31 2021-04-06 腾讯科技(深圳)有限公司 Inter-frame prediction method, device, equipment and computer readable storage medium
CN118251885A (en) * 2021-09-03 2024-06-25 抖音视界有限公司 Method, device and medium for video processing
CN113965753B (en) * 2021-12-20 2022-05-17 康达洲际医疗器械有限公司 Inter-frame image motion estimation method and system based on code rate control

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9066110B2 (en) * 2011-03-08 2015-06-23 Texas Instruments Incorporated Parsing friendly and error resilient merge flag coding in video coding
WO2013077659A1 (en) * 2011-11-24 2013-05-30 에스케이텔레콤 주식회사 Method and apparatus for predictive encoding/decoding of motion vector
US10027981B2 (en) * 2014-09-01 2018-07-17 Hfi Innovation Inc. Method of intra picture block copy for screen content and video coding
US9854237B2 (en) * 2014-10-14 2017-12-26 Qualcomm Incorporated AMVP and merge candidate list derivation for intra BC and inter prediction unification
KR101908249B1 (en) * 2014-11-18 2018-10-15 미디어텍 인크. Method of bi-prediction video coding based on motion vectors from uni-prediction and merge candidate
US11477477B2 (en) * 2015-01-26 2022-10-18 Qualcomm Incorporated Sub-prediction unit based advanced temporal motion vector prediction
EP3298785A4 (en) * 2015-06-03 2019-02-13 MediaTek Inc. Method and apparatus for resource sharing between intra block copy mode and inter prediction mode in video coding systems
US10560718B2 (en) * 2016-05-13 2020-02-11 Qualcomm Incorporated Merge candidates for motion vector prediction for video coding
CN115052142B (en) * 2016-08-01 2025-05-23 韩国电子通信研究院 Image encoding/decoding method
US10721489B2 (en) * 2016-09-06 2020-07-21 Qualcomm Incorporated Geometry-based priority for the construction of candidate lists

Also Published As

Publication number Publication date
CN117319650A (en) 2023-12-29
CN110868589A (en) 2020-03-06
CN110868589B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
JP7622163B2 (en) Video decoder and method
US12267532B2 (en) Video processing method, video processing apparatus, encoder, decoder, medium and computer program
CN112703735B (en) Video encoding/decoding method, related apparatus and computer-readable storage medium
CN112823518A (en) Apparatus and method for inter prediction of triangularly partitioned blocks of coded blocks
CN110868589B (en) Inter-frame prediction method and device and coding/decoding method and device applied by same
KR20210141712A (en) Encoder, Decoder and Corresponding Methods Using IBC Merge List
CN113615173A (en) Method and device for carrying out optical flow prediction correction on affine decoding block
CN113660497A (en) Encoder, decoder and corresponding method using IBC merge lists
CN111010565B (en) Inter-frame prediction method and device and coding/decoding method and device applied by same
CN110958452B (en) Video decoding method and video decoder
KR20250111744A (en) Video processing method and device
CN110944184A (en) Video decoding method and video decoder
WO2020042990A1 (en) Inter-frame prediction method and device, and coding/decoding method and device for application thereof
WO2020055287A1 (en) Video decoder and methods

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载