Adaptive non-linear mapping for sample offset

Cross-sample offset filtering and local sample offset filtering methods address inefficiencies in video encoding and decoding by utilizing statistical characteristics and nonlinear mappings, enhancing compression efficiency and reducing redundancy in video signals.

JP2026021373APending Publication Date: 2026-02-10TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025179152
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-01-04
Filing Date
2025-10-24
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies face challenges in efficiently reducing redundancy and distortion in video signals, particularly in intra-prediction and motion vector prediction, leading to suboptimal compression ratios and increased bandwidth requirements.

Method used

Implementing cross-sample offset filtering and local sample offset filtering methods that utilize statistical characteristics and nonlinear mappings to enhance intra-prediction and motion compensation, including adaptive sample offset filters based on edge information, smoothness indices, and prediction modes, to improve filtering accuracy and reduce redundancy.

Benefits of technology

Enhances video encoding and decoding efficiency by reducing bit requirements and improving compression ratios while maintaining image quality, thus optimizing storage and transmission bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026021373000001_ABST
    Figure 2026021373000001_ABST
Patent Text Reader

Abstract

To provide a method and apparatus for in-loop sample offset filtering.SOLUTION: The method comprises obtaining a statistical characteristic associated with reconstructed samples of a first color component in a reconstructed data block of the video stream, and selecting a target sample offset filter from a plurality of sample offset filters based on the statistical characteristic. The target sample offset filter includes a non-linear mapping between the sample delta index and the sample offset value. The method also comprises filtering a current sample in a second color component of the reconstructed data block using the target sample offset filter and a reference sample in a third color component of the reconstructed data block to generate a reconstructed sample.SELECTED DRAWING: Figure 24
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Incorporation by Reference This disclosure claims the benefit of priority to U.S. Nonprovisional Patent Application No. 17 / 568,565, filed January 4, 2022, which claims priority to U.S. Provisional Application No. 63 / 163,707, entitled "Adaptive Nonlinear Mapping for Sample Offset," filed March 19, 2021. Both applications are incorporated herein by reference in their entireties.

[0002] Technical Field This disclosure describes a series of advanced video coding techniques in general, and in particular, locally adaptive sample offset filtering. [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 include a series of pictures, each with spatial dimensions of, for example, 1920 x 1080 luminance samples and associated full or subsampled chrominance samples. The series of pictures can have a fixed or variable picture rate (also called frame rate), for example, 60 pictures per second or 60 frames per second. Uncompressed video has specific bitrate requirements for streaming or data processing. For example, a video with a pixel resolution of 1920 x 1080, a frame rate of 60 frames per second, and 4:2:0 chroma subsampling with 8 bits per pixel per color channel 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 to reduce redundancy in an uncompressed 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 of them, can be used. Lossless compression refers to a technique in which an exact copy of the original signal can be reconstructed from the compressed original signal through the decoding process. Lossy compression refers to an encoding / decoding process in which the original video information is not fully preserved during encoding and is not fully recoverable during decoding. When using lossy compression, 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 use. For video, lossy compression is widely used in many applications. The amount of acceptable distortion depends on the application. For example, users of certain consumer video streaming applications may tolerate higher distortion than users of cinema or television broadcast applications. The compression ratio achievable by a particular encoding algorithm can be selected or adjusted to reflect different distortion tolerances: higher tolerable distortion generally allows for encoding algorithms that result in higher loss and higher compression ratios.

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

[0007] Video codec technology 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 can be called 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. The samples of the intra-predicted block can then be transformed to the frequency domain, and the resulting transform coefficients can be quantized before entropy coding. Intra-prediction refers to 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 entropy-coded block.

[0008] Traditional intra-coding, e.g., as known from MPEG-2 generation encoding techniques, does not use intra-prediction. However, some newer video compression techniques include techniques that attempt to encode / decode blocks based on surrounding sample data and / or metadata that precedes the block of data being encoded or decoded in decoding order, e.g., obtained during spatially neighboring encoding and / or decoding. 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 other reference pictures.

[0009] There may be various forms of intra prediction. When two or more such techniques are available in a given video coding technique, the technique used may be referred to as an intra prediction mode. One or more intra prediction modes may be provided in a particular codec. In some cases, a mode may have sub-modes and / or may be associated with various parameters. Mode / sub-mode information and intra-coding parameters for a block of video may be coded individually or collectively using mode codewords. Which codeword to use for a given mode, sub-mode, and / or parameter combination may affect the coding efficiency gain through intra prediction, as well as the entropy coding technique used to convert the codeword into a bitstream.

[0010] Certain modes of intra prediction were 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). Generally, for intra prediction, a predictor block can be formed using available neighboring sample values. For example, available values ​​of a particular set of neighboring samples in a certain direction and / or along a line may be copied into the predictor block. 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 predictor directions specified in the 33 possible intra-predictor directions of H.265 (corresponding to the 33 angle modes out of the 35 intra-modes specified in H.265) is depicted in the lower right. The point (101) where the arrows converge represents the sample to be predicted. Neighboring samples from the direction represented by the arrow are used to predict the sample. For example, arrow (102) indicates that sample (101) is predicted from neighboring 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 neighboring sample(s) to the lower left of sample (101), at an angle of 22.5 degrees from horizontal.

[0012] Continuing with reference to 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) includes 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 is an exemplary reference sample that follows a similar numbering scheme. The reference sample is labeled R and its Y position (e.g., row index) and X position (column index) relative to the block (104). In both H.264 and H.265, prediction samples that are adjacent to the block being reconstructed are used.

[0013] Intra-picture prediction for block 104 may begin by copying reference sample values ​​from neighboring samples according to the signaled prediction direction. For example, assume that the coded video bitstream includes signaling indicating the prediction direction of arrow (102) for this block 104. That is, samples are predicted from the predicted sample(s) to the upper right and at a 45-degree angle from horizontal. In such a case, samples S41, S32, S23, and S14 are predicted from the same reference sample R05. Then, sample S44 is 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 continues to evolve, the number of possible directions has increased. In H.264 (2003), for example, nine different directions were available for intra prediction. 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. Experimental studies have been conducted to help identify the most suitable intra prediction directions, and certain techniques in entropy coding may be used to encode those most suitable directions with a small number of bits, while accepting a bit penalty for the direction. Furthermore, the direction itself may be predictable from nearby directions used in the intra prediction of neighboring blocks that have already been decoded.

[0016] FIG. 1B shows a schematic diagram (180) depicting the 65 intra-prediction directions according to JEM to illustrate the increasing number of prediction directions in various encoding techniques that have evolved over time.

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

[0018] Inter- or inter-picture prediction may be based on motion compensation, in which 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) and then used to predict a newly reconstructed picture or portion thereof (e.g., a block). In some cases, the reference picture may be the same as the picture currently being reconstructed. MV may have two dimensions, X and Y, or three dimensions, with the third dimension indicating the reference picture to be used (like a temporal dimension).

[0019] In some video compression techniques, the current motion vector (MV) applicable to a region of sample data can be predicted from other motion vectors, e.g., from other motion vectors associated with another region of sample data that is spatially adjacent to the region being reconstructed and precedes the current motion vector in decoding order. Doing so can significantly reduce the overall amount of data required to encode the MV by relying on removing redundancy in the correlated MVs, thereby increasing compression efficiency. 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 in the video sequence and thus, in some cases, can be predicted using similar motion vectors derived from MVs in nearby regions. As a result, the actual MV for a given region will be similar or identical to the MV predicted from the surrounding MVs. Such an MV can be represented, after entropy coding, with fewer bits than would be used if the MV were encoded directly rather than predicted from nearby MV(s). In some cases, the MV prediction may be an instance of lossless compression of a signal (i.e., the MV) derived from the original signal (i.e., the 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 specified by H.265, the following describes a technique hereafter called "spatial merge".

[0021] Referring specifically 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, e.g., 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 cross-sample offset filtering and local sample offset filtering in video encoding and decoding.

[0023] In some example implementations, a method for in-loop filtering of a video stream is disclosed, the method including: obtaining at least one statistical characteristic associated with reconstructed samples of at least a first color component in a current reconstructed data block of the video stream; selecting a target sample offset filter from among a plurality of sample offset filters based on the at least one statistical characteristic, the target sample offset filter including a nonlinear mapping between a sample delta index and a sample offset value; and filtering a current sample in a second color component of the current reconstructed data block with the target sample offset filter and a reference sample in a third color component of the current reconstructed data block to generate a filtered reconstructed sample of the current sample.

[0024] In the above implementations, the first color component may be the same color component as the third color component. The first color component may be the same color component as the second color component. The second color component may be a different color component from the third color component. The second color component may be the same color component as the third color component. The at least first color component may include one, two, or three color components.

[0025] In any of the above implementations, the at least one statistical characteristic may include edge information of the current reconstructed data block. Further, the edge information of the current reconstructed data block may include edge directions derived in a Constrained Directional Enhanced Filtering (CDEF) process, and the plurality of sample offset filters may include N sample offset filters corresponding to N CDEF edge directions, where N is an integer between 1 and 8. Further, the plurality of sample offset filters may be signaled at a frame level in high level syntax (HLS).

[0026] In any of the above implementations, the at least one statistical characteristic includes a smoothness index of the current reconstructed data block, the smoothness index of the current reconstructed data block is further mapped to one of M predefined smoothness levels characterized by M-1 smoothness level thresholds, the plurality of sample offset filters includes M sample offset filters corresponding to the M predefined smoothness levels, and a target sample offset filter is selected from the M sample offset filters according to the one of the M predefined smoothness levels mapped to the smoothness index.

[0027] In any of the above implementations, the at least one statistical characteristic includes coding information of the current reconstructed data block. Furthermore, the coding information includes a current prediction mode of the current reconstructed data block; the plurality of sample offset filters correspond to different prediction modes; and the target sample offset filter is selected from the plurality of sample offset filters according to the current prediction mode of the current reconstructed data block. Furthermore, the different prediction modes include at least one of an intra-DC mode, an intra-planar mode, an intra-PAETH mode, an intra-SMOOTH mode, an intra-recursive filtering mode, and an inter-SKIP mode.

[0028] In any of the above implementations, each of the plurality of sample offset filters is associated with a set of filter coefficients, a number of filter taps, and positions of the number of filter taps.

[0029] In any of the above implementations, filtering a current sample in a second color component of a current reconstructed data block using the target sample offset filter and a reference sample in a third color component of the current reconstructed data block to generate a filtered reconstructed sample of the current sample may include determining a first position of the current sample of the second color component and a second position of a plurality of filter taps associated with the target sample offset filter; identifying the reconstructed samples of the third color component at the first and second positions as reference samples; determining a delta index between the reference sample corresponding to the second position and the reference sample corresponding to the first position, both of which are in the third color component of the current reconstructed data block; extracting a sample offset value from the target sample offset filter based on the delta index; and filtering the current sample of the second color component using the sample offset value to generate a filtered reconstructed sample of the current sample.

[0030] In any of the above implementations, the plurality of sample offset filters may be predetermined, and the plurality of sample offset filters and an index of a selected target sample offset filter from the plurality of sample offset filters may be signaled at a sequence level, a picture level, or a coding tree unit level.

[0031] In some implementations, a video encoding or decoding device is disclosed, which may include circuitry configured to implement any of the above methods.

[0032] Aspects of the present disclosure provide a non-transitory computer-readable medium storing instructions that, when executed by a computer, cause the computer to perform a method for video decoding and / or encoding. [Brief explanation of the drawings]

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

[0034] [Figure 1A] FIG. 10 is a schematic diagram of an example subset of intra-prediction directional modes.

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

[0036] [Figure 2] FIG. 1 is a schematic diagram of a current block and its surrounding spatial merge candidates for motion vector prediction in one example.

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

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

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

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

[0041] [Figure 7] 10 shows a block diagram of a video encoder according to another exemplary embodiment.

[0042] [Figure 8] 10 shows a block diagram of a video decoder according to another exemplary embodiment.

[0043] [Figure 9] 1 illustrates an exemplary adaptive loop filter according to an embodiment of the present disclosure.

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

[0045] [Figure 10E] 1 illustrates an exemplary manner of determining various gradient-based block orientations for use by an adaptive loop filter (AFL).

[0046] [Figure 11] AB show modified block classifications at a virtual boundary according to an exemplary embodiment of the present disclosure.

[0047] [Figure 12] 1A-1F illustrate exemplary adaptive loop filters with padding operations at their respective virtual boundaries, according to embodiments of the present disclosure.

[0048] [Figure 13] 1 illustrates an example of a picture quadtree partition aligned to the largest coding unit, according to an embodiment of the present disclosure.

[0049] [Figure 14] 14 illustrates a quadtree division pattern corresponding to FIG. 13, according to an exemplary embodiment of the present disclosure.

[0050] [Figure 15] 10 illustrates cross-component filters used to generate chroma components, according to an exemplary embodiment of the present disclosure.

[0051] [Figure 16] 1 illustrates an example of a cross-component ALF filter, according to an embodiment of the present disclosure.

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

[0053] [Figure 18] 10 illustrates an example of a direction search for a block, according to an embodiment of the present disclosure.

[0054] [Figure 19] 10 illustrates an example showing subspace projection, according to an embodiment of the present disclosure.

[0055] [Figure 20] 1 illustrates an example of a filter support region for a component cross-sample offset (CCSO) filter, according to an embodiment of the present disclosure.

[0056] [Figure 21A] 10A-10C are portions of diagrams illustrating example mappings used in CCSO filters, according to certain embodiments of the present disclosure. [Figure 21B]10A-10C are portions of diagrams illustrating example mappings used in CCSO filters, according to certain embodiments of the present disclosure. [Figure 21C] 10A-10C are portions of diagrams illustrating example mappings used in CCSO filters, according to certain embodiments of the present disclosure.

[0057] [Figure 22] 1 illustrates an exemplary implementation of a CCSO filter according to an embodiment of the present disclosure.

[0058] [Figure 23] 10 illustrates four exemplary patterns for pixel classification in edge offset, according to an embodiment of the present disclosure.

[0059] [Figure 24] 2 shows a flowchart outlining a process (2400) according to an embodiment of the present disclosure.

[0060] [Figure 25] 1 illustrates a schematic diagram of a computer system in accordance with an exemplary embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0061] 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) may perform unidirectional transmission of data. For example, the terminal device (310) may encode video data (e.g., video data of 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 may 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 reconstruct a video picture, and display the video picture according to the reconstructed video data. One-way data transmission may be implemented in a media service application, etc.

[0062] In another example, the communication system (300) includes a second pair of terminal devices (330) and (340) performing bidirectional transmission of encoded video data, which may be implemented, for example, in a video conferencing application. For the bidirectional transmission of data, in one example, each of the terminal devices (330) and (340) may encode video data (e.g., video data of 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.

[0063] In the example of FIG. 3 , terminal devices 310, 320, 330, and 340 may be implemented as servers, personal computers, and smartphones, although the applicability of the principles underlying this disclosure may not be limited thereto. Embodiments of the present disclosure may also be implemented in desktop computers, laptop computers, tablet computers, media players, wearable computers, dedicated video conferencing equipment, and / or other devices. Network 350 represents any number or type of network that conveys 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, packet-switched, and / or other types of 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 explicitly described herein.

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

[0065] A video streaming system may include a video source (401), e.g., a video capture subsystem (413), which may include a digital camera, for generating a stream of uncompressed video pictures or images (402). In one example, the video picture stream (402) includes samples recorded by the digital camera of the video source 401. The video picture stream (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) including 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 uncompressed video picture stream (402), can be stored for future use on the streaming server (405) or directly on a downstream video device (not shown). 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 uncompressed video pictures (411) that can be rendered on a display (412) (e.g., a display screen) or other rendering device (not shown). Video decoder 410 may be configured to perform some or all of the various functions described in this disclosure.In some streaming systems, the encoded video data (404), (407), and (409) (e.g., video bitstreams) 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) and other video coding standards.

[0066] 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).

[0067] 5 shows a block diagram of a video decoder (510) according to any of the following embodiments 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.

[0068] 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 may be decoded at a time, with the decoding of each coded video sequence being independent of other coded video sequences. Each video sequence may involve multiple video frames or images. The coded video sequences may be received from a channel (501) or a streaming source transmitting the encoded video data, and the channel may be a hardware or software link to a storage device that stores the encoded video data. The receiver (531) may receive the encoded video data along with other data, such as coded audio data and / or auxiliary data streams, which may be forwarded to respective processing circuits (not shown). The receiver (531) may separate the coded video sequences from other data. To combat network jitter, a buffer memory (515) may be placed between the receiver (531) and the entropy decoder / parser (520) (hereinafter referred to as the "parser"). In some applications, the buffer memory (515) may be implemented as part of the video decoder (510). In other applications, it may be external to the video decoder (510) and separate (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, or there may be a separate 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 / transfer 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 in a best-effort packet network such as the Internet, a buffer memory (515) of sufficient size may be required, and its size may be relatively large.Such buffer memory may be adaptively sized and may be implemented, at least in part, outside the video decoder (510) in an operating system or similar element (not shown).

[0069] 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 display (512) (e.g., a display screen). The display 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 coded video sequences received by the parser (520). The entropy coding of the coded video sequence can follow a video coding technique or standard and can 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 subgroup. The subgroups can include a group of pictures (GOP), a picture, a tile, a slice, a macroblock, a coding unit (CU), a block, a transform unit (TU), a prediction unit (PU), etc. The parser (520) can also extract information from the coded video sequence, such as transform coefficients (e.g., Fourier transform coefficients), quantizer parameter values, motion vectors, etc.

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

[0071] The reconstruction of the symbols (521) may involve several different processing or functional 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. The units involved and how they participate may 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 processing or functional units is not depicted for simplicity.

[0072] 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 functional units will interact closely with each other and may be at least partially integrated with each other. However, for purposes of clearly describing the various functions of the disclosed subject matter, a conceptual division into functional units will be used below.

[0073] The first unit may include a scaler / inverse transform unit (551). The scaler / inverse transform unit (551) may receive quantized transform coefficients and control information as symbol(s) (521) from the parser (520). The control information may include which type of inverse transform to use, block size, quantization factors / parameters, quantization scaling matrix, etc. The scaler / inverse transform unit (551) may output a block containing sample values ​​that can be input to an aggregator (555).

[0074] 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) may generate blocks of the same size and shape as the block being reconstructed using information about already reconstructed surrounding blocks stored in the current picture buffer (558). The current picture buffer (558), for example, buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some implementations, the aggregator (555) may add, 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).

[0075] 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 inter-picture 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 (the output of unit 551 may be referred to as a residual sample or residual signal) 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 a motion vector available to the motion compensation unit (553) in the form of a symbol (521). The symbol may have, for example, an X and Y component (shift) and a reference picture component (time). Motion compensation may involve interpolation of sample values ​​taken from a reference picture memory (557) when sub-sample accurate motion vectors are used, and may be associated with a motion vector prediction mechanism, etc.

[0076] The output samples of the aggregator (555) can be subjected to various loop filtering techniques in the 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 respond 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. Several types of loop filters may be included as part of the loop filter unit 556, in various orders, as will be described in more detail below.

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

[0078] Once a coded picture is fully reconstructed, it can be used as a reference picture for future inter-picture prediction. 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.

[0079] The video decoder (510) can perform decoding operations according to a given video compression technique adopted 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 tools available only for use under that profile. To conform to a standard, the complexity of a coded video sequence may 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.

[0080] 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.

[0081] 6 shows a block diagram of a video encoder (603) according to an example embodiment of the present disclosure. The video encoder (603) may be included in an electronic device (620). The electronic device (620) may further include a transmitter (640) (e.g., a transmitting circuit). The video encoder (603) may be used in place of the video encoder (403) in the example of FIG. 4.

[0082] 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) can be implemented as part of the electronic device (620).

[0083] 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, etc.), any suitable color space (e.g., BT.601 YCrCB, RGB, XYZ, etc.), 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 capable of 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 or images that, when viewed in sequence, impart motion. The picture itself 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.

[0084] According to some exemplary embodiments, 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) may be functionally coupled to and control other functional units, as described below. Such coupling is not depicted for simplicity. Parameters set by the controller (650) may 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.

[0085] In some example embodiments, the video encoder (603) may be configured to operate in an encoding loop. As a simplistic explanation, in one example, the encoding loop may include a source encoder (630) (e.g., responsible for generating a symbol-like 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 embedded decoder (633) reconstructs the symbols to generate sample data in a manner similar to that which a (remote) decoder would generate, even if the embedded decoder 633 processed the encoded video stream from the source encoder 630 without entropy encoding. (In video compression techniques considered in the disclosed subject matter, any compression between the symbols and the encoded video bitstream in entropy encoding may be lossless.) The reconstructed sample stream (sample data) is input to a reference picture memory (634). Because decoding 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 prediction part of the encoder "sees" the exact same sample values ​​as the reference picture samples that the decoder "sees" when using prediction during decoding. This fundamental principle of reference picture synchrony (and the resulting drift when synchrony cannot be maintained, for example, due to channel errors) is used to improve coding quality.

[0086] 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) within the encoder.

[0087] An observation that can be made at this point is that any decoder technology, with the exception of parsing / entropy decoding, which may only exist in the decoder, may need to exist in substantially the same functional form in the corresponding encoder. For this reason, the disclosed subject matter may focus on decoder operations that are coupled to the decoding portion of the encoder. Thus, descriptions of the encoder technology may be shortened, since they are the reverse of the decoder technology, which is described generically. Only in certain areas or aspects is a more detailed description of the encoder provided below.

[0088] In operation, in some example implementations, 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 (or residuals) in color channels between pixel blocks of the input picture and pixel blocks of reference picture(s) that may be selected as prediction references for the input picture.

[0089] The local video decoder (633) can decode coded video data of pictures that may be designated as reference pictures based on 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 (remote) video decoder.

[0090] 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).

[0091] 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.

[0092] 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 lossless compression of the symbols according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc.

[0093] 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).

[0094] 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:

[0095] 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.

[0096] 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.

[0097] 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.

[0098] A source picture is typically spatially divided into multiple sample coding 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. A source picture or intermediate processed picture may be subdivided into other types of blocks for other purposes. The division of coding blocks and other types of blocks may or may not follow the same pattern, as described in more detail below.

[0099] 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.

[0100] In some exemplary 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 / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.

[0101] 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. For example, a particular picture to be encoded / decoded, called the current picture, may be divided into blocks. If a block in the current picture resembles a reference block in a previously coded and still buffered reference picture in the video, it may 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.

[0102] In some exemplary embodiments, bi-prediction techniques can be used for inter-picture prediction. Such 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 be past and future, respectively, in display order) 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 jointly predicted using a combination of the first and second reference blocks.

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

[0104] According to some exemplary embodiments of the present disclosure, prediction, such as inter-picture prediction and intra-picture prediction, is performed in units of blocks. For example, a picture in a sequence of video pictures is divided into coding tree units (CTUs) for compression, and the CTUs in a picture may have the same size, such as 64x64 pixels, 32x32 pixels, or 16x16 pixels. In general, a CTU may include three parallel coding tree blocks (CTBs), one luma CTB and two chroma CTBs. Each CTU may be recursively quadtree-decomposed into one or more coding units (CUs). For example, a 64x64 pixel CTU may be divided into one CU of 64x64 pixels or four CUs of 32x32 pixels. Each of the one or more 32x32 blocks may be further divided into four CUs of 16x16 pixels. In some exemplary embodiments, during encoding, each CU is analyzed to determine a prediction type for that CU among various prediction types, such as an inter prediction type or an intra prediction type. A CU may be 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 coding (encoding / decoding) are performed in units of prediction blocks. The division of a CU into PUs (or PBs of different color channels) may be performed in various spatial patterns. For example, a luma or chroma PB may include a matrix of values ​​(e.g., luma values) for samples of 8x8 pixels, 16x16 pixels, 8x16 pixels, 16x8 pixels, etc.

[0105] 7 shows a diagram of a video encoder (703) according to another exemplary 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. The exemplary video encoder (703) may be used in place of the video encoder (403) in the example of FIG. 4.

[0106] For 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) then determines whether the processing block is best coded using intra-mode, inter-mode, or bi-prediction mode, e.g., using rate-distortion optimization (RDO). If it is determined that 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 it is determined that the processing block is coded in inter-mode or bi-prediction mode, the video encoder (703) may use inter-prediction techniques or bi-prediction techniques, respectively, to encode the processing block into a coded picture. In some exemplary embodiments, merge mode may be a sub-mode of inter-picture prediction 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 some other exemplary embodiments, there may be motion vector components applicable to the current block. Thus, the video encoder (703) may include components not explicitly shown in FIG. 7, such as a mode decision module for determining the prediction mode of a processing block.

[0107] 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 the exemplary arrangement of Figure 7.

[0108] 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 previous and subsequent pictures in display order), generate inter-prediction information (e.g., a description of redundant information from 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 decoded based on encoded video information using a decoding unit 633 embedded in the example encoder 620 of FIG. 6 (shown as residual decoder 728 of FIG. 7, as described in more detail below).

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

[0110] The general controller (721) may be 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 a prediction mode for a block and provides a control signal to the switch (726) based on the prediction mode. For example, if the prediction 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 prediction mode for the block 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.

[0111] The residual calculator (723) may be configured to calculate the difference (residual data) between a received block and a prediction result for that block selected from the intra-encoder (722) or inter-encoder (730). The residual encoder (724) may be configured to encode the residual data to generate transform coefficients. For example, the residual encoder (724) may be 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 exemplary 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.

[0112] The entropy encoder (725) may be configured to format a bitstream to include the encoded blocks and perform entropy encoding. The entropy encoder (725) may be configured to include various information in the bitstream. For example, the entropy encoder (725) may be 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. Residual information may not be present when encoding blocks in a merged sub-mode of either an inter mode or a bi-prediction mode.

[0113] 8 shows a diagram of an exemplary 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) may be used in place of the video decoder (410) in the example of FIG. 4.

[0114] 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 the exemplary arrangement of Figure 8.

[0115] The entropy decoder (871) can be configured to reconstruct, from a coded picture, certain symbols that represent 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, merged submode, or 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), 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).

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

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

[0118] The residual decoder (873) may be 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 utilize certain control information (including quantizer parameters (QP)), which may be provided by the entropy decoder (871) (the data path is not depicted because this is only low data volume control information).

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

[0120] 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 some exemplary embodiments, the video encoders (403), (603), (703) and video decoders (410), (510), (810) may be implemented using one or more integrated circuits. In other embodiments, the video encoders (403), (603), (603) and video decoders (410), (510), (810) may be implemented using one or more processors executing software instructions.

[0121] In some example implementations, loop filters may be included in the encoder and decoder to reduce coding artifacts and improve the quality of the decoded picture. For example, loop filter 555 may be included as part of decoder 530 of FIG. 5. In another example, a loop filter may be part of embedded decoder unit 633 in encoder 620 of FIG. 6. These filters are called loop filters because they are included in the video block decoding loop within the decoder or encoder. Each loop filter may be associated with one or more filtering parameters. Such filtering parameters may be predefined or may be derived by the encoder during the encoding process. These filtering parameters (if derived by the encoder) or their indices (if predefined) may be included in encoded form in the final bitstream. The decoder can then parse these filtering parameters from the bitstream and perform loop filtering based on the parsed filtering parameters during decoding.

[0122] Various loop filters may be used to reduce coding artifacts and improve various aspects of decoded video quality. Such loop filters may include, but are not limited to, one or more deblocking filters, adaptive loop filters (ALFs), cross-component adaptive loop filters (CC-ALFs), constrained directionality enhancement filters (CDEFs), sample adaptive offset (SAO) filters, cross-component sample offset (CCSO) filters, and local sample offset (LSO) filters. These filters may or may not be interdependent. They may be arranged in the decoder or encoder's decode loop in any suitable order that is compatible with their interdependencies, if any. These various loop filters are described in more detail in the following disclosure.

[0123] An adaptive loop filter (ALF) with block-based filter adaptation can be applied by the encoder / decoder to reduce artifacts. The ALF is adaptive in the sense that the filtering coefficients / parameters or their indices are signaled in the bitstream and can be designed based on the image content and distortion of the reconstructed picture. The ALF can be applied to reduce the distortion introduced by the encoding process and improve the reconstructed image quality.

[0124] For the luma component, one of multiple filters (e.g., 25 filters) may be selected for a luma block (e.g., a 4x4 luma block) based, for example, on local gradient direction and activity. The filter coefficients of these filters may be derived by the encoder during the encoding process and signaled to the decoder in the bitstream.

[0125] The ALFs can have any suitable shape and size. Referring to the example of FIG. 9, the ALFs (910)-(911) may have a diamond shape, such as a 5x5 diamond shape for the ALF (910) and a 7x7 diamond shape for the ALF (911). In the ALF (910), 13 elements (920)-(932) are available for use in the filtering process, forming a diamond shape. For the 13 elements (920)-(932), seven values ​​(e.g., C0-C6) are available, arranged in the exemplary manner shown. In the ALF (911), 25 elements (940)-(964) are available for use in the filtering process, forming a diamond shape. For the 25 elements (940)-(964), 13 values ​​(e.g., C0-C12) are available, arranged in the exemplary manner shown.

[0126] Referring to Figure 9, in some examples, one of two diamond-shaped ALF filters (910)-(911) may be selected to process a luma or chroma block. For example, a 5x5 diamond-shaped filter (910) may be applied to a chroma component (e.g., chroma block, chroma CB), and a 7x7 diamond-shaped filter (911) may be applied to a luma component (e.g., luma block, luma CB). Other suitable shapes and sizes may be used in the ALF. For example, a 9x9 diamond-shaped filter may be used.

[0127] 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. A clipping function may be used to limit the upper limit of the filter values ​​in the luma or chroma blocks.

[0128] In some implementations, the particular ALF applied to a particular block of the luma component may be based on the luma block classification. A 4x4 block (or luma block, luma CB) can be categorized or classified as one of multiple (e.g., 25) classes, corresponding to, for example, 25 different ALFs (e.g., 25 of 7x7 ALFs with different filter coefficients) for the luma component block classification. The classification index C can be derived using Equation (1) based on the directional parameters and the quantized values ​​of the activation values ​​A.

number

[0129] Directional parameter D and quantized value

number

number

[0130] To reduce the complexity of the block classification described above, a subsampled 1-D Laplacian calculation may 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 10A and 10B show that the same subsampled positions can be used for gradient calculations in different directions. In some other implementations, different subsampling schemes can be used for all directions. In still other implementations, different subsampling schemes can be used for different directions.

[0131] 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

[0132] In other words, the directionality parameter D is represented by several discrete levels and is determined based on the spread of the gradient values ​​for the luma block between the horizontal and vertical directions and between the two diagonal directions, as shown in Figure 10E.

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

number

number

[0134] For the luma component, the classification index C calculated as above may then be used to select one of multiple classes (e.g., 25 classes) of diamond-shaped ALF filters. In some implementations, block classification may not be applied to chroma components in a picture, so a single set of ALF coefficients may be applied for each chroma component. In such implementations, although there may be multiple sets of ALF coefficients available for a chroma component, the determination of the ALF coefficients may not depend on any classification of the chroma blocks.

[0135] 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.

[0136] Three geometric transformation options can be performed, including diagonal flip, vertical flip, and rotation, as described in equations (9)-(11), respectively.

number

[0137] In some embodiments, the ALF filter parameters derived by the encoder may be 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 may be signaled, which may be indexed in the APS. In one example, a set of the one or more sets may 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 may be derived and signaled by the encoder. To reduce signaling overhead, filter coefficients of different classifications (e.g., with different classification indices) for the luma component may be merged. In the slice header, the index of the APS used for the current slice may be signaled. In another example, ALF signaling may be CTU-based.

[0138] 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 one or more tables, such as a table of clipping value indexes and corresponding clipping values ​​for the luma component (e.g., used for the luma CB) and a table of clipping value indexes and corresponding clipping values ​​for the chroma components (e.g., used for the chroma CB). The clipping value can depend on the bit depth B. The bit depth B may refer to the internal bit depth, the bit depth of the reconstructed samples in the filtered CB, etc. In some examples, the clipping value table (e.g., for luma and / or chroma) may be obtained using Equation (12).

number

[0139] To specify the luma filter sets available for the current slice, one or more APS indices (up to seven APS indices) may be signaled in the slice header for the current slice. The filtering process may be controlled at one or more appropriate levels, such as the picture level, slice level, CTB level, and / or others. In an example embodiment, the filtering process may be further controlled at the CTB level. A flag indicating whether the ALF is applied to the luma CTB is signaled. The luma CTB may select a filter set from among multiple fixed filter sets (e.g., 16 fixed filter sets) and a filter set signaled in the APS (e.g., up to 25 filters derived by the encoder as described above; 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 set). The multiple fixed filter sets may be predefined and hard-coded in the encoder and decoder and may be referred to as predefined filter sets. In this manner, the predefined filter coefficients do not need to be signaled.

[0140] 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.

[0141] 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.

[0142] 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 values ​​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, for example, 0 to 3.

[0143] 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].

[0144] 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).

[0145] 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].

[0146] In one embodiment, the filtering process can be described as follows: On the decoder side, when ALF is enabled for a CTB, samples R(i,j) in the CU (or CB) of the CTB 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

[0147] 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.

[0148] 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.

[0149] 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.

[0150] 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. Sample C0 can be padded with sample C6. Referring to FIG. 12D, neighboring samples C1 to C3 may be padded with samples C5 to C7, respectively, located above the virtual boundary (1240). Sample C0 may be padded with sample C6. Referring to FIG. 12E, neighboring samples C4 to C8 may be padded with samples C10, C11, C12, C11, and C10, respectively, located below the virtual boundary (1250). Samples C1 to C3 may be padded with samples C11, C12, and C11. Sample C0 may be padded with sample C12. Referring to FIG. 12F, neighboring samples C4 to C8 may be padded with samples C10, C11, C12, C11, and C10, respectively, located above the virtual boundary (1260). Samples C1 to C3 may be padded with samples C11, C12, and C11. Sample C0 can be padded with sample C12.

[0151] 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.

[0152] A picture quadtree partition aligned to the largest coding unit (LCU) can be used. To improve coding efficiency, a coding-unit-synchronous picture quadtree-based adaptive loop filter can be used in video coding. For example, a luma picture is divided into multiple multi-level quadtree partitions, and each partition boundary is aligned with the largest coding unit (LCU) boundary. Each partition has a filtering process and can therefore be called a filter unit or filtering unit (FU).

[0153] An exemplary two-pass encoding flow can be described as follows: In the first pass, the quadtree division pattern and the best filter (or optimal filter) for each FU can be determined. The filtering distortion can be estimated by fast filtering distortion estimation (FFDE) in the decision process. The reconstructed picture can be filtered according to the determined quadtree division pattern and the selected filter for each FU (e.g., all FUs). In the second pass, CU-synchronous ALF on / off control can be performed. According to the ALF on / off result, the first filtered picture is partially restored by the reconstructed picture.

[0154] By using the rate-distortion criterion, a top-down partitioning strategy can be adopted to partition a picture into multi-level quadtree partitions. Each partition can be referred to as an FU. The partitioning process can align the quadtree partitions to LCU boundaries, as shown in FIG. 13. FIG. 13 illustrates an example of LCU-aligned picture quadtree partitioning according to an embodiment of the present disclosure. In one example, the encoding order of FUs follows z-scan order. For example, referring to FIG. 13, a picture is partitioned into 10 FUs (e.g., FU0-FU9; the partitioning depth is 2, where FU0, FU1, and FU9 are the first-level FUs, and FU s, FU7, FU8 are second-level FUs, and FU3 to FU6 are third-level FUs), the encoding order is from F0 to FU9, for example, FU0, FU1, FU2, FU3, FU4, FU5, FU6, FU7, FU8, and FU9.

[0155] To indicate a picture quadtree division pattern, a division flag of "1" representing quadtree division and "0" representing no quadtree division is encoded and transmitted in z-scan order. Figure 14 shows a quadtree division pattern corresponding to Figure 13 according to an embodiment of the present disclosure. As shown in the example of Figure 14, the quadtree division flag is encoded in z-scan order.

[0156] The filter for each FU can be selected from two filter sets based on a rate-distortion criterion. The first set can have newly derived ½ symmetric square and diamond filters for the current FU. The second set can be derived from a time-delayed filter buffer. The time-delayed filter buffer can store filters previously derived for FUs in previous pictures. The filter with the minimum rate-distortion cost of these two filter 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 can be calculated. By recursively comparing the rate-distortion costs of the divided and non-divided cases, a picture quadtree division pattern (in other words, whether the quadtree division of the current FU should stop) can be determined.

[0157] In some examples, the maximum quadtree division level or depth may be limited to a predefined number. For example, the maximum quadtree division level or depth may be 2, and thus the maximum number of FUs may be 16 (or 4 to the maximum power of the depth). During the quadtree division decision, correlation values ​​for deriving Wiener coefficients for the 16 FUs at the lowest quadtree level (smallest FUs) may be reused. The remaining FUs may derive their Wiener filters from the correlations of the 16 FUs at the smallest quadtree level. Thus, in one example, there is only one frame buffer access to derive the filter coefficients for all FUs.

[0158] After the quadtree partitioning pattern is determined, CU-synchronous ALF on / off control can be performed to further reduce filtering distortion. By comparing the filtering distortion with the non-filtering distortion, leaf CUs can explicitly switch ALF on / off in the corresponding local regions. Coding efficiency can be further improved by redesigning the filter coefficients according to the ALF on / off results. In one example, the redesign process requires additional frame buffer accesses. Therefore, in some examples, such as a coding unit synchronous picture quadtree-based adaptive loop filter (CS-PQALF) encoder design, the redesign process is not required after the CU-synchronous ALF on / off decision to minimize the number of frame buffer accesses.

[0159] 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.

[0160] FIG. 15 illustrates a cross-component filter (e.g., CC-ALF) used to generate chroma components according to an exemplary embodiment of the present disclosure. For example, 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").

[0161] 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). Thus, an exemplary cross-component adaptive loop filtering process for the first chroma component may include steps performed by the CC-ALF (1521) and steps performed, for example, by an adder (1522).

[0162] 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 can thus include steps performed by the CC-ALF (1531) and steps performed, for example, by an adder (1532).

[0163] 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). CC-ALF exploits correlations between color components to reduce coding distortion in one color component based on samples from another color component.

[0164] FIG. 16 shows an example of a CC-ALF 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 solid 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. 14.

[0165] 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).

[0166] In general, filter coefficients in CC-ALF (e.g., non-zero filter coefficients derived by an encoder) may be transmitted, for example, in APS. In one example, the filter coefficients may be scaled 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.

[0167] In one example, the syntax changes for CC-ALF are listed in Table 3 below. [Table 3]

[0168] The syntactic semantics associated with the above exemplary CC-ALF can be explained as follows:

[0169] alf_ctb_cross_component_cross_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] equal to 0 may indicate that the cross-component Cb filter is not applied to the block of Cb color component samples at luma position (xCtb, yCtb).

[0170] alf_ctb_cross_component_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] not equal to 0 may indicate that the alf_ctb_cross_component_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY]th component cross Cb filter is applied to the block of Cb color component samples at luma position (xCtb, yCtb).

[0171] alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] equal to 0 may indicate that the cross-component Cr filter is not applied to the block of Cr color component samples at luma position (xCtb, yCtb).

[0172] alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] not equal to 0 may indicate that the alf_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY]th component cross-Cr filter is applied to the block of Cr color component samples at luma position (xCtb, yCtb).

[0173] Examples of chroma sampling formats are listed below. In general, a luma block can correspond to one or more chroma blocks, e.g., two chroma blocks. The number of samples in each of the chroma blocks can be less than the number of samples in the luma block. The chroma subsampling format (also called chroma subsampling format, e.g., specified by chroma_format_idc) 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. The chroma subsampling scheme can be specified as a 4:x:y format for a typical 4 (horizontal) by 4 (vertical) block. x is the horizontal chroma subsampling factor (the number of chroma samples retained in the first row of the block), and y is the number of chroma samples retained in the second row of the block. In one example, the chroma subsampling format may be 4:2:0, which indicates that the chroma horizontal subsampling factor (e.g., SubWidthC) and the chroma vertical subsampling factor (e.g., SubHeightC) are both 2, as shown in Figures 17A and 17B. In another example, the chroma subsampling format may be 4:2:2, which indicates that the chroma horizontal subsampling factor (e.g., SubWidthC) is 2 and the chroma vertical subsampling factor (e.g., SubHeightC) is 1. In another example, the chroma subsampling format may be 4:4:4, which indicates that the chroma horizontal subsampling factor (e.g., SubWidthC) and the chroma vertical subsampling factor (e.g., SubHeightC) are 1. Thus, the chroma sample format or type (also referred to as the chroma sample position) may indicate the relative position of a chroma sample within a chroma block with respect to at least one corresponding luma sample within the luma block.

[0174] 17A-17B illustrate exemplary locations of chroma samples relative to luma samples according to an embodiment of the present disclosure. Referring to FIG. 17A, luma samples (1701) are located in rows (1711)-(1717). The luma samples (1701) shown in FIG. 17A may represent a portion of a picture. In one example, a luma block (e.g., luma CB) includes luma samples (1701). 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 samples (1703). Each chroma sample (e.g., chroma sample (1703(1))) corresponds to four luma samples (e.g., luma samples (1701(1)))-(1701(4))). In one example, the four luma samples are the top-left sample (1701(1)), the top-right sample (1701(2)), the bottom-left sample (1701(3)), and the bottom-right sample (1701(4)). A chroma sample (e.g., 1703(1))) may be located at the center-left position between the top-left sample (1701(1)) and the bottom-left sample (1701(3)), and the chroma sample type of the chroma block having chroma sample (1703) may 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 (1701(1)) and the bottom-left sample (1701(3)). The four luma samples (e.g., (1701(1)) through (1701(4))) can be referred to as neighboring luma samples of chroma sample (1703)(1).

[0175] In one example, each chroma block may include chroma samples (1704). The above description of the chroma samples (1703) may also apply to the chroma samples (1704), and therefore, for brevity, detailed descriptions may be omitted. Each of the chroma samples (1704) 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 (1704) 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., (1701(1)) to (1701(4))). For example, one of the chroma samples (1704) may be located at the center of the luma samples (1701(1)) to (1701(4)).

[0176] In one example, each chroma block includes chroma samples (1705). Each chroma sample (1705) can be located at a top-left position that is co-located with the top-left sample of the corresponding four luma samples (1701). The chroma sample type of a chroma block having chroma samples (1705) can be referred to as chroma sample type 2. Thus, each chroma sample (1705) is co-located with the top-left sample of the four luma samples (1701) 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 (1701). For example, one of the chroma samples (1705) can be located at the top-left position of luma samples (1701(1)) to (1701(4)).

[0177] In one example, each chroma block includes chroma samples (1706). Each of the chroma samples (1706) may be located at a top center position between the corresponding upper-left sample and the corresponding upper-right sample, and the chroma sample type of the chroma block having the chroma sample (1706) 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 upper-left sample (and the upper-right sample). For example, one of the chroma samples (1706) may be located at the top center position of the luma samples (1701(1)) to (1701(4)).

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

[0179] In one example, each chroma block includes chroma samples (1708). Each of the chroma samples (1708) 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 (1708) 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 (1701). For example, one of the chroma samples (1708) can be located between the bottom left and bottom right samples of luma samples (1701(1)) to (1701(4)).

[0180] In general, any suitable chroma sample type can be used for a chroma subsampling format. Chroma sample types 0 through 5 provide 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 (1705) and (1707) may be used for the chroma subsampling format 4:2:2.

[0181] In another example, a luma block can be considered to have alternating rows, such as rows 1711 through 1712, each including the top two samples (e.g., 1701(1) through 1701(2)) and the bottom two samples (e.g., 1701(3) through 1701(4)) of four luma samples (e.g., 1701(1) through 1701(4)). Thus, rows 1711, 1713, 1715, and 1717 can be referred to as the current row (also referred to as the front field), and rows 1712, 1714, 1716, and 1717 can be referred to as the next row (also referred to as the back field). The four luma samples (e.g., (1701(1)) to (1701(4))) are located on the current row (e.g., (1711)) and the next row (e.g., (1712)). Relative chroma positions 2-3 above are located on the current row, relative chroma positions 0-1 above are located between each current row and the respective next row, and relative chroma positions 4-5 above are located on the next row.

[0182] Chroma samples 1703, 1704, 1705, 1706, 1707, or 1708 are located in rows 1751-1754 in each chroma block. The specific locations of rows 1751-1754 may depend on the chroma sample type of the chroma samples. For example, for chroma samples 1703-1704 with chroma sample types 0-1, respectively, row 1751 is located between rows 1711-1712. For chroma samples 1705-1706 with chroma sample types 2-3, respectively, row 1751 is co-located with the current row 1711. For chroma samples 1707-1708 having respective chroma sample types 4-5, row 1751 is co-located with the next row 1712. The above description can be applied appropriately to rows 1752-1754, and a detailed description will be omitted for brevity.

[0183] Any suitable scanning method may be used to display, store, and / or transmit the luma blocks and corresponding chroma blocks described above in Figure 17A. In some example implementations, progressive scanning may be used.

[0184] Alternatively, interlaced scanning may be used, as shown in FIG. 17B. As previously mentioned, the chroma subsampling format may be 4:2:0 (e.g., chroma_format_idc equals 1). In one example, the variable chroma location type (e.g., ChromaLocType) may indicate 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 (1711), (1713), (1715), and (1717) and the next rows (1712), (1714), (1716), and (1717) may be scanned separately. For example, current rows (1711), (1713), (1715), and (1717) are scanned first, followed by the next rows (1712), (1714), (1716), and (1717). The current row can contain luma sample (1701), and the next row can contain luma sample (1702).

[0185] Similarly, corresponding chroma blocks can be scanned in an interlaced manner. Rows 1751 and 1753, which contain unfilled chroma samples 1703, 1704, 1705, 1706, 1707, or 1708, can be referred to as the current row (or current chroma row), and rows 1752 and 1754, which contain gray-filled chroma samples 1703, 1704, 1705, 1706, 1707, or 1708, can be referred to as the next row (or next chroma row). In one example, during interlaced scanning, rows 1751 and 1753 can be scanned first, followed by rows 1752 and 1754.

[0186] In addition to the ALF mentioned above, constrained directional enhancement filters (CDEFs) may also be used for loop filtering in video coding. In-loop CDEFs can be used to filter out coding artifacts such as quantization ringing artifacts while preserving image details. In some coding techniques, sample adaptive offset (SAO) algorithms can be used to achieve a similar goal by defining signal offsets for different classes of pixels. Unlike SAOs, CDEFs are nonlinear spatial filters. In some instances, the design of CDEF filters can be constrained to be easily vectorizable (i.e., implementable with single instruction, multiple data (SIMD) operations), whereas other nonlinear filters, such as median filters and bilateral filters, are not.

[0187] The CDEF design stems from the following observation: In some situations, the amount of ringing artifacts in a coded image can be roughly proportional to the quantization step size. The smallest detail retained in a quantized image is also proportional to the quantization step size. Thus, preserving image detail requires a smaller quantization step size, which results in higher undesirable quantization ringing artifacts. Fortunately, for a given quantization step size, the amplitude of the ringing artifacts can be smaller than the amplitude of the detail, which provides an opportunity to design a CDEF that strikes a balance between filtering out ringing artifacts while preserving sufficient detail.

[0188] The CDEF can first identify the orientation of each block. Then, the CDEF can adaptively filter along the identified orientation and to a lesser extent along orientations rotated 45° from the identified orientation. The filter strength can be explicitly signaled, allowing a high degree of control over detail blurring. An efficient encoder search can be designed for the filter strength. The CDEF can be based on two in-loop filters, and a combined filter can be used for video coding. In some example implementations, the CDEF filter may follow a deblocking filter for in-loop filtering.

[0189] The direction search can operate on reconstructed pixels (or samples), e.g., after a deblocking filter, as shown in FIG. 18. Because the reconstructed pixels are available to the decoder, the direction may not require signaling. The direction search can operate on blocks of appropriate size (e.g., 8×8 blocks) that are small enough to properly handle non-straight edges (so that edges appear sufficiently straight within the filtering block) and large enough to reliably estimate direction when applied to a quantized image. Having a consistent direction across the 8×8 region can facilitate vectorization of the filter. For each block, the direction that best matches the pattern within the block can be determined by minimizing a measure of discrepancy between the quantized block and each of the perfectly directional blocks, e.g., the sum of squared differences (SSD), RMS error, etc. In one example, a perfectly directional block (e.g., one of (1820) in FIG. 18) refers to a block in which all pixels along a straight line in one direction have the same value. Figure 18 shows an example of a direction search for an 8x8 block (1810) according to an exemplary embodiment of the present disclosure. In the example shown in Figure 18, the 45 degree direction (1823) of the set of directions (1820) is selected because the 45 degree direction (1823) can minimize the error (1840). For example, the error for the 45 degree direction is 12, which is the smallest among the range of errors from 12 to 87 shown by row (1840).

[0190] Exemplary nonlinear low-pass directional filters are described in further detail below. Identifying the direction helps align filter taps along the identified direction to reduce ringing artifacts while preserving directional edges or patterns. However, in some instances, directional filtering alone may not sufficiently reduce ringing artifacts. It may be desirable to use additional filter taps for pixels that are not along the primary direction (e.g., the identified direction). To reduce the risk of blurring, the additional filter taps can be treated more conservatively. Thus, the CDEF may define a primary tap and a secondary tap. In some exemplary implementations, a complete two-dimensional (2-D) CDEF filter may be expressed as follows:

number

[0191] In equation (14), D represents the damping parameter, and S (p) and S (s) are the intensities of the primary and secondary taps, respectively, the function round(·) rounds the middle away from zero, and w d,m,n (p) and w d,m,n (s) where σ represents the filter weights, and f(d,S,D) represents a constraint function acting on the difference d (e.g., d = x(m,n) - x(i,j)) between the filtered pixel (e.g., x(i,j)) and each of the neighboring pixels (e.g., x(m,n)). If the difference is small, f(d,S,D) will be equal to the difference d (e.g., f(d,S,D) = d), and the filter can behave as a linear filter. If the difference is large, f(d,S,D) can be equal to 0 (e.g., f(d,S,D) = 0), effectively ignoring the filter taps.

[0192] As another in-loop processing component, a set of in-loop reconstruction schemes can be used in video coding post-deblocking to generally remove noise and improve edge quality beyond the deblocking operation. The set of in-loop reconstruction schemes can be switchable within a frame (or picture) for each tile of appropriate size. Some examples of in-loop reconstruction schemes are described below, based on a separable symmetric Wiener filter and a dual autoinducer filter with subspace projection. Because content statistics can change substantially within a frame, the filters can be integrated into a switchable framework in which different filters can be triggered in different regions of the frame.

[0193] An example of a separable symmetric Wiener filter is shown below. The Wiener filter can be used as one of the switchable filters. Every pixel (or sample) in the degraded frame can be reconstructed as a non-causal filtered version of the pixel in a w × w window around the pixel, where w = 2r + 1, odd for integer r. The 2-D filter taps are 2 The vector F can be represented in column vector form with 1 × 1 elements, and a straightforward linear minimum mean square error (LMMSE) optimization is given by F=H -1 We can derive the filter parameters given by M, where H is the function E[XX T ], and w in a w × w window around the pixel 2 is the column-vectorized version of the autocovariance of x, M is the cross-correlation of x with the scalar source sample y to be estimated, E[YX T ]. The encoder can be configured to estimate H and M from the realizations in the deblocked frames and source, and send the resulting filter F to the decoder. However, in some example implementations, w 2There may be a substantial bitrate cost in transmitting these taps. Furthermore, non-separable filtering may make decoding prohibitively complex. Thus, several additional constraints may be imposed on the properties of F. For example, F may be constrained to be separable, so that filtering can be implemented as separable horizontal and vertical w-tap convolutions. In one example, each of the horizontal and vertical filters is constrained to be symmetric. Furthermore, in some example implementations, it may be assumed that the horizontal and vertical filter coefficients sum to one.

[0194] Dual self-guided filtering with subspace projection may also be used as one of the switchable filters for in-loop reconstruction and is described below. In some example implementations, guided filtering may be used in image filtering where a local linear model is used to calculate the filtered output y from the unfiltered samples x. The local linear model can be written as follows: y=Fx+G Eq.(15) Here, F and G can be determined based on statistics of the degraded image and the guide image (also called the guide image) in the neighborhood of the filtered pixel. If the guide image is identical to the degraded image, the resulting self-guided filtering can have an edge-preserving smoothing effect. According to some aspects of the present disclosure, the specific form of self-guided filtering may depend on two parameters: a radius r and a noise parameter e, which are listed as follows:

[0195] 1. The mean μ and variance σ of the pixels within a (2r+1) × (2r+1) window around each pixel 2 For example, find the pixel mean μ and variance σ 2 Obtaining can be efficiently implemented using box filtering based on integral imaging.

[0196] 2. Calculate the parameters f and g for each pixel based on equation (16). f=σ 2 / (σ 2 +e); g=(1-f)μ Eq.(16)

[0197] 3. Calculate F and G for each pixel as the average of the values ​​of the parameters f and g in a 3x3 window around the pixel being used.

[0198] The double self-induced filtering may be controlled by the radius r and the noise parameter e, where a larger radius r can mean higher spatial variance and a higher noise parameter e can mean higher range variance.

[0199] 19 illustrates an example of subspace projection according to an exemplary embodiment of the present disclosure. In the example shown in FIG. 19, subspace projection uses inexpensive reconstructions X1 and X2 to produce a final reconstruction X that is closer to the source Y. f Even if the cheap reconstructions X1 and X2 are not close to the source Y, if the cheap reconstructions X1 and X2 move in the right direction, the appropriate multipliers {α,β} can move the cheap reconstructions X1 and X2 much closer to the source Y. For example, the final reconstruction X f can be obtained based on the following equation (17): X f =X+α(X1-X)+β(X2-X) Eq.(17)

[0200] In addition to the deblocking filter, ALF, CDEF, and loop restoration described above, a loop filtering method called a cross-component sample offset (CCSO) filter, or CCSO, may also be implemented in the loop filtering process to reduce distortion in the reconstructed samples (also called reconstructed samples). The CCSO filter can be placed at any position within the loop filtering stage. In the CCSO filtering process, a nonlinear mapping can be used to determine an output offset based on the processed input reconstructed samples of the first color component. The output offset can be added to the reconstructed samples of the second color component in the CCSO filtering process.

[0201] The input reconstructed samples can be from a first color component located within the filter support region, as shown in FIG. 20. Specifically, FIG. 20 illustrates an example of a filter support region in a CCSO filter according to an embodiment of the present disclosure. The filter support region can include four reconstructed samples, p0, p1, p2, and p3. The four input reconstructed samples in the example of FIG. 20 follow a vertical and horizontal cross shape. In one example, a center sample (denoted by c) in the first color component and a sample to be filtered (denoted by f) in the second color component are co-located. When processing the input reconstructed samples, the following steps can be applied:

[0202] Step 1: Delta values ​​(e.g., differences) between four reconstructed samples, p0, p1, p2, and p3, and a center sample, c, are calculated and denoted as m0, m1, m2, and m3, respectively. For example, the delta value between p0 and c is m0.

[0203] Step 2: The delta values ​​of m0 through m3 can be further quantized into multiple (e.g., four) discrete values. The quantized values ​​can be denoted, for example, as d0, d1, d2, and d3 for m0, m1, m2, and m3, respectively. In one example, the quantized value for each of d0, d1, d2, and d3 can be −1, 0, or 1 based on the following quantization process: When di=-1 mi<-N, Eq.(18) di=0 -When N≦mi≦N, Eq.(19) When di=1 mi>N, Eq.(20) where N is the quantization step size, exemplary values ​​of N are 4, 8, 12, 16, etc., di and mi refer to the respective quantized and delta values, and i is 0, 1, 2, or 3.

[0204] The quantized values ​​d0-d3 can be used to identify nonlinear mapping combinations. In the example shown in Figure 20, the CCSO filter has four filter inputs d0-d3, and each filter input can have one of three quantized values ​​(e.g., -1, 0, and 1), so the total number of combinations is 81 (e.g., 3 4 ) . Figures 21A-21C show examples of 81 combinations according to certain embodiments of the present disclosure. The last column can represent the output offset value for each combination. The output offset value may be an integer such as 0, 1, -1, 3, -3, 5, -5, -7, etc. The first column represents the index assigned to the combination of quantized d0, d1, d2, and d3. The middle columns represent all possible combinations of quantized d0, d1, d2, and d3.

[0205] The final filtering process of the CCSO filter can be applied as follows: f'=clip(f+s) Eq.(21) where f is the reconstructed sample to be filtered and s is the output offset value taken, for example, from FIGS. 21A-21C. In the example shown in equation (21), the filtered sample value f′ of the reconstructed sample to be filtered can be further clipped to a range related to the bit depth.

[0206] A Local Sample Offset (LSO) method or LSO filtering process can be used in video coding. In LSO, a filtering approach similar to that used in CCSO can be applied. However, the output offset value can be applied to a color component that is the same color component as the input reconstructed sample used in the filtering process. Thus, in LSO, the input reconstructed samples used in the filtering process (e.g., p0-p3 and c) and the reconstructed sample to be filtered (e.g., f) are in the same component, such as the luma component, the chroma component, or any suitable component. LSO can have a filter shape (as shown in FIG. 20) similar to or identical to that of CCSO.

[0207] An exemplary CCSO filtering of a second-color reconstructed sample f to be filtered corresponding to a first-color sample c using first-color filters p0, p1, p2, and p1, as shown in FIG. 20, may be referred to as a 5-tap CCSO filter design. Alternatively, other CCSO designs with different numbers of filter tabs may be used. For example, a less complex 3-tap CCSO design may be used in video coding. FIG. 22 illustrates an exemplary implementation of CCSO according to an embodiment of the present disclosure. Any of eight different exemplary filter shapes may be defined for a 3-tap CCSO implementation. Each of the filter shapes may define the locations of three reconstructed samples (also referred to as three taps) in the first component (also referred to as the first color component). The three reconstructed samples may include a center sample (denoted as c) and two symmetrically located samples, which are indicated by the same numbers (one of 1 through 8) in FIG. 22. In one example, the reconstructed sample in the second color component to be filtered is co-located with the center sample c. For clarity, the reconstructed samples in the second color component to be filtered are not shown in FIG.

[0208] A Sample Adaptive Offset (SAO) filter can be used in video coding. In some example implementations, an SAO filter or SAO filtering process can be applied to the reconstructed signal after the deblocking filter, for example, by using an offset value in the slice header. For luma samples, the encoder can determine whether an SAO filter is applied to the current slice. If an SAO filter is enabled, the current picture is recursively divided into four subregions, and one of six SAO types (SAO types 1 to 6) can be selected for each subregion, as shown in Table 4. The SAO filter can reduce distortion by classifying reconstructed pixels into multiple categories and adding an offset to pixels of each category within the current subregion. Edge properties can be used for pixel classification for SAO types 1 to 4, and pixel intensity can be used for pixel classification for SAO types 5 to 6. [Table 4]

[0209] A band offset (BO) can be used to classify pixels in a subregion (e.g., all pixels) into multiple bands, where each band can contain pixels within the same intensity interval. The intensity range can be divided into multiple intervals (e.g., 32 intervals) from the minimum intensity value (e.g., zero) to the maximum intensity value (e.g., 255 for 8-bit pixels), and each interval can have an offset. The multiple intervals or bands (e.g., 32 bands) can then be divided into two groups. One group can contain the 16 central bands, and the other group can contain the remaining 16 bands. In one example, only the offset within one group is transmitted. For pixel classification operations in BO, the most significant 5 bits of each pixel can be directly used as a band index.

[0210] The edge offset (EO) can use four 1-D 3-pixel patterns for pixel classification, taking into account edge direction information, as shown in Figure 23. Figure 23 shows examples of four 1-D 3-pixel patterns for pixel classification in EO. From left to right, the four 1-D 3-pixel patterns correspond to a 1-D 0-degree pattern (2310), a 1-D 90-degree pattern (2320), a 1-D 135-degree pattern (2330), and a 1-D 45-degree pattern (2340), respectively. For each subregion of a picture (e.g., the current picture), one of the four patterns can be selected to classify pixels into multiple categories by comparing each pixel with its two neighboring pixels. The selection can be sent in the bitstream as side information. Table 5 shows the pixel classification rules for EO. [Table 5]

[0211] In one example, it is desirable for the decoder-side SAO to operate independently of the LCUs to conserve line buffers. To operate the SAO independently of the LCUs, for example, the top and bottom row pixels in each LCU are not subjected to SAO processing when a classification pattern of 90°, 135°, or 45° is selected, and the left and rightmost pixels in each LCU are not subjected to SAO processing when a pattern of 0°, 135°, or 45° is selected.

[0212] Table 6 below describes the syntax that may be signaled for a CTU when parameters are not merged from neighboring CTUs. [Table 6]

[0213] In some implementations of the CCSO loop filtering process described above, the correspondence between combinations of quantized delta values ​​(or their indices) and cross-component sample offset values, such as those illustratively shown for 5-tap CCSO filtering in Figures 21A-21C, may be referred to as a CCSO lookup table (LUT). One or more of the LUTs may potentially be used in the CCSO filtering process during video encoding or decoding. When multiple LUTs are provided for CCSO filtering, selection from the multiple LUTs may be dynamically and adaptively performed by an encoder or decoder at various levels (e.g., picture level, slice level, CTB level, CB level, FU level, etc.) during the loop filtering process.

[0214] Each of these LUTs can be based on any suitable number of taps (e.g., 5 taps or 3 taps, or any other number of taps) and delta quantization levels (e.g., the 3-level delta quantization described above, or any other number of delta quantization levels). Thus, the LUTs may be of different sizes (e.g., (5-1) for CCSO with 5 taps and 3 quantization levels, as described above). 3 = 81 quantized delta combinations and offset correspondences; or (3-1) for CCSO with 3 taps and 3 quantization levels 3 = 8 quantized delta combinations and offset correspondences).

[0215] As described above, some of these LUTs may be pre-defined. For example, these pre-defined CCSO LUTs may be pre-trained offline using training image data for general use by the CCSO filtering process. Such pre-defined LUTs may be fixed and constant (e.g., fixed constant offsets for various pre-defined quantized delta value combinations), and thus, the contents of these pre-defined LUTs may not need to be signaled in the video bitstream from the encoder to the decoder. Instead, these LUTs may be pre-stored or hardwired or hard-coded within the video encoder or video decoder for use by the CCSO filtering process.

[0216] Furthermore, as mentioned above, some of the CCSO LUTs other than the pre-defined / pre-trained LUTs used during the CCSO filtering process may be derived by the encoder during the encoding process rather than being trained offline. Because these CCSO LUTs are not pre-defined, their contents would need to be explicitly signaled in the bitstream. Signaling these encoder-derived LUTs is typically expensive, as it involves significant overhead per frame, especially for large LUTs, which can cause significant and undesirable overall bitrate loss. Thus, it may be desirable to devise an efficient scheme for organizing, encoding, and signaling these LUTs in the bitstream.

[0217] In some example implementations, only pre-defined LUTs may be used in the CCSO filtering process when encoding or decoding video. In some other example implementations, only encoder-derived LUTs may be used in the CCSO filtering process when encoding or decoding video. In still other example implementations, both pre-defined LUTs and encoder-derived LUTs may be used in the CCSO filtering process when encoding or decoding video, and the CCSO filtering of a particular FU may use any LUT selected from the pre-defined LUTs and the encoder-derived LUTs.

[0218] As detailed above, the CCSO process refers to a filtering process that uses reconstructed samples of a first color component (e.g., Y or Cb or Cr, i.e., including but not limited to the luma component, but solely the chroma component) as input, and the output is applied to a second color component, which is a distinct color component of the first color component, according to a particular CCSO LUT. An exemplary 5-tap filter shape for a CCSO filter is shown in Figure 20, and corresponding exemplary LUTs are shown in Figures 21A-21C.

[0219] Although the filtering process in which the first and second color components are different is called CCSO, as mentioned above, an intra-color offset process called local sample offset (LSO) can also be implemented. The LSO filter process may use reconstructed samples of a first color component (e.g., Y, Cb, or Cr) as input, and the output is applied to the same first color component according to a specific LSO LUT. A specific LSO LUT may be selected from one or more LUTs for LSO and used to determine local sample offsets, similar to determining cross-component sample offsets in the CCSO process. Like the CCSO LUT, such an LSO LUT may be predefined (for example, trained offline) as a fixed constant LUT, or may be derived by the encoder during the encoding process. An encoder-derived LSO LUT would need to be signaled in the bitstream, whereas a predefined / fixed / constant / offline-trained LSO LUT may be pre-stored, hardwired, or hard-coded in the encoder or decoder and may not need to be signaled, similar to the predefined CCSO LUT described above.

[0220] The following disclosure further describes various exemplary implementations of dynamic and adaptive selection of sample offset LUTs during in-loop filtering of reconstructed samples within a coding block in a decoder and an encoder. These implementations and their underlying principles are applicable to LSO filtering as well as CCSO filtering. For ease of explanation, CCSO may be specifically mentioned in some contexts. However, the following disclosure is not limited to CCSO and is also applicable to LSO.

[0221] In some example implementations, one or more predefined lookup tables (LUTs) may be defined for CCSO and / or LSO, and these lookup tables may be used to derive offset values ​​to be added to reconstructed sample values ​​of specific color components to calculate CCSO or LSO filtered sample values, for example, according to Equation (21). These predefined CCSO and / or LSO LUTs are shared and known between the encoder and decoder in advance. Thus, these LUTs may be stored, hardwired, or hard-coded in either the encoder or decoder device.

[0222] Each LUT represents a particular nonlinear mapping between a delta value and a sample offset value. When multiple LUTs are available for use, the selection of the LUT at various filter levels (FUs, or any other levels) for each color component may be made within the encoder and signaled to the decoder. In some implementations described below, the selection of the LUT (or various nonlinear mappings between various delta values ​​and sample offset values) may be implemented with various local adaptivities.

[0223] In some implementations, local adaptability may be based on certain statistics derived from coded information of the block regions to which CCSO or LSO filtering is applied. These statistical characteristics of the filtered block regions may represent image features in the reconstructed samples that correlate with potential distortions that can be adaptively handled by sample offset filter selection (e.g., selection of CCSO or LSO lookup tables). These statistics may include, but are not limited to, one or more of the following:

[0224] I. Edge directions derived with CDEF as described above, or using other edge detection methods such as the Canny edge detector or the Sobel edge detector.

[0225] II. Measure of smoothness of reconstructed samples within the sample domain at different filtering levels applied to CDEF. In some embodiments, smoothness may be calculated by the range of sample values ​​within a sample domain, which may be defined as the absolute difference between the maximum and minimum sample values. In another embodiment, smoothness may be calculated by the interquartile range of sample values ​​of pixels located within the sample region. The interquartile range of sample values ​​is defined as the Ath percentile minus the Bth percentile of the sample values. An example value for A may be 75% and an example value for B may be 25%. In yet another embodiment, smoothness may be calculated by the variance of the sample values ​​within the sample domain. The variance can be calculated as follows:

number

number

[0226] III. Coded / coding information, including, but not limited to, prediction modes signaled for blocks to which CCSO or LSO is applied (e.g., whether intra DC mode, intra planar mode, intra PAETH mode, intra SMOOTH mode, intra recursive filtering mode, or inter SKIP mode is applied), information regarding coefficient coding related to the current block (e.g., coded block flag), block size, quantization parameters, and motion vectors (magnitudes).

[0227] IV. Information available to both the encoder and decoder when applying CCSO or LSO, such as sample classification information derived during the loop filtering process (e.g., ALF), filtering strength derived during the deblocking process, CDEF, and loop restoration.

[0228] In some common example implementations, the nonlinear mapping used in CCSO or LSO filtering (or CCSO or LSO LUT) for a block may be selected depending on the statistics of that block, which may include, but are not limited to, I, II, III, and IV above.

[0229] In one embodiment, the color components that are input to the CCSO may be used to derive the statistics.

[0230] In another embodiment, the color components filtered by the output of the CCSO may be used to derive the statistics.

[0231] In another embodiment, when the statistics defined in I above are used (edge ​​direction statistics), the LUT used for the current block in CCSO may be selected based on the edge information of the current block.

[0232] In an example where the edge directions derived in CDEF are used statistically, for CCSO and / or LSO, there may be a total of a predefined number of LUTs (e.g., 8). Each of the LUTs may correspond to one of, for example, eight edge directions that are the output of an exemplary CDEF edge derivation process. One of the LUTs may be selected according to this correspondence for the current block based on the edge direction. The exemplary eight LUTs may be signaled at various levels, e.g., frame level, in HLS (APS, slice header, frame header, PPS) (if not predefined).

[0233] In another more general example where the edge directions derived in CDEF are used statistically, there may be a total of N LUTs, each of which corresponds to two or more of the eight edge directions that are the output of an exemplary CDEF edge derivation process. One of the LUTs may be selected according to this correspondence for the current block based on the edge direction. Exemplary values of N are integers where 1 < N < 8. The N LUTs may be signaled at frame level in HLS (APS, slice header, frame header, PPS) (if not predefined).

[0234] In some exemplary implementations, when the statistics defined in II above are used (smoothness statistics), the selection of the LUT for the current block in CCSO and / or LSO may be based on whether the measured smoothness value is less than (or greater than) one or more given thresholds.

[0235] In one example, the standard deviation (S) of the current block may be compared with a predetermined number of thresholds for LUT selection. For example, there may be several LUTs to be selected. For example, select from 4 LUTs. Correspondingly, there may be 3 thresholds (S1, S2, S3). Thus, the LUT selection from the 4 LUTs may be based on the following criteria: if S < S1, LUT1 may be selected; if S1 ≤ S < S2, LUT2 may be selected; if S2 ≤ S < S3, LUT3 may be selected; if S ≥ S4, LUT4 may be selected.

[0236] In certain embodiments, when the statistics defined in III above are used (statistics of the information to be encoded / encoded), the selection of the LUT used for the current block in the CCSO and / or LSO may be based on the information to be encoded / encoded.

[0237] In one example, the LUT for the current block may be selected based on the prediction mode of the current block. Different prediction modes may correspond to different LUTs. For the prediction mode used in the current block, the corresponding LUT may be selected. Exemplary prediction modes include, but are not limited to, the intra DC mode, intra plane mode, intra PAETH mode, intra SMOOTH mode, intra recursive filtering mode, inter SKIP mode, etc.

[0238] In some exemplary implementations, the various statistical information described above may be used to determine the filter used in the CCSO, including but not limited to filter coefficients, filter tap positions, and the number of filter taps. Such a determination may be equivalent to the selection of a LUT as described above when such filtering parameters are embodied in different look-up tables. Alternatively, if these composite LUTs are constructed to include variations of these parameters in a particular composite LUT, the selection may involve selecting an item within the LUT rather than selecting a LUT.

[0239] In any of the above implementations, the statistics for selecting the LUT may be based on statistics for any color component. It may be based on a single color component or a combination of multiple color components. It may be based on the same color component as the color component being filtered or on another color component different from the color component being filtered. The color component(s) on which the statistics are performed may be referred to as the "at least first color component." The input color component to the selected sample offset filter and the color component to be filtered may be referred to as the "second color component." The delta value used to look up the sample offset value in the selected sample offset filter may be taken from a sample co-located with the sample being filtered in any color component, referred to as the "third color component." The first, second, and third color components may be the same or different. For example, the second and third color components may be different (thus, "cross-component sample offset" filtering) or the same (thus, "local sample offset" filtering).

[0240] In some example implementations, the number of LUTs (e.g., M) may be signaled for the color components to which CCSO or LSO is applied, and the index of the selected LUT to be applied to the current block is also signaled. An example value of M is any integer between 1 and 1024.

[0241] In some example implementations, the number of LUTs (e.g., M) and the actual LUT (if not predefined) may be signaled in the HLS (APS, slice header, frame header, PPS, SPS, VPS) at various levels, including but not limited to, at the sequence level, picture level, or CTU / SB level. The index of the selected LUT for the current block may be signaled in the HLS (APS, slice header, frame header, PPS, SPS, VPS) at various levels, including but not limited to, at the CTU / SB level, coded block level, or filter unit level.

[0242] The term "loop filtering parameters" with respect to a CCSO or LSO filter, as used in this disclosure, refers to parameters signaled in the bitstream that indicate various characteristics of the CCSO or LSO filter, including, but not limited to, a flag indicating the type of LUT (e.g., predefined or encoder-derived), an index into the LUT, the number of delta levels in the LUT, the quantization step for the delta, the number of taps for each filter, the tap position relative to the filtered sample position for each filter, etc.

[0243] FIG. 24 shows a flowchart 2400 of an exemplary method for in-loop cross-sample offset filtering or local sample offset filtering, in accordance with the principles underlying the above implementation. The exemplary method flow begins at 2401. At S2410, at least one statistical characteristic associated with reconstructed samples of at least a first color component in a current reconstructed data block of a video stream is obtained. At S2420, a target sample offset filter from a plurality of sample offset filters is selected based on the at least one statistical characteristic, the target sample offset filter including a nonlinear mapping between sample delta indexes and sample offset values. At S2430, a current sample in a second color component of the current reconstructed data block is filtered using the target sample offset filter and a reference sample in a third color component of the current reconstructed data block to generate a filtered reconstructed sample of the current sample. The exemplary method flow ends at S2499.

[0244] The embodiments of the present disclosure may be used separately or 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. The embodiments of the present disclosure may be applied to luma blocks or chroma blocks.

[0245] 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 25 illustrates a computer system (2500) suitable for implementing certain embodiments of the disclosed subject matter.

[0246] 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.

[0247] 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.

[0248] The components illustrated in Figure 25 for computer system 2500 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 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 illustrated in the exemplary embodiment of computer system 2500.

[0249] The computer system (2500) 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 human conscious input, such as audio (e.g., speech, music, ambient sounds), images (e.g., scanned images, photographic images obtained from still cameras), and video (e.g., two-dimensional video, three-dimensional video, including stereoscopic video).

[0250] The input human interface devices may include one or more (only one of each is shown) of a keyboard (2501), a mouse (2502), a trackpad (2503), a touchscreen (2510), a data glove (not shown), a joystick (2505), a microphone (2506), a scanner (2507), and a camera (2508).

[0251] The computer system (2500) 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 (2510), data gloves (not shown), or joystick (2505) (although haptic feedback devices may also function as input devices), audio output devices (e.g., speakers (2509), headphones (not shown)), visual output devices (e.g., screens (2510), 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).

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

[0253] 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.

[0254] The computer system (2500) may also include an interface (2554) to one or more communication networks (2555). 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 (2549) (e.g., a USB port on the computer system (2500)). Others are typically integrated into the core of the computer system (2500) 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 (2500) 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. Each of these networks and network interfaces, as described above, may use certain protocols and protocol stacks.

[0255] The aforementioned human interface devices, human-accessible storage devices, and network interfaces may be attached to the core (2540) of the computer system (2500).

[0256] A core (2540) may include one or more central processing units (CPUs) (2541), graphics processing units (GPUs) (2542), specialized programmable processing units in the form of field programmable gate arrays (FPGAs) (2543), hardware accelerators (2544) for certain tasks, graphics adapters (2550), etc. These devices may be connected through a system bus (2548), along with read-only memory (ROM) (2545), random access memory (2546), and internal mass storage devices (2547) such as internal non-user-accessible hard drives or solid-state drives (SSDs). In some computer systems, the system bus (2548) 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 (2548) or through a peripheral bus (2549). In one example, a screen 2510 may be connected to a graphics adapter 2550. Architectures for peripheral buses include PCI, USB, and the like.

[0257] The CPU (2541), GPU (2542), FPGA (2543), and accelerator (2544) can execute certain instructions that, in combination, can constitute the above-mentioned computer code. The computer code can be stored in ROM (2545) or RAM (2546). Temporary data can also be stored in RAM (2546), while persistent data can be stored, for example, in internal mass storage device (2547). 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 CPUs (2541), GPUs (2542), mass storage devices (2547), ROM (2545), RAM (2546), etc.

[0258] 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.

[0259] As a non-limiting example, a computer system having the architecture (2500), specifically the core (2540), 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 (2540) that is non-transitory, such as the core's internal mass storage (2547) or ROM (2545). Software implementing various embodiments of the present disclosure can be stored on such devices and executed by the core (2540). The computer-readable media can include one or more memory devices or chips, depending on particular needs. The software can cause the core (2540), and specifically 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 (2546) 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 (2544)), 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.

[0260] While this disclosure has described several exemplary embodiments, there are alterations, permutations, and various substitute equivalents that fall within the scope of this disclosure. In the above embodiments, any of the process operations may be combined or arranged in any quantity or order as desired. Furthermore, two or more of the process operations described above may be performed in parallel. Thus, it will be appreciated that those skilled in the art can devise many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and are thus within the spirit and scope of the present disclosure.

[0261] Appendix A: Acronyms JEM: joint exploration model VVC: versatile video coding BMS: benchmark set MV: Motion Vector HEVC: High Efficiency Video Coding 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 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 HDR: high dynamic range SDR: standard dynamic range JVET: Joint Video Exploration Team MPM: most probable mode WAIP: Wide-Angle Intra Prediction CU: Coding Unit PU: Prediction Unit TU: Transform Unit CTU: Coding Tree Unit PDPC: Position Dependent Prediction Combination ISP: Intra Sub-Partition SPS: Sequence Parameter Setting PPS: Picture Parameter Set APS: Adaptation Parameter Set VPS: Video Parameter Set DPS: Decoding Parameter Set ALF: Adaptive Loop Filter SAO: Sample Adaptive Offset CC-ALF: Cross-Component Adaptive Loop Filter CDEF: Constrained Directional Enhancement Filter CCSO: Cross-Component Sample Offset LSO: Local Sample Offset LR: Loop Restoration Filter AV1: AOMedia Video 1 AV2: AOMedia Video 2

Claims

[Claim 1] 1. A method for in-loop filtering of a video stream, comprising: obtaining at least one statistical characteristic associated with reconstructed samples of at least a first color component within a current reconstructed data block of the video stream; selecting a target sample-offset filter from among a plurality of sample-offset filters based on the at least one statistical characteristic, the target sample-offset filter including a non-linear mapping between sample delta indexes and sample-offset values; filtering a current sample in a second color component of the current reconstructed data block with the target sample offset filter and a reference sample in a third color component of the current reconstructed data block to generate a filtered reconstructed sample of the current sample; method.