Methods, apparatus, medium and computer program product for video coding

By employing adaptive loop filters and cross-component adaptive loop filters to utilize luma and chroma signals, the method addresses inefficiencies in video coding, particularly in bandwidth and memory-constrained environments, enhancing chroma component compression and overall coding efficiency.

WO2026086889A1PCT designated stage Publication Date: 2026-04-30BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Filing Date
2025-10-23
Publication Date
2026-04-30

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in efficiently compressing digital video data while maintaining quality, particularly in limited bandwidth and memory resources, especially in handling chroma components effectively.

Method used

The method involves using adaptive loop filters (ALF) and cross-component adaptive loop filters (CCALF) that utilize signals from both luma and chroma components to enhance decoding and encoding processes, applying these filters to improve coding efficiency.

Benefits of technology

This approach enhances coding efficiency by improving the quality of chroma component compression, thereby optimizing the use of limited bandwidth and memory resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025129636_30042026_PF_FP_ABST
    Figure CN2025129636_30042026_PF_FP_ABST
Patent Text Reader

Abstract

A method for video decoding is provided. The method includes obtaining a first signal based on a first chroma component in a current picture; obtaining a second signal based on a luma component and / or a second chroma component in the current picture; and applying the first signal and the second signal as inputs for a loop filter to decode the first chroma component of the current picture.
Need to check novelty before this filing date? Find Prior Art

Description

METHODS, APPARATUS, MEDIUM AND COMPUTER PROGRAM PRODUCT FOR VIDEO CODINGCROSS-REFERENCE TO RELATED APPLICATION

[0001] This application is based upon and claims priority to PCT Application No. PCT / CN2024 / 127117 filed on October 24, 2024, the entire content thereof is incorporated herein by reference in its entirety.TECHNICAL FIELD

[0002] This application is related to video coding and compression. More specifically, this application relates to methods and apparatus on improving the coding efficiency of adaptive loop filter (ALF) and cross component adaptive loop filter (CCALF) .BACKGROUND

[0003] Digital video is supported by a variety of electronic devices. The electronic devices transmit and receive or otherwise communicate digital video data across a communication network, and / or store the digital video data on a storage device. Due to a limited bandwidth capacity of the communication network and limited memory resources of the storage device, video coding may be used to compress the video data according to one or more video coding standards before it is communicated or stored, to generate encoded video data that uses a lower bit rate, while avoiding or minimizing degradations to video quality.SUMMARY

[0004] Embodiments of the present disclosure provide methods, apparatus, medium and computer program product for video coding.

[0005] According to a first aspect of the present disclosure, a method for video decoding is provided. The method includes obtaining a first signal based on a first chroma component in a current picture; obtaining a second signal based on a luma component and / or a second chroma component in the current picture; and applying the first signal and the second signal as inputs for a loop filter to decode the first chroma component of the current picture.

[0006] According to a second aspect of the present disclosure, a method for video encoding is provided. The method includes determining a first signal based on a first chroma component in a current picture; determining a second signal based on a luma component and / or a second chroma component in the current picture; and applying the first signal and the second signal as inputs for a loop filter to encode the first chroma component of the current picture.

[0007] According to a third aspect of the present disclosure, an apparatus for video decoding is provided. The apparatus includes one or more processors; a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, wherein the one or more processors, upon execution of the instructions, are configured to perform method according to the embodiments of the present application.

[0008] According to a fourth aspect of the present disclosure, an apparatus for video encoding is provided. The apparatus includes one or more processors; a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, wherein the one or more processors, upon execution of the instructions, are configured to perform method according to the embodiments of the present application.

[0009] According to a fifth aspect of the present disclosure, A method for storing a bitstream is provided. The method includes performing the method for video encoding according to the embodiments of the present application to generate a bitstream; and storing the bitstream.

[0010] According to a sixth aspect of the present disclosure, A method for transmitting a bitstream is provided. The method includes performing the method for video encoding according to the embodiments of the present application to generate a bitstream; and transmitting the bitstream.

[0011] According to a seventh aspect of the present disclosure, a computer program product is provided. The computer program product includes instructions for storage of a bitstream, wherein the bitstream comprises encoded video data to be decoded by the decoding method according to the embodiments of the present application or encoded video data generated by the encoding method according to the embodiments of the present application.

[0012] It is to be understood that both the foregoing general description and the following detailed description are examples only and are not restrictive of the present disclosure.BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate examples consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.

[0014] FIG. 1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks in accordance with some implementations of the present disclosure.

[0015] FIG. 2 is a block diagram illustrating an exemplary video encoder in accordance with some implementations of the present disclosure.

[0016] FIG. 3 is a block diagram illustrating an exemplary video decoder in accordance with some implementations of the present disclosure.

[0017] FIGS. 4A through 4E are block diagrams illustrating how a frame is recursively partitioned into multiple video blocks of different sizes and shapes in accordance with some implementations of the present disclosure.

[0018] FIG. 5 is a block diagram illustrating a general diagram of block-based video encoder for the VVC / AVS3 in accordance with some implementations of the present disclosure.

[0019] FIG. 6 is a block diagram illustrating block partitions in the multi-type tree structure in accordance with some implementations of the present disclosure.

[0020] FIG. 7 is a block diagram illustrating a general block diagram of video decoder for the VVC in accordance with some implementations of the present disclosure.

[0021] FIG. 8 is a diagram illustrating an ALF filter shapes in VVC in accordance with some implementations of the present disclosure.

[0022] FIG. 9 is a diagram illustrating subsampled sample gradients for a 4×4 sub-block ALF classification in accordance with some implementations of the present disclosure.

[0023] FIG. 10 is a diagram illustrating a geometric transformation of 7×7 diamond filter shape in accordance with some implementations of the present disclosure.

[0024] FIG. 11 is a diagram illustrating an online filter shape used in ECM in accordance with some implementations of the present disclosure.

[0025] FIG. 12 is a block diagram illustrating a CCALF architecture in accordance with some implementations of the present disclosure.

[0026] FIG. 13 is a diagram illustrating a relative location of filtered chroma sample and its support in the luma plane for 4: 2: 0 chroma format with chroma location type 0 in accordance with some implementations of the present disclosure.

[0027] FIG. 14 is a diagram illustrating a 25-tap long filter in accordance with some implementations of the present disclosure.

[0028] FIG. 15 is a diagram illustrating a filter shape for prediction signal or before SAO signal in accordance with some implementations of the present disclosure.

[0029] FIG. 16 is a diagram illustrating a computing environment coupled with a user interface, according to some implementations of the present disclosure.

[0030] FIG. 17 is a diagram illustrating an adjusted chroma ALF filter shape in accordance with some implementations of the present disclosure.

[0031] FIG. 18 is a diagram illustrating symmetrical sample padding of luma ALF filtering when the filter shape of the residual signal with its central position aligned with the to-be-filtered sample crosses a line buffer boundary in accordance with some implementations of the present disclosure.

[0032] FIG. 19 is a diagram illustrating ALF filter shapes in accordance with some implementations of the present disclosure.

[0033] FIG. 20 is a diagram illustrating online chroma ALF filter shapes in accordance with some implementations of the present disclosure.

[0034] FIG. 21 is a diagram illustrating a first example of adjusted online chroma ALF filter shapes in accordance with some implementations of the present disclosure.

[0035] FIG. 22 is a diagram illustrating a second example of adjusted online chroma ALF filter shapes in accordance with some implementations of the present disclosure.

[0036] FIG. 23 is a diagram illustrating a third example of adjusted online chroma ALF filter shapes in accordance with some implementations of the present disclosure.

[0037] FIG. 24 is a diagram illustrating a filter shape for luma reconstruction signal in accordance with some implementations of the present disclosure.

[0038] FIG. 25 is a diagram illustrating a filter shape for luma reconstruction signal in accordance with some implementations of the present disclosure.

[0039] FIG. 26 is a diagram illustrating a filter shape for luma reconstruction signal in accordance with some implementations of the present disclosure.

[0040] FIG. 27 is a diagram illustrating different down-sampling filter shapes utilized to down-sample luma reconstruction signal to make it have the same resolution with the chroma reconstruction signal.

[0041] FIG. 28 is a diagram illustrating a 25-tap long filter.

[0042] FIG. 29 is a diagram illustrating the newly introduced filter shape for CCALF.

[0043] FIG. 30 is a flow chart illustrating a method for video decoding in accordance with some implementations of the present disclosure.

[0044] FIG. 31 is a flow chart illustrating a method for video encoding in accordance with some implementations of the present disclosure.DETAILED DESCRIPTION

[0045] Reference will now be made in detail to specific implementations, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth in order to assist in understanding the subject matter presented herein. But various alternatives may be used without departing from the scope of claims and the subject matter may be practiced without these specific details. For example, the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities.

[0046] It should be illustrated that the terms “first, ” “second, ” and the like used in the description, claims of the present disclosure, and the accompanying drawings are used to distinguish objects, and not used to describe any specific order or sequence. It should be understood that the data used in this way may be interchanged under an appropriate condition, such that the embodiments of the present disclosure described herein may be implemented in orders besides those shown in the accompanying drawings or described in the present disclosure.

[0047] FIG. 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel in accordance with some implementations of the present disclosure. As shown in FIG. 1, the system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a destination device 14. The source device 12 and the destination device 14 may comprise any of a wide variety of electronic devices, including cloud servers, server computers, desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or the like. In some implementations, the source device 12 and the destination device 14 are equipped with wireless communication capabilities.

[0048] As shown in FIG. 1, the source device 12 includes a video source 18, a video encoder 20 and an output interface 22. The video source 18 may include a source such as a video capturing device, e.g., a video camera, a video archive containing previously captured video, a video feeding interface to receive video from a video content provider, and / or a computer graphics system for generating computer graphics data as the source video, or a combination of such sources.

[0049] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may comprise a sequence of pictures, each of which may comprise one or more sample arrays, for example, luma (Y) only for monochrome; luma and two chroma in YCbCr or YCgCo domain; or green, blue, and red in GBR (also known as RGB) domain. For convenience of notation and terminology in this application, in some embodiments, variables and terms associated with each set of three sample arrays may be referred to as luma and chroma, where the two chroma arrays may be referred to as Cb and Cr, regardless of the actual color representation method in use. The video data may be in a chroma format of 4: 0: 0, 4: 2: 0, 4: 2: 2, or 4:4: 4, but the present application is not limited thereto. A bit depth BitDepth of samples of sample arrays may be an integer in a range of 8 to 16. For example, a vlaue of BitDepth may be 8, 9, 10, 11, 12, 13, 14, 15 or 16. It should be illustrated that the value of BitDepth is not limited thereto, and may be any other value proposed in the future.

[0050] The encoded video data may be transmitted directly to the destination device 14 through the output interface 22 of the source device 12 via a link 16. The output interface 22 may include a modem and / or a transmitter. The link 16 may comprise any type of wireless communication medium or device and / or any type of wired communication medium or device capable of transmitting the encoded video data from the source device 12 to the destination device 14. The encoded video data may also (or alternatively) be stored onto a storage device 32 for later access by the destination device 14 via for example an input interface 28 or by other devices, for decoding and / or playback. The storage device 32 may include any of a variety of distributed or locally accessed data storage media such as a hard drive, Blu-ray discs, Digital Versatile Disks (DVDs) , Compact Disc Read-Only Memories (CD-ROMs) , flash memory, volatile or non-volatile memory, or any other suitable digital storage media for storing the encoded video data.

[0051] The destination device 14 includes the input interface 28, a video decoder 30, and a display device 34. The input interface 28 may include a receiver and / or a modem and receive the encoded video data over the link 16. Alternatively, the destination device 14 may access the stored video data from the storage device 32 via streaming, downloading or a combination of both. The encoded video data may include a variety of syntax elements generated by the video encoder 20 for use by the video decoder 30 in decoding the video data. The display device 34 may be an integrated display device or an external display device that is configured to communicate with the destination device 14, and may display the decoded video data to a user.

[0052] The video encoder 20 and the video decoder 30 may operate (for example, encode and decode video data) according to proprietary or industry standards, such as Versatile Video Coding (VVC) , Joint Exploration test Model (JEM) , High-Efficiency Video Coding (HEVC / H. 265) , Advanced Video Coding (AVC / H. 264) , Moving Picture Expert Group (MPEG) coding, or extensions of such standards. It should be understood that the present application is not limited to a specific video encoding / decoding standard, and may be applicable to other current and future video encoding / decoding standards.

[0053] The video encoder 20 and the video decoder 30 each may be implemented as any of a variety of suitable encoder and / or decoder circuitry, such as one or more microprocessors, Digital Signal Processors (DSPs) , Application Specific Integrated Circuits (ASICs) , Field Programmable Gate Arrays (FPGAs) , discrete logic, software, hardware, firmware or any combinations thereof. When implemented partially in software, an electronic device may store instructions for the software in a suitable, non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (CODEC) in a respective device.

[0054] In some implementations, at least a part of components of the source device 12 and / or the destination device 14 (for example, components shown in Fig. 1, Fig. 2 and / or Fig. 3) may operate in a cloud computing service network which may provide software, platforms, and / or infrastructure, such as Software as a Service (SaaS) , Platform as a Service (PaaS) , or Infrastructure as a Service (IaaS) . In some implementations, one or more components in the source device 12 and / or the destination device 14 which are not included in the cloud computing service network may be provided in one or more client devices, and the one or more client devices may communicate with server computers in the cloud computing service network through a wireless or wired communication network. In an embodiment, at least a part of operations described herein may be implemented as cloud-based services provided by one or more server computers which are implemented by the at least a part of the components of the source device 12 and / or the destination device 14 in the cloud computing service network; and one or more other operations described herein may be implemented by the one or more client devices. In some implementations, the cloud computing service network may be a private cloud, a public cloud, or a hybrid cloud. The terms such as “cloud, ” “cloud computing, ” “cloud-based” etc. herein may be used interchangeably as appropriate without departing from the scope of the present disclosure. It should be understood that the present disclosure is not limited to be implemented in the cloud computing service network described above. Instead, the present disclosure may also be implemented in any other type of computing environments currently known or developed in the future.

[0055] FIG. 2 is a block diagram illustrating an exemplary video encoder 20 in accordance with some implementations described in the present application.

[0056] As shown in FIG. 2, the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a Decoded Picture Buffer (DPB) 64, a summer 50, a transform processing unit 52, a quantization unit 54, and an entropy encoding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra prediction processing unit 46, and an Intra Block Copy (IBC) unit 48. In some implementations, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and a summer 62 for video block reconstruction. An in-loop filter 63, such as a deblocking filter, may be positioned between the summer 62 and the DPB 64 to filter block boundaries to remove blockiness artifacts from reconstructed video. Another in-loop filter, such as Sample Adaptive Offset (SAO) filter, Cross Component Sample Adaptive Offset (CCSAO) filter and / or Adaptive in-Loop Filter (ALF) , may also be used in addition to the deblocking filter to filter an output of the summer 62. It should be illustrated that for the CCSAO technique, the present application is not limited to the embodiments described herein, and instead, the application may be applied to a situation where an offset is selected for a sample of any of a luma component and two chroma components (which may represent Y, Cb and Cr in YCbCr domain; Y, Cg and Co in YCgCo domain; or G, B and R in RGB domain for convenience of notation and terminology in this application as described above) according to one or more samples of any other of the luma component and the two chroma components to modify the sample of said any component based on the selected offset. Alternatively, there is also provided an SAO technique which is substantially the same as the CCSAO technique, except that for the SAO technique, an offset is selected for a sample of any of a luma component and two chroma components according to one or more samples of said any component to modify the sample of said any component based on the selected offset. Further, it should also be illustrated that a first component mentioned herein may be any of the luma component and the two chroma components, a second component mentioned herein may be any other of the luma component and the two chroma components, and a third component mentioned herein may be a remaining one of the luma component and the two chroma components. In some examples, the in-loop filters may be omitted, and the decoded video block may be directly provided by the summer 62 to the DPB 64. The video encoder 20 may take the form of a fixed or programmable hardware unit or may be divided among one or more of the illustrated fixed or programmable hardware units.

[0057] The video data memory 40 may store video data to be encoded by the components of the video encoder 20. The video data in the video data memory 40 may be obtained, for example, from the video source 18 as shown in FIG. 1. The DPB 64 is a buffer that stores reference video data (for example, reference frames or pictures) for use in encoding video data by the video encoder 20. The video data memory 40 and the DPB 64 may be formed by any of a variety of memory devices. In various examples, the video data memory 40 may be on-chip with other components of the video encoder 20, or off-chip relative to those components. It should be noted that the term “frame” may be used as synonyms for the term “image” or “picture” in the field of video coding.

[0058] As shown in FIG. 2, after receiving the video data, the partition unit 45 partitions the video data into video blocks. This partitioning may also include partitioning a video frame into slices, tiles (for example, sets of video blocks) , or other larger Coding Units (CUs) according to predefined splitting structures such as a Quad-Tree (QT) structure associated with the video data. The video frame is or may be regarded as a two-dimensional array or matrix of samples with sample values. A sample in the array may also be referred to as a pixel or a pel. A number of samples in horizontal and vertical directions (or axes) of the array or picture define a size and / or a resolution of the video frame. The video frame may be divided into multiple video blocks by, for example, using QT partitioning. The video block again is or may be regarded as a two-dimensional array or matrix of samples with sample values, although of smaller dimension than the video frame. A number of samples in horizontal and vertical directions (or axes) of the video block define a size of the video block. The video block may further be partitioned into one or more block partitions or sub-blocks (which may form again blocks) by, for example, iteratively using QT partitioning, Binary-Tree (BT) partitioning or Triple-Tree (TT) partitioning or any combination thereof. It should be noted that the term “block” or “video block” as used herein may be a portion, in particular a rectangular (square or non-square) portion, of a frame or a picture. With reference, for example, to HEVC and VVC, the block or video block may be or correspond to a Coding Tree Unit (CTU) , a CU, a Prediction Unit (PU) or a Transform Unit (TU) and / or may be or correspond to a corresponding block, e.g. a Coding Tree Block (CTB) , a Coding Block (CB) , a Prediction Block (PB) or a Transform Block (TB) and / or to a sub-block.

[0059] The prediction processing unit 41 may select one of a plurality of possible predictive coding modes, such as one of a plurality of intra or inter predictive coding modes, for the current video block based on error results (e.g., coding rate and the level of distortion) . The prediction processing unit 41 may provide the resulting intra or inter prediction coded block to the summer 50 to generate a residual block and to the summer 62 to reconstruct the encoded block for use as part of a reference frame subsequently. The prediction processing unit 41 also provides at least one of syntax elements, such as motion vectors, intra or inter mode indicators, partition information, and other such syntax information, to the entropy encoding unit 56.

[0060] In order to select an appropriate intra predictive coding mode for the current video block, the intra prediction processing unit 46 may perform intra predictive coding of the current video block relative to one or more neighbor blocks in the same frame as the current block to be coded to provide spatial prediction. The motion estimation unit 42 and the motion compensation unit 44 perform inter predictive coding of the current video block relative to one or more predictive blocks in one or more reference frames to provide temporal prediction. The video encoder 20 may perform multiple coding passes, e.g., to select an appropriate coding mode for each block of video data.

[0061] In some implementations, the motion estimation unit 42 generates a motion vector of the current block in a motion estimation process according to a predetermined pattern within a sequence of video frames. The motion vector may indicate displacement of a video block within a current frame relative to a predictive block within a reference frame relative to the current block being coded within the current frame The predetermined pattern may designate video frames in the sequence as P frames or B frames. In some implementations, a Motion Vector Predictor (MVP) of the current block which may be determined from motion information of spatially neighboring blocks and / or temporally co-located blocks of the current block is subtracted from an actual motion vector of the current block to produce a Motion Vector Difference (MVD) for the current block. Then, instead of encoding, into the video bitstream, the actual motion vector of the current block, information of the MVP and MVD may be encoded into the video bitstream. The IBC unit 48 may determine vectors, e.g., block vectors, for IBC coding in a manner similar to the determination of motion vectors by the motion estimation unit 42 for inter prediction, or may utilize the motion estimation unit 42 to determine the block vector. It is noted that an IBC mode may be regarded as either an intra prediction mode or a prediction mode other than the intra prediction mode and an inter prediction mode.

[0062] A predictive block for the video block may be or may correspond to a block or a reference block of a reference frame that is deemed as closely matching the video block to be coded in terms of pixel difference, which may be determined by Sum of Absolute Difference (SAD) , Sum of Square Difference (SSD) , or other difference metrics. In some implementations, the video encoder 20 may calculate values for sub-integer pixel positions of reference frames stored in the DPB 64. For example, the video encoder 20 may interpolate values of one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel precision.

[0063] The motion estimation unit 42 determines motion vector information for a video block in an inter prediction coded frame by comparing the position of the video block to the position of a predictive block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1) , each of which identifies one or more reference frames stored in the DPB 64. The motion estimation unit 42 sends the determined motion vector information to the motion compensation unit 44 and then to the entropy encoding unit 56.

[0064] Motion compensation, performed by the motion compensation unit 44, may involve fetching or generating the predictive block based on the motion vector information determined by the motion estimation unit 42. Upon receiving the motion vector information for the current video block, the motion compensation unit 44 may locate a predictive block to which a motion vector points in one of the reference frame lists, retrieve the predictive block from the DPB 64, and forward the predictive block to the summer 50. The motion compensation unit 44 may also generate syntax elements associated with the video blocks of a video frame for use by the video decoder 30 in decoding the video blocks of the video frame. The syntax elements may include, for example, syntax elements defining the motion vector used to identify the predictive block, any flags indicating the prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes.

[0065] In some implementations, the IBC unit 48 may generate vectors and fetch predictive blocks in a manner similar to that described above in connection with the motion estimation unit 42 and the motion compensation unit 44, but with the predictive blocks being in the same frame as the current block being coded and with the vectors being referred to as block vectors as opposed to motion vectors.

[0066] In other examples, the IBC unit 48 may use the motion estimation unit 42 and the motion compensation unit 44, in whole or in part, to perform such functions for IBC prediction according to the implementations described herein. In either case, for Intra block copy, a predictive block may be a block that is deemed as closely matching the block to be coded, in terms of pixel difference, which may be determined by SAD, SSD, or other difference metrics, and identification of the predictive block may include calculation of values for sub-integer pixel positions.

[0067] The intra prediction processing unit 46 may intra-predict a current video block, as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra block copy prediction performed by the IBC unit 48, as described above. In particular, the intra prediction processing unit 46 may determine an intra prediction mode to encode a current block. The intra prediction processing unit 46 may provide information indicative of the selected intra-prediction mode for the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in the bitstream.

[0068] After the prediction processing unit 41 determines the predictive block for the current video block, the summer 50 forms a residual block by subtracting pixel values of the predictive block from the pixel values of the current video block, forming pixel difference values. The pixel difference values may include luma or chroma component differences or both. The residual video data in the residual block may be included in one or more TUs and is provided to the transform processing unit 52. The transform processing unit 52 transforms the residual video data into residual transform coefficients using one or more transforms, such as a Discrete Cosine Transform (DCT) or a conceptually similar transform.

[0069] The transform processing unit 52 may send the resulting transform coefficients to the quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, the quantization unit 54 may then perform a scan of a matrix including the quantized transform coefficients. Alternatively, the entropy encoding unit 56 may perform the scan.

[0070] Following quantization, the entropy encoding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, e.g., Context Adaptive Variable Length Coding (CAVLC) , Context Adaptive Binary Arithmetic Coding (CABAC) , Syntax-based context-adaptive Binary Arithmetic Coding (SBAC) , Probability Interval Partitioning Entropy (PIPE) coding or another entropy encoding methodology or technique. The encoded bitstream may then be transmitted to the video decoder 30 as shown in FIG. 1, or archived in the storage device 32 as shown in FIG. 1 for later transmission to or retrieval by the video decoder 30. The entropy encoding unit 56 may also entropy encode the motion vectors and the other syntax elements for the current video frame.

[0071] The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transformation, respectively, to reconstruct the residual block in the pixel domain for generating a reference block for prediction of other video blocks.

[0072] The summer 62 adds the reconstructed residual block to the predictive block produced to produce a reference block for storage in the DPB 64.

[0073] FIG. 3 is a block diagram illustrating an exemplary video decoder 30 in accordance with some implementations of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, a summer 90, and a DPB 92. The prediction processing unit 81 includes a motion compensation unit 82, an intra prediction unit 84, and an IBC unit 85. The video decoder 30 may perform a decoding process generally reciprocal to the encoding process described above with respect to the video encoder 20 in connection with FIG. 2. For example, the motion compensation unit 82 may generate prediction data based on motion vectors received from the entropy decoding unit 80, while the intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from the entropy decoding unit 80.

[0074] In some examples, a unit of the video decoder 30 may be tasked to perform the implementations of the present disclosure. Also, in some examples, the implementations of the present disclosure may be divided among one or more of the units of the video decoder 30.

[0075] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by the other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source, such as a camera, via wired or wireless network communication of video data, or by accessing physical data storage media (e.g., a flash drive or hard disk) . The video data memory 79 may include a Coded Picture Buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use in decoding video data by the video decoder 30. The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) , including Synchronous DRAM (SDRAM) , Magneto-resistive RAM (MRAM) , Resistive RAM (RRAM) , or other types of memory devices. In some examples, the video data memory 79 may be on-chip with other components of the video decoder 30, or off-chip relative to those components.

[0076] During the decoding process, the video decoder 30 receives an encoded video bitstream that represents video blocks of an encoded video frame and associated syntax elements. The video decoder 30 may receive the syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 entropy decodes the bitstream to generate quantized coefficients, motion vector information or intra-prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-prediction mode indicators and other syntax elements to the prediction processing unit 81.

[0077] When the video frame is coded as an intra predictive coded (I) frame or for intra coded predictive blocks in other types of frames, the intra prediction unit 84 may generate prediction data for a video block of the current video frame based on a signaled intra prediction mode and reference data from previously decoded blocks of the current frame.

[0078] When the video frame is coded as an inter-predictive coded (i.e., B or P) frame, the motion compensation unit 82 produces one or more predictive blocks for a video block of the current video frame based on the motion vector information and other syntax elements received from the entropy decoding unit 80. Each of the predictive blocks may be produced from a reference frame within one of the reference frame lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using default construction techniques based on reference frames stored in the DPB 92.

[0079] In some examples, when the video block is coded according to the IBC mode described herein, the IBC unit 85 produces predictive blocks for the current video block based on block vector information and other syntax elements received from the entropy decoding unit 80. The predictive blocks may be within a reconstructed region of the same picture as the current video block defined by the video encoder 20.

[0080] The motion compensation unit 82 and / or the IBC unit 85 determines prediction information for a video block of the current video frame by parsing the vector information and other syntax elements, and then uses the prediction information to produce the predictive blocks for the current video block. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode used to code video blocks of the video frame, an inter prediction frame type (e.g., B or P) , construction information for one or more of the reference frame lists for the frame, motion vectors for each inter predictive encoded video block of the frame, inter prediction status for each inter predictive coded video block of the frame, and other information to decode the video blocks in the current video frame.

[0081] Similarly, the IBC unit 85 may use some of the received syntax elements, e.g., a flag, to determine that the current video block was predicted using the IBC mode, construction information of which video blocks of the frame are within the reconstructed region and should be stored in the DPB 92, block vectors for each IBC predicted video block of the frame, IBC prediction status for each IBC predicted video block of the frame, and other information to decode the video blocks in the current video frame.

[0082] The motion compensation unit 82 may also perform interpolation using the interpolation filters as used by the video encoder 20 during encoding of the video blocks to calculate interpolated values for sub-integer pixels of reference blocks. In this case, the motion compensation unit 82 may determine the interpolation filters used by the video encoder 20 from the received syntax elements and use the interpolation filters to produce predictive blocks.

[0083] Like the process of choosing a predictive block in a reference frame during inter-frame prediction of a video block, a set of rules needs to be adopted by both the video encoder 20 and the video decoder 30 for constructing a motion vector candidate list (also known as a “merge list” ) for a current block using those potential candidate motion vectors associated with spatially neighboring blocks and / or temporally co-located blocks of the current block and then selecting one member from the motion vector candidate list as a motion vector predictor for the current block. By doing so, there is no need to transmit the motion vector candidate list itself from the video encoder 20 to the video decoder 30 and an index of the selected motion vector predictor within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector predictor within the motion vector candidate list for encoding and decoding the current block.

[0084] The inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by the entropy decoding unit 80 using the same quantization parameter calculated by the video encoder 20 for each video block in the video frame. The inverse transform processing unit 88 applies an inverse transform, e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients in order to reconstruct the residual blocks in the pixel domain.

[0085] The summer 90 reconstructs decoded video block for the current video block by summing the residual block from the inverse transform processing unit 88 and a corresponding predictive block. An in-loop filter 91 such as deblocking filter, SAO filter, CCSAO filter and / or ALF may be positioned between the summer 90 and the DPB 92 to further process the decoded video block. In some examples, the in-loop filter 91 may be omitted, and the decoded video block may be directly provided by the summer 90 to the DPB 92. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames used for subsequent motion compensation of next video blocks. The DPB 92, or a memory device separate from the DPB 92, may also store decoded video for later presentation on a display device, such as the display device 34 of FIG. 1.

[0086] In a typical video coding process, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other instances, a frame may be monochrome and therefore includes only one two-dimensional array of luma samples.

[0087] As shown in FIG. 4A, the video encoder 20 (or more specifically the partition unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs ordered consecutively in a raster scan order from left to right and from top to bottom. Each CTU is a largest logical coding unit and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set, such that all the CTUs in a video sequence have the same size being one of 128×128, 64×64, 32×32, and 16×16. But it should be noted that the present application is not necessarily limited to a particular size. As shown in FIG. 4B, each CTU may comprise one CTB of luma samples, two corresponding CTBs of chroma samples, and syntax elements used to code the samples of the CTBs. The syntax elements describe properties of different types of units of a coded block of pixels and how the video sequence can be reconstructed at the video decoder 30, including inter or intra prediction, intra prediction mode, motion vectors, and / or other parameters. In monochrome pictures or pictures having three separate color planes, a CTU may comprise a single CTB and syntax elements used to code the samples of the CTB. A CTB may be an NxN block of samples.

[0088] To achieve a better performance, the video encoder 20 may recursively perform tree partitioning such as binary-tree partitioning, ternary-tree partitioning, quad-tree partitioning or a combination thereof on the CTBs of the CTU and divide the CTU into smaller CUs. As depicted in FIG. 4C, the 64x64 CTU 400 is first divided into four smaller CUs, each having a block size of 32x32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four CUs of 16x16 by block size. The two 16x16 CUs 430 and 440 are each further divided into four CUs of 8x8 by block size. FIG. 4D depicts a quad-tree data structure illustrating the end result of the partition process of the CTU 400 as depicted in FIG. 4C, each leaf node of the quad-tree corresponding to one CU of a respective size ranging from 32x32 to 8x8. Like the CTU depicted in FIG. 4B, each CU may comprise a CB of luma samples and two corresponding CBs of chroma samples, and syntax elements used to code the samples of the CBs. In monochrome pictures or pictures having three separate color planes, a CU may comprise a single CB and syntax structures used to code the samples of the CB. It should be noted that the quad-tree partitioning depicted in FIGS. 4C and 4D is only for illustrative purposes and one CTU can be split into CUs to adapt to varying local characteristics based on quad / ternary / binary-tree partitions. In the multi-type tree structure, one CTU is partitioned by a quad-tree structure and each quad-tree leaf CU can be further partitioned by a binary and / or ternary tree structure. As shown in FIG. 4E, there are five possible partitioning types of a CB having a width W and a height H, i.e., quaternary partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.

[0089] In some implementations, the video encoder 20 may further partition a CB of a CU into one or more MxN PBs. A PB is a rectangular (square or non-square) block of samples on which the same prediction, inter, intra etc., is applied. A PU of a CU may comprise a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements used to predict the PBs. In monochrome pictures or pictures having three separate color planes, a PU may comprise a single PB and syntax structures used to predict the PB. The video encoder 20 may generate predictive luma, Cb, and Cr blocks for luma, Cb, and Cr PBs of each PU of the CU.

[0090] Furthermore, as illustrated in FIG. 4C, the video encoder 20 may use quad-tree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks respectively. A transform block is a rectangular (square or non-square) block of samples on which the same transform is applied. A TU of a CU may comprise a TB of luma samples, two corresponding TBs of chroma samples, and syntax elements used to transform the TBs. Thus, each TU of a CU may be associated with a TB, a Cb TB, and a Cr TB. In some examples, the luma TB associated with the TU may be a sub-block of the CU's luma residual block. The Cb TB may be a sub-block of the CU's Cb residual block. The Cr TB may be a sub-block of the CU's Cr residual block. In monochrome pictures or pictures having three separate color planes, a TU may comprise a single TB and syntax structures used to transform the samples of the TB.

[0091] Various video coding techniques may be used to compress video data. Video coding is performed according to one or more video coding standards. For example, nowadays, some well-known video coding standards include Versatile Video Coding (VVC) , High Efficiency Video Coding (HEVC, also known as H. 265 or MPEG-H Part2) and Advanced Video Coding (AVC, also known as H. 264 or MPEG-4 Part 10) , which are jointly developed by ISO / IEC MPEG and ITU-T VCEG. AOMedia Video 1 (AV1) was developed by Alliance for Open Media (AOM) as a successor to its preceding standard VP9. Audio Video Coding (AVS) , which refers to digital audio and digital video compression standard, is another video compression standard series developed by the Audio and Video Coding Standard Workgroup of China. Most of the existing video coding standards are built upon the famous hybrid video coding framework i.e., using block-based prediction methods (e.g., inter-prediction, intra-prediction) to reduce redundancy present in video images or sequences and using transform coding to compact the energy of the prediction errors. An important goal of video coding techniques is to compress video data into a form that uses a lower bit rate while avoiding or minimizing degradations to video quality.

[0092] The first generation AVS standard includes Chinese national standard “Information Technology, Advanced Audio Video Coding, Part 2: Video” (known as AVS1) and “Information Technology, Advanced Audio Video Coding Part 16: Radio Television Video” (known as AVS+) . It can offer around 50%bit-rate saving at the same perceptual quality compared to MPEG-2 standard. The AVS1 standard video part was promulgated as the Chinese national standard in February 2006. The second generation AVS standard includes the series of Chinese national standard “Information Technology, Efficient Multimedia Coding” (knows as AVS2) , which is mainly targeted at the transmission of extra HD TV programs. The coding efficiency of the AVS2 is double of that of the AVS+. In May 2016, the AVS2 was issued as the Chinese national standard. Meanwhile, the AVS2 standard video part was submitted by Institute of Electrical and Electronics Engineers (IEEE) as one international standard for applications. The AVS3 standard is one new generation video coding standard for UHD video application aiming at surpassing the coding efficiency of the latest international standard HEVC. In March 2019, at the 68-th AVS meeting, the AVS3-P2 baseline was finished, which provides approximately 30%bit-rate savings over the HEVC standard. Currently, there is one reference software, called high performance model (HPM) , is maintained by the AVS group to demonstrate a reference implementation of the AVS3 standard.

[0093] Like the HEVC, the AVS3 standard is built upon the block-based hybrid video coding framework. Figure 5 gives the block diagram of a generic block-based hybrid video encoding system. The input video signal is processed block by block (called coding units (CUs) ) . Different from the HEVC which partitions blocks only based on quad-trees, in the AVS3, one coding tree unit (CTU) is split into CUs to adapt to varying local characteristics based on quad / binary / extended-quad-tree. Additionally, the concept of multiple partition unit type in the HEVC is removed, i.e., the separation of CU, prediction unit (PU) and transform unit (TU) does not exist in the AVS3; instead, each CU is always used as the basic unit for both prediction and transform without further partitions. In the tree partition structure of the AVS3, one CTU is firstly partitioned based on a quad-tree structure. Then, each quad-tree leaf node can be further partitioned based on a binary and extended-quad-tree structure. In Figure 5, spatial prediction and / or temporal prediction may be performed. Spatial prediction (or “intra prediction” ) uses pixels from the samples of already coded neighboring blocks (which are called reference samples) in the same video picture / slice to predict the current video block. Spatial prediction reduces spatial redundancy inherent in the video signal. Temporal prediction (also referred to as “inter prediction” or “motion compensated prediction” ) uses reconstructed pixels from the already coded video pictures to predict the current video block. Temporal prediction reduces temporal redundancy inherent in the video signal. Temporal prediction signal for a given CU is usually signaled by one or more motion vectors (MVs) which indicate the amount and the direction of motion between the current CU and its temporal reference. Also, if multiple reference pictures are supported, one reference picture index is additionally sent, which is used to identify from which reference picture in the reference picture store the temporal prediction signal comes. After spatial and / or temporal prediction, the mode decision block in the encoder chooses the best prediction mode, for example based on the rate-distortion optimization method. The prediction block is then subtracted from the current video block; and the prediction residual is de-correlated using transform and then quantized. The quantized residual coefficients are inverse quantized and inverse transformed to form the reconstructed residual, which is then added back to the prediction block to form the reconstructed signal of the CU. Further in-loop filtering, such as deblocking filter, sample adaptive offset (SAO) and adaptive in-loop filter (ALF) may be applied on the reconstructed CU before it is put in the reference picture store and used as reference to code future video blocks. To form the output video bit-stream, coding mode (inter or intra) , prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit to be further compressed and packed.

[0094] The first version of the HEVC standard was finalized in October 2013, which offers approximately 50%bit-rate saving or equivalent perceptual quality compared to the prior generation video coding standard H. 264 / MPEG AVC. Although the HEVC standard provides significant coding improvements than its predecessor, there is evidence that superior coding efficiency can be achieved with additional coding tools over HEVC. Based on that, both VCEG and MPEG started the exploration work of new coding technologies for future video coding standardization. One Joint Video Exploration Team (JVET) was formed in Oct. 2015 by ITU-T VCEG and ISO / IEC MPEG to begin significant study of advanced technologies that could enable substantial enhancement of coding efficiency. One reference software called joint exploration model (JEM) was maintained by the JVET by integrating several additional coding tools on top of the HEVC test model (HM) .

[0095] In Oct. 2017, the joint call for proposals (CfP) on video compression with capability beyond HEVC was issued by ITU-T and ISO / IEC. In Apr. 2018, 23 CfP responses were received and evaluated at the 10-th JVET meeting, which demonstrated compression efficiency gain over the HEVC around 40%. Based on such evaluation results, the JVET launched a new project to develop the new generation video coding standard that is named as Versatile Video Coding (VVC) . In the same month, one reference software codebase, called VVC test model (VTM) , was established for demonstrating a reference implementation of the VVC standard.

[0096] Like HEVC, the VVC is built upon the block-based hybrid video coding framework. Figure 5 gives the block diagram of a generic block-based hybrid video encoding system. The input video signal is processed block by block (called coding units (CUs) ) . In VTM-1.0, a CU can be up to 128x128 pixels. However, different from the HEVC which partitions blocks only based on quad-trees, in the VVC, one coding tree unit (CTU) is split into CUs to adapt to varying local characteristics based on quad / binary / ternary-tree. Additionally, the concept of multiple partition unit type in the HEVC is removed, i.e., the separation of CU, prediction unit (PU) and transform unit (TU) does not exist in the VVC anymore; instead, each CU is always used as the basic unit for both prediction and transform without further partitions. In the multi-type tree structure, one CTU is firstly partitioned by a quad-tree structure. Then, each quad-tree leaf node can be further partitioned by a binary and ternary tree structure. As shown in Figure 6, there are five splitting types, quaternary partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning. In Figure 5, spatial prediction and / or temporal prediction may be performed. Spatial prediction (or “intra prediction” ) uses pixels from the samples of already coded neighboring blocks (which are called reference samples) in the same video picture / slice to predict the current video block. Spatial prediction reduces spatial redundancy inherent in the video signal. Temporal prediction (also referred to as “inter prediction” or “motion compensated prediction” ) uses reconstructed pixels from the already coded video pictures to predict the current video block. Temporal prediction reduces temporal redundancy inherent in the video signal. Temporal prediction signal for a given CU is usually signaled by one or more motion vectors (MVs) which indicate the amount and the direction of motion between the current CU and its temporal reference. Also, if multiple reference pictures are supported, one reference picture index is additionally sent, which is used to identify from which reference picture in the reference picture store the temporal prediction signal comes. After spatial and / or temporal prediction, the mode decision block in the encoder chooses the best prediction mode, for example based on the rate-distortion optimization method. The prediction block is then subtracted from the current video block; and the prediction residual is de-correlated using transform and quantized. The quantized residual coefficients are inverse quantized and inverse transformed to form the reconstructed residual, which is then added back to the prediction block to form the reconstructed signal of the CU. Further in-loop filtering, such as deblocking filter, sample adaptive offset (SAO) and adaptive in-loop filter (ALF) may be applied on the reconstructed CU before it is put in the reference picture store and used to code future video blocks. To form the output video bit-stream, coding mode (inter or intra) , prediction mode information, motion information, and quantized residual coefficients are all sent to the entropy coding unit to be further compressed and packed to form the bit-stream.

[0097] Figure 7 gives a general block diagram of a block-based video decoder. The video bit-stream is first entropy decoded at entropy decoding unit. The coding mode and prediction information are sent to either the spatial prediction unit (if intra coded) or the temporal prediction unit (if inter coded) to form the prediction block. The residual transform coefficients are sent to inverse quantization unit and inverse transform unit to reconstruct the residual block. The prediction block and the residual block are then added together. The reconstructed block may further go through in-loop filtering before it is stored in reference picture store. The reconstructed video in reference picture store is then sent out to drive a display device, as well as used to predict future video blocks.

[0098] The main focus of the disclosure is to improve the adaptive loop filter (ALF) and cross-component adaptive loop filter (CCALF) . The related background knowledge is elaborated in the following sections. ALF in VVC Filter Shapes, Linear Filtering and Adaptive Clipping

[0099] In VVC, ALF is applied to the output samples of SAO. Two filter shapes, 7×7 diamond shape and 5×5 diamond shape are supported for luma and chroma components, respectively, as shown in Figure 8. In Figure 8, each square corresponds to a luma or a chroma sample and the center square corresponds to a current to-be-filtered sample. The filter coefficients use point-symmetry and each integer filter coefficient is represented with 7-bit fractional precision. In addition, the sum of coefficients of one filter is equal to 128, which is the fixed-point representation of 1.0 with 7-bit fractional precision: , where the number of coefficients N is equal to 13 and 7 for 7×7 and 5×5 filter shape, respectively. A filtered sample value at coordinates (x, y) is derived by applying coefficient ci to the reconstructed sample values R (x, y) as follows: , where (x+xi, y+yi) and (x-xi, y-yi) are the coordinates of the reconstructed samples corresponding to i-th coefficient ci. Due to the constraint in equation (1) , equation (2) can be written as:

[0100] In VVC, the possibility to clip the difference between the neighboring sample value and the current to-be-filtered sample is added to equation (3) as follows: , where fi=min (bi, max (-bi, R (x+xi, y+yi) -R (x, y) ) ) + min (bi, max (-bi, R (x-xi, y-yi) -R (x, y) ) )                                   (5) bi is the clipping parameter for a coefficient ci determined by a clipping index di. bi is derived as follows: , where BD is the sample bit depth and di can be 0, 1, 2 or 3. Luma Sub-Block Level Filter Adaptation

[0101] In VVC, sub-block level filter adaption is only applied to luma component. Each 4×4 luma block is classified based on its directionality and 2D Laplacian activity. First, the values of sample gradients for horizontal, vertical and two diagonal directions are calculated: Hk, l=|2R (k, l) -R (k-1, l) -R (k+1, l) |, Vk, l=|2R (k, l) -R (k, l-1) -R (k, l+1) |, D0k, l=|2R (k, l) -R (k-1, l-1) -R (k+1, l+1) |, D1k, l=|2R (k, l) -R (k-1, l+1) -R (k+1, l-1) |.                                                           (7)

[0102] Based on the sample gradients, sub-block horizontal gradient, gh, vertical gradient, gv, and two diagonal gradients, gd0 and gd1, are calculated as

[0103] Indices i and j refer to the coordinates of the upper left sample in the 4×4 luma block. As it can be seen from equation (8) , the sum of sample gradients within a 10×10 luma window that covers the target 4×4 block is used for classifying that block. To reduce the complexity, only gradient of every second sample in a 10×10 window is calculated as illustrated in Figure 9. The values of other sample gradients are set to 0.

[0104] Second, to assign the directionality D, the ratio of the maximum and the minimum of the sub-block horizontal and vertical gradients

[0105] and the ratio of the maximum and the minimum of two sub-block diagonal gradients

[0106] are compared against each other with a set of thresholds t1 and t2:

[0107] Step 1: If both and D is set to 0.

[0108] Step 2: If the directionality D is calculated in Step 3, otherwise in Step 4.

[0109] Step 3: If D is set to 2, otherwise D is set to 1.

[0110] Step 4: If D is set to 4, otherwise D is set to 3.

[0111] Each subsequent step in the above calculation of D is only executed if there is no value assigned to D in the previous steps. Third, an activity value A is calculated as A is further mapped to the range of 0 to 4:  where {Qn} ={0, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4} . Finally, each 4×4 luma block is categorized into one of the 25 classes:

[0112] Each class can have its own filter assigned.

[0113] Before filtering each 4×4 luma block, a geometric transformation, such as 90-degree rotation, diagonal or vertical flip, is applied to the filter coefficients, as illustrated in Figure 10, depending on the sub-block gradient value as specified in Table 1. Table 1 Coding Tree Block Level Filter Adaptation

[0114] In addition to the luma 4×4 block-level filter adaptation, ALF supports CTB-level filter adaptation. A luma CTB can use a filter set calculated for the current slice or one of the filter sets calculated for the already coded slices. It can also use one of the 16 offline trained filter sets. Within each luma CTB, which filter from the chosen filter set should be applied to each 4 × 4 block, is determined by the class C calculated in equation (12) for this block.

[0115] Chroma uses only CTB-level filter adaptation. Up to 8 filters can be used for chroma components in a slice. Each CTB can select one of these filters. Syntax Design

[0116] Filter coefficients and clipping indices are carried in ALF APSs. An ALF APS can include up to 8 chroma filters and one luma filter set with up to 25 filters. An index iC is also included for each of the 25 luma classes. Classes having the same index iC share the same filter. By merging different classes, the number of bits required to represent the filter coefficients is reduced. The absolute value of a filter coefficient is represented using a 0th order Exp-Golomb code followed by a sign bit for a non-zero coefficient. When clipping is enabled, a clipping index is also signaled for each filter coefficient using a two-bit fixed-length code. The storage needed for ALF coefficients and clipping indices within an APS is at most 3480 bits. Up to 8 ALF APSs can be used by the decoder at the same time.

[0117] Filter control syntax elements include two types of information. First, ALF on / off flags are signaled at sequence, picture, slice and CTB levels. Chroma ALF can be enabled at picture and slice level only if luma ALF is enabled at the corresponding level. Second, filter usage information is signaled at picture, slice and CTB level, if ALF is enabled at that level. Referenced ALF APSs IDs are coded at a slice level or at a picture level if all the slices within the picture use the same APSs. Luma component can reference up to 7 ALF APSs and chroma components can reference 1 ALF APS. For a luma CTB, an index is signaled indicating which ALF APS or offline trained luma filter set is used. For a chroma CTB, the index indicates which filter in the referenced APS is used. Line Buffer Reduction

[0118] To reduce the storage requirement for ALF, VVC employs line buffer boundary processing. In VVC, line buffer boundaries are placed 4 luma samples and 2 chroma samples above horizontal CTU boundaries. When applying ALF to a sample on one side of a line buffer boundary, samples on the other side of the line buffer boundary cannot be used. ALF in ECM ALF simplification removal

[0119] 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. ALF with fixed filters

[0120] To filter a luma sample, three different classifiers (C0, C1 and C2) and three different sets of filters (F0, F1 and F2) are used. Sets F0 and F1 contain fixed filters, with coefficients trained for classifiers C0 and C1. Coefficients of filters in F2 are signalled. 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. Filtering

[0121] At first, two 13x13 diamond shape fixed filters F0 and F1 are applied to derive two intermediate samples R0 (x, y) and R1 (x, y) . After that, F2 is applied to R0 (x, y) , R1 (x, y) , neighboring samples, and samples before deblocking filter (DBF) to derive a filtered sample as , where fi, j is the clipped difference between a neighboring sample and current sample R (x, y) , gi is the clipped difference between Ri-20 (x, y) and current sample R (x, y) , 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 signaled. The filter shape of F2 is presented in Figure 11. Classification

[0122] Based on directionality Di and activity aclass Ci is assigned to each 2x2 block: where MD, i represents the total number of directionalities Di.

[0123] As in VVC, values of the horizontal, vertical, and two diagonal gradients are 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 with a set of thresholds. The directionality D2 is derived as in VVC 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 ≤Th[0] ; otherwise,  is the maximum integer such that Edge strength is 0 if otherwise,  is the maximum integer such that When  i.e., horizontal / vertical edges are dominant, the Di is derived by using Table 2 (a) ; otherwise, diagonal edges are dominant, the Di is derived by using Table 2 (b) . Table 2

[0124] To obtain 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

[0125] In an ALF_APS, up to 4 luma filter sets are signalled, each set may have up to 25 filters. Alternative 2x2 ALF classifier

[0126] Classification in ALF is extended with an additional alternative classifier. For a signalled luma filter set, a flag is signalled 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) .       (16)  Residual-based classifier

[0127] Classification in ALF is extended with a third classifier based on luma residual sample values. For each 2x2 luma block, the sum of absolute values of the residual samples in a neighbouring 8x8 window is calculated, and the class index is derived as: classIdx = sum >> (sample bit depth –4) .

[0128] The value of classIdx is in the range of 0 to 24, same as in ECM-8.0. The classifier usage is signalled for each luma filter set in APS. Extended Fixed-Filter-Output based Taps for ALF

[0129] In ALF online-trained filters consist of 4 kinds of filter taps: spatial taps, reconstruction-before-DBF based taps, residual based taps and fixed-filter-output based taps as shown in Figure 19. Improved fixed filters for ALF

[0130] 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 in ECM-9.0. Then the proposed class index Ci′is derived as Ci′= C′*896+Ci.

[0131] The total number of the fixed filters is not changed.

[0132] 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 as shown in Table 3. Table 3

[0133] Fixed filter f1 is applied to outputs of f0 (instead of ALF input) and samples before DBF.

[0134] Finally, a signalled 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. Chroma ALF fixed filter

[0135] A classifier based on Laplacian values and variance is applied to a 2x2 chroma block. Compared to the luma classifier of a fixed filter, when calculating the activity value, the sum of the chroma vertical and horizonal Laplacian values is multiplied by 2 before scaling. Similarly, the chroma variance is multiplied by 2 before scaling. The derived class index is then used to select a fixed filter from a chroma filter set. A chroma fixed filter is applied to chroma ALF input samples in a 13x13 diamond shape and DBF input samples in a 7x7 diamond shape. The first luma classifier is applied to each 2x2 chroma block. The derived class index is then used to select a fixed filter from the luma fixed filter set related to this classifier. A fixed filter is applied to chroma ALF input sample in a 9x9 diamond shape and DBF input samples in a 9x9 diamond shape. In a signalled chroma filter, 5x5 crossing extra taps are introduced, which are applied to the fixed filter output. The updated online chroma ALF filter shape is shown in Figure 20. Extended usage of fixed filters

[0136] The fixed filters defined in ALF is also performed right after DBF, where the fixed filter takes the reconstruction samples before and after DBF as input to generate the filtered results at this stage. The classification and filtering logic of the fixed filter are directly reused as in ALF. The ALF process is kept unchanged as well, including both offline-filtering and online-filtering. The fixed filters at this stage signals one slice level flag to achieve on / off control. CCALF in VVC Filter Shapes and Precision

[0137] CCALF uses the luma sample values to refine the chroma sample values within the ALF process. As shown in Fig. 12, a linear filtering operation takes the luma sample values as input and generates the correction values for the chroma sample values. The correction is generated independently for each chroma component i, i∈ {Cb, Cr} and can be represented by: where (x, y) is the sample location of the chroma component i, (xC, yC) is the luma sample location derived from (x, y) , (x0, y0) are the filter support offset around (xC, yC) , Si is the filter support region in luma for the chroma component i. The luma location (xC, yC) is determined based on the spatial scaling factor between the luma and chroma planes. The sample values in the luma support region are also inputs to the ALF luma stage and correspond to the output of the SAO stage.

[0138] As shown in Figure 13, the CCALF filter has a diamond shape. As seen in Figure 13, for a 4: 2: 0 video sequence, with chroma location type 0, i.e., when the chroma samples are horizontally co-sited with the even numbered columns of the luma samples and vertically interstitial between the rows of the luma samples, the center of the diamond is aligned with a chroma sample location.

[0139] CCALF coefficients have a greater degree of flexibility compared to regular ALF coefficients, since no symmetry constraints are enforced. However, two limitations are enforced: 1) To preserve DC neutrality, the sum of CCALF coefficient values is required to be zero. As a result, only seven of the eight CCALF coefficients need to be signalled in the bitstream, and the coefficient at location (xC, yC) is derived at the decoder. 2) The absolute value of CCALF coefficients is restricted to be either zero or an integer power of two, specifically {0, 1, 2, 4, 8, 16, 32, 64} . This enables implementations to use variable bit-shift operations in place of multiplications for CCALF, if desired. Syntax Design

[0140] The maximum number of filters per chroma component of a picture was four in the final design of VVC. A different set of CCALF coefficients can be selected for each CTU of a chroma component. As is the case for the regular ALF coefficients, CCALF coefficients are signalled within an ALF APS. Each ALF APS contains up to four CCALF filters for each chroma component. While CCALF can be enabled at a sequence level, it can only be enabled if ALF is also enabled for the sequence. Similarly, CCALF can be enabled at picture and slice level only if luma ALF is enabled at the corresponding level. Line Buffer Reduction

[0141] As described in the “Line Buffer Reduction” section , the luma and the chroma line buffer boundaries are four and two samples, respectively, above the CTU boundary. For the 4: 2: 0 chroma format, this results in line buffer boundaries that are aligned for chroma and luma. However, for 4: 2: 2 and 4: 4: 4 chroma formats, the chroma and the luma line buffer boundaries are not aligned with each other. As a result of this misalignment, for 4: 2: 2 and 4: 4: 4 chroma formats, CC-ALF is not applied to the rows three and four samples above the CTU boundary. CCALF in ECM

[0142] The CCALF process uses a linear filter to filter luma sample values and generate a residual correction for the chroma samples. A25-tap large filter is used in CCALF process, which is illustrated in Figure 14. For a given slice, the encoder can collect the statistics of the slice, analyze them and can signal up to 16 filters through APS. CCALF with long tap filter

[0143] Different from VVC wherein only luma samples are involved in CCALF, in ECM, the CCALF process uses a linear filter to filter luma sample values, luma residual samples and generate a residual correction for the chroma samples. In addition, the CCALF filter shape is constructed by 23 luma spatial taps and 5 luma residual taps, which is illustrated in FIG. 28. For a given slice, the encoder can collect the statistics of the slice, analyze them and can signal up to 16 filters through APS. The number of bits used to represent the fractional part of a CCALF coefficient can vary from 7 to 10 adaptively. In an ALF adaptation parameter set (APS) , a 2-bit syntax element is signalled for each chroma component to indicate the number of bits used for the CCALF coefficients for this component. In addition, the power of 2 constraint is removed. CCALF with Chroma SAO input

[0144] In the proposed method, 4 chroma reconstruction taps in a 3x3 cross shape are added for CCALF, as shown in FIG. 29. The extended taps take the co-located and neighbouring chroma samples from the SAO’s output as input. All the current luma spatial reconstruction taps and luma residual taps in CCALF are kept unchanged. The coefficient signaling mechanism is the same as the current design in ECM.

[0145] Although ALF and CCALF has been improved in ECM, there is room to further improve its performance.

[0146] First, online ALF filter in ECM takes spatial neighboring pixels, fixed ALF filter results and spatial neighboring pixels before deblocking filter as input. However, besides these information, other information such as spatial neighboring pixels in prediction signal, spatial neighboring pixels in residual signal, or spatial neighboring pixels before SAO can also be used as online ALF filter equation input, which may benefit the coding performance.

[0147] Second, edge-based classifier and band-based classifier are used adaptively for online ALF filter in ECM. However, these two classifier may be further combined to provide other classifiers, which may benefit the coding performance.

[0148] Third, the filter shape for chroma ALF is diamond in ECM, while the filter shape for luma ALF is long cross shape, such non-unified design may not be optimal from standardization point of view.

[0149] Fourth, the edge-based classifier and band-based classifier in ECM only consider the pixel values after SAO. However, after the pixel values from the stages: 1) right before deblocking filter 2) prediction signal 3) residual signal 4) right before SAO are saved as online ALF filter equation input, these pixel values can also be utilized to design new classifiers, which may benefit the coding performance.

[0150] Fifth, the edge-based classifier and band-based classifier in ECM only consider luma pixel values after SAO. However, the chroma pixel values can also be utilized to design new classifier, which may benefit the coding performance.

[0151] Sixth, similar to the luma pixel values from the stages: 1) right before deblocking filter 2) prediction signal 3) residual signal 4) right before SAO are saved as additional online luma ALF filter equation input, the chroma pixel values from the stages: 1) before deblocking filter 2) prediction signal 3) residual signal 4) right before SAO can also be saved as additional online chroma ALF filter equation input, which may benefit the coding performance.

[0152] Seventh, similar to the luma pixel values from the stages: 1) right before deblocking filter 2) prediction signal 3) residual signal 4) right before SAO are saved as additional online luma ALF filter equation input, the luma pixel values from the stages: 1) right before deblocking filter 2) prediction signal 3) residual signal 4) right before SAO can also be saved as additional CCALF filter equation input, which may benefit the coding performance.

[0153] Eighth, the classifiers design in ECM only considers the reconstruction pixel values. However, the coding mode information such as whether a coding block is coded with skip mode, whether the coding block is coded with intra, inter P or inter B mode can also be utilized to design classifier, which may benefit the coding performance.

[0154] Ninth, after online ALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., according to current line buffer settings in VVC, additional line buffers are needed to save 4 rows of corresponding luma samples and 2 rows of corresponding chroma samples above horizontal CTU boundaries, which increases the implementation complexity.

[0155] Tenth, after CCALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., according to current line buffer settings in VVC, additional line buffers are needed to save 4 rows of corresponding luma samples above horizontal CTU boundaries, which increases the implementation complexity.

[0156] Eleventh, after online ALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., sample padding is needed when the filter shape of the additional input with its central position aligned with the to-be-filtered sample crosses the virtual boundary (line buffer boundary) or picture (slice, tile) boundary.

[0157] Twelfth, two edge-based classifiers with two different window sizes are utilized for training two sets of ALF fixed filters. However, besides edge-based classifiers, other classifiers such as band-based classifier, residual-based classifier, etc. can also be utilized for training corresponding sets of ALF fixed filters, and online ALF filter can take outputs of all these trained sets of ALF fixed filters as additional inputs, which may benefit the coding performance.

[0158] Thirteenth, ALF fixed filters are trained using spatial neighboring reconstructed pixels as input. However, besides spatial neighboring reconstructed pixels, spatial neighboring pixels right before deblocking filter, spatial neighboring pixels in prediction signal, spatial neighboring pixels in residual signal, or spatial neighboring pixels right before SAO can also be used as ALF fixed filters input when training the ALF fixed filters, which may benefit the coding performance.

[0159] Fourteenth, sub-block level filter adaption is only applied in luma ALF. However, besides luma ALF, sub-block level filter adaption can also be extended to chroma ALF, which may benefit the coding performance.

[0160] Fifteenth, sub-block level filter adaption is only applied in luma ALF. However, besides luma ALF, sub-block level filter adaption can also be extended to CCALF, which may benefit the coding performance.

[0161] Sixteenth, online chroma ALF filter takes spatial neighboring pixels in chroma reconstruction signal and fixed filter outputs as input. However, besides these information, other information such as spatial neighboring pixels in luma reconstruction signal can also be used as online chroma ALF filter input, which may benefit the coding performance.

[0162] Seventeenth, CCALF filter takes spatial neighboring pixels in original luma reconstruction signal as input. However, besides these information, other information such as spatial neighboring pixels in down-sampled luma reconstruction signal can also be used as CCALF filter input, which may benefit the coding performance.

[0163] Eighteenth, the luma fixed filters are applied one time right after DBF. However, besides applied one time right after DBF, the luma fixed filters can be applied more times and in different stages of in-loop filters, which may benefit the coding performance.

[0164] Nineteenth, the chroma fixed filters are applied in chroma ALF stage where the outputs of the chroma fixed filters are used as the input of the online chroma ALF filter. However, besides used as the input of the online chroma ALF filter, the chroma fixed filters can be applied in other stages of in-loop filters, which may benefit the coding performance.

[0165] Twentieth, the luma fixed filters and chroma fixed filters are trained offline. When they are directly applied in different stages of in-loop filters, the output results can be adjusted to adapt the online situation, which may benefit the coding performance.

[0166] Twenty-first, for one chroma component, CCALF takes the luma reconstruction signal, the luma residual signal and the chroma reconstruction signal in the corresponding chroma component as inputs. However, besides these information, other information such as the chroma reconstruction signal in the another chroma component can also be utilized as additional CCALF input, which may benefit the coding performance.

[0167] In this disclosure, to address the issues as pointed out in the “problem statement” section, methods are provided to further improve the existing design of the ALF. In general, the main features of the proposed technologies in this disclosure are summarized as follows. 1. Online ALF filter takes spatial neighboring pixels in prediction signal, spatial neighboring pixels in residual signal, or spatial neighboring pixels before SAO as additional input. 2. The classifiers which combine the features of edge-based classifier and band-based classifier are used as additional classifier for online ALF filter. 3. The filter shape for chroma ALF is changed from diamond shape to long cross shape to unify with the filter shape for luma ALF. 4. The classifiers which utilize the pixel values from the stages: 1) right before deblocking filter 2) prediction signal 3) residual signal 4) right before SAO are used as additional classifier for online ALF filter. 5. The classifiers which utilize the chroma pixel values are used as additional classifier for online ALF filter. 6. Online chroma ALF filter takes spatial neighboring pixels in chroma prediction signal, spatial neighboring pixels in chroma residual signal, spatial neighboring pixels from the stage right before chroma SAO, or spatial neighboring pixels from the stage right before chroma deblocking as additional input. 7. CCALF filter takes spatial neighboring pixels in luma prediction signal, spatial neighboring pixels in luma residual signal, spatial neighboring pixels from the stage right before luma SAO, or spatial neighboring pixels from the stage right before luma deblocking as additional input. 8. The classifiers which utilize the coding mode information such as whether a coding block is coded with skip mode, whether the coding block is coded with intra, inter P or inter B mode are used as additional classifiers for online ALF filter. 9. When online ALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., according to current line buffer settings in VVC, 4 rows of corresponding luma samples and 2 rows of corresponding chroma samples above horizontal CTU boundaries are assumed to default values, which can save these line buffers. 10. When CCALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples, 4) samples right before SAO, etc., according to current line buffer settings in VVC, 4 rows of corresponding luma samples above horizontal CTU boundaries are assumed to default values, which can save these line buffers. 11. When online ALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., sample padding is conducted when the filter shape of the additional input with its central position aligned with the to-be-filtered sample crosses the virtual boundary (line buffer boundary) or picture (slice, tile) boundary. 12. Band-based classifier, residual-based classifier, etc. are utilized for training additional sets of ALF fixed filters. Then, the outputs of these additional sets of ALF fixed filters together with the outputs of the original two sets of ALF fixed filters trained based on the two edge-based classifiers are utilized as the online ALF filter inputs. 13. When training ALF fixed filters, the spatial neighboring reconstructed pixels together with the spatial neighboring pixels right before deblocking filter, spatial neighboring pixels in prediction signal, spatial neighboring pixels in residual signal, or spatial neighboring pixels right before SAO are used as ALF fixed filter inputs. 14. Sub-block level filter adaption is applied to chroma ALF, where edge-based classifier, band-based classifier or residual-based classifier are utilized in chroma ALF. 15. Sub-block level filter adaption is applied to CCALF, where edge base classifier, band-based classifier or residual-based classifier are utilized in CCALF. 16. Online chroma ALF filter takes spatial neighboring pixels in luma reconstruction signal as additional input. 17. CCALF filter takes spatial neighboring pixels in down-sampled luma reconstruction signal as additional input. 18. The luma fixed filters are applied in stages of in-loop filters. 19. The chroma fixed filters are applied in stages of in-loop filters. 20. The residual scaling or residual offset adjustment are applied to the luma or chroma fixed filter results. 21. CCALF filter for one chroma component takes the reconstruction signal in another chroma component as additional input.

[0168] It is noted that the disclosed methods may be applied independently or jointly. Information in prediction, residual or before SAO used as additional ALF input

[0169] According to the one or more embodiments of the disclosure, information in prediction, residual or before SAO are used as additional ALF equation input. Different methods may be used to achieve this goal.

[0170] In the first method, it is proposed to take the spatial neighboring pixels in prediction signal as additional ALF equation input. Various filter shapes can be used to extract the information in prediction signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in prediction signal. In one example, the clipping differences between the surrounding pixels in prediction signal and current pixel are used as ALF equation input. In another example, the clipping differences between the surrounding pixels in prediction signal and the collocated pixel in prediction signal, the clipping difference between the collocated pixel in prediction signal and current pixel are used as ALF equation input.

[0171] Besides applying additional online ALF filter taps directly to prediction signal, additional online ALF filter taps can also be applied to the midterm results which are obtained by feeding prediction signal to fixed filters. Various fixed filters can be applied to filter prediction signal to obtain the midterm results, which can gather the prediction signal information in a large receptive field. For example, the two 13x13 diamond shape fixed filters utilized in ALF in ECM can be utilized to filter prediction signal to obtain the midterm results. When applying fixed filters to prediction signal, the block level classification results can directly utilize the block level classification results computed for right after SAO signal, or recomputed based on prediction signal. When applying fixed filters to prediction signal, one fixed filter trained based on one block level classifier can be utilized to obtain one midterm result, or two or more fixed filters trained based on two or more block level classifiers can be utilized to obtain two or more midterm results. In video coding standards, there are usually several groups fixed filters prepared, and one group fixed filter can be chosen from them by RDO process. For example, in ECM, one group fixed filter (contains two 13x13 diamond shape fixed filters) is chosen from two groups by RDO process, and the group index is transmitted to decoder. When applying fixed filters to prediction signal, the group index for prediction signal can be same to the group index for right after SAO signal, or different from the group index for right after SAO signal based on a predefined criterion, or decided for prediction signal by RDO process, where no group index for prediction signal is needed to transmitted to decoder in the first and second cases and the group index for prediction signal needed to transmitted to decoder in the third case. When applying additional online filter taps to the midterm results which are obtained by feeding prediction signal to fixed filters, various filter shapes can be used to extract the information in the midterm results. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in the midterm results. In one example, the clipping differences between the surrounding pixels in the midterm results and current pixel are used as ALF equation input. In another example, the clipping differences between the surrounding pixels in the midterm results and the collocated pixel in the midterm results, the clipping difference between the collocated pixel in the midterm results and current pixel are used as ALF equation input.

[0172] It should be noted that the additional online ALF filter taps can be applied to only prediction signal, or only the midterm results which are obtained by feeding prediction signal to fixed filters, or both prediction signal and the midterm results which are obtained by feeding prediction signal to fixed filters.

[0173] In the second method, it is proposed to take the spatial neighboring pixels in residual signal as additional ALF equation input. Various filter shapes can be used to extract the information in residual signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in residual signal. In one example, the clipping results of the collocated pixel in residual signal are used as ALF equation input.

[0174] Besides applying additional online ALF filter taps directly to residual signal, additional online ALF filter taps can also be applied to the midterm results which are obtained by feeding residual signal to fixed filters. Various fixed filters can be applied to filter residual signal to obtain the midterm results, which can gather the residual signal information in a large receptive field. For example, the two 13x13 diamond shape fixed filters utilized in ALF in ECM can be utilized to filter residual signal to obtain the midterm results. When applying fixed filters to residual signal, the filtering results can be clipped to different range, such as (-1024, 1024) , (-512, 512) , (-256, 256) , (-128, 128) , and so on. When applying fixed filters to residual signal, the block level classification results can directly utilize the block level classification results computed for right after SAO signal, or recomputed based on residual signal. When applying fixed filters to residual signal, one fixed filter trained based on one block level classifier can be utilized to obtain one midterm result, or two or more fixed filters trained based on two or more block level classifiers can be utilized to obtain two or more midterm results. When applying fixed filters to residual signal, the group index for residual signal can be same to the group index for right after SAO signal, or different from the group index for right after SAO signal based on a predefined criterion, or decided for residual signal by RDO process, where no group index for residual signal is needed to transmitted to decoder in the first and second cases and the group index for residual signal needed to transmitted to decoder in the third case. When applying additional online filter taps to the midterm results which are obtained by feeding residual signal to fixed filters, various filter shapes can be used to extract the information in the midterm results. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in the midterm results. In one example, the clipping results of the collocated pixel in the midterm results are used as ALF equation input.

[0175] It should be noted that the additional online ALF filter taps can be applied to only residual signal, or only the midterm results which are obtained by feeding residual signal to fixed filters, or both residual signal and the midterm results which are obtained by feeding residual signal to fixed filters.

[0176] In the third method, it is proposed to take the spatial neighboring pixels from the stage right before SAO signal as additional ALF equation input. Various filter shapes can be used to extract the information in before SAO signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in before SAO signal. In one example, the clipping differences between the surrounding pixels in before SAO signal and current pixel are used as ALF equation input. In another example, the clipping differences between the surrounding pixels in before SAO signal and the collocated pixel in before SAO signal, the clipping difference between the collocated pixel in before SAO signal and current pixel are used as ALF equation input.

[0177] Besides applying additional online ALF filter taps directly to right before SAO signal, additional online ALF filter taps can also be applied to the midterm results which are obtained by feeding right before SAO signal to fixed filters. Various fixed filters can be applied to filter right before SAO signal to obtain the midterm results, which can gather the right before SAO signal information in a large receptive field. For example, the two 13x13 diamond shape fixed filters utilized in ALF in ECM can be utilized to filter right before SAO signal to obtain the midterm results. When applying fixed filters to right before SAO signal, the block level classification results can directly utilize the block level classification results computed for right after SAO signal, or recomputed based on right before SAO signal. When applying fixed filters to right before SAO signal, one fixed filter trained based on one block level classifier can be utilized to obtain one midterm result, or two or more fixed filters trained based on two or more block level classifiers can be utilized to obtain two or more midterm results. When applying fixed filters to right before SAO signal, the group index for right before SAO signal can be same to the group index for right after SAO signal, or different from the group index for right after SAO signal based on a predefined criterion, or decided for right before SAO signal by RDO process, where no group index for right before SAO signal is needed to transmitted to decoder in the first and second cases and the group index for right before SAO signal needed to transmitted to decoder in the third case. When applying additional online filter taps to the midterm results which are obtained by feeding right before SAO signal to fixed filters, various filter shapes can be used to extract the information in the midterm results. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in the midterm results. In one example, the clipping differences between the surrounding pixels in the midterm results and current pixel are used as ALF equation input. In another example, the clipping differences between the surrounding pixels in the midterm results and the collocated pixel in the midterm results, the clipping difference between the collocated pixel in the midterm results and current pixel are used as ALF equation input.

[0178] It should be noted that the additional online ALF filter taps can be applied to only right before SAO signal, or only the midterm results which are obtained by feeding right before SAO signal to fixed filters, or both right before SAO signal and the midterm results which are obtained by feeding right before SAO signal to fixed filters.

[0179] In the fourth method, it is proposed to take the information in prediction, residual or before SAO signal as ALF equation input. The utilization method proposed in the first, second and third method can be combined to achieve the fourth method. New classifiers combined the features of edge-based classifier and band-based classifier

[0180] According to the one or more embodiments of the disclosure, the features of edge-based classifier and band-based classifier are combined to derive new classifiers for online ALF filter. Different methods may be used to achieve this goal.

[0181] In the first method, it is proposed to first compute the directionality D of the sub-block of luma component, then the sum of sample values of the sub-block is calculated and it is mapped to the index referring to the band-based classifier, and the class index for the sub-block is calculated as C=B*MD+D               (17) , where B is the index calculated referring to the band-based classifier, MD represents the total number of directionalities D. In one example, for the 2x2 luma block, the directionality D is calculated the same to D2 in ECM, and B is calculated as B = (sum *5) >> (sample bit depth + 2)                        (18)

[0182] In the second method, it is proposed to first compute the activity value A of the sub-block of luma component, then the sum of sample values of the sub-block is calculated and it is mapped to the index referring to the band-based classifier, and the class index for the sub-block is calculated as C=B*MA+A                      (19) , where B is the index calculated referring to the band-based classifier, MA represents the total number of the activity value A. In one example, for the 2x2 luma block, the activity value A is calculated the same to in ECM, and B is calculated as B = (sum *5) >> (sample bit depth + 2)                        (20)

[0183] In the third method, it is proposed to first compute the index of the sub-block of luma component referring to the edge-based classifier, then the sum of sample values of the sub-block is calculated and it is mapped to the index referring to the band-based classifier, and the class index for the sub-block is calculated as C=B*ME+E                                  (21) , where B is the index calculated referring to the band-based classifier, ME represents the total number of the index calculated referring to the edge-based classifier, E is the index calculated referring to the edge-based classifier. In one example, for the 2x2 luma block, the index E is calculated the same to C2 in ECM, and B is calculated as B = (sum *2) >> (sample bit depth + 2)                        (22) Adjust the chroma ALF filter shape to unify with luma ALF filter shape

[0184] In the third aspect of this disclosure, it is proposed to change the chroma ALF filter shape from diamond shape to long cross shape as shown in Figure 17, which is unified with the luma ALF filter shape.

[0185] Consider online chroma ALF filter shape is updated in a new ECM version, which takes both spatial neighboring pixels in chroma reconstruction signal and fixed filter outputs as input. To unify the chroma ALF filter shape with luma ALF filter shape, the online chroma ALF filter shape can be adjusted as Figure 21, Figure 22 or Figure 23. New classifiers utilized the pixel values from the stage right before deblocking filter

[0186] According to the one or more embodiments of the disclosure, the pixel values from the stage right before deblocking filter are utilized to derive new classifiers for online ALF filter. Different methods may be used to achieve this goal.

[0187] In the first method, it is proposed to first compute the directionality D of the sub-block of luma component, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before deblocking filter of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MD+D                                  (23) , where Dif is the difference index, MD represents the total number of directionalities D. In one example, for the 2x2 luma block, the directionality D is calculated the same to D2 in ECM, and Dif is calculated as Dif=sumDif>0? 2: (sumDif<0? 0: 1)                        (24) , where sumDif is the sum of difference values of the 2x2 luma block, or the sum of difference values in a neighboring NxN (such as 8x8) window which surrounds the 2x2 luma block.

[0188] In the second method, it is proposed to first compute the activity value A of the sub-block of luma component, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before deblocking filter of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MA+A                                  (25) , where Dif is the difference index, MA represents the total number of the activity value A. In one example, for the 2x2 luma block, the activity value A is calculated the same to in ECM, and Dif is calculated as in equation (24) .

[0189] In the third method, it is proposed to first compute the index of the sub-block of luma component referring to the edge-based classifier, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before deblocking filter of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*ME+E                                  (26) , where Dif is the difference index, ME represents the total number of the index calculated referring to the edge-based classifier, E is the index calculated referring to the edge-based classifier. In one example, for the 2x2 luma block, the index E is calculated the same to C2 in ECM, and Dif is calculated as in equation (24) .

[0190] In the fourth method, it is proposed to first compute the band index B of the sub-block of luma component, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before deblocking filter of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MB+B                                  (27) , where Dif is the difference index, MB represents the total number of the band value. In one example, for the 2x2 luma block, the band index B is calculated as B = (sum *8) >> (sample bit depth + 2)                        (28) , and Dif is calculated as in equation (24) .

[0191] In the fifth method, it is proposed to compute the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before deblocking filter of the sub-block or in a neighboring NxN window which surrounds the sub-block, then the sum of difference values is mapped to the difference index and the difference index is used as the class index.

[0192] In the sixth method, it is proposed to calculate the edged based classifier or band-based classifier based on the sample values from the stage right before deblocking filter, where the calculation method is same to original edge-based classifier or band-based classifier calculated based on the sample values after SAO. New classifiers utilized the pixel values in prediction signal

[0193] According to the one or more embodiments of the disclosure, the pixel values in prediction signal are utilized to derive new classifiers for online ALF filter. Different methods may be used to achieve this goal.

[0194] In the first method, it is proposed to first compute the directionality D of the sub-block of luma component, then the sum of difference values between sample in after SAO and collocated sample in prediction signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MD+D                                  (29) , where Dif is the difference index, MD represents the total number of directionalities D. In one example, for the 2x2 luma block, the directionality D is calculated the same to D2 in ECM, and Dif is calculated as Dif=sumDif>0? 2: (sumDif<0? 0: 1)                        (30) , where sumDif is the sum of difference values of the 2x2 luma block, or the sum of difference values in a neighboring NxN (such as 8x8) window which surrounds the 2x2 luma block.

[0195] In the second method, it is proposed to first compute the activity value A of the sub-block of luma component, then the sum of difference values between sample in after SAO and collocated sample in prediction signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MA+A                                  (31)  , where Dif is the difference index, MA represents the total number of the activity value A. In one example, for the 2x2 luma block, the activity value A is calculated the same to in ECM, and Dif is calculated as in equation (30) .

[0196] In the third method, it is proposed to first compute the index of the sub-block of luma component referring to the edge-based classifier, then the sum of difference values between sample in after SAO and collocated sample in prediction signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*ME+E                                  (32) , where Dif is the difference index, ME represents the total number of the index calculated referring to the edge-based classifier, E is the index calculated referring to the edge-based classifier. In one example, for the 2x2 luma block, the index E is calculated the same to C2 in ECM, and Dif is calculated as in equation (30) .

[0197] In the fourth method, it is proposed to first compute the band index B of the sub-block of luma component, then the sum of difference values between sample in after SAO and collocated sample in prediction signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MB+B                                  (33) , where Dif is the difference index, MB represents the total number of the band value. In one example, for the 2x2 luma block, the band index B is calculated as B = (sum *8) >> (sample bit depth + 2)                        (34) , and Dif is calculated as in equation (30) .

[0198] In the fifth method, it is proposed to compute the sum of difference values between sample in after SAO and collocated sample in prediction signal of the sub-block or in a neighboring NxN window which surrounds the sub-block, then the sum of difference values is mapped to the difference index and the difference index is used as the class index.

[0199] In the sixth method, it is proposed to calculate the edged based classifier or band-based classifier based on the sample values in prediction signal, where the calculation method is same to original edge-based classifier or band-based classifier calculated based on the sample values after SAO. New classifiers utilized the pixel values in residual signal

[0200] According to the one or more embodiments of the disclosure, the pixel values in residual signal are utilized to derive new classifiers for online ALF filter. Different methods may be used to achieve this goal.

[0201] In the first method, it is proposed to first compute the directionality D of the sub-block of luma component, then the sum of pixel values in residual signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the residual index, and the class index for the sub-block is calculated as C=Resi*MD+D                                  (35) , where Resi is the residual index, MD represents the total number of directionalities D. In one example, for the 2x2 luma block, the directionality D is calculated the same to D2 in ECM, and Resi is calculated as Resi=sumResi>0? 2: (sumResi<0? 0: 1)                        (36) , where sumResi is the sum of pixel values in residual signal of the 2x2 luma block, or the sum of pixel values in residual signal in a neighboring NxN (such as 8x8) window which surrounds the 2x2 luma block.

[0202] In the second method, it is proposed to first compute the activity value A of the sub-block of luma component, then the sum of pixel values in residual signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the residual index, and the class index for the sub-block is calculated as C=Resi*MA+A                                  (37) , where Resi is the residual index, MA represents the total number of the activity value A. In one example, for the 2x2 luma block, the activity value A is calculated the same to in ECM, and Resi is calculated as in equation (36) .

[0203] In the third method, it is proposed to first compute the index of the sub-block of luma component referring to the edge-based classifier, then the sum of pixel values in residual signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the residual index, and the class index for the sub-block is calculated as C=Resi*ME+E                                  (38) , where Resi is the residual index, ME represents the total number of the index calculated referring to the edge-based classifier, E is the index calculated referring to the edge-based classifier. In one example, for the 2x2 luma block, the index E is calculated the same to C2 in ECM, and Resi is calculated as in equation (36) .

[0204] In the fourth method, it is proposed to first compute the band index B of the sub-block of luma component, then the sum of pixel values in residual signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the residual index, and the class index for the sub-block is calculated as C=Resi*MB+B                                  (39) , where Resi is the residual index, MB represents the total number of the band value. In one example, for the 2x2 luma block, the band index B is calculated as B = (sum *8) >> (sample bit depth + 2)                        (40) , and Resi is calculated as in equation (36) .

[0205] In the fifth method, it is proposed to compute the sum of pixel values in residual signal of the sub-block or in a neighboring NxN window which surrounds the sub-block, then the sum of residual values is mapped to the residual index and the residual index is used as the class index.

[0206] In the sixth method, it is proposed to first compute the sum of absolute value of the pixel values in residual signal of the sub block or in a neighboring NxN window which surrounds the sub-block and it is mapped to the absolute value of residual index ResiAbso, then the sum of pixel values in residual signal of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the sign of residual index ResiSign, and the class index for the sub-block is calculated as C=ResiSign*MAbso+ResiAbso                                  (41) , where MAbso represents the total number of the absolute value of residual index. In one example, for the 2x2 luma block, the absolute value of residual index ResiAbso is calculated as ResiAbso = (SumAbso *8) >> (sample bit depth + 2)                        (42) , where SumAbso is the sum of absolute values of pixel values in residual signal of the 2x2 luma block, or the sum of absolute values of pixel values in residual signal in a neighboring NxN (such as 8x8) window which surrounds the 2x2 luma block, and ResiSign is calculated as in equation (36) .

[0207] In the seventh method, it is proposed to compute the index of the sub-block based on the pixel values in residual signal referring to the edge-based classifier, then the index is used as the class index.

[0208] In the eighth method, it is proposed to compute the index of the sub-block based on the absolute value of the pixel values in residual signal referring to the edge-based classifier, then the index is used as the class index. New classifiers utilized the pixel values from the stage right before SAO

[0209] According to the one or more embodiments of the disclosure, the pixel values from the stage right before SAO are utilized to derive new classifiers for online ALF filter. Different methods may be used to achieve this goal.

[0210] In the first method, it is proposed to first compute the directionality D of the sub-block of luma component, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before SAO of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MD+D                                  (43) , where Dif is the difference index, MD represents the total number of directionalities D. In one example, for the 2x2 luma block, the directionality D is calculated the same to D2 in ECM, and Dif is calculated as Dif=sumDif>0? 2: (sumDif<0? 0: 1)                        (44) , where sumDif is the sum of difference values of the 2x2 luma block, or the sum of difference values in a neighboring NxN (such as 8x8) window which surrounds the 2x2 luma block.

[0211] In the second method, it is proposed to first compute the activity value A of the sub-block of luma component, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before SAO of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MA+A                                  (45) , where Dif is the difference index, MA represents the total number of the activity value A. In one example, for the 2x2 luma block, the activity value A is calculated the same to  in ECM, and Dif is calculated as in equation (44) .

[0212] In the third method, it is proposed to first compute the index of the sub-block of luma component referring to the edge-based classifier, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before SAO of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*ME+E                                  (46) , where Dif is the difference index, ME represents the total number of the index calculated referring to the edge-based classifier, E is the index calculated referring to the edge-based classifier. In one example, for the 2x2 luma block, the index E is calculated the same to C2 in ECM, and Dif is calculated as in equation (44) .

[0213] In the fourth method, it is proposed to first compute the band index B of the sub-block of luma component, then the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before SAO of the sub-block or in a neighboring NxN window which surrounds the sub-block is calculated and it is mapped to the difference index, and the class index for the sub-block is calculated as C=Dif*MB+B                                  (47) , where Dif is the difference index, MB represents the total number of the band value. In one example, for the 2x2 luma block, the band index B is calculated as B = (sum *8) >> (sample bit depth + 2)                        (48) , and Dif is calculated as in equation (44) .

[0214] In the fifth method, it is proposed to compute the sum of difference values between sample from the stage right after SAO and collocated sample from the stage right before SAO of the sub-block or in a neighboring NxN window which surrounds the sub-block, then the sum of difference values is mapped to the difference index and the difference index is used as the class index.

[0215] In the sixth method, it is proposed to calculate the edged based classifier or band-based classifier based on the sample values from the stage right before SAO, where the calculation method is same to original edge-based classifier or band-based classifier calculated based on the sample values after SAO. New classifiers utilized chroma pixel values

[0216] According to the one or more embodiments of the disclosure, the chroma pixel values are utilized to derive new classifiers for online ALF filter. Different methods may be used to achieve this goal.

[0217] In the first method, it is proposed to first compute the band index BY of the sub-block of luma component, then the band index BU and BV of the corresponding U and V components are computed, and the class index for the sub-block is calculated as C=BY*MU*MV+BU*MV+BV                                  (49) , where BY, BU and BV are the Y , U and V index calculated referring to the band-based classifier, MU and MV represent the total number of the U and V band index value. In one example, for the 2x2 luma block, the BY, BU and BV are calculated as BY = (sumY *6) >> (sample bit depth + 2)                        (50) BU = (sumU *2) >> (sample bit depth + 2)                        (51) BV = (sumV *2) >> (sample bit depth + 2)                        (52) Chroma information from the stages right before deblocking, prediction, residual or right before SAO used as additional chroma ALF input

[0218] According to the one or more embodiments of the disclosure, chroma information from the stages right before deblocking, prediction, residual or right before SAO are used as additional chroma ALF equation input. Different methods may be used to achieve this goal.

[0219] In the first method, it is proposed to take the spatial neighboring pixels in chroma prediction signal as additional chroma ALF equation input. Various filter shapes can be used to extract the information in chroma prediction signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in chroma prediction signal. In one example, the clipping differences between the surrounding pixels in chroma prediction signal and current chroma pixel are used as chroma ALF equation input. In another example, the clipping differences between the surrounding pixels in chroma prediction signal and the collocated pixel in chroma prediction signal, the clipping difference between the collocated pixel in chroma prediction signal and current chroma pixel are used as chroma ALF equation input.

[0220] In the second method, it is proposed to take the spatial neighboring pixels in chroma residual signal as additional chroma ALF equation input. Various filter shapes can be used to extract the information in chroma residual signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in chroma residual signal. In one example, the clipping results of the collocated pixel in chroma residual signal are used as chroma ALF equation input.

[0221] In the third method, it is proposed to take the spatial neighboring pixels from the stage right before chroma SAO signal as additional chroma ALF equation input. Various filter shapes can be used to extract the information from the stage right before chroma SAO signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information from the stage right before chroma SAO signal. In one example, the clipping differences between the surrounding pixels from the stage right before chroma SAO signal and current chroma pixel are used as chroma ALF equation input. In another example, the clipping differences between the surrounding pixels from the stage right before chroma SAO signal and the collocated pixel from the stage right before chroma SAO signal, the clipping difference between the collocated pixel from the stage right before chroma SAO signal and current chroma pixel are used as chroma ALF equation input.

[0222] In the fourth method, it is proposed to take the spatial neighboring pixels from the stage right before chroma deblocking signal as additional chroma ALF equation input. Various filter shapes can be used to extract the information from the stage right before chroma deblocking signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information from the stage right before chroma deblocking signal. In one example, the clipping differences between the surrounding pixels from the stage right before chroma deblocking signal and current chroma pixel are used as chroma ALF equation input. In another example, the clipping differences between the surrounding pixels from the stage right before chroma deblocking signal and the collocated pixel from the stage right before chroma deblocking signal, the clipping difference between the collocated pixel from the stage right before chroma deblocking signal and current chroma pixel are used as chroma ALF equation input.

[0223] In the fifth method, it is proposed to take the information in chroma prediction, residual, before SAO or before deblocking signal as chroma ALF equation input. The utilization method proposed in the first, second third, fourth method can be combined to achieve the fifth method. Luma information from the stages right before deblocking, prediction, residual or right before SAO used as additional CCALF input

[0224] According to the one or more embodiments of the disclosure, luma information from the stages right before deblocking, prediction, residual or right before SAO are used as additional CCALF equation input. Different methods may be used to achieve this goal.

[0225] In the first method, it is proposed to take the spatial neighboring pixels in luma prediction signal as additional CCALF equation input. Various filter shapes can be used to extract the information in luma prediction signal. For example, the filter shape can be 3x4 as shown in Figure 13. Various equation forms can be used to extract the information in luma prediction signal. In one example, the differences between the surrounding pixels in luma prediction signal and current corresponding luma pixel are used as CCALF equation input. In another example, the differences between the surrounding pixels in luma prediction signal and the collocated pixel in current corresponding luma prediction signal, the difference between the collocated pixel in current corresponding luma prediction signal and current corresponding luma pixel are used as CCALF equation input.

[0226] In the second method, it is proposed to take the spatial neighboring pixels in luma residual signal as additional CCALF equation input. Various filter shapes can be used to extract the information in luma residual signal. For example, the filter shape can be 3x4 as shown in Figure 13.Various equation forms can be used to extract the information in luma residual signal. In one example, the collocated pixel in luma residual signal are used as CCALF equation input.

[0227] In the third method, it is proposed to take the spatial neighboring pixels from the stage right before luma SAO signal as additional CCALF equation input. Various filter shapes can be used to extract the information from the stage right before luma SAO signal. For example, the filter shape can be 3x4 as shown in Figure 13. Various equation forms can be used to extract the information from the stage right before luma SAO signal. In one example, the differences between the surrounding pixels from the stage right before luma SAO signal and current corresponding luma pixel are used as CCALF equation input. In another example, the differences between the surrounding pixels from the stage right before luma SAO signal and the collocated pixel in current corresponding before luma SAO signal, the difference between the collocated pixel in current corresponding before luma SAO signal and current corresponding luma pixel are used as CCALF equation input.

[0228] In the fourth method, it is proposed to take the spatial neighboring pixels from the stage right before luma deblocking signal as additional CCALF equation input. Various filter shapes can be used to extract the information from the stage right before luma deblocking signal. For example, the filter shape can be 3x4 as shown in Figure 13. Various equation forms can be used to extract the information from the stage right before luma deblocking signal. In one example, the differences between the surrounding pixels from the stage right before luma deblocking signal and current corresponding luma pixel are used as CCALF equation input. In another example, the differences between the surrounding pixels from the stage right before luma deblocking signal and the collocated pixel in current corresponding before luma deblocking signal, the difference between the collocated pixel in current corresponding before luma deblocking signal and current corresponding luma pixel are used as CCALF equation input.

[0229] In the fifth method, it is proposed to take the information in luma prediction, residual, before SAO or before deblocking signal as CCALF equation input. The utilization method proposed in the first, second third, fourth method can be combined to achieve the fifth method. New classifiers utilized the coding mode information

[0230] According to the one or more embodiments of the disclosure, the coding mode information such as whether the coding block is coded with skip mode, whether the coding block is coded with intra, inter P or inter B mode, is utilized to derive new classifiers for online ALF filter. Different methods may be used to achieve this goal.

[0231] In the first method, it is proposed to record whether the coding block is coded with skip mode during the encoding and decoding process, then this information is utilized to design a new classifier. In one example, the classifier which has 2 classes corresponding to the skip mode is true or false is added as a new classifier. In another example, the classifier which combines the skip mode information with EO or BO is added as a new classifier.

[0232] In the second method, it is proposed to record whether the coding block is coded with intra mode, inter P mode, or inter B mode during the encoding and decoding process, then this information is utilized to design a new classifier. In one example, the classifier which has 3 classes corresponding to the intra mode, inter P mode or inter B mode is added as a new classifier. In another example, the classifier which combines the intra, inter P or inter B mode information with EO or BO is added as a new classifier.

[0233] In the third method, it is proposed to take both the coding mode information whether the coding block is coded with skip mode, whether the coding block is coded with intra, inter P or inter B mode to design the new classifier. The utilization method proposed in the first and second method can be combined to achieve the third method. Line buffer reduction for additional ALF input

[0234] According to the one or more embodiments of the disclosure, when online ALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., there would be line buffers to save these samples, to reduce the line buffer requirements for these additional inputs, according to current line buffer settings in VVC, 4 rows of corresponding luma samples and 2 rows of corresponding chroma samples above horizontal CTU boundaries are assumed to default values, which can save these line buffers. Different methods may be used to achieve this goal.

[0235] In the first method, according to current line buffer settings in VVC, it is proposed to assume 4 rows of luma residual samples and 2 rows of chroma residual samples above horizontal CTU boundaries to zero values, assume 4 rows of luma samples and 2 rows of chroma samples above horizontal CTU boundaries from the stages: 1) samples right before deblocking 2) prediction samples 3) samples right before SAO to collocated sample values from the stage samples right after SAO.

[0236] In the second method, according to current line buffer settings in VVC, it is proposed to assume 4 rows of luma samples and 2 rows of chroma samples above horizontal CTU boundaries from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc. in a repetitive manner with the corresponding nearest sample values in the horizontal CTU boundaries.

[0237] In the third method, according to current line buffer settings in VVC, it is proposed to assume 4 rows of luma samples and 2 rows of chroma samples above horizontal CTU boundaries from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc. in a mirrored manner, where the first row of luma samples and first row of chroma samples above horizontal CTU boundaries are assumed to the corresponding sample values in the horizontal CTU boundaries, the second row of luma samples and second row of chroma samples above horizontal CTU boundaries are assumed to the corresponding sample values in the first rows of samples below the horizontal CTU boundaries, and so on.

[0238] It should be noted that 4 rows of luma samples and 2 rows of chroma samples above horizontal CTU boundaries are current VVC line buffer settings, the specific values can be adjusted according to customized settings. Line buffer reduction for additional CCALF input

[0239] According to the one or more embodiments of the disclosure, when CCALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., there would be line buffers to save these samples, to reduce the line buffer requirements for these additional inputs, according to current line buffer settings in VVC, 4 rows of corresponding luma samples above horizontal CTU boundaries are assumed to default values, which can save these line buffers. Different methods may be used to achieve this goal.

[0240] In the first method, according to current line buffer settings in VVC, it is proposed to assume 4 rows of luma residual samples above horizontal CTU boundaries to zero values, assume 4 rows of luma samples above horizontal CTU boundaries from the stages: 1) samples right before deblocking 2) prediction samples 3) samples right before SAO to collocated sample values from the stage samples right after SAO.

[0241] In the second method, according to current line buffer settings in VVC, it is proposed to assume 4 rows of luma samples above horizontal CTU boundaries from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc. in a repetitive manner with the corresponding nearest sample values in the horizontal CTU boundaries.

[0242] In the third method, according to current line buffer settings in VVC, it is proposed to assume 4 rows of luma samples above horizontal CTU boundaries from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc. in a mirrored manner, where the first row of luma samples above horizontal CTU boundaries are assumed to the corresponding sample values in the horizontal CTU boundaries, the second row of luma samples above horizontal CTU boundaries are assumed to the corresponding sample values in the first row of samples below the horizontal CTU boundaries, and so on.

[0243] It should be noted that 4 rows of luma samples above horizontal CTU boundaries are current VVC line buffer settings, the specific values can be adjusted according to customized settings. Sample padding for additional ALF input

[0244] According to the one or more embodiments of the disclosure, when online ALF filter takes samples as additional input from the stages: 1) samples right before deblocking 2) prediction samples 3) residual samples 4) samples right before SAO, etc., sample padding is conducted when the filter shape of the additional input with its central position aligned with the to-be-filtered sample crosses the virtual boundary (line buffer boundary) or picture (slice, tile) boundary. Different methods may be used to achieve this goal.

[0245] In the first method, symmetrical sample padding is applied when the filter shape of the additional input with its central position aligned with the to-be-filtered sample crosses the virtual boundary (line buffer boundary) or picture (slice, tile) boundary. For example, assume online ALF filter takes residual samples as additional input, the filter shape of the fixed filter to be applied to the residual signal or the filter shape of the online filter which directly applies to residual signal is 7x7, the filter shape of the residual signal with its central position aligned with the to-be-filtered sample crosses the line buffer boundary, the symmetrical sample padding is conducted as shown in Figure 18, where p12 masks the collocated residual pixel of the to-be-filtered sample, p0 top24 are the original residual samples, p′0 to p′24 are the modified residual sample values. In a word, with symmetrical sample padding, the additional input samples which are not in the same boundary side with the collocated additional input sample of the to-be-filtered sample and the additional input symmetrical samples which are in the same boundary side with the collocated additional input sample of the to-be-filtered sample are both modified in a symmetry manner.

[0246] In the second method, repetitive sample padding is applied when the filter shape of the additional input with its central position aligned with the to-be-filtered sample crosses the virtual boundary (line buffer boundary) or picture (slice, tile) boundary. With repetitive padding, the additional input samples which are not in the same boundary side with the collocated additional input sample of the to-be-filtered sample are padded in the same manner with the symmetrical sample padding, the additional input samples which are in the same boundary side with the collocated additional input sample of the to-be-filtered sample remain unchanged. ALF fixed filters with additional classifiers

[0247] According to the one or more embodiments of the disclosure, the band classifier, residual-based classifier, etc. are utilized to train additional sets of ALF fixed filters. Then, the outputs of these additional sets of ALF fixed filters are utilized as additional online ALF filter inputs. Different methods may be used to achieve this goal.

[0248] In the first method, different band classifiers are first utilized to train different sets of ALF fixed filters. Different band classifiers may be defined based on different window sizes. For example, there are two band classifiers. For the first band classifier, the sum of sample values of a 2x2 luma block is calculated and mapped to the band classifier index as follows: class_index = (sum *25) >> (sample bit depth + 2)

[0249] For the second band classifier, the sum of sample values in a neighboring 8x8 window which surrounds the 2x2 luma block is calculated and mapped to the band classifier index as follows: class_index = (sum *25) >> (sample bit depth + 6)

[0250] Different band classifiers may also be defined based on different class number. For example, there are two band classifiers. For the first band classifier, the sum of sample values of a 2x2 luma block is calculated and mapped to the band classifier index as follows: class_index = (sum *25) >> (sample bit depth + 2) , where the class number of the band classifier is 25. For the second band classifier, the sum of sample values of a 2x2 luma block is calculated and mapped to the band classifier index as follows:  class_index = (sum *100) >> (sample bit depth + 2) , where the class number of the band classifier is 100. Different taps of ALF fixed filters can be utilized. For example, the fixed filters are 13x13 diamond shape. After training different sets of ALF fixed filters based on different band classifiers, the intermediate results can be obtained by feeding the reconstructed pixel values to the new trained ALF fixed filters. Then, online ALF filters can take the intermediate results as additional inputs. Various filter shapes can be used to extract the information in the intermediate results. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in the intermediate results. For example, the clipping differences between the surrounding pixels in the intermediate results and current pixel are used as additional online ALF filter input.

[0251] In the second method, different residual-based classifiers are first utilized to train different sets of ALF fixed filters. Different residual-based classifiers may be defined based on different window sizes. For example, there are two residual-based classifiers. For the first residual-based classifier, the sum of absolute values of the residual samples in a neighbouring 8x8 window which surrounds the 2x2 luma block is calculated and mapped to the residual-based classifier index as follows: classIdx = sum >> (sample bit depth –4) , where the value of classIdx is in the range of 0 to 24. For the second residual-based classifier, the sum of absolute values of the residual samples in a neighbouring 12x12 window which surrounds the 2x2 luma block is calculated and mapped to the residual-based classifier index as follows: classIdx = sum >> (sample bit depth –4)

[0252] , where the value of classIdx is in the range of 0 to 24. Different residual-based classifiers may also be defined based on different class number. For example, there are two residual-based classifiers. For the first residual-based classifier, the sum of absolute values of the residual samples in a neighbouring 8x8 window which surrounds the 2x2 luma block is calculated and mapped to the residual-based classifier index as follows: classIdx = sum >> (sample bit depth –4) , where the value of classIdx is in the range of 0 to 24. For the second residual-based classifier, the sum of absolute values of the residual samples in a neighbouring 8x8 window which surrounds the 2x2 luma block is calculated and mapped to the residual-based classifier index as follows: classIdx = sum >> (sample bit depth –4) , where the value of classIdx is in the range of 0 to 49. Different taps of ALF fixed filters can be utilized. For example, the ALF fixed filters are 13x13 diamond shape. After training different sets of ALF fixed filters based on different residual-based classifiers, the intermediate results can be obtained by feeding the reconstructed pixel values to the new trained ALF fixed filters. Then, online ALF filters can take the intermediate results as additional inputs. Various filter shapes can be used to extract the information in the intermediate results. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15. Various equation forms can be used to extract the information in the intermediate results. For example, the clipping differences between the surrounding pixels in the intermediate results and current pixel are used as additional online ALF filter input.

[0253] In the third method, the methods presented in the first and second method can be combined. For example, one band classifier and one residual-based classifier are utilized to train two sets of ALF fixed filters. Then, the outputs of the two new trained ALF fixed filters are utilized as additional inputs of the online ALF filters. It should be noted that besides the new trained ALF fixed filters, two ALF fixed filters which are trained based on edge-based classifiers are already contained in original design of the ALF in ECM. ALF fixed filters with additional inputs

[0254] According to the one or more embodiments of the disclosure, the spatial neighboring pixels right before deblocking filter, spatial neighboring pixels in prediction signal, spatial neighboring pixels in residual signal, or spatial neighboring pixels right before SAO are used as additional ALF fixed filter inputs when training ALF fixed filters. Different methods may be used to achieve this goal.

[0255] In the first method, the spatial neighboring pixels right before deblocking filter are used as additional ALF fixed filter inputs when training ALF fixed filters. Various filter shapes can be used to extract the information in the spatial neighboring pixels right before deblocking filter. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15, or 13x13 diamond shape. Various equation forms can be used to extract the information in the spatial neighboring pixels right before deblocking filter. For example, the clipping differences between the surrounding pixels right before deblocking filter and current pixel are used as additional ALF fixed filter input.

[0256] In the second method, the spatial neighboring pixels in prediction signal are used as additional ALF fixed filter inputs when training ALF fixed filters. Various filter shapes can be used to extract the information in the prediction signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15, or 13x13 diamond shape. Various equation forms can be used to extract the information in the prediction signal. For example, the clipping differences between the surrounding pixels in the prediction signal and current pixel are used as additional ALF fixed filter input.

[0257] In the third method, the spatial neighboring pixels in residual signal are used as additional ALF fixed filter inputs when training ALF fixed filters. Various filter shapes can be used to extract the information in the residual signal. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15, or 13x13 diamond shape. Various equation forms can be used to extract the information in the residual signal. For example, the clipping results of the surrounding pixels in the residual signal are used as additional ALF fixed filter input.

[0258] In the fourth method, the spatial neighboring pixels right before SAO are used as additional ALF fixed filter inputs when training ALF fixed filters. Various filter shapes can be used to extract the information in the spatial neighboring pixels right before SAO. For example, the filter shape can be 1×1, 3×3 or 5×5 as shown in Figure 15, or 13x13 diamond shape. Various equation forms can be used to extract the information in the spatial neighboring pixels right before SAO. For example, the clipping differences between the surrounding pixels right before SAO and current pixel are used as additional ALF fixed filter input.

[0259] In the fifth method, the methods presented in the first, second, third and fourth method can be combined. For example, both the spatial neighboring pixels right before deblocking filter and spatial neighboring pixels in residual signal are used as additional ALF fixed filter inputs when training ALF fixed filters. Chroma ALF with sub-block level filter adaption

[0260] According to the one or more embodiments of the disclosure, sub-block level filter adaption is applied in chroma ALF, where edge-based classifier, band-based classifier or residual-based classifier are utilized in chroma ALF. Different methods may be used to achieve this goal.

[0261] In the first method, edge-based classifier is utilized in chroma ALF. The edge-based classifier can be defined in different sub-block levels, such as block size of 4x4, 2x2 or 1x1. The edge-based classifier can be calculated in different methods. In the first example, the edge-based classifier is calculated based on the reconstructed signal in luma component. For example, the edge-based classifier which is utilized in luma ALF and calculated based on the right after SAO signal in luma component is reused for chroma ALF. In the second example, the edge-based classifier is calculated based on the reconstructed signals in chroma components. For example, first one edge-based classifier is calculated based on the right after SAO signal in Cb component, then another edge-based classifier is calculated based on the right after SAO signal in Cr component. Finally, the edge-based classifier which combines the first edge-based classifier and the second edge-based classifier is utilized for chroma ALF. It should be noted that when calculating the edge-based classifier based on the right after SAO signal in Cb or Cr components, the calculating procedure can be same to calculating the edge-based classifier based on the right after SAO signal in luma component. In the third example, the edge-based classifier which combines the edge-based classifier calculated in the first example and the edge-based classifier calculated in the second example is utilized for chroma ALF. It should be noted that when reusing the edge-based classifier in luma ALF for chroma ALF, or recalculating the edge-based classifier based on chroma components for chroma ALF, the specific class number utilized in chroma ALF can be same to or different from the class number utilized in luma ALF. For example, the class number utilized in luma ALF is 25, which is obtained by combining activity (5) and directionality (5) , then the class number utilized in chroma ALF is 10, which is obtained by combining activity (2) and directionality (5) .

[0262] In the second method, band-based classifier is utilized in chroma ALF. The band-based classifier can be defined in different sub-block levels, such as block size of 4x4, 2x2 or 1x1. The band-based classifier can be calculated in different methods. In the first example, the band-based classifier is calculated based on the reconstructed signal in luma component. For example, the band-based classifier which is utilized in luma ALF and calculated based on the right after SAO signal in luma component is reused for chroma ALF. In the second example, the band-based classifier is calculated based on the reconstructed signals in chroma components. For example, first one band-based classifier is calculated based on the right after SAO signal in Cb component, then another band-based classifier is calculated based on the right after SAO signal in Cr component. Finally, the band-based classifier which combines the first band-based classifier and the second band-based classifier is utilized for chroma ALF. It should be noted that when calculating the band-based classifier based on the right after SAO signal in Cb or Cr components, the calculating procedure can be same to calculating the band-based classifier based on the right after SAO signal in luma component. In the third example, the band-based classifier which combines the band-based classifier calculated in the first example and the band-based classifier calculated in the second example is utilized for chroma ALF. It should be noted that when reusing the band-based classifier in luma ALF for chroma ALF, or recalculating the band-based classifier based on chroma components for chroma ALF, the specific class number utilized in chroma ALF can be same to or different from the class number utilized in luma ALF. For example, the class number utilized in luma ALF is 25, then the class number utilized in chroma ALF is 10.

[0263] In the third method, residual-based classifier is utilized in chroma ALF. The residual-based classifier can be defined in different sub-block levels, such as block size of 4x4, 2x2 or 1x1. The residual-based classifier can be calculated in different methods. In the first example, the residual-based classifier is calculated based on the residual signal in luma component. For example, the residual-based classifier which is utilized in luma ALF and calculated based on the residual signal in luma component is reused for chroma ALF. In the second example, the residual-based classifier is calculated based on the residual signals in chroma components. For example, first one residual-based classifier is calculated based on the residual signal in Cb component, then another residual-based classifier is calculated based on the residual signal in Cr component. Finally, the residual-based classifier which combines the first residual-based classifier and the second residual-based classifier is utilized for chroma ALF. It should be noted that when calculating the residual-based classifier based on the residual signal in Cb or Cr components, the calculating procedure can be same to calculating the residual-based classifier based on the residual signal in luma component. In the third example, the residual-based classifier which combines the residual-based classifier calculated in the first example and the residual-based classifier calculated in the second example is utilized for chroma ALF. It should be noted that when reusing the residual-based classifier in luma ALF for chroma ALF, or recalculating the residual-based classifier based on chroma components for chroma ALF, the specific class number utilized in chroma ALF can be same to or different from the class number utilized in luma ALF. For example, the class number utilized in luma ALF is 25, then the class number utilized in chroma ALF is 10.

[0264] In the fourth method, the methods presented in the first, second and third method can be combined. For example, both the edge-based classifier presented in the first method and the band-based classifier presented in the second method are utilized in chroma ALF. CCALF with sub-block level filter adaption

[0265] According to the one or more embodiments of the disclosure, sub-block level filter adaption is applied in CCALF, where edge-based classifier, band-based classifier or residual-based classifier are utilized in CCALF. Different methods may be used to achieve this goal.

[0266] In the first method, edge-based classifier is utilized in CCALF. The edge-based classifier can be defined in different sub-block levels, such as block size of 4x4, 2x2 or 1x1. The edge-based classifier can be calculated in different methods. In the first example, the edge-based classifier is calculated based on the reconstructed signal in luma component. For example, the edge-based classifier which is utilized in luma ALF and calculated based on the right after SAO signal in luma component is reused for CCALF in both Cb and Cr components. In the second example, the edge-based classifier is calculated based on the reconstructed signals in chroma components. For example, for CCALF in Cb component, the edge-based classifier is calculated based on the right after SAO signal in Cb component; for CCALF in Cr component, the edge-based classifier is calculated based on the right after SAO signal in Cr component. It should be noted that when calculating the edge-based classifier based on the right after SAO signal in Cb or Cr components, the calculating procedure can be same to calculating the edge-based classifier based on the right after SAO signal in luma component. In the third example, the edge-based classifier which combines the edge-based classifier calculated in the first example and the edge-based classifier calculated for CCALF in Cb component in the second example is utilized for CCALF in Cb component; the edge-based classifier which combines the edge-based classifier calculated in the first example and the edge-based classifier calculated for CCALF in Cr component in the second example is utilized for CCALF in Cr component. It should be noted that when reusing the edge-based classifier in luma ALF for CCALF, or recalculating the edge-based classifier based on chroma components for CCALF, the specific class number utilized in CCALF can be same to or different from the class number utilized in luma ALF. For example, the class number utilized in luma ALF is 25, which is obtained by combining activity (5) and directionality (5) , then the class number utilized in CCALF is 10, which is obtained by combining activity (2) and directionality (5) .

[0267] In the second method, band-based classifier is utilized in CCALF. The band-based classifier can be defined in different sub-block levels, such as block size of 4x4, 2x2 or 1x1. The band-based classifier can be calculated in different methods. In the first example, the band-based classifier is calculated based on the reconstructed signal in luma component. For example, the band-based classifier which is utilized in luma ALF and calculated based on the right after SAO signal in luma component is reused for CCALF in both Cb and Cr components. In the second example, the band-based classifier is calculated based on the reconstructed signals in chroma components. For example, for CCALF in Cb component, the band-based classifier is calculated based on the right after SAO signal in Cb component; for CCALF in Cr component, the band-based classifier is calculated based on the right after SAO signal in Cr component. It should be noted that when calculating the band-based classifier based on the right after SAO signal in Cb or Cr components, the calculating procedure can be same to calculating the band-based classifier based on the right after SAO signal in luma component. In the third example, the band-based classifier which combines the band-based classifier calculated in the first example and the band-based classifier calculated for CCALF in Cb component in the second example is utilized for CCALF in Cb component; the band-based classifier which combines the band-based classifier calculated in the first example and the band-based classifier calculated for CCALF in Cr component in the second example is utilized for CCALF in Cr component. It should be noted that when reusing the band-based classifier in luma ALF for CCALF, or recalculating the band-based classifier based on chroma components for CCALF, the specific class number utilized in CCALF can be same to or different from the class number utilized in luma ALF. For example, the class number utilized in luma ALF is 25, then the class number utilized in CCALF is 10.

[0268] In the third method, residual-based classifier is utilized in CCALF. The residual-based classifier can be defined in different sub-block levels, such as block size of 4x4, 2x2 or 1x1. The residual-based classifier can be calculated in different methods. In the first example, the residual-based classifier is calculated based on the residual signal in luma component. For example, the residual-based classifier which is utilized in luma ALF and calculated based on the residual signal in luma component is reused for CCALF in both Cb and Cr components. In the second example, the residual-based classifier is calculated based on the residual signals in chroma components. For example, for CCALF in Cb component, the residual-based classifier is calculated based on the residual signal in Cb component; for CCALF in Cr component, the residual-based classifier is calculated based on the residual signal in Cr component. It should be noted that when calculating the residual-based classifier based on the residual signal in Cb or Cr components, the calculating procedure can be same to calculating the residual-based classifier based on the residual signal in luma component. In the third example, the residual-based classifier which combines the residual-based classifier calculated in the first example and the residual-based classifier calculated for CCALF in Cb component in the second example is utilized for CCALF in Cb component; the residual-based classifier which combines the residual-based classifier calculated in the first example and the residual-based classifier calculated for CCALF in Cr component in the second example is utilized for CCALF in Cr component. It should be noted that when reusing the residual-based classifier in luma ALF for CCALF, or recalculating the residual-based classifier based on chroma components for CCALF, the specific class number utilized in CCALF can be same to or different from the class number utilized in luma ALF. For example, the class number utilized in luma ALF is 25, then the class number utilized in CCALF is 10.

[0269] In the fourth method, the methods presented in the first, second and third method can be combined. For example, both the edge-based classifier presented in the first method and the band-based classifier presented in the second method are utilized in CCALF. Information in luma reconstruction signal used as additional chroma ALF input

[0270] According to the one or more embodiments of the disclosure, information in luma reconstruction signal is used as additional chroma ALF equation input. Different methods may be used to achieve this goal.

[0271] In the first method, it is proposed to take the spatial neighboring pixels in down-sampled luma reconstruction signal as additional chroma ALF equation input. Various down-sampling filters can be used to down-sample the luma reconstruction signal to make it have the same resolution with the chroma reconstruction signal. For example, the down-sampling filter is [1: 2: 1; 1: 2: 1]  / 8. Various filter shapes can be used to extract the information in down-sampled luma reconstruction signal. In the first example, the filter shape can be 1×1, 3×3 or 5×5 diamond shape as shown in Figure 15. In the second example, the filter shape can be 5x5 cross shape as shown in Figure 24. In the third example, the filter shape can be 3x3 or 5x5 cross shape or 3x3 square shape as shown in Figure 25. It should be noted that in the first and second example, the filter coefficients use point-symmetry, which means two pixels point-symmetry with the collocated pixel share one same filter coefficient, as the number signs in Figure 15 and Figure 24. In the third example, no symmetry constraints are enforced on the filter coefficients, which means each pixel has its own filter coefficient, as the number signs in Figure 25. Various equation forms can be used to extract the information in down-sampled luma reconstruction signal. In one example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and current chroma pixel are used as chroma ALF equation input. In another example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal, the clipping difference between the collocated pixel in down-sampled luma reconstruction signal and current chroma pixel are used as chroma ALF equation input. In the third example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal are used as chroma ALF equation input. It should be noted that in the first and second example, the filter coefficient number is just same to the filter coefficient number as presented in the filter shape example. In one specific example, the filter coefficient number for the 3x3 cross shape in Figure 25 is 5, and the filter coefficient number for the 5x5 cross shape in Figure 25 is 9, and the filter coefficient number for the 3x3 square shape in Figure 25 is 9. In the third example, the filter coefficient number is same to the filter coefficient number as presented in the filter shape example minus 1. In one specific example, the filter coefficient number for the 3x3 cross shape in Figure 25 is 4, and the filter coefficient number for the 5x5 cross shape in Figure 25 is 8, and the filter coefficient number for the 3x3 square shape in Figure 25 is 8. More clearly, the modified 3x3 cross shape and 5x5 cross shape and 3x3 square shape corresponding to the third example are shown in Figure 26. It should be noted that the numbers in the blocks in Figure 15, Figure 24, Figure 25 and Figure 26 just represent the relative relationship between different filter coefficient, such as whether the filter coefficients in different positions are the same, the specific value for the numbers in the blocks in Figure 15, Figure 24, Figure 25 and Figure 26 can be adjusted depending on a specific chroma ALF filter shape.

[0272] Different methods can be utilized to deal with different filter shapes. In the first method, different filter shapes are switched and a flag is transmitted in ALF APS to signal which filter shape is chosen. In the first example, one filter shape is 5x5 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. The other filter shape is 3x3 square shape in Figure 26, and the equation form is also the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. And these 2 filter shapes are switched and a flag is transmitted in ALF APS to signal which filter shape is chosen. In the second example, one filter shape is 5x5 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. The other filter shape is original chroma ALF filter shape as shown in FIG. 20 without luma reconstruction signal as additional input. And these 2 filter shapes are switched and a flag is transmitted in ALF APS to signal which filter shape is chosen. It should be noted that different methods can be utilized to determine the value of the flag transmitted in ALF APS. In the first method, the value of the flag transmitted in ALF APS is determined in encoder via an RDO process. In the second method, the value of the flag transmitted in ALF APS is determined in encoder via a predefined criteria, where the predefined criteria may be defined based on the test condition (all intra (AI) test, random access (RA) test, or low delay (LD) test) , resolution of the test sequence, or QP value of the test. For example, if the picture size of the test sequence is less than 1920*1080 and the QP value of the test is bigger than 27 and less than 37 and in RA or LDB test, or the picture size of the test sequence is less than 1920*1080 and the QP value of the test is bigger than 22 and less than 37 and in AI test, original chroma ALF filter shape as shown in FIG. 20 without luma reconstruction signal as additional input is utilized; else, the filter shape of 5x5 cross shape in Figure 26 is utilized.

[0273] Besides the low pass down-sampling filters (such as {1: 2: 1; 1: 2: 1}  / 8) , other high pass down-sampling filters can also be utilized to down-sample the luma reconstruction signal to make it have the same resolution with the chroma reconstruction signal. For example, Figure 27 presents 4 high pass down-sampling filters. Various filter shapes can be used to extract the information in down-sampled luma reconstruction signal. In the first example, the filter shape can be 3x3 or 5x5 cross shape as shown in Figure 25. In the second example, the filter shape can be 3x3 or 5x5 cross shape as shown in Figure 26. Various equation forms can be used to extract the information in down-sampled luma reconstruction signal. In one example, the clipping results of the surrounding pixels in down-sampled luma reconstruction signal are used as chroma ALF equation input, where the corresponding filter shape can be the filter shapes in Figure 25. In another example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal are used as chroma ALF equation input, where the corresponding filter shape can be the filter shapes in Figure 26.

[0274] Different methods can be utilized to deal with different down-sampled luma reconstruction signal. In the first example, the filter shapes in different down-sampled luma reconstruction signal are switched and a flag is transmitted in ALF APS to signal which filter shape is chosen. In one example, for one filter shape with [1: 2: 1; 1: 2: 1]  / 8 down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. For the other filter shape with [1: 0: -1; 1: 0: -1] (first down-sample filter in Figure 27) down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 25, and the equation form is the clipping results of the surrounding pixels in down-sampled luma reconstruction signal. And these 2 filter shapes are switched and a flag is transmitted in ALF APS to signal which filter shape is chosen. In the second example, the surrounding pixels in different down-sampled luma reconstruction signals are all used as additional inputs of chroma ALF. In one example, for one filter shape with [1:2: 1; 1: 2: 1]  / 8 down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. For the other filter shape with [1: 0: -1; 1: 0: -1] (first down-sample filter in Figure 27) down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 25, and the equation form is the clipping results of the surrounding pixels in down-sampled luma reconstruction signal. And these 2 filter shapes are cascaded and both used as input of chroma ALF.

[0275] In current chroma ALF filter shapes as shown in Figure 20, the absolute values of the filter taps 0-23 and the filter tap 24 are represented with different orders of Exp-Golomb code. When using the information in luma reconstruction signal as additional chroma ALF equation input, the new added filter taps can be dealt with different methods. In the first method, the absolute values of the new added filter taps share the same order of Exp-Golomb code with the filter taps 0-23. In the second method, the absolute values of the new added filter taps share the same order of Exp-Golomb code with the filter tap 24.

[0276] In current chroma ALF filter shapes as shown in Figure 20, all the filter taps are followed with their own adaptive clipping index. When using the information in luma reconstruction signal as additional chroma ALF equation input, the new added filter taps can be dealt with different methods. In the first method, the new added filter taps are also followed with their own adaptive clipping index, where the adaptive clipping index representation is same to the adaptive clipping index representation in original chroma ALF filter taps. In the second method, the new added filter taps are followed with fixed clipping index, then for the new added filter taps, the code of corresponding clipping index is omitted. For example, the default clipping range corresponding to the fixed clipping index can be [-1024, 1024] , [-128, 128] , [-32, 32] or [-8, 8] .

[0277] In the second method, it is proposed to take the spatial neighboring pixels in original luma reconstruction signal as additional chroma ALF equation input. Various filter shapes can be used to extract the information in original luma reconstruction signal. For example, the filter shape can be 3x4 as shown in Figure 13. In this example, no symmetry constraints are enforced on the filter coefficients, which means each pixel has its own filter coefficient. Various equation forms can be used to extract the information in original luma reconstruction signal. In one example, the clipping differences between the surrounding pixels in original luma reconstruction signal and the collocated pixel in original luma reconstruction pixel are used as chroma ALF equation input. In another example, the clipping differences between the surrounding pixels in original luma reconstruction signal and the collocated pixel in original luma reconstruction signal, the clipping difference between the collocated pixel in original luma reconstruction signal and current chroma pixel are used as chroma ALF equation input. In the third example, the clipping differences between the surrounding pixels in original luma reconstruction signal and current chroma pixel are used as chroma ALF equation input.

[0278] In the third method, the first method and the second method are combined, where the spatial neighboring pixels in both down-sampled luma reconstruction signal and original luma reconstruction signal are used as additional chroma ALF equation input.

[0279] It should be noted that when using the information in luma reconstruction signal as additional chroma ALF equation input, the luma reconstruction signal can be the luma reconstruction signal right before luma ALF filter or the luma reconstruction signal right after luma ALF filter. In addition, the luma reconstruction signal right before luma ALF filter and the luma reconstruction signal right after luma ALF filter can be utilized solely or jointly.  Information in down-sampled luma reconstruction signal used as additional CCALF input

[0280] According to the one or more embodiments of the disclosure, information in down-sampled luma reconstruction signal is used as additional CCALF equation input. Different methods may be used to achieve this goal.

[0281] Various down-sampling filters can be used to down-sample the luma reconstruction signal. For example, the down-sampling filter is [1: 2: 1; 1: 2: 1]  / 8. Various filter shapes can be used to extract the information in down-sampled luma reconstruction signal. In the first example, the filter shape can be 1×1, 3×3 or 5×5 diamond shape as shown in Figure 15. In the second example, the filter shape can be 5x5 cross shape as shown in Figure 24. In the third example, the filter shape can be 3x3 or 5x5 cross shape or 3x3 square shape as shown in Figure 25. In the fourth example, the filter shape can be 3x3 or 5x5 cross shape or 3x3 square shape as shown in Figure 26. Various equation forms can be used to extract the information in down-sampled luma reconstruction signal. In one example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and current chroma pixel are used as CCALF equation input. In another example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal, the clipping difference between the collocated pixel in down-sampled luma reconstruction signal and current chroma pixel are used as CCALF equation input. In the third example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal are used as CCALF equation input.

[0282] Different methods can be utilized to deal with different filter shapes. In the first method, different filter shapes are switched for each chroma component and a flag is transmitted in ALF APS to signal which filter shape is chosen for each chroma component. In the first example, one filter shape is 5x5 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. The other filter shape is 3x3 square shape in Figure 26, and the equation form is also the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. And these 2 filter shapes are switched for each chroma component and a flag is transmitted in ALF APS to signal which filter is chosen for each chroma component. In the second example, one filter shape is 5x5 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. The other filter shape is original CCALF filter shape as shown in FIG. 29 without luma reconstruction signal as additional input. And these 2 filter shapes are switched for each chroma component and a flag is transmitted in ALF APS to signal which filter is chosen for each chroma component. Besides the low pass down-sampling filters (such as {1: 2: 1; 1: 2: 1}  / 8) , other high pass down-sampling filters can also be utilized to down-sample the luma reconstruction signal. For example, Figure 27 presents 4 high pass down-sampling filters. Various filter shapes can be used to extract the information in down-sampled luma reconstruction signal. In the first example, the filter shape can be 3x3 or 5x5 cross shape as shown in Figure 25. In the second example, the filter shape can be 3x3 or 5x5 cross shape as shown in Figure 26. Various equation forms can be used to extract the information in down-sampled luma reconstruction signal. In one example, the clipping results of the surrounding pixels in down-sampled luma reconstruction signal are used as CCALF equation input, where the corresponding filter shape can be the filter shapes in Figure 25. In another example, the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal are used as CCALF equation input, where the corresponding filter shape can be the filter shapes in Figure 26.

[0283] Different methods can be utilized to deal with different down-sampled luma reconstruction signal. In the first example, the filter shapes in different down-sampled luma reconstruction signal are switched for each chroma component and a flag is transmitted in ALF APS to signal which filter shape is chosen for each chroma component. In one example, for one filter shape with [1: 2: 1; 1: 2: 1]  / 8 down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. For the other filter shape with [1: 0: -1; 1: 0: -1] (first down-sample filter in Figure 27) down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 25, and the equation form is the clipping results of the surrounding pixels in down-sampled luma reconstruction signal. And these 2 filter shapes are switched for each chroma component and a flag is transmitted in ALF APS to signal which filter is chosen for each chroma component. In the second example, the surrounding pixels in different down-sampled luma reconstruction signals are all used as additional inputs of CCALF. In one example, for one filter shape with [1: 2: 1; 1: 2: 1]  / 8 down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 26, and the equation form is the clipping differences between the surrounding pixels in down-sampled luma reconstruction signal and the collocated pixel in down-sampled luma reconstruction signal. For the other filter shape with [1: 0: -1; 1: 0: -1] (first down-sample filter in Figure 27) down-sampled luma reconstruction signal, the filter shape is 3x3 cross shape in Figure 25, and the equation form is the clipping results of the surrounding pixels in down-sampled luma reconstruction signal. And these 2 filter shapes are cascaded and both used as input of CCALF.

[0284] In current CCALF filter shapes as shown in Figure 29, for the filter taps for the luma reconstruction signal in original resolution and the filter shapes for chroma reconstruction signal, no clipping process is conducted; for the filter shapes for luma residual signal, fixed clipping index is utilized. When using the information in down-sampled luma reconstruction signal as additional CCALF equation input, the new added filter taps can be dealt with different methods. In the first method, no clipping index is conducted for the new added taps. In the second method, the new added filter taps are also followed with their own adaptive clipping index, where the adaptive clipping index representation is same to the adaptive clipping index representation in ALF filter. In the third method, the new added filter taps are followed with fixed clipping index, then for the new added filter taps, the code of corresponding clipping index is omitted. For example, the default clipping range corresponding to the fixed clipping index can be [-1024, 1024] , [-128, 128] , [-32, 32] or [-8, 8] .

[0285] It should be noted that when using the information in down-sampled luma reconstruction signal as additional CCALF equation input, the luma reconstruction signal can be the luma reconstruction signal right before luma ALF filter or the luma reconstruction signal right after luma ALF filter. In addition, the luma reconstruction signal right before luma ALF filter and the luma reconstruction signal right after luma ALF filter can be utilized solely or jointly. The luma fixed filters applied in stages of in-loop filters

[0286] According to the one or more embodiments of the disclosure, the luma fixed filters are applied in stages of in-loop filters. Different methods may be used to achieve this goal.

[0287] In the first method, the luma fixed filters are applied more than one time in the same stages of in-loop filters. In the first example, the luma fixed filters defined in ALF are performed right after DBF more than one time. For example, the luma fixed filters defined in ALF are performed right after DBF two times. When the luma fixed filters defined in ALF are performed right after DBF the second time, the luma fixed filter takes the reconstruction samples before DBF and the reconstruction samples after the first time luma fixed filters as input to generate the filtered results at this stage. The classification and filtering logic of the fixed filter can be directly reused as in ALF when the luma fixed filters are performed right after DBF in the second time. For controlling the luma fixed filters usage, the cascaded luma fixed filters can use one slice level flag to control all the cascaded luma fixed filters on or off, or each luma fixed filters is controlled on or off with its own slice level flag.

[0288] In the second method, the luma fixed filters are applied in different stages of in-loop filters. In the first example, the luma fixed filters defined in ALF are performed right after SAO, the luma fixed filter takes the reconstruction samples before DBF and the reconstruction samples after SAO as input to generate the filtered results at this stage. The classification and filtering logic of the fixed filter can be directly reused as in ALF when the luma fixed filters are performed right after SAO. For controlling the luma fixed filters usage, the luma fixed filters performed right after DBF and the luma fixed filters performed right after SAO can use one slice level flag to achieve all the luma fixed filters on or off, or the luma fixed filters performed right after DBF and the luma fixed filters performed right after SAO are controlled on or off with its own slice level flag. In the second example, the luma fixed filters defined in ALF are performed right after ALF, the fixed filter takes the reconstruction samples before DBF and the reconstruction samples after ALF as input to generate the filtered results at this stage. The classification and filtering logic of the fixed filter can be directly reused as in ALF when the luma fixed filters are performed right after ALF. For controlling the luma fixed filters usage, the luma fixed filters performed right after DBF and the luma fixed filters performed right after ALF can use one slice level flag to achieve all the luma fixed filters on or off, or the luma fixed filters performed right after DBF and the luma fixed filters performed right after ALF are controlled on or off with its own slice level flag.

[0289] In the third method, the first method and the second method are combined, the luma fixed filters are applied one or more than one times in different stages of in-loop filters. The chroma fixed filters applied in stages of in-loop filters

[0290] According to the one or more embodiments of the disclosure, the chroma fixed filters are applied in stages of in-loop filters. Different methods may be used to achieve this goal.

[0291] In the first method, the chroma fixed filters are applied one or more than one time in the same stages of in-loop filters. In the first example, the chroma fixed filters defined in ALF is performed right after DBF one time, where the chroma fixed filter takes the reconstruction samples before and after DBF as input to generate the filtered results at this stage. The classification and filtering logic of the chroma fixed filter are directly reused as in ALF. The chroma fixed filters at this stage signals one slice level flag to achieve on / off control. In the second example, the chroma fixed filters defined in ALF are performed right after DBF more than one time. For example, the chroma fixed filters defined in ALF are performed right after DBF two times. When the chroma fixed filters defined in ALF are performed right after DBF the second time, the chroma fixed filter takes the reconstruction samples before DBF and the reconstruction samples after the first time chroma fixed filters as input to generate the filtered results at this stage. The classification and filtering logic of the chroma fixed filter can be directly reused as in ALF when the chroma fixed filters are performed right after DBF in the second time. For controlling the chroma fixed filters usage, the cascaded chroma fixed filters can use one slice level flag to control all the cascaded chroma fixed filters on or off, or each chroma fixed filters are controlled on or off with its own slice level flag.

[0292] In the second method, the chroma fixed filters are applied in different stages of in-loop filters. In the first example, the chroma fixed filters defined in ALF are performed right after SAO, the chroma fixed filter takes the reconstruction samples before DBF and the reconstruction samples after SAO as input to generate the filtered results at this stage. The classification and filtering logic of the fixed filter can be directly reused as in ALF when the chroma fixed filters are performed right after SAO. For controlling the chroma fixed filters usage, the chroma fixed filters performed right after DBF and the chroma fixed filters performed right after SAO can use one slice level flag to achieve all the chroma fixed filters on or off, or the chroma fixed filters performed right after DBF and the chroma fixed filters performed right after SAO are controlled on or off with its own slice level flag. In the second example, the chroma fixed filters defined in ALF are performed right after ALF, the fixed filter takes the reconstruction samples before DBF and the reconstruction samples after ALF as input to generate the filtered results at this stage. The classification and filtering logic of the fixed filter can be directly reused as in ALF when the chroma fixed filters are performed right after ALF. For controlling the chroma fixed filters usage, the chroma fixed filters performed right after DBF and the chroma fixed filters performed right after ALF can use one slice level flag to achieve all the chroma fixed filters on or off, or the chroma fixed filters performed right after DBF and the chroma fixed filters performed right after ALF are controlled on or off with its own slice level flag.

[0293] In the third method, the first method and the second method are combined, the chroma fixed filters are applied one or more than one times in different stages of in-loop filters.

[0294] In the fourth method, the chroma fixed filter output results can be directly used as the results in chroma ALF stage, not only be used as the input of online chroma ALF. In this method, whether to use the chroma fixed filter output results as the results in chroma ALF stage can be controlled in CTU level. Adjustment of the luma  / chroma fixed filter results

[0295] According to the one or more embodiments of the disclosure, the luma fixed filter results or chroma fixed filter results are adjusted when they are applied in stages of in-loop filters. Different methods may be used to achieve this goal.

[0296] In the first method, residual scaling method is applied to the luma fixed filter results or chroma fixed filter results. When the luma fixed filters or the chroma fixed filters are being applied to reconstructed pictures in stages of in-loop filters, a scaling factor is derived and signaled for each color component in the slice header. The derivation is based on least square method. The difference between the input reconstruction samples and the luma fixed filter results or the chroma fixed filter results (residues) are scaled by the scaling factors before being added to input reconstruction samples.

[0297] In the second method, residual offset adjustment method is applied to the luma fixed filter results or chroma fixed filter results. When the luma fixed filters or the chroma fixed filters are being applied to reconstructed pictures in stages of in-loop filters, a residual offset value is selected and signaled for each color component in the slice header. The offset value candidates can be defined in different sets. For example, The offset value candidates are {1, 2} . The residual between the input reconstruction samples and the luma fixed filter results or the chroma fixed filter results is adjusted by reducing the magnitude of the residual at each pixel by this small offset value before being added to input reconstruction samples.

[0298] CCALF for one chroma component taking reconstruction signal in another chroma component as additional input

[0299] According to the one or more embodiments of the disclosure, CCALF filter for one chroma component takes the reconstruction signal in another chroma component as additional input. Different methods may be used to achieve this goal.

[0300] In current CCALF filter, for Cb component, CCALF takes the luma reconstruction signal, the luma residual signal, and the chroma reconstruction signal in Cb component as input; for Cr component, CCALF takes the luma reconstruction signal, the luma residual signal, and the chroma reconstruction signal in Cr component as input. In the proposed CCALF filter, for Cb component, CCALF takes the luma reconstruction signal, the luma residual signal, the chroma reconstruction signal in Cb component, and the chroma reconstruction signal in Cr component as input; for Cr component, CCALF takes the luma reconstruction signal, the luma residual signal, the chroma reconstruction signal in Cr component, and the chroma reconstruction signal in Cb component as input. In CCALF filter for one chroma component, various filter shapes can be used to extract the information in reconstruction signal of another chroma component. In the first example, the filter shape can be 1×1, 3×3 or 5×5 diamond shape as shown in Figure 15. In the second example, the filter shape can be 5x5 cross shape as shown in Figure 24. In the third example, the filter shape can be 3x3 or 5x5 cross shape or 3x3 square shape as shown in Figure 25. In the fourth example, the filter shape can be 3x3 or 5x5 cross shape or 3x3 square shape as shown in Figure 26. Various equation forms can be used to extract the information in reconstruction signal of another chroma component. In one example, the differences between the surrounding pixels in reconstruction signal of another chroma component and current chroma pixel are used as CCALF equation input. In another example, the differences between the surrounding pixels in reconstruction signal of another chroma component and the collocated pixel in reconstruction signal of another chroma component, the difference between the collocated pixel in reconstruction signal of another chroma component and current chroma pixel are used as CCALF equation input. In the third example, the differences between the surrounding pixels in reconstruction signal of another chroma component and the collocated pixel in reconstruction signal of another chroma component are used as CCALF equation input. It should be noted that the numbers in the blocks in Figure 15, Figure 24, Figure 25 and Figure 26 just represent the relative relationship between different filter coefficient, such as whether the filter coefficients in different positions are the same, the specific value for the numbers in the blocks in Figure 15, Figure 24, Figure 25 and Figure 26 can be adjusted depending on a specific CCALF filter shape.

[0301] FIG. 30 is a flow chart illustrating a method 3000 for video decoding in accordance with some implementations of the present disclosure. The method 3000 may be performed by a video decoder, for example, the video decoder 30.

[0302] As shown in FIG. 30, the method 3000 comprises steps 3010, 3020 and 3020. However, the present disclosure does not limit to this. For example, any of steps 3010, 3020 and 3030 may be replaced with other steps as described as follows. It should be noted that the order of these steps is not limited. For example, step 3010 may be performed before or after step 3020. As another example, step 3010 may be performed simultaneously with step 3020.

[0303] In step 3010, the video decoder may obtain a first signal based on a first chroma component in a current picture. In some examples, the first chroma component may be a Cb chroma component or a Cr chroma component. In some examples, the first chroma component may be a U chroma component or a V chroma component.

[0304] In step 3020, the video decoder may obtain a second signal based on a luma component and / or a second chroma component in the current picture. In some examples, the second chroma component may be a Cr chroma component or a Cb chroma component, which is different from the first chroma component. In some examples, the second chroma component may be a U chroma component or a V chroma component, which is different from the first chroma component. In some example, the first chroma component and the second chroma component may be any suitable chroma component.

[0305] In step 3030, the video decoder may apply the first signal and the second signal as inputs for a loop filter to decode the first chroma component of the current picture.

[0306] According to some embodiments, when decoding / filtering one chroma component (e.g., Cr component, Cb component, etc. ) of the current picture, by using the information from another chroma component (e.g., Cb component, Cr component, etc. ) as additional input for loop filter (e.g., ALF, CCALF, etc. ) , the coding performance can be improved.

[0307] In some implementations, the loop filter may be a cross component adaptive loop filter (CCALF) .

[0308] In some implementations, the step 3010 may comprise: obtaining at least one of a luma reconstruction signal, a luma residual signal, and a chroma reconstruction signal for the first chroma component as the first signal.

[0309] In some implementations, the step 3020 may comprise: determining the second chroma component in the current picture; and obtaining a reconstruction signal of the second chroma component as the second signal.

[0310] In some implementations, the step 3030 may comprise: applying a difference between surrounding pixels in the second signal and a chroma pixel in the first signal as input for the CCALF. The first signal may be the chroma reconstruction signal of the first chroma component, e.g., a current chroma component. The second signal may be the reconstruction signal of the second chroma component, e.g., another chroma component different from the current chroma component. In the proposed CCALF filter, for Cb component as the first chroma component, CCALF may take the luma reconstruction signal, the luma residual signal, or the chroma reconstruction signal in Cb component, and the chroma reconstruction signal in Cr component (e.g., the second chroma component) as input; for Cr component as the first chroma component, CCALF takes the luma reconstruction signal, the luma residual signal, or the chroma reconstruction signal in Cr component, and the chroma reconstruction signal in Cb component (e.g., the second chroma component) as input. Surrounding pixels can also be called neighbouring pixels, which surround the current pixel. As shown in Figure 15, Figure 24, Figure 25 and Figure 26, surrounding pixels may be the pixels surrounding the center pixel. It should be noted that Figure 15, Figure 24, Figure 25 and Figure 26 just represent examples of the surrounding pixels, the positions and directions of the surrounding pixels neighboring the current pixel can be adjusted in other implementations. Differences between pixels can be calculated by subtracting pixel value of a pixel from the pixel value of another pixel. The differences may include luma or chroma component differences or both. Differences between the surrounding pixels in the reconstruction signal of another chroma component (e.g., Cr component or Cb component) and the chroma pixel of the current chroma component (e.g., Cb component or Cr component) can be used as CCALF equation input.

[0311] In some implementations, the step 3030 may comprise: applying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal, and a difference between a collocated pixel in the second signal and a chroma pixel in the first signal as inputs for the CCALF. Differences between the surrounding pixels in reconstruction signal of another chroma component and the collocated pixel in reconstruction signal of another chroma component, the difference between the collocated pixel in reconstruction signal of another chroma component and the chroma pixel of the current chroma component can be used as CCALF equation input.

[0312] In some implementations, the step 3030 may comprise: applying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal as input for the CCALF. Differences between the surrounding pixels in reconstruction signal of another chroma component and the collocated pixel in reconstruction signal of another chroma component are used as CCALF equation input.

[0313] In some implementations, the step 3020 may comprise: determining the luma component in the current picture; and obtaining a down-sampled luma reconstruction signal of the luma component as the second signal. The second signal may be a down-sampled luma reconstruction signal. Besides the first signal (e.g., a luma reconstruction signal, a luma residual signal, or a chroma reconstruction signal of the current chroma component) , information in the down-sampled luma reconstruction signal can be used as additional CCALF equation input.

[0314] In some implementations, the method 3000 may further comprise: determining a filter shape for the CCALF. Filters may have various shapes to filter the signal. As a filter, the CCALF may have different shapes, e.g., a diamond shape, a cross shape or a square shape. Different methods can be utilized to deal with different filter shapes. As shown in Figure 26, one filter shape can be 5x5 cross shape and the other filter shape can be 3x3 square shape. These 2 filter shapes will be switched for each chroma component, and a flag will be transmitted in ALF APS to signal which filter is chosen for each chroma component. In another example, one filter shape can be 5x5 cross shape in Figure 26, and the other filter shape can be original CCALF filter shape as shown in FIG. 29. These 2 filter shapes will be switched for each chroma component, and a flag will be transmitted in ALF APS to signal which filter is chosen for each chroma component.

[0315] In some implementations, the determining a filter shape for the CCALF may comprise: determining the filter shape for the CCALF based on a first flag. The first flag may be a flag transmitted in ALF adaptation parameter set (APS) to signal which filter shape is chosen. Filter shapes are determined for each chroma component based on the first flag, and the first flag is transmitted in ALF APS to signal which filter shape is chosen for each chroma component.

[0316] In some implementations, the method 3000 may further comprise: conducting a clipping process for filter taps with a clipping index. In current CCALF filter shapes as shown in Figure 29, for the filter taps for the luma reconstruction signal in original resolution and the filter shapes for chroma reconstruction signal, no clipping process is conducted; for the filter shapes for luma residual signal, fixed clipping index is utilized. When using the information in down-sampled luma reconstruction signal as additional CCALF equation input, filter taps will be added. The new added filter taps can be dealt with different methods. The clipping index may be conducted or not conducted for the new added taps.

[0317] In some implementations, the conducting a clipping process for filter taps with a clipping index may comprise: adding the filter taps followed with the clipping index, wherein the clipping index is an adaptive clipping index. As described above, when using an additional input to the CCALF equation (e.g., , using the information in down-sampled luma reconstruction signal as additional CCALF equation input) , filter taps will be added. The new added filter taps may be followed with their own adaptive clipping index.

[0318] In some implementations, the conducting a clipping process for filter taps with a clipping index may comprise: adding the filter taps followed with the clipping index, wherein the clipping index is a fixed clipping index; and omitting a code of the clipping index. The new added filter taps may be followed with fixed clipping index, then for the new added filter taps, the code of corresponding clipping index is omitted. For example, the default clipping range corresponding to the fixed clipping index can be [-1024, 1024] , [-128, 128] , [-32, 32] or [-8, 8] .

[0319] In some implementations, the new added taps of the CCALF may have a filter shape of a diamond shape, a cross shape or a square shape. Filter taps (or simply “taps” ) are used to define a filter. As mentioned above, when using an additional input to the CCALF equation, e.g., applying the first signal and the second signal as inputs for the CCALF, since the inputs have been added to comprise an original input (e.g., a first signal based on a first chroma component) and an additional input, filter taps will be added. The new added taps of the CCALF may have different shapes.

[0320] In some implementations, the filter shape of the new added taps of the CCALF may be any one of the following: a 1×1 diamond shape; a 3×3 diamond shape; a 5×5 diamond shape; a 5×5 cross shape; a 3×3 cross shape; and a 3×3 square shape.

[0321] In some implementations, the loop filter may be a chroma adaptive loop filter (ALF) .

[0322] In some implementations, the step 3020 may comprise: determining the luma component in the current picture; and obtaining a luma reconstruction signal of the luma component as the second signal. The second signal may be the luma reconstruction signal of the luma component in the current picture. Information in luma reconstruction signal can be used as additional input besides the first signal for the chroma ALF equation.

[0323] In some implementations, the method 3000 may further comprise: determining a filter shape for the chroma ALF. As a filter, the chroma ALF may have different shapes, e.g., a diamond shape, a cross shape or a square shape. Different methods can be utilized to deal with different filter shapes. As shown in Figure 26, one filter shape can be 5x5 cross shape and the other filter shape can be 3x3 square shape. These 2 filter shapes will be switched, and a flag will be transmitted in ALF APS to signal which filter shape is chosen. In another example, one filter shape can be 5x5 cross shape in Figure 26 and the other filter shape can be original chroma ALF filter shape as shown in FIG. 20. These 2 filter shapes will be switched, and a flag will be transmitted in ALF APS to signal which filter shape is chosen.

[0324] In some implementations, the determining a filter shape for the chroma ALF may comprise: determining the filter shape for the chroma ALF based on a second flag. The second flag may be a flag transmitted in ALF APS to signal which filter shape is chosen. Filter shapes are determined based on the second flag, and the second flag is transmitted in ALF APS to signal which filter shape is chosen.

[0325] In some implementations, the second flag may be determined based on a signalled flag or predefined criteria. In a first method, the value of the second flag transmitted in ALF APS can be determined in encoder via an RDO process and transmitted to the decoder via the signalled flag. In a second method, the value of the flag transmitted in ALF APS is determined via predefined criteria, wherein the predefined criteria may be defined based on the test condition (all intra (AI) test, random access (RA) test, or low delay (LD) test) , resolution of the test sequence, or QP value of the test.

[0326] In some implementations, the new added taps of the chroma ALF may have a filter shape of a diamond shape, a cross shape or a square shape. Taps are used to define a filter. When using an additional input to the chroma ALF equation, e.g., applying the first signal and the second signal as inputs for the chroma ALF, filter taps will be added. The new added taps of the chroma ALF may have different shapes.

[0327] In some implementations, the filter shape of the new added taps of the chroma ALF may be any one of the following: a 1×1 diamond shape; a 3×3 diamond shape; a 5×5 diamond shape; a 5×5 cross shape; a 3×3 cross shape; and a 3×3 square shape.

[0328] FIG. 31 is a flow chart illustrating a method 3100 for video encoding in accordance with some implementations of the present disclosure. The method 3100 may be performed by a video encoder, for example, the video encoder 20.

[0329] As shown in FIG. 31, the method 3100 comprises steps 3110, 3120 and 3130. However, the present disclosure does not limit to this. For example, any of steps 3110, 3120 and 3130 may be replaced with other steps as described as follows. It should be noted that the order of these steps is not limited. For example, step 3110 may be performed before or after step 3120. As another example, step 3110 may be performed simultaneously with step 3120.

[0330] In step 3110, the video encoder may determine a first signal based on a first chroma component in a current picture. In some examples, the first chroma component may be a Cb chroma component or a Cr chroma component. In some examples, the first chroma component may be a U chroma component or a V chroma component.

[0331] In step 3120, the video encode may determine a second signal based on a luma component and / or a second chroma component in the current picture. In some examples, the second chroma component may be a Cr chroma component or a Cb chroma component, which is different from the first chroma component. In some examples, the second chroma component may be a U chroma component or a V chroma component, which is different from the first chroma component. In some example, the first chroma component and the second chroma component may be any suitable chroma component.

[0332] In step 3130, the video encode may applying the first signal and the second signal as inputs for a loop filter to encode the first chroma component of the current picture.

[0333] In some implementations, the loop filter may be a cross component adaptive loop filter (CCALF) .

[0334] In some implementations, the step 3110 may comprise: determining at least one of a luma reconstruction signal, a luma residual signal, and a chroma reconstruction signal for the first chroma component as the first signal.

[0335] In some implementations, the step 3120 may comprise: determining the second chroma component in the current picture; and determining a reconstruction signal of the second chroma component as the second signal.

[0336] In some implementations, the step 3130 may comprise: applying a difference between surrounding pixels in the second signal and a chroma pixel in the first signal as input for the CCALF. The first signal may be the chroma reconstruction signal of the first chroma component, e.g., a current chroma component. The second signal may be the reconstruction signal of the second chroma component, e.g., another chroma component different from the current chroma component. In the proposed CCALF filter, for Cb component as the first chroma component, CCALF may take the luma reconstruction signal, the luma residual signal, or the chroma reconstruction signal in Cb component, and the chroma reconstruction signal in Cr component (e.g., the second chroma component) as input; for Cr component as the first chroma component, CCALF takes the luma reconstruction signal, the luma residual signal, or the chroma reconstruction signal in Cr component, and the chroma reconstruction signal in Cb component (e.g., the second chroma component) as input. Surrounding pixels can also be called neighbouring pixels, which surround the current pixel. As shown in Figure 15, Figure 24, Figure 25 and Figure 26, surrounding pixels may be the pixels surrounding the center pixel. It should be noted that Figure 15, Figure 24, Figure 25 and Figure 26 just represent examples of the surrounding pixels, the positions and directions of the surrounding pixels neighboring the current pixel can be adjusted in other implementations. Differences between pixels can be calculated by subtracting pixel value of a pixel from the pixel value of another pixel. The differences may include luma or chroma component differences or both. Differences between the surrounding pixels in the reconstruction signal of another chroma component (e.g., Cr component or Cb component) and the chroma pixel of the current chroma component (e.g., Cb component or Cr component) can be used as CCALF equation input.

[0337] In some implementations, the step 3130 may comprise: applying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal, and a difference between a collocated pixel in the second signal and a chroma pixel in the first signal as inputs for the CCALF. Differences between the surrounding pixels in reconstruction signal of another chroma component and the collocated pixel in reconstruction signal of another chroma component, the difference between the collocated pixel in reconstruction signal of another chroma component and the chroma pixel of the current chroma component can be used as CCALF equation input.

[0338] In some implementations, the step 3130 may comprise: applying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal as input for the CCALF. Differences between the surrounding pixels in reconstruction signal of another chroma component and the collocated pixel in reconstruction signal of another chroma component are used as CCALF equation input.

[0339] In some implementations, the step 3120 may comprise: determining the luma component in the current picture; and determining a down-sampled luma reconstruction signal of the luma component as the second signal. The second signal may be a down-sampled luma reconstruction signal. Besides the first signal (e.g., a luma reconstruction signal, a luma residual signal, or a chroma reconstruction signal of the current chroma component) , information in the down-sampled luma reconstruction signal can be used as additional CCALF equation input.

[0340] In some implementations, the method 3100 may further comprise: determining a filter shape for the CCALF. As a filter, the CCALF may have different shapes, e.g., a diamond shape, a cross shape or a square shape. Different methods can be utilized to deal with different filter shapes. As shown in Figure 26, one filter shape can be 5x5 cross shape and the other filter shape can be 3x3 square shape. These 2 filter shapes will be switched for each chroma component, and a flag will be transmitted in ALF APS to signal which filter is chosen for each chroma component. In another example, one filter shape can be 5x5 cross shape in Figure 26, and the other filter shape can be original CCALF filter shape as shown in FIG. 29. These 2 filter shapes will be switched for each chroma component, and a flag will be transmitted in ALF APS to signal which filter is chosen for each chroma component.

[0341] In some implementations, the determining a filter shape for the CCALF may comprise: determining the filter shape for the CCALF based on a first flag. The first flag may be a flag transmitted in ALF adaptation parameter set (APS) to signal which filter shape is chosen. Filter shapes are determined for each chroma component based on the first flag, and the first flag is transmitted in ALF APS to signal which filter shape is chosen for each chroma component.

[0342] In some implementations, the method 3100 may further comprise: conducting a clipping process for filter taps with a clipping index. In current CCALF filter shapes as shown in Figure 29, for the filter taps for the luma reconstruction signal in original resolution and the filter shapes for chroma reconstruction signal, no clipping process is conducted; for the filter shapes for luma residual signal, fixed clipping index is utilized. When using the information in down-sampled luma reconstruction signal as additional CCALF equation input, filter taps will be added. The new added filter taps can be dealt with different methods. The clipping index may be conducted or not conducted for the new added taps.

[0343] In some implementations, the conducting a clipping process for filter taps with a clipping index may comprise: adding the filter taps followed with the clipping index, wherein the clipping index is an adaptive clipping index. As described above, when using an additional input to the CCALF equation (e.g., , using the information in down-sampled luma reconstruction signal as additional CCALF equation input) , filter taps will be added. The new added filter taps may be followed with their own adaptive clipping index.

[0344] In some implementations, the conducting a clipping process for filter taps with a clipping index may comprise: adding the filter taps followed with the clipping index, wherein the clipping index is a fixed clipping index; and omitting a code of the clipping index. The new added filter taps may be followed with fixed clipping index, then for the new added filter taps, the code of corresponding clipping index is omitted. For example, the default clipping range corresponding to the fixed clipping index can be [-1024, 1024] , [-128, 128] , [-32, 32] or [-8, 8] .

[0345] In some implementations, the new added taps of the CCALF may have a filter shape of a diamond shape, a cross shape or a square shape. Taps are used to define a filter. As mentioned above, when using an additional input to the CCALF equation, e.g., applying the first signal and the second signal as inputs for the CCALF, since the inputs have been added to comprise an original input (e.g., a first signal based on a first chroma component) and an additional input, filter taps will be added. The new added taps of the CCALF may have different shapes.

[0346] In some implementations, the filter shape of the new added taps of the CCALF may be any one of the following: a 1×1 diamond shape; a 3×3 diamond shape; a 5×5 diamond shape; a 5×5 cross shape; a 3×3 cross shape; and a 3×3 square shape.

[0347] In some implementations, the loop filter may be a chroma adaptive loop filter (ALF) .

[0348] In some implementations, the step 3120 may comprise: determining the luma component in the current picture; and determining a luma reconstruction signal of the luma component as the second signal. The second signal may be the luma reconstruction signal of the luma component in the current picture. Information in luma reconstruction signal can be used as additional input besides the first signal for the chroma ALF equation.

[0349] In some implementations, the method 3100 may further comprise: determining a filter shape for the chroma ALF. As a filter, the chroma ALF may have different shapes, e.g., a diamond shape, a cross shape or a square shape. Different methods can be utilized to deal with different filter shapes. As shown in Figure 26, one filter shape can be 5x5 cross shape and the other filter shape can be 3x3 square shape. These 2 filter shapes will be switched, and a flag will be transmitted in ALF APS to signal which filter shape is chosen. In another example, one filter shape can be 5x5 cross shape in Figure 26 and the other filter shape can be original chroma ALF filter shape as shown in FIG. 20. These 2 filter shapes will be switched, and a flag will be transmitted in ALF APS to signal which filter shape is chosen.

[0350] In some implementations, the determining a filter shape for the chroma ALF may comprise: determining the filter shape for the chroma ALF based on a second flag. The second flag may be a flag transmitted in ALF APS to signal which filter shape is chosen. Filter shapes are determined based on the second flag, and the second flag is transmitted in ALF APS to signal which filter shape is chosen.

[0351] In some implementations, the second flag may be determined based on an RDO process or predefined criteria. In a first method, the value of the second flag transmitted in ALF APS can be determined in encoder via an RDO process and transmitted to the decoder via a signalled flag. In a second method, the value of the flag transmitted in ALF APS is determined via predefined criteria, wherein the predefined criteria may be defined based on the test condition (all intra (AI) test, random access (RA) test, or low delay (LD) test) , resolution of the test sequence, or QP value of the test.

[0352] In some implementations, the new added taps of the chroma ALF may have a filter shape of a diamond shape, a cross shape or a square shape. Taps are used to define a filter. When using an additional input to the chroma ALF equation, e.g., applying the first signal and the second signal as inputs for the chroma ALF, filter taps will be added. The new added taps of the chroma ALF may have different shapes.

[0353] In some implementations, the filter shape of the new added taps of the chroma ALF may be any one of the following: a 1×1 diamond shape; a 3×3 diamond shape; a 5×5 diamond shape; a 5×5 cross shape; a 3×3 cross shape; and a 3×3 square shape.

[0354] FIG. 16 shows a computing environment 1610 coupled with a user interface 1650. The computing environment 1610 can be part of a data processing server. The computing environment 1610 includes a processor 1620, a memory 1630, and an Input / Output (I / O) interface 1640.

[0355] The processor 1620 typically controls overall operations of the computing environment 1610, such as the operations associated with display, data acquisition, data communications, and image processing. The processor 1620 may include one or more processors to execute instructions to perform all or some of the steps in the above-described methods. Moreover, the processor 1620 may include one or more modules that facilitate the interaction between the processor 1620 and other components. The processor may be a Central Processing Unit (CPU) , a microprocessor, a single chip machine, a Graphical Processing Unit (GPU) , or the like.

[0356] The memory 1630 is configured to store various types of data to support the operation of the computing environment 1610. The memory 1630 may include predetermined software 1632. Examples of such data includes instructions for any applications or methods operated on the computing environment 1610, video datasets, image data, etc. The memory 1630 may be implemented by using any type of volatile or non-volatile memory devices, or a combination thereof, such as a Static Random Access Memory (SRAM) , an Electrically Erasable Programmable Read-Only Memory (EEPROM) , an Erasable Programmable Read-Only Memory (EPROM) , a Programmable Read-Only Memory (PROM) , a Read-Only Memory (ROM) , a magnetic memory, a flash memory, a magnetic or optical disk.

[0357] The I / O interface 1640 provides an interface between the processor 1620 and peripheral interface modules, such as a keyboard, a click wheel, buttons, and the like. The I / O interface 1640 can be coupled with an encoder and decoder.

[0358] In an embodiment, there is also provided a non-transitory computer-readable storage medium or a computer program product comprising a plurality of programs, for example, in the memory 1630, executable by the processor 1620, for performing the encoding or decoding method described above and / or storing a bitstream which is generated by the encoding method described above and / or is to be decoded by the decoding method described above. For example, the computer program product may include the non-transitory computer-readable storage medium. In one example, the plurality of programs may be executed by the processor 1620 to receive (for example, from the video encoder 20 in FIG. 2) a bitstream or data stream including encoded video information (for example, video blocks representing encoded video frames, and / or associated one or more syntax elements, etc. ) , and may also be executed by the processor 1620 to perform the decoding method described above according to the received bitstream or data stream. In another example, the plurality of programs may be executed by the processor 1620 to perform the encoding method described above to encode video information (for example, video blocks representing video frames, and / or associated one or more syntax elements, etc. ) into a bitstream or data stream, and may also be executed by the processor 1620 to transmit the bitstream or data stream (for example, to the video decoder 30 in FIG. 3) or store the bitstream or data stream. Alternatively, the non-transitory computer-readable storage medium or the computer program product may have stored therein the bitstream or data stream.

[0359] In an embodiment, there is provided a bitstream (for example, comprising encoded video information) which is generated by the encoding method described above and / or is to be decoded by the decoding method described above.

[0360] In an embodiment, there is also provided a computing device comprising one or more processors (for example, the processor 1620) ; and the non-transitory computer-readable storage medium or the memory 1630 having stored therein a plurality of programs executable by the one or more processors, wherein the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described methods. In an example, the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described encoding method to generate a bitstream, and the computing device may further comprise a transmitter, configured to transmit the bitstream. In an alternative example, the one or more processors, upon execution of the plurality of programs, are configured to perform the above-described encoding method to generate a bitstream, and transmit or store the bitstream. In an example, the bitstream is to be decoded by the above-described decoding method.

[0361] In an embodiment, the computing environment 1610 may be implemented with one or more ASICs, DSPs, Digital Signal Processing Devices (DSPDs) , Programmable Logic Devices (PLDs) , FPGAs, GPUs, controllers, micro-controllers, microprocessors, or other electronic components, for performing the above methods.

[0362] In an embodiment, there is also provided a method for storing a bitstream, comprising storing the bitstream on a non-transitory computer-readable storage medium, wherein the bitstream is generated by the encoding method described above and / or is to be decoded by the decoding method described above. In an embodiment, there is also provided a method for storing a bitstream or a method for encoding video data, comprising: performing the encoding method described above to generate a bitstream, and storing the bitstream on a non-transitory computer-readable storage medium. In an example, the bitstream is to be decoded by the decoding method described above.

[0363] In an embodiment, there is also provided a method for transmitting a bitstream which is generated by the encoding method described above and / or is to be decoded by the decoding method described above. In an embodiment, there is also provided a method for transmitting a bitstream or a method for encoding video data, comprising: performing the encoding method described above to generate a bitstream, and transmitting the bitstream to a decoder. In an example, the bitstream is to be decoded by the decoding method described above. In an embodiment, there is also provided a method for receiving a bitstream which is generated by the encoding method described above and / or is to be decoded by the decoding method described above.

[0364] The description of the present disclosure has been presented for purposes of illustration and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative implementations will be apparent to those of ordinary skill in the art having the benefit of the teachings presented in the foregoing descriptions and the associated drawings.

[0365] Unless specifically stated otherwise, an order of steps of the method according to the present disclosure is only intended to be illustrative, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but may be changed according to practical conditions. In addition, at least one of the steps of the method according to the present disclosure may be adjusted, combined or deleted according to practical requirements.

[0366] The examples were chosen and described in order to explain the principles of the disclosure and to enable others skilled in the art to understand various implementations of the disclosure and to best utilize the underlying principles and various implementations with various modifications as are suited to the particular use contemplated. Therefore, it is to be understood that the scope of the disclosure is not to be limited to the specific examples of the implementations disclosed and that modifications and other implementations are intended to be included within the scope of the present disclosure.

Claims

A method for video decoding, comprising:obtaining a first signal based on a first chroma component in a current picture;obtaining a second signal based on a luma component and / or a second chroma component in the current picture; andapplying the first signal and the second signal as inputs for a loop filter to decode the first chroma component of the current picture.The method of claim 1, wherein the loop filter is a cross component adaptive loop filter (CCALF) .The method of claim 2, wherein the obtaining a second signal based on a luma component and / or a second chroma component in the current picture comprises:determining the second chroma component in the current picture; andobtaining a reconstruction signal of the second chroma component as the second signal.The method of claim 3, wherein the applying the first signal and the second signal as inputs for a loop filter to decode the first chroma component of the current picture comprises any one of the following:applying a difference between surrounding pixels in the second signal and a chroma pixel in the first signal as input for the CCALF;applying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal, and a difference between a collocated pixel in the second signal and a chroma pixel in the first signal as inputs for the CCALF; andapplying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal as input for the CCALF.The method of claim 2, wherein the obtaining a second signal based on a luma component and / or a second chroma component in the current picture comprises:determining the luma component in the current picture; andobtaining a down-sampled luma reconstruction signal of the luma component as the second signal.The method of claim 2, further comprising:determining a filter shape for the CCALF based on a first flag.The method of claim 5, further comprising:conducting a clipping process for filter taps with a clipping index.The method of claim 2, wherein filter taps of the CCALF have a filter shape of a diamond shape, a cross shape or a square shape.The method of claim 1, wherein the loop filter is a chroma adaptive loop filter (ALF) ;wherein the obtaining a second signal based on a luma component and / or a second chroma component in the current picture comprises:determining the luma component in the current picture; andobtaining a luma reconstruction signal of the luma component as the second signal.The method of claim 9, further comprising:determining a filter shape for the chroma ALF based on a second flag.The method of claim 10, wherein filter taps of the chroma ALF have a filter shape of a diamond shape, a cross shape or a square shape.A method for video encoding, comprising:determining a first signal based on a first chroma component in a current picture;determining a second signal based on a luma component and / or a second chroma component in the current picture; andapplying the first signal and the second signal as inputs for a loop filter to encode the first chroma component of the current picture.The method of claim 12, wherein the loop filter is a cross component adaptive loop filter (CCALF) .The method of claim 13, wherein the determining a second signal based on a luma component and / or a second chroma component in the current picture comprises:determining the second chroma component in the current picture; anddetermining a reconstruction signal of the second chroma component as the second signal.The method of claim 14, wherein the applying the first signal and the second signal as inputs for a loop filter to encode the first chroma component of the current picture comprises any one of the following:applying a difference between surrounding pixels in the second signal and a chroma pixel in the first signal as input for the CCALF;applying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal, and a difference between a collocated pixel in the second signal and a chroma pixel in the first signal as inputs for the CCALF; andapplying a difference between surrounding pixels in the second signal and a collocated pixel in the second signal as input for the CCALF.The method of claim 13, wherein the determining a second signal based on a luma component and / or a second chroma component in the current picture comprises:determining the luma component in the current picture; anddetermining a down-sampled luma reconstruction signal of the luma component as the second signal.The method of claim 13, further comprising:determining a filter shape for the CCALF based on a first flag.The method of claim 16, further comprising:conducting a clipping process for filter taps with a clipping index.The method of claim 13, wherein filter taps of the CCALF have a filter shape of a diamond shape, a cross shape or a square shape.The method of claim 12, wherein the loop filter is a chroma adaptive loop filter (ALF) ;wherein the determining a second signal based on a luma component and / or a second chroma component in the current picture comprises:determining the luma component in the current picture; anddetermining a luma reconstruction signal of the luma component as the second signal.The method of claim 20, further comprising:determining a filter shape for the chroma ALF based on a second flag.The method of claim 21, wherein filter taps of the chroma ALF have a filter shape of a diamond shape, a cross shape or a square shape.An apparatus for video decoding, comprising:one or more processors; anda memory coupled to the one or more processors and configured to store instructions executable by the one or more processors,wherein the one or more processors, upon execution of the instructions, are configured to perform the method of any of claims 1-11.An apparatus for video encoding, comprising:one or more processors; anda memory coupled to the one or more processors and configured to store instructions executable by the one or more processors,wherein the one or more processors, upon execution of the instructions, are configured to perform the method of any of claims 12-22.A non-transitory computer-readable storage medium storing a plurality of programs for execution by a computing device having one or more processors, wherein the plurality of programs, when executed by the one or more processors, cause the computing device to perform the method of any one of claims 1-11 or the method of any one of claims 12-22.A computer readable storage medium storing a bitstream to be decoded by the method according to any one of claims 1-11.A computer readable storage medium storing a bitstream generated by the method according to any one of claims 12-22.A method for storing a bitstream, comprising:performing the method for video encoding according to any of claims 12-22 to generate a bitstream; andstoring the bitstream.A method for transmitting a bitstream, comprising:performing the method for video encoding according to any of claims 12-22 to generate a bitstream; andtransmitting the bitstream.A computer program product comprising a plurality of programs for execution by a computing device having one or more processors, wherein the plurality of programs, when executed by the one or more processors, cause the computing device to perform the method of any one of claims 1-11 or the method of any one of claims 12-22.