CN112291558B - Encoding and decoding method, device and equipment thereof - Google Patents
Encoding and decoding method, device and equipment thereof Download PDFInfo
- Publication number
- CN112291558B CN112291558B CN201910668356.5A CN201910668356A CN112291558B CN 112291558 B CN112291558 B CN 112291558B CN 201910668356 A CN201910668356 A CN 201910668356A CN 112291558 B CN112291558 B CN 112291558B
- Authority
- CN
- China
- Prior art keywords
- block
- sub
- prediction mode
- intra
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/136—Incoming video signal characteristics or properties
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
- H04N19/86—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本申请提供一种编解码方法、装置及其设备,该方法包括:在确定对当前块启动基于子块的联合预测时,获取所述当前块的块划分信息;根据所述块划分信息将所述当前块划分为至少两个子块;获取所述至少两个子块分别对应的预测模式信息;根据所述预测模式信息获取所述至少两个子块分别对应的预测值;根据所述至少两个子块分别对应的预测值获取所述当前块的预测值。通过本申请的技术方案,可以提高预测准确性,提高预测性能。
The present application provides a codec method, device and equipment thereof, the method comprising: when it is determined to start sub-block-based joint prediction for the current block, acquiring block division information of the current block; Divide the current block into at least two sub-blocks; obtain prediction mode information corresponding to the at least two sub-blocks; obtain prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtain prediction values corresponding to the at least two sub-blocks according to the at least two sub-blocks The corresponding prediction values respectively obtain the prediction values of the current block. Through the technical solution of the present application, the prediction accuracy can be improved, and the prediction performance can be improved.
Description
技术领域technical field
本申请涉及编解码技术领域,尤其是涉及一种编解码方法、装置及其设备。The present application relates to the technical field of encoding and decoding, and in particular, relates to an encoding and decoding method, device and equipment thereof.
背景技术Background technique
为了达到节约空间的目的,视频图像都是经过编码后才传输的,完整的视频编码方法可以包括预测、变换、量化、熵编码、滤波等过程。其中,预测编码可以包括帧内编码和帧间编码。进一步的,帧间编码是利用视频时间域的相关性,使用邻近已编码图像的像素预测当前像素,以达到有效去除视频时域冗余的目的。此外,帧内编码是指利用视频空间域的相关性,使用当前帧图像的已经编码块的像素预测当前像素,以达到去除视频空域冗余的目的。In order to achieve the purpose of saving space, video images are transmitted after being coded, and a complete video coding method may include processes such as prediction, transformation, quantization, entropy coding, and filtering. Wherein, predictive coding may include intra-frame coding and inter-frame coding. Furthermore, inter-frame coding utilizes the correlation in the temporal domain of the video to predict the current pixel by using pixels adjacent to the coded image, so as to achieve the purpose of effectively removing redundancy in the temporal domain of the video. In addition, intra-frame coding refers to using the correlation of the video spatial domain to use the pixels of the coded block of the current frame image to predict the current pixel, so as to achieve the purpose of removing video spatial redundancy.
在帧间编码中,可以使用运动矢量(Motion Vector,MV)表示当前帧图像的当前块与参考帧图像的参考块的相对位移。例如,当前帧图像A与参考帧图像B存在很强的时域相关性,在需要传输图像A的当前块A1时,可以在图像B中进行运动搜索,找到与当前块A1最匹配的参考块B1,并确定当前块A1与参考块B1的相对位移,即当前块A1的运动矢量。In inter-frame coding, a motion vector (Motion Vector, MV) may be used to represent a relative displacement between a current block of a current frame image and a reference block of a reference frame image. For example, there is a strong temporal correlation between the current frame image A and the reference frame image B. When the current block A1 of image A needs to be transmitted, motion search can be performed in image B to find the reference block that best matches the current block A1 B1, and determine the relative displacement between the current block A1 and the reference block B1, that is, the motion vector of the current block A1.
现有技术中,当前块为矩形,而实际物体的边缘往往不是矩形,对于处于物体边缘的当前块来说,往往存在两个不同对象(如存在前景的物体和背景)。这种情况下,仅采用单一的预测模式为当前块进行预测,存在预测效果不佳,编码残差较大,编码性能差等问题。In the prior art, the current block is a rectangle, but the edge of an actual object is often not a rectangle. For the current block at the edge of the object, there are often two different objects (such as a foreground object and a background). In this case, only a single prediction mode is used to predict the current block, which has problems such as poor prediction effect, large coding residual, and poor coding performance.
发明内容Contents of the invention
本申请提供了一种编解码方法、装置及其设备,提高了预测的准确性。The present application provides an encoding and decoding method, device and equipment thereof, which improve the accuracy of prediction.
本申请提供一种编解码方法,所述方法包括:The present application provides a codec method, the method comprising:
在确定对当前块启动基于子块的联合预测时,获取所述当前块的块划分信息;When determining to start sub-block-based joint prediction for the current block, acquiring block division information of the current block;
根据所述块划分信息将所述当前块划分为至少两个子块;dividing the current block into at least two sub-blocks according to the block division information;
获取所述至少两个子块分别对应的预测模式信息;Obtain prediction mode information respectively corresponding to the at least two sub-blocks;
根据所述预测模式信息获取所述至少两个子块分别对应的预测值;Acquiring prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information;
根据所述至少两个子块分别对应的预测值获取所述当前块的预测值。Acquiring the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks.
本申请提供一种编解码方法,所述方法包括:The present application provides a codec method, the method comprising:
确定当前块启动目标加权预测时,通过以下步骤获取所述当前块的目标预测值,所述目标预测值用于所述当前块的编码或者解码:When it is determined that the current block starts target weighted prediction, the target prediction value of the current block is obtained through the following steps, and the target prediction value is used for encoding or decoding of the current block:
获取所述当前块对应的第一预测模式和第二预测模式;Obtain a first prediction mode and a second prediction mode corresponding to the current block;
根据所述第一预测模式确定所述当前块对应的第一预测值;determining a first prediction value corresponding to the current block according to the first prediction mode;
根据所述第二预测模式确定所述当前块对应的第二预测值;determining a second prediction value corresponding to the current block according to the second prediction mode;
根据所述第一预测值和所述第二预测值进行加权处理,得到所述当前块的目标预测值。Perform weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block.
本申请提供一种编解码装置,所述装置包括:The present application provides a codec device, which includes:
获取模块,用于在确定对当前块启动基于子块的联合预测时,获取当前块的块划分信息;An acquisition module, configured to acquire block division information of the current block when it is determined to start joint prediction based on sub-blocks for the current block;
处理模块,用于根据所述块划分信息将所述当前块划分为至少两个子块;a processing module, configured to divide the current block into at least two sub-blocks according to the block division information;
所述获取模块,还用于获取所述至少两个子块分别对应的预测模式信息;根据所述预测模式信息获取所述至少两个子块分别对应的预测值;根据所述至少两个子块分别对应的预测值获取所述当前块的预测值。The acquiring module is further configured to acquire prediction mode information respectively corresponding to the at least two sub-blocks; acquire predicted values corresponding to the at least two sub-blocks according to the prediction mode information; The prediction value of the current block is obtained.
本申请提供一种编解码装置,所述装置包括:获取模块,用于在确定当前块启动目标加权预测时,获取所述当前块对应的第一预测模式和第二预测模式;The present application provides a codec device, the device comprising: an acquisition module, configured to acquire a first prediction mode and a second prediction mode corresponding to the current block when it is determined that the current block starts target weighted prediction;
确定模块,用于根据所述第一预测模式确定所述当前块对应的第一预测值;根据所述第二预测模式确定所述当前块对应的第二预测值;A determining module, configured to determine a first prediction value corresponding to the current block according to the first prediction mode; determine a second prediction value corresponding to the current block according to the second prediction mode;
处理模块,用于根据所述第一预测值和所述第二预测值进行加权处理,得到所述当前块的目标预测值,所述目标预测值用于所述当前块的编码或者解码。A processing module, configured to perform weighting processing according to the first predictive value and the second predictive value to obtain a target predictive value of the current block, and the target predictive value is used for encoding or decoding of the current block.
本申请提供一种解码端设备,包括:处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;The present application provides a decoding device, including: a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
所述处理器用于执行机器可执行指令,以实现如下步骤:The processor is used to execute machine-executable instructions to implement the following steps:
在确定对当前块启动基于子块的联合预测时,获取所述当前块的块划分信息;根据所述块划分信息将所述当前块划分为至少两个子块;获取所述至少两个子块分别对应的预测模式信息;根据所述预测模式信息获取所述至少两个子块分别对应的预测值;根据所述至少两个子块分别对应的预测值获取所述当前块的预测值;或者,When it is determined to start sub-block-based joint prediction for the current block, acquire block division information of the current block; divide the current block into at least two sub-blocks according to the block division information; acquire the at least two sub-blocks respectively Corresponding prediction mode information; obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
确定当前块启动目标加权预测时,获取所述当前块对应的第一预测模式和第二预测模式;根据所述第一预测模式确定所述当前块对应的第一预测值;根据所述第二预测模式确定所述当前块对应的第二预测值;根据所述第一预测值和所述第二预测值进行加权处理,得到所述当前块的目标预测值,所述目标预测值用于所述当前块的解码。When it is determined that the current block starts target weighted prediction, obtain the first prediction mode and the second prediction mode corresponding to the current block; determine the first prediction value corresponding to the current block according to the first prediction mode; The prediction mode determines the second prediction value corresponding to the current block; performs weighting processing according to the first prediction value and the second prediction value to obtain the target prediction value of the current block, and the target prediction value is used for the current block Describe the decoding of the current block.
本申请提供一种编码端设备,处理器和机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;The present application provides an encoding device, a processor, and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
所述处理器用于执行机器可执行指令,以实现如下步骤:The processor is used to execute machine-executable instructions to implement the following steps:
在确定对当前块启动基于子块的联合预测时,获取所述当前块的块划分信息;根据所述块划分信息将所述当前块划分为至少两个子块;获取所述至少两个子块分别对应的预测模式信息;根据所述预测模式信息获取所述至少两个子块分别对应的预测值;根据所述至少两个子块分别对应的预测值获取所述当前块的预测值;或者,When it is determined to start sub-block-based joint prediction for the current block, acquire block division information of the current block; divide the current block into at least two sub-blocks according to the block division information; acquire the at least two sub-blocks respectively Corresponding prediction mode information; obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
确定当前块启动目标加权预测时,获取所述当前块对应的第一预测模式和第二预测模式;根据所述第一预测模式确定所述当前块对应的第一预测值;根据所述第二预测模式确定所述当前块对应的第二预测值;根据所述第一预测值和所述第二预测值进行加权处理,得到所述当前块的目标预测值,所述目标预测值用于所述当前块的编码。When it is determined that the current block starts target weighted prediction, obtain the first prediction mode and the second prediction mode corresponding to the current block; determine the first prediction value corresponding to the current block according to the first prediction mode; The prediction mode determines the second prediction value corresponding to the current block; performs weighting processing according to the first prediction value and the second prediction value to obtain the target prediction value of the current block, and the target prediction value is used for the current block Describe the encoding of the current block.
由以上技术方案可见,本申请实施例中,在确定对当前块启动基于子块的联合预测时,可以将当前块划分为至少两个子块,并获取所述至少两个子块分别对应的预测值,并根据所述至少两个子块分别对应的预测值获取当前块的预测值。在上述方式中,可以针对至少两个子块分别进行预测,可以提高预测准确性,提高预测性能,提高编码性能,降低编码残差。It can be seen from the above technical solutions that in the embodiment of the present application, when it is determined to start the sub-block-based joint prediction for the current block, the current block can be divided into at least two sub-blocks, and the prediction values corresponding to the at least two sub-blocks can be obtained respectively , and obtain the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks. In the above manner, at least two sub-blocks can be predicted separately, which can improve prediction accuracy, improve prediction performance, improve coding performance, and reduce coding residual.
附图说明Description of drawings
图1是本申请一种实施方式中的视频编码框架的示意图;FIG. 1 is a schematic diagram of a video coding framework in an embodiment of the present application;
图2是本申请一种实施方式中的编解码方法的流程图;FIG. 2 is a flow chart of an encoding and decoding method in an embodiment of the present application;
图3A-图3H是本申请一种实施方式中的当前块的划分示意图;3A-3H are schematic diagrams of division of the current block in an embodiment of the present application;
图4A-图4D是帧内块拷贝预测模式与帧内块拷贝预测模式的示意图;4A-4D are schematic diagrams of an intra block copy prediction mode and an intra block copy prediction mode;
图5A-图5H是帧内块拷贝预测模式与帧间预测模式的示意图;5A-5H are schematic diagrams of an intra block copy prediction mode and an inter prediction mode;
图5I-图5L是基于周围块预测模式确定帧内块拷贝预测模式与帧间预测模式的示意图;FIG. 5I-FIG. 5L are schematic diagrams of determining an intra block copy prediction mode and an inter prediction mode based on surrounding block prediction modes;
图6A-图6H是帧内块拷贝预测模式与帧内预测模式的示意图;6A-6H are schematic diagrams of intra block copy prediction mode and intra prediction mode;
图7A-图7D是基于周围块预测模式确定帧内块拷贝预测模式与帧内预测模式的示意图;7A-7D are schematic diagrams of determining an intra block copy prediction mode and an intra prediction mode based on surrounding block prediction modes;
图8A-图8D是帧内预测模式与帧内预测模式的示意图;8A-8D are schematic diagrams of intra prediction mode and intra prediction mode;
图9A-图9D是帧内预测模式与帧间预测模式的示意图;9A-9D are schematic diagrams of intra prediction mode and inter prediction mode;
图10A-图10D是基于周围块预测模式确定帧内预测模式与帧间预测模式的示意图;10A-10D are schematic diagrams of determining an intra prediction mode and an inter prediction mode based on surrounding block prediction modes;
图11A-图11D是帧间预测模式与帧间预测模式的示意图;11A-11D are schematic diagrams of inter prediction mode and inter prediction mode;
图12A-图12F是本申请一种实施方式中的预测值的获取过程示意图;12A-12F are schematic diagrams of the process of obtaining the predicted value in an embodiment of the present application;
图13是本申请一种实施方式中的编解码方法的流程图;FIG. 13 is a flow chart of an encoding and decoding method in an embodiment of the present application;
图14是本申请一种实施方式中的编解码装置的结构示意图;FIG. 14 is a schematic structural diagram of a codec device in an embodiment of the present application;
图15是本申请一种实施方式中的编解码装置的结构示意图;FIG. 15 is a schematic structural diagram of a codec device in an embodiment of the present application;
图16是本申请一种实施方式中的解码端设备的硬件结构图;FIG. 16 is a hardware structural diagram of a decoder device in an embodiment of the present application;
图17是本申请一种实施方式中的编码端设备的硬件结构图。Fig. 17 is a hardware structural diagram of an encoding end device in an implementation manner of the present application.
具体实施方式Detailed ways
在本申请实施例使用的术语仅仅是出于描述特定实施例的目的,而非限制本申请。本申请实施例和权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。还应当理解,本文中使用的术语“和/或”是指包含一个或多个相关联的列出项目的任何或所有可能组合。应当理解,尽管在本申请实施例可能采用术语第一、第二、第三等来描述各种信息,但是,这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请实施例范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the embodiments and claims of this application are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. It should be understood that although the embodiments of the present application may use terms such as first, second, and third to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of the embodiments of the present application, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, furthermore, the use of the word "if" could be interpreted as "at" or "when" or "in response to a determination."
本申请实施例中提出一种编解码方法、装置及其设备,可以涉及如下概念:In the embodiment of this application, a codec method, device and equipment are proposed, which may involve the following concepts:
帧内预测、帧间预测(intra prediction and inter prediction)与IBC(帧内块拷贝)预测:Intra prediction, inter prediction (intra prediction and inter prediction) and IBC (intra block copy) prediction:
帧内预测是指,利用视频空间域的相关性,使用当前图像已编码块的像素预测当前像素,以达到去除视频空域冗余的目的。帧内预测中规定了多种预测模式,每一种预测模式都对应一种纹理方向(DC模式除外),当前块预测像素由其预测方向上相邻块的边界重构像素值生成。例如,如果图像的纹理是呈现水平状排布,则水平预测模式可以更好的预测图像信息。Intra-frame prediction refers to using the correlation of the video spatial domain to predict the current pixel using the pixels of the encoded block of the current image, so as to achieve the purpose of removing video spatial redundancy. A variety of prediction modes are specified in intra prediction, and each prediction mode corresponds to a texture direction (except DC mode), and the current block prediction pixel is generated from the boundary reconstructed pixel value of the adjacent block in the prediction direction. For example, if the texture of the image is arranged horizontally, the horizontal prediction mode can better predict the image information.
帧间预测是指,基于视频时域的相关性,由于视频序列包含有较强的时域相关性,使用邻近已编码图像像素预测当前图像的像素,可以达到有效去除视频时域冗余的目的。视频编码标准帧间预测部分都采用了基于块的运动补偿技术,主要原理是为当前图像的每一个像素块在之前已编码图像中寻找一个最佳匹配块,该过程称为运动估计(MotionEstimation,ME)。Inter-frame prediction means that based on the temporal correlation of the video, since the video sequence contains strong temporal correlation, using adjacent encoded image pixels to predict the pixels of the current image can achieve the purpose of effectively removing video temporal redundancy. . The inter-frame prediction part of the video coding standard uses block-based motion compensation technology. The main principle is to find a best matching block in the previously coded image for each pixel block of the current image. This process is called motion estimation (MotionEstimation, ME).
帧内块拷贝(IBC,Intra Block Copy)是指,允许同帧参考,当前块的参考数据来自同一帧,帧内块拷贝也可以称为帧内块复制。在HEVC(High Efficiency Video Coding,高效率视频编码)的屏幕内容编码(Screen Content Coding)扩展标准中,帧内块拷贝技术被提出,使用块矢量获取当前块的预测值。基于屏幕内容中同一帧内存在大量重复出现的纹理这一特性,在采用块矢量获取当前块的预测值时,能够显著的提升屏幕内容序列的压缩效率。随之,在VVC(Versatile Video Coding,通用视频编码)标准制定期间,帧内块拷贝技术再次被采纳。Intra Block Copy (IBC, Intra Block Copy) means that the same frame reference is allowed, the reference data of the current block comes from the same frame, and the intra block copy may also be called intra block copy. In the Screen Content Coding (Screen Content Coding) extension standard of HEVC (High Efficiency Video Coding, high-efficiency video coding), an intra-frame block copy technology is proposed, and a block vector is used to obtain a predictive value of a current block. Based on the feature that there are a large number of repeated textures in the same frame of the screen content, when the block vector is used to obtain the predicted value of the current block, the compression efficiency of the screen content sequence can be significantly improved. Subsequently, during the formulation of the VVC (Versatile Video Coding, universal video coding) standard, the intra-frame block copy technology is adopted again.
运动矢量(Motion Vector,MV):在帧间编码中,可以使用运动矢量表示当前帧视频图像的当前块与参考帧视频图像的参考块之间的相对位移。每个划分的块都有相应的运动矢量传送到解码端,如果对每个块的运动矢量进行独立编码和传输,特别是划分成小尺寸的大量块,则消耗相当多的比特。为降低用于编码运动矢量的比特数,可以利用相邻块之间的空间相关性,根据相邻已编码块的运动矢量对当前待编码块的运动矢量进行预测,然后对预测差进行编码,这样可以有效降低表示运动矢量的比特数。进一步的,在对当前块的运动矢量进行编码的过程中,可以先使用相邻已编码块的运动矢量预测当前块的运动矢量,然后对该运动矢量的预测值(MVP,Motion Vector Prediction)与运动矢量的真正估值之间的差值(MVD,MotionVector Difference)进行编码,从而有效降低运动矢量的编码比特数。Motion Vector (Motion Vector, MV): In inter-frame coding, the motion vector can be used to represent the relative displacement between the current block of the current frame video image and the reference block of the reference frame video image. Each divided block has a corresponding motion vector transmitted to the decoding end. If the motion vector of each block is encoded and transmitted independently, especially if it is divided into a large number of small-sized blocks, quite a lot of bits will be consumed. In order to reduce the number of bits used to encode the motion vector, the spatial correlation between adjacent blocks can be used to predict the motion vector of the current block to be encoded according to the motion vector of the adjacent encoded block, and then encode the prediction difference, This can effectively reduce the number of bits representing the motion vector. Further, in the process of encoding the motion vector of the current block, the motion vector of the current block can be predicted by using the motion vector of the adjacent coded block, and then the prediction value (MVP, Motion Vector Prediction) of the motion vector and The difference (MVD, MotionVector Difference) between the real estimates of the motion vectors is encoded, thereby effectively reducing the number of encoding bits of the motion vectors.
运动信息(Motion Information):由于运动矢量表示当前块与某个参考块之间的位置偏移,为了准确的获取指向块的信息,除了运动矢量,还需要参考帧图像的索引信息来表示当前块使用哪个参考帧图像。在视频编码技术中,对于当前帧图像,通常可以建立一个参考帧图像列表,参考帧图像索引信息则表示当前块采用了参考帧图像列表中的第几个参考帧图像。此外,很多编码技术还支持多个参考图像列表,因此,还可以使用一个索引值来表示使用了哪一个参考图像列表,这个索引值可以称为参考方向。综上所述,在视频编码技术中,可以将运动矢量、参考帧索引、参考方向等与运动相关的信息统称为运动信息。Motion Information: Since the motion vector represents the position offset between the current block and a reference block, in order to accurately obtain the information pointing to the block, in addition to the motion vector, the index information of the reference frame image is also required to represent the current block Which reference frame image to use. In video coding technology, for the current frame image, a reference frame image list can usually be established, and the reference frame image index information indicates which reference frame image in the reference frame image list is used for the current block. In addition, many encoding technologies also support multiple reference picture lists, therefore, an index value can also be used to indicate which reference picture list is used, and this index value can be called a reference direction. To sum up, in the video coding technology, information related to motion, such as a motion vector, a reference frame index, and a reference direction, may be collectively referred to as motion information.
块矢量(Block Vector,BV):块矢量应用在帧内块拷贝技术中,帧内块拷贝技术是使用块矢量进行运动补偿,即采用块矢量获取当前块的预测值。与运动矢量不同的是,块矢量表示当前块与当前帧已编码块中的最佳匹配块之间的相对位移。基于同一帧内存在大量重复纹理这一特性,在采用块矢量获取当前块的预测值时,能够显著提升压缩效率。Block Vector (Block Vector, BV): The block vector is applied in the intra-frame block copy technology. The intra-frame block copy technology uses the block vector for motion compensation, that is, the block vector is used to obtain the prediction value of the current block. Unlike motion vectors, block vectors represent the relative displacement between the current block and the best matching block among the encoded blocks of the current frame. Based on the fact that there are a large number of repeated textures in the same frame, when the block vector is used to obtain the prediction value of the current block, the compression efficiency can be significantly improved.
帧内预测模式:在帧内编码中,可以使用帧内预测模式进行运动补偿,即采用帧内预测模式获取当前块的预测值。例如,帧内预测模式可以包含Planar模式,DC模式以及33种角度模式。参见表1所示,为帧内预测模式的示例,Planar模式对应模式0,DC模式对应模式1,其余的33种角度模式对应模式1-模式34。Planar模式适用于像素值缓慢变化的区域,使用水平方向和垂直方向的两个线性滤波器,并将两者的平均值作为当前块像素的预测值。DC模式适用于大面积平坦区域,将当前块的周围像素的平均值作为当前块的预测像素值。角度模式可以有33种角度,模式26表示垂直方向,模式10表示水平方向。在最新制定的新一代编解码标准VVC中,采用了更细分的角度方向,如共有67种角度模式。Intra-frame prediction mode: In intra-frame coding, the intra-frame prediction mode can be used for motion compensation, that is, the intra-frame prediction mode is used to obtain the predicted value of the current block. For example, intra prediction modes may include Planar mode, DC mode and 33 angle modes. See Table 1 for an example of the intra prediction mode, the Planar mode corresponds to mode 0, the DC mode corresponds to
表1Table 1
率失真原则(Rate-Distortion Optimized):评价编码效率的有两大指标:码率和PSNR(Peak Signal to Noise Ratio,峰值信噪比),比特流越小,则压缩率越大,PSNR越大,则重建图像质量越好,在模式选择时,判别公式实质上也就是对二者的综合评价。例如,模式对应的代价:J(mode)=D+λ*R,其中,D表示Distortion(失真),通常可以使用SSE指标来进行衡量,SSE是指重建图像块与源图像的差值的均方和;λ是拉格朗日乘子,R就是该模式下图像块编码所需的实际比特数,包括编码模式信息、运动信息、残差等所需的比特总和。Rate-Distortion Optimized (Rate-Distortion Optimized): There are two indicators for evaluating coding efficiency: code rate and PSNR (Peak Signal to Noise Ratio, peak signal-to-noise ratio). The smaller the bit stream, the greater the compression rate and the greater the PSNR , the better the quality of the reconstructed image is, the discriminant formula is essentially a comprehensive evaluation of the two when selecting the mode. For example, the cost corresponding to the mode: J(mode)=D+λ*R, where D represents Distortion (distortion), which can usually be measured using the SSE index, and SSE refers to the average difference between the reconstructed image block and the source image Square sum; λ is the Lagrangian multiplier, and R is the actual number of bits required for image block coding in this mode, including the sum of bits required for coding mode information, motion information, residuals, etc.
视频编码框架:参见图1所示,可以使用视频编码框架实现本申请实施例的编码端处理流程,此外,视频解码框架的示意图与图1类似,在此不再重复赘述,可以使用视频解码框架实现本申请实施例的解码端处理流程。具体的,在视频编码框架和视频解码框架中,可以包括帧内预测、运动估计/运动补偿、参考图像缓冲器、环内滤波、重建、变换、量化、反变换、反量化、熵编码器等模块。在编码端,通过这些模块之间的配合,可以实现编码端处理流程,在解码端,通过这些模块之间的配合,可以实现解码端处理流程。Video coding framework: See Figure 1, the video coding framework can be used to implement the encoding end processing flow of the embodiment of the present application. In addition, the schematic diagram of the video decoding framework is similar to that of Figure 1, and will not be repeated here, and the video decoding framework can be used Realize the decoding end processing flow of the embodiment of the present application. Specifically, in the video coding framework and the video decoding framework, it may include intra prediction, motion estimation/motion compensation, reference image buffer, in-loop filtering, reconstruction, transformation, quantization, inverse transformation, inverse quantization, entropy encoder, etc. module. At the encoding end, through the cooperation between these modules, the processing flow at the encoding end can be realized, and at the decoding end, through the cooperation between these modules, the processing flow at the decoding end can be realized.
以下结合几个具体实施例,对编解码方法进行详细说明。The codec method will be described in detail below in conjunction with several specific embodiments.
实施例1:参见图2所示,为本申请实施例中的编解码方法的流程示意图,该编解码方法可以应用于解码端或者编码端,该编解码方法可以包括以下步骤:Embodiment 1: Referring to FIG. 2 , it is a schematic flow diagram of the encoding and decoding method in the embodiment of the present application. The encoding and decoding method can be applied to the decoding end or the encoding end. The encoding and decoding method can include the following steps:
步骤201,在确定对当前块启动基于子块的联合预测时,获取当前块的块划分信息。
步骤202,根据该块划分信息将当前块划分为至少两个子块。
为了方便描述,本申请实施例中,以将当前块划分为两个子块为例进行说明,也就是说,根据该块划分信息将当前块划分为第一子块和第二子块。对于将当前块划分为三个或者三个以上的子块的情况,其实现过程与两个子块的实现过程类似,后续不再赘述。For convenience of description, in this embodiment of the present application, the current block is divided into two sub-blocks as an example for illustration, that is, the current block is divided into a first sub-block and a second sub-block according to the block division information. For the case of dividing the current block into three or more sub-blocks, the implementation process is similar to the implementation process of two sub-blocks, and will not be repeated hereafter.
步骤203,获取至少两个子块分别对应的预测模式信息。
例如,获取第一子块对应的预测模式信息,并获取第二子块对应的预测模式信息。For example, the prediction mode information corresponding to the first sub-block is obtained, and the prediction mode information corresponding to the second sub-block is obtained.
步骤204,根据至少两个子块分别对应的预测模式信息,获取所述至少两个子块分别对应的预测值。例如,根据第一子块对应的预测模式信息获取第一子块对应的预测值,并根据第二子块对应的预测模式信息获取第二子块对应的预测值。
步骤205,根据至少两个子块分别对应的预测值获取当前块的预测值。Step 205: Obtain the predicted value of the current block according to the predicted values respectively corresponding to at least two sub-blocks.
由以上技术方案可见,本实施例中,在确定对当前块启动基于子块的联合预测时,可以将当前块划分为至少两个子块,并获取所述至少两个子块分别对应的预测值,并根据所述至少两个子块分别对应的预测值获取当前块的预测值。在上述方式中,可以针对至少两个子块分别进行预测,可以提高预测准确性,提高预测性能,提高编码性能,降低编码残差。It can be seen from the above technical solutions that in this embodiment, when it is determined to start joint prediction based on sub-blocks for the current block, the current block may be divided into at least two sub-blocks, and the prediction values corresponding to the at least two sub-blocks are obtained respectively, And acquire the prediction value of the current block according to the prediction values respectively corresponding to the at least two sub-blocks. In the above manner, at least two sub-blocks can be predicted separately, which can improve prediction accuracy, improve prediction performance, improve coding performance, and reduce coding residual.
在步骤201中,解码端或者编码端需要确定是否对当前块启动基于子块的联合预测。若对当前块启动基于子块的联合预测,则可以采用本申请实施例的编解码方法。若不对当前块启动基于子块的联合预测,则可以不采用本申请实施例的编解码方法。In
示例性的,可以判断当前块的特征信息是否满足特定条件;如果是,则确定对当前块启动基于子块的联合预测;如果否,则确定不对当前块启动基于子块的联合预测。该特征信息可以包括但不限于以下之一或者任意组合:当前块所在当前帧的帧类型、当前块的尺寸信息、开关控制信息。其中,该开关控制信息可以为SPS(序列级)开关控制信息,或者,PPS(图像参数级)开关控制信息,或者,TILE(片级)开关控制信息。Exemplarily, it may be judged whether the characteristic information of the current block satisfies a specific condition; if yes, it is determined to start the sub-block-based joint prediction for the current block; if not, it is determined not to start the sub-block-based joint prediction for the current block. The characteristic information may include but not limited to one or any combination of the following: frame type of the current frame where the current block is located, size information of the current block, and switch control information. Wherein, the switch control information may be SPS (sequence level) switch control information, or PPS (picture parameter level) switch control information, or TILE (tile level) switch control information.
例如,若该特征信息为当前块所在当前帧的帧类型,则当前块所在当前帧的帧类型满足特定条件,可以包括但不限于:若当前块所在当前帧的帧类型为B帧,则确定所述帧类型满足特定条件;或者,若当前块所在当前帧的帧类型为I帧,则确定所述帧类型满足特定条件。For example, if the feature information is the frame type of the current frame where the current block is located, then the frame type of the current frame where the current block is located meets certain conditions, which may include but not limited to: if the frame type of the current frame where the current block is located is a B frame, then determine The frame type satisfies a specific condition; or, if the frame type of the current frame where the current block is located is an I frame, it is determined that the frame type satisfies a specific condition.
例如,若该特征信息为当前块的尺寸信息,且尺寸信息包括当前块的宽度和当前块的高度,则当前块的尺寸信息满足特定条件,可以包括但不限于:若当前块的宽度大于或等于第一数值、当前块的高度大于或等于第二数值,确定当前块的尺寸信息满足特定条件。或,若当前块的宽度大于或等于第三数值、当前块的高度大于或等于第四数值、当前块的宽度小于或等于第五数值、当前块的高度小于或等于第六数值,确定当前块的尺寸信息满足特定条件。For example, if the characteristic information is the size information of the current block, and the size information includes the width of the current block and the height of the current block, then the size information of the current block satisfies certain conditions, which may include but not limited to: if the width of the current block is greater than or If it is equal to the first value and the height of the current block is greater than or equal to the second value, it is determined that the size information of the current block satisfies a specific condition. Or, if the width of the current block is greater than or equal to the third value, the height of the current block is greater than or equal to the fourth value, the width of the current block is less than or equal to the fifth value, and the height of the current block is less than or equal to the sixth value, determine the current block The dimension information for satisfies certain criteria.
示例性的,上述数值可以根据经验配置,如8、16、32、64、128等,对此不做限制。在一种可能的实现方式中,第一数值可以为8,第二数值可以为8,第三数值可以为8,第四数值可以为8,第五数值可以为64,第六数值可以为64。当然,上述只是示例,对此不做限制。综上所述,若当前块的宽度大于或等于8、当前块的高度大于或等于8,确定当前块的尺寸信息满足特定条件。或,若当前块的宽度大于或等于8、当前块的高度大于或等于8、当前块的宽度小于或等于64、当前块的高度小于或等于64,确定当前块的尺寸信息满足特定条件。Exemplarily, the above numerical values may be configured according to experience, such as 8, 16, 32, 64, 128, etc., without limitation. In a possible implementation manner, the first value may be 8, the second value may be 8, the third value may be 8, the fourth value may be 8, the fifth value may be 64, and the sixth value may be 64 . Of course, the above is just an example, without limitation. To sum up, if the width of the current block is greater than or equal to 8, and the height of the current block is greater than or equal to 8, it is determined that the size information of the current block satisfies a specific condition. Or, if the width of the current block is greater than or equal to 8, the height of the current block is greater than or equal to 8, the width of the current block is less than or equal to 64, and the height of the current block is less than or equal to 64, it is determined that the size information of the current block meets a specific condition.
例如,若该特征信息为开关控制信息,则开关控制信息满足特定条件,可以包括但不限于:若开关控制信息为启用,则确定开关控制信息满足特定条件。示例性的,可以针对几何划分模式增加一个开关控制信息,若开关控制信息为启用,则表示允许启用几何划分模式,此时,开关控制信息满足特定条件,能够对当前块启动基于子块的联合预测。For example, if the characteristic information is switch control information, then the switch control information satisfies a specific condition, which may include but not limited to: if the switch control information is enabled, then determining that the switch control information satisfies a specific condition. Exemplarily, a switch control information can be added for the geometric division mode. If the switch control information is enabled, it means that the geometric division mode is allowed to be enabled. At this time, the switch control information meets a specific condition, and the sub-block-based union can be started for the current block. predict.
例如,若该特征信息为当前块所在当前帧的帧类型、当前块的尺寸信息,则所述帧类型满足特定条件,且所述尺寸信息满足特定条件时,确定当前块的特征信息满足特定条件。若该特征信息为当前块所在当前帧的帧类型、开关控制信息,则所述帧类型满足特定条件,且所述开关控制信息满足特定条件时,确定当前块的特征信息满足特定条件。若该特征信息为当前块的尺寸信息、开关控制信息,则所述尺寸信息满足特定条件,且所述开关控制信息满足特定条件时,确定当前块的特征信息满足特定条件。若该特征信息为当前块所在当前帧的帧类型、当前块的尺寸信息、开关控制信息,则所述帧类型满足特定条件,且所述尺寸信息满足特定条件,且所述开关控制信息满足特定条件时,确定当前块的特征信息满足特定条件。For example, if the feature information is the frame type of the current frame where the current block is located and the size information of the current block, then the frame type meets a specific condition, and when the size information meets a specific condition, it is determined that the feature information of the current block satisfies a specific condition . If the feature information is the frame type and switch control information of the current frame where the current block is located, then the frame type satisfies a specific condition, and when the switch control information satisfies the specific condition, it is determined that the feature information of the current block satisfies the specific condition. If the characteristic information is size information and switch control information of the current block, then the size information satisfies a specific condition, and when the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies the specific condition. If the characteristic information is the frame type of the current frame where the current block is located, the size information of the current block, and the switch control information, then the frame type satisfies a specific condition, and the size information satisfies a specific condition, and the switch control information satisfies a specific condition. condition, it is determined that the feature information of the current block satisfies a specific condition.
在步骤201和步骤202中,解码端或者编码端需要获取当前块的块划分信息,并根据该块划分信息将当前块划分为至少两个子块,所述至少两个子块包括第一子块和第二子块。示例性的,第一子块的形状与第二子块的形状可以相同;或者,第一子块的形状与第二子块的形状可以不同。第一子块可以包括但不限于如下子块的一种:三角子块、梯形子块、五边形子块;第二子块可以包括但不限于如下子块的一种:三角子块、梯形子块、五边形子块。In
例如,在三角预测模式(TPM,Triangle Partition Mode)中,可以将当前块划分为两个三角子块。参见图3A所示,为按照主对角线方式将当前块划分为两个三角子块的示例,即按照与水平向右方向呈45度夹角方向,将当前块划分为两个三角子块,也就是说,第一子块可以为三角子块,第二子块也可以为三角子块。参见图3B所示,为按照副对角线方式将当前块划分为两个三角子块的示例,即按照与水平向右方向呈135度夹角方向,将当前块划分为两个三角子块,也就是说,第一子块可以为三角子块,第二子块也可以为三角子块。For example, in a triangular prediction mode (TPM, Triangle Partition Mode), the current block may be divided into two triangular sub-blocks. Referring to FIG. 3A , it is an example of dividing the current block into two triangular sub-blocks according to the main diagonal, that is, dividing the current block into two triangular sub-blocks according to the direction at an angle of 45 degrees to the horizontal right direction , that is to say, the first sub-block may be a triangular sub-block, and the second sub-block may also be a triangular sub-block. Referring to Fig. 3B, it is an example of dividing the current block into two triangular sub-blocks according to the sub-diagonal method, that is, dividing the current block into two triangular sub-blocks according to the direction with an angle of 135 degrees to the horizontal right direction , that is to say, the first sub-block may be a triangular sub-block, and the second sub-block may also be a triangular sub-block.
又例如,在几何划分模式(GEO,Geometrical Partitioning)中,不同于两个三角子块的划分方式,GEO可以支持更多方向的划分方式,当前块可以被划分为一个三角子块和一个梯形子块,当前块也可以被划分为两个梯形子块,当前块也可以被划分为一个三角子块和一个五边形子块。当然,上述只是更多方向划分的几个示例,对此划分方向不做限制。在几何划分模式中,当前块也可以被划分为任意形状的两个子块,本文只是介绍一些划分的可能性。For another example, in the geometrical partitioning mode (GEO, Geometrical Partitioning), unlike the division of two triangular sub-blocks, GEO can support more directions of division, the current block can be divided into a triangular sub-block and a trapezoidal sub-block block, the current block can also be divided into two trapezoidal sub-blocks, and the current block can also be divided into a triangular sub-block and a pentagonal sub-block. Of course, the above are just a few examples of division in more directions, and the division direction is not limited. In the geometric partitioning mode, the current block can also be divided into two sub-blocks of any shape, this article only introduces some possibilities of partitioning.
参见图3C和图3D所示,将当前块划分为一个三角子块和一个梯形子块,即,第一子块为三角子块,第二子块为梯形子块。参见图3E和图3F所示,将当前块划分为两个梯形子块,即,第一子块为梯形子块,第二子块为梯形子块。参见图3G和图3H所示,将当前块划分为一个三角子块和一个五边形子块,即,第一子块为三角子块,第二子块为五边形子块。Referring to FIG. 3C and FIG. 3D , the current block is divided into a triangular sub-block and a trapezoidal sub-block, that is, the first sub-block is a triangular sub-block, and the second sub-block is a trapezoidal sub-block. Referring to FIG. 3E and FIG. 3F , the current block is divided into two ladder-shaped sub-blocks, that is, the first sub-block is a ladder-shaped sub-block, and the second sub-block is a ladder-shaped sub-block. Referring to FIG. 3G and FIG. 3H , the current block is divided into a triangular sub-block and a pentagonal sub-block, that is, the first sub-block is a triangular sub-block, and the second sub-block is a pentagonal sub-block.
示例性的,可以增加一个开关决策采用三角预测模式还是几何划分模式。Exemplarily, a switch may be added to determine whether to use the triangular prediction mode or the geometric division mode.
综上所述,解码端或者编码端可以从图3A-图3H中选择一个块划分信息,如选择图3A时,则采用图3A所示的块划分信息,将当前块划分为第一子块和第二子块。进一步的,为了获取当前块的块划分信息,解码端和编码端可以采用如下方式获取当前块的块划分信息:To sum up, the decoding end or the encoding end can select a block division information from Figure 3A-Figure 3H, such as selecting Figure 3A, then use the block division information shown in Figure 3A to divide the current block into the first sub-block and the second subblock. Further, in order to obtain the block division information of the current block, the decoding end and the encoding end can obtain the block division information of the current block in the following manner:
方式一、编码端通过协议约定默认使用某个块划分信息,解码端通过协议约定默认使用该块划分信息。例如,编码端通过协议约定默认使用图3A所示的块划分信息,解码端通过协议约定默认使用图3A所示的块划分信息,编码端按照图3A所示的块划分信息,将当前块划分为第一三角子块和第二三角子块,解码端按照图3A所示的块划分信息,将当前块划分为第一三角子块和第二三角子块。又例如,编码端通过协议约定默认使用图3C所示的块划分信息,解码端通过协议约定默认使用图3C所示的块划分信息,编码端按照图3C所示的块划分信息,将当前块划分为第一三角子块和第二梯形子块,解码端按照图3A所示的块划分信息,将当前块划分为第一三角子块和第二梯形子块。当然,上述只是示例,对此不做限制。Method 1: The encoding end uses a certain block division information by default through the agreement, and the decoding end uses the block division information by default through the agreement agreement. For example, the encoding end uses the block division information shown in Figure 3A by default through the protocol agreement, and the decoding end uses the block division information shown in Figure 3A by default through the agreement agreement, and the encoding end divides the current block according to the block division information shown in Figure 3A For the first triangular sub-block and the second triangular sub-block, the decoder divides the current block into the first triangular sub-block and the second triangular sub-block according to the block division information shown in FIG. 3A . As another example, the encoding end uses the block division information shown in Figure 3C by default through the protocol agreement, and the decoding end uses the block division information shown in Figure 3C by default through the agreement agreement, and the encoding end uses the block division information shown in Figure 3C to convert the current block Divided into the first triangular sub-block and the second trapezoidal sub-block, the decoder divides the current block into the first triangular sub-block and the second trapezoidal sub-block according to the block division information shown in FIG. 3A . Of course, the above is just an example, without limitation.
方式二、通过协议约定几种块划分信息,如图3A-图3H中的部分块划分信息或者全部块划分信息,编码端确定每个块划分信息对应的率失真代价,例如,基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价,对此过程不做限制。然后,编码端从所有率失真代价中选取最小的率失真代价,将最小的率失真代价对应的块划分信息,作为目标块划分信息,并通过目标块划分信息将当前块划分为至少两个子块。例如,若图3A所示的块划分信息的率失真代价最小,则编码端按照图3A所示的块划分信息,将当前块划分为第一三角子块和第二三角子块。若图3C所示的块划分信息的率失真代价最小,则编码端按照图3C所示的块划分信息,将当前块划分为第一三角子块和第二梯形子块。Method 2: Agree on several types of block division information through the agreement, such as partial block division information or all block division information in Figure 3A-3H, and the encoding end determines the rate-distortion cost corresponding to each block division information, for example, based on each block Partition information, each group of prediction mode information, and candidates in each group of prediction mode information, jointly predict the current block to obtain the prediction information of the current block, and determine the rate-distortion cost of the current block by using the rate-distortion principle and the prediction information , there is no restriction on this process. Then, the encoder selects the smallest rate-distortion cost from all rate-distortion costs, uses the block division information corresponding to the smallest rate-distortion cost as the target block division information, and divides the current block into at least two sub-blocks through the target block division information . For example, if the rate-distortion cost of the block division information shown in FIG. 3A is the smallest, the encoder divides the current block into the first triangular sub-block and the second triangular sub-block according to the block division information shown in FIG. 3A . If the rate-distortion cost of the block division information shown in FIG. 3C is the smallest, the encoder divides the current block into a first triangular sub-block and a second trapezoidal sub-block according to the block division information shown in FIG. 3C .
编码端在向解码端发送编码比特流时,编码比特流可以携带块划分信息的指示信息,该指示信息用于指示当前块的块划分信息。解码端在接收到所述编码比特流后,可以从编码比特流中获取块划分信息的指示信息,并根据该指示信息确定当前块的块划分信息。例如,若指示信息用于指示图3A所示的块划分信息,则解码端按照图3A所示的块划分信息,将当前块划分为第一三角子块和第二三角子块。若指示信息用于指示图3C所示的块划分信息,则解码端按照图3C所示的块划分信息,将当前块划分为第一三角子块和第二梯形子块。When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry block division information indication information, and the indication information is used to indicate the block division information of the current block. After receiving the coded bit stream, the decoding end can obtain the indication information of the block division information from the coded bit stream, and determine the block division information of the current block according to the indication information. For example, if the indication information is used to indicate the block division information shown in FIG. 3A , the decoder divides the current block into the first triangular sub-block and the second triangular sub-block according to the block division information shown in FIG. 3A . If the indication information is used to indicate the block division information shown in FIG. 3C , the decoder divides the current block into the first triangular sub-block and the second trapezoidal sub-block according to the block division information shown in FIG. 3C .
在步骤203中,编码端或者解码端在将当前块划分为至少两个子块后,可以获取至少两个子块分别对应的预测模式信息,该预测模式信息可以包括但不限于:帧内块拷贝预测模式(即IBC模式)、帧内预测模式、帧间预测模式。例如,在将当前块划分为第一子块和第二子块之后,可以获取第一子块的预测模式信息,并获取第二子块的预测模式信息。In
例如,第一子块的预测模式信息可以为帧内块拷贝预测模式,第二子块的预测模式信息可以为帧内预测模式。或者,第一子块的预测模式信息可以为帧内块拷贝预测模式,第二子块的预测模式信息可以为帧间预测模式。或者,第一子块的预测模式信息可以为帧内块拷贝预测模式,第二子块的预测模式信息可以为帧内块拷贝预测模式。或者,第一子块的预测模式信息可以为帧内预测模式,第二子块的预测模式信息可以为帧内预测模式。或者,第一子块的预测模式信息可以为帧内预测模式,第二子块的预测模式信息可以为帧间预测模式。或者,第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式。For example, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an inter prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame prediction mode, and the prediction mode information of the second sub-block may be an inter-frame prediction mode. Or, the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode.
又例如,第一子块的预测模式信息可以为帧内预测模式,第二子块的预测模式信息可以为帧内块拷贝预测模式。或者,第一子块的预测模式信息可以为帧间预测模式,第二子块的预测模式信息可以为帧内块拷贝预测模式。或者,第一子块的预测模式信息可以为帧内块拷贝预测模式,第二子块的预测模式信息可以为帧内块拷贝预测模式。或者,第一子块的预测模式信息可以为帧内预测模式,第二子块的预测模式信息可以为帧内预测模式。或者,第一子块的预测模式信息可以为帧间预测模式,第二子块的预测模式信息可以为帧内预测模式。或者,第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式。For another example, the prediction mode information of the first sub-block may be an intra prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Or, the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode.
综上所述,第一子块的预测模式信息可以为帧内块拷贝预测模式、或帧内预测模式、或帧间预测模式,第二子块的预测模式信息可以为帧内块拷贝预测模式、或帧内预测模式、或帧间预测模式,为获取第一子块的预测模式信息和第二子块的预测模式信息,采用如下方式:In summary, the prediction mode information of the first sub-block may be an intra block copy prediction mode, or an intra prediction mode, or an inter prediction mode, and the prediction mode information of a second sub block may be an intra block copy prediction mode , or intra prediction mode, or inter prediction mode, in order to obtain the prediction mode information of the first sub-block and the prediction mode information of the second sub-block, the following methods are adopted:
方式一、编码端通过协议约定默认使用预测模式信息A作为第一子块的预测模式信息、使用预测模式信息B(与预测模式信息A相同或者不同)作为第二子块的预测模式信息。解码端通过协议约定默认使用预测模式信息A作为第一子块的预测模式信息、使用预测模式信息B作为第二子块的预测模式信息。例如,编码端通过协议约定默认使用帧内块拷贝预测模式作为第一子块的预测模式信息、使用帧内预测模式作为第二子块的预测模式信息,解码端通过协议约定默认使用帧内块拷贝预测模式作为第一子块的预测模式信息、使用帧内预测模式作为第二子块的预测模式信息。基于此,针对编码端和解码端来说,第一子块的预测模式信息可以为帧内块拷贝预测模式,第二子块的预测模式信息可以为帧内预测模式。Method 1: The encoding end uses the prediction mode information A as the prediction mode information of the first sub-block by agreement by default, and uses the prediction mode information B (the same as or different from the prediction mode information A) as the prediction mode information of the second sub-block. By agreement, the decoding end uses the prediction mode information A as the prediction mode information of the first sub-block by default, and uses the prediction mode information B as the prediction mode information of the second sub-block. For example, the encoder agrees to use the intra block copy prediction mode by default as the prediction mode information of the first sub-block and the intra prediction mode as the prediction mode information of the second sub-block by default, and the decoder uses the intra block copy prediction mode as the default by agreement. The prediction mode is copied as the prediction mode information of the first sub-block, and the intra prediction mode is used as the prediction mode information of the second sub-block. Based on this, for the encoding end and the decoding end, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra prediction mode.
方式二、通过协议约定几组预测模式信息,例如,约定如下6组预测模式信息:第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内预测模式;第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧间预测模式;第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内块拷贝预测模式;第一子块的预测模式信息为帧内预测模式,第二子块的预测模式信息为帧内预测模式;第一子块的预测模式信息为帧内预测模式,第二子块的预测模式信息为帧间预测模式;第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式。Method 2: Specify several sets of prediction mode information through the agreement, for example, specify the following 6 sets of prediction mode information: the prediction mode information of the first sub-block is the intra block copy prediction mode, and the prediction mode information of the second sub-block is intra prediction mode; the prediction mode information of the first sub-block is the intra block copy prediction mode, the prediction mode information of the second sub block is the inter prediction mode; the prediction mode information of the first sub block is the intra block copy prediction mode, and the second The prediction mode information of the sub-block is an intra-block copy prediction mode; the prediction mode information of the first sub-block is an intra-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode; the prediction mode information of the first sub-block is an intra prediction mode, the prediction mode information of the second sub-block is an inter prediction mode; the prediction mode information of the first sub block is an inter prediction mode, and the prediction mode information of the second sub block is an inter prediction mode.
编码端确定每组预测模式信息对应的率失真代价,例如,基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价,对此过程不做限制。然后,从所有率失真代价中选取最小的率失真代价,将最小的率失真代价对应的预测模式信息,作为目标预测模式信息,并通过目标预测模式信息获取第一子块的预测模式信息和第二子块的预测模式信息。例如,若第一组预测模式信息的率失真代价最小,则编码端确定第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内预测模式。The encoder determines the rate-distortion cost corresponding to each set of prediction mode information, for example, based on each block division information, each set of prediction mode information, and candidates in each set of prediction mode information, jointly predict the current block to obtain the current block prediction information, and determine the rate-distortion cost of the current block by using the rate-distortion principle and the prediction information, and this process is not limited. Then, select the smallest rate-distortion cost from all the rate-distortion costs, use the prediction mode information corresponding to the smallest rate-distortion cost as the target prediction mode information, and obtain the prediction mode information and the second sub-block prediction mode information through the target prediction mode information. Prediction mode information of two sub-blocks. For example, if the rate-distortion cost of the first set of prediction mode information is the smallest, the encoder determines that the prediction mode information of the first sub-block is an intra block copy prediction mode, and the prediction mode information of the second sub-block is an intra prediction mode.
例如,假设包括块划分信息A1和块划分信息A2,且包括上述6组预测模式信息。For example, it is assumed that the block division information A1 and the block division information A2 are included, and the above six sets of prediction mode information are included.
首先,针对块划分信息A1和第一组预测模式信息(帧内块拷贝预测模式+帧内预测模式),遍历帧内块拷贝预测模式的一个候选者(即块矢量,块矢量的获取方式参见后续实施例,在此不再赘述)和帧内预测模式的一个候选者(即帧内子预测模式,帧内子预测模式的获取方式参见后续实施例,在此不再赘述),基于这两个候选者对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。依次类推,针对帧内块拷贝预测模式的每个候选者和帧内预测模式的每个候选者,均可以对当前块进行联合预测,得到当前块的预测信息,最终基于率失真原则得到当前块的率失真代价。First, according to the block division information A1 and the first group of prediction mode information (intra block copy prediction mode+intra prediction mode), traverse a candidate of the intra block copy prediction mode (that is, the block vector, the acquisition method of the block vector refers to Subsequent embodiments, which will not be described in detail here) and a candidate for the intra-frame prediction mode (that is, the intra-frame sub-prediction mode, the acquisition method of the intra-frame sub-prediction mode refers to the subsequent embodiments, which will not be described in detail here), based on these two candidates or perform joint prediction on the current block to obtain the prediction information of the current block, and determine the rate-distortion cost of the current block by using the rate-distortion principle and the prediction information. By analogy, for each candidate of the intra block copy prediction mode and each candidate of the intra prediction mode, the current block can be jointly predicted to obtain the prediction information of the current block, and finally the current block is obtained based on the rate-distortion principle The rate-distortion cost of .
然后,针对块划分信息A1和第二组预测模式信息(帧内块拷贝预测模式+帧间预测模式),遍历帧内块拷贝预测模式的一个候选者(即块矢量)和帧间预测模式的一个候选者(即运动信息,运动信息的获取方式参见后续实施例,在此不再赘述),基于这两个候选者对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。依次类推,针对帧内块拷贝预测模式的每个候选者和帧间预测模式的每个候选者,均可以对当前块进行联合预测,得到当前块的预测信息,最终得到当前块的率失真代价。Then, for the block division information A1 and the second set of prediction mode information (intra block copy prediction mode + inter prediction mode), traverse a candidate for the intra block copy prediction mode (i.e. block vector) and the inter prediction mode One candidate (that is, motion information, see the subsequent embodiments for how to obtain motion information, and will not repeat it here), based on these two candidates, jointly predict the current block to obtain the prediction information of the current block, and use the rate-distortion principle and the prediction information to determine the rate-distortion cost of the current block. By analogy, for each candidate of the intra block copy prediction mode and each candidate of the inter prediction mode, the current block can be jointly predicted to obtain the prediction information of the current block, and finally obtain the rate-distortion cost of the current block .
针对块划分信息A1和第三组预测模式信息、块划分信息A1和第四组预测模式信息、块划分信息A1和第五组预测模式信息、块划分信息A1和第六组预测模式信息、块划分信息A2和第一组预测模式信息、块划分信息A2和第二组预测模式信息、块划分信息A2和第三组预测模式信息、块划分信息A2和第四组预测模式信息、块划分信息A2和第五组预测模式信息、块划分信息A2和第六组预测模式信息,均进行上述处理,得到当前块的率失真代价。For block division information A1 and the third group of prediction mode information, block division information A1 and the fourth group of prediction mode information, block division information A1 and the fifth group of prediction mode information, block division information A1 and the sixth group of prediction mode information, block Division information A2 and the first group of prediction mode information, block division information A2 and the second group of prediction mode information, block division information A2 and the third group of prediction mode information, block division information A2 and the fourth group of prediction mode information, block division information A2 and the fifth group of prediction mode information, block division information A2 and the sixth group of prediction mode information all perform the above-mentioned processing to obtain the rate-distortion cost of the current block.
在遍历得到所有率失真代价之后,可以从所有率失真代价中选择最小的率失真代价,假设最小的率失真代价是块划分信息A1、第一组预测模式信息、帧内块拷贝预测模式的第一个候选者和帧内预测模式的第二个候选者对应的率失真代价,则最小的率失真代价对应的块划分信息就是块划分信息A1,基于块划分信息A1将当前块划分为第一子块和第二子块。最小的率失真代价对应的预测模式信息就是第一组预测模式信息,即第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内预测模式。最小的率失真代价对应的目标候选者就是帧内块拷贝预测模式的第一个候选者(即块矢量)和帧内预测模式的第二个候选者(即帧内子预测模式)。当然,上述只是率失真代价确定的一个示例,对此不做限制。After traversing all rate-distortion costs, the smallest rate-distortion cost can be selected from all rate-distortion costs, assuming that the smallest rate-distortion cost is block division information A1, the first group of prediction mode information, and the first group of intra block copy prediction modes The rate-distortion cost corresponding to one candidate and the second candidate of the intra prediction mode, the block division information corresponding to the smallest rate-distortion cost is the block division information A1, and based on the block division information A1, the current block is divided into the first sub-block and second sub-block. The prediction mode information corresponding to the minimum rate-distortion cost is the first set of prediction mode information, that is, the prediction mode information of the first sub-block is an intra block copy prediction mode, and the prediction mode information of the second sub-block is an intra prediction mode. The target candidates corresponding to the minimum rate-distortion cost are the first candidate of the intra block copy prediction mode (ie, the block vector) and the second candidate of the intra prediction mode (ie, the intra sub-prediction mode). Of course, the above is just an example of determining the rate-distortion cost, and there is no limitation to this.
编码端在向解码端发送编码比特流时,该编码比特流可以携带预测模式信息的指示信息。解码端在接收到所述编码比特流后,可以从编码比特流中获取预测模式信息的指示信息,并根据该指示信息获取第一子块的预测模式信息和第二子块的预测模式信息。例如,若指示信息用于指示上述6组预测模式信息中的第一组预测模式信息时,则解码端确定第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内预测模式。When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of prediction mode information. After receiving the coded bit stream, the decoder can obtain the indication information of the prediction mode information from the coded bit stream, and obtain the prediction mode information of the first sub-block and the prediction mode information of the second sub-block according to the indication information. For example, if the indication information is used to indicate the first group of prediction mode information in the above six groups of prediction mode information, the decoding end determines that the prediction mode information of the first sub-block is the intra block copy prediction mode, and the prediction of the second sub-block The mode information is an intra prediction mode.
实施例2:针对实施例1中的步骤204,若第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内块拷贝预测模式,则可以采用实施例2实现,其它过程参见实施例1。在实施例2中,构建块矢量候选列表,该块矢量候选列表包括多个候选块矢量;从该块矢量候选列表中选择一个候选块矢量作为第一子块的第一目标块矢量,并从块矢量候选列表中选择另一个候选块矢量作为第二子块的第二目标块矢量;然后,根据第一目标块矢量获取与第一子块对应的预测值,并根据第二目标块矢量获取与第二子块对应的预测值。Embodiment 2: For
例如,为当前块构建块矢量候选列表,块矢量候选列表中的候选块矢量包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP(History-based motion vectorprediction,基于历史信息的运动矢量预测)列表中的历史块矢量、默认块矢量等,对此块矢量候选列表的构建过程不做限制。HMVP列表中的历史块矢量是指:在HMVP模式下,需要获取当前块对应的多个块矢量,为了区分方便,将HMVP模式的块矢量称为历史块矢量,历史块矢量的数量根据需要确定,对此不做限制。HMVP模式是新一代视频编码标准中采纳的技术,其原理是利用已编码块的块矢量来预测当前块的块矢量。例如,可以为当前块建立一个HMVP列表,该HMVP列表用于保存已编码块的块矢量,这些块矢量可以称为历史块矢量。For example, a block vector candidate list is constructed for the current block, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatial adjacent blocks of the current block, HMVP (History-based motion vector prediction, history-based motion vector prediction) corresponding to the current block The history block vector, the default block vector, etc. in the motion vector prediction) list, and the construction process of this block vector candidate list is not limited. The historical block vectors in the HMVP list refer to: in the HMVP mode, multiple block vectors corresponding to the current block need to be obtained. For the convenience of distinction, the block vectors in the HMVP mode are called historical block vectors, and the number of historical block vectors is determined as needed , there is no restriction on this. The HMVP mode is a technology adopted in the new generation of video coding standards, and its principle is to use the block vector of the coded block to predict the block vector of the current block. For example, an HMVP list may be established for the current block, and the HMVP list is used to store block vectors of encoded blocks, and these block vectors may be called historical block vectors.
在为当前块构建块矢量候选列表后,可以从块矢量候选列表中选择一个候选块矢量作为第一子块的第一目标块矢量,并从块矢量候选列表中选择另一个候选块矢量作为第二子块的第二目标块矢量,示例性的,第一目标块矢量与第二目标块矢量可以不同。After constructing the block vector candidate list for the current block, one candidate block vector can be selected from the block vector candidate list as the first target block vector of the first sub-block, and another candidate block vector can be selected from the block vector candidate list as the first target block vector The second target block vectors of the two sub-blocks, for example, the first target block vector and the second target block vector may be different.
在确定第一子块的第一目标块矢量后,可以根据第一目标块矢量获取与第一子块对应的预测值,对此预测值的获取过程不做限制。在确定第二子块的第二目标块矢量后,可以根据第二目标块矢量获取与第二子块对应的预测值,对此预测值的获取过程不做限制。After the first target block vector of the first sub-block is determined, a predictive value corresponding to the first sub-block may be obtained according to the first target block vector, and there is no limitation on the process of obtaining the predictive value. After the second target block vector of the second sub-block is determined, a predicted value corresponding to the second sub-block may be obtained according to the second target block vector, and there is no limitation on the process of obtaining the predicted value.
示例性的,在第一子块/第二子块采用帧内块拷贝预测模式中的MMVD子模式时,则块矢量候选列表可以包括MMVD子模式的块矢量候选列表,也就是说,块矢量候选列表包括对原始块矢量进行偏移后得到的块矢量,该原始块矢量可以包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP列表中的历史块矢量、默认块矢量等。例如,可以获取空域相邻块A1的块矢量A1、空域相邻块A2的块矢量A2、HMVP列表中的历史块矢量B1-B3,并将块矢量A1、块矢量A2、历史块矢量B1、历史块矢量B2、对历史块矢量B3进行偏移后得到的历史块矢量B3’添加到块矢量候选列表。或者,将块矢量A1、对块矢量A2进行偏移后得到的块矢量A2’、历史块矢量B1、历史块矢量B2、对历史块矢量B3进行偏移后得到的历史块矢量B3’添加到块矢量候选列表。当然,上述方式只是两个示例,对此不做限制,只要块矢量候选列表包括至少一个对原始块矢量进行偏移后得到的块矢量即可。Exemplarily, when the first sub-block/second sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, the block vector candidate list may include the block vector candidate list of the MMVD sub-mode, that is, the block vector The candidate list includes the block vector obtained by offsetting the original block vector. The original block vector may include but not limited to: the block vector of the spatial adjacent block of the current block, the historical block vector in the HMVP list corresponding to the current block, the default block vector etc. For example, the block vector A1 of the spatial adjacent block A1, the block vector A2 of the spatial adjacent block A2, and the historical block vectors B1-B3 in the HMVP list can be obtained, and the block vector A1, block vector A2, historical block vector B1, The historical block vector B2 and the historical block vector B3' obtained by offsetting the historical block vector B3 are added to the block vector candidate list. Alternatively, block vector A1, block vector A2' obtained by offsetting block vector A2, historical block vector B1, historical block vector B2, and historical block vector B3' obtained by offsetting historical block vector B3 are added to Block vector candidate list. Of course, the above-mentioned manners are just two examples, and there is no limitation thereto, as long as the block vector candidate list includes at least one block vector obtained by offsetting the original block vector.
MMVD是对原始块矢量进行固定方向、固定矢量差的偏移,从而得到新的块矢量,例如,通过如下方式得到新的块矢量,新的块矢量可以添加到块矢量候选列表,参与目标块矢量的确定过程。BV(new)=BV(original)+offset;或者,BV(new)=BV(original)-offset。MMVD is to offset the original block vector with a fixed direction and a fixed vector difference to obtain a new block vector. For example, the new block vector can be obtained by the following method. The new block vector can be added to the block vector candidate list and participate in the target block Vector determination process. BV(new)=BV(original)+offset; or, BV(new)=BV(original)-offset.
BV(new)表示偏移后得到的新的块矢量,BV(original)表示原始块矢量,offset表示固定矢量差,offset的值可以任意配置,如+1,-1,+2,-2等,对此不做限制。BV(new) represents the new block vector obtained after offset, BV(original) represents the original block vector, offset represents the fixed vector difference, and the value of offset can be configured arbitrarily, such as +1, -1, +2, -2, etc. , there is no restriction on this.
编码端/解码端从块矢量候选列表中选择一个候选块矢量作为第一子块的第一目标块矢量,从块矢量候选列表中选择另一个候选块矢量作为第二子块的第二目标块矢量,可以包括:The encoder/decoder selects a candidate block vector from the block vector candidate list as the first target block vector of the first sub-block, and selects another candidate block vector from the block vector candidate list as the second target block of the second sub-block vector, which can include:
方式一、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价,具体方式参见上述实施例,在此不再赘述。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内块拷贝预测模式,针对块矢量候选列表中的每个候选块矢量,将率失真代价最小的候选块矢量作为第一子块的第一目标块矢量。在排除第一目标块矢量的基础上,将率失真代价最小的候选块矢量作为第二子块的第二目标块矢量。Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, to obtain the prediction information of the current block, and use the rate-distortion principle and the described The prediction information determines the rate-distortion cost of the current block. For a specific manner, refer to the foregoing embodiments, which will not be repeated here. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the intra block copy prediction mode, the prediction mode information of the second sub-block is the intra block copy prediction mode, and for the block vector candidate list For each candidate block vector in , the candidate block vector with the smallest rate-distortion cost is used as the first target block vector of the first sub-block. On the basis of excluding the first target block vector, the candidate block vector with the smallest rate-distortion cost is used as the second target block vector of the second sub-block.
编码端在向解码端发送编码比特流时,所述编码比特流携带目标块矢量的指示信息,所述指示信息用于指示第一目标块矢量的索引信息和第二目标块矢量的索引信息。第一目标块矢量的索引信息用于表示第一目标块矢量是块矢量候选列表中的第几个候选块矢量,第二目标块矢量的索引信息用于表示第二目标块矢量是块矢量候选列表中的第几个候选块矢量。When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream carries indication information of the target block vector, and the indication information is used to indicate index information of the first target block vector and index information of the second target block vector. The index information of the first target block vector is used to indicate which candidate block vector the first target block vector is in the block vector candidate list, and the index information of the second target block vector is used to indicate that the second target block vector is a block vector candidate The number candidate block vector in the list.
解码端接收来自编码端的编码比特流,并从编码比特流中解析出所述指示信息。基于第一目标块矢量的索引信息,从块矢量候选列表中选择与该索引信息对应的候选块矢量,该候选块矢量就是第一子块的第一目标块矢量。基于第二目标块矢量的索引信息,从块矢量候选列表中选择与该索引信息对应的候选块矢量,该候选块矢量就是第二子块的第二目标块矢量。The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the first target block vector, a candidate block vector corresponding to the index information is selected from the block vector candidate list, and the candidate block vector is the first target block vector of the first sub-block. Based on the index information of the second target block vector, a candidate block vector corresponding to the index information is selected from the block vector candidate list, and the candidate block vector is the second target block vector of the second sub-block.
方式二、编码端通过协议约定默认第一目标块矢量和第二目标块矢量,解码端也通过协议约定使用第一目标块矢量和第二目标块矢量,这样,编码比特流中就不需要携带目标块矢量的指示信息,从而可以节省传输目标块矢量的指示信息的编码开销。Method 2: The encoding end agrees to default the first target block vector and the second target block vector through the agreement, and the decoding end also agrees to use the first target block vector and the second target block vector through the agreement, so that the encoded bit stream does not need to carry The indication information of the target block vector can save the encoding overhead of transmitting the indication information of the target block vector.
例如,编码端通过协议约定默认块矢量候选列表的第一个候选块矢量作为第一子块的第一目标块矢量,使用块矢量候选列表的第二个候选块矢量作为第二子块的第二目标块矢量。解码端通过协议约定默认块矢量候选列表的第一个候选块矢量作为第一子块的第一目标块矢量,使用块矢量候选列表的第二个候选块矢量作为第二子块的第二目标块矢量。For example, the encoding end agrees through the agreement that the first candidate block vector of the default block vector candidate list is used as the first target block vector of the first sub-block, and the second candidate block vector of the second sub-block is used as the second target block vector of the second sub-block. Two target block vectors. The decoding end agrees through the agreement that the first candidate block vector of the default block vector candidate list is used as the first target block vector of the first sub-block, and the second candidate block vector of the block vector candidate list is used as the second target of the second sub-block block vector.
基于实施例2,在当前块所在当前帧为B帧或者I帧时,可以按照固定方向将当前块划分成第一子块和第二子块,第一子块和第二子块可以均为三角子块,第一子块和第二子块可以分别为三角子块和梯形子块,第一子块和第二子块可以均为梯形子块,第一子块和第二子块可以分别为三角子块和五边形子块,对此当前块的划分方式不做限制。示例性的,第一子块的预测模式信息可以为帧内块拷贝预测模式,第二子块的预测模式信息可以为帧内块拷贝预测模式。参见图4A-图4D所示,为第一子块采用帧内块拷贝预测模式、第二子块采用帧内块拷贝预测模式的示例,对第一子块和第二子块的形状不做限制,图4A-图4D只是示例。Based on
在实施例2中,假设当前块存在两个区域,一个区域1是屏幕内容,另一个区域2也是屏幕内容,但是,区域1需要参考当前块所在当前帧中的参考块A,区域2需要参考当前块所在当前帧中的参考块B,在这种应用场景下,通过将当前块划分为第一子块(即区域的子块)和第二子块(即区域2的子块),且第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内块拷贝预测模式,基于屏幕内容中同一帧内存在大量重复出现的纹理这一特性,第一子块和第二子块均采用帧内块拷贝预测模式,能够提升编码效果。In
实施例3:针对实施例1中的步骤204,若第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧间预测模式,则可以采用实施例3实现,其它过程参见实施例1。在实施例3中,构建块矢量候选列表,块矢量候选列表包括多个候选块矢量;从块矢量候选列表中选择一个候选块矢量作为第一子块的目标块矢量。构建运动信息候选列表,运动信息候选列表包括至少一个候选运动信息;从运动信息候选列表中选择一个候选运动信息作为第二子块的目标运动信息。根据目标块矢量获取与第一子块对应的预测值;根据目标运动信息获取与第二子块对应的预测值。Embodiment 3: For
例如,为当前块构建块矢量候选列表,块矢量候选列表中的候选块矢量包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP列表中的历史块矢量、默认块矢量等,对此块矢量候选列表的构建过程不做限制。在为当前块构建块矢量候选列表后,从块矢量候选列表中选择一个候选块矢量作为第一子块的目标块矢量。在确定第一子块的目标块矢量后,可以根据目标块矢量获取与第一子块对应的预测值,对此预测值的获取过程不做限制。For example, a block vector candidate list is constructed for the current block, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatial adjacent blocks of the current block, historical block vectors in the HMVP list corresponding to the current block, default block vector, etc., there is no restriction on the construction process of this block vector candidate list. After the block vector candidate list is constructed for the current block, a candidate block vector is selected from the block vector candidate list as the target block vector of the first sub-block. After the target block vector of the first sub-block is determined, a predicted value corresponding to the first sub-block may be obtained according to the target block vector, and there is no limitation on the process of obtaining the predicted value.
示例性的,在第一子块采用帧内块拷贝预测模式中的MMVD子模式时,则块矢量候选列表可以包括MMVD子模式的块矢量候选列表,也就是说,块矢量候选列表包括至少一个对原始块矢量进行偏移后得到的块矢量,该原始块矢量可以包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP列表中的历史块矢量、默认块矢量等。Exemplarily, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, the block vector candidate list may include the block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes at least one The block vector obtained after offsetting the original block vector, which may include but not limited to: the block vector of the adjacent block in the space of the current block, the historical block vector in the HMVP list corresponding to the current block, the default block vector, etc. .
编码端/解码端从块矢量候选列表中获取第一子块的目标块矢量,可以包括但不限于:The encoding end/decoding end obtains the target block vector of the first sub-block from the block vector candidate list, which may include but not limited to:
方式一、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧间预测模式,针对块矢量候选列表中的每个候选块矢量,将率失真代价最小的候选块矢量作为第一子块的目标块矢量。编码端在向解码端发送编码比特流时,所述编码比特流可以携带目标块矢量的指示信息,所述指示信息用于指示目标块矢量的索引信息,该索引信息用于表示目标块矢量是块矢量候选列表中的第几个候选块矢量。解码端接收来自编码端的编码比特流,并从所述编码比特流中解析出所述指示信息。基于目标块矢量的索引信息,从块矢量候选列表中选择与该索引信息对应的候选块矢量,该候选块矢量就是第一子块的目标块矢量。Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, to obtain the prediction information of the current block, and use the rate-distortion principle and the described The prediction information determines the rate-distortion cost for the current block. Assume that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the intra block copy prediction mode, the prediction mode information of the second sub-block is the inter prediction mode, and for the block vector candidate list For each candidate block vector, the candidate block vector with the smallest rate-distortion cost is used as the target block vector of the first sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of the target block vector, the indication information is used to indicate the index information of the target block vector, and the index information is used to indicate that the target block vector is The number of candidate block vectors in the block vector candidate list. The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target block vector, a candidate block vector corresponding to the index information is selected from the block vector candidate list, and the candidate block vector is the target block vector of the first sub-block.
方式二、编码端通过协议约定默认目标块矢量,解码端通过协议约定默认目标块矢量,编码比特流不携带目标块矢量的指示信息,从而节省编码开销。例如,编码端通过协议约定默认块矢量候选列表的第一个候选块矢量作为第一子块的目标块矢量,解码端通过协议约定默认块矢量候选列表的第一个候选块矢量作为第一子块的目标块矢量。Method 2: The encoding end agrees on the default target block vector through the agreement, and the decoding end agrees on the default target block vector through the agreement, and the encoded bit stream does not carry the indication information of the target block vector, thereby saving encoding overhead. For example, the encoding end agrees that the first candidate block vector in the default block vector candidate list is used as the target block vector of the first sub-block through the agreement, and the decoding end agrees that the first candidate block vector in the default block vector candidate list is used as the first sub-block through the agreement. The block's target block vector.
例如,为当前块构建运动信息候选列表,运动信息候选列表包括至少一个候选运动信息,对此运动信息候选列表的构建过程不做限制。在为当前块构建运动信息候选列表后,从运动信息候选列表中选择一个候选运动信息作为第二子块的目标运动信息。在确定第二子块的目标运动信息后,可以根据目标运动信息获取与第二子块对应的预测值,对此过程不做限制。For example, a candidate list of motion information is constructed for the current block, and the candidate list of motion information includes at least one piece of candidate motion information, and the construction process of the candidate list of motion information is not limited. After the motion information candidate list is constructed for the current block, a candidate motion information is selected from the motion information candidate list as the target motion information of the second sub-block. After the target motion information of the second sub-block is determined, a prediction value corresponding to the second sub-block may be obtained according to the target motion information, and this process is not limited.
示例性的,在第二子块采用帧间预测模式中的常规合并子模式(即Merge子模式)时,则运动信息候选列表包括常规合并子模式的运动信息候选列表。常规合并子模式可以为第二子块建立运动信息候选列表,运动信息候选列表中存在多个候选运动信息(如运动矢量及参考帧信息),如空域候选运动信息、时域候选运动信息、历史运动信息、默认运动信息等。Exemplarily, when the second sub-block adopts the normal merging sub-mode (that is, the Merge sub-mode) in the inter prediction mode, the motion information candidate list includes the motion information candidate list of the normal merging sub-mode. The conventional merging sub-mode can establish a motion information candidate list for the second sub-block. There are multiple candidate motion information (such as motion vectors and reference frame information) in the motion information candidate list, such as spatial candidate motion information, time domain candidate motion information, history Exercise information, default exercise information, etc.
示例性的,在第二子块采用帧间预测模式中的MMVD子模式时,则运动信息候选列表可以包括MMVD子模式的运动信息候选列表,也就是说,运动信息候选列表可以包括对原始运动信息进行偏移后得到的运动信息,该原始运动信息可以包括但不限于:当前块的空域相邻块的运动信息、当前块的时域块的运动信息、默认运动信息等,对此原始运动信息不做限制。例如,获取多个空域相邻块的运动信息,如运动信息C1-运动信息C4,并将运动信息C1、运动信息C2、对运动信息C3进行偏移后得到的运动信息C3’、对运动信息C4进行偏移后得到的运动信息C4’添加到运动信息候选列表。当然,上述方式只是示例,对此不做限制,只要运动信息候选列表包括至少一个对原始运动信息进行偏移后得到的运动信息即可。Exemplarily, when the second sub-block adopts the MMVD sub-mode in the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the MMVD sub-mode, that is, the motion information candidate list may include the original motion information The motion information obtained after the information is offset, the original motion information may include but not limited to: the motion information of the current block's spatial adjacent blocks, the motion information of the current block's time domain block, the default motion information, etc., the original motion information Information is not limited. For example, the motion information of multiple spatial adjacent blocks is obtained, such as motion information C1-motion information C4, and motion information C1, motion information C2, motion information C3' obtained by offsetting motion information C3, motion information The motion information C4' obtained after the offset of C4 is added to the motion information candidate list. Of course, the above manner is just an example, and there is no limitation thereto, as long as the motion information candidate list includes at least one piece of motion information obtained by offsetting the original motion information.
MMVD是对原始运动信息进行固定方向、固定矢量差的偏移,从而得到新的运行信息。例如,通过如下方式得到新的运动信息,新的运动信息可以添加到运动信息候选列表。MMVD is to offset the original motion information with a fixed direction and a fixed vector difference, so as to obtain new running information. For example, by obtaining new motion information in the following manner, the new motion information can be added to the motion information candidate list.
MV(new)=MV(original)+offset;或者,MV(new)=MV(original)-offset。MV(new)表示偏移后得到的新的运动矢量(基于这个新的运动矢量,就可以得到新的运动信息),MV(original)表示原始运动矢量(即原始运动信息包括的原始运动矢量),offset表示固定矢量差,offset的值可以任意配置,如+1,-1,+2,-2等,对此offset的取值不做限制。MV(new)=MV(original)+offset; or, MV(new)=MV(original)-offset. MV(new) represents the new motion vector obtained after offset (based on this new motion vector, new motion information can be obtained), and MV(original) represents the original motion vector (that is, the original motion vector included in the original motion information) , offset represents a fixed vector difference, and the value of offset can be configured arbitrarily, such as +1, -1, +2, -2, etc. There is no limit to the value of this offset.
示例性的,在第二子块采用帧间预测模式中的仿射合并子模式(affine合并子模式)时,则运动信息候选列表可以包括仿射合并子模式的运动信息候选列表,也就是说,采用仿射合并子模式创建当前块的运动信息候选列表,该运动信息候选列表中的候选运动信息可以包括但不限于:基于当前块的空域相邻块的运动信息构造的运动信息、基于当前块的时域块的运动信息构造的运动信息、采用固定规则构造的运动信息、默认运动信息等,对此不做限制。Exemplarily, when the second sub-block adopts the affine merging submode (affine merging submode) in the inter prediction mode, the motion information candidate list may include the motion information candidate list of the affine merging submode, that is to say , using the affine merging sub-mode to create a candidate list of motion information for the current block, the candidate motion information in the candidate list of motion information may include but not limited to: motion information constructed based on the motion information of the spatial adjacent blocks of the current block, based on the current The motion information constructed from the motion information of the time-domain block of the block, the motion information constructed using a fixed rule, the default motion information, etc., are not limited.
仿射合并子模式是基于子块的预测技术,通过运动参数模型可以推导出每一个子块的运动信息。基于此,在从运动信息候选列表中选择一个候选运动信息作为第二子块的目标运动信息之后,针对第二子块的每个子块,可以基于目标运动信息和运动参数模型,推导出第二子块的每个子块的运动信息,并根据第二子块的每个子块的运动信息确定所述每个子块的预测值,继而得到第二子块的预测值。例如,第二子块被划分为子块1和子块2,可以基于第二子块的目标运动信息和运动参数模型,推导出子块1的运动信息和子块2的运动信息,然后,可以根据子块1的运动信息确定子块1的预测值,根据子块2的运动信息确定子块2的预测值,并将子块1的预测值和子块2的预测值组成所述第二子块的预测值。The affine merging sub-mode is a prediction technology based on sub-blocks, and the motion information of each sub-block can be deduced through the motion parameter model. Based on this, after selecting a candidate motion information from the motion information candidate list as the target motion information of the second sub-block, for each sub-block of the second sub-block, based on the target motion information and the motion parameter model, the second The motion information of each sub-block of the sub-block, and the prediction value of each sub-block is determined according to the motion information of each sub-block of the second sub-block, and then the prediction value of the second sub-block is obtained. For example, the second sub-block is divided into
示例性的,在第二子块采用帧间预测模式的ATMVP(Alternative TemporalMotion Vector Prediction,可选时域运动矢量预测)子模式时,运动信息候选列表可以包括ATMVP子模式的运动信息候选列表,也就是说,采用ATMVP子模式获取候选运动信息。例如,通过指定运动信息确定当前块对应的参考帧,并从参考帧中获取与当前块对应的参考块,然后,利用参考块的运动信息确定当前块的候选运动信息,如对参考块的运动信息进行伸缩变化,将变化后的运动信息作为当前块的候选运动信息,对此不做限制。在得到当前块的候选运动信息后,可以将所述候选运动信息添加到ATMVP子模式的运动信息候选列表。若ATMVP子模式的运动信息候选列表只包括一个所述候选运动信息,则将所述候选运动信息作为第二子块的目标运动信息;若ATMVP子模式的运动信息候选列表包括一个所述候选运动信息,且包括其它候选运动信息(对其它候选运动信息的添加方式不做限制),则可以从ATMVP子模式的运动信息候选列表中选择一个候选运动信息作为第二子块的目标运动信息。Exemplarily, when the second sub-block adopts the ATMVP (Alternative TemporalMotion Vector Prediction, optional temporal motion vector prediction) sub-mode of the inter-frame prediction mode, the motion information candidate list may include the ATMVP sub-mode motion information candidate list, or That is, the candidate motion information is acquired using the ATMVP sub-mode. For example, determine the reference frame corresponding to the current block by specifying the motion information, and obtain the reference block corresponding to the current block from the reference frame, and then use the motion information of the reference block to determine the candidate motion information of the current block, such as the motion of the reference block The information is stretched and changed, and the changed motion information is used as the candidate motion information of the current block, which is not limited. After the candidate motion information of the current block is obtained, the candidate motion information may be added to the motion information candidate list of the ATMVP submode. If the motion information candidate list of the ATMVP sub-mode only includes one of the candidate motion information, then use the candidate motion information as the target motion information of the second sub-block; if the motion information candidate list of the ATMVP sub-mode includes one of the candidate motion information information, and includes other candidate motion information (there is no limitation on how to add other candidate motion information), then a candidate motion information can be selected from the motion information candidate list of the ATMVP sub-mode as the target motion information of the second sub-block.
示例性的,在第二子块采用帧间预测模式的ATMVP子模式时,可以通过指定运动信息确定当前块对应的参考帧,并从参考帧中获取与当前块对应的参考块,然后,利用参考块的运动信息确定当前块的候选运动信息,如对参考块的运动信息进行伸缩变化,将变化后的运动信息作为当前块的候选运动信息,对此不做限制。在得到当前块的候选运动信息后,可以直接将所述候选运动信息作为第二子块的目标运动信息。Exemplarily, when the second sub-block adopts the ATMVP sub-mode of the inter-frame prediction mode, the reference frame corresponding to the current block can be determined by specifying the motion information, and the reference block corresponding to the current block can be obtained from the reference frame, and then, use The motion information of the reference block is used to determine the candidate motion information of the current block. For example, the motion information of the reference block is scaled and changed, and the changed motion information is used as the candidate motion information of the current block. This is not limited. After the candidate motion information of the current block is obtained, the candidate motion information may be directly used as the target motion information of the second sub-block.
在上述实施例中,ATMVP子模式也可以称为SBTMVP(sub-block TMVP)子模式。In the foregoing embodiments, the ATMVP sub-mode may also be called an SBTMVP (sub-block TMVP) sub-mode.
编码端/解码端从运动信息候选列表中获取第二子块的目标运动信息,包括但不限于:The encoding end/decoding end obtains the target motion information of the second sub-block from the motion information candidate list, including but not limited to:
方式一、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧间预测模式,针对运动信息候选列表中的每个候选运动信息,将率失真代价最小的候选运动信息作为第二子块的目标运动信息。编码端在向解码端发送编码比特流时,所述编码比特流携带目标运动信息的指示信息,所述指示信息用于指示目标运动信息的索引信息,该索引信息用于表示目标运动信息是运动信息候选列表中的第几个候选运动信息。解码端接收来自编码端的编码比特流,并从所述编码比特流中解析出所述指示信息。基于目标运动信息的索引信息,从运动信息候选列表中选择与该索引信息对应的候选运动信息,该候选运动信息就是第二子块的目标运动信息。Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, to obtain the prediction information of the current block, and use the rate-distortion principle and the described The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is an intra block copy prediction mode, the prediction mode information of the second sub-block is an inter prediction mode, and for For each candidate motion information, the candidate motion information with the smallest rate-distortion cost is used as the target motion information of the second sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream carries the indication information of the target motion information, and the indication information is used to indicate the index information of the target motion information, and the index information is used to indicate that the target motion information is a motion The number candidate motion information in the information candidate list. The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target motion information, the candidate motion information corresponding to the index information is selected from the motion information candidate list, and the candidate motion information is the target motion information of the second sub-block.
方式二、编码端通过协议约定默认目标运动信息,解码端通过协议约定默认目标运动信息,这样,编码比特流中可以不携带目标运动信息的指示信息,从而节省编码开销。Method 2: The encoding end specifies the default target motion information through the protocol, and the decoding end specifies the default target motion information through the protocol. In this way, the coded bit stream does not need to carry the indication information of the target motion information, thereby saving coding overhead.
例如,编码端可以通过协议约定默认运动信息候选列表的第一个候选运动信息作为第二子块的目标运动信息,解码端可以通过协议约定默认运动信息候选列表的第一个候选运动信息作为第二子块的目标运动信息。当然,上述方式只是示例,对此不做限制。For example, the encoding end can agree on the first candidate motion information of the default motion information candidate list as the target motion information of the second sub-block through the agreement, and the decoding end can agree on the first candidate motion information of the default motion information candidate list as the second sub-block through the agreement. The target motion information of the second sub-block. Of course, the above manner is only an example, and is not limited thereto.
基于实施例3,在当前块所在当前帧为B帧或者I帧时,可以按照固定方向将当前块划分成第一子块和第二子块,第一子块和第二子块可以均为三角子块,第一子块和第二子块可以分别为三角子块和梯形子块,第一子块和第二子块可以均为梯形子块,第一子块和第二子块可以分别为三角子块和五边形子块,对此当前块的划分方式不做限制。示例性的,第一子块的预测模式信息可以为帧内块拷贝预测模式(IBC),第二子块的预测模式信息可以为帧间预测模式(Inter)。参见图5A-图5H所示,为第一子块采用帧内块拷贝预测模式、第二子块采用帧间预测模式的示例,对第一子块和第二子块的形状不做限制,图5A-图5H只是示例。Based on Embodiment 3, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, and the first sub-block and the second sub-block can be both Triangular sub-block, the first sub-block and the second sub-block can be triangular sub-block and ladder sub-block respectively, the first sub-block and the second sub-block can be both ladder-shaped sub-blocks, the first sub-block and the second sub-block can be They are triangular sub-blocks and pentagonal sub-blocks respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block may be an intra block copy prediction mode (IBC), and the prediction mode information of the second sub-block may be an inter prediction mode (Inter). Referring to FIG. 5A-FIG. 5H, it is an example in which the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the inter-frame prediction mode, and there is no restriction on the shape of the first sub-block and the second sub-block. 5A-5H are just examples.
示例性的,在第一子块采用帧内块拷贝预测模式、第二子块采用帧间预测模式时,还可以通过当前块的周围块的预测模式信息,确定划分方向以及哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧间预测模式,即哪一个子块为第一子块,哪一个子块为第二子块。Exemplarily, when the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the inter-frame prediction mode, the division direction and which sub-block adopts the prediction mode information of the surrounding blocks of the current block can also be determined. In the intra block copy prediction mode, which sub-block adopts the inter prediction mode, that is, which sub-block is the first sub-block and which sub-block is the second sub-block.
参见图5I所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息为帧内块拷贝预测模式,N1的预测模式信息为帧内块拷贝预测模式,则可以采用图5I所示的3种划分方向中的一种划分方向,且图5I示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧间预测模式。Referring to FIG. 5I, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when both the first sub-block and the second sub-block are triangular sub-blocks, if N0 The prediction mode information is the intra block copy prediction mode, and the prediction mode information of N1 is the intra block copy prediction mode, then one of the three division directions shown in Figure 5I can be used, and Figure 5I shows which One sub-block adopts the intra block copy prediction mode, and which sub-block adopts the inter-frame prediction mode.
参见图5J所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息不为帧内块拷贝预测模式,N1的预测模式信息不为帧内块拷贝预测模式,则采用图5J所示的3种划分方向中的一种划分方向,且图5J示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧间预测模式。Referring to FIG. 5J, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the The prediction mode information is not the intra block copy prediction mode, and the prediction mode information of N1 is not the intra block copy prediction mode, then one of the three division directions shown in Figure 5J is adopted, and Figure 5J shows Which sub-block adopts the intra-block copy prediction mode, and which sub-block adopts the inter-frame prediction mode.
参见图5K所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息为帧内块拷贝预测模式,N1的预测模式信息不为帧内块拷贝预测模式,则采用图5K所示的3种划分方向中的一种划分方向,图5K示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧间预测模式。Referring to FIG. 5K, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when both the first sub-block and the second sub-block are triangular sub-blocks, if N0 The prediction mode information is the intra block copy prediction mode, and the prediction mode information of N1 is not the intra block copy prediction mode, then one of the three division directions shown in Figure 5K is adopted, which one is shown in Figure 5K The sub-block adopts the intra-block copy prediction mode, and which sub-block adopts the inter-frame prediction mode.
参见图5L所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息不为帧内块拷贝预测模式,N1的预测模式信息为帧内块拷贝预测模式,则采用图5L所示的3种划分方向中的一种划分方向,图5L示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧间预测模式。Referring to FIG. 5L, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when both the first sub-block and the second sub-block are triangular sub-blocks, if the The prediction mode information is not the intra block copy prediction mode, and the prediction mode information of N1 is the intra block copy prediction mode, then one of the three division directions shown in Figure 5L is adopted, which one is shown in Figure 5L The sub-block adopts the intra-block copy prediction mode, and which sub-block adopts the inter-frame prediction mode.
当然,图5I-图5L只是示例,当采用其它形状时,如第一子块和第二子块分别为三角子块和梯形子块,或第一子块和第二子块均为梯形子块,或第一子块和第二子块分别为三角子块和五边形子块,其实现方式可以参见图5I-图5L所示,在此不再重复赘述。Certainly, Fig. 5I-Fig. 5L is just an example, when other shapes are adopted, such as the first sub-block and the second sub-block are triangular sub-blocks and trapezoidal sub-blocks respectively, or the first sub-block and the second sub-block are both trapezoidal sub-blocks The blocks, or the first sub-block and the second sub-block are triangular sub-blocks and pentagonal sub-blocks respectively, and the implementation thereof can be referred to as shown in Fig. 5I-Fig. 5L, and will not be repeated here.
在实施例3中,假设当前块存在两个区域,一个区域1是屏幕内容,另一个区域2具有较强的时域相关性,在这种应用场景下,通过将当前块划分为第一子块(即区域1的子块)和第二子块(即区域2的子块),且第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧间预测模式,基于屏幕内容中同一帧内存在大量重复出现的纹理这一特性,由于第一子块使用帧内块拷贝预测模式,能够提升编码效果。由于第二子块使用帧间预测模式,能够达到有效去除视频时域冗余的目的,能够提升编码效果。In Embodiment 3, it is assumed that there are two areas in the current block, one
实施例4:针对实施例1中的步骤204,若第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内预测模式,则可以采用实施例4实现,其它过程参见实施例1。在实施例3中,构建块矢量候选列表,块矢量候选列表包括多个候选块矢量;从块矢量候选列表中选择一个候选块矢量作为第一子块的目标块矢量。获取第二子块的目标帧内子预测模式。根据目标块矢量获取与第一子块对应的预测值;根据目标帧内子预测模式获取与第二子块对应的预测值。Embodiment 4: For
例如,为当前块构建块矢量候选列表,块矢量候选列表中的候选块矢量包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP列表中的历史块矢量、默认块矢量等,对此块矢量候选列表的构建过程不做限制。在为当前块构建块矢量候选列表后,从块矢量候选列表中选择一个候选块矢量作为第一子块的目标块矢量。在确定第一子块的目标块矢量后,可以根据目标块矢量获取与第一子块对应的预测值,对此预测值的获取过程不做限制。For example, a block vector candidate list is constructed for the current block, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatial adjacent blocks of the current block, historical block vectors in the HMVP list corresponding to the current block, default block vector, etc., there is no restriction on the construction process of this block vector candidate list. After the block vector candidate list is constructed for the current block, a candidate block vector is selected from the block vector candidate list as the target block vector of the first sub-block. After the target block vector of the first sub-block is determined, a predicted value corresponding to the first sub-block may be obtained according to the target block vector, and there is no limitation on the process of obtaining the predicted value.
示例性的,在第一子块采用帧内块拷贝预测模式中的MMVD子模式时,则块矢量候选列表可以包括MMVD子模式的块矢量候选列表,也就是说,块矢量候选列表包括至少一个对原始块矢量进行偏移后得到的块矢量,该原始块矢量可以包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP列表中的历史块矢量、默认块矢量等。Exemplarily, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, the block vector candidate list may include the block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes at least one The block vector obtained after offsetting the original block vector, which may include but not limited to: the block vector of the adjacent block in the space of the current block, the historical block vector in the HMVP list corresponding to the current block, the default block vector, etc. .
例如,可以获取第二子块的目标帧内子预测模式,在得到目标帧内子预测模式之后,可以根据目标帧内子预测模式获取与第二子块对应的预测值,对此预测值的获取方式不做限制。示例性的,获取第二子块的目标帧内子预测模式,可以包括但不限于如下方式:For example, the target intra-frame sub-prediction mode of the second sub-block can be obtained. After the target intra-frame sub-prediction mode is obtained, the prediction value corresponding to the second sub-block can be obtained according to the target intra-frame sub-prediction mode. The method of obtaining the prediction value is different. Do limit. Exemplarily, obtaining the target intra-frame sub-prediction mode of the second sub-block may include but not limited to the following methods:
方式一、将指定帧内子预测模式确定为第二子块的目标帧内子预测模式。也就是说,编码端将指定帧内子预测模式确定为第二子块的目标帧内子预测模式,解码端将指定帧内子预测模式确定为第二子块的目标帧内子预测模式。例如,编码端通过协议约定默认将Planar模式确定为第二子块的目标帧内子预测模式,解码端通过协议约定默认将Planar模式确定为第二子块的目标帧内子预测模式。又例如,编码端通过协议约定默认将DC模式确定为第二子块的目标帧内子预测模式,解码端通过协议约定默认将DC模式确定为第二子块的目标帧内子预测模式。当然,上述Planar模式和DC模式只是一个示例,还可以为通过协议约定默认将各种角度预测模式确定为第二子块的目标帧内子预测模式,对此不做限制。Manner 1: Determine the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block. That is to say, the encoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block, and the decoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block. For example, the encoding end determines the Planar mode as the target intra-frame sub-prediction mode of the second sub-block by default by agreement, and the decoder determines the Planar mode as the target intra-frame sub-prediction mode of the second sub-block by default by agreement. For another example, the encoding end determines the DC mode as the target intra-frame sub-prediction mode of the second sub-block by default by agreement, and the decoder determines the DC mode as the target intra-frame sub-prediction mode of the second sub-block by default by agreement. Of course, the above-mentioned Planar mode and DC mode are just examples, and various angle prediction modes may be determined by default as target intra-frame sub-prediction modes of the second sub-block by agreement, and there is no limitation on this.
方式二、构建帧内子预测模式候选列表,该帧内子预测模式候选列表可以包括多个候选帧内子预测模式;从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为第二子块的目标帧内子预测模式。例如,为当前块构建帧内子预测模式候选列表,帧内子预测模式候选列表中的候选帧内子预测模式包括但不限于:Planar模式、DC模式、垂直角度模式、水平角度模式等,对此帧内子预测模式候选列表的构建过程不做限制,帧内子预测模式候选列表还可以包括其它角度的候选帧内子预测模式。在为当前块构建帧内子预测模式候选列表后,从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为第二子块的目标帧内子预测模式,并根据目标帧内子预测模式获取与第二子块对应的预测值,对此获取过程不做限制。
编码端/解码端从帧内子预测模式候选列表获取目标帧内子预测模式,包括但不限于:The encoder/decoder obtains the target intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list, including but not limited to:
方式A、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内预测模式,针对帧内子预测模式候选列表中的每个候选帧内子预测模式,将率失真代价最小的候选帧内子预测模式作为第二子块的目标帧内子预测模式。编码端向解码端发送编码比特流时,该编码比特流携带目标帧内子预测模式的指示信息,所述指示信息用于指示目标帧内子预测模式的索引信息,该索引信息用于表示目标帧内子预测模式是帧内子预测模式候选列表中的第几个候选帧内子预测模式。解码端接收来自编码端的编码比特流,并从所述编码比特流中解析出所述指示信息。基于目标帧内子预测模式的索引信息,从帧内子预测模式候选列表中选择与该索引信息对应的候选帧内子预测模式,该候选帧内子预测模式就是第二子块的目标帧内子预测模式。Mode A. The encoding end jointly predicts the current block based on each block division information, each group of prediction mode information, and each group of candidates in the prediction mode information to obtain the prediction information of the current block, and uses the rate-distortion principle and the above-mentioned The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the intra block copy prediction mode, the prediction mode information of the second sub-block is the intra prediction mode, and for the intra sub-prediction mode candidate list For each candidate intra-frame sub-prediction mode in , the candidate intra-frame sub-prediction mode with the smallest rate-distortion cost is used as the target intra-frame sub-prediction mode of the second sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream carries indication information of the target intra-frame sub-prediction mode, and the indication information is used to indicate index information of the target intra-frame sub-prediction mode, and the index information is used to represent the target intra-frame sub-prediction The prediction mode is the number of candidate intra-frame sub-prediction modes in the intra-frame sub-prediction mode candidate list. The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target intra sub-prediction mode, a candidate intra-frame sub-prediction mode corresponding to the index information is selected from the intra-frame sub-prediction mode candidate list, and the candidate intra-frame sub-prediction mode is the target intra-frame sub-prediction mode of the second sub-block.
方式B、编码端通过协议约定默认目标帧内子预测模式,解码端通过协议约定默认目标帧内子预测模式,这样,编码比特流不携带目标帧内子预测模式的指示信息,从而节省编码开销。例如,编码端通过协议约定默认帧内子预测模式候选列表中的第一个候选帧内子预测模式作为第二子块的目标帧内子预测模式,解码端通过协议约定默认帧内子预测模式候选列表中的第一个候选帧内子预测模式作为第二子块的目标帧内子预测模式。Method B: The encoding end specifies the default target intra-frame sub-prediction mode through the agreement, and the decoder specifies the default target intra-frame sub-prediction mode through the agreement. In this way, the coded bit stream does not carry the indication information of the target intra-frame sub-prediction mode, thereby saving coding overhead. For example, the encoding end agrees by agreement that the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list is used as the target intra-frame sub-prediction mode of the second sub-block, and the decoding end agrees by agreement that the first candidate intra-frame sub-prediction mode in the candidate list is The first candidate intra-frame sub-prediction mode is used as the target intra-frame sub-prediction mode of the second sub-block.
方式三、将第二子块的相邻块的帧内子预测模式确定为第二子块的目标帧内子预测模式。例如,针对编码端来说,若第二子块的相邻块采用某个帧内子预测模式进行预测,则编码端可以获取第二子块的相邻块的帧内子预测模式,并将第二子块的相邻块的帧内子预测模式确定为第二子块的目标帧内子预测模式。针对解码端来说,若第二子块的相邻块采用某个帧内子预测模式进行预测,则解码端可以获取第二子块的相邻块的帧内子预测模式,并将第二子块的相邻块的帧内子预测模式确定为第二子块的目标帧内子预测模式。Way 3: Determine the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. For example, for the encoding end, if the adjacent blocks of the second sub-block are predicted using a certain intra-frame sub-prediction mode, the encoding end can obtain the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block, and use the second The intra sub-prediction modes of neighboring blocks of the sub-block are determined as the target intra-sub-prediction mode of the second sub-block. For the decoding end, if the adjacent blocks of the second sub-block are predicted using a certain intra-frame sub-prediction mode, the decoding end can obtain the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block, and use the second sub-block The intra-frame sub-prediction mode of the adjacent block of is determined as the target intra-frame sub-prediction mode of the second sub-block.
基于实施例4,在当前块所在当前帧为B帧或者I帧时,可以按照固定方向将当前块划分成第一子块和第二子块,第一子块和第二子块可以均为三角子块,第一子块和第二子块可以分别为三角子块和梯形子块,第一子块和第二子块可以均为梯形子块,第一子块和第二子块可以分别为三角子块和五边形子块,对此当前块的划分方式不做限制。示例性的,第一子块的预测模式信息可以为帧内块拷贝预测模式(IBC),第二子块的预测模式信息可以为帧内预测模式(Intra)。参见图6A-图6H所示,为第一子块采用帧内块拷贝预测模式、第二子块采用帧内预测模式的示例,对第一子块和第二子块的形状不做限制,图6A-图6H只是示例。Based on
示例性的,在第一子块采用帧内块拷贝预测模式、第二子块采用帧内预测模式时,还可以通过当前块的周围块的预测模式信息,确定划分方向以及哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧内预测模式,即哪一个子块为第一子块,哪一个子块为第二子块。Exemplarily, when the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the intra-frame prediction mode, the division direction and which sub-block adopts the prediction mode information of the surrounding blocks of the current block can also be determined. In the intra block copy prediction mode, which sub-block adopts the intra prediction mode, that is, which sub-block is the first sub-block and which sub-block is the second sub-block.
参见图7A所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息为帧内预测模式,N1的预测模式信息为帧内预测模式,则可以采用图7A所示的3种划分方向中的一种划分方向,且图7A示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 7A, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the The prediction mode information is an intra-frame prediction mode, and the prediction mode information of N1 is an intra-frame prediction mode, then one of the three division directions shown in Figure 7A can be used, and Figure 7A shows which sub-block adopts Intra block copy prediction mode, which sub-block adopts intra prediction mode.
参见图7B所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息不为帧内预测模式,N1的预测模式信息不为帧内预测模式,则可以采用图7B所示的3种划分方向中的一种划分方向,且图7B示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 7B, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the The prediction mode information is not an intra prediction mode, and the prediction mode information of N1 is not an intra prediction mode, then one of the three division directions shown in Figure 7B can be used, and Figure 7B shows which subdivision direction The block adopts the intra block copy prediction mode, which sub-block adopts the intra prediction mode.
参见图7C所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息为帧内预测模式,N1的预测模式信息不为帧内预测模式,则可以采用图7C所示的3种划分方向中的一种划分方向,且图7C示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 7C, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if N0 The prediction mode information is an intra-frame prediction mode, and the prediction mode information of N1 is not an intra-frame prediction mode, then one of the three division directions shown in Figure 7C can be used, and Figure 7C shows which sub-block The intra block copy prediction mode is used, which sub-block adopts the intra prediction mode.
参见图7D所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息不为帧内预测模式,N1的预测模式信息为帧内预测模式,则可以采用图7D所示的3种划分方向中的一种划分方向,且图7D示出了哪一个子块采用帧内块拷贝预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 7D, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if N0 The prediction mode information is not an intra-frame prediction mode, and the prediction mode information of N1 is an intra-frame prediction mode, then one of the three division directions shown in Figure 7D can be used, and Figure 7D shows which sub-block The intra block copy prediction mode is used, which sub-block adopts the intra prediction mode.
当然,图7A-图7D只是示例,当采用其它形状时,如第一子块和第二子块分别为三角子块和梯形子块,或第一子块和第二子块均为梯形子块,或第一子块和第二子块分别为三角子块和五边形子块,其实现方式可以参见图7A-图7D所示,在此不再重复赘述。Of course, Fig. 7A-Fig. 7D are just examples, when adopting other shapes, such as the first sub-block and the second sub-block are triangular sub-block and trapezoidal sub-block respectively, or the first sub-block and the second sub-block are both trapezoidal sub-blocks The blocks, or the first sub-block and the second sub-block are triangular sub-blocks and pentagonal sub-blocks respectively, and the implementation thereof can be referred to as shown in FIG. 7A-FIG. 7D , and will not be repeated here.
在实施例4中,假设当前块存在两个区域,一个区域1是屏幕内容,另一个区域2具有自然纹理,在这种应用场景下,通过将当前块划分为第一子块(即区域1的子块)和第二子块(即区域2的子块),且第一子块的预测模式信息为帧内块拷贝预测模式,第二子块的预测模式信息为帧内预测模式,基于屏幕内容中同一帧内存在大量重复出现的纹理这一特性,由于第一子块使用帧内块拷贝预测模式,能够提升编码效果。由于帧内预测模式对应纹理方向,第二子块使用帧内预测模式时,能够达到有效去除视频冗余的目的,能够提升编码效果。In
实施例5:针对实施例1中的步骤204,若第一子块的预测模式信息为帧内预测模式,第二子块的预测模式信息为帧内预测模式,则可以采用实施例5实现,其它过程参见实施例1。在实施例5中,可以获取第一子块的第一目标帧内子预测模式、第二子块的第二目标帧内子预测模式,该第一目标帧内子预测模式与该第二目标帧内子预测模式不同;根据该第一目标帧内子预测模式获取与第一子块对应的预测值;根据该第二目标帧内子预测模式获取与所述第二子块对应的预测值。Embodiment 5: For
例如,获取第一子块的第一目标帧内子预测模式和第二子块的第二目标帧内子预测模式,并根据该第一目标帧内子预测模式获取与第一子块对应的预测值,根据该第二目标帧内子预测模式获取与所述第二子块对应的预测值,对此预测值的获取方式不做限制。示例性的,获取第一目标帧内子预测模式和第二目标帧内子预测模式,可以包括但不限于如下方式:For example, acquiring a first target intra-frame sub-prediction mode of the first sub-block and a second target intra-frame sub-prediction mode of the second sub-block, and acquiring a prediction value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode, Acquire a predictive value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode, and there is no limitation on the manner of obtaining the predictive value. Exemplarily, obtaining the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode may include but not limited to the following methods:
方式一、将指定第一帧内子预测模式确定为第一子块的第一目标帧内子预测模式,并将指定第二帧内子预测模式确定为第二子块的第二目标帧内子预测模式。也就是说,编码端可以将指定第一帧内子预测模式确定为第一子块的第一目标帧内子预测模式,并将指定第二帧内子预测模式确定为第二子块的第二目标帧内子预测模式,解码端可以将指定第一帧内子预测模式确定为第一子块的第一目标帧内子预测模式,并将指定第二帧内子预测模式确定为第二子块的第二目标帧内子预测模式。例如,编码端可以通过协议约定默认将Planar模式确定为第一子块的第一目标帧内子预测模式,并通过协议约定默认将DC模式确定为第二子块的第二目标帧内子预测模式。解码端可以通过协议约定默认将Planar模式确定为第一子块的第一目标帧内子预测模式,并通过协议约定默认将DC模式确定为第二子块的第二目标帧内子预测模式。当然,上述方式只是一个示例,还可以进行其它的约定,对此不做限制。Manner 1: The first intra-frame sub-prediction mode is designated as the first target intra-frame sub-prediction mode of the first sub-block, and the second intra-frame sub-prediction mode is designated as the second target intra-frame sub-prediction mode of the second sub-block. That is to say, the encoder may determine the designated first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the first sub-block, and determine the designated second intra-frame sub-prediction mode as the second target frame of the second sub-block Intra sub-prediction mode, the decoding end may determine the designated first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the first sub-block, and determine the designated second intra-frame sub-prediction mode as the second target frame of the second sub-block Inner prediction mode. For example, the encoding end may determine the Planar mode as the first target intra-frame sub-prediction mode of the first sub-block by default by agreement, and determine the DC mode as the second target intra-frame sub-prediction mode of the second sub-block by default by agreement. The decoding end may determine the Planar mode as the first target intra-frame sub-prediction mode of the first sub-block by default by agreement, and determine the DC mode as the second target intra-frame sub-prediction mode of the second sub-block by default by agreement. Of course, the above manner is only an example, and other agreements can also be made, which is not limited.
方式二、构建帧内子预测模式候选列表,该帧内子预测模式候选列表可以包括多个候选帧内子预测模式;从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为第一子块的第一目标帧内子预测模式,并从帧内子预测模式候选列表中选择另一个候选帧内子预测模式作为第二子块的第二目标帧内子预测模式。例如,为当前块构建帧内子预测模式候选列表,帧内子预测模式候选列表中的候选帧内子预测模式包括但不限于:Planar模式、DC模式、垂直角度模式、水平角度模式等,对此帧内子预测模式候选列表的构建过程不做限制,帧内子预测模式候选列表还可以包括其它角度的候选帧内子预测模式。在为当前块构建帧内子预测模式候选列表后,从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为第一子块的第一目标帧内子预测模式,并根据第一目标帧内子预测模式获取与第一子块对应的预测值,对此获取过程不做限制。在排除第一目标帧内子预测模式的基础上,从帧内子预测模式候选列表中选择另一个候选帧内子预测模式作为第二子块的第二目标帧内子预测模式,并根据第二目标帧内子预测模式获取与第二子块对应的预测值,对此获取过程不做限制。Method 2: Constructing an intra-frame sub-prediction mode candidate list, the intra-frame sub-prediction mode candidate list may include multiple candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the first sub-block A target intra-frame sub-prediction mode, and selecting another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the second target intra-frame sub-prediction mode of the second sub-block. For example, a candidate list of intra-frame sub-prediction modes is constructed for the current block. The candidate intra-frame sub-prediction modes in the candidate list of intra-frame sub-prediction modes include but are not limited to: Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc. For this intra-frame sub-prediction mode The construction process of the prediction mode candidate list is not limited, and the intra-frame sub-prediction mode candidate list may also include candidate intra-frame sub-prediction modes from other angles. After the intra-frame sub-prediction mode candidate list is constructed for the current block, a candidate intra-frame sub-prediction mode is selected from the intra-frame sub-prediction mode candidate list as the first target intra-frame sub-prediction mode of the first sub-block, and according to the first target intra-frame sub-prediction The mode obtains the prediction value corresponding to the first sub-block, and there is no limitation on the obtaining process. On the basis of excluding the first target intra-frame sub-prediction mode, select another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the second target intra-frame sub-prediction mode of the second sub-block, and according to the second target intra-frame sub-prediction mode The prediction mode acquires the predicted value corresponding to the second sub-block, and there is no limitation on this acquisition process.
编码端/解码端从帧内子预测模式候选列表获取目标帧内子预测模式,包括但不限于:The encoder/decoder obtains the target intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list, including but not limited to:
方式A、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧内预测模式,第二子块的预测模式信息为帧内预测模式,针对帧内子预测模式候选列表中的每个候选帧内子预测模式,将率失真代价最小的候选帧内子预测模式作为第一子块的第一目标帧内子预测模式。在排除第一目标帧内子预测模式的基础上,将率失真代价最小的候选帧内子预测模式作为第二子块的第二目标帧内子预测模式。Mode A. The encoding end jointly predicts the current block based on each block division information, each group of prediction mode information, and each group of candidates in the prediction mode information to obtain the prediction information of the current block, and uses the rate-distortion principle and the above-mentioned The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is an intra-frame prediction mode, the prediction mode information of the second sub-block is an intra-frame prediction mode, and for the intra-frame sub-prediction mode candidate list For each candidate intra-frame sub-prediction mode, the candidate intra-frame sub-prediction mode with the smallest rate-distortion cost is used as the first target intra-frame sub-prediction mode of the first sub-block. On the basis of excluding the first target intra-frame sub-prediction mode, the candidate intra-frame sub-prediction mode with the smallest rate-distortion cost is used as the second target intra-frame sub-prediction mode of the second sub-block.
编码端向解码端发送编码比特流时,该编码比特流携带目标帧内子预测模式的指示信息,所述指示信息用于指示第一目标帧内子预测模式的索引信息,该索引信息用于表示第一目标帧内子预测模式是帧内子预测模式候选列表中的第几个候选帧内子预测模式。所述指示信息还用于指示第二目标帧内子预测模式的索引信息,该索引信息用于表示第二目标帧内子预测模式是帧内子预测模式候选列表中的第几个候选帧内子预测模式。When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream carries indication information of the target intra-frame sub-prediction mode, and the indication information is used to indicate the index information of the first target intra-frame sub-prediction mode. A target intra-frame sub-prediction mode is the number of candidate intra-frame sub-prediction modes in the intra-frame sub-prediction mode candidate list. The indication information is also used to indicate index information of the second target intra sub-prediction mode, and the index information is used to indicate which candidate intra sub-prediction mode is the second target intra sub-prediction mode in the intra sub-prediction mode candidate list.
解码端接收来自编码端的编码比特流,并从所述编码比特流中解析出所述指示信息。基于第一目标帧内子预测模式的索引信息,从帧内子预测模式候选列表中选择与该索引信息对应的候选帧内子预测模式,该候选帧内子预测模式是第一子块的第一目标帧内子预测模式。基于第二目标帧内子预测模式的索引信息,从帧内子预测模式候选列表中选择与该索引信息对应的候选帧内子预测模式,该候选帧内子预测模式是第二子块的第二目标帧内子预测模式。The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the first target intra-frame sub-prediction mode, select a candidate intra-frame sub-prediction mode corresponding to the index information from the intra-frame sub-prediction mode candidate list, and the candidate intra-frame sub-prediction mode is the first target intra-frame sub-prediction mode of the first sub-block predictive mode. Based on the index information of the second target intra-frame sub-prediction mode, select a candidate intra-frame sub-prediction mode corresponding to the index information from the intra-frame sub-prediction mode candidate list, and the candidate intra-frame sub-prediction mode is the second target intra-frame sub-prediction mode of the second sub-block predictive mode.
方式B、编码端通过协议约定默认第一目标帧内子预测模式和第二目标帧内子预测模式,解码端通过协议约定默认第一目标帧内子预测模式和第二目标帧内子预测模式,这样,编码比特流不携带目标帧内子预测模式的指示信息,从而节省编码开销。例如,编码端通过协议约定默认帧内子预测模式候选列表中的第一个候选帧内子预测模式作为第一子块的第一目标帧内子预测模式,帧内子预测模式候选列表中的第二个候选帧内子预测模式作为第二子块的第二目标帧内子预测模式。解码端通过协议约定默认帧内子预测模式候选列表中的第一个候选帧内子预测模式作为第一子块的第一目标帧内子预测模式,帧内子预测模式候选列表中的第二个候选帧内子预测模式作为第二子块的第二目标帧内子预测模式。Method B: The encoding end agrees to default the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode through the agreement, and the decoding end agrees to default the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode through the agreement. In this way, the encoding The bit stream does not carry indication information of the target intra-frame sub-prediction mode, thereby saving coding overhead. For example, the encoding end agrees through an agreement that the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list is used as the first target intra-frame sub-prediction mode of the first sub-block, and the second candidate in the intra-frame sub-prediction mode candidate list The intra sub-prediction mode serves as a second target intra sub-prediction mode of the second sub-block. The decoding end agrees through the protocol that the first candidate intra sub-prediction mode in the default intra sub-prediction mode candidate list is used as the first target intra sub-prediction mode of the first sub-block, and the second candidate intra-sub-prediction mode in the candidate list of intra-frame sub-prediction modes The prediction mode serves as a second target intra sub-prediction mode of the second sub-block.
方式三、若第一子块的第一相邻块的帧内子预测模式与第二子块的第二相邻块的帧内子预测模式不同,则可以将第一相邻块的帧内子预测模式确定为第一子块的第一目标帧内子预测模式,并将第二相邻块的帧内子预测模式确定为第二子块的第二目标帧内子预测模式。或者,若第一相邻块的帧内子预测模式与第二相邻块的帧内子预测模式相同,则可以将第一相邻块的帧内子预测模式确定为第一子块的第一目标帧内子预测模式,并将与第一目标帧内子预测模式不同的另一个帧内子预测模式确定为第二子块的第二目标帧内子预测模式。或者,若第一相邻块的帧内子预测模式与第二相邻块的帧内子预测模式相同,则可以将第二相邻块的帧内子预测模式确定为第二子块的第二目标帧内子预测模式,并将与第二目标帧内子预测模式不同的另一个帧内子预测模式确定为第一子块的第一目标帧内子预测模式。Method 3: If the intra-frame sub-prediction mode of the first adjacent block of the first sub-block is different from the intra-frame sub-prediction mode of the second adjacent block of the second sub-block, the intra-frame sub-prediction mode of the first adjacent block can be set to Determine as the first target intra-frame sub-prediction mode of the first sub-block, and determine the intra-frame sub-prediction mode of the second neighboring block as the second target intra-frame sub-prediction mode of the second sub-block. Or, if the intra-frame sub-prediction mode of the first adjacent block is the same as the intra-frame sub-prediction mode of the second adjacent block, the intra-frame sub-prediction mode of the first adjacent block may be determined as the first target frame of the first sub-block An intra sub-prediction mode, and another intra-frame sub-prediction mode different from the first target intra-frame sub-prediction mode is determined as a second target intra-frame sub-prediction mode of the second sub-block. Alternatively, if the intra-frame sub-prediction mode of the first adjacent block is the same as the intra-frame sub-prediction mode of the second adjacent block, the intra-frame sub-prediction mode of the second adjacent block may be determined as the second target frame of the second sub-block Intra sub-prediction mode, and another intra-frame sub-prediction mode different from the second target intra-frame sub-prediction mode is determined as the first target intra-frame sub-prediction mode of the first sub-block.
示例性的,针对编码端或者解码端来说,若第一子块的第一相邻块采用帧内子预测模式A进行预测,第二子块的第二相邻块采用帧内子预测模式B进行预测,当帧内子预测模式A与帧内子预测模式B不同时,则可以将帧内子预测模式A确定为第一子块的第一目标帧内子预测模式,并将帧内子预测模式B确定为第二子块的第二目标帧内子预测模式。Exemplarily, for the encoding end or the decoding end, if the first adjacent block of the first sub-block is predicted using intra-frame sub-prediction mode A, the second adjacent block of the second sub-block is predicted using intra-frame sub-prediction mode B prediction, when the intra-frame sub-prediction mode A is different from the intra-frame sub-prediction mode B, the intra-frame sub-prediction mode A may be determined as the first target intra-frame sub-prediction mode of the first sub-block, and the intra-frame sub-prediction mode B may be determined as the first target intra-frame sub-prediction mode The second target intra-frame sub-prediction mode of the two sub-blocks.
当帧内子预测模式A与帧内子预测模式B相同时,则将帧内子预测模式A确定为第一子块的第一目标帧内子预测模式,并将与帧内子预测模式A不同的另一个帧内子预测模式C确定为第二子块的第二目标帧内子预测模式。例如,帧内子预测模式C可以为第二相邻块的相邻块的帧内子预测模式,又例如,若帧内子预测模式A为Planar模式,帧内子预测模式C可以为DC模式,对此不做限制,只要帧内子预测模式C与帧内子预测模式A不同即可。When the intra-frame sub-prediction mode A is the same as the intra-frame sub-prediction mode B, the intra-frame sub-prediction mode A is determined as the first target intra-frame sub-prediction mode of the first sub-block, and another frame different from the intra-frame sub-prediction mode A The intra sub-prediction mode C is determined as the second target intra-sub-prediction mode of the second sub-block. For example, the intra-frame sub-prediction mode C may be the intra-frame sub-prediction mode of the adjacent block of the second adjacent block. For another example, if the intra-frame sub-prediction mode A is the Planar mode, the intra-frame sub-prediction mode C may be the DC mode. There are restrictions, as long as the intra-frame sub-prediction mode C is different from the intra-frame sub-prediction mode A.
当帧内子预测模式A与帧内子预测模式B相同时,则将帧内子预测模式B确定为第二子块的第二目标帧内子预测模式,并将与帧内子预测模式B不同的另一个帧内子预测模式D确定为第一子块的第一目标帧内子预测模式。例如,帧内子预测模式D可以为第一相邻块的相邻块的帧内子预测模式,又例如,若帧内子预测模式B为Planar模式,帧内子预测模式D可以为DC模式,对此不做限制,只要帧内子预测模式D与帧内子预测模式B不同即可。When the intra-frame sub-prediction mode A is the same as the intra-frame sub-prediction mode B, the intra-frame sub-prediction mode B is determined as the second target intra-frame sub-prediction mode of the second sub-block, and another frame different from the intra-frame sub-prediction mode B The intra sub-prediction mode D is determined as the first target intra-sub-prediction mode of the first sub-block. For example, the intra-frame sub-prediction mode D may be the intra-frame sub-prediction mode of the adjacent block of the first adjacent block. For another example, if the intra-frame sub-prediction mode B is the Planar mode, the intra-frame sub-prediction mode D may be the DC mode. There is a limitation, as long as the intra sub-prediction mode D is different from the intra sub-prediction mode B.
示例性的,针对编码端或解码端来说,若第一子块的第一相邻块采用帧内子预测模式A进行预测,第二子块的第二相邻块未采用帧内预测模式进行预测,则将帧内子预测模式A确定为第一子块的第一目标帧内子预测模式,将与帧内子预测模式A不同的另一个帧内子预测模式C确定为第二子块的第二目标帧内子预测模式。例如,帧内子预测模式C为第二相邻块的相邻块的帧内子预测模式,又例如,若帧内子预测模式A为Planar模式,帧内子预测模式C可以为DC模式,对此不做限制,只要帧内子预测模式C与帧内子预测模式A不同即可。Exemplarily, for the encoding end or the decoding end, if the first adjacent block of the first sub-block is predicted using the intra-frame sub-prediction mode A, the second adjacent block of the second sub-block is not predicted using the intra-frame prediction mode prediction, the intra-frame sub-prediction mode A is determined as the first target intra-frame sub-prediction mode of the first sub-block, and another intra-frame sub-prediction mode C different from the intra-frame sub-prediction mode A is determined as the second target of the second sub-block Intra sub-prediction mode. For example, the intra-frame sub-prediction mode C is the intra-frame sub-prediction mode of the adjacent block of the second adjacent block, and for example, if the intra-frame sub-prediction mode A is the Planar mode, the intra-frame sub-prediction mode C can be the DC mode, and this is not done As long as the intra-frame sub-prediction mode C is different from the intra-frame sub-prediction mode A.
示例性的,针对编码端或解码端来说,若第二子块的第二相邻块采用帧内子预测模式B进行预测,第一子块的第一相邻块未采用帧内预测模式进行预测,则将帧内子预测模式B确定为第二子块的第二目标帧内子预测模式,将与帧内子预测模式B不同的另一个帧内子预测模式D确定为第一子块的第一目标帧内子预测模式。例如,帧内子预测模式D为第一相邻块的相邻块的帧内子预测模式,又例如,若帧内子预测模式B为Planar模式,帧内子预测模式D可以为DC模式,对此不做限制,只要帧内子预测模式D与帧内子预测模式B不同即可。Exemplarily, for the coding end or the decoding end, if the second adjacent block of the second sub-block is predicted using the intra-frame sub-prediction mode B, the first adjacent block of the first sub-block is not predicted using the intra-frame prediction mode prediction, the intra-frame sub-prediction mode B is determined as the second target intra-frame sub-prediction mode of the second sub-block, and another intra-frame sub-prediction mode D different from the intra-frame sub-prediction mode B is determined as the first target of the first sub-block Intra sub-prediction mode. For example, the intra-frame sub-prediction mode D is the intra-frame sub-prediction mode of the adjacent block of the first adjacent block, and for example, if the intra-frame sub-prediction mode B is Planar mode, the intra-frame sub-prediction mode D can be DC mode, and this is not done As long as the intra-frame sub-prediction mode D is different from the intra-frame sub-prediction mode B.
基于实施例5,在当前块所在当前帧为B帧或者I帧时,可以按照固定方向将当前块划分成第一子块和第二子块,第一子块和第二子块可以均为三角子块,第一子块和第二子块可以分别为三角子块和梯形子块,第一子块和第二子块可以均为梯形子块,第一子块和第二子块可以分别为三角子块和五边形子块,对此当前块的划分方式不做限制。示例性的,第一子块的预测模式信息可以为帧内预测模式(Intra),第二子块的预测模式信息可以为帧内预测模式(Intra),但是,第一子块的第一目标帧内子预测模式与第二子块的第二目标帧内子预测模式不同,第一目标帧内子预测模式和第二目标帧内子预测模式可以固定的,也可以是通过周围块推导得到的。参见图8A-图8D所示,为第一子块采用帧内预测模式、第二子块采用帧内预测模式的示例,对第一子块和第二子块的形状不做限制,图8A-图8D只是示例。Based on Embodiment 5, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, and the first sub-block and the second sub-block can be both Triangular sub-block, the first sub-block and the second sub-block can be triangular sub-block and ladder sub-block respectively, the first sub-block and the second sub-block can be both ladder-shaped sub-blocks, the first sub-block and the second sub-block can be They are triangular sub-blocks and pentagonal sub-blocks respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block may be an intra prediction mode (Intra), and the prediction mode information of the second sub-block may be an intra prediction mode (Intra). However, the first target of the first sub-block The intra-frame sub-prediction mode is different from the second target intra-frame sub-prediction mode of the second sub-block. The first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode may be fixed, or derived from surrounding blocks. Referring to Figure 8A-Figure 8D, it is an example in which the first sub-block adopts the intra-frame prediction mode and the second sub-block adopts the intra-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block, as shown in Figure 8A - Figure 8D is just an example.
在实施例5中,假设当前块存在两个区域,一个区域1具有自然纹理,另一个区域2也具有自然纹理,但是,区域1的自然纹理与区域2的自然纹理不同,需要对应不同的帧内子预测模式,在这种应用场景下,通过将当前块划分为第一子块(即区域1的子块)和第二子块(即区域2的子块),且第一子块的预测模式信息为帧内预测模式,第二子块的预测模式信息为帧内预测模式。由于第一子块使用帧内预测模式,且第二子块使用帧内预测模式时,因此,能够达到有效去除视频冗余的目的,能够提升编码效果。In Embodiment 5, it is assumed that there are two regions in the current block, one
实施例6:针对实施例1中的步骤204,若第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧内预测模式,则可以采用实施例6实现,其它过程参见实施例1。在实施例6中,构建运动信息候选列表,运动信息候选列表包括至少一个候选运动信息;从运动信息候选列表中选择一个候选运动信息作为第一子块的目标运动信息;获取第二子块的目标帧内子预测模式;根据目标运动信息获取与第一子块对应的预测值;根据目标帧内子预测模式获取与第二子块对应的预测值。Embodiment 6: For
例如,为当前块构建运动信息候选列表,运动信息候选列表包括至少一个候选运动信息,对此运动信息候选列表的构建过程不做限制。在为当前块构建运动信息候选列表后,从运动信息候选列表中选择一个候选运动信息作为第一子块的目标运动信息。在确定第一子块的目标运动信息后,可以根据目标运动信息获取与第一子块对应的预测值,对此过程不做限制。For example, a candidate list of motion information is constructed for the current block, and the candidate list of motion information includes at least one piece of candidate motion information, and the construction process of the candidate list of motion information is not limited. After the motion information candidate list is constructed for the current block, a candidate motion information is selected from the motion information candidate list as the target motion information of the first sub-block. After the target motion information of the first sub-block is determined, a prediction value corresponding to the first sub-block may be acquired according to the target motion information, and this process is not limited.
示例性的,在第一子块采用帧间预测模式中的常规合并子模式时,则运动信息候选列表包括常规合并子模式的运动信息候选列表。在第一子块采用帧间预测模式中的MMVD子模式时,则运动信息候选列表可以包括MMVD子模式的运动信息候选列表。在第一子块采用帧间预测模式中的仿射合并子模式(affine合并子模式)时,则运动信息候选列表可以包括仿射合并子模式的运动信息候选列表。在第一子块采用帧间预测模式中的ATMVP子模式时,运动信息候选列表包括ATMVP子模式的运动信息候选列表。Exemplarily, when the first sub-block adopts the normal merging sub-mode in the inter prediction mode, the motion information candidate list includes the motion information candidate list of the normal merging sub-mode. When the first sub-block adopts the MMVD sub-mode in the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the MMVD sub-mode. When the first sub-block adopts the affine merging sub-mode (affine merging sub-mode) in the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the affine merging sub-mode. When the first sub-block adopts the ATMVP sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
编码端/解码端从运动信息候选列表中获取第一子块的目标运动信息,包括但不限于:The encoder/decoder obtains the target motion information of the first sub-block from the motion information candidate list, including but not limited to:
方式一、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧内预测模式,针对运动信息候选列表中的每个候选运动信息,将率失真代价最小的候选运动信息作为第一子块的目标运动信息。编码端在向解码端发送编码比特流时,所述编码比特流可以携带目标运动信息的指示信息,所述指示信息用于指示目标运动信息的索引信息,该索引信息用于表示目标运动信息是运动信息候选列表中的第几个候选运动信息。解码端接收来自编码端的编码比特流,并从所述编码比特流中解析出所述指示信息。基于目标运动信息的索引信息,从运动信息候选列表中选择与该索引信息对应的候选运动信息,该候选运动信息就是第一子块的目标运动信息。Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, to obtain the prediction information of the current block, and use the rate-distortion principle and the described The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is an inter-frame prediction mode, the prediction mode information of the second sub-block is an intra-frame prediction mode, and for each For the candidate motion information, the candidate motion information with the smallest rate-distortion cost is used as the target motion information of the first sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of target motion information, the indication information is used to indicate index information of the target motion information, and the index information is used to indicate that the target motion information is The number candidate motion information in the motion information candidate list. The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target motion information, the candidate motion information corresponding to the index information is selected from the motion information candidate list, and the candidate motion information is the target motion information of the first sub-block.
方式二、编码端通过协议约定默认目标运动信息,解码端通过协议约定默认目标运动信息,这样,编码比特流中可以不携带目标运动信息的指示信息,从而节省编码开销。Method 2: The encoding end specifies the default target motion information through the protocol, and the decoding end specifies the default target motion information through the protocol. In this way, the coded bit stream does not need to carry the indication information of the target motion information, thereby saving coding overhead.
例如,编码端可以通过协议约定默认运动信息候选列表的第一个候选运动信息作为第一子块的目标运动信息,解码端可以通过协议约定默认运动信息候选列表的第一个候选运动信息作为第一子块的目标运动信息。当然,上述方式只是示例,对此不做限制。For example, the encoding end may specify the first motion information candidate in the default motion information candidate list as the target motion information of the first sub-block through an agreement, and the decoding end may specify the first candidate motion information in the default motion information candidate list as the first sub-block through an agreement. A sub-block of target motion information. Of course, the above manner is only an example, and is not limited thereto.
例如,可以获取第二子块的目标帧内子预测模式,在得到目标帧内子预测模式之后,可以根据目标帧内子预测模式获取与第二子块对应的预测值,对此预测值的获取方式不做限制。示例性的,获取第二子块的目标帧内子预测模式,可以包括但不限于如下方式:For example, the target intra-frame sub-prediction mode of the second sub-block can be obtained. After the target intra-frame sub-prediction mode is obtained, the prediction value corresponding to the second sub-block can be obtained according to the target intra-frame sub-prediction mode. The method of obtaining the prediction value is different. Do limit. Exemplarily, obtaining the target intra-frame sub-prediction mode of the second sub-block may include but not limited to the following methods:
方式一、将指定帧内子预测模式确定为第二子块的目标帧内子预测模式。Manner 1: Determine the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block.
示例性的,编码端将指定帧内子预测模式确定为第二子块的目标帧内子预测模式,解码端将指定帧内子预测模式确定为第二子块的目标帧内子预测模式。Exemplarily, the encoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block, and the decoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block.
方式二、构建帧内子预测模式候选列表,该帧内子预测模式候选列表可以包括多个候选帧内子预测模式;从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为第二子块的目标帧内子预测模式。例如,为当前块构建帧内子预测模式候选列表,帧内子预测模式候选列表中的候选帧内子预测模式包括但不限于:Planar模式、DC模式、垂直角度模式、水平角度模式等。从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为第二子块的目标帧内子预测模式,并根据目标帧内子预测模式获取与第二子块对应的预测值。
编码端/解码端从帧内子预测模式候选列表获取目标帧内子预测模式,包括但不限于:The encoder/decoder obtains the target intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list, including but not limited to:
方式A、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧内预测模式,针对帧内子预测模式候选列表中的每个候选帧内子预测模式,将率失真代价最小的候选帧内子预测模式作为第二子块的目标帧内子预测模式。编码端向解码端发送编码比特流时,该编码比特流携带目标帧内子预测模式的指示信息,所述指示信息用于指示目标帧内子预测模式的索引信息,该索引信息用于表示目标帧内子预测模式是帧内子预测模式候选列表中的第几个候选帧内子预测模式。解码端接收来自编码端的编码比特流,并从所述编码比特流中解析出所述指示信息。基于目标帧内子预测模式的索引信息,从帧内子预测模式候选列表中选择与该索引信息对应的候选帧内子预测模式,该候选帧内子预测模式就是第二子块的目标帧内子预测模式。Mode A. The encoding end jointly predicts the current block based on each block division information, each group of prediction mode information, and each group of candidates in the prediction mode information to obtain the prediction information of the current block, and uses the rate-distortion principle and the above-mentioned The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is an inter-frame prediction mode, the prediction mode information of the second sub-block is an intra-frame prediction mode, and for the intra-frame sub-prediction mode candidate list For each candidate intra-frame sub-prediction mode, the candidate intra-frame sub-prediction mode with the smallest rate-distortion cost is used as the target intra-frame sub-prediction mode of the second sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream carries indication information of the target intra-frame sub-prediction mode, and the indication information is used to indicate index information of the target intra-frame sub-prediction mode, and the index information is used to represent the target intra-frame sub-prediction The prediction mode is the number of candidate intra-frame sub-prediction modes in the intra-frame sub-prediction mode candidate list. The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target intra sub-prediction mode, a candidate intra-frame sub-prediction mode corresponding to the index information is selected from the intra-frame sub-prediction mode candidate list, and the candidate intra-frame sub-prediction mode is the target intra-frame sub-prediction mode of the second sub-block.
方式B、编码端通过协议约定默认目标帧内子预测模式,解码端通过协议约定默认目标帧内子预测模式。例如,编码端通过协议约定默认帧内子预测模式候选列表中的第一个候选帧内子预测模式作为第二子块的目标帧内子预测模式,解码端通过协议约定默认帧内子预测模式候选列表中的第一个候选帧内子预测模式作为第二子块的目标帧内子预测模式。Mode B: The encoding end specifies a default target intra-frame sub-prediction mode through a protocol, and the decoding end specifies a default target intra-frame sub-prediction mode through a protocol. For example, the encoding end agrees by agreement that the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list is used as the target intra-frame sub-prediction mode of the second sub-block, and the decoding end agrees by agreement that the first candidate intra-frame sub-prediction mode in the candidate list is The first candidate intra-frame sub-prediction mode is used as the target intra-frame sub-prediction mode of the second sub-block.
方式三、将第二子块的相邻块的帧内子预测模式确定为第二子块的目标帧内子预测模式。例如,编码端获取第二子块的相邻块的帧内子预测模式,并将第二子块的相邻块的帧内子预测模式确定为第二子块的目标帧内子预测模式。解码端获取第二子块的相邻块的帧内子预测模式,并将第二子块的相邻块的帧内子预测模式确定为第二子块的目标帧内子预测模式。Way 3: Determine the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. For example, the encoder obtains the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block, and determines the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. The decoding end obtains the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block, and determines the intra-frame sub-prediction mode of the adjacent blocks of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block.
基于实施例6,在当前块所在当前帧为B帧或者I帧时,可以按照固定方向将当前块划分成第一子块和第二子块,第一子块和第二子块可以均为三角子块,第一子块和第二子块可以分别为三角子块和梯形子块,第一子块和第二子块可以均为梯形子块,第一子块和第二子块可以分别为三角子块和五边形子块,对此当前块的划分方式不做限制。示例性的,第一子块的预测模式信息可以为帧间预测模式(Inter),第二子块的预测模式信息可以为帧内预测模式(Intra)。参见图9A-图9D所示,为第一子块采用帧间预测模式、第二子块采用帧内预测模式的示例,对第一子块和第二子块的形状不做限制,图9A-图9D只是示例,示出了第一子块和第二子块均为梯形子块的示例,未示出第一子块和第二子块均为三角子块等其它情况。Based on
示例性的,在第一子块采用帧间预测模式、第二子块采用帧内预测模式时,还可以通过当前块的周围块的预测模式信息,确定划分方向以及哪一个子块采用帧间预测模式,哪一个子块采用帧内预测模式,即哪一个子块为第一子块,哪一个子块为第二子块。Exemplarily, when the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the intra-frame prediction mode, the division direction and which sub-block adopts the inter-frame prediction mode can also be determined through the prediction mode information of the surrounding blocks of the current block. Prediction mode, which sub-block adopts the intra-frame prediction mode, that is, which sub-block is the first sub-block, and which sub-block is the second sub-block.
参见图10A所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息为帧内预测模式,N1的预测模式信息为帧内预测模式,则可以采用图10A所示的3种划分方向中的一种划分方向,且图10A示出了哪一个子块采用帧间预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 10A, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the The prediction mode information is an intra-frame prediction mode, and the prediction mode information of N1 is an intra-frame prediction mode, then one of the three division directions shown in Figure 10A can be used, and Figure 10A shows which sub-block adopts Inter prediction mode, which sub-block adopts intra prediction mode.
参见图10B所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息不为帧内预测模式,N1的预测模式信息不为帧内预测模式,则可以采用图10B所示的3种划分方向中的一种划分方向,且图10B示出了哪一个子块采用帧间预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 10B, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when both the first sub-block and the second sub-block are triangular sub-blocks, if the The prediction mode information is not an intra prediction mode, and the prediction mode information of N1 is not an intra prediction mode, then one of the three division directions shown in Figure 10B can be used, and Figure 10B shows which subdivision direction The block adopts the inter prediction mode, which sub-block adopts the intra prediction mode.
参见图10C所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息为帧内预测模式,N1的预测模式信息不为帧内预测模式,则可以采用图10C所示的3种划分方向中的一种划分方向,且图10C示出了哪一个子块采用帧间预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 10C, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the The prediction mode information is an intra-frame prediction mode, and the prediction mode information of N1 is not an intra-frame prediction mode, then one of the three division directions shown in Figure 10C can be used, and Figure 10C shows which sub-block The inter prediction mode is adopted, which sub-block adopts the intra prediction mode.
参见图10D所示,N0和N1是当前块的两个周围块,基于所述两个周围块的预测模式信息,当第一子块和第二子块均为三角子块时,若N0的预测模式信息不为帧内预测模式,N1的预测模式信息为帧内预测模式,则可以采用图10D所示的3种划分方向中的一种划分方向,且图10D示出了哪一个子块采用帧间预测模式,哪一个子块采用帧内预测模式。Referring to FIG. 10D, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if N0 The prediction mode information is not an intra prediction mode, and the prediction mode information of N1 is an intra prediction mode, then one of the three division directions shown in Figure 10D can be used, and Figure 10D shows which sub-block The inter prediction mode is adopted, which sub-block adopts the intra prediction mode.
当然,图10A-图10D只是示例,当采用其它形状时,如第一子块和第二子块分别为三角子块和梯形子块,或第一子块和第二子块均为梯形子块,或第一子块和第二子块分别为三角子块和五边形子块,其实现方式可以参见图10A-图10D所示,在此不再重复赘述。Certainly, Fig. 10A-Fig. 10D are only examples, when other shapes are adopted, such as the first sub-block and the second sub-block are triangular sub-blocks and trapezoidal sub-blocks respectively, or the first sub-block and the second sub-block are both trapezoidal sub-blocks The blocks, or the first sub-block and the second sub-block are triangular sub-blocks and pentagonal sub-blocks respectively, and the implementation thereof can be referred to as shown in Fig. 10A- Fig. 10D , and will not be repeated here.
在实施例6中,假设当前块存在两个区域,一个区域1具有较强的时域相关性,另一个区域2具有自然纹理,在这种应用场景下,通过将当前块划分为第一子块(即区域1的子块)和第二子块(即区域2的子块),且第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧内预测模式。由于第一子块使用帧间预测模式,能够达到有效去除视频时域冗余的目的,能够提升编码效果。由于第二子块使用帧内预测模式,能够提升编码效果。In
实施例7:针对实施例1中的步骤204,若第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式,则可以采用实施例7实现,其它过程参见实施例1。在实施例7中,构建帧间预测模式中的第一子模式的第一运动信息候选列表,第一运动信息候选列表包括至少一个候选运动信息;从第一运动信息候选列表中选择一个候选运动信息作为第一子块的目标运动信息。构建帧间预测模式中的第二子模式的第二运动信息候选列表,第二运动信息候选列表包括至少一个候选运动信息;从第二运动信息候选列表中选择一个候选运动信息作为第二子块的目标运动信息;其中,第一子模式与第二子模式可以不同。根据第一子块的目标运动信息获取与第一子块对应的预测值;根据第二子块的目标运动信息获取与第二子块对应的预测值。Embodiment 7: For
第一子模式包括但不限于如下子模式的一种:常规合并子模式、MMVD子模式、仿射合并子模式、ATMVP子模式;第二子模式包括但不限于如下子模式的一种:常规合并子模式、MMVD子模式、仿射合并子模式、ATMVP子模式。当然,上述只是几个示例,对此不做限制,只要是帧间预测模式中的子模式即可。第一子模式与第二子模式可以不同,例如,当第一子模式为常规合并子模式时,第二子模式不为常规合并子模式,是MMVD子模式、仿射合并子模式、ATMVP子模式的一种,当第一子模式为MMVD子模式时,第二子模式不为MMVD子模式,是常规合并子模式、仿射合并子模式、ATMVP子模式的一种,以此类推。The first submode includes but not limited to one of the following submodes: conventional merge submode, MMVD submode, affine merge submode, ATMVP submode; the second submode includes but not limited to one of the following submodes: conventional Merge submode, MMVD submode, affine merge submode, ATMVP submode. Of course, the above are just a few examples, and there is no limitation to this, as long as it is a sub-mode in the inter-frame prediction mode. The first sub-mode and the second sub-mode can be different, for example, when the first sub-mode is a conventional merged sub-mode, the second sub-mode is not a conventional merged sub-mode, but an MMVD sub-mode, an affine merged sub-mode, an ATMVP sub-mode One of the modes. When the first sub-mode is the MMVD sub-mode, the second sub-mode is not the MMVD sub-mode, but is one of the conventional merge sub-mode, the affine merge sub-mode, the ATMVP sub-mode, and so on.
例如,为当前块构建帧间预测模式中的第一子模式的第一运动信息候选列表,第一运动信息候选列表包括至少一个候选运动信息;对此构建过程不做限制。在为当前块构建第一运动信息候选列表后,从第一运动信息候选列表中选择一个候选运动信息作为第一子块的目标运动信息,并根据该目标运动信息获取与第一子块对应的预测值,对此过程不做限制。For example, a first motion information candidate list of a first sub-mode in an inter-frame prediction mode is constructed for the current block, and the first motion information candidate list includes at least one candidate motion information; this construction process is not limited. After constructing the first motion information candidate list for the current block, select a candidate motion information from the first motion information candidate list as the target motion information of the first sub-block, and obtain the target motion information corresponding to the first sub-block according to the target motion information Predicted values, no restrictions on this process.
示例性的,在第一子模式为常规合并子模式时,则第一运动信息候选列表包括常规合并子模式的运动信息候选列表。在第一子模式为MMVD子模式时,则第一运动信息候选列表包括MMVD子模式的运动信息候选列表。在第一子模式为仿射合并子模式(affine合并子模式)时,则第一运动信息候选列表包括仿射合并子模式的运动信息候选列表。在第一子模式为ATMVP子模式时,则第一运动信息候选列表包括ATMVP子模式的运动信息候选列表。Exemplarily, when the first submode is the normal merging submode, the first motion information candidate list includes the motion information candidate list of the normal merging submode. When the first submode is the MMVD submode, the first motion information candidate list includes the motion information candidate list of the MMVD submode. When the first submode is an affine merging submode (affine merging submode), the first motion information candidate list includes a motion information candidate list of the affine merging submode. When the first submode is the ATMVP submode, the first motion information candidate list includes the motion information candidate list of the ATMVP submode.
编码端/解码端从第一运动信息候选列表获取第一子块的目标运动信息,包括但不限于:The encoding end/decoding end obtains the target motion information of the first sub-block from the first motion information candidate list, including but not limited to:
方式一、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式,针对第一运动信息候选列表中的每个候选运动信息,将率失真代价最小的候选运动信息作为第一子块的目标运动信息。编码端在向解码端发送编码比特流时,所述编码比特流可以携带目标运动信息的指示信息,所述指示信息用于指示第一子块的目标运动信息的索引信息,该索引信息用于表示目标运动信息是第一运动信息候选列表中的第几个候选运动信息。解码端接收来自编码端的编码比特流,并从编码比特流中解析出所述指示信息。基于目标运动信息的索引信息,从第一运动信息候选列表中选择与该索引信息对应的候选运动信息,该候选运动信息就是第一子块的目标运动信息。Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, to obtain the prediction information of the current block, and use the rate-distortion principle and the described The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is an inter-frame prediction mode, the prediction mode information of the second sub-block is an inter-frame prediction mode, and for the first motion information candidate list For each candidate motion information, the candidate motion information with the smallest rate-distortion cost is used as the target motion information of the first sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of target motion information, the indication information is used to indicate index information of the target motion information of the first sub-block, and the index information is used for Indicates which candidate motion information the target motion information is in the first motion information candidate list. The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target motion information, the candidate motion information corresponding to the index information is selected from the first motion information candidate list, and the candidate motion information is the target motion information of the first sub-block.
方式二、编码端通过协议约定默认目标运动信息,解码端通过协议约定默认目标运动信息。例如,编码端可以通过协议约定默认第一运动信息候选列表的第一个候选运动信息作为第一子块的目标运动信息,解码端可以通过协议约定默认第一运动信息候选列表的第一个候选运动信息作为第一子块的目标运动信息。当然,上述方式只是示例,对此不做限制。Method 2: The encoding end agrees on the default target motion information through the agreement, and the decoding end agrees on the default target motion information through the agreement. For example, the encoding end may agree to default the first candidate motion information in the first motion information candidate list as the target motion information of the first sub-block through agreement, and the decoding end may agree to default the first candidate motion information in the first motion information candidate list through agreement. The motion information is used as the target motion information of the first sub-block. Of course, the above manner is only an example, and is not limited thereto.
例如,为当前块构建帧间预测模式中的第二子模式的第二运动信息候选列表,第二运动信息候选列表包括至少一个候选运动信息;对此构建过程不做限制。在为当前块构建第二运动信息候选列表后,从第二运动信息候选列表中选择一个候选运动信息作为第二子块的目标运动信息,并根据该目标运动信息获取与第二子块对应的预测值,对此过程不做限制。For example, a second motion information candidate list of the second sub-mode in the inter-frame prediction mode is constructed for the current block, and the second motion information candidate list includes at least one candidate motion information; this construction process is not limited. After constructing the second motion information candidate list for the current block, select a candidate motion information from the second motion information candidate list as the target motion information of the second sub-block, and obtain the target motion information corresponding to the second sub-block according to the target motion information Predicted values, no restrictions on this process.
示例性的,在第二子模式为常规合并子模式时,则第二运动信息候选列表包括常规合并子模式的运动信息候选列表。在第二子模式为MMVD子模式时,则第二运动信息候选列表包括MMVD子模式的运动信息候选列表。在第二子模式为仿射合并子模式(affine合并子模式)时,则第二运动信息候选列表包括仿射合并子模式的运动信息候选列表。在第二子模式为ATMVP子模式时,则第二运动信息候选列表包括ATMVP子模式的运动信息候选列表。Exemplarily, when the second submode is the normal merging submode, the second motion information candidate list includes the motion information candidate list of the normal merging submode. When the second submode is the MMVD submode, the second motion information candidate list includes the motion information candidate list of the MMVD submode. When the second submode is an affine merging submode (affine merging submode), the second motion information candidate list includes the motion information candidate list of the affine merging submode. When the second submode is the ATMVP submode, the second motion information candidate list includes the motion information candidate list of the ATMVP submode.
编码端/解码端从第二运动信息候选列表获取第二子块的目标运动信息,包括但不限于:The encoding end/decoding end obtains the target motion information of the second sub-block from the second motion information candidate list, including but not limited to:
方式一、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式,针对第二运动信息候选列表中的每个候选运动信息,将率失真代价最小的候选运动信息作为第二子块的目标运动信息。编码端在向解码端发送编码比特流时,所述编码比特流可以携带目标运动信息的指示信息,所述指示信息用于指示第二子块的目标运动信息的索引信息,该索引信息用于表示目标运动信息是第二运动信息候选列表中的第几个候选运动信息。解码端接收来自编码端的编码比特流,并从编码比特流中解析出所述指示信息。基于目标运动信息的索引信息,从第二运动信息候选列表中选择与该索引信息对应的候选运动信息,该候选运动信息就是第二子块的目标运动信息。Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, to obtain the prediction information of the current block, and use the rate-distortion principle and the described The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is an inter-frame prediction mode, the prediction mode information of the second sub-block is an inter-frame prediction mode, and for the For each candidate motion information, the candidate motion information with the smallest rate-distortion cost is used as the target motion information of the second sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of the target motion information, the indication information is used to indicate index information of the target motion information of the second sub-block, and the index information is used for Indicates which candidate motion information the target motion information is in the second motion information candidate list. The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target motion information, the candidate motion information corresponding to the index information is selected from the second motion information candidate list, and the candidate motion information is the target motion information of the second sub-block.
方式二、编码端通过协议约定默认目标运动信息,解码端通过协议约定默认目标运动信息。例如,编码端可以通过协议约定默认第二运动信息候选列表的第二个候选运动信息作为第二子块的目标运动信息,解码端可以通过协议约定默认第二运动信息候选列表的第二个候选运动信息作为第二子块的目标运动信息。当然,上述方式只是示例,对此不做限制。Method 2: The encoding end agrees on the default target motion information through the agreement, and the decoding end agrees on the default target motion information through the agreement. For example, the encoding end may agree to default the second candidate motion information of the second motion information candidate list as the target motion information of the second sub-block through agreement, and the decoding end may agree to default the second candidate motion information of the second motion information candidate list through agreement. The motion information is used as the target motion information of the second sub-block. Of course, the above manner is only an example, and is not limited thereto.
基于实施例7,在当前块所在当前帧为B帧或者I帧时,可以按照固定方向将当前块划分成第一子块和第二子块,第一子块和第二子块可以均为三角子块,第一子块和第二子块可以分别为三角子块和梯形子块,第一子块和第二子块可以均为梯形子块,第一子块和第二子块可以分别为三角子块和五边形子块,对此当前块的划分方式不做限制。示例性的,第一子块的预测模式信息可以为帧间预测模式(Inter),第二子块的预测模式信息可以为帧间预测模式(Inter)。参见图11A-图11D所示,为第一子块采用帧间预测模式、第二子块采用帧间预测模式的示例,对第一子块和第二子块的形状不做限制,图11A-图11D只是示例,示出第一子块和第二子块均为梯形子块的示例,并未示出第一子块和第二子块均为三角子块等其它情况。示例性的,当第一子块采用帧间预测模式、第二子块采用帧间预测模式时,可以从常规合并子模式、三角预测子模式、MMVD子模式、仿射合并子模式、ATMVP子模式中选择一个子模式作为第一子块的第一子模式。可以从常规合并子模式、三角预测子模式、MMVD子模式、仿射合并子模式、ATMVP子模式中选择一个子模式作为第二子块的第二子模式。Based on
示例性的,第一子块的第一子模式与第二子块的第二子模式可以不同。Exemplarily, the first sub-pattern of the first sub-block may be different from the second sub-pattern of the second sub-block.
在实施例7中,假设当前块存在两个区域,一个区域1具有较强的时域相关性,另一个区域2也具有较强的时域相关性,但是,区域1对应的参考块与区域2对应的参考块不同,需要对应不同的运动信息,在这种应用场景下,通过将当前块划分为第一子块(即区域1的子块)和第二子块(即区域2的子块),且第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式。由于第一子块使用帧间预测模式,第二一子块使用帧间预测模式,因此,能够达到有效去除视频时域冗余的目的,能够提升编码效果。In
实施例8:针对实施例1中的步骤204,若第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式,则可以采用实施例3实现,其它过程参见实施例1。在实施例8中,为当前块构建帧间预测模式的运动信息候选列表,运动信息候选列表包括至少一个候选运动信息,对此构建过程不做限制;从运动信息候选列表中选择一个候选运动信息作为第一子块的目标运动信息,并从运动信息候选列表中选择另一个候选运动信息作为第二子块的目标运动信息,第一子块的目标运动信息与第二子块的目标运动信息不同。根据第一子块的目标运动信息获取与第一子块对应的预测值;根据第二子块的目标运动信息获取与第二子块对应的预测值。运动信息候选列表可以包括但不限于基于如下子模式的运动信息候选列表:常规合并子模式、MMVD子模式、仿射合并子模式、ATMVP子模式;当然,上述只是子模式的几个示例,对此子模式不做限制,只要是帧间预测模式中的子模式即可。Embodiment 8: For
例如,在第一子块和第二子块均采用帧间预测模式中的常规合并子模式时,则运动信息候选列表包括常规合并子模式的运动信息候选列表。在第一子块和第二子块均采用帧间预测模式中的MMVD子模式时,则运动信息候选列表包括MMVD子模式的运动信息候选列表。在第一子块和第二子块均采用帧间预测模式中的仿射合并子模式时,则运动信息候选列表包括仿射合并子模式的运动信息候选列表。在第一子块和第二子块均采用帧间预测模式中的ATMVP子模式时,则运动信息候选列表包括ATMVP子模式的运动信息候选列表。For example, when both the first sub-block and the second sub-block adopt the normal merging sub-mode in the inter prediction mode, the motion information candidate list includes the motion information candidate list of the normal merging sub-mode. When both the first sub-block and the second sub-block adopt the MMVD sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the MMVD sub-mode. When both the first sub-block and the second sub-block adopt the affine merging sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the affine merging sub-mode. When both the first sub-block and the second sub-block adopt the ATMVP sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
编码端/解码端从运动信息候选列表中获取目标运动信息,可以包括但不限于:The encoder/decoder obtains the target motion information from the motion information candidate list, which may include but not limited to:
方式一、编码端基于每个块划分信息、每组预测模式信息、每组预测模式信息中的候选者,对当前块进行联合预测,得到当前块的预测信息,并利用率失真原则和所述预测信息确定当前块的率失真代价。假设最小的率失真代价对应的预测模式信息包括:第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式,针对运动信息候选列表中的每个候选运动信息,将率失真代价最小的候选运动信息作为第一子块的目标运动信息。在从运动信息候选列表中排除第一子块的目标运动信息的基础上,将率失真代价最小的候选运动信息作为第二子块的目标运动信息。编码端在向解码端发送编码比特流时,所述编码比特流可以携带目标运动信息的指示信息,所述指示信息用于指示第一子块的目标运动信息的索引信息、第二子块的目标运动信息的索引信息,第一子块的目标运动信息的索引信息用于表示第一子块的目标运动信息是运动信息候选列表中的第几个候选运动信息,第二子块的目标运动信息的索引信息用于表示第二子块的目标运动信息是运动信息候选列表中的第几个候选运动信息。Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, to obtain the prediction information of the current block, and use the rate-distortion principle and the described The prediction information determines the rate-distortion cost for the current block. It is assumed that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is an inter-frame prediction mode, the prediction mode information of the second sub-block is an inter-frame prediction mode, and for each For the candidate motion information, the candidate motion information with the smallest rate-distortion cost is used as the target motion information of the first sub-block. On the basis of excluding the target motion information of the first sub-block from the motion information candidate list, the candidate motion information with the smallest rate-distortion cost is used as the target motion information of the second sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of target motion information, and the indication information is used to indicate the index information of the target motion information of the first sub-block, the index information of the second sub-block The index information of the target motion information, the index information of the target motion information of the first sub-block is used to indicate that the target motion information of the first sub-block is the candidate motion information in the motion information candidate list, and the target motion information of the second sub-block The index information of the information is used to indicate which candidate motion information in the motion information candidate list the target motion information of the second sub-block is.
解码端接收来自编码端的编码比特流,并从所述编码比特流中解析出所述指示信息。基于第一子块的目标运动信息的索引信息,解码端从运动信息候选列表中选择与该索引信息对应的候选运动信息,该候选运动信息就是第一子块的目标运动信息。The decoding end receives the encoded bit stream from the encoding end, and parses out the indication information from the encoded bit stream. Based on the index information of the target motion information of the first sub-block, the decoding end selects the candidate motion information corresponding to the index information from the motion information candidate list, and the candidate motion information is the target motion information of the first sub-block.
基于第二子块的目标运动信息的索引信息,解码端从运动信息候选列表中选择与该索引信息对应的候选运动信息,该候选运动信息就是第二子块的目标运动信息。Based on the index information of the target motion information of the second sub-block, the decoding end selects the candidate motion information corresponding to the index information from the motion information candidate list, and the candidate motion information is the target motion information of the second sub-block.
方式二、编码端通过协议约定默认目标运动信息,解码端通过协议约定默认目标运动信息。例如,编码端可以通过协议约定默认运动信息候选列表的第一个候选运动信息作为第一子块的目标运动信息,运动信息候选列表的第二个候选运动信息作为第二子块的目标运动信息,解码端可以通过协议约定默认运动信息候选列表的第一个候选运动信息作为第一子块的目标运动信息,运动信息候选列表的第二个候选运动信息作为第二子块的目标运动信息。Method 2: The encoding end agrees on the default target motion information through the agreement, and the decoding end agrees on the default target motion information through the agreement. For example, the encoding end can agree that the first candidate motion information of the default motion information candidate list is used as the target motion information of the first sub-block, and the second candidate motion information of the motion information candidate list is used as the target motion information of the second sub-block. , the decoding end may agree through a protocol that the first candidate motion information in the default motion information candidate list is used as the target motion information of the first sub-block, and the second candidate motion information in the motion information candidate list is used as the target motion information of the second sub-block.
基于实施例8,在当前块所在当前帧为B帧或者I帧时,按照固定方向将当前块划分成第一子块和第二子块,第一子块和第二子块可以均为三角子块,第一子块和第二子块可以分别为三角子块和梯形子块,第一子块和第二子块可以均为梯形子块,第一子块和第二子块可以分别为三角子块和五边形子块,对此当前块的划分方式不做限制。示例性的,第一子块的预测模式信息可以为帧间预测模式(Inter),第二子块的预测模式信息可以为帧间预测模式(Inter)。参见图11A-图11D所示,为第一子块采用帧间预测模式、第二子块采用帧间预测模式的示例,对第一子块和第二子块的形状不做限制,图11A-图11D只是示例,示出第一子块和第二子块均为梯形子块的示例,并未示出第一子块和第二子块均为三角子块等其它情况。Based on Embodiment 8, when the current frame where the current block is located is a B frame or an I frame, the current block is divided into a first sub-block and a second sub-block according to a fixed direction, and the first sub-block and the second sub-block can be triangular Sub-block, the first sub-block and the second sub-block can be triangular sub-block and ladder-shaped sub-block respectively, the first sub-block and the second sub-block can be both ladder-shaped sub-blocks, the first sub-block and the second sub-block can be respectively It is a triangular sub-block and a pentagonal sub-block, and there is no restriction on the division method of this current block. Exemplarily, the prediction mode information of the first sub-block may be an inter-frame prediction mode (Inter), and the prediction mode information of the second sub-block may be an inter-frame prediction mode (Inter). Referring to Figure 11A-Figure 11D, it is an example where the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the inter-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block, as shown in Figure 11A - Figure 11D is just an example, showing an example where the first sub-block and the second sub-block are both ladder-shaped sub-blocks, and does not show other cases such as the first sub-block and the second sub-block are both triangular sub-blocks.
示例性的,当第一子块采用帧间预测模式、第二子块采用帧间预测模式时,可以从常规合并子模式、三角预测子模式、MMVD子模式、仿射合并子模式、ATMVP子模式中选择一个子模式作为第一子块的第一子模式。可以从常规合并子模式、三角预测子模式、MMVD子模式、仿射合并子模式、ATMVP子模式中选择一个子模式作为第二子块的第二子模式。Exemplarily, when the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the inter-frame prediction mode, it can be selected from the conventional merging sub-mode, triangular prediction sub-mode, MMVD sub-mode, affine merging sub-mode, ATMVP sub-mode Select a sub-pattern in the pattern as the first sub-pattern of the first sub-block. One sub-mode may be selected from the regular merging sub-mode, the triangular prediction sub-mode, the MMVD sub-mode, the affine merging sub-mode, and the ATMVP sub-mode as the second sub-mode of the second sub-block.
示例性的,第一子块的第一子模式与第二子块的第二子模式可以相同。例如,第一子块的第一子模式和第二子块的第二子模式均为常规合并子模式,第一子块的目标运动信息与第二子块的目标运动信息不同。又例如,第一子块的第一子模式和第二子块的第二子模式均为MMVD子模式,第一子块的目标运动信息与第二子块的目标运动信息不同,以此类推。Exemplarily, the first sub-pattern of the first sub-block may be the same as the second sub-pattern of the second sub-block. For example, the first sub-mode of the first sub-block and the second sub-mode of the second sub-block are both regular merging sub-modes, and the target motion information of the first sub-block is different from the target motion information of the second sub-block. For another example, the first sub-mode of the first sub-block and the second sub-mode of the second sub-block are both MMVD sub-modes, the target motion information of the first sub-block is different from the target motion information of the second sub-block, and so on .
在实施例8中,假设当前块存在两个区域,一个区域1具有较强的时域相关性,另一个区域2也具有较强的时域相关性,但是,区域1对应的参考块与区域2对应的参考块不同,需要对应不同的运动信息,在这种应用场景下,通过将当前块划分为第一子块(即区域1的子块)和第二子块(即区域2的子块),且第一子块的预测模式信息为帧间预测模式,第二子块的预测模式信息为帧间预测模式。由于第一子块使用帧间预测模式,第二一子块使用帧间预测模式,因此,能够达到有效去除视频时域冗余的目的,能够提升编码效果。In Embodiment 8, it is assumed that there are two areas in the current block, one
针对上述各个实施例,为了获取第一子块的预测值和第二子块的预测值,可以将当前块划分为第一区域块、第二区域块和第三区域块,第一区域块位于第一子块内,第二区域块位于第二子块内,第三区域块内的每个子块的中心与划分线之间的距离小于预设阈值,且所述划分线是基于块划分信息确定的。例如,参见图12A所示,以第一子块为三角子块,第二子块也为三角子块为例,且基于块划分信息确定的划分线是从左上角到右下角。右上角的三角子块为第一子块,左下角的三角子块为第二子块,第一区域块位于第一子块内,第二区域块位于第二子块内,第三区域块内的每个子块(如块1、块2、块4、块6、块7所示的子块)的中心与划分线之间的距离小于预设阈值(可以根据经验进行配置)。For each of the above embodiments, in order to obtain the predicted value of the first sub-block and the predicted value of the second sub-block, the current block may be divided into a first area block, a second area block, and a third area block, and the first area block is located at In the first sub-block, the second area block is located in the second sub-block, and the distance between the center of each sub-block in the third area block and the dividing line is smaller than a preset threshold, and the dividing line is based on the block division information definite. For example, referring to FIG. 12A , it is assumed that the first sub-block is a triangular sub-block and the second sub-block is also a triangular sub-block, and the division line determined based on the block division information is from the upper left corner to the lower right corner. The triangular sub-block in the upper right corner is the first sub-block, the triangular sub-block in the lower left corner is the second sub-block, the first area block is located in the first sub-block, the second area block is located in the second sub-block, and the third area block The distance between the center of each sub-block (such as the sub-blocks shown in
根据第一子块对应的第一预测模式信息获取第一子块对应的预测值,并根据第二子块对应的第二预测模式信息获取第二子块对应的预测值。在此基础上,本实施例中,根据第一预测模式信息获取第一区域块对应的目标预测值;根据第二预测模式信息获取第二区域块对应的目标预测值;根据第一预测模式信息和/或第二预测模式信息获取第三区域块对应的目标预测值。示例性的,根据第一预测模式信息和/或第二预测模式信息获取第三区域块对应的目标预测值,包括:根据第一预测模式信息获取第三区域块对应的目标预测值;或者,根据第二预测模式信息获取第三区域块对应的目标预测值;或者,根据第一预测模式信息获取第三区域块对应的第一预测值,根据第二预测模式信息获取第三区域块对应的第二预测值,并对第一预测值和第二预测值进行加权处理,得到第三区域块对应的目标预测值。The predicted value corresponding to the first sub-block is obtained according to the first prediction mode information corresponding to the first sub-block, and the predicted value corresponding to the second sub-block is obtained according to the second prediction mode information corresponding to the second sub-block. On this basis, in this embodiment, the target prediction value corresponding to the first region block is obtained according to the first prediction mode information; the target prediction value corresponding to the second region block is obtained according to the second prediction mode information; And/or the second prediction mode information acquires a target prediction value corresponding to the third area block. Exemplarily, obtaining the target prediction value corresponding to the third region block according to the first prediction mode information and/or the second prediction mode information includes: obtaining the target prediction value corresponding to the third region block according to the first prediction mode information; or, Obtain the target prediction value corresponding to the third region block according to the second prediction mode information; or obtain the first prediction value corresponding to the third region block according to the first prediction mode information, and obtain the target prediction value corresponding to the third region block according to the second prediction mode information second predictive value, and perform weighting processing on the first predictive value and the second predictive value to obtain the target predictive value corresponding to the third regional block.
例如,参见图12A所示,可以根据第一子块对应的第一预测模式信息获取第一子块对应的预测值,具体获取方式参见上述实施例,在此不再重复赘述。由于第一区域块位于第一子块内,第三区域块内的部分区域位于第一子块内,因此,在根据第一预测模式信息获取第一子块对应的预测值时,可以得到第一区域块对应的预测值,即第一区域块内的每个像素点的预测值,为了区分方便,可以将第一区域块对应的预测值称为第一区域块对应的目标预测值。综上所述,可以根据第一预测模式信息获取第一区域块对应的目标预测值。For example, referring to FIG. 12A , the predicted value corresponding to the first sub-block may be obtained according to the first prediction mode information corresponding to the first sub-block. For the specific obtaining method, refer to the above-mentioned embodiments, which will not be repeated here. Since the first area block is located in the first sub-block, and the partial area in the third area block is located in the first sub-block, therefore, when the predicted value corresponding to the first sub-block is obtained according to the first prediction mode information, the second The predicted value corresponding to a regional block, that is, the predicted value of each pixel in the first regional block, for the convenience of distinction, the predicted value corresponding to the first regional block may be called the target predicted value corresponding to the first regional block. To sum up, the target prediction value corresponding to the first region block may be acquired according to the first prediction mode information.
例如,参见图12A所示,可以根据第二子块对应的第二预测模式信息获取第二子块对应的预测值,具体获取方式参见上述实施例,在此不再重复赘述。由于第二区域块位于第二子块内,第三区域块内的部分区域位于第二子块内,因此,在根据第二预测模式信息获取第二子块对应的预测值时,可以得到第二区域块对应的预测值,即第二区域块内的每个像素点的预测值,为了区分方便,可以将第二区域块对应的预测值称为第二区域块对应的目标预测值。综上所述,可以根据第二预测模式信息获取第二区域块对应的目标预测值。For example, referring to FIG. 12A , the prediction value corresponding to the second sub-block may be acquired according to the second prediction mode information corresponding to the second sub-block. For the specific acquisition method, refer to the above-mentioned embodiments, and details are not repeated here. Since the second area block is located in the second sub-block, and part of the area in the third area block is located in the second sub-block, therefore, when the predicted value corresponding to the second sub-block is obtained according to the second prediction mode information, the first The predicted value corresponding to the second regional block, that is, the predicted value of each pixel in the second regional block, for the convenience of distinction, the predicted value corresponding to the second regional block may be called the target predicted value corresponding to the second regional block. To sum up, the target prediction value corresponding to the second region block may be acquired according to the second prediction mode information.
示例性的,参见图12A所示,针对第三区域块(如块1、块2、块4、块6、块7所示的子块),为了获取第三区域块对应的目标预测值,可以采用如下方式:Exemplarily, as shown in FIG. 12A , for the third regional block (such as the sub-blocks shown in
方式一、根据第一预测模式信息获取第三区域块对应的目标预测值。Mode 1: Obtain the target prediction value corresponding to the third region block according to the first prediction mode information.
例如,第三区域块内的部分区域(如块6、块7的全部区域,块4的右上角区域,为了方便描述,后续称为部分区域A)位于第一子块内,在根据第一预测模式信息获取第一子块对应的预测值时,可以得到部分区域A对应的预测值,即部分区域A内的每个像素点的预测值,为了区分方便,可以将部分区域A对应的预测值称为目标预测值。第三区域块内的剩余区域(如块1、块2的全部区域,块4的左下角区域,为了方便描述,后续称为部分区域B)位于第二子块内,因此,还可以根据第一预测模式信息获取部分区域B对应的预测值,即部分区域B内的每个像素点的预测值,为了区分方便,可以将部分区域B对应的预测值称为目标预测值。在根据第一预测模式信息获取部分区域B对应的目标预测值时,实现方式参见“根据第一预测模式信息获取第一子块对应的预测值”的方式,在此不再重复赘述。For example, the partial area in the third area block (such as the entire area of
方式二、根据第二预测模式信息获取第三区域块对应的目标预测值。Mode 2: Obtain the target prediction value corresponding to the third region block according to the second prediction mode information.
例如,第三区域块内的部分区域B(如块1、块2的全部区域,块4的左下角区域)位于第二子块内,在根据第二预测模式信息获取第二子块对应的预测值时,可以得到部分区域B对应的预测值,即部分区域B内的每个像素点的预测值,为了区分方便,将部分区域B对应的预测值称为目标预测值。第三区域块内的剩余区域A(如块6、块7的全部区域,块4的右上角区域)位于第一子块内,可以根据第二预测模式信息获取部分区域A对应的预测值,即部分区域A内的每个像素点的预测值,为了区分方便,可以将部分区域A对应的预测值称为目标预测值。在根据第二预测模式信息获取部分区域A对应的目标预测值时,实现方式参见“根据第二预测模式信息获取第二子块对应的预测值”的方式,在此不再重复赘述。For example, the partial area B in the third area block (such as the entire area of
方式三、根据第一预测模式信息获取第三区域块对应的第一预测值(将根据第一预测模式信息获取的第三区域块的预测值称为第一预测值),根据第二预测模式信息获取第三区域块对应的第二预测值(将根据第二预测模式信息获取的第三区域块的预测值称为第二预测值),并对第一预测值和第二预测值进行加权处理,得到第三区域块对应的目标预测值。Way 3: Obtain the first prediction value corresponding to the third region block according to the first prediction mode information (the prediction value of the third region block obtained according to the first prediction mode information is referred to as the first prediction value), and according to the second prediction mode The information acquires the second predicted value corresponding to the third area block (the predicted value of the third area block acquired according to the second prediction mode information is referred to as the second predicted value), and weights the first predicted value and the second predicted value processing to obtain the target prediction value corresponding to the third area block.
例如,第三区域块内的部分区域A位于第一子块内,第三区域块内的部分区域B位于第二子块内,在根据第一预测模式信息获取第一子块对应的预测值时,可以得到部分区域A对应的第一预测值,即部分区域A内的每个像素点的第一预测值,在根据第二预测模式信息获取第二子块对应的预测值时,可以得到部分区域B对应的第二预测值,即部分区域B内的每个像素点的第二预测值。然后,可以根据第一预测模式信息获取部分区域B对应的第一预测值,即部分区域B内的每个像素点的第一预测值,实现方式参见“根据第一预测模式信息获取第一子块对应的预测值”的方式,在此不再重复赘述。可以根据第二预测模式信息获取部分区域A对应的第二预测值,即部分区域A内的每个像素点的第二预测值,实现方式参见“根据第二预测模式信息获取第二子块对应的预测值”的方式,在此不再重复赘述。For example, the partial region A in the third region block is located in the first subblock, and the partial region B in the third region block is located in the second subblock, and the predicted value corresponding to the first subblock is obtained according to the first prediction mode information , the first predicted value corresponding to the partial region A can be obtained, that is, the first predicted value of each pixel in the partial region A, and when the predicted value corresponding to the second sub-block is obtained according to the second prediction mode information, it can be obtained The second predicted value corresponding to the partial area B is the second predicted value of each pixel in the partial area B. Then, the first predicted value corresponding to the partial area B can be obtained according to the first prediction mode information, that is, the first predicted value of each pixel in the partial area B. For the implementation method, see "According to the first prediction mode information to obtain the first sub-area block corresponding to the "predicted value", which will not be repeated here. The second prediction value corresponding to the partial area A can be obtained according to the second prediction mode information, that is, the second prediction value of each pixel in the partial area A. For the implementation method, see "According to the second prediction mode information to obtain the second sub-block corresponding The method of predicting value” will not be repeated here.
综上所述,可以得到第三区域块(即部分区域A和部分区域B)内的每个像素点的第一预测值,并可以得到第三区域块内的每个像素点的第二预测值,并对第一预测值和第二预测值进行加权处理,得到第三区域块对应的目标预测值。例如,针对第三区域块内的每个像素点,可以对该像素点的第一预测值和该像素点的第二预测值进行加权处理,得到该像素点的目标预测值。在对每个像素点进行上述处理后,就可以得到第三区域块对应的目标预测值。To sum up, the first prediction value of each pixel in the third area block (ie, partial area A and partial area B) can be obtained, and the second prediction value of each pixel point in the third area block can be obtained value, and perform weighting processing on the first predicted value and the second predicted value to obtain the target predicted value corresponding to the third area block. For example, for each pixel in the third area block, the first predicted value of the pixel and the second predicted value of the pixel may be weighted to obtain the target predicted value of the pixel. After the above-mentioned processing is performed on each pixel, the target prediction value corresponding to the third area block can be obtained.
示例性的,在对像素点的第一预测值和像素点的第二预测值进行加权处理时,第一预测值的权重值与第二预测值的权重值可以相同,也可以不同。例如,若像素点位于第一子块内,则第一预测值的权重值可以大于第二预测值的权重值;若像素点位于第二子块内,则第一预测值的权重值可以小于第二预测值的权重值;若像素点位于划分线,则第一预测值的权重值可以等于第二预测值的权重值。当然,上述只是权重值大小的示例,对此不做限制。Exemplarily, when weighting the first predicted value of a pixel point and the second predicted value of a pixel point, the weight value of the first predicted value and the weight value of the second predicted value may be the same or different. For example, if the pixel is located in the first sub-block, the weight value of the first predictor can be greater than the weight of the second predictor; if the pixel is located in the second sub-block, the weight of the first predictor can be less than The weight value of the second prediction value; if the pixel point is located on the dividing line, the weight value of the first prediction value may be equal to the weight value of the second prediction value. Of course, the above is just an example of the size of the weight value, which is not limited.
示例性的,针对第三区域块内的每个子块,可以为1*1的子块,即单个像素块,也可以为N*M的子块,N大于等于1,M大于等于1。参见图12A所示,第三区域块包括标记为1的子块,标记为2的子块,标记为4的子块,标记为6的子块,标记为7的子块。Exemplarily, each sub-block in the third area block may be a 1*1 sub-block, that is, a single pixel block, or an N*M sub-block, where N is greater than or equal to 1 and M is greater than or equal to 1. Referring to FIG. 12A , the third area block includes a sub-block marked as 1, a sub-block marked as 2, a sub-block marked as 4, a sub-block marked as 6, and a sub-block marked as 7.
针对标记为7的每个子块,后续称为子块7,可以根据第一预测模式信息确定子块7的预测值P1,并根据第二预测模式信息确定子块7的预测值P2,假设预测值P1的权重值为a,预测值P2的权重值为b,则子块7的目标预测值为:P1*a+P2*b。子块7位于第一子块内,权重值a大于权重值b,假设a为7/8,b为1/8,则目标预测值为:P1*7/8+P2*1/8。For each sub-block marked as 7, subsequently referred to as
针对标记为6的每个子块,后续称为子块6,可以根据第一预测模式信息确定子块6的预测值P1,并根据第二预测模式信息确定子块6的预测值P2,假设预测值P1的权重值为a,预测值P2的权重值为b,则子块6的目标预测值为:P1*a+P2*b。子块6位于第一子块内,权重值a大于权重值b,由于与子块7相比,子块6更靠近第二子块,因此,子块6的权重值a可以小于子块7的权重值a,假设a为6/8,b为2/8,则目标预测值为:P1*6/8+P2*2/8。For each sub-block marked as 6, subsequently referred to as
针对标记为4的每个子块,后续称为子块4,可以根据第一预测模式信息确定子块4的预测值P1,并根据第二预测模式信息确定子块4的预测值P2,假设预测值P1的权重值为a,预测值P2的权重值为b,则子块4的目标预测值为:P1*a+P2*b。子块4位于划分线上,权重值a等于权重值b,假设a为4/8,b为4/8,则目标预测值为:P1*4/8+P2*4/8。For each sub-block marked as 4, subsequently referred to as
针对标记为2的每个子块,后续称为子块2,可以根据第一预测模式信息确定子块2的预测值P1,并根据第二预测模式信息确定子块2的预测值P2,假设预测值P1的权重值为a,预测值P2的权重值为b,则子块2的目标预测值为:P1*a+P2*b。子块2位于第二子块内,权重值a小于权重值b,假设a为2/8,b为6/8,则目标预测值为:P1*2/8+P2*6/8。For each sub-block marked as 2, subsequently referred to as
针对标记为1的每个子块,后续称为子块1,可以根据第一预测模式信息确定子块1的预测值P1,并根据第二预测模式信息确定子块1的预测值P2,假设预测值P1的权重值为a,预测值P2的权重值为b,则子块1的目标预测值为:P1*a+P2*b。子块1位于第二子块内,权重值a小于权重值b,由于子块1与子块2相比,子块2更靠近第一子块,因此,子块1的权重值a小于子块2的权重值a,假设a为1/8,b为7/8,则目标预测值为:P1*1/8+P2*7/8。For each sub-block marked as 1, subsequently referred to as
在上述实施例中,每个子块的权重值a与权重值b之和可以为1。越靠近第一子块则权重值a越大,权重值b越小,越靠近第二子块则权重值a越小,权重值b越大。In the above embodiment, the sum of the weight value a and the weight value b of each sub-block may be 1. The closer to the first sub-block, the larger the weight value a, and the smaller the weight value b, and the closer to the second sub-block, the smaller the weight value a, and the larger weight value b.
当然,上述权重值a和权重值b只是一个示例,对此权重值a和权重值b不做限制。Of course, the above weight value a and weight value b are just an example, and there is no limit to the weight value a and weight value b.
上述预测值P1和预测值P2可以为亮度预测值,且目标预测值为亮度目标预测值。参见图12B所示,针对第三区域块内的每个子块,还可以根据第一预测模式信息确定该子块的色度预测值P3,并根据第二预测模式信息确定该子块的色度预测值P4。针对每个子块,该子块的色度目标预测值为P3*c+P4*d。例如,例如,子块7的权重值c为7/8,子块7的权重值d为1/8,子块4的权重值c为4/8,子块4的权重值d为4/8,子块1的权重值c为1/8,子块1的权重值d为7/8。当然,上述只是权重值c和权重值d的示例,对此不做限制。The above predicted value P1 and predicted value P2 may be a predicted value of brightness, and the predicted target value is a target predicted value of brightness. Referring to Fig. 12B, for each sub-block in the third area block, the chroma prediction value P3 of the sub-block can also be determined according to the first prediction mode information, and the chroma prediction value P3 of the sub-block can be determined according to the second prediction mode information. Predicted value P4. For each sub-block, the chroma target prediction value of the sub-block is P3*c+P4*d. For example, for example, the weight value c of
示例性的,还可以根据当前块的相邻块的预测模式信息确定权重值的大小关系。例如,若当前块的相邻块的预测模式信息与第一子块(或者第二子块)的预测模式信息相同时,则可以增加第一子块(或者第二子块)的预测值对应的权重值。Exemplarily, the size relationship of the weight values may also be determined according to the prediction mode information of the adjacent blocks of the current block. For example, if the prediction mode information of the adjacent block of the current block is the same as the prediction mode information of the first sub-block (or the second sub-block), the prediction value corresponding to the first sub-block (or the second sub-block) may be increased. weight value.
例如,在上述权重值的基础上,即权重值a和权重值b的确定方式参见上述实施例。若第一子块采用帧内块拷贝预测模式,第二子块采用帧内预测模式,若第一子块的相邻块和第二子块的相邻块均采用帧内块拷贝预测模式,则可以增加第一子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块均采用帧内预测模式,则可以增加第二子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧内块拷贝预测模式和帧间预测模式,则可以增加第一子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧内预测模式和帧间预测模式,则可以增加第二子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧内块拷贝预测模式和帧内预测模式,则可以保持权重值不变。若第一子块的相邻块和第二子块的相邻块均采用帧间预测模式,则可以保持权重值不变。当然,上述只是几个示例,对此不做限制。For example, on the basis of the above weight values, that is, the manner of determining the weight value a and the weight value b can refer to the above embodiments. If the first sub-block adopts the intra-block copy prediction mode, the second sub-block adopts the intra-frame prediction mode, and if the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block both adopt the intra-block copy prediction mode, Then the weight value corresponding to the predicted value of the first sub-block may be increased. If both the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra prediction mode, the weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra block copy prediction mode and the inter prediction mode respectively, the weight value corresponding to the predicted value of the first sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra prediction mode and the inter prediction mode respectively, the weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra block copy prediction mode and the intra prediction mode respectively, the weight value can be kept unchanged. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block both adopt the inter-frame prediction mode, the weight value can be kept unchanged. Of course, the above are just a few examples, which are not limited.
若第一子块采用帧内块拷贝预测模式,第二子块采用帧间预测模式,若第一子块的相邻块和第二子块的相邻块均采用帧内块拷贝预测模式,则可以增加第一子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块均采用帧间预测模式,则可以增加第二子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧内块拷贝预测模式和帧内预测模式,则可以增加第一子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧内预测模式和帧间预测模式,则可以增加第二子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧内块拷贝预测模式和帧间预测模式,则可以保持权重值不变。若第一子块的相邻块和第二子块的相邻块均采用帧内预测模式,则可以保持权重值不变。当然,上述只是几个示例,对此不做限制。If the first sub-block adopts the intra-block copy prediction mode, the second sub-block adopts the inter-frame prediction mode, and if the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block both adopt the intra-block copy prediction mode, Then the weight value corresponding to the predicted value of the first sub-block may be increased. If both the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the inter prediction mode, the weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra block copy prediction mode and the intra prediction mode respectively, the weight value corresponding to the predicted value of the first sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra prediction mode and the inter prediction mode respectively, the weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block respectively adopt the intra block copy prediction mode and the inter frame prediction mode, the weight value can be kept unchanged. If both the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt intra-frame prediction mode, the weight value can be kept unchanged. Of course, the above are just a few examples, which are not limited.
若第一子块采用帧间预测模式,第二子块采用帧内预测模式,若第一子块的相邻块和第二子块的相邻块均采用帧间预测模式,则可以增加第一子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块均采用帧内预测模式,则可以增加第二子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧间预测模式和帧内块拷贝预测模式,则可以增加第一子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧内预测模式和帧内块拷贝预测模式,则可以增加第二子块的预测值对应的权重值。若第一子块的相邻块和第二子块的相邻块分别采用帧间预测模式和帧内预测模式,则可以保持权重值不变。若第一子块的相邻块和第二子块的相邻块均帧内块拷贝预测模式,则可以保持权重值不变。当然,上述只是权重值大小的几个示例,对此不做限制。If the first sub-block adopts the inter-frame prediction mode, the second sub-block adopts the intra-frame prediction mode, if the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block both adopt the inter-frame prediction mode, then the second sub-block can be added The weight value corresponding to the predicted value of a sub-block. If both the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra prediction mode, the weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block respectively adopt the inter prediction mode and the intra block copy prediction mode, the weight value corresponding to the prediction value of the first sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt the intra prediction mode and the intra block copy prediction mode respectively, the weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block adopt inter-frame prediction mode and intra-frame prediction mode respectively, the weight value can be kept unchanged. If the adjacent blocks of the first sub-block and the adjacent blocks of the second sub-block both have intra-block copy prediction modes, the weight value can be kept unchanged. Of course, the above are just a few examples of the size of the weight value, which is not limited.
综上所述,针对第三区域块内的每个子块(即靠近划分线的每个子块,如靠近划分线的N*N的子块,N根据经验配置,如4等)的目标预测值,可以基于两个预测模式信息(即第一预测模式信息和第二预测模式信息)分别得到的预测值进行加权,得到目标预测值,也可以按照固定规则选择某一个预测模式信息得到的预测值作为目标预测值,以下对此进行说明:In summary, for each sub-block in the third area block (that is, each sub-block close to the dividing line, such as an N*N sub-block close to the dividing line, N is configured according to experience, such as 4, etc.) The target prediction value , can be weighted based on the predicted values obtained respectively from the two prediction mode information (namely the first prediction mode information and the second prediction mode information) to obtain the target prediction value, or the prediction value obtained by selecting a certain prediction mode information according to a fixed rule As target predictors, this is explained below:
情况一,参见图12C所示,假设将当前块划分成第一子块和第二子块,且第一子块和第二子块均为三角子块。针对第三区域块内的每个子块(块1、块2、块4、块6、块7),根据第一预测模式信息确定该子块的第一预测值,根据第二预测模式信息确定该子块的第二预测值,对该子块的第一预测值和该子块的第二预测值进行加权,得到该子块的目标预测值。
情况二,参见图12D所示,假设将当前块划分成第一子块和第二子块,且第一子块和第二子块均为三角子块。针对第三区域块内的每个子块,可以根据第一预测模式信息确定该子块的目标预测值,图12D中标记为P2的子块,就是根据第一预测模式信息确定该子块的目标预测值。针对第三区域块内的每个子块,可以根据第二预测模式信息确定该子块的目标预测值,图12D中标记为P1的子块,就是根据第二预测模式信息确定该子块的目标预测值。
情况三,参见图12E所示,假设将当前块划分成第一子块和第二子块,第一子块为三角子块,第二子块为五边形子块。针对第三区域块内的每个子块(块2、块4、块6、块7),根据第一预测模式信息确定该子块的第一预测值,根据第二预测模式信息确定该子块的第二预测值,对该子块的第一预测值和该子块的第二预测值进行加权,得到该子块的目标预测值。Case 3, referring to FIG. 12E , assume that the current block is divided into a first sub-block and a second sub-block, the first sub-block is a triangular sub-block, and the second sub-block is a pentagonal sub-block. For each sub-block (
情况四,参见图12F所示,假设将当前块划分成第一子块和第二子块,第一子块为三角子块,第二子块为五边形子块。针对第三区域块内的每个子块,可以根据第一预测模式信息确定该子块的目标预测值,图12F中标记为P2的子块,是根据第一预测模式信息确定该子块的目标预测值。针对第三区域块内的每个子块,可以根据第二预测模式信息确定该子块的目标预测值,图12F中标记为P1的子块,是根据第二预测模式信息确定该子块的目标预测值。
当然,上述情况一至情况四只是举例说明,并非唯一的预测像素过程。Of course, the
在步骤205中,可以根据至少两个子块分别对应的预测值获取当前块的预测值。例如,编码端/解码端可以将第一区域块的目标预测值、第二区域块的目标预测值、第三区域块的目标预测值组合在一起,形成当前块的预测值,对此过程不再详加赘述。In
实施例9:参见图13所示,为本申请实施例中的编解码方法的流程示意图,该编解码方法可以应用于解码端或者编码端,在确定当前块启动目标加权预测时,通过以下步骤获取当前块的目标预测值,所述目标预测值用于当前块的编码或者解码,该方法可以包括:Embodiment 9: Refer to FIG. 13 , which is a schematic flowchart of the encoding and decoding method in the embodiment of the present application. The encoding and decoding method can be applied to the decoding end or the encoding end. When determining that the current block starts target weighted prediction, the following steps are performed Obtaining a target predictive value of the current block, where the target predictive value is used for encoding or decoding of the current block, the method may include:
步骤1301,获取当前块对应的第一预测模式和第二预测模式。
步骤1302,根据第一预测模式确定当前块对应的第一预测值。Step 1302: Determine a first prediction value corresponding to the current block according to the first prediction mode.
步骤1303,根据第二预测模式确定当前块对应的第二预测值。Step 1303: Determine a second prediction value corresponding to the current block according to the second prediction mode.
步骤1304,根据第一预测值和第二预测值进行加权处理,得到当前块的目标预测值。
由以上技术方案可见,本实施例中,可以获取当前块的两个预测模式,根据两个预测模式分别获取预测值,根据两个预测值获取当前块的预测值。在上述方式中,可以利用两个预测模式分别进行预测,可以提高预测准确性,提高预测性能,提高编码性能,降低编码残差。It can be seen from the above technical solutions that in this embodiment, two prediction modes of the current block can be obtained, prediction values are respectively obtained according to the two prediction modes, and prediction values of the current block are obtained according to the two prediction values. In the above method, two prediction modes can be used to perform prediction respectively, which can improve prediction accuracy, improve prediction performance, improve coding performance, and reduce coding residual error.
在步骤1301中,解码端或者编码端需要确定是否对当前块启动目标加权预测。若对当前块启动目标加权预测,则可以采用本申请实施例的编解码方法。若不对当前块启动目标加权预测,则可以不采用本申请实施例的编解码方法,此情况的实现方式不做限制。In
示例性的,可以判断当前块的特征信息是否满足特定条件;如果是,则确定对当前块启动目标加权预测。如果否,则确定不对当前块启动目标加权预测。该特征信息可以包括但不限于以下之一或者任意组合:当前块所在当前帧的帧类型、当前块的尺寸信息、开关控制信息。其中,该开关控制信息可以为SPS(序列级)开关控制信息,或者,PPS(图像参数级)开关控制信息,或者,TILE(片级)开关控制信息。Exemplarily, it may be judged whether the feature information of the current block satisfies a specific condition; if yes, it is determined to start target weighted prediction for the current block. If not, it is determined not to enable target weighted prediction for the current block. The characteristic information may include but not limited to one or any combination of the following: frame type of the current frame where the current block is located, size information of the current block, and switch control information. Wherein, the switch control information may be SPS (sequence level) switch control information, or PPS (picture parameter level) switch control information, or TILE (tile level) switch control information.
例如,若该特征信息为当前块所在当前帧的帧类型,则当前块所在当前帧的帧类型满足特定条件,可以包括但不限于:若当前块所在当前帧的帧类型为B帧,则确定所述帧类型满足特定条件;或者,若当前块所在当前帧的帧类型为I帧,则确定所述帧类型满足特定条件。For example, if the feature information is the frame type of the current frame where the current block is located, then the frame type of the current frame where the current block is located meets certain conditions, which may include but not limited to: if the frame type of the current frame where the current block is located is a B frame, then determine The frame type satisfies a specific condition; or, if the frame type of the current frame where the current block is located is an I frame, it is determined that the frame type satisfies a specific condition.
例如,若该特征信息为当前块的尺寸信息,且尺寸信息包括当前块的宽度和当前块的高度,则当前块的尺寸信息满足特定条件,可以包括但不限于:若当前块的宽度大于或等于第一数值、当前块的高度大于或等于第二数值,确定当前块的尺寸信息满足特定条件。或,若当前块的宽度大于或等于第三数值、当前块的高度大于或等于第四数值、当前块的宽度小于或等于第五数值、当前块的高度小于或等于第六数值,确定当前块的尺寸信息满足特定条件。For example, if the characteristic information is the size information of the current block, and the size information includes the width of the current block and the height of the current block, then the size information of the current block satisfies certain conditions, which may include but not limited to: if the width of the current block is greater than or If it is equal to the first value and the height of the current block is greater than or equal to the second value, it is determined that the size information of the current block satisfies a specific condition. Or, if the width of the current block is greater than or equal to the third value, the height of the current block is greater than or equal to the fourth value, the width of the current block is less than or equal to the fifth value, and the height of the current block is less than or equal to the sixth value, determine the current block The dimension information for satisfies certain conditions.
示例性的,上述数值可以根据经验配置,如8、16、32、64、128等,对此不做限制。在一种可能的实现方式中,第一数值可以为8,第二数值可以为8,第三数值可以为8,第四数值可以为8,第五数值可以为64,第六数值可以为64。当然,上述只是示例,对此不做限制。综上所述,若当前块的宽度大于或等于8、当前块的高度大于或等于8,确定当前块的尺寸信息满足特定条件。或,若当前块的宽度大于或等于8、当前块的高度大于或等于8、当前块的宽度小于或等于64、当前块的高度小于或等于64,确定当前块的尺寸信息满足特定条件。Exemplarily, the above numerical values may be configured according to experience, such as 8, 16, 32, 64, 128, etc., without limitation. In a possible implementation manner, the first value may be 8, the second value may be 8, the third value may be 8, the fourth value may be 8, the fifth value may be 64, and the sixth value may be 64 . Of course, the above is just an example, without limitation. To sum up, if the width of the current block is greater than or equal to 8, and the height of the current block is greater than or equal to 8, it is determined that the size information of the current block satisfies a specific condition. Or, if the width of the current block is greater than or equal to 8, the height of the current block is greater than or equal to 8, the width of the current block is less than or equal to 64, and the height of the current block is less than or equal to 64, it is determined that the size information of the current block meets a specific condition.
例如,若该特征信息为开关控制信息,则开关控制信息满足特定条件,可以包括但不限于:若开关控制信息为启用,则确定开关控制信息满足特定条件。For example, if the characteristic information is switch control information, then the switch control information satisfies a specific condition, which may include but not limited to: if the switch control information is enabled, then determining that the switch control information satisfies a specific condition.
例如,若该特征信息为当前块所在当前帧的帧类型、当前块的尺寸信息,则所述帧类型满足特定条件,且所述尺寸信息满足特定条件时,确定当前块的特征信息满足特定条件。若该特征信息为当前块所在当前帧的帧类型、开关控制信息,则所述帧类型满足特定条件,且所述开关控制信息满足特定条件时,确定当前块的特征信息满足特定条件。若该特征信息为当前块的尺寸信息、开关控制信息,则所述尺寸信息满足特定条件,且所述开关控制信息满足特定条件时,确定当前块的特征信息满足特定条件。若该特征信息为当前块所在当前帧的帧类型、当前块的尺寸信息、开关控制信息,则所述帧类型满足特定条件,且所述尺寸信息满足特定条件,且所述开关控制信息满足特定条件时,确定当前块的特征信息满足特定条件。For example, if the feature information is the frame type of the current frame where the current block is located and the size information of the current block, then the frame type meets a specific condition, and when the size information meets a specific condition, it is determined that the feature information of the current block satisfies a specific condition . If the feature information is the frame type and switch control information of the current frame where the current block is located, then the frame type satisfies a specific condition, and when the switch control information satisfies the specific condition, it is determined that the feature information of the current block satisfies the specific condition. If the characteristic information is size information and switch control information of the current block, then the size information satisfies a specific condition, and when the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies the specific condition. If the characteristic information is the frame type of the current frame where the current block is located, the size information of the current block, and the switch control information, then the frame type satisfies a specific condition, and the size information satisfies a specific condition, and the switch control information satisfies a specific condition. condition, it is determined that the feature information of the current block satisfies a specific condition.
在步骤1301中,解码端或者编码端获取当前块对应的第一预测模式和第二预测模式,第一预测模式与第二预测模式可以相同,第一预测模式与第二预测模式也可以不同。示例性的,第一预测模式可以包括但不限于如下预测模式中的一种:常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式。第二预测模式可以包括但不限于如下预测模式中的一种:常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式。In
例如,当第一预测模式为常规合并帧间预测模式时,第二预测模式可以为三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式中的一种。当第一预测模式为三角帧间预测模式时,第二预测模式可以为常规合并帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式中的一种。当第一预测模式为帧内块拷贝预测模式时,第二预测模式可以为常规合并帧间预测模式,三角帧间预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式中的一种。当第一预测模式为帧内预测模式时,第二预测模式可以为常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式中的一种。当第一预测模式为MMVD帧间预测模式时,第二预测模式可以为常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式中的一种。当第一预测模式为仿射合并帧间预测模式时,第二预测模式可以为常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,ATMVP帧间预测模式中的一种。当第一预测模式为ATMVP帧间预测模式时,第二预测模式可以为常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式中的一种。For example, when the first prediction mode is the regular combined inter prediction mode, the second prediction mode can be the triangular inter prediction mode, the intra block copy prediction mode, the intra prediction mode, the MMVD inter prediction mode, and the affine combined frame Inter prediction mode, one of ATMVP inter prediction modes. When the first prediction mode is triangular inter prediction mode, the second prediction mode can be conventional combined inter prediction mode, intra block copy prediction mode, intra prediction mode, MMVD inter prediction mode, affine combined inter prediction mode mode, one of the ATMVP inter prediction modes. When the first prediction mode is the intra block copy prediction mode, the second prediction mode can be the conventional merged inter prediction mode, the triangular inter prediction mode, the intra prediction mode, the MMVD inter prediction mode, and the affine merged inter prediction mode. mode, one of the ATMVP inter prediction modes. When the first prediction mode is intra prediction mode, the second prediction mode can be conventional merged inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, MMVD inter prediction mode, affine merged inter prediction mode mode, one of the ATMVP inter prediction modes. When the first prediction mode is MMVD inter prediction mode, the second prediction mode can be regular combined inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, intra prediction mode, affine combined inter prediction mode, one of the ATMVP inter prediction modes. When the first prediction mode is an affine combined inter prediction mode, the second prediction mode can be a regular combined inter prediction mode, a triangular inter prediction mode, an intra block copy prediction mode, an intra prediction mode, and an MMVD inter prediction mode. mode, one of the ATMVP inter prediction modes. When the first prediction mode is the ATMVP inter prediction mode, the second prediction mode can be the conventional combined inter prediction mode, the triangular inter prediction mode, the intra block copy prediction mode, the intra prediction mode, and the MMVD inter prediction mode, One of the affine merge inter prediction modes.
又例如,当第一预测模式为常规合并帧间预测模式时,第二预测模式可以为常规合并帧间预测模式。当第一预测模式为三角帧间预测模式时,第二预测模式可以为三角帧间预测模式。当第一预测模式为帧内块拷贝预测模式时,第二预测模式可以为帧内块拷贝预测模式。当第一预测模式为帧内预测模式时,第二预测模式可以为帧内预测模式。当第一预测模式为MMVD帧间预测模式时,第二预测模式可以为MMVD帧间预测模式。当第一预测模式为仿射合并帧间预测模式时,第二预测模式可以为仿射合并帧间预测模式。当第一预测模式为ATMVP帧间预测模式时,第二预测模式可以为ATMVP帧间预测模式。For another example, when the first prediction mode is the normal combined inter-frame prediction mode, the second prediction mode may be the normal combined inter-frame prediction mode. When the first prediction mode is a triangular inter prediction mode, the second prediction mode may be a triangular inter prediction mode. When the first prediction mode is an intra block copy prediction mode, the second prediction mode may be an intra block copy prediction mode. When the first prediction mode is an intra prediction mode, the second prediction mode may be an intra prediction mode. When the first prediction mode is the MMVD inter prediction mode, the second prediction mode may be the MMVD inter prediction mode. When the first prediction mode is an affine combining inter prediction mode, the second prediction mode may be an affine combining inter prediction mode. When the first prediction mode is an ATMVP inter prediction mode, the second prediction mode may be an ATMVP inter prediction mode.
在确定当前块对应的第一预测值、当前块对应的第二预测值时,第一预测值的确定过程与第一预测模式有关,具体确定过程参见上述实施例,只是在上述实施例中,是确定两个子块的预测值,而本实施例中,编码端/解码端是确定当前块的预测值。第二预测值的确定过程与第二预测模式有关,具体确定过程参见上述实施例,对此不再详加赘述,只是在上述实施例中,是确定两个子块的预测值,而本实施例中,编码端/解码端是确定当前块的预测值。When determining the first prediction value corresponding to the current block and the second prediction value corresponding to the current block, the determination process of the first prediction value is related to the first prediction mode. For the specific determination process, refer to the above embodiment, but in the above embodiment, It is to determine the prediction value of two sub-blocks, and in this embodiment, the coding end/decoding end is to determine the prediction value of the current block. The determination process of the second predicted value is related to the second prediction mode. For the specific determination process, refer to the above-mentioned embodiment, which will not be described in detail, but in the above-mentioned embodiment, the predicted values of the two sub-blocks are determined, and this embodiment Among them, the encoding end/decoding end is to determine the prediction value of the current block.
情况一,假设第一预测模式与第二预测模式不同,针对根据第一预测模式确定当前块对应的第一预测值、根据第二预测模式确定当前块对应的第二预测值的过程,可以包括:
若第一预测模式为常规合并帧间预测模式,则可以为当前块构建常规合并帧间预测模式的运动信息候选列表,该运动信息候选列表中存在多个候选运动信息(如运动矢量及参考帧信息),如空域候选运动信息、时域候选运动信息、历史运动信息、默认运动信息等。在为当前块构建运动信息候选列表后,从运动信息候选列表中选择一个候选运动信息作为当前块的目标运动信息,并根据目标运动信息获取当前块对应的第一预测值,对此过程不再赘述。If the first prediction mode is the conventional merged inter prediction mode, a motion information candidate list of the conventional merged inter prediction mode can be constructed for the current block, and there are multiple candidate motion information (such as motion vectors and reference frames) in the motion information candidate list Information), such as spatial candidate motion information, time domain candidate motion information, historical motion information, default motion information, etc. After constructing the motion information candidate list for the current block, select a candidate motion information from the motion information candidate list as the target motion information of the current block, and obtain the first prediction value corresponding to the current block according to the target motion information, the process is no longer repeat.
若第一预测模式为三角帧间预测模式,则为当前块构建三角帧间预测模式的运动信息候选列表,该运动信息候选列表包括多个候选运动信息(如单向运动信息),对此运动信息候选列表的构建过程不做限制。将当前块划分为第一三角子块和第二三角子块,从运动信息候选列表中选择一个候选运动信息作为第一三角子块的目标运动信息,并从运动信息候选列表中选择另一个候选运动信息作为第二三角子块的目标运动信息,第一三角子块的目标运动信息与第二三角子块的目标运动信息不同。根据第一三角子块的目标运动信息确定第一三角子块的预测值,根据第二三角子块的目标运动信息确定第二三角子块的预测值,根据第一三角子块的预测值和第二三角子块的预测值获取当前块对应的第一预测值,对此过程不再赘述。If the first prediction mode is a triangular inter-frame prediction mode, a motion information candidate list of the triangular inter-frame prediction mode is constructed for the current block, and the motion information candidate list includes a plurality of candidate motion information (such as unidirectional motion information). The construction process of the information candidate list is not limited. Divide the current block into the first triangular sub-block and the second triangular sub-block, select one candidate motion information from the motion information candidate list as the target motion information of the first triangular sub-block, and select another candidate from the motion information candidate list The motion information is used as the target motion information of the second triangular sub-block, and the target motion information of the first triangular sub-block is different from the target motion information of the second triangular sub-block. Determine the predicted value of the first triangular sub-block according to the target motion information of the first triangular sub-block, determine the predicted value of the second triangular sub-block according to the target motion information of the second triangular sub-block, and determine the predicted value of the second triangular sub-block according to the predicted value of the first triangular sub-block and The predicted value of the second triangular sub-block obtains the first predicted value corresponding to the current block, and this process will not be repeated.
若第一预测模式为帧内块拷贝预测模式,则为当前块构建块矢量候选列表,块矢量候选列表包括多个候选块矢量,块矢量候选列表中的候选块矢量包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP列表中的历史块矢量、默认块矢量等,对此块矢量候选列表的构建过程不做限制。然后,从块矢量候选列表中选择一个候选块矢量作为当前块的目标块矢量,并根据目标块矢量获取当前块对应的第一预测值,对此过程不再赘述。If the first prediction mode is the intra block copy prediction mode, a block vector candidate list is constructed for the current block. The block vector candidate list includes multiple candidate block vectors. The candidate block vectors in the block vector candidate list include but are not limited to: current block The block vectors of adjacent blocks in the spatial domain of the current block, the historical block vectors in the HMVP list corresponding to the current block, the default block vector, etc., there is no restriction on the construction process of the block vector candidate list. Then, a candidate block vector is selected from the block vector candidate list as the target block vector of the current block, and the first predictive value corresponding to the current block is obtained according to the target block vector, and the process will not be repeated here.
若第一预测模式为帧内预测模式,则获取当前块的目标帧内子预测模式,并根据目标帧内子预测模式获取当前块对应的第一预测值,对此过程不再赘述。为了获取当前块的目标帧内子预测模式,可以采用如下方式:将指定帧内子预测模式确定为当前块的目标帧内子预测模式。或者,为当前块构建帧内子预测模式候选列表,帧内子预测模式候选列表包括多个候选帧内子预测模式,如Planar模式、DC模式、垂直角度模式、水平角度模式等,对此不做限制;从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为当前块的目标帧内子预测模式。或者,将当前块的相邻块的帧内子预测模式确定为当前块的目标帧内子预测模式。If the first prediction mode is an intra prediction mode, the target intra sub-prediction mode of the current block is obtained, and the first prediction value corresponding to the current block is obtained according to the target intra sub-prediction mode, and the process is not repeated here. In order to obtain the target intra-frame sub-prediction mode of the current block, the following manner may be adopted: a specified intra-frame sub-prediction mode is determined as the target intra-frame sub-prediction mode of the current block. Alternatively, construct an intra-frame sub-prediction mode candidate list for the current block, the intra-frame sub-prediction mode candidate list includes multiple candidate intra-frame sub-prediction modes, such as Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc., without limitation; A candidate intra-frame sub-prediction mode is selected from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode of the current block. Or, determine the intra-frame sub-prediction mode of the adjacent blocks of the current block as the target intra-frame sub-prediction mode of the current block.
若第一预测模式为MMVD帧间预测模式,则可以为当前块构建MMVD帧间预测模式的运动信息候选列表,该运动信息候选列表包括多个候选运动信息,运动信息候选列表包括对原始运动信息进行偏移后得到的运动信息,对此运动信息候选列表的构建过程不做限制。示例性的,该原始运动信息可以包括但不限于:当前块的空域相邻块的运动信息、当前块的时域块的运动信息、默认运动信息等,对此原始运动信息不做限制。例如,获取多个空域相邻块的运动信息,如运动信息C1-运动信息C4,并将运动信息C1、运动信息C2、对运动信息C3进行偏移后得到的运动信息C3’、对运动信息C4进行偏移后得到的运动信息C4’添加到运动信息候选列表。然后,从运动信息候选列表中选择一个候选运动信息作为当前块的目标运动信息,并根据目标运动信息获取当前块对应的第一预测值,对此过程不再赘述。If the first prediction mode is the MMVD inter-frame prediction mode, a motion information candidate list of the MMVD inter-frame prediction mode can be constructed for the current block, the motion information candidate list includes a plurality of candidate motion information, and the motion information candidate list includes a reference to the original motion information The motion information obtained after offsetting is not limited to the construction process of the motion information candidate list. Exemplarily, the original motion information may include but not limited to: motion information of spatial adjacent blocks of the current block, motion information of temporal blocks of the current block, default motion information, etc., and there is no limitation on the original motion information. For example, the motion information of multiple spatial adjacent blocks is obtained, such as motion information C1-motion information C4, and motion information C1, motion information C2, motion information C3' obtained by offsetting motion information C3, motion information The motion information C4' obtained after the offset of C4 is added to the motion information candidate list. Then, a candidate motion information is selected from the motion information candidate list as the target motion information of the current block, and the first predictive value corresponding to the current block is obtained according to the target motion information, and the process will not be repeated here.
若第一预测模式为仿射合并帧间预测模式,则可以为当前块构建仿射合并帧间预测模式的运动信息候选列表,该运动信息候选列表包括多个候选运动信息,该运动信息候选列表包括但不限于:基于当前块的空域相邻块的运动信息构造的运动信息、基于当前块的时域块的运动信息构造的运动信息、采用固定规则构造的运动信息、默认运动信息等,对此运动信息候选列表的构建过程不做限制。然后,从运动信息候选列表中选择一个候选运动信息作为当前块的目标运动信息。仿射合并帧间预测模式是基于子块的预测技术,通过运动参数模型可以推导出每一个子块的运动信息,因此,在从运动信息候选列表中选择出目标运动信息之后,针对当前块的每个子块,可以基于所述目标运动信息和运动参数模型,推导出当前块的每个子块的运动信息。针对每个子块,可以利用该子块的运动信息确定该子块的预测值。进一步的,基于每个子块的预测值,就可以得到当前块对应的第一预测值。If the first prediction mode is an affine combined inter-frame prediction mode, a motion information candidate list of an affine combined inter-frame prediction mode may be constructed for the current block, the motion information candidate list includes a plurality of candidate motion information, and the motion information candidate list Including but not limited to: motion information constructed based on the motion information of the spatial adjacent blocks of the current block, motion information constructed based on the motion information of the current block in the time domain, motion information constructed using fixed rules, default motion information, etc., for The construction process of the motion information candidate list is not limited. Then, a candidate motion information is selected from the motion information candidate list as the target motion information of the current block. The affine merged inter prediction mode is a prediction technology based on sub-blocks. The motion information of each sub-block can be deduced through the motion parameter model. Therefore, after selecting the target motion information from the motion information candidate list, for the current block For each sub-block, the motion information of each sub-block of the current block may be derived based on the target motion information and the motion parameter model. For each sub-block, the prediction value of the sub-block can be determined by using the motion information of the sub-block. Further, based on the prediction value of each sub-block, the first prediction value corresponding to the current block can be obtained.
若第一预测模式为ATMVP帧间预测模式,则通过指定运动信息确定当前块对应的参考帧,并从参考帧中获取与当前块对应的参考块,然后,根据参考块的运动信息确定当前块的目标运动信息,例如,对参考块的运动信息进行伸缩变化,将变化后的运动信息作为当前块的目标运动信息。根据目标运动信息获取当前块对应的第一预测值,对此过程不再赘述。If the first prediction mode is the ATMVP inter-frame prediction mode, determine the reference frame corresponding to the current block by specifying the motion information, and obtain the reference block corresponding to the current block from the reference frame, and then determine the current block according to the motion information of the reference block For example, the motion information of the reference block is scaled and changed, and the changed motion information is used as the target motion information of the current block. Acquire the first prediction value corresponding to the current block according to the target motion information, and the process will not be repeated here.
若第二预测模式为常规合并帧间预测模式、三角帧间预测模式、帧内块拷贝预测模式、帧内预测模式、MMVD帧间预测模式、仿射合并帧间预测模式或ATMVP帧间预测模式的情况,获取当前块对应的第二预测值的过程,参见上述实施例,在此不再重复赘述。If the second prediction mode is regular merged inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, intra prediction mode, MMVD inter prediction mode, affine merge inter prediction mode or ATMVP inter prediction mode In the case of , the process of obtaining the second prediction value corresponding to the current block can be referred to the above-mentioned embodiment, and will not be repeated here.
情况二,假设第一预测模式与第二预测模式相同,针对根据第一预测模式确定当前块对应的第一预测值、根据第二预测模式确定当前块对应的第二预测值的过程,可以包括:
若第一预测模式和第二预测模式均为常规合并帧间预测模式,则可以为当前块构建常规合并帧间预测模式的运动信息候选列表,该运动信息候选列表包括多个候选运动信息。从运动信息候选列表中选择一个候选运动信息作为当前块的第一目标运动信息,并从运动信息候选列表中选择另一个候选运动信息作为当前块的第二目标运动信息,根据第一目标运动信息获取当前块对应的第一预测值,根据第二目标运动信息获取当前块对应的第二预测值。If both the first prediction mode and the second prediction mode are regular merged inter prediction modes, a motion information candidate list of the regular merged inter prediction mode may be constructed for the current block, and the motion information candidate list includes a plurality of candidate motion information. Select one candidate motion information from the motion information candidate list as the first target motion information of the current block, and select another candidate motion information from the motion information candidate list as the second target motion information of the current block, according to the first target motion information A first prediction value corresponding to the current block is obtained, and a second prediction value corresponding to the current block is obtained according to the second target motion information.
若第一预测模式和第二预测模式均为帧内块拷贝预测模式,则可以为当前块构建块矢量候选列表,块矢量候选列表包括多个候选块矢量,块矢量候选列表中的候选块矢量包括但不限于:当前块的空域相邻块的块矢量、当前块对应的HMVP列表中的历史块矢量、默认块矢量等。从块矢量候选列表中选择一个候选块矢量作为当前块的第一目标块矢量,并从块矢量候选列表中选择另一个候选块矢量作为当前块的第二目标块矢量,并根据第一目标块矢量获取当前块对应的第一预测值,根据第二目标块矢量获取当前块对应的第二预测值。If both the first prediction mode and the second prediction mode are intra block copy prediction modes, a block vector candidate list can be constructed for the current block, the block vector candidate list includes multiple candidate block vectors, and the candidate block vectors in the block vector candidate list Including but not limited to: the block vector of the adjacent blocks in the air space of the current block, the historical block vector in the HMVP list corresponding to the current block, the default block vector, and the like. Select a candidate block vector from the block vector candidate list as the first target block vector of the current block, and select another candidate block vector from the block vector candidate list as the second target block vector of the current block, and according to the first target block The first predictive value corresponding to the current block is acquired through the vector, and the second predictive value corresponding to the current block is acquired according to the second target block vector.
若第一预测模式和第二预测模式均为帧内预测模式,则可以获取当前块的第一目标帧内子预测模式和第二目标帧内子预测模式,并根据第一目标帧内子预测模式获取当前块对应的第一预测值,根据第二目标帧内子预测模式获取当前块对应的第二预测值。If both the first prediction mode and the second prediction mode are intra prediction modes, the first target intra sub prediction mode and the second target intra sub prediction mode of the current block can be obtained, and the current block can be obtained according to the first target intra sub prediction mode For the first predictive value corresponding to the block, the second predictive value corresponding to the current block is obtained according to the second target intra sub-prediction mode.
第一目标帧内子预测模式和第二目标帧内子预测模式的获取方式,可以包括但不限于如下方式:将指定第一帧内子预测模式确定为当前块的第一目标帧内子预测模式,并将指定第二帧内子预测模式确定为当前块的第二目标帧内子预测模式。或者,为当前块构建帧内子预测模式候选列表,该帧内子预测模式候选列表可以包括多个候选帧内子预测模式,如Planar模式、DC模式、垂直角度模式、水平角度模式等;从帧内子预测模式候选列表中选择一个候选帧内子预测模式作为当前块的第一目标帧内子预测模式,并从帧内子预测模式候选列表中选择另一个候选帧内子预测模式作为当前块的第二目标帧内子预测模式。或者,根据当前块的相邻块的帧内子预测模式推到当前块的第一目标帧内子预测模式和第二目标帧内子预测模式;例如,获取当前块的第一相邻块的帧内子预测模式和当前块的第二相邻块的帧内子预测模式,若第一相邻块的帧内子预测模式与第二相邻块的帧内子预测模式不同,则将第一相邻块的帧内子预测模式确定为当前块的第一目标帧内子预测模式,并将第二相邻块的帧内子预测模式确定为当前块的第二目标帧内子预测模式;若第一相邻块的帧内子预测模式与第二相邻块的帧内子预测模式相同,则将第一相邻块的帧内子预测模式确定为当前块的第一目标帧内子预测模式,并将与第一目标帧内子预测模式不同的另一个帧内子预测模式确定为当前块的第二目标帧内子预测模式。当然,上述方式只是几个示例,对此不做限制。The manner of obtaining the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode may include but not limited to the following manner: determine the designated first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the current block, and set The designated second intra-frame sub-prediction mode is determined as the second target intra-frame sub-prediction mode of the current block. Alternatively, construct an intra-frame sub-prediction mode candidate list for the current block, and the intra-frame sub-prediction mode candidate list may include multiple candidate intra-frame sub-prediction modes, such as Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc.; from intra-frame sub-prediction Select a candidate intra-frame sub-prediction mode from the mode candidate list as the first target intra-frame sub-prediction mode of the current block, and select another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the second target intra-frame sub-prediction mode of the current block model. Or, push to the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode of the current block according to the intra-frame sub-prediction mode of the adjacent block of the current block; for example, obtain the intra-frame sub-prediction of the first adjacent block of the current block mode and the intra-frame sub-prediction mode of the second adjacent block of the current block, if the intra-frame sub-prediction mode of the first adjacent block is different from the intra-frame sub-prediction mode of the second adjacent block, the intra-frame sub-prediction mode of the first adjacent block The prediction mode is determined as the first target intra-frame sub-prediction mode of the current block, and the intra-frame sub-prediction mode of the second adjacent block is determined as the second target intra-frame sub-prediction mode of the current block; if the intra-frame sub-prediction of the first adjacent block mode is the same as the intra-frame sub-prediction mode of the second adjacent block, then the intra-frame sub-prediction mode of the first adjacent block is determined as the first target intra-frame sub-prediction mode of the current block, and will be different from the first target intra-frame sub-prediction mode Another intra-frame sub-prediction mode of is determined as the second target intra-frame sub-prediction mode of the current block. Of course, the above-mentioned manners are just a few examples, and are not limited thereto.
当然,上述只是示例,第一预测模式和第二预测模式的不同组合,当前块的预测值的确定方式不同,在此不再赘述。例如,第一预测模式和第二预测模式为仿射合并帧间预测模式、第一预测模式和第二预测模式为MMVD帧间预测模式等,预测值确定过程参见上述例子。Of course, the above is just an example, and different combinations of the first prediction mode and the second prediction mode have different ways of determining the prediction value of the current block, which will not be repeated here. For example, the first prediction mode and the second prediction mode are affine merging inter prediction mode, the first prediction mode and the second prediction mode are MMVD inter prediction mode, etc. For the process of determining the prediction value, refer to the above examples.
在步骤1304中,编码端/解码端可以根据第一预测值和第二预测值进行加权处理,得到当前块的目标预测值。例如,根据第一预测值、第一预测值对应的第一权重值、第二预测值和第二预测值对应的第二权重值进行加权处理,得到当前块的目标预测值。第一权重值与第二权重值,可以不同或者相同。对此第一权重值与第二权重值的确定方式不做限制。In
示例性的,可以根据当前块的相邻块的预测模式信息确定权重值的大小关系。例如,若当前块的相邻块的预测模式信息与第一预测模式相同时,则可以增加第一权重值。若当前块的相邻块的预测模式信息与第二预测模式相同时,则可以增加第二权重值。Exemplarily, the magnitude relationship of weight values may be determined according to prediction mode information of neighboring blocks of the current block. For example, if the prediction mode information of the adjacent blocks of the current block is the same as the first prediction mode, the first weight value may be increased. If the prediction mode information of the adjacent blocks of the current block is the same as the second prediction mode, the second weight value may be increased.
例如,若第一预测模式为常规合并模式,第二预测模式为帧内预测模式,若当前块的相邻块的预测模式信息为常规合并模式,则增加第一权重值;若当前块的相邻块的预测模式信息为帧内预测模式,则增加第二权重值;当然,上述只是几个示例,对此不做限制。For example, if the first prediction mode is the normal merge mode, the second prediction mode is the intra prediction mode, if the prediction mode information of the adjacent block of the current block is the normal merge mode, then increase the first weight value; If the prediction mode information of the adjacent block is an intra prediction mode, the second weight value is added; of course, the above are just a few examples, and there is no limitation to this.
基于与上述方法同样的申请构思,本申请实施例还提出一种编解码装置,所述装置应用于编码端或者解码端,参见图14所示,为所述装置的结构图,包括:获取模块1401,用于在确定对当前块启动基于子块的联合预测时,获取当前块的块划分信息;处理模块1402,用于根据所述块划分信息将所述当前块划分为至少两个子块;所述获取模块1401,还用于获取所述至少两个子块分别对应的预测模式信息;根据所述预测模式信息获取所述至少两个子块分别对应的预测值;根据所述至少两个子块分别对应的预测值获取所述当前块的预测值。Based on the same application concept as the above-mentioned method, the embodiment of the present application also proposes a codec device, which is applied to the encoding end or the decoding end, as shown in Figure 14, which is a structural diagram of the device, including: an acquisition module 1401, configured to acquire block division information of the current block when it is determined to start sub-block-based joint prediction for the current block; a processing module 1402, configured to divide the current block into at least two sub-blocks according to the block division information; The obtaining module 1401 is further configured to obtain prediction mode information corresponding to the at least two sub-blocks; obtain prediction values corresponding to the at least two sub-blocks according to the prediction mode information; The corresponding prediction value obtains the prediction value of the current block.
示例性的,所述至少两个子块包括第一子块和第二子块;其中,所述第一子块的预测模式信息为帧内块拷贝预测模式;所述第二子块的预测模式信息为帧内预测模式,或者,帧间预测模式,或者,帧内块拷贝预测模式。Exemplarily, the at least two sub-blocks include a first sub-block and a second sub-block; wherein, the prediction mode information of the first sub-block is an intra block copy prediction mode; the prediction mode of the second sub-block The information is an intra prediction mode, or an inter prediction mode, or an intra block copy prediction mode.
若所述第一子块的预测模式信息为帧内块拷贝预测模式,所述第二子块的预测模式信息为帧内块拷贝预测模式,所述获取模块1401根据所述预测模式信息获取所述至少两个子块分别对应的预测值时具体用于:构建块矢量候选列表,所述块矢量候选列表包括多个候选块矢量;从所述块矢量候选列表中选择一个候选块矢量作为所述第一子块的第一目标块矢量,从所述块矢量候选列表中选择另一个候选块矢量作为所述第二子块的第二目标块矢量;根据所述第一目标块矢量获取与所述第一子块对应的预测值;根据所述第二目标块矢量获取与所述第二子块对应的预测值。If the prediction mode information of the first sub-block is an intra block copy prediction mode, and the prediction mode information of the second sub block is an intra block copy prediction mode, the obtaining module 1401 obtains the prediction mode information according to the prediction mode information. The predictive values corresponding to the at least two sub-blocks are specifically used to: construct a block vector candidate list, the block vector candidate list includes a plurality of candidate block vectors; select a candidate block vector from the block vector candidate list as the the first target block vector of the first sub-block, selecting another candidate block vector from the block vector candidate list as the second target block vector of the second sub-block; A prediction value corresponding to the first sub-block; and obtaining a prediction value corresponding to the second sub-block according to the second target block vector.
若所述第一子块的预测模式信息为帧内块拷贝预测模式,所述第二子块的预测模式信息为帧间预测模式,所述获取模块1401根据所述预测模式信息获取所述至少两个子块分别对应的预测值时具体用于:构建块矢量候选列表,所述块矢量候选列表包括多个候选块矢量;从所述块矢量候选列表中选择一个候选块矢量作为所述第一子块的目标块矢量;构建运动信息候选列表,所述运动信息候选列表包括至少一个候选运动信息;从所述运动信息候选列表中选择一个候选运动信息作为所述第二子块的目标运动信息;根据所述目标块矢量获取与所述第一子块对应的预测值;根据所述目标运动信息获取与所述第二子块对应的预测值。If the prediction mode information of the first sub-block is an intra block copy prediction mode, and the prediction mode information of the second sub-block is an inter prediction mode, the acquiring module 1401 acquires the at least The predictive values corresponding to the two sub-blocks are specifically used to: construct a block vector candidate list, the block vector candidate list includes a plurality of candidate block vectors; select a candidate block vector from the block vector candidate list as the first The target block vector of the sub-block; constructing a motion information candidate list, the motion information candidate list including at least one candidate motion information; selecting a candidate motion information from the motion information candidate list as the target motion information of the second sub-block ; Obtain a prediction value corresponding to the first sub-block according to the target block vector; obtain a prediction value corresponding to the second sub-block according to the target motion information.
若所述第一子块的预测模式信息为帧内块拷贝预测模式,所述第二子块的预测模式信息为帧内预测模式,所述获取模块1401根据所述预测模式信息获取所述至少两个子块分别对应的预测值时具体用于:构建块矢量候选列表,所述块矢量候选列表包括多个候选块矢量;从所述块矢量候选列表中选择一个候选块矢量作为所述第一子块的目标块矢量;获取所述第二子块的目标帧内子预测模式;根据所述目标块矢量获取与所述第一子块对应的预测值;根据所述目标帧内子预测模式获取与所述第二子块对应的预测值。If the prediction mode information of the first sub-block is an intra block copy prediction mode, and the prediction mode information of the second sub-block is an intra prediction mode, the acquiring module 1401 acquires the at least The predictive values corresponding to the two sub-blocks are specifically used to: construct a block vector candidate list, the block vector candidate list includes a plurality of candidate block vectors; select a candidate block vector from the block vector candidate list as the first A target block vector of a sub-block; acquiring a target intra-frame sub-prediction mode of the second sub-block; acquiring a predictive value corresponding to the first sub-block according to the target block vector; acquiring a prediction value corresponding to the target intra-frame sub-prediction mode according to the target The predicted value corresponding to the second sub-block.
所述至少两个子块包括第一子块和第二子块;所述第一子块的预测模式信息为帧内预测模式,所述第二子块的预测模式信息为帧内预测模式,所述获取模块1401根据所述预测模式信息获取所述至少两个子块分别对应的预测值时具体用于:获取所述第一子块的第一目标帧内子预测模式、所述第二子块的第二目标帧内子预测模式,所述第一目标帧内子预测模式与所述第二目标帧内子预测模式不同;根据所述第一目标帧内子预测模式获取与所述第一子块对应的预测值;根据所述第二目标帧内子预测模式获取与所述第二子块对应的预测值。The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an intra-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode, so When the obtaining module 1401 obtains the prediction values corresponding to the at least two sub-blocks according to the prediction mode information, it is specifically used to: obtain the first target intra-frame sub-prediction mode of the first sub-block, the A second target intra-frame sub-prediction mode, the first target intra-frame sub-prediction mode is different from the second target intra-frame sub-prediction mode; obtain a prediction corresponding to the first sub-block according to the first target intra-frame sub-prediction mode value; obtain a prediction value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode.
所述获取模块1401获取所述第一子块的第一目标帧内子预测模式、所述第二子块的第二目标帧内子预测模式时具体用于:将指定第一帧内子预测模式确定为所述第一子块的第一目标帧内子预测模式,并将指定第二帧内子预测模式确定为所述第二子块的第二目标帧内子预测模式;或者,构建帧内子预测模式候选列表,所述帧内子预测模式候选列表包括多个候选帧内子预测模式;从所述帧内子预测模式候选列表中选择一个候选帧内子预测模式作为所述第一子块的第一目标帧内子预测模式,并从所述帧内子预测模式候选列表中选择另一个候选帧内子预测模式作为所述第二子块的第二目标帧内子预测模式;或者,若第一子块的第一相邻块的帧内子预测模式与第二子块的第二相邻块的帧内子预测模式不同,将第一相邻块的帧内子预测模式确定为所述第一子块的第一目标帧内子预测模式,将第二相邻块的帧内子预测模式确定为所述第二子块的第二目标帧内子预测模式;若所述第一相邻块的帧内子预测模式与所述第二相邻块的帧内子预测模式相同,将所述第一相邻块的帧内子预测模式确定为所述第一子块的第一目标帧内子预测模式,将与所述第一目标帧内子预测模式不同的另一个帧内子预测模式确定为所述第二子块的第二目标帧内子预测模式。When the acquiring module 1401 acquires the first target intra-frame sub-prediction mode of the first sub-block and the second target intra-frame sub-prediction mode of the second sub-block, it is specifically used to: determine the specified first intra-frame sub-prediction mode as The first target intra-frame sub-prediction mode of the first sub-block, and determine the designated second intra-frame sub-prediction mode as the second target intra-frame sub-prediction mode of the second sub-block; or, construct an intra-frame sub-prediction mode candidate list , the intra-frame sub-prediction mode candidate list includes a plurality of candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the first target intra-frame sub-prediction mode of the first sub-block , and select another candidate intra sub-prediction mode from the intra-frame sub-prediction mode candidate list as the second target intra-frame sub-prediction mode of the second sub-block; or, if the first adjacent block of the first sub-block The intra-frame sub-prediction mode is different from the intra-frame sub-prediction mode of the second adjacent block of the second sub-block, and the intra-frame sub-prediction mode of the first adjacent block is determined as the first target intra-frame sub-prediction mode of the first sub-block, determining the intra-frame sub-prediction mode of the second adjacent block as the second target intra-frame sub-prediction mode of the second sub-block; if the intra-frame sub-prediction mode of the first adjacent block is the same as that of the second adjacent block The intra-frame sub-prediction modes are the same, the intra-frame sub-prediction mode of the first adjacent block is determined as the first target intra-frame sub-prediction mode of the first sub-block, and another sub-prediction mode different from the first target intra-frame sub-prediction mode is determined An intra-frame sub-prediction mode is determined as a second target intra-frame sub-prediction mode of the second sub-block.
所述至少两个子块包括第一子块和第二子块;所述第一子块的预测模式信息为帧间预测模式,所述第二子块的预测模式信息为帧内预测模式,所述获取模块1401根据所述预测模式信息获取所述至少两个子块分别对应的预测值时具体用于:构建运动信息候选列表,所述运动信息候选列表包括至少一个候选运动信息;从所述运动信息候选列表中选择一个候选运动信息作为所述第一子块的目标运动信息;获取所述第二子块的目标帧内子预测模式;根据所述目标运动信息获取与所述第一子块对应的预测值;根据所述目标帧内子预测模式获取与所述第二子块对应的预测值。The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode, so When the obtaining module 1401 obtains the predicted values corresponding to the at least two sub-blocks according to the prediction mode information, it is specifically used to: construct a motion information candidate list, and the motion information candidate list includes at least one candidate motion information; from the motion Selecting a candidate motion information from the information candidate list as the target motion information of the first sub-block; acquiring the target intra-frame sub-prediction mode of the second sub-block; acquiring the target motion information corresponding to the first sub-block according to the target motion information A predictive value; acquiring a predictive value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
所述获取模块1401获取所述第二子块的目标帧内子预测模式时具体用于:将指定帧内子预测模式确定为所述第二子块的目标帧内子预测模式;或者,构建帧内子预测模式候选列表,所述帧内子预测模式候选列表包括多个候选帧内子预测模式;从所述帧内子预测模式候选列表中选择一个候选帧内子预测模式作为所述第二子块的目标帧内子预测模式;或者,将第二子块的相邻块的帧内子预测模式确定为所述第二子块的目标帧内子预测模式。When the acquiring module 1401 acquires the target intra-frame sub-prediction mode of the second sub-block, it is specifically used to: determine a specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block; or construct an intra-frame sub-prediction A mode candidate list, the intra-frame sub-prediction mode candidate list includes a plurality of candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction of the second sub-block mode; or, determining an intra-frame sub-prediction mode of a neighboring block of the second sub-block as a target intra-frame sub-prediction mode of the second sub-block.
所述至少两个子块包括第一子块和第二子块;所述第一子块的预测模式信息为帧间预测模式,所述第二子块的预测模式信息为帧间预测模式,所述获取模块1401根据所述预测模式信息获取所述至少两个子块分别对应的预测值时具体用于:构建帧间预测模式中的第一子模式的第一运动信息候选列表,第一运动信息候选列表包括至少一个候选运动信息;从所述第一运动信息候选列表中选择一个候选运动信息作为所述第一子块的目标运动信息;构建帧间预测模式中的第二子模式的第二运动信息候选列表,第二运动信息候选列表包括至少一个候选运动信息;从所述第二运动信息候选列表中选择一个候选运动信息作为所述第二子块的目标运动信息;所述第一子模式与所述第二子模式不同;根据所述第一子块的目标运动信息获取与所述第一子块对应的预测值;根据所述第二子块的目标运动信息获取与所述第二子块对应的预测值;其中,所述第一子模式为如下子模式的一种:常规合并子模式、MMVD子模式、仿射合并子模式、ATMVP子模式;所述第二子模式为如下子模式的一种:常规合并子模式、MMVD子模式、仿射合并子模式、ATMVP子模式。The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode, so When the obtaining module 1401 obtains the predicted values corresponding to the at least two sub-blocks according to the prediction mode information, it is specifically used to: construct the first motion information candidate list of the first sub-mode in the inter prediction mode, the first motion information The candidate list includes at least one candidate motion information; select a candidate motion information from the first motion information candidate list as the target motion information of the first sub-block; construct the second sub-mode of the inter-frame prediction mode. A motion information candidate list, the second motion information candidate list includes at least one candidate motion information; one candidate motion information is selected from the second motion information candidate list as the target motion information of the second sub-block; the first sub-block The mode is different from the second sub-mode; the prediction value corresponding to the first sub-block is obtained according to the target motion information of the first sub-block; the prediction value corresponding to the first sub-block is obtained according to the target motion information of the second sub-block The predicted value corresponding to the two sub-blocks; wherein, the first sub-mode is one of the following sub-modes: conventional merging sub-mode, MMVD sub-mode, affine merging sub-mode, ATMVP sub-mode; the second sub-mode is One of the following submodes: regular merge submode, MMVD submode, affine merge submode, ATMVP submode.
示例性的,所述第一子块的形状与所述第二子块的形状相同;或者,所述第一子块的形状与所述第二子块的形状不同。所述第一子块为如下子块的一种:三角子块、梯形子块、五边形子块;所述第二子块为如下子块的一种:三角子块、梯形子块、五边形子块。Exemplarily, the shape of the first sub-block is the same as that of the second sub-block; or, the shape of the first sub-block is different from that of the second sub-block. The first sub-block is one of the following sub-blocks: triangular sub-block, trapezoidal sub-block, pentagonal sub-block; the second sub-block is one of the following sub-blocks: triangular sub-block, trapezoidal sub-block, Pentagon sub-blocks.
示例性的,在所述第一子块采用帧内块拷贝预测模式中的MMVD子模式时,所述块矢量候选列表包括MMVD子模式的块矢量候选列表。Exemplarily, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, the block vector candidate list includes a block vector candidate list of the MMVD sub-mode.
示例性的,在所述第二子块或者所述第一子块采用帧间预测模式中的常规合并子模式时,所述运动信息候选列表包括常规合并子模式的运动信息候选列表;或者,在所述第二子块或者所述第一子块采用帧间预测模式中的MMVD子模式时,所述运动信息候选列表包括MMVD子模式的运动信息候选列表;或者,在所述第二子块或者所述第一子块采用帧间预测模式中的仿射合并子模式时,所述运动信息候选列表包括仿射合并子模式的运动信息候选列表;或者,在所述第二子块或者所述第一子块采用帧间预测模式中的ATMVP子模式时,所述运动信息候选列表包括ATMVP子模式的运动信息候选列表。Exemplarily, when the second sub-block or the first sub-block adopts the normal merging sub-mode in the inter prediction mode, the motion information candidate list includes the motion information candidate list of the normal merging sub-mode; or, When the second sub-block or the first sub-block adopts the MMVD sub-mode in the inter prediction mode, the motion information candidate list includes the motion information candidate list of the MMVD sub-mode; or, in the second sub-block When the block or the first sub-block adopts the affine merging sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the affine merging sub-mode; or, in the second sub-block or When the first sub-block adopts the ATMVP sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
所述至少两个子块包括第一子块和第二子块,所述第一子块对应第一预测模式信息,所述第二子块对应第二预测模式信息,所述获取模块1401根据所述预测模式信息获取所述至少两个子块分别对应的预测值时具体用于:将所述当前块划分为第一区域块、第二区域块和第三区域块;其中,所述第一区域块位于所述第一子块内,所述第二区域块位于所述第二子块内,所述第三区域块内的每个子块的中心与划分线之间的距离小于预设阈值,所述划分线是基于所述块划分信息确定的;根据所述第一预测模式信息获取所述第一区域块对应的目标预测值;根据所述第二预测模式信息获取所述第二区域块对应的目标预测值;根据第一预测模式信息和/或第二预测模式信息获取所述第三区域块对应的目标预测值。The at least two sub-blocks include a first sub-block and a second sub-block, the first sub-block corresponds to the first prediction mode information, the second sub-block corresponds to the second prediction mode information, and the acquiring module 1401 according to the When the prediction mode information obtains the prediction values corresponding to the at least two sub-blocks, it is specifically used to: divide the current block into a first area block, a second area block, and a third area block; wherein, the first area The block is located in the first sub-block, the second area block is located in the second sub-block, and the distance between the center of each sub-block in the third area block and the dividing line is less than a preset threshold, The division line is determined based on the block division information; the target prediction value corresponding to the first region block is obtained according to the first prediction mode information; the second region block is obtained according to the second prediction mode information Corresponding target predictive value: Acquiring the target predictive value corresponding to the third area block according to the first prediction mode information and/or the second prediction mode information.
所述获取模块1401根据第一预测模式信息和/或第二预测模式信息获取所述第三区域块对应的目标预测值时具体用于:根据所述第一预测模式信息获取所述第三区域块对应的目标预测值;或者,根据所述第二预测模式信息获取所述第三区域块对应的目标预测值;或者,根据所述第一预测模式信息获取所述第三区域块对应的第一预测值,根据所述第二预测模式信息获取所述第三区域块对应的第二预测值,并对所述第一预测值和所述第二预测值进行加权处理,得到所述第三区域块对应的目标预测值。When the obtaining module 1401 obtains the target prediction value corresponding to the third area block according to the first prediction mode information and/or the second prediction mode information, it is specifically used to: obtain the third area according to the first prediction mode information The target prediction value corresponding to the block; or, according to the second prediction mode information, obtain the target prediction value corresponding to the third region block; or, according to the first prediction mode information, obtain the third region block corresponding to the A predictive value, obtaining a second predictive value corresponding to the third regional block according to the second predictive mode information, and performing weighting processing on the first predictive value and the second predictive value to obtain the third predictive value The target predictor value corresponding to the region block.
基于与上述方法同样的申请构思,本申请实施例还提出一种编解码装置,所述装置应用于编码端或者解码端,参见图15所示,为所述装置的结构图,包括:Based on the same application concept as the above-mentioned method, the embodiment of the present application also proposes a codec device, which is applied to the encoding end or the decoding end, as shown in Figure 15, which is a structural diagram of the device, including:
获取模块1501,用于在确定当前块启动目标加权预测时,获取所述当前块对应的第一预测模式和第二预测模式;确定模块1502,用于根据所述第一预测模式确定所述当前块对应的第一预测值;根据所述第二预测模式确定所述当前块对应的第二预测值;处理模块1503,用于根据所述第一预测值和所述第二预测值进行加权处理,得到所述当前块的目标预测值,所述目标预测值用于所述当前块的编码或者解码。The obtaining module 1501 is used to obtain the first prediction mode and the second prediction mode corresponding to the current block when it is determined that the current block starts target weighted prediction; the determination module 1502 is used to determine the current prediction mode according to the first prediction mode. A first prediction value corresponding to the block; determining a second prediction value corresponding to the current block according to the second prediction mode; a processing module 1503, configured to perform weighting processing according to the first prediction value and the second prediction value , to obtain a target predictive value of the current block, where the target predictive value is used for encoding or decoding of the current block.
示例性的,所述第一预测模式为如下预测模式中的一种:常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式;所述第二预测模式为如下预测模式中的一种:常规合并帧间预测模式,三角帧间预测模式,帧内块拷贝预测模式,帧内预测模式,MMVD帧间预测模式,仿射合并帧间预测模式,ATMVP帧间预测模式。Exemplarily, the first prediction mode is one of the following prediction modes: conventional combined inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, intra prediction mode, MMVD inter prediction mode, Affine merged inter-frame prediction mode, ATMVP inter-frame prediction mode; the second prediction mode is one of the following prediction modes: conventional merged inter-frame prediction mode, triangular inter-frame prediction mode, intra block copy prediction mode, frame Intra prediction mode, MMVD inter prediction mode, affine merge inter prediction mode, ATMVP inter prediction mode.
基于与上述方法同样的申请构思,本申请实施例提供的解码端设备,从硬件层面而言,其硬件架构示意图具体可以参见图16所示。包括:处理器1601和机器可读存储介质1602,其中:所述机器可读存储介质1602存储有能够被所述处理器1601执行的机器可执行指令;所述处理器1601用于执行机器可执行指令,以实现本申请上述示例公开的方法。Based on the same application concept as the above-mentioned method, the decoding end device provided by the embodiment of the present application, from the hardware level, its hardware architecture schematic diagram can be referred to as shown in FIG. 16 . Including: a
例如,所述处理器1601用于执行机器可执行指令,以实现如下步骤:For example, the
在确定对当前块启动基于子块的联合预测时,获取所述当前块的块划分信息;根据所述块划分信息将所述当前块划分为至少两个子块;获取所述至少两个子块分别对应的预测模式信息;根据所述预测模式信息获取所述至少两个子块分别对应的预测值;根据所述至少两个子块分别对应的预测值获取所述当前块的预测值;或者,When it is determined to start sub-block-based joint prediction for the current block, acquire block division information of the current block; divide the current block into at least two sub-blocks according to the block division information; acquire the at least two sub-blocks respectively Corresponding prediction mode information; obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
确定当前块启动目标加权预测时,获取所述当前块对应的第一预测模式和第二预测模式;根据所述第一预测模式确定所述当前块对应的第一预测值;根据所述第二预测模式确定所述当前块对应的第二预测值;根据所述第一预测值和所述第二预测值进行加权处理,得到所述当前块的目标预测值,所述目标预测值用于所述当前块的解码。When it is determined that the current block starts target weighted prediction, obtain the first prediction mode and the second prediction mode corresponding to the current block; determine the first prediction value corresponding to the current block according to the first prediction mode; The prediction mode determines the second prediction value corresponding to the current block; performs weighting processing according to the first prediction value and the second prediction value to obtain the target prediction value of the current block, and the target prediction value is used for the current block Describe the decoding of the current block.
基于与上述方法同样的申请构思,本申请实施例提供的编码端设备,从硬件层面而言,其硬件架构示意图具体可以参见图17所示。包括:处理器1701和机器可读存储介质1702,其中:所述机器可读存储介质1702存储有能够被所述处理器1701执行的机器可执行指令;所述处理器1701用于执行机器可执行指令,以实现本申请上述示例公开的方法。Based on the same application concept as the above-mentioned method, the encoding end device provided by the embodiment of the present application, from the hardware level, its hardware architecture schematic diagram can be referred to as shown in FIG. 17 . Including: a
例如,所述处理器1701用于执行机器可执行指令,以实现如下步骤:For example, the
在确定对当前块启动基于子块的联合预测时,获取所述当前块的块划分信息;根据所述块划分信息将所述当前块划分为至少两个子块;获取所述至少两个子块分别对应的预测模式信息;根据所述预测模式信息获取所述至少两个子块分别对应的预测值;根据所述至少两个子块分别对应的预测值获取所述当前块的预测值;或者,When it is determined to start sub-block-based joint prediction for the current block, acquire block division information of the current block; divide the current block into at least two sub-blocks according to the block division information; acquire the at least two sub-blocks respectively Corresponding prediction mode information; obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
确定当前块启动目标加权预测时,获取所述当前块对应的第一预测模式和第二预测模式;根据所述第一预测模式确定所述当前块对应的第一预测值;根据所述第二预测模式确定所述当前块对应的第二预测值;根据所述第一预测值和所述第二预测值进行加权处理,得到所述当前块的目标预测值,所述目标预测值用于所述当前块的编码。When it is determined that the current block starts target weighted prediction, obtain the first prediction mode and the second prediction mode corresponding to the current block; determine the first prediction value corresponding to the current block according to the first prediction mode; The prediction mode determines the second prediction value corresponding to the current block; performs weighting processing according to the first prediction value and the second prediction value to obtain the target prediction value of the current block, and the target prediction value is used for the current block Describe the encoding of the current block.
基于与上述方法同样的申请构思,本申请实施例还提供一种机器可读存储介质,所述机器可读存储介质上存储有若干计算机指令,所述计算机指令被处理器执行时,能够实现本申请上述示例公开的方法。其中,上述机器可读存储介质可以是任何电子、磁性、光学或其它物理存储装置,可以包含或存储信息,如可执行指令、数据,等等。例如,机器可读存储介质可以是:RAM(Radom Access Memory,随机存取存储器)、易失存储器、非易失性存储器、闪存、存储驱动器(如硬盘驱动器)、固态硬盘、任何类型的存储盘(如光盘、dvd等),或者类似的存储介质,或者它们的组合。Based on the same application idea as the above-mentioned method, the embodiment of the present application also provides a machine-readable storage medium, on which several computer instructions are stored, and when the computer instructions are executed by a processor, the present invention can be realized. Apply the method disclosed by the above example. Wherein, the above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, and so on. For example, the machine-readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid-state hard disk, any type of storage disk (such as CD, DVD, etc.), or similar storage media, or a combination of them.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。The systems, devices, modules, or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementing device is a computer, which may take the form of a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, e-mail device, game control device, etc. desktops, tablets, wearables, or any combination of these. For the convenience of description, when describing the above devices, functions are divided into various units and described separately. Of course, when implementing the present application, the functions of each unit can be implemented in one or more pieces of software and/or hardware.
本领域内的技术人员应明白,本申请实施例可提供为方法、系统、或计算机程序产品。本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. This application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其它可编程数据处理设备上,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram. These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operational steps are performed on the computer or other programmable equipment to produce computer-implemented processing, so that the information executed on the computer or other programmable equipment The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams. The above descriptions are only examples of the present application, and are not intended to limit the present application. For those skilled in the art, various modifications and changes may occur in this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims (7)
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310489496.2A CN116405697B (en) | 2019-07-23 | 2019-07-23 | A coding and decoding method, device and equipment thereof |
| CN201910668356.5A CN112291558B (en) | 2019-07-23 | 2019-07-23 | Encoding and decoding method, device and equipment thereof |
| PCT/CN2020/103326 WO2021013153A1 (en) | 2019-07-23 | 2020-07-21 | Encoding and decoding method and device and apparatus therefor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910668356.5A CN112291558B (en) | 2019-07-23 | 2019-07-23 | Encoding and decoding method, device and equipment thereof |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310489496.2A Division CN116405697B (en) | 2019-07-23 | 2019-07-23 | A coding and decoding method, device and equipment thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112291558A CN112291558A (en) | 2021-01-29 |
| CN112291558B true CN112291558B (en) | 2023-06-27 |
Family
ID=74192832
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910668356.5A Active CN112291558B (en) | 2019-07-23 | 2019-07-23 | Encoding and decoding method, device and equipment thereof |
| CN202310489496.2A Active CN116405697B (en) | 2019-07-23 | 2019-07-23 | A coding and decoding method, device and equipment thereof |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310489496.2A Active CN116405697B (en) | 2019-07-23 | 2019-07-23 | A coding and decoding method, device and equipment thereof |
Country Status (2)
| Country | Link |
|---|---|
| CN (2) | CN112291558B (en) |
| WO (1) | WO2021013153A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115002463B (en) * | 2022-07-15 | 2023-01-13 | 深圳传音控股股份有限公司 | Image processing method, intelligent terminal and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20070027236A (en) * | 2005-09-06 | 2007-03-09 | 삼성전자주식회사 | Method and apparatus for intra prediction encoding and decoding of images |
| CN101415121A (en) * | 2007-10-15 | 2009-04-22 | 华为技术有限公司 | Self-adapting method and apparatus for forecasting frame |
| CN102907100A (en) * | 2010-05-17 | 2013-01-30 | Sk电信有限公司 | Image coding/decoding device using coding block in which intra block and inter block are mixed, and method thereof |
| WO2015133866A1 (en) * | 2014-03-06 | 2015-09-11 | 삼성전자 주식회사 | Inter-layer video decoding method and apparatus therefor performing sub-block-based prediction, and inter-layer video encoding method and apparatus therefor performing sub-block-based prediction |
| WO2018026118A1 (en) * | 2016-08-01 | 2018-02-08 | 한국전자통신연구원 | Image encoding/decoding method |
| CN109862369A (en) * | 2018-12-28 | 2019-06-07 | 杭州海康威视数字技术股份有限公司 | A coding and decoding method and device thereof |
Family Cites Families (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR100716999B1 (en) * | 2005-06-03 | 2007-05-10 | 삼성전자주식회사 | Intra prediction method using image symmetry, image decoding, encoding method and apparatus using same |
| KR20100095992A (en) * | 2009-02-23 | 2010-09-01 | 한국과학기술원 | Method for encoding partitioned block in video encoding, method for decoding partitioned block in video decoding and recording medium implementing the same |
| JP6373008B2 (en) * | 2013-12-27 | 2018-08-15 | 三菱電機株式会社 | Image encoding device, image decoding device, image encoding method, and image decoding method |
| JP6187826B2 (en) * | 2014-02-04 | 2017-08-30 | パナソニックIpマネジメント株式会社 | Moving picture coding apparatus and moving picture coding method |
| JP6362370B2 (en) * | 2014-03-14 | 2018-07-25 | 三菱電機株式会社 | Image encoding device, image decoding device, image encoding method, and image decoding method |
| WO2016043933A1 (en) * | 2014-09-15 | 2016-03-24 | Mediatek Inc. | Method of deblocking for intra block copy in video coding |
| KR20180020965A (en) * | 2015-04-27 | 2018-02-28 | 엘지전자 주식회사 | Method for processing video signals and apparatus therefor |
| CN115499663A (en) * | 2015-06-08 | 2022-12-20 | 上海天荷电子信息有限公司 | Image compression method and device with reference to different degrees of reconstructed pixels in single coding mode |
| ES2737874B2 (en) * | 2016-07-05 | 2020-10-16 | Kt Corp | METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNAL |
| CN117041567A (en) * | 2016-11-29 | 2023-11-10 | 韩国电子通信研究院 | Image encoding/decoding method and recording medium for storing bit stream |
| CN117041557A (en) * | 2016-12-07 | 2023-11-10 | 株式会社Kt | Method of decoding or encoding image signal and apparatus for storing video data |
| US10757420B2 (en) * | 2017-06-23 | 2020-08-25 | Qualcomm Incorporated | Combination of inter-prediction and intra-prediction in video coding |
| TW201907732A (en) * | 2017-07-05 | 2019-02-16 | 財團法人工業技術研究院 | Video encoding method, video decoding method, video encoder and video decoder |
| US10567772B2 (en) * | 2017-07-11 | 2020-02-18 | Google Llc | Sub8×8 block processing |
| EP3484148A1 (en) * | 2017-11-09 | 2019-05-15 | Thomson Licensing | Automated scanning order for sub-divided blocks |
| CN118301340A (en) * | 2017-11-16 | 2024-07-05 | 英迪股份有限公司 | Image encoding/decoding method and recording medium storing bit stream |
-
2019
- 2019-07-23 CN CN201910668356.5A patent/CN112291558B/en active Active
- 2019-07-23 CN CN202310489496.2A patent/CN116405697B/en active Active
-
2020
- 2020-07-21 WO PCT/CN2020/103326 patent/WO2021013153A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20070027236A (en) * | 2005-09-06 | 2007-03-09 | 삼성전자주식회사 | Method and apparatus for intra prediction encoding and decoding of images |
| CN101415121A (en) * | 2007-10-15 | 2009-04-22 | 华为技术有限公司 | Self-adapting method and apparatus for forecasting frame |
| CN102907100A (en) * | 2010-05-17 | 2013-01-30 | Sk电信有限公司 | Image coding/decoding device using coding block in which intra block and inter block are mixed, and method thereof |
| WO2015133866A1 (en) * | 2014-03-06 | 2015-09-11 | 삼성전자 주식회사 | Inter-layer video decoding method and apparatus therefor performing sub-block-based prediction, and inter-layer video encoding method and apparatus therefor performing sub-block-based prediction |
| WO2018026118A1 (en) * | 2016-08-01 | 2018-02-08 | 한국전자통신연구원 | Image encoding/decoding method |
| CN109862369A (en) * | 2018-12-28 | 2019-06-07 | 杭州海康威视数字技术股份有限公司 | A coding and decoding method and device thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116405697A (en) | 2023-07-07 |
| WO2021013153A1 (en) | 2021-01-28 |
| CN116405697B (en) | 2024-10-29 |
| CN112291558A (en) | 2021-01-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109862368B (en) | Coding and decoding method and equipment thereof | |
| CN111385569B (en) | Coding and decoding method and equipment thereof | |
| CN113810686B (en) | A codec method, device and equipment thereof | |
| CN113810687B (en) | Encoding and decoding method, device and equipment | |
| CN113196758B (en) | Image encoding/decoding method and device and recording medium storing bit stream | |
| CN112135144B (en) | Encoding and decoding method, device and equipment | |
| CN112449181B (en) | Encoding and decoding method, device and equipment | |
| CN115348442A (en) | Motion information determination method, device and equipment | |
| CN113709500A (en) | Encoding and decoding method, device and equipment | |
| CN112291558B (en) | Encoding and decoding method, device and equipment thereof | |
| CN112565747B (en) | Decoding and encoding method, device and equipment | |
| CN113709487B (en) | A codec method, device and equipment thereof | |
| HK40064076A (en) | Coding and decoding method, device and equipment | |
| CN116016946A (en) | A codec method, device and equipment thereof |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |
