Method and device for filtering video

Adaptive filter configurations in video encoding and decoding technologies, like CCSO and LSO filters, address inefficiencies in intra-prediction and motion compensation, enhancing compression efficiency and bit usage in video encoding.

JP2025170000APending Publication Date: 2025-11-14TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025140955
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-07-06
Filing Date
2025-08-27
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies face inefficiencies in reducing redundancy and achieving optimal compression ratios due to the varying likelihood of intra-prediction directions and motion vectors, leading to suboptimal bit usage and compression performance.

Method used

Implementing nonlinear mapping-based filters with switchable filter shape configurations, such as cross-component sample offset (CCSO) and local sample offset (LSO) filters, to adaptively adjust filter geometries and distances for improved intra-prediction and motion compensation, allowing for more efficient encoding and decoding processes.

Benefits of technology

Enhances video compression efficiency by reducing bit usage and improving compression ratios through adaptive filter configurations, optimizing intra-prediction and motion vector prediction techniques.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025170000000001_ABST
    Figure 2025170000000001_ABST
Patent Text Reader

Abstract

To provide a method and a device for video encoding / decoding according to an aspect of the present disclosure.SOLUTION: As some examples, a device for decoding a video, contains a processing circuit. The processing circuit reconstructs a first sample in the video transported in a coding video bit stream on the basis of a filter of a non-liner mapping base having a first filter formation construction. Sequentially, the processing circuit determines a switch to a second filter formation construction from the first filter formation construction, and reconstructs a second sample in the video on the basis of the filter of the non-liner mapping base having the second filter formation construction.SELECTED DRAWING: Figure 38
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Incorporation by Reference This application claims the benefit of priority to U.S. Patent Application No. 17 / 368,734, entitled "Method and Apparatus for Video Filtering," filed July 6, 2021, which in turn claims the benefit of priority to U.S. Provisional Application No. 63 / 122,780, entitled "Improved Filter Shapes for Sample Offset," filed December 8, 2020. The entire disclosure of the prior application is incorporated herein by reference in its entirety.

[0002] Technical Field This disclosure describes embodiments generally related to video coding. [Background technology]

[0003] The background discussion provided herein is intended to generally present the context for the present disclosure. The work of the inventors named in this application, to the extent that their work is described in this background section, and aspects of this description that may not otherwise qualify as prior art at the time of filing, are not admitted, expressly or implicitly, as prior art to the present disclosure.

[0004] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video can contain a series of pictures, each with spatial dimensions of, for example, 1920 x 1080 luminance samples and associated chrominance samples. The series of pictures can have a fixed or variable picture rate (informally known as frame rate), for example, 60 pictures per second or 60 Hz. Uncompressed video has specific bitrate requirements. For example, 1080p60 4:2:0 video (1920 x 1080 luminance sample resolution at a 60 Hz frame rate) with 8 bits per sample requires a bandwidth approaching 1.5 Gbit / s. One hour of such video requires more than 600 Gbytes of storage space.

[0005] One goal of video encoding and decoding can be reducing redundancy in an input video signal through compression. Compression can help reduce the aforementioned bandwidth and / or storage space requirements, sometimes by more than two orders of magnitude. Both lossless and lossy compression, as well as combinations thereof, can be used. Lossless compression refers to a technique that allows an exact copy of an original signal to be reconstructed from a compressed version of the original signal. When lossy compression is used, the reconstructed signal may not be identical to the original signal, but the distortion between the original and reconstructed signal is small enough to make the reconstructed signal useful for its intended application. For video, lossy compression is widely used. The amount of acceptable distortion depends on the application; for example, users of certain consumer streaming applications may tolerate higher distortion than users of television distribution applications. The achievable compression ratio can reflect that higher tolerable / acceptable distortion can result in a higher compression ratio.

[0006] Video encoders and decoders may utilize techniques from several broad categories, including motion compensation, transform, quantization, and entropy coding.

[0007] Video codec technologies can include a technique known as intra-coding. In intra-coding, sample values ​​are represented without reference to samples or other data from a previously reconstructed reference picture. In some video codecs, a picture is spatially divided into blocks of samples. If all blocks of samples are coded in intra mode, the picture may be an intra-picture. Intra-pictures and their derivatives, such as independent decoder refresh pictures, can be used to reset the decoder state and thus can be used as the first picture in a coded video bitstream and video session, or as a still image. Samples in intra-blocks can be subjected to a transform, and the transform coefficients can be quantized before entropy coding. Intra-prediction can be a technique that minimizes sample values ​​in the pre-transform domain. In some cases, the smaller the DC value and AC coefficients after the transform, the fewer bits required for a given quantization step size to represent the block after entropy coding.

[0008] Traditional intra-coding, e.g., as known from MPEG-2 generation coding techniques, does not use intra-prediction. However, some newer video compression techniques include techniques that attempt to predict intra-prediction from surrounding sample data and / or metadata obtained during the encoding / decoding of blocks of data that are spatially neighboring and preceding in decoding order. Such techniques are hereinafter referred to as "intra-prediction" techniques. Note that, at least in some cases, intra-prediction uses only reference data from the current picture being reconstructed, and not from reference pictures.

[0009] There can be various forms of intra prediction. If two or more such techniques are available for a given video coding technique, the technique used can be coded as an intra prediction mode. In some cases, a mode can have sub-modes and / or parameters, which can be coded separately or included in a mode codeword. Which codeword to use for a given mode / sub-mode / parameter combination can affect the coding efficiency gain through intra prediction, as well as the entropy coding technique used to convert the codeword into a bitstream.

[0010] A mode of intra prediction was introduced in H.264, refined in H.265, and further refined in newer coding techniques such as the Joint Exploration Model (JEM), Versatile Video Coding (VVC), and Benchmark Set (BMS). A predictor block can be formed using neighboring sample values ​​belonging to already available samples. The sample values ​​of the neighboring samples are copied into the predictor block according to a certain direction. A reference to the direction used can be coded in the bitstream or may itself be predicted.

[0011] Referring to FIG. 1A, a subset of nine known predictor directions from the 33 possible predictor directions (corresponding to the 33 angular modes of the 35 intra modes) of H.265 is depicted in the lower right. The point where the arrows converge (101) represents the predicted sample. The arrows represent the direction in which the sample is predicted. For example, arrow (102) indicates that sample (101) is predicted from the sample(s) to the upper right and at an angle of 45 degrees from horizontal. Similarly, arrow (103) indicates that sample (101) is predicted from the sample(s) to the lower left of sample (101), at an angle of 22.5 degrees from horizontal.

[0012] Continuing with FIG. 1A , a square block (104) of 4×4 samples is depicted in the upper left (indicated by a thick dashed line). The square block (104) contains 16 samples, each labeled with “S” and its position in the Y dimension (e.g., row index) and its position in the X dimension (e.g., column index). For example, sample S21 is the second sample (from the top) in the Y dimension and the first sample (from the left) in the X dimension. Similarly, sample S44 is the fourth sample in the block (104) in both the Y and X dimensions. Because the block is 4×4 samples in size, S44 is located in the lower right. Also shown are reference samples that follow a similar numbering scheme. The reference samples are labeled R and their Y position (e.g., row index) and X position (column index) relative to the block (104). In both H.264 and H.265, predicted samples are neighbors of the block being reconstructed, so negative values ​​need not be used.

[0013] Intra-picture prediction works by copying reference sample values ​​from neighboring samples appropriate for the signaled prediction direction. For example, assume that the coded video bitstream includes signaling indicating a prediction direction consistent with arrow (102) for this block. That is, samples are predicted from the predicted sample(s) to the upper right and at a 45-degree angle from horizontal. In that case, samples S41, S32, S23, and S14 are predicted from the same reference sample R05. Sample S44 is then predicted from reference sample R08.

[0014] In some cases, especially when the direction is not divisible by 45 degrees, the values ​​of multiple reference samples can be combined, for example by interpolation, to calculate the reference sample.

[0015] As video coding technology has evolved, the number of possible directions has increased. In H.264 (2003), nine different directions could be represented. This increased to 33 in H.265 (2013), and JEM / VVC / BMS, as of the time of this disclosure, can support up to 65 directions. Experiments are performed to identify the most likely directions, and certain techniques in entropy coding are used to represent those likely directions with a small number of bits while accepting some penalty for less likely directions. Furthermore, the direction itself can sometimes be predicted from nearby directions used in nearby, already decoded blocks.

[0016] Figure 1B shows a schematic diagram (180) depicting 65 intra-prediction directions with JEM to illustrate the increasing number of prediction directions over time.

[0017] The mapping of intra-prediction direction bits in a coded video bitstream to represent direction can vary from one video coding technique to another, ranging from a simple direct mapping of prediction direction to intra-prediction mode, to complex adaptation schemes involving codewords, most-probable modes, and similar techniques. However, in any case, there may be some directions that are statistically less likely to occur in the video content than other directions. Because the goal of video compression is to reduce redundancy, in well-performing video coding techniques, these less likely directions are represented by more bits than the more likely directions.

[0018] Motion compensation can be a lossy compression technique and can refer to a technique used to predict a newly reconstructed picture or portion thereof after blocks of sample data from a previously reconstructed picture or portion thereof (reference picture) are spatially shifted in a direction indicated by a motion vector (MV). In some cases, the reference picture can be the same as the picture currently being reconstructed. MV can have two dimensions, X and Y, or three dimensions, with the third dimension being an indication of the reference picture used (which may indirectly be the temporal dimension).

[0019] In some video compression techniques, the motion vector (MV) applicable to a region of sample data can be predicted from other motion vectors, e.g., from a motion vector associated with another region of sample data that is spatially adjacent to the region being reconstructed and precedes that MV in decoding order. Doing so can significantly reduce the amount of data required to encode the MV, thereby removing redundancy and increasing compression. MV prediction can work in a directed manner because, for example, when encoding an input video signal derived from a camera (known as natural video), there is a statistical likelihood that regions larger than the region to which a single MV is applicable will move in a similar direction and thus, in some cases, can be predicted using similar motion vectors derived from MVs in nearby regions. As a result, the MV found for a given region will be similar or identical to the MV predicted from the surrounding MVs, and, after entropy coding, can be represented with fewer bits than would be used to encode the MV directly. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, the MV prediction itself may be lossy, for example due to rounding errors in computing the predictor from several surrounding MVs.

[0020] H.265 / HEVC (ITU-T Rec. H.265, "High Efficiency Video Coding," December 2016) describes various MV prediction mechanisms. Among the many MV prediction mechanisms provided by H.265, a technique hereafter referred to as "spatial merge" is described herein.

[0021] Referring to Figure 2, a current block (201) contains samples that the encoder found during the motion search process to be predictable from a spatially shifted previous block of the same size. Instead of directly encoding its MV, the MV can be derived from metadata associated with one or more reference pictures, for example, from the most recent reference picture (in decoding order) using the MV associated with any of five surrounding samples, denoted A0, A1, and B0, B1, B2 (202 through 206, respectively). In H.265, MV prediction can use predictors from the same reference picture as neighboring blocks. Summary of the Invention [Means for solving the problem]

[0022] Aspects of the present disclosure provide methods and apparatus for video encoding / decoding. In some examples, the apparatus for video decoding includes a processing circuit. The processing circuit reconstructs a first sample of video carried in an encoded video bitstream based on a nonlinear mapping-based filter having a first filter shape configuration. The processing circuit then determines to switch from the first filter shape configuration to a second filter shape configuration and reconstructs a second sample of the video based on the nonlinear mapping-based filter having the second filter shape configuration.

[0023] In one embodiment, the nonlinear mapping-based filter is a cross-component sample offset (CCSO) filter. In another embodiment, the nonlinear mapping-based filter is a local sample offset (LSO) filter.

[0024] According to an aspect of the present disclosure, the first filter shape configuration differs from the second filter shape configuration by at least one of the geometry of the filter tap locations and the distance from those filter tap locations to the centers of those filter tap locations.

[0025] In some examples, the first filter shape configuration and the second filter shape configuration each have at least one of a cross geometry of filter tap locations and a rectangular geometry of filter tap locations.

[0026] In one example, the first filter shape configuration and the second filter shape configuration have the same geometric shape and different distances from the filter tap position to the center of the filter tap position.

[0027] In some examples, the processing circuit decodes an index from an encoded video bitstream carrying video. The index indicates a second filter shape configuration. The processing circuit then determines a switch from the first filter shape configuration to the second filter shape configuration based on the index. In one example, the processing circuit determines the switch from the first filter shape configuration to the second filter shape configuration at a picture level. The first sample is in a first picture of the video and the second sample is in a second picture of the video.

[0028] In another example, the processing circuit determines the switch from a first filter shape configuration to a second filter shape configuration at a block level, where a first sample is in a first block in a picture of video and a second sample is in a second block in the picture of video.

[0029] In some examples, the processing circuit decodes the index from syntax signaling at least one of a block level, a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, a tile header, and a frame header.

[0030] In some examples, to reconstruct a first sample in a video based on a nonlinear mapping-based filter having a first filter shape configuration, the processing circuit may perform a pre-processing operation on a sample at a filter tap position corresponding to the first filter shape configuration to generate a pre-processed sample and determine an offset to apply to the first sample based on the pre-processed sample. In one example, the processing circuit may calculate an average sample value at two or more filter tap positions as the pre-processed sample. In another example, the processing circuit may apply a filter to the sample at the filter tap position to generate the filtered sample as the pre-processed sample.

[0031] Aspects of the present disclosure also provide a non-transitory computer-readable medium storing instructions that, when executed by a computer for video decoding, cause the computer to perform any of the above-described methods for video decoding. [Brief explanation of the drawings]

[0032] Further features, nature and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings.

[0033] [Figure 1A] FIG. 2 is a schematic diagram of an example subset of intra-prediction modes.

[0034] [Figure 1B] FIG. 1 is an illustration of an exemplary intra-prediction direction.

[0035] [Figure 2] FIG. 1 is a schematic diagram of a current block and its surrounding spatial merge candidates in one example.

[0036] [Figure 3] FIG. 1 is a schematic diagram of a simplified block diagram of a communication system according to an embodiment.

[0037] [Figure 4] FIG. 4 is a simplified block diagram schematic of a communication system (400) according to an embodiment.

[0038] [Figure 5] FIG. 2 is a schematic diagram of a simplified block diagram of a decoder according to an embodiment.

[0039] [Figure 6] FIG. 2 is a schematic diagram of a simplified block diagram of an encoder according to an embodiment.

[0040] [Figure 7] 4 shows a block diagram of an encoder according to another embodiment;

[0041] [Figure 8] 4 shows a block diagram of a decoder according to another embodiment;

[0042] [Figure 9] 1 illustrates an example of a filter shape according to an embodiment of the present disclosure.

[0043] [Figure 10A] 10 illustrates an example of sub-sampled positions used to calculate gradients according to an embodiment of the present disclosure. [Figure 10B] 10 illustrates an example of sub-sampled positions used to calculate gradients according to an embodiment of the present disclosure. [Figure 10C] 10 illustrates an example of sub-sampled positions used to calculate gradients according to an embodiment of the present disclosure. [Figure 10D] 10 illustrates an example of sub-sampled positions used to calculate gradients according to an embodiment of the present disclosure.

[0044] [Figure 11] 1A-B illustrate an example of a virtual boundary filtering process according to an embodiment of the present disclosure.

[0045] [Figure 12] AF show examples of symmetric padding operations at virtual boundaries according to embodiments of the present disclosure.

[0046] [Figure 13] 1 illustrates an example of dividing a picture according to some embodiments of the present disclosure.

[0047] [Figure 14] 1 shows some example quadtree division patterns for pictures.

[0048] [Figure 15] 1 illustrates a cross-component filter according to an embodiment of the present disclosure.

[0049] [Figure 16] 1 illustrates an example of a filter shape according to an embodiment of the present disclosure.

[0050] [Figure 17] 10 illustrates an example syntax for a cross-component filter according to some embodiments of the present disclosure.

[0051] [Figure 18A] 1 illustrates an exemplary location of chroma samples relative to luma samples, according to an embodiment of the present disclosure. [Figure 18B] 1 illustrates an exemplary location of chroma samples relative to luma samples, according to an embodiment of the present disclosure.

[0052] [Figure 19] 1 illustrates an example of direction finding according to an embodiment of the present disclosure.

[0053] [Figure 20] 10 shows examples illustrating subspace projection in some examples.

[0054] [Figure 21] 1 illustrates a table of multiple sample adaptive offset (SAO) types, according to an embodiment of the present disclosure.

[0055] [Figure 22] Some examples show examples of patterns for pixel classification at edge offsets.

[0056] [Figure 23] A table showing pixel classification rules for edge offsets in some examples is shown.

[0057] [Figure 24] An example of the syntax that can be signaled is shown below.

[0058] [Figure 25] 1 illustrates an example of a filter support region, according to some embodiments of the present disclosure.

[0059] [Figure 26] 10 illustrates an example of another filter support region, according to some embodiments of the present disclosure.

[0060] [Figure 27A] 1 shows a portion of a table with 81 combinations according to an embodiment of the present disclosure. [Figure 27B]1 shows a portion of a table with 81 combinations according to an embodiment of the present disclosure. [Figure 27C] 1 shows a portion of a table with 81 combinations according to an embodiment of the present disclosure.

[0061] [Figure 28] 1 illustrates an example of a filter geometry configuration according to an embodiment of the present disclosure.

[0062] [Figure 29] 10 illustrates another example of a filter geometry configuration, according to an embodiment of the present disclosure.

[0063] [Figure 30] 10 illustrates another example of a filter geometry configuration, according to an embodiment of the present disclosure.

[0064] [Figure 31] 10 illustrates another example of a filter geometry configuration, according to an embodiment of the present disclosure.

[0065] [Figure 32] 1 shows examples of three candidate filter shape configurations with cross-shaped geometries.

[0066] [Figure 33] 1 shows examples of two candidate filter shape configurations with cross-shaped geometries.

[0067] [Figure 34] 1 shows examples of two candidate filter shape configurations with rectangular geometries.

[0068] [Figure 35] Four example candidate filter shape configurations (3500) are shown, each having a mixture of cross and rectangular geometries.

[0069] [Figure 36] 1 illustrates an example of pre-processing according to certain embodiments of the present disclosure.

[0070] [Figure 37] 10 illustrates another example of pre-processing according to an embodiment of the present disclosure.

[0071] [Figure 38] 1 shows a flowchart outlining a process according to an embodiment of the present disclosure.

[0072] [Figure 39] 1 is a schematic diagram of a computer system according to an embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0073] Figure 3 illustrates a simplified block diagram of a communication system (300) according to an embodiment of the present disclosure. The communication system (300) includes multiple terminal devices that can communicate with each other, for example, via a network (350). For example, the communication system (300) includes a first pair of terminal devices (310) and (320) interconnected via the network (350). In the example of Figure 3, the first pair of terminal devices (310) and (320) perform unidirectional transmission of data. For example, the terminal device (310) may encode video data (e.g., a stream of video pictures captured by the terminal device (310)) for transmission to the other terminal device (320) via the network (350). The encoded video data can be transmitted in the form of one or more coded video bitstreams. The terminal device 320 may receive encoded video data from the network 350, decode the encoded video data to restore a video picture, and display the video picture according to the restored video data. One-way data transmission may be common in media service applications, etc.

[0074] In another example, the communication system (300) includes a second pair of terminal devices (330) and (340) that perform bidirectional transmission of encoded video data, such as may occur during a video conference. For the bidirectional transmission of data, in one example, each of the terminal devices (330) and (340) may encode video data (e.g., a stream of video pictures captured by the terminal device) for transmission to the other of the terminal devices (330) and (340) over the network (350). Each of the terminal devices (330) and (340) may receive the encoded video data transmitted by the other of the terminal devices (330) and (340), decode the encoded video data to recover the video pictures, and display the video pictures on an accessible display device in accordance with the recovered video data.

[0075] In the example of FIG. 3 , terminal devices 310, 320, 330, and 340 may be depicted as a server, a personal computer, and a smartphone, although the principles of the present disclosure may not be limited thereto. Embodiments of the present disclosure find application in laptop computers, tablet computers, media players, and / or dedicated videoconferencing equipment. Network 350 represents any number of networks that convey encoded video data between terminal devices 310, 320, 330, and 340, including, for example, wired and / or wireless communication networks. Communication network 350 may exchange data over circuit-switched and / or packet-switched channels. Exemplary networks include telecommunications networks, local area networks, wide area networks, and / or the Internet. For purposes of the present discussion, the architecture and topology of network 350 may not be important to the operation of the present disclosure, unless otherwise described below.

[0076] 4 illustrates the arrangement of a video encoder and a video decoder in a streaming environment as an example of an application for the disclosed subject matter. The disclosed subject matter may be equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV, storage of compressed video on digital media including CDs, DVDs, memory sticks, etc.

[0077] The streaming system may include a video source (401), such as a digital camera, and may also include a capture subsystem (413) that generates, for example, a stream of uncompressed video pictures (402). In one example, the stream of video pictures (402) includes samples captured by the digital camera. The stream of video pictures (402), depicted as a bold line to emphasize its high data volume compared to the encoded video data (404) (or coded video bitstream), may be processed by an electronic device (420) that includes a video encoder (403) coupled to the video source (401). The video encoder (403) may include hardware, software, or a combination thereof to enable or implement aspects of the disclosed subject matter, as described in more detail below. The encoded video data (404) (or encoded video bitstream (404)), depicted as a thin line to emphasize its lower data volume compared to the stream of video pictures (402), can be stored on a streaming server (405) for future use. One or more streaming client subsystems, such as the client subsystems (406) and (408) of FIG. 4, can access the streaming server (405) to retrieve copies (407) and (409) of the encoded video data (404). The client subsystem (406) can include a video decoder (410), for example, within the electronic device (430). The video decoder (410) decodes the incoming copy of the encoded video data (407) and generates an outgoing stream of video pictures (411) that can be rendered on a display (412) (e.g., a display screen) or other rendering device (not shown). In some streaming systems, the encoded video data (404), (407), and (409) (e.g., video bitstream) may be encoded according to some video coding / compression standard.Examples of these standards include ITU-T Recommendation H.265. In one example, a video coding standard under development is informally known as VVC. The disclosed subject matter may be used in the context of Versatile Video Coding (VVC).

[0078] It should be noted that electronic devices 420 and 430 may include other components (not shown). For example, electronic device 420 may include a video decoder (not shown), and electronic device 430 may also include a video encoder (not shown).

[0079] 5 shows a block diagram of a video decoder (510) according to one embodiment of the present disclosure. The video decoder (510) can be included in an electronic device (530). The electronic device (530) can include a receiver (531) (e.g., a receiving circuit). The video decoder (510) can be used in place of the video decoder (310) in the example of FIG. 4.

[0080] The receiver (531) may receive one or more coded video sequences to be decoded by the video decoder (510); in the same or another embodiment, one coded video sequence at a time, with the decoding of each coded video sequence being independent of the other coded video sequences. The coded video sequences may be received from a channel (501), which may be a hardware or software link to a storage device that stores the encoded video data. The receiver (531) may also receive the encoded video data along with other data, such as coded audio data and / or auxiliary data streams, which may be transferred to respective usage entities (not shown). The receiver (531) may separate the coded video sequences from other data. To combat network jitter, a buffer memory (515) may be coupled between the receiver (531) and the entropy decoder / parser (520) (hereinafter referred to as the "parser"). In some applications, the buffer memory (515) is part of the video decoder (510). In other applications, it may be external to the video decoder (510) (not shown). In still other applications, there may be a buffer memory (not shown) external to the video decoder (510), for example, to combat network jitter, and there may be another buffer memory (515) internal to the video decoder (510), for example, to handle playback timing. If the receiver (531) is receiving data from a storage / forwarding device with sufficient bandwidth and controllability or from an isochronous network, the buffer memory (515) may not be required or may be small. For use with best-effort packet networks such as the Internet, the buffer memory (515) may be required, may be relatively large, may advantageously be adaptively sized, and may be implemented, at least in part, in an operating system or similar element (not shown) external to the video decoder (510).

[0081] The video decoder (510) may include a parser (520) for reconstructing symbols (521) from the coded video sequence. These symbol categories include information used to manage the operation of the video decoder (510) and, potentially, information for controlling a rendering device, such as a render device (512) (e.g., a display screen). The render device may be coupled to the electronic device (530) rather than being an integral part of the electronic device (530), as shown in FIG. 5. The control information for the rendering device(s) may be in the form of a Supplementary Enhancement Information (SEI) message or a Video Usability Information (VUI) parameter set fragment (not shown). The parser (520) may parse / entropy decode the received coded video sequence. The coding of the coded video sequence may follow a video coding technique or standard and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, etc. The parser (520) can extract from the coded video sequence a set of subgroup parameters for at least one of the subgroups of pixels in the video decoder based on at least one parameter corresponding to the group. The subgroups can include groups of pictures (GOPs), pictures, tiles, slices, macroblocks, coding units (CUs), blocks, transform units (TUs), prediction units (PUs), etc. The parser (520) can also extract information from the coded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, etc.

[0082] The parser (520) performs an entropy decoding / parsing operation on the video sequence received from the buffer memory (515), thereby generating symbols (521).

[0083] The reconstruction of the symbols (521) can involve several different units, depending on the type of coded video picture or portions thereof (e.g., inter and intra pictures, inter and intra blocks) and other factors. Which units are involved and how can be controlled by subgroup control information parsed by the parser (520) from the coded video sequence. The flow of such subgroup control information between the parser (520) and the following units is not depicted for clarity.

[0084] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually divided into several functional units, as described below. In a practical implementation operating within commercial constraints, many of these units will interact closely with each other and may be at least partially integrated with each other. However, for purposes of describing the disclosed subject matter, the following conceptual subdivision into functional units is appropriate.

[0085] The first unit is a scaler / inverse transform unit (551). The scaler / inverse transform unit (551) receives quantized transform coefficients and control information as symbol(s) (521) from the parser (520). The control information includes which transform to use, block size, quantization factor, quantization scaling matrix, etc. The scaler / inverse transform unit (551) can output a block containing sample values ​​that can be input to an aggregator (555).

[0086] In some cases, the output samples of the scaler / inverse transform (551) may relate to intra-coded blocks, i.e., blocks that do not use prediction information from a previously reconstructed picture but can use prediction information from a previously reconstructed portion of the current picture. Such prediction information may be provided by an intra-picture prediction unit (552). In some cases, the intra-picture prediction unit (552) generates a block of the same size and shape as the block being reconstructed using surrounding, already reconstructed information taken from a current picture buffer (558). The current picture buffer (558), for example, buffers a partially reconstructed current picture and / or a fully reconstructed current picture. The aggregator (555) optionally adds, on a sample-by-sample basis, the prediction information generated by the intra-prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551).

[0087] In other cases, the output samples of the scaler / inverse transform unit (551) may relate to an inter-coded, potentially motion-compensated, block. In such cases, the motion compensation prediction unit (553) may access a reference picture memory (557) to retrieve samples used for prediction. After motion-compensating the retrieved samples according to the symbols (521) for the block, these samples may be added by an aggregator (555) to the output of the scaler / inverse transform unit (in this case, referred to as residual samples or residual signals) to generate output sample information. The addresses in the reference picture memory (557) from which the motion compensation unit (553) retrieves prediction samples may be controlled by motion vectors available to the motion compensation unit (553) in the form of symbols (521). The symbols may have, for example, X, Y, and reference picture components. Motion compensation may include interpolation of sample values ​​retrieved from the reference picture memory (557) when subsample-accurate motion vectors are used, motion vector prediction mechanisms, and the like.

[0088] The output samples of the aggregator (555) can be subjected to various loop filtering techniques in a loop filter unit (556). Video compression techniques can include in-loop filtering techniques that are controlled by parameters contained in the coded video sequence (also called the coded video bitstream) and made available to the loop filter unit (556) as symbols (521) from the parser (520), but can also be responsive to meta-information obtained during decoding of previous portions (in decoding order) of the coded picture or coded video sequence, as well as to previously reconstructed loop-filtered sample values.

[0089] The output of the loop filter unit (556) can be a sample stream, which can be output to a render device (512) or stored in a reference picture memory (557) for use in future inter-picture prediction.

[0090] Once a coded picture is fully reconstructed, it can be used as a reference picture for future predictions. For example, once the coded picture corresponding to the current picture is fully reconstructed and the coded picture is identified as a reference picture (e.g., by the parser (520)), the current picture buffer (558) can become part of the reference picture memory (557), and a fresh current picture buffer can be reallocated before starting the reconstruction of the subsequent coded picture.

[0091] The video decoder (510) can perform decoding operations according to a predetermined video compression technique in a standard, such as ITU-T Recommendation H.265. A coded video sequence can conform to the syntax prescribed by the video compression technique or standard being used, in the sense that the coded video sequence follows the syntax of the video compression technique or standard and the profile documented in the video compression technique or standard. Specifically, a profile can select certain tools from all tools available in the video compression technique or standard as those available exclusively for use under that profile. Compliance may also require that the complexity of the coded video sequence be within a range defined by the level of the video compression technique or standard. In some cases, the level constrains the maximum picture size, maximum frame rate, maximum reconstruction sample rate (e.g., measured in megasamples per second), maximum reference picture size, etc. The limits set by the level can be further constrained through a Hypothetical Reference Decoder (HRD) specification and metadata for HRD buffer management, which are sometimes signaled in the coded video sequence.

[0092] In some embodiments, the receiver (531) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence(s). The additional data may be used by the video decoder (510) to properly decode the data and / or to more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial, or signal-to-noise ratio (SNR) improvement layers, redundant slices, redundant pictures, forward error correction codes, etc.

[0093] 6 shows a block diagram of a video encoder (603) according to one embodiment of the present disclosure. The video encoder (603) is included in an electronic device (620). The electronic device (620) includes a transmitter (640) (e.g., a transmission circuit). The video encoder (603) can be used in place of the video encoder (403) in the example of FIG. 4.

[0094] The video encoder (603) can receive video samples from a video source (601) (which is not part of the electronic device (620) in the example of Figure 6) that can capture video images to be encoded by the video encoder (603). In another example, the video source (601) is part of the electronic device (620).

[0095] The video source (601) can provide a source video sequence to be encoded by the video encoder (603) in the form of a digital video sample stream, which can be of any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 YCrCB, RGB, ...), and any suitable sampling structure (e.g., YCrCb 4:2:0, YCrCb 4:4:4). In a media service system, the video source (601) can be a storage device storing pre-prepared video. In a video conferencing system, the video source (601) can be a camera that locally captures image information as a video sequence. The video data can be provided as multiple individual pictures that, when viewed in sequence, impart motion. The pictures themselves can be organized as a spatial array of pixels, each of which can contain one or more samples, depending on the sampling structure, color space, etc., in use. Those skilled in the art can readily understand the relationship between pixels and samples. The following description focuses on samples.

[0096] According to one embodiment, the video encoder (603) can encode and compress pictures of a source video sequence into a coded video sequence (643) in real time or under any other time constraint required by the application. Enforcing an appropriate coding rate is one function of the controller (650). In some embodiments, the controller (650) controls and is operatively coupled to other functional units, such as those described below. Such coupling is not depicted for clarity. Parameters set by the controller (650) can include parameters related to rate control (picture skip, quantizer, lambda value for rate-distortion optimization techniques, etc.), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc. The controller (650) can be configured to have other suitable functions for the video encoder (603) optimized for certain system designs.

[0097] In some embodiments, the video encoder (603) is configured to operate in an encoding loop. As a simplistic explanation, in one example, the encoding loop can include a source encoder (630) (e.g., responsible for generating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture(s)) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to generate sample data in a manner similar to that which a (remote) decoder would also generate (in the video compression techniques considered in the disclosed subject matter, any compression between the symbols and the encoded video bitstream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (634). Because decoding of the symbol stream yields bit-accurate results regardless of the decoder location (local or remote), the contents of the reference picture memory (634) are also bit-accurate between the local and remote encoders. In other words, the predictor in the encoder "sees" the exact same sample values ​​as the decoder "sees" when using the prediction during decoding. This fundamental principle of reference picture synchrony (and the resulting drift when synchrony cannot be maintained, e.g., due to channel errors) is also used in several related technologies.

[0098] The operation of the "local" decoder (633) may be the same as the operation of the "remote" decoder, e.g., the video decoder (410), already described in detail above in connection with Figure 5. However, referring briefly to Figure 5 as well, because symbols are available and the encoding / decoding of the symbols into a coded video sequence by the entropy coder (645) and parser (420) may be lossless, the entropy decoding portion of the video decoder (410), including the buffer memory (415) and parser (420), may not be fully implemented in the local decoder (633).

[0099] An observation that can be made at this point is that any decoder technology, with the exception of parsing / entropy decoding, that exists in the decoder must exist in substantially the same functional form in the corresponding encoder. For this reason, the disclosed subject matter focuses on decoder operation. The description of the encoder technology can be abbreviated, since it is the inverse of the decoder technology, which is described generically. Only in certain areas is more detailed explanation necessary, and is provided below.

[0100] In operation, in some examples, the source encoder (630) may perform motion-compensated predictive encoding, which predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence, designated as “reference pictures.” In this manner, the encoding engine (632) encodes differences between pixel blocks of the input picture and pixel blocks of the reference picture(s) that may be selected as predictive references for the input picture.

[0101] The local video decoder (633) can decode the coded video data of pictures that may be designated as reference pictures based on the symbols generated by the source encoder (630). The operation of the coding engine (632) can advantageously be a lossy process. When the coded video data is decoded by a video decoder (not shown in FIG. 6), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (633) can replicate the decoding process that may be performed on the reference pictures by the video decoder and store the reconstructed reference pictures in a reference picture cache (634). In this way, the video encoder (603) can locally store copies of reconstructed reference pictures that have common content (barring transmission errors) as reconstructed reference pictures that would be obtained by a far-end video decoder.

[0102] The predictor (635) can perform a prediction search for the coding engine (632). That is, for a new picture to be coded, the predictor (635) can search the reference picture memory (634) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that can serve as suitable prediction references for the new picture. The predictor (635) can operate on a sample block-by-pixel block basis to find suitable prediction references. In some cases, as determined by the search results obtained by the predictor (635), the input picture can have prediction references drawn from multiple reference pictures stored in the reference picture memory (634).

[0103] The controller (650) may manage the encoding operations of the source encoder (630), including, for example, setting the parameters and subgroup parameters used to encode the video data.

[0104] The output of all the above functional units can be subjected to entropy coding in an entropy coder (645), which converts the symbols produced by the various functional units into a coded video sequence by losslessly compressing the symbols according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc.

[0105] The transmitter (640) can buffer the coded video sequence produced by the entropy encoder (645) and prepare it for transmission over a communication channel (660), which can be a hardware or software link to a storage device that stores the coded video data. The transmitter (640) can merge the coded video data from the video encoder (630) with other data to be transmitted, such as coded audio data and / or auxiliary data streams (sources not shown).

[0106] The controller (650) may manage the operation of the video encoder (603). During encoding, the controller (650) may assign a coding picture type to each coded picture. The coding picture type may affect the coding technique that may be applied to each picture. For example, pictures may often be assigned as one of the following picture types:

[0107] An intra picture (I picture) may be one that can be coded and decoded without using other pictures in the sequence as a source of prediction. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art will recognize these variations of I pictures and their respective uses and characteristics.

[0108] A predictive picture (P picture) may be one that can be coded and decoded using intra- or inter-prediction, which uses at most one motion vector and reference index to predict the sample values ​​of each block.

[0109] Bidirectionally predicted pictures (B pictures) may be coded and decoded using intra- or inter-prediction, which uses up to two motion vectors and reference indices to predict the sample values ​​of each block. Similarly, multi-predictive pictures may use more than two reference pictures and associated metadata for the reconstruction of a single block.

[0110] A source picture is typically spatially divided into multiple sample blocks (e.g., blocks of 4x4, 8x8, 4x8, or 16x16 samples each) and coded block by block. Blocks may be predictively coded with reference to other (already coded) blocks, as determined by the coding assignment applied to each picture of the block. For example, blocks of an I picture may be non-predictively coded or predictively coded with reference to previously coded blocks of the same picture (spatial prediction or intra-prediction). Pixel blocks of a P picture may be predictively coded via spatial prediction or temporal prediction with reference to one previously coded reference picture. Blocks of a B picture may be predictively coded via spatial prediction or temporal prediction with reference to one or two previously coded reference pictures.

[0111] The video encoder (603) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T Recommendation H.265. In its operations, the video encoder (603) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancies in the input video sequence. Thus, the encoded video data may conform to a syntax specified by the video encoding technique or standard used.

[0112] In some embodiments, the transmitter (640) may transmit additional data along with the encoded video. The source encoder (630) may include such data as part of the coded video sequence. The additional data may include temporal, spatial, or SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.

[0113] Video may be captured as multiple source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often abbreviated as intra-prediction) exploits spatial correlation within a given picture, while inter-picture prediction exploits correlation (temporal or otherwise) between pictures. In one example, a particular picture to be encoded / decoded, called the current picture, is divided into blocks. If a block in the current picture is similar to a reference block in a previously coded and still buffered reference picture in the video, that block in the current picture can be coded by a vector called a motion vector. The motion vector points to a reference block in the reference picture and may have a third dimension that identifies the reference picture if multiple reference pictures are used.

[0114] In some embodiments, bi-prediction techniques can be used in inter-picture prediction. Bi-prediction techniques use two reference pictures, such as a first reference picture and a second reference picture, both of which precede the current picture in decoding order (but may also precede and follow the current picture in display order, respectively), in the video. A block in the current picture can be coded with a first motion vector that points to a first reference block in the first reference picture and a second motion vector that points to a second reference block in the second reference picture. A block can be predicted using a combination of the first and second reference blocks.

[0115] Furthermore, to improve coding efficiency, merge mode techniques can be used in inter-picture prediction.

[0116] According to some embodiments of the present disclosure, prediction, such as inter-picture prediction and intra-picture prediction, is performed in units of blocks. For example, according to the HEVC standard, pictures in a sequence of video pictures are divided into coding tree units (CTUs) for compression, and the CTUs in a picture have the same size, such as 64x64 pixels, 32x32 pixels, or 16x16 pixels. Generally, a CTU includes three coding tree blocks (CTBs), one luma CTB and two chroma CTBs. Each CTU can be recursively quadtree-decomposed into one or more coding units (CUs). For example, a 64x64 pixel CTU can be divided into one CU of 64x64 pixels, four CUs of 32x32 pixels, or 16 CUs of 16x16 pixels. In one example, each CU is analyzed to determine a prediction type for that CU, such as an inter prediction type or an intra prediction type. A CU is divided into one or more prediction units (PUs) depending on temporal and / or spatial predictability. Generally, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, prediction operations in encoding / decoding are performed in units of prediction blocks. Taking a luma prediction block as an example of a prediction block, the prediction block includes a matrix of values ​​(e.g., luma values) for pixels, such as 8x8 pixels, 16x16 pixels, 8x16 pixels, 16x8 pixels, etc.

[0117] 7 shows a diagram of a video encoder (703) according to another embodiment of the present disclosure. The video encoder (703) is configured to receive a processed block of sample values ​​(e.g., a predictive block) in a current video picture in a sequence of video pictures and encode the processed block into a coded picture that is part of a coded video sequence. In one example, the video encoder (703) is used in place of the video encoder (403) in the example of FIG. 4.

[0118] In an HEVC example, the video encoder (703) receives a matrix of sample values ​​for a processing block, such as a prediction block, such as 8x8 samples. The video encoder (703) determines whether the processing block is best coded using intra-mode, inter-mode, or bi-prediction mode, e.g., using rate-distortion optimization. If the processing block is coded in intra-mode, the video encoder (703) may use intra-prediction techniques to encode the processing block into a coded picture; if the processing block is coded in inter-mode or bi-prediction mode, the video encoder (703) may use inter-prediction or bi-prediction techniques, respectively, to encode the processing block into a coded picture. In certain video coding techniques, merge mode may be an inter-picture prediction submode in which motion vectors are derived from one or more motion vector predictors but without the benefit of coded motion vector components outside the predictors. In certain other video coding techniques, there may be motion vector components applicable to the current block. In one example, the video encoder (703) includes other components, such as a mode decision module (not shown) for determining the mode of the processing block.

[0119] In the example of Figure 7, the video encoder (703) includes an inter-encoder (730), an intra-encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a general controller (721), and an entropy encoder (725), coupled together as shown in Figure 7.

[0120] The inter-encoder (730) is configured to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-prediction information (e.g., a description of redundant information due to inter-encoding techniques, motion vectors, merge mode information), and calculate an inter-prediction result (e.g., a predicted block) based on the inter-prediction information using any suitable technique. In some examples, the reference picture is a decoded reference picture that is decoded based on encoded video information.

[0121] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), optionally compare the block with previously coded blocks in the same picture, generate transformed and quantized coefficients, and optionally generate intra prediction information (e.g., intra prediction direction information according to one or more intra encoding techniques). In one example, the intra encoder (722) also calculates an intra prediction result (e.g., a predicted block) based on the intra prediction information and reference blocks in the same picture.

[0122] The general controller (721) is configured to determine general control data and control other components of the video encoder (703) based on the general control data. In one example, the general controller (721) determines the mode of the block and provides a control signal to the switch (726) based on the mode. For example, if the mode is intra mode, the general controller (721) controls the switch (726) to select the intra mode result for use by the residual calculator (723) and controls the entropy encoder (725) to select intra prediction information and include the intra prediction information in the bitstream; if the mode is inter mode, the general controller (721) controls the switch (726) to select the inter prediction result for use by the residual calculator (723) and controls the entropy encoder (725) to select inter prediction information and include the inter prediction information in the bitstream.

[0123] The residual calculator (723) is configured to calculate the difference (residual data) between the received block and a prediction result selected from the intra-encoder (722) or the inter-encoder (730). The residual encoder (724) is configured to encode the residual data to generate transform coefficients based on the residual data. In one example, the residual encoder (724) is configured to transform the residual data from the spatial domain to the frequency domain to generate transform coefficients. The transform coefficients are then subjected to a quantization process to obtain quantized transform coefficients. In various embodiments, the video encoder (703) also includes a residual decoder (728). The residual decoder (728) is configured to perform an inverse transform to generate decoded residual data. The decoded residual data can be suitably used by the intra-encoder (722) and the inter-encoder (730). For example, the inter-encoder (730) can generate decoded blocks based on the decoded residual data and inter-prediction information, and the intra-encoder (722) can generate decoded blocks based on the decoded residual data and intra-prediction information. The decoded blocks are suitably processed to generate decoded pictures, which can be buffered in memory circuitry (not shown) and, in some examples, used as reference pictures.

[0124] The entropy encoder (725) is configured to format a bitstream to include the encoded blocks. The entropy encoder (725) is configured to include various information in accordance with a suitable standard, such as the HEVC standard. In one example, the entropy encoder (725) is configured to include general control data, selected prediction information (e.g., intra-prediction information or inter-prediction information), residual information, and other suitable information in the bitstream. Note that, according to the disclosed subject matter, residual information is not present when encoding blocks in a merged sub-mode of either an inter-mode or a bi-prediction mode.

[0125] 8 shows a diagram of a video decoder (810) according to another embodiment of the present disclosure. The video decoder (810) is configured to receive coded pictures that are part of a coded video sequence and decode the coded pictures to generate reconstructed pictures. In one example, the video decoder (810) is used in place of the video decoder (410) in the example of FIG. 4.

[0126] In the example of Figure 8, the video decoder (810) includes an entropy decoder (871), an inter-decoder (880), a residual decoder (873), a reconstruction module (874), and an intra-decoder (872) coupled together as shown in Figure 8.

[0127] The entropy decoder (871) can be configured to reconstruct, from a coded picture, certain symbols representing the syntax elements of which the coded picture is composed. Such symbols can include, for example, the mode in which the block is coded (e.g., intra mode, inter mode, bi-prediction mode, merge submode, or the latter two in another submode), prediction information (e.g., intra-prediction information or inter-prediction information), which can identify certain samples or metadata used for prediction by the intra-decoder (872) or inter-decoder (880), respectively, residual information in the form of quantized transform coefficients, etc. In one example, if the prediction mode is an inter- or bi-prediction mode, the inter-prediction information is provided to the inter-decoder (880); if the prediction type is an intra-prediction type, the intra-prediction information is provided to the intra-decoder (872). The residual information can undergo inverse quantization and be provided to the residual decoder (873).

[0128] The inter decoder (880) is configured to receive inter prediction information and generate inter prediction results based on the inter prediction information.

[0129] The intra decoder (872) is configured to receive intra prediction information and generate a prediction result based on the intra prediction information.

[0130] The residual decoder (873) is configured to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to transform the residual from the frequency domain to the spatial domain. The residual decoder (873) may also require certain control information (including quantizer parameters (QP)), which may be provided by the entropy decoder (871) (this is only low-volume control information, so the data path is not depicted).

[0131] The reconstruction module (874) is configured to combine, in the spatial domain, the residual output by the residual decoder (873) and the prediction result (output by the intra- or inter-prediction module, as the case may be) to form a reconstructed block, which may be part of a reconstructed picture, which may be part of a reconstructed video. It is noted that other suitable operations, such as deblocking operations, may be performed to improve visual quality.

[0132] It should be noted that the video encoders (403), (603), (703) and video decoders (410), (510), (810) may be implemented using any suitable techniques. In one embodiment, the video encoders (403), (603), (703) and video decoders (410), (510), (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoders (403), (603), (603) and video decoders (410), (510), (810) may be implemented using one or more processors executing software instructions.

[0133] Aspects of this disclosure provide filtering techniques for video encoding / decoding.

[0134] To reduce artifacts, an adaptive loop filter (ALF) with block-based filter adaptation can be applied by the encoder / decoder. For the luma component, one of multiple filters (e.g., 25 filters) can be selected for a 4x4 luma block, e.g., based on local gradient direction and activity.

[0135] The ALF can have any suitable shape and size. Referring to FIG. 9, ALFs (910)-(911) have a diamond shape, such as a 5x5 diamond shape for ALF (910) and a 7x7 diamond shape for ALF (911). In ALF (910), elements (920)-(932) form a diamond shape and can be used in the filtering process. Seven values ​​(e.g., C0-C6) are available for elements (920)-(932). In ALF (911), elements (940)-(964) form a diamond shape and can be used in the filtering process. Thirteen values ​​(e.g., C0-C12) are available for elements (940)-(964).

[0136] Referring to Figure 9, in some examples, two ALFs (910)-(911) with diamond filter shapes are used. A 5x5 diamond-shaped filter (910) can be applied to the chroma components (chroma blocks, chroma CB, etc.), and a 7x7 diamond-shaped filter (911) can be applied to the luma components (luma blocks, luma CB, etc.). Other suitable shapes and sizes can be used for the ALFs. For example, a 9x9 diamond-shaped filter can be used.

[0137] The filter coefficients at the locations indicated by those values ​​(e.g., C0-C6 in (910) or C0-C12 in (920)) may be non-zero. Furthermore, if the ALF includes a clipping function, the clipping values ​​at those locations may be non-zero.

[0138] For block classification of the luma component, a block (or luma block, luma CB) can be categorized or classified as one of multiple (e.g., 25) classes. The classification index C can be derived based on the directional parameters and the quantized values ​​of the activation values ​​A using equation (1).

number

number

number

[0139] To reduce the complexity of the block classification described above, a subsampled 1-D Laplacian calculation can be applied. Figures 10A-10D show the gradient g in the vertical (Figure 10A), horizontal (Figure 10B), and two diagonal directions d1 (Figure 10C) and d2 (Figure 10D). v, g h , g d1 and g d2 10A shows an example of the subsampled positions used to compute the vertical gradient g v In Figure 10B, the label "H" indicates the subsampling position for calculating the horizontal gradient g h In FIG. 10C, the label "D1" indicates the subsampling position for computing the d1 diagonal gradient g d1 In FIG. 10D, the label "D2" indicates the subsampling position for computing the d2 diagonal gradient g d2 indicates the sub-sampling positions for calculating

[0140] Horizontal and vertical gradients g v and g h The maximum value g h,v max and the minimum value g h,v min can be set as follows:

number

number

number

[0141] The activation value A can be calculated as follows:

number

number

[0142] Since no block classification is applied to the chroma components in the picture, a single set of ALF coefficients can be applied for each chroma component.

[0143] A geometric transformation can be applied to the filter coefficients and corresponding filter clipping values ​​(also referred to as clipping values). Before filtering a block (e.g., a 4x4 luma block), for example, the gradient values ​​(e.g., g v , g h , g d1 , and / or g d2 ), a geometric transformation such as a rotation or a diagonal and vertical flip can be applied to the filter coefficients f(k,l) and the corresponding filter clipping values ​​c(k,l). The geometric transformation applied to the filter coefficients f(k,l) and the corresponding filter clipping values ​​c(k,l) can be equivalent to applying a geometric transformation to the samples within the region supported by the filter. The geometric transformation can make the different blocks to which the ALF is applied more similar by aligning their respective directionality.

[0144] Three geometric transformations, including diagonal flip, vertical flip, and rotation, can be performed as described in Equations (9)-(11), respectively.

number

[0145] In some embodiments, ALF filter parameters are signaled in an adaptive parameter set (APS) for a picture. In the APS, one or more sets (up to 25 sets) of luma filter coefficients and clipping value indices can be signaled. In one example, a set of the one or more sets can include luma filter coefficients and one or more clipping value indices. One or more sets (up to 8 sets) of chroma filter coefficients and clipping value indices can be signaled. To reduce signaling overhead, filter coefficients of different classifications (e.g., with different classification indices) for the luma component can be merged. In the slice header, the index of the APS used for the current slice can be signaled.

[0146] In one embodiment, a clipping value index (also referred to as a clipping index) can be decoded from the APS. The clipping value index can be used to determine a corresponding clipping value, for example, based on a relationship between the clipping value index and the corresponding clipping value. This relationship can be predefined and stored in the decoder. In one example, this relationship is described by a table, such as a luma table (e.g., used for luma CB) of clipping value indexes and corresponding clipping values, a chroma table (e.g., used for chroma CB) of clipping value indexes and corresponding clipping values, etc. The clipping value can depend on the bit depth B. The bit depth B can refer to the internal bit depth, the bit depth of the reconstructed samples in the CB to be filtered, etc. In some examples, the tables (e.g., luma table, chroma table) are obtained using Equation (12).

number

[0147] One or more APS indices (up to seven APS indices) can be signaled in the slice header for the current slice to specify the luma filter sets available for use for the current slice. The filtering process can be controlled at one or more appropriate levels, such as the picture level, slice level, CTB level, and / or others. In an embodiment, the filtering process can be further controlled at the CTB level. A flag indicating whether the ALF is applied to the luma CTB is signaled. The luma CTB can select a filter set from among multiple fixed filter sets (e.g., 16 fixed filter sets) and a filter set signaled in the APS (also referred to as a signaled filter set). A filter set index is signaled for the luma CTB to indicate the filter set to be applied (e.g., a filter set among the multiple fixed filter sets and the signaled filter sets). The multiple fixed filter sets are predefined and hard-coded in the encoder and decoder and can be referred to as predefined filter sets.

[0148] For chroma components, an APS index can be signaled in the slice header to indicate the chroma filter set used for the current slice. At the CTB level, if there are multiple chroma filter sets in an APS, a filter set index can be signaled for each chroma CTB.

[0149] The filter coefficients can be quantized with a norm equal to 128. To reduce multiplication complexity, bitstream adaptation can be applied such that coefficient values ​​for non-center positions are in the range of −27 to 27−1 (inclusive). In one example, coefficients for center positions are not signaled in the bitstream and can be considered equal to 128.

[0150] In some embodiments, the syntax and semantics of clipping indices and clipping values ​​are defined as follows: alf_luma_clip_idx[sfIdx][j] can be used to specify the clipping index of the clipping value to use before multiplying the jth coefficient of the luma filter signaled by sfIdx. Bitstream conformance requirements may include that the value of alf_luma_clip_idx[sfIdx][j], for sfIdx=0 to alf_luma_num_filters_signalled_minus1, j=0 to 11, be in the range of 0 to 3. The luma filter clipping value AlfClipL[adaptation_parameter_set_id] of element AlfClipL[adaptation_parameter_set_id][filtIdx][j], for filtIdx=0 to NumAlfFilters-1, j=0 to 11, can be derived as specified in Table 2 depending on bitDepth being set equal to BitDepthY and clipIdx being set equal to alf_luma_clip_idx[alf_luma_coeff_delta_idx][filtIdx]][j]. alf_chroma_clip_idx[altIdx][j] can be used to specify the clipping index of the clipping value to use before multiplying the jth coefficient of the alternate chroma filter by index altIdx. Bitstream conformance requirements may include that the value of alf_chroma_clip_idx[altIdx][j] for altIdx=0 to alf_chroma_num_alt_filters_minus1, j=0 to 5 be in the range 0 to 3 (inclusive). The chroma filter clipping value AlfClipC[adaptation_parameter_set_id][altIdx] with element AlfClipC[adaptation_parameter_set_id][altIdx][j] for altIdx=0 to alf_chroma_num_alt_filters_minus1, j=0 to 5 can be derived as specified in Table 2 depending on bitDepth being set equal to BitDepthC and clipIdx being set equal to alf_chroma_clip_idx[altIdx][j].

[0151] In one embodiment, the filtering process can be described as follows: On the decoder side, when ALF is enabled for the CTB, samples R(i,j) in a CU (or CB) can be filtered, resulting in filtered sample values ​​R'(i,j), as shown below using equation (13): In one example, each sample in a CU is filtered.

number

[0152] In nonlinear ALF, multiple sets of clipping values ​​can be provided in Table 3. In one example, the luma set includes four clipping values ​​{1024, 181, 32, 6}, and the chroma set includes four clipping values ​​{1024, 161, 25, 4}. The four clipping values ​​in the luma set can be selected by approximately evenly dividing the full range of sample values ​​(encoded in 10 bits) for the luma block (e.g., 1024) in the logarithmic domain. This range can be between 4 and 1024 for the chroma set. [Table 3]

[0153] The selected clipping value can be encoded in the "alf_data" syntax element as follows: An appropriate encoding scheme (e.g., Golomb encoding) can be used to encode the clipping index corresponding to the selected clipping value as shown in Table 3. The encoding scheme can be the same encoding scheme used to encode the filter set index.

[0154] In one embodiment, a virtual boundary filtering process can be used to reduce the line buffer requirements of ALF. Thus, for samples near CTU boundaries (e.g., horizontal CTU boundaries), modified block classification and filtering can be used. The virtual boundary (1130) is defined by dividing the horizontal CTU boundary (1120) by "N" as shown in FIG. 11A. samples ” sample, where N samples can be a positive integer. In one example, N samples is equal to 4 for the luma component, and N samples is equal to 2 for the chroma component.

[0155] Referring to Figure 11A, modified block classification can be applied to the luma component. In one example, for a 1D Laplacian gradient calculation of a 4x4 block (1110) above a virtual boundary (1130), only samples on the virtual boundary (1130) are used. Similarly, referring to Figure 11B, for a 1D Laplacian gradient calculation of a 4x4 block (1111) below a virtual boundary (1131) shifted from the CTU boundary (1121), only samples below the virtual boundary (1131) are used. By taking into account the reduced number of samples used in the 1D Laplacian gradient calculation, the quantization of the activity value A can be scaled accordingly.

[0156] For the filtering process, a symmetric padding operation at the virtual boundary can be used for both the luma component and the chroma component. Figures 12A-12F show an example of such modified ALF filtering for the luma component at the virtual boundary. If a sample to be filtered is located below the virtual boundary, neighboring samples located above the virtual boundary can be padded. If a sample to be filtered is located above the virtual boundary, neighboring samples located below the virtual boundary can be padded. Referring to Figure 12A, neighboring sample C0 can be padded with sample C2 located below the virtual boundary (1210). Referring to Figure 12B, neighboring sample C0 can be padded with sample C2 located above the virtual boundary (1220). Referring to Figure 12C, neighboring samples C1-C3 can be padded with samples C5-C7 located below the virtual boundary (1230), respectively. Referring to Figure 12D, neighboring samples C1-C3 can be padded with samples C5-C7 located above the virtual boundary (1240), respectively. Referring to Figure 12E, neighboring samples C4 to C8 can be padded with samples C10, C11, C12, C11, and C10, respectively, located below the virtual boundary (1250). Referring to Figure 12F, neighboring samples C4 to C8 can be padded with samples C10, C11, C12, C11, and C10, respectively, located above the virtual boundary (1260).

[0157] In some instances, the above description can be appropriately adapted when a sample and a neighboring sample are located to the left (or right) and right (or left) of a virtual boundary.

[0158] According to certain aspects of the present disclosure, a picture can be partitioned based on a filtering process to improve coding efficiency. In some examples, a CTU is also referred to as a largest coding unit (LCU). In one example, a CTU or LCU can have a size of 64x64 pixels. In some embodiments, an LCU-aligned picture quadtree partition can be used for filtering-based partitioning. In some examples, a coding unit-synchronous picture quadtree-based adaptive loop filter can be used. For example, a luma picture can be partitioned into several multi-level quadtree partitions, with each partition boundary aligned with an LCU boundary. Each partition has its own filtering process and is therefore referred to as a filter unit (FU).

[0159] In some examples, a two-pass encoding flow can be used. In the first pass of the two-pass encoding flow, a quadtree partitioning pattern for the picture and the best filter for each FU can be determined. In some embodiments, the determination of the quadtree partitioning pattern for the picture and the determination of the best filter for the FU are based on filtering distortion. The filtering distortion can be estimated by a fast filtering distortion estimation (FFDE) technique in the decision process. The picture is partitioned using a quadtree partition. The reconstructed picture can be filtered according to the determined quadtree partitioning pattern and the selected filters for all FUs.

[0160] In the second pass of the two-pass encoding flow, CU-synchronous ALF on / off control is performed. According to the ALF on / off result, the first filtered picture is partially restored by the reconstructed picture.

[0161] Specifically, in some examples, a top-down partitioning strategy is adopted to divide a picture into multi-level quadtree partitions by using a rate-distortion criterion. Each partition is called a filter unit (FU). The partitioning process aligns the quadtree partitions to LCU boundaries. The encoding order of the FUs follows the z-scan order.

[0162] 13 illustrates an example of division according to some embodiments of the present disclosure. In the example of FIG. 13, a picture (1300) is divided into 10 FUs, and the encoding order is FU0, FU1, FU2, FU3, FU4, FU5, FU6, FU7, FU8, and FU9.

[0163] Figure 14 shows a quadtree partitioning pattern (1400) for a picture (1300). In the example of Figure 14, a split flag is used to indicate the picture partitioning pattern. For example, a "1" indicates that quadtree partitioning is performed on the block, and a "0" indicates that the block is not further partitioned. In some examples, the smallest size FU has the LCU size, and no split flag is needed for the smallest size FU. The split flag is encoded and transmitted in z-order as shown in Figure 14.

[0164] In some examples, the filter for each FU is selected from two filter sets based on a rate-distortion criterion. The first set includes half-symmetric square and diamond filters derived for the current FU. The second set comes from a time-delay filter buffer, which stores filters previously derived for FUs of previous pictures. The filter with the smallest rate-distortion cost of these two sets can be selected for the current FU. Similarly, if the current FU is not the smallest FU and can be further divided into four child FUs, the rate-distortion costs of the four child FUs are calculated. By recursively comparing the rate-distortion costs of the divided and non-divided cases, a picture quadtree division pattern can be determined.

[0165] In some examples, a maximum quadtree decomposition level can be used to limit the maximum number of FUs. In one example, if the maximum quadtree decomposition level is 2, the maximum number of FUs is 16. Furthermore, during the quadtree decomposition decision, correlation values ​​for deriving Wiener coefficients for the 16 FUs at the lowest quadtree level (minimum FUs) can be reused. For the remaining FUs, Wiener filters can be derived from the correlations of the 16 FUs at the lowest quadtree level. Therefore, in this example, only one frame buffer access is performed to derive filter coefficients for all FUs.

[0166] After the quadtree division pattern is determined, CU-synchronous ALF on / off control can be performed to further reduce filtering distortion. By comparing the filtering distortion and non-filtering distortion in each leaf CU, the leaf CU can explicitly switch ALF on / off in its local region. In some examples, coding efficiency can be further improved by redesigning the filter coefficients according to the ALF on / off results.

[0167] The cross-component filtering process can apply a cross-component filter, such as a cross-component adaptive loop filter (CC-ALF). The cross-component filter can use the luma sample values ​​of a luma component (e.g., luma CB) to refine a chroma component (e.g., chroma CB corresponding to luma CB). In one example, the luma CB and chroma CB are included in a CU.

[0168] FIG. 15 illustrates a cross-component filter (e.g., CC-ALF) used to generate chroma components according to certain embodiments of the present disclosure. In some examples, FIG. 15 illustrates a filtering process for a first chroma component (e.g., first chroma CB), a second chroma component (e.g., second chroma CB), and a luma component (e.g., luma CB). The luma component may be filtered by a sample adaptive offset (SAO) filter (1510) to generate an SAO-filtered luma component (1541). The SAO-filtered luma component (1541) may be further filtered by an ALF luma filter (1516) to result in a filtered luma CB (1561) (e.g., "Y").

[0169] The first chroma component may be filtered by an SAO filter (1512) and an ALF chroma filter (1518) to generate a first intermediate component (1552). Further, the SAO-filtered luma component (1541) may be filtered by a cross-component filter (e.g., CC-ALF) (1521) for the first chroma component to generate a second intermediate component (1542). Thereafter, a filtered first chroma component (1562) (e.g., "Cb") may be generated based on at least one of the second intermediate component (1542) and the first intermediate component (1552). In one example, the filtered first chroma component (1562) (e.g., "Cb") may be generated by combining the second intermediate component (1542) and the first intermediate component (1552) using an adder (1522). The cross-component adaptive loop filtering process for the first chroma component may include steps performed by the CC-ALF (1521) and steps performed by, for example, an adder (1522).

[0170] The above description can be applied to the second chroma component. The second chroma component can be filtered by the SAO filter (1514) and the ALF chroma filter (1518) to generate a third intermediate component (1553). Furthermore, the SAO-filtered luma component (1541) can be filtered by a cross-component filter (e.g., CC-ALF) for the second chroma component (1531) to generate a fourth intermediate component (1543). Then, a filtered second chroma component (1563) (e.g., “Cr”) can be generated based on at least one of the fourth intermediate component (1543) and the third intermediate component (1553). In one example, the filtered second chroma component (1563) (e.g., “Cr”) can be generated by combining the fourth intermediate component (1543) and the third intermediate component (1553) using an adder (1532). In one example, the cross-component adaptive loop filtering process for the second chroma component may include steps performed by a CC-ALF (1531) and steps performed, for example, by an adder (1532).

[0171] The cross-component filters (e.g., CC-ALF(1521), CC-ALF(1531)) can operate by applying a linear filter with any suitable filter shape to the luma component (or luma channel) to refine each chroma component (e.g., first chroma component, second chroma component).

[0172] FIG. 16 shows an example of a filter (1600) according to an embodiment of the present disclosure. The filter (1600) may include non-zero and zero filter coefficients. The filter (1600) has a diamond shape (1620) (shown as a filled-in black circle) formed by the filter coefficients (1610). In one example, the non-zero filter coefficients in the filter (1600) are included in the filter coefficients (1610), and the filter coefficients not included in the filter coefficients (1610) are zero. Thus, the non-zero filter coefficients in the filter (1600) are included in the diamond shape (1620), and the filter coefficients not included in the diamond shape (1620) are zero. In one example, the number of filter coefficients in the filter (1600) is equal to the number of filter coefficients (1610), which is 18 in the embodiment shown in FIG. 16.

[0173] The CC-ALF can include any suitable filter coefficients (also referred to as CC-ALF filter coefficients). Referring back to Figure 15, the CC-ALF (1521) and the CC-ALF (1531) can have the same filter shape, such as the diamond shape (1620) shown in Figure 16, and the same number of filter coefficients. In one example, the values ​​of the filter coefficients in the CC-ALF (1521) are different from the values ​​of the filter coefficients in the CC-ALF (1531).

[0174] In general, filter coefficients (e.g., non-zero filter coefficients) in CC-ALF may be transmitted, for example, in APS. In one example, the filter coefficients may be multiplied by a factor (e.g., 2 10) and may be rounded for fixed-point representation. The application of CC-ALF may be controlled by variable block sizes and may be signaled by a context-coded flag (e.g., a CC-ALF enable flag) received for each block of samples. Context-coded flags, such as the CC-ALF enable flag, may be signaled at any appropriate level, such as the block level. Block sizes, along with CC-ALF enable flags, may be received at the slice level for each chroma component. Some examples may support block sizes (in chroma samples) of 16x16, 32x32, and 64x64.

[0175] 17 shows an example syntax for CC-ALF according to some embodiments of the present disclosure. In the example of FIG. 17, alf_ctb_cross_component_cross_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is an index that indicates whether a cross-component Cb filter is used, and if so, the index of that cross-component Cb filter. For example, if alf_ctb_cross_component_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is equal to 0, then no cross-component Cb filter is applied to the block of Cb color component samples at luma position (xCtb, yCtb); if alf_ctb_cross_component_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is not equal to 0, then alf_ctb_cross_component_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is an index for the filter to be applied. For example, the alf_ctb_cross_component_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY]th cross-component Cb filter is applied to the block of Cb color component samples at luma position (xCtb, yCtb).

[0176] Further, in the example of Figure 17, alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is used to indicate whether a cross-component Cr filter is used and is the index of the cross-component Cr filter to be used. For example, if alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is equal to 0, then the cross-component Cr filter is not applied to the block of Cr color component samples at luma position (xCtb, yCtb), and if alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is not equal to 0, then alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] is the index of the cross-component Cr filter. For example, the alf_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY]th cross-component Cr filter may be applied to a block of Cr color component samples at luma position (xCtb, yCtb).

[0177] In some examples, a chroma subsampling technique is used, so that the number of samples in each of the chroma blocks can be less than the number of samples in the luma blocks. The chroma subsampling format (also referred to as chroma_format_idc, for example) can indicate the chroma horizontal subsampling factor (e.g., SubWidthC) and the chroma vertical subsampling factor (e.g., SubHeightC) between each of the chroma blocks and the corresponding luma block. In one example, the chroma subsampling format is 4:2:0, so that the chroma horizontal subsampling factor (e.g., SubWidthC) and the chroma vertical subsampling factor (e.g., SubHeightC) are 2, as shown in Figures 18A and 18B. In one example, the chroma subsampling format is 4:2:2, so that the chroma horizontal subsampling factor (e.g., SubWidthC) is 2 and the chroma vertical subsampling factor (e.g., SubHeightC) is 1. In one example, the chroma subsampling format is 4:4:4, and therefore the chroma horizontal subsampling factor (e.g., SubWidthC) and the chroma vertical subsampling factor (e.g., SubHeightC) are 1. The chroma sample type (also called the chroma sample position) may indicate the relative position of a chroma sample in a chroma block relative to at least one corresponding luma sample in the luma block.

[0178] 18A-18B illustrate exemplary locations of chroma samples relative to luma samples according to an embodiment of the present disclosure. Referring to FIG. 18A, luma samples (1801) are located in rows (1811)-(1818). The luma samples (1801) shown in FIG. 18A may represent a portion of a picture. In one example, a luma block (e.g., luma CB) includes luma sample (1801). The luma block may correspond to two chroma blocks with a chroma subsampling format of 4:2:0. In one example, each chroma block includes chroma sample (1803). Each chroma sample (e.g., chroma sample (1803(1))) corresponds to four luma samples (e.g., luma samples (1801(1)))-(1801(4))). In one example, the four luma samples are the top-left sample (1801(1)), the top-right sample (1801(2)), the bottom-left sample (1801(3)), and the bottom-right sample (1801(4)). A chroma sample (e.g., (1803(1))) is located at the center-left position between the top-left sample (1801(1)) and the bottom-left sample (1801(3)). The chroma sample type of the chroma block having chroma sample (1803) can be referred to as chroma sample type 0. Chroma sample type 0 indicates relative position 0, which corresponds to the center-left position halfway between the top-left sample (1801(1)) and the bottom-left sample (1801(3)). The four luma samples (e.g., (1801(1)) through (1801(4))) can be referred to as neighboring luma samples of chroma sample (1803)(1).

[0179] In one example, each chroma block includes chroma samples (1804). The above description of the chroma samples (1803) may also apply to the chroma samples (1804), and therefore, for brevity, detailed descriptions may be omitted. Each of the chroma samples (1804) may be located at the center of the corresponding four luma samples, and the chroma sample type of a chroma block having the chroma sample (1804) may be referred to as chroma sample type 1. Chroma sample type 1 indicates relative position 1, which corresponds to the center of the four luma samples (e.g., (1801(1)) to (1801(4))). For example, one of the chroma samples (1804) may be located at the center of the luma samples (1801(1)) to (1801(4)).

[0180] In one example, each chroma block includes a chroma sample (1805). Each chroma sample (1805) can be located at a top left position that is co-located with the top left sample of the corresponding four luma samples (1801). The chroma sample type of a chroma block having the chroma sample (1805) can be referred to as chroma sample type 2. Thus, each chroma sample (1805) is co-located with the top left sample of the four luma samples (1801) corresponding to the respective chroma sample. Chroma sample type 2 indicates relative position 2, which corresponds to the top left position of the four luma samples (1801). For example, one of the chroma samples (1805) can be located at the top left position of luma samples (1801(1)) to (1801(4)).

[0181] In one example, each chroma block includes chroma samples (1806). Each of the chroma samples (1806) may be located at a top center position between the corresponding top-left sample and the corresponding top-right sample, and the chroma sample type of the chroma block including the chroma sample (1806) may be referred to as chroma sample type 3. Chroma sample type 3 indicates relative position 3, which corresponds to the top center position between the top-left sample (and the top-right sample). For example, one of the chroma samples (1806) may be located at the top center position of luma samples (1801(1)) to (1801(4)).

[0182] In one example, each chroma block includes a chroma sample (1807). Each chroma sample (1807) may be located at a lower left position that is co-located with the lower left sample of the four corresponding luma samples (1801). The chroma sample type of the chroma block including the chroma sample (1807) may be referred to as chroma sample type 4. Thus, each chroma sample (1807) is co-located with the lower left sample of the four corresponding luma samples (1801). Chroma sample type 4 indicates relative position 4, which corresponds to the lower left position of the four luma samples (1801). For example, one of the chroma samples (1807) may be located at the lower left position of luma samples (1801(1)) to (1801(4)).

[0183] In one example, each chroma block includes chroma samples (1808). Each of the chroma samples (1808) is located at the bottom center between the bottom left and bottom right samples, and the chroma sample type of the chroma block including the chroma samples (1808) can be referred to as chroma sample type 5. Chroma sample type 5 indicates relative position 5, which corresponds to the bottom center between the bottom left and bottom right samples of the four luma samples (1801). For example, one of the chroma samples (1808) can be located between the bottom left and bottom right samples of luma samples (1801(1)) to (1801(4)).

[0184] In general, any suitable chroma sample type can be used for a chroma subsampling format. Chroma sample types 0 through 5 are exemplary chroma sample types described for the chroma subsampling format 4:2:0. For the chroma subsampling format 4:2:0, additional chroma sample types may be used. Furthermore, other chroma sample types and / or variations of chroma sample types 0 through 5 can be used for other chroma subsampling formats, such as 4:2:2, 4:4:4, etc. In one example, a chroma sample type combining chroma samples (1805) and (1807) is used for the chroma subsampling format 4:2:2.

[0185] In one example, a luma block can be considered to have alternating rows such as rows 1811-1812, each including the top two samples (e.g., 1801(1)-1801(2)) and the bottom two samples (e.g., 1801(3)-1801(4)) of four luma samples (e.g., 1801(1)-1801(4)). Thus, rows 1811, 1813, 1815, and 1817 can be referred to as the current row (also referred to as the front field), and rows 1812, 1814, 1816, and 1818 can be referred to as the next row (also referred to as the back field). Four luma samples (e.g., (1801(1)) to (1801(4))) are located on the current row (e.g., (1811)) and the next row (e.g., (1812)). Relative positions 2-3 are located on the current row, relative positions 0-1 are located between each current row and the respective next row, and relative positions 4-5 are located on the next row.

[0186] Chroma samples 1803, 1804, 1805, 1806, 1807, or 1808 are located in rows 1851-1854 in each chroma block. The specific locations of rows 1851-1854 may depend on the chroma sample type of the chroma samples. For example, for chroma samples 1803-1804 with chroma sample types 0-1, respectively, row 1851 is located between rows 1811-1812. For chroma samples 1805-1806 with chroma sample types 2-3, respectively, row 1851 is co-located with the current row 1811. For chroma samples 1807-1808 having respective chroma sample types 4-5, row 1851 is co-located with the next row 1812. The above description can be applied appropriately to rows 1852-1854, and a detailed description will be omitted for brevity.

[0187] Any suitable scanning method can be used to display, store, and / or transmit the luma blocks and corresponding chroma blocks described above in Figure 18A. In one example, progressive scanning is used.

[0188] As shown in Figure 18B, interlaced scanning can be used. As previously mentioned, the chroma subsampling format is 4:2:0 (e.g., chroma_format_idc equals 1). In one example, the variable chroma location type (e.g., ChromaLocType) indicates the current row (e.g., ChromaLocType is chroma_sample_loc_type_top_field) or the next row (e.g., ChromaLocType is chroma_sample_loc_type_bottom_field). The current rows (1811), (1813), (1815), and (1817) and the next rows (1812), (1814), (1816), and (1818) can be scanned separately. For example, current rows (1811), (1813), (1815), and (1817) are scanned first, followed by the next rows (1812), (1814), (1816), and (1818). The current row can contain luma sample (1801), and the next row can contain luma sample (1802).

[0189] Similarly, corresponding chroma blocks can be interlaced. Rows 1851 and 1853, which contain unfilled chroma samples 1803, 1804, 1805, 1806, 1807, or 1808, can be referred to as the current row (or current chroma row), and rows 1852 and 1854, which contain gray-filled chroma samples 1803, 1804, 1805, 1806, 1807, or 1808, can be referred to as the next row (or next chroma row). In one example, during interlaced scanning, rows 1851 and 1853 are scanned first, followed by rows 1852 and 1854.

[0190] In some examples, a constrained directional enhancement filtering technique can be used. The use of a constrained directional enhancement filter (CDEF) in the loop can remove coding artifacts while preserving image details. In one example (e.g., HEVC), a sample adaptive offset algorithm can achieve a similar goal by defining signal offsets for different classes of pixels. Unlike SAO, CDEF is a nonlinear spatial filter. In some examples, CDEF can be constrained to be easily vectorizable (i.e., implementable with single instruction multiple data (SIMD) operations). Note that other nonlinear filters, such as median filters and bilateral filters, cannot be handled in the same manner.

[0191] In some cases, the amount of ringing artifacts in a coded image tends to be roughly proportional to the quantization step size. While the amount of detail is a property of the input image, the smallest detail retained in the quantized image also tends to be proportional to the quantization step size. For a given quantization step size, the amplitude of the ringing is generally smaller than the amplitude of the detail.

[0192] The CDEF can be used to identify the orientation of each block and then adaptively filter along the identified orientation and to a lesser extent along orientations rotated 45 degrees from the identified orientation. In some examples, the encoder can search for filter strength, which can be explicitly signaled, allowing a high degree of control over blurring.

[0193] Specifically, in some examples, the direction search is performed on the reconstructed pixels immediately after the deblocking filter. Because these pixels are available to the decoder, the direction can be searched by the decoder, and thus, in one example, the direction does not require signaling. In some examples, the direction search can operate on a block size, such as an 8x8 block, that is small enough to properly handle non-straight edges but large enough to reliably estimate the direction when applied to a quantized image. Also, having a consistent direction across the 8x8 region facilitates vectorization of the filter. In some examples, each block (e.g., 8x8) can be compared to a perfectly oriented block to determine the difference. A perfectly oriented block is a block in which all of the pixels along a line of one direction have the same value. In one example, a measure of the difference between the block and the perfectly oriented block, such as the sum of squared differences (SSD) or root-mean-square (RMS) error, can be calculated. A perfectly oriented block with the smallest difference (e.g., smallest SSD, smallest RMS, etc.) can then be determined, and the direction of the determined perfectly oriented block can be the direction that best matches the pattern within that block.

[0194] FIG. 19 illustrates an example of direction search according to an embodiment of the present disclosure. In one example, block (1910) is an 8x8 block that is reconstructed and output from a deblocking filter. In the example of FIG. 19, the direction search can determine the direction of block (1910) from eight directions indicated by (1920). Eight perfectly oriented blocks (1930) are formed corresponding to the eight directions (1920), respectively. A perfectly oriented block corresponding to a certain direction is a block whose pixels along the line of that direction have the same value. Furthermore, difference metrics such as SSD and RMS error between block (1910) and each of the perfectly oriented blocks (1930) can be calculated. In the example of FIG. 19, the RMS error is indicated by (1940). As indicated by (1943), the RMS error between block (1910) and the perfectly oriented block (1933) is the smallest, and therefore direction (1923) is the direction that best matches the pattern of block (1910).

[0195] After the block direction is identified, a nonlinear low-pass directional filter can be determined. For example, the filter taps of the nonlinear low-pass directional filter can be aligned along the identified direction to reduce ringing while preserving directional edges or patterns. However, in some instances, directional filtering alone may not be sufficient to reduce ringing. In one example, additional filter taps are also used for pixels that do not lie along the identified direction. To reduce the risk of blurring, the additional filter taps are treated more conservatively. For this reason, the CDEF includes first-order and second-order filter taps. In one example, the complete 2-D CDEF filter can be expressed as Equation (14):

number

[0196] In some examples, in-loop restoration schemes are used in video coding after deblocking to generally remove noise and improve edge quality beyond the deblocking operation. In one example, the in-loop restoration scheme is switchable within a frame for each appropriately sized tile. In-loop restoration schemes are based on a separable symmetric Wiener filter, a dual self-guided filter with subspace projection, and a domain transform recursive filter. Because content statistics can change substantially within a frame, the in-loop restoration schemes are integrated into a switchable framework where different schemes can be triggered in different regions of the frame.

[0197] A separable symmetric Wiener filter can be one of the in-loop restoration methods. In some instances, every pixel in a corrupted frame can be reconstructed as a non-causal filtered version of the pixels in a w × w window around it, where w = 2r + 1 is odd with respect to the integer r. The 2D filter taps are arranged in a column vector form as w 2 If F is a 1×1 vector, then straightforward LMMSE optimization yields the filter parameters F=H -1M, where H=E[XX T ] is the autocovariance of x, and w in a w × w window around the pixel 2 is a column vectorized version of the samples, M=E[YX T ] is the cross-correlation of x with the scalar source sample y, which is to be estimated. In one example, the encoder can estimate H and M from realizations in the deblocked frame and source, and send the resulting filter F to the decoder. However, this requires that w 2 Not only does transmitting the taps incur a substantial bitrate cost, but non-separable filtering also makes decoding prohibitively complex. In some embodiments, several additional constraints are placed on the nature of F. For the first constraint, F is constrained to be separable so that the filtering can be implemented as separable horizontal and vertical w-tap convolutions. For the second constraint, the horizontal and vertical filters are constrained to be symmetric. For the third constraint, both the horizontal and vertical filter coefficients are assumed to sum to one.

[0198] Dual self-guided filtering with subspace projection can be one of the in-loop recovery methods. The guided filtering uses Equation (15) to calculate the filtered output y from the unfiltered samples x: y=Fx+G Eq.(15) is an image filtering technique in which a locally linear model, denoted by, is used. Here, F and G are determined based on the statistics of the degraded image and the guide image in the neighborhood of the filtered pixel. If the guide image is the same as the degraded image, the resulting so-called self-guided filtering has the effect of smoothing, preserving edges. In one example, a specific form of self-guided filtering can be used. The specific form of self-guided filtering depends on two parameters, the radius r and the noise parameter e, and can be enumerated as the following steps: 1. The mean μ and variance σ of pixels in a (2r+1) × (2r+1) window around each pixel 2 This step can be implemented efficiently using box filtering based on integrated imaging. 2. For every pixel: f=σ 2 / (σ 2 +e);g = (1-f)μ. 3. Calculate F and G for each pixel as the average of the f and g values ​​in a 3x3 window around the pixel being used.

[0199] The particular shape of the self-guided filter is controlled by r and e, where a larger r means a larger spatial variance and a larger e means a larger range variance.

[0200] Figure 20 shows examples illustrating subspace projection in some cases. As shown in Figure 20, neither of the reconstructions X1, X2 is close to the source Y, but appropriate multipliers {α, β} can bring them much closer to the source Y as long as they are moving in the right direction.

[0201] In some examples (e.g., HEVC), a filtering technique called sample adaptive offset (SAO) can be used. In some examples, SAO is applied to the reconstructed signal after the deblocking filter. SAO can use an offset value provided in the slice header. In some examples, for luma samples, the encoder can decide whether to apply (enable) SAO for a slice. When SAO is enabled, the current picture allows for recursive division of the coding unit into four subregions, and each subregion can select from multiple SAO types based on the characteristics within that subregion.

[0202] FIG. 21 shows a table (2100) of multiple SAO types according to an embodiment of the present disclosure. In the table (2100), SAO types 0 to 6 are shown. Note that SAO type 0 is used to indicate no SAO is applied. Each SAO type, SAO type 1 to SAO type 6, includes multiple categories. SAO can reduce distortion by classifying reconstructed pixels of a subregion into categories and adding an offset to pixels of each category within the subregion. In some examples, edge characteristics can be used for pixel classification in SAO types 1 to 4, and pixel intensity can be used for pixel classification in SAO types 5 and 6.

[0203] Specifically, in some embodiments, such as SAO Types 5-6, a band offset (BO) can be used to classify all pixels in a subregion into multiple bands. Each band of the multiple bands contains pixels within the same intensity interval. In some examples, the intensity range is evenly divided into multiple intervals, such as 32 intervals from zero to the maximum intensity value (e.g., 255 for 8-bit pixels), and each interval is associated with an offset. Furthermore, in one example, the 32 bands are divided into two groups, such as a first group and a second group. The first group contains the central 16 bands (e.g., the 16 intervals in the middle of the intensity range), and the second group contains the remaining 16 bands (e.g., 8 intervals at the low end of the intensity range and 8 intervals at the high end of the intensity range). In one example, only the offset of one of the two groups is transmitted. In some embodiments, when a pixel classification operation in BO is used, the five most significant bits of each pixel can be directly used as a band index.

[0204] Additionally, in some embodiments, such as SAO Types 1-4, edge offsets (EOs) can be used to determine pixel classification and offsets. For example, pixel classifications can be determined based on one-dimensional 3-pixel patterns, taking into account edge direction information.

[0205] FIG. 22 shows an example of a three-pixel pattern for pixel classification at edge offset in some examples. In the example of FIG. 22, a first pattern (2210) (shown with three gray pixels) is referred to as a 0-degree pattern (horizontal orientation is associated with the 0-degree pattern), a second pattern (2220) (shown with three gray pixels) is referred to as a 90-degree pattern (diagonal orientation is associated with the 90-degree pattern), a third pattern (2230) (shown with three gray pixels) is referred to as a 135-degree pattern (diagonal orientation is associated with the 135-degree pattern), and a fourth pattern (2240) (shown with three gray pixels) is referred to as a 45-degree pattern (diagonal orientation is associated with the 45-degree pattern). In one example, one of the four directional patterns shown in FIG. 22 can be selected based on edge directional information for the subregion. The selection can be sent in the coded video bitstream, for example, as side information. The pixels within the sub-region can then be classified into multiple categories by comparing each pixel with its two neighboring pixels on a direction associated with the directional pattern.

[0206] Figure 23 shows a table (2300) of pixel classification rules for edge offsets in some examples. Specifically, pixel c (also shown in each pattern in Figure 22) is compared with two neighboring pixels (shown in gray in each pattern in Figure 22), and pixel c can be classified into one of categories 0 to 4 based on the comparison according to the pixel classification rules shown in Figure 23.

[0207] In some embodiments, decoder-side SAO can operate independently of the largest coding unit (LCU) (e.g., CTU) to conserve line buffers. In some examples, when a 90-degree, 135-degree, 45-degree classification pattern is selected, pixels in the top and bottom rows in each LCU are not SAO processed; when a 0-degree, 135-degree, 45-degree pattern is selected, pixels in the leftmost and rightmost columns in each LCU are not SAO processed.

[0208] FIG. 24 shows an example of syntax (2400) that may need to be signaled for a CTU when parameters from neighboring CTUs are not merged. For example, the syntax element sao_type_idx[cldx][rx][ry] can be signaled to indicate the SAO type of the subregion. The SAO type can be BO (Band Offset) or EO (Edge Offset). A value of 0 for sao_type_idx[cldx][rx][ry] indicates that SAO is off; values ​​of 1 to 4 indicate that one of four EO categories corresponding to 0°, 90°, 135°, and 45° is used; a value of 5 indicates that BO is used. In the example of FIG. 24, each of the BO and EO types has four SAO offset values ​​that can be signaled (sao_offset[cIdx][rx][ry][0] to sao_offset[cIdx][rx][ry][3]).

[0209] In general, a filtering process can use reconstructed samples of a first color component as input (e.g., Y or Cb or Cr or R or G or B) to generate an output, and the output of the filtering process is applied to a second color component, which may be the same as the first color component or may be another color component different from the first color component.

[0210] In a related example of cross-component filtering (CCF), filter coefficients are derived based on several mathematical formulas. The derived filter coefficients are signaled from the encoder side to the decoder side, where they are used to generate offsets using a linear combination. The generated offsets are then added to the reconstructed samples as a filtering process. For example, an offset is generated based on a linear combination of the luma samples and the filtering coefficients, and the generated offsets are added to the reconstructed chroma samples. This related example of CCF is based on the assumption of a linear mapping relationship between the reconstructed luma sample values ​​and the delta values ​​between the original and reconstructed chroma samples. However, the mapping between the reconstructed luma sample values ​​and the delta values ​​between the original and reconstructed chroma samples does not necessarily follow a linear mapping process. Therefore, the coding performance of CCF may be limited under the assumption of a linear mapping relationship.

[0211] In some examples, nonlinear mapping techniques can be used in cross-component filtering and / or in the same color component filtering without significant signaling overhead. In one example, a nonlinear mapping technique can be used in cross-component filtering to generate cross-component sample offsets. In another example, a nonlinear mapping technique can be used in the same color component filtering to generate local sample offsets.

[0212] For convenience, a filtering process using a nonlinear mapping technique can be referred to as sample offset by nonlinear mapping (SO-NLM). SO-NLM in a cross-component filtering process can be referred to as cross-component sample offset (CCSO). SO-NLM in the same color component filtering can be referred to as local sample offset (LSO). A filter using a nonlinear mapping technique can be referred to as a nonlinear mapping-based filter. Nonlinear mapping-based filters can include CCSO filters, LSO filters, etc.

[0213] In one example, CCSO and LSO can be used as loop filtering to reduce distortion of reconstructed samples. CCSO and LSO do not rely on the linear mapping assumption used in the associated exemplary CCF. For example, CCSO does not rely on the assumption of a linear mapping relationship between luma reconstructed sample values ​​and delta values ​​between original chroma samples and the chroma reconstructed samples. Similarly, LSO does not rely on the assumption of a linear mapping relationship between reconstructed sample values ​​of color components and delta values ​​between original samples of the color components and the reconstructed samples of the color components.

[0214] In the following description, an SO-NLM filtering process is described, which uses reconstructed samples of a first color component (e.g., Y or Cb or Cr, or R or G or B) as input to generate an output, and the output of the filtering process is applied to a second color component. If the second color component is the same color component as the first color component, this description is applicable to LSO; if the second color component is different from the first color component, this description applies to CCSO.

[0215] In SO-NLM, a nonlinear mapping is derived on the encoder side. The nonlinear mapping is between the reconstructed samples of the first color component within the filter support region and the offset added to the second color component within the filter support region. If the second color component is the same as the first color component, the nonlinear mapping is used in LSO; if the second color component is different from the first color component, the nonlinear mapping is used in CCSO. The domain of the nonlinear mapping is determined by the different combinations of the processed input reconstructed samples (also called possible reconstructed sample value combinations).

[0216] The SO-NLM technique can be illustrated using a specific example, in which a reconstructed sample from a first color component located within a filter support area (also called a "filter support region") is determined. The filter support region is the region within which a filter can be applied, and the filter support region can have any suitable shape.

[0217] FIG. 25 illustrates an example of a filter region of support (2500) according to some embodiments of the present disclosure. The filter region of support (2500) includes four reconstructed samples of a first color component, P0, P1, P2, and P3. In the example of FIG. 25, the four reconstructed samples may form a cross shape in the vertical and horizontal directions, with the center of the cross shape being the location of the sample to be filtered. The sample at the center and of the same color component as P0-P3 is represented by C. The sample at the center and of the second color component is represented by F. The second color component may be the same as the first color component, P0-P3, or may be different from the first color component, P0-P3.

[0218] FIG. 26 illustrates another example of a filter region of support (2600) according to some embodiments of the present disclosure. The filter region of support (2600) includes four reconstructed samples P0, P1, P2, and P3 of a first color component that form a square shape. In the example of FIG. 26, the center of the square shape is the location of the sample to be filtered. The sample at the center and of the same color component as P0-P3 is represented by C. The sample at the center and of the second color component is represented by F. The second color component may be the same as the first color component P0-P3 or may be different from the first color component P0-P3.

[0219] The reconstructed samples are input to the SO-NLM filter and processed appropriately to form the filter taps. In one example, the positions of the reconstructed samples that are input to the SO-NLM filter are called filter tap positions. In a particular example, the reconstructed samples are processed in two steps:

[0220] In the first step, the delta values ​​between P0 to P3 and C are calculated. For example, m0 represents the delta value between P0 and C, m1 represents the delta value between P1 and C, m2 represents the delta value between P2 and C, and m3 represents the delta value between P3 and C.

[0221] In a second step, the delta values ​​m0-m3 are further quantized, and the quantized values ​​are represented as d0, d1, d2, and d3. In one example, the quantized values ​​may be either -1, 0, or 1 based on the quantization process. For example, if m is less than -N (N is a positive value and is referred to as the quantization step size), the value m may be quantized to -1; if m is in the range of [-N,N], the value m may be quantized to 0; and if m is greater than N, the value m may be quantized to 1. In some examples, the quantization step size N may be one of 4, 8, 12, 16, etc.

[0222] In some embodiments, the quantized values ​​d0-d3 are filter taps and can be used to identify a combination within the filter domain. For example, the filter taps d0-d3 can form a combination within the filter domain. Each filter tap can have three quantized values, so if four filter taps are used, the filter domain contains 81 (3 x 3 x 3 x 3) combinations.

[0223] 27A-27C show a table (2700) having 81 combinations according to an embodiment of the present disclosure. Table (2700) includes 81 rows corresponding to the 81 combinations. In each row corresponding to a combination, the first column includes an index of the combination; the second column includes a value of filter tap d0 for that combination; the third column includes a value of filter tap d1 for that combination; the fourth column includes a value of filter tap d2 for that combination; the fifth column includes a value of filter tap d3 for that combination; and the sixth column includes an offset value associated with that combination for the nonlinear mapping. In one example, when filter taps d0-d3 are determined, an offset value (represented by s) associated with the combination of d0-d3 can be determined according to table (2700). In one example, offset values ​​s0-s80 are integers such as 0, 1, -1, 3, -3, 5, -5, or -7.

[0224] In some embodiments, a final filtering process of SO-NLM can be applied as shown in equation (16): f'=clip(f+s) Eq.(16) where f is the reconstructed sample of the second color component to be filtered, and s is an offset value determined according to the filter taps resulting from processing the reconstructed sample of the first color component, such as by using table (2700). The sum of the reconstructed sample F and the offset value s is further clipped to within a range related to the bit depth to determine the final filtered sample f' of the second color component.

[0225] Note that in the case of LSO, the second color component in the above description is the same as the first color component; in the case of CCSO, the second color component in the above description may be different from the first color component.

[0226] It should be noted that the above description can be adjusted for other embodiments of the present disclosure.

[0227] In some examples, at the encoder side, the encoding device may derive a mapping between reconstructed samples of a first color component within the filter support region and an offset to be added to reconstructed samples of a second color component. The mapping may be any suitable linear or nonlinear mapping. Then, a filtering process may be applied at the encoder side and / or the decoder side based on the mapping. For example, the mapping may be appropriately signaled to the decoder (e.g., the mapping may be included in the coded video bitstream transmitted from the encoder side to the decoder side), and the decoder may then perform the filtering process based on the mapping.

[0228] According to some aspects of the present disclosure, the implementation of nonlinear mapping-based filters, such as CCSO filters and LSO filters, relies on filter shape configuration. Using a fixed filter shape configuration can limit the performance of the nonlinear mapping-based filters. Aspects of these techniques provide switchable filter shape configuration techniques for nonlinear mapping-based filters, such as CCSO filters and LSO filters.

[0229] According to some aspects of the present disclosure, the filter geometry configuration (also referred to as filter shape) of a filter can refer to the characteristics of the pattern formed by the filter tap locations. The pattern can be defined by various parameters, such as the geometric shape of the filter tap locations, the distance of the filter tap locations to the center of the pattern, etc.

[0230] In some embodiments, the filter shape configuration of a nonlinear mapping-based filter, such as a CCSO filter or an LSO filter, may have a cross-shaped geometry. Specifically, filter tap positions are located above, below, to the left, and to the right of a center position of the filter tap positions. The distance from the filter tap position to the center of the filter tap position (denoted by n), in samples, may be any suitable positive integer, such as 1, 2, 3, 4, 5, etc., in one example.

[0231] FIG. 28 illustrates an example of a filter shape configuration (2800) according to an embodiment of the present disclosure. The filter shape configuration (2800) has a cross-shaped geometry, and the distance of the filter tap positions to the center of the filter shape configuration (2800) is one sample (n=1). In FIG. 28, each circle is used to represent a sample. The center position is indicated by C in FIG. 28. The filter shape configuration (2800) includes four filter tap positions indicated by p0, p1, p2, and p3. As shown, filter tap position p0 is above center position C; filter tap position p1 is to the left of center position C; filter tap position p2 is below center position C; and filter tap position p3 is to the right of center position C. The distance between filter tap position p0 and center position C is 1 sample; the distance between filter tap position p1 and center position C is 1 sample; the distance between filter tap position p2 and center position C is 1 sample; and the distance between filter tap position p3 and center position C is 1 sample.

[0232] In one example, to apply the filter of filter shape configuration (2800) to a sample, the sample to be filtered is located at center position C; a reconstructed sample located at filter tap position p0 is used to derive the first filter tap (d0); a reconstructed sample located at filter tap position p1 is used to derive the second filter tap (d1); a reconstructed sample located at filter tap position p2 is used to derive the third filter tap (d2); and a reconstructed sample located at filter tap position p3 is used to derive the fourth filter tap (d1). Filter taps d0 through d3 are then used to determine the sample offset to be applied to the sample to be filtered.

[0233] FIG. 29 illustrates another example of a filter shape configuration (2900) according to an embodiment of the present disclosure. The filter shape configuration (2900) has a cross-shaped geometric shape, and the distance of the filter tap positions to the center of the filter shape configuration (2900) is four samples (n=4). Specifically, each circle is used to represent a sample, and the center position is indicated by C in FIG. 29. The filter shape configuration (2900) includes four filter tap positions indicated by p0, p1, p2, and p3. As shown in FIG. 29, filter tap position p0 is above center position C; filter tap position p1 is to the left of center position C; filter tap position p2 is below center position C; and filter tap position p3 is to the right of center position C. The distance of filter tap position p0 to center position C is 4 samples; the distance of filter tap position p1 to center position C is 4 samples; the distance of filter tap position p2 to center position C is 4 samples; and the distance of filter tap position p3 to center position C is 4 samples.

[0234] In one example, to apply the filter of filter shape configuration (2900) to a sample, the sample to be filtered is located at center position C; a reconstructed sample located at filter tap position p0 is used to derive the first filter tap (d0); a reconstructed sample located at filter tap position p1 is used to derive the second filter tap (d1); a reconstructed sample located at filter tap position p2 is used to derive the third filter tap (d2); and a reconstructed sample located at filter tap position p3 is used to derive the fourth filter tap (d1). Filter taps d0 through d3 are then used to determine the sample offset to be applied to the sample to be filtered.

[0235] FIG. 30 illustrates an example of a filter shape configuration (3000) according to an embodiment of the present disclosure. The filter shape configuration (3000) has a rectangular geometric shape, and the distance of a filter tap position to the center of the filter tap position is one sample (n=1). Specifically, the center position is indicated by C in FIG. 30. The filter shape configuration (3000) includes four filter tap positions indicated by q0, q1, q2, and q3. As shown, filter tap position q0 is located to the upper left of center position C; filter tap position q1 is located to the lower left of center position C; filter tap position q2 is located to the lower right of center position C; and filter tap position q3 is located to the upper right of center position C. The distance from filter tap position q0 to center position C is 1 sample; the distance from filter tap position q1 to center position C is 1 sample; the distance from filter tap position q2 to center position C is 1 sample; and the distance from filter tap position q3 to center position C is 1 sample.

[0236] In one example, to apply the filter of filter shape configuration (3000) to a sample, the sample to be filtered is located at center position C; a reconstructed sample located at filter tap position q0 is used to derive the first filter tap (d0); a reconstructed sample located at filter tap position q1 is used to derive the second filter tap (d1); a reconstructed sample located at filter tap position q2 is used to derive the third filter tap (d2); and a reconstructed sample located at filter tap position q3 is used to derive the fourth filter tap (d1). Filter taps d0 through d3 are then used to determine the sample offset to be applied to the sample to be filtered.

[0237] FIG. 31 illustrates an example of a filter shape configuration (3100) according to an embodiment of the present disclosure. The filter shape configuration (3100) has a rectangular geometric shape, and the distance from filter tap position to the center of the filter tap position is four samples (n=4). Specifically, the center position is indicated by C in FIG. 31. The filter shape configuration (3100) includes four filter tap positions indicated by q0, q1, q2, and q3. As shown, filter tap position q0 is located to the upper left of center position C; filter tap position q1 is located to the lower left of center position C; filter tap position q2 is located to the lower right of center position C; and filter tap position q3 is located to the upper right of center position C. The distance from filter tap position q0 to center position C is 4 samples; the distance from filter tap position q1 to center position C is 4 samples; the distance from filter tap position q2 to center position C is 4 samples; and the distance from filter tap position q3 to center position C is 4 samples.

[0238] In one example, to apply the filter of filter shape configuration (3100) to a sample, the sample to be filtered is located at center position C; a reconstructed sample located at filter tap position q0 is used to derive the first filter tap (d0); a reconstructed sample located at filter tap position q1 is used to derive the second filter tap (d1); a reconstructed sample located at filter tap position q2 is used to derive the third filter tap (d2); and a reconstructed sample located at filter tap position q3 is used to derive the fourth filter tap (d1). Filter taps d0 through d3 are then used to determine the sample offset to be applied to the sample to be filtered.

[0239] According to certain aspects of the present disclosure, the filter shape configurations of a nonlinear mapping-based filter, such as a CCSO filter or an LSO filter, may be switchable during reconstruction of video from a coded video bitstream. The nonlinear mapping-based filter may select one of multiple candidate filter shape configurations at an appropriate level, such as a picture level, a block level, a slice level, or a tile level.

[0240] In some embodiments, multiple candidate filter shape configurations may have the same geometric shape.

[0241] Figure 32 shows three example candidate filter shape configurations 3200 with a cross-shaped geometry. The distances to the center of the filter tap locations for the three candidate filter shape configurations can be different.

[0242] Specifically, in FIG. 32, center position C and filter tap positions p0, p1, p2, and p3 form a first candidate filter shape configuration. Filter tap positions p0, p1, p2, and p3 are one sample away from center position C. Center position C and filter tap positions p0', p1', p2', and p3' form a second candidate filter shape configuration. Filter tap positions p0', p1', p2', and p3' are four samples away from center position C. Center position C and filter tap positions p0", p1", p2", and p3" form a third candidate filter shape configuration. Filter tap positions p0", p1", p2", and p3" are seven samples away from center position C.

[0243] In some examples, one of the first candidate filter shape configuration, the second candidate filter shape configuration, and the third candidate filter shape configuration may be selected at an appropriate level, such as a picture level, a block level, a slice level, a tile level, etc., for use in sample reconstruction at the appropriate level.

[0244] Figure 33 shows two example candidate filter shape configurations (3300) with cross-shaped geometries. The distances to the center of the filter tap positions for the two candidate filter shape configurations can be different.

[0245] Specifically, in Figure 33, center position C and filter tap positions p0, p1, p2, and p3 form a first candidate filter shape configuration. Filter tap positions p0, p1, p2, and p3 are one sample away from center position C. Center position C and filter tap positions p0', p1', p2', and p3' form a second candidate filter shape configuration. Filter tap positions p0', p1', p2', and p3' are four samples away from center position C.

[0246] In some examples, one of the first candidate filter shape configuration and the second candidate filter shape configuration may be selected at an appropriate level, such as a picture level, a block level, a slice level, a tile level, etc., for use in sample reconstruction at the appropriate level.

[0247] It should be noted that the candidate filter shape configurations can have other suitable geometric shapes.

[0248] Figure 34 shows two example candidate filter shape configurations 3400 with rectangular geometries. The distances to the center of the filter tap positions for the two candidate filter shape configurations can be different.

[0249] Specifically, in Figure 34, center position C and filter tap positions q0, q1, q2, and q3 form a first candidate filter shape configuration. The distance from filter tap positions q0, q1, q2, and q3 to center position C is one sample. Center position C and filter tap positions q0', q1', q2', and q3' form a second candidate filter shape configuration. The distance from filter tap positions q0', q1', q2', and q3' to center position C is four samples.

[0250] In some examples, one of the first candidate filter shape configuration and the second candidate filter shape configuration may be selected at an appropriate level, such as a picture level, a block level, a slice level, a tile level, etc., for use in sample reconstruction at the appropriate level.

[0251] Also, note that the candidate filter shape configurations can have different geometries.

[0252] Figure 35 shows four example candidate filter shape configurations (3500) with a mix of cross and rectangular geometries. The distances from the filter tap positions to the center for the four candidate filter shape configurations may vary.

[0253] Specifically, in FIG. 35, a center position C and filter tap positions p0, p1, p2, and p3 form a first candidate filter shape configuration. The distance from filter tap positions p0, p1, p2, and p3 to center position C is one sample. The center position C and filter tap positions p0', p1', p2', and p3' form a second candidate filter shape configuration. The distance from filter tap positions p0', p1', p2', and p3' to center position C is four samples. The first and second candidate filter shape configurations have cross-shaped geometries.

[0254] Furthermore, center position C and filter tap positions q0, q1, q2, and q3 form a third candidate filter shape configuration. The distance from filter tap positions q0, q1, q2, and q3 to center position C is one sample. Center position C and filter tap positions q0', q1', q2', and q3' form a fourth candidate filter shape configuration. The distance from filter tap positions q0', q1', q2', and q3' to center position C is four samples. The third and fourth candidate filter shape configurations have rectangular geometries.

[0255] In some examples, one of the first candidate filter shape configuration, the second candidate filter shape configuration, the third candidate filter shape configuration, and the fourth candidate filter shape configuration may be selected at an appropriate level, such as a picture level, a block level, a slice level, a tile level, etc., for use in sample reconstruction at the appropriate level.

[0256] According to an aspect of the present disclosure, the selection of a filter shape configuration from a plurality of candidate filter shape configurations can be signaled from the encoder to the decoder in the coded video bitstream.

[0257] In one embodiment, the filter shape configuration switching for a nonlinear mapping-based filter (e.g., CCSO filter, LSO Fitter) is at the picture level. In one example, an index indicating a selected filter shape configuration from multiple candidate filter shape configurations is signaled for each picture in the coded video bitstream.

[0258] In one embodiment, filter shape configuration switching for a nonlinear mapping-based filter (e.g., CCSO filter, LSO fitter) is at the block level. A block may be interpreted as a prediction block, a coding block, or a coding unit, i.e., a CU, a CTU block, a superblock, or a filtering unit (FU). In one example, an index indicating a selected filter shape configuration from multiple candidate filter shape configurations is signaled for each block in the coded video bitstream.

[0259] Note that in some embodiments, an index indicating the selected filter shape configuration can be signaled in a higher level syntax such as APS, slice header, frame header, PPS, SPS, VPS, etc.

[0260] According to certain aspects of the present disclosure, samples at filter tap positions can be preprocessed before being used as input to a nonlinear mapping-based filter, such as a CCSO filter or an LSO filter.

[0261] In one embodiment, a weighted average of the sample values ​​at the filter taps can be calculated.

[0262] FIG. 36 illustrates a pre-processing example (3600) according to an embodiment of the present disclosure. The example (3600) includes eight filter tap positions p0 through p7, as shown in FIG. In one example, the average of the samples at filter tap positions p0 and p1 is calculated and denoted as p0', the average of the samples at filter tap positions p2 and p3 is calculated and denoted as p1', the average of the samples at filter tap positions p4 and p5 is calculated and denoted as p2', and the average of the samples at filter tap positions p6 and p7 is calculated and denoted as p3'. p0', p3', and c are then used as inputs for a nonlinear mapping-based filter, such as a CCSO filter or an LSO filter.

[0263] Note that the average calculation may be a weighted average. For example, when calculating the average of samples at filter tap positions p0 and p1, the sample at p0 and the sample at p1 may be weighted differently.

[0264] In another embodiment, a pre-filtering process can be applied to the samples located at the filter taps.

[0265] 37 illustrates an example of pre-processing (3700) according to an embodiment of the present disclosure, where the example (3700) includes four filter tap positions p0, p1, p2, and p3. In one example, a filtering (pre-filtering) process is applied to samples at a filter tap position based on samples located close to (e.g., adjacent to, or within a distance of K samples, where K is a positive integer) the filter tap position.

[0266] For example, a first filtering (pre-filtering) process based on the first samples at adjacent positions q0-q3 is applied to the first sample at filter tap position p0; a second filtering (pre-filtering) process based on the second samples at adjacent positions r0-r3 is applied to the second sample at filter tap position p1; a third filtering (pre-filtering) process based on the third samples at adjacent positions s0-s3 is applied to the third sample at filter tap position p2; and a fourth filtering (pre-filtering) process based on the fourth samples at adjacent positions t0-t3 is applied to the fourth sample at filter tap position p3. The first filtered sample, the second filtered sample, the third filtered sample, and the fourth filtered sample can then be used as inputs to nonlinear mapping-based filters such as CCSO filters and LSO filters.

[0267] It should be noted that the pre-filtering can be done by any suitable filter, linear or non-linear.

[0268] FIG. 38 shows a flowchart outlining a process (3800) according to an embodiment of the present disclosure. The process (3800) can be used to reconstruct video carried in a coded video bitstream. When the term block is used, the block may be interpreted as a prediction block, a coding unit, a luma block, a chroma block, or the like. In various embodiments, the process (3800) is performed by a processing circuit, such as a processing circuit of a terminal device (310), (320), (330), or (340), a processing circuit that performs the functions of a video encoder (403), a processing circuit that performs the functions of a video decoder (410), a processing circuit that performs the functions of a video decoder (510), or a processing circuit that performs the functions of a video encoder (603). In some embodiments, the process (3800) is implemented in software instructions, such that the processing circuit performs the process (3800) when the processing circuit executes the software instructions. The process begins at (S3801) and proceeds to (S3810).

[0269] At (S3810), a first sample in a video carried in a coded video bitstream is reconstructed based on a nonlinear mapping-based filter having a first filter shape configuration.

[0270] At (S3820), a switch from a first filter shape configuration to a second filter shape configuration is determined. The second filter shape configuration is different from the first filter shape configuration. In some examples, the difference between the first filter shape configuration and the second filter shape configuration may be a geometry of a filter tap position or a distance from a filter tap position to a center of the filter tap position.

[0271] The geometry of the filter tap positions may be a cross geometry or a rectangular geometry. The first filter shape configuration and the second filter shape configuration may have different geometries of the filter tap positions or the same geometries of the filter tap positions. In some examples, the first filter shape configuration and the second filter shape configuration have the same geometry, but the distance from the filter tap positions to the center of the filter tap positions is different for the first filter shape configuration and the second filter shape configuration.

[0272] In some examples, an index is decoded from an encoded video bitstream carrying video. The index indicates a second filter shape configuration. Then, a switch from the first filter shape configuration to the second filter shape configuration is determined based on the index.

[0273] In one example, the index is signaled at the picture level and the switch from the first filter shape configuration to the second filter shape configuration is determined at the picture level, with the first sample being in a first picture of the video and the second sample being in a second picture of the video.

[0274] In another example, the index is signaled at the block level and the switch from the first filter shape configuration to the second filter shape configuration is determined at the block level, where the first sample is in a first block within a picture of the video and the second sample is in a second block within the picture of the video.

[0275] In some examples, the index can be decoded from signaling in higher-level syntax such as a video parameter set (VPS), sequence parameter set (SPS), picture parameter set (PPS), adaptation parameter set (APS), slice header, tile header, or frame header.

[0276] At (S3830), a second sample in the video is reconstructed based on a nonlinear mapping-based filter having a second filter shape configuration.

[0277] The process (3800) proceeds to (S3899) and ends.

[0278] Note that in some instances, the nonlinear mapping-based filter is a cross-component sample offset (CCSO) filter, and in some other instances, the nonlinear mapping-based filter is a local sample offset (LSO) filter.

[0279] It should also be noted that sample values ​​as input to the nonlinear mapping-based filter may be preprocessed. For example, to reconstruct a first sample, a preprocessing operation may be performed on a sample at a filter tap position corresponding to a first filter configuration, and the preprocessing operation may generate a preprocessed sample. The preprocessed sample may then be used as an input to the nonlinear mapping-based filter, and an offset to apply to the first sample may be determined based on the preprocessed sample. In one example, the preprocessing operation is a weighted averaging operation. For example, an average sample value at two or more filter tap positions may be calculated to derive the preprocessed sample. In another example, the preprocessing operation is a filtering operation. For example, a filter may be applied to the sample at the filter tap position to generate a filtered sample as the preprocessed sample. The filter may be any suitable filter, such as a linear filter or a nonlinear filter.

[0280] The process 3800 may be adapted as appropriate. Steps in the process 3800 may be modified and / or omitted. Additional steps may be added. Any suitable order of performance may be used.

[0281] The embodiments of the present disclosure may be used separately or in combination in any order. Furthermore, each method (or embodiment), encoder, and decoder may be implemented by processing circuitry (e.g., one or more processors, or one or more integrated circuits). In one example, the one or more processors execute a program stored on a non-transitory computer-readable medium.

[0282] The techniques described above can be implemented as computer software using computer-readable instructions and can be physically stored on one or more computer-readable media. For example, Figure 10 illustrates a computer system (3900) suitable for implementing certain embodiments of the disclosed subject matter.

[0283] Computer software may be coded using any suitable machine code or computer language and may be subjected to assembly, compilation, linking, or similar mechanisms to create code containing instructions that are executable by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., either directly, or through interpretation, microcode execution, etc.

[0284] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smartphones, gaming devices, Internet of Things devices, etc.

[0285] 39 for computer system 3900 are exemplary in nature and are not intended to suggest any limitation as to the scope of use or functionality of the computer software implementing the embodiments of the present disclosure. Neither the arrangement of components should be interpreted as having any dependency or requirement regarding any one or combination of components shown in the exemplary embodiment of computer system 3900.

[0286] The computer system (3900) may include certain human interface input devices that can respond to input by one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, claps), visual input (e.g., gestures), or olfactory input (not shown). The human interface devices may also be used to capture certain media that do not necessarily involve direct conscious human input, such as audio (e.g., speech, music, ambient sounds), images (e.g., scanned images, photographic images obtained from still-image cameras), and video (e.g., two-dimensional video, three-dimensional video, including stereoscopic video).

[0287] The input human interface devices may include one or more (only one of each is shown) of a keyboard (3901), a mouse (3902), a trackpad (3903), a touchscreen (3910), a data glove (not shown), a joystick (3905), a microphone (3906), a scanner (3907), and a camera (3908).

[0288] The computer system (3900) may also include some type of human interface output device. Such human interface output devices may stimulate one or more of the human user's senses, for example, through tactile output, sound, light, and smell / taste. Such human interface output devices may include haptic output devices (e.g., haptic feedback via a touchscreen (3910), data gloves (not shown), or joystick (3905); however, haptic feedback devices may also function as input devices), audio output devices (e.g., speakers (3909), headphones (not shown)), visual output devices (e.g., screens (3910), including CRT screens, LCD screens, plasma screens, and OLED screens; each may or may not have touchscreen input capabilities, each may or may not have haptic feedback capabilities, some of which may output two-dimensional visual output or output in greater than three dimensions through means such as stereoscopic output; virtual reality glasses (not shown), holographic displays, and smoke tanks (not shown)), and printers (not shown).

[0289] The computer system (3900) may also include human-accessible storage devices and associated media, such as optical media including CD / DVD ROM / RW (3920) along with CD / DVD or similar media (3921), thumb drives (3922), removable hard drives or solid state drives (3923), legacy magnetic media such as tape and floppy disks (not shown), specialized ROM / ASIC / PLD-based devices (not shown) such as security dongles, etc.

[0290] Those skilled in the art should also understand that the term "computer-readable medium" as used in connection with the presently disclosed subject matter does not encompass transmission media, carrier waves, or other transitory signals.

[0291] The computer system (3900) may also include an interface (3954) to one or more communications networks (3955). Networks may be, for example, wireless, wired, or optical. Networks may further be local, wide-area, metropolitan, in-vehicle, and industrial, real-time, delay-tolerant, and the like. Examples of networks include Ethernet, WLAN, cellular networks including GSM, 3G, 4G, 5G, LTE, and the like; TV wired or wireless wide-area digital networks including cable, satellite, and terrestrial broadcast television; and in-vehicle and industrial networks including CANbus. Some networks typically require an external network interface adapter attached to some kind of general-purpose data port or peripheral bus (3949) (e.g., a USB port on the computer system (3900)). Others are typically integrated into the core of the computer system (3900) by attachment to a system bus, as described below (e.g., an Ethernet interface to a PC computer system or a cellular network interface to a smartphone computer system). Using any of these networks, the computer system (3900) can communicate with other entities. Such communication may be unidirectional, receive-only (e.g., broadcast television), unidirectional transmit-only (e.g., CANbus to certain CANbus devices), or bidirectional, for example, to other computer systems using local or wide-area digital networks. Certain protocols and protocol stacks may be used with each of these networks and network interfaces, as described above.

[0292] The aforementioned human interface devices, human-accessible storage devices, and network interfaces may be attached to a core (3940) of the computer system (3900).

[0293] A core (3940) may include one or more central processing units (CPUs) (3941), graphics processing units (GPUs) (3942), specialized programmable processing units in the form of field programmable gate arrays (FPGAs) (3943), hardware accelerators for certain tasks (3944), graphics adapters (3950), etc. These devices may be connected through a system bus (3948), along with read-only memory (ROM) (3945), random access memory (3946), and internal mass storage devices (3947), such as internal non-user-accessible hard drives or solid-state drives (SSDs). In some computer systems, the system bus (3948) may be accessible in the form of one or more physical plugs to allow expansion with additional CPUs, GPUs, etc. Peripheral devices may be attached directly to the core's system bus (3948) or through a peripheral bus (3949). In one example, a display 3910 can be connected to a graphics adapter 3950. Architectures for peripheral buses include PCI, USB, and the like.

[0294] The CPU (3941), GPU (3942), FPGA (3943), and accelerator (3944) can execute certain instructions that, in combination, can constitute the above-mentioned computer code. The computer code can be stored in ROM (3945) or RAM (3946). Temporary data can also be stored in RAM (3946), while persistent data can be stored, for example, in internal mass storage device (3947). Fast storage and retrieval to any of the memory devices can be enabled through the use of cache memory, which can be closely associated with one or more of the CPU (3941), GPU (3942), mass storage device (3947), ROM (3945), RAM (3946), etc.

[0295] The computer-readable medium can have computer code thereon for performing various computer-implemented operations. The medium and computer code may be those specially designed and constructed for the purposes of the present disclosure, or they may be of the kind well known and available to those having skill in the computer software arts.

[0296] By way of example and not limitation, a computer system having the architecture (3900), and in particular the core (3940), can provide functionality as a result of a processor (including a CPU, GPU, FPGA, accelerator, etc.) executing software embodied in one or more tangible computer-readable media. Such computer-readable media can be user-accessible mass storage, as discussed above, as well as media associated with some type of storage of the core (3940) that is non-transitory, such as a core's internal mass storage (3947) or ROM (3945). Software implementing various embodiments of the present disclosure can be stored on such devices and executed by the core (3940). The computer-readable media can include one or more memory devices or chips, depending on particular needs. The software can cause the core (3940), and in particular the processor (including a CPU, GPU, FPGA, etc.) therein, to perform certain processes or certain portions thereof described herein, including defining data structures stored in RAM (3946) and modifying such data structures according to software-defined processes. Additionally or alternatively, a computer system may provide functionality as a result of logic hardwired or otherwise embodied in circuitry (e.g., accelerator (3944)), which may operate in place of or in conjunction with software to perform particular processes or portions of particular processes described herein. Reference to software includes logic, and vice versa, as appropriate. Reference to a computer-readable medium may encompass circuitry (e.g., an integrated circuit (IC)) that stores software for execution, circuitry that embodies logic for execution, or both, as appropriate. The present disclosure encompasses any suitable combination of hardware and software.

[0297] Appendix A: Acronyms JEM: joint exploration model VVC: versatile video coding BMS: benchmark set MV: Motion Vector HEVC: High Efficiency Video Coding MPM: most probable mode WAIP: Wide-Angle Intra Prediction SEI: Supplementary Enhancement Information VUI: Video Usability Information GOP: Group of Pictures TU: Transform Unit PU: Prediction Unit CTU: Coding Tree Unit CTB: Coding Tree Block PB: Prediction Block HRD: Hypothetical Reference Decoder SDR: standard dynamic range SNR: Signal Noise Ratio CPU: Central Processing Unit GPU: Graphics Processing Unit CRT: Cathode Ray Tube LCD: Liquid-Crystal Display OLED: Organic Light-Emitting Diode CD: Compact Disc DVD: Digital Video Disc ROM: Read-Only Memory RAM: Random Access Memory ASIC: Application-Specific Integrated Circuit PLD: Programmable Logic Device LAN: Local Area Network GSM: Global System for Mobile communications LTE: Long-Term Evolution CANBus: Controller Area Network Bus USB: Universal Serial Bus PCI: Peripheral Component Interconnect FPGA: Field Programmable Gate Areas SSD: solid-state drive IC: Integrated Circuit CU: Coding Unit PDPC: Position Dependent Prediction Combination ISP: Intra Sub-Partition SPS: Sequence Parameter Setting

[0298] While this disclosure has described several exemplary embodiments, there are alterations, substitutions, and various substitute equivalents that fall within the scope of this disclosure. It will thus be appreciated that those skilled in the art will be able to devise many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and are therefore within the spirit and scope of the present disclosure.

Claims

[Claim 1] 1. A method for filtering in video decoding, comprising: reconstructing, by a processor, a first sample in a video carried in the coded video bitstream based on a nonlinear mapping-based filter having a first filter shape configuration; determining, by the processor, to switch from the first filter shape configuration to a second filter shape configuration, the first filter shape configuration and the second filter shape configuration including the same number of filter taps, and the distance of the filter tap positions of the first filter shape configuration from a center is different from the distance of the filter tap positions of the second filter shape configuration from a center; reconstructing a second sample in the video based on the nonlinear mapping based filter having the second filter shape configuration. method.