[go: up one dir, main page]

HK40079470B - Video encoding and decoding method and related apparatus - Google Patents

Video encoding and decoding method and related apparatus

Info

Publication number
HK40079470B
HK40079470B HK42023069091.9A HK42023069091A HK40079470B HK 40079470 B HK40079470 B HK 40079470B HK 42023069091 A HK42023069091 A HK 42023069091A HK 40079470 B HK40079470 B HK 40079470B
Authority
HK
Hong Kong
Prior art keywords
mode
intra
prediction
mpm
modes
Prior art date
Application number
HK42023069091.9A
Other languages
Chinese (zh)
Other versions
HK40079470A (en
Inventor
赵亮
赵欣
李翔
刘杉
Original Assignee
腾讯美国有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯美国有限责任公司 filed Critical 腾讯美国有限责任公司
Publication of HK40079470A publication Critical patent/HK40079470A/en
Publication of HK40079470B publication Critical patent/HK40079470B/en

Links

Description

一种视频编解码方法和相关装置A video encoding/decoding method and related apparatus

相关申请的交叉引用Cross-references to related applications

本申请要求于2018年9月14日提交的美国临时申请第62/731,776号以及于2018年12月28日提交的美国申请第16/234,993号的优先权,以上申请的公开内容通过引用整体并入本文中。This application claims priority to U.S. Provisional Application No. 62/731,776, filed September 14, 2018, and U.S. Application No. 16/234,993, filed December 28, 2018, the disclosures of which are incorporated herein by reference in their entirety.

技术领域Technical Field

本公开涉及视频处理技术,尤其涉及一种视频编解码方法和相关装置。This disclosure relates to video processing technology, and more particularly to a video encoding/decoding method and related apparatus.

背景技术Background Technology

在图5中示出了在高效视频编码(High Efficiency Video Coding,HEVC)中使用的帧内预测模式。在HEVC中,存在总共35个帧内预测模式,其中模式10是水平模式(501),模式26是竖直模式(502),并且模式2、模式18和模式34是对角模式(503)。由三个最可能模式(most probable mode,MPM)和32个其余模式来用信号表示帧内预测模式。Figure 5 illustrates the intra-prediction modes used in High Efficiency Video Coding (HEVC). In HEVC, there are a total of 35 intra-prediction modes, where mode 10 is a horizontal mode (501), mode 26 is a vertical mode (502), and modes 2, 18, and 34 are diagonal modes (503). The intra-prediction modes are represented by signals using three most probable modes (MPMs) and the remaining 32 modes.

为了对帧内模式进行编码,基于相邻块的帧内模式来构建大小为3的最可能模式(MPM)列表。该MPM列表将被称为MPM列表或主MPM列表。如果帧内模式不是来自MPM列表,则用信号表示标志以指示帧内模式是否属于所选择的模式。To encode intra-frame modes, a Most Probable Modes (MPMs) list of size 3 is constructed based on the intra-frame modes of neighboring blocks. This MPM list is referred to as the MPM list or the master MPM list. If an intra-frame mode does not come from the MPM list, a signal flag is used to indicate whether the intra-frame mode belongs to the selected mode.

如下示出了生成MPM列表的处理。此处,leftIntraDir指示左块中的模式,并且aboveIntraDir指示上块中的模式。如果左块或上块当前不可用,则将leftIntraDir或aboveIntraDir设置为索引DC_IDX。此外,变量“offset”和“mod”是常数值,其分别被设置为29和32。The following illustrates the process for generating the MPM list. Here, `leftIntraDir` indicates the mode in the left block, and `aboveIntraDir` indicates the mode in the upper block. If either the left or upper block is currently unavailable, `leftIntraDir` or `aboveIntraDir` is set to the index `DC_IDX`. Furthermore, the variables "offset" and "mod" are constant values, set to 29 and 32 respectively.

●If(leftIntraDir==aboveIntraDir&&leftIntraDir>DC_IDX)●If(leftIntraDir==aboveIntraDir&&leftIntraDir>DC_IDX)

○MPM[0]=leftIntraDir;○MPM[0]=leftIntraDir;

○MPM[1]=((leftIntraDir+offset)%mod)+2;○MPM[1]=((leftIntraDir+offset)%mod)+2;

○MPM[2]=((leftIntraDir-1)%mod)+2;○MPM[2]=((leftIntraDir-1)%mod)+2;

●Else if(leftIntraDir==aboveIntraDir)●Else if(leftIntraDir==aboveIntraDir)

○MPM[0]=PLANAR_IDX;○MPM[0]=PLANAR_IDX;

○MPM[1]=DC_IDX;○MPM[1]=DC_IDX;

○MPM[2]=VER_IDX;○MPM[2]=VER_IDX;

●Else if(leftIntraDir!=aboveIntraDir)●Else if(leftIntraDir!=aboveIntraDir)

○MPM[0]=leftIntraDir;○MPM[0]=leftIntraDir;

○MPM[1]=aboveIntraDir;○MPM[1]=aboveIntraDir;

○If(leftIntraDir>0&&aboveIntraDir>0)○If(leftIntraDir>0&&aboveIntraDir>0)

■MPM[2]=PLANAR_IDX;■MPM[2]=PLANAR_IDX;

○Else○Else

■MPM[2]=(leftIntraDir+aboveIntraDir)<2?VER_IDX:DC_IDX;■MPM[2]=(leftIntraDir+aboveIntraDir)<2? VER_IDX:DC_IDX;

在仅可以访问两个相邻模式的情况下,如何对于非零行生成包括更多个角度模式的MPM列表是需要解决的技术问题。Given that only two adjacent patterns can be accessed, how to generate an MPM list that includes more angle patterns for non-zero rows is a technical problem that needs to be solved.

发明内容Summary of the Invention

根据至少一个实施方式,一种视频解码方法,该方法由至少一个处理器执行,用以使用非零参考行来控制多行帧内预测,该方法包括:确定当前块的第一相邻块的帧内预测模式是否为角度模式。该方法还可以包括:确定当前块的第二相邻块的帧内预测模式是否为角度模式。该方法还可以包括:生成MPM列表,该MPM列表包括用于当前块的帧内预测的六个候选模式,其中这六个候选模式均为角度模式。可以生成MPM列表以使其在确定第一相邻块的帧内预测模式为角度模式的情况下包括第一相邻块的帧内预测模式,并且在确定第二相邻块的帧内预测模式为角度模式的情况下包括第二相邻块的帧内预测模式。According to at least one embodiment, a video decoding method, executed by at least one processor, is used to control multi-line intra-frame prediction using non-zero reference lines. The method includes: determining whether the intra-frame prediction mode of a first neighboring block of the current block is an angle mode. The method may further include: determining whether the intra-frame prediction mode of a second neighboring block of the current block is an angle mode. The method may further include: generating an MPM list including six candidate modes for intra-frame prediction of the current block, wherein all six candidate modes are angle modes. The MPM list can be generated such that it includes the intra-frame prediction mode of the first neighboring block if the intra-frame prediction mode of the first neighboring block is determined to be an angle mode, and includes the intra-frame prediction mode of the second neighboring block if the intra-frame prediction mode of the second neighboring block is determined to be an angle mode.

根据至少一个实施方式,可以提供一种用于使用非零参考行来控制多行帧内预测以对视频序列进行解码的装置。该装置可以包括:至少一个存储器,其被配置成存储计算机程序代码;以及至少一个处理器,其被配置成访问上述至少一个存储器并且根据计算机程序代码进行操作。计算机程序代码可以包括第一确定代码,该第一确定代码被配置成使上述至少一个处理器确定当前块的第一相邻块的帧内预测模式是否为角度模式。该计算机程序代码还可以包括第二确定代码,该第二确定代码被配置成使上述至少一个处理器确定当前块的第二相邻块的帧内预测模式是否为角度模式。该计算机程序代码还可以包括生成代码,该生成代码被配置成使上述至少一个处理器生成MPM列表,该MPM列表包括用于当前块的帧内预测的六个候选模式,其中这六个候选模式均为角度模式。该生成代码还可以被配置成使上述至少一个处理器生成MPM列表,使得该MPM列表在确定第一相邻块的帧内预测模式为角度模式的情况下包括第一相邻块的帧内预测模式,并且在确定第二相邻块的帧内预测模式为角度模式的情况下包括第二相邻块的帧内预测模式。According to at least one embodiment, an apparatus for controlling multi-line intra-frame prediction using non-zero reference lines to decode a video sequence can be provided. The apparatus may include: at least one memory configured to store computer program code; and at least one processor configured to access the at least one memory and operate according to the computer program code. The computer program code may include first determining code configured to cause the at least one processor to determine whether the intra-frame prediction mode of a first adjacent block of the current block is an angle mode. The computer program code may further include second determining code configured to cause the at least one processor to determine whether the intra-frame prediction mode of a second adjacent block of the current block is an angle mode. The computer program code may further include generating code configured to cause the at least one processor to generate an MPM list including six candidate modes for intra-frame prediction of the current block, wherein all six candidate modes are angle modes. The generation code can also be configured to cause at least one of the processors to generate an MPM list, such that the MPM list includes the intra prediction mode of the first adjacent block when the intra prediction mode of the first adjacent block is determined to be an angle mode, and includes the intra prediction mode of the second adjacent block when the intra prediction mode of the second adjacent block is determined to be an angle mode.

根据至少一个实施方式,一种存储指令的非暂态计算机可读存储介质,所述指令可以使至少一个处理器确定当前块的第一相邻块的帧内预测模式是否为角度模式。所述指令还可以使上述至少一个处理器确定当前块的第二相邻块的帧内预测模式是否为角度模式。所述指令还可以使上述至少一个处理器生成MPM列表,该MPM列表包括用于当前块的帧内预测的六个候选模式,其中这六个候选模式均为角度模式。所述指令可以使至少一个处理器生成MPM列表,使得该MPM列表在确定第一相邻块的帧内预测模式为角度模式的情况下包括第一相邻块的帧内预测模式,并且在确定第二相邻块的帧内预测模式为角度模式的情况下包括第二相邻块的帧内预测模式。According to at least one embodiment, a non-transitory computer-readable storage medium storing instructions that can cause at least one processor to determine whether the intra-prediction mode of a first neighboring block of a current block is an angle mode. The instructions can also cause the at least one processor to determine whether the intra-prediction mode of a second neighboring block of the current block is an angle mode. The instructions can further cause the at least one processor to generate an MPM list including six candidate modes for intra-prediction of the current block, wherein all six candidate modes are angle modes. The instructions can cause at least one processor to generate an MPM list such that the MPM list includes the intra-prediction mode of the first neighboring block if the intra-prediction mode of the first neighboring block is determined to be an angle mode, and includes the intra-prediction mode of the second neighboring block if the intra-prediction mode of the second neighboring block is determined to be an angle mode.

由此可见,在使用非零参考行来控制多行帧内预测时,确定当前块的第一相邻块的帧内预测模式是否为角度模式;确定所述当前块的第二相邻块的帧内预测模式是否为角度模式;以及生成最可能模式MPM列表,所述MPM列表包括用于所述当前块的帧内预测的多个候选模式,其中,所述多个候选模式均为角度模式,并且在确定所述第一相邻块的帧内预测模式为角度模式的情况下,所述MPM列表包括所述第一相邻块的帧内预测模式、并且在确定所述第二相邻块的帧内预测模式为角度模式的情况下,所述MPM列表包括所述第二相邻块的帧内预测模式。从而实现了对于非零行生成包括更多个角度模式的MPM列表。Therefore, when using non-zero reference rows to control multi-row intra-prediction, the process involves determining whether the intra-prediction mode of the first adjacent block of the current block is an angle mode; determining whether the intra-prediction mode of the second adjacent block of the current block is an angle mode; and generating a most probable mode (MPM) list. The MPM list includes multiple candidate modes for intra-prediction of the current block, all of which are angle modes. Furthermore, if the intra-prediction mode of the first adjacent block is determined to be an angle mode, the MPM list includes the intra-prediction mode of the first adjacent block; and if the intra-prediction mode of the second adjacent block is determined to be an angle mode, the MPM list includes the intra-prediction mode of the second adjacent block. This achieves the generation of an MPM list containing more angle modes for non-zero rows.

附图说明Attached Figure Description

根据以下详细描述和附图,所公开的主题的另外的特征、性质和各种优点将变得更明显,在附图中:Further features, properties, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:

图1是根据实施方式的通信系统的简化框图的示意图;Figure 1 is a simplified block diagram of a communication system according to an embodiment;

图2是根据实施方式的流式传输系统的简化框图的示意图;Figure 2 is a simplified block diagram of a streaming system according to an embodiment;

图3是根据实施方式的视频解码器和显示器的简化框图的示意图;Figure 3 is a simplified block diagram of the video decoder and display according to an embodiment;

图4是根据实施方式的视频编码器和视频源的简化框图的示意图;Figure 4 is a simplified block diagram of the video encoder and video source according to the embodiment;

图5是HEVC中的帧内预测模式的图;Figure 5 is a diagram of intra-frame prediction modes in HEVC;

图6是多功能视频编码草案2中的帧内预测模式的图;Figure 6 is a diagram of the intra-prediction mode in Multifunctional Video Coding Draft 2;

图7是示出用于多行帧内预测的参考行的示例的图;Figure 7 is a diagram illustrating an example of a reference row used for multi-line intra-frame prediction;

图8是示出相对于当前块的顶侧块和左侧块的示例的图;Figure 8 is a diagram showing an example of the top and left blocks relative to the current block;

图9是适合于实现实施方式的计算机系统的图。Figure 9 is a diagram of a computer system suitable for implementing the implementation method.

具体实施方式Detailed Implementation

图1示出了根据本公开内容的实施方式的通信系统(100)的简化框图。系统(100)可以包括经由网络(150)互连的至少两个终端(110至120)。对于单向数据传输,第一终端(110)可以在本地位置处对视频数据进行编码,以用于经由网络(150)传输至另一终端(120)。第二终端(120)可以从网络(150)接收另一终端的已编码视频数据,对该已编码数据进行解码并且显示恢复后的视频数据。单向数据传输在媒体服务应用等中可能常见。Figure 1 shows a simplified block diagram of a communication system (100) according to an embodiment of the present disclosure. The system (100) may include at least two terminals (110 to 120) interconnected via a network (150). For unidirectional data transmission, the first terminal (110) may encode video data at a local location for transmission to the other terminal (120) via the network (150). The second terminal (120) may receive the encoded video data from the other terminal from the network (150), decode the encoded data, and display the recovered video data. Unidirectional data transmission may be common in media service applications, etc.

图1示出了第二对终端(130,140),其被提供以支持例如在视频会议期间可能发生的已编码视频的双向传输。对于双向数据传输,每个终端(130,140)可以对在本地位置捕获的视频数据进行编码,以用于经由网络(150)传输至另一终端。每个终端(130,140)还可以接收由另一终端传输的已编码视频数据,可以对该已编码数据进行解码,并且可以在本地显示装置处显示恢复后的视频数据。Figure 1 illustrates a second pair of terminals (130, 140) provided to support bidirectional transmission of encoded video, for example, during video conferencing. For bidirectional data transmission, each terminal (130, 140) can encode video data captured at a local location for transmission to the other terminal via the network (150). Each terminal (130, 140) can also receive encoded video data transmitted by the other terminal, decode the encoded data, and display the recovered video data on a local display device.

在图1中,终端(110至140)可以是例如服务器、个人计算机和智能电话和/或任何其他类型的终端。例如,终端(110至140)可以是膝上型计算机、平板计算机、媒体播放器和/或专用视频会议设备。网络(150)表示在终端(110至140)之间传送已编码视频数据的任何数量的网络,包括例如有线和/或无线通信网络。通信网络(150)可以在电路交换和/或分组交换信道中交换数据。代表性网络包括电信网络、局域网、广域网和/或因特网。出于本论述的目的,除非在下文中有所说明,否则网络(150)的架构和拓扑对于本公开内容的操作而言可以是不重要的。In Figure 1, terminals (110 to 140) can be, for example, servers, personal computers and smartphones and/or any other type of terminal. For example, terminals (110 to 140) can be laptop computers, tablet computers, media players and/or dedicated video conferencing equipment. Network (150) refers to any number of networks that transmit encoded video data between terminals (110 to 140), including, for example, wired and/or wireless communication networks. Communication networks (150) can exchange data in circuit-switched and/or packet-switched channels. Representative networks include telecommunications networks, local area networks (LANs), wide area networks (WANs) and/or the Internet. For the purposes of this discussion, unless otherwise stated below, the architecture and topology of network (150) may be of little importance to the operation of this disclosure.

作为所公开的主题的应用的示例,图2示出了视频编码器和解码器在流式传输环境中的放置方式。所公开的主题可以与其他支持视频的应用一起使用,包括例如视频会议、数字TV、在包括CD、DVD、存储棒等的数字介质上存储压缩视频等。As an example of an application of the disclosed subject matter, Figure 2 illustrates the placement of a video encoder and decoder in a streaming environment. The disclosed subject matter can be used with other video-enabled applications, including, for example, video conferencing, digital TV, and storing compressed video on digital media including CDs, DVDs, memory sticks, etc.

如图2所示,流式传输系统(200)可以包括捕获子系统(213),该捕获子系统包括视频源(201)和编码器(203)。流式传输系统(200)还可以包括至少一个流式传输服务器(205)和/或至少一个流式传输客户端(206)。As shown in Figure 2, the streaming system (200) may include a capture subsystem (213) comprising a video source (201) and an encoder (203). The streaming system (200) may also include at least one streaming server (205) and/or at least one streaming client (206).

视频源(201)可以创建例如未压缩的视频样本流(202)。视频源(201)例如可以是数码相机。与已编码视频比特流相比,样本流(202)被描绘为粗线以强调高数据量,该样本流(202)可以由耦接至相机(201)的编码器(203)处理。编码器(203)可以包括硬件、软件或其组合以实现或实施如下面更详细地描述的所公开的主题的各方面。编码器(203)还可以生成已编码视频比特流(204)。与未压缩的视频样本流(202)相比,已编码视频比特流(204)被描绘为细线以强调较低数据量,其可以存储在流式传输服务器(205)上以供将来使用。一个或更多个流式传输客户端(206)可以访问流式传输服务器(205)以检索可以作为已编码视频比特流(204)的副本的视频比特流(209)。A video source (201) can create, for example, an uncompressed video sample stream (202). The video source (201) can be, for example, a digital camera. The sample stream (202) is depicted as a thick line to emphasize the high data volume compared to the encoded video bitstream, and this sample stream (202) can be processed by an encoder (203) coupled to the camera (201). The encoder (203) can include hardware, software, or a combination thereof to implement or enforce aspects of the disclosed subject matter as described in more detail below. The encoder (203) can also generate an encoded video bitstream (204). The encoded video bitstream (204) is depicted as a thin line to emphasize the lower data volume compared to the uncompressed video sample stream (202), and it can be stored on a streaming server (205) for future use. One or more streaming clients (206) can access the streaming server (205) to retrieve a video bitstream (209) that can be used as a copy of the encoded video bitstream (204).

流式传输客户端(206)可以包括视频解码器(210)和显示器(212)。视频解码器(210)可以例如对作为已编码视频比特流(204)的传入副本的视频比特流(209)进行解码,并且创建可以在显示器(212)或另一呈现装置(未描绘)上呈现的传出视频样本流(211)。在一些流式传输系统中,可以根据某些视频编码/压缩标准来对视频比特流(204、209)进行编码。这些标准的示例包括但不限于ITU-T H.265建议书。开发中的视频编码标准被非正式地称为多功能视频编码(Versatile Video Coding,VVC)的视频编码标准。本公开内容的实施方式可以在VVC的上下文中使用。The streaming client (206) may include a video decoder (210) and a display (212). The video decoder (210) may, for example, decode an incoming video bitstream (209) as an encoded video bitstream (204) and create an outgoing video sample stream (211) that can be displayed on the display (212) or another presentation device (not depicted). In some streaming systems, the video bitstreams (204, 209) may be encoded according to certain video coding/compression standards. Examples of such standards include, but are not limited to, ITU-T Recommendation H.265. Video coding standards under development are informally referred to as Versatile Video Coding (VVC) standards. Implementations of this disclosure can be used in the context of VVC.

图3示出了根据本公开内容的实施方式的附接至显示器(212)的视频解码器(210)的示例功能框图。Figure 3 shows an example functional block diagram of a video decoder (210) attached to a display (212) according to an embodiment of the present disclosure.

视频解码器(210)可以包括信道(312)、接收器(310)、缓冲存储器(315)、熵解码器/解析器(320)、缩放器/逆变换单元(351)、帧内预测单元(352)、运动补偿预测单元(353)、聚合器(355)、环路滤波器单元(356)、参考图片存储器(357)和当前图片存储器(358)。在至少一个实施方式中,视频解码器(210)可以包括集成电路、一系列集成电路和/或其他电子电路。视频解码器(210)还可以部分地或完全地实现在运行于具有关联存储器的一个或更多个CPU上的软件中。The video decoder (210) may include a channel (312), a receiver (310), a buffer memory (315), an entropy decoder/parser (320), a scaler/inverse transform unit (351), an intra-frame prediction unit (352), a motion compensation prediction unit (353), an aggregator (355), a loop filter unit (356), a reference image memory (357), and a current image memory (358). In at least one embodiment, the video decoder (210) may include an integrated circuit, a series of integrated circuits, and/or other electronic circuits. The video decoder (210) may also be implemented, partially or entirely, in software running on one or more CPUs with associated memory.

在该实施方式和其他实施方式中,接收器(310)可以接收要由解码器(210)解码的一个或更多个已编码视频序列——一次接收一个已编码视频,其中每个已编码视频序列的解码独立于其他已编码视频序列的解码。可以从信道(312)接收已编码视频序列,该信道可以是到存储已编码视频数据的存储装置的硬件/软件链路。接收器(310)可以接收已编码视频数据以及其他数据,例如,可以被转发至其各自的使用实体(未描绘)的已编码音频数据和/或辅助数据流。接收器(310)可以将已编码视频序列与其他数据分开。为了应对网络抖动,可以在接收器(310)与熵解码器/解析器(320)(以下称为“解析器”)之间耦接缓冲存储器(315)。当接收器(310)从具有足够带宽和可控性的存储/转发装置或从等时同步网络接收数据时,可以不使用缓冲器(315),或者缓冲器(315)可以较小。为了尽可能地使用诸如因特网的分组网络,可能需要缓冲器(315),该缓冲器(315)可以相对较大并且可以具有自适应性大小。In this and other embodiments, the receiver (310) may receive one or more encoded video sequences to be decoded by the decoder (210)—one encoded video sequence at a time, wherein the decoding of each encoded video sequence is independent of the decoding of other encoded video sequences. The encoded video sequences may be received from a channel (312), which may be a hardware/software link to a storage device storing the encoded video data. The receiver (310) may receive the encoded video data as well as other data, such as encoded audio data and/or auxiliary data streams that may be forwarded to their respective user entities (not depicted). The receiver (310) may separate the encoded video sequences from other data. To cope with network jitter, a buffer memory (315) may be coupled between the receiver (310) and the entropy decoder/parser (320) (hereinafter referred to as the "parser"). When the receiver (310) receives data from a store/forward device with sufficient bandwidth and controllability or from an isochronous synchronization network, the buffer (315) may not be used, or the buffer (315) may be small. In order to make the most of packet networks such as the Internet, a buffer (315) may be required, which can be relatively large and can have an adaptive size.

视频解码器(210)可以包括解析器(320)以根据已熵编码的视频序列重建符号(321)。这些符号的类别包括例如用于管理解码器(210)的操作的信息,以及可能用以控制诸如如图2所示可以耦接至解码器的显示器(212)的呈现装置的信息。用于呈现装置的控制信息可以是补充增强信息(Supplementary Enhancement Information,SEI消息)或视频可用性信息(Video Usability Information,VUI)参数集片段(未描绘)的形式。解析器(320)可以对接收到的已编码视频序列进行解析/熵解码。已编码视频序列的编码可以根据视频编码技术或标准进行,并且可以遵循本领域技术人员公知的原理,包括:可变长度编码、霍夫曼编码(Huffman coding)、具有或不具有上下文灵敏度的算术编码等。解析器(320)可以基于与群组对应的至少一个参数从已编码视频序列提取用于视频解码器中的像素子群组中的至少一个子群组的子群组参数集。子群组可以包括:图片群组(GOP)、图片、图块、切片、宏块、编码单元(Coding Unit,CU)、块、变换单元(Transform Unit,TU)、预测单元(Prediction Unit,PU)等。解析器(320)还可以从已编码视频序列提取信息,例如变换系数、量化器参数值、运动矢量等。The video decoder (210) may include a parser (320) to reconstruct symbols (321) from the entropy-encoded video sequence. These symbols may include, for example, information for managing the operation of the decoder (210), and information for controlling a presentation device such as a display (212) that may be coupled to the decoder, as shown in FIG2. The control information for the presentation device may be in the form of Supplementary Enhancement Information (SEI) messages or fragments of Video Usability Information (VUI) parameter sets (not depicted). The parser (320) may perform parsing/entropy decoding on the received encoded video sequence. The encoding of the encoded video sequence may be based on video coding techniques or standards and may follow principles known to those skilled in the art, including: variable-length coding, Huffman coding, arithmetic coding with or without context sensitivity, etc. The parser (320) may extract a subgroup parameter set from the encoded video sequence for at least one subgroup of pixel subgroups in the video decoder based on at least one parameter corresponding to a group. Subgroups may include: Group of Pictures (GOP), pictures, tiles, slices, macroblocks, coding units (CU), blocks, transform units (TU), prediction units (PU), etc. The parser (320) can also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, etc.

解析器(320)可以对从缓冲器(315)接收的视频序列执行熵解码/解析操作以创建符号(321)。The parser (320) can perform entropy decoding/parsing operations on the video sequence received from the buffer (315) to create symbols (321).

取决于已编码视频图片或已编码视频图片的部分的类型(例如:帧间图片和帧内图片、帧间块和帧内块)以及其他因素,符号(321)的重建可以涉及多个不同的单元。涉及哪些单元以及它们如何被涉及可以由经解析器(320)从已编码视频序列解析的子群组控制信息来控制。为了简洁起见,未描绘解析器(320)与下述多个单元之间的这种子群组控制信息流。Depending on the type of encoded video picture or portion thereof (e.g., inter-frame and intra-frame pictures, inter-frame and intra-frame blocks) and other factors, the reconstruction of the symbol (321) may involve multiple different units. Which units are involved and how they are involved can be controlled by subgroup control information parsed from the encoded video sequence by the parser (320). For brevity, the flow of this subgroup control information between the parser (320) and the aforementioned units is not depicted.

除了已经提及的功能块之外,解码器(210)可以在概念上细分成如下文所描述的数个功能单元。在商业约束下运行的实际实现方式中,这些单元中的许多单元彼此紧密交互并且可以至少部分地彼此集成。然而,出于描述所公开的主题的目的,概念上细分成以下功能单元是适当的。In addition to the functional blocks already mentioned, the decoder (210) can be conceptually subdivided into several functional units as described below. In a practical implementation operating under business constraints, many of these units interact closely with each other and can be at least partially integrated with one another. However, for the purposes of describing the disclosed subject matter, it is appropriate to conceptually subdivide it into the following functional units.

一个单元可以是缩放器/逆变换单元(351)。缩放器/逆变换单元(351)可以从解析器(320)接收作为符号(321)的量化变换系数以及控制信息,包括使用哪种变换方式、块大小、量化因子、量化缩放矩阵等。缩放器/逆变换单元(351)可以输出包括可以输入到聚合器(355)中的样本值的块。A unit can be a scaler/inverse transform unit (351). The scaler/inverse transform unit (351) can receive quantization transform coefficients as symbols (321) from the parser (320) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The scaler/inverse transform unit (351) can output a block containing sample values that can be input into the aggregator (355).

在一些情况下,缩放器/逆变单元(351)的输出样本可以属于帧内编码块;即,不使用来自先前重建的图片的预测性信息但可以使用来自当前图片的先前重建部分的预测性信息的块。这样的预测性信息可以由帧内图片预测单元(352)提供。在一些情况下,帧内图片预测单元(352)使用从来自当前图片存储器(358)的当前(部分重建的)图片取得的周围已重建信息来生成大小和形状与重建中的块相同的块。在一些情况下,聚合器355以每个样本为基础将帧内预测单元352已经生成的预测信息添加到由缩放器/逆变换单元351提供的输出样本信息。In some cases, the output samples of the scaler/inverter unit (351) may belong to intra-coded blocks; that is, blocks that do not use predictive information from previously reconstructed images but can use predictive information from previously reconstructed portions of the current image. Such predictive information can be provided by the intra-picture prediction unit (352). In some cases, the intra-picture prediction unit (352) uses surrounding reconstructed information obtained from the current (partially reconstructed) image from the current image memory (358) to generate blocks of the same size and shape as the blocks in the reconstruction. In some cases, the aggregator 355 adds the predictive information already generated by the intra-picture prediction unit 352 to the output sample information provided by the scaler/inverter unit 351 on a per-sample basis.

在其他情况下,缩放器/逆变换单元(351)的输出样本可以属于已帧间编码并且可能经运动补偿的块。在这样的情况下,运动补偿预测单元(353)可以访问参考图片缓冲器(357)以取得用于预测的样本。在根据属于块的符号321对取得的样本进行运动补偿之后,这些样本可以由聚合器355添加到缩放器/逆变换单元351的输出(在这种情况下被称作残差样本或残差信号),以生成输出样本信息。运动补偿预测单元(353)从中取得预测样本的参考图片缓冲器(357)内的地址可以由运动矢量控制。运动矢量能够以符号(321)的形式供运动补偿预测单元(353)使用,符号(321)可以具有例如x、Y和参考图片分量。运动补偿还可以包括在使用子样本精确运动矢量时从参考图片缓冲器(357)取得的样本值的内插、运动矢量预测机制等。In other cases, the output samples of the scaler/inverse transform unit (351) may belong to inter-frame encoded and possibly motion-compensated blocks. In such cases, the motion compensation prediction unit (353) can access the reference picture buffer (357) to obtain samples for prediction. After motion compensation of the obtained samples according to the symbols 321 belonging to the block, these samples can be added by the aggregator 355 to the output of the scaler/inverse transform unit 351 (referred to in this case as residual samples or residual signals) to generate output sample information. The address in the reference picture buffer (357) from which the motion compensation prediction unit (353) obtains the predicted samples can be controlled by motion vectors. Motion vectors can be used by the motion compensation prediction unit (353) in the form of symbols (321), which may have, for example, x, Y and reference picture components. Motion compensation may also include interpolation of sample values obtained from the reference picture buffer (357) when using subsample precise motion vectors, motion vector prediction mechanisms, etc.

聚合器(355)的输出样本可以在环路滤波器单元(356)中经受各种环路滤波技术。视频压缩技术可以包括环路内滤波器技术,环路内滤波器技术由包括在经编码视频比特流中并且作为来自解析器(320)的符号(321)可用于环路滤波器单元(356)的参数来控制,但是视频压缩技术也可以响应于在对已编码图片或已编码视频序列的先前(按解码顺序)部分进行解码期间获得的元信息,以及响应于先前重建并且经环路滤波的样本值。The output samples of the aggregator (355) can undergo various loop filtering techniques in the loop filter unit (356). The video compression technique may include in-loop filtering techniques, which are controlled by parameters included in the encoded video bitstream and available to the loop filter unit (356) as symbols (321) from the parser (320). However, the video compression technique may also respond to metadata obtained during the decoding of a previous (in decoding order) portion of an encoded picture or encoded video sequence, as well as to previously reconstructed and loop-filtered sample values.

环路滤波器单元(356)的输出可以是样本流,该样本流可以输出至诸如显示器(212)的呈现装置以及存储在参考图片缓冲器(357)中以在将来的帧间图片预测中使用。The output of the loop filter unit (356) can be a sample stream, which can be output to a presentation device such as a display (212) and stored in a reference image buffer (357) for use in future inter-frame image prediction.

某些已编码图片一旦被完全重建就可以用作参考图片以用于将来预测。一旦已编码图片被完全重建并且该已编码图片(通过例如解析器(320))被识别为参考图片,则存储在当前图片存储器(358)中的当前参考图片可以变为参考图片缓冲器(357)的一部分,并且可以在开始重建后续的已编码图片之前重新分配新的当前图片存储器。Once a certain encoded image has been fully reconstructed, it can be used as a reference image for future prediction. Once an encoded image has been fully reconstructed and the encoded image (by, for example, a parser (320)) is identified as a reference image, the current reference image stored in the current image memory (358) can become part of the reference image buffer (357), and a new current image memory can be reallocated before the reconstruction of subsequent encoded images begins.

视频解码器(210)可以根据可以记录在诸如ITU-T H.265建议书的标准中的预定视频压缩技术来执行解码操作。在已编码视频序列遵循视频压缩技术或标准的语法的意义上,已编码视频序列可以符合由正使用的视频压缩技术或标准指定的语法,如在视频压缩技术文档或标准中且具体地在其中的配置文件文档中指定的那样。此外,为了符合一些视频压缩技术或标准,已编码视频序列的复杂度可以在由视频压缩技术或标准的层级所限定的范围内。在一些情况下,层级限制最大图片大小、最大帧速率、最大重建样本速率(以例如每秒兆(mega)个样本为单位进行度量)、最大参考图片大小等。在一些情况下,由层级设置的限制可以通过假设参考解码器(Hypothetical Reference Decoder,HRD)规范以及在已编码视频序列中用信号表示的HRD缓冲器管理的元数据来进一步限定。The video decoder (210) can perform decoding operations according to a predetermined video compression technique that can be recorded in standards such as ITU-T Recommendation H.265. In the sense that the encoded video sequence follows the syntax of a video compression technique or standard, the encoded video sequence can conform to the syntax specified by the video compression technique or standard being used, as specified in the video compression technique document or standard, and specifically in the configuration file document therein. Furthermore, the complexity of the encoded video sequence can be within the range defined by the hierarchy of the video compression technique or standard in order to conform to some video compression techniques or standards. In some cases, the hierarchy limits the maximum image size, maximum frame rate, maximum reconstruction sample rate (measured, for example, megasamples per second), maximum reference image size, etc. In some cases, the limitations set by the hierarchy can be further limited by the hypothetical reference decoder (HRD) specification and the metadata managed by the HRD buffer, represented as a signal in the encoded video sequence.

在实施方式中,接收器(310)可以随着已编码视频一起接收附加(冗余)数据。附加数据可以被包括为已编码视频序列的一部分。附加数据可以由视频解码器(210)使用以对数据进行适当解码和/或更准确地重建原始视频数据。附加数据可以是例如时间、空间或SNR增强层、冗余切片、冗余图片、前向纠错码等形式。In this implementation, the receiver (310) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence. The additional data may be used by the video decoder (210) to properly decode the data and/or more accurately reconstruct the original video data. The additional data may be, for example, temporal, spatial, or SNR enhancement layers, redundant slices, redundant images, forward error correction codes, etc.

图4示出了根据本公开内容的实施方式的与视频源(201)相关联的视频编码器(203)的示例功能框图。Figure 4 shows an example functional block diagram of a video encoder (203) associated with a video source (201) according to an embodiment of the present disclosure.

视频编码器(203)可以包括例如作为源编码器(430)的编码器、编码引擎(432)、(本地)解码器(433)、参考图片存储器(434)、预测器(435)、传输器(440)、熵编码器(445)、控制器(450)和信道(460)。The video encoder (203) may include, for example, an encoder as a source encoder (430), an encoding engine (432), a (local) decoder (433), a reference image memory (434), a predictor (435), a transmitter (440), an entropy encoder (445), a controller (450), and a channel (460).

编码器(203)可以从视频源(201)(其不是编码器的一部分)接收视频样本,该视频源可以捕获要由编码器(203)编码的视频图像。The encoder (203) can receive video samples from a video source (201) (which is not part of the encoder), which can capture video images to be encoded by the encoder (203).

视频源(201)可以以数字视频样本流的形式提供要由编码器(203)编码的源视频序列,该数字视频样本流可以具有任何合适的比特深度(例如:x比特、10比特、12比特、...)、任何颜色空间(例如,BT.601Y CrCB、RGB、...)和任何合适的采样结构(例如,YCrCb 4:2:0、Y CrCb 4:4:4)。在媒体服务系统中,视频源(201)可以是存储先前准备的视频的存储装置。在视频会议系统中,视频源(203)可以是捕获本地图像信息作为视频序列的摄像装置。可以将视频数据提供为在依次观看时被赋予运动的多个单独的图片。图片自身可以被组织为空间像素阵列,其中,取决于所使用的采样结构、颜色空间等,每个像素可以包括一个或更多个样本。本领域技术人员可以容易地理解像素与样本之间的关系。以下描述侧重于样本。The video source (201) can be provided as a digital video sample stream of a sequence of source videos to be encoded by the encoder (203). This digital video sample stream can have any suitable bit depth (e.g., x-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601YCrCb, RGB, ...), and any suitable sampling structure (e.g., YCrCb 4:2:0, YCrCb 4:4:4). In a media service system, the video source (201) can be a storage device storing previously prepared video. In a video conferencing system, the video source (203) can be a camera device capturing local image information as a video sequence. Video data can be provided as multiple individual pictures that are given motion when viewed sequentially. The pictures themselves can be organized as spatial pixel arrays, where each pixel can include one or more samples, depending on the sampling structure, color space, etc., used. Those skilled in the art will readily understand the relationship between pixels and samples. The following description focuses on samples.

根据实施方式,编码器(203)可以实时地或者在由应用要求的任何其他时间约束下将源视频序列的图片编码并压缩成已编码视频序列(443)。施行适当的编码速度可以是控制器(450)的一个功能。控制器(450)还可以控制如下所述的其他功能单元,并且可以功能性地耦接至这些单元。为简洁起见未描绘耦接。由控制器(450)设置的参数可以包括速率控制相关参数(图片跳过、量化器、率失真优化技术的λ值等)、图片大小、图片群组(GOP)布局、最大运动矢量搜索范围等。本领域技术人员可以容易地识别控制器(450)的其他功能,这些功能可以属于针对特定系统设计而优化的视频编码器(203)。According to the implementation, the encoder (203) can encode and compress images of the source video sequence into an encoded video sequence (443) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed can be a function of the controller (450). The controller (450) can also control other functional units as described below and can be functionally coupled to these units. Coupling is not depicted for simplicity. Parameters set by the controller (450) may include rate control related parameters (image skipping, quantizer, λ value of rate-distortion optimization techniques, etc.), image size, group of images (GOP) layout, maximum motion vector search range, etc. Other functions of the controller (450) can be readily identified by those skilled in the art and may belong to the video encoder (203) optimized for a particular system design.

一些视频编码器以本领域技术人员容易识别为“编码环路”的方式进行操作。作为简化的描述,编码环路可以包括源编码器(430)的编码部分(负责基于要编码的输入图片和参考图片创建符号)以及嵌入编码器(203)的(本地)解码器(433),当在某些视频压缩技术中符号与已编码视频比特流之间的压缩是无损的时,该解码器(433)重建符号以创建(远程)解码器也将创建的样本数据。这个重建的样本流可以被输入至参考图片存储器(434)。由于对符号流的解码产生与解码器位置(本地或远程)无关的比特精确结果,因此参考图片存储器内容在本地编码器与远程编码器之间也是比特精确的。换言之,编码器的预测部分“看到”的参考图片样本与解码器在解码期间使用预测时将“看到”的样本值完全相同。这种参考图片同步性基本原理(以及在例如因信道误差而无法维持同步性的情况下产生的漂移)对于本领域技术人员是已知的。Some video encoders operate in a manner readily recognizable to those skilled in the art as an "encoding loop." In a simplified description, an encoding loop may include the encoding portion of a source encoder (430) responsible for creating symbols based on the input picture and reference picture to be encoded, and a (local) decoder (433) embedded in the encoder (203), which, when compression between the symbols and the encoded video bitstream is lossless in some video compression techniques, reconstructs the symbols to create sample data that a (remote) decoder would also create. This reconstructed sample stream can be fed into a reference picture memory (434). Since decoding the symbol stream produces bit-accurate results independent of the decoder's location (local or remote), the contents of the reference picture memory are also bit-accurate between the local and remote encoders. In other words, the reference picture samples "seen" by the encoder's prediction portion are exactly the same sample values that the decoder would "see" during decoding using prediction. This fundamental principle of reference picture synchronization (and the drift that occurs, for example, when synchronization cannot be maintained due to channel errors) is known to those skilled in the art.

“本地”解码器(433)的操作可以与已经在上文结合图3详细描述的“远程”解码器(210)的操作基本相同。然而,由于符号是可用的而且熵编码器(445)和解析器(320)可以无损地将符号编码/解码成已编码视频序列,因此在本地解码器(433)中可以不需完全实现包括信道(312)、接收器(310)、缓冲器(315)和解析器(320)在内的解码器(210)的熵解码部分。The operation of the “local” decoder (433) can be substantially the same as that of the “remote” decoder (210) which has been described in detail above in conjunction with Figure 3. However, since symbols are available and the entropy encoder (445) and parser (320) can losslessly encode/decode the symbols into an encoded video sequence, the entropy decoding part of the decoder (210), including the channel (312), receiver (310), buffer (315) and parser (320), does not need to be fully implemented in the local decoder (433).

此时可以观察到,除了存在于解码器中的解析/熵解码之外的任何解码器技术可能需要以基本相同的功能形式存在于对应的编码器中。出于该原因,所公开的主题侧重于解码器操作。由于编码器技术可以与已全面描述的解码器技术互逆,因此可以简化对编码器技术的描述。在下文中仅在某些地方需要并提供更详细的描述。It can be observed that any decoder technique other than parsing/entropy decoding, which exists in the decoder, may need to exist in the corresponding encoder in essentially the same functional form. For this reason, the subject matter presented focuses on decoder operation. Since encoder techniques can be inverses of the fully described decoder techniques, the description of encoder techniques can be simplified. More detailed descriptions will only be provided in certain places below.

作为源编码器(430)操作的一部分,可以执行运动补偿预测编码,其参考来自视频序列中被指定为“参考帧”的一个或更多个先前编码的帧对输入帧进行预测性编码。以该方式,编码引擎(432)对输入帧的像素块与可以被选择为对输入帧的预测参考的参考帧的像素块之间的差进行编码。As part of the operation of the source encoder (430), motion-compensated predictive coding can be performed, with reference to one or more previously encoded frames in the video sequence designated as "reference frames" to predictively encode the input frame. In this manner, the encoding engine (432) encodes the difference between pixel blocks of the input frame and pixel blocks of the reference frame that can be selected as the predictive reference for the input frame.

本地视频解码器(433)可以基于由源编码器(430)创建的符号对可以指定为参考帧的帧的已编码视频数据进行解码。编码引擎(432)的操作可以有利地是有损处理。当已编码视频数据在视频解码器(图4中未示出)处被解码时,重建的视频序列通常可以是带有一些误差的源视频序列的复制品。本地视频解码器(433)复制可以由视频解码器对参考帧执行的解码处理,并且可以使重建的参考帧存储在参考图片存储器(434)中。以该方式,编码器(203)可以在本地存储重建的参考帧的副本,这些副本与远端视频解码器将获得的重建的参考帧具有共同内容(不存在传输误差)。The local video decoder (433) can decode encoded video data of frames that can be designated as reference frames based on symbols created by the source encoder (430). The operation of the encoding engine (432) can advantageously be lossy. When the encoded video data is decoded at the video decoder (not shown in FIG. 4), the reconstructed video sequence can typically be a copy of the source video sequence with some errors. The local video decoder (433) replicates the decoding processing that can be performed on the reference frames by the video decoder, and can store the reconstructed reference frames in the reference picture memory (434). In this way, the encoder (203) can locally store copies of the reconstructed reference frames that share common content with the reconstructed reference frames that will be obtained by the remote video decoder (without transmission errors).

预测器(435)可以针对编码引擎(432)执行预测搜索。即,对于要编码的新帧,预测器(435)可以在参考图片存储器(434)中搜索可以用作新图片的适当预测参考的样本数据(作为候选参考像素块)或特定元数据,例如参考图片运动矢量、块形状等。预测器(435)可以基于样本块逐像素块进行操作,以找到适当的预测参考。在一些情况下,根据由预测器(435)获得的搜索结果所确定的,输入图片可以具有从存储在参考图片存储器(434)中的多个参考图片提取的预测参考。The predictor (435) can perform a prediction search against the encoding engine (432). That is, for a new frame to be encoded, the predictor (435) can search in the reference image memory (434) for sample data (as candidate reference pixel blocks) or specific metadata, such as reference image motion vectors, block shapes, etc., that can be used as appropriate prediction references for the new image. The predictor (435) can operate on a pixel-by-pixel basis based on the sample blocks to find appropriate prediction references. In some cases, the input image may have prediction references extracted from multiple reference images stored in the reference image memory (434), as determined by the search results obtained by the predictor (435).

控制器(450)可以管理视频编码器(430)的编码操作,包括例如对用于对视频数据进行编码的参数和子群组参数的设置。The controller (450) can manage the encoding operations of the video encoder (430), including, for example, the settings of parameters and subgroup parameters used to encode video data.

可以在熵编码器(445)中对所有上述功能单元的输出进行熵编码。熵编码器通过根据本领域技术人员已知的技术如霍夫曼编码、可变长度编码、算术编码等对由各种功能单元生成的符号进行无损压缩来将这些符号转换成已编码视频序列。The outputs of all the above-mentioned functional units can be entropy encoded in the entropy encoder (445). The entropy encoder converts the symbols generated by the various functional units into an encoded video sequence by performing lossless compression on the symbols according to techniques known to those skilled in the art, such as Huffman coding, variable-length coding, arithmetic coding, etc.

传输器(440)可以缓冲由熵编码器(445)创建的已编码视频序列,从而为经由通信信道(460)进行的传输做准备,该通信信道可以是去往将存储已编码视频数据的存储装置的硬件/软件链路。传输器(440)可以将来自视频编码器(430)的已编码视频数据与要传输的其他数据合并,所述其他数据例如已编码音频数据和/或辅助数据流(未示出源)。The transmitter (440) can buffer the encoded video sequence created by the entropy encoder (445) to prepare for transmission via a communication channel (460), which may be a hardware/software link to a storage device where the encoded video data will be stored. The transmitter (440) can combine the encoded video data from the video encoder (430) with other data to be transmitted, such as encoded audio data and/or auxiliary data streams (sources not shown).

控制器(450)可以管理编码器(203)的操作。在编码期间,控制器(450)可以为每个已编码图片分配特定的已编码图片类型,这可能影响可以应用于相应的图片的编码技术。例如,图片通常可以被分配为帧内图片(I图片)、预测性图片(P图片)或双向预测性图片(B图片)。The controller (450) can manage the operation of the encoder (203). During encoding, the controller (450) can assign a specific type of encoded picture to each encoded picture, which may affect the encoding technique that can be applied to the corresponding picture. For example, pictures can typically be assigned as intra-frame pictures (I-pictures), predictive pictures (P-pictures), or bidirectional predictive pictures (B-pictures).

帧内图片(I图片)可以是无需将序列中的任何其他帧用作预测源就可以被编码和解码的图片。一些视频编解码器允许不同类型的帧内图片,包括例如独立解码器刷新(IDR,Independent Decoder Refresh)图片。本领域技术人员了解I图片的这些变型及其相应的应用和特征。An intra-frame picture (I-picture) can be an image that can be encoded and decoded without using any other frames in the sequence as a prediction source. Some video codecs allow different types of intra-frame pictures, including, for example, Independent Decoder Refresh (IDR) pictures. Those skilled in the art will understand these variations of I-pictures and their corresponding applications and characteristics.

预测性图片(P图片)可以是可以使用帧内预测或帧间预测进行编码和解码的图片,所述帧内预测或帧间预测使用至多一个运动矢量和参考索引来预测每个块的样本值。A predictive image (P-image) can be an image that can be encoded and decoded using intra-frame prediction or inter-frame prediction, which uses at most one motion vector and reference index to predict sample values for each block.

双向预测性图片(B图片)可以是可以使用帧内预测或帧间预测进行编码和解码的图片,所述帧内预测或帧间预测使用至多两个运动矢量和参考索引来预测每个块的样本值。类似地,多预测性图片可以使用多于两个参考图片和相关联的元数据以进行单个块的重建。Bidirectional predictive images (B-images) can be images that can be encoded and decoded using intra-frame prediction or inter-frame prediction, which uses at most two motion vectors and a reference index to predict sample values for each block. Similarly, multi-predictive images can use more than two reference images and associated metadata to reconstruct a single block.

源图片通常可以在空间上细分成多个样本块(例如,分别具有4×4、8×8、4×8或16×16个样本的块),并且被逐块地编码。可以参考其他(已编码)块对这些块进行预测性编码,所述其他块通过对块的相应图片应用的编码分配来确定。例如,可以对I图片的块进行非预测性编码,或者可以参考同一图片的已编码块对I图片的块进行预测性编码(空间预测或帧内预测)。P图片的像素块可以参考一个先前编码的参考图片经由空间预测或经由时间预测进行非预测性编码。B图片的块可以参考一个或两个先前编码的参考图片经由空间预测或经由时间预测进行非预测性编码。Source images are typically spatially subdivided into multiple sample blocks (e.g., blocks with 4×4, 8×8, 4×8, or 16×16 samples respectively) and encoded block by block. These blocks can be predictively encoded with reference to other (already encoded) blocks, determined by coding assignments applied to the corresponding images of the blocks. For example, blocks of an I-image can be unpredictably encoded, or they can be predictively encoded (spatial or intra-frame prediction) with reference to already encoded blocks of the same image. Pixel blocks of a P-image can be unpredictably encoded with reference to a previously encoded reference image via spatial or temporal prediction. Blocks of a B-image can be unpredictably encoded with reference to one or two previously encoded reference images via spatial or temporal prediction.

视频编码器(203)可以根据诸如ITU-T H.265建议书的预定视频编码技术或标准来执行编码操作。在视频编码器(203)的操作中,视频编码器(203)可以执行各种压缩操作,包括利用输入视频序列中的时间和空间冗余的预测性编码操作。因此,已编码视频数据可以符合由所使用的视频编码技术或标准指定的语法。The video encoder (203) can perform encoding operations according to a predetermined video coding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (203) can perform various compression operations, including predictive coding operations that utilize temporal and spatial redundancy in the input video sequence. Therefore, the encoded video data can conform to the syntax specified by the video coding technique or standard used.

在实施方式中,传输器(440)可以随着已编码视频传输附加数据。视频编码器(430)可以包括有这样的数据作为已编码视频序列的一部分。附加数据可以包括时间/空间/SNR增强层、其他形式的冗余数据如冗余图片和切片、补充增强信息(SEI)消息、视觉可用性信息(VUI)参数集片段等。In this implementation, the transmitter (440) may transmit additional data along with the encoded video. The video encoder (430) may include such data as part of the encoded video sequence. The additional data may include temporal/spatial/SNR enhancement layers, other forms of redundant data such as redundant images and slices, supplementary enhancement information (SEI) messages, fragments of visual usability information (VUI) parameter sets, etc.

图6是VVC草案2中的帧内预测模式的图。Figure 6 is a diagram of the intra-prediction mode in VVC draft 2.

在VVC草案2中,存在如图5所示的总共87个帧内预测模式,其中,模式18(601)是水平模式,模式50(602)是竖直模式,并且模式2(603)、模式34(604)和模式66(605)是对角模式。模式-1至-10和模式67至76被称为广角帧内预测(Wide-Angle Intra Prediction,WAIP)模式(606,707)。In VVC draft 2, there are a total of 87 intra-prediction modes as shown in Figure 5. Mode 18 (601) is a horizontal mode, mode 50 (602) is a vertical mode, and modes 2 (603), 34 (604), and 66 (605) are diagonal modes. Modes -1 to -10 and modes 67 to 76 are referred to as Wide-Angle Intra Prediction (WAIP) modes (606, 707).

在VVC草案2中,MPM列表的大小仍为3,并且MPM列表生成处理与HEVC相同。然而,差别在于,由于在VVC草案2中存在67个用信号表示的模式,因此“offset”被改为61并且“mod”被改为64。In VVC Draft 2, the size of the MPM list remains 3, and the MPM list generation process is the same as in HEVC. However, the difference lies in the fact that, since there are 67 modes represented by signals in VVC Draft 2, "offset" is changed to 61 and "mod" is changed to 64.

VVC草案2中的以下条款描述了亮度帧内模式编码处理,在该处理中得出IntraPredModeY[xPb][yPb]:The following clause in VVC Draft 2 describes the luma intra-frame mode coding process, in which IntraPredModeY[xPb][yPb] is derived:

1.将相邻位置(xNbA,yNbA)和(xNbB,yNbB)分别设置为等于(xPb-1,yPb)和(xPb,yPb-1)。1. Set the adjacent positions (xNbA, yNbA) and (xNbB, yNbB) to be equal to (xPb-1, yPb) and (xPb, yPb-1) respectively.

2.对于由A或B替换的X,按下述步骤得出变量candIntraPredModeX:2. For X replaced by A or B, derive the variable candIntraPredModeX using the following steps:

-调用条款6.4.X[Ed.(BB):Neighbouring blocks availability checkingprocess tbd]中规定的块的可用性得出处理,其中位置(xCurr,yCurr)被设置为等于(xPb,yPb)并且相邻位置(xNbY,yNbY)被设置为等于(xNbX,yNbX)作为输入,并且输出被分配给availableX。- The availability checking process for blocks specified in Clause 6.4.X [Ed.(BB): Neighbouring blocks availability checking process tbd] is invoked, where the position (xCurr, yCurr) is set to equal to (xPb, yPb) and the adjacent position (xNbY, yNbY) is set to equal to (xNbX, yNbX) as input, and the output is assigned to availableX.

-按下述步骤得出候选帧内预测模式candIntraPredModeX:- Obtain the candidate intra-prediction mode candIntraPredModeX by following these steps:

-如果以下条件中的一个或更多个为真,则将candIntraPredModeX设置为等于INTRA_DC。- If one or more of the following conditions are true, then set candIntraPredModeX to be equal to INTRA_DC.

-变量availableX等于FALSE。- The variable availableX is equal to FALSE.

-CuPredMode[xNbX][yNbX]不等于MODE_INTRA。-CuPredMode[xNbX][yNbX] is not equal to MODE_INTRA.

-X等于B并且yPb-1小于((yPb>>CtbLog2SizeY)<<CtbLog2SizeY)。-X equals B and yPb-1 is less than ((yPb>>CtbLog2SizeY)<<CtbLog2SizeY).

-否则,将candIntraPredModeX设置为等于IntraPredModeY[xNbX][yNbX]。- Otherwise, set candIntraPredModeX to be equal to IntraPredModeY[xNbX][yNbX].

3.按下述步骤得出candModeList[x],其中x=0...2:3. Obtain candModeList[x] by following these steps, where x = 0...2:

-如果candIntraPredModeB等于candIntraPredModeA,则适用以下处理:- If candIntraPredModeB equals candIntraPredModeA, then the following processing applies:

-如果candIntraPredModeA小于2(即,等于INTRA_PLANAR或INTRA_DC),则按下述步骤得出candModeList[x],其中x=0..2:- If candIntraPredModeA is less than 2 (i.e., equal to INTRA_PLANAR or INTRA_DC), then derive candModeList[x] as follows, where x = 0..2:

candModeList[0]=INTRA_PLANAR   (8-1)candModeList[0]=INTRA_PLANAR (8-1)

candModeList[1]=INTRA_DC  (8-2)candModeList[1]=INTRA_DC (8-2)

candModeList[2]=INTRA_ANGULAR50  (8-3)candModeList[2]=INTRA_ANGULAR50 (8-3)

-否则,按下述步骤得出candModeList[x],其中x=0..2:- Otherwise, obtain candModeList[x] using the following steps, where x = 0..2:

candModeList[0]=candIntraPredModeA  (8-4)candModeList[0]=candIntraPredModeA (8-4)

candModeList[1]=2+((candIntraPredModeA+61)%64)  (8-5)candModeList[1]=2+((candIntraPredModeA+61)%64) (8-5)

candModeList[2]=2+((candIntraPredModeA-1)%64)   (8-6)candModeList[2]=2+((candIntraPredModeA-1)%64) (8-6)

-否则(candIntraPredModeB不等于candIntraPredModeA),则适用以下处理:- Otherwise (candIntraPredModeB is not equal to candIntraPredModeA), the following processing applies:

-按下述步骤得出candModeList[0]和candModeList[1]:- Obtain candModeList[0] and candModeList[1] by following these steps:

candModeList[0]=candIntraPredModeA                              (8-7)candModeList[0]=candIntraPredModeA                    (8-7)

candModeList[1]=candIntraPredModeB                              (8-8)candModeList[1]=candIntraPredModeB                    (8-8)

-如果candModeList[0]和candModeList[1]都不等于INTRA_PLANAR,则将candModeList[2]设置为等于INTRA_PLANAR,- If neither candModeList[0] nor candModeList[1] is equal to INTRA_PLANAR, then set candModeList[2] to be equal to INTRA_PLANAR.

-否则,如果candModeList[0]和candModeList[1]都不等于INTRA_DC,则将candModeList[2]设置为等于INTRA_DC,Otherwise, if neither candModeList[0] nor candModeList[1] is equal to INTRA_DC, then set candModeList[2] to be equal to INTRA_DC.

-否则,将candModeList[2]设置为等于INTRA_ANGULAR50。- Otherwise, set candModeList[2] to be equal to INTRA_ANGULAR50.

4.通过应用以下过程得出IntraPredModeY[xPb][yPb]:4. Obtain IntraPredModeY[xPb][yPb] by applying the following procedure:

-如果intra_luma_mpm_flag[xPb][yPb]等于1,则将IntraPredModeY[xPb][yPb]设置为等于candModeList[intra_luma_mpm_idx[xPb][yPb]]。- If intra_luma_mpm_flag[xPb][yPb] equals 1, then set IntraPredModeY[xPb][yPb] to equal candModeList[intra_luma_mpm_idx[xPb][yPb]].

-否则,通过应用以下有序步骤得出IntraPredModeY[xPb][yPb]:- Otherwise, IntraPredModeY[xPb][yPb] is obtained by applying the following ordered steps:

1.通过以下有序步骤修改数组candModeList[x],其中x=0..2:1. Modify the array candModeList[x] in the following ordered steps, where x = 0..2:

i.在candModeList[0]大于candModeList[1]的情况下,按如下方式将这两个值互换:i. If candModeList[0] is greater than candModeList[1], swap the two values as follows:

(candModeList[0],candModeList[1])=Swap(candModeList[0],candModeList[1])             (8-9)(candModeList[0],candModeList[1])=Swap(candModeList[0],candModeList[1])      (8-9)

ii.在candModeList[0]大于candModeList[2]的情况下,按如下方式将这两个值互换:ii. If candModeList[0] is greater than candModeList[2], swap the two values as follows:

(candModeList[0],candModeList[2])=Swap(candModeList[0],candModeList[2])             (8-10)(candModeList[0],candModeList[2])=Swap(candModeList[0],candModeList[2])     (8-10)

iii.在candModeList[1]大于candModeList[2]的情况下,按如下方式将这两个值互换:iii. If candModeList[1] is greater than candModeList[2], swap the two values as follows:

(candModeList[1],candModeList[2])=Swap(candModeList[1],candModeList[2])             (8-11)(candModeList[1],candModeList[2])=Swap(candModeList[1],candModeList[2])      (8-11)

2.通过以下有序步骤得出IntraPredModeY[xPb][yPb]:2. Obtain IntraPredModeY[xPb][yPb] through the following ordered steps:

i.将IntraPredModeY[xPb][yPb]设置为等于intra_luma_mpm_remainder[xPb][yPb]。i. Set IntraPredModeY[xPb][yPb] to be equal to intra_luma_mpm_remainder[xPb][yPb].

ii.对于i等于0至2,包含0和2,在IntraPredModeY[xPb][yPb]大于或等于candModeList[i]的情况下,使IntraPredModeY[xPb][yPb]的值增加1。ii. For i equal to 0 to 2, inclusive, if IntraPredModeY[xPb][yPb] is greater than or equal to candModeList[i], increment the value of IntraPredModeY[xPb][yPb] by 1.

在以上中,变量IntraPredModeY[x][y],其中x=xPb..xPb+cbWidth-1且y=yPb..yPb+cbHeight-1,被设置为等于IntraPredModeY[xPb][yPb]。In the above, the variable IntraPredModeY[x][y], where x = xPb..xPb+cbWidth-1 and y = yPb..yPb+cbHeight-1, is set to be equal to IntraPredModeY[xPb][yPb].

在VVC草案2的开发中,提出了大小为6的MPM列表。在该MPM列表中包括Planar(平面)模式和DC模式。使用左模式和上模式两个相邻模式来生成其余的4个MPM。In the development of VVC draft 2, a list of MPMs of size 6 was proposed. This list of MPMs includes a Planar mode and a DC mode. The remaining 4 MPMs are generated using two adjacent modes, the left mode and the top mode.

提出了多行帧内预测以使用更多的参考行进行帧内预测,其中,编码器判定并且用信号通知使用哪个参考行来生成帧内预测器。在帧内预测模式之前用信号传送参考行索引,并且在用信号传送了非零参考行索引的情况下,将Planar模式/DC模式排除在帧内预测模式之外。在图7中描绘了4个参考行(710)的示例,其中,每个参考行(710)由6个段(即,段A至段F)连同左上方的参考样本一起构成。此外,段A和段F分别用距段B和段E最近的样本来填充。Multi-line intra-prediction is proposed to utilize more reference lines for intra-prediction. The encoder determines and signals which reference line to use to generate the intra-predictor. The reference line index is signaled before the intra-prediction mode, and the Planar/DC mode is excluded from the intra-prediction mode if a non-zero reference line index is signaled. Figure 7 depicts an example of four reference lines (710), where each reference line (710) consists of six segments (i.e., segments A to F) along with a reference sample at the upper left. Furthermore, segments A and F are filled with samples closest to segments B and E, respectively.

在多行帧内预测中,在用信号传送的参考行索引非零的情况下,Planar模式和DC模式被排除在MPM列表生成和模式编码之外。此外,提出了可以通过2个相邻模式生成上述大小为6的MPM列表。因此,在仅可以访问2个相邻模式的情况下对于非零行如何生成6个角度MPM是开放式问题。In multi-line intra-frame prediction, Planar and DC modes are excluded from MPM list generation and mode encoding when the reference line index transmitted by the signal is non-zero. Furthermore, it has been proposed that an MPM list of size 6 can be generated using only two adjacent modes. Therefore, how to generate 6 angle MPMs for non-zero lines when only two adjacent modes are accessible remains an open problem.

所提出的方法可以单独使用或以任何顺序组合使用。The proposed methods can be used alone or in any combination in any order.

在下面的描述中,最近的参考行的行索引为0(零参考行)。最大的用信号传送的参考行编号被表示为N。In the following description, the row index of the most recent reference row is 0 (zero reference row). The largest reference row number transmitted by signal is denoted as N.

同样如图8所示,以下述方式限定上(顶)侧块(701)和左侧块(702):As shown in Figure 8, the upper (top) side block (701) and the left side block (702) are defined in the following manner:

如图8所示,当前块(703)内的左上位置的像素被表示为(x,y)。所包括的所有样本的y坐标大于或等于y且所包括的所有样本的x坐标小于x的块被称为左侧块。所包括的所有样本的y坐标小于y的块被称为上侧块。在图8中示出了当前块(703)的左侧块(L1、Lx和Ln)和上侧块(A1、A2、Ax、An)的一个示例。As shown in Figure 8, the pixel at the top left position within the current block (703) is represented as (x, y). A block whose y-coordinates of all included samples are greater than or equal to y and whose x-coordinates of all included samples are less than x is called the left block. A block whose y-coordinates of all included samples are less than y is called the top block. Figure 8 shows an example of the left blocks (L1, Lx, and Ln) and top blocks (A1, A2, Ax, and An) of the current block (703).

下文提到的两个相邻模式可以来自当前块(703)的上侧(701)或来自当前块(703)的左侧(702)。以下是两个相邻模式的一些示例:The two adjacent patterns mentioned below can originate from either the top (701) or the left (702) of the current block (703). Here are some examples of two adjacent patterns:

在一个示例中,两个相邻模式都来自左侧(702)。In one example, both adjacent patterns come from the left (702).

在另一示例中,两个相邻模式都来自上侧(701)。In another example, both adjacent patterns originate from the top (701).

在另一示例中,相邻模式中的一个来自左侧(702),而另一个相邻模式来自上侧(701)。In another example, one of the adjacent patterns comes from the left (702), while the other adjacent pattern comes from the top (701).

在另一示例中,在当前块(703)的宽度大于当前块(703)的高度的情况下,两个相邻模式都来自上侧(701),或者在高度大于宽度的情况下,两个相邻模式都来自左侧(702),或者在宽度等于高度的情况下,一个相邻模式来自上侧(701),而另一个相邻模式来自左侧(702)。In another example, if the width of the current block (703) is greater than the height of the current block (703), both adjacent patterns come from the top (701), or if the height is greater than the width, both adjacent patterns come from the left (702), or if the width is equal to the height, one adjacent pattern comes from the top (701) and the other adjacent pattern comes from the left (702).

可以根据块宽度、块高度、块宽度与块高度的比来选择和使用参考样本侧(如以上示例中描述的那样)以得出两个(或更多个)相邻的块。Reference sample sides (as described in the examples above) can be selected and used based on block width, block height, and the ratio of block width to block height to derive two (or more) adjacent blocks.

在一个示例中,如果块宽度/高度大于预限定的阈值,则仅从上侧(701)中选择两个(或更多个)相邻块。阈值的示例值包括但不限于2、4、8、16、32和64。In one example, if the block width/height is greater than a predefined threshold, only two (or more) adjacent blocks are selected from the top (701). Example values for the threshold include, but are not limited to, 2, 4, 8, 16, 32, and 64.

在另一示例中,如果块高度/宽度大于预限定的阈值,则仅从左侧(702)选择两个(或更多个)相邻块。阈值的示例值包括但不限于2、4、8、16、32和64。In another example, if the block height/width is greater than a predefined threshold, only two (or more) adjacent blocks are selected from the left (702). Example values for the threshold include, but are not limited to, 2, 4, 8, 16, 32, and 64.

在下面的描述中,如果相邻块的模式不可用,则会将模式设置为Planar模式或DC模式。In the following description, if the mode of an adjacent block is not available, the mode will be set to Planar mode or DC mode.

在下面的描述中,如果用信号表示的模式编号范围为0至M(0和M包括在内),则M可以是任意正整数,例如34或66。给定模式X的邻近模式被限定为:如果X大于2且小于M-1,则X的邻近模式为X-1和X+1。如果X等于2,则X的邻近模式为3和M(或M-1)。如果X等于M-1,则X的邻近模式为X-1和X+1(或2)。如果X等于M,则X的邻近模式为M-1和2(或3)。In the following description, if the pattern number represented by the signal ranges from 0 to M (0 and M inclusive), then M can be any positive integer, such as 34 or 66. The neighboring patterns of a given pattern X are defined as follows: if X is greater than 2 and less than M-1, then the neighboring patterns of X are X-1 and X+1. If X equals 2, then the neighboring patterns of X are 3 and M (or M-1). If X equals M-1, then the neighboring patterns of X are X-1 and X+1 (or 2). If X equals M, then the neighboring patterns of X are M-1 and 2 (or 3).

在下面的描述中,如果一个模式不是Planar模式或DC模式,或者一个模式是根据给定的预测方向生成预测样本,例如像VVC草案2中限定的帧内预测模式2至66那样,则该模式被称为角度模式。offset和mod这两个变量可以具有以下两组:In the following description, if a mode is not a Planar mode or a DC mode, or if a mode generates prediction samples based on a given prediction direction, such as intra-prediction modes 2 to 66 as defined in VVC Draft 2, then the mode is referred to as an angular mode. The variables offset and mod can have the following two sets:

1)Offset=mod-3,mod=M-2;1) Offset=mod-3, mod=M-2;

2)Offset=mod-3,mod=M-1;2) Offset=mod-3, mod=M-1;

当用信号表示的参考行索引为非零时,以下方法可以经由两个相邻模式生成6个角度MPM。以下方法或示例可以单独使用或以任何顺序组合使用。When the reference row index, represented by a signal, is non-zero, the following method can generate 6-angle MPMs via two adjacent patterns. The following methods or examples can be used individually or in any combination in any order.

在一个实施方式中,如果两个相邻模式中的至少一个是角度模式,则使用以下算法生成6个角度MPM。将两个相邻模式表示为Mode_A和Mode_B。使用变量ang_mode[]来记录相邻模式的角度模式。使用变量ang_count来指示角度模式的数目,并且使用mpm_index来指示MPM列表的索引。最初,ang_count和mpm_index被设置为0。使用IncludedMode[]来指示每个模式是否被包括在MPM列表中,并且数组IncludedMode[]中的所有元素最初均被设置为假。In one implementation, if at least one of two adjacent patterns is an angular pattern, then six angular MPMs are generated using the following algorithm. The two adjacent patterns are denoted as Mode_A and Mode_B. The variable ang_mode[] is used to record the angular patterns of the adjacent patterns. The variable ang_count is used to indicate the number of angular patterns, and the variable mpm_index is used to indicate the index of the MPM list. Initially, ang_count and mpm_index are set to 0. IncludedMode[] is used to indicate whether each pattern is included in the MPM list, and all elements in the includedMode[] array are initially set to false.

●如果Mode_A为角度模式,则MPM[mpm_index]=Mode_A,ang_count+=1,mpm_index+=1;●If Mode_A is angle mode, then MPM[mpm_index] = Mode_A, ang_count += 1, mpm_index += 1;

●如果Mode_B为角度模式,则MPM[mpm_index]=Mode_B,ang_count+=1,mpm_index+=1;●If Mode_B is the angle mode, then MPM[mpm_index] = Mode_B, ang_count += 1, mpm_index += 1;

●对于(diff=0;diff<=2&&mpm_index<6;diff++){●For (diff=0;diff<=2&&mpm_index<6;diff++){

●对于(idx=0;idx<ang_count;idx++){●For (idx = 0; idx < ang_count; idx++){

○MPM[mpm_index]=((ang_mode[idx]+offset-diff)%mod)+2;○MPM[mpm_index]=((ang_mode[idx]+offset-diff)%mod)+2;

○如果(includedMode[MPM[mpm_index]]==false)){○If (includedMode[MPM[mpm_index]] == false)){

■includedMode[MPM[mpm_index++]]=true}■includedMode[MPM[mpm_index++]]=true}

○如果mpm_index==6,则跳出循环;○ If mpm_index == 6, then exit the loop;

○MPM[mpm_index]=((ang_mode[idx]-1+diff)%mod)+2;○MPM[mpm_index]=((ang_mode[idx]-1+diff)%mod)+2;

○如果(includedMode[MPM[mpm_index]]==false){○If (includedMode[MPM[mpm_index]] == false){

■includedMode[MPM[mpm_index++]]=true}■includedMode[MPM[mpm_index++]]=true}

在一个实施方式中,如果相邻模式中仅一个相邻模式为角度模式——被表示为ang_neighbor,则ang_neighbor及其2个邻近模式(被表示为mode_L和mode_R)被添加到MPM列表中,并且然后mode_L的一个邻近模式和mode_R的一个邻近模式被添加到MPM列表中。最后,添加竖直/水平模式以生成6个角度MPM。这6个角度模式可以以任何顺序添加到MPM列表中。In one implementation, if only one of the adjacent patterns is an angular pattern—denoted as ang_neighbor—then ang_neighbor and its two neighboring patterns (denoted as mode_L and mode_R) are added to the MPM list, and then one neighboring pattern of mode_L and one neighboring pattern of mode_R are added to the MPM list. Finally, vertical/horizontal patterns are added to generate six angular MPMs. These six angular patterns can be added to the MPM list in any order.

●在一个示例中,按下述方式生成6个角度MPM。● In one example, six angle MPMs are generated as follows.

●MPM[0]=ang_mode●MPM[0]=ang_mode

●MPM[1]=((ang_mode+offset)%mod)+2;●MPM[1]=((ang_mode+offset)%mod)+2;

●MPM[2]=((ang_mode-1)%mod)+2;●MPM[2]=((ang_mode-1)%mod)+2;

●MPM[3]=((ang_mode-1+offset)%mod)+2;●MPM[3]=((ang_mode-1+offset)%mod)+2;

●MPM[4]=((ang_mode)%mod)+2;●MPM[4]=((ang_mode)%mod)+2;

●MPM[5]=竖直或水平模式。在一个示例中,如果MPM[0]●MPM[5] = Vertical or Horizontal mode. In one example, if MPM[0]

至MPM[4]中不包括竖直模式,则MPM[5]被设置为竖直模式。If vertical mode is not included in MPM[4], then MPM[5] is set to vertical mode.

否则,MPM[5]被设置为水平模式。Otherwise, MPM[5] is set to horizontal mode.

在另一实施方式中,如果相邻模式中仅一个相邻模式为角度模式——被表示为ang_neighbor,则ang_neighbor及其2个邻近模式(被表示为mode_L和mode_R)被添加到MPM列表中,并且然后mode_L的一个邻近模式(被表示为mode_L_L)和mode_R的一个邻近模式(被表示为mode_R_R)被添加到MPM列表中。最后,将mode_L_L或mode_R_R的一个邻近模式添加到MPM列表中。这6个角度模式可以以任何顺序添加到MPM列表中。In another implementation, if only one of the adjacent patterns is an angular pattern—denoted as ang_neighbor—then ang_neighbor and its two neighboring patterns (denoted as mode_L and mode_R) are added to the MPM list. Then, one neighboring pattern of mode_L (denoted as mode_L_L) and one neighboring pattern of mode_R (denoted as mode_R_R) are added to the MPM list. Finally, one neighboring pattern of either mode_L_L or mode_R_R is added to the MPM list. These six angular patterns can be added to the MPM list in any order.

●在一个示例中,按下述方式生成6个角度MPM。● In one example, six angle MPMs are generated as follows.

●MPM[0]=ang_mode●MPM[0]=ang_mode

●MPM[1]=((ang_mode+offset)%mod)+2;●MPM[1]=((ang_mode+offset)%mod)+2;

●MPM[2]=((ang_mode-1)%mod)+2;●MPM[2]=((ang_mode-1)%mod)+2;

●MPM[3]=((ang_mode-1+offset)%mod)+2;●MPM[3]=((ang_mode-1+offset)%mod)+2;

●MPM[4]=((ang_mode)%mod)+2;●MPM[4]=((ang_mode)%mod)+2;

●MPM[5]=((ang_mode+1)%mod)+2;●MPM[5]=((ang_mode+1)%mod)+2;

●在另一示例中,按下述方式生成6个角度MPM。● In another example, six angle MPMs are generated as follows.

●MPM[0]=ang_mode●MPM[0]=ang_mode

●MPM[1]=((ang_mode+offset)%mod)+2;●MPM[1]=((ang_mode+offset)%mod)+2;

●MPM[2]=((ang_mode-1)%mod)+2;●MPM[2]=((ang_mode-1)%mod)+2;

●MPM[3]=((ang_mode-1+offset)%mod)+2;●MPM[3]=((ang_mode-1+offset)%mod)+2;

●MPM[4]=((ang_mode)%mod)+2;●MPM[4]=((ang_mode)%mod)+2;

●MPM[5]=((ang_mode-2+offset)%mod)+2;●MPM[5]=((ang_mode-2+offset)%mod)+2;

在另一实施方式中,如果相邻模式中仅一个相邻模式为角度模式——被表示为ang_neighbor,则按下述方式得到6个角度MPM,其中这6个角度模式可以以任何顺序添加到MPM列表中。下面示出了一个示例。In another implementation, if only one of the adjacent patterns is an angular pattern—represented as ang_neighbor—then six angular MPMs are obtained as follows, wherein these six angular patterns can be added to the MPM list in any order. An example is shown below.

●MPM[0]=ang_mode●MPM[0]=ang_mode

●MPM[1]=((ang_mode+offset)%mod)+2;●MPM[1]=((ang_mode+offset)%mod)+2;

●MPM[2]=((ang_mode-1)%mod)+2;●MPM[2]=((ang_mode-1)%mod)+2;

●MPM[3]=((ang_mode-2+offset)%mod)+2;●MPM[3]=((ang_mode-2+offset)%mod)+2;

●MPM[4]=((ang_mode+1)%mod)+2;●MPM[4]=((ang_mode+1)%mod)+2;

●MPM[5]=竖直或水平模式。在一个示例中,如果MPM[0]至MPM[4]中不包括竖直模式,则MPM[5]被设置为竖直模式。否则,MPM[5]被设置为水平模式。● MPM[5] = Vertical or Horizontal mode. In one example, if vertical mode is not included among MPM[0] to MPM[4], then MPM[5] is set to vertical mode. Otherwise, MPM[5] is set to horizontal mode.

在另一实施方式中,如果相邻模式中的两个相邻模式为角度模式并且它们是邻近的模式,则可以按下述方式生成MPM列表。两个相邻模式被表示为Mode_A和Mode_B,并且它们被添加到MPM列表中。使用变量ang_max和ang_min来记录Mode_A与Mode_B之间的最大模式和最小模式。In another implementation, if two adjacent modes in the adjacent patterns are angular modes and they are neighboring modes, the MPM list can be generated as follows: Two adjacent modes are represented as Mode_A and Mode_B, and they are added to the MPM list. The variables ang_max and ang_min are used to record the maximum and minimum modes between Mode_A and Mode_B.

●如果Mode_A大于Mode_B,则ang_max被设置为Mode_A并且ang_min被设置为Mode_B● If Mode_A is greater than Mode_B, then ang_max is set to Mode_A and ang_min is set to Mode_B.

●如果ang_min等于2并且ang_max等于M-1或M,则将ang_min和ang_max的值互换。● If ang_min equals 2 and ang_max equals M-1 or M, then swap the values of ang_min and ang_max.

●按如下方式得出其余4个角度MPM。可以以任何顺序添加这4个模式,下面是一个示例。●Derive the remaining four angle MPMs as follows. These four patterns can be added in any order; an example is provided below.

●MPM[2]=((ang_min+offset)%mod)+2;●MPM[2]=((ang_min+offset)%mod)+2;

●MPM[3]=((ang_max-1)%mod)+2;●MPM[3]=((ang_max-1)%mod)+2;

●MPM[4]=((ang_min-1+offset)%mod)+2;●MPM[4]=((ang_min-1+offset)%mod)+2;

●MPM[5]=((ang_max)%mod)+2;●MPM[5]=((ang_max)%mod)+2;

在另一实施方式中,两个相邻模式由Mode_A和Mode_B表示,并且如果这两个相邻模式都是角度模式并且abs(Mode_A-Mode_B)>2&&abs(Mode_A-Mode_B)<=Thres,则使用以下算法来生成6个角度MPM。Thres为正整数,并且Thres大于2,例如Thres=61或62或63。In another implementation, two adjacent modes are represented by Mode_A and Mode_B, and if both adjacent modes are angular modes and abs(Mode_A-Mode_B)>2&&abs(Mode_A-Mode_B)<=Thres, then the following algorithm is used to generate 6 angular MPMs. Thres is a positive integer, and Thres is greater than 2, for example, Thres=61 or 62 or 63.

●首先,将Mode_A和Mode_B添加到MPM列表中● First, add Mode_A and Mode_B to the MPM list.

●然后,将Mode_A的2个邻近模式和Mode_B的2个邻近模式也添加到MPM列表中●Then, add the two neighboring modes of Mode_A and the two neighboring modes of Mode_B to the MPM list.

●并且这6个角度MPM可以以任何顺序添加到MPM列表中●And these 6 angle MPMs can be added to the MPM list in any order.

●以下示出了6个MPM的生成的示例●The following shows examples of generating 6 MPMs.

○MPM[0]=Mode_A○MPM[0]=Mode_A

○MPM[1]=Mode_B○MPM[1]=Mode_B

○MPM[2]=((Mode_A+offset)%mod)+2;○MPM[2]=((Mode_A+offset)%mod)+2;

○MPM[3]=((Mode_A-1)%mod)+2;○MPM[3]=((Mode_A-1)%mod)+2;

○MPM[4]=((Mode_B+offset)%mod)+2;○MPM[4]=((Mode_B+offset)%mod)+2;

○MPM[5]=((Mode_B-1)%mod)+2;○MPM[5]=((Mode_B-1)%mod)+2;

在另一实施方式中,两个相邻模式由Mode_A和Mode_B表示,并且如果这两个相邻模式都是角度模式,并且abs(Mode_A-Mode_B)==2||abs(Mode_A-Mode_B)>Thres,其中Thres是正整数并且Thres大于2,例如Thres=61或62或63,则通过以下算法得出6个角度MPM。In another implementation, two adjacent modes are represented by Mode_A and Mode_B, and if both adjacent modes are angle modes, and abs(Mode_A-Mode_B)==2||abs(Mode_A-Mode_B)>Thres, where Thres is a positive integer and Thres is greater than 2, for example Thres=61 or 62 or 63, then 6 angle MPMs are obtained by the following algorithm.

●使用变量ang_max和ang_min来记录Mode_A与Mode_B之间的最大模式和最小模式。● Use the variables ang_max and ang_min to record the maximum and minimum modes between Mode_A and Mode_B.

●如果Mode_A大于Mode_B,则ang_max被设置为Mode_A并且ang_min被设置为Mode_B● If Mode_A is greater than Mode_B, then ang_max is set to Mode_A and ang_min is set to Mode_B.

●然后,将Mode_A和Mode_B的3个邻近模式添加到MPM列表中●Then, add the three neighboring modes of Mode_A and Mode_B to the MPM list.

●最后,将竖直或水平模式添加到MPM列表中,并且这6个MPM可以以任何顺序添加到MPM列表中。● Finally, add the vertical or horizontal pattern to the MPM list, and these 6 MPMs can be added to the MPM list in any order.

●如下示出了一个示例●An example is shown below.

●MPM[0]=ang_min●MPM[0]=ang_min

●MPM[1]=ang_max●MPM[1]=ang_max

●MPM[2]=((ang_min-1)%mod)+2;●MPM[2]=((ang_min-1)%mod)+2;

●MPM[3]=((ang_min+offset)%mod)+2;●MPM[3]=((ang_min+offset)%mod)+2;

MPM[4]=((ang_max-1)%mod)+2;MPM[4]=((ang_max-1)%mod)+2;

●MPM[5]=竖直或水平模式。在一个示例中,如果MPM[0]●MPM[5] = Vertical or Horizontal mode. In one example, if MPM[0]

至MPM[4]中不包括竖直模式,则MPM[5]被设置为竖直模式。If vertical mode is not included in MPM[4], then MPM[5] is set to vertical mode.

否则,MPM[5]被设置为水平模式。Otherwise, MPM[5] is set to horizontal mode.

在另一实施方式中,如果两个相邻模式均为Planar模式或DC模式,则使用6个默认模式来填充MPM列表。这6个默认模式可以以任何顺序添加到MPM列表中。In another implementation, if two adjacent modes are both Planar or DC modes, then six default modes are used to populate the MPM list. These six default modes can be added to the MPM list in any order.

●在一个实施方式中,6个默认模式为{50,18,2,34,66,26}● In one implementation, the six default modes are {50, 18, 2, 34, 66, 26}.

●在另一实施方式中,6个默认模式为{50,18,2,34,26,42}●In another implementation, the six default modes are {50, 18, 2, 34, 26, 42}.

●在另一实施方式中,在当前块的宽度大于高度的情况下,6个默认模式为{50,18,34,66,42,58}●In another implementation, when the width of the current block is greater than its height, the six default patterns are {50, 18, 34, 66, 42, 58}.

●在另一实施方式中,在当前块的高度大于宽度的情况下,6个默认模式为{50,18,34,2,10,26}●In another implementation, when the height of the current block is greater than its width, the six default patterns are {50, 18, 34, 2, 10, 26}.

●在另一实施方式中,在当前块的宽度等于高度的情况下,6个默认模式为{50,18,2,34,26,42}●In another implementation, when the width of the current block equals its height, the six default patterns are {50, 18, 2, 34, 26, 42}.

在另一实施方式中,首先将是角度模式的所有相邻模式添加到MPM列表中。然后,对于这些是角度模式的相邻模式中的每一个,其被表示为ang_mode,如果角度模式((ang_mode-1)%mod)+2和角度模式((ang_mode+offset)%mod)+2未包括在MPM列表中,则将其添加到MPM列表中。In another implementation, all adjacent modes of the angle mode are first added to the MPM list. Then, for each of these adjacent modes, denoted as ang_mode, if angle mode ((ang_mode-1)%mod)+2 and angle mode ((ang_mode+offset)%mod)+2 are not included in the MPM list, they are added to the MPM list.

●在一个实施方式中,如果MPM列表仍未被完全填充,则添加若干默认模式。默认模式列表可以是以上项目编号h中描述的替选中的任何一个。● In one implementation, if the MPM list is still not completely filled, several default modes are added. The list of default modes can be any of the alternative selections described in item number h above.

●在另一实施方式中,如果MPM列表仍未被完全填充,则对于已经在MPM列表中的模式中的每个模式(被表示为mpm_mode),如果角度模式((mpm_mode-1)%mod)+2和角度模式((mpm_mode+offset)%mod)+2未包括在MPM列表中,则将其添加到MPM列表中。● In another implementation, if the MPM list is still not completely filled, for each mode (denoted as mpm_mode) that is already in the MPM list, if the angle mode ((mpm_mode-1)%mod)+2 and the angle mode ((mpm_mode+offset)%mod)+2 are not included in the MPM list, then they are added to the MPM list.

在至少一个实施方式中,上述技术可以由集成电路、一系列集成电路和/或其他电子电路执行。在至少一个实施方式中,技术可以部分地或完全地实现在运行于具有关联存储器的一个或更多个CPU上的软件中。In at least one embodiment, the above-described technology can be implemented by an integrated circuit, a series of integrated circuits, and/or other electronic circuits. In at least one embodiment, the technology can be partially or completely implemented in software running on one or more CPUs with associated memory.

可以使用计算机可读指令将上述技术实现为计算机软件并且将其物理地存储在一个或更多个计算机可读介质中。例如,图9示出了适合于实现本公开内容的某些实施方式的计算机系统(800)。The above-described techniques can be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. For example, Figure 9 illustrates a computer system (800) suitable for implementing certain embodiments of the present disclosure.

计算机软件可以使用任何合适的机器代码或计算机语言来编码,可以对计算机软件应用汇编、编译、链接等机制以创建包括指令的代码,该指令可以由计算机中央处理单元(CPU)、图形处理单元(GPU)等直接执行或通过解译、微代码执行等来执行。Computer software can be encoded using any suitable machine code or computer language. Mechanisms such as assembly, compilation, and linking can be applied to computer software to create code containing instructions, which can be executed directly by the computer's central processing unit (CPU), graphics processing unit (GPU), or through interpretation, microcode execution, etc.

指令可以在各种类型的计算机或其部件上执行,包括例如个人计算机、平板计算机、服务器、智能电话、游戏装置、物联网装置等。The instructions can be executed on various types of computers or their components, including, for example, personal computers, tablet computers, servers, smartphones, gaming devices, Internet of Things devices, etc.

图9中示出的用于计算机系统(800)的部件本质上是示例性的,而且并非意在对实现本公开内容的实施方式的计算机软件的使用范围或功能提出任何限制。部件的配置也不应当被解释为具有与计算机系统(800)的非限制性实施方式中示出的部件中的任何一个部件或部件的组合相关的任何依赖性或要求。The components for the computer system (800) shown in Figure 9 are exemplary in nature and are not intended to impose any limitation on the scope or functionality of computer software implementing embodiments of this disclosure. The configuration of the components should also not be construed as having any dependency or requirement relating to any one or a combination of components shown in a non-limiting embodiment of the computer system (800).

计算机系统(800)可以包括某些人机接口输入装置。这样的人机接口输入装置可以对由一个或更多个人类用户通过例如触觉输入(例如:击键、滑动、数据手套移动)、音频输入(例如:语音、拍手)、视觉输入(例如:姿势)、嗅觉输入(未描绘)实现的输入作出响应。人机接口装置还可以用于捕获不一定与人的有意识输入直接相关的某些介质,例如,音频(例如:语音、音乐、环境声音)、图像(例如:扫描图像、从静态图像摄像装置获得的摄影图像)、视频(例如:二维视频、包括立体视频的三维视频)。The computer system (800) may include certain human-machine interface input devices. Such human-machine interface input devices can respond to input from one or more human users via, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), and olfactory input (not depicted). The human-machine interface devices can also be used to capture certain media that are not necessarily directly related to conscious human input, such as audio (e.g., speech, music, ambient sounds), images (e.g., scanned images, photographic images obtained from still image capturing devices), and video (e.g., two-dimensional video, three-dimensional video including stereoscopic video).

输入人机接口装置可以包括以下中的一种或更多种(仅描绘了每种中的一个):键盘(801)、鼠标(802)、触控板(803)、触摸屏(810)、数据手套、操纵杆(805)、麦克风(806)、扫描仪(807)、摄像装置(808)。The input human-machine interface device may include one or more of the following (only one of each is depicted): keyboard (801), mouse (802), touchpad (803), touch screen (810), data glove, joystick (805), microphone (806), scanner (807), and camera device (808).

计算机系统(800)还可以包括某些人机接口输出装置。这样的人机接口输出装置可以通过例如触觉输出、声音、光和气味/味道来刺激一个或更多个人类用户的感官。这样的人机接口输出装置可以包括触觉输出装置(例如,由触摸屏(810)、数据手套或操纵杆(805)提供的触觉反馈,但也可以存在不用作输入装置的触觉反馈装置)。例如,这样的装置可以是音频输出装置(例如:扬声器(809)、耳机(未描绘))、视觉输出装置(例如:屏幕(810),包括CRT屏幕、LCD屏幕、等离子体屏幕、OLED屏幕,各自具有或不具有触摸屏输入能力,各自具有或不具有触觉反馈能力——其中一些屏幕可能能够通过诸如立体输出等手段输出二维视觉输出或多于三维的输出;虚拟现实眼镜(未描绘)、全息显示器和烟箱(未描绘))以及打印机(未描绘)。The computer system (800) may also include certain human-machine interface output devices. Such human-machine interface output devices may stimulate the senses of one or more human users through, for example, tactile output, sound, light, and smell/taste. Such human-machine interface output devices may include tactile output devices (e.g., tactile feedback provided by a touchscreen (810), data gloves, or joystick (805), but tactile feedback devices that are not used as input devices may also exist). For example, such devices may be audio output devices (e.g., speakers (809), headphones (not depicted)), visual output devices (e.g., screens (810), including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touchscreen input capability, each with or without tactile feedback capability—some of which may be able to output two-dimensional visual output or more than three-dimensional output by means such as stereoscopic output; virtual reality glasses (not depicted), holographic displays, and smoke boxes (not depicted)), and printers (not depicted).

计算机系统(800)还可以包括人类可访问的存储装置及其相关联的介质,例如包括具有CD/DVD等介质(821)的CD/DVD ROM/RW(820)的光学介质、拇指驱动器(822)、可移动硬盘驱动器或固态驱动器(823)、传统磁性介质如磁带和软盘(未描绘)、基于专用ROM/ASIC/PLD的装置如安全加密狗(未描绘)等。The computer system (800) may also include human-accessible storage devices and their associated media, such as optical media including CD/DVD ROM/RW (820) having media such as CD/DVD (821), thumb drives (822), removable hard disk drives or solid-state drives (823), conventional magnetic media such as magnetic tapes and floppy disks (not depicted), devices based on dedicated ROM/ASIC/PLD such as security dongles (not depicted), etc.

本领域技术人员还应当理解,结合当前公开的主题使用的术语“计算机可读介质”不包含传输介质、载波或其他瞬态信号。Those skilled in the art should also understand that the term "computer-readable medium" as used in connection with the presently disclosed subject matter does not include transmission media, carrier waves, or other transient signals.

计算机系统(800)还可以包括到一个或更多个通信网络的接口。网络可以是例如无线的、有线的、光学的。网络还可以是本地的、广域的、城市的、车载的和工业的、实时的、延迟容忍的等。网络的示例包括局域网如以太网、无线LAN、蜂窝网络(包括GSM、3G、4G、5G、LTE等)、电视有线或无线广域数字网络(包括有线电视、卫星电视和地面广播电视)、车载的和工业的(包括CANBus)等。某些网络通常需要附接至某些通用数据端口或外围总线(849)(诸如,例如计算机系统(800)的USB端口)的外部网络接口适配器;其他接口通常通过附接至如下所述的系统总线而集成到计算机系统(800)的核中(例如,集成到PC计算机系统的以太网接口或集成到智能电话计算机系统的蜂窝网络接口)。使用这些网络中的任何网络,计算机系统(800)可以与其他实体通信。这样的通信可以是单向的、仅接收的(例如,广播电视)、单向仅发送的(例如,到某些CANBus装置的CANBus)、或双向的,例如,使用局域数字网络或广域数字网络到其他计算机系统。可以在如上所述的这些网络和网络接口中的每个网络和网络接口上使用某些协议和协议栈。The computer system (800) may also include interfaces to one or more communication networks. These networks may be, for example, wireless, wired, or optical. They may also be local, wide-area, metropolitan, vehicular, and industrial, real-time, latency-tolerant, etc. Examples of networks include local area networks such as Ethernet, wireless LANs, cellular networks (including GSM, 3G, 4G, 5G, LTE, etc.), cable or wireless wide-area digital television networks (including cable television, satellite television, and terrestrial broadcast television), vehicular and industrial networks (including CANbus), etc. Some networks typically require external network interface adapters attached to certain general-purpose data ports or peripheral buses (849) (such as, for example, a USB port of the computer system (800)); other interfaces are typically integrated into the core of the computer system (800) by attaching to system buses as described below (e.g., an Ethernet interface integrated into a PC computer system or a cellular network interface integrated into a smartphone computer system). Using any of these networks, the computer system (800) can communicate with other entities. Such communication can be unidirectional, receive-only (e.g., broadcast television), send-only (e.g., to a CANBus device), or bidirectional, such as using a local area digital network or a wide area digital network to other computer systems. Certain protocols and protocol stacks can be used on each of these networks and network interfaces as described above.

上述人机接口装置、人类可访问的存储装置和网络接口可以附接至计算机系统(800)的核(840)。The aforementioned human-machine interface device, human-accessible storage device, and network interface can be attached to the core (840) of the computer system (800).

核(840)可以包括一个或更多个中央处理单元(CPU)(841)、图形处理单元(GPU)(842)、现场可编程门阵列(FPGA)(843)形式的专用可编程处理单元、用于某些任务的硬件加速器(844)等。这些装置连同只读存储器(ROM)(845)、随机存取存储器(846)、内部大容量存储装置如内部非用户可访问型硬盘驱动器、SSD等)(847)可以通过系统总线(848)连接。在一些计算机系统中,可以以一个或更多个物理插头的形式访问系统总线(848),以使得能够通过附加的CPU、GPU等进行扩展。外围装置可以直接地或通过外围总线(849)附接至核的系统总线(848)。外围总线的架构包括PCI、USB等。The core (840) may include one or more central processing units (CPUs) (841), graphics processing units (GPUs) (842), dedicated programmable processing units in the form of field-programmable gate arrays (FPGAs) (843), hardware accelerators (844) for certain tasks, etc. These devices, along with read-only memory (ROM) (845), random access memory (846), and internal mass storage devices such as internal non-user-accessible hard disk drives, SSDs, etc. (847), can be connected via a system bus (848). In some computer systems, the system bus (848) can be accessed in the form of one or more physical connectors to allow for expansion with additional CPUs, GPUs, etc. Peripheral devices may be attached directly or via a peripheral bus (849) to the core's system bus (848). Peripheral bus architectures include PCI, USB, etc.

CPU(841)、GPU(842)、FPGA(843)和加速器(844)可以执行某些指令,这些指令组合起来可以构成上述计算机代码。该计算机代码可以存储在ROM(845)或RAM(846)中。过渡数据也可以存储在RAM(846)中,而永久数据可以存储在例如内部大容量存储装置(847)中。可以通过使用缓存存储器来实现针对存储器装置中的任何存储器装置的快速存储和检索,该缓存存储器可以与一个或更多个CPU(841)、GPU(842)、大容量存储装置(847)、ROM(845)、RAM(846)等紧密关联。The CPU (841), GPU (842), FPGA (843), and accelerator (844) can execute certain instructions that, when combined, constitute the aforementioned computer code. This computer code can be stored in ROM (845) or RAM (846). Transient data can also be stored in RAM (846), while permanent data can be stored, for example, in an internal mass storage device (847). Fast storage and retrieval of any memory device within the memory device can be achieved by using a cache memory, which can be closely associated with one or more CPUs (841), GPUs (842), mass storage devices (847), ROMs (845), RAMs (846), etc.

计算机可读介质上可以具有用于执行各种计算机实现的操作的计算机代码。介质和计算机代码可以是为本公开内容的目的而专门设计和构造的介质和计算机代码,或者它们可以是对计算机软件领域的技术人员公知且可获得的类型。Computer-readable media may contain computer code for performing operations of various computer implementations. The media and computer code may be specifically designed and constructed for the purposes of this disclosure, or they may be of a type known and available to those skilled in the art of computer software.

作为示例而非限制,具有架构的计算机系统(800)——并且特别是核(840)——可以由于处理器(包括CPU、GPU、FPGA、加速器等)执行体现在一个或更多个有形计算机可读介质中的软件而提供功能。这样的计算机可读介质可以是与如以上介绍的用户可访问型大容量存储装置相关联的介质,以及具有非暂态性质的核(840)的某些存储装置,例如核内大容量存储装置(847)或ROM(845)。实现本公开内容的各种实施方式的软件可以存储在这样的装置中并且由核(840)执行。根据特定需求,计算机可读介质可以包括一个或更多个存储器装置或芯片。软件可以使核(840)——并且特别是其中的处理器(包括CPU、GPU、FPGA等)——执行本文中描述的特定处理或特定处理的特定部分,包括限定存储在RAM(846)中的数据结构以及根据由软件限定的处理修改这些数据结构。另外地或作为替选,计算机系统可以由于硬连线或以其他方式体现在电路(例如:加速器(844))中的逻辑而提供功能,该逻辑可以代替软件或与软件一起操作以执行本文中描述的特定处理或特定处理的特定部分。在适当的情况下,提及软件可以包含逻辑,反之亦然。在适当的情况下,提及计算机可读介质可以包含存储用于执行的软件的电路(例如,集成电路(IC))、体现用于执行的逻辑的电路或上述两者。本公开内容包含硬件和软件的任何合适的组合。By way of example and not limitation, a computer system (800) with an architecture—and in particular a core (840)—can be functionalized by a processor (including a CPU, GPU, FPGA, accelerator, etc.) executing software embodied in one or more tangible computer-readable media. Such computer-readable media can be media associated with user-accessible mass storage devices as described above, as well as certain storage devices of the core (840) having non-transitory characteristics, such as in-core mass storage (847) or ROM (845). Software implementing various embodiments of this disclosure can be stored in such devices and executed by the core (840). Depending on specific needs, the computer-readable medium may include one or more memory devices or chips. The software can cause the core (840)—and in particular the processors therein (including CPUs, GPUs, FPGAs, etc.)—to execute specific processes or specific portions of specific processes described herein, including defining data structures stored in RAM (846) and modifying these data structures according to the processes defined by the software. Alternatively or as an alternative, a computer system may be provided with functionality by hard-wired or otherwise embodied logic in circuitry (e.g., an accelerator (844)), which may replace or operate with software to perform a particular process or a particular portion of a particular process described herein. Where appropriate, references to software may include logic, and vice versa. Where appropriate, references to a computer-readable medium may include circuitry (e.g., an integrated circuit (IC)) storing software for execution, circuitry embodying logic for execution, or both. This disclosure includes any suitable combination of hardware and software.

尽管本公开内容已经描述了若干非限制性实施方式,但是存在落入本公开内容的范围内的改变、置换和各种替换等效物。因此将理解,虽然本文中未明确示出或描述,但是本领域技术人员能够设想体现本公开内容的原理并且因此在其精神和范围内的许多系统和方法。Although several non-limiting embodiments have been described in this disclosure, there are changes, substitutions, and various equivalent alternatives that fall within the scope of this disclosure. Therefore, it will be understood that, although not explicitly shown or described herein, those skilled in the art will be able to conceive of many systems and methods that embody the principles of this disclosure and thus its spirit and scope.

Claims (15)

1.一种视频解码方法,其特征在于,包括:1. A video decoding method, characterized in that it includes: 获取当前块的第一相邻块的帧内预测模式;Obtain the intra-prediction mode of the first neighboring block of the current block; 获取所述当前块的第二相邻块的帧内预测模式;以及Obtain the intra-prediction mode of the second adjacent block of the current block; and 当所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式均为角度模式时,且为邻近角度模式时,根据所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式之间的大小关系,获得最可能模式MPM列表,所述MPM列表包括用于所述当前块的帧内预测的多个候选模式;When the intra-prediction mode of the first adjacent block and the intra-prediction mode of the second adjacent block are both angle modes, and are adjacent angle modes, the most probable mode (MPM) list is obtained according to the size relationship between the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block. The MPM list includes multiple candidate modes for intra-prediction of the current block. 将所述MPM列表的第一候选模式确定为所述第一相邻块的帧内预测模式;以及The first candidate mode of the MPM list is determined as the intra-prediction mode of the first adjacent block; and 将所述MPM列表的第二候选模式确定为所述第二相邻块的帧内预测模式。The second candidate mode of the MPM list is determined as the intra-prediction mode of the second adjacent block. 2.根据权利要求1所述的视频解码方法,其特征在于,进一步包括:2. The video decoding method according to claim 1, characterized in that it further comprises: 根据索引值的大小,确定所述第一相邻块的帧内预测模式和所述第二相邻块的帧内预测模式间角度模式的大小关系,其中,索引值较小的角度模式是第一模式,索引值较大的角度模式是第二模式。Based on the index value, the relationship between the angle modes of the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block is determined, wherein the angle mode with the smaller index value is the first mode and the angle mode with the larger index value is the second mode. 3.根据权利要求2所述的视频解码方法,其特征在于,进一步包括:3. The video decoding method according to claim 2, characterized in that it further comprises: 将所述MPM列表的第三候选模式确定为所述第一模式的第二邻近角度模式,所述第一模式的第二邻近角度模式具有不处于所述第一模式与所述第二模式之间的值;The third candidate mode of the MPM list is determined as the second neighboring angle mode of the first mode, and the second neighboring angle mode of the first mode has a value that is not between the first mode and the second mode; 将所述MPM列表的第四候选模式确定为所述第二模式的第二邻近角度模式,所述第二模式的第二邻近角度模式具有不处于所述第一模式与所述第二模式之间的值;The fourth candidate mode of the MPM list is determined as the second neighboring angle mode of the second mode, and the second neighboring angle mode of the second mode has a value that is not between the first mode and the second mode; 将所述MPM列表的第五候选模式确定为除所述第一模式之外、所述第一模式的第二邻近角度模式的邻近角度模式。The fifth candidate mode in the MPM list is determined to be the neighboring angle mode of the second neighboring angle mode of the first mode, excluding the first mode. 4.根据权利要求1所述的视频解码方法,其特征在于,所述获得最可能模式MPM列表包括:4. The video decoding method according to claim 1, wherein obtaining the most probable mode (MPM) list includes: 在MPM列表中添加Mode_A和Mode_B;和Add Mode_A and Mode_B to the MPM list; and 确定所述MPM列表中剩余的角度模式为:The remaining angle modes in the MPM list are determined as follows: MPM[2]=((ang_min+offset)%mod)+2MPM[2]=((ang_min+offset)%mod)+2 MPM[3]=((ang_max-1)%mod)+2MPM[3]=((ang_max-1)%mod)+2 MPM[4]=((ang_min-1+offset)%mod)+2MPM[4]=((ang_min-1+offset)%mod)+2 其中,Mode_A和Mode_B分别表示第一相邻块的帧内预测模式和第二相邻块的帧内预测模式,变量ang_max和ang_min用于记录Mode_A和Mode_B之间的最大模式和最小模式;Wherein, Mode_A and Mode_B represent the intra-prediction mode of the first adjacent block and the intra-prediction mode of the second adjacent block, respectively, and the variables ang_max and ang_min are used to record the maximum and minimum modes between Mode_A and Mode_B. 如果Mode_A大于Mode_B,则将ang_max设置为Mode_A,将ang_min设置为Mode_B;If Mode_A is greater than Mode_B, then set ang_max to Mode_A and ang_min to Mode_B; 如果ang_min等于2且ang_max等于M-1或M,则将ang_min和ang_max的值切换,用信号表示的模式编号范围为0到M,包括0和M,变量offset=mod-3,变量mod=M-–2,M为34或66。If ang_min equals 2 and ang_max equals M-1 or M, then the values of ang_min and ang_max are switched. The mode number represented by the signal ranges from 0 to M, including 0 and M. The variable offset = mod-3, the variable mod = M-–2, and M is 34 or 66. 5.一种视频编码方法,其特征在于,包括:5. A video encoding method, characterized in that it includes: 设置当前块的第一相邻块的帧内预测模式;Set the intra-prediction mode of the first adjacent block of the current block; 设置所述当前块的第二相邻块的帧内预测模式;以及Set the intra-prediction mode of the second adjacent block of the current block; and 当所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式均为角度模式时,且为邻近角度模式时,根据所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式之间的大小关系,生成最可能模式MPM列表,所述MPM列表包括用于所述当前块的帧内预测的多个候选模式;When the intra-prediction mode of the first adjacent block and the intra-prediction mode of the second adjacent block are both angle modes, and are adjacent angle modes, a most probable mode (MPM) list is generated based on the size relationship between the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block. The MPM list includes multiple candidate modes for intra-prediction of the current block. 将所述MPM列表的第一候选模式设置为所述第一相邻块的帧内预测模式;以及Set the first candidate mode of the MPM list to the intra-prediction mode of the first adjacent block; and 将所述MPM列表的第二候选模式设置为所述第二相邻块的帧内预测模式。Set the second candidate mode of the MPM list as the intra-prediction mode of the second adjacent block. 6.根据权利要求5所述的视频编码方法,其特征在于,进一步包括:6. The video encoding method according to claim 5, characterized in that it further comprises: 根据索引值的大小,确定所述第一相邻块的帧内预测模式和所述第二相邻块的帧内预测模式间角度模式的大小关系,其中,索引值较小的角度模式是第一模式,索引值较大的角度模式是第二模式。Based on the index value, the relationship between the angle modes of the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block is determined, wherein the angle mode with the smaller index value is the first mode and the angle mode with the larger index value is the second mode. 7.根据权利要求6所述的视频编码方法,其特征在于,进一步包括:7. The video encoding method according to claim 6, characterized in that it further comprises: 将所述MPM列表的第三候选模式设置为所述第一模式的第二邻近角度模式,所述第一模式的第二邻近角度模式具有不处于所述第一模式与所述第二模式之间的值;The third candidate mode of the MPM list is set as the second neighboring angle mode of the first mode, and the second neighboring angle mode of the first mode has a value that is not between the first mode and the second mode; 将所述MPM列表的第四候选模式设置为所述第二模式的第二邻近角度模式,所述第二模式的第二邻近角度模式具有不处于所述第一模式与所述第二模式之间的值;The fourth candidate mode of the MPM list is set as the second neighboring angle mode of the second mode, and the second neighboring angle mode of the second mode has a value that is not between the first mode and the second mode; 将所述MPM列表的第五候选模式设置为除所述第一模式之外、所述第一模式的第二邻近角度模式的邻近角度模式。The fifth candidate mode of the MPM list is set to the neighboring angle mode of the second neighboring angle mode of the first mode, excluding the first mode. 8.根据权利要求5所述的视频编码方法,其特征在于,所述生成最可能模式MPM列表包括:8. The video encoding method according to claim 5, wherein generating the most probable mode (MPM) list comprises: 在MPM列表中添加Mode_A和Mode_B;和Add Mode_A and Mode_B to the MPM list; and 确定所述MPM列表中剩余的角度模式为:The remaining angle modes in the MPM list are determined as follows: MPM[2]=((ang_min+offset)%mod)+2MPM[2]=((ang_min+offset)%mod)+2 MPM[3]=((ang_max-1)%mod)+2MPM[3]=((ang_max-1)%mod)+2 MPM[4]=((ang_min-1+offset)%mod)+2MPM[4]=((ang_min-1+offset)%mod)+2 其中,Mode_A和Mode_B分别表示第一相邻块的帧内预测模式和第二相邻块的帧内预测模式,变量ang_max和ang_min用于记录Mode_A和Mode_B之间的最大模式和最小模式;Wherein, Mode_A and Mode_B represent the intra-prediction mode of the first adjacent block and the intra-prediction mode of the second adjacent block, respectively, and the variables ang_max and ang_min are used to record the maximum and minimum modes between Mode_A and Mode_B. 如果Mode_A大于Mode_B,则将ang_max设置为Mode_A,将ang_min设置为Mode_B;If Mode_A is greater than Mode_B, then set ang_max to Mode_A and ang_min to Mode_B; 如果ang_min等于2且ang_max等于M-1或M,则将ang_min和ang_max的值切换,用信号表示的模式编号范围为0到M,包括0和M,变量offset=mod-3,变量mod=M-–2,M为34或66。If ang_min equals 2 and ang_max equals M-1 or M, then the values of ang_min and ang_max are switched. The mode number represented by the signal ranges from 0 to M, including 0 and M. The variable offset = mod-3, the variable mod = M-–2, and M is 34 or 66. 9.一种视频解码装置,其特征在于,所述装置包括获取单元和生成单元:9. A video decoding apparatus, characterized in that the apparatus comprises an acquisition unit and a generation unit: 所述获取单元,用于获取当前块的第一相邻块的帧内预测模式以及所述当前块的第二相邻块的帧内预测模式;以及The acquisition unit is configured to acquire the intra-prediction mode of the first adjacent block of the current block and the intra-prediction mode of the second adjacent block of the current block; and 所述生成单元,用于当所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式均为角度模式时,且为邻近角度模式时,根据所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式之间的大小关系,获得最可能模式MPM列表,所述MPM列表包括用于所述当前块的帧内预测的多个候选模式;The generation unit is configured to obtain a most probable mode (MPM) list based on the size relationship between the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block when both the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block are angle modes and are adjacent angle modes. The MPM list includes multiple candidate modes for intra-prediction of the current block. 将所述MPM列表的第一候选模式确定为所述第一相邻块的帧内预测模式;以及The first candidate mode of the MPM list is determined as the intra-prediction mode of the first adjacent block; and 将所述MPM列表的第二候选模式确定为所述第二相邻块的帧内预测模式。The second candidate mode of the MPM list is determined as the intra-prediction mode of the second adjacent block. 10.一种视频编码装置,其特征在于,所述装置包括获取单元和生成单元:10. A video encoding apparatus, characterized in that the apparatus comprises an acquisition unit and a generation unit: 所述获取单元,用于设置当前块的第一相邻块的帧内预测模式以及所述当前块的第二相邻块的帧内预测模式;以及The acquisition unit is configured to set the intra-prediction mode of the first adjacent block of the current block and the intra-prediction mode of the second adjacent block of the current block; and 所述生成单元,用于当所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式均为角度模式时,且为邻近角度模式时,根据所述第一相邻块的帧内预测模式以及第二相邻块的帧内预测模式之间的大小关系,生成最可能模式MPM列表,所述MPM列表包括用于所述当前块的帧内预测的多个候选模式;The generation unit is configured to generate a most probable mode (MPM) list based on the size relationship between the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block when both the intra-prediction modes of the first adjacent block and the intra-prediction modes of the second adjacent block are angle modes and are adjacent angle modes. The MPM list includes multiple candidate modes for intra-prediction of the current block. 将所述MPM列表的第一候选模式设置为所述第一相邻块的帧内预测模式;以及Set the first candidate mode of the MPM list to the intra-prediction mode of the first adjacent block; and 将所述MPM列表的第二候选模式设置为所述第二相邻块的帧内预测模式。Set the second candidate mode of the MPM list as the intra-prediction mode of the second adjacent block. 11.一种存储指令的非暂态计算机可读存储介质,其特征在于,所述指令使至少一个处理器执行如权利要求1-8任意一项所述的方法。11. A non-transitory computer-readable storage medium for storing instructions, wherein the instructions cause at least one processor to perform the method as described in any one of claims 1-8. 12.一种计算机设备,其特征在于,所述设备包括处理器以及存储器:12. A computer device, characterized in that the device comprises a processor and a memory: 所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;The memory is used to store program code and transmit the program code to the processor; 所述处理器用于根据所述程序代码中的指令执行如权利要求1-8中任意一项所述的方法。The processor is configured to execute the method as described in any one of claims 1-8 according to the instructions in the program code. 13.一种存储比特流的方法,其特征在于,执行权利要求5-8任一项所述的视频编码方法生成比特流,以及存储所述比特流。13. A method for storing a bitstream, characterized in that the video encoding method according to any one of claims 5-8 is performed to generate the bitstream, and the bitstream is stored. 14.一种传输比特流的方法,其特征在于,执行权利要求5-8任一项所述的视频编码方法生成比特流,以及传输所述比特流。14. A method for transmitting a bit stream, characterized in that the video encoding method according to any one of claims 5-8 is performed to generate the bit stream, and the bit stream is transmitted. 15.一种计算机存储介质,其特征在于,存储有指令,所述指令可由至少一个处理器执行以用于执行权利要求5-8任一项所述的方法,产生视频比特流并存储。15. A computer storage medium, characterized in that it stores instructions executable by at least one processor to perform the method of any one of claims 5-8, generating and storing a video bitstream.
HK42023069091.9A 2018-09-14 2023-02-27 Video encoding and decoding method and related apparatus HK40079470B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US62/731,776 2018-09-14
US16/234,993 2018-12-28

Publications (2)

Publication Number Publication Date
HK40079470A HK40079470A (en) 2023-04-21
HK40079470B true HK40079470B (en) 2025-10-03

Family

ID=

Similar Documents

Publication Publication Date Title
CN113228659B (en) Method and device for encoding and decoding in intra mode
JP7701410B2 (en) Video decoding method, apparatus, and computer program
JP2022133427A (en) Method, apparatus, and computer program for multi-line intra-frame prediction
CN113424546B (en) Video decoding or encoding method and device
CN112005549B (en) Intra-frame and inter-frame prediction control method, device, equipment and storage medium
JP2023126928A5 (en)
CN118714353A (en) Method and device for decoding coded video bit stream
CN113574896A (en) Improved most probable mode list generation scheme
JPWO2020055596A5 (en)
CN113785495B (en) Method and apparatus for video encoding and decoding, and storage medium
CN112118453B (en) Video decoding method and device, computer device and storage medium
HK40079470B (en) Video encoding and decoding method and related apparatus
HK40079471B (en) Video encoding and decoding method and related apparatus
HK40079073B (en) Video encoding and decoding method and related apparatus
HK40079471A (en) Video encoding and decoding method and related apparatus
HK40079073A (en) Video encoding and decoding method and related apparatus
HK40079470A (en) Video encoding and decoding method and related apparatus
HK40079085B (en) Intra-frame-to-inter-frame prediction control method, apparatus, device and storage medium
HK40098274A (en) Improved composite inter-intra prediction mode
HK40046974B (en) Method and apparatus for decoding encoded video sequence, and storage medium
HK40052146B (en) Method and device for video decoding or coding
HK40065782B (en) Method and device for video decoding
HK40055153B (en) Video decoding method, device, and medium
HK40065782A (en) Method and device for video decoding
HK40095036A (en) Method for annotating vvc subpictures in dash