Adaptive loop filtering techniques in video coding
Patent Information
- Application Number
- PCT/US2026/017165
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2026-02-24
- Filing Date
- 2026-02-27
- Publication Date
- 2026-09-03
Smart Images

Figure US2026017165_03092026_PF_FP_ABST
Abstract
Description
ADAPTIVE LOOP FILTERING TECHNIQUES IN VIDEO CODINGCROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of priority from Indian Application No. 202511017911 filed on 28 February 2025, Indian Application No. 202511091836 filed on 25 September 2025, and Indian Application No. 202611021777 filed on February 24, 2026, each of which is incorporated by reference herein in their entirety.TECHNICAL FIELD
[0002] This application relates generally to video encoding and decoding processing and, more particularly, to a method and apparatus for adaptive loop filtering (ALF).BACKGROUND
[0003] Unless otherwise indicated herein, the materials described in this section are not prior art to the claims in this application and are not admitted as prior art by inclusion in this section.
[0004] In-loop filtering is applied in video encoders and decoders to remove artifacts around block boundaries. Adaptive filter taps smooth the block boundaries and remove edge artifacts that are formed as a result of block coding. In-loop filtering may include applying a deblocking filter, which applies a boundary edge, pixel-adaptive smoothing operation across block edges. In-loop filtering may also include a sample adaptive offset filter to remove ringing artifacts and reduce mean distortion between reconstructed and original pictures.
[0005] It is with respect to these and other considerations that the disclosure made herein is presented.BRIEF SUMMARY OF THE DISCLOSURE
[0006] Techniques for coding, signaling, and decoding video signals are described herein. In some examples, these techniques may be applied to control adaptive loop filtering performed by encoding and decoding devices.
[0007] Briefly stated, systems, methods and devices for encoding and decoding video content are disclosed. Some examples provide methods for adaptive loop filtering. An example methodincludes receiving an input image and receiving a filter set index indicative of a type of filtering to be applied to the input image. The example method may also include applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image. In some examples, the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality and a second filter configured to receive a C1 classifier computed using a second gradient directionality. The example method may also include applying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image. In some examples, the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
[0008] Another example provides methods for adaptive loop filtering. An example method includes receiving an input image and applying a first filter to the input image, the first filter configured to receive a C0 classifier computed using a first gradient directionality. The example method includes receiving a filter set index indicative of a type of filtering to be applied to the input image, applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image, and applying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image. In some examples, the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index. In some examples, the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0009] Another example provides methods for adaptive loop filtering. An example method includes setting a filter index value indicating a type of filtering to be applied to an input image and generating a bitstream including the input image, the filter index value, and an ALF luma classifier index. In some examples, in response to the filter index value indicating to apply adaptive filtering, an adaptive filter is applied to the input image included in the bitstream. In some examples, in response to the filter index value not indicating to apply adaptive filtering, a static filter is applied to the input image included in the bitstream. In some examples, the adaptive filter is configured to receive a C2 classifier indicated by the ALF luma classifier index. In some examples, the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality and a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0010] Another example provides methods for adaptive loop filtering. An example method includes receiving an input sample, receiving a filter set index indicative of a type of filtering to be applied tothe input sample, and applying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample. The static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality. The static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality. In some examples, the first filter reduces a number of taps included in a sample adaptive offset operation applied to the input sample.
[0011] Another example provides methods for adaptive loop filtering. The method includes setting a filter index value indicating a type of filtering to be applied to put image and generating a bitstream including the input image, the filter index value and an ALF luma classifier index. In some examples, in response to the filter index value indicating to apply adaptive filtering, an adaptive filter is applied to the input image included in the bitstream. In some examples, in response to the filter index value not indicating to apply adaptive filtering, a static filter is applied to the input image included in the bitstream. In some examples, the adaptive filter is configured to receive a C2 classifier indicated by the ALF luma classifier index. The C2 classifier is a variance-based classifier configured to implement sample adaptive offset samples to determine a variance between blocks. The static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality. The static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0012] Another example provides methods for adaptive loop filtering. The method includes receiving an input sample, receiving a filter set index indicative of a type of filtering to be applied to the input sample, and applying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample. The static filter includes a first filter configured to receive a CO classifier, wherein the CO classifier is a gradient-activity based classifier. The static filter includes a second filter configured to receive a Cl classifier, wherein the Cl classifier is a variance-band based classifier.
[0013] Another example provides methods for adaptive loop filtering. The method includes receiving an input sample, receiving a filter set index indicative of a type of filtering to be applied to the input sample, and applying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample. The static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality. The static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality. The methodincludes applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a variance-based classifier, an adaptive filter to the input image. The method includes applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a variance-based classifier, an adaptive filter to the input image. The adaptive filter is configured to receive a C2 classifier computed based on a variance between sample adaptive offset samples.
[0014] Another example provides methods for adaptive loop filtering. The method includes receiving an input sample, receiving a filter set index indicative of a type of filtering to be applied to the input sample, and applying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample. The static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality. Inter and intra mode information is implemented to apply first scaling factors to the first filter. The static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality. The inter and intra mode information is implemented to apply second scaling factors to the second filter. The method includes applying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image. The adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
[0015] Various aspects of the present disclosure provide for processing of video signals, and effect improvements in at least the technical fields of video processing, video encoding, video decoding, adaptive loop filtering, and the like.
[0016] The embodiments described herein may be generally described as techniques, where the term “technique” may refer to system(s), device(s), method(s), computer-readable instruction(s), module(s), component(s), hardware logic, and / or operation(s) as suggested by the context as applied herein.
[0017] Features and technical benefits other than those explicitly described above will be apparent from a reading of the following Detailed Description and a review of the associate drawings. This Summary is provided to introduce a selection of techniques in a simplified form, and not intended to identify key or essential features of the claimed subject matter, which are defined by the appended claims.DESCRIPTION OF THE DRAWINGS
[0018] These and other more detailed and specific features of various embodiments are more fully disclosed in the following description, reference being had to the accompanying drawings, in which:
[0019] FIG. 1 is a block diagram illustrating an example structure of an image encoding apparatus according to some aspects.
[0020] FIG. 2 is a block diagram illustrating an example structure of an image decoding apparatus according to some aspects.
[0021] FIG. 3 is a block diagram illustrating an example method of in-loop filtering according to some aspects.
[0022] FIG. 4 is a block diagram illustrating an example method of luma ALF according to some aspects.
[0023] FIG. 5 is a block diagram illustrating a method for calculating the luma ALF classifiers CO, Cl, and C2, according to some aspects.
[0024] FIG. 6 is a diagram of example luma ALF filtering stages according to some aspects.
[0025] FIG. 7 illustrates an example of the filter taps that may be applied by a third filtering stage of FIG. 6 according to some aspects.
[0026] FIG. 8 illustrates two example diamond filter shapes implemented for VVC ALF according to some aspects.
[0027] FIG. 9 is a diagram illustrating example luma ALF filtering stages with dependency on residual samples and the Gaussian fixed filter removed according to some aspects.
[0028] FIG. 10 is a diagram illustrating further example luma ALF filtering stages according to some aspects.
[0029] FIG. 11 is a diagram illustrating further example luma ALF filtering stages according to some aspects.
[0030] FIG. 12 is a diagram illustrating further example luma ALF filtering stages according to some aspects.
[0031] FIG. 13 is a diagram illustrating further example luma ALF filtering stages according to some aspects.
[0032] FIG. 14 is a block diagram illustrating a sample encoder algorithm for selecting fixed filters (Fx, Fy) and adaptive filter (Fz) and the respective classifiers Cx, Cy, Cz
[0033] FIG. 15 is a diagram illustrating further example luma ALF filtering stages according to some aspects.
[0034] FIG. 16 is a block diagram illustrating an example method for ALF filtering using either fixed filters or adaptive filters according to some aspects.
[0035] FIG. 17 is a diagram illustrating further example luma ALF filtering stages without adaptive filtering according to some aspects.
[0036] FIG. 18 is a diagram illustrating example luma ALF filtering stages without static filtering according to some aspects.
[0037] FIG. 19 is a block diagram illustrating an example method for ALF filtering using either second fixed filter Fl or adaptive filter F2 according to some aspects.
[0038] FIG. 20 is a diagram illustrating example luma ALF filtering stages with adaptive filtering according to some aspects.
[0039] FIG. 21 is a diagram illustrating example luma ALF filtering stages with C2 classification removed.
[0040] FIG. 22 is a block diagram illustrating a method for calculating the luma ALF classifiers CO, Cl, and band-based C2band, according to some aspects.
[0041] FIG. 23 is a diagram illustrating example luma ALF filtering stages with band-based C2bandclassification.
[0042] FIG. 24 illustrates an example 4x4 block level classification according to some aspects.
[0043] FIGS. 25A-25B illustrates a schematic block diagram of an example device architecture according to some aspects.
[0044] FIG. 26A illustrates a diagram of an example F0 fixed filter with RecBeforeDBF taps removed and increased SAO taps.
[0045] FIG. 26B illustrates a diagram of an example F0 fixed filter with RecBeforeDBF taps removed and increase SAO taps.
[0046] FIG. 26C illustrates a diagram of an example F0 fixed filter with RecBeforeDBF taps removed.
[0047] FIG. 27 illustrates a diagram of an example FO fixed filter with reduced taps for both SAO samples and RecBeforeDBF samples.
[0048] FIG. 28 is a diagram of an example FO fixed filter having reduced taps for both SAO samples and RecBeforeDBF samples.
[0049] FIG. 29A illustrates a diagram of an example F0 fixed filter with reduced taps for both SAO samples and RecBeforeDBF samples.
[0050] FIG. 29B illustrates a diagram of an example F0 fixed filter with reduced taps for both SAO samples and RecBeforeDBF samples.
[0051] FIG. 30A illustrates a diagram of an example Fl fixed filter with reduced taps for both output samples of F0 fixed filters and RecBeforeDBF samples.
[0052] FIG. 30B illustrates a diagram of an example Fl fixed filter with RecBeforeDBF taps removed and reduced taps for output samples of F0 fixed filters.
[0053] FIG. 31 illustrates a diagram of an example Fl fixed filter with RecBeforeDBF taps removed and reduced taps for output samples of F0 fixed filters.
[0054] FIG. 32 illustrates a diagram of an example F0 and Fl fixed filters with non-overlapping filter taps.
[0055] FIG. 33A and FIG. 33B illustrate diagrams and of example F0 and Fl fixed filters with nonoverlapping checkered board pattern filter shapes.
[0056] FIG. 34 illustrates a diagram of an example F0 fixed filter in which the classification window size is configured to correspond exactly with the fixed filter shape.
[0057] FIG. 35A illustrates a diagram of an example variance-based C2 classifier.
[0058] FIG. 35B illustrates a diagram of another example variance-based C2 classifier.
[0059] FIG. 36 illustrates a diagram of example CO and Cl classifiers that are based on Gradient-Activity and Variance-Band.DETAILED DESCRIPTION
[0060] In the following detailed description, numerous specific details are set forth to provide a thorough understanding of various described embodiments with reference to the accompanying drawings. The illustrative embodiments in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be utilized, and other changes made, without departing from the spirit or scope of the present disclosure. In light of the present disclosure, it will be apparent to one of ordinary skill in the art that the various described features and implementations may be practiced without many of these specific details. In some instances, well-known methods, procedures, components, and circuits, have not been described in detail so as not to unnecessarily obscure aspects of the embodiments. Several features are described hereafter that can each be used independently of one another or with any combination of other features. Thus, the features may be arranged, substituted, combined, separated, or designed into other configurations, which is contemplated in light of the present disclosure.
[0061] As used herein, the term “includes” and its variants are to be read as open-ended terms that mean “includes, but is not limited to.” The term “or” is to be read as “and / or” unless the context clearly indicates otherwise. Such terms are to be read as having an inclusive meaning. For example, “A and B” may mean at least the following: “both A and B”, “at least both A and B”. As another example, “A or B” may mean at least the following: “at least A”, “at least B”, “both A and B”, “at least both A and B”. As another example, “A and / or B” may mean at least the following: “A and B”, “A or B”. When an exclusive-or is intended, such will be specifically noted (e.g., “either A or B”, “at most one of A and B”). The term “based on” is to be read as “based at least in part on.” The term “one example implementation” and “an example implementation” are to be read as “at least one example implementation.” The term “another implementation” is to be read as “at least one other implementation.” The terms “determined,” “determines,” or “determining” are to be read as obtaining, receiving, computing, calculating, estimating, predicting, or deriving. In addition, in the following description and claims, unless defined otherwise, all technical and scientific terms usedherein have the same meaning as commonly understood by one of ordinary skills in the art to which this disclosure belongs.
[0062] FIG. 1 is a block diagram illustrating an example of a structure of an image encoding apparatus 100 (for example, a video encoding apparatus) according to some aspects described herein. The image encoding apparatus 100 of FIG. 1 includes a motion prediction module 111, a motion compensation module 112, an intra-prediction module 120, a switch 115. a subtractor 125, a transform module 130, a quantization module 140, an entropy coding module 150, a dequantization (inverse quantization) module 160, an inverse transform module 170, an adder 175, a filter module 180, and a reference image buffer 190.
[0063] The image coding apparatus 100 can perform coding on an input image (or, in some examples, input video, input video frames, input samples, or the like) in intra-mode or inter-mode and output a bit stream. Intra-prediction means intra-frame prediction, and inter-prediction means inter- frame prediction. In the case of intra-mode, the switch 115 can be switched to intra-mode. In the case of inter-mode, the switch 115 can be switched to inter-mode. After generating a prediction block for the input block of the input image, the image coding apparatus 100 can code a difference between the input block and a prediction block. Here, the input image can mean the original image.
[0064] In the case of intra-mode, the intra-prediction module 120 can generate a prediction block by performing spatial prediction based on the pixel value of an already coded block that neighbors a current block.
[0065] In the case of inter-mode, the motion prediction module 111 can search a reference image, stored in the reference image buffer 190. for a region that is best well matched with the input block in a motion prediction process and obtain a motion vector based on the retrieved region. The motion compensation module 112 can generate the prediction block by performing motion compensation using the motion vector. Here, the motion vector is a two-dimensional vector used in interprediction, and the motion vector can indicate an offset between the current block and a block within the reference image.
[0066] The subtractor 125 can generate a residual block based on a difference between the input block and the generated prediction block. The transform module 130 can output a transform coefficient by performing transform on the residual block. Next, the quantization module 140 can output a quantized coefficient by quantizing the received transform coefficient using at least one of aquantization parameter and a quantization matrix. Here, the quantization matrix can be inputted to a coder, and it can be determined that the inputted quantization matrix is used in the coder.
[0067] The entropy coding module 150 can output a bit stream by performing entropy coding based on values calculated by the quantization module 140 or a coding parameter value, etc. calculated in the coding process. If entropy coding is applied, symbols can be represented by assigning a small number of bits to a symbol having a high occurrence probability and a large number of bits to a symbol having a low occurrence probability in order to reduce the size of a bit stream for coding symbols to be coded. Accordingly, the compression performance of image coding can be increased by entropy coding. The entropy coding module 150 can use coding methods, such as exponential Golomb coding, Context- Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CAB AC), for the entropy coding.
[0068] The image coding apparatus 100 may perform inter-prediction coding, that is, inter- frame prediction coding, and thus a currently coded image needs to be decoded and stored in order to be used as a reference image. Accordingly, a quantized coefficient is subjected to dequantization by the dequantization module 160 and subjected to inverse transform by the inverse transform module 170. The inverse-quantized and inverse-transformed coefficient becomes a reconstructed residual block, and the reconstructed residual block is added to the prediction block through the adder 175, thereby generating a reconstructed block.
[0069] The reconstructed block experiences the filter module 180. The filter module 180 can apply one or more of a deblocking filter (DBF), a Sample Adaptive Offset (SAO), and an Adaptive Loop Filter (ALF) to the reconstructed block or a reconstructed picture. The filter module 180 may also be referred to as an in-loop filter. The deblocking filter can remove the distortion of a block that has occurred at the boundary of blocks. The SAO can add a proper offset value to a pixel value in order to compensate for a coding error. The ALF can perform filtering based on a value obtained by comparing the reconstructed image with the original image. The reconstructed block that has experienced the filter module 180 can be stored in the reference image buffer 190.
[0070] FIG. 2 is a block diagram illustrating an example of a structure of an image decoding apparatus 200 (for example, a video decoding apparatus) according to some aspects described herein. The image decoding apparatus 200 of FIG. 2 includes an entropy decoding module 210, a dequantization (inverse quantization) module 220, an inverse transform module 230, an intra-prediction module 240, a motion compensation module 250, an adder 255, a filter module 260, and a reference image buffer 270.
[0071] The image decoding apparatus 200 can receive a bit stream outputted from a coder (such as the image encoding apparatus 100), perform decoding on the bitstream in intra-mode or inter-mode, and output a reconstructed image. In the case of intra-mode, a switch can be switched to intra-mode. In the case of inter-mode, the switch can be switched to inter-mode. The image decoding apparatus 200 can obtain a reconstructed residual block from a received bit stream, generate a prediction block, and generate a reconstructed block by adding the reconstructed residual block to a prediction block.
[0072] The entropy decoding module 210 can generate symbols including a symbol having a quantized coefficient form by performing entropy decoding on an input bit stream according to a probability distribution. An entropy decoding method is similar to the above-described entropy coding method.
[0073] If the entropy decoding method is applied, symbols can be represented by assigning a small number of bits to a symbol having a high occurrence probability in order to reduce the size of a bit stream for each symbol.
[0074] A quantized coefficient can be subject to dequantization by the dequantization module 220 based on a quantization parameter and can be subject to inverse transform by the inverse transform module 230. As a result of the dequantization / inverse transform of the quantized coefficient, a reconstructed residual block can be generated.
[0075] A quantization matrix used in dequantization is also called a scaling list. The dequantization module 220 can generate an inverse-quantized coefficient by applying a quantization matrix to a quantized coefficient.
[0076] The dequantization module 220 may perform dequantization in response to dequantization applied by a coder. For example, the dequantization module 220 can perform dequantization by applying a quantization matrix, applied by a coder, to a quantized coefficient inversely.
[0077] In the case of intra-mode, the intra-prediction module 240 can generate a prediction block by performing spatial prediction using the pixel value of an already decoded block that neighbors a current block. In the case of inter-mode, the motion compensation module 250 can generate aprediction block by performing motion compensation by using a motion vector and a reference image stored in the reference image buffer 270.
[0078] A reconstructed residual block and a prediction block are added together by the adder 255, and the added block can experience the filter module 260. The filter module 260 can apply one or more of a deblocking filter, an SAO, and an ALF to a reconstructed block or a reconstructed picture. The filter module 260 can output a reconstructed image, that is, a restored image. The reconstructed image can be stored in the reference image buffer 270 and used in inter- prediction.
[0079] In some examples, ALF also uses luma residue samples and the reconstruction luma samples before deblocking. FIG. 3 is a block diagram illustrating an example method 300 of in-loop filtering. The method 300 may be implemented at the filter module 180 of the image encoding apparatus 100 or the filter module 260 of the image decoding apparatus 200.
[0080] At block 302, input samples are received. For example, the filter module 180 receives the reconstructed block or the reconstructed picture from the adder 175. Alternatively, the filter module 260 receives the reconstructed block or the reconstructed picture from the adder 255.
[0081] At block 304, deblocking filtering is performed on the input sample. The output of the deblocking filtering is provided for both SAO and for bilateral filtering (BIF). At block 306, SAO is performed on the output of the deblocking filtering. At block 308, BIF is performed on the output of the deblocking filtering. At block 310, ALF is performed using the outputs from the SAO and the BIF operations. At block 312, output samples are provided.
[0082] The in-loop filtering may be based on a Coding Tree Unit (CTU) index. Table 1 provides an example of a CTU index (particularly, a CTU ALF filterset index) that indicates how ALF should be applied to input samples. For example, ALF includes two fixed (e.g., static) filters F0 and Fl and a dynamic filter F2.FilteralfCtuFilterIndex DescriptionApplied0 F0 Only FO fixed filter is applied1 F0 + F1 F0 + F1 sequential fixed filter is applied23 F0 + F1 +F0 + F1 sequential fixed filter + F2 dynamic filter is applied.4 F256Table 1: ALF CTU Filterset Index values
[0083] When the CTU ALF filterset index is 0, only a first fixed filter FO is applied. When the CTU ALF filterset index is 1, both FO and Fl fixed filters are applied sequentially. F2 is applied in combination with FO and Fl when the CTU ALF filterset index is 2 or higher. The CTU ALF filterset index may be set to 2 or greater to determine that an adaptation parameter set (APS) is required for F2 filtering. The filter coefficients and clipping values of the fixed filters FO and Fl may be trained and normatively stored by the image encoding apparatus 100 and the image decoding apparatus 200 as static look-up tables or Read Only Memory (ROM) tables. The filter coefficients and clipping values of the dynamic filter F2 are determined by the image encoding apparatus 100 and coded in the ALF APS parameter sets, which may be transmitted to the image decoding apparatus 200 as metadata.
[0084] When ALF is enabled, three different classifier CO, Cl and C2 are computed at 2x2 block level. CO and Cl classifiers are used for the sequential fixed filters F0 and Fl respectively. The adaptive filter F2 uses the classifier C2. The classifiers CO, Cl, C2 classify the pixels as to which filter will be applied.
[0085] FIG. 4 is a block diagram illustrating an example method 400 of luma ALF. The method 400 may be implemented at the filter module 180 of the image encoding apparatus 100 or the filter module 260 of the image decoding apparatus 200. At block 402, the method 400 includes determining whether ALF CTU is enabled. When ALF CTU is not enabled, the method 400 proceeds to block 404 and does not apply ALF to samples. When ALF CTU is enabled, the method 400 proceeds to block 406.
[0086] At block 406, the method 400 includes computing gradient and variance. For example, direction and activity of local gradients of SAO samples may be computed using window sizes of 4x4 and 12x12 containing the current 2x2 block. A variance of SAO samples may be computed using a window size of 10x10 containing the current 2x2 block.
[0087] At block 408, the method 400 includes computing the CO, Cl, and C2 classifiers. For example, the CO classifier may be computed using 4x4 gradient directionality, activity, and 10x10 variance around each 2x2 block. The Cl classifier may be computed using 12x12 gradient directionality, activity, and 10x10 variance around each 2x2 block. The C2 classifier is calculated and applied based on the ALF luma classifier index (for example, the ALF CTU Filterset Index values) coded in the ALF APS parameter set. When the luma classifier index is 1, then the C2 classifier uses band classification. When the luma classifier index is 2, then the C2 classifier uses a luma residual sample-based classifier. When the luma classifier index is 0, then the C2 classifier is based on 12x12 gradient directionality and activity-based classification of SAO samples.Calculation of the CO, Cl, and C2 classifiers is further described below with respect to FIG. 5.
[0088] At block 410, the method 400 includes applying the F0 and Fl fixed filters. At block 412, the method 400 includes applying the F2 adaptive filter.
[0089] FIG. 5 is a block diagram illustrating a method 500 for calculating the luma ALF classifiers CO, Cl, and C2. The method 500 may be implemented at the filter module 180 of the image encoding apparatus 100 or the filter module 260 of the image decoding apparatus 200.
[0090] At block 502, the method 500 includes calculating 4x4 gradient activity. At block 504, the method 500 includes calculating 12x12 gradient activity. For example, horizontal, vertical, and two diagonal gradients are calculated for each SAO sample using the following 1-D Laplacian equations:g_v = Σ^(i+w / 2)_(k=i-w / 2+1) Σ^(j+w / 2)_(l=j-w / 2+1)V_{k,l}, V_{k,l} = |2R(k, l) − R(k, l − 1) − R(k, l + 1)| Equation (1)g_h = Σ H_{k,l}, H_{k,l} = |2R(k, l) − R(k − 1, l) − R(k + 1, l)| Equation (2) 2 I —J / - 2 g_d1 = Σ D1_{k,l}, D1_{k,l} = |2R(k, l) − R(k − 1, l − 1) − R(k + 1, l + 1)| Equation (3)9d2 =D2^ ’D2^ =|2R^' W ~ M + 1) “ + 1, Z - 1)1 Equation (4)where g_v is the vertical gradient, g_h is the horizontal gradient, g_d1 and g_d2 are diagonal gradients, w is the ALF gradient window size, and indices i,j refer to the coordinates of the upper left sample within the window and R(i,j) indicates a reconstructed sample at coordinateAt block 502, the window size w is a 4x4 window size for CO. At block 504, the window size w is a 12x12 window size for Cl and C2.
[0091] At block 506, the method 500 may include calculating a variance for each sample. For example, CO and Cl may use an extended variance-based classifier. For each 2x2 block, a scaling factor is determined based on the value derived from the variance-based classifier. The square root of variance may be further quantized to C’ by a scaling factor. The value of C’ may be an integer between 0 and 7, inclusively. The quantized C’ may be derived using the variance of SAO samples x(i,j) in a 10x10 window (N=10):Var(x) = N² Σ^(N-1)_(j=0) Σ^(N-1)_(i=0) x(i,j)² − (Σ^(N-1)_(j=0) Σ^(N-1)_(i=0) x(i,j))² Equation (5)C' = Sqrt(min (49, (13 * Var(x) >> (14 + divshift(A_i))))) Equation (6)
[0092] At block 508, the classifier CO is calculated. At block 510, the classifier Cl is calculated. For example, based on directionality Di, activity Atand Variance Var, a class CO and Cl is assigned to each 2x2 block.
[0093] Activity A_i is computed as following for C0, C1, and C2, then A_i is further mapped to Â_i. For classifier C0, A_0 is the sum of vertical and horizontal gradients in a 4x4 window that covers the target 2x2. For classifier C1 and classifier C2, A_1 and A_2 are the sum of vertical and horizontal gradients in a 12x12 window that covers the target 2x2. To obtain Â_i, A_i is mapped to the range of 0 to n, where n is equal to 4 for Â_2 and 15 for Â_0 and Â_1.
[0094] Directionality Di may be derived by comparing the ratio of sum of the horizontal, vertical, and diagonal gradients (ghl, gvl, gdlland gdl2) with a set of thresholds which supports more edge strength:r^i_{h,v} = max(g^i_h, g^i_v) / min(g^i_h, g^i_v)Equation (7)rfl’vmintg^, g^max(g^i_d1, g^i_d2)r^i_{d1,d2} Equation (8)min(gdll, gdl2)
[0095] In some examples, directionality D may be derived using thresholds Th = [2, 4.5], For Doand Di, horizontal / vertical edge strength EHlVand diagonal edge strength EDlmay be calculated first. Thresholds Th = [1.25, 1.5, 2, 3, 4.5, 8] are used. Edge strength EHlVis 0 if r^v< 77i[0]; otherwise, EHLVis the maximum integer such that r^v> Th[EHlV— 1], Edge strength EDlis 0 if rdl d2< Th [0]; otherwise. EDlis the maximum integer such that rdl d2> Th[EDl— 1], When r^v> rdl d2, i.e..horizontal / vertical edges are dominant, the Dtis derived by using Error! Reference source not found.(a); otherwise, diagonal edges are dominant, the DLis derived by using Error! Reference source not found, (b).0 1 2 3 4 5 6 0 1 2 3 4 5 6Eh \0 0 0 28 0 0 0 0 0 0 1 1 2 1 29 30 0 0 0 0 0 2 3 4 5 2 31 32 33 0 0 0 0 3 6 7 8 9 3 34 35 36 37 0 0 0 4 10 11 12 13 14 4 38 39 40 41 42 0 0 5 15 16 17 18 19 20 5 43 44 45 46 47 48 06 21 22 23 24 25 26 276 49 50 51 52 53 54 55Table 2(a) Table 2(b)
[0096] The class index C'_i for C0 and C1 is derived as C'_i = C' * 896 + C_i. The class index includes 8 variance-based classes, 56 gradient directionality-based classes, and 16 activity (sum of horizontal and vertical) gradient-based classes. Accordingly, the total possible combinations of fixed filter sets for CO and Cl are 56*16*8=7,168. However, the total number of fixed filter sets may be restricted to 512 filter sets to contain storage costs. The final fixed filter set index (from 0 to 511) for F0 and F1 is derived from class index C_i using a lookup table (LUT). The memory required to store this mapping LUT is 112KB (7168 class * 8 QP * 2 bytes).Ct= Var * MAD i+ At* MD i+ DtEquation (9A)C ' i = fixed_filter_mapping(C) Equation (9B)where M_{D,i} represents the total number of directionalities D_i, where i=0,1; M_{D,0} = M_{D,1} = 56 and MAD>irepresents the total number of activity and directionality: MAD 0= MAD 1= 896, and where C ' i are the mapped fixed filter lookup tables.C2= A2* MD>2-I- D2Equation (9C)where MD,2 represents the total number of directionalities D2, MD,2 = 5
[0097] The C2 classifier may be any of three ALF luma classifiers based on the ALF luma classifier index coded in the ALF APS parameter set. At block 512, the method 500 includes determining whether the ALF luma classifier index is equal to 2. When the ALF luma classifier index is equal to 2, the method 500 proceeds to block 514. At block 514, the method 500 includes setting the C2classifier using residual classifier based on a sum of luma residual samples in a 8x8 luma residual block. The C2 Residual classifier index may be derived as shown in Equation (10):C_2 = clip3(0, 24, sum >> (sample_bit_depth − 4)) Equation (10)
[0098] When the ALF luma classifier index is not equal to 2, the method 500 proceeds to block 516. At block 516, the method 500 includes determining whether the ALF luma classifier index is equal to 1. When the ALF luma classifier index is equal to 1, the method 500 proceeds to block 518. At block 518, the method 500 includes setting the C2 classifier using a band classifier based on a sum of luma samples in a 2x2 luma block. The C2 band classifier index based on sum samples in 2x2 luma block may be derived as shown in Equation (11):C_2 = (sum * 25) >> (sample_bit_depth + 2) Equation (11)
[0099] When the ALF luma classifier index is not equal to 1, the method 500 proceeds to block 520. When the ALF luma classifier index is equal to 0 (e.g., not equal to 2 or 1), at block 520, the method 500 includes setting the C2 classifier based on activity and gradient directionality. For example, the C2 classifier is calculated as shown in Equation (12):C2= A2* MD 2+ D2Equation (12)
[0100] The encoder determines which C2 classifiers is to be applied for any given CTU to maximize coding efficiency. The available C2 classifiers include activity and gradient based, bandbased, and residual-based classifiers. In some cases, the encoder may further determine that none of the available C2 classifiers are to be applied. The encoder’ s selection is signaled in a bitstream using the indicators, alfCtbFilterIndex and ctbAlfAlternative, which specifies the selected classification mode. These indicators identify which one of the C2 classifiers is applied, or whether classification is disabled in accordance with a predefined indexing show in Table 3.alfCtbFilterIndex ctbAlfAlternative Classifier Applied DescriptionF2 dynamic filter is not applied so 0, 1 - - C2 classifier is required Gradient-Activity based classifier is 0 Grad-Act used for F2 adaptive filtering.Band based classifier is used for F2 2 - 9 1 Band adaptive filtering.2 Residual based classifier is used forResidualF2 adaptive filtering.Table 3: ALF Luma Classifier Index for C2 classification.
[0101] FIG. 6 is a diagram 600 of example luma ALF filtering stages. The diagram 600 includes a first filtering stage 602 corresponding to first fixed filter F0, a second filtering stage 604 corresponding to second fixed filter Fl, and a third filtering stage 606 corresponding to adaptive filter F2. The reconstructed luma samples before pre-deblock filtering (also referred to as RecBeforeDBF or preDBF samples), the SAO samples, and the residual samples are used as inputs to the ALF filtering. Particularly, in the example of FIG. 6, the RecBeforeDBF samples, the SAO samples, and the residual samples are provided as inputs to the first filtering stage 602. The output of the first filtering stage 602 and the RecBeforeDBF samples are provided as inputs to the second filtering stage 604. The third filtering stage 606 receives the output of the first filtering stage 602, the output of the second filtering stage 604, residual filter taps, SAO spatial taps, residual taps, RecBeforeDBF taps, and Gaussian taps as inputs. The F2 filter coefficient taps are adaptively derived by the image encoding apparatus 100 based on the content and signaled in the ALF APS parameter set.
[0102] The first filtering stage 602 includes fixed filters F0 and F0’, where F0’ may use different coefficients than F0. F0 is applied to SAO samples and, separately, residual samples. F0’ is applied to RecBeforeDBF samples. The first fixed filters F0, F0’ of the first filtering stage 602 are applied in the shape of a 9x9 diamond. The output of the first filtering stage 602 is the combination of the output of the first fixed filters F0 applied to the SAO samples and F0’. The F0 filtered sample R'(x,y) is derived as:R’(x,y) = / ?(x,y) + [X^o,o + f’i,i)] + [S?=zoci(h’i,o + h'i.i)] Equation (13)where R(x,y) is the current sample at location (x,y) (the SAO filtered sample at current location) and fij is the clipped difference between a neighboring SAO sample and current sample R(x, y), where j equalling 0 or 1 is used to represent the spatial symmetric samples with respect to the current sample. h j is the clipped difference between a neighboring ReconBeforeDBF sample and current sample R(x,y), where j equalling 0 or 1 is used to represent the spatial symmetric samples with respect to the current sample. The clipped differences f't and h'Lj are derived according to:f'_i,j = clip3(−clipval(k_i), +clipval(k_i), R(x, y) − R(x_i,j, y_i,j)) Equation (14)where R(,y) is the current sample at location (x,y) and ktis the clipping index. +clipval(ki~) is the maximum and — clipval ki') is the minimum value used to clip the difference between neighboring SAO samples and current sample R(x,y), where i ranges from 0 to 19 is used torepresent the SAO sample position with respect to the current sample. While j is 0 or 1 is used to represent the spatial symmetric samples with respect to the current sample. R(x_i,j, y_i,j) is the SAO sample at location (x_i,j, y_i,j):h'_i,j = clip3(−clipval(k_i), +clipval(k_i), R(x,y) − D(x_i,j, y_i,j)) Equation (15)where R(x,y) is the current sample at location (x, y) and k_i is the clipping index. +clipval(k_i) is the maximum and −clipval(k_i) is the minimum value used to clip the difference between neighboring ReconBeforeDBF samples and current sample R(x,y), where i ranges from 20 to 40 is used to represent the ReconBeforeDBF sample position with respect to the current sample. While j is 0 or 1 and is used to represent the spatial symmetric samples with respect to the current sample.is the ReconBeforeDBF sample at locationy;,;)
[0103] The second filtering stage 604 includes second fixed filters Fl and Fl’, where Fl’ may use different coefficients than Fl. F1 is a 13x13 filter that is applied sequentially to the output of the first filtering stage 602. Fl’ is a 9x9 filter that is applied to RecBeforeDBF samples. The output of the second filtering stage 604 is the combination of the output of the second fixed filters Fl and Fl’. The F1 filtered sample R"(x,y) is derived as:R"(x,y) = R'(x,y) + [Σ^42_i=0 c_i(f"_i,0 + f"_i,1)] + [Σ^64_i=43 c_i(h"_i,0 + h"_i,1)] Equation (16) where R'(x, y) is the current sample at location (x, y) (the F0 filtered sample at current location) and f"_i,j is the clipped difference between a neighboring F0 filtered sample and current sample R'(x, y), where j equalling 0 or 1 is used to represent the spatial symmetric samples with respect to the current sample. h'_i,j is the clipped difference between a neighboring ReconBeforeDBF sample and current sample R'(x, y). where j equalling 0 or 1 is used to represent the spatial symmetric samples with respect to the current sample. The clipped differences f" tj and h'^j are derived as follows:fij — clip3 — clipval(k '), +clipval(ki, R’(x,y) — R' xi,yi')') Equation (17)where / ?'(x, y) is the current sample at location (x, y) and ktis the clipping index. +clipval(ki) is the maximum and — clipval(ki) is the minimum value used to clip the difference between neighboring F0 filtered samples and current sample R’(x,y, where i ranges from 0 to 42 is used to represent the F0 filtered sample position with respect to the current sample. While j is 0 or 1 and isused to represent the spatial symmetric samples with respect to the current sample. R'(x_i,j, y_i,j) is the F0 filtered sample at location (x_i,j, y_i,j):h"_i,j = clip3(−clipval(k_i), +clipval(k_i), R'(x,y) − D(x_i, y_i)) Equation (18)where R'(x, y) is the current sample at location (x, y) and k_i is the clipping index. +clipval(k_i) is the maximum and −clipval(k_i) is the minimum value used to clip the difference between neighboring ReconBeforeDBF sample and current sample R'(x,y), where i ranges from 43 to 63 is used to represent the ReconBeforeDBF sample position with respect to the current sample. While j is 0 or 1 and is used to represent the spatial symmetric samples with respect to the current sample. D(x_i,j, y_i,j) is the ReconBeforeDBF sample at location (x_i,j, y_i,j).
[0104] The third filtering stage 606 receives the output of the first filtering stage 602, the output of the second filtering stage 604, residual filter taps, SAO spatial taps, residual taps, RecBeforeDBF taps, and Gaussian taps as inputs. The Gaussian taps may be the result of a 7x7 Gaussian fixed filter applied to the RecBeforeDBF samples. FIG. 7 illustrates an example of the filter taps that may be applied by the third filtering stage 606. The filter taps may be determined by the image encoding apparatus 100 and signaled in the bitstream to the image decoding apparatus 200 as part of ALF APS filter sets. FIG. 7 includes SAO spatial taps 700 (taps #0-9), which are 9x9 filter taps applied on SAO samples. FIG. 7 includes a single tap 702 (tap #30) for the output of the output of the first filtering stage 602. FIG. 7 includes 13x13 filter taps 704 (taps #10-27) for the output of the second filtering stage 604. FIG. 7 also includes RecBefore DBF taps 706 (taps #28-29 and #33), which are 3x3 diamond taps for RecBeforeDeblock samples. FIG. 7 includes residual based taps 708 (taps #34 and #32). FIG. 7 also includes an ALF fixed tap 710 (tap #35) for the Gaussian fixed filter applied to RecBeforeDBF.
[0105] An F2 filtered sample R(x,y) is derived as:fl(x,y) = 7?(x,y) + [S’=oci(fi,o + fi.i)] + [S^ioQ^ / .o + 0 / ,i)] + [Sf=28ci(#i,o + + Ef=3oQ0i] +EFI33cihi] +cird + Ef=32 cp-Filterdi] + [SfJ35erf ixedGausSj] Equation (19) where / ?(x, y) is the current sample at location (x, y) (the SAO filtered sample at current location) and ft j is the clipped difference between a neighboring SAO sample and current sample R(x, y), where j equalling 0 or 1 is used to represent the spatial symmetric samples around the current sample. For example, if X denotes the current SAO output sample R(x, y) in FIG. 7, Co, Ci, C2 andC4 are the vertically symmetric spatial tap coefficients around X, C3 and C5 are the diagonally symmetric spatial tap coefficients around X, and C6-C9 are the horizontally symmetric spatial tap coefficients around X as shown in FIG. 7. The j is used the same way for all the other filter taps, e.g., gi,jhi,jin FIG. 7. gi,jand giare the clipped difference between output samples of the second filtering stage 604 and current sample R(x, y). hi,jnd hiare the clipped difference between a RecBeforeDBF sample and current sample R(x,y). riis the clipped neighboring residual sample value and the rFilterediis the clipped residual sample from output of applying first fixed filter F0 to residual samples. fixedGaussiis the clipped difference between output of the Gaussian fixed filter applied to the RecBeforeDBF samples and current sample R(x, y). ciare the dynamic F2 filter taps signaled in the ALF APS parameter sets.
[0106] In VVC, a block-based filter adaption may be applied for ALF. For the luma component, one among twenty-five filters is selected for each 4x4 block based on the direction and activity of local gradients. FIG. 8 illustrates two example diamond filter shapes implemented for VVC ALF, including a chroma filter 800 and a luma filter 802. The chroma filter 800 is a 5x5 diamond shape applied for chroma components. The luma filter 802 is a 7x7 diamond shape applied for luma components.
[0107] In some examples, ALF is increasingly more complex. For example, filter coefficients can change at every 2x2 level for the fixed filters F0, Fl and for the adaptive filter F2. The classifiers CO, Cl, and C2 are utilized for the filters F0, Fl, and F2, respectively. The 2x subsampling of gradients is not utilized, increasing the overall gradient computation by 4x compared to VVC. Filter classification for each 2x2 class increases storage and window-based block computation by a factor of 12 times (using classifiers CO, Cl, and C2 coupled with the 4x increase due to 2x2 block level classification). Computation of variance at the 2x2 level additionally increases CO and Cl classification complexity.
[0108] Use of multiple fixed filters (13x13, 9x9, and 7x7) has increased high computation complexity. Some implementations include multiple processing stages which increase latency (e.g., the sequential F0 and Fl fixed filters followed by a the F2 adaptive filter). Dependency on the RecBeforeDBF samples and residual samples has also increased memory usage. Overall multiplications and clipping complexity of ALF in some examples is provided in Table 4.MultiplicationsNo of per sample (* C Additions / Subtraction Absolute lips perFixed Filter Shape instructions filters MACs per sample s per sampleper sample sample)7x7 (Gaussian) 1 12* 249x9 (SAO F0 + Res F0) 2 20* 409x9 (RecBeforeDBF F0’2 21* 41+ RecBeforeDBF Fl’)13x13 (Final Fl) 1 43* 85Gradient & Activity 0.25 17.5 4 Variance 1.5 8Band Classifier 0.25 0.75Residual Classifier 2 1 ALF signaled filter taps (Figure 5) 36* 66Overall Complexity 175 337 28.25 5Table 4: ALF filter compute complexity
[0109] Further examples described herein provide for ALF filters which reduce complexity and increase efficiency of hardware and software implementations. Examples described herein meet coding loss expectations while also achieving greater simplicity. Examples described herein utilize various fixed and adaptive filters, including but not limited to fixed filter F0, fixed filter Fl, and adaptive filter F2. Such filters are assumed to utilize respective classifiers as previously described. For example, the fixed filter F0 utilizes classifier CO, fixed filter Fl utilizes classifier Cl, and adaptive filter F2 utilizes classifier C2.
[0110] FIG. 9 is a diagram 900 of example luma ALF filtering stages with dependency on residual samples and the Gaussian fixed filter removed. The example ALF filtering stages of FIG. 9 reduces ALF processing complexity as residual samples are not utilized.
[0111] The example of FIG. 9 includes a first filtering stage 902 corresponding to first fixed filter F0, a second filtering stage 904 corresponding to second fixed filter Fl, and a third filtering stage 906 corresponding to adaptive filter F2.
[0112] The first filtering stage 902 includes fixed filters FO and FO’, where FO’ may use different coefficients than FO. FO is applied to SAO samples. FO’ is applied to RecBeforeDBF samples. The output of the first filtering stage 902 is the combination of the output of the first fixed filters FO applied to the SAO samples and FO’ applied to RecBeforeDBF samples.
[0113] The second filtering stage 904 includes second fixed filters Fl and Fl’, where Fl’ may use different coefficients than Fl. Fl is applied sequentially to the output of the first filteringstage 902. Fl’ is applied to RecBeforeDBF samples. The output of the second filtering stage 904 is the combination of the output of the second fixed filters Fl and Fl’.
[0114] The third filtering stage 906 receives the output of the first filtering stage 902, the output of the second filtering stage 904, SAO spatial taps, and RecBeforeDBF taps as inputs. An output of the F2 is, accordingly, not based on residual samples and not based on a Gaussian fixed filter (compared to the example ALF of FIG. 6).
[0115] FIG. 10 is a diagram 1000 of further example luma ALF filtering stages. In the example of FIG. 10, the fixed filters F0, Fl do not use samples of RecBeforeDBF. The example ALF filtering stages of FIG. 10 reduces ALF processing complexity as RecBeforeDBF samples are not utilized by filtering stages.
[0116] The example of FIG. 10 includes a first filtering stage 1002 corresponding to first fixed filter F0, a second filtering stage 1004 corresponding to second fixed filter Fl, and a third filtering stage 1006 corresponding to adaptive filter F2.
[0117] The first filtering stage 1002 includes first fixed filter F0, which is applied to SAO samples. The output of the first filtering stage 1002 is provided to the second filtering stage 1004. The second filtering stage 1004 includes second fixed filter Fl, which is applied sequentially to the output of the first filtering stage 1002. The third filtering stage 1006 receives the output of the first filtering stage 1002, the output of the second filtering stage 1004, and the SAO spatial taps. An output of F2 is, accordingly, not based on residual samples, not based on a Gaussian fixed filter, and is not based on RecBeforeDBF samples directly (compared to the example ALF of FIG. 6).
[0118] FIG. 11 is a diagram 1100 of further example luma ALF filtering stages. In the example of FIG. 11, the fixed filters F0, Fl are performed in parallel and are not performed sequentially. The example ALF filtering stages of FIG. 11 removes the Fl fixed filter’s sequential dependency on F0, improving pipeline latency. The fixed filters F0, Fl only use SAO samples, further reducing complexity of the ALF.
[0119] The example of FIG. 11 includes a first filtering stage 1102 corresponding to first fixed filter F0, a second filtering stage 1104 corresponding to second fixed filter Fl, and a third filtering stage 1106 corresponding to adaptive filter F2.
[0120] The first filtering stage 1102 includes first fixed filter F0, which is applied to SAO samples. The output of the first filtering stage 1102 is provided to the third filtering stage 1106. The second filtering stage 1104 includes second fixed filter Fl, which is applied to SAO samples. The output of the second filtering stage 1104 is also provided to the third filtering stage 1106. The third filtering stage 1106 receives the output of the first filtering stage 1102, the output of the second filtering stage 1104, and the SAO spatial taps. Accordingly, the second filtering stage 1104 is not based on the output of the first filtering stage 1102 and is instead performed in parallel with the first filtering stage 1102.
[0121] FIG. 12 is a diagram 1200 of further example luma ALF filtering stages. In the example of FIG. 12, the fixed filters F0, Fl are applied to the RecBeforeDBF samples.Additionally, in the example of FIG. 12, the classifiers CO, Cl, and C2 are calculated using the RecBeforeDBF samples. The classification and processing of the fixed filters F0, Fl may be performed in parallel with the DBF and SAO to improve the hardware pipeline and allow fixed filter processing at the CTU level to be performed prior to DBF and SAO processing.
[0122] The example of FIG. 12 includes a first filtering stage 1202 corresponding to first fixed filter F0, a second filtering stage 1204 corresponding to second fixed filter Fl, and a third filtering stage 1206 corresponding to adaptive filter F2.
[0123] The first filtering stage 1202 includes first fixed filter F0, which is applied to RecBeforeDBF samples. The output of the first filtering stage 1202 is provided to the second filtering stage 1204. The second filtering stage 1204 includes the second fixed filter Fl, which is applied to the output of the first filtering stage 1202. The third filtering stage 1206 receives the output of the first filtering stage 1202, the output of the second filtering stage 1204, the SAO spatial taps, and the RecBeforeDBF taps. Accordingly, the SAO is only utilized by the third filtering stage 1206.
[0124] FIG. 13 is a diagram 1300 of further example luma ALF filtering stages. In the example of FIG. 13, the fixed filter sets are reduced, such as from 1024 sets to 72 sets with a reduction in number of classes in classification. The classifiers may be based on individual properties rather than a combination of properties. In some instances, the classifiers used for fixed filtering use a 4x4 window size, and the classifiers used for adaptive filtering use a 12x12 window size.
[0125] In the example of FIG. 13, the filters Fxand Fyare constrained to be fixed filters while Fzis constrained to be an adaptive filter. However, the choice of classifiers Cx, Cy, and Czfor Fx, Fy, and Fzrespectively may be adaptively chosen by the encoding apparatus 100 and respective classifier type signaled in the ALF APS parameter set. The fixed filters and the adaptive filter may be 7x7 diamond filters. In the example of FIG. 13, the filters Fx, FY are fixed filters and the filter Fz is an adaptive filter. The classifiers Cx, Cy, Czassociated with the filters Fx, FY, FZ may be based on gradient, activity (e.g., variance) and band with 56, 16, and 25 classes respectively. This reduces the total storage requirements for ALF fixed filters to 9312 parameters (12 coefficients in 7x7 filter * (56+16+25) classes *8 qps).
[0126] FIG. 14 is a block diagram illustrating a sample encoder algorithm 1400 for selecting fixed filters (Fx, Fy) and adaptive filter (Fz) and the respective classifiers Cx, Cy, Cz. The two best fixed filters (Fx and Fy) are chosen based on the two lowest Rate-Distortion (RD) costs for each classifier type followed by estimating the coeffs for the adaptive filter (Fz) for each classifier type. If the RD cost of the adaptive filter is less than the RD cost of the best fixed filter (at block 1402), the encoder algorithm selects Fx, Fy, Fzalong with respective classifiers Cx, Cy, Czto be coded in ALF APS (at block 1404). On the other hand, if the RD cost of the best fixed filter Fx is the least, the encoder decides to only code Fx(Cx) in the ALF APS (at block 1406).
[0127] Returning to FIG. 13, the example of FIG. 13 includes a first filtering stage 1302 corresponding to first fixed filter Fx, a second filtering stage 1304 corresponding to second fixed filter FY, and a third filtering stage 1306 corresponding to adaptive filter Fz.
[0128] The first filtering stage 1302 includes first fixed filter Fx, which is applied to SAO samples. The output of the first filtering stage 1302 is provided to the third filtering stage 1306. The second filtering stage 1304 includes second fixed filter FY, which is applied to SAO samples. The output of the second filtering stage 1304 is provided to the third filtering stage 1306. The third filtering stage 1306 receives the output of the first filtering stage 1302, the output of the second filtering stage 1304, and the SAG spatial taps. Accordingly, in the example of FIG. 13, the second filtering stage 1304 is not based on the output of the first filtering stage 1302 and is instead performed in parallel with the first filtering stage 1302.
[0129] FIG. 15 is a diagram 1500 of further example luma ALF filtering stages. In the example of FIG. 15, each filtering stage may include an adaptive filter. The adaptive filters may beperformed sequentially. For example, the filters Fx, Fy, Fz are adaptive filters with a 7x7 diamond filter shape. The adaptive filter coefficients for these classes may be signaled in the ALF APS parameters from the image encoding apparatus 100. The classifiers Cx, Cy, Cz associated with the filters Fx, Fy, Fz may be based on gradient, activity (e.g., variance) and band with 56, 16, and 25 classes respectively.
[0130] The example of FIG. 15 includes a first filtering stage 1502 corresponding to first fixed filter Fx, a second filtering stage 1504 corresponding to second fixed filter Fy, and a third filtering stage 1506 corresponding to a third fixed filter Fz.
[0131] The first filtering stage 1502 includes first adaptive filter Fx, which is applied to SAO samples. The output of the first filtering stage 4302 is provided to the second filtering stage 1504. The second filtering stage 1504 includes second adaptive filter Fy, which is applied to the output of the first filtering stage 1502. The output of the second filtering stage 1504 is provided to the third filtering stage 1506. The third filtering stage 1506 includes third adaptive filter Fz. The third filtering stage 1506 receives the output of the second filtering stage 1504 and the SAO spatial taps.
[0132] In some instances, rather than utilizing all three filters F0, Fl, and F2, examples described herein may selectively implement only a subset of filtering stages. As one example, with respect to FIGS. 16 and 17, ALF may include implementing fixed filters F0, Fl, or may include implementing adaptive filter F2. Whether fixed filtering or adaptive filtering is enabled may be signaled in APS by the image encoding apparatus 100. Table 5 shows the mapping of the ALF CTU Filterset Index values to the choice of fixed filters (F0 or F0+F1) or adaptive filter (F2).FilteralfCtuFilterlndex DescriptionApplied0 F0 Only F0 fixed filter is applied1 F0 + F1 F0 + F1 sequential fixed filter is applied2345F2 Only F2 dynamic filter is applied.6789Table 5: ALF CTU Filterset Index values for FIG. 16
[0133] FIG. 16 is a block diagram of an example method 1600 for ALF filtering using either fixed filters or adaptive filters. The method 1600 may be implemented at the filter module 180 of the image encoding apparatus 100 or the filter module 260 of the image decoding apparatus 200.
[0134] At block 1602, the method 1600 includes determining whether fixed filtering is enabled. For example, the ALF CTU Filterset Index values may indicate whether fixed filtering is enabled. When fixed filtering is enabled, the method 1600 may proceed to block 1604. When fixed filtering is not enabled, the method 1600 may proceed to block 1606.
[0135] At block 1604, the method 1600 includes performing fixed filtering. For example, the filter module 180 or the filter module 260 may perform filtering using the fixed filters F0, Fl without using the adaptive filter F2. FIG. 17 is a diagram illustrating example luma ALF filtering stages without adaptive filtering. The example of FIG. 17 includes a first filtering stage 1702 corresponding to first fixed filter F0 and a second filtering stage 1704 corresponding to second fixed filter FL
[0136] The first filtering stage 1702 includes fixed filters F0 and F0’, where F0’ may use different coefficients than F0. F0 is applied to SAO samples. F0’ is applied to RecBeforeDBF samples. The output of the first filtering stage 1702 is the combination of the output of the first fixed filters F0 and F0’.
[0137] The second filtering stage 1704 includes second fixed filters Fl and Fl’, where Fl’ may use different coefficients than FL Fl is applied sequentially to the output of the first filtering stage 1702. Fl’ is applied to RecBeforeDBF samples. The output of the second filtering stage 1704 is the combination of the output of the second fixed filters Fl and Fl’ and is the output of the ALF.
[0138] In some instances, when fixed filtering is performed and adaptive filtering is not performed, only the classifiers CO, Cl corresponding to the fixed filters F0, Fl are calculated by the image encoding apparatus 100. In this scenario, processing power is not dedicated to adaptive filtering.
[0139] Returning to FIG. 16, at block 1606. the method 1600 includes determining whether adaptive filtering is enabled. For example, the ALF CTU Filterset Index values may indicate whether adaptive filtering is enabled. When adaptive filtering is enabled, the method 1600 mayproceed to block 1608. When adaptive filtering is not enabled, the method 1600 may proceed to block 1610.
[0140] At block 1608. the method 1600 includes performing adaptive filtering. For example, the filter module 180 or the filter module 260 may perform filtering using the adaptive filter F2 without using the fixed filters F0, Fl. FIG. 18 illustrates an example luma ALF filtering stages without static filtering. The example of FIG. 18 includes an adaptive filtering stage 1802. The adaptive filtering stage 1802 includes adaptive filter F2. The adaptive filter F2 receives SAO spatial taps and RecBeforeDBF taps as inputs. The output of the adaptive filter F2 is the output of the ALF.
[0141] In some instances, when adaptive filtering is performed and fixed filtering is not performed, only the classifiers C2 corresponding to the adaptive filter F2 is calculated by the image encoding apparatus 100. In this scenario, processing power is not dedicated to fixed filtering.
[0142] At block 1610. when both fixed filtering and adaptive filtering are not enabled, the method 1600 includes skipping ALF operations.
[0143] In another example, with respect to FIGS. 19 and 16, ALF may include implementing first fixed filter F0 alongside second fixed filter Fl or may include implementing first fixed filter F0 alongside adaptive filter F2. Whether second fixed filter Fl or adaptive filter F2 is enabled may be signaled in APS by the image encoding apparatus 100. Table 6 shows the mapping of the ALF CTU Filterset Index values to the choice of fixed filters (F0 / F0+F1) or fixed and adaptive filter (F0+F2).FilteralfCtuFilterlndex DescriptionApplied0 F0 Only F0 fixed filter is applied1 F0 + F1 F0 + Fl sequential fixed filters are applied2345F0+F2 F0 fixed + F2 dynamic filter are applied.6789Table 6: ALF CTU Filterset Index values for FIG. 19
[0144] FIG. 19 is a block diagram of an example method 1900 for ALF filtering using either second fixed filter Fl or adaptive filter F2. The method 1900 may be implemented at the filter module 180 of the image encoding apparatus 100 or the filter module 260 of the image decoding apparatus 200.
[0145] At block 1902, the method 1900 includes performing F0 fixed filtering. For example, the first fixed filters F0. F0’ are implemented during ALF.
[0146] At block 1904, the method 1900 includes determining whether Fl fixed filtering is enabled. For example, the ALF CTU Filterset Index values may indicate whether Fl fixed filtering is enabled. When Fl fixed filtering is enabled, the method 1900 may proceed to block 1906. When Fl fixed filtering is not enabled, the method 1900 may proceed to block 1908.
[0147] At block 1906, the method 1900 includes performing Fl fixed filtering. For example, the second fixed filters Fl, Fl’ are implemented during ALF. In one example, when both F0 and Fl fixed filtering is implemented, the image encoding apparatus 100 performs the ALF filtering previously described with respect to FIG. 17.
[0148] At block 1908, the method 1900 includes determining whether adaptive filtering is enabled. For example, the ALF CTU Filterset Index values may indicate whether adaptive filtering is enabled. When adaptive filtering is enabled, the method 1900 may proceed to block 1910. When adaptive filtering is not enabled, the method 1900 may proceed to block 1912.
[0149] At block 1910, the method 1900 includes performing adaptive filtering. For example, adaptive filter F2 is implemented during ALF. FIG. 20 illustrates an example luma ALF filtering stages with adaptive filtering. The example of FIG. 20 includes a first filtering stage 2002 corresponding to first fixed filter F0 and an adaptive filtering stage 2004 corresponding to adaptive filter F2.
[0150] The first filtering stage 2002 includes fixed filters F0 and F0’, where F0’ may use different coefficients than F0. F0 is applied to SAO samples. F0’ is applied to RecBeforeDBF samples. The output of the first filtering stage 1702 is the combination of the output of the first fixed filters F0 and F0’.
[0151] The adaptive filtering stage 2004 receives the output of the first filtering stage 2002, SAO spatial taps, and RecBeforeDBF taps as inputs. The output of the adaptive filter F2 is the output of the ALF.
[0152] In some instances, when adaptive filtering with F2 is performed and fixed filtering with Fl is not performed, only the classifiers CO, C2 corresponding to the first adaptive filter FO and the adaptive filter F2 are calculated by the image encoding apparatus 100. In this scenario, processing power is not dedicated to fixed filter Fl.
[0153] Returning to FIG. 19, at block 1912, when both Fl fixed filtering and adaptive filtering are not enabled, the method 1600 includes skipping Fl fixed filtering and F2 adaptive filtering.
[0154] In some examples, ALF does not include gradient and band-based C2 classification for the adaptive filtering F2. Exclusion of C2 classification removes signaling overhead for both gradient and band classification, which each signal coefficients for 25 classes in the APS parameters. CO and Cl classifiers may be calculated substantially similarly to as described with respect to FIG. 5.
[0155] FIG. 21 is a diagram 2100 of example luma ALF filtering stages with C2 classification removed. The example of FIG. 21 includes a first filtering stage 2102 corresponding to first fixed filter F0, a second filtering stage 2104 corresponding to second fixed filter Fl, and a third filtering stage 2106 corresponding to adaptive filter F2.
[0156] The first filtering stage 2102 includes fixed filters F0 and F0’, where F0’ may use different coefficients than F0. F0 is applied to SAO samples. F0’ is applied to RecBeforeDBF samples. The output of the first filtering stage 2102 is the combination of the output of the first fixed filters F0 applied to the SAO samples and F0’.
[0157] The second filtering stage 2104 includes second fixed filters Fl and Fl’, where Fl’ may use different coefficients than FL Fl is applied sequentially to the output of the first filtering stage 2102. Fl’ is applied to RecBeforeDBF samples. The output of the second filtering stage 2104 is the combination of the output of the second fixed filters Fl and Fl’.
[0158] The third filtering stage 2106 receives the output of the first filtering stage 2102, the output of the second filtering stage 2104, SAO spatial taps, and RecBeforeDBF taps as inputs. The third filtering stage 2106 does not utilize C2 classification.
[0159] In yet a further example, gradient-based C2 classification is disabled, and ALF only includes band-based C2 (e.g., C2band) classification for the adaptive filtering F2. Accordingly, the number of gradient-based C2 classes is reduced from 25 classes to 1 class for the adaptive filtering F2, reducing signaling overhead.
[0160] FIG. 22 illustrates a method 2200 for calculating the luma ALF classifiers CO, Cl. and band-based C2band. The method 2200 may be implemented at the filter module 180 of the image encoding apparatus 100 or the filter module 260 of the image decoding apparatus 200.
[0161] At block 2202, the method 2200 includes calculating 4x4 gradient activity. At block 2204, the method 2200 includes calculating 12x12 gradient activity. The 4x4 gradient activity and the 12x12 gradient activity may be calculated as previously described with respect to blocks 502 and 504 of FIG. 5.
[0162] At block 2206, the method 2200 may include calculating a variance for each sample. For example, CO and Cl may use an extended variance-based classifier, as previously described with respect to block 506 of FIG. 5.
[0163] At block 2208. the classifier CO is calculated. At block 2210, the classifier Cl is calculated. The classifiers CO, Cl may be calculated as previously described with respect to blocks 508 and 510 of FIG. 5.
[0164] At block 2212, the band classifier C2band is calculated. For example, the method 2200 includes setting the C2band classifier using a band classifier based on a sum of luma samples in a 2x2 luma block. The C2 band classifier index based on sum samples in 2x2 luma block may be derived by C_i = (sum * 25) ≫ (sample bit depth + 2).
[0165] FIG. 23 is a diagram 2300 of example luma ALF filtering stages with band-based C2bandclassification. The example of FIG. 23 includes a first filtering stage 2302 corresponding to first fixed filter F0, a second filtering stage 2304 corresponding to second fixed filter Fl, and a third filtering stage 2306 corresponding to adaptive filter F2.
[0166] The first filtering stage 2302 includes fixed filters F0 and FO’. where FO’ may use different coefficients than FO. FO is applied to SAO samples. FO’ is applied to RecBeforeDBF samples. The output of the first filtering stage 2302 is the combination of the output of the first fixed filters FO applied to the SAO samples and FO’.
[0167] The second filtering stage 2304 includes second fixed filters Fl and Fl’, where Fl’ may use different coefficients than Fl. Fl is applied sequentially to the output of the first filtering stage 2302. Fl’ is applied to RecBeforeDBF samples. The output of the second filtering stage 2304 is the combination of the output of the second fixed filters Fl and Fl’.
[0168] The third filtering stage 2306 receives the output of the first filtering stage 2302, the output of the second filtering stage 2304, SAO spatial taps, and RecBeforeDBF taps as inputs. Classification of the third filtering stage 2306 is performed using band-based classifier C2band.
[0169] In some examples described herein, ALF classification and filtering is applied at a 2x2 block level. For example, CO classification is implemented at a 2x2 level. For each 2x2 block, the neighboring three 2x2 blocks are used to determine the gradient and activity. The gradient and activity are then used to determine the classifier for that 2x2 block.
[0170] In other examples described herein, ALF classification and filtering is applied at a 4x4 block level. For example, classification and filtering are implemented at a 4x4 block level based on the maximum gradient and activity for a set of four neighboring 2x2 blocks inside the 4x4 block. FIG. 24 illustrates an example 4x4 block level classification. FIG. 24 includes a first neighboring block 2402, a second neighboring block 2404, a third neighboring block 2406, and a fourth neighboring block 2408, each being a 2x2 block.
[0171] In some examples, for ALF fixed filters, the 56*16*8 classes based on gradient, activity, and variance are mapped to 8*512 classes. From Table-4, it can be estimated that approximately 105 unique coefficients are required for fixed filtering for each class (F0 =20, F0'= 21, Fl = 21, Fl’ = 43). Due to the larger number of classes, this may result in the fixed filter lookup table having a size of 8*512*105 16-bit coefficients (or parameters). The first factor of 8 is due to usage of slice quantization parameter (slice_qp) specific ALF fixed filter lookup tables which are indexed as::fixedFiltSetIndMin = clip3(0, 7, (slice_qp — 22) ≫ 2) Equation (20)fixedFiltSetIndMax = clip3(0, 7, (slice_qp — 18) ≫ 2) Equation (21)where, fixedFiltSetlndMin and fixedFiltSetlndMax are the 2 lookup tables the encoder chooses from to filter the current frame and signals the winning lookup table index m_tileGroupAlfFixedFilterSetIdx at the slice level. From Equations (20-(21), the following 8 QP table distribution is derived in Table 7:QP index slice_qp range0 0-251 0-292 26-333 30-374 34-415 38-456 42-637 46-63Table 7: ALF Fixed Filter Lookup-table QP distribution
[0172] In some embodiments, the methods and apparatuses for practicing those methods described in this disclosure can generate a bitstream that is stored in a non-transitory computer-readable recording medium. The generated bitstream may then be transmitted over a network. The generated bitstream may be a standard-compliant media data stream. One or more embodiments described in this disclosure can be implemented at video encoders designed to generate standard-compliant media data streams, which are stored and transmitted or streamed as broadcast or on-demand over varied communication networks. Such data streams are received and decoded at devices or systems which implement in hardware and / or software standard-compliant decoders and decoding functionalities to decode and reconstruct video for storage or rendering.ALF Fixed Filter QP table Memory Reduction
[0173] Accordingly, in some instances, the size of the fixed filter lookup table is reduced by removing the QP index based fixed filter lookup tables as explained below.
[0174] In some examples, the strength of filters is based on slice quantization parameters (slice_qp). For higher slice_qp values, a stronger filter is implemented. In some examples described herein, classes are mapped without the use of slice_qp, reducing the number of parameters used by the fixed filter to 107,520.
[0175] In some examples, the classes are mapped to a set of 4 QP distribution tables. The QP’s are mapped as:fixedFiltSetIndMin = clip3(0, 3, (slice_qp — 24) ≫ 3) Equation (22)fixedFiltSetlndMax = clip3(0, 3, (slice_qp — 16) » 3) Equation (23)From Equations (22)-(23), the QP ranges are grouped together as follows in Table 8:QP index slice_qp range0 0-311 0-392 32-633 40-63Table 8: ALF Fixed Filter Lookup-table for 4 QP distribution groupsThis reduces the total number of parameters required by fixed filters to 430,080.
[0176] In some examples, the classes are mapped to a set of 3 QP distribution tables. The QP’s are mapped as:fixedFiltSetIndMin = clip3(0, 2, (slice_qp — 29) ≫ 2) Equation (24)fixedFiltSetlndMax = clip3(0,2,(slice_qp — 25) » 2) Equation (25)From Equations (24)-(25), the QP ranges are grouped together as follows in Table 9:QP index slice_qp range0 0-321 0-632 33-63Table 9: ALF Fixed Filter Lookup-table for 3 QP distribution groupsThis reduces the total number of parameters required by fixed filters to 322,560.
[0177] In some examples, the classes are mapped to a set of 2 QP distribution tables. This reduces the total number of parameters required by fixed filters to 215,040.
[0178] In some examples, the classes are mapped to a set of 8 QP distribution tables, where the QP ranges are grouped together non-uniformly with bias towards higher or lower QP’s as follows in Table 10:QP index QP range Total values0 0-21 221 0-23 242 22-26 53 24-29 64 27-34 85 30-39 106 35-63 297 40-63 24Table 10: ALF Fixed Filter Lookup-table for 8 non-uniform QP distribution groups
[0179] In further examples, the models may be implemented based on linear regression for each of the class coefficient across all slice QP values. Accordingly, the class coefficients may be computed for all slice QP values using linear model based on quantization parameter rather than storing different fixed filter coefficients for a range of slice QPs.
[0180] The examples in FIG. 13, FIG. 14, and FIG. 15 also reduce the storage requirements for ALF fixed filters as the class specific multiplicative combinations of fixed filters are reduced or eradicated completely.
[0181] FIG. 25A illustrates a schematic block diagram of an example device architecture 2500 (e.g., an apparatus 2500) that may be used to implement various aspects of the present disclosure. Architecture 2500 includes but is not limited to servers and client devices, systems, and methods as described in reference to FIGS. 1-24. As shown, the architecture 2500 includes central processing unit (CPU) 2501 which is capable of performing various processes in accordance with a program stored in, for example, read only memory (ROM) 2502 or a program loaded from, for example, storage unit 2508 to random access memory (RAM) 2503. The CPU 2501 may be, for example, an electronic processor 2501. In RAM 2503, the data required when CPU 2501 performs the various processes is also stored, as required. CPU 2501, ROM 2502, and RAM 2503 are connected to one another via bus 2504. Input / output interface 2505 is also connected to bus 2504.
[0182] The following components are connected to I / O interface 2505: input unit 2506, that may include a keyboard, a mouse, or the like; output unit 2507 that may include a display such as a liquid crystal display (LCD) and one or more speakers; storage unit 2508 including a hard disk, or another suitable storage device; and communication unit 2509 including a network interface card such as a network card (e.g., wired or wireless).
[0183] In some embodiments, communication unit 2509 is configured to communicate with other devices (e.g., via a network). Drive 2510 is also connected to I / O interface 2505, as required. Removable medium 2511, such as a magnetic disk, an optical disk, a magneto-optical disk, a flash drive, or another suitable removable medium is mounted on drive 2510, so that a computer program read therefrom is installed into storage unit 2508, as required. A person skilled in the art would understand that although apparatus 2500 is described as including the above-described components, in real applications, it is possible to add, remove, and / or replace some of these components and all these modifications or alteration all fall within the scope of the present disclosure.
[0184] In accordance with example embodiments of the present disclosure, the processes described above may be implemented as computer software programs or on a computer-readable storage medium. For example, embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine readable medium, the computer program including program code for performing methods. In such embodiments, the computer program may be downloaded and mounted from the network via the communication unit 2509, and / or installed from the removable medium 2511, as shown in FIG. 25A.
[0185] FIG. 25B illustrates a schematic block diagram of an example CPU 2501 implemented in the device architecture 2500 of FIG. 25A that may be used to implement various aspects of the present disclosure. The CPU 2501 includes an electronic processor 2520 and a memory 2521. The electronic processor 2520 is electrically and / or communicatively connected to the memory 2521 for bidirectional communication. The memory 2521 stores a video encoding software 2522 and a video decoding software 2523. In some examples, memory 2521 may be located internal to the electronic processor 2520, such as for an internal cache memory or some other internally located ROM, RAM, or flash memory. In other examples, memory 2521 may be located external to the electronic processor 2520, such as in a ROM 2502, a RAM 2503, flash memory or a removable medium 2511, or another non-transitory computer readable medium that is contemplated for device architecture 2500.
[0186] Generally, various example embodiments of the present disclosure may be implemented in hardware or special purpose circuits (e.g., control circuitry), software, logic or any combination thereof. For example, the units and modules discussed above can be executed by control circuitry (e.g., CPU 2501 in combination with other components of FIGS. 25A and 25B), thus, the control circuitry may be performing the actions described in this disclosure. Some aspectsmay be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor, or other computing device (e.g., control circuitry). While various aspects of the example embodiments of the present disclosure are illustrated and described as block diagrams, flowcharts, or using some other pictorial representation, it will be appreciated that the blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.
[0187] Additionally, various blocks shown in the flowcharts may be viewed as method steps, and / or as operations that result from operation of computer program code, and / or as a plurality of coupled logic circuit elements constructed to carry out the associated function(s). For example, embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine readable medium, the computer program containing program codes configured to carry out the methods as described above.
[0188] In the context of the disclosure, a machine-readable medium may be any tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may be non-transitory and may include but not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine -readable storage medium would include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a randomaccess memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0189] Computer program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These computer program codes may be provided to a processor of a general-purpose computer, special purpose computer, or other programmable data processing apparatus that has control circuitry, such that the program codes, when executed by the processor of the computer or other programmable data processing apparatus,cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may execute entirely on a computer, partly on the computer, as a stand-alone software package, partly on the computer and partly on a remote computer or entirely on the remote computer or server or distributed over one or more remote computers and / or servers.ALF Fixed Filter Complexity and Memory Reduction Examples:
[0190] FIGS. 26A-34 illustrate examples of filters implemented herein. In some examples, the FO fixed filter is implemented using a 9x9 diamond- shaped filter that is applied to SAO samples, together with another 9x9 diamond-shaped filter that is applied to RecBeforeDBF samples. This configuration of the F0 fixed filter results in a computational complexity of 41 MAC / pixel. In addition, the F0 fixed filter requires a total of 335,872 parameters to be stored in memory. These parameters encompass both coefficient values used in the filtering operations and clipping indices employed for controlling the filter behavior.
[0191] In some examples, the Fl fixed filter is implemented using a 13x13 diamond-shaped filter that is applied to the output samples generated by the FO fixed filter, together with another 9x9 diamond- shaped filter that is applied to RecBeforeDBF samples. This configuration of the Fl fixed filter results in a computational complexity of 64 MAC / pixel. In addition, the Fl fixed filter requires a total of 524,288 parameters to be stored in memory, which likewise includes both coefficient values and clipping indices.
[0192] When the F0 and Fl fixed filters are combined, the overall filtering structure exhibits a total computational complexity of 105 MAC / pixel, with a corresponding total storage requirement of 860,160 parameters. This total reflects the combined storage of all coefficient values and clipping indices associated with the above examples of both the F0 and Fl fixed filter configurations.
[0193] FIG. 26A is a diagram 2600 of an example F0 fixed filter with RecBeforeDBF taps removed and increased SAO taps. The example F0 fixed filter of FIG. 26A removes the dependency of RecBeforeDBF while maintaining similar processing complexity as taps for SAO samples increase from 9x9 diamond shape to a 13x13 diamond shape. This example yields a luma coding loss of approximately 0.07% for Al and 0.15% for RA relative to a reference F0 fixed filter having a 9x9 diamond- shaped configuration for both SAO samples and RecBeforeDBF samples.
[0194] FIG. 26B is a diagram 2601 of an example F0 fixed filter with RecBeforeDBF taps removed and increase SAO taps. The example FO fixed filter of FIG. 26B increases the taps for SAO samples from 9x9 diamond shape to a 11x11 diamond shape and removes the dependency of RecBeforeDBF, thereby reducing the ALF FO fixed filter processing complexity. This example yields a luma coding loss of approximately 0.12% for Al and 0.21% for RA relative to a reference F0 fixed filter having a 9x9 diamond-shaped configuration for both SAO samples and RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0195] FIG. 26C is a diagram 2602 of an example F0 fixed filter with RecBeforeDBF taps removed. The example F0 fixed filter of FIG. 26C removes the dependency of RecBeforeDBF, thereby reducing the ALF F0 fixed filter processing complexity. This example yields a luma coding loss of approximately 0.16% for Al relative to a reference F0 fixed filter having a 9x9 diamondshaped configuration for both SAO samples and RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0196] FIGS. 26A-26C are directed to removing a dependency on RecBeforeDBF samples, thereby reducing complexity, and simplifying the hardware pipeline.
[0197] FIG. 27 is a diagram 2700 of an example F0 fixed filter with reduced taps for both SAO samples 2701 and RecBeforeDBF samples 2702. The example F0 fixed filter of FIG. 27 reduces the taps for SAO samples 2701 from 9x9 diamond shape to a 7x7 diamond shape along with a reduction of taps for RecBeforeDBF samples 2702 from 9x9 diamond shape to a 5x5 diamond shape, thereby reducing the ALF F0 fixed filter processing complexity. This example yields a luma coding loss of approximately 0.17% for Al relative to a reference F0 fixed filter having a 9x9 diamond-shaped configuration for both SAO samples and RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0198] FIG. 28 is a diagram 2800 of an example F0 fixed filter having reduced taps for both SAO samples 2801 and RecBeforeDBF samples 2802. The example F0 fixed filter of FIG. 28 reduces the taps for both SAO samples 2801 and RecBeforeDBF samples 2802 from a 9x9 diamond shape to a 9x9 partial diamond shape, thereby reducing processing complexity of the ALF F0 fixed filter. The example is directed to reducing fixed filter complexity while maintaining the receptive field by excluding taps along the diagonals. This example yields a luma coding loss ofapproximately 0.10% for Al relative to a reference F0 fixed filter having a 9x9 diamond-shaped configuration for both SAO samples and RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0199] FIG. 29A is a diagram 2900 of an example F0 fixed filter with reduced taps for both SAO samples 2901 and RecBeforeDBF samples 2902. The example F0 fixed filter of FIG. 29A reduces the taps for SAO samples 2901 from 9x9 diamond shape to a 7x7 partial square shape along with a reduction of taps for RecBeforeDBF samples 2902 from 9x9 diamond shape to a 5x5 diamond shape. Through these reductions, the overall processing complexity of the ALF F0 fixed filter is decreased. This example yields a luma coding loss of approximately 0.05% for Al and 0.04% for RA relative to a reference F0 fixed filter having a 9x9 diamond-shaped configuration for both SAO samples and RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0200] FIG. 29B is a diagram 2903 of an example F0 fixed filter with reduced taps for both SAO samples 2904 and RecBeforeDBF samples 2905. The example F0 fixed filter of FIG. 29B reduces the taps for SAO samples 2904 from 9x9 diamond shape to a 7x7 partial square shape along with a reduction of taps for RecBeforeDBF samples 2905 from 9x9 diamond shape to a 5x5 plus shape. This modification similarly reduces the processing complexity of the ALF F0 fixed filter, while providing an alternative filter structure for the RecBeforeDBF samples that is advantageous as DBF is applied along the CTU boundaries. This example yields a luma coding loss of approximately 0.05% for Al and 0.04% for RA relative to a reference F0 fixed filter having a 9x9 diamond- shaped configuration for both SAO samples and RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0201] The example of FIG. 29 A and FIG. 29B expands the receptive field along the diagonals while simultaneously reducing the line buffer usage comparison to the conventional diamond shaped filter.
[0202] FIG. 30A is a diagram 3000 of an example Fl fixed filter with reduced taps for both the output samples of F0 fixed filter 3001 and RecBeforeDBF samples 3002. The example Fl fixed filter of FIG. 30A reduces the taps for the output samples of F0 fixed filters 3001 from 13x13 diamond shape to a 7x7 square shape along with a reduction of taps for RecBeforeDBF samples 3002 from 9x9 diamond shape to a 9x9 plus shape reducing the ALF Fl fixed filter processingcomplexity. This example with the grouping of 4 QP tables yields a luma coding loss of approximately 0.08% for Al and 0.09% for RA relative to a reference Fl fixed filter having a 13x13 diamond-shaped configuration for F0 output samples and 9x9 diamond- shaped configuration RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0203] FIG. 30B is a diagram 3003 of an example Fl fixed filter with RecBeforeDBF taps removed and reduced taps for the output samples of F0 fixed filter. The example Fl fixed filter of FIG. 30B reduces the taps for the output samples of F0 fixed filter from 13x13 diamond shape to a 9x9 square shape and removes the dependency of RecBeforeDBF reducing the ALF Fl fixed filter processing complexity. This example with the grouping of 4 QP tables yields a luma coding loss of approximately 0.05% for Al relative to a reference Fl fixed filter having a 13x13 diamond-shaped configuration for the output samples of F0 fixed filter and 9x9 diamond-shaped configuration RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0204] The examples of FIGS. 30A and 30B also increase the receptive field of fixed filter along diagonals similar to FIGS. 29A and 29B. A distinction, however, is that FIGS. 30A and 30B incorporate a complete square configuration of taps. The complete square configuration further increases the receptive field along diagonal directions while continuing to provide the advantage of reduced line buffer usage as compared to conventional diamond-shaped filter configurations.
[0205] FIG. 31 is a diagram 3100 of an example Fl fixed filter with RecBeforeDBF taps removed and reduced taps for the output samples of F0 fixed filter. The example Fl fixed filter of FIG. 31 reduces the taps for the output samples of F0 fixed filter from 13x13 diamond shape to a 13x13 partial diamond shape (square and plus) and removes the dependency of RecBeforeDBF reducing the ALF Fl fixed filter processing complexity. This example with the grouping of 4 QP tables yields a luma coding loss of approximately 0.05% for Al and 0.08% for RA relative to a reference Fl fixed filter having a 13x13 diamond- shaped configuration for the output samples of F0 fixed filter and 9x9 diamond- shaped configuration RecBeforeDBF samples, while concurrently providing reductions in computational complexity and memory usage.
[0206] Various combinations of the foregoing modified shapes of the F0 and Fl fixed filters, in conjunction with different QP table groupings, may also be employed. Such combinations may beexplored to identify configurations that achieve a desired balance between processing complexity, receptive field coverage, and hardware simplification.
[0207] FIG. 32 is a diagram 3200 of an example F0 and Fl fixed filters with nonoverlapping filter taps. The example F0 and Fl fixed filter of FIG. 32 employ distinct, nonoverlapping filter shapes, such that each filter processes samples independently while utilizing respective CO and Cl classification window sizes. FIG. 32 shows that the inner taps are filtered by the FO fixed filter, while the outer taps are filtered by the Fl fixed filter. This configuration enables the FO and Fl fixed filters to operate in parallel, thereby reducing the number of sequential ALF stages required.
[0208] FIG. 33A and FIG. 33B are diagrams 3300 and 3303 of example F0 and Fl fixed filters with non-overlapping checkered board pattern filter shapes. As depicted, the arrangement of filter taps in the checkered-board configuration results in non-overlapping filter regions between the FO and Fl fixed filters. In particular, the FO fixed filter operates exclusively on a first subset of samples defined by the checkered-board pattern, while the Fl fixed filter operates exclusively on a second, mutually exclusive subset of samples defined by the complementary pattern.
[0209] By virtue of this arrangement, the FO and Fl fixed filters are configured to process non-overlapping sample sets, thereby ensuring that no single sample is subject to filtering by both fixed filters. This structural property reduces overall filter complexity by minimizing redundancy, while also enabling the FO and Fl filters to be executed in parallel or in a reduced number of ALF stages.
[0210] In some examples. ALF includes gradient and variance based CO and Cl classification for the fixed filters FO and FL Exclusion of activity from CO and Cl classification reduced the LUT size by reduction the classes from 512 to 448. The following Equation (26) shows how the classification is determined without activity being used:Ci = Var * Mi + Di, Equation (26)where Var is the variance, Mi represents the total number of directionalities Di, where i=0,1; MD,0 = MD,1 = 56.
[0211] This example is based on the observation that the use of both activity and variance may be redundant, as both parameters operate on and capture similar aspects of samplecharacteristics. Accordingly, elimination of one of these parameters may significantly reduce storage requirements while having minimal impact on coding efficiency.
[0212] FIG. 34 illustrates a diagram 3400 of an example F0 fixed filter in which the classification window size is configured to correspond exactly with the fixed filter shape. In the example of FIG. 34, a classification window 3401 is aligned with a 9x9 diamond- shaped fixed filter 3402. The configuration operates to exclude samples that are not subject to filtering, thereby preventing such samples from influencing the classification decision used to select which fixed filter is applied. The horizontal, vertical and diagonal gradient calculations using 1-D Laplacian for such a NxN diamond-shaped classification window are shown as follows:i.d — N „ i.+,k-i.— si ■qn n(k-i)(— j,gv= X2NX...rzrNJk.i, Fw= |2 / ?( / c, Z) - / ?( / c, Z - l) - / ?( / c, Z + l)|k = i-y l=j -k+i+sign(k-i)(_-)Equation (27)Ngh- t k+=Ni / -2N~XJl=+jk-~kl~+si+l9snig{kn~(kl)—^i)f{—N)=l27?O-z) -R(k~ -R(k+ Ml Equation (28)gai = t+N / 2NXJ+k~l~Sl9KkyX2\.D1^i ’ Dlkil= |2 / ?(fc, Z) - R(k - 1,1 - 1) - R(k + 1,1 + 1)| k=i—— l=j—k+i+sign(k-i)(—j Equation (29) TVgd2= t+N / NX}+k~l~sl9nQk~lK2\.D2^i’D2+i = l2Z?(fc-z) -R(k- i-z+ 1) -R(k+ i-z- DIk = i—— l=j-k+i+sign(k-i)(— )Equation (30)where N is the ALF gradient window size (such as N=9 for a 9x9 diamond window or N=7 for a 7x7 Diamond window), indices Z and j refer to the coordinates of the centre sample within the window, and R(i-,j) indicates a reconstructed sample at coordinate (i,j). These gradients are then used to derive the class Ctbased on directionality D, activity A in the same manner as described in Equations 7, 8, 9A, 9B, 9C and Tables 2(a) and 2(b) as previously described.
[0213] In another example, a square-shaped classification window is implemented in combination with a square- shaped fixed filter. The square- shaped configuration increases the receptive field along diagonal directions and reduces the line buffer resources required to perform the filtering.
[0214] In some examples, the F0 and Fl fixed filters are implemented using a QP independent clipping table while the coefficient values use 8 QP dependent distribution tables.CoefficientsQP index QP range Total values0 0-25 261 0-29 302 26-33 83 30-37 84 34-41 85 38-45 86 42-63 227 46-63 18Table 11: ALF Fixed Filter Lookup-table for QP independent clip indices and QP dependent coefficientsThe fixed filter clipping indices ki for the fixed filters FO and Fl are not a function of QP anymore. They are a function of classifier Ci (i=0, 1) and the coefficient position (xi, yi) for the fixed filters.The fixed filter coefficients f’tand f' continue to be a function of the QP, classifier Ci (i=0, 1) and the coefficient position (xi, yi) for both the fixed filters FO and Fl respectively.
[0215] This reduces the total number of parameters required by fixed filters to 483,840. Additionally, processing efficiency is improved, particularly for SIMD as clipping indices being QP independent require less memory load operations for filtering. In some examples, ALF includes gradient and activity based CO and Cl classification for the fixed filters FO and FL The example CO and Cl classifiers use gradient and activity as characteristics for classification but exclude the use of variance as a feature. The use of variance may be redundant as both activity and variance operate on and encapsulate similar aspects of sample characteristics. The following Equation (31) shows how the classification is determined without variance being used in the fixed filters:= Act * Mi + Di Equation (31)where Act is the activity, Mi represents the total number of directionalities Di, where i=0, 1; MO = Ml = 56.
[0216] A separate variance-based classifier may be incorporated into the adaptive filter to maintain output quality. This variance-based classifier can be configured to replace any of theexisting C2 classifiers. FIG. 35A is a diagram 3500 of an example C2 classifier where the gradient and activity-based classifier is replaced by a variance-based classifier 3502, thereby introducing an additional classification feature for improved output quality while avoiding reuse of gradient and activity characteristics as they may be redundant. The variance-based classifier uses SAO samples to determine the variance 3501 for every 2x2 block. The encoder determines the classifier used between band classifier 3505, residual classifiers 3506 and the variance-based classifier based on the decisions 3503 and 3504. The example of FIG. 35 A modifies the encoder classifier decisions, as shown in Table 12.alfCtbFilterIndex ctbAlfAlternative Classifier Applied DescriptionF2 dynamic fdter is not applied so 0, 1 - - C2 classifier is required Variance based classifier is used for 0 Variance F2 adaptive filtering.Band based classifier is used for F2 2 - 9 1 Bandadaptive filtering.2 Residual based classifier is used for Residual F2 adaptive filtering.Table 12: A LF Luma Classifier Index for C2 classification with Variance-based instead of gradient- activity based classifier.
[0217] FIG. 35B is a diagram 3510 of an example C2 classifier where the variance classifier is used as an additional method of classification for the adaptive F2 filter. The example C2 classifier can use a Gradient- Activity classifier 3512 which derives the C2 classes from the gradient and activity characteristics for a 12x12 window 3511 using SAO samples. Similarly, the C2 classifier can also use the Variance based classifier which derives the classes from the variance characteristics for a 10x10 window 3513, using SAO samples. The encoder determines the appropriate classifier to be used between Gradient- Activity classifier, Variance classifier, Band classifier 3515 and the Residual classifiers 3516. This example may improve coding efficiency at the expense of increased encoder complexity as the encoder classifier decisions would be as shown in Table 13.alfCtbF ilterlndex ctbAlfAlternative Classifier Applied DescriptionF2 dynamic filter is not applied so 0, 1 - - C2 classifier is required Gradient- Activity based classifier is 0 Grad-Act used for F2 adaptive filtering. 2 - 9Band based classifier is used for F2 1 Bandadaptive filtering.2 Residual based classifier is used for Residual F2 adaptive filtering.Variance based classifier is used for 3 VarianceF2 adaptive filtering.Table 13: ALF Luma Classifier Index for C2 classification with Variance-based classification as an additional classifier.
[0218] The following Equation (32) shows how the classification is determined using variance in the F2 filter:C2= min ^49, (13 * Var(x) » (14 + divshift^A^^ » 1 Equation (32)where Var(x) and Ai are variance and activity respectively for a 2x2 block and divshift is a lookup-table.
[0219] In another example, variance-based classification is performed independently of activity-based classification. The variance classes are directly derived from the variance values by applying a fourth-root operation and assigning the resulting values to corresponding variance classes. The following Equation (33) shows how variance classification is derived without the use of activity-based classification:C2— \]Var(x) Equation (33)where Var(x) is the actual variance for a given 2x2 block. A lookup table may be utilized to efficiently compute fourth-root values in fixed-point form for accurate mapping from variance value to 25 classes.
[0220] In another example, variance-based classification is performed independently of activity-based classification. The variance classes are directly derived from the variance values by applying a fourth-root operation and assigning the resulting values to corresponding variance classes. The following Equation (34) shows how variance classification is derived without the use of activity-based classification:C2— logtrFar(x) Equation (34)where Var(x) is the actual variance for a given 2x2 block and α is a constant. A lookup table may be utilized to efficiently compute log values in fixed-point form for accurate mapping from variance value to 25 classes.
[0221] FIG. 36 is a diagram 3600 of example CO and Cl classifiers that are based on Gradient-Activity and Variance-Band, respectively. The example FO fixed filter employs a CO Gradient-Activity based classifier 3612 which derives classes using SAO samples for a 4x4 Gradient and Activity window 3611. The example Fl fixed filter employs a Cl Variance-Band based classifier 3615, which is determined using Variance characteristics of a 10x10 window 3613 and the Band characteristics using SAO samples 3614. This ensures that the FO and Fl fixed filters work on different characteristics to maximize coding efficiency. The following Equations (35)-(36) show how the CO and Cl classifications are derived from Gradient- Activity based classifications and Variance-Band based classifications:CQ— Act * M + D Equation (35)where Act is the activity, M represents the total number of directionalities D and M = 56; and= Var * N -I- B Equation (36)where Var is the Variance, N represents the total number of band classes B and N = 25.
[0222] Various combinations of the foregoing modified classification features of the F0 and Fl fixed filters, in conjunction with the modified shapes and different QP table groupings, may also be employed. Such combinations may be explored to identify configurations that achieve a desired balance between processing complexity, receptive field coverage, and hardware simplification.ALF Fixed Filter Performance:
[0223] In another embodiment, ALF fixed filters F0 and Fl each include separate sets of clipping indices and coefficient tables for intra slices and inter slices as shown in the example flow below. The example F0 fixed filter includes ‘n0’ fixed filter sets for intra slices and ‘m0’ fixed filter sets for inter slices, where nO + mO = 512. Similarly, the example Fl fixed filter includes ‘nl’ fixed filter sets for intra slices and ‘ml’ fixed filter sets for inter slices, where nl + ml = 512. The newly defined fixed filter sets are configured to improve coding efficiency while maintaining similar levels of coding complexity and storage requirements:if(slice_type == INTRA){F0_coeffs = F0_LUTCoeffs_Intra(C0)F0_clips = F0_LUTClip_Intra(C0)Fl_coeffs = Fl_LUTCoeffs_Intra(Cl)Fl_clips = Fl_LUTClip_Intra(Cl)else / * slice_type == INTER * / F0_coeffs = F0_LUTCoeffs_Inter(C0)F0_clips = F0_LUTClip_Inter(C0)Fl_coeffs = Fl_LUTCoeffs_Inter(Cl)Fl_clips = Fl_LUTClip_Inter(Cl)
[0224] In another embodiment, ALF fixed filters FO and Fl each include separate sets of clipping indices and coefficient tables for intra blocks and inter blocks. In such cases, the CO and Cl classifiers are modified to use block level intra / inter mode information along with the other gradient / activity / variance-based features. For example, the modified equations for fixed filter classifier Ci (i=0, 1 ) which use intra / inter mode flag, directionality (D) and activity-based classification (Act) are set as follows:Ct= IntraModeFlag * Nt+ Actt* Mt + DtEquation (37 A)C'i — fixed_ filter_mapping(Ct) Equation (37B)where:Ci is the fixed filter classifier (i = 0, 1 for FO, Flfixed filters),Dtis the directionality of the current block, Mtis the total number of directionalities (56),Acti is the activity of the current block, Ni is the total number of activities and directionalities (896 = 56*16),IntraModeFlag is 1 if the current ALF block is part of an intra coded block and 0 if current block is part of an inter coded block, andC'i is the mapped fixed filter for classifier for Ci which helps reduce the 1792 (=896*2) Ci classes to a reduced set of 512 fixed filters.The newly defined fixed filter sets based on intra I inter block information are configured to improve coding efficiency while maintaining similar levels of coding complexity and storage requirements.
[0225] In another embodiment, Intra and Inter mode information is used to apply multiple sets of scaling factors to the ALF F0 and Fl fixed filters. The example F0 fixed filter is combinedwith the corresponding set of scaling factors, which may be determined offline, to derive a distinct set of intra and inter FO fixed filters. Similarly, the example Fl fixed filter is combined with the corresponding set of scaling factors, which may be determined offline, to derive a distinct set of intra and inter Fl fixed filters. The modified equation for the intra I inter mode information-based scaling factors for fixed filter can be expressed as:R' (x,y) = R(x,y) + ScaleFactor * t^ + f'u)] + [Sf=20Ct(h' i.o + h';,i)]Equation(38) where:R'(x, y) is the output of the scaling factor based fixed filter at (x, y),R(x,y) is the current SAO sample at location (x,y),ScaleFactor is the intra / inter mode dependent scaling factor applied to scale the fixed filter outputs, scaling factor can be used for considering the level of details such as resolution in case of using RPR,fi is the clipped difference between a neighboring SAO sample and current sample R(x,y) andj equalling 0 or 1 represents the spatial symmetric samples with respect to the current sample, andh'i j is the clipped difference between ReconBeforeDBF sample and current sample R(x, y), and j equalling 0 or 1 represents the spatial symmetric samples with respect to the current sample.The derived fixed filters may improve coding efficiency while also substantially maintaining similar memory storage requirements.
[0226] In another embodiment, in addition to scaling factors, a set of weight patterns W*'2are used to provide a finer refinement for CO, Cl filter coefficient:R' (x,y) = R(x,y) + ScaleFactor *.0+ / z;J] + [Zf=20Wfctfh / i,0+ h / u)]Equation (39)M ’2is designed to follow a given distribution at discrete position such as Gaussian distribution1 ( x2+ y2\= 5^eXp[ — —)where cr is optimized based on different filter shape. For Laplacian distribution, scale parameter b may be used instead.w, 5= T1(?exP -l%l +7 —Zb \ b )In addition, magnitude renormalization may be necessary to prevent over-correction and ringing artifacts. The derived weights are normalized to keep the sum one values. ∑Wi = 1.0. The encoder and decoder may need to store the distribution parameters (1 additional per adaptive weight) and derive Wi1,2on the fly or store them as look up tables.
[0227] In one embodiment, a single weighted pattern is used for all filter shape and renormalized based on number of samples and the maximum magnitude of corresponding fixed filter kernel.
[0228] In another embodiment, ALF classification thresholds for the fixed filter classifiers CO and Cl are modified to be content adaptive instead of applying fixed thresholds, as previously described. The example CO and Cl gradient directionality thresholds Th =Th,. Th„ThA. Thc. Th. used for horizontal, vertical and diagonal gradient based classification are modified using one or more statistical techniques such as distribution of the directionalities to determine the updated thresholds. The updated thresholds may be obtained by determining a common threshold offset or delta threshold relative to existing thresholds, which are applied across multiple threshold values. The computed threshold offset, or delta threshold may be signaled in the bitstream at the slice level.
[0229] In some embodiments, ALF classification thresholds for the C2 classifier are derived implicitly by the encoder and decoder at the slice level based on statistical analysis of the classification features. The implicitly-derived thresholds are used to determine content specific classes without explicit signaling. In some examples, the gradient-based thresholds are derived using statistical techniques, such as distribution-based or quantile-based analysis, and may be derived by analyzing the ratios rd vandd2to determine content adaptive thresholds at the slice level.
[0230] In another embodiment. ALF classification thresholds for the C2 classifier are derived by the encoder and are signaled at the APS level. The thresholds may be derived using statistical analysis of C2 classification characteristics and are used to define content-adaptive classes. In such embodiments, the derived thresholds are signaled at the APS level to enable corresponding classification at a decoder. In some examples, the gradient-based thresholds are derived using statistical techniques, such as distribution-based or quantile-based analysis, and may be derived by analyzing the ratiosand r^l d2to determine content adaptive thresholds which are signaled in the APS indices.
[0231] A person skilled in the art realizes that the present invention by no means is limited to the embodiments described above. On the contrary, many modifications and variations are possible and considered within the scope of the appended claims. Various aspects and implementations of the present disclosure may also be appreciated from the following enumerated example embodiments (EEEs), which are not claims, and which may represent systems, methods, and devices, all arranged in accordance with aspects of the present disclosure.
[0232] EEE1. A method for adaptive loop filtering, the method comprising: receiving an input image; receiving a filter set index a type of filtering to be applied to the input image; applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, and wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; and applying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
[0233] EEE2. The method of EEE1, further comprising: applying a deblocking filter to an input sample to generate a deblocked image; and performing a sample adaptive offset operation on the deblocked image to generate the input image.
[0234] EEE3. The method of EEE 1, wherein the input image includes reconstructed luma samples before pre-deblock filtering.
[0235] EEE4. The method of any one of EEE1 to EEE3, wherein the second filter is further configured to receive an output of the first filter.
[0236] EEE5. The method of any one of EEE1 to EEE4, wherein the first filter is a 9x9 diamond filter and wherein the second filter is a 13x13 diamond filter.
[0237] EEE6. The method of any one of EEE1 to EEE5, further comprising: skipping, in response to the filter set index indicating not to apply adaptive filtering and to not apply static filtering, adaptive loop filtering of the input image.
[0238] EEE7. The method of any one of EEE1 to EEE6, wherein at least one selected from the group consisting of the C0 classifier, the C1 classifier, and the C2 classifier indicate a classification and filtering operation, and wherein the classification and filtering operation is implemented at a 4x4 block level.
[0239] EEE8. The method of EEE7, wherein the classification and filtering operation is implemented for a set of four 2x2 blocks within a certain 4x4 block.
[0240] EEE9. The method of any one of EEE1 to EEE8, wherein applying, in response to the filter set index indicating to apply static filtering, the static filter to the input image includes applying the first filter and the second filter sequentially.
[0241] EEE10. The method of any one of EEE1 to EEE8, wherein applying, in response to the filter set index indicating to apply static filtering, the static filter to the input image includes applying the first filter and the second filter in parallel.
[0242] EEE11. The method of any one of EEE1 to EEE10, wherein applying, in response to the filter set index indicating to apply adaptive filtering, the adaptive filter to the input image includes applying the adaptive filter without referencing slice quantization parameters.
[0243] EEE12. The method of any one of EEE1 to EEE11, wherein the adaptive filter is further configured to receive an output of a sample adaptive offset operation and the input image.
[0244] EEE13. The method of any one of EEE1 to EEE12, wherein the first gradient directionality is a 4x4 gradient directionality, and wherein the second gradient directionality is a 12x12 gradient directionality.
[0245] EEE14. A method for adaptive loop filtering, the method comprising: receiving an input image; applying a first filter to the input image, the first filter configured to receive a C0 classifier computed using a first gradient directionality; receiving a filter set index indicative of atype of filtering to be applied to the input image; applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image, wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; and applying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
[0246] EEE15. The method of EEE 14, further comprising: applying a deblocking filter to an input sample to generate a deblocked image; and performing a sample adaptive offset operation on the deblocked image to generate the input image.
[0247] EEE16. The method of any one of EEE14 to EEE15, wherein the second filter is further configured to receive an output of the first filter.
[0248] EEE17. The method of any one of EEE 14 to EEE 16, wherein the input image includes reconstructed luma samples before pre-deblock filtering.
[0249] EEE18. The method of any one of EEE14 to EEE17, further comprising skipping, in response to the filter set index indicating not to apply adaptive filtering and to not apply static filtering, adaptive loop filtering of the input image.
[0250] EEE19. The method of any one of EEE14 to EEE18, wherein at least one selected from the group consisting of the C0 classifier, the C1 classifier, and the C2 classifier indicate a classification and filtering operation, and wherein the classification and filtering operation is implemented at a 4x4 block level.
[0251] EEE20. The method of any one of EEE14 to EEE19, wherein the adaptive filter is further configured to receive an output of a sample adaptive offset operation, the input image, and an output of the first filter as inputs.
[0252] EEE21. The method of any one of EEE14 to EEE20, wherein the first gradient directionality is a 4x4 gradient directionality, and wherein the second gradient directionality is a 12x12 gradient directionality.
[0253] EEE22. A method for adaptive loop filtering, the method comprising: setting a filter index value indicating a type of filtering to be applied to an input image; and generating a bitstreamincluding the input image, the filter index value, and an ALF luma classifier index, wherein, in response to the filter index value indicating to apply adaptive filtering, an adaptive filter is applied to an input image included in the bitstream, wherein, in response to the filter index value not indicating to apply adaptive filtering, a static filter is applied to the input image included in the bitstream, wherein the adaptive filter is configured to receive a C2 classifier indicated by the ALF luma classifier index, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, and wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0254] EEE23. An apparatus comprising: an electronic processor configured to perform operations including the method of any one of EEE 1 to EEE22.
[0255] EEE24. A non-transitory computer-readable storage medium recording a program of instructions that is executable by a device to perform the method of any one of EEE1 to EEE22.
[0256] EEE25. A video decoding apparatus comprising: a filter module configured to receive a filter set index indicative of a type of filtering to be applied to input samples, apply, in response to the filter set index indicating to apply static filtering, a static filter to the input samples, and apply, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input samples, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality, and wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
[0257] EEE26. A non-transitory computer-readable medium for storing data associated with a video, comprising: a data stream stored in the non-transitory computer-readable medium, the data stream comprising a filter set index indicative of a type of filtering to be applied to input video content, wherein the filter set index indicates whether to apply a static filter or an adaptive filter to the input video content, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality, and wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
[0258] EEE27. A method for adaptive loop filtering, the method comprising: receiving an input sample; receiving a filter set index indicative of a type of filtering to be applied to the input sample; and applying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, and wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0259] EEE28. The method of EEE27, further comprising: performing a sample adaptive offset operation on an input image to generate the input sample without applying a deblocking filter to the input image.
[0260] EEE29. The method of EEE28, wherein the first filter increases taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 13x13 diamond shape.
[0261] EEE30. The method of EEE28, wherein the first filter increases taps included in the sample adaptive offset operation from a 9x9 diamond shape to an 11x11 diamond shape.
[0262] EEE31. The method of EEE27, further comprising: applying a deblocking filter to an input image to generate a deblocked image; and performing a sample adaptive offset operation on the deblocked image to generate the input sample.
[0263] EEE32. The method of EEE31, wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 7x7 diamond shape, and wherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 5x5 diamond shape.
[0264] EEE33. The method of EEE31, wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 9x9 partial diamond shape, and wherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 9x9 partial diamond shape.
[0265] EEE34. The method of EEE31, wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 7x7 partial square shape, and wherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 5x5 diamond shape.
[0266] EEE35. The method of EEE31. wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 7x7 partial square shape, and wherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 5x5 plus shape.
[0267] EEE36. The method of EEE31, wherein the second filter reduces taps included in an output of the first filter from a 13x13 diamond shape to a 7x7 square shape, and wherein the second filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 9x9 plus shape.
[0268] EEE37. The method of EEE31. wherein the second filter reduces taps included in an output of the first filter from a 13x13 diamond shape to a 9x9 square shape.
[0269] EEE38. The method of EEE31, wherein the second filter reduces taps included in an output of the first filter from a 13x13 diamond shape to a 13x13 partial diamond shape.
[0270] EEE39. The method of EEE27, wherein the first filter is configured to filter inner taps of the input samples, and wherein the second filter is configured to filter outer taps of the input sample.
[0271] EEE40. The method of EEE27. wherein the first filter is configured to filter a first subset of the input sample, and wherein the second filter is configured to filter a second subset of the input sample.
[0272] EEE41. The method of EEE27, wherein the first filter includes a classification window aligned with a NxN diamond shaped fixed filter or NxN square shaped fixed filter.
[0273] EEE42. A video decoding apparatus comprising: a filter module configured to apply a deblocking filter to an input image to generate a deblocked image, perform a sample adaptive offset operation on the deblocked image to generate an input sample, receive a filter set index indicative of a type of filtering to be applied to the input sample and apply, in response to the filter set index indicating to apply static filtering, a static filter to the input samples, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein the first filter reduces a number of taps included in the sample adaptive offset operation, and wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0274] EEE43. A non-transitory computer-readable medium for storing data associated with a video, comprising: a data stream stored in the non-transitory computer-readable medium, the data stream comprising a filter set index indicative of a type of filtering to be applied to input video content, wherein the filter set index indicates whether to apply a static filter to the input video content, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein the first filter reduces a number of taps included in a sample adaptive offset operation applied to the input video content, and wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0275] EEE44. A method for adaptive loop filtering, the method comprising: setting a filter index value indicating a type of filtering to be applied to an input image; and generating a bitstream including the input image, the filter index value and an ALF luma classifier index, wherein, in response to the filter index value indicating to apply adaptive filtering, an adaptive filter is applied to the input image included in the bitstream, wherein, in response to the filter index value not indicating to apply adaptive filtering, a static filter is applied to the input image included in the bitstream, wherein the adaptive filter is configured to receive a C2 classifier indicated by the ALF luma classifier index, wherein the C2 classifier is a variance-based classifier configured to implement SAO samples to determine a variance between blocks, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
[0276] EEE45. A method for adaptive loop filtering, the method comprising: receiving an input sample; receiving a filter set index indicative of a type of filtering to be applied to the input sample; and applying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample, wherein the static filter includes a first filter configured to receive a CO classifier, wherein the CO classifier is a gradient-activity based classifier, and wherein the static filter includes a second filter configured to receive a Cl classifier, wherein the Cl classifier is a varianceband based classifier.
[0277] EEE46. The method of EEE45, wherein clipping indices associated with the first filter and the second filter are implemented independent of quantization parameter values.
[0278] EEE47. The method of EEE45. wherein clipping indices associated with the first filter are a function of the C0 classifier, and wherein clipping indices associated with the second filter are a function of the C1 classifier.
[0279] EEE48. The method of any one of EEE45 to EEE47, wherein the C0 classifier derives classes using SAO samples for a 4x4 gradient and activity window.
[0280] EEE49. The method of any one of EEE45 to EEE48, wherein the C1 classifier derives variance characteristics of a 10x10 window and band characteristics using SAO samples.
[0281] EEE50. A method for adaptive loop filtering, the method comprising: receiving an input image; receiving a filter set index indicative of a type of filtering to be applied to the input image; applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, and wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; and applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a variance-based classifier, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier computed based on a variance between SAO samples.
[0282] EEE51. The method of EEE50. further comprising: applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a band-based classifier, the adaptive filter to the input image, wherein the adaptive filter is configured to receive the C2 classifier computed based on a sum of luma samples in a luma block.
[0283] EEE52. The method of any one of EEE50 to EEE51, further comprising: applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a residual-based classifier, the adaptive filter to the input image, wherein the adaptive filter is configured to receive the C2 classifier computed based on residual samples.
[0284] EEE53. The method of any one of EEE50 to EEE52, further comprising: applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a gradient- activity-based classifier, the adaptive filter to the input image, whereinthe adaptive filter is configured to receive the C2 classifier computed based on gradient and activity characteristics for a 12x12 window using SAO samples.
[0285] EEE54. A method for adaptive loop filtering, the method comprising: receiving an input image; receiving a filter set index indicative of a type of filtering to be applied to the input image; applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image, wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein inter and intra mode information is implemented to apply first scaling factors to the first filter; wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality, wherein the inter and intra mode information is implemented to apply second scaling factors to the second filter; and applying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
[0286] EEE55. The method of EEE54, wherein the C2 classifier is computed at the slice level.
[0287] EEE56. The method of EEE54, wherein the C2 classifier is signaled at the APS level.
[0288] EEE57. The method of any one of EEE54 to EEE56, wherein a set of weight patterns are applied to the C0 classifier and the C1 classifier.
[0289] EEE58. The method of EEE57, wherein the set of weight patterns follow a Gaussian distribution.
[0290] EEE59. The method of EEE57, wherein the set of weight patterns follow a Laplacian distribution.
[0291] EEE60. The method of EEE57, wherein a single weight pattern is applied for all filter shapes.
[0292] EEE61. An apparatus comprising: an electronic processor configured to perform operations including the method of any one of EEE44 to EEE60.
[0293] EEE62. A non-transitory computer-readable storage medium recording a program of instructions that is executable by a device to perform the method of any one of EEE44 to EEE60.
[0294] With regard to the processes, systems, methods, heuristics, etc. described herein, it should be understood that, although the steps of such processes, etc. have been described as occurring according to a certain ordered sequence, such processes could be practiced with the described steps performed in an order other than the order described herein. It further should be understood that certain steps could be performed simultaneously, that other steps could be added, or that certain steps described herein could be replaced, amended, or omitted. In other words, the descriptions of processes herein are provided for the purpose of illustrating certain embodiments and should in no way be construed so as to limit the claims.
[0295] Accordingly, it is to be understood that the above description is intended to be illustrative and not restrictive. Many embodiments and applications other than the examples provided would be apparent upon reading the above description. The scope should be determined, not with reference to the above description, but should instead be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. It is anticipated and intended that future developments will occur in the technologies discussed herein, and that the disclosed systems and methods will be incorporated into such future embodiments. In sum, it should be understood that the application is capable of modification and variation.
[0296] All terms used in the claims are intended to be given their broadest reasonable constructions and their ordinary meanings as understood by those knowledgeable in the technologies described herein unless an explicit indication to the contrary in made herein. In particular, use of the singular articles such as “a,” “the,” “said,” etc. should be read to recite one or more of the indicated elements unless a claim recites an explicit limitation to the contrary.
[0297] The Abstract of the Disclosure is provided to allow the reader to quickly ascertain the nature of the technical disclosure. It is submitted with the understanding that it will not be used to interpret or limit the scope or meaning of the claims. In addition, in the foregoing Detailed Description, it can be seen that various features are grouped together in various embodiments for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments incorporate more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive subject matter lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby incorporated into the Detailed Description, with each claim standing on its own as a separately claimed subject matter.
Claims
1. CLAIMSWhat is claimed is:
1. A method for adaptive loop filtering, the method comprising:receiving an input image;receiving a filter set index indicative of a type of filtering to be applied to the input image; applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, andwherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; andapplying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
2. The method of claim 1, further comprising:applying a deblocking filter to an input sample to generate a deblocked image; and performing a sample adaptive offset operation on the deblocked image to generate the input image.
3. The method of claim 1, wherein the input image includes reconstructed luma samples before pre-deblock filtering.
4. The method of any one of claims 1 to 3, wherein the second filter is further configured to receive an output of the first filter.
5. The method of any one of claims 1 to 4, wherein the first filter is a 9x9 diamond filter, and wherein the second filter is a 13x13 diamond filter.
6. The method of any one of claims 1 to 5, further comprising:skipping, in response to the filter set index indicating not to apply adaptive filtering and to not apply static filtering, adaptive loop filtering of the input image.
7. The method of any one of claims 1 to 6, wherein at least one selected from the group consisting of the C0 classifier, the C1 classifier, and the C2 classifier indicate a classification and filtering operation, and wherein the classification and filtering operation is implemented at a 4x4 block level.
8. The method of claim 7, wherein the classification and filtering operation is implemented for a set of four 2x2 blocks within a certain 4x4 block.
9. The method of any one of claims 1 to 8, wherein applying, in response to the filter set index indicating to apply static filtering, the static filter to the input image includes applying the first filter and the second filter sequentially.
10. The method of any one of claims 1 to 8, wherein applying, in response to the filter set index indicating to apply static filtering, the static filter to the input image includes applying the first filter and the second filter in parallel.
11. The method of any one of claims 1 to 10, wherein applying, in response to the filter set index indicating to apply adaptive filtering, the adaptive filter to the input image includes applying the adaptive filter without referencing slice quantization parameters.
12. The method of any one of claims 1 to 11, wherein the adaptive filter is further configured to receive an output of a sample adaptive offset operation and the input image.
13. The method of any one of claims 1 to 12, wherein the first gradient directionality is a 4x4 gradient directionality, and wherein the second gradient directionality is a 12x12 gradient directionality.
14. A method for adaptive loop filtering, the method comprising:receiving an input image;applying a first filter to the input image, the first filter configured to receive a C0 classifier computed using a first gradient directionality;receiving a filter set index indicative of a type of filtering to be applied to the input image; applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image, wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; andapplying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
15. The method of claim 14, further comprising:applying a deblocking filter to an input sample to generate a deblocked image; and performing a sample adaptive offset operation on the deblocked image to generate the input image.
16. The method of claim 14 or 15, wherein the second filter is further configured to receive an output of the first filter.
17. The method of any one of claims 14 to 16, wherein the input image includes reconstructed luma samples before pre-deblock filtering.
18. The method of any one of claims 14 to 17, further comprising:skipping, in response to the filter set index indicating not to apply adaptive filtering and to not apply static filtering, adaptive loop filtering of the input image.
19. The method of any one of claims 14 to 18, wherein at least one selected from the group consisting of the C0 classifier, the C1 classifier, and the C2 classifier indicate a classification and filtering operation, and wherein the classification and filtering operation is implemented at a 4x4 block level.
20. The method of any one of claims 14 to 19. wherein the adaptive filter is further configured to receive an output of a sample adaptive offset operation, the input image, and an output of the first filter as inputs.
21. The method of any one of claims 14 to 20, wherein the first gradient directionality is a 4x4 gradient directionality, and wherein the second gradient directionality is a 12x12 gradient directionality.
22. A method for adaptive loop filtering, the method comprising:setting a filter index value indicating a type of filtering to be applied to an input image; and generating a bitstream including the input image, the filter index value and an ALF luma classifier index,wherein, in response to the filter index value indicating to apply adaptive filtering, an adaptive filter is applied to the input image included in the bitstream,wherein, in response to the filter index value not indicating to apply adaptive filtering, a static filter is applied to the input image included in the bitstream,wherein the adaptive filter is configured to receive a C2 classifier indicated by the ALF luma classifier index,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, andwherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
23. An apparatus comprising:an electronic processor configured to perform operations including the method of any one of claims 1-22.
24. A non-transitory computer-readable storage medium recording a program of instructions that is executable by a device to perform the method of any one of claims 1-22.
25. A video decoding apparatus comprising:a filter module configured to receive a filter set index indicative of a type of filtering to be applied to input samples, apply, in response to the filter set index indicating to apply static filtering, a static filter to the input samples, and apply, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input samples,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality,wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; andwherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
26. A non-transitory computer-readable medium for storing data associated with a video, comprising:a data stream stored in the non-transitory computer-readable medium, the data stream comprising a filter set index indicative of a type of filtering to be applied to input video content, wherein the filter set index indicates whether to apply a static filter or an adaptive filter to the input video content,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality,wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; andwherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
27. A method for adaptive loop filtering, the method comprising:receiving an input sample;receiving a filter set index indicative of a type of filtering to be applied to the input sample; andapplying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, andwherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
28. The method of claim 27, further comprising:performing a sample adaptive offset operation on an input image to generate the input sample without applying a deblocking filter to the input image.
29. The method of claim 28, wherein the first filter increases taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 13x13 diamond shape.
30. The method of claim 28, wherein the first filter increases taps included in the sample adaptive offset operation from a 9x9 diamond shape to an 11x11 diamond shape.
31. The method of claim 27, further comprising:applying a deblocking filter to an input image to generate a deblocked image; and performing a sample adaptive offset operation on the deblocked image to generate the input sample.
32. The method of claim 31, wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 7x7 diamond shape, andwherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 5x5 diamond shape.
33. The method of claim 31, wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 9x9 partial diamond shape, andwherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 9x9 partial diamond shape.
34. The method of claim 31, wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 7x7 partial square shape, andwherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 5x5 diamond shape.
35. The method of claim 31, wherein the first filter reduces taps included in the sample adaptive offset operation from a 9x9 diamond shape to a 7x7 partial square shape, andwherein the first filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 5x5 plus shape.
36. The method of claim 31, wherein the second filter reduces taps included in an output of the first filter from a 13x13 diamond shape to a 7x7 square shape, andwherein the second filter reduces taps included in the deblocking filter from a 9x9 diamond shape to a 9x9 plus shape.
37. The method of claim 31, wherein the second filter reduces taps included in an output of the first filter from a 13x13 diamond shape to a 9x9 square shape.
38. The method of claim 31, wherein the second filter reduces taps included in an output of the first filter from a 13x13 diamond shape to a 13x13 partial diamond shape.
39. The method of claim 27, wherein the first filter is configured to filter inner taps of the input samples, and wherein the second filter is configured to filter outer taps of the input sample.
40. The method of claim 27, wherein the first filter is configured to filter a first subset of the input sample, and wherein the second filter is configured to filter a second subset of the input sample.
41. The method of claim 27, wherein the first filter includes a classification window aligned with a NxN diamond shaped fixed filter or NxN square shaped fixed filter.
42. A video decoding apparatus comprising:a filter module configured to apply a deblocking filter to an input image to generate a deblocked image, perform a sample adaptive offset operation on the deblocked image to generate an input sample, receive a filter set index indicative of a type of filtering to be applied to the input sampleand apply, in response to the filter set index indicating to apply static filtering, a static filter to the input samples,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein the first filter reduces a number of taps included in the sample adaptive offset operation, andwherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
43. A non-transitory computer-readable medium for storing data associated with a video, comprising:a data stream stored in the non-transitory computer-readable medium, the data stream comprising a filter set index indicative of a type of filtering to be applied to input video content, wherein the filter set index indicates whether to apply a static filter to the input video content,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein the first filter reduces a number of taps included in a sample adaptive offset operation applied to the input video content, andwherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
44. A method for adaptive loop filtering, the method comprising:setting a filter index value indicating a type of filtering to be applied to an input image; and generating a bitstream including the input image, the filter index value and an ALF luma classifier index,wherein, in response to the filter index value indicating to apply adaptive filtering, an adaptive filter is applied to the input image included in the bitstream,wherein, in response to the filter index value not indicating to apply adaptive filtering, a static filter is applied to the input image included in the bitstream,wherein the adaptive filter is configured to receive a C2 classifier indicated by the ALF luma classifier index, wherein the C2 classifier is a variance-based classifier configured to implement SAO samples to determine a variance between blocks,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality,wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality.
45. A method for adaptive loop filtering, the method comprising:receiving an input sample;receiving a filter set index indicative of a type of filtering to be applied to the input sample; andapplying, in response to the filter set index indicating to apply static filtering, a static filter to the input sample,wherein the static filter includes a first filter configured to receive a CO classifier, wherein the CO classifier is a gradient-activity based classifier, andwherein the static filter includes a second filter configured to receive a Cl classifier, wherein the Cl classifier is a variance-band based classifier.
46. The method of claim 45, wherein clipping indices associated with the first filter and the second filter are implemented independent of quantization parameter values.
47. The method of claim 45, wherein clipping indices associated with the first filter are a function of the C0 classifier, and wherein clipping indices associated with the second filter are a function of the C1 classifier.
48. The method of any one of claims 45 to 47, wherein the C0 classifier derives classes using SAO samples for a 4x4 gradient and activity window.
49. The method of any one of claims 45 to 48, wherein the C1 classifier derives variance characteristics of a 10x10 window and band characteristics using SAO samples.
50. A method for adaptive loop filtering, the method comprising:receiving an input image;receiving a filter set index indicative of a type of filtering to be applied to the input image;applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, andwherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality; andapplying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a variance-based classifier, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier computed based on a variance between SAO samples.
51. The method of claim 50, further comprising:applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a band-based classifier, the adaptive filter to the input image, wherein the adaptive filter is configured to receive the C2 classifier computed based on a sum of luma samples in a luma block.
52. The method of claim 50 or 51, further comprising:applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a residual-based classifier, the adaptive filter to the input image, wherein the adaptive filter is configured to receive the C2 classifier computed based on residual samples.
53. The method of any one of claims 50 to 52, further comprising:applying, in response to the filter set index indicating to apply adaptive filtering and in response to the filter set index indicating a gradient-activity-based classifier, the adaptive filter to the input image, wherein the adaptive filter is configured to receive the C2 classifier computed based on gradient and activity characteristics for a 12x12 window using SAO samples.
54. A method for adaptive loop filtering, the method comprising:receiving an input image;receiving a filter set index indicative of a type of filtering to be applied to the input image;applying, in response to the filter set index indicating to apply static filtering, a static filter to the input image,wherein the static filter includes a first filter configured to receive a C0 classifier computed using a first gradient directionality, wherein inter and intra mode information is implemented to apply first scaling factors to the first filter;wherein the static filter includes a second filter configured to receive a C1 classifier computed using a second gradient directionality, wherein the inter and intra mode information is implemented to apply second scaling factors to the second filter; andapplying, in response to the filter set index indicating to apply adaptive filtering, an adaptive filter to the input image, wherein the adaptive filter is configured to receive a C2 classifier indicated by an ALF luma classifier index.
55. The method of claim 54, wherein the C2 classifier is computed at the slice level.
56. The method of claim 54, wherein the C2 classifier is signaled at the APS level.
57. The method of any one of claims 54 to 56. wherein a set of weight patterns are applied to the C0 classifier and the C1 classifier.
58. The method of claim 57, wherein the set of weight patterns follow a Gaussian distribution.
59. The method of claim 57, wherein the set of weight patterns follow a Laplacian distribution.
60. The method of claim 57, wherein a single weight pattern is applied for all filter shapes.
61. An apparatus comprising:an electronic processor configured to perform operations including the method of any one of claims 44-60.
62. A non-transitory computer-readable storage medium recording a program of instructions that is executable by a device to perform the method of any one of claims 44-60.