Method and apparatus for adaptive loop filtering

By using spatial adjacent samples to perform SAO and ALF processing in video encoding and decoding, the problem of low adaptive loop filtering efficiency in the prior art is solved, and higher video quality and encoding efficiency are achieved.

CN119836779APending Publication Date: 2025-04-15BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380063977.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-09
Filing Date
2023-09-11
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing video encoding and decoding technology is difficult to effectively utilize spatial adjacent samples during adaptive loop filtering, resulting in a decrease in video quality and low encoding efficiency.

Method used

By using predicted sample points, residual sample points or reconstructed sample points as inputs during video decoding and encoding, sample points adaptive offset (SAO) and adaptive loop filtering (ALF) processing is performed to obtain more accurate sample points values ​​to improve video quality.

Benefits of technology

Improves video quality during video decoding and encoding, reduces artifacts and improves encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119836779A_ABST
    Figure CN119836779A_ABST
Patent Text Reader

Abstract

The invention relates to video coding and decoding and compression. More specifically, the present disclosure relates to a method and apparatus for improving coding and decoding efficiency of an adaptive loop filter (ALF). In one example, the method includes obtaining, by a decoder, one or more spatially adjacent samples associated with a current sample, where the one or more spatially adjacent samples are from at least one of (i) a predicted sample, (ii) a residual sample, or (iii) a reconstructed sample, where the one or more spatially adjacent samples are associated with the current sample, where the one or more spatially adjacent samples are from at least one of (i) a predicted sample, (ii) a residual sample, or (iii) a reconstructed sample. The reconstructed sample point is sampled before sample point adaptive offset (SAO) filtering; and obtaining, by the decoder, a filtered sample point based on the one or more spatially adjacent sample points associated with the current sample point.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is filed based on and claims priority to U.S. Provisional Application No. 63 / 405,372 filed on September 9, 2022, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application relates to video coding and compression. More specifically, the present application relates to methods and apparatus for improving the adaptive loop filtering process. Background Art

[0004] Various electronic devices (e.g., digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc.) support digital video. Electronic devices send and receive or otherwise transmit digital video data through a communication network, and / or store digital video data on a storage device. Due to the limited bandwidth capacity of the communication network and the limited memory resources of the storage device, before the video data is transmitted or stored, video codecs can be used to compress the video data according to one or more video codec standards. For example, video codec standards include general video codecs (VVC), joint exploration test models (JEM), high efficiency video codecs (HEVC / H.265), advanced video codecs (AVC / H.264), moving picture experts group (MPEG) codecs, etc. Video codecs generally use prediction methods (e.g., inter-frame prediction, intra-frame prediction, etc.) that utilize the inherent redundancy in video data. Video codecs are intended to compress video data into a form that uses a lower bit rate while avoiding or minimizing the degradation of video quality. Summary of the invention

[0005] Embodiments of the present disclosure provide techniques related to adaptive loop filtering.

[0006] In a first aspect, the present disclosure provides a video decoding method, comprising: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) prediction samples, (ii) residual samples, or (iii) reconstructed samples, wherein the reconstructed samples are sampled before sample adaptive offset (SAO) filtering; and obtaining, by the decoder, filtered samples based on the one or more spatial neighboring samples associated with the current sample.

[0007] In a second aspect, the present disclosure provides a video encoding method, comprising: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) prediction samples, (ii) residual samples, or (iii) reconstructed samples, wherein the reconstructed samples are sampled before SAO filtering; and obtaining, by the encoder, filtered samples based on the one or more spatial neighboring samples associated with the current sample.

[0008] In a third aspect, the present disclosure provides a video decoding method, comprising: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample; and deriving, by the decoder, an ALF classifier for an online adaptive loop filter (ALF) process, the ALF classifier utilizing the one or more spatial neighboring samples before a deblocking filter.

[0009] In a fourth aspect, the present disclosure provides a video encoding method, comprising: obtaining, by an encoder, a reconstructed video frame comprising a plurality of pixels; and deriving, by the encoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes pixel values ​​before a deblocking filter.

[0010] In a fifth aspect, the present disclosure provides a video decoding method, comprising: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from predicted samples; and deriving, by the decoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes sample values ​​from the predicted samples.

[0011] In a sixth aspect, the present disclosure provides a video encoding method, comprising: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from predicted samples; and deriving, by the encoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes sample values ​​from the predicted samples.

[0012] In a seventh aspect, the present disclosure provides a video decoding method, comprising: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples; and deriving, by the decoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes sample values ​​from the residual samples.

[0013] In an eighth aspect, the present disclosure provides a video encoding method, comprising: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples; and deriving, by the encoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes sample values ​​from the residual samples.

[0014] In a ninth aspect, the present disclosure provides a video decoding method, comprising: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample; and deriving, by the decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing one or more spatial neighboring samples before an SAO process.

[0015] In a tenth aspect, the present disclosure provides a video encoding method, comprising: obtaining, by an encoder, a reconstructed video frame comprising a plurality of pixels; and deriving, by the encoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes pixel values ​​before an SAO process.

[0016] In an eleventh aspect, the present disclosure provides a video decoding method, comprising: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples; and deriving, by the decoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes sample values ​​from the chroma samples.

[0017] In a twelfth aspect, the present disclosure provides a video encoding method, comprising: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples; and deriving, by the encoder, an ALF classifier for an online ALF process, wherein the ALF classifier utilizes sample values ​​from the chroma samples.

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

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

[0020] Figure 1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks according to some embodiments of the present disclosure.

[0021] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0022] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0023] FIG. 4A to FIG. 4E is a block diagram illustrating how a frame may be recursively partitioned into multiple video blocks of different sizes and shapes according to some embodiments of the present disclosure.

[0024] Figure 5 ALF filter shapes according to some examples of the present disclosure are shown.

[0025] Figure 6 Depicted are sub-sampled sample point gradients according to some examples of the present disclosure.

[0026] Figure 7 Geometric transformations of diamond filter shapes according to some examples of the present disclosure are shown.

[0027] Figure 8 In-line filter shapes used in ECM according to some examples of the present disclosure are shown.

[0028] Fig. 9 Filter shapes for a prediction signal or a signal before SAO according to examples of the present disclosure are shown.

[0029] Fig.10 Adjusted ALF filter shapes according to some examples of the present disclosure are shown.

[0030] Fig.11 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0031] Fig.12 is a flowchart illustrating a video encoding method according to some examples of the present disclosure.

[0032] Fig.13 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0033] Fig.14 is a flowchart illustrating a video encoding method according to some examples of the present disclosure.

[0034] Fig.15 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0035] Fig.16 is a flowchart illustrating a video encoding method according to some examples of the present disclosure.

[0036] Fig.17 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0037] Fig.18 is a flowchart illustrating a video encoding method according to some examples of the present disclosure.

[0038] Fig.19 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0039] Fig. 20 is a flowchart illustrating a video encoding method according to some examples of the present disclosure.

[0040] Fig.21 is a flowchart illustrating a video decoding method according to some examples of the present disclosure.

[0041] Fig. 22 is a flowchart illustrating a video encoding method according to some examples of the present disclosure.

[0042] Fig.23 is a diagram illustrating a computing environment coupled to a user interface according to some implementations of the present disclosure. DETAILED DESCRIPTION

[0043] Reference will now be made in detail to specific embodiments, examples of which are shown in the accompanying drawings. In the following detailed description, a large number of non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it is apparent that those skilled in the art may use various alternatives. For example, it is apparent that those skilled in the art may implement the subject matter presented herein on various types of electronic devices with digital video capabilities.

[0044] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the drawings are used to distinguish objects, but not to describe any specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those shown in the drawings or described in the present disclosure.

[0045] Filter shapes, linear filtering, and adaptive truncation

[0046] In VVC, ALF is applied to the output samples of SAO. Figure 5 As shown in Figure 1, the luminance component and chrominance component support two filter shapes: 7×7 diamond and 5×5 diamond. Figure 5 In , each square corresponds to a luma or chroma sample, and the center square corresponds to the current sample to be filtered. The filter coefficients are point symmetric, and each integer filter coefficient is represented with 7-bit decimal precision. In addition, the sum of the coefficients of a filter is equal to 128, which is the 7-bit decimal precision fixed-point representation of 1.0:

[0047]

[0048] where the number of coefficients N is equal to 13 and 7 for filter shapes of 7×7 and 5×5 respectively. The value of the filtered sample at coordinate (x, y) It is obtained by applying the coefficient c to the value of the reconstructed sample point R(x,y) i The results are as follows:

[0049]

[0050] Among them, (x+x i ,y+y i ) and (xx i ,yy i ) is related to the i-th coefficient c i The corresponding coordinates of the reconstructed sample points. Due to the constraints in equation (1), equation (2) can be written as:

[0051]

[0052] In VVC, the possibility of intercepting the difference between the neighboring sample value and the current sample to be filtered is added in equation (3), as follows:

[0053]

[0054] in

[0055] f i =min(b i ,max(-b i ,R(x+x i ,y+y i )-R(x,y)))+

[0056] min(b i ,max(-b i ,R(xx i ,yy i )-R(x,y)))

[0057] b i is the coefficient c i The interception parameters are determined by the interception index d i Decision. i It is derived as follows:

[0058]

[0059] Where BD is the sample bit depth, and d i Can be 0, 1, 2, or 3.

[0060] Luma sub-block level filter adaptation

[0061] In VVC, sub-block level filter adaptation is only applied to the luma component. Each 4×4 luma block is classified based on its directionality and 2D Laplacian activity. First, the sample gradients in the horizontal, vertical and two diagonal directions are calculated:

[0062] H k,l =|2R(k,l)-R(k-1,l)-R(k+1,l)|,

[0063] V k,l =|2R(k,l)-R(k,l-1)-R(k,l+1)|,

[0064] D0 k,l =|2R(k,l)-R(k-1,l-1)-R(k+1,l+1)|,

[0065] D1 k,l =|2R(k,l)-R(k-1,l+1)-R(k+1,l-1)|.

[0066] Based on the sample point gradient, the sub-block horizontal gradient g h , vertical gradient g v and two diagonal gradients g d0 and g d1 is calculated as

[0067]

[0068] The indices i and j refer to the coordinates of the top left corner sample point in the 4×4 luminance block. From equation (8), it can be seen that the sum of the gradients of the samples in the 10×10 luminance window covering the target 4×4 block is used to classify the block. To reduce complexity, only the gradient of every other sample point in the 10×10 window is calculated, as Figure 6 As shown. (See Figure 6 , which depicts the sub-sampled sample gradients for the 4×4 sub-block ALF classification. The gradient values ​​of the samples marked with x are calculated. The gradient values ​​of the other samples are set to 0).

[0069] Secondly, to assign the directionality D, the ratio of the maximum to the minimum horizontal and vertical gradients of the sub-block is calculated:

[0070]

[0071] And the ratio of the maximum to minimum diagonal gradients of the two sub-blocks:

[0072]

[0073] With a set of thresholds t1 and t 2 Mutual comparison: Step 1: If and Then D is set to 0. Step 2: If Then calculate the directivity D in step 3, otherwise calculate it in step 4. Step 3: If Then D is set to 2, otherwise D is set to 1. Step 4: If Then D is set to 4, otherwise D is set to 3.

[0074] Each subsequent step in the calculation of D above is performed only if no value was assigned to D in the previous step. Third, the activity value A is calculated as

[0075]

[0076] A is further mapped to the range 0 to 4: Among them, {Q n Finally, each 4×4 luma block is classified into one of the following 25 classes:

[0077]

[0078] Each class can be assigned its own filter. Before filtering each 4×4 luma block, a geometric transformation is applied to the filter coefficients, such as a 90 degree rotation, diagonal or vertical flip, e.g. Figure 7 As shown (illustrating the geometric transformation of the 7×7 diamond filter shape. From left to right: diagonal flip, vertical flip, 90 degree rotation), depending on the sub-block gradient value specified in Table 1.

[0079] Sub-block gradient value Transform <![CDATA[g d1 <g d0 And g h <g v ]]> No transformation <![CDATA[g d1 <g d0 And g v ≤g h ]]> Diagonal Flip <![CDATA[g do ≤g d1 And g h <g v ]]> Flip Vertically <![CDATA[g do ≤g d1 And g v ≤g h ]]> 90 degree rotation

[0080] Table 1 Geometric transformation based on sub-block gradient values

[0081] Coding tree block level filter adaptation

[0082] In addition to luma 4×4 block-level filter adaptation, ALF also supports CTB-level filter adaptation. The luma CTB can use the filter group calculated for the current strip, or one of the filter groups calculated for the coded strip. It can also use one of 16 offline trained filter groups. In each luma CTB, which filter in the selected filter group should be applied to each 4×4 block is determined by the class C calculated for the block according to equation (12). Chroma only uses CTB-level filter adaptation. In a strip, a maximum of 8 filters can be used for chroma components. Each CTB can select one of the filters.

[0083] Syntax Design

[0084] The filter coefficients and truncation index are carried in the ALF APS. The ALF APS can include up to 8 chroma filters and a luma filter bank (which can contain up to 25 filters). Each of the 25 luma classes also includes an index i C . With the same index i C Classes of ALF coefficients share the same filter. By combining different classes, the number of bits required to represent the filter coefficients is reduced. The absolute value of the filter coefficients is represented using an exponential Golomb code of order 0, followed by a sign bit for non-zero coefficients. When truncation is enabled, a truncation index is also signaled using a two-bit fixed-length code for each filter coefficient. The storage required for the ALF coefficients and the truncation index within the APS is a maximum of 3480 bits. The decoder can use up to 8 ALF APSs simultaneously.

[0085] The filter control syntax element includes two types of information. First, the ALF on / off flag is signaled at the sequence, picture, slice, and CTB levels. Chroma ALF can be enabled at the corresponding level only when luma ALF is enabled at the picture and slice level. Second, if ALF is enabled at the picture, slice, and CTB level, the filter usage information is signaled at that level. The referenced ALF APS ID is encoded and decoded at the slice level, or at the picture level if all slices within a picture use the same APS. A maximum of 7 ALF APSs can be referenced for the luma component, while a maximum of 1 ALF APS can be referenced for the chroma component. For the luma CTB, an index is signaled that indicates which ALF APS or offline trained luma filter bank to use. For the chroma CTB, the index indicates which filter in the referenced APS to use.

[0086] Reduce line buffer

[0087] To reduce the storage requirements of ALF, VVC uses line buffer boundary processing. In VVC, the line buffer boundary is located at 4 luma samples and 2 chroma samples above the horizontal CTU boundary. When ALF is applied to samples on one side of the line buffer boundary, the samples on the other side of the line buffer boundary cannot be used.

[0088] ALF in ECM

[0089] Remove ALF Simplification

[0090] ALF gradient subsampling and ALF virtual boundary processing are removed. The block size for classification is reduced from 4×4 to 2×2. The filter size for luma and chroma (where ALF coefficients are signaled) is increased to 9×9.

[0091] ALF with fixed filter

[0092] To filter the brightness samples, three different classifiers (C 0 , C 1 and C 2 ) and three different filter banks (F 0 、F 1 and F 2 ). Group F 0 and F 1 Contains fixed filters whose coefficients are for the classifier C 0 and C 1 Trained. 2 The coefficients of the filters in are transmitted by the signal. For a given sample point, the set F is used i Which filter is used by the classifier C i The class C assigned to this sample point i decided.

[0093] Filtering

[0094] First, two 13×13 diamond fixed filters F are applied 0 and F 1 , to obtain two intermediate sample points R 0 (x,y) and R 1 (x,y). Then, F 2 Application to R 0 (x,y),R 1 (x,y), neighboring samples, and samples before the deblocking filter (DBF) to get the filtered samples:

[0095]

[0096] Among them, f i,j is the intercept difference between the neighboring sample point and the current sample point R(x,y), g i YesR i-20 The intercept difference between (x, y) and the current sample point R(x, y), h i,j It is the intercept difference between the adjacent sample point before DBF and the current sample point R(x,y). The filter coefficient c is transmitted by the signal i , i=0,…24. F 2 The filter shape is as follows Figure 8 shown.

[0097] Classification

[0098] Based on the directionality D i and activities Assign class C to each 2×2 block i :

[0099]

[0100] Among them, M D,i Indicates directionality D i As with VVC, the 1-D Laplacian operator is used to calculate the horizontal, vertical, and two diagonal gradient values ​​of each sample point. The sum of the sample point gradients within the 4×4 window covering the target 2×2 block is used for the classifier C 0 , and the sum of the sample gradients within the 12×12 window is used for classifier C 1 and C 2 The sum of the horizontal, vertical and two diagonal gradients are expressed as and Directionality D i This is done by:

[0101]

[0102] Determined by comparing with a set of thresholds. Directionality D 2 In VVC, thresholds 2 and 4.5 are used. 0 and D 1 , first calculate the horizontal / vertical edge strength and diagonal strength Threshold Th = [1.25, 1.5, 2, 3, 4.5, 8] is used. If The edge strength is 0; otherwise, is satisfied The largest integer. If The edge strength is 0; otherwise, is satisfied The maximum integer of . When horizontal / vertical edges dominate, D i is obtained using Table 2(a); otherwise, when diagonal edges dominate, D i It is obtained using Table 2.

[0103]

[0104] Table 2. and To D i Mapping

[0105] To obtain The sum of the vertical and horizontal gradients A i Mapped to the range from 0 to n, where n is equal to 4, and for and n is equal to 15. In ALF_APS, up to 4 luminance filter groups are signaled, each group can have up to 25 filters.

[0106] Alternative 2×2 ALF classifier

[0107] The classification in ALF is extended by the addition of an alternative classifier. For a signaled luma filterbank, a flag is signaled to indicate if the alternative classifier is applied. No geometric transformation is applied for the alternative band classifier. When applying a band-based classifier, the sum of the sample values ​​of the 2×2 luma block is first calculated. The class index is then calculated as: class_index = (sum*25) >> (sample bit depth + 2).

[0108] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used without departing from the scope of the claims, and that the subject matter may be practiced without these specific details. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0109] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the drawings are used to distinguish objects, but not to describe any specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those shown in the drawings or described in the present disclosure.

[0110] Figure 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a destination device 14. Source device 12 and destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.

[0111] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to send the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (e.g., a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (e.g., a local area network, a wide area network, or a global network such as the Internet). The communication medium may include a router, a switch, a base station, or any other device that may be beneficial to facilitate communication from the source device 12 to the target device 14.

[0112] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. The encoded video data in the storage device 32 may then be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that may hold the encoded video data generated by the source device 12. The target device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a network server (e.g., for a website), a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive. Target device 14 may access the encoded video data through any standard data connection suitable for accessing encoded video data stored on a file server, including a wireless channel (e.g., a Wireless Fidelity (Wi-Fi) connection), a wired connection (e.g., a Digital Subscriber Line (DSL), a cable modem, etc.), or a combination of both wireless channels and wired connections. The transmission of the encoded video data from storage device 32 may be a streaming transmission, a download transmission, or a combination of both streaming and download transmissions.

[0113] like Figure 1 As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in this application may be generally applicable to video encoding and decoding, and may be applied to wireless and / or wired applications.

[0114] The captured, pre-captured, or computer-generated video may be encoded by the video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device 32 for later access by the target device 14 or other devices for decoding and / or playback. The output interface 22 may further include a modem and / or a transmitter.

[0115] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such syntax elements may be included within the encoded video data sent over a communication medium, stored on a storage medium, or stored on a file server.

[0116] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device and an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0117] The video encoder 20 and the video decoder 30 can operate according to a proprietary standard or an industry standard (e.g., VVC, HEVC, Part 10 of MPEG-4, AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally believed that the video encoder 20 of the source device 12 can be configured to encode the video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 can be configured to decode the video data according to any of these current standards or future standards.

[0118] The video encoder 20 and the video decoder 30 can be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic devices, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device can store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 can be included in one or more encoders or decoders, and either of the encoders or decoders can be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.

[0119] In some embodiments, components of source device 12 (e.g., video source 18, video encoder 20, or the like) may include: Figure 2 The components described include at least a portion of the components in the video encoder 20, and the output interface 22) and / or components of the target device 14 (e.g., the input interface 28, the video decoder 30 or the components described below). Figure 3The components described, including the video decoder 30, and at least a portion of the components in the display device 34) may be operated in a cloud computing service network such as software as a service (SaaS), platform as a service (PaaS), or infrastructure as a service (IaaS), wherein the cloud computing service network may provide software, platform, and / or infrastructure. In some embodiments, one or more components of the source device 12 and / or the target device 14 that are not included in the cloud computing service network may be set in one or more client devices, and the one or more client devices may communicate with a server computer in the cloud computing service network through a wireless communication network (e.g., a cellular communication network, a short-range wireless communication network, or a global navigation satellite system (GNSS) communication network) or a wired communication network (e.g., a local area network (LAN) communication network or a power line communication (PLC) network). In an embodiment, at least a portion of the operations described herein may be implemented as a cloud-based service provided by one or more server computers, wherein the one or more server computers are implemented by at least a portion of the components of the source device 12 and / or at least a portion of the components of the target device 14 in the cloud computing service network; and one or more other operations described herein may be implemented by one or more client devices. In some embodiments, the cloud computing service network may be a private cloud, a public cloud, or a hybrid cloud. Without departing from the scope of the present disclosure, terms such as "cloud", "cloud computing", "cloud-based", etc. may be used interchangeably as appropriate. It should be understood that the present disclosure is not limited to being implemented in the above-mentioned cloud computing service network. Instead, the present disclosure may also be implemented in any other type of computing environment currently known or developed in the future.

[0120] Figure 2 is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 can perform intra-frame prediction coding and inter-frame prediction coding on video blocks within a video frame. Intra-frame prediction coding relies on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence. It should be noted that in the field of video coding and decoding, the term "frame" can be used as a synonym for the term "image" or "picture".

[0121] like Figure 2As shown in , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a segmentation unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 such as a deblocking filter can be located between the adder 62 and the DPB 64 to filter the block boundary to remove the block effect from the reconstructed video. In addition to the deblocking filter, another in-loop filter (such as a sample adaptive offset (SAO) filter and / or an adaptive in-loop filter (ALF)) can also be used to filter the output of the adder 62. It should be noted that, for the CCSAO technology, the present application is not limited to the embodiments described herein, but the present application can be applied to the case where an offset is selected for any other component of the luminance component, the Cb chrominance component, and the Cr chrominance component according to any of the luminance component, the Cb chrominance component, and the Cr chrominance component to modify any component based on the selected offset. Further, it should be noted that the first component mentioned herein can be any one of the luminance component, the Cb chrominance component, and the Cr chrominance component, the second component mentioned herein can be any other one of the luminance component, the Cb chrominance component, and the Cr chrominance component, and the third component mentioned herein can be the remaining component of the luminance component, the Cb chrominance component, and the Cr chrominance component. In some examples, the in-loop filter can be omitted, and the decoded video block can be directly provided to the DPB 64 by the adder 62. The video encoder 20 can be in the form of a fixed or programmable hardware unit, or can be dispersed in one or more of the illustrated fixed or programmable hardware units.

[0122] Video data memory 40 may store video data to be encoded by components of video encoder 20. Figure 1 The video source 18 shown obtains video data in the video data memory 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) for use by the video encoder 20 (e.g., in intra-frame or inter-frame prediction coding mode) when encoding the video data. The video data memory 40 and the DPB 64 can be formed by any of a variety of memory devices. In various examples, the video data memory 40 can be on-chip with other components of the video encoder 20, or off-chip relative to those components.

[0123] like Figure 2As shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into strips, tiles (e.g., a set of video blocks) or other larger coding units (CUs) according to a predefined splitting structure (e.g., a quadtree (QT) structure) associated with the video data. A video frame is or may be considered as a two-dimensional sample array or matrix with sample values. The samples in the array may also be referred to as pixels or picture elements (pel). The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the video frame. For example, a video frame may be divided into a plurality of video blocks by using QT segmentation. A video block is again or may be considered as a two-dimensional sample array or matrix with sample values, but its dimensions are smaller than the dimensions of a video frame. The number of samples in the horizontal and vertical directions (or axes) of a video block defines the size of the video block. By, for example, iteratively using QT segmentation, binary tree (BT) segmentation, or ternary tree (TT) segmentation, or any combination thereof, a video block may be further segmented into one or more block partitions or sub-blocks (which may again form blocks). It should be noted that the term "block" or "video block" used herein may be a portion of a frame or picture, in particular a rectangular (square or non-square) portion. With reference to, for example, HEVC and VVC, a 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 a sub-block.

[0124] The prediction processing unit 41 may select one of a plurality of feasible prediction coding modes for the current video block based on the error results (e.g., coding rate and distortion level), such as one of one or more inter-frame prediction coding modes in a plurality of intra-frame prediction coding modes. The prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements (e.g., motion vectors, intra-frame mode indicators, partition information, and other such syntax information) to the entropy coding unit 56.

[0125] To select an appropriate intra-prediction coding mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction coding of the current video block in relation to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction coding of the current video block in relation to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple encoding passes, for example, to select an appropriate coding mode for each block of video data.

[0126] In some embodiments, motion estimation unit 42 determines an inter-prediction mode for a current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating a motion vector that estimates the motion of a video block. For example, a motion vector may indicate the displacement of a video block within a current video frame or picture relative to a prediction block within a reference frame associated with a current block being encoded within the current frame. The predetermined pattern may designate a video frame in a sequence as a P frame or a B frame. Intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC coding in a manner similar to the motion vector determined by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine a block vector.

[0127] In terms of pixel differences, the prediction block for the video block may be or may correspond to a block or reference block of a reference frame that is considered to closely match the video block to be encoded, and the pixel difference may be determined by the sum of absolute differences (SAD), the sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values ​​for sub-integer pixel positions of the reference frames stored in the DPB 64. For example, the video encoder 20 may interpolate values ​​for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to full pixel positions and fractional pixel positions and output a motion vector with fractional pixel accuracy.

[0128] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction 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 DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0129] The motion compensation performed by the motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector for the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from the DPB 64, and forward the prediction block to the adder 50. The adder 50 then forms a residual video block of pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by the motion compensation unit 44 from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include luminance component differences or chrominance component differences or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying a prediction block, any flag indicating a prediction mode, or any other syntax information described herein. It should be noted that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are described separately for conceptual purposes.

[0130] In some embodiments, the intra BC unit 48 may generate vectors and obtain prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values ​​for the various tested intra prediction modes using rate-distortion analysis, and select an intra prediction mode with the best rate-distortion characteristic among the tested modes as a suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between the coded block and the original uncoded block that is encoded to produce the coded block, as well as the bit rate (i.e., the number of bits) used to produce the coded block. The intra BC unit 48 may calculate ratios based on the distortion and rate for the various coded blocks to determine which intra prediction mode exhibits the best rate-distortion value for the block. In other examples, the intra BC 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 intra BC prediction according to the embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identifying the prediction block may include calculating values ​​for sub-integer pixel positions.

[0131] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include both luma component differences and chroma component differences.

[0132] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 can perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 can determine the intra-frame prediction mode for encoding the current block. To this end, the intra-frame prediction processing unit 46 can use various intra-frame prediction modes to encode the current block, for example, during separate encoding passes, and the intra-frame prediction processing unit 46 (or in some examples, the mode selection unit) can select a suitable intra-frame prediction mode from the tested intra-frame prediction modes to use. The intra-frame prediction processing unit 46 can provide information indicating the intra-frame prediction mode selected for the block to the entropy coding unit 56. The entropy coding unit 56 can encode the information indicating the selected intra-frame prediction mode into the bitstream.

[0133] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform (e.g., a discrete cosine transform (DCT) or a conceptually similar transform).

[0134] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. 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, quantization unit 54 may then perform a scan on the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.

[0135] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, 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 coding method or technique. The encoded bitstream may then be sent to a video bitstream such as a Figure 1 The video decoder 30 shown, or archived as Figure 1 The video frame may be stored in storage device 32 as shown for later transmission to or retrieval by video decoder 30. Entropy encoding unit 56 may also entropy encode motion vectors and other syntax elements for the current video frame being encoded.

[0136] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0137] Adder 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0138] Figure 3 1 is a block diagram showing an exemplary video decoder 30 according to some embodiments 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, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned Figure 2 The encoding process is substantially the inverse of the decoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0139] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (e.g., the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (e.g., the motion compensation unit 82).

[0140] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by 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 (e.g., a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (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 by the video decoder 30 when decoding the video data (e.g., in an intra-frame or inter-frame prediction coding mode). 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)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. Figure 3 9 as two different components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 can be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 can be on-chip with other components of the video decoder 30, or off-chip relative to those components.

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

[0142] When a video frame is encoded as an intra-prediction coded (I) frame or for intra-coded prediction blocks in other types of frames, the intra-prediction unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the intra-prediction mode transmitted by the signal and reference data from a previously decoded block of the current frame.

[0143] When the video frame is encoded as an inter-frame prediction coding (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists, i.e., List 0 and List 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0144] In some examples, when a video block is encoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.

[0145] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for a video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) for encoding a video block of a 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 prediction encoded video block of the frame, inter prediction states for each inter prediction encoded video block of the frame, and other information for decoding a video block in the current video frame.

[0146] Similarly, the intra BC unit 85 may use some of the received syntax elements, such as flags, to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video block in the current video frame.

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

[0148] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. 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 to reconstruct the residual block in the pixel domain.

[0149] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (e.g., a deblocking filter, an SAO filter, a CCSAO filter, and / or an ALF) may be located between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (e.g., Figure 1 on a display device 34).

[0150] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as 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 examples, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0151] like Figure 4A As shown in , the video encoder 20 (or more specifically, the segmentation unit 45) generates an encoded representation of a frame by first segmenting the frame into a set of CTUs. A video frame may include an integer number of CTUs ordered consecutively from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 4BAs shown in , each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of the coding pixel blocks and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding samples of the coding tree block. The coding tree block may be an N×N block of samples.

[0152] To achieve better performance, the video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof, on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 4C As depicted in , a 64×64 CTU 400 is first divided into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are respectively divided into four CUs with a block size of 16×16. Two 16×16 CUs 430 and CU 440 are further divided into four CUs with a block size of 8×8. Figure 4D Depicted is a diagram showing Figure 4C The quadtree data structure of the final result of the partitioning process of the CTU 400 depicted in FIG. 4 corresponds to a CU of a corresponding size ranging from 32×32 to 8×8. Figure 4B In the CTU depicted in FIG, each CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, and syntax elements for encoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding the samples of the coding block. It should be noted that Fig.10 and Fig.11 The quadtree partitioning depicted in FIG is for illustrative purposes only, and one CTU can be split into multiple CUs based on quadtree partitioning / ternary tree partitioning / binary tree partitioning to adapt to varying local characteristics. In a multi-type tree structure, one CTU is partitioned according to a quadtree structure, and each quadtree leaf CU can be further partitioned according to a binary and ternary tree structure. Figure 4E As shown, there are five possible partitioning types for a coding block with width W and height H, namely, quadruple partitioning, horizontal binary partitioning, vertical binary partitioning, horizontal ternary partitioning, and vertical ternary partitioning.

[0153] In some embodiments, the video encoder 20 may further partition the coding block of the CU into one or more (M×N) PBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma PB, Cb PB, and Cr PB of each PU of the CU.

[0154] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0155] After the video encoder 20 generates a predicted luma block, a predicted Cb block, and a predicted Cr block for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma coding block of the CU, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0156] In addition, if Figure 4CAs shown in , the video encoder 20 can use quadtree partitioning to decompose the luma residual block, Cb residual block and Cr residual block of the CU into one or more luma transform blocks, Cb transform blocks and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. The TU of the CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Therefore, each TU of the CU may be associated with a luma transform block, a Cb transform block and a Cr transform block. In some examples, the luma transform block associated with the TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.

[0157] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.

[0158] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Finally, the video encoder 20 may output a bitstream including a sequence of bits that form a representation of an encoded frame and associated data, and the bitstream is stored in the storage device 32 or sent to the target device 14.

[0159] After receiving the bitstream generated by the video encoder 20, the video decoder 30 can parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 can reconstruct the frame of the video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally inverse to the encoding process performed by the video encoder 20. For example, the video decoder 30 can perform an inverse transform on the coefficient block associated with the TU of the current CU to reconstruct the residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding the samples of the prediction block for the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block for each CU of the frame, the video decoder 30 can reconstruct the frame.

[0160] As mentioned above, video coding mainly uses two modes, namely, intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to coding efficiency than intra-frame prediction because motion vectors are used to predict the current video block based on the reference video block.

[0161] But with the ever-improving video data capture technology and finer video block sizes for retaining details in the video data, the amount of data required to represent the motion vector for the current frame has also increased significantly. One way to overcome this challenge benefits from the fact that not only a set of neighboring CUs in both the spatial and temporal domains have similar video data for prediction purposes, but also the motion vectors between these neighboring CUs are similar. Therefore, the motion information of spatially neighboring CUs and / or temporally co-located CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU (which is also called the "motion vector predictor" (MVP) of the current CU) by exploring their spatial and temporal correlations.

[0162] Instead of combining as above Figure 2 The actual motion vector of the current CU determined by the motion estimation unit 42 is encoded into the video bitstream, and the motion vector prediction value of the current CU is subtracted from the actual motion vector of the current CU to generate a motion vector difference (MVD) for the current CU. By doing so, the motion vector determined by the motion estimation unit 42 for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent the motion information in the video bitstream can be significantly reduced.

[0163] Similar to the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, both the video encoder 20 and the video decoder 30 need to adopt a set of rules for constructing a motion vector candidate list (also called a "merge list") for the current CU using those potential candidate motion vectors associated with the spatial neighboring CUs and / or temporal co-located CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector prediction value for the current CU. By doing so, the motion vector candidate list itself does not need to be sent from the video encoder 20 to the video decoder 30, and the index of the selected motion vector prediction value within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector prediction value within the motion vector candidate list to encode and decode the current CU.

[0164] Although ALF has been improved in ECM, its performance can still be further improved. First, the online ALF filter in ECM takes spatial neighbors, fixed ALF filter results, and spatial neighbors before deblocking filter as input. Other information (such as spatial neighbors in the prediction signal, spatial neighbors in the residual signal, or spatial neighbors before SAO) can also be used as input to the online ALF filter equation, which may benefit the codec performance.

[0165] Secondly, in ECM, the online ALF filter adaptively uses an edge-based classifier and a band-based classifier. However, these two classifiers can be further combined to provide other classifiers, which may benefit the codec performance.

[0166] Third, in ECM, the filter shape of the chroma ALF is a diamond filter shape, while the filter shape of the luma ALF is a long cross shape, and this non-uniform design may not be optimal from a standardization perspective.

[0167] Fourth, the edge-based classifier and band-based classifier in ECM only consider the pixel values ​​after SAO. However, after saving the pixel values ​​before the deblocking filter, the prediction signal, the residual signal, or before SAO as the input of the online ALF filter equation, these pixel values ​​can also be used to design new classifiers, which may benefit the encoding and decoding performance.

[0168] Fifth, the edge-based classifier and band-based classifier in ECM only consider the luma pixel values ​​after SAO. However, the chroma pixel values ​​can also be used to design new classifiers, which may benefit the encoding and decoding performance.

[0169] In order to improve the quality of reconstructed video frames, the video encoding and decoding process may include sample adaptive offset (SAO) and adaptive loop filtering (ALF) processes. These technologies are intended to reduce artifacts and enhance the visual quality of decoded video. The encoder and decoder can extract and use additional information from neighboring pixels to improve the ALF process. For example, information of the prediction signal, the residual signal, or before the sample adaptive offset (SAO) process can be used as additional ALF input. This spatial information can therefore help determine how to filter or adjust pixel values ​​during the decoding and encoding process to generate better video quality.

[0170] The method disclosed in this article includes: calculating spatial neighboring pixels in a prediction signal, a residual signal, or calculating spatial neighboring pixels before sample adaptive offset (SAO); using a classifier that combines the features of an edge-based classifier and the features of a band-based classifier as an additional classifier for an online ALF filter; changing the filter shape of a chroma ALF from a diamond to a long cross to unify the filter shape of a luminance ALF; using pixel values ​​before a deblocking filter, a prediction signal, a residual signal, or before SAO to calculate a classifier as an additional classifier for an online ALF process; and using chroma pixel values ​​to calculate a classifier as an additional classifier for an online ALF filter.

[0171] Prediction, residual, or information before SAO is used as additional ALF input

[0172] Fig.11 is a flowchart illustrating a video decoding method 1100 according to some examples of the present disclosure. The method includes: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) predicted samples, (ii) residual samples, or (iii) reconstructed samples, and wherein the reconstructed samples are sampled before SAO filtering; and obtaining, by a decoder, filtered samples based on the one or more spatial neighboring samples associated with the current sample. Various filter shapes can be used to extract information from the residual signal. For example, the filter shape can be 1×1, 3×3, or 5×5, such as Fig. 9 Various equation forms can be used to extract information from the residual signal. In one example, the interception result of the same-position pixel in the residual signal is used as the input of the ALF equation.

[0173] In step 1101, method 1100 includes: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) prediction samples, (ii) residual samples, or (iii) reconstructed samples, and wherein the reconstructed samples are sampled before SAO filtering.

[0174] In step 1102 , method 1100 includes obtaining, by a decoder, a filtered sample based on one or more spatial neighboring samples associated with a current sample.

[0175] In one example, the method 1100 further includes: obtaining, by the decoder, a truncated result based on one or more spatial neighboring samples in the residual sample associated with the current sample; and obtaining, by the decoder, a filtered sample using the truncated result based on one or more spatial neighboring samples in the residual sample associated with the current sample and one or more filter coefficients, the one or more filter coefficients being associated with different filter shapes. The truncated result may include truncated results of one or more surrounding samples, wherein the one or more surrounding samples are from one or more spatial neighboring samples in the residual sample.

[0176] In another example, the decoder uses spatially neighboring pixels in the prediction signal as additional ALF equation inputs. Various filter shapes can be used to extract information in the prediction signal (e.g., the filter shape can be 1×1, 3×3, or 5×5, such as Fig. 9 ). Various equation forms may be used to extract information from the prediction signal. For example, the intercepted differences between the surrounding pixels in the prediction signal and the current pixel may be used as input to the ALF equation. In another example, the intercepted differences between the surrounding pixels in the prediction signal and the co-located pixels in the prediction signal, and the intercepted differences between the co-located pixels in the prediction signal and the current pixel may be used as input to the ALF equation.

[0177] In another example, the decoder uses the spatial neighboring pixels before the SAO signal as additional input to the ALF equation. Various filter shapes can be used to extract information before the SAO signal (e.g., the filter shape can be 1×1, 3×3, or 5×5, such as Fig. 9 ). Various equation forms may be used to extract information before the SAO signal. For example, the intercepted difference between the surrounding pixels before the SAO signal and the current pixel may be used as an input to the ALF equation. In another example, the intercepted difference between the surrounding pixels before the SAO signal and the co-located pixels before the SAO signal, and the intercepted difference between the co-located pixels before the SAO signal and the current pixel may be used as input to the ALF equation.

[0178] In another example, the decoder is configured to use information in the prediction signal, in the residual signal, or before the SAO signal as input to the ALF equation.Any of the above methods proposed herein may be combined to generate the input.

[0179] Fig.121 is a flowchart illustrating a video encoding method 1200 according to some examples of the present disclosure. The method includes: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) prediction samples, (ii) residual samples, or (iii) reconstruction samples, and wherein the reconstruction samples are sampled before SAO filtering; and obtaining, by the encoder, filtered samples based on the one or more spatial neighboring samples associated with the current sample.

[0180] In step 1201, method 1200 includes: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) prediction samples, (ii) residual samples, or (iii) reconstructed samples, and wherein the reconstructed samples are sampled before SAO filtering.

[0181] In step 1202, method 1200 includes obtaining, by an encoder, filtered samples based on one or more spatial neighboring samples associated with a current sample.

[0182] In one example, method 1200 includes: obtaining, by an encoder, a truncated result based on one or more spatial neighboring samples in a residual sample associated with a current sample; and obtaining, by the encoder, a filtered sample using the truncated result based on one or more spatial neighboring samples in a residual sample associated with the current sample and one or more filter coefficients, the one or more filter coefficients being associated with different filter shapes. The truncated result may include truncated results of one or more surrounding samples, wherein the one or more surrounding samples are from one or more spatial neighboring samples in the residual sample.

[0183] A new classifier that combines the features of edge-based classifiers and band-based classifiers

[0184] In one example, features of the edge-based classifier and features of the band-based classifier are combined to derive a new classifier for an online ALF filter. Different approaches can be used to achieve this goal.

[0185] For example, the decoder (and / or alternatively the encoder) may first calculate the directionality D of the sub-block of the luma component, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as:

[0186] C=B*M D +D

[0187] Where B is the index calculated with reference to the band-based classifier, M DIndicates the total number of directivity D. In one example, for a 2×2 luma block, the directivity D is calculated in the same way as D in ECM. 2 is the same, and B is calculated as:

[0188] B = (total * 5) >> (sample bit depth + 2)

[0189] For example, the decoder (and / or alternatively the encoder) may first calculate the activity value A of the sub-block of the luma component, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as:

[0190] C=B*M A +A

[0191] Where B is the index calculated with reference to the band-based classifier, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. is the same, and B is calculated as:

[0192] B = (total * 5) >> (sample bit depth + 2)

[0193] For example, the decoder (and / or alternatively the encoder) may first calculate the index of the sub-block of the luma component with reference to the edge-based classifier, then calculate the sum of the sample values ​​of the sub-block and map it to the index of the band-based classifier, and the class index of the sub-block is calculated as:

[0194] C=B*M E +E

[0195] where B is the index calculated with reference to the band-based classifier, M E represents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, the index E is calculated in the same way as C in ECM. 2 is the same, and B is calculated as:

[0196] B = (total sum * 2) >> (sample bit depth + 2)

[0197] Adjust the chroma ALF filter shape to be consistent with the luma ALF filter shape

[0198] In one example, the chroma ALF filter shape can be changed from a diamond to a long cross, unified with the luma ALF filter shape. Fig.10 Examples of ALF filter shapes are shown.

[0199] New classifier using pixel values ​​before deblocking filter

[0200] Fig.13 1 is a flowchart illustrating a video decoding method 1300 according to some examples of the present disclosure. The method 1300 includes obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, and deriving, by the decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing the one or more spatial neighboring samples before a deblocking filter.

[0201] In step 1301 , method 1300 includes obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample.

[0202] At step 1302, method 1300 includes deriving, by a decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing one or more spatial neighboring samples prior to a deblocking filter.

[0203] In one example, method 1300 further includes: obtaining, by the decoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of the differences between samples after an SAO process and co-located samples before a deblocking filter of the sub-block; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0204] For example, the decoder may first calculate the directionality D of the sub-block of the luma component, and then calculate the sum of the differences between the samples after SAO and the co-located samples before the deblocking filter of the sub-block. The sum of the differences is then mapped to a difference index. The class index of the sub-block is calculated as

[0205] C=Dif*M D +D

[0206] Among them, Dif is the difference index, M D Indicates the total number of directivity D. In one example, for a 2×2 luma block, the directivity D is calculated in the same way as D in ECM. 2 is the same, and Dif is calculated as

[0207] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0208] In one example, method 1300 further includes: obtaining, by the decoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples of the sub-block before a deblocking filter; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0209] For example, the decoder may first calculate the activity value A of the sub-block of the luminance component. After calculating the activity value A, the decoder may calculate the sum of the differences between the samples after SAO and the co-located samples before the deblocking filter of the sub-block. The sum of the differences is then mapped to a difference index. The class index of the sub-block is calculated as

[0210] C=Dif*M A +A

[0211] Among them, Dif is the difference index, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. is the same, and Dif is calculated as follows:

[0212] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0213] In one example, method 1300 further includes: obtaining, by the decoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before a deblocking filter of the sub-block; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0214] For example, the decoder may first calculate the index of the sub-block of the luminance component with reference to the edge-based classifier, and then calculate the sum of the differences between the samples after SAO and the co-located samples before the deblocking filter. The sum of the differences is then mapped to a difference index. The class index of the sub-block is calculated as

[0215] C=Dif*M E +E

[0216] Where Dif is the difference index, M E represents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, the index E is calculated in the same way as C in ECM. 2 is the same, and Dif is calculated as:

[0217] Dif=sum Dif >0?2:(sm Dif <0?0:1)

[0218] In one example, method 1300 further includes: obtaining, by the decoder, a first feature based on a band index of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before a deblocking filter; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0219] For example, the decoder can first calculate the band index B of the sub-block of the luma component, and then calculate the sum of the differences between the samples after SAO and the co-located samples before the deblocking filter of the sub-block. The difference is then mapped to the difference index. The class index of the sub-block is calculated as:

[0220] C=Dif*M B +B

[0221] Among them, Dif is the difference index, M B Indicates the total number of band values. In one example, for a 2×2 luma block, the band index B is calculated as:

[0222] B = (total * 8) >> (sample bit depth + 2)

[0223] And Dif is calculated as:

[0224] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0225] In one example, the method 1300 further includes: obtaining, by the decoder, a first feature by calculating the sum of differences between samples after the SAO process and co-located samples before the deblocking filter; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a new classifier for the online ALF process based on the first feature.

[0226] For example, the decoder may calculate the sum of the differences between the samples after SAO and the co-located samples before deblocking filter of the sub-block, and then map the sum of the differences to a difference index, and use the difference index as the class index.

[0227] In one example, the method 1300 further includes deriving, by the decoder, a new classifier for the online ALF process by calculating a classifier index based on the ALF edge based on the samples before the deblocking filter. The method 1300 may further include deriving, by the decoder, a new classifier for the online ALF process by calculating a band index based on the samples before the deblocking filter.

[0228] For example, the decoder may calculate an edge-based classifier or a band-based classifier based on sample values ​​before the deblocking filter in the same manner as the original edge-based classifier or band-based classifier (which is calculated based on sample values ​​after SAO).

[0229] It should be noted that the above examples may alternatively be performed by an encoder. Fig.14 An example of the above method performed by an encoder is explained in further detail.

[0230] Fig.14 14 is a flowchart illustrating a video encoding method 1400 according to some examples of the present disclosure. The method 1400 includes obtaining, by an encoder, a reconstructed video frame including a plurality of pixels, and deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing pixel values ​​before a deblocking filter.

[0231] In step 1401, the method includes obtaining, by an encoder, a reconstructed video frame including a plurality of pixels. In step 1402, the method includes deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing pixel values ​​before a deblocking filter.

[0232] In one example, method 1400 includes: obtaining, by the encoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of the differences between samples after an SAO process and co-located samples before a deblocking filter of the sub-block; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0233] In one example, method 1400 further includes: obtaining, by the encoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before a deblocking filter of the sub-block; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0234] In one example, method 1400 further includes: obtaining, by the encoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before a deblocking filter of the sub-block; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0235] In one example, method 1400 further includes: obtaining, by the encoder, a first feature based on a band index of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before a deblocking filter; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0236] In one example, the method 1400 further includes: obtaining, by the encoder, a first feature by calculating the sum of differences between samples after the SAO process and co-located samples before the deblocking filter; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a new classifier for the online ALF process based on the first feature.

[0237] In one example, the method 1400 further includes deriving, by the encoder, a new classifier for the online ALF process by calculating a classifier index based on the ALF edge based on the samples before the deblocking filter. The method 1400 may further include deriving, by the encoder, a new classifier for the online ALF process by calculating a band index based on the samples before the deblocking filter.

[0238] New classifier using pixel values ​​in prediction signal

[0239] Fig.15 1 is a flowchart illustrating a video decoding method 1500 according to some examples of the present disclosure. The method 1500 includes: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from prediction samples; and deriving, by the decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the prediction samples.

[0240] In step 1501 , the method 1500 includes: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from a prediction sample.

[0241] At step 1502, method 1500 includes deriving, by a decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from prediction samples.

[0242] In one example, method 1500 includes: obtaining, by the decoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in predicted samples; mapping, by the decoder, the sum of the difference values ​​to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0243] For example, the decoder can first calculate the directionality D of the sub-block of the luminance component. After calculating the directionality D, the decoder can calculate the sum of the differences between the samples after SAO and the co-located samples in the prediction signal of the sub-block. This difference can then be mapped to a difference index. The class index of the sub-block is calculated as:

[0244] C=Dif*M D +D

[0245] Among them, Dif is the difference index, M D Indicates the total number of directivity D. In one example, for a 2×2 luma block, the directivity D is calculated in the same way as D in ECM. 2 is the same, and Dif is calculated as:

[0246] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0247] In one example, method 1500 includes: obtaining, by the decoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in predicted samples; mapping, by the decoder, the sum of the differences to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0248] For example, the decoder may first calculate the activity value A of the sub-block of the luminance component, and then calculate the sum of the differences between the samples after SAO and the co-located samples in the prediction signal of the sub-block. The sum of the differences may then be mapped to a difference index. The class index of the sub-block is calculated as:

[0249] C=Dif*M A +A

[0250] Among them, Dif is the difference index, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. is the same, and Dif is calculated as:

[0251] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0252] In one example, method 1500 includes: obtaining, by the decoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; calculating, by the decoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples; mapping, by the decoder, the sum of the differences to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0253] For example, the decoder may first calculate the index of the sub-block of the luminance component with reference to the edge-based classifier, and then calculate the sum of the differences between the samples after SAO and the co-located samples in the prediction signal of the sub-block. The sum of the differences is then mapped to the difference index. The class index of the sub-block is calculated as

[0254] C=Dif*M E +E

[0255] Where Dif is the difference index, M E represents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, the index E is calculated in the same way as C in ECM. 2 is the same, and Dif is calculated as:

[0256] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0257] In one example, method 1500 includes: obtaining, by the decoder, a first feature by calculating a band index of a sub-block of a luminance component; calculating, by the decoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples of the sub-block; mapping, by the decoder, the sum of the differences to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0258] For example, the decoder can calculate the band index B of the subblock of the luma component, and then calculate the sum of the differences between the samples after SAO and the co-located samples in the prediction signal of the subblock. The sum of the differences is then mapped to the difference index. The class index of the subblock is calculated as:

[0259] C=Dif*M B +B

[0260] Among them, Dif is the difference index, M B Indicates the total number of band values. In one example, for a 2×2 luma block, the band index B is calculated as:

[0261] B = (total * 8) >> (sample bit depth + 2)

[0262] And Dif is calculated as:

[0263] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0264] In one example, method 1500 includes: obtaining, by the decoder, a first feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples of a sub-block; mapping, by the decoder, the sum of the differences to a difference index; and deriving, by the decoder, a new classifier for an online ALF process based on the first feature.

[0265] For example, the decoder can calculate the sum of the differences between the samples after SAO and the co-located samples in the prediction signal of the sub-block. After calculating the sum of the differences, the decoder can map the sum of the differences to a difference index. The difference index can then be used as a class index.

[0266] In one example, method 1500 includes deriving, by the decoder, a new classifier for an online ALF process by calculating an ALF edge-based classifier index based on samples in the prediction samples. In another example, method 1500 includes deriving, by the decoder, a new classifier for an online ALF process by calculating a band index based on samples in the prediction samples.

[0267] For example, the decoder may calculate an edge-based classifier or a band-based classifier based on the sample values ​​in the prediction signal. The calculation may be the same as the edge-based classifier or the band-based classifier (calculated based on the sample values ​​after SAO).

[0268] It should be noted that the above examples may alternatively be performed by an encoder. Fig.16 An example of the above method performed by an encoder is explained in further detail.

[0269] Fig.16 1 is a flowchart illustrating a video encoding method 1600 according to some examples of the present disclosure. The method 1600 includes: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from prediction samples; and deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the prediction samples.

[0270] In step 1601 , the method 1600 includes: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from a prediction sample.

[0271] At step 1602, method 1600 includes deriving, by an encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from prediction samples.

[0272] In one example, method 1600 includes: obtaining, by the encoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples; mapping, by the encoder, the sum of the difference values ​​to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0273] In one example, method 1600 includes: obtaining, by the encoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples; mapping, by the encoder, the sum of the differences to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0274] In one example, method 1600 includes: obtaining, by the encoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; calculating, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples; mapping, by the encoder, the sum of the differences to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0275] In one example, method 1600 includes: obtaining, by the encoder, a first feature by calculating a band index of a sub-block of a luminance component; calculating, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples of the sub-block; mapping, by the encoder, the sum of the differences to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0276] In one example, method 1600 includes: obtaining, by the encoder, a first feature by calculating the sum of differences between samples after an SAO process and co-located samples in predicted samples of a sub-block; mapping, by the encoder, the sum of the differences to a difference index; and deriving, by the encoder, a new classifier for an online ALF process based on the first feature.

[0277] In one example, method 1600 includes deriving, by the encoder, a new classifier for an online ALF process by calculating an ALF edge-based classifier index based on samples in the prediction samples. In another example, method 1600 includes deriving, by the encoder, a new classifier for an online ALF process by calculating a band index based on samples in the prediction samples.

[0278] New classifier using pixel values ​​in residual signal

[0279] Fig.17 1 is a flowchart illustrating a video decoding method 1700 according to some examples of the present disclosure. The method 1700 includes: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples; and deriving, by the decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the residual samples.

[0280] In step 1701 , the method 1700 includes: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples.

[0281] At step 1702, method 1700 includes deriving, by a decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from residual samples.

[0282] In one example, method 1700 includes: obtaining, by the decoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of sample values ​​in residual samples; mapping, by the decoder, the sum of the sample values ​​to a residual index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0283] For example, the decoder can first calculate the directionality D of the sub-block of the luminance component. After calculating the directionality D, the sub-block can calculate the sum of the pixel values ​​in the residual signal of the sub-block. The sum is then mapped to the residual index. The class index of the sub-block is calculated as:

[0284] C=Resi*M D +D

[0285] Among them, Resi is the residual index, M D Indicates the total number of directivity D. In one example, for a 2×2 luma block, the directivity D is calculated in the same way as D in ECM. 2 is the same, and Resi is calculated as

[0286] Resi=sum Resi >0?2:(sumResi <0?0:1)

[0287] In one example, method 1700 includes: obtaining, by the decoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating a sum of sample values ​​in residual samples; mapping, by the decoder, the sum of the sample values ​​to a residual index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0288] For example, the decoder may first calculate the activity value A of the sub-block of the luminance component, and then calculate the sum of the pixel values ​​in the residual signal of the sub-block. The sum of the pixel values ​​may then be mapped to a residual index. The class index of the sub-block is calculated as:

[0289] C=Resi*M A +A

[0290] Among them, Resi is the residual index, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. is the same, and Resi is calculated as:

[0291] Resi=sum Resi >0?2:(sum Resi <0?0:1)

[0292] In one example, method 1700 includes: obtaining, by a decoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; calculating, by a decoder, a second feature by calculating a sum of sample values ​​in residual samples; mapping, by the decoder, the sum of the sample values ​​to a residual index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0293] For example, the decoder may first calculate the index of the sub-block of the luminance component with reference to the edge-based classifier. After calculating the index of the sub-block of the luminance component with reference to the edge-based classifier, the decoder may calculate the sum of the pixel values ​​in the residual signal of the sub-block. The sum of the pixel values ​​in the residual signal may then be mapped to the residual index. The class index of the sub-block is calculated as:

[0294] C=Resi*M E +E

[0295] Where Resi is the residual index, M E represents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, the index E is calculated in the same way as C in ECM.2 is the same, and Resi is calculated as:

[0296] Resi=sum Resi >0?2:(sum Resi <0?0:1)

[0297] In one example, method 1700 includes: obtaining, by a decoder, a first feature by calculating a band index of a sub-block of a luminance component; calculating, by a decoder, a second feature by calculating a sum of sample values ​​in residual samples; mapping, by a decoder, the sum of the sample values ​​to a residual index; and deriving, by a decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0298] For example, the decoder can first calculate the band index B of the sub-block of the luminance component. After calculating B of the sub-block of the luminance component, the decoder can sum the pixel values ​​in the residual signal of the sub-block. The sum of the pixel values ​​in the residual signal is then mapped to the residual index. The class index of the sub-block is calculated as:

[0299] C=Resi*M B +B

[0300] Among them, Resi is the residual index, M B Indicates the total number of band values. In one example, for a 2×2 luma block, the band index B is calculated as:

[0301] B = (total * 8) >> (sample bit depth + 2)

[0302] And Resi is calculated as:

[0303] Resi=sum Resi >0?2:(sum Resi <0?0:1)

[0304] In one example, method 1700 includes using the residual index as a class index. For example, the decoder can calculate the sum of the pixel values ​​in the residual signal of the sub-block and then map the sum of the residual values ​​to the residual index. The residual index can then be used as a class index.

[0305] It should be noted that the above examples may alternatively be performed by an encoder. Fig.18 An example of the above method performed by an encoder is explained in further detail.

[0306] Fig.181 is a flowchart illustrating a video encoding method 1800 according to some examples of the present disclosure. The method 1800 includes: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples; and deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the residual samples.

[0307] In step 1801, method 1800 includes: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples. In step 1802, method 1800 includes deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the residual samples.

[0308] In one example, method 1800 includes: obtaining, by the encoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of sample values ​​in residual samples; mapping, by the encoder, the sum of the sample values ​​to a residual index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0309] In one example, method 1800 includes: obtaining, by the encoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating a sum of sample values ​​in residual samples; mapping, by the encoder, the sum of the sample values ​​to a residual index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0310] In one example, method 1800 includes: obtaining, by an encoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; calculating, by the encoder, a second feature by calculating a sum of sample values ​​in residual samples; mapping, by the encoder, the sum of the sample values ​​to a residual index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0311] In one example, method 1800 includes: obtaining, by the encoder, a first feature by calculating a band index of a sub-block of a luminance component; calculating, by the encoder, a second feature by calculating a sum of sample values ​​in residual samples; mapping, by the encoder, the sum of the sample values ​​to a residual index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0312] In one example, method 1800 includes, where the residual index is used as a class index.

[0313] New classifier using pixel values ​​before SAO

[0314] Fig.19 1 is a flowchart illustrating a video decoding method 1900 according to some examples of the present disclosure. The method 1900 includes obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, and deriving, by the decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing the one or more spatial neighboring samples before an SAO process.

[0315] In step 1901 , method 1900 includes obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample.

[0316] At step 1902, method 1900 includes deriving, by a decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing one or more spatially neighboring samples prior to a SAO process.

[0317] In one example, method 1900 further includes: obtaining, by the decoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of the differences between samples after the SAO process and co-located samples before the SAO process of the sub-block; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0318] For example, the decoder can first calculate the directionality D of the sub-block of the luminance component. After calculating the directionality D, the decoder can determine the sum of the differences between the samples after SAO and the co-located samples before SAO of the sub-block. The difference is then mapped to a difference index. The class index of the sub-block is calculated as:

[0319] =Dif*M D +D

[0320] Among them, Dif is the difference index, M D Indicates the total number of directivity D. In one example, for a 2×2 luma block, the directivity D is calculated in the same way as D in ECM. 2 is the same, and Dif is calculated as:

[0321] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0322] In one example, method 1900 further includes: obtaining, by the decoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of difference values ​​between samples after an SAO process and co-located samples before an SAO process of the sub-block; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0323] For example, the decoder can first calculate the activity value A of the sub-block of the luminance component. After calculating the activity value A, the decoder can determine the sum of the differences between the samples after SAO and the co-located samples before SAO of the sub-block. The difference is then mapped to a difference index. The class index of the sub-block is calculated as:

[0324] C=Dif*M A +A

[0325] Among them, Dif is the difference index, M A Indicates the total number of activity values ​​A. In one example, for a 2×2 luminance block, the activity value A is calculated in the same way as in ECM. is the same, and Dif is calculated as:

[0326] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0327] In one example, method 1900 further includes: obtaining, by the decoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before an SAO process of the sub-block; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0328] For example, the decoder may first calculate the index of the sub-block of the luminance component with reference to the edge-based classifier. After calculating the index of the sub-block of the luminance component with reference to the edge-based classifier, the decoder may calculate the sum of the differences between the samples after SAO and the co-located samples before SAO of the sub-block. The difference is then mapped to the difference index. The class index of the sub-block is calculated as:

[0329] C=Dif*M E +E

[0330] Where Dif is the difference index, M Erepresents the total number of indices calculated with reference to the edge-based classifier, and E is the index calculated with reference to the edge-based classifier. In one example, for a 2×2 luma block, the index E is calculated in the same way as C in ECM. 2 is the same, and Dif is calculated as:

[0331] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0332] In one example, method 1900 further includes: obtaining, by the decoder, a first feature based on a band index of a sub-block of a luminance component; obtaining, by the decoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before the SAO process; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0333] For example, the decoder can first calculate the band index B of the sub-block of the luma component, and then calculate the sum of the differences between the samples after SAO and the co-located samples before SAO of the sub-block. The difference is then mapped to the difference index. The class index of the sub-block is calculated as:

[0334] C=Dif*M B +B

[0335] Among them, Dif is the difference index, M B In one example, for a 2×2 luma block, the band index B is calculated as

[0336] B = (total * 8) >> (sample bit depth + 2)

[0337] And Dif is calculated as:

[0338] Dif=sum Dif >0?2:(sum Dif <0?0:1)

[0339] In one example, method 1900 further includes: obtaining, by the decoder, a first feature by calculating the sum of differences between samples after the SAO process and co-located samples before the SAO process; mapping, by the decoder, the sum to a difference index; and deriving, by the decoder, a new classifier for the online ALF process based on the first feature.

[0340] For example, the decoder may calculate the sum of the differences between the samples after SAO and the co-located samples before SAO of the sub-block. The sum of the differences may then be mapped to a difference index, which is used as a class index.

[0341] In one example, the method 1900 further includes deriving, by the decoder, a new classifier for the online ALF process by calculating a classifier index based on the ALF edge based on the samples before the SAO process. In another example, the method 1900 further includes deriving, by the decoder, a new classifier for the online ALF process by calculating a band index based on the samples before the SAO process.

[0342] For example, the decoder may calculate an edge-based classifier or a band-based classifier based on the sample values ​​before SAO in the same manner as the original edge-based classifier or a band-based classifier using the sample values ​​after SAO.

[0343] It should be noted that the above examples may alternatively be performed by an encoder. Fig. 20 An example of the above method performed by an encoder is explained in further detail.

[0344] Fig. 20 2 is a flowchart illustrating a video encoding method 2000 according to some examples of the present disclosure. The method 2000 includes obtaining, by an encoder, a reconstructed video frame including a plurality of pixels, and deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing one or more spatial neighboring samples prior to an SAO process.

[0345] In step 2001, method 2000 includes obtaining, by an encoder, a reconstructed video frame including a plurality of pixels. In step 2002, method 2000 includes deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing one or more spatial neighboring samples prior to a SAO process.

[0346] In one example, method 2000 further includes: obtaining, by the encoder, a first feature by calculating the directionality of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples of the sub-block before the SAO process; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0347] In one example, method 2000 further includes: obtaining, by the encoder, a first feature by calculating an activity value of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of difference values ​​between samples after an SAO process and co-located samples before an SAO process of the sub-block; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0348] In one example, method 2000 further includes: obtaining, by the encoder, a first feature by calculating an ALF edge-based classifier index for a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before a sample adaptive offset (SAO) process for the sub-block; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0349] In one example, method 2000 further includes: obtaining, by the encoder, a first feature based on a band index of a sub-block of a luminance component; obtaining, by the encoder, a second feature by calculating the sum of differences between samples after an SAO process and co-located samples before the SAO process; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature and the second feature.

[0350] In one example, the method 2000 further includes: obtaining, by the encoder, a first feature by calculating the sum of differences between samples after the SAO process and co-located samples before the SAO process; mapping, by the encoder, the sum to a difference index; and deriving, by the encoder, a new classifier for the online ALF process based on the first feature.

[0351] In one example, the method 2000 further includes deriving, by the encoder, a new classifier for the online ALF process by calculating a classifier index based on the ALF edge based on the samples before the SAO process. In another example, the method 2000 further includes deriving, by the encoder, a new classifier for the online ALF process by calculating a band index based on the samples before the SAO process.

[0352] New classifier using chrominance pixel values

[0353] Fig.21 2 is a flowchart illustrating a video decoding method 2100 according to some examples of the present disclosure. The method 2100 includes: obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples; and deriving, by the decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the chroma samples.

[0354] In step 2101, the method 2100 includes: obtaining, by the decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples. In step 2102, the method 2100 includes deriving, by the decoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the chroma samples.

[0355] In one example, method 2100 includes: obtaining, by a decoder, a first feature based on a band index of a sub-block of a luminance component; obtaining, by a decoder, a second feature based on a band index of a sub-block of a Cb chrominance component; obtaining, by a decoder, a third feature based on a band index of a sub-block of a Cr chrominance component; and deriving, by the decoder, a combined classifier for an online ALF process based on the first feature, the second feature, and the third feature.

[0356] The decoder can first calculate the band index B of the sub-block of the luminance component Y . In calculating the band index B of the sub-block of the luminance component Y After that, the decoder can calculate the corresponding U and V components with index B U and B V The class index of the sub-block is calculated as

[0357] C=B Y *M U *M V +B U *M V +B V

[0358] Among them, B Y , B U and B V are the Y, U, and V indices calculated with reference to the band-based classifier, M U and M V Indicates the total number of U and V band index values. In one example, for a 2×2 luma block, B Y , B U and B V is calculated as

[0359] B Y =(sumY*6)>>(sample bit depth+2)

[0360] B U =(sumU*2)>>(sample bit depth+2)

[0361] B V =(sumV*2)>>(sample bit depth+2)

[0362] It should be noted that the above examples may alternatively be performed by an encoder. Fig. 22 An example of the above method performed by an encoder is explained in further detail.

[0363] Fig. 222 is a flowchart illustrating a video encoding method 2200 according to some examples of the present disclosure. The method 2200 includes: obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples; and deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the chroma samples.

[0364] In step 2201, the method 2200 includes: obtaining, by the encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples. In step 2202, the method 2200 includes deriving, by the encoder, an ALF classifier for an online ALF process, the ALF classifier utilizing sample values ​​from the chroma samples.

[0365] In one example, method 2200 includes: obtaining, by the encoder, a first feature based on a band index of a sub-block of a luminance component; obtaining, by the encoder, a second feature based on a band index of a sub-block of a Cb chrominance component; obtaining, by the encoder, a third feature based on a band index of a sub-block of a Cr chrominance component; and deriving, by the encoder, a combined classifier for an online ALF process based on the first feature, the second feature, and the third feature.

[0366] Fig.23 A computing environment 2310 coupled to a user interface 2350 is shown. The computing environment 2310 may be part of a data processing server. The computing environment 2310 includes a processor 2320, a memory 2330, and an input / output (I / O) interface 2340.

[0367] The processor 2320 generally controls the overall operation of the computing environment 2310, such as operations associated with display, data acquisition, data communication, and image processing. The processor 2320 may include one or more processors for executing instructions to perform all or some steps in the above method. In addition, the processor 2320 may include one or more modules that facilitate interaction between the processor 2320 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a graphics processing unit (GPU), etc.

[0368] The memory 2330 is configured to store various types of data to support the operation of the computing environment 2310. The memory 2330 may include predetermined software 2332. Examples of the above data include instructions for any application or method operating on the computing environment 2310, video data sets, image data, etc. The memory 2330 may be implemented by using any type of volatile or non-volatile memory device 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 disk, or an optical disk.

[0369] In one example, the memory 2330 is configured to store instructions that can be executed by the processor. When the processor executes the instructions, it is configured to execute Figure 11-23 Any of the methods described in .

[0370] I / O interface 2340 provides an interface between processor 2320 and peripheral interface modules (e.g., keyboard, click wheel, buttons, etc.). Buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. I / O interface 2340 may be coupled to an encoder and a decoder.

[0371] In an embodiment, a non-transitory computer-readable storage medium including, for example, a plurality of programs in a memory 2330 and / or storing a bitstream generated by the above encoding method or a bitstream to be decoded by the above decoding method is also provided, and the plurality of programs can be executed by a processor 2320 in a computing environment 2310 to perform the above method. In one example, the plurality of programs can be executed by a processor 2320 in a computing environment 2310 to (for example, from Figure 2 The video encoder 20 in the computing environment 2310 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.), and can also be executed by the processor 2320 in the computing environment 2310 to perform the above-mentioned decoding method according to the received bitstream or data stream. In another example, multiple programs can be executed by the processor 2320 in the computing environment 2310 to perform the above-mentioned encoding method to encode the video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 2320 in the computing environment 2310 to (e.g., to Figure 3 The video decoder 30 in sends the bit stream or data stream.

[0372] In an embodiment, a bit stream generated by the above encoding method or a bit stream to be decoded by the above decoding method is provided. In an embodiment, a bit stream including encoded video information generated by the above encoding method or encoded video information to be decoded by the above decoding method is provided.

[0373] Alternatively, a non-transitory computer-readable storage medium may store a Figure 2 The video encoder 20 in FIG. 1 generates a video signal for a decoder (eg, Figure 3 A bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or associated one or more syntax elements, etc.) used by the video decoder 30 in the video decoder 30 when decoding video data. The non-transitory computer-readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0374] In an embodiment, a computing device is also provided, which includes: one or more processors (e.g., processor 2320); and a non-transitory computer-readable storage medium or memory 2330 in which multiple programs that can be executed by the one or more processors are stored, wherein the one or more processors are configured to perform the above-mentioned method when executing the multiple programs.

[0375] In an embodiment, a computer program product having instructions for storing or transmitting a bitstream is also provided, the bitstream including the encoded video information generated by the above encoding method or the encoded video information to be decoded by the above decoding method. In an embodiment, a computer program product including, for example, a plurality of programs in a memory 2330 is also provided, and the plurality of programs can be executed by a processor 2320 in a computing environment 2310 for performing the above method. For example, the computer program product may include a non-transitory computer-readable storage medium.

[0376] In an embodiment, the computing environment 2310 may be implemented by one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components for performing the above methods.

[0377] In an embodiment, a method for storing a bitstream is also provided, comprising: storing the bitstream on a digital storage medium, wherein the bitstream comprises encoded video information generated by the above encoding method or encoded video information to be decoded by the above decoding method.

[0378] In an embodiment, a method for transmitting a bit stream generated by the encoder is also provided. In an embodiment, a method for receiving a bit stream to be decoded by the decoder is also provided.

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

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

[0381] The examples are chosen and described in order to explain the principles of the present disclosure and to enable other persons skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications suitable for the specific use contemplated. Therefore, it should be understood that the scope of the present disclosure is not limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the present disclosure.

[0382] The above method can be implemented using an apparatus including one or more circuits, including an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components. The apparatus can use the circuit in combination with other hardware or software components to perform the above method. Each module, submodule, unit or subunit disclosed above can be implemented at least in part using the one or more circuits.

[0383] By considering the specification and practice disclosed herein, other embodiments of the present disclosure will be apparent to those skilled in the art. The application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes the difference between the present disclosure and known or customary practice in the art. The specification and embodiments should be considered as examples only. The specification and embodiments are considered to be exemplary. The application is intended to cover any variation, use or adaptation of the present disclosure.

[0384] It should be understood that the present disclosure is not limited to the specific embodiments described above and the corresponding drawings, and various modifications and changes may be made without departing from the scope thereof.

Claims

1. A video decoding method, comprising: Obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) a prediction sample, (ii) a residual sample, or (iii) a reconstructed sample, and wherein the reconstructed sample is a sample before sample adaptive offset (SAO) filtering; and A filtered sample is obtained by the decoder based on the one or more spatial neighboring samples associated with the current sample.

2. The video decoding method according to claim 1, further comprising: Obtaining, by the decoder, a truncated result based on one or more spatially adjacent samples in the residual sample associated with the current sample; as well as The filtered samples are obtained by the decoder using truncated results based on one or more spatial neighboring samples in the residual samples associated with the current sample and one or more filter coefficients, the one or more filter coefficients being associated with different filter shapes.

3. The video decoding method according to claim 2, wherein: The clipped result includes clipped results of one or more surrounding sample points, wherein the one or more surrounding sample points are from one or more spatially adjacent sample points in the residual sample points.

4. A video encoding method, comprising: Obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from at least one of the following: (i) a prediction sample, (ii) a residual sample, or (iii) a reconstructed sample, and wherein the reconstructed sample is a sample before sample adaptive offset (SAO) filtering; and A filtered sample is obtained by the encoder based on one or more spatial neighboring samples associated with the current sample.

5. The video encoding method according to claim 4, further comprising: Obtaining, by the encoder, a truncated result based on one or more spatially adjacent samples in the residual sample associated with the current sample; as well as The filtered samples are obtained by the encoder using truncated results based on one or more spatial neighboring samples in the residual samples associated with the current sample and one or more filter coefficients, the one or more filter coefficients being associated with different filter shapes.

6. The video encoding method according to claim 5, wherein: The clipped result includes clipped results of one or more surrounding sample points, wherein the one or more surrounding sample points are from one or more spatially adjacent sample points in the residual sample points.

7. A video decoding method, comprising: Obtaining, by the decoder, one or more spatially adjacent sample points associated with the current sample point; as well as An ALF classifier is derived by the decoder for an online adaptive loop filter (ALF) process, the ALF classifier utilizing one or more spatial neighboring samples prior to a deblocking filter.

8. The video decoding method according to claim 7, further comprising: The decoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The second feature is obtained by the decoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter of the sub-block; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

9. The video decoding method according to claim 7, further comprising: The decoder obtains the first feature by calculating the activity value of the sub-block of the luminance component; The second feature is obtained by the decoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter of the sub-block; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

10. The video decoding method according to claim 7, further comprising: Obtaining, by the decoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; The second feature is obtained by the decoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter of the sub-block; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

11. The video decoding method according to claim 7, further comprising: Obtaining, by the decoder, a first feature based on a band index of a sub-block of a luma component; The second feature is obtained by the decoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

12. The video decoding method according to any one of claims 8 to 11, wherein: The difference index is used as the class index.

13. The video decoding method according to claim 7, further comprising: A new classifier for the online ALF process is derived by the decoder by computing an ALF edge-based classifier index based on the samples before deblocking filtering.

14. The video decoding method according to claim 7, further comprising: A new classifier for the online ALF process is derived by the decoder by computing a band index based on the samples before deblocking filtering.

15. A video encoding method, comprising: Obtaining, by an encoder, a reconstructed video frame comprising a plurality of pixels; as well as An ALF classifier is derived by the encoder for an online adaptive loop filter (ALF) process, the ALF classifier utilizing pixel values ​​prior to deblocking filtering.

16. The video encoding method according to claim 15, further comprising: The encoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The second feature is obtained by the encoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter of the sub-block; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

17. The video encoding method according to claim 15, further comprising: The first feature is obtained by the encoder by calculating the activity value of the sub-block of the luminance component; The second feature is obtained by the encoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter of the sub-block; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

18. The video encoding method according to claim 15, further comprising: Obtaining, by the encoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; The second feature is obtained by the encoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter of the sub-block; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

19. The video encoding method of claim 15, further comprising: Obtaining, by the encoder, a first feature based on a band index of a sub-block of a luma component; The second feature is obtained by the encoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before a deblocking filter; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

20. The video encoding method according to any one of claims 16 to 19, wherein: The difference index is used as the class index.

21. The video encoding method of claim 15, further comprising: A new classifier for the online ALF process is derived by the encoder by computing an ALF edge-based classifier index based on samples before the deblocking filter.

22. The video encoding method of claim 15, further comprising: A new classifier for the online ALF process is derived by the encoder by computing band indices based on samples before deblocking filtering.

23. A video decoding method, comprising: Obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from a prediction sample; and An adaptive loop filter (ALF) classifier is derived by the decoder for an online ALF process, the ALF classifier utilizing sample values ​​from the prediction samples.

24. The video decoding method according to claim 23, further comprising: The decoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The decoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples; mapping, by the decoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

25. The video decoding method of claim 23, further comprising: The decoder obtains the first feature by calculating the activity value of the sub-block of the luminance component; The decoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples; mapping, by the decoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

26. The video decoding method of claim 23, further comprising: Obtaining, by the decoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; The decoder calculates the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples; mapping, by the decoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

27. The video decoding method of claim 23, further comprising: The decoder obtains the first feature by calculating a band index of a sub-block of a luminance component; The decoder calculates the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples of the sub-block; mapping, by the decoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

28. The video decoding method according to any one of claims 24 to 27, wherein: The difference index is used as the class index.

29. The video decoding method of claim 23, further comprising: A new classifier for the online ALF process is derived by the decoder by computing an ALF edge-based classifier index based on the samples in the prediction samples.

30. The video decoding method of claim 23, further comprising: A new classifier for the online ALF process is derived by the decoder by computing a band index based on the samples in the prediction samples.

31. A video encoding method, comprising: Obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from a prediction sample; and An adaptive loop filter (ALF) classifier is derived by the encoder for an online ALF process, the ALF classifier utilizing sample values ​​from the prediction samples.

32. The video encoding method of claim 31 , further comprising: The encoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The encoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples; mapping, by the encoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

33. The video encoding method of claim 31 , further comprising: The encoder obtains the first feature by calculating the activity value of the sub-block of the luminance component; The encoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples; mapping, by the encoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

34. The video encoding method of claim 31, further comprising: Obtaining, by the encoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; The encoder calculates the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples; mapping, by the encoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

35. The video encoding method of claim 31, further comprising: The encoder obtains the first feature by calculating a band index of a sub-block of a luminance component; The encoder calculates the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples in the predicted samples of the sub-block; mapping, by the encoder, the sum of the difference values ​​to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

36. The video encoding method according to any one of claims 32 to 35, wherein: The difference index is used as the class index.

37. The video encoding method of claim 31, further comprising: A new classifier for the online ALF process is derived by the encoder by computing an ALF edge-based classifier index based on the samples in the prediction samples.

38. The video encoding method of claim 31, further comprising: A new classifier for the online ALF process is derived by the encoder by computing a band index based on the samples in the prediction samples.

39. A video decoding method, comprising: Obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples; and An adaptive loop filter (ALF) classifier is derived by the decoder for an online ALF process, the ALF classifier utilizing sample values ​​from the residual samples.

40. The video decoding method of claim 39, further comprising: The decoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The decoder obtains the second feature by calculating the sum of the sample values ​​in the residual sample points; Mapping, by the decoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

41. The video decoding method of claim 39, further comprising: The decoder obtains the first feature by calculating the activity value of the sub-block of the luminance component; The decoder obtains the second feature by calculating the sum of the sample values ​​in the residual sample points; Mapping, by the decoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

42. The video decoding method of claim 39, further comprising: Obtaining, by the decoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; Calculating, by the decoder, a second feature by calculating a sum of sample values ​​in the residual samples; Mapping, by the decoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

43. The video decoding method of claim 39, further comprising: The decoder obtains the first feature by calculating a band index of a sub-block of a luminance component; Calculating, by the decoder, a second feature by calculating a sum of sample values ​​in the residual samples; Mapping, by the decoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

44. The video decoding method according to any one of claims 40 to 43, wherein: The residual index is used as the class index.

45. A video encoding method, comprising: Obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from residual samples; and An adaptive loop filter (ALF) classifier is derived by the encoder for an online ALF process, the ALF classifier utilizing sample values ​​from the residual samples.

46. ​​The video encoding method of claim 45, further comprising: The encoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The encoder obtains a second feature by calculating the sum of sample values ​​in the residual sample points; Mapping, by the encoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

47. The video encoding method of claim 45, further comprising: The encoder obtains the first feature by calculating the activity value of the sub-block of the luminance component; The encoder obtains a second feature by calculating the sum of sample values ​​in the residual sample points; Mapping, by the encoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

48. The video encoding method of claim 45, further comprising: Obtaining, by the encoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; The encoder calculates a second feature by calculating a sum of sample values ​​in the residual samples; Mapping, by the encoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

49. The video encoding method of claim 45, further comprising: The encoder obtains the first feature by calculating a band index of a sub-block of a luminance component; The encoder calculates a second feature by calculating a sum of sample values ​​in the residual samples; Mapping, by the encoder, the sum of the sample values ​​to a residual index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

50. The video encoding method according to any one of claims 46 to 49, wherein: The residual index is used as the class index.

51. A video decoding method, comprising: Obtaining, by the decoder, one or more spatially adjacent sample points associated with the current sample point; as well as An ALF classifier for an online adaptive loop filter (ALF) process is derived by the decoder, the ALF classifier utilizing one or more spatially neighboring samples prior to a sample adaptive offset (SAO) process.

52. The video decoding method of claim 51, further comprising: The decoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The second feature is obtained by the decoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples of the sub-block before the sample adaptive offset (SAO) process; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

53. The video decoding method of claim 51, further comprising: The decoder obtains the first feature by calculating the activity value of the sub-block of the luminance component; The second feature is obtained by the decoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples of the sub-block before the sample adaptive offset (SAO) process; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

54. The video decoding method of claim 51, further comprising: Obtaining, by the decoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; The second feature is obtained by the decoder by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples of the sub-block before the sample adaptive offset (SAO) process; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

55. The video decoding method of claim 51, further comprising: Obtaining, by the decoder, a first feature based on a band index of a sub-block of a luma component; The decoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before the sample adaptive offset (SAO) process; mapping, by the decoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature and the second feature.

56. The video decoding method according to any one of claims 52 to 55, wherein: The difference index is used as the class index.

57. The video decoding method of claim 51, further comprising: A new classifier for the online ALF process is derived by the decoder by computing an ALF edge-based classifier index based on the samples before a Sample Adaptive Offset (SAO) process.

58. The video decoding method of claim 51, further comprising: A new classifier for the online ALF process is derived by the decoder by computing a band index based on the samples before a Sample Adaptive Offset (SAO) process.

59. A video encoding method, comprising: Obtaining, by an encoder, a reconstructed video frame comprising a plurality of pixels; as well as An ALF classifier for an online adaptive loop filter (ALF) process is derived by the encoder, the ALF classifier utilizing pixel values ​​prior to a sample adaptive offset (SAO) process.

60. The video encoding method of claim 59, further comprising: The encoder obtains the first feature by calculating the directionality of the sub-block of the luminance component; The encoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples of the sub-block before the sample adaptive offset (SAO) process; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

61. The video encoding method of claim 59, further comprising: The first feature is obtained by the encoder by calculating the activity value of the sub-block of the luminance component; The encoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples of the sub-block before the sample adaptive offset (SAO) process; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

62. The video encoding method of claim 59, further comprising: Obtaining, by the encoder, a first feature by calculating an ALF edge-based classifier index of a sub-block of a luminance component; The encoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples of the sub-block before the sample adaptive offset (SAO) process; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

63. The video encoding method of claim 59, further comprising: Obtaining, by the encoder, a first feature based on a band index of a sub-block of a luma component; The encoder obtains the second feature by calculating the sum of differences between samples after a sample adaptive offset (SAO) process and co-located samples before the sample adaptive offset (SAO) process; mapping, by the encoder, the sum to a difference index; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature and the second feature.

64. The video encoding method according to any one of claims 60 to 63, wherein: The difference index is used as the class index.

65. The video encoding method of claim 59, further comprising: A new classifier for the online ALF process is derived by the encoder by computing an ALF edge-based classifier index based on the samples before a Sample Adaptive Offset (SAO) process.

66. The video encoding method of claim 59, further comprising: A new classifier for the online ALF process is derived by the encoder by computing a band index based on the samples before a Sample Adaptive Offset (SAO) process.

67. A video decoding method, comprising: Obtaining, by a decoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples; and An adaptive loop filter (ALF) classifier is derived by the decoder for an online ALF process, the ALF classifier utilizing sample values ​​from the chroma samples.

68. The video decoding method of claim 67, further comprising: Obtaining, by the decoder, a first feature based on a band index of a sub-block of a luma component; Obtaining, by the decoder, a second feature based on a band index of a sub-block of a Cb chrominance component; Obtaining, by the decoder, a third feature based on a band index of a sub-block of a Cr chrominance component; as well as A combined classifier for the online ALF process is derived by the decoder based on the first feature, the second feature and the third feature.

69. A video encoding method, comprising: Obtaining, by an encoder, one or more spatial neighboring samples associated with a current sample, wherein the one or more spatial neighboring samples are from chroma samples; and An adaptive loop filter (ALF) classifier is derived by the encoder for an online ALF process, the ALF classifier utilizing sample values ​​from the chroma samples.

70. The video encoding method of claim 69, further comprising: Obtaining, by the encoder, a first feature based on a band index of a sub-block of a luma component; Obtaining, by the encoder, a second feature based on a band index of a sub-block of a Cb chrominance component; Obtaining, by the encoder, a third feature based on a band index of a sub-block of a Cr chrominance component; as well as A combined classifier for the online ALF process is derived by the encoder based on the first feature, the second feature and the third feature.

71. An apparatus for video decoding, comprising: one or more processors; as well as A memory coupled to the one or more processors, the memory being configured to store instructions executable by the one or more processors, wherein the one or more processors, when executing the instructions, are configured to perform the method as described in any one of claims 1-3, 7-14, 23-30, 39-44, 51-58 and 67-68.

72. An apparatus for video encoding, comprising: one or more processors; as well as A memory coupled to the one or more processors, the memory being configured to store instructions executable by the one or more processors, wherein the one or more processors, when executing the instructions, are configured to perform the method as described in any one of claims 4-6, 15-22, 31-38, 45-50, 59-66 and 69-70.

73. A non-transitory computer-readable storage medium storing computer-executable instructions which, when executed by one or more computer processors, cause the one or more computer processors to perform the method of any one of claims 1-3, 7-14, 23-30, 39-44, 51-58, and 67-68.

74. A non-transitory computer-readable storage medium storing computer-executable instructions which, when executed by one or more computer processors, cause the one or more computer processors to perform the method of any one of claims 4-6, 15-22, 31-38, 45-50, 59-66, and 69-70.