Adaptive Loop Filter with Nonlinear Clipping
A non-linear adaptive loop filter addresses the inefficiencies of linear ALFs by using adjacent sample values and clipping functions to improve artifact reduction and coding efficiency in video encoding.
Patent Information
- Application Number
- JP2023109613
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-02-08
- Filing Date
- 2023-07-03
- Publication Date
- 2024-09-11
- Estimated Expiration
- 2039-11-29
AI Technical Summary
Existing adaptive loop filters (ALFs) in video encoding are suboptimal due to their linear filtering approach, which fails to efficiently address compression artifacts, particularly in regions with high contrast or sharp edges.
Implementing a non-linear adaptive loop filter that utilizes a non-linear function based on adjacent sample values and their positions, incorporating clipping functions to enhance filtering efficiency and preserve image quality.
The non-linear adaptive loop filter effectively reduces compression artifacts while maintaining image quality, achieving a better compromise between filtering quality and coding efficiency compared to traditional linear filters.
Smart Images

Figure 0007549709000034 
Figure 0007549709000035 
Figure 0007549709000036
Abstract
Description
[Technical field]
[0001] The present invention relates to the encoding or decoding of blocks of a video component, and embodiments of the invention are of particular, but not exclusive, use in controlling filters for filtering samples of such components, and in particular, but not exclusively, to the control of an adaptive loop filter. [Background technology]
[0002] Video coding involves image coding (where an image corresponds to a single frame of a video). In video coding, some coding tools, such as quantization of transform coefficients and motion compensation (often done using interpolation filters), often introduce distortion biases / effects (distortions that appear systematic or at least not random in certain contexts). To compensate for these biases / artifacts and improve (or at least maintain a good level of) coding efficiency, some specific coding tools, called post-filters or in-loop filters, are used. Deblocking filters (DBF), sample adaptive offset (SAO) filters or adaptive loop filters (ALF) are some examples of such coding tools. In-loop filters are applied within the coding loop, so that the image quality improvement provided to the current frame allows for improved coding efficiency of the next frame, which is coded based on the current frame. For example, quantization of DCT coefficients, although efficient for video compression, often introduces blocking artifacts (biases) at the boundaries of compressed blocks of samples. Deblocking filters reduce the undesirable effects resulting from such artifacts. Deblocking (using a DBF) significantly improves the coding efficiency of motion compensation compared to deblocking a decoded frame in the coding loop (before it serves as a reference frame for motion compensation of another frame) versus deblocking a frame from the coding loop (e.g., just before displaying it). Summary of the Invention
[0003] In particular, the present invention relates to an Adaptive Loop Filter (ALF), also applied as an in-loop filter, to reduce undesirable compression artifacts in decoded frames / images. The ALF is being studied by the Video Coding Experts Group / Moving Picture Experts Group (VCEG / MPEG) standardization group and is being considered for use in the Versatile Video Coding (VVC) standard, e.g., the third version of the VVC Test Model software (VTM-3.0 or VVC Draft version 3).
[0004] It is an object of embodiments of the present invention to address one or more problems or shortcomings of the aforementioned encoding or decoding of blocks of a video component.
[0005] Although ALF is an efficient coding tool, its linear filtering is suboptimal for improving image quality. The present invention enables nonlinear filtering by ALF to improve its efficiency and / or performance.
[0006] According to aspects of the present invention, there is provided an apparatus / device, a method, a program, a computer readable storage medium, and a signal as set out in the accompanying claims. Other features of the invention will be apparent from the dependent claims and the description.
[0007] According to a first aspect of the present invention there is provided a method of controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering for a first sample of the image portion based on one or more neighbouring sample values of a first sample value of the image portion, the controlling using a non-linear function having as variables the one or more neighbouring sample values. Suitably the variables of the non-linear function comprise two or more neighbouring sample values. Suitably the variables of the non-linear function further comprise the first sample value and a first variable dependent on a position of the one or more neighbouring sample values. Suitably the first variable depends on a position of the two or more neighbouring sample values. Suitably an output of the non-linear function is used as an input (or input parameter) of the adaptive loop filter.
[0008] According to a second aspect of the present invention there is provided a method of controlling a filter for one or more image portions of an image, the method comprising controlling filtering for a first sample of the image portion based on one or more neighbouring sample values of the first sample value, the controlling using a non-linear function having a plurality of subtrahends comprising the first sample value, the one or more neighbouring sample values and a first variable, the first variable depending on the position of the one or more neighbouring sample values. Suitably the plurality of variables comprises two or more neighbouring sample values. Suitably the first variable depending on the position of the two or more neighbouring sample values. Suitably the filter is an adaptive loop filter.
[0009] According to a third aspect of the present invention there is provided a method of controlling a filter for one or more image portions of an image, the method comprising controlling filtering to a first sample based on one or more neighbouring sample values of a first sample value of the image portion, the controlling using one or more clipping functions having one or more control parameters based on the first sample value, the one or more neighbouring sample values and the clipping parameter. Suitably the one or more control parameters are based on the first sample value, two or more neighbouring sample values and the clipping parameter. Suitably the filter is an adaptive loop filter. Suitably each of the one or more clipping functions is one of max(-b, min(b,d)), min(b, max(-b,d)), max(cb, min(c+b,n)) or min(c+b, max(cb,n)), where c is the first sample value, n is the neighbouring sample value, d=nc and b is the clipping parameter.
[0010] According to a fourth aspect of the present invention there is provided a method of controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering for a first sample based on one or more neighbouring sample values of a first sample value of the image portion, the controlling using a non-linear combination of the first sample value and the one or more neighbouring sample values as input parameters of the adaptive loop filter, suitably the adaptive loop filter being as specified in VTM3.0.
[0011] According to a fifth aspect of the present invention there is provided a method of controlling an adaptive loop filter for one or more image portions of an image, the method comprising controlling filtering for a first sample based on two or more neighbouring sample values of a first sample value of the image portion, the controlling using a non-linear combination of the two or more neighbouring sample values as an input parameter of the adaptive loop filter, suitably the adaptive loop filter being as specified in VTM3.0.
[0012] For the fourth and fifth aspects of the invention, the following features may be provided according to embodiments thereof. Preferably, the non-linear combination is part of a non-linear function. Suitably, the input parameters for the adaptive loop filter further comprise a first variable depending on the position of one or more adjacent sample values. Suitably, the first variable depends on the position of two or more adjacent sample values. Suitably, the non-linear combination is the first sample value, one (or more) adjacent sample values and the first variable.
[0013] According to a sixth aspect of the present invention, there is provided a method of processing one or more portions of an image, where the image portion is associated with chroma and luma samples. The method comprises determining, based on information obtained from the bitstream or from a first sample value and one or more adjacent sample values of the image portion, at least one of: to use or not use a filter controlled using the method according to the first, second, third, fourth or fifth aspects, to enable or disable the use of said filter, or filtering parameters for use with said filter when filtering on the first sample value. Suitably, the information obtainable from the bitstream comprises a flag or index. Suitably, the information obtainable from the bitstream comprises one or more of information for identifying said filter, a flag for indicating use or not use, a flag for indicating enable or disable, information on a first variable for use with said filter, or information on a clipping parameter for specifying a value range. Suitably, the information on the first variable is for identifying a value for specifying a value or for identifying a first function as the first variable. Suitably, the first variable depends on (or is capable of varying based on) the positions of one or more adjacent sample values. Suitably, the first variable depends on the positions of two or more adjacent sample values.
[0014] According to a seventh aspect of the invention there is provided a method of encoding one or more images, the method comprising controlling a filter according to the first, second, third, fourth or fifth aspect or processing according to the sixth aspect for one or more parts of the images. Suitably the method further comprises receiving an image, encoding the received image to generate a bitstream, and processing the encoded image, the processing comprising controlling according to the first, second, third, fourth or fifth aspect or processing according to the sixth aspect. Suitably when dependent on the sixth aspect the method further comprises providing said information in the bitstream. Suitably the method further comprises selecting a non-linear function or one or more clipping 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.
[0015] According to an eighth aspect of the present invention there is provided a method of decoding one or more images, the method comprising controlling a filter according to the first, second, third, fourth or fifth aspect for one or more portions of the images, or processing according to the sixth aspect. Suitably the method further comprises receiving a bitstream, decoding information from the received bitstream to obtain an image, and processing the obtained image, the processing comprising controlling according to the first, second, third, fourth or fifth aspect, or processing according to the sixth aspect. Suitably when dependent on the sixth aspect, the method further comprises obtaining said information from the bitstream. Suitably the method further comprises obtaining information for identifying a non-linear function or one or more clipping functions from a plurality of available functions from the bitstream, and using the identified functions when processing the obtained image.
[0016] According to a ninth aspect of the present invention there is provided a device for controlling a filter for one or more parts of an image, the device comprising a controller configured to perform a method according to the first, second, third, fourth, fifth or sixth aspect.
[0017] According to a tenth aspect of the present invention there is provided a device for encoding an image, the device comprising a control device according to the ninth aspect. Suitably the device is configured to perform a method according to the seventh aspect.
[0018] According to an eleventh aspect of the present invention there is provided a device for decoding an image, the device comprising a control device according to the ninth aspect. Suitably the device is configured to perform a method according to the eighth aspect.
[0019] According to a twelfth aspect of the present invention, there is provided a method of 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 neighbouring sample values of a first sample value of the image portion, said controlling comprising using a non-linear function, the non-linear function having one or more variables based on said one or more neighbouring sample values. It is understood that neighbouring samples are not limited to adjacent samples but also include samples around or in the vicinity of the first sample. Suitably, the controlling comprises using one or more neighbouring sample values of one or more other neighbouring samples, which are not used to determine or are not used as variables of the non-linear function, as input parameters of the adaptive loop filter. Suitably, the neighbouring samples used to determine or are used as variables in the one or more (or said) non-linear functions are arranged in the shape of a cross or parallelogram at the intersection of which the first sample is. Suitably, the adjacent samples for determining or as a variable of one or more non-linear functions are arranged in the following shapes: a cross shape 5 samples high and 5 samples wide with the first sample value at the intersection when 8 adjacent samples are used for determining or as a variable in the non-linear function, or a hollow parallelogram with each side being 3 samples long, or a parallelogram with each side being 3 samples long when 12 adjacent samples are used for determining or as a variable in one or more non-linear functions. Suitably, the cross shape with the first sample at the intersection (and / or at the centre) is one of the following shapes: a "+" with a vertical and horizontal line crossing, or an "X" with a diagonal line crossing (diagonal crossing). Suitably, the (hollow) parallelogram is one of a square, a rectangle, or a diamond shape. Suitably, said (hollow) parallelogram is around or surrounds a first sample located at the center. Alternatively, adjacent samples used to determine or used as a variable in one or more (or said) non-linear functions are arranged in the following shapes with said first sample at the center: a vertical line "|", a horizontal line "-", a diagonal line "\" from top left to bottom right, or a diagonal line " / " from top right to bottom left. Alternatively, adjacent samples used to determine or used as a variable in one or more (or said) non-linear functions are arranged in the shape of a (hollow) polygon. Suitably, said (hollow) polygon is around or surrounds a first sample location located at the center. Alternatively, adjacent samples used to determine or used as a variable in one or more (or said) non-linear functions are arranged in the shape of any combination of the aforementioned shapes. Suitably, a filter variable is shared between two or more adjacent samples. Suitably, the shape of the arrangement of adjacent samples is symmetrical about a centre. Suitably, the shape of a cross, a parallelogram or a polygon is symmetrical about a centre.Alternatively, the shape of the array of adjacent samples is not symmetrical around the centre. Suitably, a cross or parallelogram is not symmetrical about the centre. Suitably, the first sample and adjacent samples of the plurality of adjacent sample values are arranged in the following shapes: a cross shape with the first sample at the intersection, or a parallelogram, or a hollow parallelogram. Suitably, the first sample and adjacent samples of the plurality of adjacent sample values are arranged in the shape of a parallelogram, with each side having a length of 4 samples if the plurality of adjacent sample values consists of values of 24 adjacent samples, or with each side having a length of 3 samples if the plurality of adjacent sample values consists of values of 12 adjacent samples. Suitably, the cross shape with the first sample at its intersection (and / or at its centre) is one of a vertical and horizontal crossing "+" or a diagonal crossing "X" (diagonal cross). Suitably, said (hollow) parallelogram is one of a square, a rectangle, or a rhombus. Suitably, said (hollow) parallelogram is around or surrounds a centrally located first sample. Alternatively, the first sample and adjacent samples of the plurality of adjacent sample values are arranged around the first sample in the following shapes: a vertical line "|", a horizontal line "-", a diagonal line "\" from top left to bottom right, or a diagonal line " / " from top right to bottom left. Alternatively, the first sample and adjacent samples of the plurality of adjacent sample values are arranged in the shape of a (hollow) polygon. Suitably, said (hollow) polygon is around or surrounds a centrally located first sample position. Alternatively, the first sample and adjacent samples of the plurality of adjacent sample values are arranged in the shape of any combination of the aforementioned shapes. Suitably, a filter variable is shared between two or more adjacent samples. Suitably, the arrangement shape of the adjacent samples is symmetrical about the center. Preferably, a cross, a parallelogram, or a polygon is symmetrical about the center. Alternatively, the shape of the arrangement of the adjacent samples does not have symmetry about the center. Suitably, the shape of a cross, a parallelogram, or a polygon does not have symmetry about the center. Suitably, the first sample and the adjacent sample are luma component samples. Alternatively, the first sample and the adjacent sample are luma component samples.Suitably, the variables of the (or one or more) non-linear function further comprise the first sample value, and the (or one or more) non-linear function is applied to a difference between the first sample value and each of the one or more adjacent sample values. Suitably, the variables of the (or one or more) non-linear function further comprise one or more filter variables dependent on the position of the first sample value and the one or more adjacent samples, each filter variable being the same for two or more adjacent samples, and the (or one or more) non-linear function is applied to a sum of two or more differences between the first sample value and a respective one of the two or more adjacent sample values of the two or more adjacent samples having the same filter variable. Suitably, an output of the (or one or more) non-linear function is used as an input (or input parameter) of an adaptive loop filter. Suitably, the non-linear function includes one or more clipping functions, each of the one or more clipping functions being one of the following: max(-b, min(b,d)), min(b, max(-b,d)), max(cb, min(c+b,n)), min(c+b, max(cb,n)), max(-b, min(b,d1+d2)), min(b, max(-b,d1+d2)), max(2*cb,min(2*c+b,n1+n2)), or min(2*c+b, max(2*cb,n1+n2)), where c is the first sample value, n or n1 or n2 is the adjacent sample value, d=nc, d1=n1-c, d2=n2-c and b is a clip parameter.
[0020] According to a thirteenth aspect of the present invention, there is provided a method of processing one or more portions of an image, the image portion being associated with chroma and luma samples, and the method comprising determining, based on information obtained from the bitstream or from a first sample value of the image portion and one or more adjacent sample values, whether to use a filter controlled using the method of the twelfth aspect, enable or disable the use of said filter, or at least one of a filter parameter or filter variable for use with said filter when filtering the first sample value. Suitably, the information obtained from the bitstream comprises a flag provided for one of the luma or chroma components, the flag indicating for that component at least one of whether to use a filter controlled using the method of the twelfth aspect, enable or disable the use of said filter. Suitably, the flag is provided in an adaptation parameter set. Preferably, the information obtained from the bitstream comprises a flag provided for one or more image parts, which flag indicates for at least one or more image parts whether a filter controlled using the technique of aspect 12 should be used or not, or whether the use of said filter is enabled or disabled. Suitably, the flag is provided in an adaptation parameter set.
[0021] According to a 14th aspect of the present invention there is provided a method of encoding one or more images, the method comprising controlling a filter according to the method of the 12th aspect or processing according to the method of the 13th aspect for one or more portions of the images. Suitably the method further comprises receiving an image, encoding the received image to generate a bitstream and processing the encoded image, said processing comprising controlling according to the method of the 12th aspect or processing according to the method of the 13th aspect. Suitably (when dependent on the 13th aspect) the method further comprises providing said information in the bitstream. Suitably the non-linear function comprises one or more clipping functions, the variables of the (or the) non-linear function further comprising one or more filter variables whose values depend on the position of one or more of a plurality of neighbouring samples used as variables in the (or the) non-linear function, and providing said information comprises providing one or more clipping parameters in the bitstream, and if the filter variable for a position is zero then no clipping parameters are provided in the bitstream for use with the clipping function applied to the neighbouring sample values of the neighbouring samples at that position. Suitably, the method further comprises selecting a non-linear function or one or more clipping functions from a plurality of available functions, using the selected function when processing the encoded image, and providing information in the bitstream identifying the selected function.
[0022] According to a 15th aspect of the present invention there is provided a method of decoding one or more images comprising controlling a filter in accordance with the method of the 12th aspect or processing in accordance with the method of the 13th aspect for one or more parts of the images. Suitably, the method further comprises receiving a bitstream, decoding information from the received bitstream to obtain an image, and processing the obtained image, the processing comprising controlling according to the method of the twelfth aspect or processing according to the method of the thirteenth aspect. Suitably (when dependent on the thirteenth aspect) the method further comprises obtaining said information from the bitstream. Suitably, the non-linear function comprises one or more clipping functions, and further comprises one or more filter variables whose values depend on the position of the one or more neighbouring samples used as variables of the (one or more) non-linear function, and if the filter variable for a position is zero, the clipping function is not applied to the neighbouring sample value of the neighbouring sample at that position. Suitably, the method further comprises obtaining information from the bitstream for identifying a non-linear function or one or more clipping functions from a plurality of available functions, and using the identified functions when processing the obtained image.
[0023] According to a 16th aspect of the present invention there is provided a device comprising a controller configured to perform the method of the 12th or 13th aspect and an encoder configured to perform the method of the 14th aspect or a decoder configured to perform the method of the 15th aspect.
[0024] According to a 17th aspect of the present invention there is provided a device for controlling a filter for one or more parts of an image, the device comprising a controller configured to perform the method of the 12th or 13th aspect.
[0025] According to an 18th aspect of the present invention there is provided a device for encoding an image, the device comprising the control device of the 17th aspect. Suitably the device is configured to perform the method of the 14th aspect.
[0026] According to a 19th aspect of the present invention there is provided a device for decoding an image, the device comprising the control device of the 17th aspect. Suitably the device is configured to perform the method of the 15th aspect.
[0027] According to a twentieth aspect of the present invention there is provided a program which, when executed on a computer or processor, causes the computer or processor to carry out a method according to the first, second, third, fourth, fifth, sixth, seventh, eighth, twelfth, thirteenth, fourteenth or fifteenth aspects.
[0028] According to a twenty-first aspect of the present invention, there is provided a computer-readable storage medium storing a computer program according to the twentieth aspect.
[0029] According to a twenty-second aspect of the present invention there is provided a signal conveying an information dataset for an image, encoded using a method according to the seventh or fourteenth aspect and represented by a bitstream, the image comprising a set of reconfigurable samples, each reconfigurable sample having a sample value, the information dataset comprising control data for controlling filtering for a first reconfigurable sample based on sample values of neighbouring samples of the first reconfigurable sample.
[0030] With respect to the aforementioned aspects of the invention, the following features may be provided according to embodiments of the invention: Preferably, the non-linear function comprises one or more of a clipping function, a sawtooth kernel function, a triangle kernel function, or a Gaussian kernel function. Suitably, the non-linear function comprises one or more clipping functions, each of the one or more clipping functions being one of max(-b, min(b,d)), min(b, max(-b,d)), max(cb,min(c+b,d)), min(c+b,max(cb,d)), max(-b,min(b,d1+d2)), min(b,max(-b,d1+d2)), max(2*cb,min(2*c+b,n1+n2)) or min(2*c+b,max(2*cb,n1+n2)), where c is the first sample value, n or n1 or n2 is an adjacent sample value, d=nc, d1=n1-c, d2=n2-c, d2=n2-c and b is a clipping parameter. Suitably, the variable(s) are independent variables of a (mathematical) non-linear function and the output of the non-linear function is its dependent variable. Suitably, the position of an adjacent sample is defined as a relative distance or displacement from the position of the first sample. Suitably, the position of an adjacent sample is defined as its position in the (raster) scan order (suitably relative to the position of the first sample in the (raster) scan order). Suitably, the adaptive loop filter performs filtering using the non-linear function. Suitably, the output of the non-linear function is used as an input (or input parameter) of the adaptive loop filter. Suitably, applying the adaptive loop filter to the one or more inputs (parameters) comprises using a linear function having the one or more inputs (parameters) as its variables. Suitably, the adaptive loop filter is as specified in VTM3.0.
[0031] Yet another aspect of the invention relates to a program which, when executed by a computer or processor, causes the computer or processor to perform any of the methods of the previous aspects. The program may be provided on its own or may be carried on, by or within a carrier medium. The carrier medium may be non-transitory, for example a storage medium, in particular a computer-readable storage medium. The carrier medium may also be transitory, for example a signal or other transmission medium. The signal may be transmitted over any suitable network, including the Internet.
[0032] Yet another aspect of the invention relates to a camera comprising a device according to any of the aforementioned device aspects. According to yet another aspect of the invention there is provided a mobile device comprising a device according to any of the aforementioned device aspects and / or a camera embodying the aforementioned camera aspects.
[0033] 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, a feature implemented in hardware may be implemented in software, and vice versa. All references to software and hardware features described herein should be interpreted accordingly. Any apparatus feature as described herein may be provided as a method feature, and vice versa. As used herein, means-plus-function features may alternatively be expressed in terms of their corresponding structure, such as a suitably programmed processor and associated memory. It should also be understood that the specific combinations of various features described and defined in any aspect of the invention may be implemented and / or provided and / or used independently. [Brief description of the drawings]
[0034] Embodiments of the invention will now be described, by way of example only, with reference to the following drawings: [Figure 1] FIG. 13 is a diagram showing the case where ALF is performed in a typical decoding loop of VTM-3.0. [Diagram 2] 1 is a flow chart outlining the syntax elements present in VTM-3.0 of the ALF. [Figure 3-a] 4 is a flow chart illustrating steps for filtering chroma components according to one embodiment of the present invention. [Figure 3-b] FIG. 2 provides filter shapes and coefficient arrangements for a chroma filter according to one embodiment of the present invention. [Figure 4-a] 4 is a flow chart illustrating steps for filtering the luma component according to one embodiment of the present invention. [Figure 4-b] FIG. 2 provides filter shapes and four possible coefficient arrangements for a luma filter according to one embodiment of the present invention. [Diagram 5] 4 is a flow chart outlining modified syntax elements according to one embodiment of the present invention; [Figure 6] Block diagram of the linear filter in ALF in VTM-3.0. [Figure 7] FIG. 2 is a block diagram of a nonlinear filter according to one embodiment of the present invention. [Figure 8] 8 is a block diagram of a linear filter obtained when the nonlinear portion of the filter of FIG. 7 is disabled, in accordance with one embodiment of the present invention. [Figure 9] 4 is a flow chart illustrating an ALF encoding process according to one embodiment of the present invention. [Figure 10] 3 is a flow chart illustrating steps of an encoding method according to an embodiment of the present invention. [Figure 11] 3 is a flow chart illustrating steps of a decoding method according to an embodiment of the present invention. [Figure 12] 1 is a block diagram that illustrates generally a data communications system in which one or more embodiments of the present invention may be implemented. [Figure 13] 1 is a block diagram illustrating components of a processing device capable of implementing one or more embodiments of the present invention. [Figure 14]FIG. 1 illustrates a network camera system in which one or more embodiments of the present invention may be implemented. [Figure 15] FIG. 1 illustrates a smartphone in which one or more embodiments of the present invention can be implemented. [Figure 16-a] FIG. 13 provides a 7x7 diamond filter shape with a reduced number of clip positions according to an embodiment of the present invention. [Figure 16-b] FIG. 13 provides a 5x5 diamond filter shape with a reduced number of clip positions according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0035] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The embodiments of the present invention described below relate to improved image encoding and decoding.
[0036] In this specification, "signaling" can refer to the insertion into (providing / including in encoding) or extraction / obtaining (decoding) of bitstream information regarding one or more parameters for controlling a filter, e.g., to use, not use, enable, or disable a mode / scheme or other filter control related information.
[0037] In this specification, the term "slice" is used as an example of an image portion (other examples of such an image portion are a tile or a tile group, which is a group / setting of tiles). It is understood that embodiments of the present invention may be implemented based on image portions (e.g., tiles or tile groups) instead of slices, and appropriately modified parameters / values / syntax, such as image portion / tile / tile group headers (instead of slice headers), image portion / tile / tile group types (instead of slice types), and image portion / tile / tile group statistics (instead of slice statistics). It is also understood that embodiments of the present invention may use an adaptation parameter set (APS) or a tile (group) header to signal ALF parameters (or information for using ALF filtering) instead of a slice header or a sequence parameter set (SPS). If an APS is used to signal ALF parameters (or information for using ALF filtering), the slice header or tile group header may be used to indicate which APS needs to be used to obtain the ALF parameters (or information for using ALF filtering), for example by indicating an adaptation set identifier (APS_id). It is also understood that any of the following may be referred to as an image portion: a slice, a tile group, a tile, a coding tree unit (CTU) / largest coding unit (LCU), a coding tree block (CTB), a coding unit (CU), a prediction unit (PU), a transform unit (TU), or a block of pixels / samples.
[0038] When a filter or tool is described as "active" it indicates that the filter / tool is "available" or "enabled" or used, when described as "inactive" it indicates that the filter / tool is "unavailable" or "disabled" or not used, and "class" refers to a group, grouping, category, or classification of one or more elements. Additionally, when a flag is described as "active", it is understood that the flag means that the associated filter / tool is "active".
[0039] Adaptive Loop Filter (ALF) FIG. 1 shows the case where ALF is performed in a typical decoding loop of VTM-3.0. At 101, an image portion (e.g., slice) is decoded in coding tree units (CTUs: the largest coding unit in VVC, typically 128×128 samples / pixel size). The CTUs are divided into rectangular blocks or coding units (CUs) that are coded using a specific prediction scheme / mode, often using lossy coding of the residual blocks. Due to the use of block-based coding, blocking artifacts may be visible at the boundaries between coded blocks. At 102, the decoded image portion is then processed by DBF to reduce / remove these artifacts. Typically, to code the residuals (blocks) for block prediction, the residual values are transformed using a DCT-like transform (to compress the residual energy into a small number of coefficients), and the transformed coefficients are quantized to reduce the coding cost. This quantization often introduces some ringing artifacts in the reconstructed blocks (i.e., blocks in the reference frame stored in the frame buffer 106). At 103, the output image portion of the DBF is then processed by an SAO filter, which is useful for reducing some of these artifacts at low computational cost. At 104, the output image portion of the SAO filter is processed by an ALF, which can further reduce artifacts such as, for example, "ringing". The ALF has higher order error modeling capabilities, but at a higher computational cost. The output image portion of the ALF is then sent to an output (e.g., a display or a communication interface for communicating with a display) 105. It can also be put into a frame buffer 106 (as part of a reference frame stored there) so that it can be used for temporal prediction (if a temporal prediction tool is used). This is why the DBF, SAO filter, and ALF are called "in-the-loop" filters.The encoder may disable some of the in-loop filters so that they are bypassed during decoding (i.e., no filtering is performed and the output of the step corresponding to the disabled tool is the same as its input). Also, in some cases, the image portion being processed is not limited to a slice but may be a full frame containing one or more slices, and filters may be applied across slice boundaries (if there are more than one) to reduce artifacts on those boundaries. For multi-component images (e.g., images in YCrCb format), DBF, SAO filter, or ALF processing is applied to each component separately, possibly differently (e.g., with different filtering parameters relative to the other components).
[0040] Figure 2 shows an overview of the syntax elements present in VTM-3.0 for ALF. The Sequence Parameter Set (SPS) indicates whether the ALF tool is active for the video sequence (201), and if so, the slice header indicates whether ALF is active for the slice (202) and provides filter parameters (203-207) for controlling the ALF. When ALF is active in 202, it is active for at least the Luma component, and the slice header further indicates whether ALF is active for each Chroma component (203).
[0041] The ALF can use more than one filter on one luma component; that is, multiple tables of filter coefficients can be used, since different filter configurations can share the same filter coefficients (described below). In the syntax element scheme of the VTM-3.0 software, these different filter configurations are not individually distinguishable, and filters with different configurations are considered the same filter. In the following description, the same reference to a single filter is used, except when explicitly referring to different tables of coefficients. This sharing of a single filter in the syntax element scheme is an effective way to reduce the number of bits allocated to the filter, by considering that the statistics on the filtered image are the same for rotated orthogonal and / or mirror configurations, i.e., one reference filter designed for a reference sample configuration is specified to be rotated and / or mirrored to filter the orthogonal and / or mirror sample configurations. The slice header includes the number of coded luma filters (204), which is one or more.
[0042] When filtering luma samples, the ALF locally categorizes the samples (according to the configuration of neighboring samples) into one of 25 possible classes (categories / classifications / groups) and selects a filter (associated / assigned to that particular class / category / classification / group) and applies it locally to those samples. The terms "locally" classify and "locally" apply are used here because samples are processed block-wise (typically 4x4 samples, e.g., VTM-3.0) or CU-wise. The selected luma filter is signaled in the bitstream using an index / information or the like to identify the selected luma filter. If the number of luma filters used during the encoding process is more than one, the slice header also includes one or more indices (205) to identify / select these luma filters (e.g., indices of up to 25 filters used for 25 classes, each index corresponding to a luma filter used for one of these classes). If the number of luma filters used in the encoding process is one, this single luma filter is applied to all classes.
[0043] The slice header then contains all the filter coefficients (or filter parameters) for each of the luma filters (206) (i.e., coefficient tables for each of the luma filters used during the encoding process), followed by the filter coefficients for the chroma filters (207). Note that in VTM-3.0, two chroma components share the same chroma filter when ALF is active (i.e., enabled) for both chroma components.
[0044] When ALF is active, filtering may be enabled per CTU for each of the components for which ALF is active. Inside the encoded bitstream, for each CTU, the encoded slice data includes one entropy coded flag for each component for which ALF is active to indicate whether ALF is enabled on that CTU's components (208, 209, and 210) and whether samples of that component of that CTU should be filtered using ALF. This flag is coded using context-adaptive binary arithmetic coding (CABAC).
[0045] In VTM-3.0, the signaling of the luma filter 206 coefficients is performed as follows: [1] The “alf coefficients delta flag” is signaled first. This flag indicates whether some filters can be disabled. If the “alf coefficients delta flag” is zero and the number of luma filters is greater than one, the “coeff delta pred mode flag” is signaled to indicate that the filter coefficient encoding uses prediction (more details below). [2] VTM-3.0 uses 3 (2 for Chroma) (exp-)Golomb configurations to encode the luma coefficients using (exp-)Golomb coding. The only parameter of (exp-)Golomb coding is the (exp-)Golomb order (often denoted as "k"). Each configuration has an (exp-)Golomb index. The parameters of the (exp-)Golomb coding of the filter coefficients are signaled using a variable length code (VLC) for the "minimum order" of the (exp-)Golomb code, and then for each (exp-)Golomb index, a flag is signaled to signal if the (exp-)Golomb order should be increased for that index and the next index (starting with the "minimum order" for the first index). [3] Then, if the “alf coefficient delta flag” indicates that some filters are enabled, a flag is signaled for each filter indicating whether the filter is disabled (i.e., not coded). [4] The filter coefficients are then signaled for each (non-disabled) filter using an exp-) Golomb code (for signed integers) with the (exp-) Golomb order taken at the (exp-) Golomb index associated with the filter coefficient index (in a fixed table) from a table storing the (exp-) Golomb parameters.
[0046] If the “coeff delta pred mode flag” is signaled, it indicates that the filter coefficient encoding uses prediction. This means that the filter coefficients of the “current” filter with filter index (i.e., an index identifying the respective filter) equal to or greater than 1 are encoded as differences between the filter coefficients of the “current” filter and the filter coefficients of previously processed filters (e.g., encoded as filter coefficient residual values using the filter coefficients of the previously processed filters as filter coefficient predictors, i.e., using prediction). The first filter (with filter index 0) is encoded without prediction.
[0047] The signaling of the coefficients of the chroma filter 207 is performed similarly to the luma filter, except that there is no “alf coefficients delta flag”, there is no “coeff delta prediction mode flag”, and there are two (exp-)Golomb indices instead of three.
[0048] FIG. 3-a is a flow chart showing steps for filtering chroma components according to one embodiment of the present invention, and FIG. 3-b provides a filter shape and coefficient arrangement for a chroma filter according to one embodiment of the present invention.
[0049] In Fig. 3-a, ALF filtering is applied differently between Luma and Chroma components. Starting from the simple case, Fig. 3-a provides the main steps for filtering chroma components. An input image portion 301 (e.g., a tile or tile group) contains chroma samples to be filtered. Input filtering parameters 302 include ALF parameters (e.g., "ALF coefficient delta flag", "coeff delta prediction mode flag", filter coefficients, or any other flags or filter parameters of ALF) as described with reference to the ALF syntax elements of Fig. 2. Using the encoded filter coefficients of the chroma filter, a chroma filter is derived / obtained at 303.
[0050] In a variant, the Chroma filter has a diamond shape / pattern / mask / support of size 5x5, i.e. 5 samples high and 5 samples wide (see 306 in Fig. 3-b). The filter coefficients of the Chroma filter are arranged to be symmetrical with respect to the center of the "Chroma" filter. This Chroma filter has 6 encoding filter coefficients, indexed with numbers 0 to 5. The coefficients are located at the corresponding coefficient positions shown in the figure. The superscripts ("+" or "-") of the index numbers are provided to distinguish between different coefficient positions that share the same filter coefficient, i.e. when referring to two symmetric (in the sense of sharing the same filter coefficient) neighbors, i + corresponds to the index i that is encoded / decoded / processed / stored / accessed after the sample to be filtered in (raster) scan order (i.e., at the center of the filter shape / pattern / mask / support), and i - corresponds to the adjacent sample with index i that is coded / decoded / processed / stored / accessed before the sample being filtered in (raster) scan order. The 7th coefficient (coefficient position with index number 6) relative to the center of the chroma filter shape is estimated / derived from the other filter coefficients. The value of the 7th coefficient is calculated using fixed-point arithmetic (w i = filter coefficient with index i), 1-2.Σi<6 w i That is, it is equal to 1 minus 2 times (for symmetry) the sum of all filter coefficients for coefficient positions 0 to 5. Thus, the sum of all coefficients in the diamond, including the 7th coefficient, is 1 with a left-side 7-bit shift applied (1<<7), where 7 is the bit precision of the encoded filter coefficients minus 1 for fixed-point arithmetic. This is why only half of "total number of filter coefficients minus 1" is the number of filter coefficients that are encoded in the bitstream.
[0051] For each chroma component sample for which the ALF is active (i.e., applied), the filtering in step 304 is performed as follows to obtain an output image portion 305: for each current sample of the input image portion: - the output filtered sample at the same position as the current sample I(x,y) at position (x,y) is obtained if the current sample belongs to a CTU and ALF is enabled, and if the neighboring samples of the current sample required to obtain the filter coefficients for the coefficient positions in the diamond shape of the chroma filter (where the current sample is located in the center of the diamond shape) are available (for example, using border extension on the image border, or using neighboring slice samples if available on the slice border); Equal to TIFF0007549709000001.tif8138. Here, i and j are two integer offsets (horizontal and vertical) with respect to the center of the filter shape (i.e., the position (x, y) of the current sample). w(i, j) is the filter coefficient at offset (i, j). N = 7 is the number of bits for the integer approximation of the fractional part of the real number (fixed-point representation) used in the representation of the filter coefficient w(i, j) at offset (i, j). I(x + i, y + j) is the input sample value at offset (i, j) with respect to the current sample position (x, y). O(x, y) is the output filtered sample value at position (x, y). a << N indicates that a N-bit left shift is applied to the integer value a. This is equivalent to multiplying the integer by 2 to the power of N. a >> N indicates that a N-bit right shift is applied to the integer value a. Here, since the result of the sum inside the parentheses in Equation (1) is positive in most cases, it is equivalent to integer division of a power of 2 by 2. For negative numbers, the sign propagates when right-shifting such that the negative number remains negative (at least -1). Since the output of the ALF is generally clipped between 0 and the value obtained by subtracting 1 from 2 to the power of the added bits, there is no fractional part. N = 7 provides the fixed-point precision fixed for VVC for the ALF operation, but other values can be used in other embodiments. The effect of the addition (1 << (N - 1)) before performing the right shift >> N is the rounding of the fixed-point result of the scalar product. - Otherwise, output the current sample value at the same position (i.e., without applying this ALF).
[0052] According to a modification of this embodiment, in order to reduce the number of multiplication operations performed while implementing the filter and simplify the notation, for an ALF filter having a filter shape symmetric about the center, Equation (1) can be reformulated as follows. TIFF0007549709000002.tif8144 Here, O nis the output sample at raster scan order index / position n. By raster scan order index n, we mean that sample indices increase from left to right in a row of samples, then from top to bottom. n c is the input sample at the same position as the output sample (and corresponds to the position of the input sample at the center of the filter). n i- is the filter shape / pattern / mask / support of the filter in raster scan order less than n n c is the i-th (in raster scan order) neighboring input sample of I n i+ I n c I around the center position of the filter n i- The adjacent input samples are at mirror image spatial positions. Therefore, a shape that is symmetric about the center is I n i- When is within the shape / pattern / mask / support of the filter, I n i+ means that the filters are in the same filter shape / pattern / mask / support. i is the adjacent input sample I n i- and I n i+ are the filter coefficients related to w c is the center input sample I n c where c is the number of coded filter coefficients (this is the same as the index value for the central filter coefficient, which is not coded since it can be evaluated from its neighboring filter coefficients). n i- , I n i+ corresponds to the index value and the index value with a superscript sign ("+" or "-") in the filter shape 306 of FIG. 3B, for example, the index c of the filter coefficient at the center of the filter shape is i=c="6".
[0053] FIG. 4-a is a flow chart showing steps for filtering the luma component according to one embodiment of the present invention, and FIG. 4-b provides the filter shape and four possible coefficient arrangements of a luma filter according to one embodiment of the present invention.
[0054] FIG. 4-a illustrates the main steps of the filtering process of the luma component. An input image portion 401 contains the luma samples to be filtered. Input filtering parameters 402 contain the ALF parameters described with reference to the ALF syntax elements of FIG. 2 (e.g., “ALF coefficient delta flag”, “coeff delta prediction mode flag”, filter coefficients, or any other flags or filter parameters for ALF). Before filtering, the content of the image portion is analyzed in 403. The main purpose of this analysis is to allow / enable the determination of the local content orientation and activity level (see step 405). This allows / enables a local estimation / evaluation of whether the content is homogenous or has some sharp changes (approximately the content intensity or contrast) and whether the content has a dominant orientation (e.g. based on edges or oriented textures) and which orientation that dominant orientation is. For example, in VTM-3.0, this analysis involves a local gradient analysis using Laplacian values calculated for four directions (horizontal, vertical, and two diagonals) for every two samples, horizontal and vertical (i.e., a quarter of a sample). By dividing the samples of the input image portion into blocks 404 (e.g., 4x4 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 being identifiable using an index (i.e., the block is classified into one of 25 categories / classifications / groups) according to the Laplacian values calculated for the samples in the block. For example, in VTM-3.0, it corresponds to using 16 Laplacian values (4 orientations on 4 samples). This classification achieves a division of the directional strength of the activity, dissociating the horizontal and vertical directions from the diagonal directions. Also in step 405, each block is associated with a transposed index. This transposition index (e.g., “transposeIdx”) can be seen as complementary / additional information to the classification, to fully represent / indicate the content orientation. There are four possible transposition indexes:If the class of a block indicates that the block is either horizontal or vertical, the transposition index further indicates whether the orientation is north to south, east to west, west to east, or south to north. If the class of a block indicates that the block is diagonal, the transposition index further indicates whether the orientation is northwest to southeast, northeast to southwest, southwest to northeast, or southeast to northwest.
[0055] The class index and the transpose index can be seen as adaptive loop filter parameters for a given block of samples. In step 406, these parameters are used to derive the luma filter that is used to filter each of the samples of the block. As previously described with reference to FIG. 2, in 402, each class is associated with an index of the luma filter's coefficient table. To derive the luma filter for a 4×4 block, the transpose index allows / enables the selection of one of the four shapes / patterns 409, 410, 411, or 412 shown in FIG. 4-b. The pattern indicates how to organize the coded filter coefficients (e.g., based on the scanning order) to build the luma filter, which is associated with the class of the block, as explained in the description for 204-206. The luma filter has a diamond shape of size 7×7. There are 12 coded filter coefficients (index numbers 0-11) for each luma filter. The 13th coefficient (index 12) for the center of the filter shape is estimated / derived from the other filter coefficients in the same way as for the center coefficient of the chroma filter described above.
[0056] The filtering in step 407 to obtain the output image portion 408 is performed in the same way as filtering was performed by the chroma filter, i.e. for each current block of samples, the luma filter derived / obtained in 406 for the current block is applied to each current sample of the current block.
[0057] When filtering luma samples, for orientation-based classification (class) and associated transposition (transposeIdx), the optimal ALF filter for each class (i.e., “orientation based filters”) is selected based on the local orientation, e.g., local gradient; those with particularly high activity (e.g., high local gradient) tend to be orientation filters. In regions with the lowest activity, i.e., regions with blocks belonging to classes with relatively small local gradients, such orientations are less pronounced and orientation-based filters for such blocks tend to be non-orientation filters.
[0058] Orientation-based filters are suitable for filtering around edges without significantly affecting the sharpness of the edges. As described below, classes can be grouped together to reduce the signaling cost of the filters. Even with this grouping of classes, filter optimization generally leads to obtaining oriented filters. In such orientation-based (ALF) filters, if the local gradient is along the horizontal direction, the filter orientation is generally vertical (i.e., the highest coefficients (in absolute value) are generally at the positions above and below the center, while the coefficients to the left and right of the center are generally close to zero). Similarly, if the local gradient is along the vertical direction, the filter orientation is generally horizontal, and if the local gradient is along a diagonal direction, the filter orientation is generally along a direction that is perpendicular to the diagonal direction of the local gradient.
[0059] When filtering chroma samples in VTM-3.0, in contrast to luma sample filtering, no classification is used (and chroma is often smooth), so the filters used are generally more responsive to all directions and are not orientation filters (or are not period-based filters).
[0060] The filter shapes in both Fig. 3-b and Fig. 4-b are symmetrical about the center pixel. This symmetry has been chosen in the design of the ALF in the VTM software, but in variants of the embodiment, asymmetrical shapes can also be used. Then, instead of sharing 7 coefficients for 13 input samples, up to 13 coefficients could be used for the same filter support / mask as in Fig. 3-b. And, instead of sharing 13 coefficients for 25 input samples, up to 25 coefficients could be used for the same filter support / mask as in Fig. 4-b. In other variants, even the filter support / mask is asymmetrical. In variants, the filter shape / pattern / support / mask is transmitted along with the ALF parameters.
[0061] In other variations, the filter shape / pattern / support / mask is different from a diamond 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 another it is an octagon.
[0062] In some variations, the filter shape / pattern / support / mask is not the same 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, a North-West South-East (NW-SE, e.g., "\") rectangle for NW-SE and SE-NW class / transposeIdx orientation configurations, and a North-East South-West (NE-SW, e.g., " / ") rectangle for NE-SW and SW-NE class / transposeIdx orientation configurations. In other variations, the filter shape / pattern / support / mask is a horizontal-vertical cross ("+"), a diagonal cross ("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 aforementioned filter shapes / patterns / support / masks.
[0063] Figure 6 provides a block diagram of a linear filter in the ALF, whose filtering corresponds functionally to equation (1), where "C" 601 corresponds to the sample value of the current sample, I(x,y), and "S0" 602 through "Sn" 603 correspond to adjacent sample values I(x+i,y+j), respectively, where (i,j)≠(0,0). “wC” 604 corresponds to the filter coefficient w(0,0) of the current sample, and “w0” 605 through “wn” 606 correspond to the filter coefficients w(i,j) of the neighboring samples at position (x+i,y+j), respectively, where (i,j) ≠ (0,0). “O” 607 is the output of the ALF filter, O(x,y), i.e., the filtered sample value of the current sample. The process takes as input a table of integer input sample values (i.e., “C” and “S0” through “Sn”), and a table of input weights, i.e., fixed-point precision Take “wC” and “w0” through “wn” (or filter coefficients) which are integer representations of real numbers with fixed-point precision. Note that this table has the same number of elements as the table of integer input sample values, in integer representations of real numbers with fixed-point precision. The two tables have the same number of elements and are multiplied element-wise, and the results of these multiplications are summed together (i.e. we get a linear combination of the elements of these two tables). The result of this operation is a fixed-point precision approximation of the real numbers. This fixed-point value is rounded to an integer value, resulting in one output sample value “O”.
[0064] From the encoder's point of view, ALF is inspired by the Wiener Filter. The Wiener Filter is a linear filter (often applied as a linear convolution filter in signal / image processing) that minimizes the mean squared error between 1) an estimated random process / variable (its output), which is a linear combination of a finite number of observed processes / variables (its inputs), and 2) a desired process / variable (its target, i.e. the original image before artifacts occur). In signal / image processing, the Finite Impulse Response (FIR) Wiener Filter has applications, for example, in source separation or denoising. In the case of image coding, the target is the original image (before it is modified by compression / quantization) and the inputs are the samples from the compressed image that we want to improve by applying a filter.
[0065] The least-squares solution for X, which is an input matrix of realizations of the observed random processes, with each column containing one realization for each one of the random processes, and y, which is an output row vector containing the realizations of the desired process for the observed random processes at the same column index, is The file is TIFF0007549709000003.tif6144. Here, the Wiener filter coefficient corresponds to ̂W.
[0066] It is understood that a "realization" is an observation or observed value of a random variable, i.e., a value that is actually observed.
[0067] In the VTM-3.0 ALF encoder, an FIR Wiener filter (or a functionally equivalent least-squares solution) is used to optimize the rate / distortion (R / D) compromise between the coding cost of the ALF parameters (dominated mainly by the cost of coding the FIR filter coefficients) and the distortion gain obtained by filtering the image using the coded ALF parameters (FIR filter). If the rate (i.e., coding cost) for coding the ALF parameters is not a concern, and if the only goal is to maximize the peak signal-to-noise ratio (PSNR) of a given frame (without considering temporal effects), then the Wiener filter would allow achieving an optimal solution for the ALF filtering design in VTM-3.0. Thus, an ALF encoder according to an embodiment of the present invention can use a filter that is the same as or similar to the linear ALF filter provided therewith.
[0068] Figure 9 shows a flow chart illustrating an ALF encoding process according to one embodiment of the present invention, which is implemented by modifying the ALF of VTM-3.0 described with reference to Figure 6. It will be appreciated that, according to other embodiments of the present invention, other ALFs may be modified in the same manner to implement said other embodiments.
[0069] The ALF encoding process begins by determining the class index and transposition index for each 4x4 block of 901 luma samples.
[0070] Next, at 902, the statistics used to derive the Wiener filter are extracted / obtained. These statistics are expressed as XX T (auto-covariance statistics) corresponding to Xy T These are the cross-covariance statistics corresponding to the formula: XX T and Xy TDividing each by N (the number of columns of X, i.e., the number of samples into the filter) is used to construct / obtain / estimate (auto)covariance and cross-covariance matrices. These (auto)covariance and cross-covariance matrices are constructed / obtained / estimated 902 for each class, for each CTU of luma component samples, and for each CTU of chroma component samples 902. In the following description, the terms “(cross-)covariance matrix statistics” and “(cross-)covariance matrix” are used interchangeably to refer to the same thing. It is understood that the difference between the two is that “(cross-)covariance matrix statistics” are obtained by accumulating (or summing) values, whereas “(cross-)covariance matrix” is also obtained by accumulating (or summing) values, but then normalized by the number of accumulations (to estimate the expected value).
[0071] For a given CTU / class / component, X is obtained as follows: Since the filter shape is considered to be symmetric, the number of rows in X corresponds to the number of filter coefficients of the filter. One row (the last row) of X contains the realization of the center sample in the filter shape (the center of the filter shape belongs to the given CTU / class / component), while the other row with index i contains the sum of two symmetric samples with index i in the filter shape (the symmetric samples are the neighborhood of the center of the filter shape belonging to the given CTU / class / component). For the samples of the luma component, the transposition index is also used to transpose the sample positions of the filter shape according to the different shapes in Fig. 4-b, so that each row i of X contains the sample statistics of the samples belonging to the filter shape with index i. For example, for the shape in Fig. 4-b, X i,j contains the sum of the two symmetric neighbors of (j-th filtered sample) at index i in the shape for i<12, and contains the j-th filtered sample for i=12. Here, X i,j is the value in row i, column j of matrix X.
[0072] The vector y contains all the target sample values (i.e., y iis the value of the jth sample in the source / original image before compression).
[0073] The X matrix is not actually constructed / computed. Instead, XX T X i X i T It is calculated by repeatedly summing the results of X i is the i-th column of X for a given sample location.
[0074] The y vector is not actually constructed / computed. Instead, Xy T X i y i T It is calculated by iteratively summing the results of y i is the i-th element of y and the input X i corresponds to the target sample value when filtering the i-th sample.
[0075] In VTM-3.0, the ALF encoder tries to reduce the R / D cost, which is equal to D+λR, the Lagrangian optimization of the rate-distortion compromise, where 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 parameter (QP), slice type (intra or inter), and type of compressed component (luma or chroma). The ALF encoder first tries to optimize the ALF parameters by minimizing this Lagrangian R / D cost.
[0076] If the ALF reduces the cost for the luma component, i.e., the distortion of the output slice when the ALF is not active is greater than the distortion when the ALF is active plus λ times the rate required to signal the ALF parameters, the encoder decides on an active ALF for the luma component. It then tries to see if it can optimize the ALF parameters for the chroma components, if active for the luma component, to improve the R / D cost of signaling those chroma components. Based on this, the encoder can decide whether it is better to enable / disable the ALF for each of these components.
[0077] According to an embodiment of the present invention, the ALF encoder performs the same or a functionally equivalent optimization process for its ALF parameters. According to a variant of such an embodiment, at the start of the ALF parameter optimization process, the ALF is set to active for all CTUs 903. Statistics at slice level for constructing the covariance and cross-covariance matrices are obtained by aggregating statistics for each CTU for which the ALF is active / enabled. One matrix is calculated for each class for the luma component 904 using statistics obtained for all samples of a 4x4 sample block classified as belonging to that class, and one matrix is calculated for the chroma by aggregating (summing) the statistics of the two chroma components 912.
[0078] Luma's filter optimization process starts by searching 25 groups of filters for combining / merging classes, i.e., a first group of 25 filters, a second group of 24 filters, and so on down to a final group of one filter (one group for each possible number of filters) 905. The encoder starts with one filter for each class (so 25 filters in total). This is a Wiener filter calculated from the covariance and cross-covariance of samples of blocks of that class. This is the first group of 25 filters. It iteratively tries to reduce the number of filters (one by one, until only one is left, to get all desired groups) by merging filters together, i.e., by merging related classes of filters together to make them more precise. The encoder first makes classes associated with two different filters share a common filter (i.e., the encoder merges two classes to share one associated filter). To determine which filters to merge (i.e., which classes to merge), covariance and cross-covariance statistics are determined for each filter. The encoder estimates / evaluates, for each filter associated with one or more classes (indexes), the total residual error obtained after using the filter to perform filtering on all blocks of samples associated with that class(es). Then, for each pair of filters (and their associated classes), the encoder calculates merged covariance and cross-covariance statistics to determine the merged class Wiener filter and the total residual obtained after filtering all blocks of samples associated with the class index with the determined Wiener filter.The encoder then determines the two filters for which the difference between the total residual error of the merged filter (derived from the statistics associated with the classes associated with the two filters) is minimal, and the sum of the total residual errors of these two filters (by adding the total residual error of one filter with the other), and merges these two filters (so that this merged filter is ready for the next filter merging iteration). In essence, the encoder merges (a,b) the statistics of a pair of two distinct filters that minimizes arg min(Err(a+b)-Err(a)-Err(b)), where Err(x) returns the error of the filter statistic x, and a+b is the merged statistic of the two filter statistics a,b.
[0079] Up to this point, we estimate the statistics, filters, and errors using double-precision floating-point values. Now the encoder tries to find the best R / D cost compromise for encoding the luma filters 906. Once the 25 groups of filters / classes are determined (starting with 25 filters down to 1 filter), for each group, the ALF encoder derives integer filter coefficients (for integer value encoding and fixed-point precision calculations) for each filter. Then, it searches for the best filter in terms of R / D cost compromise when different alternative encoding schemes are used. The first alternative is to encode all coefficients of all filters using (exp-) Golomb encoding. The second alternative is to use delta encoding of the filters, where the filter coefficients of each filter are encoded as the difference with the filter coefficients of the previous filter (using (exp-) Golomb encoding). The third alternative (R / D optimization) allows disabling some filters with one flag and encodes all filter coefficients of the non-disabled filters (using (exp-) Golomb encoding). The first two alternatives can lead to a reduction in bitrate, while the third option can lead to more distortion for less bitrate.
[0080] The encoder makes / selects / chooses the filter group and encoding compromise that minimizes the R / D cost.
[0081] Once the luma filter to be used has been determined / selected by the encoder, for each CTU, the encoder uses the CTU statistics to check if the R / D cost of filtering the luma samples of the CTU is better than the R / D cost of not filtering the luma samples of the same CTU. If not, ALF is disabled 907 for the luma samples of that CTU. The encoder loops back to the luma filter optimization step for luma 904 while updating slice statistics for the CTU (with ALF enabled) covariance and cross-covariance statistics. For example, in VTM-3.0, the encoder loops back four more times.
[0082] Depending on the R / D cost difference between applying ALF to the luma component sample or not, the encoder determines at 908 whether ALF should be active / enabled for the luma component.
[0083] If the ALF is to be active / enabled for the luma component, the encoder proceeds to process the chroma components at 910. If the ALF is to be inactive / disabled for the luma component, the ALF is signaled as not active / disabled at 911 and the ALF encoding process ends.
[0084] The ALF encoding process for a chroma component starts by combining the statistics of the two chroma components 912, provided that ALF is active / enabled for all CTUs of the slice.
[0085] Next, the encoder determines the chroma filters 913. The encoder first determines a (floating point) Wiener filter using the CTU statistics for both chroma components. It derives integer filter coefficients. Then, for each chroma component, the encoder uses the CTU statistics to check whether the R / D cost of filtering the chroma component of the CTU is better than the R / D cost of not filtering the chroma component of the CTU. If not, the ALF is disabled for the chroma component samples of that CTU 914. If the encoder also determines that the ALF should not be active (i.e., should be disabled) for all CTUs of a given chroma component, the encoder disables the ALF on that chroma component and thus does not need to code an "enable flag" of 0 for each CTU 915.
[0086] The encoder can then loop back to the chroma filter optimization step while updating slice statistics for the covariance and cross-covariance statistics of the chroma components for the CTU (with ALF enabled) at 916. For example, in VTM-3.0, the encoder loops back two more times.
[0087] The encoder then applies the ALF according to an embodiment of the present invention using the determined ALF parameters (i.e., using the determined chroma filters from step 913) at 917. Depending on the encoder configuration, the resulting image is output and / or placed in a reference frame buffer. The encoder finally encodes the best R / D cost parameters, i.e., the ALF enable flag, and if the ALF enable flag indicates active / enabled, encodes the determined ALF parameters 918.
[0088] It should be understood that according to variants, optimization processes of other ALF parameters can be carried out to optimize these parameters of the ALF.
[0089] ALF with nonlinear filtering function The linear filtering used in steps 304 and 407 can be modified according to embodiments of the present invention to introduce non-linearities and improve the filtering results (obtaining a better compromise between filtering quality and coding efficiency). The goal of ALF filtering is to remove some "noise" introduced by the coding tool (e.g., quantization noise / error). To remove such noise, low-pass linear filters are often used to smooth the signal and reduce small local variations. Such kind of filters can introduce blurriness in the filtered output, especially in areas with strong contrast, e.g., near edges. Non-linear filters, e.g., bilateral filters, have been developed to enable more efficient noise removal, while introducing less blurriness or ringing effects, even around edges. To do so, these non-linear filters often rely on filtering a sample based on its local neighborhood (i.e., adjacent samples), like linear filters, but pay more attention (or weight) to samples with values similar to the sample being filtered than to samples with very different values. The weighting of the neighborhood values is often performed using a non-linear function (i.e., a non-linear mapping). These types of nonlinear filters are often more complex than linear filters, their parameters may be difficult to optimize, and / or they may be less flexible than linear filters if one wishes to use such types of filters in a new ALF design.
[0090] According to one embodiment of the present invention, the ALF of VTM-3.0 (or any of the previous embodiments or variations thereof) is modified by introducing nonlinearities at relatively low complexity that include operations that preserve the parallelizable design of the ALF.
[0091] Looking at the ALF of VTM-3.0, by reformulating equation (1) using real numbers and simplifying the equation, we obtain We get TIFF0007549709000004.tif6144 (which removes operations related to fixed-point representation and integer rounding). In this ALF, the conditions are: TIFF0007549709000005.tif6144 is satisfied. This means that the sum of all filter coefficients in the ALF is 1. Then, we can see that equation (4) can be reformulated as follows: TIFF0007549709000006.tif7144Then, the output sample O(x,y) is the result of adding the input sample I(x,y) (at the same location) to a scalar product between the filter coefficient vector and a local gradient vector (a 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 a linear combination of the filter coefficients and the local gradient.
[0092] According to one embodiment of the present invention, instead of using this usual linear formula for the filter, the ALF filtering process is modified to introduce nonlinearity into the ALF filter. This nonlinearity is achieved using a multivariate function K(d, b) that takes the local gradient d at offset (i, j) as a first parameter and whose value varies depending on a second parameter b=k(i, j). Instead of using the local gradient with respect to offset (ij) in the scalar product in equation (6), K(d, b) is used in the scalar product, resulting in output samples O(x, y) that vary nonlinearly with the local gradient. TIFF0007549709000007.tif6144 where K(d,b) is a function that takes as its first parameter / variable d=I(x+i.y+j)-I(x,y) (local gradient at offset (i,j) calculated as the difference between the adjacent sample value at location (x+i,y+j) and the current sample value at location (x,y)) and as its second parameter / variable b=k(i,j) (additional filtering parameter). The additional filter parameter k(i,j) is determined simultaneously with w(i,j). In one embodiment, the values of k(i,j) and w(i,j) are determined to optimize filtering and signal processing (e.g., to minimize distortion). This optimization process is performed by an encoder using ALF. An example of such an optimization process is described below.
[0093] Thus, according to an embodiment of the present invention, an input sample value is filtered by using a linear combination of the input sample itself and an adaptive non-linear transformation of input samples that are neighbours of the input sample, the adaptive non-linear transformation depending on the relative positions of the neighbouring input samples in relation to the position of the input sample to be filtered.
[0094] In such a modified ALF, for a particular K satisfying the conditions of b existing and α existing not equal to zero, linear filtering can be realized, for example, such that K(d,b) is equal to α multiplied by d for all d. TIFF0007549709000008.tif5144
[0095] Therefore, by selecting a function K(d,b) that behaves like a linear function (i.e., a linear mapping) for some values of b (i.e., function K(d,b) satisfies condition (8)), the modified ALF filtering process of the embodiment is guaranteed to be at least as efficient as using a standard linear ALF (i.e., in the worst case, the modified ALF can achieve the same level of efficiency as the ALF of VTM-3.0). For example, if a clipping function is used, the parameter b can be set to the maximum possible integer value to behave as a linear function (ideally it should be set to infinity, but the same effect can be achieved using the maximum possible integer value in a limited integer precision scheme).
[0096] It should be noted that in some embodiments of the present invention, the ALF filtering uses an alternative formula / filtering formula. The multivariate function K(d, b) that takes the local gradient and an additional parameter / variable is replaced by another multivariate function that takes three parameters / variables: the neighboring sample values, the sample value to be filtered, and the additional parameter / variable. Using similar notation as equation (4) and satisfying condition (5), we reformulate it using equation (7): TIFF0007549709000009.tif14156Here, K'(n,c,b) is a function that takes as its parameters / variables the neighboring sample value (n), the current sample value to be filtered (c), and an additional filtering parameter / variable (b).
[0097] According to one embodiment of the present invention, the filtering step for both the chroma component (304) and the luma component (407) (as described with reference to equation (1)) is modified to use this filtering with a non-linear formula (preferably using equation (7), but alternatively using equation (9)) implemented using integer arithmetic.
[0098] According to an alternative embodiment, any selection is based on complexity, for example only one of the two filtering steps (304) or (407) is modified to use a filter with a non-linear formulation.
[0099] According to some embodiments, the parameters / variables b=k(i,j) have two or more dimensions, for example, K(d,b=(Sb,Db))=f(d,Sb,Db) can be used: TIFF0007549709000010.tif18115Here, S b and D. b The value varies depending on (i,j). Using parameters / variables / functions with more than one dimension often allows for improved filtering, but at the expense of a higher cost for signaling the filter parameters. Furthermore, it introduces more complexity when optimizing the filter parameters in a higher dimensional space at the encoder, and it is often more complicated to compute the functions at the decoder (more filter parameters often means more operations that use them). In one embodiment, b has a single dimension, which can achieve a good compromise for many ALF applications.
[0100] According to some embodiments, the function K may be a function that includes two or more different functions for different offsets (ij). In some embodiments, the configuration / placement of the functions in the filter shape / pattern is predefined at both the encoder and the decoder. Alternatively, the configuration of the functions is picked / selected from among a set of predefined configurations, and an index indicating the selected configuration is transmitted / signaled. In other embodiments, a function is selected from among a set of predefined functions for each coefficient index (except the center position) in the filter shape / pattern, and its index is transmitted / signaled. In a variation of such an embodiment, each function is a single variable function (i.e., the K functions no longer have the additional parameter / variable b), and thus, instead of signaling the b parameter, a function index is signaled. In such a variation, a multivariate formula, e.g., K(d,b)=K b (d) It can be thought of as using a formula. For example, b is a function of a single variable K from a set of functions. b is an integer index to select
[0101] According to some embodiments, the function K is not the same for the luma and chroma filters. According to some embodiments, the function K is not the same for each luma filter. In some of these embodiments, for each filter, an index of the selected function is provided in the slice header.
[0102] According to one embodiment of the present invention, K is selected for computational simplicity (so as not to introduce excessive decoding complexity). For example, in such an embodiment, K is simply a clipping function: K(d,b)=max(-b,min(-b,d)). (11) or equivalently K(d,b)=min(b,max(-b,d)). (12) It is. In contrast to some of the alternative functions described below, the clipping function does not vanish for high values of the local gradient (in other words, the clipping function f(x) does not converge towards zero as x approaches inequality). However, it has been experimentally observed that compression results using such simple functions can be as efficient and even better than those using more complex functions. In fact, the clipping function does not vanish for high values of the local gradient, but simply clips them, allowing us to continue to take into account sharp edge transitions, while limiting the effect of high variance present around that sharp edge transition region. This is interesting, since artifacts occur more strongly around sharp transitions. The equivalent function K' of this clipping function K using the filtering formula of equation (9) is K'(n,c,b)=max(cb,min(c+b,n)). (13) or, equivalently, K'(n,c,b)=min(c+b,max(cb,n)). It is. The clipping function satisfies equation (8) as soon as b is greater than or equal to the maximum possible sample value (eg, the square of the image bit depth).
[0103] In the following description, "clipping range" or "clipping parameter" is used to refer to a parameter / variable of K or K'. It is understood that such expressions can be considered as general expressions for referring to non-linear function parameters. Similarly, "clipping" or "clipping function" may be used to refer to or describe the above or functionally equivalent functions K or K'.
[0104] In another embodiment, K may be another non-linear function. In a variant, K is an antisymmetric function, for example: One sawtooth period corresponding to TIFF0007549709000011.tif1047, or are some triangular terms corresponding to the particular case of equation (10) when TIFF0007549709000012.tif628, or, for example, a bilateral filter: One can also use a Gaussian kernel in a similar way to TIFF0007549709000013.tif830: for example, K can be any function that is set to zero above (or below) some threshold, such as the antisymmetric function in the variant above.
[0105] According to one embodiment, a non-linear ALF is used instead of a linear ALF in order to reduce the number of sample line buffers required to perform the ALF filtering (i.e., to reduce the number of samples of input image components that need to be processed / accessed / kept in memory when performing filtering, e.g., in a decoder).
[0106] According to one variant, as a trade-off / compromise, the size of the filter shape / pattern for the luma filter is reduced from a 7×7 diamond shape to a smaller filter shape / pattern. For example, a 5×5 diamond shape is used for the luma filter (same shape as the “chroma” filter in FIG. 3-b, but still using the transpose index variant). This can still achieve similar coding gain as a linear-only ALF with a 7×7 diamond-shaped luma filter (e.g., the one shown in FIG. 4-b), but with a reduced number of samples to process / access / store (e.g., the number of sample line buffers is reduced) and reduced computational complexity, i.e., the number of multiplications required to process the ALF filter is reduced by 6 per each filtered input sample while still achieving good coding gain.
[0107] According to a variant, when performing ALF filtering on a sample, a non-linear ALF is used based on all neighboring samples that would have been used for a linear ALF. According to another variant, when performing ALF filtering on a sample, only some of the neighboring samples that would have been used with a linear ALF are used with the non-linear ALF, and the remaining neighboring samples are used with the linear ALF. According to yet another variant, when performing ALF filtering on a sample, only some of the neighboring samples that would have been used with a linear ALF are used with the non-linear ALF, and the remaining neighboring samples are not used with the linear ALF.
[0108] According to a variant, by taking advantage of the symmetry of these filter shapes / patterns, the linear function in equation (4) can be reformulated using the same notation as equation (2) to simplify the implementation of linear and / or nonlinear ALF filters as follows: TIFF0007549709000014.tif7144The above satisfies the following conditions in the case of ALF. TIFF0007549709000015.tif6144The linear function in equation (6) can also be reformulated as follows: TIFF0007549709000016.tif7144Furthermore, the nonlinear function of equation (7) is as follows. TIFF0007549709000017.tif8144 where K i is the filter coefficient w i are the filter clipping parameters related to
[0109] Finally, the nonlinear function in equation (9) can be reformulated as follows: TIFF0007549709000018.tif9144 According to a variant of this embodiment, the K' function or the K function is a clipping function.
[0110] According to one embodiment, in order to reduce the number of operations involved in processing the nonlinear function compared to the number of operations for processing the function K in equation (17), a nonlinearity is instead introduced in the sum of at least two adjacent differences (i.e. a nonlinear function having a sum of two or more local gradients as its variables may be used): TIFF0007549709000019.tif8144Equation (19) is not necessarily equivalent to equation (17), and a filter using equation (19) may be less efficient, but the amount of calculations is reduced. According to a variant, the number of signaled / coded clipping parameters / values does not differ from that of equation (17), for example, if K is a clipping function.
[0111] It will be appreciated that a similarly derived equation based on the reduced complexity equation (18) can be used according to another variant, with a function K′ having as variable the sum of two or more adjacent difference values (local gradients). TIFF0007549709000020.tif892
[0112] FIG. 7 provides a block diagram of a nonlinear filter according to an embodiment of the present invention. This block diagram can be a replacement for the linear filter in the ALF in VTM-3.0 (or can be an additional nonlinear filter in addition to the linear filter in the ALF). This corresponds to implementing equation (7) with integer fixed-point arithmetic using the clipping function of equation (11). "C" 701 corresponds to I(x,Y), "S0" 702 through "Sn" 703 correspond to I(x+i,y+j), where (i,j)≠(0,0), "k0" 704 through "kn" 705 correspond to k(i,j), where (i,j)≠(0,0), "w0" 706 through "wn" 707 correspond to w(i,j), where (i,j)≠(0,0), and "O" 708 corresponds to O(x,y).
[0113] Figure 5 is a flow chart with an overview of modified syntax elements according to an embodiment of the present invention, providing examples of syntax elements that can be used to implement the non-linear functions (and their parameters) of the above and their related embodiments / variations. In this embodiment, the coding filter coefficients of equation (7) (or (9))' for each filter are associated with their own clipping range, and thus k(i,j) can have different values that vary with offset (i,j). Most of the syntax elements are the same as those already used in VTM-3.0 and described with reference to Figure 2, with 501, 502, 503, 504, 505, 506, 507, 508, 509, 510 in Figure 5 having the same signaling and semantics as 201, 202, 203, 204, 205, 206, 207, 208, 209, 210 in Figure 2. The new syntax elements are the clipping parameters of each luma filter 511, all the filter coefficients of the luma filters (506), and all the clipping parameters of each luma filter (511), which may be signaled, for example, in the slice header. This signaling is followed by the signaling of all the filter coefficients of the chroma filters (507) and all the clipping parameters of the chroma filters (512).
[0114] According to one embodiment, for any filter, the number of signaled clipping parameters is the same as the number of signaled filter coefficients. The clipping parameters for offset (i,j) are obtained in the same way as for the filter coefficient at the same position (x+i,y+j). Chroma is processed in the same way as described for the filter coefficient derivation process of step 303 of Fig. 3-a (but with chroma clipping parameters) and luma is processed in the same way as described for the filter coefficient derivation process of step 406 of Fig. 4-a (but with luma filter clipping parameters).
[0115] In an alternative embodiment, there is only one clipping parameter per filter, and this clipping parameter is used for all filter positions (ij)≠(0,0).
[0116] In an alternative embodiment, the number of clipping parameters is less than the number of filter coefficients. In a variation of this embodiment, these clipping parameters are used for a subset of filter positions (which may be predefined or determined) with offset (i,j). For the other filter positions, normal linear filtering is performed (i.e., in other words, at these other filter positions, K is considered to be an identity function), or alternatively, predefined clipping parameter values are used.
[0117] Variations of such embodiments are described with reference to Figures 16-a and 16-b. In these variations, the clipping function is applied to a subset of the filter positions, i.e., the clipping pattern / shape / support / mask includes only a subset of the filter positions in the filter shape / pattern, so that during the filtering process, only a subset of adjacent sample values / positions are clipped (e.g., the nonlinear function is applied to sample values from only that subset). Clipping operations can be computationally expensive, so reducing the number of clipping operations involved in filtering in this way can reduce the complexity and computational cost of the filtering process.
[0118] FIG. 16-a provides a 7×7 diamond filter shape with a reduced number of clip / clipping positions and shows three possible arrangements / examples of clip / clipping positions to reduce the number of clipping operations required when performing filtering with a 7×7 filter shape, e.g., ALF for luma. By using the clipping patterns shown in FIG. 16-a, the number of clipping operations to perform filtering is reduced because clipping operations are not applied to all filter (input) positions, i.e., only a subset of filter positions (which may be predefined, signaled, or inferred) are used for clipping operations (i.e., with a nonlinear function). In FIG. 16-a, clipped sample positions are marked by an “X” in clipping patterns 1601, 1602, and 1603. Clipping patterns 1601, 1602 reduce the number of clippings by two-thirds, and clipping pattern 1603 reduces this number by one-half. These clipping patterns 1601, 1602 and 1603 strike a good compromise between the accuracy of the output and the complexity involved in the filtering process when using a 7x7 diamond filter shape. Clipping patterns 1601, 1602 and 1603 work well for non-linear ALFs based on the orientation of the ALF (i.e., filters built for classification based on the orientation and level of activity of local content, e.g., the luma filter in VTM3.0). However, when classification is not used, it is preferable to use patterns 1602 or 1603.
[0119] It will be appreciated that, according to other variations, more or fewer clip positions may be used. For example, instead of clipping pattern 1601, entire columns and rows (except for the center positions) may be clipped (i.e., crossing from top to bottom and left to right, except for the center positions), or instead of clipping pattern 1602, positions on the outer edges (i.e., a larger diamond / parallelogram clipping pattern) may be clipped. In other variations of clip positions, the clipping pattern / shape / support / mask forms a diagonal cross "X" (except for the center positions), a vertical segment "|" (except for the center positions), a horizontal segment "-" (except for the center positions), a diagonal segment "\" from the top left to the bottom right (except for the center positions), a diagonal segment " / " from the top right to the bottom left, or any combination of the aforementioned clipping patterns / shapes / supports / masks.
[0120] FIG. 16-b provides a 5×5 diamond filter shape with a reduced number of clip / clipping positions, and shows a possible arrangement / configuration of two clip / clipping positions to reduce the number of clipping operations required when performing filtering with a 5×5 filter shape. Similar to FIG. 16-a, by using the clipping patterns shown in FIG. 16-b, namely clipping patterns 1604 and 1605, it is possible to reduce the number of clipping operations involved in this filtering process when filtering with a 5×5 diamond filter shape. Clipping patterns 1604 and 1605 work well for non-linear ALFs based on the orientation of ALFs (i.e., filters built for classification based on the orientation and activity level of local content, e.g., luma filters in VTM3.0). However, when classification is not used, it is preferable to use pattern 1605.
[0121] Clipping patterns 1602 and 1605 work well for filters that do not use classification based on orientation (e.g., better for chroma filters as opposed to luma filters that rely on horizontal, vertical, or diagonal classification in VTM-3.0) because horizontal and vertical neighbors are statistically more reliable (due to larger Euclidean distance) than diagonal neighbors. Therefore, using clipping operations only on filter positions with less reliable diagonal neighbor samples is more favorable than filter positions with more reliable horizontal and vertical neighbor samples.
[0122] When using orientation-based filters (i.e., filters obtained for classification-based orientations), clipping operations are generally applied to samples at filter positions perpendicular to the filter orientation. For example, clipping pattern 1601 works better for filters of classes with horizontal or vertical orientations than for filters of classes with diagonal orientations. Clipping pattern 1602 works roughly similarly for the four classes of orientations, but is less efficient than pattern 1601 for horizontal and vertical orientations. Thus, the clipping patterns in 1601 and 1602 perform roughly equally on average for luma filters using a 7×7 filter pattern, and the clipping patterns in 1604 and 1605 perform roughly equally on average for luma filters using a 5×5 filter pattern.
[0123] According to a variant, to improve the orientation-based filter, a clipping pattern is selected from predefined patterns based on the filter orientation. For example, clipping pattern 1601 is used on the horizontal or vertical filter, and clipping pattern 1602 is used on the diagonal filter. In yet another variant, the clipping pattern selected for the vertical filter is different from the clipping pattern selected for the horizontal filter (e.g., each is a 90° rotated version of the other), and the clipping patterns for the two diagonal filter orientations are also different (e.g., each is a 90° rotated version of the other). In yet another variant, the clipping pattern is selected according to a transpose index (tranposeIdx) for each 4×4 block of sample values.
[0124] According to a variant, there is one predefined clipping pattern for each filter. According to another variant, there are several (e.g. a predefined number) clipping patterns available, and for each filter index, the (clipping pattern) index for the selected clipping pattern is coded / signaled in the ALF parameters, for example in the APS or in the tile group header. According to yet another variant, the clipping pattern is signaled with the ALF parameters. For example, the signaling of the clipping pattern may be performed by coding / decoding a sequence of flags, one flag (e.g. equal to the coded / decoded filter coefficient index) per filter (pattern) position index, each flag indicating whether clipping should be applied or not actually applied for the corresponding index. Alternatively, the signaling of the clipping pattern may be performed by coding / decoding the clipping position index itself, or by coding the filter (pattern) position index that is not a clipping position (either of which preferably requires a smaller number of bits to be signaled).
[0125] According to a variant, if a clipping pattern is used (predefined or not), clipping parameters are signaled only for those filter (pattern) positions where a clipping operation is applied.
[0126] In some variations, in order not to break single instruction, multiple data (SIMD) parallel implementations, clipping is applied to all filter positions, but the clipping parameters for positions where no clipping parameters are provided are assumed to have a linear output (e.g., the output of the identity function in the variations).
[0127] In an alternative embodiment, the number of clipping parameters is less than the number of filter coefficients, since one or more clipping parameters are shared. For example, in the filter shapes of Fig. 3-b and Fig. 4-b, several coefficient indexes can share the same clipping parameter. According to a variant, the indexes of the clipping parameters are indicated in a table with a number of elements equal to half the shape size (due to symmetry) minus one (due to the absence of clipping parameters for the central coefficient position). This table allows associating a clipping parameter index to each filter coefficient. According to a variant, this table is fixed / preset by the codec. According to a variant, several fixed / preset tables are defined and an index for identifying the clipping parameter from the table is signaled, for example in the slice header. In an alternative variant, the content of such a table is signaled, for example in the slice header, and shared by all luma filters.
[0128] In one embodiment, the number of values that the clipping parameters can take is limited to be small (to reduce the encoder complexity and the benefit of small quality versus encoding cost). The allowed values for the clipping parameters are indexed with integer indexes, preferably in increasing or decreasing order. These indexes can then be mapped to each element of the table of clipping parameters. Then, instead of signaling the clipping parameter value, the index (p) of the associated clipping parameter value in the table is signaled. In an embodiment where the filter index in the table is p, there is no need to use intermediate tables to reduce the number of possible values of p. It is possible to directly reduce the number of functions available in the table of functions, and therefore reduce its size.
[0129] In one embodiment, the clipping parameter value is a power of 2: p Then, what is encoded is p. The maximum value of p is the bit depth B of the input image. d (A higher value is not necessary as it provides the same result.) In an alternative embodiment, instead of p, what is encoded is B d In another embodiment, the range of p is p min andp max For example, p min =3, Pmax=B d -1. Then, pp min Or p max -p can be signaled.
[0130] In one embodiment, the allowed / tolerated / available clipping parameter values of the chroma filters are not the same as those of the luma filters.
[0131] According to one embodiment, a table p min The smallest index in and table P maxThe maximum index in p is provided in the slice header, so that the number of possible clipping parameter values can be limited / restricted when signaling them. min and p max is shared by the luma and chroma filters. In an alternative embodiment, p min and p max is provided only for luma, and the chroma index is not limited. min and p max are provided in the slice header for luma and for chroma.
[0132] According to alternative embodiments, one table of allowed clipping parameter values is signaled in the slice header for both luma and chroma components, or alternatively two tables are signaled, one for luma and one for chroma.
[0133] In one embodiment of the present invention, the clipping parameters 511 and 512 are not signaled in the slice header, instead they are determined at the encoder / decoder based on the filter class index using the quantization parameter (QP) used to signal the filtered samples.
[0134] In an alternative embodiment, the clipping parameters 511 and 512 are signaled in the slice header, but are not used directly in the filtering process. Instead, the clipping parameters are scaled depending on the quantization parameter (QP) used for the filtered samples.
[0135] In one embodiment, the clipping parameters of the luma filters are not provided for each filter. Only two tables of clipping parameters are shared by all luma filters and signaled in the slice header: one table for the horizontal / vertical class and the other for the diagonal class. The clipping parameters of each class are derived from these two tables according to the orientation of the class by using the coefficient arrays of FIG. 4-b and scaling (i.e., multiplying) the clipping parameters according to a fixed value determined from the level of activity of the class. The scaling takes into account the level of activity when classifying the 4×4 block. For example, for areas with a high level of activity (e.g., near edges), a higher clipping value can be used when compared to areas with a low level of activity (e.g., uniform areas).
[0136] In one embodiment, one bit in the slice header signals that clipping is enabled / disabled for each filter clipping index for each filter. In embodiments where there is only one allowed clipping value per clipping parameter, if the bit indicates that clipping is active, the clipping value is used (i.e., nothing else is signaled for the clipping parameter value). Alternatively, if multiple clipping values are allowed, if the bit for one clipping index indicates that clipping is disabled for that filter clipping index, then no clipping value is signaled, but otherwise a clipping value is signaled.
[0137] Here, the filter clipping index corresponds to the index of the clipping parameter associated with the filter coefficient index in the filter shape.
[0138] In one embodiment, the allowed clipping values depend on the slice type (which may be, for example, INTRA, B, or P).
[0139] In a variant of the embodiment, the allowed clipping values are { 6, 32, 181, 1024} for luma in a B or P slice, { 4, 25, 161, 1024} for chroma in a B or P_slice, { 10, 102, 1024} for luma in an INTRA slice, and / or { 4, 24, 1024} for chroma in an INTRA slice. Any clipping parameter can therefore take a value belonging to one of these sets (and therefore to a slice type and filtered component). Also, the index of that value in the set is encoded in the slice header for each clipping parameter, for each filter.
[0140] In a variant, a table of allowed clipping values is defined as follows: TIFF0007549709000021.tif1165, where N is the number of clipping values in the table (i.e. the size of the table), M is the maximum clipping value (the last entry in the table, e.g. M=2 D or M=2 D -1, where D is the sample bit depth of the component for which the table is defined), and "round" is the rounding operator (e.g., to nearest integer).
[0141] In a variant, a table of allowed clipping values is defined as follows: TIFF0007549709000022.tif1477 where N is the number of clipping values in the table (i.e. the size of the table) and M is the maximum clipping value (the last entry in the table, for example, or M=2 if D is the sample bit depth). D , or M=2 D -1), A is the minimum clipping value (the first entry in the table), and “round” is the rounding operator (e.g., to the nearest integer).
[0142] In one embodiment, the allowed clipping values are not the same for each filter clipping index.
[0143] In the variants using a clipping function on the difference value, i.e. when applying the function K of equation (11) or equation (12) to the difference between the adjacent sample values and the central value, the maximum allowed clipping value is defined such that the number of bits at the output of the clipping is reduced. This allows to limit the number of bits that need to be processed in the hardware implementation performing the filtering according to these variants. In this way, this allows, for example, to reduce the number of logic gates / transistors in the chip. Reducing the number of bits at the input of the multiplication operator is particularly interesting, since multiplication requires many logic gates. For example, by setting the maximum allowed clipping value to the power of the sample bit depth of 2 minus 1 minus 1 (i.e. maximum clipping equal to 2^(bit depth-1)-1?1), the maximum number of bits at the output of the clipping, and therefore at the input of the multiplication operator, can be reduced by 1. And by using the sample bit depth minus 2 (i.e. maximum clipping equal to 2^(bit depth-2)-1), the maximum number of bits can be reduced by 2.
[0144] In an embodiment using APS, a distinction between intra slices and inter slices (or intra and inter pictures / image parts / tile groups) may not be possible during clipping value derivation, since APS is shared by intra and inter slices / pictures / tile groups / image parts. In that case, a predefined table of allowed clipping values can no longer depend on the slice / image part / tile group type. Thus, one default clipping value table is shared by all slice / picture / tile group / image part types. A variant, for example, to reduce complexity, is to have the encoder decide (and then signal to the decoder) whether the clipping values are restricted to a subset of clipping values from the default clipping value table.
[0145] In a variant, a clipping value table of available clipping values is signaled in the APS together with the ALF parameters. Thus, the encoder (and decoder) can use any clipping value and signal the used clipping value together with its own clipping value table.
[0146] In a variant, there are multiple default clipping value tables, e.g., one used for inter slices and one used for intra slices. Information to identify the used table, e.g., the index of the used table, is provided to the APS together with the ALF parameters. In a variant, the default clipping value tables are different for luma and chroma.
[0147] In one embodiment, the output values of the filter are also clipped according to the input sample values and additional clipping parameters (which can be added to a table of clipping parameters).
[0148] According to one embodiment, in addition to the ALF active flag, a NLALF (NonLinear ALF) active flag is placed, e.g., at the sequence level in the SPS, or alternatively, e.g., at the frame level in the picture header, to indicate that the nonlinear ALF is active / used / enabled. If this flag is active (i.e., indicates that the nonlinear ALF is active), the ALF syntax element includes a nonlinear filter, e.g., the filter parameters of FIG. 5. If the flag is inactive (i.e., does not indicate that the nonlinear ALF is active), the ALF syntax element includes only a linear filter, e.g., the filter parameters of FIG. 2.
[0149] According to one embodiment, when the ALF flag is active in the slice header, the NLALF active flag is placed in the slice header. When this NLALF flag is active, the clipping parameters of each luma filter syntax element 511 and the clipping parameters of the chroma filter 512 are present in the slice header. When this NLALF flag is inactive, the syntax elements 511 and 512 are not present in the slice header and the ALF uses normal linear filtering.
[0150] According to an alternative embodiment, separate NLALF active flags are provided for each component type luma and chroma, and one or both of these flags are used to indicate whether a non-linear ALF should be used on samples of a particular component (e.g., they are provided in the same place as the NLALF active flags, such as at the sequence level or in a slice header). In a variant, a non-linear ALF is used on the luma and a linear ALF is used on the chroma. In an alternative variant, a non-linear ALF is used on the chroma and a linear ALF is used on the luma.
[0151] In a variant, an NLALF luma active flag and an NLALF chroma active flag are provided in the slice header. The NLALF luma active flag indicates whether a nonlinear adaptive loop filter is used for the luma components and therefore whether nonlinear ALF clipping parameters are signaled for each luma filter. The NLALF chroma active flag indicates whether a nonlinear adaptive loop filter is used for the chroma components and therefore whether nonlinear ALF clipping parameters are signaled for the chroma filters.
[0152] In a variant, the NLALF chroma active flag is not signaled but is inferred to be equal to zero if the NLALF luma active flag is equal to zero, so that the non-linear ALF cannot be used with chroma only.
[0153] In a variant, the nonlinear ALF is always used for luma (by default the NLALF luma active flag is not used or may be assumed to be a corresponding default value) and the NLALF chroma active flag is used to indicate whether the nonlinear ALF or the linear ALF is used for chroma. In another variant, the linear ALF is always used for luma (by default the NLALF luma active flag is not used or may be assumed to be a corresponding default value) and the NLALF chroma active flag is used to indicate whether the nonlinear ALF or the linear ALF is used for chroma. In a variant, the NLALF luma active flag is used to indicate whether the nonlinear ALF or the linear ALF is used for luma and the nonlinear ALF is always used for chroma (by default the NLALF chroma active flag is therefore not used or may be assumed to be a corresponding default value). In a variant, the NLALF luma active flag is used to indicate whether the nonlinear ALF or the linear ALF is used for luma and the linear ALF is always used for chroma (by default the NLALF chroma active flag is not used or may be assumed to be a corresponding default value).
[0154] In one embodiment, the NLALF flag (or the NLALF luma active flag or the NLALF chroma active flag) is put into the slice header only if the NLALF flag is active in the SPS. If the NLALF active flag (or the NLALF luma active flag or the NLALF chroma active flag) is not present, it is considered inactive by default.
[0155] In one embodiment, the NLALF flag replaces the ALF flag in the SPS and slice headers: classical (linear-only) ALF can no longer be used, except in embodiments where the clipping function allows linear output for allowed clipping parameter values.
[0156] According to one embodiment, the signaling of clipping parameters is done in a similar way as for the filter coefficients: parameters for the (exp-)Golomb coding of clipping parameters are signaled first: a VLC code is used to signal the minimum order of the (exp-)Golomb code, then for each (exp-)Golomb index (e.g., 3 indexes for the luma filter and 2 indexes for chroma), a flag is used to signal whether the (exp-)Golomb order must be increased for the current index and the next index (starting from the minimum order).
[0157] The clipping parameters are then signaled for each (non-disabled) filter using an (unsigned integer) (exp-)Golomb code with the (exp-)Golomb sequential number taken with the (exp-)Golomb index associated with the coefficient index from a table that stores the (exp-)Golomb parameters (e.g. in the same fixed table as the filter coefficients).
[0158] According to an alternative embodiment, for each encoding filter, an (exp-)Golomb encoding parameter value is signaled, e.g. in a slice header, and each clipping parameter value is encoded using the provided (exp-)Golomb encoding parameter value for unsigned integer (exp-)Golomb encoding.
[0159] According to one embodiment, the (exp-)Golomb encoding parameter value is signaled as an index into a table of available (exp-)Golomb encoding parameter values.
[0160] According to one embodiment, a flag is signaled in the slice header, for example a flag indicating whether the luma filter clipping parameters are signaled using delta mode. When delta mode is active, the first filter clipping parameter is encoded as described above, but each subsequent filter clipping parameter is encoded as the difference between the subsequent filter clipping parameter and the previously encoded filter clipping parameter. The difference is then encoded using a signed integer (exp-) Golomb encoding.
[0161] According to one embodiment, a flag is signaled in the slice header, for example a flag indicating whether the clipping parameters of a filter can use delta mode. According to one embodiment, when delta mode is active, a flag is signaled for each filter, which flag indicates whether the clipping parameters of the filter use delta mode or not. According to one embodiment, when delta mode is active for encoding clipping parameters of a given filter, the clipping parameters are encoded one by one, the first one using unsigned (exp-) Golomb encoding and the subsequent ones using signed (exp-) Golomb encoding of the difference between the clipping parameter and the value of the previously encoded clipping parameter.
[0162] According to an alternative embodiment, the number of possible values of the clipping parameter is limited to two different values. A single bit is then used to signal which clipping parameter value should be used (there is no need to provide an (exp-)Golomb parameter).
[0163] According to one embodiment, a conditional signaling of clipping parameters is performed to minimize the signaling of unnecessary data (e.g. when a filter coefficient is zero or equal to a known value for the decoder-side filter). In a variant, for example, the filter coefficients are signaled in the slice header before the clipping parameters are signaled, and for each i-th filter coefficient of the filter that is equal to zero, its corresponding i-th clipping parameter is not signaled. This is because the i-th clipping is not useful for the filter, since the filter result is multiplied by a zero coefficient, and as a result there is no effect from the i-th clipping on the filtered output. In one variant, the clipping is set to a default value (e.g. the maximum possible value according to the sample bit depth). In another variant, the filtering process does not apply clipping to input samples that are expected to be multiplied by a zero coefficient.
[0164] According to one embodiment, a flag is signaled for each luma filter to indicate whether a non-linear filter is used for that luma filter or not. In a variant, the clipping parameters / values of a luma filter are signaled only if a non-linear filter is used for that luma filter (i.e., the flag is active).
[0165] According to one embodiment, a flag is signaled to a chroma filter to indicate whether a non-linear filter is used with that chroma filter or not. In a variant, the clipping parameters / values of a chroma filter are signaled only if a non-linear filter is used for that chroma filter (i.e., the flag is active).
[0166] According to an embodiment, signaling of ALF related information such as ALF parameters and flags is performed using one or more of the APS syntax (Table 1), the tile group header syntax (Table 2), the coding tree unit syntax (Table 3), and / or the non-linear ALF data syntax (Table 4) shown below, which uses the same syntax naming conventions as in VVC draft version 3. According to a variant, all four syntaxes (e.g., Tables 1-4) are used to signal ALF related information. According to another variant, a subset of the four syntaxes is used to signal ALF related information.
[0167] Tables 1 and 2 show the high-level syntax for providing / signaling ALF parameters (alf_data, etc.). TIFF0007549709000023.tif26108Table 1 - Adaptation Parameter Set (APS) Syntax TIFF0007549709000024.tif5799 Table 2 - Tile Group Header Syntax
[0168] The slice (header) described in relation to other embodiments (or variations thereof) is replaced by a tile group (header), as indicated by the tile group header syntax in Table 2. Thus, the "tile_group_ALF_enabled_flag" corresponds to the syntax elements 202 in FIG. 2 and 502 in FIG. 5, and indicates whether ALF is active for the tile group. Furthermore, the ALF data syntax element is not provided in the tile group header (it may be provided in the slice header, together with the slice, in other embodiments). Instead, the ALF data syntax element is provided in a specific parameter set, called an Adaptation Parameter Set (APS), as shown in Table 1. The ALF data includes the ALF syntax elements, and the provision of the ALF data syntax element in the APS allows sharing of ALF parameters between multiple tile groups, such as between multiple tile groups in the same and / or different decoded images.
[0169] The adaptation parameter set (APS) syntax in Table 1 is used to define the signaling of any adaptation parameter set. In a variant, the APS is included in a non-"video coding layer" (VCL) "network abstraction layer" (NAL) unit (e.g., called "APS_NUT" or APS NAL unit type).
[0170] The semantics of each syntax element in APS are as follows: Adaptation Parameter Set Semantics The adaptation_parameter_set_id identifies the APS that is referenced by other syntax elements. The value of adaptation_parameter_set_id MUST be in the range of 0 to 63.
[0171] The tile group header syntax in Table 2 is used to define each tile group header. A tile group header is provided for each tile group. A tile group contains a set of tiles, and each tile contains a set of CTUs.
[0172] The semantics of the tile group header syntax elements are as follows: Group Header Semantics tile_group_APS_id specifies the adaptation_parameter_set_id of the APS to which the tile group refers. The value of tile_group_aps_id is in the range of 0 to 63. The TemporalId of the APS NALL unit whose adaptation_parameter_set_id is equal to tile_group_APS_id shall be less than or equal to the TemporalId of the coded tile group NAL unit.
[0173] Table 3 provides syntax elements for signaling the ALF(enable) flag used for each component where ALF is active at the CTU level, which corresponds to the syntax elements used in 208, 209, and 210 in Figure 2 and 508, 509, and 510 in Figure 5. TIFF0007549709000025.tif74151Table 3 - Coding Tree Unit Syntax
[0174] The coding tree unit syntax in Table 3 is used to define a (coded) coding tree unit. The semantics of each syntax element in the coding tree unit are as follows: Coding Tree Unit Semantics The CTU is the root node of the coding quadtree structure. If alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]=1, it specifies that the adaptive loop filter is applied to the coding tree block of the color component indicated by cIdx of the coding tree unit at luma location (xCtb, yCtb). If alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]=0, it specifies that the adaptive loop filter is not applied to the coding tree block of the color component indicated by cIdx of the coding tree unit at luma location (xCtb, yCtb).
[0175] If alf_ctb_flag[cIdx][xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] is not present, it is inferred to be 0.
[0176] Table 4 provides syntax elements for signaling non-linear ALF parameters (i.e., non-linear ALF data syntax), which builds on the ALF data syntax elements of VVC draft version 3. These syntax elements build on syntax elements used in the variations described herein with reference to the non-linear ALF syntax elements of Figure 5, which build on the syntax elements of Figure 2. TIFF0007549709000026.tif232156TIFF0007549709000027.tif180157TIFF0007549709000028.tif125157Table 4 - Non-linear ALF data syntax
[0177] The nonlinear adaptive loop filter (ALF) data syntax in Table 4 is used to define the adaptation parameter set (shown in Table 1). The semantics of the nonlinear ALF data syntax elements are as follows: Adaptive Loop Filter Data Semantics When alf_chroma_idc is equal to 0, it specifies that no adaptive loop filter is applied to the Cb and Cr color components. When alf_chroma_idc is equal to 1, it specifies that an adaptive loop filter is applied to the Cb color component. When alf_chroma_idc is equal to 2, it indicates that the adaptive loop filter is applied to the Cr color component. When alf_chroma_idc is equal to 3, it indicates that the adaptive loop filter is applied to the Cb and Cr color components.
[0178] The maximum value maxVal of the unary binary value tu(v) after truncation is set equal to 3.
[0179] The variable NumAlfFilter, which specifies the number of different adaptive loop filters, is set equal to 25.
[0180] alf_luma_num_filters_signalled_minus1 +1 specifies the number of adaptive loop filter classes for which luma coefficients can be signaled. The value of alf_luma_num_filters_signalled_minus1 must be in the range from 0 to NumAlfFilters-1.
[0181] The maximum value maxVal of the binary threshold tb(v) after truncation is set equal to NumAlfFilters-1.
[0182] alf_luma_coeff_delta_idx[filtIdx] specifies the index of the signaled adaptive loop filter luma coefficient delta for the filter class indicated by filtIdx, in the range from 0 to NumAlfFilters-1. If alf_luma_coeff_delta_idx[filtIdx] is not present, it is inferred to be equal to 0.
[0183] The maximum value maxVal of the binary digitized value tb(v) after truncation is set to alf_luma_num_filters_signalled_minus1.
[0184] When alf_luma_coeff_delta_flag is equal to 1, it indicates that alf_luma_coeff_delta_prediction_flag is not signaled. When alf_luma_coeff_delta_flag is equal to 0, it indicates that alf_luma_coeff_delta_prediction_flag may be signaled.
[0185] When alf_luma_coeff_delta_prediction_flag is equal to 1, it specifies that the signaled luma filter coefficient delta is predicted from the previous luma coefficient delta. When alf_luma_coeff_delta_prediction_flag is equal to 0, it specifies that the signaled luma filter coefficient delta is not predicted from the previous luma coefficient delta. If not present, alf_luma_coeff_delta_prediction_flag is inferred to be equal to 0.
[0186] alf_luma_min_eg_order_minus1 + 1 specifies the minimum order of the exp-Golomb code for signaling the luma filter coefficients. The value of alf_luma_min_eg_order_minus1 shall be in the range 0 to 6, inclusive.
[0187] When alf_luma_eg_order_increase_flag[i] is equal to 1, it specifies that the minimum order of the exp-Golomb code for luma filter coefficient signaling is incremented by 1. When alf_luma_eg_order_increase_flag[i] is equal to 0, it specifies that the minimum order of the exp-Golomb code for luma filter coefficient signaling is not incremented by 1.
[0188] The order expGoOrderY[i] of the exp-Golomb code used to decode the value of alf_luma_coeff_delta_abs[sigFiltIdx][j] is derived as follows: expGoOrder[i]=alf_luma_min_eg_oreder_minus1+1+ald_luma_eg_order_increase_flag[i]
[0189] When alf_luma_coeff_flag[sigFiltIdx] is equal to 1, it specifies that the coefficients of the luma filter represented by sigFiltIdx are signaled. When alf_luma_coeff_flag[sigFiltIdx] is equal to 0, it specifies that all coefficients of the luma filter represented by sigFiltIdx are set to 0.
[0190] alf_luma_coeff_delta_abs[sigFiltIdx][j] specifies the absolute value of the jth coefficient delta of the signaled luma filter represented by sigFiltIdx. If alf_luma_coeff_delta_abs[sigFiltIdx][j] is not present, it is inferred to be equal to 0.
[0191] The degree k of the binary uek(v) of exp-Golomb is derived as follows: golombOrderIdxY[]={0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2} k=expGoOrderY[golombOrderIdxY[j]]
[0192] alf_luma_coeff_delta_sign[sigFiltIdx][j] specifies the sign of the j-th luma coefficient of the filter indicated by sigFiltIdx as follows: - If alf_Luma_coeff_delta_sign[sigFiltIdx][j] is equal to 0, the corresponding luma filter coefficient has a positive value. - Otherwise (if alf_Luma_coeff_delta_sign[sigFiltIdx][j] is equal to 1), the corresponding luma filter coefficient has a negative value.
[0193] If alf_luma_coeff_delta_sign[sigFiltIdx][j] is not present, it is inferred to be equal to 0.
[0194] When sigFiltIdx ranges from 0 to alf_luma_num_filter_signaled_minus1 and j ranges from 0 to 11, the variable filterCoefficients[sigFiltIdx][j] is initialized as follows: filterCoefficients[sigFiltIdx][j]=alf_luma_coeff_delta_abs[sigFiltIdx][j]*(1-2*alf_Luma_coeff_delta_sign[sigFiltIdx][j])
[0195] When alf_luma_coeff_delta_prediction_flag is equal to 1, filterCoefficients[sigFiltIdx] “j” where sigFiltIdxg is 1 to alf_luma_num_filters_signalled_minus1 and j is 0 to 11 is transformed as follows: filterCoefficients[sigFiltIdx][j]+=filterCoefficients[sigFiltIdx-1][j]
[0196] When filtIdx is 0 to NumAlfFilter-1 and j is 0 to 11, the luma filter coefficient alfCoeffL in element AlfCoefL “filtIdx” [j] is derived as follows. AlfCoeffL[filtIdx][j]=filterCoefficients[alf_luma_coeff_delta_idx[filtIdx][j]
[0197] The final filter coefficient AlfCoeffL[filtIdx]
[12] , where filtIdx is in the range from 0 to NumAlfFilters-1, is derived as follows. AlfCoeffL[filtIdx]
[12] =128
[0198] The bitstream conformance requirements are that the value of AlfCoeffL[filtIdx][j] where filtIdx is 0 to NumAlfFilter-1 and j is 0 to 11 is in the range of -2^7 to 2^7 -1, and the value of AlfCoeffL[filtIdx]
[12] is in the range of 0 to 2^8 -1.
[0199] alf_chroma_min_eg_order_minus1 + 1 specifies the minimum order of the exp-Golomb code for chroma filter coefficient signaling. The value of alf_chroma_min_eg_order_minus1 shall be in the range of 0 to 6, inclusive.
[0200] When alf_Chroma_eg_order_increase_flag[i] is equal to 1, it specifies that the minimum order of the exp-Golomb code for chroma filter coefficient signaling is to be incremented by 1. When alf_Chroma_eg_order_increase_flag[i] is equal to 0, it specifies that the minimum order of the exp-Golomb code for chroma filter coefficient signaling is not to be incremented by 1.
[0201] The order expGoOrderC[i] of the exp-Golomb code used to decode the value 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]
[0202] alf_chroma_coeff_abs[j] specifies the absolute value of the jth chroma filter coefficient. If alf_chroma_coeff_abs[j] is not present, it is inferred to be equal to 0.
[0203] The degree of exp-Golomb binary uek() is derived as follows: golombOrderIdxC[]={0, 0, 1, 0, 0, 1} k=expGoOrderC[golombOrderIdxC[j]]
[0204] alf_chroma_coeff_sign[j] specifies the sign of the jth chroma filter coefficient, as follows: - If alf_chroma_coeff_sign[j] is equal to 0, the corresponding chroma filter coefficient has a positive value. - Otherwise (alf_chroma_coeff_sign[j] is equal to 1), the corresponding chroma filter coefficient has negative positive.
[0205] If alf_chroma_coeff_sign[j] is not present, it is inferred to be equal to 0.
[0206] The chroma filter coefficient alfCoeffC having an element cC[j] where j is 0 to 5 is derived as follows. AlfCoeffC[j]=alf_chroma_coeff_abs[j]*(1-2*alf_chroma_coeff_sign[j])
[0207] The final filter coefficients for j=6 are derived as follows: AlfCoeffC[6]=128
[0208] The bitstream conformance requirement is that the value of AlfCoeffC[j] for j between 0 and 5 is within the range of -2^7 to 2^7-1, and that AlfCoeffC[6] is within the range of 0 to 2^8-1.
[0209] When alf_luma_clip is equal to 0, it specifies that a linear adaptive loop filter is applied to the luma component, and when alf_luma_clip is equal to 1, it specifies that a non-linear adaptive loop filter is applied to the luma component.
[0210] When alf_chroma_clip is equal to 0 it specifies that a linear adaptive loop filter is applied to the chroma components, and when alf_chroma_clip is equal to 1 it specifies that a non-linear adaptive loop filter is applied to the chroma components. When alf_chroma_clip is not present it is inferred to be 0.
[0211] If alf_luma_clip_default_table is equal to 1, the default alf_luma_clipping_valu[] table is used to convert clipping indices to clipping values. If alf_luma_clip_default_table is equal to 0, it indicates that the alf_luma_clipping_value[] table is present in alf_data().
[0212] alf_luma_num_clipping_values_minus1 + 1 gives the size of the alf_luma_clipping_value[] table. If not present, it is inferred to be equal to bitDepthY.
[0213] alf_luma_clipping_value[clipIdx] specifies the clipping value to use when clipping index clipIdx is signaled in the alf_luma_clip_idx[][] table. If not present, it is inferred that alf_luma_clipping_value[]={1 << bitDepthY, 1 << (bitDepthY-1), ..., 8, 4, 2}.
[0214] For simplicity, alf_luma_clipping_value[alf_luma_num_clipping_values_minus1 + 1] is inferred to be equal to 1 << bitDepthY.
[0215] When alf_chroma_clip_default_table is equal to 1, it is specified that the default alf_chroma_clipping_value[] table is used to convert the clipping index to the clipping value, and when alf_chroma_clip_default_table is equal to 0, it indicates that the alf_chroma_clipping_value[] table exists within alf_data().
[0216] alf_chroma_num_clipping_values_minus1 + 1 indicates the size of the alf_chroma_clipping_value[] table. If it does not exist, it is presumed to be equal to bitDepthC.
[0217] alf_chroma_clipping_value[clipIdx] specifies the clipping value to be used when the index clipIdx is signaled within the alf_chroma_clip_idx[][] table. If it does not exist, alf_chroma_clipping_value[] = {1 << bitDepthC, 1 << (bitDepthC - 1),..., 8, 4, 2} is presumed.
[0218] For simplicity, alf_chroma_clipping_value[alf_chroma_num_clipping_values_minus1 + 1] is presumed to be equal to 1 << bitDepthC.
[0219] When alf_luma_filter_clip[sigFiltIdx] is equal to 0, it specifies that a linear adaptive loop filter is applied to the lunar filter indicated by sigFiltIdx. When alf_luma_filter_clip[sigFiltIdx] is equal to 1, it specifies that a nonlinear adaptive loop filter is applied to the lunar filter indicated by sigFiltIdx.
[0220] alf_luma_clip_min_eg_order_minus1 + 1 specifies the minimum order of the exp-Golomb code for luma filter coefficient signaling. The value of alf_luma_clip_min_eg_order_minus1 shall be in the range of 0 to 6.
[0221] When alf_luma_clip_eg_order_increase_flag[i] is equal to 1, it specifies that the minimum order of the exp-Golomb code for the luma filter coefficient signaling is incremented by 1. When alf_luma_clip_eg_order_increase_flag[i] is equal to 0, it specifies that the minimum order of the exp-Golomb code for the luma filter coefficient signaling is not incremented by 1.
[0222] The order of the exp-Golomb code expGoOrderYClip[i] used to decode the value of alf_luma_clip_idx[sigFiltIdx][j] is derived as follows: expGoOrderYClip[i]=alf_luma_clip_min_eg_order_minus1+1+alf_luma_clip_eg_order_increase_flag[i]
[0223] alf_luma_clip_idx[sigFiltIdx][j] specifies the clipping index for clipping used before multiplication with the jth coefficient of the signaled luma filter represented by sigFiltIdx. If alf_luma_clip_idx[sigFiltIdx][j] is not present, it is inferred to be equal to alf_luma_num_clipping_values_minus1+1 (no clipping).
[0224] The degree k of the exp-Golomb binary uek(v) is derived as follows: golombOrderIdxYClip[]={0, 0, 1, 0, 0, 1, 2, 1, 0, 0, 1, 2} k = expGoOrderYClip[golombOrderIdxYClip[j]]
[0225] The variable filterClips[sigFiltIdx][j], where sigFiltIdx is 0 to alf_luma_num_filters_signalled_minus1 and j is 0 to 11, is initialized as follows: filterClips[sigFiltIdx][j]=ald_luma_clipping_value[alf_luma_clip_idx[sigFiltIdx][j]]
[0226] The luma filter clipping value AlfClipL having an element AlfClipC[filtIdx][j], where filtIdx is 0 to NumAlfFilters-1 and J is 0 to 11, is initialized as follows. AlfClipL[filtIdx][j]=filterClips[alf_luma_coeff_delta_idx[filtIdx]][j]
[0227] alf_chroma_clip_min_eg_order_minus1+1 specifies the minimum order of the exp-Golomb code for chroma filter coefficient signaling. The value of alf_chroma_clip_min_eg_order_minus1 shall be in the range of 0 to 7.
[0228] When alf_chroma_clip_eg_order_increase_flag[i] is equal to 1, it specifies that the minimum order of the exp-Golomb code for chroma filter coefficient signaling is increased by 1. When alf_chroma_clip_eg_order_increase_flag[i] is equal to 0, it specifies that the minimum order of the exp-Golomb code for chroma filter coefficient signaling is not increased by 1.
[0229] The order expGoOrderC[i] of the exp-Golomb code used to decode the value of alf_chroma_coeff_abs[j] is derived as follows. expGoOrderC[i]=alf_chroma_clip_eg_order_minus1+1+alf_chroma_clip_eg_order_increase_flag[i]
[0230] alf_chroma_clip_inx[j] specifies the clipping index for clipping used before multiplication by the jth coefficient of the chroma filter. If alf_chroma_clip_inx[j] is not present, it is inferred to be equal to alf_chroma_num_clip_values_minus1+1 (no clipping).
[0231] The degree k of the exp-Golomb binary uek(v) is derived as follows: golombOrderIdxC[]={0,0,1,0.0,1} k=expGoOrderC[golombOrderIdxC[j]]
[0232] The chroma filter clipping value AlfClipC, which has elements AltClipC[j] for j from 0 to 5, is derived as follows. AlfClipC[j]=alf_chroma_clipping_value[alf_chroma_clip_idx[j]]
[0233] According to a variant, alf_luma_num_clipping_values_minus1 is replaced by alf_luma_num_clipping_values_minus2, the clipping values are provided from index = 1 to alf_luma_num_clipping_values_minus2 + 1, and the first value of alf_luma_clipping_value[] is assumed to be alf_luma_clipping_value[0] = 1 << bitDepthY. alf_chroma_num_clipping_values_minus1 is replaced by alf_chroma_num_clipping_values_minus2, the clipping values are provided from index = 1 to alf_chroma_num_clipping_values_minus2 + 1, and the first value of alf_chroma_clipping_value[] is assumed to be alf_chroma_clipping_value[0] = 1 << bitDepthC.
[0234] According to a variant, the adaptive loop filtering process uses the above syntax elements. Such a variant is described as follows using the notation rules of the following VVC draft specification. Adaptive Loop Filtering general The input to this process is the reconstructed image sample array before the adaptive loop filters recPictureL, recPictureCb, and recPictureCr. The output of this process is a modified reconstructed picture sample array after adaptive loop filters alfPictureL, alfPictureCb, and alfPictureCr.
[0235] The sample values in the modified reconstructed picture ample array after the adaptive loop filters alfPictureL, alfPictureCb, alfPictureCr are initially set equal to the reconstructed picture sample values before applying the adaptive loop filters recPictureL, recPictureCb, recPictureCr, respectively.
[0236] When tile_group_alf_enabled_flag is equal to 1, for all coding tree units with luma coding tree block location (rx, ry), where rx=0~PicWidthCtbs-1, ry=0~PicHeighyInCtBs-1, the following applies:
[0237] If alf_ctb_flag[0][rx][ry] is equal to 1, the coding tree block filtering process of luma samples specified in the clause “Coding tree block filtering process of luma samples” is read with recPictureL, alfPictureL and the luma coding tree block locations (xCtb, yCtb) as inputs (rx << CtbLog2SizeY, ry << CtLog2SizeY) and its output is the modified filtered picture alfPictureL.
[0238] If alf_ctb_flag[1][rx][ry] is equal to 1, the coding tree block filtering process of chroma samples specified in the clause “coding tree block filtering process of chroma samples” is read with RecPicture set equal to recPictureCb, alfPicture set equal to alfPictureCb, and the chroma coding tree block locations (xCtbc, yCtbC) as input (rx << (CtbLog2SizeY-1), ry << (CtLog2SizeY-1)) and its output is the modified filtered picture alfPictureCb.
[0239] When alf_ctb_flag[2][rx][ry] is equal to 1, the chroma sample coding tree block filtering process specified in the clause “chroma sample coding tree block filtering process” is The RecPicture set equal to recPictureCr, the alfPicture set equal to alfPictureCr, and the chroma coding treeblock locations (xCtbc, yCtbC) are read as input (rx << (CtbLog2SizeY-1), ry << (CtLog2SizeY-1)) and the output is the modified filtered picture alfPictureCr.
[0240] Coding tree block filtering process for luma samples The inputs of this process are the reconstructed luma picture sample array recPictureL before the adaptive loop filtering process, the filtered reconstructed luma picture sample array alfPictureL, and the luma location (xCtb, yCtb) that identifies the top-left sample of the current luma coding tree block relative to the top-left sample of the current picture. The output of this process is the modified and filtered reconstructed luma picture sample array alfPictureL.
[0241] The derivation process of the filter index section “Derivation Process for ALF Transpose and Filter Indices for Luma Samples” is called with location (xCtb, yCtb) and the reconstructed luma picture sample array recPictureL as input, and filtIdx[x][y] and transposeIdx[x][y], for x, y = 0 to CtbSizeY-1, as output.
[0242] To derive the filtered reconstructed luma sample alfPictureL[x][y], each reconstructed luma sample in the current luma coding tree block recPictureL[x][y], for x, y = 0 to CtbSize-1, is filtered as follows: The array of luma filter coefficients f[j] and the array of luma filter clipping c[j] corresponding to the filter specified by filtIdx[x][y], for j = 0 to 12, are derived as follows: f[j]=AlfCoeffL[FiltIdx[x][y]][j] c[j]=AlfClipL[FiltIdx[x][y]][j]
[0243] The luma filter coefficient filterCoeff and the filter clipping value filterClip are derived depending on transposeIdx[x][y] as follows: 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] } 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] } 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] } 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] } Otherwise, if transposeIndex[x][y]==3, then 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] } 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] } 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] }
[0244] The location (hx,vy) of each corresponding luma sample (x,y) in a given array of luma samples recPicture is derived as follows: hx= Clip3(0, pic_width_in_luma_samples-1, xCtb+x) vy= Clip3(0, pic_height_in_luma_samples - 1, yCtb+yy)
[0245] The variable curr is derived as follows: curr=recPicture[hx, vy]
[0246] The variable sum 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)) +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[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[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[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[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
[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]
[0247] sum=(sum + 64)>> 7
[0248] The modified filtered reconstructed luma picture samples alfPictureL[xCtb][yCtb+y] are derived as follows: alfPictureL[xCtb+x][yCtb+y]=Clip3(0,(1< <BitDepthY)-1,sum)
[0249] Derivation process of filter index for ALF transposition and luma samples The input of this process is the luma location (xCtb, yCtb) that specifies the top-left sample of the current luma coding tree block relative to the top-left sample of the current picture, and the reconstructed luma picture sample array recPictureL before the adaptive loop filtering process. The output of this process is: Classification filter index array filtIdx[x][y], where x, y = 0 to CtbSizeY-1 Transpose index array, transposeIdx[x][y], where x, y = 0 to CtbSize-1 It is.
[0250] The location (hx,vy) of each corresponding luma sample (x,y) in a given array of luma samples recPicture is derived as follows: hx = Clip3(0, pic_width_in_luma_samples-1,x) vy = Clip3(0, pic_height_in_luma_samples-1, y)
[0251] The classification filter index array, filtIdx, and the transpose index array, transposeIdx, are derived by the following ordered steps:
[0252] 1) Derive the variables filtH[x][y], filtV[x][y], filtD0[x][y], and filtD1[x][y] for x, y = -2~CtbSizeY+1 as follows: If both x and y are even, or if both x and y are non-even, 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]) 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)-recPicture[hxCtb+x-1,vyCtb+y-1]-recPicture[hxCtb+x+1,vyCtb+y+1]) filtD1[x][y]=Abs((recPicture[hxCtb+x,vyCtb+y]<<1)-recPicture[hxCtb+x+1,vyCtb+y-1]-recPicture[hxCtb+x-1,vyCtb+y+1]) Otherwise, set filtH[x][y], filtV[x][y], filtD0[x][y], and filtD1[x][y] equal to 0.
[0253] 2) Derive the variables varTempH1[x][y], varTempV1[x][y], varTempD01[x][y], varTempD11[x][y], and varTemp[x][y] for x, y in the range 0 to (CtbSizeY-1)>>2 as follows: sumH[x][y]=ΣiΣj filtH[(x<<2)+1][(y<<2)+j], where x and y are between -2 and 5. sumV[x][y]=ΣiΣj filtV[(x<<2)+1][(y<<2)+j], where x and y are between -2 and 5. sumD0[x][y]=ΣiΣj filtD0[(x<<2)+1][(y<<2)+j], where x and y are between -2 and 5. sumD1[x][y]=ΣiΣj filtD1[(x<<2)+1][(y<<2)+j], where x and y are between -2 and 5. sumOfHV[x][y]=sumH[x][y]+sumV[x][y]
[0254] 3) Derive the variables dir1[x][y], dir2[x][y], and dirS[x][y] as follows, where x and y are between 0 and CtbSizeY-1. The variables hv1, hv0, and dirHV are derived as follows. If sumV[x>>2][y>>2] is greater than sumH[x>>2][y>>2] then apply the following: hv1=sumV[x>>2][y>>2] hv0=sumH[x>>2][y>>2] dirHV=1 Otherwise the following applies: hv1=sumH[x>>2][y>>2] hv0=sumV[x>>2][y>>2] dirHV=3 The variables d1, d0 and dirD are derived as follows. If sumD0[x>>2][y>>2] is greater than sumD1[x>>2][y>>2] then apply the following: d1=sumD0[x>>2][y>>2] d0=sumD1[x>>2][y>>2] dirD=0 Otherwise, apply d1=sumD1[x>>2][y>>2] d0=sumD0[x>>2][y>>2] dirD=2 The variables hvd1 and hvd0 are derived as follows. hvd1=(d1*hv0>hv1*d0)? d1:hv1 hvd0=(d1*hv0>hv1*d0)? d0:hv0 The variables dirS[x][y], dir1[x][y] and dir2[x][y] are derived as follows: dir1[x][y]=(d1*hv0>hv1*d0)? dirD:dirHV dir2[x][y]=(d1*hv0>hv1*d0)? dirHV:dirD dirS[x][y]=(hdv1>2*hdv0) ? 1:((hdv1*2>9*hvd0) ? 2:0)
[0255] 4) The variable avgVar[x][y] where x and y are between 0 and CtbSizeY-1 is derived as follows: 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))])
[0256] 5) When x=y=0 to CtbSizeY-1, the separation filter index array filtIdx[x][y] and the transposition index array transposeIdx[x][y] are derived as follows. transposeTable[]={0, 1, 0, 2, 2, 3, 1, 3} transposeIdx[x][y]=transposeTable[dir[x][y]*2+(dir2[x][y]>>1)] filtIdx[x][y]=avgVar[x][y] When dirS[x][y] is not equal to 0, fiktIdx[x][y] is modified as follows: filtIdx[x][y]+=(((dir1[x][y]&0x1)<<1)+dirS[x][y]*5
[0257] Code tree block filtering for chroma samples The inputs of this process are the reconstructed chroma picture sample array recPicture before the adaptive loop filtering process, the filtered reconstructed chroma picture sample array alfPicture, and a chroma location (xCtbC, yCtbC) that specifies the top-left sample of the current chroma code tree block relative to the top-left sample of the current picture. The output of this process is the modified and filtered reconstructed chroma picture sample array alfPicture.
[0258] The size of the current chroma code tree block, ctbSizeC, is derived as follows: ctbSizeC=CtbSizeY / SubWidthC
[0259] To derive the filtered reconstructed chroma sample alfPicture[x][y], each reconstructed chroma sample in the current chroma code treeblock recPicture[x][y], for x, y from 0 to ctSizeC-1, is filtered as follows: The position (hx,vy) of each corresponding chroma sample (x,y) in a given array of chroma samples, recPicturer, is derived as follows: hx=Clip3(0, pic_width_in_luma_samples / SubWidthC-1,xCtbC+x) vy=Clip3(0, pic_height_in_luma_samples / SubHeightC-1,yCtbC+y)
[0260] The variable curr is derived as follows: curr = recPicture[hx, vy]
[0261] The variable sum is derived as follows: sum= AlfCoeffCC[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[ 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)) + AldCoeffC[6]* recPicture[hx,vy]
[0262] sum=(sum+64)>>7
[0263] The modified filtered reconstructed chroma picture samples alfPicture[xCtbC+x][yCtbC+y] are derived as follows: alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepthC)-1,sum)
[0264] In the above variant, a clipping operation is applied to the difference between the adjacent sample and the filtered sample (i.e., equation (7) is used). In another variant using equation (9), its semantics and filtering process are modified as follows (modified based on the semantics and filtering process of the variant above): - AlfCoeffL[filtIdx]
[12] is derived as follows: AlfCoeffL[filtIdx]
[12] = 128- Σ k (AlfCoeffL[filtIdx][k]<<1), where k = 0..11. - AlfCoeffC[6] is derived as follows: AlfCoeffC[6] = 128 - Σ k (AlfCoeffC[k]<<1), where k=0~5. - The bit depth restrictions of AlfCoeffL[filtIdx]
[12] and AlfCoeffC[6], which must be in the range of 0 to 2^8-1, are relaxed to the range of 0 to 2^9-1 or even 0 to 2^10-1 to obtain better filtering performance.
[0265] This is because it often happens that coefficients related to neighboring sample positions must be higher (in absolute value) for better efficiency in clipping operations (because the filter input samples are more likely to be reliable, i.e. provide better filtering, when a nonlinear function is applied). As a result, it frequently happens that the sum of these coefficients (not including the central coefficient) is lower than -128 (in fixed-point representation), and as a result the central coefficient must be higher than 256 (in fixed-point representation). Thus, restricting the central coefficient to the normative range of 0 to 2^8-1 means that the encoder has to find sub-optimal coefficients by reducing their dynamic / amplitude, resulting in less efficient filtering. By using the normative range of 10-bit precision (i.e., in the range 0 to 2^10-1) for the central coefficient, it becomes much less frequent that the encoder has to use sub-optimal filter coefficients, and therefore the overall filtering quality is improved compared to 8-bit precision. In ALF linear filtering, the restriction to 8 bits on the central coefficient does not affect the filter efficiency much, since the neighboring filter input samples often have smaller weights (i.e., smaller coefficients). Although clipping, i.e. ALF nonlinear filtering, an optimal filter may give more weight to nearby samples, which will be more reliable once clipped.
[0266] The variable sum in the “coding tree block filtering process for luma samples” is derived as follows: sum= filterfCoeff[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])+Clip(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[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[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[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[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
[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]
[0267] sum=(sum+64)>>7
[0268] The variable sum in the “coding tree block filtering process for chroma samples” is derived as follows: sum= AlfCieffC[0]*(Clip3(curr-AlfClipC[0], curr+AlfClipC[0], recPicture[hx, vy + 2])+Clip3(curr-AlfClipC[0], AlfClipC[0], recPicture[hx, vy-2])) +AlfCieffC[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])) +AlfCieffC[2]*(Clip3(curr-AlfClipC[2], curr+AlfClipC[2], recPicture[hx, vy+1])+Clip3(curr-AlfClipC[2], curr+AlfClipC[2], recPicture[hx, vy-1])) +AlfCieffC[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])) +AlfCieffC[4]*(Clip3(curr-AlfClipC[4], curr+AlfClipC[4], recPicture[hx+2, vy])+Clip3(curr-AlfClipC[4], curr+AlfClipC[4], recPicture[hx-2, vy])) +AlfCieffC[5]*(Clip3(curr-AlfClipC[5], curr+AlfClipC[5], recPicture[hx+1, vy])+Clip3(curr-AlfClipC[5], curr+AlfClipC[5], recPicture[hx-1, vy])) +AlfCieffC[6]*recPicture[hx, vy]
[0269] sum=(sum+64)>>7
[0270] In another variation that uses a 5x5 diamond filter shape for the Luma filter (to reduce the number of buffer lines needed to apply the ALF) that also uses clipping applied to the difference between adjacent sample values and the center sample value, the nonlinear ALF data syntax in Table 4 is modified as follows (changes made to the previously presented ALF data syntax are both underlined and bolded, and repeated portions are omitted where possible): TIFF0007549709000029.tif130144 Table 5 - Nonlinear ALF corrections
[0271] Since the number of ALF coefficients in the Lunar filter is 13, the initialization process for the last coefficient filter is as follows: The last filter coefficient AlfCoeffL[filtIdx][ for filtIdx=0~NumAlfFilters-1 6 ] is derived as follows: AlfCoeffL[filtIdx][6]=128
[0272] The bitstream conformance requirement is that AlfCoeffL[filtIdx][j] for filtIdx=0 to NumAlfFilters-1, j=0 to 11 is within -2^7 to 2^7-1, and AlfCoeffL[filtIdx][ 6 ] must be in the range 0 to 2^8-1.
[0273] The filter index derivation of “ALF Transposition and Filter Index Derivation for Luma Samples” for “Coding Tree Block Filtering Process for Luma Samples” is modified as follows (changes made to the previously presented ALF data syntax are shown in both underline and bold, and repeated parts are omitted where possible):
[0274] The filter index section “ALF transpose and luma sample filter index derivation process” takes as input the location (xCtb, yCtb) and the reconstructed luma picture sample array recPictureL, and is called filtIdx[x][y] and transposeIdx[x][y] for x, y = 0 to CtSizeY-1.
[0275] To derive the filtered reconstructed luma sample alfPictureL[x][y], each reconstructed luma sample in the current luma coding tree block recPictureL[x][y], for x, y = 0 to CtbSizeY-1, is filtered as follows:
[0276] The array of luma filter coefficients f[j] and the array of luma filter clipping c[j] corresponding to the filter specified by filtIdx[x][y] are derived as follows for j = 0 to 6: f[j]=AlfCoeffL[x][y][j] c[j]=AlfClipL[x][y][j]
[0277] The luma filter coefficient filterCoeff and the filter clipping value filterClip are derived according to transposeIdx[x][y] as follows: If transposeIndex[x][y]==1 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]} Otherwise, if transposeIndex[x][y]==2, then 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]} Otherwise, if transposeIndex[x][y]==3, then 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]} Otherwise 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]}
[0278] The position (hx, vy) of each corresponding luma sample (x, y) in a given array of luma samples recPicture is derived as follows: hx=Clip3(0, pic_width_in_luma_samples-1, xCtb + x) vy=Clip3(0, pic_height_in_luma_samples - 1, yCtb + y)
[0279] The variable curr is derived as follows: curr=recPictureL[hx, vy]
[0280] The variable sum is derived as follows: sum= filterCoeff[0]*(Clip3(-filter[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[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[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[6]*recPictureL[hx、vy]
[0281] sum=(sum+64)>>7
[0282] The modified filtered reconstructed luma image samples alfPictureL[xCtb+x][yCtb+y] are derived as follows: alfPictureL[xCtb+x][yCtb+y]=Clip3(0, (1< <BitDepthY)-1、sum)
[0283] In a variant that does not use the difference between the neighborhood and the center, for k = 0 to 5, AlfCoeffL[filtIdx][6] = 128-Σ k (AlfCoeffL[filtIdx][k]) is used. Filtering also makes similar modifications to the clipping parameters of the filtering.
[0284] In another variation, using a 7x7 diamond shape for the filters, but using clipping pattern 1601 of Figure 16-a for the luma filter and clipping pattern 1605 of Figure 16-b for the chroma filter, the nonlinear ALF data syntax of Table 4 is modified as follows (changes made to the ALF data syntax of Table 4 previously illustrated, both underlined and bold, repeated portions omitted where possible): TIFF0007549709000030.tif161139 Table 6 - Non-linear ALF data syntax corrections
[0285] AlfClipPatL[] is the constant clipping pattern table for the Luma filter, set as follows: AlfClipPatL[]={0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1}
[0286] AlfClipPatC[] is the constant clipping pattern table for the Chroma filter, set as follows: AlfClipPatC[]={1, 1, 0, 1, 1, 0}
[0287] Some of the semantics are modified as follows: - The variable sum in “Coding Tree Block Filtering Process for Luma Samples” is derived as follows: sum=filterCoeff[0]*(recPictureL[hx, vy+3]-curr + recPicture[hx, vy-3]-curr) +filterCoeff[1]*(recPicure[hx+1, vy+2]-curr)+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[3]*(recPictureL[hx-1, vy+2]-curr+recPictureL[hx+1, vy-2]-curr) + filterCoeff[4]*(recPictureL[hx+2, vy+1]-curr+recPictureL[hx-2, vy-1]-curr) + filterCoeff[5]*(recPictureL[hx+1, vy+1]-curr+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[7]*(recPictureL[hx-1, vy+1]-curr+recPictureL[hx+1, vy-1]-curr) + filterCoeff[8]*(recPictureL[hx-2, vy+1]-curr+recPictureL[hx+2, vy-1]-curr) + filterCoeff[9]*(recPictureL[hx+3, vy]-curr+recPictureL[hx-3, vy]-curr) +filterCoeff
[0010] *(Clip3(-filterClip
[10] , filterClip
[10] , recPictureL[hx+2, vy]-curr)+Clip3(-filterClip
[10] , filterClip
[10] , recPictureL[hx-2, vy]-curr)) +filterCoeff
[0011] *(Clip3(-filterClip
[11] , filterClip
[11] , recPictureL[hx+1, vy]-curr)+Clip3(-filterClip
[11] , filterClip
[11] , recPictureL[hx-1, vy]-curr)) +filterCoeff
[0012] *recPictureL[hx, vy]
[0288] sum=(sum+64)>>7
[0289] The variable sum in the “coding tree block filtering process for chroma samples” 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[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[6]*recPicture[hx, vy]
[0290] It will be appreciated that other variants using other clipping patterns can be easily derived from the variants described above. Similarly, variants that reduce the number of clippings (i.e., reduce the clipping positions, i.e., no clipping for the luma component is applied to the current (center) sample value "curr" such that no "f
[12] ", no "c
[12] ", no "filterCoeff
[12] ", and no "(sum=curr+(sum+64)>>7)" as in equation (17) and FIG. 7) and / or do not use the difference between the neighboring samples and the center sample can also be derived.
[0291] FIG. 8 is a block diagram of a linear filter obtained when the nonlinear part of the filter of FIG. 7 is disabled, according to an embodiment of the present invention. According to one embodiment, when the ALF is active and the nonlinear ALF is inactive, a linear ALF is used for filtering. In a variation of such an embodiment, the nonlinear ALF is defined in equation (7) and used as illustrated in FIG. 7, and instead of using the linear ALF as defined in equation (4) and illustrated in FIG. 6, the linear filtering is performed as defined in equation (6) and illustrated in FIG. 8. In the hardware design, it becomes possible to share common circuit components between the nonlinear filter and the linear filter. Comparing FIG. 7 and FIG. 8, the min / max operation is simply bypassed and goes directly to the sample value. Another advantage of using this approach is that the encoder does not need to ensure that the sum of all filter coefficients of each filter is 1 when designing the filter. As a result of this design, it is possible to add one subtraction for each coefficient except for the current sample and eliminate one multiplication for the current sample.
[0292] The design of FIG. 7 also has the advantage of saving hardware bits to implement the multiplication if the maximum value that the clipping parameter can take is low enough.
[0293] According to one embodiment, the syntax elements of ALF signaled in the slice header of Fig. 5 are no longer signaled in the slice header, but instead are signaled at frame level, for example in the picture header. Then, in the slice header, there are one or more flags / syntax elements to signal that the parameters provided at the frame level are directly used in the slice or that the parameters provided at the frame level have to be "freshened" (i.e. updated). This refreshing at the slice level is done in the slice header. The refreshing of the filter coefficients and / or clipping parameters is done by coding the difference between the values indicated at the frame level and the values used in the slice. According to one embodiment, an additional syntax element in the slice header indicates whether the values of the filter coefficients and / or clipping parameters are coded as a difference in the slice header or whether their values are coded.
[0294] According to one embodiment, the filter coefficients and / or clipping parameters defined at the slice level (in the slice header) can be updated at a finer granularity level (e.g., for each CTU). The syntax element indicating whether an update should be performed is entropy coded in the slice data as well as the update data when it indicates that an update must be performed. In one embodiment, in the coded bitstream, for each CTU, the coded slice data includes one entropy coded flag indicating whether the luma filter / clipping parameters need to be updated. If the flag indicates that an update should be performed, then for each table of filter coefficients, the entropy coded flag indicates whether the filter must be updated. If the filter must be updated, the coefficient offset (difference from a reference value in the slice or from a reference value in a previously coded CTU belonging to the same slice) and / or the clipping parameter offset are entropy coded.
[0295] According to one embodiment, from an encoder point of view, the main logical steps of the VTM-3.0 ALF encoding process described with reference to Figure 9 are maintained. The main changes are in the nature of the statistics extracted to build the filters, and the way in which the filters are determined. Instead of a simple Wiener Filter operation, the clipping parameters are iteratively optimized to find the best clipping parameters and associated nonlinear W-Wiener filter coefficients.
[0296] According to one embodiment, we have N K , defines the limit on the number of values that one clipping parameter can take. N K can be made small, e.g., N K = 12 or less. Then, in step 902, instead of computing the covariance and cross-covariance matrix statistics, the encoder K ×N K A two-entry table of clipping covariance matrix statistics, E and N K Construct a one-entry table y of clipping cross-covariance matrix statistics (instead of one covariance matrix statistic and one cross-covariance matrix statistic).
[0297] Clipping covariance matrix E c [a][b] is is the covariance matrix estimated from TIFF0007549709000031.tif1117, where X m is C m Contains the N real (observed) values of the input when using the th clipping value. For example, using the shape in Figure 4-b, X i m is the X obtained for a given sample position. m is the i-th column of X i,j m i <N C (The luma filter in Figure 4-b has N CThe sum of the clipping results of the difference between the neighboring samples of (j-th filtered sample) and the m-th clipping value, using the m-th clipping parameter, where i=12 is the number of filter coefficients minus 1, for two symmetric neighbors in the shape and for the j-th filtered sample, where X i,j m is the value at row i, column j.
[0298] Clipping cross-covariance matrix y C [C] is the realization of the desired filter output (i.e., the original samples) and X C is the cross-covariance matrix between the realizations of
[0299] We, When constructing / testing the filter, with clipping parameters equal to TIFF0007549709000032.tif421, Define TIFF0007549709000033.tif635 (where, for example, the luma filter is N C (where =12 is the number of filter coefficients minus 1, and the last value equal to zero is just convenient, other values are not clipped since the central coefficient 12 is not clipped, so you can use different values and have the same result). We i <N c ,j <N C and k <N c When y[k]=y c For [C[k]][k], E[i,j]=E C Compute the covariance matrix E and cross-covariance matrix y of the clipping parameters, which are [C[i]][C[j]][i,j]. We then construct a Wiener filter using these two matrices, as described above for the linear ALF.
[0300] In step 904, instead of combining statistics of the covariance and cross-covariance matrices, the encoder combines statistics of each clipping-covariance matrix and clipping-cross-covariance matrix (again, this combination is done by summing the statistics).
[0301] The method used to find the optimized group of filters (i.e., the optimized merged filter) in step 905 is similar to before. The main difference is that instead of computing just one Wiener filter for each filter tested / compared, the clipping parameters are optimized iteratively, with each step computing a Wiener filter for a particular clipping parameter and minimizing the filter's output error (computed on a statistical matrix). A simple optimization algorithm is to iteratively optimize all clipping parameter values (C i ) is set to zero (or set to the median clipping value or any default value), then improve the filter (i.e., reduce the output error) by following the following steps in a loop: for each clipping parameter value, take the next clipping parameter value if available / allowed (i.e., index<maximum index value), if the Wiener filter calculated with this clipping parameter value is better, then use the Wiener filter calculated with this clipping parameter value if available / allowed (i.e., index>0), if the Wiener filter calculated with this clipping parameter value is better. When grouping two filters, one strategy may be to start the optimization with each clipping parameter value set to the average of the clipping parameter values of the two filters.
[0302] Steps 906, 907, 908, 909, 910 and 911 have no actual changes.
[0303] In step 912, the combined statistics modification is the same as described for step 904. The chroma filter determination in step 913 corresponds to the filter optimization described for step 905. The other steps are unchanged except for step 918, where the ALF parameters include the clipping parameters determined for each filter.
[0304] In VTM-3.0 with "normal" ALF, when the encoder derives integer filter coefficients from floating-point values, it first performs a quantization of the floating-point values to fixed-point values: note that for each filter coefficient, it rounds the filter coefficient multiplication to the nearest integer value in fixed-point precision. It then iteratively adjusts the filter coefficients (to compensate for rounding errors) to try to improve the filter efficiency. The encoder must also ensure that the sum of all filter coefficients equals 1 (multiplied with fixed-point precision) and that the filter coefficient of the center sample does not exceed a maximum value (to ensure that its use in the multiplication does not end up using too many bits).
[0305] In embodiments of the present invention where the difference between adjacent samples is used as the input to the filter, there is no need to ensure that the center coefficient does not exceed a maximum value, since it is always 1. There is also no need to keep track of the value of the sum of all the filter coefficients.
[0306] An advantage of these embodiments is improved coding efficiency. Although the descriptions of these embodiments refer to luma and chroma components, they can be easily adapted to other components, such as a single luma component or RGB components.
[0307] In the above embodiment or variant, the present invention modifies the filtering of 304 and 407 in Fig. 3-a and Fig. 4-a to obtain a nonlinear filtering effect using a nonlinear function on the filter input. Fig. 2 is also modified to add a new syntax element for signaling additional parameters for the nonlinear function (an example of an embodiment was described with reference to Fig. 5). Implicitly, the input filtering 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 a nonlinear function for the filter (i.e., to derive a "nonlinear filter"). Thus, in most circumstances, the output image portions 305 and 408 are not the same as those generated in VTM-3.0, but have a higher quality for equivalent / comparable input samples, and / or achieve a better compromise between output image quality and coding efficiency. It should be understood that in another embodiment / variant, the ALF itself is modified to operate to filter using any of the above nonlinear functions.
[0308] Implementation of the embodiments of the present invention One or more of the above-mentioned embodiments may be implemented in the form of an encoder or decoder that performs the method steps of one or more of the above-mentioned embodiments. The following embodiments illustrate such implementations.
[0309] For example, an adaptive loop filter according to any of the above embodiments may be used in the post filtering 9415 performed by the encoder of FIG. 10, or the post filtering 9567 performed by the decoder of FIG.
[0310] Figure 10 shows a block diagram of an encoder according to an embodiment of the invention. The encoder is represented by connected modules, each module adapted to perform, for example in the form of program instructions to be executed by a central processing unit (CPU) of the device, at least one corresponding step of a method implementing at least one embodiment of encoding images of an image sequence according to one or more embodiments of the invention.
[0311] An original sequence of digital images i0 to in 9401 is received as input by the encoder 9400. Each digital image is represented by a set of samples, sometimes also called pixels (hereafter referred to as pels). A bitstream 9410 is output by the encoder 9400 after implementation of the encoding process. The bitstream 9410 contains data for image portions such as multiple coding units or slices, each slice including a slice header for transmitting coded values of coding parameters used to code the slice, and a slice body containing the coded video data.
[0312] An input digital image i0-in 9401 is divided by module 9402 into blocks of pixels. The blocks correspond to image portions and may be of variable size (for example 4x4, 8x8, 16x16, 32x32, 64x64, 128x128 pixels, and also several rectangular block sizes can be considered). A coding mode is selected for each input block. Two families of coding modes are provided: coding modes based on spatial predictive coding (intra prediction) and coding modes based on temporal prediction (inter coding, MERGE, SKIP). Possible coding modes are tested.
[0313] The module 9403 implements an intra prediction process in which a given block to be coded is predicted by a predictor calculated from pixels in the neighborhood of the block to be coded. An indication of the selected intra predictor and the difference between the given block and its predictor are coded to provide a residual when intra coding is selected.
[0314] Temporal prediction is performed by a motion estimation module 9404 and a motion compensation module 9405. First, a reference image is selected from the set of reference images 9416, and the part of the reference image, also called the reference area or image part, that is the closest area (closest in terms of pixel value similarity) to the given block to be coded is selected by the motion estimation module 9404. Then, the motion compensation module 9405 uses the selected area to predict the block to be coded. The difference between the selected reference area and the given block, also called the residual block / data, is calculated by the motion compensation module 9405. The selected reference area is indicated using motion information (e.g., a motion vector).
[0315] Thus, in both cases (spatial and temporal prediction), when SKIP mode is entered, the residual is calculated by subtracting the prediction from the original block.
[0316] In the INTRA prediction implemented by the module 9403, the prediction direction is coded. In the inter prediction implemented by the modules 9404, 9405, 9416, 9418, 9417, at least one motion vector or information (data) for identifying such a motion vector is coded for temporal prediction. If inter prediction is selected, the motion vector and information related to the residual block are coded. To further reduce the bit rate, assuming that the motion is uniform, the motion vector is coded by difference to the motion vector predictor. The motion vector predictor from a set of motion information predictor candidates is obtained from the motion vector field 9418 by the motion vector predictive coding module 9417.
[0317] The encoder 9400 further includes a selection module 9406 for selecting a coding mode by applying a coding cost criterion, such as a rate-distortion criterion. To further reduce redundancy, a transform (such as a DCT) is applied to the residual block by a transform module 9407, and the resulting transformed data is then quantized by a quantization module 9408 and entropy coded by an entropy coding module 9409. Finally, if not in SKIP mode and the selected coding mode requires coding of the residual block, the coded residual block of the current block being coded is inserted into the bitstream 9410.
[0318] The encoder 9400 also decodes the coded image to generate reference images (e.g., those in the reference image / picture 9416) for motion estimation of subsequent images. This allows the encoder and decoder receiving the bitstream to have the same reference frame (e.g., a reconstructed image or a reconstructed image part is used). The inverse quantization ("inverse quantization") module 9411 performs inverse quantization ("inverse quantization") of the quantized data, followed by an inverse transformation performed by the inverse transformation module 9412. The intra prediction module 9413 uses the prediction information to decide which prediction should be used for a given block, and the motion compensation module 9414 actually adds the residual obtained by the module 9412 to the reference area obtained from the set of reference images 9416. Then, post-filtering is applied by the module 9415 to filter the reconstructed frame of pixels (image or image part) to obtain another reference image of the set of reference images 9416.
[0319] 11 shows a block diagram of a decoder 9560 that may be used to receive data from an encoder according to one embodiment of the invention. The decoder is represented by connected modules, each module configured to implement a corresponding step of a method implemented by the decoder 9560, e.g., in the form of program instructions executed by a CPU of the device.
[0320] The receiving decoder 9560 receives a bitstream 9561 including coding units (e.g., data corresponding to image portions, blocks or coding units). Each coding unit consists of a header including information about coding parameters and a body including the coded video data. As explained with respect to FIG. 10, the coded video data is entropy coded and the motion information (e.g., an index of a motion vector predictor) is coded with a predefined number of bits for a given image portion (e.g., a block or CU). The received coded video data is entropy decoded by module 9562. The residual data is then inverse quantized by module 9563 and then an inverse transform is applied by module 9564 to obtain pixel values.
[0321] Mode data indicating the coding mode is also entropy decoded, and based on this mode, INTRA type decoding or INTER type decoding is performed on the coding block (unit / set / group) of image data. In the case of INTRA mode, an intra predictor is determined by the intra prediction module 9565 based on the intra prediction mode specified in the bitstream (e.g., the intra prediction mode is determinable using data provided in the bitstream). If the mode is INTER mode, motion prediction information is extracted / obtained from the bitstream to find (identify) the reference region used by the encoder. The motion prediction information includes, for example, a reference frame index and a motion vector residual. The motion vector predictor is added to the motion vector residual by the motion vector decoding module 9570 to obtain a motion vector.
[0322] The motion vector decoding module 9570 applies motion vector decoding to each image portion (e.g., current block or CU) coded by motion prediction. Once the index of the motion vector predictor of the current block is obtained, the actual value of the motion vector associated with the image portion (e.g., current block or CU) is decoded and can be used to apply motion compensation by module 9566. The reference image portion indicated by the decoded motion vector is extracted / obtained from the set of reference images 9568 so that module 9566 can perform motion compensation. The motion vector field data 9571 is updated with the decoded motion vector to be used for predicting the motion vector to be decoded later.
[0323] Finally, a decoded block is obtained. Suitably, post-filtering is applied by a post-filtering module 9567. A decoded video signal 9569 is finally obtained and provided by the decoder 9560.
[0324] 12 illustrates a data communication system in which one or more embodiments of the present invention may be implemented. The data communication system includes a transmitting device, in this case a server 9201, operable to transmit data packets of a data stream 9204 to a receiving device, in this case a client terminal 9202, via a data communication network 9200. The data communication network 9200 may be a wide area network (WAN) or a local area network (LAN). Such a network may be, for example, a wireless network (WiFi / 802.11a or b or g), an Ethernet network, an Internet network, or a mixed network made up of several different networks. In a particular embodiment of the present invention, the data communication system may be a digital television broadcasting system in which a server 9201 transmits the same data content to several clients.
[0325] The data stream 9204 provided by the server 9201 may consist of multimedia data representing video and audio data. The audio and video data streams may be captured by the server 9201 using a microphone and a camera, respectively, in some embodiments of the present invention. In some embodiments, the data streams may be stored on the server 9201, or may be received by the server 9201 from another data provider, or may be generated at the server 9201. The server 9201 in particular comprises an encoder for encoding the video and audio streams to provide a compressed bitstream for transmission, which is a more compact representation of the data presented as input to the encoder. In order to obtain a better ratio of the quality of the transmitted data to the amount of the transmitted data, the compression of the video data may for example be according to the High Efficiency Video Coding (HEVC) format, or the H.264 / Advanced Video Coding (Advanced video Coding) format, or the Versatile Video Coding (VVC) format. The client 9202 receives the transmitted bitstream and decodes the reconstructed bitstream to reproduce the video images on a display device and the audio data by a speaker.
[0326] Although this embodiment considers a streaming scenario, it will be appreciated that in some embodiments of the invention, data communication between the encoder and decoder may be performed using a media storage device, such as, for example, an optical disk. In one or more embodiments of the invention, a video image may be transmitted along with data representing a compensation offset to apply to reconstructed pixels of the image to provide filtered pixels in the final image.
[0327] 13 shows a schematic diagram of a processing device 9300 configured to implement at least one embodiment of the present invention. The processing device 9300 can be a device such as a microcomputer, a workstation, a user terminal, or a light portable device. The device / apparatus 9300 comprises a communication bus 9313 to which the following components are connected: - A central processing unit 9311, such as a microprocessor, designated as a CPU; - a read-only memory 9307, denoted as ROM, for storing computer programs / instructions for operating the device 9300 and / or for implementing the invention; a random access memory 9312, denoted RAM, for storing the executable code of an embodiment of the invention, as well as registers arranged to record variables and parameters necessary for implementing the method of encoding a sequence of digital images and / or the method of decoding a bitstream according to an embodiment of the invention; - A communications interface 9302 connected to a communications network 9303 over which the digital data to be processed is transmitted or received.
[0328] Optionally, the device 9300 may also include the following components: - a data storage means 9304, such as a hard disk, for storing computer programs for carrying out the methods of one or more embodiments of the present invention and data used or generated during the carrying out of one or more embodiments of the present invention; a disk drive 9305 for a disk 9306 (e.g., a storage medium), where the disk drive 9305 is configured to read data from or write data to the disk 9306; or - A screen 9309 for displaying data and / or acting as a graphical interface with the user, via a keyboard 9310, touch screen, or any other pointing / input means.
[0329] The device 9300 may be connected to various peripheral devices, such as, for example, a digital camera 9320 or a microphone 9308, where each peripheral device is connected to an input / output card (not shown) to provide multimedia data to the device 9300.
[0330] The communication bus 9313 provides for communication and interoperability between the 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 to any element of the device 9300 directly or by another element of the device 9300.
[0331] The disk 9306 may be replaced by any information carrier, e.g. a compact disk, rewritable or not, a ZIP disk or a memory card, and generally speaking any information storage means readable by a microcomputer or processor, integrated or not in the device, possibly removable, and configured to store one or more programs the execution of which enables a method of encoding a sequence of digital images and / or a method of decoding a bitstream according to the invention.
[0332] The executable code may be stored either in the read-only memory 9307, in the hard disk 9304 or on a removable digital medium as previously explained, such as for example the disk 9306. According to a variant, the executable code of the program may be received by the communication network 9303, via the interface 9302, to be stored in one of the storage means of the device 9300 before being executed, for example in the hard disk 9304.
[0333] The central processing unit 9311 is configured to control and direct the execution of instructions or parts of the program or software code of the program according to the invention with instructions stored in one of the aforementioned storage means. On power-up, the program or programs stored in a non-volatile memory, for example on the hard disk 9304, the disk 9306 or the read-only memory 9307, are transferred to the random access memory 9312, which then contains the executable code of the program or programs, as well as registers for storing variables and parameters necessary to implement the invention.
[0334] In this embodiment, the device is a programmable device that uses software to implement the invention, however, alternatively, the invention may be implemented in hardware (e.g. in the form of an application specific integrated circuit (ASIC)).
[0335] Implementation of the embodiments of the present invention It is also understood that according to other embodiments of the invention, a decoder according to the aforementioned embodiments is provided in a user terminal such as a computer, a mobile phone (cell phone), a tablet, or any other type of device (e.g., a display device) capable of providing / displaying content to a user. According to yet another embodiment, an encoder according to the aforementioned embodiments is provided in an image capture device that also comprises a camera, a video camera, or a network camera (e.g., a closed circuit television or a video surveillance camera) that captures and provides content for the encoder to encode. Two such embodiments are provided below with reference to Figures 14 and 15.
[0336] FIG. 14 is a block diagram of a network camera system 9450 including a network camera 9452 and a client device 9454 .
[0337] The network camera 9452 includes an imaging unit 9456, an encoding unit 9458, a communication unit 9460, and a control unit 9462. The network camera 9452 and the client device 9454 are communicatively connected to each other via the network 9200. The imaging unit 9456 includes a lens and an image sensor (e.g., a charge-coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS)) to capture an image of an object and generate image data based on the image. The image may be a still image or a video image. The imaging unit may also include a zoom means and / or a pan means, which are adapted to zoom or pan (optically or digitally), respectively. The encoding unit 9458 encodes the image data using the encoding method described in one or more of the above embodiments. The encoding unit 9458 uses at least one of the encoding methods described in the above embodiments. As another example, the encoding unit 9458 can use a combination of the encoding methods described in the previous embodiments.
[0338] The communication unit 9460 of the network camera 9452 transmits the encoded image data encoded by the encoding unit 9458 to the client device 9454. The communication unit 9460 may also receive commands from the client device 9454. The commands include a command for setting parameters for encoding by the encoding unit 9458. The control unit 9462 controls other units in the network camera 9452 in response to the commands received by the communication unit 9460 or user input.
[0339] The client device 9454 includes a communication unit 9464, a decoding unit 9466, and a control unit 9468. The communication unit 9464 of the client device 9454 may transmit a command to the network camera 9452. Also, the communication unit 9464 of the client device 9454 receives encoded image data from the network camera 9452. The decoding unit 9466 decodes the encoded image data using the decoding method described in the above embodiment. Also, for example, the decoding unit 9466 can use a combination of the decoding methods described in the above embodiment. The control unit 9468 of the client unit 9454 controls other units in the client unit 9454 according to a user operation or a command received by the communication unit 9464. Also, the control unit 9468 of the client device 9454 may control the display device 9470 to display the image decoded by the decoding unit 9466.
[0340] The control unit 9468 of the client device 9454 may also control the display device 9470 to display a GUI (Graphical User Interface) for specifying parameter values of the network camera 9452, for example, parameter values for encoding by the encoding unit 9458. The control unit 9468 of the client device 9454 may also control other units in the client unit 9454 in response to a user's operation input to the GUI displayed by the display unit 9470. The control unit 9468 of the client device 9454 may also control the communication unit 9464 of the client device 9454 to transmit a command for specifying parameter values of the network camera 9452 to the network camera 9452 in response to a user's operation input to the GUI displayed by the display device 9470.
[0341] 15 is a diagram showing 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.
[0342] The communication unit 9502 receives the encoded image data via the network 9200. The decoding / encoding unit 9504 decodes the encoded image data received by the communication unit 9502. The decoding / encoding unit 9504 decodes the encoded image data using the decoding method described in one or more of the above embodiments. The decoding / encoding unit 9504 can also use at least one of the encoding methods or the decoding methods described in the above embodiments. As another example, the decoding / encoding unit 9504 can use a combination of the decoding methods or the encoding methods described in the above embodiments. The control unit 9506 controls other units in the smartphone 9500 in response 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.
[0343] The smartphone may further include an image recording device 9510 (e.g., a digital camera and associated circuitry) for recording images or video. Such recorded images or video may be encoded by the decoding / encoding unit 9504 under the direction of the control unit 9506. The smartphone may further include a sensor 9512 configured to sense the orientation of the mobile device. Such sensors may include an accelerometer, gyroscope, compass, global positioning (GPS) unit, or similar position sensor. Such a sensor 9512 may determine whether the smartphone changes orientation, and such information may be used when encoding the video stream.
[0344] Although the present invention has been described with reference to embodiments, it should be understood that the present invention is not limited to the disclosed embodiments. It will be understood by those skilled in the art that various changes and modifications can be made without departing from the scope of the present invention, as defined in the appended claims. All of the features disclosed in this specification (including any accompanying claims, abstract, and drawings), and / or all of the steps of any method or process so disclosed, can be combined in any combination, except combinations in which at least some of such features and / or steps are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract, and drawings) can be replaced by an alternative feature serving the same, equivalent, or similar purpose, unless otherwise specified. Thus, unless otherwise specified, each feature disclosed is merely one example of a generic series of equivalent or similar function.
[0345] It will also be understood that any result of the above-mentioned comparisons, decisions, evaluations, selections, executions, performing, or considerations, e.g., selections made during an encoding or filtering process, may be indicated in or determinable / inferable from data in the bitstream, e.g., flags or information indicative of the results, such that the indicated or determined / inferred results may be used in processing, e.g., during a decoding process, in lieu of actually performing the comparisons, decisions, evaluations, selections, executions, performing, or considerations.
[0346] In the claims, the word "comprise" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude a plurality. 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 to advantage. Reference signs appearing in the claims are for illustrative purposes only and shall have no limiting effect on the scope of the claims.
[0347] In the above-described embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit.
[0348] Computer-readable media may include computer-readable storage media, which correspond to tangible media such as data storage media, or communication media, which include any medium that facilitates transfer of a computer program from one place to another, for example according to a communications protocol. In this manner, computer-readable media may generally correspond to (1) tangible computer-readable storage media that is non-transitory, or (2) a communication medium, such as a signal or carrier wave. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium. By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, 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. Any connection is also properly termed a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. Disk and disk as used herein include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVDs), floppy disks, and Blu-ray disks, where disks typically reproduce data magnetically and disks reproduce data optically with a laser.Combinations of the above should also be included within the scope of computer-readable media.
[0349] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable gate / logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor" as used herein may refer to any of the foregoing structures, or any other structure suitable for implementing the techniques described herein. Furthermore, in some aspects the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. Additionally, the techniques may be implemented entirely in one or more circuit or logic elements.
[0350] Although the present invention has been described with reference to embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. For the avoidance of doubt, the following description forms part of the description. The claims shall follow the specification and be so labeled.
[0351] Statement 1. A method of controlling an adaptive loop filter for one or more image portions of an image, comprising controlling filtering for a first sample value of the image portion based on a plurality of neighboring sample values of the first sample value, said controlling including using a nonlinear function having one or more variables based on the one or more neighboring sample values and one or more filter variables signaled in an Adaptation Parameter Set.
[0352] Statement 2. The method of statement 1, wherein the nonlinear function comprises one or more clipping functions and one or more filter variables, the filter variables comprising one or more clipping parameters determined using information provided in an application parameter set.
[0353] Statement 3. The method of statement 2, wherein two or more clipping functions share the same clipping parameters that are determined using information signaled in the adaptation parameter set.
[0354] Statement 4. The method of statements 2 or 3, wherein the clipping parameter to use for the clipping function is determined using an index that identifies a clipping parameter from a plurality of clipping parameter values, one of the plurality of clipping parameters corresponding to a maximum sample value based on a bitdepth. More suitably, the index is provided in an adaptive parameter set.
[0355] Statement 5. The method of any one of statements 2-4, wherein the clipping parameter to use for the clipping function is determined using an index that identifies the clipping parameter from a plurality of clipping parameter values and includes the same number of values both when the first sample value is a luma sample value and when the first sample value is a chroma sample value. Suitably, the plurality of clipping parameter values includes four values (allowed, available, possible). Suitably, the plurality of clipping parameter values includes the same number of values (allowed, available, possible) for one or more of the one or more image portions of the image. Suitably, the plurality of clipping parameter values includes four values (allowed, available, possible) for two or more of the one or more image portions of the image. Suitably, the plurality of clipping parameter values includes the same number of values (allowed, available, possible) for all image portions of the image or all image portions in a sequence of images. Suitably, the plurality of clipping parameter values includes four values (allowed, available, possible) for all image portions of the image or all image portions in a sequence of images.
[0356] Statement 6. The method of any one of the preceding statements, wherein the number of the one or more filter variables that are signaled is less than the number of the one or more variables that are based on one or more adjacent sample values. Suitably, the number of the one or more filter variables that are signaled is half the number of the one or more variables that are based on one or more adjacent sample values.
[0357] Statement 7. The method of any one of the preceding statements, wherein the one or more variables based on the one or more adjacent sample values comprise a difference between the first sample value and each of the one or more adjacent sample values.
[0358] Statement 8. The method of any one of the preceding statements, wherein an output of the non-linear function is used as an input parameter to the adaptive loop filter. Suitably, an output from one or more non-linear functions (or clipping functions) is used as an input parameter of an adaptive loop filter.
[0359] Statement 9. The method of statement 8, wherein the adaptive loop filter uses one or more filter coefficients, and the filter coefficients and associated filter variables are determined using indices of adjacent sample values.
[0360] Statement 10. The method of statement 9, wherein indices of adjacent sample values are associated with positions in the scan order, said associations being derived using transposed indexing. Suitably, the derived associations correspond to one of four possible arrangements of FIG. 4b: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} as shown at 409; {9, 4, 10, 8, 1, 5, 11, 7, 3, 0, 2, 6} as shown at 401; {0, 3, 2, 1, 8, 7, 6, 5, 4, 9, 10, 11} as shown at 402; or {9, 8, 10, 4, 3, 7, 11, 5, 1, 0, 2, 6} as shown at 412.
[0361] Statement 11. The method of any one of the preceding statements, wherein the nonlinear function has one or more clipping functions, each of the one or more clipping functions returning one of max(-b,min(b,d)), min(b,max(-b,d)), max(cb,min(c+b,n)), min(c+b,max(cb,n)), max(-b,min(b,d1+d2)), min(b,max(-b,d1+d2)), max(2*cb,min(2*c+b,n1+n2)), min(2*c+b,max(2*cb,n1+n2)), where c is the first sample value, n or n1 or n2 is an adjacent sample value, d=nc, d1=n1-c, d2=n2-c, and b is a clipping parameter.
[0362] Statement 12. A method of processing one or more portions of an image, the image portions being associated with chroma and luma samples, the method comprising: based on information obtained from a bitstream or from a first sample value of the image portion and its adjacent sample values, determining whether to use or not use a filter controlled using the method of any of the preceding statements, enable or disable use of the filter, or determine one of the filtering parameters, filter coefficients or filter variables to use with the filter when filtering the first sample value.
[0363] Statement 13. The information obtained from the bitstream includes a flag provided for one of the luma or chroma components, the flag indicating, for that component, at least one of whether a filter controlled using the method of any one of statements 1 to 10 is to be used, or not used, or whether the use of the filter is to be enabled or disabled.
[0364] Statement 14. The information obtained from the bitstream includes a flag provided for one or more image portions indicating, for the one or more image portions, whether to use or not use a filter controlled using the method of any one of statements 1 to 10, or whether to enable or disable the use of said filter.
[0365] Statement 15. A method of encoding one or more images, comprising controlling a filter in accordance with the method of any one of statements 1 to 10, or processing one or more image portions of the images in accordance with the method of any one of statements 12 to 14.
[0366] Statement 16. Further comprising receiving an image, encoding the received image to generate a bitstream, and processing the encoded image, wherein said processing comprises controlling according to the method of any one of statements 1-10 or processing according to the method of any one of statements 12-14.
[0367] Statement 17. The method of statement 15 when cited in any one of statements 12-14, further comprising providing the information within the bitstream.
[0368] Statement 18. The method of statement 17 when citing statement 11, wherein variables of the nonlinear function further comprise one or more filter coefficients that depend on indices of one or more adjacent sample values, and providing the information comprises providing to the bitstream an index for determining one or more clipping parameters and an index for deriving an association between an index of the adjacent sample value and a position in the scan order. Suitably, the derived associations correspond to one of four possible sequences in FIG. 4-b: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} as shown in sequence 409; {9, 4, 10, 8, 1, 5, 11, 7, 3, 0, 2, 6} as shown in 401; {0, 3, 2, 1, 8, 7, 6, 5, 4, 9, 10, 11} as shown in 402; or {9, 8, 10, 4, 3, 7, 11, 5, 1, 0, 2, 6} as shown in 412.
[0369] Statement 19. The method of any one of statements 16-18, further comprising selecting a nonlinear function or one or more clipping functions from a plurality of available functions, using the selected functions when processing the encoded image, and providing information in the bitstream identifying the selected functions.
[0370] Statement 20. A method of decoding one or more images, the method comprising controlling a filter in accordance with any one of statements 1 to 11, or processing one or more image portions of the images in accordance with the method of any one of statements 12 to 14.
[0371] Statement 21. Further comprising receiving a bitstream, decoding information from the received bitstream to obtain an image, and processing the obtained image, said processing including controlling according to the method of any one of statements 1 to 11 or processing according to the method of any one of statements 12 to 14.
[0372] Statement 22. The method of statement 21 when citing any one of statements 12-14, further comprising obtaining the information from the bitstream.
[0373] Statement 23. The method of statement 21 when citing statement 11, wherein variables of the nonlinear function include one or more filter coefficients that depend on indices of the one or more adjacent sample values, and the method further includes obtaining from the bitstream an index for determining one or more clipping parameters and an index for deriving an association between indices of adjacent sample values and positions in a scan order. Suitably, the derived associations correspond to one of four possible permutations in FIG. 4-b: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} as shown at 409; {9, 4, 10, 8, 1, 5, 11, 7, 3, 0, 2, 6} as shown at 401; {0, 3, 2, 1, 8, 7, 6, 5, 4, 9, 10, 11} as shown at 402; or {9, 8, 10, 4, 3, 7, 11, 5, 1, 0, 2, 6} as shown at 412.
[0374] Statement 24. The method of any one of statements 21 to 23, further comprising obtaining from the bitstream information for identifying a non-linear function from a plurality of available functions or information identifying one or more clipping functions, and using the identified functions when processing the obtained image.
[0375] Statement 25. A device having a controller configured to perform any one of the methods of statements 1-10, or 2-14, an encoder configured to perform any one of the methods of statements 15-19, or a decoder configured to perform any one of the methods of statements 20-24.
[0376] Statement 26. A program executed on a computer or processor to cause the computer or processor to execute any one of the methods of statements 1-11, 12-14, 15-19, or 20-24.
[0377] Statement 27. A computer-readable storage medium storing the computer program of statement 26.
[0378] Statement 28. A signal, represented by a bitstream, conveying an information data set for an image encoded using the method of any one of statements 15 to 19, the image comprising a set of reconstructable samples, each reconstructable sample having a sample value, the information data set comprising control data for controlling filtering for a first reconstructable sample based on sample values of samples adjacent to the first reconstructable sample.
Claims
1. 1. A method of encoding an image in which one or more image portions are filtered using an adaptive loop filter, the method comprising the steps of: performing said filtering on a value of a first sample of an image portion of said image based on values of a plurality of neighboring samples of said first sample; The filtering is performed using a non-linear mathematical formula including at least a plurality of clipping functions corresponding to the plurality of neighboring samples; The clipping function in the plurality of clipping functions is outputting a difference value between the value of the first sample and a value of a sample adjacent to the first sample when the difference value is within a range of values defined by the clipping function; if the difference value is outside the range of values, outputting a value defined by the clipping function; each of the plurality of clipping functions used in the filtering of the value of the first sample is a function using a parameter for defining the range of the value according to the position of a neighboring sample of the corresponding first sample; associated with an index identifying a respective clipping value from a plurality of clipping values; A method comprising:
2. A clipping function in the plurality of clipping functions is is a function that outputs the same result as any 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)), Here, c is the value of the first sample, n is the value of a sample adjacent to the first sample, d=n−c, and b is a parameter for defining the range of the values.
2. The method of claim 1 . The parameters included in the plurality of clipping functions are determined using an index to identify the parameter to be used from the plurality of parameters.
3. The method according to claim 1 or 2.
4. Encoding the image to generate a bitstream; The method according to any one of claims 1 to 3, further comprising:
5. A decoding method for filtering one or more image portions of an image using an adaptive loop filter, comprising: performing said filtering on a value of a first sample of an image portion of said image based on values of a plurality of neighboring samples of said first sample; The filtering is performed using a non-linear mathematical formula including at least a plurality of clipping functions corresponding to the plurality of neighboring samples; The clipping function in the plurality of clipping functions is outputting a difference value between the value of the first sample and a value of a sample adjacent to the first sample when the difference value is within a range of values defined by the clipping function; if the difference value is outside the range of values, outputting a value defined by the clipping function; each of the plurality of clipping functions used in the filtering of the value of the first sample is a function using a parameter for defining the range of the value according to the position of a neighboring sample of the corresponding first sample; associated with an index identifying a respective clipping value from a plurality of clipping values; A method comprising:
6. A clipping function in the plurality of clipping functions is is a function that outputs the same result as any 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)), Here, c is the value of the first sample, n is the value of a sample adjacent to the first sample, d=n−c, and b is a parameter for defining the range of the values.
6. The method of claim 5 . The parameters included in the plurality of clipping functions are determined using an index to identify the parameter to be used from a plurality of parameters.
7. The method according to claim 5 or 6. Decoding data from the bitstream to obtain the image. The method according to any one of claims 5 to 7, further comprising:
9. An encoding device for filtering one or more image portions of an image using an adaptive loop filter, comprising: filtering means for performing said filtering on a value of a first sample of an image portion of said image based on values of a plurality of neighbouring samples of said first sample; The filtering is performed using a non-linear mathematical formula including at least a plurality of clipping functions corresponding to the plurality of neighboring samples; The clipping function in the plurality of clipping functions is outputting a difference value between the value of the first sample and a value of a sample adjacent to the first sample when the difference value is within a range of values defined by the clipping function; if the difference value is outside the range of values, outputting a value defined by the clipping function; Each of the clipping functions used in the filtering of the value of the first sample is a function using a parameter for defining the range of the value according to the position of a neighboring sample of the corresponding first sample. associated with an index identifying a respective clipping value from a plurality of clipping values; An apparatus comprising:
10. A decoding device for filtering one or more image portions of an image using an adaptive loop filter, comprising: filtering means for performing said filtering on a value of a first sample of an image portion of said image based on values of a plurality of neighbouring samples of said first sample; The filtering is performed using a non-linear mathematical formula including at least a plurality of clipping functions corresponding to the plurality of neighboring samples; The clipping function in the plurality of clipping functions is outputting a difference value between the value of the first sample and a value of a sample adjacent to the first sample when the difference value is within a range of values defined by the clipping function; When the difference value is outside the range of values, a value defined by the clipping function is output, and each of the clipping functions used in the filtering of the value of the first sample is a function that uses a parameter for defining the range of values according to the position of a neighboring sample of the corresponding first sample. associated with an index identifying a respective clipping value from a plurality of clipping values; An apparatus comprising:
11. A program for causing a computer to execute a method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Filter adaptation with directional features for video / image coding
EP2477403A1
Method and Apparatus of Adaptive Loop Filtering
US20110274158A1
Method and apparatus for video coding with adaptive clipping
WO2017194312A2
