[go: up one dir, main page]

HK40114579A - Method and apparatus for encoding and decoding one or more portions of an image and storage medium - Google Patents

Method and apparatus for encoding and decoding one or more portions of an image and storage medium Download PDF

Info

Publication number
HK40114579A
HK40114579A HK42025102097.0A HK42025102097A HK40114579A HK 40114579 A HK40114579 A HK 40114579A HK 42025102097 A HK42025102097 A HK 42025102097A HK 40114579 A HK40114579 A HK 40114579A
Authority
HK
Hong Kong
Prior art keywords
filter
alf
sample
limiting
image
Prior art date
Application number
HK42025102097.0A
Other languages
Chinese (zh)
Inventor
Jonathan Taquet
Christophe Gisquet
Guillaume Laroche
Patrice Onno
Original Assignee
Canon Kabushiki Kaisha
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 Canon Kabushiki Kaisha filed Critical Canon Kabushiki Kaisha
Publication of HK40114579A publication Critical patent/HK40114579A/en

Links

Description

对图像的一个或多个部分进行编码和解码的方法和装置以及存储介质Methods and apparatus for encoding and decoding one or more portions of an image, as well as storage media.

(本申请是申请日为2019年11月29日、申请号为2019800852695、发明名称为“具有非线性限幅的自适应环路滤波(ALF)”的申请的分案申请。)(This application is a divisional application of the application filed on November 29, 2019, with application number 2019800852695 and invention title "Adaptive Loop Filter with Nonlinear Limiting (ALF)".)

技术领域Technical Field

本发明涉及视频成分的块的编码或解码。本发明的实施例发现了在控制用于滤波这种成分的样本的滤波器时的特定但不排他的使用。特别地但不排他地,控制自适应环路滤波器。This invention relates to the encoding or decoding of blocks of video components. Embodiments of the invention reveal specific, but not exclusive, uses in controlling filters used to filter samples of such components. In particular, but not exclusively, is the control of adaptive loop filters.

背景技术Background Technology

视频编码包括图像编码(图像等效于视频的单个帧)。在视频编码中,诸如变换系数的量化或运动补偿(通常使用插值滤波器来进行)等的一些编码工具经常引入失真偏置/效应(在给定上下文中看起来是规则的或至少是非随机的失真)。为了补偿这些偏差/伪像,并且提高(或至少维持良好水平的)编码效率,使用一些特定编码工具,称为后滤波器或环内滤波器。解块滤波器(DBF)、样本自适应位移(SAO)滤波器或自适应环路滤波器(ALF)是这种编码工具的一些示例。在编码环路内应用环内滤波器,使得它们提供给当前帧的图像质量增加,由此基于当前帧编码的下一帧的编码效率增加。例如,DCT系数的量化对于视频压缩是有效的,但是它经常在压缩的样本块的边界上引入块伪像(偏差)。解块滤波器减少了由这种伪像引起的不期望的影响。与在编码环路外(例如,就在显示帧之前)对帧进行解块相比,在编码环路内(在帧用作另一帧的运动补偿的参考帧之前)对解码帧进行解块(使用DBF)显著地增加了运动补偿的编码效率。Video coding comprises image coding (an image is equivalent to a single frame of video). In video coding, coding tools such as quantization of transform coefficients or motion compensation (often done using interpolation filters) frequently introduce distortion biases/effects (distortions that appear regular or at least non-random in a given context). To compensate for these biases/artifacts and improve (or at least maintain) coding efficiency, certain coding tools are used, called post-filters or in-loop filters. Deblocking filters (DBF), sample adaptive shift (SAO) filters, or adaptive loop filters (ALF) are some examples of such coding tools. Applying in-loop filters within the coding loop increases the image quality they provide to the current frame, thereby increasing the coding efficiency of the next frame encoded based on the current frame. For example, quantization of DCT coefficients is efficient for video compression, but it often introduces block artifacts (biases) at the boundaries of compressed sample blocks. Deblocking filters reduce the undesirable effects caused by these artifacts. Deblocking frames within the coding loop (using DBF) (before the frame is used as a reference frame for motion compensation of another frame) significantly increases the coding efficiency of motion compensation compared to deblocking frames outside the coding loop (e.g., just before the display frame).

本发明特别涉及自适应环路滤波器(ALF),该自适应环路滤波器也用作环内滤波器以减少解码帧/图像中的不期望的压缩伪像。ALF已经由视频编码专家组/运动图片专家组(VCEG/MPEG)标准化组研究,并且正考虑在通用视频编码(VVC)标准中使用,例如在VVC测试模型软件的第三版本(VTM-3.0或VVC草稿版本3)中使用。This invention specifically relates to an adaptive loop filter (ALF), which also functions as an in-loop filter to reduce unwanted compression artifacts in decoded frames/images. The ALF has been studied by the Video Coding Experts Group/Moving Picture Experts Group (VCEG/MPEG) standardization group and is being considered for use in the Universal Video Coding (VVC) standard, for example, in version 3 of the VVC test model software (VTM-3.0 or VVC draft version 3).

发明内容Summary of the Invention

本发明的实施例的目的在于解决视频成分的块的前述编码或解码的一个或多个问题或缺点。The purpose of embodiments of the present invention is to solve one or more problems or disadvantages of the aforementioned encoding or decoding of blocks of video components.

虽然ALF是高效的编码工具,但其线性滤波是提高图像质量的次优解。本发明使得利用ALF的非线性滤波能够提高其效率和/或性能。While ALF is an efficient encoding tool, its linear filtering is a suboptimal solution for improving image quality. This invention enables the use of nonlinear filtering within ALF to improve its efficiency and/or performance.

根据本发明的方面,提供了如所附权利要求中所阐述的设备/装置、方法、程序、计算机可读存储介质和信号。根据从属权利要求和说明书,本发明的其它特征将是明显的。According to aspects of the invention, devices/apparatus, methods, programs, computer-readable storage media, and signals are provided as set forth in the appended claims. Other features of the invention will be apparent from the dependent claims and the description.

根据本发明的第一方面,提供针对图像的一个或多个图像部分控制自适应环路滤波器的方法,所述方法包括基于图像部分的第一样本值的一个或多个邻近样本值来控制对第一样本的滤波,其中所述控制使用具有一个或多个邻近样本值作为变量的非线性函数。适当地,非线性函数的变量包括两个或更多个邻近样本值。适当地,非线性函数的变量还包括第一样本值和取决于一个或多个邻近样本值的位置的第一变量。适当地,第一变量取决于两个或更多个邻近样本值的位置。适当地,非线性函数的输出被用作自适应环路滤波器的输入(或输入参数)。According to a first aspect of the invention, a method is provided for controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering of a first sample based on one or more neighboring sample values of a first sample value of the image portion, wherein the control uses a nonlinear function having one or more neighboring sample values as variables. Suitably, the variables of the nonlinear function include two or more neighboring sample values. Suitably, the variables of the nonlinear function also include the first sample value and a first variable depending on the position of the one or more neighboring sample values. Suitably, the first variable depends on the position of the two or more neighboring sample values. Suitably, the output of the nonlinear function is used as the input (or input parameter) of the adaptive loop filter.

根据本发明的第二方面,提供用于针对图像的一个或多个图像部分控制滤波器的方法,所述方法包括基于图像部分的第一样本值的一个或多个邻近样本值来控制对第一样本的滤波,其中所述控制使用具有包括第一样本值、一个或多个邻近样本值和第一变量的多个变量的非线性函数,所述第一变量取决于一个或多个邻近样本值的位置。适当地,多个变量包括两个或更多个邻近样本值。适当地,第一变量取决于两个或更多个邻近样本值的位置。适当地,滤波器是自适应环路滤波器。According to a second aspect of the invention, a method is provided for controlling a filter for one or more image portions of an image, the method comprising controlling filtering of the first sample based on one or more neighboring sample values of a first sample value of the image portion, wherein the control uses a nonlinear function having a plurality of variables including the first sample value, one or more neighboring sample values, and a first variable, the first variable depending on the position of the one or more neighboring sample values. Suitably, the plurality of variables includes two or more neighboring sample values. Suitably, the first variable depends on the position of the two or more neighboring sample values. Suitably, the filter is an adaptive loop filter.

根据本发明的第三方面,提供用于针对图像的一个或多个图像部分控制滤波器的方法,所述方法包括基于图像部分的第一样本值的一个或多个邻近样本值来控制对第一样本的滤波,其中所述控制使用一个或多个限幅函数,限幅函数具有基于第一样本值、两个或更多个邻近样本值和限幅参数的一个或多个控制参数。适当地,一个或多个控制参数基于第一样本值、两个或更多个邻近样本值和限幅参数。适当地,滤波器是自适应环路滤波器。适当地,一个或多个限幅函数中的各个限幅函数是以下各项之一:max(-b,min(b,d))、min(b,max(-b,d))、max(c-b,min(c+b,n))或min(c+b,max(c-b,n));以及c是第一样本值,n是邻近样本值,d=n-c,并且b是限幅参数。According to a third aspect of the invention, a method is provided for controlling a filter for one or more image portions of an image, the method comprising controlling filtering of the first sample based on one or more neighboring sample values of a first sample value of the image portion, wherein the control uses one or more limiting functions having one or more control parameters based on the first sample value, two or more neighboring sample values, and a limiting parameter. Suitably, the one or more control parameters are based on the first sample value, two or more neighboring sample values, and a limiting parameter. Suitably, the filter is an adaptive loop filter. Suitably, each of the one or more limiting functions is one of the following: max(-b,min(b,d)), min(b,max(-b,d)), max(c-b,min(c+b,n)), or min(c+b,max(c-b,n)); and c is the first sample value, n is the neighboring sample value, d = n-c, and b is the limiting parameter.

根据本发明的第四方面,提供用于针对图像的一个或多个图像部分控制自适应环路滤波器的方法,所述方法包括基于图像部分的第一样本值的一个或多个邻近样本值来控制对第一样本的滤波,其中所述控制使用第一样本值以及一个或多个邻近样本值的非线性组合作为自适应环路滤波器的输入参数。适当地,自适应环路滤波器如VTM3.0中所指定。According to a fourth aspect of the invention, a method is provided for controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering of a first sample based on one or more neighboring sample values of a first sample value of the image portion, wherein the control uses a nonlinear combination of the first sample value and one or more neighboring sample values as input parameters to the adaptive loop filter. Suitably, the adaptive loop filter is as specified in VTM3.0.

根据本发明的第五方面,提供用于针对图像的一个或多个图像部分控制自适应环路滤波器的方法,所述方法包括基于图像部分的第一样本值的两个或更多个邻近样本值来控制对第一样本的滤波,其中所述控制使用两个或更多个邻近样本值的非线性组合作为自适应环路滤波器的输入参数。适当地,自适应环路滤波器如VTM3.0中所指定。According to a fifth aspect of the invention, a method is provided for controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering of a first sample based on two or more neighboring sample values of a first sample value of the image portion, wherein the control uses a nonlinear combination of the two or more neighboring sample values as input parameters to the adaptive loop filter. Suitably, the adaptive loop filter is as specified in VTM3.0.

对于本发明的第四和第五方面,可以根据其实施例提供以下特征。适当地,非线性组合是非线性函数的一部分。适当地,自适应环路滤波器的输入参数还包括第一变量,该第一变量取决于一个或多个邻近样本值的位置。适当地,第一变量取决于两个或更多个邻近样本值的位置。适当地,非线性组合是第一样本值、一个(或两个或更多个)邻近样本值和第一变量。For the fourth and fifth aspects of the invention, the following features may be provided according to embodiments thereof. Suitably, the nonlinear combination is part of a nonlinear function. Suitably, the input parameters of the adaptive loop filter also include a first variable that depends on the positions of one or more neighboring sample values. Suitably, the first variable depends on the positions of two or more neighboring sample values. Suitably, the nonlinear combination is a first sample value, one (or two or more) neighboring sample values, and the first variable.

根据本发明的第六方面,提供处理图像的一个或多个部分的方法,图像部分具有与其相关联的色度样本和亮度样本,其中所述方法包括基于从位流获得的信息或者图像部分的第一样本值及其一个或多个邻近样本值确定以下各项至少之一:使用或不使用利用根据第一方面、第二方面、第三方面、第四方面或第五方面的方法所控制的滤波器;启用或禁用所述滤波器的使用;或者在对第一样本值进行滤波时与所述滤波器一起使用的滤波参数。适当地,从位流可获得的信息包括标志或索引。适当地,从位流可获得的信息包括以下各项中的一个或多个:用于识别所述滤波器的信息;用于指示使用或不使用的标志;用于指示启用或禁用的标志;关于与所述滤波器一起使用的第一变量的信息;或者关于用于指定值范围的限幅参数的信息。适当地,关于第一变量的信息用于指定值或者识别第一函数作为第一变量。适当地,第一变量取决于一个或多个邻近样本值的位置(或者能够基于一个或多个邻近样本值的位置而变化)。适当地,第一变量取决于两个或更多个邻近样本值的位置。According to a sixth aspect of the invention, a method is provided for processing one or more portions of an image, the image portions having associated chroma samples and luminance samples, wherein the method includes determining at least one of the following based on information obtained from a bitstream or a first sample value of the image portion and one or more neighboring sample values: using or not using a filter controlled by the method according to the first, second, third, fourth, or fifth aspect; enabling or disabling the use of the filter; or filtering parameters used with the filter when filtering the first sample value. Suitably, the information available from the bitstream includes flags or indexes. Suitably, the information available from the bitstream includes one or more of the following: information for identifying the filter; flags for indicating use or non-use; flags for indicating enable or disable; information about a first variable used with the filter; or information about a limiting parameter for specifying a range of values. Suitably, the information about the first variable is used to specify a value or identify a first function as the first variable. Suitably, the first variable depends on the position of one or more neighboring sample values (or can vary based on the position of one or more neighboring sample values). Suitably, the first variable depends on the position of two or more neighboring sample values.

根据本发明的第七方面,提供对一个或多个图像进行编码的方法,所述方法包括针对图像的一个或多个部分,根据第一方面、第二方面、第三方面、第四方面或第五方面控制滤波器,或者根据第六方面进行处理。适当地,该方法还包括:接收图像;对所接收的图像进行编码并生成位流;以及处理编码图像,其中处理包括根据第一方面、第二方面、第三方面、第四方面或第五方面进行控制或者根据第六方面进行处理。适当地,当从属于第六方面时,该方法还包括在位流中提供所述信息。适当地,该方法还包括:从多个可用函数中选择非线性函数或者一个或多个限幅函数;在处理编码图像时使用所选择的函数;以及在位流中提供用于识别所选择的函数的信息。According to a seventh aspect of the invention, a method for encoding one or more images is provided, the method comprising controlling a filter according to a first aspect, a second aspect, a third aspect, a fourth aspect, or a fifth aspect, or processing a portion of the image according to a sixth aspect. Suitably, the method further comprises: receiving an image; encoding the received image and generating a bitstream; and processing the encoded image, wherein the processing includes control according to the first aspect, the second aspect, the third aspect, the fourth aspect, or the fifth aspect, or processing according to the sixth aspect. Suitably, when subordinate to the sixth aspect, the method further comprises providing said information in the bitstream. Suitably, the method further comprises: selecting a nonlinear function or one or more limiting functions from a plurality of available functions; using the selected function when processing the encoded image; and providing information in the bitstream for identifying the selected function.

根据本发明的第八方面,提供对一个或多个图像进行解码的方法,所述方法包括针对图像的一个或多个部分,根据第一方面、第二方面、第三方面、第四方面或第五方面控制滤波器或者根据第六方面进行处理。适当地,该方法还包括:接收位流;从所接收的位流中解码信息以获得图像;以及处理所获得的图像,其中处理包括根据第一方面、第二方面、第三方面、第四方面或第五方面进行控制,或者根据第六方面进行处理。适当地,当从属于第六方面时,该方法还包括从位流获得所述信息。适当地,该方法还包括:从位流获得用于从多个可用函数识别非线性函数或者一个或多个限幅函数的信息;以及在处理所获得的图像时使用所识别的函数。According to an eighth aspect of the invention, a method for decoding one or more images is provided, the method comprising controlling a filter according to a first aspect, a second aspect, a third aspect, a fourth aspect, or a fifth aspect, or processing according to a sixth aspect, for one or more portions of the image. Suitably, the method further comprises: receiving a bit stream; decoding information from the received bit stream to obtain an image; and processing the obtained image, wherein the processing includes control according to the first aspect, the second aspect, the third aspect, the fourth aspect, or the fifth aspect, or processing according to the sixth aspect. Suitably, when subordinate to the sixth aspect, the method further comprises obtaining the information from the bit stream. Suitably, the method further comprises: obtaining information from the bit stream for identifying a nonlinear function or one or more limiting functions from a plurality of available functions; and using the identified function when processing the obtained image.

根据本发明的第九方面,提供用于针对图像的一个或多个部分控制滤波器的装置,所述装置包括控制器,所述控制器被配置为进行根据第一方面、第二方面、第三方面、第四方面、第五方面或第六方面的方法。According to a ninth aspect of the invention, an apparatus is provided for controlling a filter for one or more portions of an image, the apparatus comprising a controller configured to perform a method according to a first aspect, a second aspect, a third aspect, a fourth aspect, a fifth aspect, or a sixth aspect.

根据本发明的第十方面,提供用于对图像进行编码的装置,该装置包括根据第九方面的控制装置。适当地,该装置被配置成进行根据第七方面的方法。According to a tenth aspect of the invention, an apparatus for encoding an image is provided, the apparatus including a control device according to a ninth aspect. Suitably, the apparatus is configured to perform the method according to a seventh aspect.

根据本发明的第十一方面,提供用于对图像进行解码的装置,该装置包括根据第九方面的控制装置。适当地,该装置被配置成进行根据第八方面的方法。According to an eleventh aspect of the invention, an apparatus for decoding an image is provided, the apparatus including a control device according to a ninth aspect. Suitably, the apparatus is configured to perform the method according to an eighth aspect.

根据本发明的第十二方面,提供用于针对图像的一个或多个图像部分控制自适应环路滤波器的方法,所述方法包括基于图像部分的第一样本值的多个邻近样本值来控制第一样本的滤波,其中所述控制包括使用非线性函数,非线性函数具有基于邻近样本值中的一个或多个的一个或多个变量。应当理解,邻近样本(值)不限于相邻样本(值),而是还包括第一样本(值)周围或附近的样本(值)。适当地,控制包括将未用于确定或作为非线性函数中的变量的一个或多个其它邻近样本中的一个或多个邻近样本值用作自适应环路滤波器的输入参数。适当地,值用于确定或作为一个或多个(或该)非线性函数中的变量的邻近样本布置成如下形状:与第一样本在交叉点处的交叉;或者平行四边形。适当地,值用于确定或作为一个或多个(或该)非线性函数中的变量的邻近样本被布置成如下形状:当8个邻近样本的值用于确定或作为非线性函数中的变量时,与第一样本在交叉点处的高5个样本和宽5个样本的交叉,或者各个边长度为3个样本的中空平行四边形;或者当12个邻近样本的值被用于确定或作为一个或多个(或该)非线性函数中的变量时,各个边长度为3个样本的平行四边形。适当地,与第一样本在交叉点(和/或中心)处的交叉是以下各项之一:垂直和水平线的交叉“+”;或斜线的交叉“X”(对角线交叉)。适当的,(中空)平行四边形是以下各项之一:正方形;矩形;或者菱形形状。适当地,(中空)平行四边形围绕或包围位于中心的第一样本。可选地,其值用于确定或作为一个或多个(或该)非线性函数中的变量的邻近样本被布置成第一样本在中心处的如下形状:垂直线“|”;水平线“-”;从左上到右下的对角/斜线“\”;或者从右上到左下的对角线/斜线“/”。可选地,值用于确定或作为一个或多个(或该)非线性函数中的变量的邻近样本布置成(中空)多边形的形状。适当地,(中空)多边形围绕或包围位于中心处的第一样本。可选地,值用于确定或作为一个或多个(或该)非线性函数中的变量的邻近样本被布置成上述形状的任意组合的形状。适当地,滤波器变量在两个或更多个邻近样本之间共用。适当地,相邻样本的布置形状具有关于中心的对称。适当地,交叉形状、平行四边形形状或多边形形状具有关于中心的对称。可选地,邻近样本的布置形状不具有关于中心的对称。适当地,交叉形状或平行四边形形状不具有关于中心的对称。适当地,第一样本和多个邻近样本值中的邻近样本以如下形状排列:与第一样本在交叉点处交叉;或者平行四边形或中空平行四边形。适当地,第一样本值和多个邻近样本值中的邻近样本以如下的平行四边形的形状布置:当多个邻近样本值由24个邻近样本的样本值构成时,各个边长度为4个样本;或者,当多个邻近样本值由12个邻近样本的样本值构成时,各个边长度为3个样本。适当地,与第一样本在交叉点(和/或中心)处交叉是以下各项之一:垂直和水平线的交叉“+”;或斜线的交叉“X”(对角线交叉)。适当的,(中空)平行四边形是以下各项之一:正方形;矩形;或者菱形形状。适当地,(中空)平行四边形围绕或包围位于中心的第一样本。可选地,第一样本和多个邻近样本值中的邻近样本以第一样本位于中心布置为如下形状布置:垂直线“|”;水平线“-”;从左上到右下的对角线/斜线“\”;或从右上到左下的对角线/斜线“/”。可选地,第一样本和多个邻近样本值中的邻近样本布置成(中空)多边形的形状。适当地,(中空)多边形围绕或包围位于中心处的第一样本。可选地,第一样本和多个邻近样本值中的邻近样本以前述形状的任意组合的形状布置。适当地,滤波器变量在两个或更多个邻近样本之间共用。适当地,相邻样本的布置形状具有关于中心的对称。适当地,交叉形状、平行四边形形状或多边形形状具有关于中心的对称。可选地,邻近样本的布置形状不具有关于中心的对称。适当地,交叉形状、平行四边形形状或多边形形状不具有关于中心的对称。适当地,第一样本和所述邻近样本是亮度成分样本。可选地,第一样本和所述邻近样本是色度成分样本。适当地,该(或者一个或多个)非线性函数的变量还包括第一样本值,以及该(或者一个或多个)非线性函数被应用于第一样本值和一个或多个邻近样本值中的各个邻近样本值之间的差。适当地,该(或者一个或多个)非线性函数的变量还包括第一样本值和取决于一个或多个邻近样本的位置的一个或多个滤波器变量,各个滤波器变量对于两个或更多个邻近样本是相同的;并且该(或者一个或多个)非线性函数被应用于以下的差之和:该差为第一样本值与具有相同滤波器变量的两个或更多个邻近样本中的两个或更多个邻近样本值的各邻近样本值之间的两个或更多个差。适当地,该(或者一个或多个)非线性函数的输出被用作自适应环路滤波器的输入(或输入参数)。适当地,非线性函数包括一个或多个限幅函数,并且一个或多个限幅函数中的各个限幅函数是以下各项之一:max(-b,min(b,d))、min(b,max(-b,d))、max(c-b,min(c+b,n))、min(c+b,max(c-b,n))、max(-b,min(b,d1+d2))、min(b,max(-b,d1+d2))、max(2*c-b,min(2*c+b,n1+n2))或min(2*c+b,max(2*c-b,n1+n2)),其中c是第一样本值,n或n1或n2是邻近样本值,d=n-c,d1=n1-c,d2=n2-c,以及b是限幅参数。According to a twelfth aspect of the invention, a method is provided for controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering of a first sample based on a plurality of neighboring sample values of a first sample value of the image portion, wherein the control comprises using a nonlinear function having one or more variables based on one or more of the neighboring sample values. It should be understood that neighboring samples (values) are not limited to adjacent samples (values), but also include samples (values) around or near the first sample (value). Suitably, the control comprises using one or more neighboring sample values from one or more other neighboring samples not used for determination or as variables in the nonlinear function as input parameters to the adaptive loop filter. Suitably, the neighboring samples whose values are used for determination or as variables in one or more (or the) nonlinear function are arranged in a shape such that they intersect with the first sample at an intersection point; or form a parallelogram. Suitable, the neighboring samples whose values are used to determine or serve as variables in one or more (or the) nonlinear functions are arranged in the following shape: when the values of 8 neighboring samples are used to determine or serve as variables in the nonlinear function, an intersection with the first sample at the intersection point, consisting of 5 samples high and 5 samples wide, or a hollow parallelogram with sides of 3 samples long; or when the values of 12 neighboring samples are used to determine or serve as variables in one or more (or the) nonlinear functions, a parallelogram with sides of 3 samples long. Suitable, the intersection with the first sample at the intersection point (and/or center) is one of the following: a "+" intersection of vertical and horizontal lines; or an "X" intersection of diagonal lines. Suitable, the (hollow) parallelogram is one of the following: a square; a rectangle; or a rhombus shape. Suitable, the (hollow) parallelogram surrounds or encloses the first sample located at the center. Optionally, the neighboring samples whose values are used to determine or represent variables in one or more (or the) nonlinear functions are arranged in the following shape at the center of the first sample: a vertical line "|"; a horizontal line "-"; a diagonal/slash "\" from the top left to the bottom right; or a diagonal/slash "/" from the top right to the bottom left. Optionally, the neighboring samples whose values are used to determine or represent variables in one or more (or the) nonlinear functions are arranged in the shape of a (hollow) polygon. Appropriately, the (hollow) polygon surrounds or encloses the first sample located at the center. Optionally, the neighboring samples whose values are used to determine or represent variables in one or more (or the) nonlinear functions are arranged in any combination of the above shapes. Appropriately, the filter variable is shared among two or more neighboring samples. Appropriately, the arrangement shape of the adjacent samples has symmetry about the center. Appropriately, the cross shape, parallelogram shape, or polygon shape has symmetry about the center. Optionally, the arrangement shape of the neighboring samples does not have symmetry about the center. Appropriately, the cross shape or parallelogram shape does not have symmetry about the center. Suitablely, the first sample and the neighboring samples among the plurality of neighboring sample values are arranged in the following shape: intersecting with the first sample at an intersection point; or a parallelogram or a hollow parallelogram. Suitablely, the first sample value and the neighboring samples among the plurality of neighboring sample values are arranged in the shape of a parallelogram: when the plurality of neighboring sample values consist of sample values of 24 neighboring samples, each side has a length of 4 samples; or when the plurality of neighboring sample values consist of sample values of 12 neighboring samples, each side has a length of 3 samples. Suitablely, intersecting with the first sample at an intersection point (and/or center) is one of the following: a "+" intersection of vertical and horizontal lines; or an "X" intersection of diagonal lines. Suitablely, the (hollow) parallelogram is one of the following: a square; a rectangle; or a rhombus shape. Suitablely, the (hollow) parallelogram surrounds or encloses the first sample located at the center. Optionally, the first sample and neighboring samples among the plurality of neighboring sample values are arranged with the first sample centered in the following shapes: a vertical line "|"; a horizontal line "-"; a diagonal/slash "\" from the top left to the bottom right; or a diagonal/slash "/" from the top right to the bottom left. Optionally, the first sample and neighboring samples among the plurality of neighboring sample values are arranged in the shape of a (hollow) polygon. Suitablely, the (hollow) polygon surrounds or encloses the first sample located at the center. Optionally, the first sample and neighboring samples among the plurality of neighboring sample values are arranged in any combination of the aforementioned shapes. Suitablely, filter variables are shared among two or more neighboring samples. Suitablely, the arrangement shape of adjacent samples has symmetry about the center. Suitablely, the cross shape, parallelogram shape, or polygon shape has symmetry about the center. Optionally, the arrangement shape of neighboring samples does not have symmetry about the center. Suitablely, the cross shape, parallelogram shape, or polygon shape does not have symmetry about the center. Suitablely, the first sample and the neighboring samples are luminance component samples. Optionally, the first sample and the neighboring samples are chromaticity component samples. Appropriately, the variables of the (or one or more) nonlinear functions also include the first sample value, and the differences between the first sample value and the respective neighboring sample values among the one or more neighboring sample values to which the (or one or more) nonlinear functions are applied. Appropriately, the variables of the (or one or more) nonlinear functions also include the first sample value and one or more filter variables depending on the position of the one or more neighboring samples, wherein the respective filter variables are the same for two or more neighboring samples; and the (or one or more) nonlinear functions are applied to the sum of the following differences: the difference is two or more differences between the first sample value and the respective neighboring sample values of two or more neighboring sample values among two or more neighboring samples having the same filter variables. Appropriately, the output of the (or one or more) nonlinear functions is used as the input (or input parameter) of an adaptive loop filter. Appropriately, the nonlinear function includes one or more limiting functions, and each of the one or more limiting functions is one of the following: max(-b,min(b,d)), min(b,max(-b,d)), max(c-b,min(c+b,n)), min(c+b,max(c-b,n)), max(-b,min(b,d1+d2)), min(b,max(-b,d1+d2)), max(2*c-b,min(2*c+b,n1+n2)) or min(2*c+b,max(2*c-b,n1+n2)), where c is the first sample value, n or n1 or n2 are the neighboring sample values, d = n-c, d1 = n1-c, d2 = n2-c, and b is the limiting parameter.

根据本发明的第十三方面,提供处理图像的一个或多个部分的方法,图像部分具有与其相关联的色度样本和亮度样本,其中所述方法包括基于从位流获得的信息或者第一样本值及其一个或多个邻近样本值,确定以下各项至少之一:使用或不使用利用第十二方面的方法控制的滤波器;启用或禁用所述滤波器的使用;或者在滤波第一样本值时与所述滤波器一起使用的滤波参数或滤波器变量。适当地,从位流获得的信息包括针对亮度或色度成分之一提供的标志,该标志指示该成分的以下各项至少之一:使用或不使用利用第十二方面的方法控制的滤波器;或者启用或禁用所述滤波器的使用。适当地,在自适应参数集中提供标志。适当地,从位流获得的信息包括针对一个或多个图像部分提供的标志,该标志指示针对一个或多个图像部分的以下各项至少之一:使用或不使用利用第十二方面的方法控制的滤波器;或者启用或禁用所述滤波器的使用。适当地,在自适应参数集中提供标志。According to a thirteenth aspect of the invention, a method is provided for processing one or more portions of an image, the image portions having associated chroma samples and luminance samples, wherein the method includes determining at least one of the following based on information obtained from a bitstream or a first sample value and one or more neighboring sample values: using or not using a filter controlled by the method of the twelfth aspect; enabling or disabling the use of said filter; or filtering parameters or filter variables used with said filter when filtering the first sample value. Suitably, the information obtained from the bitstream includes a flag provided for one of the luminance or chroma components, the flag indicating at least one of the following for that component: using or not using a filter controlled by the method of the twelfth aspect; or enabling or disabling the use of said filter. Suitably, a flag is provided in an adaptive parameter set. Suitably, the information obtained from the bitstream includes a flag provided for one or more image portions, the flag indicating at least one of the following for one or more image portions: using or not using a filter controlled by the method of the twelfth aspect; or enabling or disabling the use of said filter. Suitably, a flag is provided in an adaptive parameter set.

根据本发明的第十四方面,提供对一个或多个图像进行编码的方法,该方法包括,针对图像的一个或多个部分,根据第十二方面的方法控制滤波器,或根据第十三方面的方法进行处理。适当地,该方法还包括:接收图像;对所接收的图像进行编码并生成位流;以及处理编码图像,其中处理包括根据第十二方面的方法进行控制或根据第十三方面的方法进行处理。适当地,该方法(当从属于第十三方面时)还包括在位流中提供所述信息。适当地,非线性函数包括一个或多个限幅函数;该(或者一个或多个)非线性函数的变量还包括取决于值被用作该(或者一个或多个)非线性函数中的变量的一个或多个邻近样本的位置的一个或多个滤波器变量;提供所述信息包括在位流中提供一个或多个限幅参数;以及当针对位置的滤波器变量为零时,在位流中不提供与应用于该位置处的邻近样本的邻近样本值的限幅函数一起使用的限幅参数。适当地,该方法还包括:从多个可用函数中选择非线性函数或者一个或多个限幅函数;在处理编码图像时使用所选择的函数;以及在位流中提供用于识别所选择的函数的信息。According to a fourteenth aspect of the invention, a method for encoding one or more images is provided, the method comprising controlling a filter according to the method of the twelfth aspect, or processing a portion of the image according to the method of the thirteenth aspect. Suitably, the method further comprises: receiving an image; encoding the received image and generating a bitstream; and processing the encoded image, wherein the processing includes controlling the filter according to the method of the twelfth aspect or processing according to the method of the thirteenth aspect. Suitably, the method (when subordinate to the thirteenth aspect) further comprises providing the information in the bitstream. Suitably, the nonlinear function includes one or more limiting functions; the variables of the nonlinear function (or the one or more) further include one or more filter variables depending on the location of one or more neighboring samples whose values are used as variables in the nonlinear function (or the one or more); providing the information includes providing one or more limiting parameters in the bitstream; and when the filter variable for a location is zero, the limiting parameters used with the limiting function applied to the neighboring sample values of neighboring samples at that location are not provided in the bitstream. Appropriately, the method also includes: selecting a nonlinear function or one or more limiting functions from a plurality of available functions; using the selected function when processing the coded image; and providing information in the bit stream for identifying the selected function.

根据本发明的第十五方面,提供对一个或多个图像进行解码的方法,该方法包括,针对图像的一个或多个部分,根据第十二方面的方法控制滤波器,或者根据第十三方面的方法进行处理。适当地,该方法还包括:接收位流;解码来自所接收的位流的信息以获得图像;以及处理所获得的图像,其中处理包括根据第十二方面的方法进行控制,或者根据第十三方面的方法进行处理。适当地,该方法(当从属于第十三方面时)还包括从位流获得所述信息。适当地,非线性函数包括一个或多个限幅函数;该(或者一个或多个)非线性函数的变量还包括取决于值被用作该(或者一个或多个)非线性函数中的变量的一个或多个邻近样本的位置的一个或多个滤波器变量;以及当用于一个位置的滤波器变量为零时,限幅函数不应用于该位置处的邻近样本的邻近样本值。适当地,该方法还包括:从位流获得用于从多个可用函数识别非线性函数或者一个或多个限幅函数的信息;以及在处理所获得的图像时使用所识别的函数。According to a fifteenth aspect of the invention, a method for decoding one or more images is provided, the method comprising controlling a filter according to the method of the twelfth aspect, or processing a portion of the image according to the method of the thirteenth aspect. Suitably, the method further comprises: receiving a bit stream; decoding information from the received bit stream to obtain an image; and processing the obtained image, wherein the processing includes controlling a filter according to the method of the twelfth aspect, or processing according to the method of the thirteenth aspect. Suitably, the method (when subordinate to the thirteenth aspect) further comprises obtaining the information from the bit stream. Suitably, the nonlinear function includes one or more limiting functions; the variables of the nonlinear function (or the one or more) further include one or more filter variables depending on the location of one or more neighboring samples whose values are used as variables in the nonlinear function (or the one or more); and the limiting function is not applied to neighboring sample values at a location when the filter variable used at a location is zero. Suitably, the method further comprises: obtaining information from the bit stream for identifying the nonlinear function or the one or more limiting functions from a plurality of available functions; and using the identified function when processing the obtained image.

根据本发明的第十六方面,提供一种装置,该装置包括:控制器,其被配置为进行第十二方面或第十三方面的方法;编码器,其被配置为进行第十四方面的方法;或者解码器,其被配置为进行第十五方面的方法。According to a sixteenth aspect of the invention, an apparatus is provided, the apparatus comprising: a controller configured to perform the methods of the twelfth or thirteenth aspect; an encoder configured to perform the methods of the fourteenth aspect; or a decoder configured to perform the methods of the fifteenth aspect.

根据本发明的第十七方面,提供一种用于针对图像的一个或多个部分控制滤波器的装置,所述装置包括控制器,所述控制器被配置为进行第十二方面或第十三方面的方法。According to a seventeenth aspect of the invention, there is provided an apparatus for controlling a filter for one or more portions of an image, the apparatus including a controller configured to perform the method of the twelfth or thirteenth aspect.

根据本发明的第十八方面,提供一种用于对图像进行编码的装置,该装置包括第十七方面的控制装置。适当地,该装置被配置为进行第十四方面的方法。According to the eighteenth aspect of the invention, an apparatus for encoding an image is provided, the apparatus including the control means of the seventeenth aspect. Suitably, the apparatus is configured to perform the method of the fourteenth aspect.

根据本发明的第十九方面,提供一种用于对图像进行解码的装置,该装置包括第十七方面的控制装置。适当地,该装置被配置为进行第十五方面的方法。According to a nineteenth aspect of the invention, an apparatus for decoding an image is provided, the apparatus including the control device of the seventeenth aspect. Suitably, the apparatus is configured to perform the method of the fifteenth aspect.

根据本发明的第二十方面,提供当在计算机或处理器上运行时使计算机或处理器执行根据第一方面、第二方面、第三方面、第四方面、第五方面、第六方面、第七方面、第八方面、第十二方面、第十三方面、第十四方面或第十五方面的方法的程序。According to the twentieth aspect of the invention, a program is provided that, when run on a computer or processor, causes the computer or processor to execute the method according to the first, second, third, fourth, fifth, sixth, seventh, eighth, twelfth, thirteenth, fourteenth, or fifteenth aspect.

根据本发明的第二十一方面,提供一种存储根据第二十方面的计算机程序的计算机可读存储介质。According to a twenty-first aspect of the present invention, a computer-readable storage medium is provided for storing a computer program according to the twentieth aspect.

根据本发明的第二十二方面,提供一种信号,该信号携带用于使用根据第七方面或第十四方面的方法编码的并由位流表示的图像的信息数据集,图像包括可重建样本集合,各个可重建样本具有样本值,其中信息数据集包括用于基于第一可重建样本的邻近样本的样本值来控制对第一可重建样本的滤波的控制数据。According to a twenty-second aspect of the invention, a signal is provided carrying an information dataset for an image encoded using the method according to the seventh or fourteenth aspect and represented by a bit stream, the image comprising a set of reconstructable samples, each reconstructable sample having a sample value, wherein the information dataset includes control data for controlling filtering of a first reconstructable sample based on the sample values of neighboring samples of the first reconstructable sample.

对于本发明的上述方面,可以根据其实施例提供以下特征。适当地,非线性函数包括限幅函数、锯齿核函数、三角核函数或高斯核函数中的一个或多个。适当地,非线性函数包括一个或多个限幅函数,并且一个或多个限幅函数中的各个限幅函数是以下各项之一:max(-b,min(b,d))、min(b,max(-b,d))、max(c-b,min(c+b,n))、min(c+b,max(c-b,n))、max(-b,min(b,d1+d2))、min(b,max(-b,d1+d2))、max(2*c-b,min(2*c+b,n1+n2))或min(2*c+b,max(2*c-b,n1+n2)),其中c是第一样本值,n或n1或n2是邻近样本值,d=n-c,d1=n1-c,d2=n2-c,以及b是限幅参数。适当地,(多个)变量是(数学)非线性函数的自变量,非线性函数的输出是其因变量。适当地,邻近样本的位置被定义为与第一样本的位置的相对距离或相对位移。适当地,邻近样本的位置被定义为其在(光栅)扫描顺序中的位置(适当地,在(光栅)扫描顺序中相对于第一样本的位置)。适当地,自适应环路滤波器使用非线性函数进行滤波。适当地,非线性函数的输出被用作自适应环路滤波器的输入(或输入参数)。适当地,对一个或多个这样的输入(参数)应用自适应环路滤波器包括使用以一个或多个输入(参数)作为其变量的线性函数。适当地,自适应环路滤波器如VTM3.0中所指定。With respect to the above aspects of the invention, the following features may be provided according to embodiments thereof. Suitably, the nonlinear function includes one or more of a limiting function, a sawtooth kernel function, a triangular kernel function, or a Gaussian kernel function. Appropriately, the nonlinear function includes one or more limiting functions, and each of the one or more limiting functions is one of the following: max(-b,min(b,d)), min(b,max(-b,d)), max(c-b,min(c+b,n)), min(c+b,max(c-b,n)), max(-b,min(b,d1+d2)), min(b,max(-b,d1+d2)), max(2*c-b,min(2*c+b,n1+n2)) or min(2*c+b,max(2*c-b,n1+n2)), where c is the first sample value, n or n1 or n2 are the neighboring sample values, d = n-c, d1 = n1-c, d2 = n2-c, and b is the limiting parameter. Appropriately, the variables are the independent variables of the (mathematical) nonlinear function, and the output of the nonlinear function is its dependent variable. Appropriately, the position of a neighboring sample is defined as its relative distance or relative displacement to the position of the first sample. Appropriately, the position of a neighboring sample is defined as its position in the (raster) scan sequence (appropriately, its position relative to the first sample in the (raster) scan sequence). Appropriately, the adaptive loop filter uses a nonlinear function for filtering. Appropriately, the output of the nonlinear function is used as the input (or input parameter) of the adaptive loop filter. Appropriately, applying the adaptive loop filter to one or more such inputs (parameters) involves using a linear function with one or more inputs (parameters) as its variables. Appropriately, the adaptive loop filter is as specified in VTM3.0.

本发明的又一方面涉及当由计算机或处理器执行时使计算机或处理器执行上述方面的任何方法的程序。该程序可以是单独提供的,或者可以是在载体介质上、通过载体介质或在载体介质中携带的。载体介质可以是非暂时性的,例如存储介质,特别是计算机可读存储介质。载体介质也可以是暂时的,例如信号或其它传输介质。该信号可以经由包括因特网的任何合适的网络传送。Another aspect of the invention relates to a program that, when executed by a computer or processor, causes the computer or processor to perform any of the methods described above. This program may be provided separately, or it may be carried on, through, or within a carrier medium. The carrier medium may be non-transitory, such as a storage medium, particularly a computer-readable storage medium. The carrier medium may also be transient, such as a signal or other transmission medium. This signal may be transmitted via any suitable network, including the Internet.

本发明的又一方面涉及包括根据前述装置方面中的任一个的装置的照相机。根据本发明的又一方面,提供一种移动装置,该移动装置包括根据前述装置方面中的任一个的装置和/或体现上述照相机方面的照相机。Another aspect of the invention relates to a camera that includes a device according to any of the foregoing device aspects. According to yet another aspect of the invention, a mobile device is provided that includes a device according to any of the foregoing device aspects and/or a camera embodying the aforementioned camera aspects.

本发明的一个方面中的任何特征可以以任何适当的组合应用于本发明的其它方面。特别地,方法方面可应用于设备方面,反之亦然。此外,在硬件中实现的特征可以在软件中实现,反之亦然。这里对软件和硬件特征的任何引用都应相应地解释。这里描述的任何设备特征也可以提供为方法特征,反之亦然。如这里所使用的,装置加功能特征可以根据它们的相应结构来替代地表示,诸如适当编程的处理器和相关联的存储器等。还应当理解,可以独立地实现和/或提供和/或使用在本发明的任何方面中描述和限定的各种特征的特定组合。Any feature in one aspect of the invention may be applied to other aspects of the invention in any suitable combination. In particular, a method aspect may be applied to an apparatus aspect, and vice versa. Furthermore, features implemented in hardware may be implemented in software, and vice versa. Any references herein to software and hardware features should be interpreted accordingly. Any apparatus feature described herein may also be provided as a method feature, and vice versa. As used herein, device plus functional features may alternatively be represented according to their respective architectures, such as a suitably programmed processor and associated memory, etc. It should also be understood that specific combinations of the various features described and defined in any aspect of the invention may be implemented independently and/or provided and/or used.

附图说明Attached Figure Description

现在将仅通过示例并参考以下附图描述本发明的实施例,其中:Embodiments of the invention will now be described by way of example only and with reference to the following figures, wherein:

图1显示了在VTM-3.0的典型解码环路中发生ALF的位置;Figure 1 shows the location of ALF in a typical decoding loop of VTM-3.0;

图2是概述针对ALF在VTM-3.0中存在的语法元素的流程图;Figure 2 is a flowchart outlining the syntax elements of ALF in VTM-3.0;

图3-a是示出根据本发明实施例的用于滤波色度(Chroma)成分的步骤的流程图;Figure 3-a is a flowchart illustrating the steps for filtering chroma components according to an embodiment of the present invention;

图3-b提供根据本发明实施例的色度滤波器的滤波形状和系数布置;Figure 3-b shows the filter shape and coefficient arrangement of a chromaticity filter according to an embodiment of the present invention;

图4-a是示出根据本发明实施例的用于滤波亮度(Luma)成分的步骤的流程图;Figure 4-a is a flowchart illustrating the steps for filtering the luminance (Luma) component according to an embodiment of the present invention;

图4-b提供根据本发明实施例的亮度滤波器的滤波形状和四种可能的系数布置;Figure 4-b shows the filter shape and four possible coefficient arrangements of the brightness filter according to an embodiment of the present invention;

图5是概述根据本发明实施例的修改后的语法元素的流程图;Figure 5 is a flowchart outlining the modified syntax elements according to an embodiment of the present invention;

图6是VTM-3.0中的ALF中的线性滤波器的框图;Figure 6 is a block diagram of the linear filter in ALF in VTM-3.0;

图7是根据本发明实施例的非线性滤波器的框图;Figure 7 is a block diagram of a nonlinear filter according to an embodiment of the present invention;

图8是根据本发明实施例的当图7中的滤波器的非线性部分被禁用时获得的线性滤波器的框图;Figure 8 is a block diagram of a linear filter obtained according to an embodiment of the present invention when the nonlinear portion of the filter in Figure 7 is disabled;

图9是示出根据本发明实施例的ALF编码处理的流程图;Figure 9 is a flowchart illustrating ALF encoding processing according to an embodiment of the present invention;

图10是示出根据本发明实施例的编码方法的步骤的流程图;Figure 10 is a flowchart illustrating the steps of an encoding method according to an embodiment of the present invention;

图11是示出根据本发明实施例的解码方法的步骤的流程图;Figure 11 is a flowchart illustrating the steps of a decoding method according to an embodiment of the present invention;

图12是示意性地示出可以实现本发明的一个或多个实施例的数据通信系统的框图;Figure 12 is a block diagram schematically illustrating a data communication system that can implement one or more embodiments of the present invention;

图13是示出可以实现本发明的一个或多个实施例的处理装置的组件的框图;Figure 13 is a block diagram illustrating the components of a processing apparatus that can implement one or more embodiments of the present invention;

图14是示出可以实现本发明的一个或多个实施例的网络照相机系统的图;Figure 14 is a diagram illustrating a network camera system that can implement one or more embodiments of the present invention;

图15是示出可以实现本发明的一个或多个实施例的智能电话的图;Figure 15 is a diagram illustrating a smartphone that can implement one or more embodiments of the present invention;

图16-a提供根据本发明实施例的具有减少数量的限幅位置的7×7菱形滤波形状;以及Figure 16-a provides a 7×7 diamond filter shape with a reduced number of limiting positions according to an embodiment of the present invention; and

图16-b提供根据本发明实施例的具有减少数量的限幅位置的5×5菱形滤波形状。Figure 16-b provides a 5×5 diamond filter shape with a reduced number of limiting positions according to an embodiment of the present invention.

具体实施方式Detailed Implementation

下面描述的本发明的实施例涉及改进图像的编码和解码。The embodiments of the present invention described below relate to improved image encoding and decoding.

在本说明书中,“用信号通知”可以指将与用于控制滤波器的一个或多个参数有关的信息(例如使用、不使用、启用或禁用模式/方案或其它滤波控制相关信息)插入到(提供/包括/编码在)位流中或者从位流提取/获得(解码)该信息。In this specification, "notifying with a signal" can refer to inserting (providing/including/encoding in) or extracting/obtaining (decoding) information related to one or more parameters used to control the filter (e.g., using, not using, enabling or disabling modes/schemes or other filter control related information) into (providing/including/encoding in) the bit stream.

在本说明书中,术语“片”用作图像部分的示例(这种图像部分的其它示例将是区块或区块组(其是区块的组/集合)。应当理解,本发明的实施例也可以代替基于片而基于图像部分(例如,区块或区块组)以及适当修改的参数/值/语法(诸如图像部分/区块/区块组的头部(代替片头部)、图像部分/区块/区块组的类型(代替片类型)、以及图像部分/区块/区块组的统计信息(代替片统计信息))来实现。还应当理解,在本发明的实施例中,也可以使用自适应参数集(APS)或区块(组)头部代替片头部或序列参数集(SPS),来用信号通知ALF参数(或用于使用ALF滤波的信息)。当APS用于用信号通知ALF参数(或用于使用ALF滤波的信息)时,片头部或区块组头部可以用于例如通过指示自适应集标识符(aps_id)来指示必须使用哪个APS以获得ALF参数(或用于使用ALF滤波的信息)。还应当理解,片、区块组、区块、编码树单元(CTU)/最大编码单元(LCU)、编码树块(CTB)、编码单元(CU)、预测单元(PU)、变换单元(TU)或像素/样本块中的任一个可以被称为图像部分。In this specification, the term "slice" is used as an example of an image portion (other examples of such an image portion would be a block or block group (which is a group/set of blocks). It should be understood that embodiments of the invention can also be implemented based on image portions (e.g., blocks or block groups) and appropriately modified parameters/values/syntax (such as the header of the image portion/block/block group (instead of the slice header), the type of the image portion/block/block group (instead of the slice type), and the statistics of the image portion/block/block group (instead of the slice statistics)) instead of slices. It should also be understood that in embodiments of the invention, an Adaptive Parameter Set (APS) or a block (group) header can also be used instead of a slice header or sequence parameter. The Set of Photons (SPS) is used to signal the ALF parameters (or information for using ALF filtering). When the APS is used to signal the ALF parameters (or information for using ALF filtering), the slice header or block group header can be used, for example, by indicating the Adaptive Set Identifier (aps_id) to indicate which APS must be used to obtain the ALF parameters (or information for using ALF filtering). It should also be understood that any of the following can be referred to as an image portion: slice, block group, block, coding tree unit (CTU)/maximum coding unit (LCU), coding tree block (CTB), coding unit (CU), prediction unit (PU), transform unit (TU), or pixel/sample block.

还应当理解:当滤波器或工具被描述为“有效”时,滤波器/工具“启用”或“可供使用”或“已使用”;当被描述为“无效”时,滤波器/工具“禁用”或“不可使用”或“未使用”;并且“类”是指一个或多个元素的组、分组、类别或分类。此外,还应当理解,当标志被描述为“有效”时,意味着该标志指示相关滤波器/工具是“有效”的。It should also be understood that when a filter or tool is described as "valid," the filter/tool is "enabled," "available," or "used"; when described as "invalid," the filter/tool is "disabled," "unusable," or "unused"; and "class" refers to a group, grouping, category, or classification of one or more elements. Furthermore, it should be understood that when a flag is described as "valid," it means that the flag indicates that the associated filter/tool is "valid."

自适应环路滤波器(ALF)Adaptive Loop Filter (ALF)

图1示出在VTM-3.0的典型解码环路中存在ALF的位置。在101中,以编码树单元(CTU:VVC中的最大编码单元,通常为128×128样本/像素大小)为单位对图像部分(例如,片)进行解码。CTU被拆分成矩形块或编码单元(CU),所述矩形块或编码单元使用特定预测方案/模式进行编码,并且通常是残差块的有损编码。由于基于块的编码的使用,块伪像可能在编码块之间的边界处可见。在102中,然后由DBF处理解码图像部分以减少/去除这些伪像。典型地,为了对用于块预测的残差(块)进行编码,使用类DCT变换来变换残差值(以在几个系数中压缩残差能量),并且变换后的系数被量化以降低编码成本。这种量化通常在重建块(即存储在帧缓冲器106中的参考帧中的块)中引入一些振铃(ringing)伪像。在103中,然后由SAO滤波器处理DBF的输出图像部分,这有助于以较低的计算成本减少这些伪像中的一些伪像。在104中,然后由ALF处理SAO滤波器的输出图像部分。ALF可以进一步减少例如“振铃”等的伪像。ALF具有较高阶误差建模能力,但计算成本较高。然后,ALF的输出图像部分被发送到输出(例如显示器或用于与显示器通信的通信接口)105。ALF的输出图像部分还可以放入帧缓冲器106中(作为存储在其中的参考帧的一部分),使得其可以用于时间预测(当使用时间预测工具时)。这就是DBF、SAO滤波器和ALF被称为“环内”滤波器的原因。编码器可以禁用一些环内滤波器,使得在解码处它们可以被旁路(即,不进行滤波,并且与所禁用的工具相对应的步骤的输出与其输入相同)。此外,在一些情况下,所处理的图像部分不限于片,而是可以是包含一个或多个片的全帧,具有跨越片边界(如果存在多于一个)应用滤波器的可能性,以减少这些边界上的伪像。对于多成分图像(例如,YCrCb格式的图像),DBF、SAO滤波器或ALF处理分别应用于各个成分,并且可能不同(例如,使用与其它成分不同的滤波参数)。Figure 1 illustrates the location of the ALF in a typical decoding loop of VTM-3.0. In 101, image portions (e.g., slices) are decoded in units of coding tree units (CTUs: the largest coding unit in VVC, typically 128×128 samples/pixel). CTUs are broken down into rectangular blocks or coding units (CUs), which are encoded using a specific prediction scheme/mode and are typically lossy encodings of residual blocks. Due to the use of block-based encoding, block artifacts may be visible at the boundaries between coded blocks. In 102, the decoded image portions are then processed by DBF to reduce/remove these artifacts. Typically, to encode the residuals (blocks) used for block prediction, a DCT-like transform is used to transform the residual values (to compress residual energy across several coefficients), and the transformed coefficients are quantized to reduce encoding costs. This quantization typically introduces some ringing artifacts in the reconstructed blocks (i.e., blocks in the reference frame stored in frame buffer 106). In step 103, the output image portion of the DBF is then processed by the SAO filter, which helps reduce some of these artifacts with lower computational cost. In step 104, the output image portion of the SAO filter is then processed by the ALF. The ALF can further reduce artifacts such as "ringing". The ALF has higher-order error modeling capabilities, but is computationally expensive. The output image portion of the ALF is then sent to an output (e.g., a display or a communication interface for communicating with the display) 105. The output image portion of the ALF can also be placed in a frame buffer 106 (as part of a reference frame stored therein), making it available for time prediction (when using a time prediction tool). This is why the DBF, SAO filter, and ALF are referred to as "in-loop" filters. The encoder can disable some in-loop filters so that they can be bypassed at the decoding point (i.e., no filtering is performed, and the output of the step corresponding to the disabled tool is the same as its input). Furthermore, in some cases, the processed image portion is not limited to a slice, but can be a full frame containing one or more slices, with the possibility of applying filters across slice boundaries (if more than one exists) to reduce artifacts at these boundaries. For multi-component images (e.g., images in YCrCb format), DBF, SAO filters, or ALF processing are applied to each component separately and may differ (e.g., using different filtering parameters than other components).

图2提供针对ALF的VTM-3.0中存在的语法元素的概述。序列参数集(SPS)使用标志指示ALF工具针对视频序列(201)是否有效(即,启用),并且如果是,片头部指示ALF针对片(202)是否有效,并且提供用于控制ALF的滤波器参数(203至207)。当在202中ALF有效时,它至少针对亮度成分有效,并且片头部进一步指示ALF针对各个色度成分是否有效(203)。Figure 2 provides an overview of the syntax elements present in VTM-3.0 for ALF. The Sequence Parameter Set (SPS) uses flags to indicate whether the ALF tool is valid (i.e., enabled) for a video sequence (201), and if so, the slice header indicates whether the ALF is valid for a slice (202) and provides filter parameters (203 to 207) for controlling the ALF. When the ALF is valid in 202, it is valid for at least the luma component, and the slice header further indicates whether the ALF is valid for each chroma component (203).

ALF可以对亮度成分使用多于一个滤波器。可以使用多于一个的滤波器系数表,这是因为不同的滤波器配置可以共用相同的滤波器系数(稍后将描述)。在VTM-3.0软件的语法元素方案中,这些不同的滤波器配置不能被单独区分,并且具有不同配置的滤波器被认为是相同的滤波器。在下面的描述中,使用对单个滤波器的相同参考,除非明显参考不同的系数表。语法元素方案中的对单个滤波器的这种共用是通过考虑到对于旋转的正交和/或镜像配置对滤波图像的统计是相同的来减少分配给滤波器的位数的有效方式:即,针对参考样本配置设计的一个参考滤波器被指定为被旋转和/或镜像以滤波正交和/或镜像样本配置。片头部包含编码的亮度滤波器的数量(204)(是一个或多个)。ALF can use more than one filter for the luminance component. More than one filter coefficient table can be used because different filter configurations can share the same filter coefficients (described later). In the syntax element scheme of the VTM-3.0 software, these different filter configurations cannot be distinguished individually, and filters with different configurations are considered the same filter. In the following description, the same reference for individual filters is used unless explicitly referenced to a different coefficient table. This sharing of individual filters in the syntax element scheme is an efficient way to reduce the number of bits allocated to filters by taking into account that the statistics of the filtered image are the same for rotated orthogonal and/or mirrored configurations: that is, a reference filter designed for a reference sample configuration is specified as being rotated and/or mirrored to filter orthogonal and/or mirrored sample configurations. The chip header contains the number (204) of coded luminance filters (one or more).

当滤波亮度样本时,ALF将样本(根据邻近样本的配置)局部分类(归类)为25个可能类(类别/分类/组)中的一个来选择滤波器(其与该特定类/类别/分类/组相关联/分配给该特定类/类别/分类/组)以局部应用于这些样本。这里使用术语“局部”分类和“局部”应用,这是因为样本以块(通常为4×4个样本,例如在VTM-3.0中)或以CU为单位进行处理。然后,例如使用用于识别所选亮度滤波器的索引/信息,在位流中用信号通知所选亮度滤波器。当在编码处理期间所使用的亮度滤波器的数量大于1时,片头部还包含用于识别/选择这些亮度滤波器的一个或多个索引(例如,用于25个类的最多25个滤波器的索引,各个索引与用于这些类之一的亮度滤波器相对应)(205)。在编码处理中使用的亮度滤波器的数量为1的情况下,该单个亮度滤波器应用于所有类。When filtering luminance samples, the ALF locally classifies (categorizes) the samples (based on the configuration of neighboring samples) into one of 25 possible classes (categories/classifications/groups) to select a filter (which is associated with/assigned to that specific class/category/classification/group) to be locally applied to those samples. The terms "local" classification and "local" application are used here because samples are processed in blocks (typically 4×4 samples, e.g., in VTM-3.0) or units of CUs. The selected luminance filter is then signaled in the bitstream, for example, using an index/information to identify it. When the number of luminance filters used during encoding processing is greater than one, the chip header also contains one or more indices for identifying/selecting these luminance filters (e.g., indices for up to 25 filters across 25 classes, each corresponding to a luminance filter used for one of those classes) (205). In the case where the number of luminance filters used in encoding processing is one, that single luminance filter is applied to all classes.

然后,片头部包含每个亮度滤波器(206)的所有滤波器系数(或滤波器参数)(即,在编码处理期间使用的各个亮度滤波器的系数表),接着是色度滤波器(207)的滤波器系数。注意,在VTM-3.0中,当ALF针对两个色度成分都有效(即启用)时,两个色度成分共用相同的色度滤波器。The header then contains all the filter coefficients (or filter parameters) for each luma filter (206) (i.e., a table of coefficients for the individual luma filters used during encoding), followed by the filter coefficients for the chroma filter (207). Note that in VTM-3.0, when ALF is active (i.e. enabled) for both chroma components, the two chroma components share the same chroma filter.

当ALF有效时,对于ALF有效的每个成分,可以逐个CTU启用滤波。在编码位流的内部,对于各个CTU,编码片数据针对ALF有效的每个成分包括一个熵编码的标志以指示针对该CTU的成分是否启用ALF(208、209和210),并且因此指示是否必须使用ALF滤波该CTU的该成分的样本。使用上下文自适应二进制算术编码(CABAC)对该标志进行编码。When ALF is active, filtering can be enabled per CTU for each ALF-active component. Within the coded bitstream, for each CTU, the coded slice data includes an entropy-coded flag (208, 209, and 210) indicating whether ALF is enabled for that CTU's component, and thus whether ALF filtering of that component's samples for that CTU must be used. This flag is encoded using Context Adaptive Binary Arithmetic Coding (CABAC).

在VTM-3.0中,用信号通知亮度滤波器206的系数进行如下:In VTM-3.0, the coefficients of the luminance filter 206 are communicated via signal as follows:

[1]首先用信号通知“alf系数增量标志”,该标志指示是否可以禁用某些滤波器,并且如果“alf系数增量标志”为零并且如果亮度滤波器的数量大于1,则用信号通知“coeff增量预测模式标志”,指示滤波器系数编码将使用预测(稍后将更详细描述)。[1] First, the “alf coefficient increment flag” is signaled, which indicates whether certain filters can be disabled, and if the “alf coefficient increment flag” is zero and if the number of brightness filters is greater than 1, the “coeff increment prediction mode flag” is signaled, indicating that the filter coefficient encoding will use prediction (to be described in more detail later).

[2]在VTM-3.0中,为了使用(exp-)Golomb码编码亮度系数,我们使用3(2用于色度)(exp-)Golomb配置。(exp-)Golomb编码的唯一参数是(exp-)Golomb指数(常记为“k”)。各个配置具有(exp-)Golomb索引。使用(exp-)Golomb码的“最小指数”的可变长度码(VLC)来用信号通知滤波器系数的(exp-)Golomb编码的参数,然后对于各个(exp-)Golomb索引,如果针对该索引和接下来的索引,(exp-)Golomb指数必须增加(以针对第一索引的“最小指数”开始),则用信号通知标志。[2] In VTM-3.0, in order to encode the luminance coefficients using (exp-)Golomb codes, we use a 3 (2 for chrominance) (exp-)Golomb configuration. The only parameter of the (exp-)Golomb code is the (exp-)Golomb exponent (often denoted as "k"). Each configuration has a (exp-)Golomb index. The parameters of the (exp-)Golomb code for the filter coefficients are signaled using a variable-length code (VLC) of the "minimum exponent" of the (exp-)Golomb code, and then for each (exp-)Golomb index, if the (exp-)Golomb exponent must be increased for that index and the following indices (starting with the "minimum exponent" for the first index), a signal is used to indicate this.

[3]然后,如果“alf系数增量标志”指示某些滤波器被启用,则针对各个滤波器用信号通知标志,从而指示是否禁用该滤波器(且因此不编码)。[3] Then, if the “alf coefficient increment flag” indicates that some filters are enabled, the flag is signaled for each filter to indicate whether the filter is disabled (and therefore not encoded).

[4]然后,使用(针对带符号整数)(exp-)Golomb码针对各个(未禁用)滤波器用信号通知滤波器系数,其中(exp-)Golomb码具有取来自存储(exp-)Golomb参数的表的与(在固定表中的)滤波器系数索引相关联的(exp-)Golomb索引的(exp-)Golomb指数。[4] Then, the filter coefficients are signaled for each (not disabled) filter using (exp-)Golomb codes (for signed integers), where the (exp-)Golomb codes have (exp-)Golomb exponents taken from the table storing (exp-)Golomb parameters and associated with the (exp-)Golomb index of the filter coefficients (in a fixed table).

在用信号通知“coeff增量预测模式标志”的情况下,其指示滤波器系数编码使用预测。这意味着具有大于或等于1的滤波器索引(即,标识各个滤波器的索引)的“当前”滤波器的滤波器系数被编码为“当前”滤波器的滤波器系数与先前处理的滤波器的滤波器系数之间的差(例如,使用先前处理的滤波器的滤波器系数作为滤波器系数预测子-即,使用预测,编码为滤波器系数残差值)。第一个滤波器(具有滤波器索引零)在没有预测的情况下被编码。When the "coeff incremental prediction mode flag" is signaled, it instructs the filter coefficient encoding to use prediction. This means that the filter coefficients of the "current" filter, which has a filter index greater than or equal to 1 (i.e., the index identifying each filter), are encoded as the difference between the filter coefficients of the "current" filter and the filter coefficients of previously processed filters (e.g., using the filter coefficients of previously processed filters as filter coefficient predictors—that is, using prediction, encoded as filter coefficient residual values). The first filter (with a filter index of zero) is encoded without prediction.

用信号通知色度滤波器207的系数与针对亮度滤波器类似地进行,除了没有“alf系数增量标志”,没有“coeff增量预测模式标志”,以及具有两个(exp-)Golomb索引而非3个之外。The coefficients of the chroma filter 207 are signaled in a similar manner to those for the luminance filter, except that there is no "alf coefficient increment flag", no "coeff increment prediction mode flag", and two (exp-)Golomb indices instead of three.

图3-a是示出根据本发明实施例的用于滤波色度成分的步骤的流程图,并且图3-b提供根据本发明实施例的色度滤波器的滤波形状和系数布置。Figure 3-a is a flowchart illustrating the steps for filtering chromaticity components according to an embodiment of the present invention, and Figure 3-b provides the filter shape and coefficient arrangement of the chromaticity filter according to an embodiment of the present invention.

在图3-a中,ALF滤波在亮度和色度成分之间应用不同。以简单的样本开始,图3-a提供用于滤波色度成分的主要步骤。输入图像部分301(例如区块或区块组)包含要滤波的色度样本。输入滤波参数302包括参考图2中的ALF语法元素描述的ALF参数(例如,“alf系数增量标志”、“coeff增量预测模式标志”、滤波器系数或者ALF的任何其它标志或滤波器参数)。使用色度滤波器的编码滤波器系数,在303中导出/获得色度滤波器。In Figure 3-a, ALF filtering is applied differently between the luminance and chrominance components. Starting with a simple sample, Figure 3-a provides the main steps for filtering the chrominance component. The input image portion 301 (e.g., a block or group of blocks) contains the chrominance samples to be filtered. The input filter parameters 302 include ALF parameters described with reference to the ALF syntax elements in Figure 2 (e.g., "alf coefficient increment flag", "coeff increment prediction mode flag", filter coefficients, or any other flags or filter parameters of ALF). The chrominance filter is derived/obtained in 303 using the encoded filter coefficients of the chrominance filter.

在变型中,色度滤波具有大小为5×5(即,5个样本高和5个样本宽(参见图3-b中的306))的菱形形状/图案/掩模/支撑。色度滤波器的滤波器系数被组织成使得色度滤波器具有关于中心的对称性。针对该色度滤波器具有6个编码滤波器系数,其中索引编号为从0到5,它们位于图中所示的相应的系数位置处。提供索引编号的上标符号(“+”或“-”),使得在共用同一滤波器系数的不同系数位置之间进行区分,即,当参考两个对称的(在它们共用同一滤波器系数的意义上)相邻位置时:i+与具有以(光栅)扫描顺序在要滤波的样本(即,在滤波形状/图案/掩模/支撑的中心)之后被编码/解码/处理/存储/访问的索引的邻近样本相对应;以及i-与具有以(光栅)扫描顺序在要滤波的样本之前被编码/解码/处理/存储/访问的索引的邻近样本相对应。从其它滤波器系数推导/导出用于色度滤波形状的中心的第七系数(具有索引编号6的系数位置)。在系数位置6处的该第7系数的值等于1-2.∑i<6wi(用定点计算(wi=索引i的滤波器系数)估计的)。即,1减去两倍(因为对称)的针对系数位置0-5的所有滤波器系数之和。因此,菱形形状的包括第七系数的所有系数之和是应用左7位偏移的1(1<<7),其中7是用于定点计算的编码滤波器系数的位精度减一。这就是仅“滤波器系数总数减去1”的一半是在位流中编码的滤波器系数的数量的原因。In the variant, the chroma filter has a rhombus shape/pattern/mask/support of size 5×5 (i.e., 5 sample heights and 5 sample widths (see 306 in Figure 3-b)). The filter coefficients of the chroma filter are organized such that the chroma filter has symmetry about the center. There are 6 encoded filter coefficients for this chroma filter, with indices numbered from 0 to 5, located at the corresponding coefficient positions shown in the figure. Superscript signs ("+" or "-") are provided for the index numbers to distinguish between different coefficient positions that share the same filter coefficient, i.e., when referring to two symmetrical (in the sense that they share the same filter coefficient) adjacent positions: i + corresponds to a neighboring sample with an index that is encoded/decoded/processed/stored/accessed in (raster) scan order after the sample to be filtered (i.e., at the center of the filter shape/pattern/mask/support); and i- corresponds to a neighboring sample with an index that is encoded/decoded/processed/stored/accessed in (raster) scan order before the sample to be filtered. The seventh coefficient (coefficient position with index number 6) used for the center of the chroma filter shape is derived/derived from the other filter coefficients. The value of this seventh coefficient at coefficient position 6 is equal to 1 - 2.∑ i < 6 w i (estimated using fixed-point computation (w i = filter coefficient at index i)). That is, 1 minus twice (because of symmetry) the sum of all filter coefficients for coefficient positions 0-5. Therefore, the sum of all coefficients in the diamond shape, including the seventh coefficient, is 1 (1 << 7) with a left 7-bit offset, where 7 is the bit precision of the encoded filter coefficients used for fixed-point computation minus one. This is why only half of "total number of filter coefficients minus 1" is the number of filter coefficients encoded in the bitstream.

对于ALF有效(即应用)的各个色度成分样本,如下进行步骤304中的滤波以获得输出图像部分305:对于输入图像部分的各个当前样本,For each chromaticity component sample that is valid (i.e. applied) by ALF, the filtering in step 304 is performed as follows to obtain the output image portion 305: For each current sample of the input image portion,

如果当前样本属于ALF被启用的CTU,并且如果获得Chroma滤波器的菱形形状中的系数位置(其中当前样本位于菱形形状的中心)的滤波器系数所需的当前样本的邻近样本可用(例如,使用图片边界上的边界扩展,或者如果邻近片样本在片边界上可用,则使用邻近片样本);然后,与位置(x,y)处的当前样本I(x,y)相同位置处的输出滤波样本等于:If the current sample belongs to a CTU where ALF is enabled, and if the neighboring samples of the current sample are available to obtain the filter coefficients at the coefficient positions in the rhombus shape of the Chroma filter (where the current sample is located at the center of the rhombus shape) (e.g., using boundary extension on the image boundary, or using neighboring patch samples if they are available on the patch boundary); then the output filtered sample at the same position as the current sample I(x,y) at position (x,y) is equal to:

O(x,y)=((1<<(N-1))+∑(i,j)w(i,j).I(x+i,y+j))>>N,    (1)O(x,y)=((1<<(N-1))+∑ (i,j) w(i,j).I(x+i,y+j))>>N, (1)

其中,i&j是相对于滤波形状的中心(即,在(x,y)处的当前样本的位置)的两个整数位移(水平和垂直),w(i,j)是位移(i,j)处的滤波器系数,N=7是在位移(i,j)处的滤波器系数w(i,j)的表示中使用的实数(定点表示)小数部分的整数近似的位数,I(x+i,y+j)是相对于当前样本位置(x,y)的位移(i,j)处的输入样本值,O(x,y)是位置(x,y)的输出滤波样本值。a<<N表示对整数值a应用N位向左的位移。这相当于进行整数乘以2的N次幂。a>>N表示对整数值a应用N位向右的位移。这里,由于等式(1)的括号内的和的结果在大多数情况下是正的,因此这等效于进行整数除以2的N次幂。对于负数,符号在右移时传播,因此负数将保持负(至少-1)。不存在非整数部分,这是因为ALF的输出通常在0与2的位深度减1次幂之间被限幅。N=7提供固定在用于ALF计算的VVC中的十进制精度,但是在其它实施例中可以使用其它值。在进行右移位移>>N之前相加(1<<(N-1))的效果是标量乘积的定点结果的舍入。Where i & j are two integer displacements (horizontal and vertical) relative to the center of the filter shape (i.e., the position of the current sample at (x, y)), w(i, j) is the filter coefficient at displacement (i, j), N = 7 is the number of integer approximations of the fractional part of the real number (fixed-point representation) used in the representation of the filter coefficient w(i, j) at displacement (i, j), I(x+i, y+j) is the input sample value at displacement (i, j) relative to the current sample position (x, y), and O(x, y) is the output filtered sample value at position (x, y). a << N means applying an N-bit leftward displacement to the integer value a. This is equivalent to multiplying the integer by 2 to the power of N. a >> N means applying an N-bit rightward displacement to the integer value a. Here, since the result of the sum within the parentheses of equation (1) is positive in most cases, this is equivalent to dividing the integer by 2 to the power of N. For negative numbers, the sign propagates as the shift is made to the right, so negative numbers will remain negative (at least -1). There is no non-integer part because the ALF output is typically limited between 0 and 2 raised to the power of 1 in terms of bit depth. N=7 provides decimal precision fixed in the VVC used for ALF calculations, but other values may be used in other embodiments. Adding (1<<(N-1)) before performing the right shift >> N has the effect of rounding the fixed-point result of the scalar product.

否则,照原样输出当前位置处的当前样本值(即,不应用该ALF)。Otherwise, output the current sample value at the current position as is (i.e., do not apply this ALF).

根据该实施例的变型,对于具有关于中心对称的滤波形状的ALF滤波器,为了减少在实现滤波器时进行的乘法运算的数量,并且为了简化符号,可以将等式(1)重新表示为:According to a variation of this embodiment, for an ALF filter with a centrally symmetric filter shape, in order to reduce the number of multiplication operations performed when implementing the filter and to simplify the notation, equation (1) can be reformulated as:

其中On是光栅扫描顺序索引/位置n处的输出样本。通过光栅扫描顺序索引n,我们指的是作为在一行样本中从左到右增加、然后随着各行样本从上到下增加的样本索引的索引n。是在与输出样本相同的位置n处的输入样本(并且与在滤波器中心处的输入样本的位置相对应),是在滤波器的滤波形状/图案/掩模/支撑中的的(在光栅扫描顺序中的)第i个邻近输入样本(光栅扫描顺序低于n),并且是在关于中心位置对称的镜像空间位置处的邻近输入样本。因此,关于中心对称的形状意味着当处于滤波器的形状/图案/掩模/支撑中时,也处于滤波器的相同滤波形状/图案/掩模/支撑中。wi是与邻近输入样本和相关联的滤波器系数,wc是用于中心输入样本的滤波器系数,并且c是编码的滤波器系数的数量(这与中心滤波器系数的索引值相同,由于其可以从其邻近滤波器系数被估计而不被编码)。i值及相关位置和与图3-b的滤波形状306中的索引值和具有上标符号(“+”或“-”)的索引值相对应,例如,对于作为滤波形状中心处的滤波器系数的索引的c,i=c=“6”。Where O <sub>n</sub> is the output sample at raster scan order index/position n. By raster scan order index n, we refer to the index n as the sample index increasing from left to right in a row of samples, and then from top to bottom as the rows increase. is the input sample at the same position n as the output sample (and corresponding to the position of the input sample at the center of the filter), is the i-th neighboring input sample (in the raster scan order below n) in the filter's filter shape/pattern/mask/support, and is the neighboring input sample at a mirror-space position symmetrical about the center position. Therefore, a shape symmetrical about the center means that when it is in the filter's shape/pattern/mask/support, it is also in the same filter shape/pattern/mask/support. w <sub>i</sub> is the filter coefficient associated with the neighboring input sample and w<sub>c</sub>, w<sub>c</sub> is the filter coefficient used for the center input sample, and c is the number of encoded filter coefficients (this is the same as the index value of the center filter coefficient, since it can be estimated from its neighboring filter coefficients and is not encoded). The value of i and its associated position correspond to the index value and the index value with superscript sign ("+" or "-") in the filter shape 306 of Figure 3-b. For example, for c, which is the index of the filter coefficient at the center of the filter shape, i = c = "6".

图4-a是示出根据本发明实施例的用于对亮度成分进行滤波的步骤的流程图,并且图4-b提供根据本发明实施例的亮度滤波器的滤波形状和四种可能的系数布置。Figure 4-a is a flowchart illustrating the steps for filtering luminance components according to an embodiment of the present invention, and Figure 4-b provides the filter shape of the luminance filter according to an embodiment of the present invention and four possible coefficient arrangements.

图4-a示出亮度成分的滤波处理的主要步骤。输入图像部分401包含要滤波的亮度样本。输入滤波参数402包括参考图2中的ALF语法元素描述的ALF参数(例如,“alf系数增量标志”、“coeff增量预测模式标志”、滤波器系数或ALF的任何其它标志或滤波器参数)。在滤波之前,在403中分析图像部分的内容。该分析的主要目标是允许/使得能够确定局部内容方位和活动级别(参见步骤405)。这允许/使得能够对内容是均匀还是具有任何锐变(大致上为内容的强度或对比度)、以及内容是否具有主要方位(例如基于边缘或方位纹理)以及该主要方位(orientation)是哪种方位进行局部评价/评估。例如,在VTM-3.0中,分析包括局部梯度分析,该局部梯度分析使用针对水平和垂直的每两个样本(即,四分之一样本)计算4个方位(水平、垂直和两个对角线)的拉普拉斯值。通过将输入图像部分的样本分割成块404(例如,VTM-3.0中的4×4个样本),并使用分析的结果,在步骤405中,将各个块分类为25个可能类中的一个,根据针对块中的样本计算的拉普拉斯值,使用索引(即,将块归类为25个类别/分类/组中的一个)来识别各个类。例如,在VTM-3.0中,与使用16个拉普拉斯值(4个样本上的4个方位)相对应。该分类实现了活动、方向性强度的分区,并将水平和垂直方位与对角线方位分离。此外,在步骤405中,各个块与转置索引相关联。该转置索引(例如,“transposeIdx”)可被视为分类的补充/附加信息,以完全表示/指示内容的方位。有四种可能的转置索引。当块的类指示该块为水平或垂直时,转置索引进一步指示方位是北到南、东到西、西到东还是南到北。当块的类指示该块为对角线时,转置索引进一步指示该块的方位是西北到东南、东北到西南、西南到东北还是东南到西北。Figure 4-a illustrates the main steps of the filtering process for the luminance component. Input image portion 401 contains luminance samples to be filtered. Input filtering parameters 402 include ALF parameters described with reference to the ALF syntax elements in Figure 2 (e.g., "ALF coefficient increment flag", "COeff increment prediction mode flag", filter coefficients, or any other flags or filter parameters of ALF). Before filtering, the content of the image portion is analyzed in 403. The main objective of this analysis is to allow/enable the determination of local content orientation and activity levels (see step 405). This allows/enables a local evaluation/assessment of whether the content is uniform or has any sharpness (roughly the intensity or contrast of the content), whether the content has a dominant orientation (e.g., based on edge or orientation texture), and what that dominant orientation is. For example, in VTM-3.0, the analysis includes local gradient analysis, which calculates Laplacian values for four orientations (horizontal, vertical, and two diagonals) using every two samples (i.e., quarter samples) for both horizontal and vertical directions. By segmenting samples of the input image portion into blocks 404 (e.g., 4×4 samples in VTM-3.0), and using the results of the analysis, in step 405, each block is classified into one of 25 possible classes. Each class is identified using an index (i.e., classifying the block into one of 25 categories/classes/groups) based on the Laplacian values calculated for the samples within the block. For example, in VTM-3.0, this corresponds to using 16 Laplacian values (4 orientations across 4 samples). This classification achieves partitioning based on activity, directional intensity, and separates horizontal and vertical orientations from diagonal orientations. Furthermore, in step 405, each block is associated with a transpose index. This transpose index (e.g., “transposeIdx”) can be considered supplementary/additional information to the classification to fully represent/indicate the orientation of the content. There are four possible transpose indices. When the block's class indicates that the block is horizontal or vertical, the transpose index further indicates whether the orientation is north to south, east to west, west to east, or south to north. When the block's class indicates that the block is diagonal, the transpose index further indicates whether the block's orientation is northwest to southeast, northeast to southwest, southwest to northeast, or southeast to northwest.

可以将类索引和转置索引看作给定样本块的自适应环路滤波器参数。步骤406采用这些参数来导出将用于对块的每一个样本进行滤波的亮度滤波器。如前文参考图2所述,在402中,每个类与亮度滤波器的系数表的索引相关联。为了导出4×4块的亮度滤波器,转置索引允许/使得能够选择图4-b中所示的四个形状/图案409、410、411或412中的一个。该图案指示如何组织编码滤波器系数(例如,基于扫描(中)顺序)以构建亮度滤波器,这些系数与块的类相关联,如针对204至206的描述中所说明的。亮度滤波器具有大小为7×7的菱形形状。针对各个亮度滤波器存在12个编码滤波器系数(索引编号0至11)。以与上述色度滤波器的中心系数相同的方式从其它滤波器系数中推导/导出滤波形状的中心的第13个系数(索引编号12)。The class index and transpose index can be viewed as adaptive loop filter parameters for a given sample block. Step 406 uses these parameters to derive the luminance filter that will be used to filter each sample of the block. As described above with reference to Figure 2, in 402, each class is associated with an index in the coefficient table of the luminance filter. To derive the luminance filter for the 4×4 block, the transpose index allows/makes it possible to select one of the four shapes/patterns 409, 410, 411, or 412 shown in Figure 4-b. This pattern indicates how the encoded filter coefficients (e.g., based on the scan (in) order) are organized to construct the luminance filter, which is associated with the class of the block, as illustrated in the description for 204 through 206. The luminance filter has a diamond shape of size 7×7. There are 12 encoded filter coefficients (index numbers 0 through 11) for each luminance filter. The 13th coefficient (index number 12) at the center of the filter shape is derived/derived from the other filter coefficients in the same manner as the center coefficient of the chroma filter described above.

以与色度滤波器如何进行滤波相同的方式进行步骤407中的滤波以获得输出图像部分408,即对于各个当前样本块,将在406中针对当前块导出/获得的亮度滤波器应用于当前块的各个当前样本。The filtering in step 407 is performed in the same way as the chroma filter to obtain the output image portion 408, that is, for each current sample block, the luminance filter derived/obtained for the current block in 406 is applied to each current sample of the current block.

当滤波亮度样本时,由于基于方位的分类(类)和相关转置(transposeIdx),各个类的最佳ALF滤波器(即,根据局部方位(例如基于局部梯度)选择的“基于方位的滤波器”)、特别是具有高活动(例如,高局部梯度)的滤波器倾向于是定向滤波器。对于具有最低活动的区域,即具有属于局部梯度相对较小的类的块的区域,这种方位将不那么明显,并且这种块的基于方位的滤波器倾向于不是定向滤波器。When filtering brightness samples, due to orientation-based classification (class) and the associated transpose (transposeIdx), the optimal ALF filter for each class (i.e., the "orientation-based filter" selected according to local orientation (e.g., based on local gradients) tends to be a directional filter, especially one with high activity (e.g., high local gradients). For regions with the lowest activity, i.e., regions with blocks belonging to classes with relatively small local gradients, this orientation will be less pronounced, and orientation-based filters for such blocks tend not to be directional filters.

基于方位的滤波器非常适合在边缘周围进行滤波,而不会对边缘的锐度造成太大的影响。如下所述,可以将类分组在一起以降低滤波器的用信号通知成本。即使使用类的这种分组,滤波器优化通常也会使得获得定向滤波器。在这种基于方位(ALF)的滤波器的情况下,当局部梯度沿着水平方向时,滤波方位通常是垂直的(即,最高的系数(绝对值)通常将位于中心的上方和下方的位置,而中心的左侧和右侧的系数通常将接近零)。类似地,当局部梯度沿着垂直方向时,滤波方位通常是水平的,并且当局部梯度沿着对角线方向时,滤波方位通常沿着与局部梯度的对角线方向垂直的方向。Orientation-based filters are well-suited for filtering around edges without significantly affecting edge sharpness. As described below, classes can be grouped together to reduce the signaling cost of the filter. Even with this grouping, filter optimization typically results in a directional filter. In the case of this orientation-based (ALF) filter, when the local gradient is horizontal, the filter orientation is typically vertical (i.e., the highest coefficients (absolute values) will typically be located above and below the center, while the coefficients to the left and right of the center will typically be close to zero). Similarly, when the local gradient is vertical, the filter orientation is typically horizontal, and when the local gradient is diagonal, the filter orientation is typically perpendicular to the diagonal direction of the local gradient.

当在VTM-3.0中滤波色度样本时,与亮度样本滤波相反,这是因为没有使用分类(并且由于色度通常是平滑的),所使用的滤波器通常对所有方位更敏感、并且不是定向滤波器(或者不是基于方位的滤波器)。When filtering chroma samples in VTM-3.0, the process is the opposite of filtering luminance samples because no classification is used (and since chroma is typically smooth), the filters used are generally more sensitive to all orientations and are not directional filters (or orientation-based filters).

在图3-b和图4-b这两者中,滤波形状是关于中心像素对称的。在VTM软件的ALF的设计中已经选择了这种对称性,但是在实施例的变型中,也可以使用非对称形状。然后,代替针对13个输入样本共用7个系数,与图3-b中的相同的滤波器支撑/掩模可以使用多达13个系数。并且代替针对25个输入样本共用13个系数,与图4-b中的相同的滤波器支撑/掩模可以使用多达25个系数。在其它变型中,滤波器支撑/掩模甚至是非对称的。在变型中,滤波器的形状/图案/支撑/掩模与ALF参数一起传输。In both Figures 3-b and 4-b, the filter shape is symmetrical about the center pixel. This symmetry has been chosen in the design of the ALF in the VTM software, but in variations of the embodiment, an asymmetrical shape can also be used. Then, instead of sharing 7 coefficients for 13 input samples, the same filter support/mask as in Figure 3-b can use up to 13 coefficients. And instead of sharing 13 coefficients for 25 input samples, the same filter support/mask as in Figure 4-b can use up to 25 coefficients. In other variations, the filter support/mask is even asymmetrical. In these variations, the filter shape/pattern/support/mask is transmitted along with the ALF parameters.

在其它变型中,滤波形状/图案/支撑/掩模与菱形形状不同。例如,在一个变型中,它是正方形,在另一变型中,它是矩形,在又一变型中,它是六边形,并且在另一个变型中,它是八边形。In other variations, the filter shape/pattern/support/mask differs from the rhombus shape. For example, in one variation it is a square, in another it is a rectangle, in yet another it is a hexagon, and in yet another it is an octagon.

在一些变型中,对于所有类方位,滤波形状/模式/支撑/掩模不相同。在一个变型中,形状是用于水平类/transposeIdx方位配置的水平矩形(例如“-”)、用于垂直类/transposeIdx方位配置的垂直矩形(例如“-”)、用于西北东南(NW-SE,例如“\”)和东南西北(SE-NW)类/transposeIdx方位配置的NW-SE矩形、用于东北西南(NE-SW,例如“/”)和SW-NE类/transposeIdx方向配置的NE-SW矩形。在其它变型中,滤波形状/图案/支撑件/掩模是水平-垂直交叉(“+”)、对角线交叉(“X”)、垂直段(“|”)、水平段(“-”)、从左上到右下的对角线段(“\”)、从右上到左下的对角线段(“/”)、或上述滤波形状/图案/支撑件/掩模的任何组合。In some variations, the filter shape/pattern/support/mask differs for all class orientations. In one variation, the shape is a horizontal rectangle (e.g., "-") for horizontal class/transposeIdx orientation configurations, a vertical rectangle (e.g., "-") for vertical class/transposeIdx orientation configurations, an NW-SE rectangle for Northwest-Southeast (NW-SE, e.g., "\") and Southeast-Northwest (SE-NW) class/transposeIdx orientation configurations, and a NE-SW rectangle for Northeast-Southwest (NE-SW, e.g., "/") and SW-NE class/transposeIdx orientation configurations. In other variations, the filter shape/pattern/support/mask is a horizontal-vertical intersection ("+"), a diagonal intersection ("X"), a vertical segment ("|"), a horizontal segment ("-"), a diagonal segment from top left to bottom right ("\"), a diagonal segment from top right to bottom left ("/"), or any combination of the above filter shapes/patterns/supports/masks.

图6提供ALF中的线性滤波器的框图。其与滤波函数对应于等式(1)的ALF的示例实现相对应,其中“C”601与作为当前样本的样本值的I(x,y)相对应,“S0”602至“Sn”603与作为邻近样本值的I(x+i,y+j)(各个(i,j)≠(0,0))相对应,“wC”604与作为当前样本的滤波器系数的w(0,0)相对应,“w0”605至“Wn”606与作为在位置(x+i,y+j)的邻近样本的滤波器系数的w(i,j)(各个(i,j)≠(0,0))相对应,并且“O”607与ALF滤波器的输出相对应,即当前样本的滤波样本值。该处理将整数输入样本值(即“C”和“S0”至“Sn”)的表和输入权重(即“wC”和“w0”至“Wn”)的表(或滤波器系数-注意,该表具有与整数输入样本值表相同数量的元素)作为输入,以得到具有定点精度的实数的整数表示。这两个表具有相同数量的元素,并且被逐个元素相乘,并且这些相乘的结果被加和在一起(即获得这两个表的元素的线性组合)。该运算的结果是实数的定点精度近似。该定点值四舍五入为整数值,其结果是一个输出样本值“O”。Figure 6 provides a block diagram of the linear filter in the ALF. It corresponds to an example implementation of the ALF with the filter function corresponding to equation (1), where “C” 601 corresponds to I(x,y) as the sample value of the current sample, “S0” 602 to “Sn” 603 correspond to I(x+i,y+j) as the neighboring sample values (each (i,j)≠(0,0)), “wC” 604 corresponds to w(0,0) as the filter coefficient of the current sample, “w0” 605 to “Wn” 606 correspond to w(i,j) as the filter coefficient of the neighboring sample at position (x+i,y+j) (each (i,j)≠(0,0)), and “O” 607 corresponds to the output of the ALF filter, i.e., the filtered sample value of the current sample. This process takes a table of integer input sample values (i.e., "C" and "S0" through "Sn") and a table of input weights (i.e., "wC" and "w0" through "Wn") (or filter coefficients—note that this table has the same number of elements as the table of integer input sample values) as input to obtain an integer representation of a real number with fixed-point precision. Both tables have the same number of elements and are multiplied element-wise, and the results of these multiplications are summed together (i.e., obtaining a linear combination of the elements of the two tables). The result of this operation is a fixed-point precision approximation of the real number. This fixed-point value is rounded to an integer value, resulting in an output sample value of "0".

从编码器的角度来看,ALF的灵感来自Wiener滤波器。Wiener滤波器是线性滤波器(通常用作信号/图像处理中的线性卷积滤波器),其使以下两者之间的均方误差最小化:1)所估计的随机处理/变量(Wiener滤波器的输出),其是有限数量的观察到的处理/变量(Wiener滤波器的输入)的线性组合,和2)期望的处理/变量(Wiener滤波器的目标,即在伪像发生之前的原始图像)。在信号/图像处理中,例如有限脉冲响应(FIR)Wiener滤波器在源分离或去噪中具有应用。在图像编码的情况下,目标是(在通过压缩/量化改变之前的)原始图像,而输入是来自我们希望通过应用滤波器来改进的压缩图像的样本。From the encoder's perspective, ALF is inspired by the Wiener filter. A Wiener filter is a linear filter (often used as a linear convolution filter in signal/image processing) that minimizes the mean square error between: 1) the estimated random processing/variable (the output of the Wiener filter), which is a linear combination of a finite number of observed processing/variables (the inputs of the Wiener filter), and 2) the desired processing/variable (the target of the Wiener filter, i.e., the original image before artifacts occur). In signal/image processing, for example, Finite Impulse Response (FIR) Wiener filters have applications in source separation or denoising. In the case of image coding, the target is the original image (before it is modified by compression/quantization), while the input is a sample from a compressed image that we wish to improve by applying a filter.

X(其是观察到的随机处理的实现的输入矩阵,各个列包含针对每个随机处理的一个实现)和y(其是输出行矢量,其包含针对相同列索引处的观察到的随机处理的期望处理的实现)的最小二乘解是The least-squares solution to X (which is the input matrix of the observed implementations of the random processes, with each column containing an implementation for each random process) and y (which is the output row vector containing the implementations of the desired processes for the observed random processes at the same column indices) is:

Wiener波器系数对应于Wiener Filter Coefficients Correspond to

应当理解,“实现”是随机变量的观察值或观察到的值,即实践中实际上观察到的值。It should be understood that "realization" is the observed value or the value of a random variable, that is, the value actually observed in practice.

在VTM-3.0ALF编码器中,使用FIR Wiener滤波器(或功能上等效的最小二乘解)来优化ALF参数的编码成本(主要由编码FIR滤波器系数的成本决定)与通过使用编码的ALF参数(即使用FIR滤波器)对图片进行滤波而获得的失真增益之间的速率/失真(R/D)折衷。如果编码ALF参数的速率(即,编码成本)不是问题,并且如果将给定帧的峰值信噪比(PSNR)最大化是唯一目标(不考虑时间影响),则Wiener滤波器将能够实现VTM-3.0中的ALF滤波设计的最佳解决方案。因此,根据本发明的实施例的ALF编码器可以使用与其一起提供的线性ALF滤波器相同或相似的滤波器。In the VTM-3.0 ALF encoder, there is a rate/distortion (R/D) trade-off between optimizing the coding cost of ALF parameters (primarily determined by the cost of coding the FIR filter coefficients) using an FIR Wiener filter (or a functionally equivalent least-squares solution) and the distortion gain obtained by filtering the image using the coded ALF parameters (i.e., using an FIR filter). If the rate of coding the ALF parameters (i.e., coding cost) is not an issue, and if maximizing the peak signal-to-noise ratio (PSNR) of a given frame is the sole objective (regardless of temporal effects), then the Wiener filter will be able to achieve the optimal solution for the ALF filtering design in VTM-3.0. Therefore, the ALF encoder according to embodiments of the invention can use the same or similar filters as the linear ALF filters provided with it.

图9示出根据本发明实施例的ALF编码处理的流程图,该实施例通过修改参考图6描述的VTM-3.0的ALF来实现。应当理解,根据本发明的其它实施例,可以以相同的方式修改其它ALF以实现所述其它实施例。Figure 9 illustrates a flowchart of the ALF encoding process according to an embodiment of the present invention, which is implemented by modifying the ALF of VTM-3.0 described with reference to Figure 6. It should be understood that other ALFs can be modified in the same manner to implement the other embodiments according to the present invention.

ALF编码处理通过确定亮度样本901的各个4×4块的类索引和转置索引来开始。ALF encoding processing begins by determining the class index and transpose index of each 4×4 block of the luminance sample 901.

然后,在902提取/获得用于导出Wiener滤波器的统计。这些统计是与等式(3)的XXT相对应的(自动)协方差统计,并且是与等式(3)的XyT相对应的互协方差统计。它们用于通过将XXT和XyT分别除以N(X中的列的数量,即要滤波的样本的数量)来构建/获得/估计(自动)协方差矩阵和互协方差矩阵。这些(自动)协方差矩阵和互协方差矩阵是针对各个类和针对亮度成分样本的各个CTU以及针对各个色度成分样本的各个CTU构建/获得/估计的902。在下面的描述中,术语“(互)协方差矩阵统计”和“(互)协方差矩阵”可互换地用于指代相同的事物。应当理解,这两者之间的不同是“(互)协方差矩阵统计”是通过累加(或加和)值来获得的,而“(互)协方差矩阵”也通过累加(或加和)值、但随后通过累加次数(以估计期望值)归一化来获得。Then, statistics for deriving the Wiener filter are extracted/obtained at 902. These statistics are (automatic) covariance statistics corresponding to XXT in Equation (3) and cross-covariance statistics corresponding to XyT in Equation (3). They are used to construct/obtain/estimate the (automatic) covariance matrix and cross-covariance matrix by dividing XXT and XyT by N (the number of columns in X, i.e., the number of samples to be filtered), respectively. These (automatic) covariance matrices and cross-covariance matrices are constructed/obtained/estimated at 902 for each class and for each CTU for each luminance component sample and for each CTU for each chrominance component sample. In the following description, the terms "(cross-)covariance matrix statistics" and "(cross-)covariance matrix" are used interchangeably to refer to the same thing. It should be understood that the difference between the two is that the "(cross)covariance matrix statistics" is obtained by accumulating (or summing) values, while the "(cross)covariance matrix" is also obtained by accumulating (or summing) values, but then normalized by the number of accumulations (to estimate the expected value).

对于给定的CTU/类/成分,X如下获得。由于滤波的形状被认为是对称的,因此X中的行的数量与滤波器的滤波器系数的数量相对应。X的一行(最后行)包含滤波形状中的中心样本的实现(其中滤波形状的中心属于给定CTU/类/成分),而具有索引i的各个其它行包含滤波形状中的具有索引i的两个对称样本的和(其中对称样本是属于给定CTU/类/成分的滤波形状的中心的相邻位置)。在亮度成分样本的情况下,转置索引也用于根据图4-b的不同形状来转置滤波形状的样本位置,使得X的各个行i包含属于滤波形状的索引为i的样本的样本统计。例如,对于图4-b的形状,Xi,j包含:对于i<12,形状中索引为i的两个对称相邻位置(第j个滤波样本)的和,以及对于i=12,第j个滤波样本;其中Xi,j是矩阵中i行和j列处的值。For a given CTU/class/component, X is obtained as follows. Since the shape of the filter is considered symmetrical, the number of rows in X corresponds to the number of filter coefficients. One row (the last row) of X contains the realization of the center sample in the filter shape (where the center of the filter shape belongs to the given CTU/class/component), while each of the other rows with index i contains the sum of two symmetrical samples with index i in the filter shape (where the symmetrical sample is the adjacent position of the center of the filter shape belonging to the given CTU/class/component). In the case of luminance component samples, the transpose index is also used to transpose the sample positions of the filter shape according to the different shapes in Figure 4-b, such that each row i of X contains the sample statistics of the sample with index i belonging to the filter shape. For example, for the shape in Figure 4-b, X<sub> i,j </sub> contains: for i < 12, the sum of the two symmetrical adjacent positions (the j-th filter sample) with index i in the shape, and for i = 12, the j-th filter sample; where X <sub>i,j</sub> is the value at row i and column j in the matrix.

矢量y包含所有目标样本值(即yj是源/原始图像中在其压缩之前的第j个样本的值)。Vector y contains all the target sample values (i.e., yj is the value of the j-th sample in the source/original image before its compression).

不实际构建/计算X矩阵。代替地,通过迭代加和的结果来计算XXT,其中Xi是针对给定样本位置获得的X的第i列。Instead of actually constructing/compiling the X matrix, we compute XX<sub>T</sub> by iteratively summing the results, where X <sub>i</sub> is the i-th column of X obtained for a given sample location.

也不实际构建/计算y矢量。代替地,通过迭代加和Xiyi的结果来计算XyT,其中,yi是y的第i个元素并且与当滤波使用输入Xi的第i个输入样本时的目标样本值相对应。Nor is the y vector actually constructed/computed. Instead, XyT is computed by iteratively summing the results of Xi y i , where y i is the i-th element of y and corresponds to the target sample value when the filter uses the i-th input sample of input Xi .

在VTM-3.0中,ALF编码器试图降低R/D成本,这等于速率失真折衷的拉格朗日优化D+λR。这里,D是失真(二次误差),R是速率,并且λ由编码器主要基于VTM-3.0编码器量化参数(QP)、片类型(帧内或帧间)和压缩成分的类型(亮度或色度)来确定。ALF编码器首先试图通过最小化该拉格朗日R/D成本来优化ALF参数。In VTM-3.0, the ALF encoder attempts to reduce R/D costs, which is equivalent to a Lagrangian optimization of D+λR with a rate-distortion tradeoff. Here, D is the distortion (quadratic error), R is the rate, and λ is determined by the encoder primarily based on the VTM-3.0 encoder quantization parameters (QP), slice type (intra-frame or inter-frame), and the type of compressed component (luminance or chrominance). The ALF encoder first attempts to optimize the ALF parameters by minimizing this Lagrangian R/D cost.

如果ALF降低了亮度成分的成本,即当ALF无效时的输出片的失真大于当ALF有效时的失真加上用信号通知ALF参数所需的速率的λ倍数,则编码器将ALF确定为针对亮度成分有效。然后,如果针对亮度成分有效,则试图优化针对色度成分的ALF参数,以查看是否能够改进用信号通知这些色度成分的R/D成本。基于此,编码器可以确定是否更好地针对这些成分中的各个成分使ALF有效/启用。If the ALF reduces the cost of the luminance component—that is, if the output distortion when the ALF is disabled is greater than the distortion when the ALF is enabled plus a multiple of λ (the rate required to signal the ALF parameters)—the encoder determines that the ALF is valid for the luminance component. Then, if valid for the luminance component, it attempts to optimize the ALF parameters for the chrominance component to see if it can improve the R/D cost of signaling these chrominance components. Based on this, the encoder can determine whether it is better to enable/enable the ALF for each of these components individually.

根据本发明的实施例,ALF编码器对其ALF参数进行相同或功能上等效的优化处理。根据这种实施例的变型,在ALF参数优化处理的开始,ALF被设置为对于所有CTU有效903。用于构建协方差矩阵和互协方差矩阵的片级别的统计是通过聚合针对ALF有效/启用的各个CTU的统计来获得的。使用针对被分类为属于该类的4×4样本块的所有样本获得的统计,针对亮度成分的各个类计算一个矩阵904;并且通过聚合(加和)针对色度的两个色度成分的统计来计算一个矩阵912。According to an embodiment of the invention, the ALF encoder performs the same or functionally equivalent optimization processing on its ALF parameters. According to a variation of this embodiment, at the beginning of the ALF parameter optimization processing, the ALF is set to be valid for all CTUs 903. The slice-level statistics used to construct the covariance matrix and cross-covariance matrix are obtained by aggregating statistics for each CTU where the ALF is valid/enabled. Using statistics obtained for all samples classified as belonging to a 4×4 sample block, a matrix 904 is calculated for each class of the luminance component; and a matrix 912 is calculated by aggregating (summing) statistics for the two chrominance components.

针对亮度的滤波器优化处理开始于寻找25组滤波器以将类组合/合并在一起,即第一组25个滤波器、第二组24个滤波器等等,直到最后一组1个滤波器(针对各个可能的滤波器数量有一个组)905。编码器以针对各个类1个滤波器开始(因此总共25个滤波器),该滤波器是根据该类中块的样本的协方差和互协方差计算的Wiener滤波器。这是第一组25个滤波器。它试图通过将滤波器合并在一起(即,将滤波器的相关类合并在一起以更精确)来迭代地减少滤波器的数量(逐个地,直到只有一个剩余,以获得所有期望的组)。编码器使最初与两个不同的滤波器关联的类共用一个公共滤波器(即编码器合并这两个类以共用一个关联的滤波器)。为了确定要合并的滤波器(即要合并的类),针对各个滤波器确定协方差和互协方差统计。编码器针对与一个或多个类(索引)相关联的各个滤波器估计/评估在使用滤波器对与该类相关联的所有样本块进行滤波之后获得的总残差。然后,对于各对滤波器(及其关联的类),编码器计算合并协方差和互协方差统计以确定针对合并类的Wiener滤波器以及用所确定的Wiener滤波器滤波与类索引关联的所有样本块之后获得的总残差。然后,编码器确定两个滤波器,对于该两个滤波器,合并滤波器的总残差(从与类相关联的统计中导出,类与这两个滤波器相关联)与这两个滤波器的总残差的和(通过将一个滤波器的总残差与另一个滤波器的总残差相加)之间的差是最小的,并且合并这两个滤波器(使得该合并滤波器准备用于下一个滤波器合并迭代)。简而言之,编码器合并(a,b)使下式最小化的一对不同的滤波器统计:其中Err(x)返回滤波器统计的误差,并且a+b是两个滤波器统计a和b的合并统计。The filter optimization process for brightness begins by finding 25 sets of filters to group/merge classes together, i.e., 25 filters for the first set, 24 filters for the second set, and so on, until a final set of 1 filter (one set for each possible number of filters) 905. The encoder starts with 1 filter for each class (thus 25 filters in total), which is a Wiener filter calculated based on the covariance and cross-covariance of samples from the blocks in that class. This is the first set of 25 filters. It attempts to iteratively reduce the number of filters (one by one, until only one remains to obtain all the desired sets) by merging the filters together (i.e., merging the relevant classes of the filters together for greater precision). The encoder makes classes initially associated with two different filters share a common filter (i.e., the encoder merges the two classes to share a single associated filter). To determine the filters to be merged (i.e., the classes to be merged), covariance and cross-covariance statistics are determined for each filter. The encoder estimates/evaluates the total residual obtained after filtering all sample blocks associated with that class using the filter for each filter associated with one or more classes (indices). Then, for each pair of filters (and their associated classes), the encoder calculates the merge covariance and cross-covariance statistics to determine the Wiener filter for the merged class and the total residual obtained after filtering all sample blocks associated with the class index using the determined Wiener filter. The encoder then determines two filters for which the difference between the total residual of the merged filter (derived from the statistics associated with the class, which is associated with both filters) and the sum of the total residuals of the two filters (by adding the total residuals of one filter to the total residuals of the other filter) is minimized, and merges these two filters (making the merged filter ready for the next filter merging iteration). In short, the encoder merges (a,b) a pair of distinct filter statistics that minimizes the following: where Err(x) returns the error of the filter statistics, and a+b is the merged statistic of the two filter statistics a and b.

到目前为止,使用双精度浮点值来估计统计、滤波器和误差。现在编码器试图找到编码亮度滤波器的最佳R/D成本折衷906。一旦确定了25组滤波器/类(从25个滤波器开始到1个滤波器),对于各个组,ALF编码器导出各个滤波器的整数滤波器系数(针对整数值编码和定点精度计算)。然后,在使用不同替代编码方案时就R/D成本折衷方面寻找最佳滤波器。第一种替代方案是使用(exp-)Golomb编码对所有滤波器的所有系数进行编码。第二种替代方案是使用滤波器的增量编码,其中各个滤波器的滤波器系数被编码为与先前滤波器的滤波器系数的不同(使用(exp-)Golomb编码)。第三种替代方案(R/D优化)允许利用一个标志禁用一些滤波器,并对未禁用的滤波器的所有滤波器系数(使用(exp-)Golomb编码)进行编码。前两种替代方案可能导致位率降低,而第三种替代方案可能为了位率降低更少而导致更多的失真。So far, double-precision floating-point values have been used to estimate statistics, filters, and errors. The encoder now attempts to find the optimal R/D cost tradeoff for encoding the luminance filters. Once 25 groups/classes of filters (starting with 25 filters down to 1 filter) are determined, for each group, the ALF encoder derives the integer filter coefficients for each filter (for integer value encoding and fixed-point precision calculations). Then, the optimal filter is sought in terms of R/D cost tradeoffs while using different alternative encoding schemes. The first alternative is to encode all coefficients for all filters using (exp-)Golomb coding. The second alternative uses incremental coding of the filters, where the filter coefficients of each filter are encoded differently from the filter coefficients of the previous filters (using (exp-)Golomb coding). The third alternative (R/D optimization) allows disabling some filters using a flag and encoding all filter coefficients for the filters that are not disabled (using (exp-)Golomb coding). The first two alternatives may result in a bit rate reduction, while the third alternative may result in more distortion for a smaller bit rate reduction.

编码器采用/选择/选取最小化R/D成本的滤波器组和编码折衷。The encoder employs/selects/chooses filter banks and coding trade-offs that minimize R/D costs.

一旦由编码器确定/选择了使用的亮度滤波器,则针对各个CTU,编码器使用CTU统计来查看滤波CTU的亮度样本的R/D成本是否更好于不滤波相同CTU的亮度样本的R/D成本。如果不是更好,则针对该CTU的亮度样本禁用ALF 907。然后,编码器可以在908处再循环到针对亮度的亮度滤波器优化步骤,同时更新关于CTU(ALF被启用)的协方差和互协方差统计的片统计904。例如,在VTM-3.0中,编码器再循环4次。Once the encoder determines/selects the luminance filter to use, for each CTU, the encoder uses CTU statistics to see if the R/D cost of the luminance sample from the filtered CTU is better than the R/D cost of the luminance sample from the same CTU without filtering. If it is not better, ALF is disabled for the luminance sample of that CTU 907. The encoder can then loop back to the luminance filter optimization step for the luminance at 908, while updating the slice statistics 904 regarding the covariance and cross-covariance statistics of the CTU (ALF enabled). For example, in VTM-3.0, the encoder loops 4 times.

根据对亮度成分样本应用ALF或不应用ALF之间的R/D成本差异,编码器在909确定是否针对亮度成分使ALF有效/启用。Based on the R/D cost difference between applying ALF to the luminance component sample and not applying ALF, the encoder determines at 909 whether to enable/enable ALF for the luminance component.

如果要针对亮度成分使ALF有效/启用,则编码器进入910处的色度成分的处理。如果针对亮度成分使ALF无效/禁用,则在911处用信号通知ALF为非有效/禁用,并且ALF编码处理结束。To enable/enable ALF for the luma component, the encoder proceeds to process the chroma component at 910. To disable/disable ALF for the luma component, a signal is sent at 911 indicating that ALF is disabled/disabled, and the ALF encoding process ends.

针对色度成分的ALF编码处理从两个色度成分的组合统计开始912,条件是针对片的所有CTU使ALF有效/启用。The ALF encoding process for chroma components starts with the combined statistics of two chroma components 912, provided that ALF is enabled/enabled for all CTUs of the chip.

然后编码器确定色度滤波器913。编码器首先使用两个色度成分的CTU统计确定(浮点)Wiener滤波器。它导出整数滤波器系数。然后,对于各个色度成分,编码器使用CTU统计来查看滤波CTU的色度成分的R/D成本是否更好于不滤波CTU的色度成分的R/D成本。如果不是更好,则针对该CTU的色度成分样本禁用ALF 914。如果编码器确定对于给定色度成分的所有CTU不应使ALF有效(即应该被禁用),则针对该色度成分禁用ALF,并且因此不需要针对“启用标志”为0的各个CTU进行编码915。The encoder then determines the chroma filter 913. The encoder first determines the (floating-point) Wiener filter using CTU statistics for both chroma components. It derives integer filter coefficients. Then, for each chroma component, the encoder uses CTU statistics to see if the R/D cost of the chroma component with the filtered CTU is better than the R/D cost of the chroma component without the filtered CTU. If not, the ALF is disabled for the chroma component sample for that CTU 914. If the encoder determines that all CTUs for a given chroma component should not make the ALF effective (i.e., should be disabled), the ALF is disabled for that chroma component, and therefore no encoding is required for individual CTUs with the "enable flag" set to 0 915.

然后,编码器可以在916处再循环到色度滤波器优化步骤,同时更新关于CTU(启用ALF)的色度成分的协方差和互协方差统计的片统计。例如,在VTM-3.0中,编码器再多循环2次。The encoder can then loop back to the chroma filter optimization step at 916, updating the slice statistics for the covariance and cross-covariance of the chroma components with CTU (ALF enabled). For example, in VTM-3.0, the encoder loops twice more.

然后,编码器在917处将根据本发明的实施例的ALF与所确定的ALF参数一起应用(即,使用来自步骤913的所确定的色度滤波器)。根据编码器配置,结果图像可以被输出和/或放入参考帧缓冲器中。编码器最后编码最佳R/D成本参数,即ALF启用标志以及(如果ALF启用标志指示有效/启用)所确定的ALF参数918。Then, at 917, the encoder applies the ALF according to an embodiment of the invention together with the determined ALF parameters (i.e., using the chroma filter determined from step 913). Depending on the encoder configuration, the resulting image can be output and/or placed in a reference frame buffer. Finally, the encoder encodes the optimal R/D cost parameters, i.e., the ALF enable flag and (if the ALF enable flag indicates active/enabled) the determined ALF parameters 918.

应当理解,根据变型,可进行用于其它ALF参数的优化处理以优化ALF的这些参数。It should be understood that, depending on the variant, optimization processing can be performed on other ALF parameters to optimize these parameters of the ALF.

具有非线性滤波能力的ALFALF with nonlinear filtering capability

根据本发明的实施例,可以修改在步骤304和407中使用的线性滤波,这引入非线性并改进滤波结果(在滤波质量和编码效率之间获得更好的折衷)。ALF滤波的目标是去除编码工具引入的一些“噪声”(例如量化噪声/误差)。为了去除这种噪声,通常使用低通线性滤波器来平滑信号并减少小的局部变化。这种类型的滤波器可能在滤波输出中引入模糊,特别是在对比度较强的区域,例如在边缘附近。非线性滤波器(例如双边滤波器)已经被开发以允许更高效的去噪,同时引入更少的模糊或振铃效应,甚至在边缘周围也是如此。为此,这些非线性滤波器如线性滤波器那样通常依赖于基于局部邻近(即邻近样本)对样本滤波,但是与具有非常不同的值的样本相比更注意(或加权)具有与要滤波的样本相似的值的样本。邻近值的加权通常使用非线性函数(即非线性映射)来进行。这种非线性滤波器通常比线性滤波器更复杂,并且可能难以优化它们的参数,以及/或者如果想要在新的ALF设计中使用这种类型的滤波器,它们可能比线性滤波器具有更小的灵活性。According to embodiments of the invention, the linear filtering used in steps 304 and 407 can be modified, introducing nonlinearity and improving the filtering results (achieving a better trade-off between filtering quality and coding efficiency). The goal of ALF filtering is to remove some of the "noise" (e.g., quantization noise/error) introduced by the coding tools. To remove this noise, low-pass linear filters are typically used to smooth the signal and reduce small local variations. This type of filter can introduce blurring into the filtered output, especially in areas of high contrast, such as near edges. Nonlinear filters (e.g., bilateral filters) have been developed to allow for more efficient denoising while introducing less blurring or ringing, even around edges. To this end, these nonlinear filters, like linear filters, typically rely on filtering samples based on local proximity (i.e., neighboring samples), but pay more attention to (or weight) samples with values similar to the sample to be filtered compared to samples with very different values. The weighting of neighboring values is typically done using a nonlinear function (i.e., a nonlinear mapping). Such nonlinear filters are generally more complex than linear filters and may be difficult to optimize their parameters, and/or may offer less flexibility than linear filters if this type of filter is to be used in a new ALF design.

根据本发明的实施例,通过引入具有涉及保持ALF的可并行化设计的操作的相对低复杂性的非线性来修改VTM-3.0的ALF(或前述实施例中的任何实施例或其变型)。According to embodiments of the invention, the ALF of VTM-3.0 (or any of the embodiments described above or variations thereof) is modified by introducing nonlinearities with relatively low complexity involving operations that maintain the parallelizable design of the ALF.

看看VTM-3.0中的ALF,通过使用实数重新表示等式(1)来简化等式,我们具有(删除与定点表示和整数舍入相关的操作):Looking at ALF in VTM-3.0, by simplifying the equation (1) using real number re-representation, we have (removing operations related to fixed-point representation and integer rounding):

O(x,y)=∑(i,j)w(i,j).I(x+i,y+j)  (4)O(x,y)=∑ (i,j) w(i,j).I(x+i,y+j) (4)

对于这个ALF,满足条件For this ALF, the condition is satisfied.

(i,j)w(i,j)=1  (5)(i, j) w(i, j)=1 (5)

这意味着ALF的所有滤波器系数之和是1。然后可以看出等式(4)可以被重新表示为:This means that the sum of all filter coefficients in ALF is 1. Then it can be seen that equation (4) can be reformulated as:

O(x,y)=I(x,y)+∑(i,j)≠(0,0)w(i,j).(I(x+i,y+j)-I(x,y))  (6)O(x,y)=I(x,y)+∑ (i,j)≠(0,0) w(i,j).(I(x+i,y+j)-I(x,y)) (6)

然后,输出样本O(x,y)是将输入样本I(x,y)(在相同位置处)加到滤波器系数矢量和局部梯度矢量(作为输入样本的邻近样本和输入样本本身之间的差计算的局部梯度的矢量)之间的标量积的结果。换句话说,输出样本(即,滤波样本值)是将输入样本加到滤波器系数和局部梯度的线性组合的结果。Then, the output sample O(x, y) is the result of adding the input sample I(x, y) (at the same position) to the filter coefficient vector and the local gradient vector (which is the vector of local gradients calculated as the difference between the input sample's neighboring samples and the input sample itself). In other words, the output sample (i.e., the filtered sample value) is the result of adding the input sample to the filter coefficients and the local gradient.

代替对滤波器使用这种通常的线性公式,根据本发明的实施例,修改ALF滤波处理以在ALF滤波器中引入非线性。该非线性是使用多变量函数K(d,b)来实现的,该多变量函数K(d,b)将偏移(i,j)处的局部梯度d作为第一参数,并且其值根据第二参数b=k(i,j)而变化。代替在等式(6)的标量积中使用偏移(i,j)的局部梯度,在标量积中使用K(d,b),从而得到输出样本O(x,y),其随局部梯度以非线性方式变化:Instead of using the usual linear formula for the filter, according to an embodiment of the invention, the ALF filtering process is modified to introduce nonlinearity into the ALF filter. This nonlinearity is achieved using a multivariable function K(d, b) that takes the local gradient d at offset (i, j) as a first parameter, and whose value varies according to a second parameter b = k(i, j). Instead of using the local gradient at offset (i, j) in the scalar product of equation (6), K(d, b) is used in the scalar product to obtain the output sample O(x, y), which varies nonlinearly with the local gradient:

O(x,y)=I(x,y)+∑(i,j)≠(0,0)w(i,j).K(I(x+i,y+j)-I(x,y),k(i,j))  (7)O(x,y)=I(x,y)+∑ (i,j)≠(0,0) w(i,j).K(I(x+i,y+j)-I(x,y),k(i,j)) (7)

其中K(d,b)是将d=I(x+i,y+j)-I(x,y)作为其第一参数/变量(作为位置(x+i,y+j)处的邻近样本值与位置(x,y)处的当前样本值之间的差计算的偏移(i,j)处的局部梯度)并且将b=k(i,j)作为其第二参数/变量(附加滤波参数)的函数。附加滤波参数同时被确定为w(i,j)。在实现中,确定k(i,j)和w(i,j)的值以优化滤波和用信号通知处理(例如,以最小化失真)。该优化处理由使用ALF的编码器进行。将在稍后的描述中提供这种优化处理的示例。Where K(d, b) is a function of d = I(x+i, y+j) - I(x, y) as its first parameter/variable (the local gradient at offset (i, j) calculated as the difference between the neighboring sample value at position (x+i, y+j) and the current sample value at position (x, y)) and b = k(i, j) as its second parameter/variable (an additional filtering parameter). The additional filtering parameter is also determined as w(i, j). In the implementation, the values of k(i, j) and w(i, j) are determined to optimize filtering and signal-informed processing (e.g., to minimize distortion). This optimization is performed by an encoder using ALF. An example of this optimization will be provided in the description later.

因此,根据本发明的实施例,通过使用输入样本本身和作为输入样本的邻近的输入样本的自适应非线性变换的线性组合来滤波输入样本值。自适应非线性变换取决于邻近输入样本相对于正在滤波的输入样本的位置的相对位置。Therefore, according to embodiments of the invention, input sample values are filtered by using a linear combination of an adaptive nonlinear transformation of the input sample itself and neighboring input samples. The adaptive nonlinear transformation depends on the relative position of the neighboring input samples with respect to the input sample being filtered.

利用这种修改后的ALF,对于特定K仍然可以实现线性滤波,其中K满足如下条件:存在b,并且存在不等于0的α,使得针对所有d,K(d,b)等于α乘以d,即:Using this modified ALF, linear filtering can still be achieved for a specific K, where K satisfies the following condition: there exists b, and there exists a non-zero α, such that for all d, K(d, b) equals α multiplied by d, that is:

使得Make

因此,对于某些值b选择表现为类似于线性函数(即,线性映射)的函数K(d,b)(即,函数K(d,b)满足条件(8)),确保实施例的修改后的ALF滤波处理仍然可以至少如使用标准线性ALF那样高效(即,在最坏情况下,修改后的ALF可以实现与VTM-3.0中的ALF相同的效率水平)。例如,当使用限幅函数时,参数b可以被设置为最大可能整数值(理想地,它应该被设置为无穷大,但是我们可以使用有限整数精度方案中的最大可能整数值来实现相同的效果),以使其表现为线性函数。Therefore, for certain values of b, a function K(d, b) is chosen that behaves like a linear function (i.e., a linear mapping) (i.e., the function K(d, b) satisfies condition (8)), ensuring that the modified ALF filtering process of the embodiment can still be at least as efficient as using a standard linear ALF (i.e., in the worst case, the modified ALF can achieve the same efficiency level as the ALF in VTM-3.0). For example, when using a limiting function, the parameter b can be set to the largest possible integer value (ideally, it should be set to infinity, but we can achieve the same effect using the largest possible integer value in a finite integer precision scheme) to make it behave like a linear function.

注意,在本发明的一些实施例中,ALF滤波使用替代方案/滤波方案。采用局部梯度和附加参数/变量的多变量函数K(d,b)由另一个采用如下三个参数/变量的多变量函数代替:邻近样本值、要滤波的样本值和附加参数/变量。它使用等式(7)同时使用与等式(4)类似的记号法并满足条件(5)被重新表示:Note that in some embodiments of the invention, ALF filtering uses an alternative/filtering scheme. The multivariate function K(d, b) employing local gradients and additional parameters/variables is replaced by another multivariate function employing three parameters/variables: neighboring sample values, the sample value to be filtered, and additional parameters/variables. It is re-expressed using equation (7) while using a notation similar to that of equation (4) and satisfying condition (5):

O(x,y)=w(0,0).I(x,y)+∑(i,j)≠(0,0)w(i,j).K′(I(x+i,y+j),I(x,y),k(i,j))(9)O(x, y)=w(0,0).I(x,y)+∑ (i,j)≠(0,0 )w(i,j).K′(I(x+i,y+j),I(x,y),k(i,j))(9)

其中K′(n,c,b)是采用邻近样本值(n)、要滤波的当前样本值(c)和附加滤波参数/变量(b)作为其参数/变量的函数。Where K′(n, c, b) is a function that takes the neighboring sample value (n), the current sample value to be filtered (c), and the additional filtering parameter/variable (b) as its parameters/variables.

根据本发明的实施例,对色度成分(304)和亮度成分(407)这两者的滤波步骤进行修改,以使用具有使用整数算术(如参考等式(1)所述)实现的非线性公式的滤波(优选地使用等式(7),但也可替代地使用等式(9))。According to an embodiment of the invention, the filtering steps for both the chromaticity component (304) and the luminance component (407) are modified to use a filtering method with a nonlinear formula implemented using integer arithmetic (as described in reference equation (1)) (preferably using equation (7), but alternatively using equation (9)).

根据替代实施例,其中任何选择都是基于复杂性,例如,仅对两个滤波步骤中的一个(304)或(407)进行修改以使用具有非线性公式的滤波器。According to alternative embodiments, any choice is based on complexity, for example, modifying only one of the two filtering steps (304) or (407) to use a filter with a nonlinear formula.

根据一些实施例,参数/变量b=k(i,j)具有多于一个维度,例如,它可以是K(d,b=(Sb,Db))=f(d,Sb,Db),例如使用:According to some implementations, the parameter/variable b = k(i, j) has more than one dimension; for example, it can be K(d, b = (S b , D b )) = f(d, S b , D b ), for example, using:

Sb和Db可以随着(i,j)而变化。S <sub>b</sub> and D <sub>b</sub> can vary with (i, j).

使用具有多于一个维度的参数/变量/函数通常允许改进滤波,但是用信号通知滤波器参数的成本较高。此外,在编码器处优化较高维度空间中的滤波器参数时引入了更多的复杂性,并且在解码器处计算函数常常更复杂(滤波器参数越多,使用这些函数就意味着操作越多)。在实施例中,b具有单个维度,其可以实现对于许多ALF应用的良好折衷。Using parameters/variables/functions with more than one dimension often allows for improved filtering, but signaling the filter parameters is costly. Furthermore, optimizing filter parameters in a higher-dimensional space at the encoder introduces more complexity, and computing functions at the decoder is often more complex (the more filter parameters, the more operations are required to use these functions). In this embodiment, b has a single dimension, which allows for a good trade-off for many ALF applications.

根据一些实施例,函数K还可以是包括用于不同偏移(i,j)的多于一个不同函数的函数。在一些实施例中,滤波形状/图案中的函数的配置/布置在编码器和解码器这两者处都是预定义的。可选地,从预定义配置集合中选择/选定函数的配置,并且传输/用信号通知用于所选择的配置的索引。在其它实施例中,从滤波形状/图案(除了中心位置之外)中的各个系数索引的预定义函数集合中选择函数,并且传输/用信号通知其索引。在这样的实施例的变型中,各个函数是单变量函数(即K函数不再具有附加参数/变量),因此代替用信号通知b参数,而用信号通知函数索引。这种变型可以被认为是使用多变量公式,例如K(d,b)=Kb(d)公式。例如,b是用于从函数集合中选择单变量函数Kb的整数索引。According to some embodiments, function K can also be a function comprising more than one different function for different offsets (i, j). In some embodiments, the configuration/arrangement of functions in the filter shape/pattern is predefined at both the encoder and decoder. Optionally, a configuration of function is selected from a predefined set of configurations, and the index for the selected configuration is transmitted/signaled. In other embodiments, functions are selected from a predefined set of functions for each coefficient index in the filter shape/pattern (except for the center position), and their indexes are transmitted/signaled. In a variation of such an embodiment, the individual functions are univariate functions (i.e., the K function no longer has additional parameters/variables), so instead of signaling the b parameter, the function index is signaled. This variation can be considered as using a multivariate formula, such as K(d, b) = Kb (d). For example, b is an integer index for selecting the univariate function Kb from the set of functions.

根据一些实施例,对于亮度滤波器和色度滤波器,函数K是不同的。根据一些实施例,对于各个亮度滤波器,函数K是不同的。在这些实施例中的一些实施例中,对于各个滤波器,在片头部中提供所选择的函数的索引。According to some embodiments, the function K is different for the luminance filter and the chrominance filter. According to some embodiments, the function K is different for each luminance filter. In some of these embodiments, for each filter, an index of the selected function is provided in the chip header.

根据本发明的实施例,K被选择以简化计算(不引入太多解码复杂性)。例如,在这样的实施例中,K仅仅是限幅函数:According to embodiments of the invention, K is chosen to simplify computation (without introducing too much decoding complexity). For example, in such embodiments, K is simply a limiting function:

K(d,b)=max(-b,min(b,d))  (11)K(d, b)=max(-b, min(b, d)) (11)

或等效于:Or equivalent to:

K(d,b)=min(b,max(-b,d))  (12)K(d,b)=min(b,max(-b,d)) (12)

与下面描述的一些替代函数相反,对于局部梯度的高值,限幅函数不会消失(换句话说,限幅函数f(x)不会随着x接近零而向零收敛)。但是已经实验地观察到,使用这种简单函数的压缩结果通常与使用更复杂函数的压缩结果一样高效,并且甚至可以比使用更复杂函数更好。实际上,对于局部梯度的高值,限幅函数不会消失,而只是限幅它们,可以允许继续考虑锐度边缘过渡,同时限制存在于该锐度边缘过渡区域周围的高方差的影响。由于伪像通常在锐度过渡周围变得更强,因此这是有意义的。Unlike some of the alternative functions described below, the limiting function does not vanish for high values of local gradients (in other words, the limiting function f(x) does not converge to zero as x approaches zero). However, it has been experimentally observed that compression using this simple function is often as efficient as, and even better than, compression using more complex functions. In fact, the limiting function does not vanish for high values of local gradients, but merely limits them, allowing the sharp edge transitions to be considered while limiting the influence of the high variance present around the region of that sharp edge transition. This makes sense since artifacts typically become stronger around sharp transitions.

使用等式(9)的滤波公式的该限幅函数K的等效函数K′是The equivalent function K′ of the limiting function K using the filtering formula of equation (9) is

K′(n,c,b)=max(c-b,min(c+b,n))  (13)K′(n,c,b)=max(c-b,min(c+b,n)) (13)

或等效于:Or equivalent to:

K′(n,c,b)=min(c+b,max(c-b,n))K′(n,c,b)=min(c+b,max(c-b,n))

限幅函数满足等式(8),只要b大于或等于最大可能样本值(例如,2的图像位深度次幂)即可。The limiting function satisfies equation (8) as long as b is greater than or equal to the maximum possible sample value (e.g., 2 raised to the power of the image bit depth).

在以下描述中,“限幅范围”或“限幅参数”用于指K或K′的b参数/变量。可以理解,这种术语可以被认为是用于指非线性函数参数的通用术语。类似地,“限幅”或“限幅函数”可用于指上述K或K′或者其功能等效函数。In the following description, "limiting range" or "limiting parameter" is used to refer to the b parameter/variable of K or K′. It is understood that this terminology can be considered a general term used to refer to parameters of nonlinear functions. Similarly, "limiting" or "limiting function" can be used to refer to the aforementioned K or K′ or their functional equivalents.

在替代实施例中,K可以是另一非线性函数。在变型中,K是反对称函数,例如一个锯齿周期,对应于:或者与时的等式(10)的特定情况相对应的一些三角形周期;或者它也可以以与双边滤波器类似的方式使用高斯核:例如例如,K可以是某个阈值设置为高于(或低于)零的任何函数,如上述变型的反对称函数那样。In an alternative embodiment, K can be another nonlinear function. In a variant, K is an antisymmetric function, such as a sawtooth period, corresponding to: or some triangular period corresponding to a specific case of equation (10) with respect to time; or it can also use a Gaussian kernel in a manner similar to a bilateral filter: for example, K can be any function with a threshold set above (or below) zero, as in the antisymmetric function of the variant described above.

根据实施例,使用非线性ALF代替线性ALF来减少进行ALF滤波所需的样本行缓冲器的数量(即,减少在(例如解码器处)进行滤波时需要处理/访问/保持在存储器中的输入图像成分的样本的数量)。According to an embodiment, a non-linear ALF is used instead of a linear ALF to reduce the number of sample line buffers required for ALF filtering (i.e., reduce the number of samples of the input image components that need to be processed/accessed/held in memory when filtering is performed (e.g. at the decoder)).

根据变型,作为权衡/折衷,用于亮度滤波器的滤波形状/图案的大小从7×7菱形形状减小到更小的滤波形状/图案。例如,针对亮度滤波器使用5×5菱形形状(例如,与图3-b中的色度滤波器的形状相同,但仍使用转置索引变型)。这仍然可以实现与具有7×7菱形形状亮度滤波器(例如,图4-b中所示的滤波器)的仅线性ALF类似的编码增益,但是要处理/访问/存储的样本数量减少(例如,样本行缓冲器的数量减少),并且还降低了计算复杂性:即,处理ALF滤波器所需的乘法数量针对各个滤波输入样本减少6,同时实现良好的编码增益。Depending on the variant, as a trade-off, the size of the filter shape/pattern used for the luminance filter is reduced from a 7×7 rhombus shape to a smaller filter shape/pattern. For example, a 5×5 rhombus shape is used for the luminance filter (e.g., the same shape as the chroma filter in Figure 3-b, but still using the transposed index variant). This still achieves a coding gain similar to that of a linear ALF with a 7×7 rhombus shape luminance filter (e.g., the filter shown in Figure 4-b), but with a reduction in the number of samples to be processed/accessed/stored (e.g., a reduction in the number of sample line buffers), and also a reduction in computational complexity: that is, the number of multiplications required to process the ALF filter is reduced by 6 for each filtered input sample, while achieving good coding gain.

根据变型,当对样本进行ALF滤波时,基于将被用于线性ALF的所有邻近样本来使用非线性ALF。根据另一变型,当对样本进行ALF滤波时,邻近样本中的仅将与线性ALF一起使用的一些邻近样本与非线性ALF一起使用,并且其余邻近样本与线性ALF一起使用。根据又一变型,当对样本进行ALF滤波时,邻近样本中的仅将与线性ALF一起使用的一些邻近样本与非线性ALF一起使用,并且其余邻近样本也不与线性ALF一起使用。According to one variation, when ALF filtering is applied to a sample, nonlinear ALF is used based on all neighboring samples that will be used with linear ALF. According to another variation, when ALF filtering is applied to a sample, only some of the neighboring samples that will be used with linear ALF are used with nonlinear ALF, and the remaining neighboring samples are used with linear ALF. According to yet another variation, when ALF filtering is applied to a sample, only some of the neighboring samples that will be used with linear ALF are used with nonlinear ALF, and the remaining neighboring samples are not used with linear ALF.

根据变型,通过利用这些滤波形状/图案中的对称性,使用与等式(2)相同的符号来简化线性和/或非线性ALF滤波器实现,等式(4)中的线性函数可以被重新表示为:According to the variant, by utilizing the symmetry in these filter shapes/patterns and simplifying the linear and/or nonlinear ALF filter implementations using the same notation as in equation (2), the linear function in equation (4) can be rewritten as:

对于ALF,其满足条件:For ALF, the following conditions are met:

等式(6)中的线性函数也可以重新表示为:The linear function in equation (6) can also be rewritten as:

并且等式(7)中的非线性函数变为:And the nonlinear function in equation (7) becomes:

其中,ki是与滤波器系数wi相关联的滤波器限幅参数。Where k<sub>i</sub> is the filter limiting parameter associated with the filter coefficient w<sub>i</sub> .

最后,等式(9)中的非线性函数可以重新表示为:Finally, the nonlinear function in equation (9) can be rewritten as:

根据该实施例的变型,K′函数或K函数是限幅函数。According to a variation of this embodiment, the K′ function or the K function is a limiting function.

根据实施例,为了与用于处理等式(17)中的函数K的计算量相比减少处理非线性函数所涉及的计算量,在至少两个邻近的差的和上引入非线性(即,可以使用具有两个或更多个局部梯度的和作为变量的非线性函数):According to an embodiment, in order to reduce the computational cost involved in processing a nonlinear function compared to the computational cost of processing function K in equation (17), nonlinearity is introduced on the sum of the differences of at least two neighboring functions (i.e., a nonlinear function with the sum of two or more local gradients as variables can be used):

等式(19)并不总是等效于等式(17),使用等式(19)的滤波器可能不太高效,但它降低了计算复杂性。根据变型,例如当是K限幅函数时,用信号通知/编码的限幅参数/值的数量相对于等式(17)的参数/值不变。Equation (19) is not always equivalent to equation (17), and the filter using equation (19) may be less efficient, but it reduces computational complexity. Depending on the variant, for example when it is a K-limiting function, the number of limiting parameters/values signaled/encoded remains the same relative to the parameters/values in equation (17).

应当理解,根据另一变型,可以使用基于具有降低的复杂性的等式(18)的类似导出的等式,其中K′函数具有两个或更多个邻近差值(局部梯度)的和作为其变量:It should be understood that, according to another variation, a similar derived equation based on equation (18) with reduced complexity can be used, where the K′ function has the sum of two or more neighboring differences (local gradients) as its variable:

图7提供根据本发明实施例的非线性滤波器的框图,其可以是VTM-3.0中ALF中的线性滤波器的替代(或者是除了ALF中的线性滤波器之外的附加非线性滤波器)。它对应于使用等式(11)的限幅函数、具有整数定点算法的等式(7)的实现。“C”701对应于I(x,y),“S0”702至“Sn”703对应于I(x+i,y+j)(各个(i,j)≠(0,0)),“k0”704至“kn”705对应于k(i,j)(各个(i,j)≠(0,0)),“w0”706至“wn”707对应于w(i,j)(各个(i,j)≠(0,0)),并且708对应于O(x,y)。Figure 7 provides a block diagram of a nonlinear filter according to an embodiment of the present invention, which may be an alternative to the linear filter in the ALF in VTM-3.0 (or an additional nonlinear filter in addition to the linear filter in the ALF). It corresponds to the implementation of equation (7) with an integer fixed-point algorithm using the limiting function of equation (11). “C” 701 corresponds to I(x, y), “S0” 702 to “Sn” 703 correspond to I(x+i, y+j) (each (i, j) ≠ (0, 0)), “k0” 704 to “kn” 705 correspond to k(i, j) (each (i, j) ≠ (0, 0)), “w0” 706 to “wn” 707 correspond to w(i, j) (each (i, j) ≠ (0, 0)), and 708 corresponds to O(x, y).

图5是根据本发明实施例的修改后的语法元素的概述的流程图,其提供了可用于实现上述及其相关实施例/变型的非线性函数(及其参数)的语法元素的示例。在该实施例中,等式(7)(或(9))的各个滤波器的编码滤波器系数与其自身的限幅范围相关联,因此k(i,j)可以具有随偏移(i,j)而变化的不同值。大多数语法元素与VTM-3.0中已经使用的语法元素相同,并参考图2进行说明:图5中的501、502、503、504、505、506、507、508、509、510具有与图2中的201、202、210、204、205、206、207、208、209、210相同的用信号通知方式和语义。新语法元素是各个亮度滤波器的限幅参数511、亮度滤波器的所有滤波器系数(506)和各个亮度滤波器的所有限幅参数(511),这些参数可以例如在片头部中用信号通知。该信号通知之后是用信号通知色度滤波器的所有滤波器系数(507)和色度滤波器的所有限幅参数(512)。Figure 5 is a flowchart outlining the modified syntax elements according to an embodiment of the present invention, providing examples of syntax elements that can be used to implement the nonlinear functions (and their parameters) described above and in their related embodiments/variations. In this embodiment, the coding filter coefficients of each filter in equation (7) (or (9)) are associated with their own limiting range, so k(i,j) can have different values that vary with offset (i,j). Most syntax elements are the same as those already used in VTM-3.0, and are illustrated with reference to Figure 2: 501, 502, 503, 504, 505, 506, 507, 508, 509, and 510 in Figure 5 have the same signaling manner and semantics as 201, 202, 210, 204, 205, 206, 207, 208, 209, and 210 in Figure 2. The new syntax elements are the limiting parameters 511 for each luminance filter, all filter coefficients (506) for each luminance filter, and all limiting parameters (511) for each luminance filter, which can be indicated, for example, by a signal in the title block. This signal is followed by the signal indicating all filter coefficients (507) and all limiting parameters (512) for the chrominance filter.

根据实施例,对于任何滤波器,用信号通知的限幅参数的数量与用信号通知的滤波器系数的数量相同。以与相同位置(x+i,y+j)处的滤波器系数相同的方式获得偏移(i,j)的限幅参数。对于色度,以与图3-a的步骤303中描述的滤波器系数导出处理相同的方式处理它们(但使用色度限幅参数);并且对于亮度,以与图4-a的步骤406中描述的滤波器系数导出处理相同的方式处理它们(但使用亮度滤波器限幅参数)。According to the embodiment, for any filter, the number of limiting parameters signaled is the same as the number of filter coefficients signaled. The limiting parameter offset (i, j) is obtained in the same manner as the filter coefficients at the same position (x+i, y+j). For chroma, they are processed in the same manner as the filter coefficient derivation process described in step 303 of FIG. 3-a (but using chroma limiting parameters); and for luminance, they are processed in the same manner as the filter coefficient derivation process described in step 406 of FIG. 4-a (but using luminance filter limiting parameters).

在替代实施例中,每个滤波器仅有一个限幅参数,该限幅参数用于所有滤波器(i,j)≠(0,0)位置。In an alternative embodiment, each filter has only one limiting parameter, which is used for all filter positions (i, j) ≠ (0, 0).

在替代实施例中,限幅参数的数量低于滤波器系数的数量。在该实施例的变型中,这些限幅参数用于具有偏移(i,j)的滤波器位置的子集(其可以是预定义的或确定的)。对于其它滤波器位置,进行通常的线性滤波(或者换句话说,在那些其它滤波器位置处,K被认为是恒等函数)或者替代地,使用预定义的限幅参数值。In an alternative embodiment, the number of limiting parameters is less than the number of filter coefficients. In a variation of this embodiment, these limiting parameters are used for a subset of filter positions with offsets (i, j), which may be predefined or deterministic. For other filter positions, normal linear filtering is performed (or in other words, K is considered an identity function at those other filter positions) or, alternatively, predefined limiting parameter values are used.

参考图16-a和图16-b描述这种实施例的变型。在这些变型中,限幅函数应用于滤波器位置的子集,即限幅图案/形状/支撑/掩模仅包括滤波形状/图案中的滤波器位置的子集,使得在滤波处理期间仅限幅邻近样本值/位置的子集(例如,非线性函数仅应用于来自该子集的样本值)。由于限幅操作可能是计算上昂贵的,以这种方式减少滤波中涉及的限幅操作的数量可以降低滤波处理的复杂性和计算成本。Variations of this embodiment are described with reference to Figures 16-a and 16-b. In these variations, the limiting function is applied to a subset of the filter locations; that is, the limiting pattern/shape/support/mask includes only a subset of the filter locations within the filter shape/pattern, such that only a subset of neighboring sample values/locations is limited during the filtering process (e.g., the nonlinear function is applied only to sample values from this subset). Since limiting operations can be computationally expensive, reducing the number of limiting operations involved in filtering in this way can reduce the complexity and computational cost of the filtering process.

图16-a提供具有减少数量的被限幅/限幅位置的7×7菱形滤波形状,示出了用于减少当使用7×7滤波形状(例如针对亮度的ALF)进行滤波时所需的限幅操作的数量的被限幅/限幅位置的三种可能布置/配置。通过使用图16-a所示的限幅图案,减少了用于进行滤波的限幅操作的数量,这是因为限幅操作不应用于所有滤波(输入)位置,即仅滤波位置的子集(其可以是预定义的、或用信号通知的或推断的)用于限幅操作(即与非线性函数一起使用)。在图16-a中,限幅的样本位置在限幅图案1601、1602和1603中用“X”标志。限幅图案1601和1602将限幅操作的数量减少三分之二,而限幅图案1603将该数量减少一半。当使用7×7菱形滤波形状时,这些限幅图案1601、1602和1603在滤波处理中的输出精度和涉及的复杂性之间达成良好的折衷。限幅图案1601、1602和1603对于根据基于方位的ALF的非线性ALF(即,为基于局部内容方位和活动级别的分类而构建的滤波器,例如,VTM3.0中的亮度滤波器)工作良好。但是,如果不使用分类,则优选使用图案1602或1603。Figure 16-a provides a 7×7 diamond filter shape with a reduced number of clipping/limiting positions, illustrating three possible arrangements/configurations of clipping/limiting positions for reducing the number of clipping operations required when filtering with a 7×7 filter shape (e.g., for luminance ALF). By using the clipping pattern shown in Figure 16-a, the number of clipping operations used for filtering is reduced because clipping operations are not applied to all filter (input) positions; that is, only a subset of filter positions (which may be predefined, signaled, or inferred) are used for clipping operations (i.e., used with a nonlinear function). In Figure 16-a, the sample positions for clipping are marked with an "X" in clipping patterns 1601, 1602, and 1603. Clipping patterns 1601 and 1602 reduce the number of clipping operations by two-thirds, while clipping pattern 1603 reduces that number by half. When using a 7×7 diamond filter shape, these limiting patterns 1601, 1602, and 1603 strike a good trade-off between output accuracy and complexity in the filtering process. Limiting patterns 1601, 1602, and 1603 work well for nonlinear ALFs based on orientation-based ALFs (i.e., filters constructed for classification based on local content orientation and activity level, such as the luma filter in VTM 3.0). However, if classification is not used, patterns 1602 or 1603 are preferred.

应当理解,根据其它变型,可以使用或多或少的限幅位置。例如,可以代替限幅图案1601(即,除了中心位置之外,从上到下和从左到右的交叉)来限幅整列和整行(除了中心位置之外),或者可以代替限幅图案1602来限幅外边缘上的位置(即,较大的菱形/平行四边形限幅图案)。在限幅位置的其它变型中,限幅图案/形状/支撑/掩模形成对角线交叉“X”(除了中心位置之外)、垂直段“X”(除了中心位置之外)、水平段“-”(除了中心位置之外)、从左上到右下的对角线段“\”(除了中心位置之外)、从右上到左下的对角线段“/”(除了中心位置之外),或上述限幅图案/形状/支撑/掩模的任意组合。It should be understood that, depending on other variations, more or less limiting positions can be used. For example, a column and a row (excluding the center position) can be limited instead of limiting pattern 1601 (i.e., intersections from top to bottom and from left to right, excluding the center position), or a position on the outer edge (i.e., a larger rhombus/parallelogram limiting pattern) can be limited instead of limiting pattern 1602. In other variations of the limiting position, the limiting pattern/shape/support/mask forms a diagonal intersection "X" (excluding the center position), a vertical segment "X" (excluding the center position), a horizontal segment "-" (excluding the center position), a diagonal segment "\" from the upper left to the lower right (excluding the center position), a diagonal segment "/" from the upper right to the lower left (excluding the center position), or any combination of the above limiting patterns/shapes/supports/masks.

图16-b提供具有减少数量的被限幅/限幅位置的5×5菱形滤波形状,示出了用于减少使用5×5滤波形状进行滤波时所需的限幅操作的数量的被限幅/限幅位置的两种可能布置/配置。如在图16-a中,通过使用图16-b中所示的限幅图案,即限幅图案1604和1605,当使用5×5菱形滤波形状进行滤波时,可以减少在该滤波处理中涉及的限幅操作的数量。限幅图案1604和1605对于根据基于方位的ALF(即,针对基于局部内容方案和活动级别的分类而构建的滤波器,例如,VTM3.0中的亮度滤波器)的非线性ALF工作良好。但是,如果不使用分类,则优选使用模式1605。Figure 16-b provides a 5×5 diamond filter shape with a reduced number of clipping/limiting positions, illustrating two possible arrangements/configurations of clipping/limiting positions for reducing the number of clipping operations required when filtering using the 5×5 filter shape. As in Figure 16-a, by using the clipping patterns shown in Figure 16-b, namely clipping patterns 1604 and 1605, the number of clipping operations involved in the filtering process can be reduced when filtering using the 5×5 diamond filter shape. Clipping patterns 1604 and 1605 work well for nonlinear ALF based on orientation (i.e., for filters constructed based on local content schemes and activity levels, such as the luminance filter in VTM 3.0). However, if classification is not used, pattern 1605 is preferred.

限幅图案1602和1605对于不使用基于方位的分类的滤波器更好(例如,与VTM-3.0中的取决于水平、垂直或对角线方位的分类的亮度滤波器相比,它们对于色度滤波器更好),这是因为水平和垂直方向邻近在统计上比对角线邻近更可靠(因为它们更大的欧几里德距离)。因此,与在更可靠的水平和垂直方向上邻近样本的滤波位置上相比,仅在较不可靠的对角邻近样本的滤波位置上使用限幅操作是更有利的。Clamping patterns 1602 and 1605 are better for filters that do not use orientation-based classification (e.g., they are better for chroma filters than luminance filters in VTM-3.0 that depend on horizontal, vertical, or diagonal orientation) because horizontal and vertical proximity is statistically more reliable than diagonal proximity (because of their larger Euclidean distance). Therefore, it is more advantageous to use clamping only at the filtering locations of less reliable diagonal neighbor samples than at filtering locations of samples with more reliable horizontal and vertical proximity.

利用基于方位的滤波器,(即针对基于方位的分类获得的滤波器)限幅操作通常应用于垂直于滤波方位的滤波位置处的样本。例如,与使用针对具有对角线方位的类的滤波器相比,使用针对具有水平或垂直方位的类的滤波器,1601中的限幅图案将进行得更好。对于四个类的方位,限幅图案1602将大致同样地进行,但是对于水平和垂直方位,限幅图案1602将比图案1601效率低。因此,对于使用7×7滤波图案的亮度滤波器,1601和1602中的限幅图案的平均性能几乎相等,对于使用5×5滤波图案的亮度滤波器,1604和1605中的限幅图案的平均性能几乎相等。Using orientation-based filters (i.e., filters obtained from orientation-based classification), the clipping operation is typically applied to samples at filter locations perpendicular to the filter orientation. For example, the clipping pattern in 1601 will perform better than using a filter for classes with horizontal or vertical orientations compared to using a filter for classes with diagonal orientations. For the orientations of all four classes, clipping pattern 1602 will perform roughly the same, but for horizontal and vertical orientations, clipping pattern 1602 will be less efficient than pattern 1601. Therefore, for a luminance filter using a 7×7 filter pattern, the average performance of the clipping patterns in 1601 and 1602 is almost equal, and for a luminance filter using a 5×5 filter pattern, the average performance of the clipping patterns in 1604 and 1605 is almost equal.

根据变型,为了改进基于方位的滤波器,基于滤波方位从预定义模式中选择限幅图案。例如,限幅图案1601用于水平或垂直滤波,而限幅图案1602用于对角线滤波。在又一变型中,针对垂直滤波选择的限幅图案不同于针对水平滤波选择的限幅图案(例如,每一个是另一个的90°旋转版本),并且两个对角线滤波方位的限幅图案也不同(例如,每一个是另一个的90°旋转版本)。在又一变型中,根据各个4×4块样本值的转置索引(tranposeIdx)来选择限幅图案。According to a variant, to improve the orientation-based filter, a limiting pattern is selected from predefined patterns based on the filtering orientation. For example, limiting pattern 1601 is used for horizontal or vertical filtering, while limiting pattern 1602 is used for diagonal filtering. In yet another variant, the limiting pattern selected for vertical filtering differs from the limiting pattern selected for horizontal filtering (e.g., each is a 90° rotated version of the other), and the limiting patterns for the two diagonal filtering orientations are also different (e.g., each is a 90° rotated version of the other). In yet another variant, the limiting pattern is selected based on the transpose index (tranposeIdx) of each 4×4 block of sample values.

根据变型,针对各个滤波器存在一个预定的限幅图案。根据另一变型,存在可用于使用的多个(例如,预定数量)限幅图案,并且对于各个滤波器索引,例如在APS或区块组头部中利用ALF参数对所选限幅图案的(限幅图案)索引进行编码/用信号发送。根据又一变型,利用ALF参数来用信号通知限幅图案。例如,可以通过对标志序列进行编码/解码来进行用信号通知限幅图案,每个滤波器(模式)位置索引(例如,等效于编码/解码的滤波器系数索引)一个标志,每个标志指示是否对相应索引应用限幅,或者实际上不应用限幅。可替代地,可以通过对被限幅的位置索引本身进行编码/解码,或者通过对不被限幅的位置的滤波(图案)位置索引进行编码解码(优选地,用信号通知需要较少位数的任一个)来进行用信号通知限幅图案。According to one variation, a predetermined clipping pattern exists for each filter. According to another variation, multiple (e.g., a predetermined number) clipping patterns are available for use, and for each filter index, the (clipping pattern) index of the selected clipping pattern is encoded/signaled using ALF parameters, for example, in the APS or block group header. According to yet another variation, the clipping pattern is signaled using ALF parameters. For example, the clipping pattern can be signaled by encoding/decoding a sequence of flags, with one flag for each filter (pattern) position index (e.g., equivalent to the encoded/decoded filter coefficient index), each flag indicating whether clipping is applied to the corresponding index or not. Alternatively, the clipping pattern can be signaled by encoding/decoding the clipped position index itself, or by encoding/decoding the filter (pattern) position index of the un-clipped position (preferably, signaling requires fewer bits).

根据变型,当使用限幅图案(预定或非预定)时,仅针对应用限幅操作的滤波(图案)位置用信号通知限幅参数。Depending on the variant, when using a limiting pattern (predetermined or unpredetermined), the limiting parameters are signaled only for the filter (pattern) position where the limiting operation is applied.

在一些变型中,为了不中断单指令、多数据(SIMD)并行实现,对所有滤波位置应用限幅,但是对于没有提供限幅参数的位置的限幅参数被认为具有线性输出(例如,在变型中,标识函数的输出)。In some variants, to avoid interrupting the Single Instruction, Multiple Data (SIMD) parallel implementation, clipping is applied to all filtering positions, but clipping parameters at positions where no clipping parameter is provided are considered to have linear outputs (e.g., the output of the flag function in the variant).

在替代实施例中,限幅参数的数量低于滤波器系数的数量,这是因为共用一个或多个限幅参数。例如,在图3-b和图4-b的滤波形状中,一些系数索引可以共用相同的限幅参数。根据变型,在包含多个元素的表中指示限幅参数的索引,所述数量等于形状大小的一半(因为对称)减去1(因为对于中心系数位置没有限幅参数)。该表允许将限幅参数索引与各个滤波器系数关联。根据变型,该表由编解码器固定/预设。根据变型,定义多个固定/预设表,并且例如在片头部中用信号通知用于从该表识别限幅参数的索引。在替代变型中,例如在片头部中用信号通知这样的表的内容,并且内容由所有亮度滤波器共用。In an alternative embodiment, the number of limiting parameters is less than the number of filter coefficients because one or more limiting parameters are shared. For example, in the filter shapes of Figures 3-b and 4-b, some coefficient indices may share the same limiting parameter. According to a variant, the indices of the limiting parameters are indicated in a table containing multiple elements, the number being equal to half the shape size (due to symmetry) minus 1 (because there is no limiting parameter for the center coefficient position). This table allows the limiting parameter indices to be associated with individual filter coefficients. According to a variant, this table is fixed/preset by the codec. According to a variant, multiple fixed/preset tables are defined, and the indices used to identify the limiting parameters from these tables are signaled, for example, in the title block. In an alternative variant, the contents of such a table are signaled, for example, in the title block, and the contents are shared by all brightness filters.

在实施例中,限幅参数可以取的值的数量被限制为小(相对于小的质量益处,降低编码器复杂性和编码成本)。用整数值索引对被授权用于限幅参数的值优选地以递增或递减的顺序进行编索引。然后,这些索引可以映射到限幅参数表的各个元素。然后,代替用信号通知限幅参数值,用信号通知表中相关限幅参数值的索引(p)。在p是表中的滤波器索引的实施例中,不需要使用中间表来减少p的可能值的数量。可以直接减少函数表中可用的函数的数量,从而减小其大小。In this embodiment, the number of possible values for the limiting parameter is limited to a small number (relative to the quality benefits, reducing encoder complexity and encoding costs). The values authorized for the limiting parameter are preferably indexed in ascending or descending order using integer value indexes. These indexes can then be mapped to the individual elements of the limiting parameter table. Instead of signaling the limiting parameter value, the index (p) of the relevant limiting parameter value in the table is signaled. In embodiments where p is the filter index in the table, an intermediate table is not needed to reduce the number of possible values for p. The number of functions available in the function table can be reduced directly, thereby reducing its size.

在一个实施例中,限幅参数值被限制为二的幂:2p。然后p被编码。p的最大值是输入图像的位深度(不需要更高的值,因为它们将提供相同的结果)。在替代实施例中,代替p,被编码的是Bd-p。在另一实施例中,p的范围被限制为介于pmin和pmax之间。例如,pmin=3和pmax=Bd-1。然后可以用信号通知p-pmin或pmax-p。In one embodiment, the clipping parameter value is limited to a power of two: 2^ p . p is then encoded. The maximum value of p is the bit depth of the input image (higher values are not needed as they will provide the same result). In an alternative embodiment, instead of p, B ^d - p is encoded. In another embodiment, the range of p is limited to between p_min and p_max . For example, p_min = 3 and p_max = B ^d - 1. p_min or p_max - p can then be signaled.

在实施例中,色度滤波器的授权/允许/可用限幅参数值与亮度滤波器的不相同。In this embodiment, the authorized/permitted/available limiting parameter value of the chroma filter is different from that of the luminance filter.

根据实施例,在片头部中提供用于片中的限幅参数的表中的最小索引pmin和表中的最大索引pmax,使得在用信号通知时可以限制/制约可能的限幅参数值的数量。根据实施例,pmin和pmax由亮度和色度滤波器共用。在替代实施例中,仅针对亮度提供pmin和pmax,色度索引不受限制。在另一替代实施例中,在用于亮度和色度的片头部中提供pmin和pmaxAccording to an embodiment, a minimum index p<sub>min</sub> and a maximum index p <sub>max</sub> from a table of limiting parameters used in the chip are provided in the chip header, allowing the number of possible limiting parameter values to be limited/constrained when signaled. According to an embodiment, p<sub> min </sub> and p <sub>max </sub> are shared by the luma and chroma filters. In an alternative embodiment, p <sub>min</sub> and p <sub>max</sub> are provided only for luma, with no limitation on the chroma index. In another alternative embodiment, p <sub>min</sub> and p <sub>max</sub> are provided in the chip header for both luma and chroma.

根据替代实施例,对于亮度和色度成分这两者,在片头部中用信号通知经授权的限幅参数值的一个表,或者替代地,两个表:一个用于亮度,并且一个用于色度。According to an alternative embodiment, for both luminance and chrominance components, a table of authorized limiting parameter values is signaled in the chip header, or alternatively, two tables: one for luminance and one for chrominance.

在本发明的实施例中,限幅参数511和512不在片头部中用信号通知。代替地,在编码器/解码器处使用量化参数(QP)来确定限幅参数,该量化参数用于用信号通知滤波样本,并且基于滤波器的类索引。In embodiments of the invention, limiting parameters 511 and 512 are not signaled in the chip header. Instead, quantization parameters (QP) are used at the encoder/decoder to determine the limiting parameters, which are used to signal the filtered samples and are based on the filter class index.

在替代实施例中,在片头部中用信号通知限幅参数511和512。但在滤波处理中,不直接使用它们。代替地,根据用于用信号通知滤波样本的量化参数(QP)来缩放限幅参数。In an alternative embodiment, the limiting parameters 511 and 512 are signaled in the chip header. However, they are not used directly in the filtering process. Instead, the limiting parameters are scaled according to the quantization parameters (QP) used to signal the filtered samples.

在实施例中,不针对各个滤波器提供亮度滤波器的限幅参数。只有两个限幅参数表由所有的亮度滤波器共用,并在片头部中用信号通知。一个表用于水平/垂直类,而另一个表用于对角线类。根据类方位,使用图4-b的系数布置,并且相应地将限幅参数缩放(即乘以)从类的活动级别确定的固定值,从这两个表导出各个类的限幅参数。在对4x4块进行分类时,缩放会考虑活动级别。例如,对于活动级别高的区域(例如,近边缘),当与活动级别低的区域(例如,在同质区域)相比时,可以使用更高的限幅值。In this embodiment, limiting parameters for the luminance filters are not provided for each individual filter. Only two limiting parameter tables are shared by all luminance filters and are signaled in the chip header. One table is for horizontal/vertical classes, and the other is for diagonal classes. Based on the class orientation, the coefficients are arranged using the method of Figure 4-b, and the limiting parameters are scaled (i.e., multiplied) accordingly by a fixed value determined from the class's activity level, deriving the limiting parameters for each class from these two tables. When classifying 4x4 blocks, the scaling takes the activity level into account. For example, for regions with high activity levels (e.g., near the edge), a higher limiting value can be used compared to regions with low activity levels (e.g., in homogeneous regions).

在实施例中,片头部中的一个位用信号通知对于各个滤波器的各个滤波器限幅索引启用/禁用限幅。在针对每个限幅参数仅有一个允许的限幅值的实施例中,如果位指示限幅是有效的,则使用该限幅值(即对于该限幅参数值没有用信号通知任何事物)。可替代地,当允许多于一个限幅值时,如果一个限幅索引的位指示针对该滤波器限幅索引禁用限幅,则不用信号通知限幅值,而在其它情况下用信号通知限幅值。In an embodiment, a bit in the chip header signals whether limiting is enabled or disabled for each filter limiting index of each filter. In an embodiment where only one allowed limiting value is allowed for each limiting parameter, if the bit indicates that limiting is valid, then that limiting value is used (i.e., nothing is signaled for that limiting parameter value). Alternatively, when more than one limiting value is allowed, if a bit in a limiting index indicates that limiting is disabled for that filter limiting index, then the limiting value is not signaled, but otherwise it is signaled.

这里,滤波器限幅索引对应于与滤波形状中的滤波器系数索引相关联的限幅参数的索引。Here, the filter limiting index corresponds to the index of the limiting parameter associated with the filter coefficient index in the filter shape.

在实施例中,允许的限幅值取决于片类型(例如可以是帧内、B或P)。In this embodiment, the allowed clipping value depends on the slice type (e.g., it could be intra, B, or P).

在实施例的变型中,允许的限幅值为:针对B或P片中的亮度的{6,32,181,1024};针对B或P片中的色度的{4,25,161,1024};针对帧内片中的亮度的{10,102,1024};或/和针对帧内片中的亮度的{4,24,1024}。因此,任何限幅参数都可以取属于这些集合之一的值(根据片类型和滤波成分)。并且,针对各个滤波,针对各个限幅参数,在片头部中编码集合中该值的索引。In a variation of the embodiment, the allowed clipping values are: {6, 32, 181, 1024} for luminance in B or P slices; {4, 25, 161, 1024} for chrominance in B or P slices; {10, 102, 1024} for luminance in intra-slice slices; and/or {4, 24, 1024} for luminance in intra-slice slices. Therefore, any clipping parameter can take a value belonging to one of these sets (depending on the slice type and filter component). Furthermore, for each filter, for each clipping parameter, the index of that value in the set is encoded in the slice header.

在变型中,所允许的限幅值的表定义如下:In the variant, the allowed limit values are defined in the table as follows:

其中N是表中的限幅值的数量(即表的大小),M是最大限幅值(它是表中的最新条目,例如,M=2D或M=2D-1,其中D是定义表的成分的样本位深度),并且其中“舍入”是舍入运算符(例如,向最接近的整数)。Where N is the number of limit values in the table (i.e., the size of the table), M is the maximum limit value (which is the latest entry in the table, e.g., M = 2D or M = 2D -1, where D is the sample bit depth that defines the components of the table), and "round" is the rounding operator (e.g., round to the nearest integer).

在变型中,所允许的限幅值的表定义如下:In the variant, the allowed limit values are defined in the table as follows:

其中N是表中的限幅值的数量(即表的大小),M是最大限幅值(它是表中的最新条目,例如,M=2D或M=2D-1,其中D是样本位深度),A是最小限幅值(它是表中的第一条目),并且其中“舍入”是舍入运算符(例如,向最接近的整数)。Where N is the number of limit values in the table (i.e., the size of the table), M is the maximum limit value (which is the latest entry in the table, e.g., M = 2D or M = 2D -1, where D is the sample bit depth), A is the minimum limit value (which is the first entry in the table), and "round" is the rounding operator (e.g., round to the nearest integer).

在实施例中,对于各个滤波器限幅索引,所允许的限幅值不相同。In the embodiments, the allowed limiting values are different for each filter limiting index.

在使用关于差值的限幅函数的实施例的变型中,即,将等式(11)或等式(12)的函数K应用于邻近样本值和中心值之间的差,定义最大允许限幅值,使得限幅输出处的位数减少。这允许限制根据这些变型进行滤波的硬件实现所需处理的位数。因此这允许例如减少芯片中逻辑门/晶体管的数量。对减少乘法运算符输入端处的位数特别感兴趣,这是因为乘法需要许多逻辑门。例如,将最大允许限幅值设置为2的样本位深度减1次幂,再减去1;(即,最大限幅等于2^(位深度-1)-1)允许在限幅的输出端因而在乘法运算符的输入端将最大位数减少1。并且使用样本位深度减去2(即最大限幅等于2^(位深度-2)-1)允许将最大位数减少2。In a variation of the embodiment using a limiting function for the difference, i.e., applying the function K of equation (11) or equation (12) to the difference between neighboring sample values and the center value, a maximum allowable limiting value is defined such that the number of bits at the limiting output is reduced. This allows limiting the number of bits that the hardware implementation of filtering according to these variations needs to process. Thus, this allows, for example, a reduction in the number of logic gates/transistors in the chip. Reducing the number of bits at the input of the multiplication operator is of particular interest because multiplication requires many logic gates. For example, setting the maximum allowable limiting value to 2 raised to the power of 1 and then subtracting 1; (i.e., the maximum limiting equals 2^(bit depth - 1) - 1) allows the maximum number of bits to be reduced by 1 at the limiting output and thus at the input of the multiplication operator. And using the sample bit depth minus 2 (i.e., the maximum limiting equals 2^(bit depth - 2) - 1) allows the maximum number of bits to be reduced by 2.

在使用APS的实施例中,在限幅值导出期间可能无法在帧内片和帧间片(或帧内和帧间图片/图像部分/区块组)之间做区分,这是因为APS由帧内和帧间片/图片/区块组/图像部分共用。然后,允许限幅值的预定义表不能再取决于片/图像部分/区块组类型。因此,所有片/图片/区块组/图像部分类型共用一个默认限幅值表。在变型中,然后由编码器决定(然后用信号通知给解码器)限幅值是否被限制为来自默认限幅值表的限幅值的子集(例如针对复杂性降低考虑)。In embodiments using APS, it may be impossible to distinguish between intra-frame and inter-frame slices (or intra-frame and inter-frame pictures/image portions/block groups) during clipping value derivation because APS is shared by both intra-frame and inter-frame slices/pictures/block groups/image portions. Therefore, the predefined table of allowed clipping values can no longer depend on the slice/image portion/block group type. Thus, all slice/picture/block group/image portion types share a default clipping value table. In a variant, the encoder then determines (and signals this to the decoder) whether the clipping value is limited to a subset of the clipping values from the default clipping value table (e.g., for complexity reduction considerations).

在变型中,在APS中以ALF参数用信号通知可用限幅值的限幅值表。因此,编码器(和解码器)可以使用任何限幅值,并以其自身的限幅值表用信号通知所使用的限幅值。In the variant, the APS signals the available limiting values using the ALF parameter, which serves as the limiting value table. Therefore, the encoder (and decoder) can use any limiting value and signals the used limiting value using its own limiting value table.

在变型中,存在多于一个默认限幅值表,例如,一个用于帧间片,并且另一个用于帧内片。然后在APS中以ALF参数提供用于识别所使用的表的信息,例如所使用的表的索引。在变型中,对于亮度和对于色度,默认限幅值表不同。In this variant, there is more than one default limiting value table; for example, one for inter-frame frames and another for intra-frame frames. The APS then provides information in the ALF parameter to identify the table used, such as the index of the table. In this variant, the default limiting value tables differ for luminance and chrominance.

在实施例中,滤波器的输出值也根据输入样本值和附加限幅参数(其可以被添加到限幅参数表)来限幅。In this embodiment, the filter's output value is also limited based on the input sample value and an additional limiting parameter (which can be added to a limiting parameter table).

根据实施例,除了ALF有效标志之外,NLALF(非线性ALF)有效标志被置于序列级别(例如SPS中),或者替代地,置于帧级别(例如图片头部中),以指示非线性ALF有效/使用/启用。如果该标志有效(即指示非线性ALF有效),则ALF的语法元素包括用于非线性滤波器(例如图5中的滤波器)的滤波器参数。如果标志无效(即不指示非线性ALF有效),则ALF的语法元素仅包含线性滤波器(例如图2中的滤波器)的滤波器参数。According to an embodiment, in addition to the ALF validity flag, the NLALF (Nonlinear ALF) validity flag is placed at the sequence level (e.g., in the SPS), or alternatively, at the frame level (e.g., in the image header) to indicate that the nonlinear ALF is valid/used/enabled. If the flag is valid (i.e., indicating that the nonlinear ALF is valid), the ALF syntax elements include filter parameters for the nonlinear filter (e.g., the filter in Figure 5). If the flag is invalid (i.e., not indicating that the nonlinear ALF is valid), the ALF syntax elements only contain filter parameters for the linear filter (e.g., the filter in Figure 2).

根据实施例,如果在片头部中ALF标志是有效的,则NLALF有效标志被置于片头部中。如果该NLALF标志是有效的,则在片头部中存在针对各个亮度滤波器语法元素511的限幅参数和针对色度滤波器512的限幅参数。如果该NLALF标志无效,则在片头部中不存在语法元素511和512,并且ALF使用通常的线性滤波。According to an embodiment, if the ALF flag is valid in the chip header, then an NLALF valid flag is placed in the chip header. If the NLALF flag is valid, then the chip header contains limiting parameters for each luminance filter syntax element 511 and limiting parameters for the chrominance filter 512. If the NLALF flag is invalid, then syntax elements 511 and 512 are not present in the chip header, and the ALF uses normal linear filtering.

根据替代实施例,针对各个成分类型亮度和色度提供单独的NLALF有效标志,并且这些标志中的任一个或两个用于指示是否对特定成分的样本使用非线性ALF(例如,在与NLALF有效标志相同的位置(诸如在序列级别或在片头部中等)提供它们)。在变型中,对亮度使用非线性ALF,并且对色度使用线性ALF。在替代变型中,对色度使用非线性ALF,并且对亮度使用线性ALF。According to an alternative embodiment, separate NLALF validity flags are provided for luminance and chromaticity for each component type, and any one or two of these flags are used to indicate whether a nonlinear ALF is used for a sample of a particular component (e.g., they are provided in the same location as the NLALF validity flags, such as at the sequence level or in the slice header, etc.). In a variant, a nonlinear ALF is used for luminance and a linear ALF is used for chromaticity. In an alternative variant, a nonlinear ALF is used for chromaticity and a linear ALF is used for luminance.

在变型中,在片头部中提供NLALF亮度有效标志和NLALF色度有效标志。NLALF亮度有效标志指示是否对亮度成分使用非线性自适应环路滤波器,因此指示是否针对各个亮度滤波器用信号通知非线性ALF的限幅参数。NLALF色度有效标志指示是否对色度成分使用非线性自适应环路滤波器,因此指示是否针对色度滤波器用信号通知非线性ALF的限幅参数。In the variant, an NLALF luminance valid flag and an NLALF chrominance valid flag are provided in the header. The NLALF luminance valid flag indicates whether a nonlinear adaptive loop filter is used for the luminance component, and therefore indicates whether the limiting parameters of the nonlinear ALF are signaled for each luminance filter. The NLALF chrominance valid flag indicates whether a nonlinear adaptive loop filter is used for the chrominance component, and therefore indicates whether the limiting parameters of the nonlinear ALF are signaled for the chrominance filter.

在变型中,不用信号通知NLALF色度有效标志,但是如果NLALF亮度有效标志等于零,则推断为等于零,因此不能仅对色度使用非线性ALF。In the variant, no signal is used to notify the NLALF chromaticity validity flag, but if the NLALF luminance validity flag is equal to zero, it is inferred to be equal to zero. Therefore, nonlinear ALF cannot be used only for chromaticity.

在变型中,总是对亮度使用非线性ALF(默认-因此NLALF亮度有效标志可以不使用或假定为相应的默认值),并且NLALF色度有效标志用于指示对色度使用非线性ALF还是线性ALF。在另一变型中,总是对亮度使用线性ALF(默认-因此NLALF亮度有效标志可以不使用或假定为相应的默认值),并且NLALF色度有效标志用于指示对色度使用非线性ALF还是线性ALF。在变型中,NLALF亮度有效标志用于指示对亮度使用非线性ALF还是线性ALF,并且对色度始终使用非线性ALF(默认-因此NLALF亮度有效标志可以不使用或假定为相应的默认值)。在变型中,NLALF亮度有效标志用于指示对亮度使用非线性ALF还是线性ALF,并且对色度始终使用线性ALF(默认-因此NLALF亮度有效标志可以不使用或假定为相应的默认值)。In one variant, non-linear ALF is always used for luminance (default - therefore the NLALF luminance validity flag can be omitted or assumed to be the corresponding default value), and the NLALF chrominance validity flag is used to indicate whether non-linear or linear ALF is used for chrominance. In another variant, linear ALF is always used for luminance (default - therefore the NLALF luminance validity flag can be omitted or assumed to be the corresponding default value), and the NLALF chrominance validity flag is used to indicate whether non-linear or linear ALF is used for chrominance. In another variant, the NLALF luminance validity flag is used to indicate whether non-linear or linear ALF is used for luminance, and non-linear ALF is always used for chrominance (default - therefore the NLALF luminance validity flag can be omitted or assumed to be the corresponding default value). In another variant, the NLALF luminance validity flag is used to indicate whether non-linear or linear ALF is used for luminance, and linear ALF is always used for chrominance (default - therefore the NLALF luminance validity flag can be omitted or assumed to be the corresponding default value).

在一个实施例中,仅当NLALF标志在SPS中有效时,将NLALF有效标志(或NLALF亮度有效标志或NLALF色度有效标志)置于片头部中。在不存在NLALF有效标志(或NLALF亮度有效标志或NLALF色度有效标志)的情况下,则默认将其视为无效。In one embodiment, the NLALF valid flag (or NLALF luma valid flag or NLALF chroma valid flag) is placed in the chip header only if the NLALF flag is valid in SPS. If the NLALF valid flag (or NLALF luma valid flag or NLALF chroma valid flag) is not present, it is considered invalid by default.

在一个实施例中,在SPS和片头部中,NLALF标志代替ALF标志。经典(仅线性)ALF不能再使用,除了在限幅函数允许针对所允许的限幅参数值的线性输出的实施例中之外。In one embodiment, the NLALF flag replaces the ALF flag in the SPS and the title block. The classic (linear only) ALF can no longer be used, except in embodiments where the clipping function allows linear output for allowed clipping parameter values.

根据实施例,以与针对滤波器系数类似的方式进行用信号通知限幅参数。首先用信号通知限幅参数的(exp-)Golomb编码参数:使用VLC码来用信号通知(exp-)Golomb码的最小指数,然后对于各个(exp-)Golomb索引(例如针对亮度滤波器的3个索引和针对色度的2个索引),使用标志来用信号通知是否针对当前索引和下一索引必须增加(exp-)Golomb指数(从最小指数开始)。According to the embodiment, the limiting parameters are signaled in a manner similar to that used for filter coefficients. First, the (exp-)Golomb coding parameters of the limiting parameters are signaled: the minimum exponent of the (exp-)Golomb code is signaled using VLC code, and then for each (exp-)Golomb index (e.g., 3 indices for the luminance filter and 2 indices for the chrominance filter), a flag is used to signal whether the (exp-)Golomb exponent must be increased (starting from the minimum exponent) for the current and next indices.

然后,使用(针对无符号整数)(exp-)Golomb码,针对各个(非禁用)滤波器用信号通知限幅参数,其中采用(exp-)Golomb索引的(exp-)Golomb指数与来自存储(exp-)Golomb参数的表的系数索引(在固定表中,例如与针对滤波器系数相同)相关联。Then, using (for unsigned integers) (exp-)Golomb codes, the limiting parameters are signaled for each (non-disabled) filter, where the (exp-)Golomb exponent with (exp-)Golomb index is associated with the coefficient index from the table storing (exp-)Golomb parameters (in a fixed table, for example, the same as for the filter coefficients).

根据替代实施例,对于各个编码滤波器,例如在片头部中用信号通知(exp-)Golomb编码参数值,并且使用所提供的针对无符号整数(exp-)Golomb编码的(exp-)Golomb编码参数值对各个限幅参数值进行编码。According to an alternative embodiment, for each coding filter, for example, the (exp-)Golomb coding parameter value is signaled in the chip header, and each limiting parameter value is encoded using the provided (exp-)Golomb coding parameter value for unsigned integer (exp-)Golomb coding.

根据实施例,将(exp-)Golomb编码参数值作为可用(exp-)Golomb编码参数值的表中的索引来用信号通知。According to an embodiment, the (exp-)Golomb encoded parameter value is used as an index in a table of available (exp-)Golomb encoded parameter values to notify via signaling.

根据实施例,例如,在片头部中用信号通知标志,该标志指示是否使用增量模式用信号通知针对亮度滤波器的限幅参数。当增量模式有效时,第一滤波器限幅参数如前所述被编码,但是各个随后滤波器限幅参数被编码为随后滤波器限幅参数和先前编码的滤波器限幅参数之间的差。在这种情况下,使用带符号整数(exp-)Golomb编码对差进行编码。According to an embodiment, for example, a signal notification flag is used in the chip header to indicate whether incremental mode is used to signal the limiting parameters for the luminance filter. When incremental mode is active, the first filter limiting parameter is encoded as described above, but each subsequent filter limiting parameter is encoded as the difference between the subsequent filter limiting parameter and the previously encoded filter limiting parameter. In this case, the difference is encoded using signed integer (exp-) Golomb coding.

根据实施例,例如,在片头部中用信号通知标志,该标志指示滤波器的限幅参数是否可以使用增量模式。根据实施例,当增量模式有效时,针对各个滤波器用信号通知标志,该标志指示滤波器的限幅参数是否使用增量模式。根据实施例,当增量模式有效以对给定滤波器的限幅参数进行编码时,限幅参数被逐一编码,第一个限幅参数使用无符号(exp-)Golomb编码,并且随后的限幅参数使用限幅参数与先前编码的限幅参数的值之间的差的带符号(exp-)Golomb编码。According to an embodiment, for example, a signal notification flag is used in the chip header to indicate whether the limiting parameters of the filter can use incremental mode. According to an embodiment, when incremental mode is active, a signal notification flag is used for each filter to indicate whether the limiting parameters of the filter use incremental mode. According to an embodiment, when incremental mode is active to encode the limiting parameters of a given filter, the limiting parameters are encoded one by one, with the first limiting parameter using unsigned (exp-) Golomb encoding, and subsequent limiting parameters using signed (exp-) Golomb encoding of the difference between the limiting parameter and the value of the previously encoded limiting parameter.

根据替代实施例,限幅参数可以取的值的数量被限制为两个不同的值。然后使用单个位来用信号通知必须使用哪个限幅参数值(不需要提供(exp-)Golomb参数)。According to an alternative embodiment, the number of values that the limiting parameter can take is limited to two distinct values. A single bit is then used to signal which limiting parameter value must be used (the (exp-)Golomb parameter does not need to be provided).

根据实施例,进行限幅参数的条件信号通知,使得不必要数据(例如,在滤波器系数为零或等于在解码器侧的滤波器的已知值的情况下)的信号通知被最小化。在变型中,例如在片头部中,在用信号通知限幅参数之前,用信号通知滤波器系数,并且对于滤波器的等于零的每个第i个滤波器系数,不用信号通知其对应的第i个限幅参数。这是因为第i个限幅对于滤波器不是有用的,因为其结果将乘以零系数,使得第i个限幅对滤波输出没有影响。在一个变型中,限幅被设置为默认值(例如,根据样本位深度的最大可能值)。在另一变型中,滤波处理不对然后期望乘以零系数的输入样本应用限幅。According to an embodiment, conditional signaling of the clipping parameter is performed to minimize signaling of unnecessary data (e.g., when the filter coefficients are zero or equal to a known value of the filter on the decoder side). In a variant, such as in the chip header, the filter coefficients are signaled before the clipping parameter is signaled, and for each i-th filter coefficient that is equal to zero, its corresponding i-th clipping parameter is not signaled. This is because the i-th clipping is not useful to the filter, as the result will be multiplied by a zero coefficient, making the i-th clipping have no effect on the filtered output. In one variant, the clipping is set to a default value (e.g., based on the maximum possible value of the sample bit depth). In another variant, the filtering process does not apply clipping to input samples that are then expected to be multiplied by a zero coefficient.

根据实施例,针对各个亮度滤波器用信号通知标志以指示非线性滤波器是否与该亮度滤波器一起使用。在变型中,仅当针对该亮度滤波器使用非线性滤波器(即,如果标志是有效的)时,才用信号通知亮度滤波器的限幅参数/值。According to an embodiment, a signal is used to notify a flag for each luminance filter to indicate whether a nonlinear filter is used with that luminance filter. In a variant, the limiting parameter/value of the luminance filter is only signaled when a nonlinear filter is used with that luminance filter (i.e., if the flag is valid).

根据实施例,针对色度滤波器用信号通知标志以指示非线性滤波器是否与色度滤波器一起使用。在变型中,仅当针对该色度滤波器使用非线性滤波器(即,如果标志是有效的)时,才用信号通知色度滤波器的限幅参数/值。According to an embodiment, a signal is used to notify a flag for the chroma filter to indicate whether a nonlinear filter is used in conjunction with the chroma filter. In a variant, the limiting parameter/value of the chroma filter is signaled only when a nonlinear filter is used for the chroma filter (i.e., if the flag is valid).

根据实施例,使用以下各项中的一个或多个来进行用信号通知ALF相关信息,诸如ALF参数和标志等):APS语法(表1);区块组头部语法(表2);编码树单元语法(表3);和/或下面所示的非线性ALF数据语法(表4),其使用与VVC草案版本3中相同的语法命名约定。根据变型,所有四个语法(例如,表1-4)被用于用信号通知ALF相关信息。根据替代变型,四个语法的子集被用于用信号通知ALF相关信息。According to embodiments, one or more of the following are used to signal ALF-related information, such as ALF parameters and flags: APS syntax (Table 1); block group header syntax (Table 2); coding tree unit syntax (Table 3); and/or the non-linear ALF data syntax shown below (Table 4), which uses the same syntax naming convention as in VVC draft version 3. According to variants, all four syntaxes (e.g., Tables 1-4) are used to signal ALF-related information. According to alternative variants, a subset of the four syntaxes is used to signal ALF-related information.

表1和表2提供高级语法元素以提供/用信号通知ALF参数,例如alf_data()。Tables 1 and 2 provide advanced syntax elements to provide/notify ALF parameters with signals, such as alf_data().

表1-自适应参数集(APS)语法Table 1 - Syntax of Adaptive Parameter Set (APS)

表2-区块组头部语法Table 2 - Block Group Header Syntax

相对于其它实施例(或其变型)描述的片(头部)被(如由表2的区块组头部语法所示)区块组(头部)替代。因此,“tile_group_alf_enabled_flag”对应于图2中的202和图5中的502的语法元素,并且其指示ALF针对区块组是否有效。此外,ALF数据语法元素不被提供在区块组头部中(在具有片的其它实施例中,其可以被提供在片头部中)。代替地,ALF数据语法元素提供在称为自适应参数集(APS)的特定参数集(如表1所示)中。ALF数据包括ALF语法元素,并且在APS中提供ALF数据语法元素使得能够在多于一个区块组之间共用ALF参数,例如在相同和/或不同解码图片中的多个区块组之间共用ALF参数。The slice (header) described in other embodiments (or variations thereof) is replaced by a tile group (header) (as shown by the tile group header syntax in Table 2). Therefore, the “tile_group_alf_enabled_flag” corresponds to syntax elements 202 in Figure 2 and 502 in Figure 5, and it indicates whether ALF is valid for a tile group. Furthermore, ALF data syntax elements are not provided in the tile group header (in other embodiments with slices, they may be provided in the slice header). Instead, ALF data syntax elements are provided in a specific set of parameters (as shown in Table 1) called the Adaptive Parameter Set (APS). ALF data includes ALF syntax elements, and providing ALF data syntax elements in the APS enables the sharing of ALF parameters across more than one tile group, for example, sharing ALF parameters across multiple tile groups in the same and/or different decoded images.

表1的自适应参数集(APS)语法用于定义用信号通知任何自适应参数集。在变型中,APS包括在非“视频编码层”(VCL)“网络抽象层”(NAL)单元(例如,称为“APS_NUT”或APSNAL单元类型)中。The Adaptive Parameter Set (APS) syntax in Table 1 is used to define any adaptive parameter set that is signaled. In variants, the APS is included in a non-Video Coding Layer (VCL) Network Abstraction Layer (NAL) unit (e.g., called the "APS_NUT" or APSNAL unit type).

APS的各个语法元素的语义如下:The semantics of each syntax element in APS are as follows:

自适应参数集语义Adaptive parameter set semantics

adaptation_parameter_set_id标识供其它语法元素参考的APS。adaptation_parameter_set_id的值应在0至63(包含)的范围内。The adaptation_parameter_set_id identifies the APS that is referenced by other syntax elements. The value of adaptation_parameter_set_id should be in the range of 0 to 63 (inclusive).

表2的区块组头部语法用于定义各个区块组头部。针对各个区块组提供区块组头部。区块组包括区块集合,各个区块包括CTU集合。The block group header syntax in Table 2 is used to define the headers for each block group. A block group header is provided for each block group. A block group consists of a set of blocks, and each block consists of a set of CTUs.

区块组头部的语法元素的语义如下:The semantics of the syntax elements in the block group header are as follows:

区块组头部语义Block header semantics

tile_group_aps_id指定区块组参考的APS的adaptation_parameter_set_id。tile_group_aps_id的值应在0至63(包含)范围内。adaptation_parameter_set_id等于tile_group_aps_id的APS NAL单元的TemporalId应小于或等于编码的区块组NAL单元的TemporalId。`tile_group_aps_id` specifies the `adaptation_parameter_set_id` of the APS referenced by the tile group. The value of `tile_group_aps_id` should be in the range of 0 to 63 (inclusive). The `TemporalId` of the APS NAL cell whose `adaptation_parameter_set_id` is equal to `tile_group_aps_id` should be less than or equal to the `TemporalId` of the encoded tile group NAL cell.

表3提供用于在CTU级别处用信号通知ALF有效的各个成分所使用的ALF(启用)标志的语法元素。其对应于图2中的208、209和210以及图5中的508、509和510中使用的语法元素。Table 3 provides the syntax elements for the ALF (Enable) flags used to signal ALF validity at the CTU level for each component. These correspond to the syntax elements used in Figures 208, 209, and 210, and Figures 508, 509, and 510.

表3-编码树单元语法Table 3 - Syntax of Encoding Tree Unit

表3的编码树单元语法用于定义(经编码的)编码树单元。编码树单元的各个语法元素的语义如下:The coding tree unit syntax in Table 3 is used to define (encoded) coding tree units. The semantics of each syntax element of a coding tree unit are as follows:

编码树单元语义Encoding Tree Unit Semantics

CTU是编码四叉树结构的根节点。CTU is the root node that encodes a quadtree structure.

alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]等于1指定自适应环路滤波器应用于亮度位置(xCtb,yCtb)处由编码树单元的cIdx指示的颜色成分的编码树块。alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]等于0指定自适应环路滤波器不应用于亮度位置(xCtb,yCtb)处由编码树单元的cIdx指示的颜色成分的编码树块。`alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]` equal to 1 specifies that the adaptive loop filter is applied to the coding tree block for the color component indicated by the cIdx of the coding tree unit at the luma position (xCtb, yCtb). `alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]` equal to 0 specifies that the adaptive loop filter is not applied to the coding tree block for the color component indicated by the cIdx of the coding tree unit at the luma position (xCtb, yCtb).

当alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]不存在时,推断等于0。If alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] does not exist, it is inferred to be equal to 0.

表4提供用于用信号通知非线性ALF参数的语法元素(即,非线性ALF数据语法),其建立在VVC草案版本3的ALF数据语法元素上。这些语法元素建立在本文参考图5的非线性ALF语法元素(其建立在图2的语法元素上)所描述的变型中使用的语法元素上。Table 4 provides the syntax elements (i.e., the nonlinear ALF data syntax) for signaling nonlinear ALF parameters, which are built upon the ALF data syntax elements of VVC draft version 3. These syntax elements are built upon the syntax elements used in the variants described herein with reference to the nonlinear ALF syntax elements of Figure 5 (which are built upon the syntax elements of Figure 2).

表4-非线性ALF数据语法Table 4 - Syntax of Nonlinear ALF Data

表4的非线性自适应环路滤波器(ALF)数据语法用于定义自适应参数集(表1所示)。非线性ALF数据语法元素的语义如下:The nonlinear adaptive loop filter (ALF) data syntax in Table 4 is used to define the adaptive parameter set (shown in Table 1). The semantics of the nonlinear ALF data syntax elements are as follows:

自适应环路滤波器数据语义Adaptive Loop Filter Data Semantics

alf_chroma_idc等于0指定自适应环路滤波器不应用于Cb和Cr颜色成分。alf_chroma_idc等于1指定自适应环路滤波器应用于Cb颜色成分。alf_chroma_idc等于2指定自适应环路滤波器应用于Cr颜色成分。alf_chroma_idc等于3指示自适应环路滤波器应用于Cb和Cr颜色成分。`alf_chroma_idc` equal to 0 indicates that the adaptive loop filter is not applied to the Cb and Cr color components. `alf_chroma_idc` equal to 1 indicates that the adaptive loop filter is applied to the Cb color component. `alf_chroma_idc` equal to 2 indicates that the adaptive loop filter is applied to the Cr color component. `alf_chroma_idc` equal to 3 indicates that the adaptive loop filter is applied to both the Cb and Cr color components.

截断的一元二值化tu(v)的最大值maxVal被设置为等于3。The maximum value of the truncated unary binarized tu(v), maxVal, is set to equal 3.

指定不同自适应环路滤波器的数量的变量NumAlfFilters被设置为等于25。The variable NumAlfFilters, which specifies the number of different adaptive loop filters, is set to 25.

alf_luma_num_filters_signalled_minus1加1指定可以用信号通知亮度系数的自适应环路滤波器类的数量。alf_luma_num_filters_signalled_minus1的值应在0至NumAlfFilters-1(包含)的范围内。The increment of alf_luma_num_filters_signalled_minus1 by 1 specifies the number of adaptive loop filter classes that can be used to signal the luminance coefficients. The value of alf_luma_num_filters_signalled_minus1 should be in the range of 0 to NumAlfFilters-1 (inclusive).

截断的二进制二值化tb(v)的最大值maxVal被设置为等于NumAlfFilters-1。The maximum value of the truncated binary binarized tb(v), maxVal, is set to be equal to NumAlfFilters-1.

alf_luma_coeff_delta_idx[filtIdx]指定用信号通知的由filtIdx指示的滤波器类的自适应环路滤波器亮度系数增量的索引,iltIdx在0至NumAlfFilters-1的范围内。当alf_luma_coeff_delta_idx[filtIdx]不存在时,推断等于0。`alf_luma_coeff_delta_idx[filtIdx]` specifies the index of the adaptive loop filter luminance coefficient increment of the filter class indicated by `filtIdx`, which is signaled by a signal. `filtIdx` is in the range of 0 to NumAlfFilters-1. If `alf_luma_coeff_delta_idx[filtIdx]` does not exist, it is inferred to be equal to 0.

截断的二进制二值化tb(v)的最大值maxVal被设置为等于alf_luma_num_filters_signalled_minus1。The maximum value maxVal of the truncated binary binarized tb(v) is set to equal alf_luma_num_filters_signalled_minus1.

alf_luma_coeff_delta_flag等于1指示不用信号通知alf_luma_coeff_delta_prediction_flag。alf_luma_coeff_delta_flag等于0指示可以用信号通知alf_luma_coeff_delta_prediction_flag。`alf_luma_coeff_delta_flag` equal to 1 indicates that `alf_luma_coeff_delta_prediction_flag` should not be signaled. `alf_luma_coeff_delta_flag` equal to 0 indicates that `alf_luma_coeff_delta_prediction_flag` can be signaled.

alf_luma_coeff_delta_prediction_flag等于1指定从先前亮度系数的增量预测用信号通知的亮度滤波器系数增量。alf_luma_coeff_delta_prediction_flag等于0指定不从先前亮度系数的增量预测用信号通知的亮度滤波器系数增量。当不存在时,推断alf_luma_coeff_delta_prediction_flag等于0。`alf_luma_coeff_delta_prediction_flag` equal to 1 specifies the luminance filter coefficient increments predicted by the signal from the incremental prediction of previous luminance coefficients. `alf_luma_coeff_delta_prediction_flag` equal to 0 specifies the luminance filter coefficient increments not predicted by the signal from the incremental prediction of previous luminance coefficients. If it does not exist, it is assumed that `alf_luma_coeff_delta_prediction_flag` equals 0.

alf_luma_min_eg_order_minus1加1指定用信号通知亮度滤波器系数的exp-Golomb码的最小指数。alf_luma_min_eg_order_minus1的值应在0至6(包含)的范围内。Increasing 1 to alf_luma_min_eg_order_minus1 specifies the minimum exponent of the exp-Golomb code used to signal the luminance filter coefficients. The value of alf_luma_min_eg_order_minus1 should be in the range of 0 to 6 (inclusive).

alf_luma_eg_order_increase_flag[i]等于1指定用信号通知亮度滤波器系数的exp-Golomb码的最小指数递增1。alf_luma_eg_order_increase_flag[i]等于0指定用信号通知亮度滤波器系数的exp-Golomb码的最小指数不递增1。`alf_luma_eg_order_increase_flag[i]` equal to 1 indicates that the minimum exponent of the exp-Golomb code for the luminance filter coefficients is incremented by 1. `alf_luma_eg_order_increase_flag[i]` equal to 0 indicates that the minimum exponent of the exp-Golomb code for the luminance filter coefficients is not incremented by 1.

用于解码alf_luma_coeff_delta_abs[sigFiltIdx][j]值的exp-Golomb码的指数expGoOrderY[i]导出如下:The exponent expGoOrderY[i] used to decode the exp-Golomb code of the value of alf_luma_coeff_delta_abs[sigFiltIdx][j] is derived as follows:

expGoOrderY[i]=alf_luma_min_eg_order_minus1+1+alf_luma_eg_order_increase_flag[i]expGoOrderY[i]=alf_luma_min_eg_order_minus1+1+alf_luma_eg_order_increase_flag[i]

alf_luma_coeff_flag[sigFiltIdx]等于1指定用信号通知由sigFiltIdx指示的亮度滤波器的系数。alf_luma_coeff_flag[sigFiltIdx]等于0指定由sigFiltIdx指示的亮度滤波器的所有滤波器系数被设置为等于0。当不存在时,将alf_luma_coeff_flag[sigFiltIdx]设置为等于1。`alf_luma_coeff_flag[sigFiltIdx]` equal to 1 specifies that the coefficients of the luminance filter indicated by `sigFiltIdx` are signaled. `alf_luma_coeff_flag[sigFiltIdx]` equal to 0 specifies that all filter coefficients of the luminance filter indicated by `sigFiltIdx` are set to 0. When it does not exist, `alf_luma_coeff_flag[sigFiltIdx]` is set to 1.

alf_luma_coeff_delta_abs[sigFiltIdx][j]指定由sigFiltIdx指示的用信号通知的亮度滤波器的第j个系数增量的绝对值。当不存在alf_luma_coeff_delta_abs[sigFiltIdx][j]时,推断为等于0。alf_luma_coeff_delta_abs[sigFiltIdx][j] specifies the absolute value of the j-th coefficient increment of the luminance filter, indicated by sigFiltIdx. If alf_luma_coeff_delta_abs[sigFiltIdx][j] does not exist, it is inferred to be equal to 0.

exp-Golomb二值化uek(v)的指数k导出如下:The exponent k of the exp-Golomb binarized uek(v) is derived as follows:

golombOrderIdxY[]={0,0,1,0,0,1,2,1,0,0,1,2}golombOrderIdxY[]={0,0,1,0,0,1,2,1,0,0,1,2}

k=expGoOrderY[golombOrderIdxY[j]]k=expGoOrderY[golombOrderIdxY[j]]

alf_luma_coeff_delta_sign[sigFiltIdx][j]指定由sigFiltIdx指示的滤波器的第j个亮度系数的符号如下:alf_luma_coeff_delta_sign[sigFiltIdx][j] specifies the sign of the j-th luminance coefficient of the filter indicated by sigFiltIdx as follows:

如果alf_luma_coeff_delta_sign[sigFiltIdx][j]等于0,则相应的亮度滤波器系数具有正值。If alf_luma_coeff_delta_sign[sigFiltIdx][j] equals 0, then the corresponding luminance filter coefficient has a positive value.

否则(alf_luma_coeff_delta_sign[sigFiltIdx][j]等于1),相应的亮度滤波器系数具有负值。Otherwise (alf_luma_coeff_delta_sign[sigFiltIdx][j] equals 1), the corresponding luminance filter coefficients have negative values.

当不存在alf_luma_coeff_delta_sign[sigFiltIdx][j]时,推断等于0。When alf_luma_coeff_delta_sign[sigFiltIdx][j] does not exist, it is inferred to be equal to 0.

变量filterCoefficients[sigFiltIdx][j](其中igFiltIdx=0…alf_luma_num_filters_signalled_minus1,j=0…11)初始化如下:The variable filterCoefficients[sigFiltIdx][j] (where igFiltIdx = 0…alf_luma_num_filters_signalled_minus1, j = 0…11) is initialized as follows:

filterCoefficients[sigFiltIdx][j]=alf_luma_coeff_delta_abs[sigFiltIdx][j]*filterCoefficients[sigFiltIdx][j]=alf_luma_coeff_delta_abs[sigFiltIdx][j]*

(1-2*alf_luma_coeff_delta_sign[sigFiltIdx][j])(1-2*alf_luma_coeff_delta_sign[sigFiltIdx][j])

当alf_luma_coeff_delta_prediction_flag等于1时,filterCoefficients[sigFiltIdx][j](其中igFiltIdx=0…alf_luma_num_filters_signalled_minus1,j=0…11)修改如下:When alf_luma_coeff_delta_prediction_flag equals 1, filterCoefficients[sigFiltIdx][j] (where igFiltIdx = 0…alf_luma_num_filters_signalled_minus1, j = 0…11) is modified as follows:

filterCoefficients[sigFiltIdx][j]+=filterCoefficients[sigFiltIdx-1][j]filterCoefficients[sigFiltIdx][j]+=filterCoefficients[sigFiltIdx-1][j]

具有元素AlfCoeffL[filtIdx][j](其中igFiltIdx=0…alf_luma_num_filters_signalled_minus1,j=0…11)的亮度滤波器系数推导如下The derivation of the luminance filter coefficients with elements AlfCoeffL[filtIdx][j] (where igFiltIdx = 0…alf_luma_num_filters_signalled_minus1, j = 0…11) is as follows

AlfCoeffL[filtIdx][j]=filterCoefficients[alf_luma_coeff_delta_idx[filtIdx]][j]AlfCoeffL[filtIdx][j]=filterCoefficients[alf_luma_coeff_delta_idx[filtIdx]][j]

对于最后滤波器系数AlfCoeffL[filtIdx][12](filtIdx=0...NumAlfFilters-1)推导如下:The derivation of the final filter coefficients AlfCoeffL[filtIdx][12] (filtIdx=0...NumAlfFilters-1) is as follows:

AlfCoeffL[filtIdx][12]=128AlfCoeffL[filtIdx][12] = 128

位流一致性的一个要求是AlfCoeffL[filtIdx][j](其中,filtIdx=0...NumAlfFilters-1,j=0…11)的值应在-2^7至2^7-1(包含)的范围内,并且AlfCoeffL[filtIdx][12]的值应在0至2^8-1(包含)的范围内。One requirement for bitstream consistency is that the value of AlfCoeffL[filtIdx][j] (where filtIdx = 0...NumAlfFilters-1, j = 0…11) should be in the range of -2^7 to 2^7-1 (inclusive), and the value of AlfCoeffL[filtIdx][12] should be in the range of 0 to 2^8-1 (inclusive).

alf_chroma_min_eg_order_minus1加1指定用信号通知的色度滤波器系数的exp-Golomb码的最小指数。alf_chroma_min_eg_order_minus1的值应在0至6(包含)的范围内。The increment of alf_chroma_min_eg_order_minus1 by 1 specifies the minimum exponent of the exp-Golomb code for the chroma filter coefficients notified by the signal. The value of alf_chroma_min_eg_order_minus1 should be in the range of 0 to 6 (inclusive).

alf_chroma_eg_order_increase_flag[i]等于1指定用信号通知的色度滤波器系数的exp-Golomb码的最小指数递增1。alf_chroma_eg_order_increase_flag[i]等于0指定用信号通知的色度滤波器系数的exp-Golomb码的最小指数不递增1`alf_chroma_eg_order_increase_flag[i]` equal to 1 specifies that the minimum exponent of the exp-Golomb code for the chroma filter coefficients notified by the signal is incremented by 1. `alf_chroma_eg_order_increase_flag[i]` equal to 0 specifies that the minimum exponent of the exp-Golomb code for the chroma filter coefficients notified by the signal is not incremented by 1.

用于解码alf_chroma_coeff_abs[j]值的exp-Golomb码的指数expGoOrderC[i]导出如下:The exponent expGoOrderC[i] used to decode the exp-Golomb code of the value of alf_chroma_coeff_abs[j] is derived as follows:

expGoOrderC[i]=alf_chroma_min_eg_order_minus1+1+alf_chroma_eg_order_increase_flag[i]expGoOrderC[i]=alf_chroma_min_eg_order_minus1+1+alf_chroma_eg_order_increase_flag[i]

alf_chroma_coeff_abs[j]指定第j个色度滤波器系数的绝对值。当alf_chroma_coeff_abs[j]不存在时,推断为等于0。位流一致性的要求是alf_chroma_coeff_abs[j]的值应在0至2^7-1(包含)的范围内。alf_chroma_coeff_abs[j] specifies the absolute value of the j-th chroma filter coefficient. If alf_chroma_coeff_abs[j] does not exist, it is inferred to be equal to 0. Bitstream consistency requires that the value of alf_chroma_coeff_abs[j] be in the range of 0 to 2^7-1 (inclusive).

exp-Golomb二值化uek(v)的指数k导出如下:The exponent k of the exp-Golomb binarized uek(v) is derived as follows:

golombOrderIdxC[]={0,0,1,0,0,1}golombOrderIdxC[]={0,0,1,0,0,1}

k=expGoOrderC[golombOrderIdxC[j]]k=expGoOrderC[golombOrderIdxC[j]]

alf_chroma_coeff_sign[j]指定第j个色度滤波器系数的符号如下:alf_chroma_coeff_sign[j] specifies the sign of the j-th chroma filter coefficient as follows:

如果alf_chroma_coeff_sign[j]等于0,则相应的色度滤波器系数具有正值。否则(alf_chroma_coeff_sign[j]等于1),相应的色度滤波器系数具有负值。If alf_chroma_coeff_sign[j] equals 0, then the corresponding chroma filter coefficient has a positive value. Otherwise (alf_chroma_coeff_sign[j] equals 1), the corresponding chroma filter coefficient has a negative value.

当alf_chroma_coeff_sign[j]不存在时,推断等于0。If alf_chroma_coeff_sign[j] does not exist, the inference is that it equals 0.

具有元素cC[j]的色度滤波器系数AlfCoeffC(其中j=0…5)导出如下:The chromaticity filter coefficients AlfCoeffC with element cC[j] (where j = 0…5) are derived as follows:

AlfCoeffC[j]=alf_chroma_coeff_abs[j]*(1-2*alf_chroma_coeff_sign[j])AlfCoeffC[j]=alf_chroma_coeff_abs[j]*(1-2*alf_chroma_coeff_sign[j])

j=6的最后滤波器系数导出如下:The final filter coefficients for j=6 are derived as follows:

AlfCoeffC[6]=128AlfCoeffC[6]=128

位流一致性的要求是AlfCoeffC[j](其中j=0…5)应在-2^7-1至2^7-1(包含)范围内,并且AlfCoeffC[6]的值应在0至2^8-1(包含)范围内。The requirement for bitstream consistency is that AlfCoeffC[j] (where j = 0…5) should be in the range of -2^7-1 to 2^7-1 (inclusive), and the value of AlfCoeffC[6] should be in the range of 0 to 2^8-1 (inclusive).

alf_luma_clip等于0指定线性自适应环路滤波器应用于亮度成分。alf_luma_clip等于1指定非线性自适应环路滤波器可以应用于亮度成分。A value of 0 for `alf_luma_clip` specifies that a linear adaptive loop filter is applied to the luminance component. A value of 1 for `alf_luma_clip` specifies that a nonlinear adaptive loop filter can be applied to the luminance component.

alf_chroma_clip等于0指定线性自适应环路滤波器应用于色度成分;alf_chroma_clip等于1指示非线性自适应环路滤波器应用于色度成分。如果不存在alf_chroma_clip,则推断为0。An alf_chroma_clip of 0 specifies that a linear adaptive loop filter is applied to the chroma components; an alf_chroma_clip of 1 indicates that a nonlinear adaptive loop filter is applied to the chroma components. If alf_chroma_clip does not exist, it is inferred to be 0.

alf_luma_clip_default_table等于1指定默认alf_luma_clipping_value表用于将限幅索引转换为限幅值。alf_luma_clip_default_table等于0指示alf_data()中存在alf_luma_clipping_value[]表。A value of 1 for alf_luma_clip_default_table specifies that the default alf_luma_clipping_value table is used to convert the clipping index to the clipping value. A value of 0 for alf_luma_clip_default_table indicates that the alf_luma_clipping_value[] table exists in alf_data().

alf_luma_num_clipping_values_minus1加1指示alf_luma_clipping_value[]表的大小。如果不存在,则推断为等于bitDepthY。Incrementing 1 by 1 in alf_luma_num_clipping_values_minus1 indicates the size of the alf_luma_clipping_value[] table. If it does not exist, it is inferred to be equal to bitDepthY.

alf_luma_clipping_value[clipIdx]指定在alf_luma_clip_idx[][]表中用信号通知限幅索引clipIdx时使用的限幅值。当不存在时,推断为alf_luma_clipping_value[]={1<<bitDepthY,1<<(bitDepthY-1),…,8,4,2}`alf_luma_clipping_value[clipIdx]` specifies the clipping value used when signaling the clipping index `clipIdx` in the `alf_luma_clip_idx[][]` table. If it does not exist, it is inferred that `alf_luma_clipping_value[] = {1 << bitDepthY, 1 << (bitDepthY-1), ..., 8, 4, 2}`.

为方便起见,推断alf_luma_clipping_value[alf_luma_num_clipping_values_minus1+1]等于1<<(bitDepthY-1)。For convenience, we infer that alf_luma_clipping_value[alf_luma_num_clipping_values_minus1+1] equals 1<<(bitDepthY-1).

alf_chroma_clip_default_table等于1指定默认alf_chroma_clipping_value[]表用于将限幅索引转换为限幅值;alf_chroma_clip_default_table等于0指示alf_data()中存在alf_chroma_clipping_value[]表。When alf_chroma_clip_default_table equals 1, it specifies that the default alf_chroma_clipping_value[] table is used to convert the clipping index to the clipping value; when alf_chroma_clip_default_table equals 0, it indicates that the alf_chroma_clipping_value[] table exists in alf_data().

alf_chroma_num_clipping_values_minus1加1指示alf_chroma_clipping_value[]表的大小。如果不存在,则推断为等于bitDepthC。Incrementing 1 by 1 in alf_chroma_num_clipping_values_minus1 indicates the size of the alf_chroma_clipping_value[] table. If it does not exist, it is inferred to be equal to bitDepthC.

alf_chroma_clipping_value[clipIdx]指定在alf_chroma_clip_idx[][]表中用信号通知限幅索引clipIdx时使用的限幅值。当不存在时,推断为alf_chroma_clipping_value[]={1<<bitDepthC,1<<(bitDepthC-1),…,8,4,2}。`alf_chroma_clipping_value[clipIdx]` specifies the clipping value used when signaling the clipping index `clipIdx` in the `alf_chroma_clip_idx[][]` table. If it does not exist, it is inferred that `alf_chroma_clipping_value[] = {1 << bitDepthC, 1 << (bitDepthC-1), ..., 8, 4, 2}`.

为方便起见,推断alf_chroma_clipping_value e[alf_chroma_num_clipping_values_minus1+1]等于1<<bitDepthC。For convenience, we infer that alf_chroma_clipping_value e[alf_chroma_num_clipping_values_minus1+1] equals 1<<bitDepthC.

alf_luma_filter_clip[sigFiltIdx]等于0指定与由sigFiltIdx指示的亮度滤波器一起应用线性自适应环路滤波器。alf_luma_filter_clip[sigFiltIdx]等于1指定与由sigFiltIdx指示的亮度滤波器一起应用非线性自适应环路滤波器。A value of 0 for `alf_luma_filter_clip[sigFiltIdx]` specifies that a linear adaptive loop filter is applied together with the luminance filter indicated by `sigFiltIdx`. A value of 1 for `alf_luma_filter_clip[sigFiltIdx]` specifies that a nonlinear adaptive loop filter is applied together with the luminance filter indicated by `sigFiltIdx`.

alf_luma_clip_min_eg_order_minus1加1指定用信号通知的亮度滤波器系数的exp-Golomb码的最小指数。alf_luma_clip_min_eg_order_minus1的值应在0至6(包含)范围内。The increment of 1 in `alf_luma_clip_min_eg_order_minus1` specifies the minimum exponent of the exp-Golomb code for the luminance filter coefficients notified by the signal. The value of `alf_luma_clip_min_eg_order_minus1` should be in the range of 0 to 6 (inclusive).

alf_luma_clip_eg_order_increase_flag[i]等于1指定用信号通知的亮度滤波器系数的exp-Golomb码的最小指数递增1。alf_luma_clip_eg_order_increase_flag[i]等于0指定用信号通知的亮度滤波器系数的exp-Golomb码的最小指数不递增1。`alf_luma_clip_eg_order_increase_flag[i]` equal to 1 indicates that the minimum exponent of the exp-Golomb code for the luminance filter coefficients notified by the signal is incremented by 1. `alf_luma_clip_eg_order_increase_flag[i]` equal to 0 indicates that the minimum exponent of the exp-Golomb code for the luminance filter coefficients notified by the signal is not incremented by 1.

用于解码alf_luma_clip_idx[sigFiltIdx][j]的值的exp-Golomb码的指数expGoOrderYClip[i]导出如下:The exponent of the exp-Golomb code used to decode the value of alf_luma_clip_idx[sigFiltIdx][j], expGoOrderYClip[i], is derived as follows:

expGoOrderYClip[i]=alf_luma_clip_min_eg_order_minus1+1+alf_luma_clip_eg_order_increase_flag[i]expGoOrderYClip[i]=alf_luma_clip_min_eg_order_minus1+1+alf_luma_clip_eg_order_increase_flag[i]

alf_luma_clip_idx[sigFiltIdx][j]指定在乘以由sigFiltIdx指示的用信号通知的亮度滤波器的第j个系数之前使用的限幅的限幅索引。当不存在alf_luma_clip_idx[sigFiltIdx][j]时,推断为等于alf_luma_num_clipping_values_minus1+1(无限幅)。alf_luma_clip_idx[sigFiltIdx][j] specifies the clipping index to be used before multiplying by the j-th coefficient of the luminance filter indicated by sigFiltIdx. When alf_luma_clip_idx[sigFiltIdx][j] does not exist, it is inferred to be equal to alf_luma_num_clipping_values_minus1+1 (infinite clipping).

exp-Golomb二值化uek(v)的指数k导出如下:The exponent k of the exp-Golomb binarized uek(v) is derived as follows:

golombOrderIdxYClip[]={0,0,1,0,0,1,2,1,0,0,1,2}golombOrderIdxYClip[]={0,0,1,0,0,1,2,1,0,0,1,2}

k=expGoOrderYClip[golombOrderIdxYClip[j]]k=expGoOrderYClip[golombOrderIdxYClip[j]]

变量filterClips[sigFiltIdx][j](其中sigFiltIdx=0...alf_luma_num_filters_signalled_minus1,j=0…11)初始化如下:The variable filterClips[sigFiltIdx][j] (where sigFiltIdx = 0...alf_luma_num_filters_signalled_minus1,j = 0…11) is initialized as follows:

filterClips[sigFiltIdx][j]=alf_luma_clipping_value[filterClips[sigFiltIdx][j]=alf_luma_clipping_value[

alf_luma_clip_idx[sigFiltIdx][j]]alf_luma_clip_idx[sigFiltIdx][j]]

具有元素AlfClipL[filtIdx][j](其中filtIdx=0..NumAlfFilters-1并且j=0…11)的亮度滤波器限幅值AlfClipL导出如下The luminance filter limiting value AlfClipL with element AlfClipL[filtIdx][j] (where filtIdx = 0..NumAlfFilters-1 and j = 0…11) is derived as follows:

AlfClipL[filtIdx][j]=filterClips[alf_luma_coeff_delta_idx[filtIdx]][j]AlfClipL[filtIdx][j]=filterClips[alf_luma_coeff_delta_idx[filtIdx]][j]

alf_chroma_clip_min_eg_order_minus1加1指定用信号通知的色度滤波器系数的exp-Golomb码的最小指数。alf_chroma_clip_min_eg_order_minus1的值应在0至6(包含)范围内。The increment of 1 in `alf_chroma_clip_min_eg_order_minus1` specifies the minimum exponent of the exp-Golomb code for the chroma filter coefficients notified by the signal. The value of `alf_chroma_clip_min_eg_order_minus1` should be in the range of 0 to 6 (inclusive).

alf_chroma_clip_eg_order_increase_flag[i]等于1指定用信号通知的色度滤波器系数的exp-Golomb码的最小指数递增1。alf_chroma_clip_eg_order_increase_flag[i]等于0指定用信号通知的色度滤波器系数的exp-Golomb码的最小指数不递增1。`alf_chroma_clip_eg_order_increase_flag[i]` equal to 1 indicates that the minimum exponent of the exp-Golomb code for the chroma filter coefficients notified by the signal is incremented by 1. `alf_chroma_clip_eg_order_increase_flag[i]` equal to 0 indicates that the minimum exponent of the exp-Golomb code for the chroma filter coefficients notified by the signal is not incremented by 1.

用于解码alf_chroma_coeff_abs[j]值的exp-Golomb码的指数expGoOrderC[i]导出如下:The exponent expGoOrderC[i] used to decode the exp-Golomb code of the value of alf_chroma_coeff_abs[j] is derived as follows:

expGoOrderC[i]=alf_chroma_clip_min_eg_order_minus1+1+alf_chroma_clip_eg_order_increase_flag[i]expGoOrderC[i]=alf_chroma_clip_min_eg_order_minus1+1+alf_chroma_clip_eg_order_increase_flag[i]

alf_chroma_clip_idx[j]指定在乘以色度滤波器的第j个系数之前要使用的限幅的限幅索引。当alf_chroma_clip_idx[j]不存在时,推断为等于alf_chroma_num_clipping_values_minus1+1(无限幅)。alf_chroma_clip_idx[j] specifies the clipping index to be used before multiplying by the j-th coefficient of the chroma filter. When alf_chroma_clip_idx[j] does not exist, it is inferred to be equal to alf_chroma_num_clipping_values_minus1+1 (infinite clipping).

exp-Golomb二值化uek(v)的指数k导出如下:The exponent k of the exp-Golomb binarized uek(v) is derived as follows:

golombOrderIdxC[]={0,0,1,0,0,1}golombOrderIdxC[]={0,0,1,0,0,1}

k=expGoOrderC[golombOrderIdxC[j]]k=expGoOrderC[golombOrderIdxC[j]]

具有元素AlfClipC[j](其中j=0…5)的亮度滤波器限幅值AlfClipC导出如下:AlfClipC[j]=alf_chroma_clipping_value[alf_chroma_clip_idx[j]]The luminance filter clipping value AlfClipC, with element AlfClipC[j] (where j = 0…5), is derived as follows: AlfClipC[j] = alf_chroma_clipping_value[alf_chroma_clip_idx[j]].

根据变型,alf_luma_num_clipping_values_minus1由alf_luma_num_clipping_values_minus2代替,并且提供从索引=1至alf_luma_num_clipping_values_minus2+1的限幅值,并且alf_luma_clipping_value[]的第一值被推断为alf_luma_clipping_value[0]=1<<bitDepthY。alf_chroma_num_clipping_values_minus1由alf_chroma_num_clipping_values_minus2代替,并且提供从索引1至alf_chroma_num_clipping_values_minus2+1的限幅值,并将alf_chroma_clipping_value[]的第一个值推断为alf_chroma_clipping_value[0]=1<<bitDepthCAccording to the variant, alf_luma_num_clipping_values_minus1 is replaced by alf_luma_num_clipping_values_minus2, and provides a limiting value from index = 1 to alf_luma_num_clipping_values_minus2+1, and the first value of alf_luma_clipping_value[] is inferred as alf_luma_clipping_value[0] = 1 << bitDepthY. alf_chroma_num_clipping_values_minus1 is replaced by alf_chroma_num_clipping_values_minus2, and provides a limiting value from index 1 to alf_chroma_num_clipping_values_minus2+1, and the first value of alf_chroma_clipping_value[] is inferred as alf_chroma_clipping_value[0] = 1 << bitDepthC

根据变型,自适应环路滤波处理使用上述语法元素。这种变型使用下面VVC草案规范的符号约定来描述。Depending on the variant, adaptive loop filtering uses the syntax elements described above. This variant is described using the notation conventions of the VVC draft specification below.

自适应环路滤波处理Adaptive loop filtering

总述Overview

该处理的输入是在自适应环路滤波器之前的重建图片样本阵列recPictureL、recPictureCb和recPictureCr。The input to this process is the array of reconstructed image samples recPictureL, recPictureCb, and recPictureCr preceding the adaptive loop filter.

该处理的输出是自适应环路滤波之后的修改的重建图片样本阵列alfPictureL、alfPictureCb和alfPictureCr。The output of this process is a modified array of reconstructed image samples, alfPictureL, alfPictureCb, and alfPictureCr, after adaptive loop filtering.

自适应环路滤波之后的修改后的重建图片样本阵列alfPictureL、alfPictureCb和alfPictureCr中的样本值初始设置为分别等于自适应环路滤波之前的重建图片样本阵列recPictureL、recPictureCb和recPictureCr中的样本值。The sample values in the modified reconstructed image sample arrays alfPictureL, alfPictureCb, and alfPictureCr after adaptive loop filtering are initially set to be equal to the sample values in the reconstructed image sample arrays recPictureL, recPictureCb, and recPictureCr before adaptive loop filtering, respectively.

当tile_group_alf_enabled_flag等于1时,对于具有亮度编码树块位置(rx,ry)的每个编码树单元(其中rx=0…PicWidthInCtbs-1且ry=0…PicHeightInCtbs-1),以下适用:When tile_group_alf_enabled_flag equals 1, for each coding tree unit with a luma coding tree block position (rx, ry) (where rx = 0…PicWidthInCtbs-1 and ry = 0…PicHeightInCtbs-1), the following applies:

当alf_ctb_flag[0][rx][ry]等于1时,以recPictureL、alfPictureL和设置为等于(rx<<CtbLog2SizeY,ry<<CtbLog2SizeY)的亮度编码树块位置(xCtb,yCtb)作为输入来调用子句“亮度样本的编码树块滤波处理”中指定的亮度样本的编码树块滤波处理,并且输出是修改后的滤波图片alfPictureL。When alf_ctb_flag[0][rx][ry] equals 1, the luminance sample coded tree block filtering process specified in the clause "Ccoded Tree Block Filtering Process for Luminance Samples" is invoked with recPictureL, alfPictureL, and the luminance coded tree block position (xCtb, yCtb) set to (rx<<CtbLog2SizeY, ry<<CtbLog2SizeY) as input, and the output is the modified filtered image alfPictureL.

当alf_ctb_flag[1][rx][ry]等于1时,以recPicture设置为等于recPictureCb、alfPicture设置为等于alfPictureCb、并且色度编码树块位置(xCtbC,yCtbC)设置为等于(rx<<(CtbLog2SizeY-1),ry<<(CtbLog2SizeY-1))作为输入来调用子句“色度样本的编码树块滤波处理”中指定的色度样本的编码树块滤波处理,并且输出是修改后的滤波图片alfPictureCb。When alf_ctb_flag[1][rx][ry] equals 1, the chroma sample coding block filtering process specified in the clause "chroma sample coding block filtering process" is called with recPicture set to equal recPictureCb, alfPicture set to equal alfPictureCb, and the chroma coding block position (xCtbC, yCtbC) set to equal (rx<<(CtbLog2SizeY-1), ry<<(CtbLog2SizeY-1)) as input, and the output is the modified filtered image alfPictureCb.

当alf_ctb_flag[2][rx][ry]等于1时,以recPicture设置为等于recPictureCr、alfPicture设置为等于alfPictureCr、并且色度编码树块位置(xCtbC,yCtbC)设置为等于(rx<<(CtbLog2SizeY-1),ry<<(CtbLog2SizeY-1))作为输入来调用子句“色度样本的编码树块滤波处理”中指定的色度样本的编码树块滤波处理,并且输出是修改后的滤波图片alfPictureCr。When alf_ctb_flag[2][rx][ry] equals 1, the chroma sample coding block filtering process specified in the clause "chroma sample coding block filtering process" is called with recPicture set to equal recPictureCr, alfPicture set to equal alfPictureCr, and the chroma coding block position (xCtbC, yCtbC) set to equal (rx<<(CtbLog2SizeY-1), ry<<(CtbLog2SizeY-1)) as input, and the output is the modified filtered image alfPictureCr.

亮度样本的编码树块滤波处理Encoding tree block filtering of luminance samples

该处理的输入是:自适应环路滤波处理之前的重建亮度图片样本阵列recPictureL、滤波后的重建亮度图片样本阵列alfPictureL、指定针对当前图片的左上方样本的当前亮度编码树块的左上方样本的亮度位置(xCtb,yCtb)。The inputs to this process are: the reconstructed luminance image sample array recPictureL before adaptive loop filtering, the reconstructed luminance image sample array alfPictureL after filtering, and the luminance position (xCtb, yCtb) of the top-left sample of the current luminance coding tree block for the top-left sample of the current image.

该处理的输出是修改的滤波重建亮度图片样本阵列alfPictureL。The output of this process is a modified filtered reconstructed luminance image sample array alfPictureL.

以位置(xCtb,yCtb)和重建的亮度图片样本阵列recPictureL为输入并且filtIdx[x][y]和transposeIdx[x][y](其中x,y=0…CtbSizeY-1)作为输出来调用滤波器索引子句“亮度样本的ALF转置和滤波器索引的导出处理”的导出处理。The derivation process of the filter index clause “ALF transpose of luminance samples and derivation of filter index” is invoked with the position (xCtb, yCtb) and the reconstructed luminance image sample array recPictureL as input and with the outputs filtIdx[x][y] and transposeIdx[x][y] (where x, y = 0…CtbSizeY-1) as outputs.

对于滤波后的重建亮度样本alfPictureL[x][y]的导出,当前亮度编码树块内的各个重建亮度样本recPictureL[x][y](其中x,y=0…CtbSizeY-1)被如下滤波:For the derivation of the filtered reconstructed luminance sample alfPictureL[x][y], each reconstructed luminance sample recPictureL[x][y] (where x, y = 0…CtbSizeY-1) within the current luminance coding tree block is filtered as follows:

与由filtIdx[x][y]指定的滤波器相对应的亮度滤波器系数阵列f[j]和亮度滤波器限幅阵列c[j](其中j=0…12)如下导出:The luminance filter coefficient array f[j] and luminance filter limiting array c[j] (where j = 0…12) corresponding to the filter specified by filtIdx[x][y] are derived as follows:

f[j]=AlfCoeffL[filtIdx[x][y]][j]f[j]=AlfCoeffL[filtIdx[x][y]][j]

c[j]=AlfClipL[filtIdx[x][y]][j]c[j]=AlfClipL[filtIdx[x][y]][j]

根据transposeIdx[x][y]导出亮度滤波器系数filterCoeff和滤波器限幅值filterClip如下:The brightness filter coefficients filterCoeff and filter clipping value filterClip are derived from transposeIdx[x][y] as follows:

如果transposeIndex[x][y]==1,If transposeIndex[x][y] == 1,

filterCoeff[]={f[9],f[4],f[10],f[8],f[1],f[5],f[11],f[7],f[3],f[0],f[2],f[6],f[12]}filterCoeff[]={f[9],f[4],f[10],f[8],f[1],f[5],f[11],f[7],f[3],f[0],f[2],f[6],f[12]}

filterClip[]={c[9],c[4],c[10],c[8],c[1],c[5],c[11],c[7],c[3],c[0],c[2],c[6],c[12]}filterClip[]={c[9],c[4],c[10],c[8],c[1],c[5],c[11],c[7],c[3],c[0],c[2],c[6],c[12]}

否则,如果transposeIndex[x][y]==2,Otherwise, if transposeIndex[x][y] == 2,

filterCoeff[]={f[0],f[3],f[2],f[1],f[8],f[7],f[6],f[5],f[4],f[9],f[10],f[11],f[12]}filterCoeff[]={f[0],f[3],f[2],f[1],f[8],f[7],f[6],f[5],f[4],f[9],f[10],f[11],f[12]}

filterClip[]={c[0],c[3],c[2],c[1],c[8],c[7],c[6],c[5],c[4],c[9],c[10],c[11],c[12]}filterClip[]={c[0],c[3],c[2],c[1],c[8],c[7],c[6],c[5],c[4],c[9],c[10],c[11],c[12]}

否则,如果transposeIndex[x][y]==3,Otherwise, if transposeIndex[x][y] == 3,

filterCoeff[]={f[9],f[8],f[10],f[4],f[3],f[7],f[11],f[5],f[1],f[0],f[2],f[6],f[12]}filterCoeff[]={f[9],f[8],f[10],f[4],f[3],f[7],f[11],f[5],f[1],f[0],f[2],f[6],f[12]}

filterClip[]={c[9],c[8],c[10],c[4],c[3],c[7],c[11],c[5],c[1],c[0],c[2],c[6],c[12]}filterClip[]={c[9],c[8],c[10],c[4],c[3],c[7],c[11],c[5],c[1],c[0],c[2],c[6],c[12]}

否则otherwise

filterCoeff[]={f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12]}filterCoeff[]={f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12]}

filterClip[]={c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12]}filterClip[]={c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12]}

给定亮度样本阵列recPicture内的各个相应亮度样本(x,y)的位置(hx,vy)导出如下:The positions (hx, vy) of each corresponding luminance sample (x, y) within the luminance sample array recPicture are derived as follows:

hx=Clip3(0,pic_width_in_luma_samples-1,xCtb+x)hx=Clip3(0,pic_width_in_luma_samples-1,xCtb+x)

vy=Clip3(0,pic_height_in_luma_samples-1,yCtb+y)vy=Clip3(0,pic_height_in_luma_samples-1,yCtb+y)

变量curr导出如下:curr=recPictureL[hx,vy]The variable curr is derived as follows: curr = recPictureL[hx, vy]

变量总和导出如下:The sum of the variables is derived as follows:

sum=filterCoeff[0]*(Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy+3]-curr)+Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy-3]-curr))sum=filterCoeff[0]*(Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy+3]-curr)+Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy-3]-curr))

+filterCoeff[1]*(Clip3(-filterClip[1],filterClip[1],recPictureL[hx+1,vy+2]-curr)+Clip3(-filterClip[1],filterClip[1],recPictureL[hx-1,vy-2]-curr))+filterCoeff[1]*(Clip3(-filterClip[1],filterClip[1],recPictureL[hx+1,vy+2]-curr)+Clip3(-filterClip[1],filterClip[1],recPictureL[hx-1,vy-2]-curr))

+filterCoeff[2]*(Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy+2]-curr)+Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy-2]-curr))+filterCoeff[2]*(Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy+2]-curr)+Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy-2]-curr))

+filterCoeff[3]*(Clip3(-filterClip[3],filterClip[3],recPictureL[hx-1,vy+2]-curr)+Clip3(-filterClip[3],filterClip[3],recPictureL[hx+1,vy-2]-curr))+filterCoeff[3]*(Clip3(-filterClip[3],filterClip[3],recPictureL[hx-1,vy+2]-curr)+Clip3(-filterClip[3],filterClip[3],recPictureL[hx+1,vy-2]-curr))

+filterCoeff[4]*(Clip3(-filterClip[4],filterClip[4],recPictureL[hx+2,vy+1]-curr)+Clip3(-filterClip[4],filterClip[4],recPictureL[hx-2,vy-1]-curr))+filterCoeff[4]*(Clip3(-filterClip[4],filterClip[4],recPictureL[hx+2,vy+1]-curr)+Clip3(-filterClip[4],filterClip[4],recPictureL[hx-2,vy-1]-curr))

+filterCoeff[5]*(Clip3(-filterClip[5],filterClip[5],recPictureL[hx+1,vy+1]-curr)+Clip3(-filterClip[5],filterClip[5],recPictureL[hx-1,vy-1]-curr))+filterCoeff[5]*(Clip3(-filterClip[5],filterClip[5],recPictureL[hx+1,vy+1]-curr)+Clip3(-filterClip[5],filterClip[5],recPictureL[hx-1,vy-1]-curr))

+ filterCoeff[6]*(Clip3(-filterClip[6], filterClip[6],recPictureL[hx,vy+1]-curr)+ Clip3(-filterClip[6], filterClip[6],recPictureL[hx,vy-1]-curr))+ filterCoeff[6]*(Clip3(-filterClip[6], filterClip[6],recPictureL[hx,vy+1]-curr)+ Clip3(-filterClip[6], filterClip[6],recPictureL[hx,vy-1]-curr))

+filterCoeff[7]*(Clip3(-filterClip[7],filterClip[7],recPictureL[hx-1,vy+1]-curr)+Clip3(-filterClip[7],filterClip[7],recPictureL[hx+1,vy-1]-curr))+filterCoeff[7]*(Clip3(-filterClip[7],filterClip[7],recPictureL[hx-1,vy+1]-curr)+Clip3(-filterClip[7],filterClip[7],recPictureL[hx+1,vy-1]-curr))

+filterCoeff[8]*(Clip3(-filterClip[8],filterClip[8],recPictureL[hx-2,vy+1]-curr)+Clip3(-filterClip[8],filterClip[8],recPictureL[hx+2,vy-1]-curr))+filterCoeff[8]*(Clip3(-filterClip[8],filterClip[8],recPictureL[hx-2,vy+1]-curr)+Clip3(-filterClip[8],filterClip[8],recPictureL[hx+2,vy-1]-curr))

+ filterCoeff[9]*(Clip3(-filterClip[9], filterClip[9],recPictureL[hx+3,vy]-curr)+ Clip3(-filterClip[9], filterClip[9],recPictureL[hx-3,vy]-curr))+ filterCoeff[9]*(Clip3(-filterClip[9], filterClip[9],recPictureL[hx+3,vy]-curr)+ Clip3(-filterClip[9], filterClip[9],recPictureL[hx-3,vy]-curr))

+ filterCoeff[10]*(Clip3(-filterClip[10], filterClip[10],recPictureL[hx+2,vy]-curr)+ Clip3(-filterClip[10], filterClip[10],recPictureL[hx-2,vy]-curr))+ filterCoeff[10]*(Clip3(-filterClip[10], filterClip[10],recPictureL[hx+2,vy]-curr)+ Clip3(-filterClip[10], filterClip[10],recPictureL[hx-2,vy]-curr))

+ filterCoeff[11]*(Clip3(-filterClip[11], filterClip[11],recPictureL[hx+1,vy]-curr)+ Clip3(-filterClip[11], filterClip[11],recPictureL[hx-1,vy]-curr))+ filterCoeff[11]*(Clip3(-filterClip[11], filterClip[11],recPictureL[hx+1,vy]-curr)+ Clip3(-filterClip[11], filterClip[11],recPictureL[hx-1,vy]-curr))

+filterCoeff[12]*recPictureL[hx,vy]+filterCoeff[12]*recPictureL[hx,vy]

sum=(sum+64)>>7sum=(sum+64)>>7

修改后的滤波重建亮度图片样本alfPictureL[xCtb+x][yCtb+y]导出如下:The modified filtered and reconstructed brightness image sample alfPictureL[xCtb+x][yCtb+y] is exported as follows:

alfPictureL[xCtb+x][yCtb+y]=Clip3(0,(1<<BitDepthY)-1,sum)alfPictureL[xCtb+x][yCtb+y]=Clip3(0,(1<<BitDepthY)-1,sum)

亮度样本ALF转置和滤波器索引的导出处理Luminance sample ALF transpose and filter index derivation processing

该处理的输入是:指定针对当前图片的左上方样本的当前亮度编码树块的左上方样本的亮度位置(xCtb,yCtb),自适应环路滤波处理之前的重建亮度图片样本阵列recPictureL。The input to this process is: the brightness position (xCtb, yCtb) of the top-left sample of the current brightness coding tree block for the top-left sample of the current image, and the reconstructed brightness image sample array recPictureL before adaptive loop filtering.

该处理的输出为分类滤波器索引陈列filtIdx[x][y](其中x,y=0...CtbSizeY-1),The output of this process is a classification filter index array filtIdx[x][y] (where x, y = 0...CtbSizeY-1).

转置索引阵列transposeIdx[x][y](其中x,y=0...CtbSizeY-1)。Transpose index array transposeIdx[x][y] (where x, y = 0...CtbSizeY-1).

给定亮度样本阵列recPicture内的各个相应亮度样本(x,y)的位置(hx,vy)导出如下:The positions (hx, vy) of each corresponding luminance sample (x, y) within the luminance sample array recPicture are derived as follows:

hx=Clip3(0,pic_width_in_luma_samples-1,x)hx=Clip3(0,pic_width_in_luma_samples-1,x)

vy=Clip3(0,pic_height_in_luma_samples-1,y)vy=Clip3(0,pic_height_in_luma_samples-1,y)

分类滤波器索引阵列filtIdx和转置索引阵列transposeIdx通过以下有序步骤导出:The classification filter index array filtIdx and the transpose index array transposeIdx are derived through the following ordered steps:

1)变量filtH[x][y]、filtV[x][y]、filtD0[x][y]和filtD1[x][y](其中x,y=-2…CtbSizeY+1)导出如下:1) The variables filtH[x][y], filtV[x][y], filtD0[x][y], and filtD1[x][y] (where x, y = -2…CtbSizeY+1) are derived as follows:

如果x和y这两者都是偶数或者x和y这两者都是奇数,则以下适用:If both x and y are even or both x and y are odd, then the following applies:

filtH[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPicture[hxCtb+x-1,vyCtb+y]-recPicture[hxCtb+x+1,vyCtb+y])filtH[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPicture[hxCtb+x-1,vyCtb+y]-recPicture[hxCtb+x+1,vyCtb+y])

filtV[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPicture[hxCtb+x,vyCtb+y-1]-recPicture[hxCtb+x,vyCtb+y+1])filtV[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPicture[hxCtb+x,vyCtb+y-1]-recPicture[hxCtb+x,vyCtb+y+1])

filtD0[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPictur e[hxCtb+x-1,vyCtb+y-1]-recPicture[hxCtb+x+1,vyCtb+y+1])filtD0[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPictur e[hxCtb+x-1,vyCtb+y-1]-recPicture[hxCtb+x+1,vyCtb+y+1])

filtD1[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPicture[hx Ctb+x+1,vyCtb+y-1]-recPicture[hxCtb+x-1,vyCtb+y+1])filtD1[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPicture[hx Ctb+x+1,vyCtb+y-1]-recPicture[hxCtb+x-1,vyCtb+y+1])

否则,filtH[x][y]、filtV[x][y]、filtD0[x][y]和filtD1[x][y]设置为等于0。Otherwise, filtH[x][y], filtV[x][y], filtD0[x][y], and filtD1[x][y] are set to 0.

2)变量varTempH1[x][y]、varTempV1[x][y]、varTempD01[x][y]、varTempD11[x][y]和varTemp[x][y](其中x,y=0...(CtbSizeY-1)>>2)导出如下:2) The variables varTempH1[x][y], varTempV1[x][y], varTempD01[x][y], varTempD11[x][y], and varTemp[x][y] (where x, y = 0...(CtbSizeY-1)>>2) are exported as follows:

sumH[x][y]=ΣiΣj filtH[(x<<2)+i][(y<<2)+j](其中i,j=-2…5)sumH[x][y]=ΣiΣj filtH[(x<<2)+i][(y<<2)+j](where i,j=-2...5)

sumV[x][y]=ΣiΣj filtV[(x<<2)+i][(y<<2)+j](其中i,j=-2…5)sumV[x][y]=ΣiΣj filtV[(x<<2)+i][(y<<2)+j](where i,j=-2…5)

sumD0[x][y]=ΣiΣj filtD0[(x<<2)+i][(y<<2)+j](其中i,j=-2…5)sumD0[x][y]=ΣiΣj filtD0[(x<<2)+i][(y<<2)+j](where i,j=-2...5)

sumD1[x][y]=ΣiΣj filtD1[(x<<2)+i][(y<<2)+j](其中i,j=-2…5)sumD1[x][y]=ΣiΣj filtD1[(x<<2)+i][(y<<2)+j](where i,j=-2...5)

sumOfHV[x][y]=sumH[x][y]+sumV[x][y]sumOfHV[x][y]=sumH[x][y]+sumV[x][y]

3)变量dir1[x][y]、dir2[x][y]和dirS[x][y](其中x,y=0...CtbSizeY-1)导出如下:3) The variables dir1[x][y], dir2[x][y], and dirS[x][y] (where x, y = 0...CtbSizeY-1) are derived as follows:

变量hv1、hv0和dirHV导出如下:The variables hv1, hv0, and dirHV are exported as follows:

如果sumV[x>>2][y>>2]大于sumH[x>>2][y>>2],则以下适用:If sumV[x>>2][y>>2] is greater than sumH[x>>2][y>>2], then the following applies:

hv1=sumV[x>>2][y>>2]hv1 = sumV[x>>2][y>>2]

hv0=sumH[x>>2][y>>2]hv0 = sumH[x>>2][y>>2]

dirHV=1dirHV=1

否则,以下适用:Otherwise, the following applies:

hv1=sumH[x>>2][y>>2]hv1 = sumH[x>>2][y>>2]

hv0=sumV[x>>2][y>>2]hv0 = sumV[x>>2][y>>2]

dirHV=3dirHV=3

变量d1、d0和dirD导出如下:The variables d1, d0, and dirD are derived as follows:

如果sumD0[x>>2][y>>2]大于[x>>2][y>>2],则以下适用:If sumD0[x>>2][y>>2] is greater than [x>>2][y>>2], then the following applies:

d1=sumD0[x>>2][y>>2]d1 = sumD0[x>>2][y>>2]

d0=sumD1[x>>2][y>>2]d0 = sumD1[x>>2][y>>2]

dirD=0dirD=0

否则,以下适用:Otherwise, the following applies:

d1=sumD1[x>>2][y>>2]d1 = sumD1[x>>2][y>>2]

d0=sumD0[x>>2][y>>2]d0 = sumD0[x>>2][y>>2]

dirD=2dirD=2

变量hvd1、hvd0导出如下:The variables hvd1 and hvd0 are exported as follows:

hvd1=(d1*hv0>hv1*d0)?d1:hv1hvd1=(d1*hv0>hv1*d0)? d1:hv1

hvd0=(d1*hv0>hv1*d0)?d0:hv0hvd0=(d1*hv0>hv1*d0)? d0:hv0

变量dirS[x][y]、dir1[x][y]和dir2[x][y]导出如下:The variables dirS[x][y], dir1[x][y], and dir2[x][y] are exported as follows:

dir1[x][y]=(d1*hv0>hv1*d0)?dirD:dirHVdir1[x][y]=(d1*hv0>hv1*d0)? dirD:dirHV

dir2[x][y]=(d1*hv0>hv1*d0)?dirHV:dirDdir2[x][y]=(d1*hv0>hv1*d0)? dirHV:dirD

dirS[x][y]=(hvd1>2*hvd0)?1:((hvd1*2>9*hv d0)?2:0)dirS[x][y]=(hvd1>2*hvd0)? 1:((hvd1*2>9*hv d0)?2:0)

4)变量avgVar[x][y](其中x,y=0…CtbSizeY-1)导出如下:4) The variable avgVar[x][y] (where x, y = 0…CtbSizeY-1) is derived as follows:

varTab[]={0,1,2,2,2,2,2,3,3,3,3,3,3,3,3,4}varTab[]={0,1,2,2,2,2,2,3,3,3,3,3,3,3,3,4}

avgVar[x][y]=varTab[Clip3(0,15,(sumOfHV[x>>2][y>>2]*64)>>(3+BitDepthY))]avgVar[x][y]=varTab[Clip3(0,15,(sumOfHV[x>>2][y>>2]*64)>>(3+BitDepthY))]

5)分类滤波器索引阵列filtIdx[x][y]和转置索引阵列transposeIdx[x][y](其中x=y=0…CtbSizeY-1)导出如下:5) The classification filter index array filtIdx[x][y] and the transpose index array transposeIdx[x][y] (where x = y = 0 … CtbSizeY-1) are derived as follows:

transposeTable[]={0,1,0,2,2,3,1,3}transposeTable[]={0,1,0,2,2,3,1,3}

transposeIdx[x][y]=transposeTable[dir1[x][y]*2+(dir2[x][y]>>1)]transposeIdx[x][y]=transposeTable[dir1[x][y]*2+(dir2[x][y]>>1)]

filtIdx[x][y]=avgVar[x][y]filtIdx[x][y] = avgVar[x][y]

当dirS[x][y]不等于0时,filtIdx[x][y]修改如下:When dirS[x][y] is not equal to 0, filtIdx[x][y] is modified as follows:

filtIdx[x][y]+=(((dir1[x][y]&0x1)<<1)+dirS[x][y])*5filtIdx[x][y]+=(((dir1[x][y]&0x1)<<1)+dirS[x][y])*5

色度样本的编码树块滤波处理Filtering of chroma samples by coding tree blocks

该处理的输入是:自适应环路滤波处理之前的重建色度图片样本阵列recPicture、滤波后的重建色度图片样本阵列alfPicture、指定针对当前图片的左上方样本的当前色度编码树块的左上方样本的色度位置(xCtbC,yCtbC)。The inputs to this process are: the reconstructed chroma image sample array recPicture before adaptive loop filtering, the reconstructed chroma image sample array alfPicture after filtering, and the chroma position (xCtbC, yCtbC) of the top-left sample of the current chroma coding tree block for the top-left sample of the current image.

该过程的输出是修改后的滤波重建色度图片样本阵列alfPicture。The output of this process is a modified filtered and reconstructed chroma image sample array, alfPicture.

当前色度编码树块的大小ctbSizeC导出如下:The current chroma coding tree block size ctbSizeC is exported as follows:

ctbSizeC=CtbSizeY/SubWidthCctbSizeC = CtbSizeY / SubWidthC

对于滤波后的重建色度样本alfPictur[x][y]的导出,当前色度编码树块内的各个重建色度样本recPicture[x][y](其中x,y=0…ctbSizeC-1)被如下滤波:For the derivation of the filtered reconstructed chroma sample alfPictur[x][y], each reconstructed chroma sample recPicture[x][y] (where x, y = 0…ctbSizeC-1) within the current chroma coding tree block is filtered as follows:

给定色度样本阵列recPicture内的各个相应色度样本(x,y)的位置(hx,vy)导出如下:The positions (hx, vy) of each corresponding chroma sample (x, y) within the chroma sample array recPicture are derived as follows:

hx=Clip3(0,pic_width_in_luma_samples/SubWidthC-1,xCtbC+x)hx=Clip3(0,pic_width_in_luma_samples/SubWidthC-1,xCtbC+x)

vy=Clip3(0,pic_height_in_luma_samples/SubHeightC-1,yCtbC+y)vy=Clip3(0,pic_height_in_luma_samples/SubHeightC-1,yCtbC+y)

变量curr导出如下:The variable curr is exported as follows:

curr=recPicture[hx,vy]curr = recPicture[hx, vy]

变量总和导出如下:The sum of the variables is derived as follows:

sum=AlfCoeffC[0]*(Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy+2]-curr)+Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy-2]-curr))sum=AlfCoeffC[0]*(Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy+2]-curr)+Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy-2]-curr))

+AlfCoeffC[1]*(Clip3(-AlfClipC[1],AlfClipC[1],recPicture[hx+1,vy+1]-curr)+Clip3(-AlfClipC[1],AlfClipC[1],recPicture[hx-1,vy-1]-curr))+AlfCoeffC[2]*(Clip3(-AlfClipC[2],AlfClipC[2],recPicture[hx,vy+1]-curr)+Clip3(-AlfClipC[2],AlfClipC[2],recPicture[hx,vy-1]-curr))+AlfCoeffC[1]*(Clip3(-AlfClipC[1],AlfClipC[1],recPicture[hx+1,vy+1]-curr)+Clip3(-AlfClipC[1],AlfClipC[1],recPicture[hx-1,vy-1]-curr ))+AlfCoeffC[2]*(Clip3(-AlfClipC[2],AlfClipC[2],recPicture[hx,vy+1]-curr)+Clip3(-AlfClipC[2],AlfClipC[2],recPicture[hx,vy-1]-curr))

+AlfCoeffC[3]*(Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx-1,vy+1]-curr)+Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx+1,vy-1]-curr))+AlfCoeffC[4]*(Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx+2,vy]-curr)+Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx-2,vy]-curr))+AlfCoeffC[3]*(Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx-1,vy+1]-curr)+Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx+1,vy-1]-curr ))+AlfCoeffC[4]*(Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx+2,vy]-curr)+Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx-2,vy]-curr))

+AlfCoeffC[5]*(Clip3(-AlfClipC[5],AlfClipC[5],recPicture[hx+1,vy]-curr)+Clip3(-AlfClipC[5],AlfClipC[5],recPicture[hx-1,vy]-curr))+AlfCoeffC[5]*(Clip3(-AlfClipC[5],AlfClipC[5],recPicture[hx+1,vy]-curr)+Clip3(-AlfClipC[5],AlfClipC[5],recPicture[hx-1,vy]-curr))

+AlfCoeffC[6]*recPicture[hx,vy]+AlfCoeffC[6]*recPicture[hx,vy]

sum=(sum+64)>>7sum=(sum+64)>>7

修改后的滤波重建色度图像样本alfPicture[xCtbC+x][yCtbC+y]导出如下:The modified filtered and reconstructed chroma image sample alfPicture[xCtbC+x][yCtbC+y] is exported as follows:

alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1<<BitDepthC)-1,sum)alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1<<BitDepthC)-1,sum)

在上述变型中,将限幅操作应用于邻近样本和滤波样本之间的差(即,使用等式(7))。在使用等式(9)的另一变型中,其语义和滤波处理被修改如下(基于上述变型的语义和滤波处理的修改):In the above variant, the clipping operation is applied to the difference between the neighboring samples and the filtered samples (i.e., using equation (7)). In another variant using equation (9), the semantics and filtering are modified as follows (based on the modifications to the semantics and filtering based on the above variant):

AlfCoeffL[filtIdx][12]导出为:AlfCoeffL[filtIdx][12] is exported as:

AlfCoeffL[filtIdx][12]=128-Σk(AlfCoeffL[filtIdx][k]<<1)(k=0...11)AlfCoeffC[6]导出为:AlfCoeffL[filtIdx][12]=128-Σ k (AlfCoeffL[filtIdx][k]<<1)(k=0...11)AlfCoeffC[6] is derived as:

AlfCoeffC[6]=128-Σk(AlfCoeffC[k]<<1)(其中k=0...5)AlfCoeffC[6]=128-Σ k (AlfCoeffC[k]<<1)(where k=0...5)

对AlfCoeffL[filtIdx][12]和AlfCoeffC[6]的位深度的限制(即它们应该在0至2^8-1(包含)的范围内)被放宽到0至2^9-1的范围内或者甚至是0至2^10-1的范围内,以获得更好的滤波性能。The bit depth restrictions on AlfCoeffL[filtIdx][12] and AlfCoeffC[6] (i.e., they should be in the range of 0 to 2^8-1 (inclusive)) are relaxed to the range of 0 to 2^9-1 or even 0 to 2^10-1 to obtain better filtering performance.

这是因为,对于限幅操作,经常发生与邻近样本位置相关联的系数必须更高(绝对值)以获得更好的效率(因为一旦应用非线性函数,滤波器输入样本就更可靠,即更有可能提供更好的滤波)。结果,经常出现这些系数的总和(因此,不包括中心系数)低于-128(在定点表示中),使得中心系数必须高于256(在定点表示中)。因此,将中心系数限制在0至2^8-1的标准范围内意味着编码器需要通过降低其动态/幅度来找到次优系数,从而导致效率较低的滤波。通过对中心系数使用10位精度的标准范围(即0至2^10-1的范围),编码器必须使用次优滤波器系数的频率低得多,因此与8位精度相比,总体滤波质量增加。对于ALF线性滤波,对中心系数的8位的限制不会对滤波效率产生太大的影响,这是因为邻近滤波器输入样本通常具有更小的权重(即,更小的系数)。然而,对于限幅,即ALF非线性滤波,最优滤波器可能会给邻近样本赋予更大的权重,一旦限幅就更可靠。This is because, for clipping operations, the coefficients associated with neighboring sample positions often need to be higher (in absolute value) to achieve better efficiency (because once the nonlinear function is applied, the filter input samples are more reliable, i.e., more likely to provide better filtering). As a result, the sum of these coefficients (and therefore, excluding the center coefficient) often falls below -128 (in fixed-point representation), necessitating that the center coefficient be higher than 256 (in fixed-point representation). Therefore, limiting the center coefficient to the standard range of 0 to 2^8-1 means the encoder needs to find suboptimal coefficients by reducing its dynamics/amplitude, resulting in less efficient filtering. By using the standard range of 10 bits of precision for the center coefficient (i.e., 0 to 2^10-1), the encoder must use suboptimal filter coefficients much less frequently, thus increasing the overall filtering quality compared to 8 bits of precision. For ALF linear filtering, the 8-bit limitation on the center coefficient does not significantly impact filtering efficiency because neighboring filter input samples typically have smaller weights (i.e., smaller coefficients). However, for clipping, i.e., ALF nonlinear filtering, the optimal filter may assign greater weights to neighboring samples, making clipping more reliable.

“亮度样本的编码树块滤波处理”中的变量总和导出如下:sum=filterCoeff[0]*(Clip3(curr-filterClip[0],curr+filterClip[0],recPictureL[hx,vy+3])+Clip3(curr-filterClip[0],curr+filterClip[0],recPictureL[hx,vy-3]))The sum of variables in “Block Filtering of Luminance Samples” is derived as follows: sum=filterCoeff[0]*(Clip3(curr-filterClip[0],curr+filterClip[0],recPictureL[hx,vy+3])+Clip3(curr-filterClip[0],curr+filterClip[0],recPictureL[hx,vy-3]))

+filterCoeff[1]*(Clip3(curr-filterClip[1],curr+filterClip[1],recPictureL[hx+1,vy+2])+Clip3(curr-filterClip[1],curr+filterClip[1],recPictureL[hx-1,vy-2]))+filterCoeff[1]*(Clip3(curr-filterClip[1],curr+filterClip[1],recPictureL[hx+1,vy+2])+Clip3(curr-filterClip[1],curr+filterClip[1],recPictureL[hx-1,vy-2]))

+filterCoeff[2]*(Clip3(curr-filterClip[2],curr+filterClip[2],recPictureL[hx,vy+2])+Clip3(curr-filterClip[2],curr+filterClip[2],recPictureL[hx,vy-2]))+filterCoeff[2]*(Clip3(curr-filterClip[2],curr+filterClip[2],recPictureL[hx,vy+2])+Clip3(curr-filterClip[2],curr+filterClip[2],recPictureL[hx,vy-2]))

+filterCoeff[3]*(Clip3(curr-filterClip[3],curr+filterClip[3],recPictureL[hx-1,vy+2])+Clip3(curr-filterClip[3],curr+filterClip[3],recPictureL[hx+1,vy-2]))+filterCoeff[3]*(Clip3(curr-filterClip[3],curr+filterClip[3],recPictureL[hx-1,vy+2])+Clip3(curr-filterClip[3],curr+filterClip[3],recPictureL[hx+1,vy-2]))

+filterCoeff[4]*(Clip3(curr-filterClip[4],curr+filterClip[4],recPictureL[hx+2,vy+1])+Clip3(curr-filterClip[4],curr+filterClip[4],recPictureL[hx-2,vy-1]))+filterCoeff[4]*(Clip3(curr-filterClip[4],curr+filterClip[4],recPictureL[hx+2,vy+1])+Clip3(curr-filterClip[4],curr+filterClip[4],recPictureL[hx-2,vy-1]))

+filterCoeff[5]*(Clip3(curr-filterClip[5],curr+filterClip[5],recPictureL[hx+1,vy+1])+Clip3(curr-filterClip[5],curr+filterClip[5],recPictureL[hx-1,vy-1]))+filterCoeff[5]*(Clip3(curr-filterClip[5],curr+filterClip[5],recPictureL[hx+1,vy+1])+Clip3(curr-filterClip[5],curr+filterClip[5],recPictureL[hx-1,vy-1]))

+filterCoeff[6]*(Clip3(curr-filterClip[6],curr+filterClip[6],recPictureL[hx,vy+1])+Clip3(curr-filterClip[6],curr+filterClip[6],recPictureL[hx,vy-1]))+filterCoeff[6]*(Clip3(curr-filterClip[6],curr+filterClip[6],recPictureL[hx,vy+1])+Clip3(curr-filterClip[6],curr+filterClip[6],recPictureL[hx,vy-1]))

+filterCoeff[7]*(Clip3(curr-filterClip[7],curr+filterClip[7],recPictureL[hx-1,vy+1])+Clip3(curr-filterClip[7],curr+filterClip[7],recPictureL[hx+1,vy-1]))+filterCoeff[7]*(Clip3(curr-filterClip[7],curr+filterClip[7],recPictureL[hx-1,vy+1])+Clip3(curr-filterClip[7],curr+filterClip[7],recPictureL[hx+1,vy-1]))

+filterCoeff[8]*(Clip3(curr-filterClip[8],curr+filterClip[8],recPictureL[hx-2,vy+1])+Clip3(curr-filterClip[8],curr+filterClip[8],recPictureL[hx+2,vy-1]))+filterCoeff[8]*(Clip3(curr-filterClip[8],curr+filterClip[8],recPictureL[hx-2,vy+1])+Clip3(curr-filterClip[8],curr+filterClip[8],recPictureL[hx+2,vy-1]))

+filterCoeff[9]*(Clip3(curr-filterClip[9],curr+filterClip[9],recPictureL[hx+3,vy])+Clip3(curr-filterClip[9],curr+filterClip[9],recPictureL[hx-3,vy]))+filterCoeff[9]*(Clip3(curr-filterClip[9],curr+filterClip[9],recPictureL[hx+3,vy])+Clip3(curr-filterClip[9],curr+filterClip[9],recPictureL[hx-3,vy]))

+filterCoeff[10]*(Clip3(curr-filterClip[10],curr+filterClip[10],recPictureL[hx+2,vy])+Clip3(curr-filterClip[10],curr+filterClip[10],recPictureL[hx-2,vy]))+filterCoeff[10]*(Clip3(curr-filterClip[10],curr+filterClip[10],recPictureL[hx+2,vy])+Clip3(curr-filterClip[10],curr+filterClip[10],recPictureL[hx-2,vy]))

+filterCoeff[11]*(Clip3(curr-filterClip[11],curr+filterClip[11],recPictureL[hx+1,vy])+Clip3(curr-filterClip[11],curr+filterClip[11],recPictureL[hx-1,vy]))+filterCoeff[11]*(Clip3(curr-filterClip[11],curr+filterClip[11],recPictureL[hx+1,vy])+Clip3(curr-filterClip[11],curr+filterClip[11],recPictureL[hx-1,vy]))

+filterCoeff[12]*recPictureL[hx,vy]+filterCoeff[12]*recPictureL[hx,vy]

sum=(sum+64)>>7sum=(sum+64)>>7

“色度样本的编码树块滤波处理”中的变量总和导出如下:sum=AlfCoeffC[0]*(Clip3(curr-AlfClipC[0],curr+AlfClipC[0],recPicture[hx,vy+2])+Clip3(curr-AlfClipC[0],AlfClipC[0],recPicture[hx,vy-2]))The sum of variables in “color sample coding tree block filtering processing” is derived as follows: sum=AlfCoeffC[0]*(Clip3(curr-AlfClipC[0],curr+AlfClipC[0],recPicture[hx,vy+2])+Clip3(curr-AlfClipC[0],AlfClipC[0],recPicture[hx,vy-2]))

+AlfCoeffC[1]*(Clip3(curr-AlfClipC[1],curr+AlfClipC[1],recPicture[hx+1,vy+1])+Clip3(curr-AlfClipC[1],curr+AlfClipC[1],recPicture[hx-1,vy-1]))+AlfCoeffC[1]*(Clip3(curr-AlfClipC[1],curr+AlfClipC[1],recPicture[hx+1,vy+1])+Clip3(curr-AlfClipC[1],curr+AlfClipC[1],recPicture[hx-1,vy-1]))

+AlfCoeffC[2]*(Clip3(curr-AlfClipC[2],curr+AlfClipC[2],recPicture[hx,vy+1])+Clip3(curr-AlfClipC[2],curr+AlfClipC[2],recPicture[hx,vy-1]))+AlfCoeffC[3]*(Clip3(curr-AlfClipC[3],curr+AlfClipC[3],recPicture[hx-1,vy+1])+Clip3(curr-AlfClipC[3],curr+AlfClipC[3],recPicture[hx+1,vy-1]))+AlfCoeffC[2]*(Clip3(curr-AlfClipC[2],curr+AlfClipC[2],recPicture[hx,vy+1])+Clip3(curr-AlfClipC[2],curr+AlfClipC[2],recPicture[hx,vy-1]))+A lfCoeffC[3]*(Clip3(curr-AlfClipC[3],curr+AlfClipC[3],recPicture[hx-1,vy+1])+Clip3(curr-AlfClipC[3],curr+AlfClipC[3],recPicture[hx+1,vy-1]))

+AlfCoeffC[4]*(Clip3(curr-AlfClipC[4],curr+AlfClipC[4],recPicture[hx+2,vy])+Clip3(curr-AlfClipC[4],curr+AlfClipC[4],recPicture[hx-2,vy]))+AlfCoeffC[5]*(Clip3(curr-AlfClipC[5],curr+AlfClipC[5],recPicture[hx+1,vy])+Clip3(curr-AlfClipC[5],curr+AlfClipC[5],recPicture[hx-1,vy]))+AlfCoeffC[6]*recPicture[hx,vy]+AlfCoeffC[4]*(Clip3(curr-AlfClipC[4],curr+AlfClipC[4],recPicture[hx+2,vy])+Clip3(curr-AlfClipC[4],curr+AlfClipC[4],recPicture[hx-2,vy]))+AlfCoeffC[5]*( Clip3(curr-AlfClipC[5],curr+AlfClipC[5],recPicture[hx+1,vy])+Clip3(curr-AlfClipC[5],curr+AlfClipC[5],recPicture[hx-1,vy]))+AlfCoeffC[6]*recPicture[hx,vy]

sum=(sum+64)>>7sum=(sum+64)>>7

在使用用于亮度滤波器的5×5菱形滤波形状的另一变型中(为了减少应用ALF所需的缓冲行的数量),该变型还使用应用于邻近样本值和中心样本值之间的差的限幅,表4的非线性ALF数据语法被如下修改(对先前呈现的ALF数据语法所做的改变都带有下划线和粗体,并且尽可能省略重复部分):In another variation using the 5×5 diamond filter shape for the brightness filter (to reduce the number of buffer rows required for ALF application), this variation also uses a limiting applied to the difference between neighboring sample values and the center sample value. The nonlinear ALF data syntax in Table 4 is modified as follows (changes to the previously presented ALF data syntax are underlined and bolded, and repetitions are omitted where possible):

表5-非线性ALF数据语法的修改部分Table 5 - Modifications to the nonlinear ALF data syntax

亮度滤波器的ALF系数的数量变为13,因此最后的系数滤波器初始化处理变为:The number of ALF coefficients in the luminance filter becomes 13, therefore the final coefficient filter initialization process becomes:

对于filtIdx=0..NumAlfFilters-1的最后的滤波器系数AlfCoeffL[filtIdx][6]导出如下:The final filter coefficients AlfCoeffL[filtIdx][ 6 ] for filtIdx = 0..NumAlfFilters-1 are derived as follows:

AlfCoeffL[filtIdx][6]=128AlfCoeffL[filtIdx][ 6 ] = 128

位流一致性的要求是AlfCoeffL[filtIdx][j](其中iltIdx=0…NumAlfFilters-1,j=0…11)应在-2^7至2^7-1(包含)范围内,并且AlfCoeffL[filtIdx][6]的值应在0至2^8-1(包含)范围内。The requirement for bitstream consistency is that AlfCoeffL[filtIdx][j] (where iltIdx = 0…NumAlfFilters-1, j = 0…11) should be in the range of -2^7 to 2^7-1 (inclusive), and the value of AlfCoeffL[filtIdx][ 6 ] should be in the range of 0 to 2^8-1 (inclusive).

对于“亮度样本的编码树块滤波处理”,滤波器索引子句“亮度样本的ALF转置和滤波器索引的导出处理”的导出处理修改如下(对先前呈现的ALF数据语法所做的改变都带有下划线和粗体,并且尽可能省略重复部分):For "Card block filtering of luminance samples", the export processing of the filter index clause "ALF transpose of luminance samples and export processing of filter index" is modified as follows (changes to the previously presented ALF data syntax are underlined and bolded, and repeated parts are omitted as much as possible):

滤波器索引子句“亮度样本的ALF转置和滤波器索引的导出处理”的导出处理以位置(xCtb,yCtb)和重建的亮度图片样本阵列recPictureL作为输入、并且filtIdx[x][y]和transposeIdx[x][y](其中x,y=0…CtbSizeY-1)作为输出来调用。The export processing of the filter index clause "ALF transpose of luminance samples and export processing of filter index" is invoked with the position (xCtb, yCtb) and the reconstructed luminance image sample array recPictureL as inputs, and with filtIdx[x][y] and transposeIdx[x][y] (where x, y = 0…CtbSizeY-1) as outputs.

对于滤波后的重建亮度样本alfPictureL[x][y]的导出,当前亮度编码树块内的各个重建亮度样本recPictureL[x][y](其中x,y=0…CtbSizeY-1)被如下滤波:For the derivation of the filtered reconstructed luminance sample alfPictureL[x][y], each reconstructed luminance sample recPictureL[x][y] (where x, y = 0…CtbSizeY-1) within the current luminance coding tree block is filtered as follows:

与由filtIdx[x][y]指定的滤波器相对应的亮度滤波器系数阵列f[j]和亮度滤波器限幅阵列c[j](其中j=0…6)如下导出:The luminance filter coefficient array f[j] and luminance filter limiting array c[j] (where j = 0… 6 ) corresponding to the filter specified by filtIdx[x][y] are derived as follows:

f[j]=AlfCoeffL[filtIdx[x][y]][j]f[j]=AlfCoeffL[filtIdx[x][y]][j]

c[j]=AlfClipL[filtIdx[x][y]][j]c[j]=AlfClipL[filtIdx[x][y]][j]

根据transposeIdx[x][y]如下导出亮度滤波器系数filterCoeff和滤波器限幅值filterClip:Based on transposeIdx[x][y], derive the brightness filter coefficients filterCoeff and filter clipping value filterClip as follows:

如果transposeIndex[x][y]=1,If transposeIndex[x][y] = 1,

filterCoeff[]={f[4],f[1],f[5],f[3],f[0],f[2],f[6]} filterCoeff[]= {f[4],f[1],f[5],f[3],f[0],f[2],f[6]}

filterClip[]={c[4],c[1],c[5],c[3],c[0],c[2],c[6]} filterClip[]= {c[4],c[1],c[5],c[3],c[0],c[2],c[6]}

否则,如果transposeIndex[x][y]==2,Otherwise, if transposeIndex[x][y] == 2,

filterCoeff[]={f[0],f[3],f[2],f[1],f[4],f[5],f[6]} filterCoeff[]= {f[0],f[3],f[2],f[1],f[4],f[5],f[6]}

filterClip[]={c[0],c[3],c[2],c[1],c[4],c[5],c[6]} filterClip[]= {c[0],c[3],c[2],c[1],c[4],c[5],c[6]}

否则,如果transposeIndex[x][y]==3,Otherwise, if transposeIndex[x][y] == 3,

filterCoeff[]={f[4],f[3],f[5],f[1],f[0],f[2],f[6]} filterCoeff[]= {f[4],f[3],f[5],f[1],f[0],f[2],f[6]}

filterClip[]={c[4],c[3],c[5],c[1],c[0],c[2],c[6]} filterClip[]= {c[4],c[3],c[5],c[1],c[0],c[2],c[6]}

否则,otherwise,

filterCoeff[]={f[0],f[1],f[2],f[3],f[4],f[5],f[6]} filterCoeff[]= {f[0],f[1],f[2],f[3],f[4],f[5],f[6]}

filterClip[]={c[0],c[1],c[2],c[3],c[4],c[5],c[6]} filterClip[]= {c[0],c[1],c[2],c[3],c[4],c[5],c[6]}

给定亮度样本阵列recPicture内的各个相应亮度样本(x,y)的位置(hx,vy)导出如下:The positions (hx, vy) of each corresponding luminance sample (x, y) within the luminance sample array recPicture are derived as follows:

hx=Clip3(0,pic_width_in_luma_samples-1,xCtb+x)hx=Clip3(0,pic_width_in_luma_samples-1,xCtb+x)

vy=Clip3(0,pic_height_in_luma_samples-1,yCtb+y)vy=Clip3(0,pic_height_in_luma_samples-1,yCtb+y)

变量curr导出如下:curr=recPictureL[hx,vy]The variable curr is derived as follows: curr = recPictureL[hx, vy]

变量总和导出如下:The sum of the variables is derived as follows:

sum=filterCoeff[0]*(Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy+2]-curr)+Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy-2]-curr))sum=filterCoeff[0]*(Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy+2]-curr)+Clip3(-filterClip[0],filterClip[0],recPictureL[hx,vy-2]-curr))

+filterCoeff[1]*(Clip3(-filterClip[1],filterClip[1],recPictureL[hx+1,vy+1]-curr)+Clip3(-filterClip[1],filterClip[1],recPictureL[hx-1,vy-1]-curr))+filterCoeff[1]*(Clip3(-filterClip[1],filterClip[1],recPictureL[hx+1,vy+1]-curr)+Clip3(-filterClip[1],filterClip[1],recPictureL[hx-1,vy-1]-curr))

+filterCoeff[2]*(Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy+1]-curr)+Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy-1]-curr))+filterCoeff[2]*(Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy+1]-curr)+Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy-1]-curr))

+filterCoeff[3]*(Clip3(-filterClip[3],filterClip[3],recPictureL[hx-1,vy+1]-curr)+Clip3(-filterClip[3],filterClip[3],recPictureL[hx+1,vy-1]-curr))+filterCoeff[3]*(Clip3(-filterClip[3],filterClip[3],recPictureL[hx-1,vy+1]-curr)+Clip3(-filterClip[3],filterClip[3],recPictureL[hx+1,vy-1]-curr))

+filterCoeff[4]*(Clip3(-filterClip[4],filterClip[4],recPictureL[hx+2,vy]-curr)+Clip3(-filterClip[4],filterClip[4],recPictureL[hx-2,vy]-curr))+filterCoeff[4]*(Clip3(-filterClip[4],filterClip[4],recPictureL[hx+2,vy]-curr)+Clip3(-filterClip[4],filterClip[4],recPictureL[hx-2,vy]-curr))

+filterCoeff[5]*(Clip3(-filterClip[5],filterClip[5],recPictureL[hx+1,vy]-curr)+Clip3(-filterClip[5],filterClip[5],recPictureL[hx-1,vy]-curr))+filterCoeff[5]*(Clip3(-filterClip[5],filterClip[5],recPictureL[hx+1,vy]-curr)+Clip3(-filterClip[5],filterClip[5],recPictureL[hx-1,vy]-curr))

+filterCoeff[6]*recPictureL[hx,vy]+filterCoeff[6]*recPictureL[hx,vy]

sum=(sum+64)>>7sum=(sum+64)>>7

修改后的滤波重建亮度图像样本alfPictureL[xCtb+x][yCtb+y]导出如下:alfPictureL[xCtb+x][yCtb+y]=Clip3(0,(1<<BitDepthY)-1,sum)The modified filtered and reconstructed luminance image sample alfPictureL[xCtb+x][yCtb+y] is exported as follows: alfPictureL[xCtb+x][yCtb+y]=Clip3(0,(1<<BitDepthY)-1,sum)

在不使用邻近和中心之间的差的变型中,使用AlfCoeffL[filtIdx][6]=128-Σk(AlfCoeffL[filtIdx][k]<<1)(其中k=0…5)。对于滤波,也对滤波中的限幅参数进行类似的改变。In the variant that does not use the difference between neighbors and the center, AlfCoeffL[filtIdx][ 6 ] = 128 - Σk (AlfCoeffL[filtIdx][k] << 1) (where k = 0… 5 ). A similar change is made to the limiting parameter in the filtering process.

在另一变型中,使用7×7菱形形状作为滤波器,但使用图16-a的限幅图案1601作为亮度滤波器,以及使用图16-b的限幅图案1605作为色度滤波器,表4的非线性ALF数据语法被修改如下(对表4的先前呈现的ALF数据语法所做的改变都带有下划线和粗体,并且尽可能省略重复部分):In another variation, a 7×7 rhombus shape is used as the filter, but the limiting pattern 1601 of Figure 16-a is used as the luminance filter, and the limiting pattern 1605 of Figure 16-b is used as the chrominance filter. The nonlinear ALF data syntax in Table 4 is modified as follows (the changes made to the previously presented ALF data syntax in Table 4 are underlined and bolded, and repeated parts are omitted as much as possible):

表6-非线性ALF数据语法的修改部分Table 6 - Modifications to the nonlinear ALF data syntax

AlfClipPatL[]是亮度滤波器的恒定限幅图案表,并且设置如下:AlfClipPatL[]={0,0,1,0,0,0,1,0,0,0,1,1}AlfClipPatL[] is a constant limiting pattern table for the brightness filter, and is set as follows: AlfClipPatL[] = {0,0,1,0,0,0,1,0,0,0,1,1}

AlfClipPatC[]是色度滤波器的恒定限幅图案表,并且设置如下:AlfClipPatC[]={1,1,0,1,1,0}AlfClipPatC[] is a constant clipping pattern table for the chromaticity filter, and it is set as follows: AlfClipPatC[] = {1,1,0,1,1,0}

部分语义修改如下:Some semantic modifications are as follows:

“亮度样本的编码树块滤波处理”中的变量总和导出如下:The total variables in "Encoded Tree Block Filtering Process for Luminance Samples" are derived as follows:

sum=filterCoeff[0]*(recPictureL[hx,vy+3]-curr+recPicture L[hx,vy-3]-curr)sum=filterCoeff[0]*(recPictureL[hx,vy+3]-curr+recPicture L[hx,vy-3]-curr)

+filterCoeff[1]*(recPictureL[hx+1,vy+2]-curr)+recPictur eL[hx-1,vy-2]-curr)+filterCoeff[1]*(recPictureL[hx+1,vy+2]-curr)+recPictur eL[hx-1,vy-2]-curr)

+filterCoeff[2]*(Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy+2]-curr)+Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy-2]-curr))+filterCoeff[2]*(Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy+2]-curr)+Clip3(-filterClip[2],filterClip[2],recPictureL[hx,vy-2]-curr))

+filterCoeff[3]*(recPictureL[hx-1,vy+2]-curr+recPicture L[hx+1,vy-2]-curr)+filterCoeff[3]*(recPictureL[hx-1,vy+2]-curr+recPicture L[hx+1,vy-2]-curr)

+filterCoeff[4]*(recPictureL[hx+2,vy+1]-curr+recPicture L[hx-2,vy-1]-curr)+filterCoeff[4]*(recPictureL[hx+2,vy+1]-curr+recPicture L[hx-2,vy-1]-curr)

+filterCoeff[5]*(recPictureL[hx+1,vy+1]-curr+recPicture L[hx-1,vy-1]-curr)+filterCoeff[5]*(recPictureL[hx+1,vy+1]-curr+recPicture L[hx-1,vy-1]-curr)

+filterCoeff[6]*(Clip3(-filterClip[6],filterClip[6],recPictureL[hx,vy+1]-curr)+Clip3(-filterClip[6],filterClip[6],recPictureL[hx,vy-1]-curr))+filterCoeff[6]*(Clip3(-filterClip[6],filterClip[6],recPictureL[hx,vy+1]-curr)+Clip3(-filterClip[6],filterClip[6],recPictureL[hx,vy-1]-curr))

+filterCoeff[7]*(recPictureL[hx-1,vy+1]-curr+recPicture L[hx+1,vy-1]-curr)+filterCoeff[7]*(recPictureL[hx-1,vy+1]-curr+recPicture L[hx+1,vy-1]-curr)

+filterCoeff[8]*(recPictureL[hx-2,vy+1]-curr+recPicture L[hx+2,vy-1]-curr)+filterCoeff[8]*(recPictureL[hx-2,vy+1]-curr+recPicture L[hx+2,vy-1]-curr)

+filterCoeff[9]*(recPictureL[hx+3,vy]-curr)+recPictureL[hx-3,vy]-curr)+filterCoeff[9]*(recPictureL[hx+3,vy]-curr)+recPictureL[hx-3,vy]-curr)

+filterCoeff[10]*(Clip3(-filterClip[10], filterClip[10],recPictureL[hx+2,vy]-curr)+Clip3(-filterClip[10],filterClip[10],recPictureL[hx-2,vy]-curr))+filterCoeff[10]*(Clip3(-filterClip[10], filterClip[10],recPictureL[hx+2,vy]-curr)+Clip3(-filterClip[10],filterClip[10],recPictureL[hx-2,vy]-curr))

+filterCoeff[11]*(Clip3(-filterClip[11], filterClip[11],recPictureL[hx+1,vy]-curr)+ Clip3(-filterClip[11],filterClip[11],recPictureL[hx-1,vy]-curr))+filterCoeff[11]*(Clip3(-filterClip[11], filterClip[11],recPictureL[hx+1,vy]-curr)+ Clip3(-filterClip[11],filterClip[11],recPictureL[hx-1,vy]-curr))

+filterCoeff[12]*recPictureL[hx,vy]+filterCoeff[12]*recPictureL[hx,vy]

sum=(sum+64)>>7sum=(sum+64)>>7

“色度样本的编码树块滤波处理”中的变量总和导出如下:sum=AlfCoeffC[0]*(Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy+2]-curr)+Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy-2]-curr))The sum of variables in “color sample coding tree block filtering processing” is derived as follows: sum=AlfCoeffC[0]*(Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy+2]-curr)+Clip3(-AlfClipC[0],AlfClipC[0],recPicture[hx,vy-2]-curr))

+AlfCoeffC[1]*(Clip3(-AlfClipC[1],AlfClipC[1],recPicture[hx+1,vy+1]-curr)+Clip3(-AlfClipC[1],AlfClipC[1],recPicture[hx-1,vy-1]-curr))+AlfCoeffC[2]*(recPicture[hx,vy+1]-curr+recPicture[hx,vy-1]-curr)+AlfCoeffC[1]*(Clip3(-AlfClipC[1],AlfClipC[1],recPicture[hx+1,vy+1]-curr)+Clip3(-AlfClipC[1],AlfCli pC[1],recPicture[hx-1,vy-1]-curr))+AlfCoeffC[2]*(recPicture[hx,vy+1]-curr+recPicture[hx,vy-1]-curr)

+AlfCoeffC[3]*(Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx-1,vy+1]-curr)+Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx+1,vy-1]-curr))+AlfCoeffC[4]*(Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx+2,vy]-curr)+Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx-2,vy]-curr))+AlfCoeffC[3]*(Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx-1,vy+1]-curr)+Clip3(-AlfClipC[3],AlfClipC[3],recPicture[hx+1,vy-1]-curr ))+AlfCoeffC[4]*(Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx+2,vy]-curr)+Clip3(-AlfClipC[4],AlfClipC[4],recPicture[hx-2,vy]-curr))

+AlfCoeffC[5]*(recPicture[hx+1,vy]-curr+recPicture[hx-1,vy]-curr)+AlfCoeffC[5]*(recPicture[hx+1,vy]-curr+recPicture[hx-1,vy]-curr)

+AlfCoeffC[6]*recPicture[hx,vy]+AlfCoeffC[6]*recPicture[hx,vy]

应当理解,根据上述变型以及使用减少的限幅数量的其它变型(即,减少的限幅位置的数量,例如,对于亮度成分,不对当前(中心)样本值“curr”应用限幅以使得不存在“f[12]”、不存在“c[12]”,不存在“filterCoeff[12]”,并且“sum=curr+((sum+64)>>7)”(如等式(17)和图7)和/或不使用邻近样本和中心样本之间的差,可以容易地导出使用其它限幅图案的其它变型。It should be understood that, based on the above variations and other variations using a reduced number of limiting positions (i.e., a reduced number of limiting positions, for example, for the luminance component, not applying limiting to the current (center) sample value “curr” so that “f[12]”, “c[12]”, “filterCoeff[12]” are not present, and “sum=curr+((sum+64)>>7)” (as in Equation (17) and Figure 7) and/or not using the difference between neighboring samples and the center sample, other variations using other limiting patterns can be readily derived.

图8是根据本发明实施例的当图7中的滤波器的非线性部分被禁用时获得的线性滤波器的框图。根据实施例,当ALF有效且非线性ALF无效时,线性ALF用于滤波。在这种实施例的变型中,非线性ALF如由等式(7)定义且如图7所示那样使用,而不是使用如由等式(4)定义且如图6所示那样的线性ALF,线性滤波如由等式(6)定义且如图8所示那样进行。在硬件设计中,允许在非线性滤波器和线性滤波器之间共用公共电路部分。当比较图7和图8时,最小/最大(min/max)操作就被旁路,直接进行到样本值。使用这种方法的另一个优点是,当编码器设计其滤波器时,它不必确保各个滤波器的所有滤波器系数之和为1。这种设计的结果是,除了当前样本之外,针对每个系数添加一个减法,并且去除当前样本的一个乘法。Figure 8 is a block diagram of a linear filter obtained according to an embodiment of the present invention when the nonlinear portion of the filter in Figure 7 is disabled. According to the embodiment, the linear ALF is used for filtering when the ALF is active and the nonlinear ALF is inactive. In a variation of this embodiment, the nonlinear ALF is used as defined by equation (7) and as shown in Figure 7, instead of the linear ALF as defined by equation (4) and as shown in Figure 6, and linear filtering is performed as defined by equation (6) and as shown in Figure 8. In the hardware design, it is permissible to share common circuitry between the nonlinear filter and the linear filter. When comparing Figures 7 and 8, the min/max operation is bypassed, and the process proceeds directly to the sample value. Another advantage of using this method is that when the encoder designs its filters, it does not have to ensure that the sum of all filter coefficients of each filter is 1. The result of this design is that, in addition to the current sample, a subtraction is added for each coefficient, and a multiplication of the current sample is removed.

当限幅参数可取的最大值足够低时,图7的设计还具有节省用于实现乘法的硬件位的优点。When the maximum value of the limiting parameter is sufficiently low, the design in Figure 7 also has the advantage of saving hardware bits used to implement multiplication.

根据实施例,在图5中的片头部中用信号通知的ALF的语法元素不再在片头部中用信号通知,而是在例如图片头部中的帧级别用信号通知。然后,在片头部中存在一个或多个标志/语法元素,以用信号通知在帧级别提供的参数直接用于片中;或者在帧级别提供的参数必须在片级别“刷新”(即更新)。片级别的刷新在片头部中完成。滤波器系数和/或限幅参数的刷新通过编码在帧级别指示的值和在片中使用的值之间的差来完成。根据实施例,片头部中的附加语法元素指示滤波器系数和/或限幅参数的值是否在片头部中编码为差,或者指示是否对它们的值编码。According to an embodiment, the syntax elements of the ALF that are signaled in the slice header in FIG5 are no longer signaled in the slice header, but are signaled at the frame level, such as in the image header. Then, one or more flags/syntax elements exist in the slice header to signal that parameters provided at the frame level are directly used in the slice; or that parameters provided at the frame level must be "refreshed" (i.e., updated) at the slice level. Slice-level refreshes are performed in the slice header. Refreshing filter coefficients and/or limiting parameters is accomplished by encoding the difference between the values indicated at the frame level and the values used in the slice. According to an embodiment, additional syntax elements in the slice header indicate whether the values of filter coefficients and/or limiting parameters are encoded as differences in the slice header, or indicate whether their values are encoded.

根据实施例,可以以更细粒度级别(例如针对各个CTU)更新在片级别(在片头部中)定义的滤波器系数和/或限幅参数。指示是否必须进行更新的语法元素以及当语法元素指示必须进行更新时的更新数据被熵编码在片数据中。在一个实施例中,在编码位流中,对于各个CTU,编码片数据包括一个熵编码标志,该标志指示是否必须更新亮度滤波器/限幅参数。如果标志指示应进行更新,则对于各个滤波器系数表,熵编码标志指示是否必须更新滤波器。如果必须更新滤波器,则对系数的偏移(与片中的参考值的差或者与属于同一片的先前编码的CTU中的参考值的差)和/或限幅参数的偏移进行熵编码。According to embodiments, filter coefficients and/or limiting parameters defined at the slice level (in the slice header) can be updated at a finer granular level (e.g., for each individual CTU). Syntax elements indicating whether an update is necessary, and update data when the syntax elements indicate that an update is necessary, are entropy-encoded in the slice data. In one embodiment, in the coded bitstream, for each CTU, the coded slice data includes an entropy-encoded flag indicating whether the luma filter/limiting parameter must be updated. If the flag indicates that an update should be performed, then for each filter coefficient table, the entropy-encoded flag indicates whether the filter must be updated. If the filter must be updated, the offsets of the coefficients (differences from reference values in the slice or from reference values in previously coded CTUs belonging to the same slice) and/or the offsets of the limiting parameters are entropy-encoded.

根据实施例,从编码器的角度来看,保持参考图9描述的VTM-3.0的ALF编码处理的主要逻辑步骤。主要变化是为了构建滤波器而提取的统计的性质,以及确定滤波器的方式。代替简单的Wiener滤波计算,迭代优化限幅参数以找到最佳限幅参数和相关联的非线性Wiener滤波器系数。According to the embodiment, from the encoder's perspective, the main logical steps of the ALF encoding process of VTM-3.0 described with reference to Figure 9 are retained. The main changes are the statistical properties extracted for filter construction and the way the filter is determined. Instead of simple Wiener filter calculations, the limiting parameters are iteratively optimized to find the optimal limiting parameters and associated nonlinear Wiener filter coefficients.

根据实施例,我们定义了一个限幅参数可取的值的数量的限制NK。NK可以是小的,例如NK=12或者甚至更小。然后,代替计算协方差和互协方差矩阵统计,在步骤902中,编码器构建NK×NK限幅协方差矩阵统计的双项表E以及限幅互协方差矩阵统计NK的单项表y(代替一个协方差矩阵统计和一个互协方差矩阵统计)。According to the embodiment, we define a limit NK of the number of possible values for the limiting parameter. NK can be small, for example, NK = 12 or even smaller. Then, instead of calculating the covariance and cross-covariance matrix statistics, in step 902, the encoder constructs a bi-item table E of the NK × NK limiting covariance matrix statistics and a single-item table y of the limiting cross-covariance matrix statistics NK (instead of one covariance matrix statistics and one cross-covariance matrix statistics).

限幅协方差矩阵Ec[a][b]是从(其中Xm包含在使用第Cm个限幅值时的输入的N个实现(观察的值))估计的协方差矩阵。例如,使用图4-b的形状,是针对给定样本位置获得的Xm的第i列,并且包含:对于i<Nc(对于图4-b的亮度滤波器,Nc=12是滤波器系数的数量减去1),针对形状中具有索引i的两个对称相邻位置,使用第m个限幅值对(第j个滤波样本的)邻近样本和第j个滤波样本之差进行限幅的结果之和;并且对于i=12,第j个滤波样本;其中是矩阵Xm中行i和列j处的值。The limiting covariance matrix E <sub>c</sub> [a][b] is the covariance matrix estimated from (where X <sub>m </sub> contains N implementations (observed values) of the input when using the C<sub> m </sub>-th limiting value). For example, using the shape of Figure 4-b, is the i-th column of X <sub>m </sub> obtained for a given sample position and contains: for i <N<sub>c</sub> (for the brightness filter of Figure 4-b, N<sub>c</sub> = 12 is the number of filter coefficients minus 1), the sum of the results of limiting the difference between the neighboring sample (of the j-th filtered sample) and the j-th filtered sample using the m-th limiting value for two symmetrically adjacent positions with index i in the shape; and for i = 12, the j-th filtered sample; where is the value at row i and column j in matrix X<sub> m </sub>.

限幅互协方差矩阵yc[c]是期望滤波器输出(即原始样本)的实现与Xc的实现之间的互协方差矩阵。The amplitude-limited cross-covariance matrix yc [c] is the cross-covariance matrix between the realization of the desired filter output (i.e. the original sample) and the realization of Xc .

因此,当我们需要使用等于限幅参数来构建/测试滤波器时,我们定义(例如,对于亮度滤波器,Nc=12是滤波器系数的数量减去1,最后值等于零是方便的,其它值可以被使用并且具有相同的结果(因为中心系数12未被限幅))。我们计算协方差矩阵E和互协方差矩阵y,这些限幅参数使得E[i,j]=Ec[c[i]][c[j]][i,j](针对各个i<Nc,j<Nc)并且y[k]=yc[c[k]][k](针对各个k<Nc)。然后,如前面对线性ALF的说明那样,我们使用这两个矩阵来构建Wiener滤波器。Therefore, when we need to construct/test filters using parameters equal to the limiting parameters, we define (e.g., for a brightness filter, N <sub>c</sub> = 12 is the number of filter coefficients minus 1; it's convenient for the final value to be zero, other values can be used and have the same result (because the center coefficient 12 is not limited)). We compute the covariance matrix E and the cross-covariance matrix y, these limiting parameters such that E[i,j] = E <sub>c</sub> [c[i]][c[j]][i,j] (for each i <N<sub>c</sub> , j <N<sub>c</sub> ) and y[k] = y <sub>c</sub>[c[k]][k] (for each k <N<sub>c</sub> ). Then, as explained earlier for linear ALF, we use these two matrices to construct the Wiener filter.

在步骤904中,代替对协方差和互协方差矩阵的统计进行组合,编码器组合各个限幅协方差和限幅互协方差矩阵的统计(这里也是通过对统计加和来进行组合)。In step 904, instead of combining the statistics of the covariance and cross-covariance matrices, the encoder combines the statistics of each limiting covariance and limiting cross-covariance matrix (which is also done by summing the statistics).

在步骤905中,用于找到优化的滤波器组(即,优化的合并滤波器)的方法与之前类似。主要区别在于,对于各个测试/比较的滤波器,代替仅计算一个Wiener滤波器而是迭代地优化限幅参数,各个步骤针对特定限幅参数计算Wiener滤波器,以最小化滤波器的输出误差(基于统计矩阵计算)。简单的优化算法是从所有限幅参数值(ci)被设置为零开始(或者替代地中间限幅值或任何默认值),然后在循环中进行以下步骤,同时改进滤波器(即,减少输出误差):对于各个限幅参数值,如果利用下一个限幅参数值(如果可用/允许)(即,索引<最大索引值)计算的Wiener滤波器更好,则取该限幅参数值,或者如果利用先前的限幅参数值(如果可用/允许(即索引>0))计算的Wiener滤波器更好,则采用该限幅参数值。对两个滤波器进行分组时,一种策略可能是以将各个限幅参数值设置为两个滤波器的各个限幅参数值的平均值来开始优化。In step 905, the method for finding the optimized filter bank (i.e., the optimized combined filter) is similar to before. The main difference is that, for each test/comparison filter, instead of calculating only one Wiener filter, the limiting parameters are iteratively optimized. Each step calculates a Wiener filter for a specific limiting parameter to minimize the filter's output error (based on statistical matrix calculations). A simple optimization algorithm starts by setting all limiting parameter values ( ci ) to zero (or alternatively, intermediate limiting values or any default values), and then iteratively performs the following steps while improving the filter (i.e., reducing output error): for each limiting parameter value, if the Wiener filter calculated using the next limiting parameter value (if available/allowed) (i.e., index < maximum index value) is better, then that limiting parameter value is adopted; or if the Wiener filter calculated using the previous limiting parameter value (if available/allowed (i.e., index > 0)) is better, then that limiting parameter value is adopted. When grouping two filters, one strategy might be to start optimization by setting each limiting parameter value to the average of the individual limiting parameter values of the two filters.

对步骤906、907、908、909、910和911没有实际改变。There are no actual changes to steps 906, 907, 908, 909, 910, and 911.

在步骤912中,组合统计变化与步骤904中描述的相同。在步骤913中对色度滤波器的确定与针对步骤905描述的滤波器优化相对应。除了步骤918之外,其它步骤不改变,在步骤918中,ALF参数包括针对各个滤波器确定的限幅参数。In step 912, the combined statistical changes are the same as described in step 904. The determination of the chroma filter in step 913 corresponds to the filter optimization described in step 905. Except for step 918, the other steps remain unchanged, in which the ALF parameters include the limiting parameters determined for each filter.

注意,在具有“正常”ALF的VTM-3.0中,当编码器从浮点值导出整数滤波器系数时,它首先进行浮点值到定点值的量化:对于各个滤波器系数,它将滤波器系数乘以定点精度舍入到最近的整数值。然后试图通过迭代地调整滤波器系数(以补偿舍入误差)来提高滤波器效率。编码器还必须确保所有滤波器系数的总和等于1(乘以定点精度),并且中心样本的滤波器系数不超过最大值(以确保其在乘法中的使用不会最终使用太多位)。Note that in VTM-3.0 with a "normal" ALF, when the encoder derives integer filter coefficients from floating-point values, it first performs floating-point to fixed-point quantization: for each filter coefficient, it multiplies the filter coefficient by the fixed-point precision and rounds it to the nearest integer value. It then attempts to improve filter efficiency by iteratively adjusting the filter coefficients (to compensate for rounding errors). The encoder must also ensure that the sum of all filter coefficients equals 1 (multiplied by the fixed-point precision) and that the filter coefficient of the center sample does not exceed its maximum value (to ensure that its use in multiplication does not end up using too many bits).

在本发明的实施例中,其中与邻近样本的差被用作滤波器的输入,这是因为中心系数总是1,因此不需要确保其不超过最大值。此外,不需要总是跟踪所有滤波器系数的总和的值。In embodiments of the invention, the difference with neighboring samples is used as the input to the filter because the center coefficient is always 1, so it is not necessary to ensure that it does not exceed the maximum value. Furthermore, it is not always necessary to track the sum of all filter coefficients.

这些实施例的优点是提高编码效率。The advantage of these embodiments is improved coding efficiency.

这些实施例的描述提到亮度和色度成分,但是可以容易地调整适用于其它成分(诸如单个亮度成分或RGB成分)。The descriptions of these embodiments mention luminance and chromaticity components, but can be easily adjusted to apply to other components (such as a single luminance component or RGB components).

在前述实施例或变型中,本发明使得修改图3-a和图4-a中的304和407中的滤波以对滤波器输入使用非线性函数来获得非线性滤波效果。还修改了图2以添加用于用信号通知非线性函数的附加参数的新语法元素(参考图5描述了实施例的示例)。隐含地,修改302和402中的输入滤波参数以进一步包括用于非线性函数的附加参数。最后,修改303和406中的滤波器推导以导出滤波器的非线性函数(即导出“非线性滤波器”)。因此,在大多数情况下,输出图像部分305和408与在VTM-3.0中产生的输出图像部分不同,并且对于等效/可比较输入样本具有更高的质量,以及/或者在输出图像质量和编码效率之间实现更好的折衷。应当理解,在另一实施例/变型中,ALF本身被修改,使得其使用任何前述非线性函数来操作以进行滤波。In the foregoing embodiments or variations, the present invention modifies the filters in 304 and 407 of Figures 3-a and 4-a to use a nonlinear function on the filter input to obtain a nonlinear filtering effect. Figure 2 is also modified to add new syntax elements for signaling additional parameters of the nonlinear function (an example of the embodiment is described with reference to Figure 5). Implicitly, the input filter parameters in 302 and 402 are modified to further include additional parameters for the nonlinear function. Finally, the filter derivation in 303 and 406 is modified to derive the nonlinear function of the filter (i.e., derive the “nonlinear filter”). Therefore, in most cases, the output image portions 305 and 408 differ from the output image portions produced in VTM-3.0 and have higher quality for equivalent/comparable input samples, and/or achieve a better trade-off between output image quality and coding efficiency. It should be understood that in another embodiment/variation, the ALF itself is modified such that it operates using any of the aforementioned nonlinear functions for filtering.

本发明实施例的实现Implementation of the embodiments of the present invention

一个或多个前述实施例可以以进行一个或多个前述实施例的方法步骤的编码器或解码器的形式来实现。下面的实施例示出这种实现。One or more of the foregoing embodiments can be implemented in the form of an encoder or decoder that performs the method steps of one or more of the foregoing embodiments. The following embodiments illustrate such an implementation.

例如,根据前述任何实施例的自适应环路滤波器可以用于由图10中的编码器进行的后滤波9415或由图11中的解码器进行的后滤波9567。For example, the adaptive loop filter according to any of the foregoing embodiments can be used for post-filtering 9415 performed by the encoder in FIG10 or post-filtering 9567 performed by the decoder in FIG11.

图10示出根据本发明实施例的编码器的框图。编码器由连接的模块表示,各个模块适于例如以由装置的中央处理单元(CPU)执行的编程指令的形式实现根据本发明的一个或多个实施例的实现对图像序列的图像进行编码的至少一个实施例的方法的至少一个相应步骤。Figure 10 shows a block diagram of an encoder according to an embodiment of the present invention. The encoder is represented by connected modules, each module being adapted to implement, for example, in the form of programming instructions executed by the central processing unit (CPU) of the device, at least one corresponding step of a method for encoding images of an image sequence according to one or more embodiments of the present invention.

由编码器9400接收数字图像原始序列i0至in 9401作为输入。各个数字图像由样本集合(有时也称为像素(在下文中,它们称为像素))表示。在实现编码处理之后,位流9410由编码器9400输出。位流9410包括诸如片等的多个编码单元或图像部分的数据,各个片包括用于发送用于对片进行编码的编码参数的编码值的片头部和包括编码视频数据的片主体。The encoder 9400 receives the raw sequence of digital images i0 to in 9401 as input. Each digital image is represented by a set of samples (sometimes also called pixels (hereinafter referred to as pixels)). After the encoding process is performed, the bit stream 9410 is output by the encoder 9400. The bit stream 9410 includes data of multiple coding units or image portions such as slices, each slice including a slice header for transmitting coding values of coding parameters used to encode the slice and a slice body including encoded video data.

由模块9402将输入数字图像i0至in 9401分割成像素块。块与图像部分相对应并且可以是可变大小(例如,4×4、8×8、16×16、32×32、64×64、128×128个像素并且也可以考虑若干矩形块大小)。针对各个输入块选择编码模式。提供了两类编码模式:基于空间预测编码的编码模式(帧内预测)和基于时间预测的编码模式(帧间编码、合并、跳过)。测试可能的编码模式。Module 9402 divides the input digital image i0 to in 9401 into pixel blocks. These blocks correspond to image portions and can be of variable size (e.g., 4×4, 8×8, 16×16, 32×32, 64×64, 128×128 pixels, and rectangular block sizes can also be considered). An encoding mode is selected for each input block. Two types of encoding modes are provided: spatial prediction-based encoding modes (intra-frame prediction) and temporal prediction-based encoding modes (inter-frame coding, merging, skipping). Possible encoding modes are tested.

模块9403实现帧内预测处理,其中由从要编码的给定块的邻近的像素计算的预测子来预测所述要编码的块。如果选择了帧内编码,则对所选择的帧内预测子的指示以及给定块与其预测子之间的差进行编码以提供残差。Module 9403 implements intra-frame prediction processing, wherein the block to be encoded is predicted by predictors computed from the neighboring pixels of the given block. If intra-frame coding is selected, an indication of the selected intra-frame predictor and the difference between the given block and its predictor are encoded to provide a residual.

时间预测由运动估计模块9404和运动补偿模块9405实现。首先,从参考图像集合9416中选择参考图像,并且由运动估计模块9404选择参考图像的一部分(也称为参考区域或图像部分,其是与要编码的给定块最接近的区域(在像素值相似度方面最接近))。然后运动补偿模块9405使用所选择的区域预测要编码的块。由运动补偿模块9405计算所选择的参考区域和给定块之间的差(也称为残差块/数据)。使用运动信息(例如,运动矢量)来指示所选择的参考区域。Temporal prediction is implemented by motion estimation module 9404 and motion compensation module 9405. First, a reference image is selected from the reference image set 9416, and motion estimation module 9404 selects a portion of the reference image (also called a reference region or image portion, which is the region closest to the given block to be encoded (closest in terms of pixel value similarity)). Then, motion compensation module 9405 uses the selected region to predict the block to be encoded. The difference between the selected reference region and the given block (also called residual block/data) is calculated by motion compensation module 9405. Motion information (e.g., motion vectors) is used to indicate the selected reference region.

因此,在这两种情况下(空间和时间预测),当不处于SKIP(跳过)模式时,通过从原始块减去预测子来计算残差。Therefore, in both cases (spatial and temporal predictions), when not in SKIP mode, the residuals are calculated by subtracting the predictors from the original block.

在由模块9403实现的帧内预测中,预测方向被编码。在由模块9404、9405、9416、9418、9417实现的帧间预测中,至少一个运动矢量或用于识别这种运动矢量的信息(数据)被编码以用于时间预测。如果选择了帧间预测,则对与运动矢量和残差块相关的信息进行编码。为了进一步降低位率,假设运动是均匀的,通过相对于运动矢量预测子的差来编码运动矢量。通过运动矢量预测和编码模块9417从运动矢量场9418获得来自运动信息预测子候选集合的运动矢量预测子。In intra-frame prediction implemented by module 9403, the prediction direction is encoded. In inter-frame prediction implemented by modules 9404, 9405, 9416, 9418, and 9417, at least one motion vector or information (data) used to identify such a motion vector is encoded for temporal prediction. If inter-frame prediction is selected, information associated with the motion vector and residual block is encoded. To further reduce the bit rate, assuming uniform motion, the motion vector is encoded by the difference relative to the motion vector predictor. Motion vector predictors from the motion information predictor candidate set are obtained from the motion vector field 9418 by the motion vector prediction and encoding module 9417.

编码器9400还包括选择模块9406,该选择模块9406用于通过应用诸如率失真准则等的编码成本准则来选择编码模式。为了进一步减少冗余,变换模块9407对残余块应用变换(诸如DCT等),然后所获得的变换数据由量化模块9408进行量化,并由熵编码模块9409进行熵编码。最后,当不处于SKIP模式并且所选择的编码模式需要对残余块进行编码时,将正被编码的当前块的编码残余块插入到位流9410中。The encoder 9400 also includes a selection module 9406, which selects an encoding mode by applying an encoding cost criterion such as a rate-distortion criterion. To further reduce redundancy, a transform module 9407 applies a transform (such as DCT) to the residual block, and the resulting transformed data is then quantized by a quantization module 9408 and entropy encoded by an entropy encoding module 9409. Finally, when not in SKIP mode and the selected encoding mode requires encoding of the residual block, the encoded residual block of the current block being encoded is inserted into the bitstream 9410.

编码器9400还进行编码图像的解码,以生成用于后续图像的运动估计的参考图像(例如,参考图像/图片9416中的参考图像)。这使得接收位流的编码器和解码器能够具有相同的参考帧(例如,使用重建图像或重建图像部分)。逆量化(“去量化”)模块9411进行量化数据的逆量化(“去量化”),然后由逆变换模块9412进行逆变换。帧内预测模块9413使用预测信息来确定针对给定块使用哪个预测子,并且运动补偿模块9414实际上将由模块9412获得的残差添加到从参考图像集合9416获得的参考区域。然后,由模块9415应用后滤波来对像素的重建帧(图像或图像部分)进行滤波,以获得参考图像集合9416的另一参考图像。Encoder 9400 also decodes the encoded image to generate a reference image for motion estimation of subsequent images (e.g., a reference image in reference image/picture 9416). This allows the encoder and decoder receiving the bitstream to have the same reference frame (e.g., using a reconstructed image or a portion of a reconstructed image). Inverse quantization (“dequantization”) module 9411 performs inverse quantization (“dequantization”) of the quantized data, which is then inversely transformed by inverse transform module 9412. Intra-frame prediction module 9413 uses the prediction information to determine which predictor to use for a given block, and motion compensation module 9414 actually adds the residual obtained by module 9412 to the reference region obtained from reference image set 9416. Then, post-filtering is applied by module 9415 to filter the reconstructed frame (image or image portion) of pixels to obtain another reference image of reference image set 9416.

图11示出根据本发明实施例的可用于从编码器接收数据的解码器9560的框图。解码器由所连接的模块表示,各个模块适于例如以由装置的CPU执行的编程指令的形式实现由解码器9560实现的方法的相应步骤。Figure 11 shows a block diagram of a decoder 9560 that can be used to receive data from an encoder according to an embodiment of the present invention. The decoder is represented by connected modules, each module being adapted to implement corresponding steps of the method implemented by the decoder 9560, for example, in the form of programming instructions executed by the CPU of the device.

解码器9560接收位流9561,位流9561包括编码单元(例如,对应于图像部分、块或编码单元的数据),各个编码单元由包含与编码参数有关的信息的头部和包含编码视频数据的主体构成。如关于图10所说明的,针对给定图像部分(例如,块或CU)在预定数量的位上对编码视频数据进行熵编码,并且对运动信息(例如,运动矢量预测子的索引)进行编码。所接收的编码视频数据由模块9562进行熵解码。残差数据然后由模块9563去量化,然后由模块9564应用逆变换以获得像素值。Decoder 9560 receives bitstream 9561, which includes coding units (e.g., data corresponding to an image portion, block, or coding unit). Each coding unit consists of a header containing information related to coding parameters and a body containing coded video data. As illustrated with respect to FIG10, the coded video data is entropy-coded at a predetermined number of bits for a given image portion (e.g., block or CU), and motion information (e.g., indices of motion vector predictors) is encoded. The received coded video data is entropy-decoded by module 9562. The residual data is then dequantized by module 9563, and then an inverse transform is applied by module 9564 to obtain pixel values.

指示编码模式的模式数据也被熵解码,并且基于该模式,对图像数据的编码块(单元/集合/组)进行帧内类型解码或帧间类型解码。在帧内模式的情况下,帧内预测模块9565基于位流中指定的帧内预测模式来确定帧内预测子(例如,可以使用位流中提供的数据来确定帧内预测模式)。如果模式是帧间模式,则从位流提取/获得运动预测信息,以找到(识别)编码器使用的参考区域。例如,运动预测信息包括参考帧索引和运动矢量残差。通过运动矢量解码模块9570将运动矢量预测子添加到运动矢量残差以获得运动矢量。The mode data indicating the encoding mode is also entropy-decoded, and based on this mode, intra-type or inter-type decoding is performed on the encoded blocks (units/sets/groups) of the image data. In the case of intra-mode, the intra-prediction module 9565 determines the intra-predictors based on the intra-prediction mode specified in the bitstream (e.g., the intra-prediction mode can be determined using data provided in the bitstream). If the mode is inter-mode, motion prediction information is extracted/obtained from the bitstream to locate (identify) the reference region used by the encoder. For example, the motion prediction information includes the reference frame index and motion vector residuals. The motion vector predictors are added to the motion vector residuals by the motion vector decoding module 9570 to obtain the motion vectors.

运动矢量解码模块9570对通过运动预测编码的各个图像部分(例如,当前块或CU)应用运动矢量解码。一旦获得了当前块的运动矢量预测子的索引,则与图像部分(例如,当前块或CU)相关联的运动矢量的实际值可以被解码,并且用于通过模块9566来应用运动补偿。从参考图像集合9568提取/获得由解码运动矢量指示的参考图像部分,使得模块9566可以进行运动补偿。用解码的运动矢量更新运动矢量场数据9571,以用于预测随后解码的运动矢量。Motion vector decoding module 9570 applies motion vector decoding to each image segment (e.g., the current block or CU) encoded via motion prediction. Once the index of the motion vector predictor for the current block is obtained, the actual values of the motion vectors associated with the image segment (e.g., the current block or CU) can be decoded and used to apply motion compensation via module 9566. Reference image segments indicated by the decoded motion vectors are extracted/obtained from reference image set 9568, enabling module 9566 to perform motion compensation. Motion vector field data 9571 is updated with the decoded motion vectors for predicting subsequently decoded motion vectors.

最后得到解码块。在适当的情况下,由后滤波模块9567应用后滤波。最终获得并由解码器9560提供解码视频信号9569。Finally, the decoded block is obtained. Where appropriate, post-filtering is applied by the post-filtering module 9567. The resulting decoded video signal 9569 is then provided by the decoder 9560.

图12例示可以实现本发明的一个或多个实施例的数据通信系统。数据通信系统包括传输装置(在这种情况下是服务器9201),其可操作以经由数据通信网络9200将数据流的数据包传输至接收装置(在这种情况下是客户端终端9202)。数据通信网络9200可以是广域网(WAN)或局域网(LAN)。这种网络可以是例如无线网络(Wifi/802.11a或b或g)、以太网网络、互联网网络或由若干不同网络组成的混合网络。在本发明的特定实施例中,数据通信系统可以是数字电视广播系统,其中服务器9201将相同的数据内容发送到多个客户端。由服务器9201提供的数据流9204可以由表示视频和音频数据的多媒体数据组成。在本发明的一些实施例中,音频和视频数据流可以分别由服务器9201使用麦克风和照相机来捕获。在一些实施例中,数据流可以存储在服务器9201上或由服务器9201从其它数据提供商接收,或在服务器9201处生成。服务器9201设置有用于对视频和音频流进行编码的编码器,特别是用以提供用于传输的压缩位流,该压缩位流是作为编码器的输入所呈现的数据的更紧凑表示。为了获得更好的传输数据的质量与传输数据的量的比率,可以例如根据高效视频编码(HEVC)格式或H.264/高级视频编码(AVC)格式或多用途视频编码(VVC)格式来压缩视频数据。客户端9202接收所传输的位流,并且解码重建的位流,以在显示装置上再现视频图像和利用扬声器再现音频数据。Figure 12 illustrates a data communication system that can implement one or more embodiments of the present invention. The data communication system includes a transmission device (in this case, server 9201) operable to transmit data packets of a data stream to a receiving device (in this case, client terminal 9202) via a data communication network 9200. The data communication network 9200 can be a wide area network (WAN) or a local area network (LAN). Such a network can be, for example, a wireless network (Wifi/802.11a or b or g), an Ethernet network, an Internet network, or a hybrid network consisting of several different networks. In a particular embodiment of the invention, the data communication system can be a digital television broadcasting system, wherein server 9201 sends the same data content to multiple clients. The data stream 9204 provided by server 9201 can consist of multimedia data representing video and audio data. In some embodiments of the invention, the audio and video data streams can be captured by server 9201 using a microphone and a camera, respectively. In some embodiments, the data stream can be stored on server 9201 or received by server 9201 from other data providers, or generated at server 9201. Server 9201 is equipped with an encoder for encoding video and audio streams, specifically for providing a compressed bitstream for transmission, which is a more compact representation of the data presented as input to the encoder. To achieve a better ratio of transmitted data quality to transmitted data volume, the video data can be compressed, for example, according to High Efficiency Video Coding (HEVC) format, H.264/Advanced Video Coding (AVC) format, or VVC format. Client 9202 receives the transmitted bitstream and decodes the reconstructed bitstream to reproduce the video image on a display device and reproduce the audio data using speakers.

尽管在该实施例中考虑了流式传输场景,但将认识到,在本发明的一些实施例中,可以使用例如介质存储装置(诸如光盘等)来进行编码器与解码器之间的数据通信。在本发明的一个或多个实施例中,视频图像可以与表示要应用到图像的重建像素的补偿偏移的数据一同传输,以在最终图像中提供经滤波的像素。Although this embodiment considers a streaming scenario, it will be appreciated that in some embodiments of the invention, media storage devices such as optical discs can be used for data communication between the encoder and decoder. In one or more embodiments of the invention, video images may be transmitted along with data representing compensation offsets of the reconstructed pixels to be applied to the image, in order to provide filtered pixels in the final image.

图13示意性地例示被配置为实现本发明的至少一个实施例的处理装置9300。处理装置9300可以是诸如微计算机、工作站、用户终端或轻型便携式装置等的装置。装置/设备9300包括通信总线9313,其连接到:Figure 13 schematically illustrates a processing device 9300 configured to implement at least one embodiment of the present invention. The processing device 9300 may be a device such as a microcomputer, workstation, user terminal, or lightweight portable device. The device/apparatus 9300 includes a communication bus 9313 connected to:

-表示为CPU的中央处理单元9311,诸如微处理器等;- This refers to the CPU's central processing unit 9311, such as a microprocessor;

-表示为ROM的只读存储器9307,其用于存储操作装置9300和/或实现本发明的计算机程序/指令;- Read-only memory 9307, denoted as ROM, is used to store operating device 9300 and/or computer program/instructions for implementing the present invention;

-用于存储本发明实施例的方法的可执行代码的表示为RAM的随机存取存储器9312,以及适于记录变量和参数的寄存器,该变量和参数是根据本发明实施例实现对数字图像序列进行编码的方法和/或对位流进行解码的方法所需的;以及- A random access memory 9312, represented as RAM, for storing executable code of the methods according to embodiments of the present invention, and registers suitable for recording variables and parameters required for implementing the method of encoding a digital image sequence and/or the method of decoding a bit stream according to embodiments of the present invention; and

-连接至通信网络9303的通信接口9302,通过该通信接口传输或接收要处理的数字数据。- A communication interface 9302 connected to a communication network 9303, through which digital data to be processed is transmitted or received.

可选地,设备9300还可以包括以下组件:Optionally, the device 9300 may also include the following components:

-诸如硬盘等的数据存储部件9304,其用于存储实现本发明的一个或多个实施例的方法的计算机程序以及在实现本发明的一个或多个实施例期间所使用或产生的数据;- A data storage component 9304, such as a hard disk, is used to store a computer program for implementing one or more embodiments of the present invention, as well as data used or generated during the implementation of one or more embodiments of the present invention;

-用于盘9306(例如存储介质)的盘驱动器9305,该盘驱动器9305适于从盘9306读取数据或将数据写入所述盘9306,或者;- A disk drive 9305 for disk 9306 (e.g., storage medium), the disk drive 9305 being adapted to read data from disk 9306 or write data to disk 9306, or;

-屏幕9309,其用于借助于键盘9310、触摸屏或任何其它指示/输入装置来显示数据和/或用作与用户交互的图形界面。- Screen 9309, which is used to display data and/or serve as a graphical interface for user interaction by means of keyboard 9310, touch screen or any other indication/input device.

设备9300可以连接到诸如数字照相机9320或麦克风9308等的各种外围设备,其各自连接到输入/输出卡(未示出)以向设备9300提供多媒体数据。Device 9300 can be connected to various peripheral devices such as digital camera 9320 or microphone 9308, each of which is connected to an input/output card (not shown) to provide multimedia data to device 9300.

通信总线提供设备9300中所包括的或连接到设备9300的各种元素之间的通信和互操作性。总线的表示不是限制性的,并且特别地,中央处理单元9311可操作地将指令直接或者借助于设备9300的其它元素通信到设备9300的任何元素。The communication bus provides communication and interoperability between various elements included in or connected to the device 9300. The representation of the bus is not limiting, and in particular, the central processing unit 9311 is operable to communicate instructions directly or by means of other elements of the device 9300 to any element of the device 9300.

盘9306可以由诸如可重写或不可重写的致密盘(CD-ROM)、ZIP盘或存储卡等的任何信息介质代替,并且一般而言,由微计算机或处理器可以进行读取的信息存储部件代替,该盘9306集成到或不集成到设备中、可能可移动并且适于存储其执行使得能够实现根据本发明的对数字图像序列进行编码的方法和/或对位流进行解码的方法的一个或多个程序。Disk 9306 may be replaced by any information medium such as a rewritable or non-rewritable compact disc (CD-ROM), ZIP disc, or memory card, and generally by an information storage component that can be read by a microcomputer or processor. Disk 9306 may be integrated into or not integrated into a device, may be portable, and is adapted to store one or more programs that execute to enable the implementation of a method for encoding digital image sequences and/or a method for decoding bit streams according to the present invention.

可执行代码可以存储在只读存储器9306中、硬盘9304上或可移动数字介质(诸如,例如如前述的盘9306等)上。根据一变型,程序的可执行代码可以经由接口9302借助于通信网络9303来接收,以在执行之前存储在设备9300的存储部件之一(例如硬盘9304)中。Executable code can be stored in read-only memory 9306, hard disk 9304, or removable digital media (such as, for example, disk 9306 as described above). According to a variant, the executable code of the program can be received via interface 9302 through communication network 9303 to be stored in one of the storage components of device 9300 (e.g., hard disk 9304) before execution.

中央处理单元9311适于控制和指导执行根据本发明的一个或多个程序的指令或软件代码的部分、存储在上述存储部件之一中的指令的执行。在通电时,存储在非易失性存储器中(例如,在硬盘9304、盘9306上或在只读存储器9307中)的一个或多个程序被传递到随机存取存储器9312中(其然后包含一个或多个程序的可执行代码)以及用于存储实现本发明所必需的变量和参数的寄存器。The central processing unit 9311 is adapted to control and direct the execution of instructions or software code portions of one or more programs according to the invention, and instructions stored in one of the aforementioned storage components. Upon power-up, one or more programs stored in non-volatile memory (e.g., on hard disk 9304, disk 9306, or in read-only memory 9307) are transferred to random access memory 9312 (which then contains the executable code of one or more programs) and registers for storing variables and parameters necessary for implementing the invention.

在该实施例中,设备是使用软件来实现本发明的可编程设备。然而,可替代地,本发明可以以硬件(例如,以专用集成电路或ASIC的形式)来实现。In this embodiment, the device is a programmable device that implements the invention using software. However, alternatively, the invention can be implemented in hardware (e.g., in the form of an application-specific integrated circuit or ASIC).

本发明实施例的实现Implementation of the embodiments of the present invention

本发明实施例的实现Implementation of the embodiments of the present invention

还应理解,根据本发明的其它实施例,在诸如计算机、移动电话(蜂窝电话)、平板或能够向用户提供/显示内容的任何其它类型的装置(例如,显示设备)等的用户终端中提供根据上述实施例的解码器。根据又一实施例,在图像捕获设备中提供根据上述实施例的编码器,该图像捕获设备还包括用于捕获和提供内容以供编码器进行编码的照相机、摄像机或网络照相机(例如,闭路电视或视频监视照相机)。以下参见图14和15提供两个这样的实施例。It should also be understood that, according to other embodiments of the invention, a decoder according to the above embodiments is provided in a user terminal such as a computer, mobile phone (cellular phone), tablet, or any other type of device capable of providing/displaying content to a user (e.g., a display device). According to yet another embodiment, an encoder according to the above embodiments is provided in an image capture device, which further includes a camera, video camera, or webcam (e.g., a closed-circuit television or video surveillance camera) for capturing and providing content for encoding by the encoder. Two such embodiments are shown below with reference to Figures 14 and 15.

图14是例示包括网络照相机9452和客户端设备9454的网络照相机系统9450的图。Figure 14 is a diagram illustrating a webcam system 9450 including a webcam 9452 and a client device 9454.

网络照相机9452包括摄像单元9456、编码单元9458、通信单元9460和控制单元9462。网络照相机9452和客户端设备9454经由网络9200相互连接以能够彼此通信。摄像单元9456包括镜头和图像传感器(例如,电荷耦合器件(CCD)或互补金属氧化物半导体(CMOS)),并捕获对象的图像并基于该图像生成图像数据。该图像可以是静止图像或视频图像。摄像单元还可以包括分别适于缩放或平摇(光学地或数字地)的缩放部件和/或平摇部件。编码单元9458通过使用在第一实施例至第五实施例中说明的所述编码方法来对图像数据进行编码。编码单元9458使用在第一实施例至第五实施例中说明的编码方法中的至少之一。对于其它实例,编码单元9458可以使用在第一实施例至第五实施例中说明的编码方法的组合。The webcam 9452 includes an image-capturing unit 9456, an encoding unit 9458, a communication unit 9460, and a control unit 9462. The webcam 9452 and a client device 9454 are interconnected via a network 9200 to enable communication between them. The image-capturing unit 9456 includes a lens and an image sensor (e.g., a charge-coupled device (CCD) or complementary metal-oxide-semiconductor (CMOS)), captures an image of a subject, and generates image data based on the image. The image can be a still image or a video image. The image-capturing unit may also include zoom and/or pan components, respectively adapted for zooming or panning (optically or digitally). The encoding unit 9458 encodes the image data using the encoding methods described in the first to fifth embodiments. The encoding unit 9458 uses at least one of the encoding methods described in the first to fifth embodiments. For other examples, the encoding unit 9458 may use a combination of the encoding methods described in the first to fifth embodiments.

网络照相机9452的通信单元9460将由编码单元9458编码的经编码的图像数据传输至客户端设备9454。The communication unit 9460 of the network camera 9452 transmits the encoded image data, which is encoded by the encoding unit 9458, to the client device 9454.

此外,通信单元9460还可以接收来自客户端设备9454的命令。命令包括用于设置用于编码单元9458的编码的参数的命令。控制单元9462根据通信单元9460接收到的命令来控制网络照相机9452中的其它单元。客户端设备9454包括通信单元2114、解码单元2116和控制单元9468。客户端设备9454的通信单元2118可以向网络照相机9452传输命令。此外,客户端设备9454的通信单元2118从网络照相机9452接收经编码的图像数据。解码单元9464通过使用在前述实施例中的一个或多个中说明的所述解码方法来对经编码的图像数据进行解码。对于其它实例,解码单元9464可以使用在前述实施例中说明的解码方法的组合。客户端设备9454的控制单元9468根据由通信单元2114接收的用户操作或命令来控制客户端设备9454中的其它单元。客户端设备9454的控制单元9468还可以控制显示设备9470以显示由解码单元9466解码的图像。Furthermore, the communication unit 9460 can also receive commands from the client device 9454. These commands include commands for setting parameters for encoding by the encoding unit 9458. The control unit 9462 controls other units in the network camera 9452 based on the commands received by the communication unit 9460. The client device 9454 includes a communication unit 2114, a decoding unit 2116, and a control unit 9468. The communication unit 2118 of the client device 9454 can transmit commands to the network camera 9452. Additionally, the communication unit 2118 of the client device 9454 receives encoded image data from the network camera 9452. The decoding unit 9464 decodes the encoded image data using one or more of the decoding methods described in the foregoing embodiments. For other instances, the decoding unit 9464 may use a combination of the decoding methods described in the foregoing embodiments. The control unit 9468 of the client device 9454 controls other units in the client device 9454 based on user operations or commands received by the communication unit 2114. The control unit 9468 of the client device 9454 can also control the display device 9470 to display the image decoded by the decoding unit 9466.

客户端设备9454的控制单元9468还控制显示设备9470以显示用于指定网络照相机9452的参数(例如用于编码单元9458的编码的参数)的值的GUI(图形用户界面)。The control unit 9468 of the client device 9454 also controls the display device 9470 to display the values of the parameters for specifying the network camera 9452 (e.g., the parameters for encoding the encoding unit 9458).

客户端设备9454的控制单元9468还可以根据对显示设备9470所显示的GUI的用户操作输入来控制客户端设备9454中的其它单元。客户端设备9454的控制单元9468还可以根据对显示设备9470所显示的GUI的用户操作输入来控制客户端设备9454的通信单元9464,以将用于指定网络照相机9452的参数的值的命令传输至网络照相机9452。The control unit 9468 of the client device 9454 can also control other units in the client device 9454 based on user input via the GUI displayed on the display device 9470. The control unit 9468 of the client device 9454 can also control the communication unit 9464 of the client device 9454 based on user input via the GUI displayed on the display device 9470, to transmit commands specifying values for parameters of the network camera 9452 to the network camera 9452.

图15是例示智能电话9500的图。智能电话9500包括通信单元9502、解码/编码单元9504、控制单元9506和显示单元9508。通信单元9502经由网络接收经编码的图像数据。解码/编码单元9504对通信单元9502接收到的经编码的图像数据进行解码。解码单元9504通过使用在前述实施例中的一个或多个中说明的所述解码方法来对经编码的图像数据进行解码。解码/编码单元9504还可以使用在前述实施例中说明的编码或解码方法中的至少之一。对于其它实例,解码/编码单元9504可以使用在前述实施例中说明的解码或编码方法的组合。控制单元9506根据通信单元9502接收到的用户操作或命令控制智能电话9500中的其它单元。例如,控制单元9506控制显示单元9508以显示由解码/编码单元9504解码的图像。Figure 15 is a diagram illustrating a smartphone 9500. The smartphone 9500 includes a communication unit 9502, a decoding/encoding unit 9504, a control unit 9506, and a display unit 9508. The communication unit 9502 receives encoded image data via a network. The decoding/encoding unit 9504 decodes the encoded image data received by the communication unit 9502. The decoding unit 9504 decodes the encoded image data using one or more of the decoding methods described in the foregoing embodiments. The decoding/encoding unit 9504 may also use at least one of the encoding or decoding methods described in the foregoing embodiments. In other instances, the decoding/encoding unit 9504 may use a combination of the decoding or encoding methods described in the foregoing embodiments. The control unit 9506 controls other units in the smartphone 9500 according to user operations or commands received by the communication unit 9502. For example, the control unit 9506 controls the display unit 9508 to display the image decoded by the decoding/encoding unit 9504.

智能电话还可以包括用于记录图像或视频的图像记录装置9510(例如,数字照相机和相关联的电路)。这样的所记录图像或视频可以在控制单元9506的指令下由解码/编码单元9504进行编码。智能电话还可以包括适于感测移动装置的定向的传感器9512。这样的传感器可以包括加速度计、陀螺仪、罗盘、全球定位(GPS)单元或类似的位置传感器。这样的传感器2212可以确定智能电话是否改变定向,并且在编码视频流时可以使用这样的信息。The smartphone may also include an image recording device 9510 (e.g., a digital camera and associated circuitry) for recording images or videos. Such recorded images or videos can be encoded by a decoding/encoding unit 9504 under the instruction of a control unit 9506. The smartphone may also include a sensor 9512 adapted to sense the orientation of the mobile device. Such a sensor may include an accelerometer, gyroscope, compass, global positioning (GPS) unit, or similar position sensor. This sensor 9512 can determine whether the smartphone has changed orientation, and such information can be used when encoding video streams.

虽然已经参考实施例描述了本发明,但是应当理解,本发明不限于所公开的实施例。本领域技术人员将理解,在不脱离所附权利要求限定的本发明的范围的情况下,可以进行各种改变和修改。本说明书(包括任何所附权利要求、摘要和附图)中公开的所有特征、和/或所公开的任何方法或处理的所有步骤,可以以任何组合进行组合,除了这样的特征和/或步骤中的至少一些相互排斥的组合之外。除非另外明确说明,否则本说明书(包括任何所附权利要求、摘要和附图)中所公开的各个特征可以由用于相同、等同或相似目的的替代特征代替。因此,除非另有明确说明,否则所公开的各个特征仅为通用系列等效或类似特征的一个示例。Although the invention has been described with reference to embodiments, it should be understood that the invention is not limited to the disclosed embodiments. Those skilled in the art will understand that various changes and modifications can be made without departing from the scope of the invention as defined by the appended claims. All features disclosed in this specification (including any appended claims, abstract, and drawings), and/or all steps of any disclosed method or process, can be combined in any combination except for at least some mutually exclusive combinations of such features and/or steps. Unless otherwise expressly stated, the various features disclosed in this specification (including any appended claims, abstract, and drawings) may be replaced by alternative features for the same, equivalent, or similar purposes. Therefore, unless otherwise expressly stated, the various features disclosed are merely examples of a general series of equivalent or similar features.

还应理解,上述比较、确定、评估、选择、执行、进行或考虑的任何结果(例如,在编码或滤波处理期间作出的选择)可以在位流中的数据(例如,指示结果的标志或信息)中指示或可从位流中的数据确定/推断,使得在处理中可以使用所指示或确定/推断的结果,而不是例如在解码处理期间实际进行所述比较、确定、评估、选择、执行、进行或考虑。It should also be understood that any result of the above comparison, determination, evaluation, selection, execution, conduct, or consideration (e.g., a selection made during encoding or filtering processing) may be indicated in or determined/inferred from data in the bitstream (e.g., flags or information indicating the result), such that the indicated or determined/inferred result can be used in processing, rather than actually being performed, for example, during decoding processing.

在权利要求中,词语“包括”不排除其它元素或步骤,并且不定冠词“a”或“an”不排除多个。仅仅在相互不同的从属权利要求中记载不同特征的事实并不指示这些特征的组合不能被有利地使用。权利要求中出现的附图标记仅作为说明,并且不应对权利要求的范围产生限定作用。In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude multiple elements. The mere fact that different features are recited in mutually different dependent claims does not indicate that a combination of these features cannot be used advantageously. Reference numerals appearing in the claims are for illustrative purposes only and should not be used to limit the scope of the claims.

在前述实施例中,可以以硬件、软件、固件或其任何组合来实现所描述的功能。如果以软件实现,则功能可以作为一个或多个指令或代码存储在计算机可读介质上或通过计算机可读介质而发送,并且可以由基于硬件的处理单元执行。In the foregoing embodiments, the described functions can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or code on or transmitted through a computer-readable medium, and can be executed by a hardware-based processing unit.

计算机可读介质可以包括计算机可读存储介质,其与诸如数据存储介质等的有形介质或者包括例如根据通信协议来促进将计算机程序从一个地方转移到另一个地方的任何介质的通信介质相对应。以这种方式,计算机可读介质通常可以对应于(1)非暂时性的有形计算机可读存储介质或者(2)诸如信号或载波等的通信介质。数据存储介质可以是可由一个或多个计算机或者一个或多个处理器访问以检索用于实现本发明中描述的技术的指令、代码和/或数据结构的任何可用介质。计算机程序产品可以包括计算机可读介质。Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media or communication media that include, for example, any medium facilitating the transfer of a computer program from one place to another according to a communication protocol. In this way, computer-readable media may generally correspond to (1) a non-transitory tangible computer-readable storage medium or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available medium accessible by one or more computers or one or more processors to retrieve instructions, code, and/or data structures for implementing the techniques described herein. Computer program products may include computer-readable media.

作为示例而非限制,这种计算机可读存储介质可以包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储、磁盘存储或其它磁存储装置、闪速存储器或可以用于以指令或数据结构的形式存储期望程序代码并可以由计算机访问的任何其它介质。此外,任何连接都可以适当地称为计算机可读介质。例如,如果使用同轴线缆、光纤线缆、双绞线、数字用户线(DSL)或无线技术(诸如红外、无线电和微波等)从网站、服务器或其它远程源发送指令,则同轴线缆、光纤线缆、双绞线、DSL或无线技术(诸如红外、无线电和微波等)包括在介质的定义中。然而,应当理解,计算机可读存储介质和数据存储介质不包括连接、载波、信号或其它瞬态介质,而是针对非瞬态的有形存储介质。这里使用的盘(disk)和碟(disc)包括致密盘(CD)、激光盘、光盘、数字多功能盘(DVD)、软盘和蓝光盘,其中盘通常以磁性方式复制数据,而碟则通过激光以光学方式再现数据。上述的组合也应包括在计算机可读介质的范围内。By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage, disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection may be appropriately referred to as a computer-readable medium. For example, coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technology (such as infrared, radio, and microwave) are included in the definition of medium if instructions are sent from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology (such as infrared, radio, and microwave). However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but rather refer to non-transient tangible storage media. The terms disk and disc used herein include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically copy data magnetically, while discs optically reproduce data using lasers. The above combinations should also be included within the scope of computer-readable media.

指令可以由诸如一个或多个数字信号处理器(DSP)、通用微处理器、专用集成电路(ASIC)、现场可编程门/逻辑阵列(FPGA)或其它等效的集成或离散逻辑电路等的一个或多个处理器执行。因此,如这里使用的术语“处理器”可以指任何前述结构或适合于实现这里所述技术的任何其它结构。另外,在一些方面,这里描述的功能可以在被配置为编码和解码的专用硬件和/或软件模块内提供,或结合在组合编解码器中。此外,该技术可以在一个或多个电路或逻辑元件中完全实现。Instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable gate/logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein can refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein can be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated into combined codecs. Furthermore, the technique can be fully implemented within one or more circuit or logic elements.

虽然已经参考实施例描述了本发明,但是应当理解,本发明不限于所公开的实施例。为免生疑问,以下声明构成说明的一部分。权利要求跟在声明之后并标记为权利要求。While the invention has been described with reference to embodiments, it should be understood that the invention is not limited to the disclosed embodiments. For the avoidance of doubt, the following statements form part of the description. The claims follow the statements and are marked as claims.

声明1。一种控制针对图像的一个或多个图像部分的自适应环路滤波器的方法,所述方法包括基于图像部分的第一样本值的多个邻近样本值来控制对第一样本的滤波,其中控制包括使用非线性函数,所述非线性函数具有基于所述邻近样本值中的一个或多个邻近样本值的一个或多个变量以及在自适应参数集中用信号通知的一个或多个滤波器变量的一个或多个变量。Statement 1. A method for controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering on a first sample based on a plurality of neighboring sample values of a first sample value of the image portion, wherein the control comprises using a nonlinear function having one or more variables based on one or more neighboring sample values and one or more filter variables signaled in an adaptive parameter set.

声明2。根据声明1所述的方法,其中所述非线性函数包括一个或多个限幅函数,并且所述一个或多个滤波器变量包括使用所述自适应参数集中提供的信息确定的一个或多个限幅参数。Statement 2. According to the method described in Statement 1, the nonlinear function includes one or more limiting functions, and the one or more filter variables include one or more limiting parameters determined using information provided in the adaptive parameter set.

声明3。根据声明2所述的方法,其中两个或更多个限幅函数共用使用在自适应参数集中用信号通知的信息所确定的相同限幅参数。Statement 3. The method according to Statement 2, wherein two or more limiting functions share the same limiting parameter determined by information signaled in the adaptive parameter set.

声明4。声明2或声明3所述的方法,其中可使用用于从多个限幅参数值中识别限幅参数值的索引来确定与限幅函数一起使用的限幅参数,并且多个限幅参数值之一与基于位深度的最大样本值相对应。适当地,在自适应参数集(Adaptation Parameter Set)中提供索引。Statement 4. The method described in Statement 2 or Statement 3, wherein an index used to identify the limiting parameter values from a plurality of limiting parameter values is used to determine the limiting parameter to be used with the limiting function, and one of the plurality of limiting parameter values corresponds to the maximum sample value based on bit depth. Appropriately, an index is provided in the Adaptation Parameter Set.

声明5。根据声明2至声明4中任一项所述的方法,其中可使用用于从多个限幅参数值中识别限幅参数值的索引来确定与限幅函数一起使用的限幅参数,并且针对当第一样本值是亮度样本值时以及当第一样本值是色度样本值时这两者,多个限幅参数值包括相同数量的值。适当地,所述多个限幅参数值包括四个(允许/可用/可能)值。适当地,所述多个限幅参数值包括用于所述图像的一个或多个图像部分中的两个或更多个部分的相同数量的(允许/可用/可能)值。适当地,所述多个限幅参数值包括用于所述图像的一个或多个图像部分中的两个或更多个部分的四个(允许/可用/可能)值。适当地,所述多个限幅参数值包括用于所述图像的所有图像部分或图像序列的所有图像部分的相同数量的(允许/可用/可能)值。适当地,多个限幅参数值包括用于图像的所有图像部分或图像序列的所有图像部分的四个(允许/可用/可能)值。Statement 5. The method according to any one of Statements 2 to 4, wherein an index for identifying the limiting parameter values from a plurality of limiting parameter values is used to determine the limiting parameter used with the limiting function, and the plurality of limiting parameter values include the same number of values for both when the first sample value is a luminance sample value and when the first sample value is a chrominance sample value. Suitably, the plurality of limiting parameter values include four (allowed/available/possible) values. Suitably, the plurality of limiting parameter values include the same number of (allowed/available/possible) values for two or more of one or more image portions of the image. Suitably, the plurality of limiting parameter values include four (allowed/available/possible) values for two or more of one or more image portions of the image. Suitably, the plurality of limiting parameter values include the same number of (allowed/available/possible) values for all image portions of the image or all image portions of an image sequence. Suitably, the plurality of limiting parameter values include four (allowed/available/possible) values for all image portions of the image or all image portions of an image sequence.

声明6。根据任何前述声明所述的方法,其中用信号通知的一个或多个滤波器变量的数量小于基于所述邻近样本值中的一个或多个样本值的一个或多个变量的数量。适当地,用信号通知的一个或多个滤波器变量的数量是基于邻近样本值中的一个或多个样本值的一个或多个变量的数量的一半。Statement 6. According to any of the methods described in the foregoing statements, the number of one or more filter variables notified by signaling is less than the number of one or more variables based on one or more sample values among the neighboring sample values. Properly, the number of one or more filter variables notified by signaling is half the number of one or more variables based on one or more sample values among the neighboring sample values.

声明7。根据任何前述声明所述的方法,其中基于一个或多个邻近样本值中的一个或多个邻近样本值的一个或多个变量包括第一样本值与一个或多个邻近样本值中的各个邻近样本值之间的差。Statement 7. According to any of the methods described in the foregoing statements, one or more variables based on one or more neighboring sample values include the difference between the first sample value and each of the one or more neighboring sample values.

声明8。根据任何前述声明所述的方法,其中非线性函数的输出被用作自适应环路滤波器的输入参数。适当地,来自两个或更多个非线性函数(或限幅函数)的输出被用作自适应环路滤波器的输入参数。Statement 8. According to any of the methods described in the foregoing statements, the output of the nonlinear function is used as an input parameter of the adaptive loop filter. Appropriately, the outputs from two or more nonlinear functions (or limiting functions) are used as input parameters of the adaptive loop filter.

声明9。根据声明8所述的方法,其中:所述自适应环路滤波器使用一个或多个滤波器系数;并且滤波器系数及其相关的滤波器变量可使用邻近样本值的索引来确定。Statement 9. The method according to Statement 8, wherein: the adaptive loop filter uses one or more filter coefficients; and the filter coefficients and their associated filter variables can be determined using indices of neighboring sample values.

声明10。根据声明9所述的方法,其中邻近样本值的索引与其在扫描顺序中的位置相关联,并且所述关联可使用转置索引导出。适当地,导出的所述关联对应于图4-b中四种可能的布置之一:409的{0,1,2,3,4,5,6,7,8,9,10,11};410的{9,4,10,8,1,5,11,7,3,0,2,6};411的{0,3,2,1,8,7,6,5,4,9,10,11};或412的{9,8,10,4,3,7,11,5,1,0,2,6}。Statement 10. According to the method described in Statement 9, the index of a neighboring sample value is associated with its position in the scan order, and the association can be derived using a transposed index. Appropriately, the derived association corresponds to one of the four possible arrangements in Figure 4-b: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} for 409; {9, 4, 10, 8, 1, 5, 11, 7, 3, 0, 2, 6} for 410; {0, 3, 2, 1, 8, 7, 6, 5, 4, 9, 10, 11} for 411; or {9, 8, 10, 4, 3, 7, 11, 5, 1, 0, 2, 6} for 412.

声明11。根据任何前述声明所述的方法,其中所述非线性函数包括一个或多个限幅函数,并且所述一个或多个限幅函数中的各个限幅函数返回以下各项之一:max(-b,min(b,d))、min(b,max(-b,d))、max(c-b,min(c+b,n))、min(c+b,max(c-b,n))、max(-b,min(b,d1+d2))、min(b,max(-b,d1+d2))、max(2*c-b,min(2*c+b,n1+n2))或min(2*c+b,max(2*c-b,n1+n2)),其中c是第一样本值,n或n1或n2是邻近样本值,d=n-c,d1=n1-c,d2=n2-c,并且b是限幅参数。Statement 11. According to any of the methods described in the foregoing statements, the nonlinear function comprises one or more limiting functions, and each of the one or more limiting functions returns one of the following: max(-b,min(b,d)), min(b,max(-b,d)), max(c-b,min(c+b,n)), min(c+b,max(c-b,n)), max(-b,min(b,d1+d2)), min(b,max(-b,d1+d2)), max(2*c-b,min(2*c+b,n1+n2)) or min(2*c+b,max(2*c-b,n1+n2)), where c is the first sample value, n or n1 or n2 are the neighboring sample values, d = n-c, d1 = n1-c, d2 = n2-c, and b is the limiting parameter.

声明12。一种处理图像的一个或多个部分的方法,图像部分具有与其相关联的色度样本和亮度样本,其中所述方法包括基于从位流获得的信息或者第一样本值及其一个或多个邻近样本值,确定以下各项至少之一:是否使用利用根据任何前述说明所述的方法控制的滤波器;启用或禁用所述滤波器的使用;或者用于在滤波第一样本值时与所述滤波器一起使用的滤波参数、滤波器系数或滤波器变量。Statement 12. A method for processing one or more portions of an image, the image portions having associated chroma samples and luminance samples, wherein the method includes determining, based on information obtained from a bitstream or a first sample value and one or more neighboring sample values, at least one of the following: whether to use a filter controlled by the method according to any of the foregoing descriptions; enabling or disabling the use of the filter; or filter parameters, filter coefficients, or filter variables for use with the filter when filtering the first sample value.

声明13。根据声明12所述的方法,其中从位流获得的信息包括针对亮度或色度成分之一提供的标志,该标志指示针对该成分的以下各项至少之一:是否使用利用声明1至10中任一项所述的方法控制的滤波器;或者启用或禁用所述滤波器的使用。Statement 13. The method according to Statement 12, wherein the information obtained from the bitstream includes a flag provided for one of the luminance or chrominance components, the flag indicating at least one of the following for that component: whether a filter controlled by any one of Statements 1 to 10 is used; or whether the use of said filter is enabled or disabled.

声明14。根据声明12或13所述的方法,其中从位流获得的信息包括针对一个或多个图像部分提供的标志,该标志指示针对一个或多个图像部分的以下各项至少之一:是否使用利用声明1至10中任一项所述的方法控制的滤波器;或者启用或禁用所述滤波器的使用。Statement 14. The method according to Statement 12 or 13, wherein the information obtained from the bitstream includes a flag provided for one or more image portions, the flag indicating at least one of the following for one or more image portions: whether a filter controlled by any one of Statements 1 to 10 is used; or whether the use of said filter is enabled or disabled.

声明15。一种对一个或多个图像进行编码的方法,所述方法包括针对图像的一个或多个部分,根据声明1至10中任一项所述的方法控制滤波器,或者根据声明12至14中任一项所述的方法进行处理。Statement 15. A method for encoding one or more images, the method comprising controlling a filter for one or more portions of the image according to any one of Statements 1 to 10, or processing the image according to any one of Statements 12 to 14.

声明16。根据声明15所述的方法还包括:接收图像;对所接收的图像进行编码并生成位流;以及处理编码图像,其中处理包括根据声明1至11中任一项的方法进行控制,或者根据声明12至14中任一项的方法进行处理。Statement 16. The method according to Statement 15 further includes: receiving an image; encoding the received image and generating a bitstream; and processing the encoded image, wherein the processing includes control according to any one of Statements 1 to 11, or processing according to any one of Statements 12 to 14.

声明17。当从属于声明12至14中任一项时,根据声明15所述的方法还包括在位流中提供所述信息。Statement 17. When subordinate to any of Statements 12 to 14, the method according to Statement 15 further includes providing the information in the bit stream.

声明18。当从属于声明11时根据声明17所述的方法,其中:非线性函数的变量还包括一个或多个滤波器系数,其取决于一个或多个邻近样本值的索引;以及提供所述信息包括在位流中提供用于确定一个或多个限幅参数的索引以及用于导出邻近样本值的索引与其按扫描顺序的位置之间的关联的一个或多个转置索引。适当地,导出的关联对应于图4-b中四种可能的布置之一:409的{0,1,2,3,4,5,6,7,8,9,10,11};410的{9,4,10,8,1,5,11,7,3,0,2,6};411的{0,3,2,1,8,7,6,5,4,9,10,11};或412的{9,8,10,4,3,7,11,5,1,0,2,6}。Statement 18. When subordinate to Statement 11, the method described according to Statement 17 includes: the variables of the nonlinear function further comprising one or more filter coefficients, which depend on the indices of one or more neighboring sample values; and providing said information including providing indices in the bit stream for determining one or more limiting parameters and for deriving the association between the indices of neighboring sample values and their positions in scan order, one or more transposed indices. Appropriately, the derived association corresponds to one of the four possible arrangements in Figure 4-b: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} for 409; {9, 4, 10, 8, 1, 5, 11, 7, 3, 0, 2, 6} for 410; {0, 3, 2, 1, 8, 7, 6, 5, 4, 9, 10, 11} for 411; or {9, 8, 10, 4, 3, 7, 11, 5, 1, 0, 2, 6} for 412.

声明19。根据声明16至18中任一项所述的方法还包括:从多个可用函数中选择非线性函数或者一个或多个限幅函数;在处理编码图像时使用所选择的函数;以及在位流中提供用于识别所选择的函数的信息。Statement 19. The method according to any one of Statements 16 to 18 further includes: selecting a nonlinear function or one or more limiting functions from a plurality of available functions; using the selected function when processing the coded image; and providing information in the bit stream for identifying the selected function.

声明20。一种对一个或多个图像进行解码的方法,所述方法包括针对图像的一个或多个部分,根据声明1至11中任一项所述的方法控制滤波器,或者根据声明12至14中任一项所述的方法进行处理。Statement 20. A method for decoding one or more images, the method comprising controlling a filter for one or more portions of the image according to any one of Statements 1 to 11, or processing the image according to any one of Statements 12 to 14.

声明21。根据声明20所述的方法还包括:接收位流;解码来自所接收的位流的信息以获得图像;以及处理所获得的图像,其中处理包括根据声明1至11中任一项所述的方法进行控制,或者根据声明12至14中任一项所述的方法进行处理。Statement 21. The method according to Statement 20 further includes: receiving a bit stream; decoding information from the received bit stream to obtain an image; and processing the obtained image, wherein the processing includes control according to any one of Statements 1 to 11, or processing according to any one of Statements 12 to 14.

声明22。当从属于声明12至14中任一项时,根据声明21所述的方法还包括从位流获得所述信息。Statement 22. When subordinate to any of statements 12 to 14, the method according to statement 21 further includes obtaining the information from the bit stream.

声明23。根据声明21所述的当从属于声明11时的Statement 23. According to Statement 21, when subordinate to Statement 11...

方法,其中:非线性函数的变量还包括一个或多个滤波器系数,其取决于一个或多个邻近样本值的索引;并且该方法还包括从该位流获得用于确定一个或多个限幅参数的索引以及用于导出邻近样本值的索引与其按扫描顺序的位置之间的关联的一个或多个转置索引。适当地,导出的关联对应于图4-b中四种可能的布置之一:409的{0,1,2,3,4,5,6,7,8,9,10,11};410的{9,4,10,8,1,5,11,7,3,0,2,6};411的{0,3,2,1,8,7,6,5,4,9,10,11};或412的{9,8,10,4,3,7,11,5,1,0,2,6}。The method further includes one or more filter coefficients, which depend on the indices of one or more neighboring sample values, as well as one or more transposed indices obtained from the bitstream for determining one or more limiting parameters and for deriving the association between the indices of neighboring sample values and their positions in the scan order. Appropriately, the derived association corresponds to one of the four possible arrangements in Figure 4-b: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} for 409; {9, 4, 10, 8, 1, 5, 11, 7, 3, 0, 2, 6} for 410; {0, 3, 2, 1, 8, 7, 6, 5, 4, 9, 10, 11} for 411; or {9, 8, 10, 4, 3, 7, 11, 5, 1, 0, 2, 6} for 412.

声明24。根据声明21至23中任一项所述的方法还包括:从位流获得用于从多个可用函数识别非线性函数或者一个或多个限幅函数的信息;以及在处理所获得的图像时使用所识别的函数。Statement 24. The method according to any one of Statements 21 to 23 further includes: obtaining information from the bit stream for identifying a nonlinear function or one or more limiting functions from a plurality of available functions; and using the identified function when processing the obtained image.

声明25。一种装置,包括以下各项中的一个或多个:控制器,其被配置为进行根据声明1至11或12至14中任一项所述的方法;编码器,其被配置为进行根据声明15至19中任一项所述的方法;或者解码器,其被配置为进行根据声明20至24中任一项所述的方法。Statement 25. An apparatus comprising one or more of the following: a controller configured to perform the method according to any one of statements 1 to 11 or 12 to 14; an encoder configured to perform the method according to any one of statements 15 to 19; or a decoder configured to perform the method according to any one of statements 20 to 24.

声明26。一种程序,所述程序在计算机或处理器上运行时使所述计算机或处理器执行根据声明1至11、12至14、15至19或20至24中任一项所述的方法。Statement 26. A program that, when run on a computer or processor, causes the computer or processor to perform the method according to any one of statements 1 to 11, 12 to 14, 15 to 19, or 20 to 24.

声明27。一种计算机可读存储介质,其存储根据声明26所述的计算机程序。Statement 27. A computer-readable storage medium storing a computer program as described in Statement 26.

声明28。一种信号,其承载用于使用根据声明15至19中任一项所述的方法编码并由位流表示的图像的信息数据集,所述图像包括可重建样本集合,各个可重建样本具有样本值,其中所述信息数据集包括用于基于第一可重建样本的邻近样本的样本值来控制对第一可重建样本的滤波的控制数据。Statement 28. A signal carrying an information dataset for encoding an image using the method according to any one of Statements 15 to 19 and represented by a bit stream, the image comprising a set of reconstructable samples, each reconstructable sample having a sample value, wherein the information dataset includes control data for controlling filtering of a first reconstructable sample based on the sample values of neighboring samples of the first reconstructable sample.

Claims (8)

1.一种使用自适应环路滤波对图像的一个或多个部分进行编码的方法,所述方法包括:1. A method for encoding one or more portions of an image using adaptive loop filtering, the method comprising: 针对位流获得图像的数据;Image data is obtained from a bitstream; 使用非线性等式对图像部分的当前样本进行滤波,所述非线性等式包括各自具有用于对所述当前样本的邻近样本值和所述当前样本的值之间的差值进行限幅的限幅参数的限幅函数,其中所述当前样本的值是色度样本值,The current sample of an image portion is filtered using a nonlinear equation, which includes a limiting function, each having a limiting parameter for limiting the difference between the current sample's neighboring sample values and the current sample's value, wherein the current sample's value is a chroma sample value. 其中,在所述差值大于由所述限幅参数指示的值的情况下,将所述差值限幅为由所述限幅参数指示的值,并且所述限幅函数各自的限幅参数取决于所述邻近样本值的位置。Wherein, if the difference is greater than the value indicated by the limiting parameter, the difference is limited to the value indicated by the limiting parameter, and the limiting parameter of each limiting function depends on the position of the neighboring sample value. 2.根据权利要求1所述的方法,其中,2. The method according to claim 1, wherein, 所述限幅函数返回max(-b,min(b,d))、min(b,max(-b,d))、max(c-b,min(c+b,n))和min(c+b,max(c-b,n))中的一个,以及The limiting function returns one of max(-b,min(b,d)), min(b,max(-b,d)), max(c-b,min(c+b,n)), and min(c+b,max(c-b,n)), and... c是第一样本值,n是邻近样本值,d=n-c,以及b是所述限幅参数。c is the first sample value, n is the neighboring sample value, d = n - c, and b is the limiting parameter. 3.一种使用自适应环路滤波对图像的一个或多个部分进行解码的方法,所述方法包括:3. A method for decoding one or more portions of an image using adaptive loop filtering, the method comprising: 从位流获得图像的数据;Obtain image data from a bitstream; 使用非线性等式对图像部分的当前样本进行滤波,所述非线性等式包括各自具有用于对所述当前样本的邻近样本值和所述当前样本的值之间的差值进行限幅的限幅参数的限幅函数,其中所述当前样本的值是色度样本值,The current sample of an image portion is filtered using a nonlinear equation, which includes a limiting function, each having a limiting parameter for limiting the difference between the current sample's neighboring sample values and the current sample's value, wherein the current sample's value is a chroma sample value. 其中,在所述差值大于由所述限幅参数指示的值的情况下,将所述差值限幅为由所述限幅参数指示的值,并且所述限幅函数各自的限幅参数取决于所述邻近样本值的位置。Wherein, if the difference is greater than the value indicated by the limiting parameter, the difference is limited to the value indicated by the limiting parameter, and the limiting parameter of each limiting function depends on the position of the neighboring sample value. 4.根据权利要求3所述的方法,其中,4. The method according to claim 3, wherein, 所述限幅函数返回max(-b,min(b,d))、min(b,max(-b,d))、max(c-b,min(c+b,n))和min(c+b,max(c-b,n))中的一个,以及The limiting function returns one of max(-b,min(b,d)), min(b,max(-b,d)), max(c-b,min(c+b,n)), and min(c+b,max(c-b,n)), and... c是第一样本值,n是邻近样本值,d=n-c,以及b是所述限幅参数。c is the first sample value, n is the neighboring sample value, d = n - c, and b is the limiting parameter. 5.一种用于对图像进行编码的装置,所述装置被配置为进行根据权利要求1或2所述的方法。5. An apparatus for encoding an image, the apparatus being configured to perform the method according to claim 1 or 2. 6.一种用于对图像进行解码的装置,所述装置被配置为进行根据权利要求3或4所述的方法。6. An apparatus for decoding an image, the apparatus being configured to perform the method according to claim 3 or 4. 7.一种计算机可读存储介质,其存储有计算机程序,当所述计算机程序在计算机或处理器上运行时使所述计算机或处理器执行根据权利要求1或2所述的方法。7. A computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the method according to claim 1 or 2. 8.一种计算机可读存储介质,其存储有计算机程序,当所述计算机程序在计算机或处理器上运行时使所述计算机或处理器执行根据权利要求3或4所述的方法。8. A computer-readable storage medium storing a computer program that, when run on a computer or processor, causes the computer or processor to perform the method according to claim 3 or 4.
HK42025102097.0A 2018-12-21 2025-01-14 Method and apparatus for encoding and decoding one or more portions of an image and storage medium HK40114579A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
GB1821156.5 2018-12-21
GB1901775.5 2019-02-08

Publications (1)

Publication Number Publication Date
HK40114579A true HK40114579A (en) 2025-03-14

Family

ID=

Similar Documents

Publication Publication Date Title
JP7549709B2 (en) Adaptive Loop Filter with Nonlinear Clipping
CN113574898B (en) adaptive loop filter
HK40114579A (en) Method and apparatus for encoding and decoding one or more portions of an image and storage medium
HK40113973A (en) Method and apparatus for encoding and decoding one or more portions of an image and storage medium
HK40113972A (en) Method and apparatus for encoding and decoding one or more portions of an image and storage medium
HK40113638A (en) Method and apparatus for encoding and decoding one or more portions of an image and storage medium
HK40113981A (en) Method and apparatus for encoding and decoding one or more portions of an image and storage medium
HK40109426A (en) An adaptive loop filter
HK40109122A (en) An adaptive loop filter
HK40110125A (en) An adaptive loop filter
HK40109424A (en) An adaptive loop filter
HK40108171A (en) An adaptive loop filter