[go: up one dir, main page]

CN115002485A - Image encoding method, image decoding method and related device - Google Patents

Image encoding method, image decoding method and related device Download PDF

Info

Publication number
CN115002485A
CN115002485A CN202210664095.1A CN202210664095A CN115002485A CN 115002485 A CN115002485 A CN 115002485A CN 202210664095 A CN202210664095 A CN 202210664095A CN 115002485 A CN115002485 A CN 115002485A
Authority
CN
China
Prior art keywords
block
prediction
pixel
filter
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210664095.1A
Other languages
Chinese (zh)
Other versions
CN115002485B (en
Inventor
杨宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115002485A publication Critical patent/CN115002485A/en
Application granted granted Critical
Publication of CN115002485B publication Critical patent/CN115002485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

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

Abstract

本申请实施例公开了一种图像编码方法、图像解码方法及相关装置,图像解码方法包括:划分图像,确定当前编码块的色度分量帧内预测模式;根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块;对所述当前编码块的色度分量的预测块进行预测修正,得到所述当前编码块的色度分量的修正后的预测块。本申请实施例在色度分量帧内预测模式中,利用相邻编码块与当前编码块的空间关联性修正当前编码块的色度分量的预测样本,提高预测准确度和编码效率。

Figure 202210664095

The embodiments of the present application disclose an image encoding method, an image decoding method, and a related device. The image decoding method includes: dividing an image, determining a chrominance component intra prediction mode of a current encoding block; according to the chroma component intra prediction mode , determining the prediction block of the chrominance component of the current coding block; performing prediction modification on the prediction block of the chrominance component of the current coding block to obtain the modified prediction block of the chrominance component of the current coding block. In the chrominance component intra prediction mode in the embodiments of the present application, the spatial correlation between adjacent coding blocks and the current coding block is used to correct the prediction samples of the chrominance components of the current coding block, so as to improve the prediction accuracy and coding efficiency.

Figure 202210664095

Description

图像编码方法、图像解码方法及相关装置Image coding method, image decoding method and related device

技术领域technical field

本申请涉及电子设备技术领域,具体涉及一种图像编码方法、图像解码方法及相关装置。The present application relates to the technical field of electronic devices, and in particular, to an image encoding method, an image decoding method, and related apparatuses.

背景技术Background technique

数字视频能力可并入到大范围的装置中,包含数字电视、数字直播系统、无线广播系统、个人数字助理(personal digital assistant,PDA)、膝上型或桌上型计算机、平板计算机、电子书阅读器、数码相机、数字记录装置、数字媒体播放器、视频游戏装置、视频游戏控制台、蜂窝式或卫星无线电电话、视频会议装置、视频流装置等等。Digital video capabilities can be incorporated into a wide range of devices, including digital television, digital broadcast systems, wireless broadcasting systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-books Readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, video conferencing devices, video streaming devices, and the like.

数字视频装置实施视频压缩技术,例如由MPEG-2、MPEG-4、ITU-TH.263、ITU-TH.264/MPEG-4第10部分高级视频编解码(advanced video coding,AVC)、ITU-TH.265高效率视频编解码(high efficiency video coding,HEVC)标准定义的标准和所述标准的扩展部分中所描述的那些视频压缩技术,从而更高效地发射及接收数字视频信息。视频装置可通过实施这些视频编解码技术来更高效地发射、接收、编码、解码和/或存储数字视频信息。Digital video devices implement video compression techniques such as those provided by MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 Advanced Video Coding (AVC), ITU- A standard defined by the TH.265 high efficiency video coding (HEVC) standard and those video compression techniques described in extensions to the standard to transmit and receive digital video information more efficiently. Video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing these video codec techniques.

随着互联网视频的激增,尽管数字视频压缩技术不断演进,但仍然对视频压缩比提出更高要求。With the proliferation of Internet video, despite the continuous evolution of digital video compression technology, it still puts forward higher requirements for video compression ratio.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种图像编码方法、图像解码方法及相关装置,以期利用相邻编码块与当前编码块的空间关联性修正当前编码块的色度分量的预测样本,提高预测准确度和编码效率。Embodiments of the present application provide an image encoding method, an image decoding method, and a related device, so as to use the spatial correlation between adjacent encoding blocks and the current encoding block to correct the prediction samples of the chrominance components of the current encoding block, so as to improve the prediction accuracy and performance. coding efficiency.

第一方面,本申请实施例提供一种图像编码方法,包括:划分图像,确定当前编码块的色度分量帧内预测模式;根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块;对所述当前编码块的色度分量的预测块进行预测修正,得到所述当前编码块的色度分量的修正后的预测块。In a first aspect, an embodiment of the present application provides an image encoding method, including: dividing an image, determining a chrominance component intra prediction mode of a current encoding block; determining the current encoding block according to the chroma component intra prediction mode The predicted block of the chrominance component of the current coding block is predicted and modified to obtain the modified predicted block of the chrominance component of the current coding block.

相比于现有技术,本申请方案在色度分量帧内预测模式中,利用相邻编码块与当前编码块的空间关联性修正当前编码块的色度分量的预测样本,提高预测准确度和编码效率。Compared with the prior art, in the chrominance component intra prediction mode, the solution of the present application uses the spatial correlation between adjacent coding blocks and the current coding block to correct the prediction samples of the chrominance components of the current coding block, so as to improve the prediction accuracy and performance. coding efficiency.

第二方面,本申请实施例提供一种图像解码方法,包括:解析码流,确定当前解码块的色度分量帧内预测模式;根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块;对所述当前解码块的色度分量的预测块进行预测修正,得到所述当前解码块的色度分量的修正后的预测块。In a second aspect, an embodiment of the present application provides an image decoding method, including: parsing a code stream to determine a chroma component intra prediction mode of a current decoding block; and determining the current decoding mode according to the chroma component intra prediction mode A prediction block of the chrominance component of the block; performing prediction modification on the prediction block of the chrominance component of the current decoding block to obtain the modified prediction block of the chrominance component of the current decoding block.

相比于现有技术,本申请方案在色度分量帧内预测模式中,利用相邻编码块与当前编码块的空间关联性修正当前编码块的色度分量的预测样本,提高预测准确度和解码效率。Compared with the prior art, in the chrominance component intra prediction mode, the solution of the present application uses the spatial correlation between adjacent coding blocks and the current coding block to correct the prediction samples of the chrominance components of the current coding block, so as to improve the prediction accuracy and performance. decoding efficiency.

第三方面,本申请实施例提供一种图像编码装置,包括:In a third aspect, an embodiment of the present application provides an image encoding apparatus, including:

划分单元,用于划分图像,确定当前编码块的色度分量帧内预测模式;a dividing unit, used for dividing the image, and determining the intra prediction mode of the chrominance component of the current coding block;

确定单元,用于根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块;a determining unit, configured to determine a prediction block of the chrominance component of the current coding block according to the chrominance component intra prediction mode;

修正单元,用于对所述当前编码块的色度分量的预测块进行预测修正,得到所述当前编码块的色度分量的修正后的预测块。A modification unit, configured to perform prediction modification on the prediction block of the chrominance component of the current coding block to obtain the modified prediction block of the chrominance component of the current coding block.

第四方面,本申请实施例提供一种图像解码装置,包括:In a fourth aspect, an embodiment of the present application provides an image decoding apparatus, including:

解析单元,用于解析码流,确定当前解码块的色度分量帧内预测模式;a parsing unit for parsing the code stream and determining the intra prediction mode of the chrominance component of the current decoding block;

确定单元,用于根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块;a determining unit, configured to determine a prediction block of the chrominance component of the current decoding block according to the chrominance component intra prediction mode;

修正单元,用于对所述当前解码块的色度分量的预测块进行预测修正,得到所述当前解码块的色度分量的修正后的预测块。A modification unit, configured to perform prediction modification on the prediction block of the chrominance component of the current decoding block to obtain the modified prediction block of the chrominance component of the current decoding block.

第五方面,本申请实施例提供了一种编码器,包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行上述第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides an encoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the first aspect.

第六方面,本申请实施例提供了一种解码器,包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行上述第二方面所述的方法。In a sixth aspect, an embodiment of the present application provides a decoder, including: a processor and a memory coupled to the processor; the processor is configured to execute the method described in the second aspect above.

第七方面,本申请实施例提供了一种终端,所述终端包括:一个或多个处理器、存储器和通信接口;所述存储器、所述通信接口与所述一个或多个处理器连接;所述终端通过所述通信接口与其他设备通信,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述一个或多个处理器执行所述指令时,所述终端执行如第一方面或第二方面所述的方法。In a seventh aspect, an embodiment of the present application provides a terminal, where the terminal includes: one or more processors, a memory, and a communication interface; the memory and the communication interface are connected to the one or more processors; The terminal communicates with other devices through the communication interface, and the memory is used for storing computer program code, the computer program code including instructions, when the one or more processors execute the instructions, the terminal executes The method of the first aspect or the second aspect.

第八方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。In an eighth aspect, embodiments of the present application provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is made to execute the first aspect or the second the method described in the aspect.

第九方面,本申请实施例提供了一种包含指令的计算机程序产品,当所述指令在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。In a ninth aspect, an embodiment of the present application provides a computer program product containing instructions, when the instructions are run on a computer, the instructions cause the computer to execute the method described in the first aspect or the second aspect.

附图说明Description of drawings

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

图1为本申请实施例中编码树单元的一种示意性框图;1 is a schematic block diagram of a coding tree unit in an embodiment of the application;

图2为本申请实施例中颜色格式的一种示意性框图;2 is a schematic block diagram of a color format in an embodiment of the application;

图3为本申请实施例中CTU和编码单元CU的一种示意性框图;3 is a schematic block diagram of a CTU and a coding unit CU in an embodiment of the present application;

图4为本申请实施例中的编码单元的关联像素一种示意性框图;4 is a schematic block diagram of an associated pixel of a coding unit in an embodiment of the present application;

图5A为本申请实施例中亮度分量帧内预测模式的一种示意性框图;5A is a schematic block diagram of a luminance component intra prediction mode in an embodiment of the present application;

图5B为本申请实施例中色度分量普通帧内预测模式的示意图;5B is a schematic diagram of a common intra prediction mode of chrominance components in an embodiment of the present application;

图6为本申请实施例中用于线性模型的系数的计算的相邻像素的一种示意性框图;6 is a schematic block diagram of adjacent pixels used for calculation of coefficients of a linear model in an embodiment of the present application;

图7为本申请实施例中降采样滤波器的一种示意性框图;7 is a schematic block diagram of a downsampling filter in an embodiment of the present application;

图8为本申请实施例中从亮度分量重构块到色度分量预测块变化的一种示意性框图;8 is a schematic block diagram of a change from a luminance component reconstruction block to a chrominance component prediction block in an embodiment of the present application;

图9为本申请实施例中视频译码系统的一种示意性框图;9 is a schematic block diagram of a video decoding system in an embodiment of the present application;

图10为本申请实施例中视频编码器的一种示意性框图;10 is a schematic block diagram of a video encoder in an embodiment of the present application;

图11为本申请实施例中视频解码器的一种示意性框图;11 is a schematic block diagram of a video decoder in an embodiment of the application;

图12A为本申请实施例中一种图像编码方法的流程示意图;12A is a schematic flowchart of an image encoding method according to an embodiment of the present application;

图12B为本申请实施例中一种水平方向的降采样过程的示意图;12B is a schematic diagram of a downsampling process in a horizontal direction in an embodiment of the present application;

图12C为本申请实施例中一种垂直方向的降采样过程的示意图;12C is a schematic diagram of a downsampling process in a vertical direction in an embodiment of the present application;

图12D为本申请实施例中一种双方向的降采样过程的示意图;12D is a schematic diagram of a bidirectional downsampling process in an embodiment of the present application;

图13为本申请实施例中一种图像解码方法的流程示意图;13 is a schematic flowchart of an image decoding method in an embodiment of the present application;

图14为本申请实施例中图像编码装置的一种功能单元框图;14 is a block diagram of a functional unit of an image encoding apparatus in an embodiment of the application;

图15为本申请实施例中图像编码装置的另一种功能单元框图;15 is a block diagram of another functional unit of the image encoding apparatus in the embodiment of the application;

图16为本申请实施例中图像解码装置的一种功能单元框图;16 is a block diagram of a functional unit of an image decoding apparatus in an embodiment of the application;

图17为本申请实施例中图像解码装置的另一种功能单元框图。FIG. 17 is a block diagram of another functional unit of the image decoding apparatus in the embodiment of the present application.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

可以理解,本发明所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本发明的范围的情况下,可以将第一客户端称为第二客户端,且类似地,可将第二客户端称为第一客户端。第一客户端和第二客户端两者都是客户端,但其不是同一客户端。It will be understood that the terms "first", "second", etc., as used herein, may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, a first client could be referred to as a second client, and similarly, a second client could be referred to as a first client, without departing from the scope of this disclosure. Both the first client and the second client are clients, but they are not the same client.

首先介绍一下本申请实施例中用到的术语和相关技术。First, terms and related technologies used in the embodiments of the present application are introduced.

对于图像的划分,为了更加灵活的表示视频内容,高效率视频编解码(HighEfficiency Video Coding standard,HEVC)技术中定义了编码树单元(coding treeunit,CTU)、编码单元(Coding Unit,CU)、预测单元(Prediction Unit,PU)和变换单元(Transform Unit,TU)。CTU、CU、PU和TU均为图像块。For image division, in order to represent video content more flexibly, the High Efficiency Video Coding standard (HEVC) technology defines a coding tree unit (CTU), a coding unit (CU), prediction Unit (Prediction Unit, PU) and Transform Unit (Transform Unit, TU). CTU, CU, PU and TU are all image blocks.

编码树单元CTU,一幅图像由多个CTU构成,一个CTU通常对应于一个方形图像区域,包含这个图像区域中的亮度像素和色度像素(或者也可以只包含亮度像素,或者也可以只包含色度像素);CTU中还包含语法元素,这些语法元素指示如何将CTU划分成至少一个编码单元(coding unit,CU),以及解码每个编码单元得到重建图像的方法。如图1所示,图像10由多个CTU构成(包括CTU A、CTU B、CTU C等)。与某一CTU对应的编码信息包含与该CTU对应的方形图像区域中的像素的亮度值和/或色度值。此外,与某一CTU对应的编码信息还可以包含语法元素,这些语法元素指示如何将该CTU划分成至少一个CU,以及解码每个CU以得到重建图像的方法。一个CTU对应的图像区域可以包括64×64、128×128或256×256个像素。在一个示例中,64×64个像素的CTU包含由64列、每列64个像素的矩形像素点阵,每个像素包含亮度分量和/或色度分量。CTU也可以对应矩形图像区域或者其它形状的图像区域,一个CTU对应的图像区域也可以是水平方向的像素点的数量与竖直方向的像素点数量不同的图像区域,例如包括64×128个像素。Coding tree unit CTU, an image is composed of multiple CTUs, a CTU usually corresponds to a square image area, including the luminance pixels and chrominance pixels in this image area (or may only contain luminance pixels, or may only contain The CTU also includes syntax elements, which indicate how to divide the CTU into at least one coding unit (coding unit, CU), and a method for decoding each coding unit to obtain a reconstructed image. As shown in FIG. 1, an image 10 is composed of a plurality of CTUs (including CTU A, CTU B, CTU C, etc.). The encoding information corresponding to a certain CTU contains the luminance value and/or the chrominance value of the pixels in the square image area corresponding to the CTU. In addition, the encoding information corresponding to a certain CTU may also contain syntax elements indicating how to divide the CTU into at least one CU, and a method of decoding each CU to obtain a reconstructed image. An image area corresponding to one CTU may include 64×64, 128×128 or 256×256 pixels. In one example, a 64x64 pixel CTU contains a rectangular pixel lattice of 64 columns of 64 pixels, each pixel containing a luma component and/or a chrominance component. A CTU can also correspond to a rectangular image area or an image area of other shapes, and an image area corresponding to a CTU can also be an image area with a different number of pixels in the horizontal direction and the number of pixels in the vertical direction, for example, including 64×128 pixels .

编码单元CU,通常对应于图像中一个A×B的矩形区域,包含A×B亮度像素或/和它对应的色度像素,A为矩形的宽,B为矩形的高,A和B可以相同也可以不同,A和B的取值通常为2的整数次幂,例如128、64、32、16、8、4。其中,本申请实施例中涉及到的宽是指图1示出的二维直角坐标系XoY中沿X轴方向(水平方向)的长度,高是指图1示出的二维直角坐标系XoY中沿Y轴方向(竖直方向)的长度。一个CU的重建图像可以通过预测图像与残差图像相加得到,预测图像通过帧内预测或帧间预测生成,具体可以由一个或多个预测块(predictionblock,PB)构成,残差图像通过对变换系数进行反量化和反变换处理生成,具体可以由一个或多个变换块(transform block,TB)构成。具体的,一个CU包含编码信息,编码信息包括预测模式、变换系数等信息,按照这些编码信息对CU进行相应的预测、反量化、反变换等解码处理,产生这个CU对应的重建图像。Coding unit CU, usually corresponds to an A×B rectangular area in the image, including A×B luminance pixels or/and its corresponding chrominance pixels, A is the width of the rectangle, B is the height of the rectangle, A and B can be the same It can also be different. The values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, and 4. The width involved in the embodiments of the present application refers to the length along the X-axis direction (horizontal direction) in the two-dimensional rectangular coordinate system XoY shown in FIG. 1 , and the height refers to the two-dimensional rectangular coordinate system XoY shown in FIG. 1 . The length along the Y-axis direction (vertical direction) in the middle. The reconstructed image of a CU can be obtained by adding the predicted image and the residual image. The predicted image is generated by intra-frame prediction or inter-frame prediction. Specifically, it can be composed of one or more prediction blocks (PB). The transform coefficients are generated by performing inverse quantization and inverse transform processing, and may specifically be composed of one or more transform blocks (transform blocks, TB). Specifically, a CU includes encoding information, and the encoding information includes information such as prediction mode and transform coefficients. According to the encoding information, the CU is subjected to corresponding decoding processing such as prediction, inverse quantization, and inverse transformation, and a reconstructed image corresponding to the CU is generated.

预测单元PU,是帧内预测、帧间预测的基本单元。定义图像块的运动信息包含帧间预测方向、参考帧、运动矢量等,正在进行编码处理的图像块称为当前编码块(currentcoding block,CCB),正在进行解码处理的图像块称为当前解码块(current decodingblock,CDB),例如正在对一个图像块进行预测处理时,当前编码块或者当前解码块为预测块;正在对一个图像块进行残差处理时,当前编码块或者当前解码块为变换块。当前编码块或当前解码块所在的图像称为当前帧。当前帧中,位于当前块的左侧或上侧的图像块可能处于当前帧内部并且已经完成了编码/解码处理,得到了重建图像,它们称为重建块;重建块的编码模式、重建像素等信息是可以获得的(available)。在当前帧进行编码/解码之前已经完成编码/解码处理的帧称为重建帧。当前帧为单向预测帧(P帧)或双向预测帧(B帧)时,它分别具有一个或两个参考帧列表,两个列表分别称为L0和L1,每个列表中包含至少一个重建帧,称为当前帧的参考帧。参考帧为当前帧的帧间预测提供参考像素。The prediction unit PU is the basic unit of intra prediction and inter prediction. The motion information that defines the image block includes inter prediction direction, reference frame, motion vector, etc. The image block that is being encoded is called the current coding block (CCB), and the image block that is being decoded is called the current decoding block. (current decoding block, CDB), for example, when prediction processing is being performed on an image block, the current coding block or current decoding block is the prediction block; when residual processing is being performed on an image block, the current coding block or current decoding block is the transform block . The picture in which the current coding block or the current decoding block is located is called the current frame. In the current frame, the image blocks located on the left or upper side of the current block may be inside the current frame and have completed the encoding/decoding process to obtain the reconstructed image, which are called reconstructed blocks; the encoding mode of the reconstructed block, reconstructed pixels, etc. Information is available. A frame that has completed encoding/decoding before the current frame is encoded/decoded is called a reconstructed frame. When the current frame is a unidirectional prediction frame (P frame) or a bidirectional prediction frame (B frame), it has one or two reference frame lists respectively, and the two lists are called L0 and L1 respectively, and each list contains at least one reconstructed frame. frame, referred to as the reference frame for the current frame. The reference frame provides reference pixels for inter prediction of the current frame.

变换单元TU,对原始图像块和预测图像块的残差进行处理。The transform unit TU processes the residuals of the original image block and the predicted image block.

像素(又称为像素点),是指图像中的像素点,如编码单元中的像素点、亮度分量像素块中的像素点(又称为亮度像素)、色度分量像素块中的像素点(又称为色度像素)等。Pixels (also known as pixels) refer to pixels in an image, such as pixels in coding units, pixels in luminance component pixel blocks (also known as luminance pixels), and pixels in chrominance component pixel blocks. (also known as chroma pixels), etc.

样本(又称为像素值),是指像素点的像素值,该像素值在亮度分量域具体是指亮度(即灰阶值),该像素值在在色度分量域具体是指色度值(即色彩和饱和度),按照处理阶段的不同,一个像素的样本具体包括原始样本、预测样本和重构样本。The sample (also known as pixel value) refers to the pixel value of the pixel point. The pixel value in the luminance component domain specifically refers to the luminance (ie, the grayscale value), and the pixel value in the chrominance component domain specifically refers to the chrominance value. (ie color and saturation), according to different processing stages, the samples of a pixel include original samples, predicted samples and reconstructed samples.

帧内预测,根据当前块的空间相邻像素,产生当前块的预测图像。一种帧内预测模式对应于一种生成预测图像的方法。帧内预测单元的划分包括2N×2N划分方式和N×N划分方式,2N×2N划分方式为对图像块不进行划分;N×N划分方式为将图像块划分为四个等大的子图像块。In intra-frame prediction, a predicted image of the current block is generated according to the spatially adjacent pixels of the current block. An intra prediction mode corresponds to a method of generating a predicted image. The division of the intra prediction unit includes 2N×2N division and N×N division. The 2N×2N division method is to not divide the image block; the N×N division method is to divide the image block into four sub-images of equal size. piece.

通常,数字视频压缩技术作用于颜色编码方法为YCbCr,也可称为YUV,颜色格式为4:2:0、4:2:2或4:4:4的视频序列。其中,Y表示明亮度(Luminance或Luma),也就是灰阶值,Cb表示蓝色色度分量,Cr表示红色色度分量,U和V表示色度(Chrominance或Chroma),用于描述色彩及饱和度。在颜色格式上,4:2:0表示每4个像素有4个亮度分量,2个色度分量(YYYYCbCr),4:2:2表示每4个像素有4个亮度分量,4个色度分量(YYYYCbCrCbCr),而4:4:4表示全像素显示(YYYYCbCrCbCrCbCrCbCr),图2展示了不同颜色格式下的各分量分布图,其中圆形为Y分量,三角形为UV分量。Generally, the digital video compression technology works on video sequences whose color coding method is YCbCr, which may also be called YUV, and whose color format is 4:2:0, 4:2:2 or 4:4:4. Among them, Y represents the brightness (Luminance or Luma), that is, the grayscale value, Cb represents the blue chrominance component, Cr represents the red chrominance component, and U and V represent the chrominance (Chrominance or Chroma), which is used to describe color and saturation. Spend. In the color format, 4:2:0 means that every 4 pixels has 4 luminance components and 2 chrominance components (YYYYCbCr), and 4:2:2 means that every 4 pixels has 4 luminance components and 4 chrominance components. component (YYYYCbCrCbCr), and 4:4:4 represents full pixel display (YYYYCbCrCbCrCbCrCbCr), Figure 2 shows the distribution of each component in different color formats, where the circle is the Y component and the triangle is the UV component.

在数字视频编码过程中,编码器对不同颜色格式的原始视频序列读取像素并编码。一般数字编码器中通常包含,预测、变换与量化、反变换与反量化、环路滤波以及熵编码等,用于消除空间、时间、视觉以及字符冗余等。然而人眼对亮度分量的变化更为敏感,而对色度分量变化并没有强烈的反应,因此在原始视频序列中一般采用YUV 4:2:0的颜色格式进行编码。同时,数字视频编码器在帧内编码部分对亮度分量和色度分量采取不同的预测过程,亮度分量的预测更为细致和复杂,而色度分量的预测则通常比较简单。跨分量预测(Cross Component Prediction,CCP)模式是现有数字视频编里的一种作用于亮度分量和色度分量以提高视频压缩比的技术。During digital video encoding, the encoder reads and encodes the pixels of the original video sequence in different color formats. General digital encoders usually include prediction, transformation and quantization, inverse transformation and inverse quantization, loop filtering, and entropy coding, etc., to eliminate spatial, temporal, visual, and character redundancy. However, the human eye is more sensitive to changes in luminance components, and does not respond strongly to changes in chrominance components, so the YUV 4:2:0 color format is generally used for encoding in the original video sequence. At the same time, the digital video encoder adopts different prediction processes for the luminance component and the chrominance component in the intra-frame coding part. The prediction of the luminance component is more detailed and complicated, while the prediction of the chrominance component is usually relatively simple. Cross Component Prediction (CCP) mode is a technology in existing digital video coding that acts on luminance and chrominance components to improve the video compression ratio.

跨分量预测模式具体实施过程作用于帧内编码中,该方法包括使用亮度块(Luminance Block)的训练样本来确定用于预测色度块(Chrominance Block)的线性模型(Linear Model),以及使用亮度块的样本和线性模型来确定色度块的样本。其中,亮度块和色度块为编码单元在亮度分量和色度分量中的像素块,数字视频编码器通常会将原始视频序列读取成一帧一帧的图像并将图像分割成编码树单元CTU,而编码树单元又可继续划分为不同与相同大小的编码单元CU,具体编码过程在不同分量的编码单元中进行,编码树单元与编码单元关系如图3所示。The cross-component prediction mode implementation process works in intra-frame coding, the method includes using the training samples of the Luminance Block to determine a Linear Model for predicting the Chrominance Block, and using the Luminance Block block samples and a linear model to determine the chroma block samples. Among them, the luminance block and the chrominance block are the pixel blocks of the coding unit in the luminance component and the chrominance component. The digital video encoder usually reads the original video sequence into a frame-by-frame image and divides the image into coding tree units (CTUs). , and the coding tree unit can be further divided into coding units CU of different and the same size. The specific coding process is performed in coding units of different components. The relationship between the coding tree unit and the coding unit is shown in FIG. 3 .

跨分量预测(CCP)的实例:在最新视频编解码(Versatile Video Coding,VVC)标准中,使用跨分量线性模型(Cross Component Linear Model,CCLM)来减少分量之间的冗余。其线性模型通过当前编码单元的亮度分量的原始像素块的相邻像素的原始样本与重构样本训练得到,该相邻像素的样本信息包括当前编码单元的亮度分量的原始像素块的上侧相邻像素的原始样本与重构样本,当前编码单元的亮度分量的原始像素块的右上侧毗邻像素的原始样本与重构样本,当前编码单元的亮度分量的原始像素块的左侧相邻像素的原始样本与重构样本,当前编码单元亮度分量的原始像素块的左下侧毗邻像素的原始样本与重构样本。图4分别展示了颜色格式YUV4:2:0之下的一个8x8的亮度分量的原始像素块与相邻像素、以及4x4的色度分量的原始预测像素块与相邻像素的位置关系示例。Example of Cross Component Prediction (CCP): In the latest Versatile Video Coding (VVC) standard, Cross Component Linear Model (CCLM) is used to reduce redundancy between components. Its linear model is obtained by training the original samples of adjacent pixels of the original pixel block of the luminance component of the current coding unit and the reconstructed samples, and the sample information of the adjacent pixels includes the upper phase of the original pixel block of the luminance component of the current coding unit. The original samples and reconstructed samples of the adjacent pixels, the original samples and reconstructed samples of the adjacent pixels on the upper right side of the original pixel block of the luminance component of the current coding unit, and the adjacent pixels on the left of the original pixel block of the luminance component of the current coding unit. The original sample and the reconstructed sample, the original sample and the reconstructed sample of the adjacent pixels on the lower left side of the original pixel block of the luminance component of the current coding unit. FIG. 4 shows an example of the positional relationship between an original pixel block of an 8×8 luminance component and adjacent pixels, and an original predicted pixel block of a 4×4 chrominance component and adjacent pixels under the color format YUV4:2:0, respectively.

在当前编码单元中,色度分量预测块中像素的预测样本由当前编码单元的亮度分量的原始像素块中的像素的重构样本经过线性模型计算并降采样得到,其中,线性模型计算过程表示如下:In the current coding unit, the prediction samples of the pixels in the prediction block of the chrominance component are obtained from the reconstructed samples of the pixels in the original pixel block of the luminance component of the current coding unit through linear model calculation and down-sampling, where the linear model calculation process represents as follows:

PredC(i,j)=α·RecL(i,j)+β (1)Pred C (i, j)=α·Rec L (i, j)+β (1)

其中,(i,j)为像素的坐标,i具体是指当前编码单元的色度分量的预测块的横坐标,其范围为[0,width-1],步长为1,width为当前编码单元的色度分量的预测块的宽度,其取值可为4,8,16及32;j具体是指当前编码单元的色度分量的预测块的纵坐标,其范围为[0,height-1],步长为1,height为当前编码单元的色度分量的预测块的高度,其取值可为4,8,16及32,RecL为亮度分量的原始像素块中的像素的重构样本,Predc为色度分量的预测块中像素的预测样本,α、β为线性模型的系数。Among them, (i, j) is the coordinate of the pixel, i specifically refers to the abscissa of the prediction block of the chrominance component of the current coding unit, the range is [0, width-1], the step size is 1, and the width is the current coding The width of the prediction block of the chrominance component of the unit, which can be 4, 8, 16, and 32; j specifically refers to the ordinate of the prediction block of the chrominance component of the current coding unit, and its range is [0, height- 1], the step size is 1, height is the height of the prediction block of the chrominance component of the current coding unit, and its value can be 4, 8, 16 and 32, Rec L is the weight of the pixel in the original pixel block of the luminance component. Pred c is the prediction sample of the pixel in the prediction block of the chrominance component, and α and β are the coefficients of the linear model.

在VVC的CCLM技术中,包含有LM、LM_L及LM_A模式。其中,LM_L仅使用左侧相邻样本计算线性模型,而LM_A仅使用上侧相邻样本计算线性模型。The CCLM technology of VVC includes LM, LM_L and LM_A modes. Among them, LM_L only uses the left adjacent samples to calculate the linear model, and LM_A only uses the upper adjacent samples to calculate the linear model.

在另一跨分量预测实例中,中国数字音视频编解码标准(Audio Video codingStandard,AVS)最新采纳的跨分量技术提案M4612,两步跨分量预测模式(Two Step Cross-component Prediction Mode,TSCPM)。在编码过程中,如图5A所示,帧内编码亮度分量计算最多65个帧内预测模式(Intra Prediction mode),DC表示均值模式,Plane表示平面模式,Bilinear表示双线性模式,Zone表示区域。根据码率失真(Rate Distortion)代价选出最优结果并传输该帧内预测模式和相应预测残差等。当前编码单元里帧内编码色度分量进行最多11个色度分量帧内预测模式的计算,其中包括参考单一色度分量信息的5种色度分量帧内预测模式的计算和参考多分量信息的6种色度分量帧内预测模式计算,上述参考单一色度分量信息的帧内色度预测模式即为色度分量普通帧内预测模式。In another example of cross-component prediction, the latest cross-component technology proposal M4612 adopted by China's Audio Video coding Standard (AVS) is the Two Step Cross-component Prediction Mode (TSCPM). During the encoding process, as shown in Figure 5A, the intra-coded luminance component calculates up to 65 Intra Prediction modes, where DC represents the mean mode, Plane represents the plane mode, Bilinear represents the bilinear mode, and Zone represents the zone . The optimal result is selected according to the rate distortion (Rate Distortion) cost, and the intra prediction mode and the corresponding prediction residual are transmitted. Intra-coded chrominance components in the current coding unit perform calculation of up to 11 intra-prediction modes of chrominance components, including the calculation of 5 intra-prediction modes of chrominance components with reference to single chrominance component information and the calculation of chrominance component intra-prediction modes with reference to multi-component information. 6 kinds of chrominance component intra-frame prediction modes are calculated, and the above-mentioned intra-frame chrominance prediction mode referring to single chrominance component information is the chrominance component common intra-frame prediction mode.

在对色度分量的预测块的像素使用色度分量普通帧内预测模式时,当前色度编码块根据色度分量的相邻预测块的重构样本的可用信息和相对应的色度分量帧内预测模式,计算当前色度编码块的预测样本。不同预测模式选用的相邻预测块的参考像素也不一致,部分预测模式可以直接使用相邻编码块的像素的重构样本计算出预测样本,而部分预测模式需要对相邻编码块的像素的重构样本进行插值,再选定参考像素计算出当前编码块的预测样本。图5B分别展示了一个编码块大小为8X8的帧内预测模式示意图,图中(1)为普通帧内垂直类角度预测模式,此模式采用上侧相邻块的参考像素对当前编码块的预测样本进行计算,(2)为普通帧内水平类角度预测模式,此模式采用左侧相邻块的参考像素对当前编码块的预测样本进行计算,(3)为普通帧内非角度预测模式,此模式同时采用上侧和左侧相邻块的参考像素对当前编码块的预测样本进行计算。When using the chroma component normal intra prediction mode on the pixels of the prediction block of the chroma component, the current chroma coding block is based on the available information of the reconstructed samples of the adjacent prediction blocks of the chroma component and the corresponding chroma component frame Intra-prediction mode, computes prediction samples for the current chroma coded block. The reference pixels of adjacent prediction blocks selected by different prediction modes are also inconsistent. Some prediction modes can directly use the reconstructed samples of the pixels of adjacent coding blocks to calculate the prediction samples, while some prediction modes need to reconstruct the pixels of adjacent coding blocks. The constructed samples are interpolated, and then the reference pixels are selected to calculate the predicted samples of the current coding block. Figure 5B shows a schematic diagram of an intra-frame prediction mode with a coding block size of 8×8. (1) in the figure is a normal intra-frame vertical angle-like prediction mode. This mode uses the reference pixels of the adjacent blocks on the upper side to predict the current coding block. Sample calculation, (2) is the normal intra-frame horizontal class angle prediction mode, this mode uses the reference pixel of the adjacent block on the left to calculate the prediction sample of the current coding block, (3) is the normal intra-frame non-angle prediction mode, This mode computes the prediction samples of the current coded block using both the reference pixels of the upper and left adjacent blocks.

在对色度分量的预测块的像素进行跨分量技术预测时,当前编码单元的亮度分量的原始像素块的相邻像素的重构样本以及当前编码单元的色度分量的原始预测像素块的相邻像素的重构样本被用于线性模型的计算。上述亮度分量的原始像素块的相邻像素包括,当前编码单元的亮度分量的原始像素块的上侧相邻像素以及左侧相邻像素;上述色度分量的预测块的相邻像素包括,当前编码单元色度分量的预测块的上侧相邻像素以及左侧相邻像素。When performing cross-component technology prediction on the pixels of the prediction block of the chroma component, the reconstructed samples of the adjacent pixels of the original pixel block of the luma component of the current coding unit and the phase of the original prediction pixel block of the chroma component of the current coding unit The reconstructed samples of neighboring pixels are used for the computation of the linear model. The adjacent pixels of the original pixel block of the luminance component include the upper adjacent pixels and left adjacent pixels of the original pixel block of the luminance component of the current coding unit; the adjacent pixels of the prediction block of the chrominance component include the current The upper neighbor pixel and the left neighbor pixel of the prediction block of the chroma component of the coding unit.

在选取重构样本作为计算线性模型的系数的参考样本时,结合相邻像素的重构样本的可用性,可以采用上侧相邻像素中两个像素的重构样本与左侧相邻像素中两个像素的重构样本的组合,还可以全部采用上侧相邻像素中四个像素的重构样本,以及全部采用左侧相邻像素中四个像素的重构样本。When selecting the reconstructed samples as the reference samples for calculating the coefficients of the linear model, combined with the availability of the reconstructed samples of the adjacent pixels, the reconstructed samples of two pixels in the adjacent pixels on the upper side and the two pixels in the adjacent pixels on the left can be used. For the combination of the reconstructed samples of the pixels, the reconstructed samples of the four pixels in the adjacent pixels on the upper side may be all used, and the reconstruction samples of the four pixels of the adjacent pixels on the left side may be all used.

根据上述参考样本的选择不同,预测模式包括,若当前编码单元对应的亮度分量的原始像素块和色度分量的原始像素块(为描述方便本端统称为原始像素块)的上侧相邻像素的重构样本和当前编码单元的原始像素块的左侧相邻像素的重构样本可用,且线性模型的系数计算采用的参考样本同时来自上侧和左侧的相邻像素时,或若当前编码单元对应的原始像素块只有上侧相邻像素的重构样本可用,且线性模型系数计算采用的参考样本只选上侧相邻像素的重构样本时,或若当前编码单元对应的原始像素块只有左侧相邻像素的重构样本可用,且线性模型的系数的计算采用的参考样本只选左侧相邻像素的重构样本时,均为TSCPM模式;若当前编码单元对应的原始像素块的上侧相邻像素的重构样本和当前编码单元对应的原始像素块的左侧相邻像素的重构样本可用,且线性模型计算的系数的计算采用的参考样本只选上侧相邻像素的重构样本时,为TSCPM_T模式;若当前编码单元对应的原始像素块的上侧相邻像素的重构样本和当前编码单元对应的原始像素块的左侧相邻像素的重构样本可用,且线性模型的系数的计算采用的参考样本只选上侧相邻像素的重构样本时,为TSCPM_L模式。According to the selection of the above reference samples, the prediction mode includes, if the original pixel block of the luminance component and the original pixel block of the chrominance component corresponding to the current coding unit (for the convenience of description, this end is collectively referred to as the original pixel block) adjacent pixels on the upper side When the reconstructed samples of the current coding unit and the reconstructed samples of the adjacent pixels on the left of the original pixel block of the current coding unit are available, and the coefficient calculation of the linear model adopts the reference samples from both the upper and left adjacent pixels, or if the current For the original pixel block corresponding to the coding unit, only the reconstructed samples of the adjacent pixels on the upper side are available, and the reference samples used in the calculation of the linear model coefficients are only the reconstructed samples of the adjacent pixels on the upper side, or if the original pixel corresponding to the current coding unit is used. When only the reconstructed samples of the adjacent pixels on the left side of the block are available, and the reference samples used in the calculation of the coefficients of the linear model are only the reconstructed samples of the adjacent pixels on the left side, they are all in TSCPM mode; if the original pixel corresponding to the current coding unit The reconstructed samples of the adjacent pixels on the upper side of the block and the reconstructed samples of the adjacent pixels on the left side of the original pixel block corresponding to the current coding unit are available, and the reference samples used in the calculation of the coefficients calculated by the linear model are only selected from the adjacent pixels on the upper side. When the reconstructed sample of the pixel is in TSCPM_T mode; if the reconstructed sample of the adjacent pixel on the upper side of the original pixel block corresponding to the current coding unit and the reconstructed sample of the adjacent pixel on the left side of the original pixel block corresponding to the current coding unit are available , and only the reconstructed samples of the adjacent pixels on the upper side are selected as the reference samples used in the calculation of the coefficients of the linear model, it is the TSCPM_L mode.

上述用于线性模型的系数的计算的参考样本中,如图6所示,若参考样本来自当前编码单元对应的原始像素块的两侧的相邻像素时,则上侧的参考样本选取上侧相邻像素中最左端像素的重构样本与当前编码单元对应的原始像素块的宽度的上侧最右端像素的重构样本,左侧参考样本选取左侧相邻像素中最上端像素的重构样本与当前编码单元对应的原始像素块的高度的左侧相邻像素中最下端像素的重构样本;若用于线性模型的系数的计算的参考样本只来自上侧时,则以当前编码单元对应的原始像素块的宽度的四分之一距离为步长,选取上侧相邻像素中四个连续步长的像素的重构样本;若参考样本只来自左侧时,则以当前编码单元对应的原始像素块的高度的四分之一距离为步长,选取四个左侧相邻像素中四个连续步长的像素的重构样本。In the above-mentioned reference samples used for the calculation of the coefficients of the linear model, as shown in FIG. 6 , if the reference samples are from adjacent pixels on both sides of the original pixel block corresponding to the current coding unit, the upper reference samples are selected from the upper side. The reconstructed sample of the leftmost pixel in the adjacent pixels and the reconstructed sample of the rightmost pixel on the upper side of the width of the original pixel block corresponding to the current coding unit, the left reference sample is selected from the reconstruction of the uppermost pixel among the adjacent pixels on the left The sample is the reconstructed sample of the lowermost pixel in the left adjacent pixel of the height of the original pixel block corresponding to the current coding unit; if the reference sample used for the calculation of the coefficients of the linear model is only from the upper side, the current coding unit is used as the reconstruction sample. The quarter distance of the width of the corresponding original pixel block is the step size, and the reconstructed samples of pixels with four consecutive steps in the adjacent pixels on the upper side are selected; if the reference sample is only from the left side, the current coding unit is used. The quarter distance of the height of the corresponding original pixel block is the step size, and the reconstructed samples of four consecutive step size pixels among the four left adjacent pixels are selected.

即可以通过三种方式选取四个亮度分量的相邻像素与四个色度分量的相邻像素。That is, the adjacent pixels of the four luminance components and the adjacent pixels of the four chrominance components can be selected in three ways.

方式一:当分别从上侧相邻编码块和左侧相邻编码块选取两个相邻像素时,可以通过下式确定选取相邻像素:Method 1: When two adjacent pixels are selected from the upper adjacent coding block and the left adjacent coding block respectively, the adjacent pixels can be selected by the following formula:

minStep=min(Width,Height);minStep=min(Width,Height);

TopIndex=(minStep–1)*Width/minStep;TopIndex=(minStep-1)*Width/minStep;

LeftIndex=(minStep–1)*Height/minStep;LeftIndex=(minStep–1)*Height/minStep;

上述式子中,min(x,y)返回x和y的较小值,Width为当前编码块色度分量的宽度,Height为当前编码块色度分量的高度,TopIndex为选取上侧边界相邻像素时除了第一个相邻像素外的另外一个相邻像素的索引值,LeftIndex为选取左侧边界相邻像素时除了第一个相邻像素外的另外一个相邻像素的索引值;In the above formula, min(x,y) returns the smaller value of x and y, Width is the width of the chrominance component of the current coding block, Height is the height of the chrominance component of the current coding block, and TopIndex is to select the adjacent upper boundary. The index value of another adjacent pixel except the first adjacent pixel when it is a pixel, and LeftIndex is the index value of another adjacent pixel except the first adjacent pixel when selecting the adjacent pixel on the left border;

方式二:当只从上侧相邻编码块选取四个相邻像素时,从最左侧第一个相邻像素开始,以当前编码块的色度分量的四分之一宽度为步长,选取四个亮度分量相邻像素及四个色度分量相邻像素;Method 2: When only four adjacent pixels are selected from the adjacent coding block on the upper side, starting from the first adjacent pixel on the far left, the step size is a quarter of the width of the chrominance component of the current coding block, Select four adjacent pixels of luminance components and four adjacent pixels of chrominance components;

方式三:当只从左侧相邻编码块选取四个相邻像素时,从最上侧第一个相邻像素开始,以当前编码块色度分量的四分之一高度为步长,选取四个亮度分量相邻像素及四个色度分量相邻像素;Method 3: When only four adjacent pixels are selected from the adjacent coding block on the left, starting from the first adjacent pixel on the uppermost side, with a quarter of the height of the chrominance component of the current coding block as the step size, select four adjacent pixels. adjacent pixels of the luminance component and four adjacent pixels of the chrominance component;

上述具体实例AVS3中,跨分量技术的线性模型计算式与上述式(1)相同,其中α和β可通过以下式子计算得到:In the above-mentioned specific example AVS3, the linear model calculation formula of the cross-component technology is the same as the above-mentioned formula (1), wherein α and β can be calculated by the following formula:

Figure BDA0003691739840000071
Figure BDA0003691739840000071

β=YMin-α·XMin (3)β=Y Min -α·X Min (3)

其中,YMax为用于线性模型的系数的计算的色度分量的原始像素块的多个相邻像素点的重构样本中两个最大重构样本的平均值,YMin为用于线性模型的系数的计算的色度分量的原始像素块的多个相邻像素点的重构样本中两个最小重构样本的平均值。XMax为用于线性模型的系数的计算的亮度分量的原始像素块的多个相邻像素点的重构样本中的两个最大重构样本的平均值,XMin为用于线性模型的系数的计算的亮度分量的原始像素块的多个相邻像素点的重构样本中的两个最小重构样本的平均值。Wherein, Y Max is the average value of the two largest reconstructed samples in the reconstructed samples of multiple adjacent pixel points of the original pixel block of the chrominance component used for the calculation of the coefficients of the linear model, and Y Min is the average value of the two largest reconstructed samples used for the linear model The calculated coefficient of the chrominance component is the average of the two smallest reconstructed samples among the reconstructed samples of multiple adjacent pixel points of the original pixel block of the chrominance component. X Max is the average value of the two largest reconstructed samples among the reconstructed samples of multiple adjacent pixel points of the original pixel block of the luminance component used for the calculation of the coefficients of the linear model, and X Min is the coefficient used for the linear model The average value of the two smallest reconstructed samples among the reconstructed samples of a plurality of adjacent pixel points of the original pixel block of the calculated luminance component.

根据计算得到的线性模型进行跨分量预测,当前CU的亮度分量重构块被用于生成相对应的色度分量参考预测块(Chroma Reference Prediction Pixel Block)。具体根据式(1)/(2)和(3)计算出当前编码单元的每个像素的色度分量的参考预测样本,该色度分量参考预测块的尺寸与亮度分量的原始像素块的尺寸相同。在具体实例中,输入数字视频颜色格式一般为YUV4∶2∶0格式,即色度分量预测块的大小为亮度分量的原始像素块的四分之一。为得到相对应的正确大小色度分量预测块,该色度分量参考预测块需要分别对水平和垂直方向进行二分之一降采样,经过降采样之后的色度分量预测块为相对应的亮度分量的原始像素块四分之一,满足颜色格式约束的尺寸要求。其中,上述对色度分量参考预测块进行降采样所采用的滤波器在该色度分量参考预测块的左边界像素区域采用两抽头相同系数的降采样滤波器,而在其他像素区域均采用六抽头两不同系数的降采样滤波器。Cross-component prediction is performed according to the calculated linear model, and the luminance component reconstruction block of the current CU is used to generate a corresponding chroma component reference prediction block (Chroma Reference Prediction Pixel Block). Specifically, the reference prediction sample of the chrominance component of each pixel of the current coding unit is calculated according to equations (1)/(2) and (3). The size of the chrominance component reference prediction block and the size of the original pixel block of the luminance component are calculated. same. In a specific example, the input digital video color format is generally YUV 4:2:0 format, that is, the size of the chrominance component prediction block is one quarter of the original pixel block of the luma component. In order to obtain the corresponding correct size chrominance component prediction block, the chrominance component reference prediction block needs to downsample the horizontal and vertical directions by half, and the chrominance component prediction block after downsampling is the corresponding luminance. A quarter of the original pixel block of the component, which satisfies the size requirements of the color format constraints. Wherein, the filter used for down-sampling the chrominance component reference prediction block uses a downsampling filter with two taps of the same coefficient in the left border pixel area of the chrominance component reference prediction block, and uses six-sampling filter in other pixel areas. A downsampling filter that taps two different coefficients.

六抽头两不同系数的降采样滤波器如式(4)所示。A downsampling filter with six taps and two different coefficients is shown in equation (4).

Figure BDA0003691739840000072
Figure BDA0003691739840000072

其中,x,y为像素的坐标,P’C为所述当前像素的亮度分量的预测样本,P1 C和P2 C为所述当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the pixel, P' C is the predicted sample of the luminance component of the current pixel, and P 1 C and P 2 C are the predicted sample of the chrominance component of the current pixel.

两抽头相同系数的降采样滤波器如式(5)所示。The down-sampling filter with the same coefficient of two taps is shown in equation (5).

Figure BDA0003691739840000073
Figure BDA0003691739840000073

其中,x,y为像素的坐标,P’C为所述当前像素的亮度分量的预测样本,P1 C和P2 C为所述当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the pixel, P' C is the predicted sample of the luminance component of the current pixel, and P 1 C and P 2 C are the predicted sample of the chrominance component of the current pixel.

该降采样滤波器如图7所示,其中,x1表示乘以1,x2表示乘以2。图8展示了跨分量技术从亮度分量重构块到色度分量预测块变化的示意图,其中,编码单元的亮度分量重构块尺寸为8*8,对应的色度分量参考预测块的尺寸为8*8,滤波后的色度分量预测块的尺寸为4*4。The downsampling filter is shown in Figure 7, where x1 means multiplying by 1, and x2 means multiplying by 2. Fig. 8 is a schematic diagram showing the change from the luminance component reconstruction block to the chrominance component prediction block in the cross-component technique, wherein the size of the luminance component reconstruction block of the coding unit is 8*8, and the size of the corresponding chrominance component reference prediction block is 8*8, the size of the filtered chrominance component prediction block is 4*4.

AVS3还采纳了多种跨分量预测模式MCPM,MCPM三种预测模式与TSCPM预测模式相似,MCPM模式对应TSCPM模式,MCPM_T模式对应TSCPM_T模式,MCPM_L模式对应TSCPM_L模式。但色度分量预测过程不同,MCPM三种预测模式的色度U分量预测过程与TSCPM模式一致,而色度V分量的预测块则是用暂时色度预测分量块减去U分量的重建块所得到。具体公式如下:AVS3 also adopts a variety of cross-component prediction modes MCPM. The three prediction modes of MCPM are similar to the TSCPM prediction modes. The MCPM mode corresponds to the TSCPM mode, the MCPM_T mode corresponds to the TSCPM_T mode, and the MCPM_L mode corresponds to the TSCPM_L mode. However, the chrominance component prediction process is different. The chrominance U component prediction process of the three prediction modes of MCPM is consistent with the TSCPM mode, while the prediction block of the chroma V component is obtained by subtracting the reconstruction block of the U component from the temporary chroma prediction component block. get. The specific formula is as follows:

PredC(x,y)=α′·RecL(x,y)+β′ (6)Pred C (x, y)=α′·Rec L (x, y)+β′ (6)

PredCr(x,y)=PredC(x,y)-RecCb(x,y) (7)Pred Cr (x, y) = Pred C (x, y) - Rec Cb (x, y) (7)

上述式子(2)(3)中,PredC(x,y)为位于色度分量的预测块中像素(x,y)处的预测样本,RecL(x,y)为位于亮度分量的重构块中像素(x,y)处的重构样本,PredC’(x,y)为位于降采样之后色度分量的预测块中像素(x,y)处的预测样本,Reccb(x,y)为位于色度分量的重建块中像素(x,y)处的U分量的重建样本,PredCr(x,y)为位于色度分量的预测块中像素(x,y)处的V分量的预测样本,α’与β’分别为U分量与V分量的线性参数和,U分量与V分量的线性参数计算参考式(2)与(3)。目前,现有增强型两步跨分量预测技术在全部采用来自上侧或者左侧相邻编码单元的重构样本作为参考信息计算线性模型,以获得当前编码单元的色度分量的参考预测块时,若仅取来自上侧相邻像素的重构样本,则缺乏来自左侧相邻像素的重构样本的参考信息;若仅取来自左侧相邻像素的重构样本,则缺乏来自上侧相邻像素的重构样本的参考信息。In the above equations (2) and (3), Pred C (x, y) is the prediction sample located at the pixel (x, y) in the prediction block of the chrominance component, and Rec L (x, y) is the prediction sample located at the luminance component. The reconstructed sample at the pixel (x, y) in the reconstructed block, Pred C '(x, y) is the predicted sample at the pixel (x, y) in the prediction block of the chrominance component after downsampling, Rec cb ( x, y) is the reconstructed sample of the U component located at the pixel (x, y) in the reconstructed block of the chrominance component, and Pred Cr (x, y) is the pixel (x, y) located in the prediction block of the chrominance component. For the prediction samples of the V component, α' and β' are the sum of the linear parameters of the U component and the V component, respectively. For the calculation of the linear parameters of the U component and the V component, refer to equations (2) and (3). At present, the existing enhanced two-step cross-component prediction technology uses all reconstructed samples from the upper or left adjacent coding units as reference information to calculate the linear model to obtain the reference prediction block of the chroma component of the current coding unit. , if only the reconstructed samples from the adjacent pixels on the upper side are taken, there is a lack of reference information for the reconstructed samples from the adjacent pixels on the left; Reference information for reconstructed samples of neighboring pixels.

现有色度分量帧内预测模式在选用像素作为预测模式的参考像素时,往往会忽略一些参考像素与当前编码块的关联性。当前编码块与所有相邻的像素均存在空间关联性,若仅取来自上侧相邻像素,则缺乏来自左侧相邻像素的参考信息;若仅取来自左侧相邻像素,则缺乏来自上侧相邻像素的参考信息。In the existing chrominance component intra prediction mode, when selecting pixels as reference pixels of the prediction mode, the correlation between some reference pixels and the current coding block is often ignored. The current coding block has spatial correlation with all adjacent pixels. If only the upper adjacent pixels are taken, there is a lack of reference information from the left adjacent pixels; if only the left adjacent pixels are taken, there is a lack of reference information from the left adjacent pixels. The reference information of the adjacent pixels on the upper side.

现有的色度分量普通帧内预测模式根据预测模式的方向性,选择对应方向上的相邻像素作为参考像素,然而当前编码块与不在该方向上的相邻像素也存在一定的关联性,仅参考单一方向上的相邻像素的预测效果不够好,且浪费了其他相邻像素的可参考信息。现有的跨分量色度预测模式根据预测模式单一选择上侧或左侧相邻像素作为参考像素计算线性模型,也存在一些问题,若单一选择上侧相邻像素作为参考像素则忽略了当前编码块与左侧编码块的空间关联性;若单一选择左侧相邻像素作为参考像素则忽略了当前编码块与上侧编码块的空间关联性。The existing chrominance component common intra prediction mode selects adjacent pixels in the corresponding direction as reference pixels according to the directionality of the prediction mode, but the current coding block also has a certain correlation with adjacent pixels not in this direction. The prediction effect of only referring to adjacent pixels in a single direction is not good enough, and the reference information of other adjacent pixels is wasted. The existing cross-component chrominance prediction mode selects the upper or left adjacent pixel as the reference pixel to calculate the linear model according to the prediction mode. There are also some problems. If the upper adjacent pixel is selected as the reference pixel, the current encoding is ignored. The spatial correlation between the block and the left coding block; if the left adjacent pixel is selected as the reference pixel, the spatial correlation between the current coding block and the upper coding block is ignored.

这样预测浪费了大量的可用参考信息并不能较好地预测当前编码单元的色度分量的样本值,损失了编码效率。In this way, a large amount of available reference information is wasted by the prediction, and the sample value of the chrominance component of the current coding unit cannot be predicted well, and the coding efficiency is lost.

针对上述技术问题,本申请提出如下设计思路,In view of the above-mentioned technical problems, the application proposes the following design ideas:

对通过色度分量普通帧内预测模式计算得到的预测块进行预测修正。Prediction correction is performed on the prediction block calculated by the normal intra prediction mode of the chrominance component.

若当前编码块仅选择上侧色度分量相邻像素作为参考像素计算当前编码块的预测样本时,则采用左侧色度分量相邻像素作为参考像素对当前编码块的色度分量的预测样本进行预测修正;If the current coding block only selects the adjacent pixels of the chrominance components on the upper side as reference pixels to calculate the prediction samples of the current coding block, the adjacent pixels of the chrominance components on the left side are used as reference pixels to predict the samples of the chrominance components of the current coding block. make forecast revisions;

若当前编码块仅选择左侧色度分量相邻像素作为参考像素计算当前编码块的预测样本时,则采用上侧色度分量相邻像素作为参考像素对当前编码块的色度分量的预测样本进行预测修正;If only the adjacent pixels of the chrominance component on the left side of the current coding block are selected as reference pixels to calculate the prediction samples of the current coding block, the adjacent pixels of the chrominance components on the upper side are used as reference pixels for the prediction samples of the chrominance components of the current coding block. make forecast revisions;

若当前编码块采用色度分量普通帧内非角度预测模式,则采用上侧和左侧的色度分量相邻像素作为参考像素对当前编码块的色度分量的预测样本进行预测修正。If the current coding block adopts the normal intra-frame non-angle prediction mode of the chrominance component, the adjacent pixels of the chrominance component on the upper side and the left side are used as reference pixels to perform prediction modification on the prediction samples of the chrominance component of the current coding block.

对通过色度分量跨分量预测模式计算得到的预测样本进行预测修正。Prediction correction is performed on the prediction samples calculated by the chroma component cross-component prediction mode.

若当前编码块仅选择上侧亮度分量相邻像素和上侧色度分量相邻像素计算线性模型,则采用左侧色度分量相邻像素作为参考像素对当前编码块的色度分量的预测样本进行预测修正;If the current coding block only selects the adjacent pixels of the upper luminance component and the adjacent pixels of the upper chrominance component to calculate the linear model, the adjacent pixels of the left chrominance component are used as reference pixels to predict the chrominance components of the current coding block. make forecast revisions;

若当前编码块仅选择左侧亮度分量相邻像素和左侧色度分量相邻像素计算线性模型,则采用上侧色度分量相邻像素作为参考像素对当前编码块的色度分量的预测样本进行预测修正。If the current coding block only selects the adjacent pixels of the left luminance component and the adjacent pixels of the left chrominance component to calculate the linear model, the adjacent pixels of the upper chrominance component are used as reference pixels to predict the chrominance components of the current coding block. Make forecast corrections.

上述对当前编码块的预测样本预测修正包括,根据当前像素到参考的相邻像素之间的距离作为滤波系数索引值,根据当前编码块的大小尺寸作为滤波系数组索引值,根据滤波系数组索引值查找色度分量帧内预测滤波系数组并根据滤波系数索引值在组内找到色度分量帧内预测滤波系数,根据查找得到的滤波系数和预测修正公式计算得到修正后的预测样本。The above-mentioned prediction correction for the prediction sample of the current coding block includes, according to the distance between the current pixel and the adjacent pixels of the reference as the filter coefficient index value, according to the size of the current coding block as the filter coefficient group index value, according to the filter coefficient group index. The value searches the chroma component intra prediction filter coefficient group and finds the chroma component intra prediction filter coefficient in the group according to the filter coefficient index value, and calculates the modified prediction sample according to the obtained filter coefficient and the prediction correction formula.

具体的,在编码端,首先确定当前编码块是否可以使用色度分量的预测修正技术。Specifically, at the coding end, it is first determined whether the current coding block can use the prediction modification technique of the chrominance component.

若使用色度分量的预测修正,则对当前编码块的亮度分量进行帧内预测,并对预测结束之后的预测样本进行预测样本修正,然后对当前编码块的色度分量进行帧内预测,并对预测结束之后的预测样本进行预测修正。If the prediction correction of the chrominance component is used, intra-frame prediction is performed on the luminance component of the current coding block, and the prediction sample correction is performed on the prediction sample after the prediction is completed, and then the intra-frame prediction is performed on the chrominance component of the current coding block, and Prediction correction is performed on the prediction samples after the end of the prediction.

上述对当前编码块的预测修正包括需要传输标识位与不需要传输标识位以表示当前编码块是否使用色度分量的预测修正技术。The above-mentioned prediction modification for the current coding block includes prediction modification techniques that need to transmit an identification bit and do not need to transmit an identification bit to indicate whether the current coding block uses a chrominance component.

若当前预测修正技术需要传输标识位,则根据未修正预测样本与已修正预测样本计算得到的率失真代价进行判断是否使用帧内预测的预测修正技术,If the current prediction correction technology needs to transmit the flag bit, it is judged whether to use the prediction correction technology of intra-frame prediction according to the rate-distortion cost calculated by the uncorrected prediction sample and the corrected prediction sample.

若针对未修正预测样本计算得到的率失真代价较小,则当前编码块不使用帧内预测的预测修正技术,标识位传输并表示为否;If the rate-distortion cost calculated for the uncorrected prediction sample is small, the current coding block does not use the prediction correction technique of intra-frame prediction, and the flag bit is transmitted and indicated as NO;

若针对预测修正后的预测样本计算得到的率失真代价较小,则当前色度分量编码块使用帧内预测的预测修正技术,标识位传输并表示为真;If the rate-distortion cost calculated for the prediction sample after the prediction modification is small, the current chrominance component coding block uses the prediction modification technique of intra-frame prediction, and the flag bit is transmitted and expressed as true;

若当前预测修正技术不需要传输标识位,则直接对当前编码块的预测样本使用预测修正,并得到修正后的预测样本。If the current prediction modification technology does not need to transmit the flag bit, the prediction modification is directly applied to the prediction samples of the current coding block, and the modified prediction samples are obtained.

具体的,在解码端,首先解析并获取当前码流是否可以使用色度分量的帧内预测的预测修正技术。Specifically, at the decoding end, first parse and obtain whether the current code stream can use the prediction modification technology of intra-frame prediction of chrominance components.

若可以使用预测修正技术,则解析码流获取当前解码块的当前色度分量的预测模式,选取特定的相邻像素作为参考像素对当前解码块的预测样本进行预测修正。If a prediction modification technique can be used, the code stream is parsed to obtain the prediction mode of the current chrominance component of the current decoding block, and specific adjacent pixels are selected as reference pixels to perform prediction modification on the prediction samples of the current decoding block.

上述对当前解码块的预测样本进行预测修正过程包括,当前解码块需要标识位表示是否使用预测修正技术和不需要标识位表示是否使用预测修正技术。The above-mentioned process of performing prediction modification on the prediction samples of the current decoding block includes: the current decoding block needs an identification bit to indicate whether the prediction modification technique is used and the unneeded identification bit indicates whether the prediction modification technique is used.

若当前解码块需要标识位指示是否使用预测修正技术,则解析当前解码块的码流获取标识位值和色度分量的预测模式。If the current decoding block needs an identification bit to indicate whether to use the prediction modification technology, the code stream of the current decoding block is parsed to obtain the identification bit value and the prediction mode of the chrominance component.

若标识位的数值为真,则根据当前色度分量的预测模式计算得到预测样本。If the value of the flag is true, the prediction sample is calculated according to the prediction mode of the current chrominance component.

若计算预测样本选取上侧相邻像素作为参考像素,则取左侧相邻像素作为参考像素对预测样本进行预测修正;If the calculation prediction sample selects the upper adjacent pixel as the reference pixel, then the left adjacent pixel is used as the reference pixel to perform prediction correction on the prediction sample;

若计算预测样本选取左侧相邻像素作为参考像素,则取上侧相邻像素作为参考像素对预测样本进行预测修正;If the calculation prediction sample selects the left adjacent pixel as the reference pixel, then the upper adjacent pixel is used as the reference pixel to perform prediction correction on the prediction sample;

若标识位值的数值为否,则根据当前色度分量的预测模式计算得到预测样本,不对预测样本进行滤波;If the value of the flag value is no, the predicted sample is calculated according to the prediction mode of the current chrominance component, and the predicted sample is not filtered;

若当前解码块不需要标识位指示是否使用预测修正技术,则解析当前解码块的码流获取色度分量的预测模式,根据当前色度分量的预测模式计算得到预测样本。If the current decoding block does not need the flag to indicate whether to use the prediction modification technique, the code stream of the current decoding block is parsed to obtain the prediction mode of the chrominance component, and the prediction sample is calculated according to the prediction mode of the current chrominance component.

若计算解码块选取上侧相邻像素作为参考像素,则取左侧相邻像素作为参考像素对预测样本进行预测修正;If the calculation decoding block selects the adjacent pixel on the upper side as the reference pixel, then the adjacent pixel on the left side is used as the reference pixel to perform prediction correction on the prediction sample;

若计算解码块选取左侧相邻像素作为参考像素,则取上侧相邻像素作为参考像素对预测样本进行预测修正。If the calculation decoding block selects the adjacent pixels on the left side as reference pixels, the adjacent pixels on the upper side are used as reference pixels to perform prediction correction on the predicted samples.

本申请实施例利用相邻编码块与当前编码块的空间关联性修正当前编码块的色度分量的预测样本,提高预测准确度和编码效率。In the embodiments of the present application, the spatial correlation between adjacent coding blocks and the current coding block is used to correct the prediction samples of the chrominance components of the current coding block, so as to improve the prediction accuracy and coding efficiency.

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.

图9为本申请实施例中所描述的一种实例的视频译码系统1的框图。如本文所使用,术语“视频译码器”一般是指视频编码器和视频解码器两者。在本申请中,术语“视频译码”或“译码”可一般地指代视频编码或视频解码。视频译码系统1的视频编码器100和视频解码器200用于实现本申请提出的跨分量预测方法。FIG. 9 is a block diagram of an example video coding system 1 described in the embodiments of the present application. As used herein, the term "video coder" generally refers to both a video encoder and a video decoder. In this application, the term "video coding" or "coding" may generally refer to video encoding or video decoding. The video encoder 100 and the video decoder 200 of the video coding system 1 are used to implement the cross-component prediction method proposed in this application.

如图9中所示,视频译码系统1包含源装置10和目的装置20。源装置10产生经编码视频数据。因此,源装置10可被称为视频编码装置。目的装置20可对由源装置10所产生的经编码的视频数据进行解码。因此,目的装置20可被称为视频解码装置。源装置10、目的装置20或两个的各种实施方案可包含一或多个处理器以及耦合到所述一或多个处理器的存储器。所述存储器可包含但不限于RAM、ROM、EEPROM、快闪存储器或可用于以可由计算机存取的指令或数据结构的形式存储所要的程序代码的任何其它媒体,如本文所描述。As shown in FIG. 9 , video coding system 1 includes source device 10 and destination device 20 . Source device 10 produces encoded video data. Accordingly, source device 10 may be referred to as a video encoding device. Destination device 20 may decode the encoded video data generated by source device 10 . Accordingly, destination device 20 may be referred to as a video decoding device. Various implementations of source device 10, destination device 20, or both may include one or more processors and a memory coupled to the one or more processors. The memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other medium that may be used to store the desired program code in the form of instructions or data structures accessible by a computer, as described herein.

源装置10和目的装置20可以包括各种装置,包含桌上型计算机、移动计算装置、笔记型(例如,膝上型)计算机、平板计算机、机顶盒、例如所谓的“智能”电话等电话手持机、电视机、相机、显示装置、数字媒体播放器、视频游戏控制台、车载计算机或其类似者。Source device 10 and destination device 20 may include various devices including desktop computers, mobile computing devices, notebook (eg, laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, etc. , televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.

目的装置20可经由链路30从源装置10接收经编码视频数据。链路30可包括能够将经编码视频数据从源装置10移动到目的装置20的一或多个媒体或装置。在一个实例中,链路30可包括使得源装置10能够实时将经编码视频数据直接发射到目的装置20的一或多个通信媒体。在此实例中,源装置10可根据通信标准(例如无线通信协议)来调制经编码视频数据,且可将经调制的视频数据发射到目的装置20。所述一或多个通信媒体可包含无线和/或有线通信媒体,例如射频(RF)频谱或一或多个物理传输线。所述一或多个通信媒体可形成基于分组的网络的一部分,基于分组的网络例如为局域网、广域网或全球网络(例如,因特网)。所述一或多个通信媒体可包含路由器、交换器、基站或促使从源装置10到目的装置20的通信的其它设备。在另一实例中,可将经编码数据从输出接口140输出到存储装置40。Destination device 20 may receive encoded video data from source device 10 via link 30 . Link 30 may include one or more media or devices capable of moving encoded video data from source device 10 to destination device 20 . In one example, link 30 may include one or more communication media that enable source device 10 to transmit encoded video data directly to destination device 20 in real-time. In this example, source device 10 may modulate the encoded video data according to a communication standard, such as a wireless communication protocol, and may transmit the modulated video data to destination device 20 . The one or more communication media may include wireless and/or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (eg, the Internet). The one or more communication media may include routers, switches, base stations, or other equipment that facilitates communication from source device 10 to destination device 20 . In another example, the encoded data may be output from output interface 140 to storage device 40 .

本申请的图像编解码技术可应用于视频编解码以支持多种多媒体应用,例如空中电视广播、有线电视发射、卫星电视发射、串流视频发射(例如,经由因特网)、用于存储于数据存储媒体上的视频数据的编码、存储在数据存储媒体上的视频数据的解码,或其它应用。在一些实例中,视频译码系统1可用于支持单向或双向视频传输以支持例如视频流式传输、视频回放、视频广播和/或视频电话等应用。The image encoding and decoding techniques of the present application can be applied to video encoding and decoding to support a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (eg, via the Internet), for storage in data storage Encoding of video data on media, decoding of video data stored on data storage media, or other applications. In some examples, video coding system 1 may be used to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.

图9中所说明的视频译码系统1仅为实例,并且本申请的技术可适用于未必包含编码装置与解码装置之间的任何数据通信的视频译码设置(例如,视频编码或视频解码)。在其它实例中,数据从本地存储器检索、在网络上流式传输等等。视频编码装置可对数据进行编码并且将数据存储到存储器,和/或视频解码装置可从存储器检索数据并且对数据进行解码。在许多实例中,由并不彼此通信而是仅编码数据到存储器和/或从存储器检索数据且解码数据的装置执行编码和解码。The video coding system 1 illustrated in FIG. 9 is merely an example, and the techniques of this application may be applicable to video coding setups (eg, video encoding or video decoding) that do not necessarily include any communication of data between an encoding device and a decoding device. . In other instances, data is retrieved from local storage, streamed over a network, and the like. A video encoding device may encode and store data to memory, and/or a video decoding device may retrieve and decode data from memory. In many instances, encoding and decoding is performed by devices that do not communicate with each other, but merely encode data to and/or retrieve data from memory and decode data.

在图9的实例中,源装置10包含视频源120、视频编码器100和输出接口140。在一些实例中,输出接口140可包含调节器/解调器(调制解调器)和/或发射器。视频源120可包括视频捕获装置(例如,摄像机)、含有先前捕获的视频数据的视频存档、用以从视频内容提供者接收视频数据的视频馈入接口,和/或用于产生视频数据的计算机图形系统,或视频数据的此些来源的组合。In the example of FIG. 9 , source device 10 includes video source 120 , video encoder 100 , and output interface 140 . In some examples, output interface 140 may include a modulator/demodulator (modem) and/or a transmitter. Video source 120 may include a video capture device (eg, a video camera), a video archive containing previously captured video data, a video feed interface to receive video data from a video content provider, and/or a computer to generate video data A graphics system, or a combination of such sources of video data.

视频编码器100可对来自视频源120的视频数据进行编码。在一些实例中,源装置10经由输出接口140将经编码视频数据直接发射到目的装置20。在其它实例中,经编码视频数据还可存储到存储装置40上,供目的装置20以后存取来用于解码和/或播放。Video encoder 100 may encode video data from video source 120 . In some examples, source device 10 transmits the encoded video data directly to destination device 20 via output interface 140 . In other examples, the encoded video data may also be stored on storage device 40 for later access by destination device 20 for decoding and/or playback.

在图9的实例中,目的装置20包含输入接口240、视频解码器200和显示装置220。在一些实例中,输入接口240包含接收器和/或调制解调器。输入接口240可经由链路30和/或从存储装置40接收经编码视频数据。显示装置220可与目的装置20集成或可在目的装置20外部。一般来说,显示装置220显示经解码视频数据。显示装置220可包括多种显示装置,例如,液晶显示器(LCD)、等离子显示器、有机发光二极管(OLED)显示器或其它类型的显示装置。In the example of FIG. 9 , destination device 20 includes input interface 240 , video decoder 200 , and display device 220 . In some examples, input interface 240 includes a receiver and/or a modem. Input interface 240 may receive encoded video data via link 30 and/or from storage device 40 . The display device 220 may be integrated with the destination device 20 or may be external to the destination device 20 . Generally, display device 220 displays decoded video data. The display device 220 may include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.

尽管图9中未图示,但在一些方面,视频编码器100和视频解码器200可各自与音频编码器和解码器集成,且可包含适当的多路复用器-多路分用器单元或其它硬件和软件,以处置共同数据流或单独数据流中的音频和视频两者的编码。Although not shown in Figure 9, in some aspects video encoder 100 and video decoder 200 may each be integrated with an audio encoder and decoder, and may include appropriate multiplexer-demultiplexer units or other hardware and software to handle the encoding of both audio and video in a common data stream or separate data streams.

视频编码器100和视频解码器200各自可实施为例如以下各项的多种电路中的任一者:一或多个微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、离散逻辑、硬件或其任何组合。如果部分地以软件来实施本申请,那么装置可将用于软件的指令存储在合适的非易失性计算机可读存储媒体中,且可使用一或多个处理器在硬件中执行所述指令从而实施本申请技术。前述内容(包含硬件、软件、硬件与软件的组合等)中的任一者可被视为一或多个处理器。视频编码器100和视频解码器200中的每一者可包含在一或多个编码器或解码器中,所述编码器或解码器中的任一者可集成为相应装置中的组合编码器/解码器(编码解码器)的一部分。Video encoder 100 and video decoder 200 may each be implemented as any of a variety of circuits such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, hardware, or any combination thereof. If the application is implemented in part in software, a device may store instructions for the software in a suitable non-volatile computer-readable storage medium, and the instructions may be executed in hardware using one or more processors Thus, the technology of the present application is implemented. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors. Each of video encoder 100 and video decoder 200 may be included in one or more encoders or decoders, either of which may be integrated as a combined encoder in the respective device /decoder (codec) part.

图10为本申请实施例中所描述的一种视频编码器100的示例框图。视频编码器100用于将视频输出到后处理实体41。后处理实体41表示可处理来自视频编码器100的经编码视频数据的视频实体的实例,例如媒体感知网络元件(MANE)或拼接/编辑装置。在一些情况下,后处理实体41可为网络实体的实例。在一些视频编码系统中,后处理实体41和视频编码器100可为单独装置的若干部分,而在其它情况下,相对于后处理实体41所描述的功能性可由包括视频编码器100的相同装置执行。在某一实例中,后处理实体41是图1的存储装置40的实例。FIG. 10 is an exemplary block diagram of a video encoder 100 described in the embodiments of the present application. The video encoder 100 is used to output the video to the post-processing entity 41 . Post-processing entity 41 represents an example of a video entity that can process encoded video data from video encoder 100, such as a Media Aware Network Element (MANE) or a splicing/editing device. In some cases, post-processing entity 41 may be an instance of a network entity. In some video encoding systems, post-processing entity 41 and video encoder 100 may be parts of separate devices, while in other cases, the functionality described with respect to post-processing entity 41 may be performed by the same device that includes video encoder 100 implement. In an example, post-processing entity 41 is an example of storage device 40 of FIG. 1 .

在图10的实例中,视频编码器100包括预测处理单元108、滤波器单元106、存储器107、求和器112、变换器101、量化器102和熵编码器103。预测处理单元108包括帧间预测器110和帧内预测器109。为了图像块重构,视频编码器100还包含反量化器104、反变换器105和求和器111。滤波器单元106表示一或多个环路滤波器,例如去块滤波器、自适应环路滤波器(ALF)和样本自适应偏移(SAO)滤波器。尽管在图10中将滤波器单元106示出为环路内滤波器,但在其它实现方式下,可将滤波器单元106实施为环路后滤波器。在一种示例下,视频编码器100还可以包括视频数据存储器、分割单元(图中未示意)。In the example of FIG. 10 , video encoder 100 includes prediction processing unit 108 , filter unit 106 , memory 107 , summer 112 , transformer 101 , quantizer 102 , and entropy encoder 103 . The prediction processing unit 108 includes an inter predictor 110 and an intra predictor 109 . For image block reconstruction, the video encoder 100 also includes an inverse quantizer 104 , an inverse transformer 105 and a summer 111 . Filter unit 106 represents one or more loop filters, such as deblocking filters, adaptive loop filters (ALF), and sample adaptive offset (SAO) filters. Although the filter unit 106 is shown in FIG. 10 as an in-loop filter, in other implementations the filter unit 106 may be implemented as a post-loop filter. In an example, the video encoder 100 may further include a video data memory and a division unit (not shown in the figure).

视频编码器100接收视频数据,并将所述视频数据存储在视频数据存储器中。分割单元将所述视频数据分割成若干图像块,而且这些图像块可以被进一步分割为更小的块,例如基于四叉树结构或者二叉树结构的图像块分割。预测处理单元108可选择用于当前图像块的多个可能的译码模式中的一者,例如多个帧内译码模式中的一者或多个帧间译码模式中的一者。预测处理单元108可将所得经帧内、帧间译码的块提供给求和器112以产生残差块,且提供给求和器111以重构用作参考图像的经编码块。预测处理单元108内的帧内预测器109可相对于与待编码当前块在相同帧或条带中的一或多个相邻块执行当前图像块的帧内预测性编码,以去除空间冗余。预测处理单元108内的帧间预测器110可相对于一或多个参考图像中的一或多个预测块执行当前图像块的帧间预测性编码以去除时间冗余。预测处理单元108将指示当前图像块的所选帧内或帧间预测模式的信息提供到熵编码器103,以便于熵编码器103编码指示所选帧间预测模式的信息。The video encoder 100 receives video data and stores the video data in a video data memory. The division unit divides the video data into several image blocks, and these image blocks can be further divided into smaller blocks, such as image block division based on a quad-tree structure or a binary tree structure. Prediction processing unit 108 may select one of a plurality of possible coding modes for the current image block, such as one of a plurality of intra-coding modes or one of a plurality of inter-coding modes. Prediction processing unit 108 may provide the resulting intra-, inter-coded block to summer 112 to generate a residual block, and to summer 111 to reconstruct the encoded block for use as a reference image. Intra-predictor 109 within prediction processing unit 108 may perform intra-predictive encoding of the current image block relative to one or more neighboring blocks in the same frame or slice as the current block to be encoded to remove spatial redundancy . Inter predictor 110 within prediction processing unit 108 may perform inter-predictive encoding of the current image block relative to one or more prediction blocks in one or more reference images to remove temporal redundancy. Prediction processing unit 108 provides information indicative of the selected intra or inter prediction mode for the current image block to entropy encoder 103 so that entropy encoder 103 encodes the information indicative of the selected inter prediction mode.

在预测处理单元108经由帧间预测/帧内预测产生当前图像块的预测块之后,视频编码器100通过从待编码的当前图像块减去所述预测块来形成残差图像块。求和器112表示执行此减法运算的一或多个组件。所述残差块中的残差视频数据可包含在一或多个TU中,并应用于变换器101。变换器101使用例如离散余弦变换(DCT)或概念上类似的变换等变换将残差视频数据变换成残差变换系数。变换器101可将残差视频数据从像素值域转换到变换域,例如频域。After prediction processing unit 108 generates a prediction block for the current image block via inter prediction/intra prediction, video encoder 100 forms a residual image block by subtracting the prediction block from the current image block to be encoded. Summer 112 represents one or more components that perform this subtraction operation. Residual video data in the residual block may be included in one or more TUs and applied to transformer 101 . Transformer 101 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform. Transformer 101 may convert residual video data from a pixel value domain to a transform domain, such as a frequency domain.

变换器101可将所得变换系数发送到量化器102。量化器102量化所述变换系数以进一步减小位码率。在一些实例中,量化器102可接着执行对包含经量化的变换系数的矩阵的扫描。或者,熵编码器103可执行扫描。Transformer 101 may send the resulting transform coefficients to quantizer 102 . Quantizer 102 quantizes the transform coefficients to further reduce the bit rate. In some examples, quantizer 102 may then perform a scan of the matrix including the quantized transform coefficients. Alternatively, the entropy encoder 103 may perform scanning.

在量化之后,熵编码器103对经量化变换系数进行熵编码。举例来说,熵编码器103可执行上下文自适应可变长度编码(CAVLC)、上下文自适应二进制算术编码(CABAC)、基于语法的上下文自适应二进制算术编码(SBAC)、概率区间分割熵(PIPE)编码或另一熵编码方法或技术。在由熵编码器103熵编码之后,可将经编码码流发射到视频解码器200,或经存档以供稍后发射或由视频解码器200检索。熵编码器103还可对待编码的当前图像块的语法元素进行熵编码。After quantization, the entropy encoder 103 entropy encodes the quantized transform coefficients. For example, the entropy encoder 103 may perform context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) ) encoding or another entropy encoding method or technique. After entropy encoding by entropy encoder 103 , the encoded codestream may be transmitted to video decoder 200 , or archived for later transmission or retrieval by video decoder 200 . The entropy encoder 103 may also entropy encode the syntax elements of the current image block to be encoded.

反量化器104和反变换器105分别应用逆量化和逆变换以在像素域中重构所述残差块,例如以供稍后用作参考图像的参考块。求和器111将经重构的残差块添加到由帧间预测器110或帧内预测器109产生的预测块,以产生经重构图像块。滤波器单元106可以适用于经重构图像块以减小失真,诸如方块效应(block artifacts)。然后,该经重构图像块作为参考块存储在存储器107中,可由帧间预测器110用作参考块以对后续视频帧或图像中的块进行帧间预测。Inverse quantizer 104 and inverse transformer 105 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain, eg, for later use as a reference block for a reference image. Summer 111 adds the reconstructed residual block to the prediction block produced by inter predictor 110 or intra predictor 109 to produce a reconstructed image block. Filter unit 106 may be applied to reconstructed image blocks to reduce distortions, such as block artifacts. This reconstructed image block is then stored in memory 107 as a reference block, which can be used as a reference block by inter-predictor 110 to inter-predict blocks in subsequent video frames or images.

具体的,视频编码器100具体执行本申请实施例所提供的图像编码方法,输入视频被划分成若干个编码树单元,每个编码树单元又划分成若干个或矩形或方形的编码单元。在当前编码单元选择帧内预测模式进行编码时,对当前编码单元的亮度分量进行若干种预测模式的计算遍历并根据率失真代价选择最优预测模式,对当前编码单元的色度分量进行若干种预测模式的计算遍历并根据率失真代价选择最优预测模式。之后,计算原始视频块与预测块之间的残差,该残差后续一路经过变化与量化、熵编码等形成输出码流,另一路经过反变换与反量化、环路滤波等形成重构样本作为后续视频压缩的参考信息。Specifically, the video encoder 100 specifically implements the image encoding method provided by the embodiment of the present application, the input video is divided into several coding tree units, and each coding tree unit is further divided into several rectangular or square coding units. When the current coding unit selects the intra-frame prediction mode for coding, perform calculation traversal of several prediction modes on the luminance component of the current coding unit, select the optimal prediction mode according to the rate-distortion cost, and perform several prediction modes on the chrominance component of the current coding unit. The calculation of the prediction mode goes through and selects the optimal prediction mode according to the rate-distortion cost. After that, the residual between the original video block and the predicted block is calculated. The residual is subsequently transformed, quantized, and entropy encoded to form an output stream, and the other is subjected to inverse transformation, inverse quantization, and loop filtering to form a reconstructed sample. As reference information for subsequent video compression.

帧内预测器109还可将指示当前编码单元所选帧内预测模式的信息提供到熵编码器103,以便熵编码器103编码指示所选帧内预测模式的信息。The intra predictor 109 may also provide information indicating the selected intra prediction mode for the current coding unit to the entropy encoder 103 so that the entropy encoder 103 encodes the information indicating the selected intra prediction mode.

图11为本申请实施例中所描述的一种视频解码器200的示例框图。在图11的实例中,视频解码器200包括熵解码器203、预测处理单元208、反量化器204、反变换器205、求和器211、滤波器单元206以及存储器207。预测处理单元208可以包括帧间预测器210和帧内预测器209。在一些实例中,视频解码器200可执行大体上与相对于来自图10的视频编码器100描述的编码过程互逆的解码过程。FIG. 11 is an exemplary block diagram of a video decoder 200 described in the embodiments of the present application. In the example of FIG. 11 , video decoder 200 includes entropy decoder 203 , prediction processing unit 208 , inverse quantizer 204 , inverse transformer 205 , summer 211 , filter unit 206 , and memory 207 . Prediction processing unit 208 may include inter predictor 210 and intra predictor 209 . In some examples, video decoder 200 may perform a decoding process that is substantially the reciprocal of the encoding process described with respect to video encoder 100 from FIG. 10 .

在解码过程中,视频解码器200从视频编码器100接收表示经编码视频条带的图像块和相关联的语法元素的经编码视频码流。视频解码器200可从网络实体42接收视频数据,可选的,还可以将所述视频数据存储在视频数据存储器(图中未示意)中。视频数据存储器可存储待由视频解码器200的组件解码的视频数据,例如经编码视频码流。存储在视频数据存储器中的视频数据,例如可从存储装置40、从相机等本地视频源、经由视频数据的有线或无线网络通信或者通过存取物理数据存储媒体而获得。视频数据存储器可作为用于存储来自经编码视频码流的经编码视频数据的经解码图像缓冲器(CPB)。During the decoding process, video decoder 200 receives from video encoder 100 an encoded video codestream representing image blocks of an encoded video slice and associated syntax elements. The video decoder 200 may receive video data from the network entity 42, and optionally, may also store the video data in a video data storage (not shown in the figure). Video data memory may store video data to be decoded by components of video decoder 200, such as an encoded video codestream. The video data stored in the video data store may be obtained, for example, from the storage device 40, from a local video source such as a camera, via wired or wireless network communication of the video data, or by accessing a physical data storage medium. The video data memory may serve as a decoded picture buffer (CPB) for storing encoded video data from the encoded video codestream.

网络实体42可例如为服务器、MANE、视频编辑器/剪接器,或用于实施上文所描述的技术中的一或多者的其它此装置。网络实体42可包括或可不包括视频编码器,例如视频编码器100。在网络实体42将经编码视频码流发送到视频解码器200之前,网络实体42可实施本申请中描述的技术中的部分。在一些视频解码系统中,网络实体42和视频解码器200可为单独装置的部分,而在其它情况下,相对于网络实体42描述的功能性可由包括视频解码器200的相同装置执行。Network entity 42 may be, for example, a server, a MANE, a video editor/splicer, or other such device for implementing one or more of the techniques described above. Network entity 42 may or may not include a video encoder, such as video encoder 100 . Network entity 42 may implement portions of the techniques described in this application before network entity 42 sends the encoded video stream to video decoder 200 . In some video decoding systems, network entity 42 and video decoder 200 may be part of separate devices, while in other cases, functionality described with respect to network entity 42 may be performed by the same device that includes video decoder 200 .

视频解码器200的熵解码器203对码流进行熵解码以产生经量化的系数和一些语法元素。熵解码器203将语法元素转发到预测处理单元208。视频解码器200可接收在视频条带层级和/或图像块层级处的语法元素。当视频条带被解码为经帧内解码(I)条带时,预测处理单元208的帧内预测器209基于发信号通知的帧内预测模式和来自当前帧或图像的先前经解码块的数据而产生当前视频条带的图像块的预测块。当视频条带被解码为经帧间解码(即,B或P)条带时,预测处理单元208的帧间预测器210可基于从熵解码器203接收到的语法元素,确定用于对当前视频条带的当前图像块进行解码的帧间预测模式,基于确定的帧间预测模式,对所述当前图像块进行解码(例如执行帧间预测)。Entropy decoder 203 of video decoder 200 entropy decodes the codestream to generate quantized coefficients and some syntax elements. Entropy decoder 203 forwards the syntax elements to prediction processing unit 208 . Video decoder 200 may receive syntax elements at the video slice level and/or the tile level. When a video slice is decoded as an intra-decoded (I) slice, the intra-predictor 209 of the prediction processing unit 208 is based on the signaled intra-prediction mode and data from previously decoded blocks of the current frame or picture Instead, the prediction block of the image block of the current video slice is generated. When a video slice is decoded as an inter-decoded (ie, B or P) slice, inter predictor 210 of prediction processing unit 208 may determine, based on syntax elements received from entropy decoder 203, which method to use for the current The inter prediction mode in which the current image block of the video slice is decoded, based on the determined inter prediction mode, the current image block is decoded (eg, inter prediction is performed).

反量化器204将在码流中提供且由熵解码器203解码的经量化变换系数逆量化,即去量化。逆量化过程可包括:使用由视频编码器100针对视频条带中的每个图像块计算的量化参数来确定应施加的量化程度以及同样地确定应施加的逆量化程度。反变换器205将逆变换应用于变换系数,例如逆DCT、逆整数变换或概念上类似的逆变换过程,以便产生像素域中的残差块。The inverse quantizer 204 inversely quantizes, ie dequantizes, the quantized transform coefficients provided in the codestream and decoded by the entropy decoder 203 . The inverse quantization process may include using the quantization parameters calculated by the video encoder 100 for each image block in the video slice to determine the degree of quantization that should be applied and, likewise, the degree of inverse quantization that should be applied. The inverse transformer 205 applies an inverse transform to the transform coefficients, such as an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to produce a residual block in the pixel domain.

在帧间预测器210产生用于当前图像块或当前图像块的子块的预测块之后,视频解码器200通过将来自反变换器205的残差块与由帧间预测器210产生的对应预测块求和以得到重建的块,即经解码图像块。求和器211表示执行此求和操作的组件。在需要时,还可使用环路滤波器(在解码环路中或在解码环路之后)来使像素转变平滑或者以其它方式改进视频质量。滤波器单元206可以表示一或多个环路滤波器,例如去块滤波器、自适应环路滤波器(ALF)以及样本自适应偏移(SAO)滤波器。尽管在图11中将滤波器单元206示出为环路内滤波器,但在其它实现方式中,可将滤波器单元206实施为环路后滤波器。After the inter predictor 210 generates a prediction block for the current image block or a sub-block of the current image block, the video decoder 200 performs the prediction by comparing the residual block from the inverse transformer 205 with the corresponding prediction generated by the inter predictor 210 The blocks are summed to obtain a reconstructed block, a decoded image block. Summer 211 represents the component that performs this summation operation. Loop filters may also be used (in the decoding loop or after the decoding loop) to smooth pixel transitions or otherwise improve video quality, if desired. Filter unit 206 may represent one or more loop filters, such as deblocking filters, adaptive loop filters (ALF), and sample adaptive offset (SAO) filters. Although filter unit 206 is shown in FIG. 11 as an in-loop filter, in other implementations filter unit 206 may be implemented as a post-loop filter.

视频解码器200具体执行的图像解码方法包括,输入码流在进行解析、反变换和反量化后,得到当前编码单元的预测模式索引。The image decoding method specifically executed by the video decoder 200 includes: after parsing, inverse transformation and inverse quantization of the input code stream, the prediction mode index of the current coding unit is obtained.

若当前编码单元色度分量的预测模式索引为增强型两步跨分量预测模式,则根据索引值选择仅取来自当前编码单元的上侧或者左侧相邻像素的重构样本进行线性模型的计算,根据线性模型计算得到当前编码单元的色度分量的参考预测块,降采样、并针对降采样后的预测块进行基于正交方向的边界相邻像素的相关性的预测修正,得到最终的色度分量的最终预测块。If the prediction mode index of the chroma component of the current coding unit is the enhanced two-step cross-component prediction mode, select only the reconstructed samples from the upper or left adjacent pixels of the current coding unit according to the index value to calculate the linear model , calculate the reference prediction block of the chrominance component of the current coding unit according to the linear model, downsample, and perform prediction correction based on the correlation of the adjacent pixels of the border in the orthogonal direction for the downsampled prediction block to obtain the final color The final prediction block for the degree component.

后续码流一路作为后续视频解码的参考信息,一路经过后滤波处理输出视频信号。One channel of the subsequent code stream is used as reference information for subsequent video decoding, and the other channel is post-filtered to output the video signal.

应当理解的是,视频解码器200的其它结构变化可用于解码经编码视频码流。例如,视频解码器200可以不经滤波器单元206处理而生成输出视频流;或者,对于某些图像块或者图像帧,视频解码器200的熵解码器203没有解码出经量化的系数,相应地不需要经反量化器204和反变换器205处理。It should be understood that other structural variations of video decoder 200 may be used to decode encoded video codestreams. For example, video decoder 200 may generate an output video stream without being processed by filter unit 206; or, for some image blocks or image frames, entropy decoder 203 of video decoder 200 does not decode quantized coefficients, and accordingly Processing by inverse quantizer 204 and inverse transformer 205 is not required.

具体的,帧内预测器209在预测块的产生过程中可以使用本申请实施例所描述的图像解码方法。Specifically, the intra-frame predictor 209 may use the image decoding method described in the embodiments of the present application in the process of generating the prediction block.

图12A为本申请实施例中图像编码方法的一种流程示意图,该图像编码方法可以应用于图9示出的视频译码系统1中的源装置10或图10示出的视频编码器100。图12A示出的流程以执行主体为图10示出的视频编码器100为例进行说明。如图12A所示,本申请实施例提供的跨分量预测方法包括:FIG. 12A is a schematic flowchart of an image encoding method in an embodiment of the present application. The image encoding method may be applied to the source device 10 in the video decoding system 1 shown in FIG. 9 or the video encoder 100 shown in FIG. 10 . The flow shown in FIG. 12A is described by taking the execution subject as the video encoder 100 shown in FIG. 10 as an example. As shown in FIG. 12A , the cross-component prediction method provided by the embodiment of the present application includes:

步骤110,划分图像,确定当前编码块的色度分量帧内预测模式。Step 110: Divide the image to determine the intra prediction mode of the chrominance component of the current coding block.

其中,所述图像所属的视频的颜色格式包括但不限于4:2:0、4:2:2等。The color format of the video to which the image belongs includes, but is not limited to, 4:2:0, 4:2:2, and the like.

例如,在颜色格式为4:2:0时,如图2中的(c)所示,当前编码块的亮度分量的原始像素块与色度分量的原始像素块的像素比例为4:1,以8*8的正向方像素阵列为例,则对应的亮度分量的原始像素块的尺寸为8*8,则对应的色度分量的原始像素块的尺寸为4*4。For example, when the color format is 4:2:0, as shown in (c) of Figure 2, the pixel ratio of the original pixel block of the luminance component to the original pixel block of the chrominance component of the current coding block is 4:1, Taking an 8*8 positive square pixel array as an example, the size of the original pixel block of the corresponding luminance component is 8*8, and the size of the original pixel block of the corresponding chrominance component is 4*4.

又如,在颜色格式为4:2:2时,如图2中的(b)所示,当前编码块的亮度分量的原始像素块与色度分量的原始像素块的像素比例为2:1,以8*8的正向方像素阵列为例,则对应的亮度分量的原始像素块的尺寸为8*8,则对应的色度分量的原始像素块的尺寸为8*4。For another example, when the color format is 4:2:2, as shown in (b) in FIG. 2 , the pixel ratio of the original pixel block of the luminance component and the original pixel block of the chrominance component of the current coding block is 2:1 , taking an 8*8 positive square pixel array as an example, the size of the original pixel block of the corresponding luminance component is 8*8, and the size of the original pixel block of the corresponding chrominance component is 8*4.

其中,色度分量帧内预测模式最多进行11个色度分量帧内预测模式的计算,其中包括参考单一色度分量信息的5种色度分量帧内预测模式的计算和参考多分量信息的6种色度分量帧内预测模式计算,上述参考单一色度分量信息的帧内色度预测模式即为色度分量普通帧内预测模式。Among them, the chrominance component intra prediction mode performs calculation of up to 11 chrominance component intra prediction modes, including the calculation of 5 chrominance component intra prediction modes referring to single chrominance component information and the reference to multi-component information. The intra-frame prediction mode of various chrominance components is calculated, and the above-mentioned intra-frame chrominance prediction mode referring to a single chrominance component information is the normal intra-frame prediction mode of the chrominance component.

步骤120,根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块。Step 120: Determine the prediction block of the chrominance component of the current coding block according to the intra prediction mode of the chrominance component.

在本可能的示例中,所述根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块,包括:根据所述当前编码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定参考像素;根据所述参考像素确定所述当前编码块的色度分量的预测块。In this possible example, the determining, according to the chrominance component intra prediction mode, the prediction block of the chrominance component of the current coding block includes: according to reconstructed samples of adjacent pixels of the current coding block The available information of the chrominance component and the intra prediction mode of the chrominance component are determined, and a reference pixel is determined; the prediction block of the chrominance component of the current coding block is determined according to the reference pixel.

具体实现中,针对色度分量帧内预测模式采用普通帧内预测模式的情况,可以采用协议约定的方式进行色度分量的预测块的确定,详见前述对普通帧内预测模式的说明,此处不再赘述。In the specific implementation, for the case where the intra prediction mode of the chrominance component adopts the common intra prediction mode, the prediction block of the chrominance component can be determined in the manner agreed in the protocol. It is not repeated here.

在本可能的示例中,所述根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块,包括:确定所述当前编码块的亮度分量帧内预测模式;当所述色度分量帧内预测模式指示使用所述当前编码块的亮度分量确定所述当前编码块的色度分量的预测值时,根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的预测块。In this possible example, the determining, according to the chrominance component intra prediction mode, the prediction block of the chrominance component of the current coding block includes: determining the luminance component intra prediction mode of the current coding block; When the chrominance component intra prediction mode indicates that the predicted value of the chrominance component of the current coding block is determined using the luminance component of the current coding block, the current coding is determined according to the luminance component intra prediction mode The prediction block for the chroma components of the block.

其中,如图5A所示,帧内编码亮度分量计算最多65个帧内预测模式,具体实现中,亮度分量进行最多62个角度预测模式和3个非角度预测模式的计算并选出一个最优帧内预测模式进行传输。所述当前编码块的亮度分量帧内预测模式为多个帧内预测模式中码率失真代价最优的预测模式,所述多个帧内预测模式为所述当前编码块的亮度分量的帧内预测所使用的帧内预测模式。Among them, as shown in FIG. 5A , the intra-coded luminance component calculates up to 65 intra-frame prediction modes. In the specific implementation, the luminance component calculates up to 62 angular prediction modes and 3 non-angle prediction modes, and selects an optimal one. Intra prediction mode for transmission. The intra prediction mode of the luminance component of the current coding block is a prediction mode with the best rate distortion cost among multiple intra prediction modes, and the multiple intra prediction modes are the intra prediction modes of the luminance component of the current coding block. Intra prediction mode used for prediction.

在本可能的示例中,所述根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的预测块,包括:根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的参考预测块;对所述当前编码块的色度分量的参考预测块进行滤波,得到所述当前编码块的色度分量的预测块。In this possible example, the determining the prediction block of the chrominance component of the current coding block according to the luminance component intra prediction mode includes: determining the current coding according to the luminance component intra prediction mode the reference prediction block of the chrominance component of the block; filtering the reference prediction block of the chrominance component of the current coding block to obtain the prediction block of the chrominance component of the current coding block.

具体实现中,设备可以在判断出所述亮度分量帧内预测模式为预设帧内预测模式的情况下,确定所述色度分量帧内预测模式指示使用所述当前编码块的亮度分量确定所述当前编码块的色度分量的预测值。所述预设帧内预测模式为预设方向的亮度分量帧内预测模式,该预设方向包括但不限于水平方向(例如:如图1所述的二维直角坐标系XoY中沿X轴方向)、垂直方向(例如:如图1所示的二维直角坐标系XoY中沿Y轴负向方向)。In a specific implementation, the device may determine that the chrominance component intra prediction mode indicates that the luminance component of the current coding block is used to determine the The predicted value of the chrominance component of the current coded block. The preset intra prediction mode is a luminance component intra prediction mode in a preset direction, and the preset direction includes but is not limited to the horizontal direction (for example: the direction along the X axis in the two-dimensional rectangular coordinate system XoY as shown in FIG. 1 ) ), the vertical direction (for example: the negative direction along the Y axis in the two-dimensional rectangular coordinate system XoY as shown in Figure 1).

在本可能的示例中,所述对所述当前编码块的色度分量的参考预测块进行滤波,包括:使用第三滤波器对所述当前编码块的色度分量的参考预测块进行滤波。In this possible example, the filtering the reference prediction block of the chroma component of the current coding block includes: using a third filter to filter the reference prediction block of the chroma component of the current coding block.

在本可能的示例中,所述第三滤波器包括用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器和用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器。In this possible example, the third filter includes a filter for filtering the left boundary pixel area of the reference prediction block for the chrominance component and a reference prediction block for the chrominance component The filter that filters the non-left boundary pixel area.

在本可能的示例中,所述用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器包括第三两抽头滤波器;所述第三两抽头滤波器包括:In this possible example, the filter for filtering the left boundary pixel region of the reference prediction block of the chrominance component includes a third two-tap filter; the third two-tap filter includes:

PC(x,y)=(P′C(2x,2y)+P′C(2x,2y+1)+1)>>1P C (x, y)=(P' C (2x, 2y)+P' C (2x, 2y+1)+1)>>1

其中,x,y为像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast samples.

在本可能的示例中,所述用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器包括第一六抽头滤波器;所述第一六抽头滤波器包括:In this possible example, the filter for filtering the non-left boundary pixel region of the reference prediction block of the chrominance component includes a first six-tap filter; the first six-tap filter includes :

Figure BDA0003691739840000141
Figure BDA0003691739840000141

其中,x,y为当前像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the current pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast sample.

在本可能的示例中,所述根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的参考预测块,包括:根据所述亮度分量帧内预测模式,确定所述当前编码块的亮度分量的重构块;根据所述当前编码块的亮度分量的重构块,确定所述当前编码块的色度分量的参考预测块。In this possible example, the determining the reference prediction block of the chrominance component of the current coding block according to the luminance component intra prediction mode includes: determining the current coding block according to the luminance component intra prediction mode A reconstructed block of the luminance component of the coding block; and determining a reference prediction block of the chrominance component of the current coding block according to the reconstructed block of the luminance component of the current coding block.

其中,所述色度分量的参考预测块的尺寸与所述亮度分量的重构块的尺寸相同。例如如图8所示的预测过程中的亮度分量的重构块和色度分量的参考预测块均为8*8像素阵列。The size of the reference prediction block of the chrominance component is the same as the size of the reconstructed block of the luminance component. For example, as shown in FIG. 8 , the reconstructed block of the luminance component and the reference prediction block of the chrominance component in the prediction process are both 8*8 pixel arrays.

在本可能的示例中,所述根据所述当前编码块的亮度分量的重构块,确定所述当前编码块的色度分量的参考预测块,包括:确定利用所述当前编码块的亮度分量的重构块进行跨分量预测的线性模型;根据所述线性模型计算所述亮度分量的重构块,得到所述当前编码块的色度分量的参考预测块。In this possible example, the determining, according to the reconstructed block of the luminance component of the current coding block, the reference prediction block of the chrominance component of the current coding block includes: determining to use the luminance component of the current coding block A linear model for performing cross-component prediction on the reconstructed block; calculating the reconstructed block of the luminance component according to the linear model to obtain a reference prediction block of the chrominance component of the current coding block.

其中,所述线性模型例如可以是前述公式(1)或(2)(3)的线性模型。Wherein, the linear model may be, for example, the linear model of the aforementioned formulas (1) or (2) and (3).

在本可能的示例中,所述确定利用所述当前编码块的亮度分量的重构块进行跨分量预测的线性模型,包括:确定用于计算所述线性模型的参考像素,所述参考像素包括所述当前编码块的至少一个相邻像素;根据所述参考像素计算所述线性模型。In this possible example, the determining a linear model for performing cross-component prediction using the reconstructed block of the luminance component of the current coding block includes: determining a reference pixel for calculating the linear model, the reference pixel including at least one adjacent pixel of the current coding block; calculating the linear model from the reference pixel.

其中,所述用于计算线性模型的参考像素的选取可以扩展到当前编码块的左下侧、左侧、左上侧、上侧以及右上侧的相邻像素。The selection of the reference pixels for calculating the linear model may be extended to adjacent pixels on the lower left side, the left side, the upper left side, the upper side and the upper right side of the current coding block.

可选的,若当前编码块为当前编码块中的部分图像块,则设备可以从多个线性模型中选择适配所述当前编码块的线性模型,具体可以根据图像特性针对当前编码块选择适配的线性模型,由于该线性模型的系数还未确定,还需要根据参考像素进行计算得到。可见,设备针对当前编码块的色度分量预测,能够提供相对于编码块更加精细化的预测机制,实现更精细化的图像预测。Optionally, if the current encoding block is a partial image block in the current encoding block, the device may select a linear model adapted to the current encoding block from multiple linear models, and specifically may select an appropriate image block for the current encoding block according to image characteristics. Since the coefficient of the linear model has not yet been determined, it needs to be calculated according to the reference pixels. It can be seen that the device can provide a more refined prediction mechanism relative to the encoding block for the chrominance component prediction of the current encoding block, and achieve more refined image prediction.

在本可能的示例中,所述确定用于计算所述线性模型的参考像素,包括:根据所述当前编码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定用于计算所述线性模型的参考像素。In this possible example, the determining a reference pixel for calculating the linear model includes: according to available information of reconstructed samples of adjacent pixels of the current coding block and the chrominance component intra prediction mode , determine the reference pixels used to calculate the linear model.

其中,所述当前编码块的色度分量帧内预测模式包括TSCPM_T、TSCPM_L、MCPM_T、MCPM_L中的任意一种。所述可用信息具体包括两侧可用和单侧可用(例如:左侧可用和右侧可用)。下面进行详细说明。Wherein, the chrominance component intra prediction mode of the current coding block includes any one of TSCPM_T, TSCPM_L, MCPM_T, and MCPM_L. The available information specifically includes available on both sides and available on one side (for example: available on the left side and available on the right side). A detailed description will be given below.

若当前编码块的色度分量帧内预测模式为TSCPM_T或MCPM_T,且当前编码块对应的原始像素块的上侧相邻像素的重构样本和当前编码块对应的原始像素块的左侧相邻像素的重构样本可用,则用于计算线性模型的系数的参考相邻像素为原始像素块的上侧相邻像素中的4个,如图6中(b)所示。If the intra prediction mode of the chroma component of the current coding block is TSCPM_T or MCPM_T, and the reconstructed samples of the adjacent pixels on the upper side of the original pixel block corresponding to the current coding block are adjacent to the left side of the original pixel block corresponding to the current coding block If the reconstructed samples of the pixels are available, the reference adjacent pixels used to calculate the coefficients of the linear model are 4 of the upper adjacent pixels of the original pixel block, as shown in (b) of FIG. 6 .

若当前编码块的色度分量帧内预测模式为TSCPM_L或MCPM_L,且当前编码块对应的原始像素块的上侧相邻像素的重构样本和当前编码块对应的原始像素块的左侧相邻像素的重构样本可用,则用于计算线性模型的系数的参考相邻像素为原始像素块的做侧相邻像素中的4个,如图6中(c)所示。If the intra prediction mode of the chroma component of the current coding block is TSCPM_L or MCPM_L, and the reconstructed samples of the adjacent pixels on the upper side of the original pixel block corresponding to the current coding block are adjacent to the left side of the original pixel block corresponding to the current coding block If the reconstructed samples of the pixels are available, the reference adjacent pixels used to calculate the coefficients of the linear model are 4 of the adjacent pixels on the side of the original pixel block, as shown in (c) in FIG. 6 .

可见,本示例中,用于计算线性模型的系数的参考相邻像素可以根据相邻像素的重构样本的可用性和色度分量帧内预测模式进行灵活设置。It can be seen that in this example, the reference adjacent pixels used for calculating the coefficients of the linear model can be flexibly set according to the availability of reconstructed samples of adjacent pixels and the intra prediction mode of the chrominance component.

在本可能的示例中,所述确定用于计算所述线性模型的参考像素,包括:根据所述当前编码块的相邻编码块的码率失真代价最优的亮度分量帧内预测模式,确定用于计算所述线性模型的参考像素。In this possible example, the determining a reference pixel for calculating the linear model includes: determining a luminance component intra prediction mode with an optimal rate-distortion cost of adjacent encoding blocks of the current encoding block, determining Reference pixels for computing the linear model.

其中,所述相邻编码块的亮度分量的码率失真代价最优的帧内预测模式可以与当前编码块的亮度分量的码率失真代价最优的帧内预测模式相同,也可能不同。The intra-frame prediction mode with the optimal rate-distortion cost of the luminance component of the adjacent coding block may be the same as or different from the intra-frame prediction mode with the optimal rate-distortion cost of the luminance component of the current coding block.

步骤130,对所述当前编码块的色度分量的预测块进行预测修正,得到所述当前编码块的色度分量的修正后的预测块。Step 130: Perform prediction modification on the prediction block of the chrominance component of the current coding block to obtain the modified prediction block of the chrominance component of the current coding block.

在本可能的示例中,所述对所述当前编码块的色度分量的预测块进行预测修正,包括:根据所述色度分量帧内预测模式确定滤波器;使用所述滤波器对所述当前编码块的色度分量的预测块进行预测修正。In this possible example, the performing prediction modification on the prediction block of the chrominance component of the current coding block includes: determining a filter according to the intra prediction mode of the chrominance component; The prediction block of the chrominance component of the current coding block performs prediction correction.

在本可能的示例中,所述根据所述色度分量帧内预测模式确定滤波器,包括:当所述色度分量帧内预测模式为TSCPM_T或者MCPM_T或者普通帧内垂直类角度预测模式时,所述滤波器设置为第一滤波器。In this possible example, the determining the filter according to the chrominance component intra prediction mode includes: when the chrominance component intra prediction mode is TSCPM_T or MCPM_T or a normal intra vertical class angle prediction mode, The filter is set as the first filter.

在本可能的示例中,所述第一滤波器用于对与所述当前编码块的色度分量的预测块的左侧边界相邻的像素区域和所述当前编码块的色度分量的预测块的像素区域进行滤波。In this possible example, the first filter is configured to perform the filtering of a pixel region adjacent to the left border of the prediction block of the chroma component of the current coding block and the prediction block of the chroma component of the current coding block The pixel area of is filtered.

在本可能的示例中,所述第一滤波器包括第一两抽头滤波器;所述第一两抽头滤波器包括:In this possible example, the first filter includes a first two-tap filter; the first two-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the coding block, P(-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

举例来说,如图12B所示的在4*4像素阵列,以色度分量的预测块中的像素和左侧边界相邻像素为例,首先,针对像素a和左侧边界相邻像素1使用第一两抽头滤波器进行降采样形成色度分量的修正后的预测块的像素A,在水平方向上,针对像素b和左侧边界相邻像素1使用第一两抽头滤波器进行降采样形成色度分量的修正后的预测块的像素B,其他列以此类推,直至针对像素p和左侧边界相邻像素4使用第一两抽头滤波器进行降采样形成色度分量的修正后的预测块的像素P。For example, in a 4*4 pixel array as shown in FIG. 12B, taking the pixels in the prediction block of the chrominance component and the adjacent pixels on the left side as an example, first, for pixel a and the adjacent pixel 1 on the left side Downsampling using the first two-tap filter to form pixel A of the modified prediction block for the chrominance components, horizontally, downsampling using the first two-tap filter for pixel b and the left border neighbor pixel 1 Pixel B forming the modified prediction block for the chrominance components, and so on for the other columns, until downsampling using the first two-tap filter for pixel p and the left border adjacent pixel 4 forms the modified chrominance component. Pixel P of the prediction block.

在本可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离。In this possible example, the horizontal filter coefficients are determined by a first set of parameters, and the first set of parameters includes the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(-1, y) the distance between.

其中,上述水平滤波系数的取值与当前编码块的色度分量的尺寸以及当前色度分量的预测块中预测像素与左侧相邻像素之间的距离有关。The value of the above-mentioned horizontal filter coefficient is related to the size of the chrominance component of the current coding block and the distance between the predicted pixel and the left adjacent pixel in the prediction block of the current chrominance component.

具体来说,上述滤波系数的选取与色度分量的尺寸有关,根据当前编码块的色度分量的预测块的大小划分成不同的滤波器系数组,根据当前色度分量的预测块的尺寸选择对应的滤波器系数组。上述水平滤波系数的选取与预测像素到左侧相邻像素的距离有关,将当前预测的像素到左侧相邻像素的距离作为索引值,从相对应的滤波器系数组中选取对应的滤波系数。帧内色度预测滤波系数具体如表1所示,值得注意的是表格中所有系数在具体编码过程中均可以进行放大并移位操作以减少计算复杂度。Specifically, the selection of the above filter coefficients is related to the size of the chrominance component, and is divided into different filter coefficient groups according to the size of the prediction block of the chrominance component of the current coding block, and is selected according to the size of the prediction block of the current chrominance component. The corresponding set of filter coefficients. The selection of the above-mentioned horizontal filter coefficients is related to the distance from the predicted pixel to the adjacent pixel on the left. The distance from the currently predicted pixel to the adjacent pixel on the left is used as the index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. . The intra-frame chrominance prediction filter coefficients are specifically shown in Table 1. It is worth noting that all coefficients in the table can be enlarged and shifted in the specific encoding process to reduce computational complexity.

表1帧内色度预测滤波系数Table 1 Intra-frame chroma prediction filter coefficients

Figure BDA0003691739840000161
Figure BDA0003691739840000161

Figure BDA0003691739840000171
Figure BDA0003691739840000171

此外,该技术的滤波器系数可以采用系数截断方式减少系数存储,即在当前预测的像素到左侧相邻像素的距离大于10的所有像素的滤波系数一致。In addition, the filter coefficients of this technology can use a coefficient truncation method to reduce coefficient storage, that is, the filter coefficients of all pixels whose distance from the currently predicted pixel to the left adjacent pixel is greater than 10 are consistent.

在本可能的示例中,所述根据所述色度分量帧内预测模式确定滤波器,包括:当所述色度分量帧内预测模式为TSCPM_L或者MCPM_L或者普通帧内水平类角度预测模式时,所述滤波器设置为第二滤波器。In this possible example, the determining the filter according to the chrominance component intra prediction mode includes: when the chrominance component intra prediction mode is TSCPM_L or MCPM_L or a normal intra horizontal angle prediction mode, The filter is set as a second filter.

在本可能的示例中,所述第二滤波器用于对与所述当前编码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前编码块的色度分量的预测块的像素区域进行滤波。In this possible example, the second filter is used to perform the filtering of the pixel region adjacent to the upper boundary of the prediction block of the chrominance component of the current coding block and the prediction block of the chrominance component of the current coding block The pixel area of is filtered.

在本可能的示例中,所述第二滤波器包括第二两抽头滤波器;所述第二两抽头滤波器包括:In this possible example, the second filter includes a second two-tap filter; the second two-tap filter includes:

P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)P'(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chrominance component of the coding block, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

举例来说,如图12C所示的在4*4像素阵列,以色度分量的预测块中的像素和上侧边界相邻像素为例,首先,针对像素a和上侧边界相邻像素1使用第二两抽头滤波器进行降采样形成色度分量的修正后的预测块的像素A,在垂直方向上,针对像素e和上侧边界相邻像素1使用第二两抽头滤波器进行降采样形成色度分量的修正后的预测块的像素E,其他列以此类推,直至针对像素p和上侧边界相邻像素4使用第二两抽头滤波器进行降采样形成色度分量的修正后的预测块的像素P。For example, in a 4*4 pixel array as shown in FIG. 12C, taking the pixel in the prediction block of the chrominance component and the upper boundary adjacent pixel as an example, first, for pixel a and the upper boundary adjacent pixel 1 Downsampling using a second two-tap filter to form pixel A of the modified prediction block for the chrominance components, downsampling in the vertical direction using a second two-tap filter for pixel e and upper border neighbor pixel 1 Pixel E of the modified prediction block forming the chrominance component, and so on for the other columns, until downsampling using a second two-tap filter for pixel p and the upper border adjacent pixel 4 forms the modified chrominance component. Pixel P of the prediction block.

在本可能的示例中,所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。In this possible example, the vertical filter coefficients are determined by a second set of parameters, the second set of parameters including the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(x, − 1) the distance between.

其中,上述垂直滤波系数的取值与当前编码块的色度分量的尺寸以及当前色度分量的预测块中预测像素与左侧相邻像素之间的距离有关。Wherein, the value of the vertical filter coefficient is related to the size of the chrominance component of the current coding block and the distance between the predicted pixel and the left adjacent pixel in the prediction block of the current chrominance component.

具体来说,上述滤波系数的选取与色度分量的尺寸有关,根据当前编码块的色度分量的预测块的大小划分成不同的滤波器系数组,根据当前色度分量的预测块的尺寸选择对应的滤波器系数组。上述垂直滤波系数的选取与预测像素到上侧相邻像素的距离有关,将当前预测的像素到上侧相邻像素的距离作为索引值,从相对应的滤波器系数组中选取对应的滤波系数。帧内色度预测滤波系数具体如表1所示。Specifically, the selection of the above filter coefficients is related to the size of the chrominance component, and is divided into different filter coefficient groups according to the size of the prediction block of the chrominance component of the current coding block, and is selected according to the size of the prediction block of the current chrominance component. The corresponding set of filter coefficients. The selection of the above-mentioned vertical filter coefficients is related to the distance from the predicted pixel to the adjacent pixel on the upper side, and the distance from the currently predicted pixel to the adjacent pixel on the upper side is used as the index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. . The intra-frame chrominance prediction filter coefficients are specifically shown in Table 1.

在本可能的示例中,所述根据所述色度分量帧内预测模式确定滤波器,包括:当所述色度分量帧内预测模式为普通帧内非角度预测模式时,所述滤波器设置为第三滤波器。In this possible example, the determining the filter according to the chrominance component intra prediction mode includes: when the chrominance component intra prediction mode is a normal intra non-angular prediction mode, setting the filter to is the third filter.

在本可能的示例中,所述第三滤波器用于对与所述当前编码块的色度分量的预测块的左侧边界相邻的像素区域、与所述当前编码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前编码块的色度分量的预测块的像素区域进行滤波。In this possible example, the third filter is used for predicting the pixel region adjacent to the left boundary of the prediction block of the chroma component of the current coding block and the chroma component of the current coding block The pixel area adjacent to the upper boundary of the block and the pixel area of the prediction block of the chrominance component of the current coding block are filtered.

在本可能的示例中,所述第三滤波器包括第一三抽头滤波器;所述第一三抽头滤波器包括:In this possible example, the third filter includes a first three-tap filter; the first three-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)P'(x, y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P( x, y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the coding block, P(-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left boundary, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) of the pixel (x, y), f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

举例来说,如图12D所示的在4*4像素阵列,以色度分量的预测块中的像素和上侧边界相邻像素以及左侧边界相邻像素为例,首先,针对像素a和上侧边界相邻像素1和左侧相邻像素5使用第一三抽头滤波器进行降采样形成色度分量的修正后的预测块的像素A,在垂直方向上,针对像素e、上侧边界相邻像素1和左侧边界相邻像素6使用第一三抽头滤波器进行降采样形成色度分量的修正后的预测块的像素E,其他列以此类推,直至针对像素p、上侧边界相邻像素4、左侧边界相邻像素8使用第一三抽头滤波器进行降采样形成色度分量的修正后的预测块的像素P。For example, in a 4*4 pixel array as shown in FIG. 12D, taking the pixels in the prediction block of chrominance components and the adjacent pixels on the upper side and the adjacent pixels on the left side as an example, first, for pixels a and The upper boundary adjacent pixel 1 and the left adjacent pixel 5 are downsampled using the first three-tap filter to form pixel A of the corrected prediction block for the chrominance components, vertically, for pixel e, upper boundary Neighboring pixel 1 and neighboring pixel 6 on the left border are downsampled using the first three-tap filter to form pixel E of the modified prediction block for the chrominance components, and so on for other columns, until pixel p, the upper border The adjacent pixels 4 and 8 adjacent to the left border are down-sampled using the first three-tap filter to form the pixels P of the modified prediction block of chrominance components.

在本可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离;In this possible example, the horizontal filter coefficients are determined by a first set of parameters, and the first set of parameters includes the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(-1, y) the distance between;

所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。The vertical filter coefficients are determined by a second set of parameters including the size of the prediction block of the chrominance components and the distance between pixel (x,y) and pixel P(x,-1).

其中,上述垂直滤波系数、水平滤波系数的取值与当前编码块的色度分量的尺寸以及当前色度分量的预测块中预测像素与左侧相邻像素之间的距离有关。The values of the vertical filter coefficients and the horizontal filter coefficients are related to the size of the chrominance component of the current coding block and the distance between the predicted pixel and the left adjacent pixel in the prediction block of the current chrominance component.

具体来说,上述滤波系数的选取与色度分量的尺寸有关,根据当前编码块的色度分量的预测块的大小划分成不同的滤波器系数组,根据当前色度分量的预测块的尺寸选择对应的滤波器系数组。上述垂直滤波系数的选取与预测像素到上侧相邻像素的距离有关,将当前预测的像素到上侧相邻像素的距离作为索引值,从相对应的滤波器系数组中选取对应的滤波系数。帧内色度预测滤波系数具体如表1所示。Specifically, the selection of the above filter coefficients is related to the size of the chrominance component, and is divided into different filter coefficient groups according to the size of the prediction block of the chrominance component of the current coding block, and is selected according to the size of the prediction block of the current chrominance component. The corresponding set of filter coefficients. The selection of the above-mentioned vertical filter coefficients is related to the distance from the predicted pixel to the adjacent pixel on the upper side, and the distance from the currently predicted pixel to the adjacent pixel on the upper side is used as the index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. . The intra-frame chrominance prediction filter coefficients are specifically shown in Table 1.

此外,该技术的滤波器系数可以采用系数截断方式减少系数存储,即在当前预测的像素到上侧相邻像素的距离大于10的所有像素的滤波系数一致。In addition, the filter coefficients of this technology can use a coefficient truncation method to reduce coefficient storage, that is, the filter coefficients of all pixels whose distances from the currently predicted pixel to the upper adjacent pixel are greater than 10 are consistent.

具体实现中,当前编码块的色度分量的修正后的预测块确定后,设备可以进一步计算出色度分量的重构块,根据色度分量的重构块和亮度分量的重构块确定当前编码块的重构图像块。In the specific implementation, after the corrected prediction block of the chrominance component of the current coding block is determined, the device may further calculate the reconstructed block of the chrominance component, and determine the current coding according to the reconstructed block of the chrominance component and the reconstructed block of the luminance component The reconstructed image block of the block.

可见,本申请实施例中,相比于现有技术,本申请方案利用相邻编码块与当前编码块的空间关联性修正当前编码块的色度分量的预测样本,提高预测准确度和编码效率。It can be seen that, in the embodiment of the present application, compared with the prior art, the solution of the present application uses the spatial correlation between the adjacent coding block and the current coding block to correct the prediction samples of the chrominance components of the current coding block, so as to improve the prediction accuracy and coding efficiency .

在一个可能的示例中,所述对所述当前编码块的色度分量的预测块进行预测修正,包括:计算所述当前编码块在未修正情况下的第一率失真代价,以及计算所述当前编码块的已修正情况下的第二率失真代价;确定所述第一率失真代价大于所述第二率失真代价;对所述当前编码块的色度分量的预测块进行预测修正。In a possible example, the performing prediction modification on the prediction block of the chrominance component of the current coding block includes: calculating a first rate-distortion cost of the current coding block without modification, and calculating the a second rate-distortion cost in the corrected case of the current coding block; determining that the first rate-distortion cost is greater than the second rate-distortion cost; performing prediction modification on the prediction block of the chrominance component of the current coding block.

可见,本示例中,不增加率失真代价计算次数,不需要进行额外的率失真代价计算,避免了大量的计算复杂度增加。It can be seen that in this example, the number of rate-distortion cost calculations is not increased, and additional rate-distortion cost calculations are not required, thereby avoiding a large increase in computational complexity.

在一个可能的示例中,所述对所述当前编码块的色度分量的预测块进行预测修正,包括:计算所述当前编码块在未修正情况下的第一率失真代价,以及计算所述当前编码块的已修正情况下的第二率失真代价;确定所述第一率失真代价大于所述第二率失真代价,设置色度修正标识位为第一数值,所述第一数值用于指示需要进行所述预测修正;对所述当前编码块的色度分量的预测块进行预测修正。In a possible example, the performing prediction modification on the prediction block of the chrominance component of the current coding block includes: calculating a first rate-distortion cost of the current coding block without modification, and calculating the The second rate-distortion cost of the current coding block under the corrected condition; it is determined that the first rate-distortion cost is greater than the second rate-distortion cost, and the chrominance correction flag is set to a first value, and the first value is used for Indicates that the prediction modification needs to be performed; and performs prediction modification on the prediction block of the chrominance component of the current coding block.

在本可能的示例中,所述方法还包括:确定所述第一率失真代价小于或等于所述第二率失真代价,设置所述色度修正标识位为第二数值,所述第二数值用于指示不需要进行所述预测修正。In this possible example, the method further includes: determining that the first rate-distortion cost is less than or equal to the second rate-distortion cost, and setting the chrominance correction flag to a second value, the second value Used to indicate that the prediction correction is not required.

具体实现中,所述色度修正标识位可以是单个或多个比特位,例如单个比特位时,第一数值可以是1,第二数值可以是0,此处不做唯一限定。In a specific implementation, the chrominance correction identification bit may be a single or multiple bits. For example, in a single bit, the first value may be 1, and the second value may be 0, which is not uniquely limited herein.

在本可能的示例中,所述色度修正标识位与亮度修正标识位共用。In this possible example, the chrominance correction flag is shared with the luminance correction flag.

在本可能的示例中,所述色度修正标识位独立使用。In this possible example, the chrominance correction flags are used independently.

在一个可能的示例中,上述适用于当前编码块的线性模型可以换成逐行适用的线性模型。In a possible example, the above-mentioned linear model applicable to the current coding block may be replaced by a line-by-line applicable linear model.

在一个可能的示例中,将现有协议中的标识位表示增加到:每个色度分量分别用一个标识位表示是否使用预测修正技术。In a possible example, the identification bit representation in the existing protocol is added to: each chrominance component uses an identification bit to indicate whether the prediction correction technology is used.

在一个可能的示例中,可以仅针对色度分量预测模式中的个别预测模式使用本申请的色度分量的预测修正技术。In one possible example, the prediction modification techniques of the present application for chroma components may be used only for individual ones of the chroma component prediction modes.

在一个可能的示例中,可以根据当前编码块的相邻块的预测修正技术使用信息来判断是否提前取消或直接使用预测修正技术。In a possible example, whether to cancel in advance or directly use the prediction modification technique may be determined according to the prediction modification technique usage information of the adjacent blocks of the current coding block.

与图12A所述的图像编码方法对应的,图13为本申请实施例中图像编码方法的一种流程示意图,该图像编码方法可以应用于图9示出的视频译码系统1中的目的装置20或图11示出的视频解码器200。图13示出的流程以执行主体为图11示出的视频编码器200为例进行说明。如图13所示,本申请实施例提供的跨分量预测方法包括:Corresponding to the image encoding method described in FIG. 12A , FIG. 13 is a schematic flowchart of the image encoding method in the embodiment of the application, and the image encoding method can be applied to the target device in the video decoding system 1 shown in FIG. 9 . 20 or the video decoder 200 shown in FIG. 11 . The flow shown in FIG. 13 is described by taking the execution subject as the video encoder 200 shown in FIG. 11 as an example. As shown in FIG. 13 , the cross-component prediction method provided by the embodiment of the present application includes:

步骤210,解析码流,确定当前解码块的色度分量帧内预测模式。Step 210: Parse the code stream to determine the intra prediction mode of the chrominance component of the current decoding block.

其中,所述码流的视频的颜色格式包括但不限于4:2:0、4:2:2等。Wherein, the color format of the video of the code stream includes but is not limited to 4:2:0, 4:2:2, and the like.

具体实现中,所述码流经过熵解码可以获取到语法元素,该语法元素用于确定对当前解码块进行预测的亮度分量帧内预测模式和色度分量帧内预测模式。其中,所述亮度分量帧内预测模式为多个帧内预测模式中的最优亮度分量帧内预测模式,多个帧内预测模式为亮度分量的帧内预测所使用的帧内预测模式。In a specific implementation, a syntax element can be obtained from the code stream through entropy decoding, and the syntax element is used to determine a luma component intra prediction mode and a chroma component intra prediction mode for predicting the current decoding block. The luminance component intra prediction mode is an optimal luminance component intra prediction mode among the multiple intra prediction modes, and the multiple intra prediction modes are intra prediction modes used for the luminance component intra prediction.

步骤220,根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块;Step 220, according to the chrominance component intra prediction mode, determine the prediction block of the chrominance component of the current decoding block;

在本可能的示例中,所述根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块,包括:根据所述当前解码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定参考像素;根据所述参考像素确定所述当前解码块的色度分量的预测块。In this possible example, the determining, according to the chrominance component intra prediction mode, the prediction block of the chrominance component of the current decoding block includes: according to reconstructed samples of adjacent pixels of the current decoding block The available information of the chrominance component and the intra prediction mode of the chrominance component are determined, and a reference pixel is determined; the prediction block of the chrominance component of the current decoding block is determined according to the reference pixel.

在本可能的示例中,所述根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块,包括:确定所述当前解码块的亮度分量帧内预测模式;当所述色度分量帧内预测模式指示使用所述当前解码块的亮度分量的重构块确定所述当前解码块的色度分量的预测值时,根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的预测块。In this possible example, the determining, according to the chrominance component intra prediction mode, the prediction block of the chrominance component of the current decoding block includes: determining the luma component intra prediction mode of the current decoding block; When the chrominance component intra prediction mode indicates that the predicted value of the chrominance component of the current decoding block is determined using the reconstructed block of the luma component of the current decoding block, according to the luma component intra prediction mode, determine The prediction block for the chroma components of the current decoded block.

在本可能的示例中,所述根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的预测块,包括:根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的参考预测块;对所述当前解码块的色度分量的参考预测块进行滤波,得到所述当前解码块的色度分量的预测块。In this possible example, the determining the prediction block of the chrominance component of the currently decoded block according to the luma component intra prediction mode includes: determining the currently decoded block according to the luma component intra prediction mode the reference prediction block of the chrominance component of the block; filtering the reference prediction block of the chrominance component of the current decoding block to obtain the prediction block of the chrominance component of the current decoding block.

具体实现中,设备可以在判断出所述亮度分量帧内预测模式为预设帧内预测模式的情况下,确定所述色度分量帧内预测模式指示使用所述当前解码块的亮度分量确定所述当前解码块的色度分量。所述预设帧内预测模式为预设方向的亮度分量帧内预测模式,该预设方向包括但不限于水平方向(例如:如图1所述的二维直角坐标系XoY中沿X轴方向)、垂直方向(例如:如图1所示的二维直角坐标系XoY中沿Y轴负向方向)。In a specific implementation, the device may determine that the chrominance component intra prediction mode indicates that the luminance component of the current decoding block is used to determine the the chroma components of the current decoded block. The preset intra prediction mode is a luminance component intra prediction mode in a preset direction, and the preset direction includes but is not limited to the horizontal direction (for example: the direction along the X axis in the two-dimensional rectangular coordinate system XoY as shown in FIG. 1 ) ), the vertical direction (for example: the negative direction along the Y axis in the two-dimensional rectangular coordinate system XoY as shown in Figure 1).

在本可能的示例中,所述对所述当前解码块的色度分量的参考预测块进行滤波,包括:使用第三滤波器对所述当前解码块的色度分量的参考预测块进行滤波。In this possible example, the filtering the reference prediction block of the chroma component of the current decoding block includes: using a third filter to filter the reference prediction block of the chroma component of the current decoding block.

在本可能的示例中,所述第三滤波器包括用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器和用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器。In this possible example, the third filter includes a filter for filtering the left boundary pixel area of the reference prediction block for the chrominance component and a reference prediction block for the chrominance component The filter that filters the non-left boundary pixel area.

在本可能的示例中,所述用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器包括第三两抽头滤波器;所述第三两抽头滤波器包括:In this possible example, the filter for filtering the left boundary pixel region of the reference prediction block of the chrominance component includes a third two-tap filter; the third two-tap filter includes:

PC(x,y)=(P′C(2x,2y)+P′C(2x,2y+1)+1)>>1P C (x, y)=(P' C (2x, 2y)+P' C (2x, 2y+1)+1)>>1

其中,x,y为像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast samples.

在本可能的示例中,所述用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器包括第一六抽头滤波器;所述第一六抽头滤波器包括:In this possible example, the filter for filtering the non-left boundary pixel region of the reference prediction block of the chrominance component includes a first six-tap filter; the first six-tap filter includes :

Figure BDA0003691739840000201
Figure BDA0003691739840000201

其中,x,y为当前像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the current pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast sample.

在本可能的示例中,所述根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的参考预测块,包括:根据所述亮度分量帧内预测模式,确定所述当前解码块的亮度分量的重构块;根据所述当前解码块的亮度分量的重构块,确定所述当前解码块的色度分量的参考预测块。In this possible example, the determining the reference prediction block of the chrominance component of the current decoding block according to the luminance component intra prediction mode includes: determining the current decoding block according to the luminance component intra prediction mode A reconstructed block of the luminance component of the decoded block; and a reference prediction block of the chrominance component of the current decoded block is determined according to the reconstructed block of the luminance component of the current decoded block.

其中,所述色度分量的参考预测块的尺寸与所述亮度分量的重构块的尺寸相同。例如如图8所示的预测过程中的亮度分量的重构块和色度分量的参考预测块均为8*8像素阵列。The size of the reference prediction block of the chrominance component is the same as the size of the reconstructed block of the luminance component. For example, as shown in FIG. 8 , the reconstructed block of the luminance component and the reference prediction block of the chrominance component in the prediction process are both 8*8 pixel arrays.

在本可能的示例中,所述根据所述当前解码块的亮度分量的重构块,确定所述当前解码块的色度分量的参考预测块,包括:确定利用所述当前解码块的亮度分量的重构块进行跨分量预测的线性模型;根据所述线性模型计算所述亮度分量的重构块,得到所述当前解码块的色度分量的参考预测块。In this possible example, the determining, according to the reconstructed block of the luminance component of the current decoding block, the reference prediction block of the chrominance component of the current decoding block includes: determining to use the luminance component of the current decoding block A linear model for performing cross-component prediction on the reconstructed block; calculating the reconstructed block of the luminance component according to the linear model to obtain a reference prediction block of the chrominance component of the current decoding block.

其中,所述线性模型例如可以是前述公式(1)或(2)(3)的线性模型。Wherein, the linear model may be, for example, the linear model of the aforementioned formulas (1) or (2) and (3).

在本可能的示例中,所述确定利用所述当前解码块的亮度分量的重构块进行跨分量预测的线性模型,包括:确定用于计算所述线性模型的参考像素,所述参考像素包括所述当前解码块的至少一个相邻像素;根据所述参考像素计算所述线性模型。In this possible example, the determining a linear model for performing cross-component prediction using the reconstructed block of the luminance component of the current decoding block includes: determining a reference pixel for calculating the linear model, the reference pixel including at least one adjacent pixel of the current decoding block; calculating the linear model from the reference pixel.

其中,所述用于计算线性模型的参考像素的选取可以扩展到当前解码块的左下侧、左侧、左上侧、上侧以及右上侧的相邻像素。Wherein, the selection of the reference pixels for calculating the linear model may be extended to the adjacent pixels on the lower left side, the left side, the upper left side, the upper side and the upper right side of the current decoding block.

在本可能的示例中,所述确定用于计算所述线性模型的参考像素,包括:根据所述当前解码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定用于计算所述线性模型的参考像素。In this possible example, the determining a reference pixel for calculating the linear model includes: according to available information of reconstructed samples of adjacent pixels of the current decoding block and the chrominance component intra prediction mode , determine the reference pixels used to calculate the linear model.

其中,所述当前解码块的色度分量帧内预测模式包括TSCPM_T、TSCPM_L、MCPM_T、MCPM L中的任意一种。所述可用信息具体包括两侧可用和单侧可用(例如:左侧可用和右侧可用)。可见,本示例中,用于计算线性模型的系数的参考相邻像素可以根据相邻像素的重构样本的可用性和色度分量帧内预测模式进行灵活设置。Wherein, the chrominance component intra prediction mode of the current decoding block includes any one of TSCPM_T, TSCPM_L, MCPM_T, and MCPM L. The available information specifically includes available on both sides and available on one side (for example: available on the left side and available on the right side). It can be seen that in this example, the reference adjacent pixels used for calculating the coefficients of the linear model can be flexibly set according to the availability of reconstructed samples of adjacent pixels and the intra prediction mode of the chrominance component.

在本可能的示例中,所述确定用于计算所述线性模型的参考像素,包括:根据所述当前解码块的相邻解码块的码率失真代价最优的亮度分量帧内预测模式,确定用于计算所述线性模型的参考像素。其中,所述相邻解码块的亮度分量的码率失真代价最优的帧内预测模式可以与当前解码块的亮度分量的码率失真代价最优的帧内预测模式相同,也可能不同。In this possible example, the determining a reference pixel for calculating the linear model includes: determining a luminance component intra prediction mode with an optimal rate-distortion cost of adjacent decoding blocks of the current decoding block, determining Reference pixels for computing the linear model. Wherein, the intra prediction mode with the optimal rate distortion cost of the luminance component of the adjacent decoding block may be the same as or different from the intra prediction mode with the optimal rate distortion cost of the luminance component of the current decoding block.

步骤230,对所述当前解码块的色度分量的预测块进行预测修正,得到所述当前解码块的色度分量的修正后的预测块。Step 230: Perform prediction modification on the prediction block of the chrominance component of the current decoding block to obtain the modified prediction block of the chrominance component of the current decoding block.

在本可能的示例中,所述对所述当前解码块的色度分量的预测块进行预测修正,包括:根据所述色度分量帧内预测模式确定滤波器;使用所述滤波器对所述当前解码块的色度分量的预测块进行预测修正。In this possible example, the performing prediction modification on the prediction block of the chrominance component of the current decoding block includes: determining a filter according to the chrominance component intra prediction mode; The prediction block of the chrominance component of the currently decoded block performs prediction correction.

其中,所述滤波器的滤波方向与所述色度分量帧内预测模式所用来计算线性模型的相邻像素相对于当前编码块的方向正交,能够综合正交方向的边界相邻像素的相关性预测每个像素的色度分量的预测样本。Wherein, the filtering direction of the filter is orthogonal to the direction of the adjacent pixels of the chrominance component intra prediction mode used to calculate the linear model relative to the current coding block, and the correlation of the adjacent pixels on the boundary of the orthogonal direction can be synthesized. predicts the predicted samples of the chroma component of each pixel.

在本可能的示例中,所述根据所述色度分量帧内预测模式确定滤波器,包括:当所述色度分量帧内预测模式为TSCPM_T或者MCPM T或者普通帧内垂直类角度预测模式时,所述滤波器设置为第一滤波器。In this possible example, the determining the filter according to the chrominance component intra prediction mode includes: when the chrominance component intra prediction mode is TSCPM_T or MCPM T or a normal intra vertical angle-like prediction mode , the filter is set as the first filter.

在本可能的示例中,所述第一滤波器用于对与所述当前解码块的色度分量的预测块的左侧边界相邻的像素区域和所述当前解码块的色度分量的预测块的像素区域进行滤波。In this possible example, the first filter is configured to perform the filtering of the pixel area adjacent to the left border of the prediction block of the chroma component of the current decoding block and the prediction block of the chroma component of the current decoding block The pixel area of is filtered.

在本可能的示例中,所述第一滤波器包括第一两抽头滤波器;所述第一两抽头滤波器包括:In this possible example, the first filter includes a first two-tap filter; the first two-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前解码块的宽的取值范围,y的值不超过当前解码块的高的取值范围,P’(x,y)为当前解码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current decoding block, the value of y does not exceed the high value range of the current decoding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the decoded block, P(-1, y) is the reconstructed sample of the pixel located in row y adjacent to the left boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在本可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离。In this possible example, the horizontal filter coefficients are determined by a first set of parameters, and the first set of parameters includes the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(-1, y) the distance between.

在本可能的示例中,所述根据所述色度分量帧内预测模式确定滤波器,包括:当所述色度分量帧内预测模式为TSCPM_L或者MCPM_L或者普通帧内水平类角度预测模式时,所述滤波器设置为第二滤波器。In this possible example, the determining the filter according to the chrominance component intra prediction mode includes: when the chrominance component intra prediction mode is TSCPM_L or MCPM_L or a normal intra horizontal angle prediction mode, The filter is set as a second filter.

在本可能的示例中,所述第二滤波器用于对与所述当前解码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前解码块的色度分量的预测块的像素区域进行滤波。In this possible example, the second filter is configured to perform the filtering of the pixel region adjacent to the upper boundary of the prediction block of the chrominance component of the current decoding block and the prediction block of the chrominance component of the current decoding block The pixel area of is filtered.

在本可能的示例中,所述第二滤波器包括第二两抽头滤波器;所述第二两抽头滤波器包括:In this possible example, the second filter includes a second two-tap filter; the second two-tap filter includes:

P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)P'(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chrominance component of the coding block, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在本可能的示例中,所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。In this possible example, the vertical filter coefficients are determined by a second set of parameters, the second set of parameters including the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(x, − 1) the distance between.

其中,上述垂直滤波系数的取值与当前解码块的色度分量的尺寸以及当前色度分量的预测块中预测像素与左侧相邻像素之间的距离有关。The value of the vertical filter coefficient is related to the size of the chrominance component of the current decoding block and the distance between the predicted pixel and the left adjacent pixel in the prediction block of the current chrominance component.

具体来说,上述滤波系数的选取与色度分量的尺寸有关,根据当前解码块的色度分量的预测块的大小划分成不同的滤波器系数组,根据当前色度分量的预测块的尺寸选择对应的滤波器系数组。上述垂直滤波系数的选取与预测像素到上侧相邻像素的距离有关,将当前预测的像素到上侧相邻像素的距离作为索引值,从相对应的滤波器系数组中选取对应的滤波系数。帧内色度预测滤波系数具体如表1所示。Specifically, the selection of the above-mentioned filter coefficients is related to the size of the chrominance component, and is divided into different filter coefficient groups according to the size of the prediction block of the chrominance component of the current decoding block, and is selected according to the size of the prediction block of the current chrominance component. The corresponding set of filter coefficients. The selection of the above-mentioned vertical filter coefficients is related to the distance from the predicted pixel to the adjacent pixel on the upper side, and the distance from the currently predicted pixel to the adjacent pixel on the upper side is used as the index value, and the corresponding filter coefficient is selected from the corresponding filter coefficient group. . The intra-frame chrominance prediction filter coefficients are specifically shown in Table 1.

此外,该技术的滤波器系数可以采用系数截断方式减少系数存储,即在当前预测的像素到上侧相邻像素的距离大于10的所有像素的滤波系数一致。In addition, the filter coefficients of this technology can use a coefficient truncation method to reduce coefficient storage, that is, the filter coefficients of all pixels whose distances from the currently predicted pixel to the upper adjacent pixel are greater than 10 are consistent.

具体实现中,当前解码块的色度分量的预测块确定后,设备可以进一步计算出色度分量的重构块,根据色度分量的重构块和亮度分量的重构块确定当前解码块的重构图像。In the specific implementation, after the prediction block of the chrominance component of the current decoding block is determined, the device may further calculate the reconstructed block of the chrominance component, and determine the reconstructed block of the current decoding block according to the reconstructed block of the chrominance component and the reconstructed block of the luminance component. compose the image.

在本可能的示例中,所述根据所述色度分量帧内预测模式确定滤波器,包括:当所述色度分量帧内预测模式为普通帧内非角度预测模式时,所述滤波器设置为第三滤波器。In this possible example, the determining the filter according to the chrominance component intra prediction mode includes: when the chrominance component intra prediction mode is a normal intra non-angular prediction mode, setting the filter to is the third filter.

在本可能的示例中,所述第三滤波器用于对与所述当前解码块的色度分量的预测块的左侧边界相邻的像素区域、与所述当前解码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前解码块的色度分量的预测块的像素区域进行滤波。In this possible example, the third filter is used for predicting the pixel region adjacent to the left border of the prediction block of the chroma component of the current decoding block and the chroma component of the current decoding block The pixel area adjacent to the upper boundary of the block and the pixel area of the prediction block of the chrominance component of the current decoding block are filtered.

在本可能的示例中,所述第三滤波器包括第一三抽头滤波器;In this possible example, the third filter includes a first three-tap filter;

所述第一三抽头滤波器包括:The first three-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)P'(x, y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P( x, y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the coding block, P(-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left boundary, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) of the pixel (x, y), f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在本可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离;In this possible example, the horizontal filter coefficients are determined by a first set of parameters, and the first set of parameters includes the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(-1, y) the distance between;

所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。The vertical filter coefficients are determined by a second set of parameters including the size of the prediction block of the chrominance components and the distance between pixel (x,y) and pixel P(x,-1).

可以看出,本申请实施例中,相比于现有技术,本申请方案在色度分量帧内预测模式中,利用相邻编码块与当前编码块的空间关联性修正当前编码块的色度分量的预测样本,提高预测准确度和解码效率。It can be seen that, in the embodiment of the present application, compared with the prior art, the solution of the present application uses the spatial correlation between the adjacent coding block and the current coding block to correct the chrominance of the current coding block in the chrominance component intra prediction mode. Prediction samples of components to improve prediction accuracy and decoding efficiency.

在一个可能的示例中,所述对所述当前解码块的色度分量的预测块进行预测修正,包括:解析所述码流,获取色度修正标志位;确定所述色度修正标志位的数值为第一数值,所述第一数值用于指示使用滤波器进行所述预测修正;对所述当前解码块的色度分量的预测块进行所述预测修正。可见,本示例中,通过标志位直接指示预测修正。In a possible example, the performing prediction correction on the prediction block of the chrominance component of the current decoding block includes: parsing the code stream to obtain a chrominance correction flag bit; determining a value of the chrominance correction flag bit The numerical value is a first numerical value, and the first numerical value is used to indicate that a filter is used to perform the prediction modification; the prediction modification is performed on the prediction block of the chrominance component of the current decoding block. It can be seen that, in this example, the prediction correction is directly indicated by the flag bit.

在本可能的示例中,所述方法还包括:确定所述色度修正标志位的数值为第二数值,所述第二数值用于指示不使用滤波器进行所述预测修正。In this possible example, the method further includes: determining the value of the chrominance correction flag to be a second value, where the second value is used to indicate that a filter is not used to perform the prediction correction.

在本可能的示例中,所述色度修正标志位与亮度修正标识位共用。不会增加额外标识位,节省传输码流。In this possible example, the chrominance correction flag is shared with the luminance correction flag. No additional identification bits will be added, saving the transmission code stream.

在本可能的示例中,所述色度修正标识位独立使用。指示更加清楚高效。In this possible example, the chrominance correction flags are used independently. Instructions are clearer and more efficient.

所提出技术在AVS参考软件HPM6.0上实现,并在通测条件和视频序列下对全帧内模式和随机访问模式进行1秒序列测试,具体性能如表2和表3所示。The proposed technology is implemented on the AVS reference software HPM6.0, and the full intra-frame mode and random access mode are tested in a 1-second sequence under general test conditions and video sequences. The specific performances are shown in Tables 2 and 3.

表2所有内部All Intra测试结果Table 2 All internal All Intra test results

Figure BDA0003691739840000231
Figure BDA0003691739840000231

表3随机接入Random Access测试结果Table 3 Random Access Random Access test results

Figure BDA0003691739840000232
Figure BDA0003691739840000232

从表2和表3可以看出,测试序列的UV分量平均有较明显的性能增益,AI测试条件下U分量平均有0.71%的编码性能提升,RA测试条件下V分量平均有1.35%的编码性能提升。It can be seen from Table 2 and Table 3 that the UV component of the test sequence has an average performance gain, the U component has an average coding performance improvement of 0.71% under the AI test condition, and the V component has an average coding performance of 1.35% under the RA test condition. Performance improvements.

本申请实施例提供一种图像编码装置,该图像编码装置可以为视频解码器或视频编码器。具体的,图像编码装置用于执行以上解码方法中的视频解码器所执行的步骤。本申请实施例提供的图像编码装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an image encoding apparatus, and the image encoding apparatus may be a video decoder or a video encoder. Specifically, the image encoding apparatus is configured to perform the steps performed by the video decoder in the above decoding method. The image encoding apparatus provided in the embodiments of the present application may include modules corresponding to corresponding steps.

本申请实施例可以根据上述方法示例对图像编码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the image coding apparatus may be divided into functional modules according to the foregoing method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.

在采用对应各个功能划分各个功能模块的情况下,图14示出上述实施例中所涉及的图像编码装置的一种可能的结构示意图。如图14所示,图像编码装置14包括划分单元140、确定单元141、修正单元142。In the case where each functional module is divided according to each function, FIG. 14 shows a possible schematic structural diagram of the image coding apparatus involved in the above embodiment. As shown in FIG. 14 , the image coding apparatus 14 includes a dividing unit 140 , a determining unit 141 , and a correcting unit 142 .

划分单元140,用于划分图像,确定当前编码块的色度分量帧内预测模式;a dividing unit 140, configured to divide the image, and determine the intra prediction mode of the chrominance component of the current coding block;

确定单元141,用于根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块;a determining unit 141, configured to determine the prediction block of the chrominance component of the current coding block according to the chrominance component intra prediction mode;

修正单元142,用于对所述当前编码块的色度分量的预测块进行预测修正,得到所述当前编码块的色度分量的修正后的预测块。The modification unit 142 is configured to perform prediction modification on the prediction block of the chrominance component of the current coding block to obtain the modified prediction block of the chrominance component of the current coding block.

在本可能的示例中,在所述对所述当前编码块的色度分量的预测块进行预测修正方面,所述修正单元142具体用于,根据所述色度分量帧内预测模式确定滤波器;以及使用所述滤波器对所述当前编码块的色度分量的预测块进行预测修正。In this possible example, in the aspect of performing prediction modification on the prediction block of the chrominance component of the current coding block, the modification unit 142 is specifically configured to determine a filter according to the intra prediction mode of the chrominance component ; and using the filter to perform prediction modification on the prediction block of the chrominance component of the current coding block.

在本可能的示例中,在所述根据所述色度分量帧内预测模式确定滤波器方面,所述修正单元142具体用于,当所述色度分量帧内预测模式为两步跨分量预测模式TSCPM_T或者多种跨分量预测模式MCPM_T或者普通帧内垂直类角度预测模式时,所述滤波器设置为第一滤波器。In this possible example, in the aspect of determining the filter according to the chrominance component intra prediction mode, the modifying unit 142 is specifically configured to: when the chrominance component intra prediction mode is two-step cross-component prediction When the mode TSCPM_T or multiple cross-component prediction modes MCPM_T or the normal intra vertical class angle prediction mode is used, the filter is set as the first filter.

在本可能的示例中,所述第一滤波器用于对与所述当前编码块的色度分量的预测块的左侧边界相邻的像素区域和所述当前编码块的色度分量的预测块的像素区域进行滤波。In this possible example, the first filter is configured to perform the filtering of a pixel region adjacent to the left border of the prediction block of the chroma component of the current coding block and the prediction block of the chroma component of the current coding block The pixel area of is filtered.

在本可能的示例中,所述第一滤波器包括第一两抽头滤波器;In this possible example, the first filter includes a first two-tap filter;

所述第一两抽头滤波器包括:The first two-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the coding block, P(-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在本可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离。In this possible example, the horizontal filter coefficients are determined by a first set of parameters, and the first set of parameters includes the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(-1, y) the distance between.

在本可能的示例中,在所述根据所述色度分量帧内预测模式确定滤波器方面,所述修正单元142具体用于,当所述色度分量帧内预测模式为TSCPM_L或者MCPM_L或者普通帧内水平类角度预测模式时,所述滤波器设置为第二滤波器。In this possible example, in the aspect of determining the filter according to the chrominance component intra prediction mode, the modification unit 142 is specifically configured to, when the chrominance component intra prediction mode is TSCPM_L or MCPM_L or normal In the intra-horizontal-like angle prediction mode, the filter is set as the second filter.

在本可能的示例中,所述第二滤波器用于对与所述当前编码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前编码块的色度分量的预测块的像素区域进行滤波。In this possible example, the second filter is used to perform the filtering of the pixel region adjacent to the upper boundary of the prediction block of the chrominance component of the current coding block and the prediction block of the chrominance component of the current coding block The pixel area of is filtered.

在本可能的示例中,所述第二滤波器包括第二两抽头滤波器;In this possible example, the second filter includes a second two-tap filter;

所述第二两抽头滤波器包括:The second two-tap filter includes:

P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)P'(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chrominance component of the coding block, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在本可能的示例中,所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。In this possible example, the vertical filter coefficients are determined by a second set of parameters, the second set of parameters including the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(x, − 1) the distance between.

在本可能的示例中,在所述根据所述色度分量帧内预测模式确定滤波器方面,所述修正单元142具体用于,当所述色度分量帧内预测模式为普通帧内非角度预测模式时,所述滤波器设置为第三滤波器。In this possible example, in the aspect of determining the filter according to the chrominance component intra prediction mode, the modifying unit 142 is specifically configured to: when the chrominance component intra prediction mode is a normal intra non-angle In prediction mode, the filter is set as the third filter.

在本可能的示例中,所述第三滤波器用于对与所述当前编码块的色度分量的预测块的左侧边界相邻的像素区域、与所述当前编码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前编码块的色度分量的预测块的像素区域进行滤波。In this possible example, the third filter is used for predicting the pixel region adjacent to the left boundary of the prediction block of the chroma component of the current coding block and the chroma component of the current coding block The pixel area adjacent to the upper boundary of the block and the pixel area of the prediction block of the chrominance component of the current coding block are filtered.

在本可能的示例中,所述第三滤波器包括第一三抽头滤波器;In this possible example, the third filter includes a first three-tap filter;

所述第一三抽头滤波器包括:The first three-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)P'(x, y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P( x, y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the coding block, P(-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left boundary, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) of the pixel (x, y), f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在本可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离;In this possible example, the horizontal filter coefficients are determined by a first set of parameters, and the first set of parameters includes the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(-1, y) the distance between;

所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。The vertical filter coefficients are determined by a second set of parameters including the size of the prediction block of the chrominance components and the distance between pixel (x,y) and pixel P(x,-1).

在本可能的示例中,在所述对所述当前编码块的色度分量的预测块进行预测修正方面,所述修正单元142具体用于,计算所述当前编码块在未修正情况下的第一率失真代价,以及计算所述当前编码块的已修正情况下的第二率失真代价;以及确定所述第一率失真代价大于所述第二率失真代价;以及对所述当前编码块的色度分量的预测块进行预测修正。In this possible example, in the aspect of performing prediction modification on the prediction block of the chrominance component of the current coding block, the modification unit 142 is specifically configured to calculate the first number of the current coding block without modification. a rate-distortion cost, and calculating a second rate-distortion cost for the corrected case of the current coding block; and determining that the first rate-distortion cost is greater than the second rate-distortion cost; and The prediction block of the chrominance component performs prediction correction.

在本可能的示例中,在所述对所述当前编码块的色度分量的预测块进行预测修正方面,所述修正单元142具体用于,计算所述当前编码块在未修正情况下的第一率失真代价,以及计算所述当前编码块的已修正情况下的第二率失真代价;以及确定所述第一率失真代价大于所述第二率失真代价,设置色度修正标识位为第一数值,所述第一数值用于指示需要进行所述预测修正;以及对所述当前编码块的色度分量的预测块进行预测修正。In this possible example, in the aspect of performing prediction modification on the prediction block of the chrominance component of the current coding block, the modification unit 142 is specifically configured to calculate the first number of the current coding block without modification. A rate-distortion cost, and calculating a second rate-distortion cost under the corrected condition of the current coding block; and determining that the first rate-distortion cost is greater than the second rate-distortion cost, and setting the chrominance correction flag to the first rate-distortion cost A numerical value, the first numerical value is used to indicate that the prediction modification needs to be performed; and the prediction modification is performed on the prediction block of the chrominance component of the current coding block.

在本可能的示例中,所述确定单元141,还用于确定所述第一率失真代价小于或等于所述第二率失真代价,设置所述色度修正标识位为第二数值,所述第二数值用于指示不需要进行所述预测修正。In this possible example, the determining unit 141 is further configured to determine that the first rate-distortion cost is less than or equal to the second rate-distortion cost, and set the chrominance correction flag to a second value, and the The second value is used to indicate that the prediction modification is not required.

在本可能的示例中,所述色度修正标识位与亮度修正标识位共用。In this possible example, the chrominance correction flag is shared with the luminance correction flag.

在本可能的示例中,所述色度修正标识位独立使用。In this possible example, the chrominance correction flags are used independently.

在本可能的示例中,在所述根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块方面,所述确定单元141,具体用于确定所述当前编码块的亮度分量帧内预测模式;以及当所述色度分量帧内预测模式指示使用所述当前编码块的亮度分量确定所述当前编码块的色度分量的预测值时,根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的预测块。In this possible example, in the aspect of determining the prediction block of the chrominance component of the current coding block according to the chrominance component intra prediction mode, the determining unit 141 is specifically configured to determine the current coding a luma component intra-prediction mode for a block; and when the chroma component intra-prediction mode indicates use of the luma component of the current coded block to determine a predicted value for the chroma component of the current coded block, according to the luma component Intra prediction mode, which determines the prediction block of the chroma component of the current coding block.

在本可能的示例中,在所述根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的预测块方面,所述确定单元141具体用于,根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的参考预测块;以及对所述当前编码块的色度分量的参考预测块进行滤波,得到所述当前编码块的色度分量的预测块。In this possible example, in the aspect of determining the prediction block of the chrominance component of the current coding block according to the luminance component intra prediction mode, the determining unit 141 is specifically configured to, according to the luminance component frame Intra-prediction mode, determining the reference prediction block of the chroma component of the current coding block; and filtering the reference prediction block of the chroma component of the current coding block to obtain the prediction block of the chroma component of the current coding block .

在本可能的示例中,在所述对所述当前编码块的色度分量的参考预测块进行滤波方面,所述确定单元141具体用于,使用第三滤波器对所述当前编码块的色度分量的参考预测块进行滤波。In this possible example, in the aspect of filtering the reference prediction block of the chrominance component of the current coding block, the determining unit 141 is specifically configured to use a third filter to filter the chrominance of the current coding block The reference prediction block of the degree component is filtered.

在本可能的示例中,所述第三滤波器包括用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器和用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器。In this possible example, the third filter includes a filter for filtering the left boundary pixel area of the reference prediction block for the chrominance component and a reference prediction block for the chrominance component The filter that filters the non-left boundary pixel area.

在本可能的示例中,所述用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器包括第三两抽头滤波器;In this possible example, the filter for filtering the left boundary pixel region of the reference prediction block of the chrominance component comprises a third two-tap filter;

所述第三两抽头滤波器包括:The third two-tap filter includes:

PC(x,y)=(P′C(2x,2y)+P′C(2x,2y+1)+1)>>1P C (x, y)=(P' C (2x, 2y)+P' C (2x, 2y+1)+1)>>1

其中,x,y为像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast samples.

在本可能的示例中,所述用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器包括第一六抽头滤波器;In this possible example, the filter for filtering the non-left boundary pixel region of the reference prediction block of the chrominance component comprises a first six-tap filter;

所述第一六抽头滤波器包括:The first six-tap filter includes:

Figure BDA0003691739840000261
Figure BDA0003691739840000261

其中,x,y为当前像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the current pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast sample.

在本可能的示例中,在所述根据所述亮度分量帧内预测模式,确定所述当前编码块的色度分量的参考预测块方面,所述确定单元141具体用于,根据所述亮度分量帧内预测模式,确定所述当前编码块的亮度分量的重构块;以及根据所述当前编码块的亮度分量的重构块,确定所述当前编码块的色度分量的参考预测块。In this possible example, in the aspect of determining the reference prediction block of the chrominance component of the current coding block according to the luma component intra prediction mode, the determining unit 141 is specifically configured to: according to the luma component an intra-frame prediction mode, determining a reconstructed block of the luma component of the current coding block; and determining a reference prediction block of the chroma component of the current coding block according to the reconstructed block of the luma component of the current coding block.

在本可能的示例中,在所述根据所述当前编码块的亮度分量的重构块,确定所述当前编码块的色度分量的参考预测块方面,所述确定单元141具体用于,确定利用所述当前编码块的亮度分量的重构块进行跨分量预测的线性模型;以及根据所述线性模型计算所述亮度分量的重构块,得到所述当前编码块的色度分量的参考预测块。In this possible example, in the aspect of determining the reference prediction block of the chrominance component of the current coding block according to the reconstructed block of the luminance component of the current coding block, the determining unit 141 is specifically configured to: determine A linear model for cross-component prediction using the reconstructed block of the luminance component of the current coding block; and calculating the reconstructed block of the luminance component according to the linear model to obtain a reference prediction of the chrominance component of the current coding block piece.

在本可能的示例中,在所述确定利用所述当前编码块的亮度分量的重构块进行跨分量预测的线性模型方面,所述确定单元141具体用于,确定用于计算所述线性模型的参考像素,所述参考像素包括所述当前编码块的至少一个相邻像素;以及根据所述参考像素计算所述线性模型。In this possible example, in the aspect of determining a linear model for performing cross-component prediction by using the reconstructed block of the luminance component of the current coding block, the determining unit 141 is specifically configured to determine a linear model for calculating the linear model , the reference pixel includes at least one neighboring pixel of the current coding block; and the linear model is calculated from the reference pixel.

在本可能的示例中,在所述确定用于计算所述线性模型的参考像素方面,所述确定单元141具体用于,根据所述当前编码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定用于计算所述线性模型的参考像素。In this possible example, in the aspect of determining the reference pixels for calculating the linear model, the determining unit 141 is specifically configured to, according to the available information of the reconstructed samples of the adjacent pixels of the current coding block and The chrominance component intra prediction mode determines the reference pixels used to calculate the linear model.

在本可能的示例中,在所述确定用于计算所述线性模型的参考像素方面,所述确定单元141具体用于,根据所述当前编码块的相邻编码块的码率失真代价最优的亮度分量帧内预测模式,确定用于计算所述线性模型的参考像素。In this possible example, in the aspect of determining the reference pixels for calculating the linear model, the determining unit 141 is specifically configured to optimize the rate-distortion cost according to the rate-distortion cost of adjacent coding blocks of the current coding block The intra prediction mode of the luma component determines the reference pixels used to calculate the linear model.

在本可能的示例中,在所述根据所述色度分量帧内预测模式,确定所述当前编码块的色度分量的预测块方面,所述确定单元141具体用于,根据所述当前编码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定参考像素;以及根据所述参考像素确定所述当前编码块的色度分量的预测块。In this possible example, in the aspect of determining the prediction block of the chrominance component of the current coding block according to the chrominance component intra prediction mode, the determining unit 141 is specifically configured to: according to the current coding available information of reconstructed samples of neighboring pixels of the block and the chrominance component intra prediction mode, determine a reference pixel; and determine a prediction block of the chrominance component of the current coding block from the reference pixel.

其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的图像编码装置包括但不限于上述模块,例如:图像编码装置还可以包括存储单元143。存储单元143可以用于存储该图像编码装置的程序代码和数据。Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here. Of course, the image encoding apparatus provided in the embodiment of the present application includes but is not limited to the above-mentioned modules. For example, the image encoding apparatus may further include a storage unit 143 . The storage unit 143 may be used to store program codes and data of the image encoding apparatus.

在采用集成的单元的情况下,本申请实施例提供的图像编码装置的结构示意图如图15所示。在图15中,图像编码装置15包括:处理模块150和通信模块151。处理模块150用于对图像编码装置的动作进行控制管理,例如,执行划分单元140、确定单元141、修正单元142执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块151用于支持图像编码装置与其他设备之间的交互。如图15所示,图像编码装置还可以包括存储模块152,存储模块152用于存储图像编码装置的程序代码和数据,例如存储上述存储单元143所保存的内容。In the case of using an integrated unit, a schematic structural diagram of the image encoding apparatus provided by the embodiment of the present application is shown in FIG. 15 . In FIG. 15 , the image encoding apparatus 15 includes a processing module 150 and a communication module 151 . The processing module 150 is used to control and manage the actions of the image encoding apparatus, eg, to perform the steps performed by the division unit 140 , the determination unit 141 , the modification unit 142 , and/or other processes for performing the techniques described herein. The communication module 151 is used to support the interaction between the image coding apparatus and other devices. As shown in FIG. 15 , the image coding apparatus may further include a storage module 152 , which is used for storing program codes and data of the image coding apparatus, for example, the content stored in the above-mentioned storage unit 143 .

其中,处理模块150可以是处理器或控制器,例如可以是中央处理器(CentralProcessing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块151可以是收发器、RF电路或通信接口等。存储模块152可以是存储器。The processing module 150 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), ASIC, FPGA or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 151 may be a transceiver, an RF circuit, a communication interface, or the like. The storage module 152 may be a memory.

其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。上述图像编码装置14和图像编码装置15均可执行上述图12A所示的图像编码方法,图像编码装置14和图像编码装置15具体可以是视频图像编码装置或者其他具有视频编码功能的设备。Wherein, all the relevant contents of the scenarios involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here. The image encoding device 14 and the image encoding device 15 can both execute the image encoding method shown in FIG. 12A , and the image encoding device 14 and the image encoding device 15 may be video image encoding devices or other devices with video encoding functions.

本申请还提供一种视频编码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的图像编码方法。The present application also provides a video encoder, including a non-volatile storage medium, and a central processing unit, where the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium. The medium is connected, and the executable program is executed to implement the image encoding method of the embodiment of the present application.

本申请实施例提供一种图像解码装置,该图像解码装置可以为视频解码器或视频解码器。具体的,图像解码装置用于执行以上解码方法中的视频解码器所执行的步骤。本申请实施例提供的图像解码装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an image decoding apparatus, and the image decoding apparatus may be a video decoder or a video decoder. Specifically, the image decoding apparatus is configured to perform the steps performed by the video decoder in the above decoding method. The image decoding apparatus provided by the embodiments of the present application may include modules corresponding to corresponding steps.

本申请实施例可以根据上述方法示例对图像解码装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the embodiments of the present application, the image decoding apparatus may be divided into functional modules according to the above method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.

在采用对应各个功能划分各个功能模块的情况下,图16示出上述实施例中所涉及的图像解码装置的一种可能的结构示意图。如图16所示,图像解码装置16包括解析单元160、确定单元161、修正单元162。In the case where each functional module is divided according to each function, FIG. 16 shows a possible schematic structural diagram of the image decoding apparatus involved in the above embodiment. As shown in FIG. 16 , the image decoding device 16 includes an analysis unit 160 , a determination unit 161 , and a correction unit 162 .

解析单元160,用于解析码流,确定当前解码块的色度分量帧内预测模式;a parsing unit 160, configured to parse the code stream and determine the intra-prediction mode of the chroma component of the current decoding block;

确定单元161,用于根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块;a determining unit 161, configured to determine the prediction block of the chrominance component of the current decoding block according to the chrominance component intra prediction mode;

修正单元162,用于对所述当前解码块的色度分量的预测块进行预测修正,得到所述当前解码块的色度分量的修正后的预测块。The modification unit 162 is configured to perform prediction modification on the prediction block of the chrominance component of the current decoding block to obtain the modified prediction block of the chrominance component of the current decoding block.

在一个可能的示例中,在所述对所述当前解码块的色度分量的预测块进行预测修正方面,所述修正单元162具体用于:根据所述色度分量帧内预测模式确定滤波器;以及使用所述滤波器对所述当前解码块的色度分量的预测块进行预测修正。In a possible example, in the aspect of performing prediction modification on the prediction block of the chrominance component of the current decoding block, the modification unit 162 is specifically configured to: determine a filter according to the intra prediction mode of the chrominance component ; and using the filter to perform prediction modification on the prediction block of the chrominance component of the current decoding block.

在一个可能的示例中,在所述根据所述色度分量帧内预测模式确定滤波器方面,所述修正单元162具体用于:当所述色度分量帧内预测模式为TSCPM_T或者MCPM_T或者普通帧内垂直类角度预测模式时,所述滤波器设置为第一滤波器。In a possible example, in the aspect of determining the filter according to the chrominance component intra prediction mode, the modifying unit 162 is specifically configured to: when the chrominance component intra prediction mode is TSCPM_T or MCPM_T or normal In the intra vertical angle-like prediction mode, the filter is set as the first filter.

在一个可能的示例中,所述第一滤波器用于对与所述当前解码块的色度分量的预测块的左侧边界相邻的像素区域和所述当前解码块的色度分量的预测块的像素区域进行滤波。In a possible example, the first filter is configured to perform filtering on a pixel region adjacent to the left boundary of the prediction block of the chroma component of the current decoding block and the prediction block of the chroma component of the current decoding block The pixel area of is filtered.

在一个可能的示例中,所述第一滤波器包括第一两抽头滤波器;In a possible example, the first filter includes a first two-tap filter;

所述第一两抽头滤波器包括:The first two-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前解码块的宽的取值范围,v的值不超过当前解码块的高的取值范围,P’(x,y)为当前解码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current decoding block, the value of v does not exceed the high value range of the current decoding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the decoded block, P(-1, y) is the reconstructed sample of the pixel located in row y adjacent to the left boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在一个可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离。In a possible example, the horizontal filter coefficient is determined by a first set of parameters, the first set of parameters includes the size of the prediction block of the chrominance component and the pixel (x, y) and the pixel P(-1, y) the distance between.

在一个可能的示例中,所述根据所述色度分量帧内预测模式确定滤波器,包括:In a possible example, the determining a filter according to the chrominance component intra prediction mode includes:

当所述色度分量帧内预测模式为TSCPM_L或者MCPM_L或者普通帧内水平类角度预测模式时,所述滤波器设置为第二滤波器。When the chrominance component intra prediction mode is TSCPM_L or MCPM_L or a normal intra horizontal-like angle prediction mode, the filter is set as the second filter.

在一个可能的示例中,所述第二滤波器用于对与所述当前解码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前解码块的色度分量的预测块的像素区域进行滤波。In a possible example, the second filter is configured to perform the filtering on a pixel area adjacent to an upper boundary of the prediction block of the chroma component of the current decoding block and the prediction block of the chroma component of the current decoding block The pixel area of is filtered.

在一个可能的示例中,所述第二滤波器包括第二两抽头滤波器;In a possible example, the second filter includes a second two-tap filter;

所述第二两抽头滤波器包括:The second two-tap filter includes:

P′(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)P'(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,y的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chrominance component of the coding block, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在一个可能的示例中,所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。In a possible example, the vertical filter coefficients are determined by a second set of parameters, and the second set of parameters includes the size of the prediction block of the chrominance component and the size of the pixel (x, y) and the pixel P(x, − 1) the distance between.

在一个可能的示例中,在所述根据所述色度分量帧内预测模式确定滤波器方面,所述修正单元162具体用于:当所述色度分量帧内预测模式为普通帧内非角度预测模式时,所述滤波器设置为第三滤波器。In a possible example, in the aspect of determining the filter according to the chrominance component intra prediction mode, the modifying unit 162 is specifically configured to: when the chrominance component intra prediction mode is a normal intra non-angle In prediction mode, the filter is set as the third filter.

在一个可能的示例中,所述第三滤波器用于对与所述当前解码块的色度分量的预测块的左侧边界相邻的像素区域、与所述当前解码块的色度分量的预测块的上侧边界相邻的像素区域和所述当前解码块的色度分量的预测块的像素区域进行滤波。In a possible example, the third filter is used for predicting the pixel region adjacent to the left border of the prediction block of the chroma component of the current decoding block and the chroma component of the current decoding block The pixel area adjacent to the upper boundary of the block and the pixel area of the prediction block of the chrominance component of the current decoding block are filtered.

在一个可能的示例中,所述第三滤波器包括第一三抽头滤波器;In a possible example, the third filter includes a first three-tap filter;

所述第一三抽头滤波器包括:The first three-tap filter includes:

P′(x,y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P(x,y)P'(x, y)=f(x)·P(-1,y)+f(y)·P(x,-1)+(1-f(x)-f(y))·P( x, y)

其中,x,y为当前像素的坐标,x的值不超过当前编码块的宽的取值范围,v的值不超过当前编码块的高的取值范围,P’(x,y)为当前编码块的色度分量的预测块的像素(x,y)的最终预测样本,P(-1,y)为位于y行的与左侧边界相邻的像素的重构样本,P(x,-1)为位于X列的与上侧边界相邻的像素的重构样本,f(x)为像素(x,y)参考像素P(-1,y)的水平滤波系数,f(y)为像素(x,y)参考像素P(x,-1)的垂直滤波系数,P(x,y)为像素(x,y)的原始预测样本。Among them, x, y are the coordinates of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of v does not exceed the high value range of the current coding block, and P'(x, y) is the current The final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the coding block, P(-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left boundary, P(x, -1) is the reconstructed sample of the pixel located in the X column adjacent to the upper boundary, f(x) is the horizontal filter coefficient of the reference pixel P(-1, y) of the pixel (x, y), f(y) is the vertical filter coefficient of the reference pixel P(x, -1) for the pixel (x, y), and P(x, y) is the original prediction sample of the pixel (x, y).

在一个可能的示例中,所述水平滤波系数通过第一参数集合确定,所述第一参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(-1,y)之间的距离;In a possible example, the horizontal filter coefficient is determined by a first set of parameters, the first set of parameters includes the size of the prediction block of the chrominance component and the pixel (x, y) and the pixel P(-1, y) the distance between;

所述垂直滤波系数通过第二参数集合确定,所述第二参数集合包括所述色度分量的预测块的尺寸和像素(x,y)与像素P(x,-1)之间的距离。The vertical filter coefficients are determined by a second set of parameters including the size of the prediction block of the chrominance components and the distance between pixel (x,y) and pixel P(x,-1).

在一个可能的示例中,在所述对所述当前解码块的色度分量的预测块进行预测修正方面,所述修正单元162,具体用于:解析所述码流,获取色度修正标志位;以及确定所述色度修正标志位的数值为第一数值,所述第一数值用于指示使用滤波器进行所述预测修正;以及对所述当前解码块的色度分量的预测块进行预测修正。In a possible example, in the aspect of performing prediction modification on the prediction block of the chrominance component of the current decoding block, the modification unit 162 is specifically configured to: parse the code stream to obtain a chrominance modification flag bit and determine that the numerical value of the chrominance correction flag bit is a first numerical value, and the first numerical value is used to indicate that a filter is used to carry out the prediction modification; and the prediction block of the chrominance component of the current decoding block is predicted Correction.

在一个可能的示例中,所述确定单元161,还用于确定所述色度修正标志位的数值为第二数值,所述第二数值用于指示不使用滤波器进行所述预测修正。In a possible example, the determining unit 161 is further configured to determine the value of the chrominance correction flag bit as a second value, where the second value is used to indicate that a filter is not used to perform the prediction correction.

在一个可能的示例中,所述色度修正标志位与亮度修正标识位共用。In a possible example, the chrominance correction flag bit is shared with the luminance correction flag bit.

在一个可能的示例中,所述色度修正标识位独立使用。In a possible example, the chrominance correction flags are used independently.

在一个可能的示例中,在所述根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块方面,所述确定单元161,具体用于确定所述当前解码块的亮度分量帧内预测模式;以及当所述色度分量帧内预测模式指示使用所述当前解码块的亮度分量确定所述当前解码块的色度分量的预测值时,根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的预测块。In a possible example, in the aspect of determining the prediction block of the chrominance component of the current decoding block according to the chrominance component intra prediction mode, the determining unit 161 is specifically configured to determine the current decoding block a luma component intra-prediction mode for a block; and when the chroma component intra-prediction mode indicates using the luma component of the currently decoded block to determine a predicted value for the chroma component of the current decoded block, according to the luma component Intra prediction mode, which determines the prediction block for the chroma components of the currently decoded block.

在一个可能的示例中,在所述根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的预测块方面,所述确定单元161具体用于:根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的参考预测块;以及对所述当前解码块的色度分量的参考预测块进行滤波,得到所述当前解码块的色度分量的预测块。In a possible example, in the aspect of determining the prediction block of the chrominance component of the current decoding block according to the luminance component intra prediction mode, the determining unit 161 is specifically configured to: according to the luminance component frame Intra-prediction mode, determining the reference prediction block of the chroma component of the current decoding block; and filtering the reference prediction block of the chroma component of the current decoding block to obtain the prediction block of the chroma component of the current decoding block .

在一个可能的示例中,在所述对所述当前解码块的色度分量的参考预测块进行滤波方面,所述确定单元161具体用于:使用第三滤波器对所述当前解码块的色度分量的参考预测块进行滤波。In a possible example, in the aspect of filtering the reference prediction block of the chroma component of the current decoding block, the determining unit 161 is specifically configured to: use a third filter to filter the chroma components of the current decoding block The reference prediction block of the degree component is filtered.

在一个可能的示例中,所述第三滤波器包括用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器和用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器。In a possible example, the third filter includes a filter for filtering the left boundary pixel area of the reference prediction block of the chrominance component and a reference prediction block for the chrominance component The filter that filters the non-left boundary pixel area.

在一个可能的示例中,所述用于对所述色度分量的参考预测块的左侧边界像素区域进行滤波的滤波器包括第三两抽头滤波器;In a possible example, the filter for filtering the left boundary pixel region of the reference prediction block of the chrominance component includes a third two-tap filter;

所述第三两抽头滤波器包括:The third two-tap filter includes:

PC(x,y)=(P′C(2x,2y)+P′C(2x,2y+1)+1)>>1P C (x, y)=(P' C (2x, 2y)+P' C (2x, 2y+1)+1)>>1

其中,x,y为像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast samples.

在一个可能的示例中,所述用于对所述色度分量的参考预测块的非左侧边界像素区域进行滤波的滤波器包括第一六抽头滤波器;In a possible example, the filter for filtering the non-left boundary pixel region of the reference prediction block of the chrominance component includes a first six-tap filter;

所述第一六抽头滤波器包括:The first six-tap filter includes:

Figure BDA0003691739840000291
Figure BDA0003691739840000291

其中,x,y为当前像素的坐标,P′c为所述色度分量的参考预测块中的像素的预测样本,Pc为所述色度分量的预测块中的当前像素的色度分量的预测样本。Wherein, x, y are the coordinates of the current pixel, P'c is the prediction sample of the pixel in the reference prediction block of the chrominance component, Pc is the chrominance component of the current pixel in the prediction block of the chrominance component forecast sample.

在一个可能的示例中,在所述根据所述亮度分量帧内预测模式,确定所述当前解码块的色度分量的参考预测块方面,所述确定单元161具体用于:根据所述亮度分量帧内预测模式,确定所述当前解码块的亮度分量的重构块;以及根据所述当前解码块的亮度分量的重构块,确定所述当前解码块的色度分量的参考预测块。In a possible example, in the aspect of determining the reference prediction block of the chrominance component of the current decoding block according to the luminance component intra prediction mode, the determining unit 161 is specifically configured to: according to the luminance component an intra-frame prediction mode, determining a reconstructed block of the luma component of the current decoding block; and determining a reference prediction block of the chroma component of the current decoding block according to the reconstructed block of the luma component of the current decoding block.

在一个可能的示例中,在所述根据所述当前解码块的亮度分量的重构块,确定所述当前解码块的色度分量的参考预测块方面,所述确定单元161具体用于:确定利用所述当前解码块的亮度分量的重构块进行跨分量预测的线性模型;以及根据所述线性模型计算所述亮度分量的重构块,得到所述当前解码块的色度分量的参考预测块。In a possible example, in the aspect of determining the reference prediction block of the chrominance component of the current decoding block according to the reconstructed block of the luminance component of the current decoding block, the determining unit 161 is specifically configured to: determine A linear model for cross-component prediction using the reconstructed block of the luma component of the current decoding block; and calculating the reconstructed block of the luma component according to the linear model to obtain a reference prediction of the chroma component of the current decoding block piece.

在一个可能的示例中,在所述确定利用所述当前解码块的亮度分量的重构块进行跨分量预测的线性模型方面,所述确定单元161具体用于:确定用于计算所述线性模型的参考像素,所述参考像素包括所述当前解码块的至少一个相邻像素;以及根据所述参考像素计算所述线性模型。In a possible example, in the aspect of determining a linear model for performing cross-component prediction by using the reconstructed block of the luminance component of the current decoding block, the determining unit 161 is specifically configured to: determine a linear model for calculating the linear model , the reference pixel includes at least one neighboring pixel of the current decoding block; and the linear model is calculated from the reference pixel.

在一个可能的示例中,在所述确定用于计算所述线性模型的参考像素方面,所述确定单元161具体用于:根据所述当前解码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定用于计算所述线性模型的参考像素。In a possible example, in the aspect of determining the reference pixels for calculating the linear model, the determining unit 161 is specifically configured to: according to available information of reconstructed samples of adjacent pixels of the current decoding block and The chrominance component intra prediction mode determines the reference pixels used to calculate the linear model.

在一个可能的示例中,在所述确定用于计算所述线性模型的参考像素方面,所述确定单元161具体用于:根据所述当前解码块的相邻解码块的码率失真代价最优的亮度分量帧内预测模式,确定用于计算所述线性模型的参考像素。In a possible example, in the aspect of determining the reference pixels for calculating the linear model, the determining unit 161 is specifically configured to: optimize the rate-distortion cost according to the rate-distortion cost of adjacent decoding blocks of the current decoding block The intra prediction mode of the luma component determines the reference pixels used to calculate the linear model.

在一个可能的示例中,在所述根据所述色度分量帧内预测模式,确定所述当前解码块的色度分量的预测块方面,所述确定单元161具体用于:根据所述当前解码块的相邻像素的重构样本的可用信息和所述色度分量帧内预测模式,确定参考像素;以及根据所述参考像素确定所述当前解码块的色度分量的预测块。In a possible example, in the aspect of determining the prediction block of the chrominance component of the current decoding block according to the chrominance component intra prediction mode, the determining unit 161 is specifically configured to: according to the current decoding available information of reconstructed samples of neighboring pixels of the block and the chrominance component intra prediction mode, determine a reference pixel; and determine a prediction block of the chrominance component of the currently decoded block from the reference pixel.

其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的图像解码装置包括但不限于上述模块,例如:图像解码装置还可以包括存储单元163。存储单元163可以用于存储该图像解码装置的程序代码和数据。Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here. Of course, the image decoding apparatus provided in the embodiment of the present application includes but is not limited to the above-mentioned modules. For example, the image decoding apparatus may further include a storage unit 163 . The storage unit 163 may be used to store program codes and data of the image decoding apparatus.

在采用集成的单元的情况下,本申请实施例提供的图像解码装置的结构示意图如图17所示。在图17中,图像解码装置17包括:处理模块170和通信模块171。处理模块170用于对图像解码装置的动作进行控制管理,例如,执行解析单元160、确定单元161、修正单元162执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块171用于支持图像解码装置与其他设备之间的交互。如图17所示,图像解码装置还可以包括存储模块172,存储模块172用于存储图像解码装置的程序代码和数据,例如存储上述存储单元163所保存的内容。In the case of using an integrated unit, a schematic structural diagram of an image decoding apparatus provided by an embodiment of the present application is shown in FIG. 17 . In FIG. 17 , the image decoding apparatus 17 includes a processing module 170 and a communication module 171 . The processing module 170 is used to control and manage the actions of the image decoding apparatus, eg, to perform the steps performed by the parsing unit 160, the determining unit 161, the modifying unit 162, and/or other processes for performing the techniques described herein. The communication module 171 is used to support the interaction between the image decoding apparatus and other devices. As shown in FIG. 17 , the image decoding apparatus may further include a storage module 172 . The storage module 172 is configured to store program codes and data of the image decoding apparatus, for example, to store the content stored in the above-mentioned storage unit 163 .

其中,处理模块170可以是处理器或控制器,例如可以是中央处理器(CentralProcessing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块171可以是收发器、RF电路或通信接口等。存储模块172可以是存储器。The processing module 170 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), ASIC, FPGA or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 171 may be a transceiver, an RF circuit, a communication interface, or the like. The storage module 172 may be a memory.

其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。上述图像解码装置16和图像解码装置17均可执行上述图13所示的图像解码方法,图像解码装置16和图像解码装置17具体可以是视频图像解码装置或者其他具有视频解码功能的设备。Wherein, all the relevant contents of the scenarios involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here. The image decoding apparatus 16 and the image decoding apparatus 17 can both execute the image decoding method shown in FIG. 13 , and the image decoding apparatus 16 and the image decoding apparatus 17 may be video image decoding apparatuses or other devices with video decoding functions.

本申请还提供一种视频解码器,包括非易失性存储介质,以及中央处理器,所述非易失性存储介质存储有可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述可执行程序以实现本申请实施例的图像解码方法。The present application also provides a video decoder, including a non-volatile storage medium, and a central processing unit, where the non-volatile storage medium stores an executable program, and the central processing unit is connected to the non-volatile storage medium. The medium is connected, and the executable program is executed to implement the image decoding method of the embodiment of the present application.

本申请还提供一种终端,该终端包括:一个或多个处理器、存储器、通信接口。该存储器、通信接口与一个或多个处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括指令,当一个或多个处理器执行指令时,终端执行本申请实施例的图像编码和/或图像解码方法。这里的终端可以是视频显示设备,智能手机,便携式电脑以及其它可以处理视频或者播放视频的设备。The present application also provides a terminal, where the terminal includes: one or more processors, a memory, and a communication interface. The memory and the communication interface are coupled with one or more processors; the memory is used to store computer program codes, and the computer program codes include instructions. When the one or more processors execute the instructions, the terminal executes the image encoding and/or the image coding and/or the embodiments of the present application. or image decoding method. The terminal here can be a video display device, a smart phone, a portable computer, and other devices that can process or play videos.

本申请另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括一个或多个程序代码,该一个或多个程序包括指令,当解码设备中的处理器在执行该程序代码时,该解码设备执行本申请实施例的图像编码方法、图像解码方法。Another embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes one or more program codes, and the one or more programs include instructions, when the processor in the decoding device executes the program When coding, the decoding device executes the image encoding method and the image decoding method of the embodiments of the present application.

在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;解码设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得终端实施执行本申请实施例的图像编码方法、图像解码方法。In another embodiment of the present application, a computer program product is also provided, the computer program product includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; at least one processor of the decoding device can be obtained from a computer The readable storage medium reads the computer-executable instruction, and at least one processor executes the computer-executable instruction to cause the terminal to implement the image encoding method and the image decoding method of the embodiments of the present application.

在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it may take the form of a computer program product, in whole or in part. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.

所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).

所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid StateDisk(SSD))等。The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program codes .

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. . Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (37)

1. An image encoding method, comprising:
dividing the image, and determining a chroma component intra-frame prediction mode of a current coding block;
determining a prediction block of the chroma component of the current coding block according to the chroma component intra-frame prediction mode;
and correcting the prediction block of the chroma component of the current coding block to obtain the corrected prediction block of the chroma component of the current coding block.
2. The method of claim 1, wherein modifying the prediction block for the chroma component of the current coding block comprises:
determining a filter according to the chroma component intra prediction mode;
filtering a prediction block of a chroma component of the current coding block using the filter.
3. The method of claim 2, wherein the determining a filter according to the chroma component intra prediction mode comprises:
the filter is a first filter when the chroma component intra prediction mode is a two-step cross component prediction mode TSCPM _ T or an intra vertical class angle prediction mode.
4. The method of claim 3, wherein the first filter is configured to filter a pixel region adjacent to a left boundary of a chroma component of the current coding block and a prediction value of a prediction block of the chroma component of the current coding block.
5. The method of claim 4, wherein the pixel region adjacent to the left boundary of a chroma component of the current coding block contains chroma reconstruction pixels left adjacent to the current coding block.
6. The method of claim 4, wherein the first filter comprises a first two-tap filter;
the first two-tap filter comprises:
P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
wherein x, y is the coordinate of the current pixel, the value of x does not exceed the wide value range of the current coding block, the value of y does not exceed the high value range of the current coding block, P' (x, y) is the final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the current coding block, P (-1, y) is the reconstruction sample of the pixel adjacent to the left side boundary in the y row, f (x) is the horizontal filter coefficient of the pixel (x, y) reference reconstruction sample P (-1, y), and P (x, y) is the original prediction sample of the pixel (x, y).
7. The method of claim 6, wherein the filter coefficients of the first filter are determined by a look-up table in which filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (-1, y).
8. The method of claim 2, wherein determining a filter according to the chroma component intra prediction mode comprises:
the filter is a second filter when the chroma component intra prediction mode is TSCPM L or intra horizontal class angular prediction mode.
9. The method of claim 8, wherein the second filter is configured to filter a pixel region adjacent to an upper boundary of a chroma component of the current coding block and a prediction value of a prediction block of the chroma component of the current coding block.
10. The method of claim 9, wherein the pixel region adjacent to the upper boundary of a chroma component of the current coding block contains chroma reconstructed pixels adjacent to the current coding block.
11. The method of claim 9, wherein the second filter comprises a second two-tap filter;
the second two-tap filter comprises:
P(x,y)=f(y)·P(x,-1)+(1-f(y))·P(x,y)
where X, y is the coordinate of the current pixel, X does not exceed the wide value range of the current coding block, y does not exceed the high value range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference reconstructed sample P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
12. The method according to claim 11, wherein the filter coefficients of the second filter are determined by a look-up table in which filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (x, -1).
13. The method of claim 1, wherein the performing prediction correction on the prediction block of the chroma component of the current coding block comprises:
calculating a first rate distortion cost of the current coding block under the unmodified condition and calculating a second rate distortion cost of the current coding block under the modified condition;
determining that the first rate distortion cost is greater than the second rate distortion cost, and setting a chrominance correction identification bit as a first numerical value, wherein the first numerical value is used for indicating that the prediction correction needs to be carried out;
and performing prediction correction on the prediction block of the chroma component of the current coding block.
14. The method of claim 1, wherein the performing prediction correction on the prediction block of the chroma component of the current coding block comprises:
calculating a first rate distortion cost of the current coding block under the unmodified condition and calculating a second rate distortion cost of the current coding block under the modified condition;
and determining that the first rate distortion cost is less than or equal to the second rate distortion cost, and setting the chroma correction identification bit as a second numerical value, wherein the second numerical value is used for indicating that the prediction correction is not needed.
15. The method according to claim 13 or 14, wherein the chroma correction flag is common to the luma correction flag.
16. An image decoding method, comprising:
analyzing the code stream, and determining a chroma component intra-frame prediction mode of a current decoding block;
determining a prediction block for a chroma component of the currently decoded block according to the chroma component intra prediction mode;
and correcting the prediction block of the chroma component of the current decoding block to obtain the corrected prediction block of the chroma component of the current decoding block.
17. The method of claim 16, wherein modifying the prediction block for the chroma components of the currently decoded block comprises:
determining a filter according to the chroma component intra prediction mode;
filtering a prediction block of chroma components of the currently decoded block using the filter.
18. The method of claim 17, wherein the determining a filter according to the chroma component intra prediction mode comprises:
the filter is a first filter when the chroma intra prediction mode is TSCPM _ T or intra vertical class angular prediction mode.
19. The method of claim 18, wherein the first filter is configured to filter a region of pixels adjacent to a left boundary of chroma components of the current decoded block and predictors of a prediction block for chroma components of the current decoded block.
20. The method of claim 19, wherein the pixel region adjacent to the left boundary of a chroma component of the current coding block contains chroma reconstruction pixels left adjacent to the current coding block.
21. The method of claim 19, wherein the first filter comprises a first two-tap filter;
the first two-tap filter comprises:
P'(x,y)=f(x)·P(-1,y)+(1-f(x))·P(x,y)
where x, y are coordinates of the current pixel, the value of x does not exceed the wide range of the current decoded block, the value of y does not exceed the high range of the current decoded block, P' (x, y) is the final prediction sample of the pixel (x, y) of the prediction block of the chroma component of the current decoded block, P (-1, y) is the reconstructed sample of the pixel located in the y row adjacent to the left side boundary, f (x) is the horizontal filter coefficient of the pixel (x, y) reference reconstructed sample P (-1, y), and P (x, y) is the original prediction sample of the pixel (x, y).
22. The method of claim 21, wherein the filter coefficients of the first filter are determined by a look-up table in which the filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (-1, y).
23. The method of claim 17, wherein the determining a filter according to the chroma component intra prediction mode comprises:
the filter is a second filter when the chroma component intra prediction mode is TSCPM _ L or intra horizontal class angular prediction mode.
24. The method of claim 23, wherein the second filter is configured to filter a region of pixels adjacent to an upper boundary of a chroma component of the current decoded block and a prediction value of a prediction block of the chroma component of the current decoded block.
25. The method of claim 24, wherein the pixel region adjacent to the upper boundary of a chroma component of the current coding block contains chroma reconstructed pixels adjacent to the current coding block.
26. The method of claim 24, wherein the second filter comprises a second two-tap filter;
the second two-tap filter comprises:
P′(x,y)=f(y).P(x,-1)+(1-f(y)).P(x,y)
where X, y is the coordinate of the current pixel, X does not exceed the wide value range of the current coding block, y does not exceed the high value range of the current coding block, P' (X, y) is the final prediction sample of the pixel (X, y) of the prediction block of the chroma component of the current coding block, P (X, -1) is the reconstructed sample of the pixel adjacent to the upper boundary in the X column, f (y) is the vertical filter coefficient of the pixel (X, y) reference reconstructed sample P (X, -1), and P (X, y) is the original prediction sample of the pixel (X, y).
27. The method according to claim 26, wherein the filter coefficients of the second filter are determined by a look-up table in which filter coefficients are indexed by the size of a prediction block of the chroma component and the distance between pixel (x, y) and pixel (x, -1).
28. The method of claim 16, wherein said predictively modifying the prediction block for the chroma components of the currently decoded block comprises:
analyzing the code stream to obtain a chroma correction flag bit;
determining a value of the chroma correction flag bit to be a first value, the first value indicating that a filter is used for the prediction correction;
performing the prediction correction on a prediction block of a chroma component of the currently decoded block.
29. The method of claim 28, wherein said predictively modifying the prediction block for the chroma components of the currently decoded block comprises:
analyzing the code stream to obtain a chroma correction flag bit;
determining a value of the chroma correction flag bit to be a second value indicating that no filter is used for the prediction correction.
30. The method of claim 28 or 29, wherein the chroma correction flag bit is common to the luma correction flag bit.
31. An image encoding device characterized by comprising:
the dividing unit is used for dividing the image and determining a chroma component intra-frame prediction mode of a current coding block;
a determining unit, configured to determine a prediction block of a chroma component of the current coding block according to the chroma component intra prediction mode;
and the correcting unit is used for correcting the prediction block of the chroma component of the current coding block to obtain the corrected prediction block of the chroma component of the current coding block.
32. An image decoding apparatus, comprising:
the analysis unit is used for analyzing the code stream and determining the chroma component intra-frame prediction mode of the current decoding block;
a determination unit for determining a prediction block of a chroma component of the current decoded block according to the chroma component intra prediction mode;
and the correction unit is used for correcting the prediction block of the chroma component of the current decoding block to obtain the corrected prediction block of the chroma component of the current decoding block.
33. An encoder comprising a non-volatile storage medium and a central processing unit, wherein the non-volatile storage medium stores an executable program, and wherein the central processing unit is coupled to the non-volatile storage medium, and wherein the encoder performs the method of any one of claims 1-15 when the executable program is executed by the central processing unit.
34. A decoder comprising a non-volatile storage medium and a central processor, wherein the non-volatile storage medium stores an executable program, wherein the central processor is coupled to the non-volatile storage medium, wherein the decoder performs the method of any one of claims 16-30 when the executable program is executed by the central processor.
35. A terminal, characterized in that the terminal comprises: one or more processors, memory, and a communication interface; the memory, the communication interface and the one or more processors; the terminal communicating with other devices via the communication interface, the memory for storing computer program code, the computer program code comprising instructions,
the instructions, when executed by the one or more processors, cause the terminal to perform the method of any of claims 1-30.
36. A computer program product comprising instructions for causing a terminal to perform the method according to any one of claims 1-30 when the computer program product is run on the terminal.
37. A computer-readable storage medium comprising instructions that, when executed on a terminal, cause the terminal to perform the method of any one of claims 1-30.
CN202210664095.1A 2020-06-05 2021-04-29 Image encoding method, image decoding method and related devices Active CN115002485B (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN2020105104233 2020-06-05
CN202010510423.3A CN113766246A (en) 2020-06-05 2020-06-05 Image encoding method, image decoding method and related device
CN202180005833.5A CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device
PCT/CN2021/090909 WO2021244197A1 (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method, and related apparatuses

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202180005833.5A Division CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device

Publications (2)

Publication Number Publication Date
CN115002485A true CN115002485A (en) 2022-09-02
CN115002485B CN115002485B (en) 2025-07-22

Family

ID=78785271

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202010510423.3A Withdrawn CN113766246A (en) 2020-06-05 2020-06-05 Image encoding method, image decoding method and related device
CN202210664095.1A Active CN115002485B (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related devices
CN202180005833.5A Pending CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202010510423.3A Withdrawn CN113766246A (en) 2020-06-05 2020-06-05 Image encoding method, image decoding method and related device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202180005833.5A Pending CN114514748A (en) 2020-06-05 2021-04-29 Image encoding method, image decoding method and related device

Country Status (4)

Country Link
CN (3) CN113766246A (en)
MX (1) MX2022009939A (en)
TW (1) TW202147844A (en)
WO (1) WO2021244197A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024078416A1 (en) * 2022-10-12 2024-04-18 维沃移动通信有限公司 Chromaticity component prediction method and apparatus, and device
WO2024222760A1 (en) * 2023-04-24 2024-10-31 Mediatek Inc. Video coding method and apparatus for improving chroma prediction by fusion

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023197191A1 (en) * 2022-04-12 2023-10-19 Oppo广东移动通信有限公司 Coding method and apparatus, decoding method and apparatus, coding device, decoding device, and storage medium
CN115118990B (en) * 2022-06-24 2024-07-23 腾讯科技(深圳)有限公司 Chroma prediction method, device, encoding apparatus, decoding apparatus, and storage medium
CN116248900B (en) * 2023-02-24 2025-09-02 中山大学 A coefficient optimization method for nonlinear cross-component prediction models
CN118250466B (en) * 2024-05-28 2025-01-24 摩尔线程智能科技(北京)股份有限公司 A method and device for determining intra-frame prediction mode, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108293130A (en) * 2015-11-27 2018-07-17 联发科技股份有限公司 Apparatus and method for video encoding and decoding through intra prediction
US20190075293A1 (en) * 2016-03-25 2019-03-07 Panasonic Intellectual Property Management Co., Ltd. Methods and apparatuses for encoding and decoding video using signal dependent adaptive quantization
CN110839153A (en) * 2018-08-17 2020-02-25 北京字节跳动网络技术有限公司 Simplified cross-component prediction
CN110971897A (en) * 2018-09-28 2020-04-07 杭州海康威视数字技术股份有限公司 Encoding, decoding method, apparatus and system for intra prediction mode of chrominance components
US20200177878A1 (en) * 2017-06-21 2020-06-04 Lg Electronics Inc Intra-prediction mode-based image processing method and apparatus therefor

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MXPA05007449A (en) * 2003-01-10 2005-09-12 Thomson Licensing Sa Defining interpolation filters for error concealment in a coded image.
US8472527B2 (en) * 2006-09-13 2013-06-25 Texas Instruments Incorporated Hierarchical motion estimation using original frame for sub-sampled reference
US9008175B2 (en) * 2010-10-01 2015-04-14 Qualcomm Incorporated Intra smoothing filter for video coding
US20170302965A1 (en) * 2016-04-15 2017-10-19 Google Inc. Adaptive directional loop filter

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108293130A (en) * 2015-11-27 2018-07-17 联发科技股份有限公司 Apparatus and method for video encoding and decoding through intra prediction
US20190075293A1 (en) * 2016-03-25 2019-03-07 Panasonic Intellectual Property Management Co., Ltd. Methods and apparatuses for encoding and decoding video using signal dependent adaptive quantization
US20200177878A1 (en) * 2017-06-21 2020-06-04 Lg Electronics Inc Intra-prediction mode-based image processing method and apparatus therefor
CN110839153A (en) * 2018-08-17 2020-02-25 北京字节跳动网络技术有限公司 Simplified cross-component prediction
CN110971897A (en) * 2018-09-28 2020-04-07 杭州海康威视数字技术股份有限公司 Encoding, decoding method, apparatus and system for intra prediction mode of chrominance components

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KAI ZHANG 等: "Enhanced Cross-Component Linear Model for Chroma Intra-Prediction in Video Coding", 《IEEE》, 26 April 2018 (2018-04-26) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024078416A1 (en) * 2022-10-12 2024-04-18 维沃移动通信有限公司 Chromaticity component prediction method and apparatus, and device
WO2024222760A1 (en) * 2023-04-24 2024-10-31 Mediatek Inc. Video coding method and apparatus for improving chroma prediction by fusion

Also Published As

Publication number Publication date
TW202147844A (en) 2021-12-16
CN115002485B (en) 2025-07-22
CN114514748A (en) 2022-05-17
MX2022009939A (en) 2022-09-12
CN113766246A (en) 2021-12-07
WO2021244197A1 (en) 2021-12-09

Similar Documents

Publication Publication Date Title
CN116456101B (en) Image encoding method, image decoding method and related devices
CN113497937B (en) Image coding method, image decoding method and related device
CN115002485B (en) Image encoding method, image decoding method and related devices
CN114071161B (en) Image encoding method, image decoding method and related devices
WO2020220884A1 (en) Intra-frame prediction method and apparatus for video sequence
TWI882138B (en) Image encoding method, image decoding method and related device
CN118101967B (en) Method for position-dependent spatially varying transformation for video coding and decoding
WO2022037300A1 (en) Encoding method, decoding method, and related devices
CN110278435A (en) A kind of intra-frame prediction method and device of image block
US20250039437A1 (en) Methods and devices for multi-hypothesis-based prediction
WO2021135856A1 (en) Video coding method and apparatus, video decoding method and apparatus, device, and storage medium
US12542897B2 (en) Methods and devices for decoder-side intra mode derivation
CN111937389B (en) Apparatus and method for video encoding and decoding
CN114598873B (en) Quantization parameter decoding method and device
CN113965764B (en) Image encoding method, image decoding method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant