Adaptive loop filter with coding information based classification

By classifying video blocks based on coding information and applying adaptive loop filters, the method addresses the challenge of reconstruction artifacts in HEVC and VVC, enhancing video quality and coding efficiency.

WO2025152810A1PCT designated stage expired Publication Date: 2025-07-24MEDIATEK INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/070917
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-18
Filing Date
2025-01-07
Publication Date
2025-07-24

AI Technical Summary

Technical Problem

Existing video coding standards face challenges in effectively classifying and filtering video blocks to minimize reconstruction artifacts, particularly in high-efficiency video coding (HEVC) and versatile video coding (VVC), where current methods do not adequately utilize coding information for adaptive loop filtering.

Method used

The method involves classifying current samples of a video block based on coding information independent of pixel values, using metrics such as distance from block boundaries, prediction modes, and spatial neighbors, to select an appropriate adaptive loop filter for filtering.

Benefits of technology

This approach enhances video quality by reducing reconstruction artifacts and improving coding efficiency through targeted filtering, aligning block directionality, and utilizing coding information for adaptive loop filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025070917_24072025_PF_FP_ABST
    Figure CN2025070917_24072025_PF_FP_ABST
Patent Text Reader

Abstract

A method for coding video pictures by adaptive loop filter (ALF) is provided. A video coder classifies a current sample of a current block of a current picture by identifying at least one class from a plurality of classes by using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors. The coding information used for classifying the current sample may include a distance of the current sample from a boundary of the current block, or a prediction mode of the current block, or a prediction category of the current block that is one of first, second, third prediction categories. The video coder selects a filter based on the identified class. The video coder applies the selected filter to the current sample to generate a filtered sample as part of a reconstruction of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

ADAPTIVE LOOP FILTER WITH CODING INFORMATION BASED CLASSIFICATIONCROSS REFERENCE TO RELATED PATENT APPLICATION (S)

[0001] The present disclosure is part of a non-provisional application that claims the priority benefit of U.S. Provisional Patent Application No. 63 / 622,099, filed on 18 January 2024. Content of above-listed application is herein incorporated by reference.TECHNICAL FIELD

[0002] The present disclosure relates generally to video coding. In particular, the present disclosure relates to methods of coding video pictures by using adaptive loop filter.BACKGROUND

[0003] Unless otherwise indicated herein, approaches described in this section are not prior art to the claims listed below and are not admitted as prior art by inclusion in this section.

[0004] High-Efficiency Video Coding (HEVC) is an international video coding standard developed by the Joint Collaborative Team on Video Coding (JCT-VC) . HEVC is based on the hybrid block-based motion-compensated DCT-like transform coding architecture. The basic unit for compression, termed coding unit (CU) , is a 2Nx2N square block of pixels, and each CU can be recursively split into four smaller CUs until the predefined minimum size is reached. Each CU contains one or multiple prediction units (PUs) .

[0005] Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Expert Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11. The input video signal is predicted from the reconstructed signal, which is derived from the coded picture regions. The prediction residual signal is processed by a block transform. The transform coefficients are quantized and entropy coded together with other side information in the bitstream. The reconstructed signal is generated from the prediction signal and the reconstructed residual signal after inverse transform on the de-quantized transform coefficients. The reconstructed signal is further processed by in-loop filtering for removing coding artifacts. The decoded pictures are stored in the frame buffer for predicting the future pictures in the input video signal.

[0006] In VVC, a coded picture is partitioned into non-overlapped square block regions represented by the associated coding tree units (CTUs) . The leaf nodes of a coding tree correspond to the coding units (CUs) . A coded picture can be represented by a collection of slices, each comprising an integer number of CTUs. The individual CTUs in a slice are processed in raster-scan order. A bi-predictive (B) slice may be decoded using intra prediction or inter prediction with at most two motion vectors (MVs) and reference indices to predict the sample values of each block. A predictive (P) slice is decoded using intra prediction or inter prediction with at most one motion vector and reference index to predict the sample values of each block. An intra (I) slice is decoded using intra prediction only.

[0007] A CTU can be partitioned into one or multiple non-overlapped coding units (CUs) using the quadtree (QT) with nested multi-type-tree (MTT) structure to adapt to various local motion and texture characteristics. A CU can be further split into smaller CUs using one of the five split types: quad-tree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical center-side triple-tree partitioning, horizontal center-side triple-tree partitioning.

[0008] Each CU contains one or more prediction units (PUs) . The prediction unit, together with the associated CU syntax, works as a basic unit for signaling the predictor information. The specified prediction process is employed to predict the values of the associated pixel samples inside the PU. Each CU may contain one or more transform units (TUs) for representing the prediction residual blocks. A transform unit (TU) is comprised of a transform block (TB) of luma samples and two corresponding transform blocks of chroma samples and each TB correspond to one residual block of samples from one color component. An integer transform is applied to a transform block. The level values of quantized coefficients together with other side information are entropy coded in the bitstream. The terms coding tree block (CTB) , coding block (CB) , prediction block (PB) , and transform block (TB) are defined to specify the 2-D sample array of one-color component associated with CTU, CU, PU, and TU, respectively. Thus, a CTU consists of one luma CTB, two chroma CTBs, and associated syntax elements. A similar relationship is valid for CU, PU, and TU.

[0009] For each inter-predicted CU, motion parameters consisting of motion vectors, reference picture indices and reference picture list usage index, and additional information are used for inter-predicted sample generation. The motion parameter can be signalled in an explicit or implicit manner. When a CU is coded with skip mode, the CU is associated with one PU and has no significant residual coefficients, no coded motion vector delta or reference picture index. A merge mode is specified whereby the motion parameters for the current CU are obtained from neighbouring CUs, including spatial and temporal candidates, and additional schedules introduced in VVC. The merge mode can be applied to any inter-predicted CU. The alternative to merge mode is the explicit transmission of motion parameters, where motion vector, corresponding reference picture index for each reference picture list and reference picture list usage flag and other needed information are signalled explicitly per each CU.

[0010] Intra block copy (IBC) or current picture referencing (CPR) refer to coding pixel blocks by referencing pixel positions within same current picture as the current block by using block vectors.

[0011] In advanced motion vector prediction (AMVP) mode, a motion vector predictor (MVP) candidate is determined based on template matching (TM) error to select the one that reaches the minimum difference between the current block template and the reference block template, and then TM is performed only for this particular MVP candidate for MV refinement. The TM process may refine this MVP candidate using iterative search according to an adaptive motion vector resolution (AMVR) mode search pattern.SUMMARY

[0012] The following summary is illustrative only and is not intended to be limiting in any way. That is, the following summary is provided to introduce concepts, highlights, benefits and advantages of the novel and non-obvious techniques described herein. Select and not all implementations are further described below in the detailed description. Thus, the following summary is not intended to identify essential features of the claimed subject matter, nor is it intended for use in determining the scope of the claimed subject matter.

[0013] Some embodiments of the disclosure provide a method for coding video pictures by adaptive loop filter (ALF) . A video coder classifies a current sample of a current block of a current picture by identifying at least one class from a plurality of classes by using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors. The video coder selects a filter based on the identified class. The video coder applies the selected filter to the current sample to generate a filtered sample as part of a reconstruction of the current block.

[0014] In some embodiments, the coding information used for classifying the current sample comprises a distance of the current sample from a boundary of the current block. The boundary is determined by a prediction mode of the current block, such as when the boundary is determined by geometric partitioning of the current block.

[0015] In some embodiments, the coding information used for classifying the current sample is based on horizontal and vertical distances of the current sample from the top-left sample of the current block. In some embodiments, the coding information used for classifying the current sample comprises a sum of the horizontal and vertical distances. In some embodiments, the coding information used for classifying the current sample comprises a minimum value between the horizontal and vertical distances. In some embodiments, the distances from a boundary of the current block or the distances from a top-left sample of the current block are discretized for use as the coding information by one or more thresholds that are predefined or determined based on a size of the current block.

[0016] In some embodiments, the coding information used for classifying the current sample comprises a prediction mode of the current block, such as whether the current block is coded by intra prediction, inter prediction, or intra block copy (IBC) , or whether the current block is coded by translation motion (or a motion type of the prediction mode) , or whether the current block is coded by uni-prediction or bi-prediction (or a prediction direction of the prediction mode) .

[0017] In some embodiments, the coding information used for classifying the current sample comprises a prediction category of the current block that is one of first, second, third prediction categories. The first prediction category indicates that the prediction is based on samples (in an L-shaped region) spatially neighboring the current block. The second prediction category indicates that the prediction is based on one uni-prediction motion or block vector. The third prediction category indicates that the prediction is based on bi-prediction motion or block vectors. In some embodiments, a class index is signaled to indicate the identified class and the prediction category.

[0018] In some embodiments, the video coder also classifies the current sample based on pixel values of the current sample and of its spatial neighbors (e.g., by determining directionality gradient, etc. ) in addition to being based on the coding information.

[0019] In some embodiments, the video coder identifies a first class using the coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors, and then the video coder further classifies the current sample by identifying a second class based on pixel values of the current sample and of its spatial neighbors, and the filter is selected based on the first identified class and the second identified class. More generally, in some embodiments, the video coder may identify first and second classes based on coding information and / or pixel values of the current sample and its neighbors, then use the first identified class to select a class-to-filter mapping, which maps the second identified class to determine the filter to be used.BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are included to provide a further understanding of the present disclosure, and are incorporated in and constitute a part of the present disclosure. The drawings illustrate implementations of the present disclosure and, together with the description, serve to explain the principles of the present disclosure. It is appreciable that the drawings are not necessarily in scale as some components may be shown to be out of proportion than the size in actual implementation in order to clearly illustrate the concept of the present disclosure.

[0021] FIG. 1A-B illustrates two diamond filter shapes for Adaptive Loop Filters (ALF) .

[0022] FIG. 2 illustrates a system level diagram of loop filters.

[0023] FIG. 3 illustrates filtering in cross-component ALF (CC-ALF) .

[0024] FIG. 4 illustrates a 25-tap large filter used in CCALF process.

[0025] FIG. 5 illustrates a CCALF filter with 5 luma residual taps in a cross 3x3 shape.

[0026] FIGS. 6A-B illustrate the two candidate filter shapes that are adaptively selected for ALF.

[0027] FIG. 7 illustrates the four types of filter taps for ALF online-trained filters.

[0028] FIG. 8 illustrates an additional fixed filter.

[0029] FIG. 9 illustrates an example video encoder that implement adaptive loop filters (ALF) .

[0030] FIG. 10 illustrates portions of the video encoder that implement ALF with classification based on coding information.

[0031] FIG. 11 conceptually illustrates a process that applies ALF using classifiers that are based on coding information.

[0032] FIG. 12 illustrates an example video decoder that implement adaptive loop filters (ALF) .

[0033] FIG. 13 illustrates portions of the video decoder that implement ALF with classification based on coding information.

[0034] FIG. 14 conceptually illustrates a process that applies ALF using classifiers that are based on coding information.

[0035] FIG. 15 conceptually illustrates an electronic system with which some embodiments of the present disclosure are implemented.DETAILED DESCRIPTION

[0036] In the following detailed description, numerous specific details are set forth by way of examples in order to provide a thorough understanding of the relevant teachings. Any variations, derivatives and / or extensions based on teachings described herein are within the protective scope of the present disclosure. In some instances, well-known methods, procedures, components, and / or circuitry pertaining to one or more example implementations disclosed herein may be described at a relatively high level without detail, in order to avoid unnecessarily obscuring aspects of teachings of the present disclosure. I. Adaptive Loop Filter

[0037] Adaptive Loop Filter (ALF) is an in-loop filtering technique used in video coding standards such as VVC. It is a block-based filter that minimizes the mean square error between original and reconstructed samples. The reconstructed samples are classified into multiple classes based on local activity and directionality. Then, the samples in each class are filtered with an FIR-filter for that class.

[0038] A. Classification and Filtering

[0039] For the luma component in ALF, each 4×4 block is categorized into one out of 25 classes, and one among 25 filters is selected for each 4×4 block, based on the block’s class (which is determined according to the block’s direction and activity of local gradients) . A classification index C is derived based on its directionality D and a quantized value of activity according to the following:

[0040] To calculate D and gradients of the horizontal, vertical and two diagonal directions are first calculated using 1-D Laplacian:

[0041] Where indices i and j refer to the coordinates of the upper left sample within the 4×4 block and R (i, j) indicates a reconstructed sample at coordinate (i, j) . To reduce the complexity of block classification, the subsampled 1-D Laplacian calculation may be applied. The same subsampled positions may be used for gradient calculation of all directions. (The subsampled positions may be for vertical gradient, horizontal gradient, or diagonal gradient. ) The D maximum and minimum values of the gradients of horizontal and vertical directions are set as:

[0042] The maximum and minimum values of the gradient of two diagonal directions are set as:

[0043] To derive the value of the directionality D, these values are compared against each other and with two thresholds t1 and t2: Step 1. If both and are true, D is set to 0. Step 2. If continue from Step 3; otherwise continue from Step 4. Step 3. If D is set to 2; otherwise D is set to 1. Step 4. If D is set to 4; otherwise D is set to 3.

[0044] The activity value A is calculated as:

[0045] A is further quantized to the range of 0 to 4, inclusively, and the quantized value is denoted as  For chroma components in a picture, no classification method is applied.

[0046] Before filtering each 4×4 luma block, geometric transformations such as rotation or diagonal and vertical flipping are applied to the filter coefficients f (k, l) and to the corresponding filter clipping values c (k, l) depending on gradient values calculated for that block. This is equivalent to applying these transformations to the samples in the filter support region. The idea is to make different blocks to which ALF is applied more similar by aligning their directionality. There are three geometric transformations, including diagonal, vertical flip and rotation are introduced: Diagonal: fD (k, l) =f (l, k) , cD (k, l) =c (l, k) , Vertical flip: fV (k, l) =f (k, K-l-1) , cV (k, l) =c (k, K-l-1) Rotation: fR (k, l) =f (K-l-1, k) , cR (k, l) =c (K-l-1, k)

[0047] where K is the size of the filter and 0 ≤ k, l ≤ K-1 are coefficients coordinates, such that location (0, 0) is at the upper left corner and location (K-1, K-1) is at the lower right corner. The transformations are applied to the filter coefficients f (k, l) and to the clipping values c (k, l) depending on gradient values calculated for that block. The relationship between the transformation and the four gradients of the four directions are summarized in Table 1 below that shows Mapping of the gradient calculated for one block and transformation. Table 1:

[0048] At decoder side, when ALF is enabled for a CTB, each sample R' (i, j) within the CU is filtered, resulting in sample value R' (i, j) as shown below:

[0049] where f (k, l) denotes the decoded filter coefficients, K (x, y) is the clipping function and c (k, l) denotes the decoded clipping parameters. The variable k and l vary between -L / 2 and L / 2, wherein L denotes the filter length. The clipping function K (x, y) = min (y, max (-y, x) ) which corresponds to the function Clip3 (-y, y, x) . The clipping operation introduces non-linearity to make ALF more efficient by reducing the impact of neighbor sample values that are too different with the current sample value.

[0050] FIG. 1A-B illustrates two diamond filter shapes for Adaptive Loop Filters (ALF) . Each position in a diamond correspond to a filter tap having a filter coefficient. FIG. 1A shows a 7×7 diamond shape having taps with filter coefficients C0-C12 that is applied for luma component. FIG. 1B shows a 5×5 diamond shape with filter coefficients C0-C6 that is applied for chroma components.

[0051] B. Cross Component Adaptive Loop Filter (CC-ALF)

[0052] Cross Component ALF (CC-ALF or CCALF) may use luma sample values to refine each chroma component by applying an adaptive, linear filter to the luma channel and then using the output of this filtering operation for chroma refinement. FIG. 2 illustrates a system level diagram of in-loop filters 200, in which reconstructed or decoded pixel data 210 are filtered or processed by deblock filter (DBF) , sample adaptive offset (SAO) , and adaptive filter (ALF) . The reconstructed or decoded samples 210 may be generated from prediction signals and residual signals of the current block.

[0053] The figure shows placement of CC-ALF with respect to other loop filters. Specifically, the luma component of the SAO output is processed by a luma ALF process (ALF Y) and a pair of cross-component ALF processes (CC-ALF Cb and CC-ALF Cr) . The two cross-component ALF processes generate cross-component offset for Cb and Cb components to be added to the output of a chroma ALF process (ALF chroma) to generate ALF output for the chroma components. The luma and chroma components of the ALF output are then stored in a reconstructed or decoded picture buffer 290 to be used for predictive coding of subsequent pixel blocks.

[0054] FIG. 3 illustrates filtering in cross-component ALF (CC-ALF) , which is accomplished by applying a linear, diamond shaped filter 310 to the luma channel. One filter is used for each chroma channel, and the operation is expressed as

[0055] where (x, y) is chroma component i location being refined (xY, yY) is the luma location based on (x, y) , Si is filter support area in luma component, ci (x0, y0) represents the filter coefficients. As shown in FIG. 3, the luma filter support is the region collocated with the current chroma sample after accounting for the spatial scaling factor between the luma and chroma planes.

[0056] CC-ALF filter coefficients may be computed by minimizing the mean square error of each chroma channels with respect to the original chroma content. To achieve this, an algorithm may use a coefficient derivation process similar to the one used for chroma ALF. Specifically, a correlation matrix is derived, and the coefficients are computed using a Cholesky decomposition solver in an attempt to minimize a mean square error metric. In designing the filters, a maximum of 8 CC-ALF filters can be designed and transmitted per picture. The resulting filters are then indicated for each of the two chroma channels on a CTU basis.

[0057] CC-ALF filtering may use a 3x4 diamond shape with 8 filter taps, with 7 filter coefficients transmitted in the APS (may be referenced in the slice header) . Each of the transmitted coefficients has a 6-bit dynamic range and is restricted to power-of-2 values. The 8th filter coefficient is derived at the decoder such that the sum of the filter coefficients is equal to 0. CC-ALF filter selection may be controlled at CTU-level for each chroma component. Boundary padding for the horizontal virtual boundaries may the same memory access pattern as luma ALF.

[0058] As an additional feature, the reference encoder can be configured to enable some basic subjective tuning through the configuration file. When enabled, the VTM attenuates the application of CC-ALF in regions that are coded with high quantization parameter (QP) and are either near mid-grey or contain a large amount of luma high frequencies. Algorithmically, this is accomplished by disabling the application of CC-ALF in CTUs where any of the following conditions are true: (i) The slice QP value minus 1 is less than or equal to the base QP value (ii) The number of chroma samples for which the local contrast is greater than  (1 << (bitDepth –2) ) –1 exceeds the CTU height, where the local contrast is the difference between the maximum and minimum luma sample values within the filter support region (iii) More than a quarter of chroma samples are in the range between (1 << (bitDepth –1) ) –16  and (1 << (bitDepth –1) ) + 16

[0059] This is for providing some assurance that CC-ALF does not amplify artifacts introduced earlier in the decoding path.

[0060] C. Filter Parameter Signaling

[0061] ALF filter parameters are signalled in Adaptation Parameter Set (APS) . In one APS, up to 25 sets of luma filter coefficients and clipping value indexes, and up to eight sets of chroma filter coefficients and clipping value indexes could be signalled. To reduce bits overhead, filter coefficients of different classification for luma component can be merged. In slice header, the indices of the APSs used for the current slice are signaled.

[0062] Clipping value indexes, which are decoded from the APS, allow determining clipping values using a table of clipping values for both luma and Chroma components. These clipping values are dependent of the internal bit-depth. More precisely, the clipping values are obtained by the following formula: ALFClip = {round (2B-α*n) for n ∈ [0…N-1] }

[0063] with B equal to the internal bit-depth, α is a pre-defined constant value equal to 2.35, and N equal to 4 which is the number of allowed clipping values in VVC. The ALFClip is then rounded to the nearest value with the format of power of 2.

[0064] In slice header, up to 7 APS indices can be signaled to specify the luma filter sets that are used for the current slice. The filtering process can be further controlled at CTB level. A flag is always signalled to indicate whether ALF is applied to a luma CTB. A luma CTB can choose a filter set among 16 fixed filter sets and the filter sets from APSs. A filter set index is signaled for a luma CTB to indicate which filter set is applied. The 16 fixed filter sets are pre-defined and hard-coded in both the encoder and the decoder.

[0065] For chroma components, an APS index may be signaled in slice header to indicate the chroma filter sets being used for the current slice. At CTB level, a filter index is signaled for each chroma CTB if there is more than one chroma filter set in the APS. The filter coefficients are quantized with norm equal to 128. In order to restrict the multiplication complexity, a bitstream conformance is applied so that the coefficient value of the non-central position shall be in the range of -27 to 27 -1, inclusive. The central position coefficient is not signalled in the bitstream and is considered as equal to 128.

[0066] D. ALF Simplifications and Extensions

[0067] In some embodiments, ALF gradient subsampling and ALF virtual boundary processing are removed. Block size for classification is reduced from 4x4 to 2x2. Filter size for both luma and chroma, for which ALF coefficients are signalled, is increased to 9x9.

[0068] To filter a luma sample, three different classifiers (C0, C1 and C2) and three different sets of filters (F0, F1 and F2) may be used. Filter sets F0 and F1 contain fixed filters, with coefficients trained for classifiers C0 and C1. Filter coefficients for filter set F2 are explicitly signaled. Which filter from a set Fi is used for a given sample is decided by a class Ci assigned to this sample using classifier Ci.

[0069] Thus, to filter one luma sample, C0 and C1 classifiers are applied to the sample (i.e., applied to the 2x2 block that includes that sample) to determine its C0 and C1 classification, then two 13x13 diamond shape fixed filters F0 and F1 are applied (based on their respective C0 and C1 classifications) to derive two intermediate samples R0 (x, y) and R1 (x, y) . After that, F2 is applied to R0 (x, y) and R1 (x, y) and neighboring samples to derive a filtered sample as:

[0070] where fi, j is the clipped difference between a neighboring sample and current sample R (x, y) and gi is the clipped difference between Ri-20 (x, y) and the current sample. The filter coefficients ci, i = 0, …21, are signaled.

[0071] To classify the samples, a class Ci is assigned to each 2x2 block based on directionality Di and activity

[0072] where MD, i represents the total number of directionalities Di. The values of the horizontal, vertical, and two diagonal gradients may be calculated for each sample using 1-D Laplacian. The sum of the sample gradients within a 4×4 window that covers the target 2×2 block is used for classifier C0 and the sum of sample gradients within a 12×12 window is used for classifiers C1 and C2. The sums of horizontal, vertical and two diagonal gradients are denoted, respectively, as and The directionality Di is determined by comparing:

[0073] with a set of thresholds. The directionality D2 is derived using thresholds 2 and 4.5. For D0 and D1, horizontal / vertical edge strength and diagonal edge strength are calculated first. Thresholds Th = [1.25, 1.5, 2, 3, 4.5, 8] are used. Edge strength is 0 if otherwise,  is the maximum integer such that Edge strength is 0 if otherwise,  is the maximum integer such that Table 2 (a) and Table 2 (b) below show Mapping of EiD and EiHV to Di. When i.e., horizontal / vertical edges are dominant, Di is derived by using Table 2 (a) below. Otherwise, diagonal edges are dominant, and Di is derived by using Table 2 (b) . Table 2 (a) : Table 2 (b) :

[0074] To obtain activity the sum of vertical and horizontal gradients Ai is mapped to the range of 0 to n, where n is equal to 4 for and 15 for and In an ALF_APS, up to 4 luma filter sets are signalled, each set may have up to 25 filters.

[0075] Classification in ALF may be extended with an additional alternative classifier. For a signaled luma filter set, a flag may be signaled to indicate whether the alternative classifier is applied. Geometrical transformation is not applied to the alternative band classifier. When the band-based classifier is applied, the sum of sample values of a 2x2 luma block is calculated at first. Then the class index is calculated as below, class_index = (sum *25) >> (sample bit depth + 2) .

[0076] In some embodiments, a third classifier based on luma residual sample values may be used. For each 2x2 luma block, the sum of absolute values of the residual samples in a neighboring 8x8 window is calculated, and the class index is derived as: classIdx = sum >> (sample bit depth –4) .

[0077] For some embodiments, the value of classIdx is in the range of 0 to 24. The classifier usage is signaled for each luma filter set in APS.

[0078] The CCALF process uses a linear filter to filter luma sample values and generate a residual correction for the chroma samples. FIG. 4 illustrates a 25-tap large filter used in CCALF process. For a given slice, the encoder can collect the statistics of the slice, analyze them and can signal up to 16 filters through APS.

[0079] In some embodiments, for CCALF, five luma residual taps in a cross 3x3 shape are added. The extended taps take the co-located and neighboring luma residual values as input. FIG. 5 illustrates a CCALF filter with 5 luma residual taps in a cross 3x3 shape. The 3x3 cross shape luma residual filter is used in conjunction with a cross 9x9 CCALF filter.

[0080] In some embodiments, two candidate filter shapes can be adaptively selected by the luma filters in ALF. FIGS. 6A-B illustrate the two candidate filter shapes that are adaptively selected for ALF. FIG. 6A shows a first candidate filter shape is a diamond shape and FIG. 6B shows a second candidate filter shape that is a cross shape. The number of coefficients of a luma filter is 22 for both the filter shapes. In some embodiments, these 22 taps are constituted with 20 spatial taps and 2 fixed filters based taps in both shapes.

[0081] In each adaptation parameter set (APS) , a shape index for the derived luma filters is signaled to decoder. Each APS contains the luma filters that are associated with the filter shape index. For each CTB, an APS index is signaled to indicate which luma filter shape is used to filter the current CTB. When filtering a luma sample, the coefficients and clip indices are also rearranged according to the corresponding filter shape. In some embodiments, the diamond shaped luma ALF is replaced by the longer diamond shaped filter shown in FIG. 6B.

[0082] In some embodiments, the samples before deblocking filters are used as additional inputs for ALF. A final ALF sample is derived by weighting the regular ALF and the filter applied to the samples before the deblocking filter. Specifically, a filtered sample is derived as

[0083] where fi, j is the clipped difference between a neighboring sample and current sample R (x, y) , gi is the clipped difference between an intermediate sample and current sample R (x, y) and hi, j is the clipped difference between a neighboring sample before DBF and current sample R (x, y) . The filter coefficients ci, i=0, …24 are signalled. In this test, 3x3 diamond shape is applied to samples before deblocking filter. In an APS, a flag is signalled to indicate whether samples before DBF are used for ALF which is always set as true at encoder.

[0084] There are four types of filter taps for ALF online-trained filters: spatial taps, reconstruction-before-DBF based taps, residual based taps and fixed-filter-output based taps. FIG. 7 illustrates the four types of filter taps for ALF online-trained filters.

[0085] In some embodiments, the residual samples are used as additional inputs to the ALF. A filtered sample is derived as:

[0086] where ri is the clipped neighboring residual sample value and rFilteredi is the clipped residual sample filtered by the fixed-filter. For residual samples, the fixed filter reuses the offline fixed filter trained for reconstruction after SAO.

[0087] In some embodiments, additional fixed filter with a shape of diamond 7x7 is used. The filter parameters are stored at both encoder and decoder. There is no classification for the newly added fixed filter. FIG. 8 illustrates an additional fixed filter. The additional fixed filter includes spatial taps (i.e., tap 0 ~ 19) , reconstruction-before-DBF-based taps (i.e., taps 26, 27, 36) , residual-based taps (i.e., 37 ~ 38) and fixed-filter-output-based taps (i.e., tap 20 ~ 25, 34, 35) , as well as extended taps (i.e., tap 28 ~ 33, 39) that are added into luma online-trained filters. The reconstruction before DBF is fed into the additional fixed filter to produce the filter outputs, then these filter outputs are used as input for newly extended taps. In some embodiments, this additional fixed filter is always enabled without any filter shape switching.

[0088] In some embodiments, two Laplacian-based classifiers (one for each fixed filter) are applied to a 2x2 block. In each classifier, activity and directionality values are derived based on vertical, horizontal, and diagonal gradients using a window surrounding each 2x2 block. For each 2x2 block, the mean value of a surrounding window is calculated. Then, for each sample of this window, the difference between the sample value and the mean value is calculated. A scaling factor is determined based on the activity value derived from a Laplacian classifier. The square root of the sum of the squared differences is further quantized to C′by a scaling factor. The value of C′is an integer between 0 and 7, inclusively. With i=0, 1, let Ci denote the classifier from the classifier of i-th fixed filter. Then the class index Ci′is derived as Ci′= C′*896 + Ci. The total number of the fixed filters is not changed.

[0089] Then a class index is determined based on the activity and directionality values. Two diamond shaped fixed filters are selected from the two filter sets by using the derived two class indices. Both fixed filters are applied to samples before DBF and ALF input, where additional diamond 9x9 filter is used for the samples before DBF. The shape of the first fixed filter applied to the ALF input samples is reduced from 13x13 to 9x9, and the shape of the second fixed filter, which is 13x13, applied to ALF input is unchanged.

[0090] Fixed filter f1 is applied to outputs of f0 (instead of ALF input) and samples before DBF. A signaled filter is applied to the ALF input samples, samples before the deblocking filter (DBF) , outputs of the two fixed filters, output of a gaussian filter and the residual data.

[0091] D. ALF Coding Information Based Classification

[0092] In some embodiments, a distance between the sample / block and a boundary is used for ALF classification for a current sample / block. Specifically, the boundary could be a CU boundary, or a boundary determined by prediction mode of a CU. For a first example, in some embodiments, when assessing a sample within a CU, the top left sample of the CU is first located. The horizontal and vertical differences are computed from the current sample to the CU's top left sample. The sum of these horizontal and vertical differences provides a spatial metric, which is used in the ALF classification of the current sample.

[0093] For a second example, in some embodiments, for a sample within a CU, the top left sample of the CU is first identified. The horizontal and vertical differences are calculated as in the first example. The minimum of these two differences is then selected as a spatial metric to be utilized in the ALF classification of the current sample.

[0094] For a third example, in some embodiments, for a current sample / block, if the corresponding CU is coded with geometric partition mode (GPM) or spatial GPM (SGPM) , which geometrically partitions the CU by a “boundary” that is determined by the angle and the distance indicated by the GPM coding information. A distance is further calculated between the current sample / block and the boundary, and this distance is used in the ALF classification of the current sample / block.

[0095] In the above examples (first, second, and third examples) , the distance may be discretized by one or more thresholds to classify the samples / blocks. For example, for one CU with size 16x16, the 2 samples at four boundaries are labeled as boundary samples, the samples located in the center 12x12 region are labeled as inner samples, such that the distances being considered for classifying the sample is expressed in term of whether the sample is a “boundary sample” or “inner sample” . In such design, the size (2 samples) can be one fixed pre-defined value or dependent on CU size and / or prediction mode.

[0096] In some embodiments, when performing ALF classification for a current sample / block, data related to prediction mode of the corresponding CU is used. Specifically, the data used for ALF classification may include one or more of the following: (1) prediction mode: intra, inter, or intra block copy (IBC) ; (2) motion type: translational motion or not; (3) prediction direction: uni-prediction or bi-prediction.

[0097] In some embodiments, for a current sample / block, based on prediction mode of the corresponding CU, the current sample / block is categorized into one of three categories: (1) If the prediction is based on the L-shape (e.g., all intra modes excluding intraTMP modes) , the sample / block belongs to category 1; (2) if the prediction is based on the motion / block vectors with uni-prediction (e.g., all inter modes with uni-prediction, intraTMP, and IBC modes) , the sample / block belongs to category 2; (3) if the prediction is based on the motion / block vectors with bi-prediction (e.g., all inter modes with bi-prediction) , the sample / block belongs to category 3. These three categories (1, 2, or 3) are further used in the ALF classification of the current sample / block.

[0098] In some embodiments, if the prediction is based on the L-shape (e.g., all intra modes excluding intraTMP modes) , the sample / block belongs to category 1; if the prediction is based on the motion / block vectors with translational motion (e.g., all inter modes excluding affine modes, intraTMP, and IBC modes) , the sample / block belongs to category 2; if the prediction is based on the motion / block vectors with non-translational motion (e.g., affine modes) , the sample / block belongs to category 3. The category (1, 2, or 3) is further used in the ALF classification of the current sample / block.

[0099] In the above embodiments, the design may be combined with the existing classifiers (i.e., gradient-based, band, residual band classifiers) .

[0100] In some embodiments, the original class indices 1–24 output by the original classifier are reduced by 1 and then divided by 3 to create new class indices. Next, each class is categorized into one of the three categories mentioned above. Map the three categories to the new class indices such that category 1 corresponds to class indices 1–3, category 2 corresponds to class indices 4–6, and so on. Class 0 is not changed in order to keep the number of classes consistent. Table 3 below shows the mapping of class indices based on the three categories: Table 3:

[0101] In some embodiments, based on first, second and third examples mentioned above in this section, for any classifier, every two adjacent classes can be merged into a new one, thereby halving the total number of classes. A threshold can then be established. For every new class, samples with distances below and above the threshold are classified into two distinct classes. This results in the total number of classes remaining the same, while the samples are now classified based on two dimensions: the original one and another using coding information.

[0102] In some embodiments, as an alternative way to combine the above embodiments with the existing classifiers, multiple class-to-filter mappings may be determined. The coding information is used to select one of the class-to-filter mappings, with the existing classifier unchanged. For example, all samples / blocks are categorized into 25 classes using one of the existing classifiers. However, for the sample / blocks near a CU boundary, one class-to-filter mapping is used; for the rest inner sample / blocks, another class-to-filter mapping is used. In some embodiments, when residual is used in ALF classification, the sign of residual is considered. This mapping approach allows more complex classifiers, such as the gradient classifier, to better adapt to the added information.

[0103] In some embodiments, for the residual classifier, both the sum and the sum of the absolute values are calculated for every 8x8 block. A new value, referred to as the “signed absolute sum” is then created by carrying the sign from the algebraic sum to the sum of the absolute values. Compared to a conventional ALF residual band classifier, the number of digits shifted to calculate the class is increased by 1, which doubles the interval of every class. This shift is applied to the signed absolute sum, and the resulting class index is then increased by 12 and clipped to the range of 0 to 24. Consequently, the total number of classes remains the same, while the samples are now classified based on both the original level and the sign of the sum for the 8x8 block.

[0104] In some embodiments mentioned above in this section, ALF classification may be classification for APS filter selection and / or classification for fixed filter selection.

[0105] The foregoing proposed methods can be implemented in encoders and / or decoders. For example, the proposed method can be implemented in an in-loop filtering module of an encoder, and / or an in-loop filtering module of a decoder. II. Example Video Encoder

[0106] FIG. 9 illustrates an example video encoder 900 that implement adaptive loop filters (ALF) . As illustrated, the video encoder 900 receives input video signal from a video source 905 and encodes the signal into bitstream 995. The video encoder 900 has several components or modules for encoding the signal from the video source 905, at least including some components selected from a transform module 910, a quantization module 911, an inverse quantization module 914, an inverse transform module 915, an intra-picture estimation module 924, an intra-prediction module 925, a motion compensation module 930, a motion estimation module 935, an in-loop filter 945, a reconstructed picture buffer 950, a MV buffer 965, and a MV prediction module 975, and an entropy encoder 990. The motion compensation module 930 and the motion estimation module 935 are part of an inter-prediction module 940. The intra-prediction module 925 and the intra-prediction estimation module 924 are part of a current picture prediction module 920, which uses current picture reconstructed samples as reference samples for prediction of the current block.

[0107] In some embodiments, the modules 910 –990 are modules of software instructions being executed by one or more processing units (e.g., a processor) of a computing device or electronic apparatus. In some embodiments, the modules 910 –990 are modules of hardware circuits implemented by one or more integrated circuits (ICs) of an electronic apparatus. Though the modules 910 –990 are illustrated as being separate modules, some of the modules can be combined into a single module.

[0108] The video source 905 provides a raw video signal that presents pixel data of each video frame without compression. A subtractor 908 computes the difference between the raw video pixel data of the video source 905 and the predicted pixel data 913 from the motion compensation module 930 or intra-prediction module 925 as prediction residual 909. The transform module 910 converts the difference (or the residual pixel data or residual signal 908) into transform coefficients (e.g., by performing Discrete Cosine Transform, or DCT) . The quantization module 911 quantizes the transform coefficients into quantized data (or quantized coefficients) 912, which is encoded into the bitstream 995 by the entropy encoder 990.

[0109] The inverse quantization module 914 de-quantizes the quantized data (or quantized coefficients) 912 to obtain transform coefficients 918, and the inverse transform module 915 performs inverse transform on the transform coefficients 918 to produce reconstructed residual 919. The reconstructed residual 919 is added with the predicted pixel data 913 to produce reconstructed pixel data 917. In some embodiments, the reconstructed pixel data 917 is temporarily stored in a line buffer 927 (or intra prediction buffer) for intra-picture prediction and spatial MV prediction. The reconstructed pixels are filtered by the in-loop filter 945 and stored in the reconstructed picture buffer 950. In some embodiments, the reconstructed picture buffer 950 is a storage external to the video encoder 900. In some embodiments, the reconstructed picture buffer 950 is a storage internal to the video encoder 900.

[0110] The intra-picture estimation module 924 performs intra-prediction based on the reconstructed pixel data 917 to produce intra prediction data. The intra-prediction data is provided to the entropy encoder 990 to be encoded into bitstream 995. The intra-prediction data is also used by the intra-prediction module 925 to produce the predicted pixel data 913.

[0111] The motion estimation module 935 performs inter-prediction by producing MVs to reference pixel data of previously decoded frames stored in the reconstructed picture buffer 950. These MVs are provided to the motion compensation module 930 to produce predicted pixel data.

[0112] Instead of encoding the complete actual MVs in the bitstream, the video encoder 900 uses MV prediction to generate predicted MVs, and the difference between the MVs used for motion compensation and the predicted MVs is encoded as residual motion data and stored in the bitstream 995.

[0113] The MV prediction module 975 generates the predicted MVs based on reference MVs that were generated for encoding previously video frames, i.e., the motion compensation MVs that were used to perform motion compensation. The MV prediction module 975 retrieves reference MVs from previous video frames from the MV buffer 965. The video encoder 900 stores the MVs generated for the current video frame in the MV buffer 965 as reference MVs for generating predicted MVs.

[0114] The MV prediction module 975 uses the reference MVs to create the predicted MVs. The predicted MVs can be computed by spatial MV prediction or temporal MV prediction. The difference between the predicted MVs and the motion compensation MVs (MC MVs) of the current frame (residual motion data) are encoded into the bitstream 995 by the entropy encoder 990.

[0115] The entropy encoder 990 encodes various parameters and data into the bitstream 995 by using entropy-coding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman encoding. The entropy encoder 990 encodes various header elements, flags, along with the quantized transform coefficients 912, and the residual motion data as syntax elements into the bitstream 995. The bitstream 995 is in turn stored in a storage device or transmitted to a decoder over a communications medium such as a network.

[0116] The in-loop filter 945 performs filtering or smoothing operations on the reconstructed pixel data 917 to reduce the artifacts of coding, particularly at boundaries of pixel blocks. In some embodiments, the filtering or smoothing operations performed by the in-loop filter 945 include deblock filter (DBF) , sample adaptive offset (SAO) , and / or adaptive loop filter (ALF) . In some embodiments, luma mapping chroma scaling (LMCS) is performed before the loop filters.

[0117] FIG. 10 illustrates portions of the video encoder 900 that implement ALF with classification based on coding information. Specifically, the figure illustrates the in-loop filters 945 in greater detail. As illustrated, reconstructed pixel data 917 is processed by DBF module 1002 and the SAO module 1004 and then received by ALF module 1006.

[0118] Within ALF module, a set of classifiers 1010 classifies the samples of the current block in the pixel data 917 into different classes. For each sample (as the current sample) , the classifiers 1010 may perform the classification function based on local activities and directionalities of the samples near the current sample (both inside and outside the current block) , which are available to the ALF module from the reconstructed picture buffer 950 and / or the line buffer 927. The classifiers 1010 may also perform the classification function based on coding information of the current block, coding information such as the prediction mode (inter, intra, IBC, uni-prediction, bi-prediction, etc. ) of the current block or distance (s) of the current sample from a boundary of the current block. Such coding information may be provided by intra-prediction 920, inter-prediction 940, and / or the entropy encoder 990.

[0119] The classifiers 1010 generate one or more classification indices (classIdx) to indicate the classification result for each current sample. A mapper 1015 maps the classification indices into filter selection, which is used to select one or more filters 1020 to be applied for the current sample. In some embodiments, the mapping of class identification to filter selection may be determined based on the coding information of the current block. The selected filters 1020 are applied to the current sample and some neighboring samples to generate a correction value for the current sample. The filter corrected sample values are then stored in the reconstructed picture buffer 950.

[0120] FIG. 11 conceptually illustrates a process 1100 that applies ALF using classifiers that are based on coding information. In some embodiments, one or more processing units (e.g., a processor) of a computing device implementing the encoder 900 performs the process 1100 by executing instructions stored in a computer readable medium. In some embodiments, an electronic apparatus implementing the encoder 900 performs the process 1100.

[0121] The encoder receives (at block 1110) data to be encoded as a current block of pixels in a current picture. The encoder classifies (at block 1120) a current sample of the current block by identifying at least one class from a plurality of classes using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors.

[0122] In some embodiments, the coding information used for classifying the current sample comprises a distance of the current sample from a boundary of the current block. The boundary is determined by a prediction mode of the current block, such as when the boundary is determined by geometric partitioning (e.g., by GPM) of the current block.

[0123] In some embodiments, the coding information used for classifying the current sample is based on horizontal and vertical distances of the current sample from the top-left sample of the current block. In some embodiments, the coding information used for classifying the current sample comprises a sum of the horizontal and vertical distances. In some embodiments, the coding information used for classifying the current sample comprises a minimum value between the horizontal and vertical distances. In some embodiments, the distances from a boundary of the current block or the distances from a top-left sample of the current block are discretized for use as the coding information by one or more thresholds that are predefined or determined based on a size of the current block.

[0124] In some embodiments, the coding information used for classifying the current sample comprises a prediction mode of the current block, such as whether the current block is coded by intra prediction, inter prediction, or intra block copy (IBC) , or whether the current block is coded by translation motion (or a motion type of the prediction mode) , or whether the current block is coded by uni-prediction or bi-prediction (or a prediction direction of the prediction mode) .

[0125] In some embodiments, the coding information used for classifying the current sample comprises a prediction category of the current block that is one of first, second, third prediction categories. The first prediction category indicates that the prediction is based on samples (in an L-region) spatially neighboring the current block. The second prediction category indicates that the prediction is based on one uni-prediction motion or block vector. The third prediction category indicates that the prediction is based on bi-prediction motion or block vectors. In some embodiments, a class index is signaled to indicate the identified class and the prediction category (e.g., according to Table 3) .

[0126] In some embodiments, the encoder also classifies the current sample based on pixel values of the current sample and of its spatial neighbors (e.g., by determining directionality gradient, etc. ) in addition to being based on the coding information.

[0127] In some embodiments, the encoder identifies a first class using the coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors, and then the encoder further classifies the current sample by identifying a second class based on pixel values of the current sample and of its spatial neighbors, and the filter is selected based on the first identified class and the second identified class. More generally, in some embodiments, the encoder may identify first and second classes based on coding information and / or pixel values of the current sample and its neighbors, then use the first identified class to select a class-to-filter mapping, which maps the second identified class to determine the filter to be used. Using Table 3 as an example, category 1 / 2 / 3 is the first identified class, while the original class indices 1–24 is the second identified class. The first identified class is used to select a class-to-filter mapping (categories 1 / 2 / 3) that maps the second identified class (original class indices) to determine the new class the filter to be used.

[0128] The encoder selects (at block 1130) a filter based on the identified class. The encoder applies (at block 1140) the selected filter to the current sample to generate a filtered sample as part of a reconstruction of the current block. III. Example Video Decoder

[0129] In some embodiments, an encoder may signal (or generate) one or more syntax element in a bitstream, such that a decoder may parse said one or more syntax elements from the bitstream.

[0130] FIG. 12 illustrates an example video decoder 1200 that implement adaptive loop filters (ALF) . As illustrated, the video decoder 1200 is an image-decoding or video-decoding circuit that receives a bitstream 1295 and decodes the content of the bitstream into pixel data of video frames for display. The video decoder 1200 has several components or modules for decoding the bitstream 1295, including some components selected from an inverse quantization module 1214, an inverse transform module 1215, an intra-prediction module 1225, a motion compensation module 1230, an in-loop filter 1245, a decoded picture buffer 1250, a MV buffer 1265, a MV prediction module 1275, and a parser 1290. The motion compensation module 1230 is part of an inter-prediction module 1240. The intra-prediction module 1225 is part of a current picture prediction module 1220, which uses current picture reconstructed samples as reference samples for prediction of the current block.

[0131] In some embodiments, the modules 1214 –1290 are modules of software instructions being executed by one or more processing units (e.g., a processor) of a computing device. In some embodiments, the modules 1214 –1290 are modules of hardware circuits implemented by one or more ICs of an electronic apparatus. Though the modules 1214 –1290 are illustrated as being separate modules, some of the modules can be combined into a single module.

[0132] The parser 1290 (or entropy decoder) receives the bitstream 1295 and performs initial parsing according to the syntax defined by a video-coding or image-coding standard. The parsed syntax element includes various header elements, flags, as well as quantized data (or quantized coefficients) 1212. The parser 1290 parses out the various syntax elements by using entropy-coding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman encoding.

[0133] The inverse quantization module 1214 de-quantizes the quantized data (or quantized coefficients) 1212 to obtain transform coefficients, and the inverse transform module 1215 performs inverse transform on the transform coefficients 1218 to produce reconstructed residual signal 1219. The reconstructed residual signal 1219 is added with predicted pixel data 1213 from the intra-prediction module 1225 or the motion compensation module 1230 to produce decoded pixel data 1217. The decoded pixels data are filtered by the in-loop filter 1245 and stored in the decoded picture buffer 1250. In some embodiments, the decoded picture buffer 1250 is a storage external to the video decoder 1200. In some embodiments, the decoded picture buffer 1250 is a storage internal to the video decoder 1200.

[0134] The intra-prediction module 1225 receives intra-prediction data from bitstream 1295 and according to which, produces the predicted pixel data 1213 from the decoded pixel data 1217 stored in the decoded picture buffer 1250. In some embodiments, the decoded pixel data 1217 is also stored in a line buffer 1227 (or intra prediction buffer) for intra-picture prediction and spatial MV prediction.

[0135] In some embodiments, the content of the decoded picture buffer 1250 is used for display. A display device 1205 either retrieves the content of the decoded picture buffer 1250 for display directly, or retrieves the content of the decoded picture buffer to a display buffer. In some embodiments, the display device receives pixel values from the decoded picture buffer 1250 through a pixel transport.

[0136] The motion compensation module 1230 produces predicted pixel data 1213 from the decoded pixel data 1217 stored in the decoded picture buffer 1250 according to motion compensation MVs (MC MVs) . These motion compensation MVs are decoded by adding the residual motion data received from the bitstream 1295 with predicted MVs received from the MV prediction module 1275.

[0137] The MV prediction module 1275 generates the predicted MVs based on reference MVs that were generated for decoding previous video frames, e.g., the motion compensation MVs that were used to perform motion compensation. The MV prediction module 1275 retrieves the reference MVs of previous video frames from the MV buffer 1265. The video decoder 1200 stores the motion compensation MVs generated for decoding the current video frame in the MV buffer 1265 as reference MVs for producing predicted MVs.

[0138] The in-loop filter 1245 performs filtering or smoothing operations on the decoded pixel data 1217 to reduce the artifacts of coding, particularly at boundaries of pixel blocks. In some embodiments, the filtering or smoothing operations performed by the in-loop filter 1245 include deblock filter (DBF) , sample adaptive offset (SAO) , and / or adaptive loop filter (ALF) . In some embodiments, luma mapping chroma scaling (LMCS) is performed before the loop filters.

[0139] FIG. 13 illustrates portions of the video decoder 1200 that implement ALF with classification based on coding information. Specifically, the figure illustrates the in-loop filters 1245 in greater detail. As illustrated, reconstructed pixel data 1217 is processed by DBF module 1302 and the SAO module 1304 and then received by ALF module 1306.

[0140] Within ALF module, a set of classifiers 1310 classifies the samples of the current block in the pixel data 1217 into different classes. For each sample (as the current sample) , the classifiers 1310 may perform the classification function based on local activities and directionalities of the samples near the current sample (both inside and outside the current block) , which are available to the ALF module from the decoded picture buffer 1250 and / or the line buffer 1227. The classifiers 1310 may also perform the classification function based on coding information of the current block, coding information such as the prediction mode (inter, intra, IBC, uni-prediction, bi-prediction, etc. ) of the current block or distance (s) of the current sample from a boundary of the current block. Such coding information may be provided by the intra-prediction module 1220, inter-prediction module 1240, and / or the entropy decoder 1290.

[0141] The classifiers 1310 generate one or more classification indices (classIdx) to indicates the classification result for each current sample. A mapper 1315 maps the classification indices into filter selection, which is used to select one or more filters 1320 to be applied for the current sample. In some embodiments, the mapping of class identification to filter selection may be determined based on the coding information of the current block. The selected filters 1320 are applied to the current sample and some neighboring samples to generate a correction value for the current sample. The filter corrected sample values are then stored in the decoded picture buffer 1250.

[0142] FIG. 14 conceptually illustrates a process 1400 that applies ALF using classifiers that are based on coding information. In some embodiments, one or more processing units (e.g., a processor) of a computing device implementing the decoder 1200 performs the process 1400 by executing instructions stored in a computer readable medium. In some embodiments, an electronic apparatus implementing the decoder 1200 performs the process 1400.

[0143] The decoder receives (at block 1410) data to be decoded as a current block of pixels in a current picture. The decoder classifies (at block 1420) a current sample of the current block by identifying at least one class from a plurality of classes using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors.

[0144] In some embodiments, the coding information used for classifying the current sample comprises a distance of the current sample from a boundary of the current block. The boundary is determined by a prediction mode of the current block, such as when the boundary is determined by geometric partitioning of the current block (e.g., by GPM) .

[0145] In some embodiments, the coding information used for classifying the current sample is based on horizontal and vertical distances of the current sample from the top-left sample of the current block. In some embodiments, the coding information used for classifying the current sample comprises a sum of the horizontal and vertical distances. In some embodiments, the coding information used for classifying the current sample comprises a minimum value between the horizontal and vertical distances. In some embodiments, the distances from a boundary of the current block or the distances from a top-left sample of the current block are discretized for use as the coding information by one or more thresholds that are predefined or determined based on a size of the current block.

[0146] In some embodiments, the coding information used for classifying the current sample comprises a prediction mode of the current block, such as whether the current block is coded by intra prediction, inter prediction, or intra block copy (IBC) , or whether the current block is coded by translation motion (or a motion type of the prediction mode) , or whether the current block is coded by uni-prediction or bi-prediction (or a prediction direction of the prediction mode) .

[0147] In some embodiments, the coding information used for classifying the current sample comprises a prediction category of the current block that is one of first, second, third prediction categories. The first prediction category indicates that the prediction is based on samples (in an L-region) spatially neighboring the current block. The second prediction category indicates that the prediction is based on one uni-prediction motion or block vector. The third prediction category indicates that the prediction is based on bi-prediction motion or block vectors. In some embodiments, a class index is signaled to indicate the identified class and the prediction category (e.g., according to Table 3) .

[0148] In some embodiments, the decoder also classifies the current sample based on pixel values of the current sample and of its spatial neighbors (e.g., by determining directionality gradient, etc. ) in addition to being based on the coding information.

[0149] In some embodiments, the decoder identifies a first class using the coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors, and then the decoder further classifies the current sample by identifying a second class based on pixel values of the current sample and of its spatial neighbors, and the filter is selected based on the first identified class and the second identified class. More generally, in some embodiments, the decoder may identify first and second classes based on coding information and / or pixel values of the current sample and its neighbors, then use the first identified class to select a class-to-filter mapping, which maps the second identified class to determine the filter to be used. Using Table 3 as an example, category 1 / 2 / 3 is the first identified class, while the original class indices 1–24 is the second identified class. The first identified class is used to select a class-to-filter mapping (categories 1 / 2 / 3) that maps the second identified class (original class indices) to determine the new class the filter to be used.

[0150] The decoder selects (at block 1430) a filter based on the identified class. The decoder applies (at block 1440) the selected filter to the current sample to generate a filtered sample as part of the reconstructed current block. The decoder may then provide the reconstructed current block for display as part of the reconstructed current picture. IV. Example Electronic System

[0151] Many of the above-described features and applications are implemented as software processes that are specified as a set of instructions recorded on a computer readable storage medium (also referred to as computer readable medium) . When these instructions are executed by one or more computational or processing unit (s) (e.g., one or more processors, cores of processors, or other processing units) , they cause the processing unit (s) to perform the actions indicated in the instructions. Examples of computer readable media include, but are not limited to, CD-ROMs, flash drives, random-access memory (RAM) chips, hard drives, erasable programmable read only memories (EPROMs) , electrically erasable programmable read-only memories (EEPROMs) , etc. The computer readable media does not include carrier waves and electronic signals passing wirelessly or over wired connections.

[0152] In this specification, the term “software” is meant to include firmware residing in read-only memory or applications stored in magnetic storage which can be read into memory for processing by a processor. Also, in some embodiments, multiple software inventions can be implemented as sub-parts of a larger program while remaining distinct software inventions. In some embodiments, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that together implement a software invention described here is within the scope of the present disclosure. In some embodiments, the software programs, when installed to operate on one or more electronic systems, define one or more specific machine implementations that execute and perform the operations of the software programs.

[0153] FIG. 15 conceptually illustrates an electronic system 1500 with which some embodiments of the present disclosure are implemented. The electronic system 1500 may be a computer (e.g., a desktop computer, personal computer, tablet computer, etc. ) , phone, PDA, or any other sort of electronic device. Such an electronic system includes various types of computer readable media and interfaces for various other types of computer readable media. Electronic system 1500 includes a bus 1505, processing unit (s) 1510, a graphics-processing unit (GPU) 1515, a system memory 1520, a network 1525, a read-only memory 1530, a permanent storage device 1535, input devices 1540, and output devices 1545.

[0154] The bus 1505 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices of the electronic system 1500. For instance, the bus 1505 communicatively connects the processing unit (s) 1510 with the GPU 1515, the read-only memory 1530, the system memory 1520, and the permanent storage device 1535.

[0155] From these various memory units, the processing unit (s) 1510 retrieves instructions to execute and data to process in order to execute the processes of the present disclosure. The processing unit (s) may be a single processor or a multi-core processor in different embodiments. Some instructions are passed to and executed by the GPU 1515. The GPU 1515 can offload various computations or complement the image processing provided by the processing unit (s) 1510.

[0156] The read-only-memory (ROM) 1530 stores static data and instructions that are used by the processing unit (s) 1510 and other modules of the electronic system. The permanent storage device 1535, on the other hand, is a read-and-write memory device. This device is a non-volatile memory unit that stores instructions and data even when the electronic system 1500 is off. Some embodiments of the present disclosure use a mass-storage device (such as a magnetic or optical disk and its corresponding disk drive) as the permanent storage device 1535.

[0157] Other embodiments use a removable storage device (such as a floppy disk, flash memory device, etc., and its corresponding disk drive) as the permanent storage device. Like the permanent storage device 1535, the system memory 1520 is a read-and-write memory device. However, unlike storage device 1535, the system memory 1520 is a volatile read-and-write memory, such a random access memory. The system memory 1520 stores some of the instructions and data that the processor uses at runtime. In some embodiments, processes in accordance with the present disclosure are stored in the system memory 1520, the permanent storage device 1535, and / or the read-only memory 1530. For example, the various memory units include instructions for processing multimedia clips in accordance with some embodiments. From these various memory units, the processing unit (s) 1510 retrieves instructions to execute and data to process in order to execute the processes of some embodiments.

[0158] The bus 1505 also connects to the input and output devices 1540 and 1545. The input devices 1540 enable the user to communicate information and select commands to the electronic system. The input devices 1540 include alphanumeric keyboards and pointing devices (also called “cursor control devices” ) , cameras (e.g., webcams) , microphones or similar devices for receiving voice commands, etc. The output devices 1545 display images generated by the electronic system or otherwise output data. The output devices 1545 include printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD) , as well as speakers or similar audio output devices. Some embodiments include devices such as a touchscreen that function as both input and output devices.

[0159] Finally, as shown in FIG. 15, bus 1505 also couples electronic system 1500 to a network 1525 through a network adapter (not shown) . In this manner, the computer can be a part of a network of computers (such as a local area network ( “LAN” ) , a wide area network ( “WAN” ) , or an Intranet, or a network of networks, such as the Internet. Any or all components of electronic system 1500 may be used in conjunction with the present disclosure.

[0160] Some embodiments include electronic components, such as microprocessors, storage and memory that store computer program instructions in a machine-readable or computer-readable medium (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media) . Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM) , recordable compact discs (CD-R) , rewritable compact discs (CD-RW) , read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM) , a variety of recordable / rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc. ) , flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc. ) , magnetic and / or solid state hard drives, read-only and recordable discs, ultra-density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable media may store a computer program that is executable by at least one processing unit and includes sets of instructions for performing various operations. Examples of computer programs or computer code include machine code, such as is produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.

[0161] While the above discussion primarily refers to microprocessor or multi-core processors that execute software, many of the above-described features and applications are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs) . In some embodiments, such integrated circuits execute instructions that are stored on the circuit itself. In addition, some embodiments execute software stored in programmable logic devices (PLDs) , ROM, or RAM devices.

[0162] As used in this specification and any claims of this application, the terms “computer” , “server” , “processor” , and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. For the purposes of the specification, the terms display or displaying means displaying on an electronic device. As used in this specification and any claims of this application, the terms “computer readable medium, ” “computer readable media, ” and “machine readable medium” are entirely restricted to tangible, physical objects that store information in a form that is readable by a computer. These terms exclude any wireless signals, wired download signals, and any other ephemeral signals.

[0163] While the present disclosure has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the present disclosure can be embodied in other specific forms without departing from the spirit of the present disclosure. In addition, a number of the figures (including FIG. 11 and FIG. 14) conceptually illustrate processes. The specific operations of these processes may not be performed in the exact order shown and described. The specific operations may not be performed in one continuous series of operations, and different specific operations may be performed in different embodiments. Furthermore, the process could be implemented using several sub-processes, or as part of a larger macro process. Thus, one of ordinary skill in the art would understand that the present disclosure is not to be limited by the foregoing illustrative details, but rather is to be defined by the appended claims. Additional Notes

[0164] The herein-described subject matter sometimes illustrates different components contained within, or connected with, different other components. It is to be understood that such depicted architectures are merely examples, and that in fact many other architectures can be implemented which achieve the same functionality. In a conceptual sense, any arrangement of components to achieve the same functionality is effectively "associated" such that the desired functionality is achieved. Hence, any two components herein combined to achieve a particular functionality can be seen as "associated with" each other such that the desired functionality is achieved, irrespective of architectures or intermediate components. Likewise, any two components so associated can also be viewed as being "operably connected" , or "operably coupled" , to each other to achieve the desired functionality, and any two components capable of being so associated can also be viewed as being "operably couplable" , to each other to achieve the desired functionality. Specific examples of operably couplable include but are not limited to physically mateable and / or physically interacting components and / or wirelessly interactable and / or wirelessly interacting components and / or logically interacting and / or logically interactable components.

[0165] Further, with respect to the use of substantially any plural and / or singular terms herein, those having skill in the art can translate from the plural to the singular and / or from the singular to the plural as is appropriate to the context and / or application. The various singular / plural permutations may be expressly set forth herein for sake of clarity.

[0166] Moreover, it will be understood by those skilled in the art that, in general, terms used herein, and especially in the appended claims, e.g., bodies of the appended claims, are generally intended as “open” terms, e.g., the term “including” should be interpreted as “including but not limited to, ” the term “having” should be interpreted as “having at least, ” the term “includes” should be interpreted as “includes but is not limited to, ” etc. It will be further understood by those within the art that if a specific number of an introduced claim recitation is intended, such an intent will be explicitly recited in the claim, and in the absence of such recitation no such intent is present. For example, as an aid to understanding, the following appended claims may contain usage of the introductory phrases "at least one" and "one or more" to introduce claim recitations. However, the use of such phrases should not be construed to imply that the introduction of a claim recitation by the indefinite articles "a" or "an" limits any particular claim containing such introduced claim recitation to implementations containing only one such recitation, even when the same claim includes the introductory phrases "one or more" or "at least one" and indefinite articles such as "a" or "an, " e.g., “a” and / or “an” should be interpreted to mean “at least one” or “one or more; ” the same holds true for the use of definite articles used to introduce claim recitations. In addition, even if a specific number of an introduced claim recitation is explicitly recited, those skilled in the art will recognize that such recitation should be interpreted to mean at least the recited number, e.g., the bare recitation of "two recitations, " without other modifiers, means at least two recitations, or two or more recitations. Furthermore, in those instances where a convention analogous to “at least one of A, B, and C, etc. ” is used, in general such a construction is intended in the sense one having skill in the art would understand the convention, e.g., “a system having at least one of A, B, and C” would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and / or A, B, and C together, etc. In those instances where a convention analogous to “at least one of A, B, or C, etc. ” is used, in general such a construction is intended in the sense one having skill in the art would understand the convention, e.g., “a system having at least one of A, B, or C” would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and / or A, B, and C together, etc. It will be further understood by those within the art that virtually any disjunctive word and / or phrase presenting two or more alternative terms, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the terms, either of the terms, or both terms. For example, the phrase “A or B” will be understood to include the possibilities of “A” or “B” or “A and B. ”

[0167] From the foregoing, it will be appreciated that various implementations of the present disclosure have been described herein for purposes of illustration, and that various modifications may be made without departing from the scope and spirit of the present disclosure. Accordingly, the various implementations disclosed herein are not intended to be limiting, with the true scope and spirit being indicated by the following claims.

Claims

1.A video coding method comprising:receiving data to be encoded or decoded as a current block of pixels of a current picture of a video;classifying a current sample of the current block by identifying at least one class from a plurality of classes by using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors;selecting a filter based on the identified class; andapplying the selected filter to the current sample to generate a filtered sample as part of a reconstruction of the current block.2.The video coding method of claim 1, wherein the coding information used for classifying the current sample comprises a distance of the current sample from a boundary of the current block.3.The video coding method of claim 2, wherein the boundary is determined by a prediction mode of the current block.4.The video coding method of claim 2, wherein the boundary is determined by a geometric partitioning of the current block.5.The video coding method of claim 1, wherein the coding information used for classifying the current sample is based on horizontal and vertical distances of the current sample from the top-left sample of the current block.6.The video coding method of claim 5, wherein the coding information used for classifying the current sample comprises a sum of the horizontal and vertical distances.7.The video coding method of claim 5, wherein the coding information used for classifying the current sample comprises a minimum value between the horizontal and vertical distances.8.The video coding method of claim 1, wherein distances from a boundary of the current block or distances from a top-left sample of the current block are discretized for use as the coding information for classifying the current sample by one or more thresholds that are predefined or determined based on a size of the current block.9.The video coding method of claim 1, wherein the coding information used for classifying the current sample comprises a prediction mode of the current block.10.The video coding method of claim 1, wherein the coding information used for classifying the current sample comprises whether the current block is coded by intra prediction, inter prediction, or intra block copy (IBC) .11.The video coding method of claim 1, wherein the coding information used for classifying the current sample comprises whether the current block is coded by translation motion.12.The video coding method of claim 1, wherein the coding information used for classifying the current sample comprises whether the current block is coded by uni-prediction or bi-prediction.13.The video coding method of claim 1, wherein the coding information used for classifying the current sample comprises a prediction category of the current block that is one of first, second, third prediction categories, wherein:the first prediction category indicates that the prediction is based on samples spatially neighboring the current block,the second prediction category indicates that the prediction is based on one uni-prediction vector, andthe third prediction category indicates that the prediction is based on bi-prediction vectors.14.The video coding method of claim 13, wherein a class index is signaled to indicate the identified class and the prediction category.15.The video coding method of claim 1, wherein the identified class is a first identified class, the method further comprising classifying the current sample by identifying a second class from a plurality of classes based on pixel values of the current sample and of its spatial neighbors, wherein the filter is selected based on the first identified class and the second identified class.16.The video coding method of claim 1, wherein selecting the filter based on the identified class comprises identifying a first class and a second class, wherein the first identified class is used to select a class-to-filter mapping that maps the second identified class to the filter to be used.17.The video coding method of claim 1, wherein the filter is an adaptive loop filter (ALF) .18.An electronic apparatus comprising:a video coder circuit configured to perform operations comprising:receiving data to be encoded or decoded as a current block of pixels of a current picture of a video;classifying a current sample of the current block by identifying at least one class from a plurality of classes by using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors;selecting a filter based on the identified class; andapplying the selected filter to the current sample to generate a filtered sample as part of a reconstruction of the current block.19.A video decoding method comprising:receiving data to be decoded as a current block of pixels of a current picture of a video;classifying a current sample of the current block by identifying at least one class from a plurality of classes by using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors;selecting a filter based on the identified class; andapplying the selected filter to the current sample to generate a filtered sample as part of a reconstruction of the current block.20.A video encoding method comprising:receiving data to be encoded as a current block of pixels of a current picture of a video;classifying a current sample of the current block by identifying at least one class from a plurality of classes by using a coding information of the current sample that is independent of pixel values of the current sample and of its spatial neighbors;selecting a filter based on the identified class; andapplying the selected filter to the current sample to generate a filtered sample as part of a reconstruction of the current block.

Citation Information

Patent Citations

  • Filtering method for prediction, encoding and decoding system and storage medium

    CN112055224A

  • Adaptive up-sampling filter for luma and chroma with reference picture resampling (RPR)

    US20230031886A1

  • Adaptive loop filter with samples before deblocking filter and samples before sample adaptive offsets

    US20230300328A1

  • Filtering in parallel with deblocking filtering in video coding

    US20240015337A1

  • Signaling cross component linear model

    WO2023071778A1