Method and apparatus for in-loop filtering of a video stream
Adaptive non-linear mapping for sample offset filtering addresses the challenge of distortion in video encoding and decoding by enhancing image quality through tailored filtering based on statistical properties, effectively reducing distortion in lossy compression.
Patent Information
- Application Number
- CN202411032979.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-04
- Filing Date
- 2022-01-28
- Publication Date
- 2024-12-03
AI Technical Summary
Existing video encoding and decoding technologies face challenges in reducing distortion and improving the quality of reconstructed images, particularly in lossy compression scenarios, where conventional filtering methods are inadequate in adapting to varying statistical properties of video data.
Implementing adaptive non-linear mapping for sample offset filtering, which involves selecting a target sample offset filter based on statistical properties like edge information and smoothness metrics, and using nonlinear mappings to enhance filtering of video streams.
This approach reduces distortion and enhances the quality of reconstructed images by effectively adapting to the statistical properties of video data, improving the overall image quality in lossy compression scenarios.
Smart Images

Figure CN119071482A_ABST
Abstract
Description
Incorporation by Reference
[0001] The present disclosure is based upon and claims the benefit of priority to U.S. Non-Provisional Patent Application No. 17 / 568,565, filed on January 4, 2022, which claims the benefit of U.S. Provisional Application No. 63 / 163,707, filed on March 19, 2021, entitled “ADAPTIVE NON-LINEAR MAPPING FOR SAMPLE OFFSET.” Both of the above applications are incorporated herein by reference in their entirety. Technical Field
[0002] The present disclosure generally describes a set of advanced video coding techniques, and particularly relates to methods and apparatus for in-loop filtering of video streams. Background Art
[0003] The purpose of the background description provided herein is to generally present the context of the present disclosure. To the extent the work described in this background section, the work of the presently named inventors and aspects of the description that may not otherwise be qualified as prior art at the time of filing this application are neither explicitly nor implicitly admitted to be prior art against 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 of which has a spatial dimension of, for example, 1920×1080 luminance samples and associated full or sub-sampled chrominance samples. The series of pictures can have a fixed or variable picture rate (alternatively referred to as a frame rate) of, for example, 60 pictures per second or 60 frames per second. Uncompressed video has specific bit rate requirements for streaming or data processing. For example, a video with a pixel resolution of 1920×1080, a frame rate of 60 frames per second, and a chrominance subsampling of 4:2:0 at 8 bits per pixel per color channel requires a bandwidth of nearly 1.5 Gbit / s. One hour of such video requires more than 600 gigabytes of storage space.
[0005] One purpose of video encoding and decoding can be to reduce the redundancy of uncompressed input video signals by compression. Compression can help reduce the bandwidth and / or storage space requirements mentioned above, in some cases reducing by two orders of magnitude or more. Both lossless compression and lossy compression and their combinations can be used. Lossless compression refers to a technique that can reconstruct an exact copy of the original signal from the compressed original signal via a decoding process. Lossy compression refers to an encoding / decoding process in which the original video information is not fully retained during encoding and is not fully restored during decoding. When lossy compression is used, the reconstructed signal may be different from the original signal, but the distortion between the original signal and the reconstructed signal is small enough to present a reconstructed signal useful for the intended application, although there is some information loss. In the case of video, lossy compression is widely used in many applications. The amount of tolerable distortion depends on the application. For example, users of certain consumer video streaming applications may tolerate higher distortion than users of movie or television broadcast applications. The compression ratio that can be achieved by a specific encoding algorithm can be selected or adjusted to reflect various distortion tolerances: higher tolerable distortion generally allows encoding algorithms that produce higher losses and higher compression ratios. Summary of the invention
[0006] Aspects of the present disclosure provide methods and apparatus for cross-sample offset filtering and local sample offset filtering in video encoding and decoding involving adaptive non-linear mapping for sample offsets.
[0007] In some example implementations, a method for in-loop filtering of a video stream is disclosed. The method may include: obtaining at least one statistical property associated with a reconstructed sample of at least a first color component in a current reconstructed data block of the video stream; selecting a target sample offset filter among a plurality of sample offset filters based on the at least one statistical property, the target sample offset filter including a nonlinear mapping between a sample delta metric and a sample offset value; and filtering a current sample of a second color component of the current reconstructed data block using the target sample offset filter and a reference sample of a third color component of the current reconstructed data block to generate a filtered reconstructed sample of the current sample.
[0008] In the above implementation, 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 color component different from the third color component. The second color component may be the same color component as the third color component. At least the first color component may include one, two or three color components.
[0009] In any of the above implementations, at least one statistical attribute may include edge information of the current reconstructed data block. In addition, the edge information of the current reconstructed data block includes an edge direction derived in a constrained direction enhancement filter (CDEF) process, and the plurality of sample offset filters include N sample offset filters corresponding to the N CDEF edge directions, where N is an integer between 1 and 8, inclusive. In addition, the plurality of sample offset filters are signaled at a frame level in a high level syntax (HLS).
[0010] In any of the above implementations, the at least one statistical attribute includes a smoothness metric of the current reconstructed data block. In addition, the smoothness metric of the current reconstructed data block is mapped to one of M predefined smoothness levels characterized by M-1 smoothness level thresholds; the plurality of sample offset filters include 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 one of the M predefined smoothness levels mapped to the smoothness metric.
[0011] In any of the above implementations, at least one statistical attribute includes encoding information of the current reconstructed data block. In addition, the encoding information includes a current prediction mode of the current reconstructed data block; a plurality of sample offset filters correspond to different prediction modes; and a 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. In addition, the different prediction modes include at least one of an intra-frame DC mode, an intra-frame planar mode, an intra-frame PAETH mode, an intra-frame smoothing mode, an intra-frame recursive filtering mode, and an inter-frame skip mode.
[0012] In any of the above implementations, each of the plurality of sample offset filters is associated with a set of filter coefficients, a plurality of filter taps, and positions of the plurality of filter taps.
[0013] In any of the above implementations, filtering the current sample of the second color component of the current reconstructed data block using a target sample offset filter and a reference sample of the 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 sample of the third color component at the first position and the second position as a reference sample; determining a delta measure between the reference sample corresponding to the second position and the reference sample corresponding to the first position, both of which are the third color components of the current reconstructed data block; extracting a sample offset value from the target sample offset filter based on the delta measure; 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.
[0014] In any of the above implementations, the plurality of sample offset filters may be predetermined.The plurality of sample offset filters and an index of a target sample offset filter selected among the plurality of sample offset filters may be signaled at a sequence level, a picture level, or a coding tree unit level.
[0015] In some implementations, a video encoding or decoding apparatus is disclosed. The apparatus may include a circuit system configured to implement any of the above methods.
[0016] Aspects of the present disclosure also provide a non-transitory computer-readable medium storing instructions that, when executed by a computer for video decoding and / or encoding, cause the computer to perform a method for video decoding and / or encoding.
[0017] In the scheme of the present application, at least one statistical property associated with the reconstructed sample of at least the first color component in the current reconstructed data block of the video stream is obtained; a target sample offset filter is selected from a plurality of sample offset filters based on the at least one statistical property, the target sample offset filter comprising a nonlinear mapping between a sample increment metric and a sample offset value; and the current sample of the second color component of the current reconstructed data block is filtered using the target sample offset filter and a reference sample of the third color component of the current reconstructed data block to generate a filtered reconstructed sample of the current sample. In this way, the sample offset filtering performed by local adaptation is used to reduce the distortion introduced by the encoding process and improve the quality of the reconstructed image. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Other features, properties, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and the accompanying drawings, in which:
[0019] Figure 1A A schematic diagram showing an exemplary subset of intra prediction direction modes.
[0020] Figure 1B A diagram of exemplary intra prediction directions is shown.
[0021] Figure 2 A schematic diagram showing spatial merging candidates of a current block and its surroundings for motion vector prediction in one example is shown.
[0022] Figure 3 A schematic diagram showing a simplified block diagram of a communication system (300) according to an example implementation is shown.
[0023] Figure 4 A schematic diagram showing a simplified block diagram of a communication system (400) according to an example implementation is shown.
[0024] Figure 5A schematic diagram showing a simplified block diagram of a video decoder according to an example implementation.
[0025] Figure 6 A schematic diagram showing a simplified block diagram of a video encoder according to an example implementation.
[0026] Figure 7 A block diagram of a video encoder according to another example embodiment is shown.
[0027] Figure 8 A block diagram of a video decoder according to another example embodiment is shown.
[0028] Fig. 9 An exemplary adaptive loop filter according to an embodiment of the present disclosure is shown.
[0029] FIG. 10A to FIG. 10D Examples of sub-sampling positions for calculating gradients in a vertical direction, a horizontal direction, and two diagonal directions, respectively, according to an embodiment of the present disclosure are shown.
[0030] Fig.10E An example approach to determining block directionality based on various gradients for use by an adaptive loop filter (ALF) is shown.
[0031] Fig.11A and Fig. 11B Modified block classification at virtual boundaries according to an example implementation of the present disclosure is shown.
[0032] FIG. 12A to FIG. 12F An exemplary adaptive loop filter with padding operations at various virtual boundaries is shown in accordance with an embodiment of the present disclosure.
[0033] Fig.13 An example of maximum coding unit aligned picture quadtree partitioning according to an embodiment of the present disclosure is shown.
[0034] Fig.14 An example embodiment according to the present disclosure is shown. Fig.13 The corresponding quadtree partitioning mode.
[0035] Fig.15 Cross-component filters for generating chroma components according to an example implementation of the present disclosure are shown.
[0036] Fig.16 An example of a cross-component ALF filter according to an embodiment of the present disclosure is shown.
[0037] FIG. 17A to FIG. 17BExemplary positions of chroma samples relative to luma samples are shown in accordance with an embodiment of the present disclosure.
[0038] Fig.18 An example of a directional search of a block according to an embodiment of the present disclosure is shown.
[0039] Fig.19 An example of subspace projection according to an embodiment of the present disclosure is shown.
[0040] Fig. 20 An example of a filter support region in a cross-component sample offset (CCSO) filter according to an embodiment of the present disclosure is shown.
[0041] FIG. 21A to FIG. 21C An exemplary mapping used in a CCSO filter according to an embodiment of the present disclosure is shown.
[0042] Fig. 22 An example implementation of a CCSO filter according to an embodiment of the present disclosure is shown.
[0043] Fig.23 Four exemplary modes for pixel classification in edge migration according to an embodiment of the present disclosure are shown.
[0044] Fig.24 A flow chart outlining a process (2400) according to an implementation of the present disclosure is shown.
[0045] Fig.25 A schematic diagram of a computer system according to an example implementation is shown. DETAILED DESCRIPTION
[0046] Video encoders and decoders may utilize techniques from several broad categories and steps, including, for example, motion compensation, Fourier transforms, quantization, and entropy coding.
[0047] Video codec techniques may include techniques known as intra-coding. In intra-coding, sample values are represented without reference to samples or other data from previously reconstructed reference pictures. In some video codecs, pictures are spatially subdivided into blocks of samples. When all sample blocks are encoded in intra-mode, the picture may be referred to as an intra-picture. Intra-pictures and their derivatives, such as independent decoder refresh pictures, may be used to reset decoder states, and may therefore be used as the first picture in an encoded video stream and video session or as a still image. The samples of the block after intra-prediction may then be transformed to the frequency domain, and the transform coefficients thus generated may be quantized before entropy coding. Intra-prediction represents a technique for minimizing sample values in the pre-transform domain. In some cases, the smaller the DC value after the transform and the smaller the AC coefficient, the fewer bits are required to represent the block after entropy coding at a given quantization step size.
[0048] Conventional intra-frame coding, such as that known from, for example, MPEG (Moving Picture Experts Group, MPEG)-2 generation coding techniques, does not use intra-frame prediction. However, some newer video compression techniques include techniques that attempt to encode / decode blocks based on metadata and / or surrounding sample data obtained during encoding and / or decoding of, for example, spatially adjacent and preceding in decoding order the data block being intra-coded or decoded. Such techniques are hereinafter referred to as "intra-frame prediction" techniques. Note that, in at least some cases, intra-frame prediction uses only reference data from the current picture being reconstructed, and does not use reference data from other reference pictures.
[0049] There may be many different forms of intra-frame prediction. When more than one such technique may be used in a given video coding technique, the techniques used may be referred to as intra-frame prediction modes. One or more intra-frame 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, and the mode / sub-mode information and intra-frame coding parameters for a video block may be encoded separately or included together in a mode codeword. Which codeword is used for a given mode, sub-mode, and / or parameter combination may have an impact on the coding efficiency gain through intra-frame prediction, and therefore may have an impact on the entropy coding technique used to convert the codeword into a bitstream.
[0050] Some modes of intra prediction were introduced by H.264, refined in H.265, and further refined in newer coding technologies such as the Joint Exploration Model (JEM), Versatile Video Coding (VVC), and Benchmark Set (BMS). Typically, for intra prediction, the predictor block can be formed using the values of neighboring samples that have become available. For example, the available values of a specific set of neighboring samples along a specific direction and / or line can be copied to the predictor block. A reference to the direction used can be encoded in the bitstream or it can itself be predicted.
[0051] Reference Figure 1A , a subset of nine predictor directions specified in the 33 possible intra-frame predictor directions of H.265 (corresponding to the 33 angular modes of the 35 intra-frame modes specified in H.265) is depicted at the bottom right. The point (101) where the arrows converge represents the sample being predicted. The arrows represent the direction in which the sample at 101 is predicted using neighboring samples. For example, arrow (102) indicates that sample (101) is predicted based on one or more neighboring samples at an angle of 45 degrees to the horizontal direction to the upper right. Similarly, arrow (103) indicates that sample (101) is predicted based on one or more neighboring samples at an angle of 22.5 degrees to the horizontal direction to the lower left of sample (101).
[0052] Still refer to Figure 1A , a square block (104) of 4×4 samples is depicted at the upper left (indicated by bold dashed lines). The square block (104) includes 16 samples, each of which is labeled with "S", 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 in the Y dimension (from the top) and the first sample in the X dimension (from the left). Similarly, sample S44 is the fourth sample in both the Y and X dimensions in the block (104). Since the size of the block is 4×4 samples, S44 is at the lower right. Further shown are example reference samples that follow a similar numbering scheme. The reference samples are labeled with R, their 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.
[0053] The intra picture prediction of block 104 may start by copying reference sample values from neighboring samples according to a signaled prediction direction. For example, assume that the encoded video code stream includes signaling indicating the prediction direction of arrow (102) for this block 104 - i.e., the samples are predicted according to one or more prediction samples at a 45 degree angle to the horizontal direction to the upper right. In this case, samples S41, S32, S23, and S14 are predicted according to the same reference sample R05. Then, sample S44 is predicted according to reference sample R08.
[0054] In some cases, the values of multiple reference samples may be combined, such as by interpolation, in order to calculate the reference sample; in particular, when the direction is not divisible by 45 degrees.
[0055] As video coding technology continues to develop, the number of possible directions is also increasing. For example, in H.264 (2003), there are nine different directions that can be used for intra-frame prediction. In H.265 (2013), this increased to 33, and at the time of this disclosure, JEM / VVC / BMS can support up to 65 directions. Experimental studies have been conducted to help identify the most appropriate intra-frame prediction directions, and certain techniques in entropy coding can be used to encode those most appropriate directions with a small number of bits, thereby accepting a specific bit penalty for the direction. In addition, the direction itself can sometimes be predicted based on the neighboring directions used in the intra-frame prediction of the decoded neighboring blocks.
[0056] Figure 1B A schematic diagram (180) depicting 65 intra prediction directions according to JEM is shown to illustrate that the number of prediction directions increases in various encoding techniques that evolve over time.
[0057] The manner in which the bits representing the intra prediction direction are mapped to the prediction direction in the encoded video bitstream may vary from one video coding technique to another; and may range, for example, from a simple direct mapping of the prediction direction to the intra prediction mode, to codewords, to complex adaptive schemes involving most probable modes, and similar techniques. However, in all cases, there may be certain directions used for leading prediction that are statistically less likely to appear in the video content than certain other directions. Since the goal of video compression is to reduce redundancy, in a well-designed video coding technique, those less probable directions will likely be represented by a larger number of bits than more probable directions.
[0058] Inter-picture prediction or inter-prediction may be based on motion compensation. In motion compensation, sample data from a previously reconstructed picture or a portion thereof (reference picture) may be used to predict a newly reconstructed picture or picture portion (e.g., block) after being spatially shifted in the direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, where the third dimension is an indication of the reference picture in use (similar to the time dimension).
[0059] In some video compression techniques, the current MV applicable to a specific area of sample data can be predicted based on other MVs, for example, based on other MVs related to other areas of sample data that are spatially adjacent to the area being reconstructed and that precede the current MV in the decoding order. This can significantly reduce the total amount of data required to encode the MV by eliminating redundancy in the relevant MVs, thereby improving compression efficiency. For example, since there is a statistical possibility that a larger area than the area applicable to a single MV moves in a similar direction in the video sequence when encoding an input video signal derived from a camera (referred to as natural video), and thus similar motion vectors derived from MVs of neighboring areas can be used for prediction in some cases, MV prediction can work effectively. This causes the actual MV for a given area to be similar or identical to the MV predicted from the surrounding MVs. Such an MV can also be represented with fewer bits after entropy coding than the number of bits that would be used if the MV was directly encoded rather than predicted from neighboring MVs. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, the MV prediction itself may be lossy due to, for example, round-off errors when computing the predictor from several surrounding MVs.
[0060] Various MV prediction mechanisms are described in H.265 / HEVC (High Efficiency Video Coding, HEVC) (ITU (International Telecommunication Union, ITU)-T H.265 Recommendation, "High Efficiency Video Coding", December 2016). Among the multiple MV prediction mechanisms specified by H.265, the following is a technique referred to as "spatial merging" hereinafter.
[0061] Specifically, refer to Figure 2, the current block (201) includes samples that have been found by the encoder during the motion search process to be predictable from a previous block of the same size that has been spatially shifted. Instead of encoding the MV directly, the MV associated with any of the five surrounding samples denoted A0, A1 and B0, B1, B2 (corresponding to 202 to 206, respectively) can be used, derived from metadata associated with one or more reference pictures, such as from the most recent (in decoding order) reference picture. In H.265, MV prediction can use a predictor from the same reference picture used by a neighboring block.
[0062] Figure 3 A simplified block diagram of a communication system (300) according to an embodiment of the present disclosure is shown. The communication system (300) includes a plurality of terminal devices that can communicate with each other via, for example, a network (350). For example, the communication system (300) includes a first pair of terminal devices (310) and (320) interconnected via the network (350). Figure 3 In the example of , a first pair of terminal devices (310) and (320) can perform unidirectional data transmission. For example, the terminal device (310) can encode video data (e.g., a video picture stream captured by the terminal device (310)) for transmission to another terminal device (320) via a network (350). The encoded video data can be transmitted in the form of one or more encoded video code streams. The terminal device (320) can receive the encoded video data from the network (350), decode the encoded video data to restore the video picture, and display the video picture based on the restored video data. The unidirectional data transmission can be implemented in a media service application, etc.
[0063] In another example, the communication system (300) includes a second pair of terminal devices (330) and (340) that perform bidirectional transmission of encoded video data, which bidirectional transmission can be implemented, for example, during a video conferencing application. For the bidirectional transmission of data, in the example, each of the terminal devices (330) and (340) can encode video data (e.g., a video picture stream captured by the terminal device) for transmission to the other of the terminal devices (330) and (340) via the network (350). Each of the terminal devices (330) and (340) can also receive the encoded video data transmitted by the other of the terminal devices (330) and (340), and can decode the encoded video data to restore the video picture, and can display the video picture at an accessible display device based on the restored video data.
[0064] exist Figure 3In the example of , terminal devices (310), (320), (330) and (340) can be implemented as servers, personal computers and smart phones, but the applicability of the basic principles of the present disclosure may not be limited to this. Implementations of the present disclosure may be implemented in desktop computers, laptop computers, tablet computers, media players, wearable computers, dedicated video conferencing equipment, etc. Network (350) represents any number or type of network that transmits encoded video data among terminal devices (310), (320), (330) and (340), including, for example, wired (wired) and / or wireless communication networks. The communication network (350) can exchange data in circuit switching channels, packet switching channels and / or other types of channels. Representative networks include telecommunication networks, local area networks, wide area networks and / or the Internet. For the purposes of this discussion, unless explicitly stated herein, the architecture and topology of the network (350) may be unimportant to the operation of the present disclosure.
[0065] As examples of applications of the disclosed subject matter, Figure 4 The placement of the video encoder and the video decoder in a video streaming environment is shown. The disclosed subject matter can be equally applicable to other video applications, including, for example, video conferencing, digital TV broadcasting, gaming, virtual reality, storing compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0066] The video streaming system may include a video capture subsystem (413), which may include a video source (401), such as a digital camera, for creating an uncompressed video picture or image stream (402). In an example, the video picture stream (402) includes samples recorded by the digital camera of the video source 401. The video picture stream (402) is depicted as a thick line to emphasize the high amount of data when compared to the encoded video data (404) (or encoded video bitstream), and the video picture stream (402) may be processed by an electronic device (420) coupled to the video source (401) including a video encoder (403). The video encoder (403) may include hardware, software, or a combination thereof to implement or implement aspects of the disclosed subject matter as described in more detail below. The encoded video data (404) (or encoded video stream (404)) is depicted as a thin line to emphasize the lower data volume when compared to the uncompressed video picture stream (402), and the encoded video data (404) (or encoded video stream (404)) can be stored on the streaming server (405) for future use or directly to a downstream video device (not shown). One or more streaming client subsystems, such as Figure 4The client subsystems (406) and (408) in the video transmission system can access the streaming server (405) to retrieve copies (407) and (409) of the encoded video data (404). The client subsystem (406) can include, for example, a video decoder (410) in the electronic device (430). The video decoder (410) decodes the incoming copy (407) of the encoded video data and creates an outgoing video picture stream (411) that is uncompressed and can be presented on a display (412) (e.g., a display screen) or another rendering device (not depicted). The video decoder 410 can be configured to perform some or all of the various functions described in the present disclosure. In some streaming systems, the encoded video data (404), (407) and (409) (e.g., video bitstreams) can be encoded according to certain video coding standards / video compression standards. Examples of these standards include ITU-T Recommendation H.265. In the example, the video coding standard under development is informally referred to as Versatile Video Coding (VVC). The disclosed subject matter can be used in the context of VVC and other video coding standards.
[0067] Note that the electronic devices (420) and (430) may include other components (not shown). For example, the electronic device (420) may include a video decoder (not shown), and the electronic device (430) may also include a video encoder (not shown).
[0068] Figure 5 A block diagram of a video decoder (510) according to any of the following embodiments of the present disclosure is shown. The video decoder (510) may be included in an electronic device (530). The electronic device (530) may include a receiver (531) (e.g., receiving circuitry). The video decoder (510) may be used to replace Figure 4 A video decoder (410) in an example of FIG.
[0069] The receiver (531) can receive one or more encoded video sequences to be decoded by the video decoder (510). In the same embodiment or another embodiment, one encoded video sequence can be decoded at a time, wherein the decoding of each encoded video sequence is independent of other encoded video sequences. Each video sequence can be associated with multiple video frames or images. The encoded video sequence can be received from a channel (501), which can be a hardware / software link to a storage device storing the encoded video data or a streaming source transmitting the encoded video data. The receiver (531) can receive the encoded video data and other data, such as encoded audio data and / or auxiliary data streams that can be forwarded to their respective processing circuit systems (not depicted). The receiver (531) can separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (515) can be provided between the receiver (531) and the entropy decoder / parser (520) (hereinafter referred to as "parser (520)"). In some applications, the buffer memory (515) can be implemented as part of the video decoder (510). In other applications, the buffer memory (515) may be external to the video decoder (510) and separate from the video decoder (510) (not depicted). In still other applications, there may be a buffer memory (not depicted) external to the video decoder (510) for purposes such as preventing network jitter, and there may be another additional buffer memory (515) internal to the video decoder (510), for example to handle playback timing. When the receiver (531) receives data from a store / forward device with sufficient bandwidth and controllability or from an isosynchronous network, the buffer memory (515) may not be required, or the buffer memory (515) may be small. For use over an optimal packet network such as the Internet, a buffer memory (515) of sufficient size may be required, and its size may be relatively large. Such a buffer memory may be implemented with an adaptive size and may be implemented at least in part in an operating system or similar element (not depicted) external to the video decoder (510).
[0070] The video decoder (510) may include a parser (520) to reconstruct symbols (521) from the encoded video sequence. The categories of these symbols include: information for managing the operation of the video decoder (510); and potential information for controlling a presentation device such as a display (512) (e.g., a display screen), which may or may not be a component of the electronic device (530) but may be coupled to the electronic device (530), such as Figure 5As shown. The control information for (one or more) rendering devices may be in the form of a Supplemental Enhancement Information (SEI message) or a Video Usability Information (VUI) parameter set fragment (not depicted). The parser (520) may parse / entropy decode the encoded video sequence received by the parser (520). The entropy encoding of the encoded video sequence may be performed according to a video coding technique or a video coding standard, and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, etc. The parser (520) may extract a subgroup parameter set for at least one subgroup of the subgroups of pixels in the video decoder from the encoded video sequence based on at least one parameter corresponding to the subgroup. The subgroup may include a Group of Picture (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) may also extract information such as transform coefficients (eg, Fourier transform coefficients), quantizer parameter values, motion vectors, etc. from the encoded video sequence.
[0071] The parser (520) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (515), thereby creating symbols (521).
[0072] Depending on the type of the coded video picture or part of the coded video picture (e.g., inter-picture and intra-picture, inter-block and intra-block) and other factors, the reconstruction of the symbol (521) may involve multiple different processing or functional units. The units involved and how they are involved can be controlled by subgroup control information parsed from the coded video sequence by the parser (520). For simplicity, this subgroup control information flow between the parser (520) and the following multiple processing or functional units is not described.
[0073] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually subdivided into a number of functional units as described below. In a practical implementation operating under commercial constraints, many of these functional units interact closely with each other and can be at least partially integrated with each other. However, for the purpose of clearly describing the various functions of the disclosed subject matter, the conceptual subdivision into the following functional units is adopted in the following disclosure.
[0074] The first unit may include a sealer / inverse transform unit (551). The sealer / inverse transform unit (551) may receive quantized transform coefficients as (one or more) symbols (521) and control information from the parser (520), including information indicating which type of inverse transform to use, block size, quantization factors / parameters, quantization scaling matrix, etc. The sealer / inverse transform unit (551) may output blocks including sample values that may be input into an aggregator (555).
[0075] In some cases, the output samples of the scaler / inverse transform (551) may belong to an intra-coded block; that is, a block that does not use predictive information from a previously reconstructed picture but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (552). In some cases, the intra-picture prediction unit (552) may use surrounding block information that has already been reconstructed and stored in a current picture buffer (558) to generate a block of the same size and shape as the block being reconstructed. For example, the current picture buffer (558) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some implementations, the aggregator (555) may add the prediction information that has been generated by the intra-picture prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551) on a per-sample basis.
[0076] In other cases, the output samples of the scaler / inverse transform unit (551) may belong to a block that has been inter-coded and possibly motion compensated. In such a case, the motion compensated prediction unit (553) may access the reference picture memory (557) to obtain samples for inter-picture prediction. After motion compensation of the obtained samples according to the symbols (521) belonging to the block, these samples may be added to the output of the scaler / inverse transform unit (551) (the output of unit 551 may be referred to as residual samples or residual signal) by an aggregator (555) to generate output sample information. The address within the reference picture memory (557) from which the motion compensated prediction unit (553) obtains the predicted samples may be controlled by a motion vector, which is provided to the motion compensated prediction unit (553) in the form of a symbol (521), which may have, for example, an X, Y component (shift) and a reference picture component (time). Motion compensation may also include interpolation of sample values retrieved from a reference picture memory (557) when using sub-sample accurate motion vectors, and may also be associated with motion vector prediction mechanisms, etc.
[0077] The output samples of the aggregator (555) may be subjected to various loop filtering techniques in a loop filter unit (556). The video compression techniques may include in-loop filter techniques controlled by parameters included in the coded video sequence (also referred to as the coded video bitstream) that are available to the loop filter unit (556) as symbols (521) from the parser (520), but the video compression techniques may also be responsive to meta-information obtained during decoding of a previous (in decoding order) portion of the coded picture or coded video sequence, as well as to previously reconstructed and 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.
[0078] The output of the loop filter unit (556) may be a sample stream that may be output to a rendering device (512) and stored in a reference picture memory (557) for use in future inter-picture prediction.
[0079] Once fully reconstructed, certain coded pictures may be used as reference pictures for future inter-picture prediction. For example, once a coded picture corresponding to a 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) may become part of the reference picture memory (557) and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.
[0080] The video decoder (510) may perform decoding operations according to a predetermined video compression technique employed in a standard such as ITU-T H.265. The encoded video sequence may conform to the syntax specified by the video compression technique or standard used in the sense that the encoded video sequence conforms to both the syntax of the video compression technique or standard and the profile recorded in the video compression technique or standard. Specifically, the profile may select certain tools from all tools available in the video compression technique or standard as tools that are only usable under the profile. In order to conform to the standard, the complexity of the encoded video sequence may be within a range defined by the hierarchy of the video compression technique or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further defined by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.
[0081] In some example 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 (one or more). The additional data may be used by the video decoder (510) to properly decode the data and / or 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) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.
[0082] Figure 6 A block diagram of a video encoder (603) according to an example implementation of the present disclosure is shown. The video encoder (603) may be included in an electronic device (620). The electronic device (620) may also include a transmitter (640) (e.g., a transmission circuit system). The video encoder (603) may be used to replace Figure 4 A video encoder (403) in an example.
[0083] The video encoder (603) can be used to obtain the video source (601) (the video source (601) is not Figure 6 In an example of an electronic device (620) receiving video samples, a video source (601) can capture (one or more) video images to be encoded by a video encoder (603). In another example, the video source (601) can be implemented as a part of the electronic device (620).
[0084] The video source (601) can provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (603), and the digital video sample stream can have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601YCrCb, RGB, XYZ, ...) and any suitable sampling structure (e.g., YCrCb 4:2:0, YCrCb4:4:4). In a media service system, the video source (601) can be a storage device capable of storing previously prepared videos. In a video conferencing system, the video source (601) can be a camera that captures local image information as a video sequence. The video data can be provided as multiple separate pictures or images that are given motion when viewed in sequence. The picture itself can be organized as a spatial pixel array, where each pixel can include one or more samples, depending on the sampling structure, color space, etc. used. The relationship between pixels and samples can be easily understood by a person skilled in the art. The following description focuses on samples.
[0085] According to some example embodiments, the video encoder (603) may encode and compress pictures of a source video sequence into an encoded video sequence (643) in real time or under any other time constraints required by the application. Implementing a suitable encoding speed constitutes a function of the controller (650). In some embodiments, the controller (650) may be functionally coupled to and control other functional units as described below. For simplicity, the coupling is not depicted. The parameters set by the controller (650) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization techniques, etc.), picture size, picture group (GOP) layout, maximum motion vector search range, etc. The controller (650) may be configured to have other suitable functions that belong to the video encoder (603) optimized for certain system designs.
[0086] In some example embodiments, the video encoder (603) may be configured to operate in an encoding loop. As an oversimplified description, in an example, the encoding loop may include a source encoder (630) (e.g., responsible for creating symbols such as a symbol stream based on an input picture to be encoded and (one or more) reference pictures) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to create sample data in a manner similar to how a (remote) decoder would create sample data, even if the embedded decoder 633 processes the encoded video stream of the source encoder 630 without entropy coding (because in the video compression techniques considered in the disclosed subject matter, any compression between the encoded video code stream and the symbols in entropy coding can be lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (634). Since the decoding of the symbol stream produces a bit-accurate result that is independent of the decoder location (local or remote), the contents of the reference picture memory (634) are also bit-accurate between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same sample values that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, for example due to channel errors) is used to improve encoding quality.
[0087] The operation of the "local" decoder (633) can be combined with the above Figure 5 The operation of the "remote" decoder described in detail is identical to that of the video decoder (510). However, reference is also briefly made to Figure 5, when symbols are available and the entropy encoder (645) and parser (520) may not be able to fully implement the entropy decoding portion of the video decoder (510) including the buffer memory (515) and the parser (520) in the encoder's local decoder (633) to encode / decode the symbols into an encoded video sequence that can be lossless.
[0088] At this point, it can be observed that any decoder technology other than parsing / entropy decoding, which may only exist in a decoder, may also necessarily need to exist in a corresponding encoder in substantially the same functional form. For this reason, the disclosed subject matter may sometimes focus on decoder operations associated with the decoding portion of the encoder. Since encoder technology is mutually inverse to the decoder technology that has been fully described, the description of encoder technology can be simplified. Only in certain areas or aspects, a more detailed description of the encoder is provided below.
[0089] During operation, in some example implementations, the source encoder (630) may perform motion compensated predictive encoding that 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 the differences (or residuals) in color channels between pixel blocks of an input picture and pixel blocks of reference picture(s) that may be selected as prediction reference(s) for the input picture.
[0090] The local video decoder (633) can decode the encoded video data of the picture that can be designated as the reference picture based on the symbols created by the source encoder (630). The operation of the encoding engine (632) can advantageously be lossy processing. When the encoded video data can be decoded at the video decoder ( Figure 6 When the video encoder (603) is decoded at a local video decoder (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (633) replicates the decoding process that may be performed by the video decoder on the reference picture, and may cause the reconstructed reference picture to be stored in the reference picture cache (634). In this way, the video encoder (603) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture to be obtained by the far-end (remote) video decoder.
[0091] The predictor (635) may perform a prediction search for the encoding engine (632). That is, for a new picture to be encoded, the predictor (635) may 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 may be used as appropriate prediction references for the new picture. The predictor (635) may operate on a pixel block by pixel block basis to find an appropriate prediction reference. In some cases, as determined by the search results obtained by the predictor (635), the input picture may have prediction references taken from multiple reference pictures stored in the reference picture memory (634).
[0092] The controller (650) can manage encoding operations of the source encoder (630), including, for example, setting parameters and subgroup parameters for encoding video data.
[0093] The outputs of all the above-mentioned functional units may be subjected to entropy coding in the entropy encoder (645). The entropy encoder (645) converts the symbols generated by the various functional units into a coded video sequence by losslessly compressing the symbols according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc.
[0094] The transmitter (640) can buffer the encoded video sequence(s) created by the entropy encoder (645) in preparation for transmission via a communication channel (660), which can be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (640) can combine the encoded video data from the video encoder (603) with other data to be transmitted, such as encoded audio data and / or auxiliary data streams (source not shown).
[0095] The controller (650) may manage the operation of the video encoder (603). During encoding, the controller (650) may assign a certain coded picture type to each coded picture, which may affect the coding techniques that may be applied to the corresponding picture. For example, a picture may generally be assigned one of the following picture types:
[0096] An intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those of ordinary skill in the art are aware of those variations of I pictures and their corresponding applications and features.
[0097] A predictive picture (P picture) may be a picture that may be encoded and decoded using intra prediction or inter prediction, which predicts sample values of each block using at most one motion vector and a reference index.
[0098] Bidirectional predictive pictures (B pictures) can be pictures that can be encoded and decoded using intra-frame prediction or inter-frame prediction, which uses up to two motion vectors and reference indices to predict sample values for each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstruction of a single block.
[0099] The source picture may typically be spatially subdivided into a plurality of coding blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples, respectively), and encoded block by block. These blocks may be predictively encoded with reference to other (already encoded) blocks, which are determined by the coding allocations applied to the corresponding pictures of the blocks. For example, blocks of an I picture may be non-predictively encoded, or blocks of an I picture may be predictively encoded (spatial prediction or intra-frame prediction) with reference to already encoded blocks of the same picture. Pixel blocks of a P picture may be predictively encoded via spatial prediction or via temporal prediction with reference to a previously encoded reference picture. Blocks of a B picture may be predictively encoded via spatial prediction or via temporal prediction with reference to one or two previously encoded reference pictures. Source pictures or intermediately processed pictures 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 approach, as described in further detail below.
[0100] The video encoder (603) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In its operation, the video encoder (603) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in the input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.
[0101] In some example 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 encoded 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.
[0102] Video can be captured as multiple source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often shortened to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits temporal or other correlations between pictures. For example, a particular picture in encoding / decoding, which is referred to as the current picture, can be divided into blocks. The blocks in the current picture can be encoded by a vector called a motion vector when they are similar to reference blocks in a reference picture that was previously encoded in the video and is still buffered. The motion vector points to a reference block in a reference picture, and in the case of using multiple reference pictures, the motion vector may have a third dimension that identifies the reference picture.
[0103] In some example embodiments, bidirectional prediction techniques may be used for inter-picture prediction. According to such bidirectional prediction techniques, two reference pictures are used, such as a first reference picture and a second reference picture that are both subsequent to the current picture in the video in decoding order (but may be in the past or future, respectively, in display order). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. The block may be jointly predicted by a combination of the first reference block and the second reference block.
[0104] In addition, merge mode techniques can be used for inter-picture prediction to improve coding efficiency.
[0105] According to some example embodiments of the present disclosure, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, a picture in a video picture sequence is divided into coding tree units (CodingTree Unit, CTU) for compression, and the CTUs in the picture may have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU may include three parallel coding tree blocks (CodingTree Block, CTB): a luminance CTB and two chrominance CTBs. Each CTU may be recursively partitioned into one or more coding units (CUs) with a quadtree. For example, a 64×64 pixel CTU may be partitioned into a 64×64 pixel CU, or four 32×32 pixel CUs. Each of one or more of the 32×32 blocks may be further partitioned into four 16×16 pixel CUs. In some example embodiments, each CU may be analyzed during encoding to determine a prediction type for the CU among various prediction types, such as an inter prediction type or an intra prediction type. Depending on temporal and / or spatial predictability, a CU may be partitioned into one or more prediction units (PUs). Typically, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, prediction operations in decoding (encoding / decoding) are performed in units of prediction blocks. Partitioning a CU into PUs (or PBs of different color channels) may be performed in various spatial modes. For example, a luma or chroma PB may include a matrix of values (e.g., luma values) for samples such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 samples, and the like.
[0106] Figure 7 A diagram of a video encoder (703) according to another example implementation of the present disclosure is shown. The video encoder (703) is configured to receive a processed block (e.g., a prediction block) of sample values within a current video picture in a sequence of video pictures, and encode the processed block into an encoded picture that is part of an encoded video sequence. The example video encoder (703) may be used instead of Figure 4 The video encoder (403) in the example.
[0107] For example, the video encoder (703) receives a matrix of sample values for a processing block, such as a prediction block of 8×8 samples. The video encoder (703) then uses, for example, Rate-Distortion Optimization (RDO) to determine whether to best encode the processing block using intra mode, inter mode, or bidirectional prediction mode. In the case where it is determined that the processing block is encoded in intra mode, the video encoder (703) can encode the processing block into an encoded picture using intra prediction techniques; and in the case where it is determined that the processing block is encoded in inter mode or bidirectional prediction mode, the video encoder (703) can encode the processing block into an encoded picture using inter prediction or bidirectional prediction techniques, respectively. In some example embodiments, merge mode can be used as a sub-mode of inter-picture prediction, wherein a motion vector is derived from an encoded motion vector component external to one or more motion vector predictors without the aid of the predictor. In some other example embodiments, there may be a motion vector component applicable to the subject block. Therefore, the video encoder (703) may include Figure 7 Components not explicitly shown, such as a mode decision module for determining a prediction mode for a processing block.
[0108] exist Figure 7 In the example of FIG. 7 , the video encoder ( 703 ) includes Figure 7 An inter-frame encoder (730), an intra-frame encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a general controller (721) and an entropy encoder (725) coupled together are shown in the example arrangement.
[0109] The inter-frame encoder (730) is configured to receive samples of a current block (e.g., a processing block), compare the block to one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture in display order), generate inter-frame prediction information (e.g., redundant information description according to an inter-frame coding technique, motion vectors, merge mode information), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some examples, the reference picture is encoded using an embedded image. Figure 6 The decoding unit 633 (shown as Figure 7 The residual decoder 728, as described in further detail below, decodes the decoded reference picture based on the encoded video information.
[0110] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), compare the block with an already encoded block in the same picture, and generate quantization coefficients after transformation, and in some cases also generate intra prediction information (e.g., intra prediction direction information according to one or more intra coding techniques). The intra encoder (722) can calculate an intra prediction result (e.g., a predicted block) based on the intra prediction information and a reference block in the same picture.
[0111] The general controller (721) can be configured to determine general control data and control other components of the video encoder (703) based on the general control data. In an example, the general controller (721) determines a prediction mode of a block and provides a control signal to a switch (726) based on the prediction mode. For example, when the prediction mode is an intra-frame mode, the general controller (721) controls the switch (726) to select the intra-frame mode result for use by the residual calculator (723), and controls the entropy encoder (725) to select the intra-frame prediction information and include the intra-frame prediction information in the bitstream; and when the prediction mode of the block is an inter-frame mode, the general controller (721) controls the switch (726) to select the inter-frame prediction result for use by the residual calculator (723), and controls the entropy encoder (725) to select the inter-frame prediction information and include the inter-frame prediction information in the bitstream.
[0112] The residual calculator (723) may be configured to calculate the difference (residual data) between the received block and the prediction result of the block selected from the intra encoder (722) or the inter encoder (730). The residual encoder (724) may be configured to encode the residual data to generate a transform coefficient. For example, the residual encoder (724) may be configured to convert the residual data from the spatial domain to the frequency domain to generate a transform coefficient. Then, the transform coefficient is subjected to a quantization process to obtain a quantized transform coefficient. In various example embodiments, the video encoder (703) further includes a residual decoder (728). The residual decoder (728) is configured to perform an inverse transform and generate decoded residual data. The decoded residual data may be appropriately used by the intra encoder (722) and the inter encoder (730). For example, the inter encoder (730) may generate a decoded block based on the decoded residual data and the inter prediction information, and the intra encoder (722) may generate a decoded block based on the decoded residual data and the intra prediction information. The decoded blocks are appropriately processed to generate decoded pictures, and these decoded pictures may be buffered in a memory circuit (not shown) and used as reference pictures.
[0113] The entropy encoder (725) may be configured to format the code stream to include the encoded blocks and perform entropy encoding. The entropy encoder (725) is configured to include various information in the code stream. For example, the entropy encoder (725) may be configured to include general control data, selected prediction information (e.g., intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the code stream. When the block is encoded in the merge sub-mode of the inter-frame mode or the bi-prediction mode, there may be no residual information.
[0114] Figure 8 A diagram of an example video decoder (810) according to another embodiment of the present disclosure is shown. The video decoder (810) is configured to receive an encoded picture as part of an encoded video sequence and decode the encoded picture to generate a reconstructed picture. In an example, the video decoder (810) may be used instead of Figure 4 A video decoder (410) in an example of FIG.
[0115] exist Figure 8 In the example of FIG. 8 , the video decoder ( 810 ) includes Figure 8 An entropy decoder (871), an inter-frame decoder (880), a residual decoder (873), a reconstruction module (874) and an intra-frame decoder (872) coupled together are shown in the example arrangement of.
[0116] The entropy decoder (871) can be configured to reconstruct certain symbols representing syntax elements constituting the encoded picture from the encoded picture. Such symbols may include, for example, a mode for encoding a block (e.g., intra mode, inter mode, bi-prediction mode, merge sub-mode, or another sub-mode), prediction information (e.g., intra prediction information or inter prediction information) that can identify certain samples or metadata used by the intra decoder (872) or the inter decoder (880) for prediction, residual information in the form of, for example, quantized transform coefficients, etc. In an example, when the prediction mode is inter mode or bi-prediction mode, the inter prediction information is provided to the inter decoder (880); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (872). The residual information may be subjected to inverse quantization and provided to the residual decoder (873).
[0117] The inter-frame decoder (880) may be configured to receive the inter-frame prediction information and generate an inter-frame prediction result based on the inter-frame prediction information.
[0118] The intra decoder (872) may be configured to receive intra prediction information and generate a prediction result based on the intra prediction information.
[0119] The residual decoder (873) can be configured to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The residual decoder (873) can also utilize certain control information (to include quantizer parameters (Quantizer Parameter, QP)), which can be provided by the entropy decoder (871) (since this may only be low-data-volume control information, the data path is not depicted).
[0120] The reconstruction module (874) can be configured to combine the residual output by the residual decoder (873) with the prediction result (output by the inter-frame prediction module or the intra-frame prediction module, as the case may be) in the spatial domain 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 can also be performed to improve visual quality.
[0121] Note that the video encoders (403), (603) and (703) and the video decoders (410), (510) and (810) may be implemented using any suitable technology. In some example embodiments, the video encoders (403), (603) and (703) and the video decoders (410), (510) and (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoders (403), (603) and (703) and the video decoders (410), (510) and (810) may be implemented using one or more processors executing software instructions. (603) and (703) and video decoders (410), (510) and (810).
[0122] In some example implementations, loop filters may be included in the encoder and decoder to reduce coding artifacts and improve the quality of decoded pictures. For example, loop filter 556 may be included as Figure 5 For another example, the loop filter may be Figure 6 The embedded decoder unit 633 in the encoder 603 of the video block is a part of the decoder 603. These filters are called loop filters because they are included in the decoding loop for the video block in the decoder or encoder. Each loop filter can be associated with one or more filter parameters. Such filter parameters can be predefined or can be derived by the encoder during the encoding process. These filter parameters (if derived by the encoder) or their indexes (if predefined) can be included in the final code stream in coded form. The decoder can then parse these filter parameters from the code stream during decoding and perform loop filtering based on the parsed filter parameters.
[0123] Various loop filters can be used to reduce coding artifacts and improve decoded video quality in different aspects. Such loop filters may include, but are not limited to, one or more deblocking filters, adaptive loop filters (ALF), cross-component adaptive loop filters (Cross-Component Adaptive Loop Filter, CC-ALF), Constrained Directional Enhancement Filter (Constrained Directional Enhancement Filter, CDEF), Sample Adaptive Offset (Sample Adaptive Offset, SAO) filter, Cross Component Sample Offset (CCSO) filter and Local Sample Offset (Local Sample Offset, LSO) filter. These filters may or may not be interdependent. They can be arranged in any suitable order compatible with their interdependencies (if any) in the decoding loop of the decoder or encoder. These various loop filters are described in more detail in the following disclosure.
[0124] The encoder / decoder may apply an adaptive loop filter (ALF) with block-based filter adaptation to reduce artifacts. The ALF is adaptive in the sense that the filter coefficients / parameters or their indices are signaled in the bitstream and may be designed based on the image content and the distortion of the reconstructed picture. The ALF may be applied to reduce the distortion introduced by the encoding process and to improve the quality of the reconstructed image.
[0125] For the luma component, one of a plurality of filters (e.g., 25 filters) may be selected for a luma block (e.g., a 4×4 luma block), for example, based on the activity and direction of the local gradient. The filter coefficients of these filters may be derived by the encoder during the encoding process and signaled to the decoder in the bitstream.
[0126] The ALF may have any suitable shape and size. Fig. 9 In the example of , ALF (910) to (911) can have a diamond shape, such as a 5×5 diamond shape for ALF (910) and a 7×7 diamond shape for ALF (911). In ALF (910), thirteen (13) elements (920) to (932) can be used for filtering processing and form a diamond shape. For the 13 elements (920) to (932), seven values (e.g., C0 to C6) can be used and arranged in the example manner shown. In ALF (911), twenty-five (25) elements (940) to (964) can be used for filtering processing and form a diamond shape. Thirteen (13) values (e.g., C0 to C12) can be used for the 25 elements (940) to (964) in the example manner shown.
[0127] Reference Fig. 9 In some examples, one of two diamond-shaped ALF filters (910) to (911) may be selected to process a luma block or a chroma block. For example, a 5×5 diamond-shaped filter (910) may be applied to a chroma component (e.g., a chroma block, a chroma CB), while a 7×7 diamond-shaped filter (911) may be applied to a luma component (e.g., a luma block, a luma CB). Other suitable shapes and sizes may be used in the ALF. For example, a 9×9 diamond-shaped filter may be used.
[0128] The filter coefficient at the position indicated by the value (e.g., C0 to C6 in (910) or C0 to C12 in (920)) may be non-zero. In addition, when the ALF includes a clipping function, the clipping value at the position may be non-zero. The clipping function may be used to limit the upper limit of the filter value in the luminance block or the chrominance block.
[0129] In some implementations, a particular ALF to be applied to a particular block having a luma component may be based on a classification of the luma block. For block classification of luma components, a 4×4 block (or luma block, luma CB) may be classified or categorized into one of a plurality of (e.g., 25) classes corresponding to, for example, 25 different ALFs (e.g., 25 of 7 by 7 ALFs with different filter coefficients). The classification index C may be based on the quantized value of the directionality parameter D and the activity value A. Use formula (1) to derive .
[0130] In order to calculate the directivity parameter D and the quantization value The gradient g in the vertical direction, horizontal direction, and two diagonal directions (e.g., d1 and d2) v , g h , g d1 and g d2 The following 1-dimensional Laplace calculations can be used respectively. Where the indices i and j refer to the coordinates of the top left sample within the 4×4 block, and R(k,l) indicates the reconstructed sample at coordinate (k,l). The directions (eg, d1 and d2) refer to the 2 diagonal directions.
[0131] In order to reduce the complexity of the above block classification, a sub-sampled 1-D Laplacian calculation may be applied. FIG. 10A to FIG. 10D The calculation methods for the vertical direction ( Fig. 10A ), horizontal direction( Fig. 10B ) and two diagonal directions d1( Fig. 10C ) and d2( Fig. 10D)’s gradient g v , g h , g d1 and g d2 An example of subsampling positions for . Fig. 10A The label "V" shows the method used to calculate the vertical gradient g. v The sub-sampling position of Fig. 10B The label "H" shows the calculation method for the horizontal gradient g. h The sub-sampling position of Fig. 10C The label "D1" shows the calculation method used to calculate the diagonal gradient g of d1. d1 The sub-sampling position of Fig. 10D The label "D2" shows the calculation method used to calculate the diagonal gradient g of d2. d2 The sub-sampling position. Fig. 10A and Fig. 10B It is shown that the same sub-sampling position can be used for gradient calculations in different directions. In some other implementations, different sub-sampling schemes can be used for all directions. In some other implementations, different sub-sampling schemes can be used for different directions.
[0132] Horizontal and vertical gradient g v and g h The maximum value of and minimum value Can be set to: The gradient g in the two diagonal directions d1 and g d2 The maximum value of and minimum value Can be set to: The directivity parameter D can be based on the above value and the following two thresholds t 1 and t 2 Conclude. Step 1. If (1) and (2) is true, D is set to 0. Step 2. If Then proceed to step 3; otherwise proceed to step 4. Step 3. If Then set D to 2; otherwise set D to 1. Step 4. If Then set D to 4; otherwise set D to 3.
[0133] In other words, the directivity parameter D is represented by several discrete levels and is determined based on the gradient value distribution of the luminance block between the horizontal and vertical directions and between the two diagonal directions, such as Fig.10E shown.
[0134] The activity value A can be calculated as: Therefore, the activity value A represents a comprehensive measure of the horizontal and vertical 1-dimensional Laplace. The activation value A for the luminance block can be further quantized to a range of, for example, 0 to 4, inclusive, and the quantized value is represented as
[0135] 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 a diamond shaped ALF filter. In some implementations, for the chroma components in a picture, block classification may not be applied, and thus a single ALF coefficient group may be applied for each chroma component. In such implementations, although there may be multiple ALF coefficient groups available for chroma components, the determination of the ALF coefficients may not rely on any classification of the chroma blocks.
[0136] The geometric transformation may be applied to the filter coefficients and the corresponding filter clipping values (also referred to as clipping values). Before filtering a block (e.g., a 4×4 luma block), for example, depending on the gradient values (e.g., gv, gh, gd) calculated for the block, 1 and / or gd 2 ), geometric transformations such as rotation or diagonal and vertical flipping may 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) may be equivalent to applying the geometric transformation to samples in the region supported by the filter. The geometric transformation may make different blocks to which the ALF is applied more similar by aligning their respective directionality.
[0137] Three geometric transformation options including diagonal flipping, vertical flipping and rotation can be performed as described in equations (9) to (11) respectively. f D (k, () = f (l, k), c D (k, l) = c(l, k), Formula (9) f V (k, l) = f(k, Kl-1), c V (k, l) = c(k, Kl-1) Formula (10) f R (k, l) = f(Kl-1, k), c R (k, l) = c(Kl-1, k) Formula (11) Where K represents the size of the ALF or filter, and 0≤k, l≤K-1 are the coordinates of the coefficients. For example, the position (0,0) is at the upper left corner, and the position (K-1,K-1) is at the lower right corner of the filter f or the clipping value matrix (or clipping matrix) c. Depending on the gradient value calculated for the block, a transform can be applied to the filter coefficients f(k,l) and the clipping values c(k,l). An example of the relationship between the transform and the four gradients is summarized in Table 1. Table 1: Mapping of gradients computed for a block to transformations Gradient Value Transform <![CDATA[gd 2 <gd 1 And gh<gv]]> No change <![CDATA[g d2 <g d1 And g v <g h ]]> Diagonal Flip <![CDATA[gd 1 <gd 2 And gh<gv]]> Flip vertically <![CDATA[gd 1 <gd 2 and gv<gh]]> Rotation
[0138] In some embodiments, the ALF filter parameters derived by the encoder may be signaled in an Adaptation Parameter Set (APS) for a picture. In the APS, one or more groups (e.g., up to 25 groups) of luminance filter coefficients and clipping value indices may be signaled. They may be indexed in the APS. In an example, one of the one or more groups may include luminance filter coefficients and one or more clipping value indices. One or more groups (e.g., up to 8 groups) of chrominance filter coefficients and clipping value indices may be derived and signaled by the encoder. In order to reduce signaling overhead, filter coefficients of different classifications of luminance components (e.g., with different classification indices) may be merged. In a slice header, the index of the APS for the current slice may be signaled. In another example, the signaling of the ALF may be based on the CTU.
[0139] In an embodiment, a clipping value index (also referred to as a clipping index) may be decoded according to the APS. The clipping value index may be used to determine the corresponding clipping value, for example, based on the relationship between the clipping value index and the corresponding clipping value. The relationship may be predefined and stored in a decoder. In an example, the relationship is described by one or more tables such as a table of clipping value indexes and corresponding clipping values for a luminance component (e.g., for a luminance CB) and a table of clipping value indexes and corresponding clipping values for a chrominance component (e.g., for a chrominance CB). The clipping value may depend on the bit depth B. The bit depth B may refer to an internal bit depth, a bit depth of a reconstructed sample in a CB to be filtered, etc. In some examples, equation (12) may be used to obtain a table of clipping values (e.g., for luminance and / or for chrominance). AlfClip = {round(2 B-α*n )forn∈[0..N-1]}, Formula (12) Wherein, AlfClip is the clipping value, B is the bit depth (e.g., bitDepth), N (e.g., N=4) is the number of allowed clipping values, and α is a predefined constant value. In the example, α is equal to 2.35. n is the clipping value index (also called clipping index or clipIdx). Table 2 shows an example of a table obtained using equation (12), where N=4. The clipping index n can be 0, 1, 2, and 3 (up to N-1) in Table 2. Table 2 can be used for luminance blocks or chrominance blocks. Table 2 - AlfClip can depend on bit depth B and clipIdx
[0140] In the slice header for the current slice, one or more APS indexes (e.g., up to 7 APS indexes) may be signaled to specify the luma filter bank that may be used for the current slice. The filtering process may be controlled at one or more suitable levels, such as the picture level, the slice level, the CTB level, etc. In an example embodiment, the filtering process may be further controlled at the CTB level. A flag may be signaled to indicate whether the ALF is applied to the luma CTB. The luma CTB may select a filter bank from a plurality of fixed filter banks (e.g., 16 fixed filter banks) and a filter bank (e.g., up to 25 filters derived by the encoder, as described above, and also referred to as a filter bank (e.g., signaled) in the APS. A filter bank index may be signaled for the luma CTB to indicate the filter bank to be applied (e.g., a filter bank in a plurality of fixed filter banks and a filter bank (e.g., signaled) in the filter bank. A plurality of fixed filter banks may be predefined and hard-coded in the encoder and decoder, and may be referred to as a predefined filter bank. Therefore, there is no need to signal predefined filter coefficients.
[0141] For chroma components, the APS index may be signaled in the slice header to indicate the chroma filter set to be used for the current slice. At the CTB level, if there is more than one chroma filter set in the APS, the filter set index may be signaled for each chroma CTB.
[0142] The filter coefficients may be quantized with a norm equal to 128. To reduce multiplication complexity, code stream consistency may be applied so that coefficient values at non-center positions may be in the range of -27 to 27-1 inclusive. In an example, the center position coefficient is not signaled in the code stream and may be considered equal to 128.
[0143] In some embodiments, the syntax and semantics of the clip index and clip value are defined as follows: alf_luma_clip_idx[sfIdx][j] can be used to specify the clip index of the clip value to be used before multiplying the jth coefficient of the signaled luminance filter indicated by sfIdx. The requirement for code stream consistency may include that the value of alf_luma_clip_idx[sfIdx][j] where sfIdx=0 to alf_luma_num_filters_signalled_minus1 and j=0 to 11 should be in the range of, for example, 0 to 3, inclusive.
[0144] With bitDepth set equal to BitDepthY and clipIdx set equal to alf_luma_clip_idx[alf_luma_coeff_delta_idx[filtIdx]][j], the luminance filter clipping values AlfClipL[adaptation_parameter_set_id] with elements AlfClipL[adaptation_parameter_set_id][filtIdx][j] where filtIdx=0 to NumAlfFilters-1 and j=0 to 11 may be derived as specified in Table 2.
[0145] Alf_chroma_clip_idx[altIdx][j] may be used to specify a clip index of a clip value to be used before multiplying the jth coefficient of the alternative chroma filter with index altIdx. The codestream conformance requirement may include that the value of alf_chroma_clip_idx[altIdx][j], where altIdx=0 to alf_chroma_num_alt_filters_minus1, j=0 to 5, shall be in the range of 0 to 3, inclusive.
[0146] With bitDepth set equal to BitDepthC and clipIdx set equal to alf_chroma_clip_idx[altIdx][j], the chroma filter clipping values AlfClipC[adaptation_parameter_set_id][altIdx][j] with elements AlfClipC[adaptation_parameter_set_id][altIdx][j] where altIdx=0 to alf_chroma_num_alt_filters_minus1, j=0 to 5 may be derived as specified in Table 2.
[0147] In an embodiment, the filtering process can be described as follows. At the decoder end, when ALF is enabled for a CTB, the sample R(i, j) within the CU (or CB) of the CTB can be filtered, thereby using equation (13) to generate the filtered sample value R'(i, j) as shown below. In the example, each sample in the CU is filtered. Where f(k, l) represents the decoded filter coefficients, K(x, y) is the clipping function, and c(k, l) represents the decoded clipping parameter (or clipping value). The variables k and l can vary between -L / 2 and L / 2, where L represents the filter length (e.g., for luminance and chrominance components, respectively). Fig. 9 Example diamond filters 910 and 911, L = 5 and 7). The clipping function K(x,y) = min(y,max(-y,x)) corresponds to the clipping function Clip3(-y,y,x). By incorporating the clipping function K(x,y), the loop filtering method (e.g., ALF) becomes a nonlinear process and can be called a nonlinear ALF.
[0148] The selected clipping value may be encoded in the "alf_data" syntax element as follows: A suitable coding scheme (e.g., a Golomb coding scheme) may be used to encode the clipping index corresponding to the selected clipping value such as shown in Table 2. The coding scheme may be the same as the coding scheme used to encode the filter bank index.
[0149] In an embodiment, a virtual boundary filtering process may be used to reduce the line buffer requirements of the ALF. Thus, a modified block classification and filtering may be employed for samples close to a CTU boundary (e.g., a horizontal CTU boundary). The virtual boundary (1130) may be defined as a horizontal CTU boundary (1120) shifted by “N”. 样本 "The line formed by the samples is Fig.11A As shown, where N 样本 Can be a positive integer. In the example, for the brightness component, N 样本 is equal to 4, while for the chrominance component, N 样本 Equals 2.
[0150] Reference Fig.11A , a modified block classification may be applied to the luma component. In an example, for the 1-dimensional Laplacian gradient calculation of the 4×4 block (1110) above the virtual boundary (1130), only samples above the virtual boundary (1130) are used. Similarly, referring to Fig. 11B, for the 1-D Laplacian gradient calculation of the 4×4 block (1111) below the virtual boundary (1131) shifted from the CTU boundary (1121), only the samples below the virtual boundary (1131) are used. The quantization of the activity value A can be scaled accordingly by considering the reduction in the number of samples used in the 1-D Laplacian gradient calculation.
[0151] For the filtering process, symmetric padding operations at virtual boundaries may be used for both luma and chroma components. FIG. 12A to FIG. 12F An example of such modified ALF filtering for luma components at a virtual boundary is shown. When a filtered sample is below a virtual boundary, neighboring samples above the virtual boundary may be filled. When a filtered sample is above a virtual boundary, neighboring samples below the virtual boundary may be filled. Fig. 12A , the neighboring sample C0 can be filled with the sample C2 located below the virtual boundary (1210). Fig. 12B , the neighboring sample C0 can be filled with the sample C2 located above the virtual boundary (1220). Fig. 12C , neighboring samples C1 to C3 can be filled with samples C5 to C7 located below the virtual boundary (1230), respectively. Sample C0 can be filled with sample C6. Fig.12D , neighboring samples C1 to C3 can be filled with samples C5 to C7 located above the virtual boundary (1240), respectively. Sample C0 can be filled with sample C6. Fig.12E , neighboring samples C4 to C8 can be filled with samples C10, C11, C12, C11, and C10 located below the virtual boundary (1250), respectively. Samples C1 to C3 can be filled with samples C11, C12, and C11. Sample C0 can be filled with sample C12. Fig.12F , neighboring samples C4 to C8 may be filled with samples C10, C11, C12, C11, and C10 located above the virtual boundary (1260), respectively. Samples C1 to C3 may be filled with samples C11, C12, and C11. Sample C0 may be filled with sample C12.
[0152] In some examples, when the sample(s) and the neighboring sample(s) are located to the left (or right) and to the right (or left) of the virtual boundary, the above description may be appropriately adjusted.
[0153] The picture quadtree partitioning aligned with the largest coding unit (LCU) can be used. In order to improve the coding efficiency, an adaptive loop filter based on the coding unit synchronized picture quadtree can be used in video coding. In the example, the luma picture can be partitioned into multiple multi-level quadtree partitions, and each partition boundary is aligned with the boundary of the largest coding unit (LCU). Each partition can have a filtering process and can therefore be called a filter unit (FU) or a filtering unit (FU).
[0154] The example 2-pass encoding process is described as follows. At the first pass, the quadtree partitioning mode and the best filter (or optimal filter) for each FU can be determined. During the decision process, the filtering distortion can be estimated by fast filtering distortion estimation (FFDE). According to the determined quadtree partitioning mode and the filter of the selected FU (e.g., all FUs), the reconstructed picture can be filtered. At the second pass, CU synchronous ALF on / off control can be performed. According to the ALF on / off result, the filtered first picture is partially restored by the reconstructed picture.
[0155] A top-down partitioning strategy can be adopted to divide the picture into multiple levels of quadtree partitions by using a rate-distortion criterion. Each partition can be called a FU. The partitioning process can align the quadtree partitions with the LCU boundaries, such as Fig.13 shown. Fig.13 An example of LCU-aligned picture quadtree partitioning according to an embodiment of the present disclosure is shown. In the example, the encoding order of FUs follows the z-scan order. For example, referring to Fig.13 , the picture is split into ten FUs (for example, the FU with a split depth of 2 0 -FU 9 , where FU 0 , FU 1 and FU 9 For the first level FU, FU 2 , FU 7 and FU 8 is the second depth level FU, and FU 3 to FU 6 is the third depth level FU), and the encoding order is from FU 0 to FU 9 , for example, FU 0 , FU 1 , FU 2 , FU 3 , FU 4 , FU 5 , FU6 , FU 7 , FU 8 and FU 9 .
[0156] To indicate the picture quadtree partitioning mode, a partitioning flag ("1" indicates quadtree partitioning, and "0" indicates no quadtree partitioning) may be encoded and transmitted in z-scan order. Fig.14 The embodiment according to the present disclosure corresponds to Fig.13 The quadtree partitioning mode. Fig.14 As shown in the example in , the quadtree split flag is encoded in z-scan order.
[0157] The filter of each FU can be selected from two filter groups based on the rate-distortion criterion. The first group can have 1 / 2 symmetrical square shape and rhombus shape filters newly derived for the current FU. The second group can come from the delay filter buffer. The delay filter buffer can store filters previously derived for FUs in previous pictures. The filter with the minimum rate-distortion cost in the two filter groups can be selected for the current FU. Similarly, if the current FU is not the smallest FU and can be further divided into four sub-FUs, the rate-distortion costs of the four sub-FUs can be calculated. By recursively comparing the rate-distortion costs of the segmented and unsegmented cases, the picture quadtree segmentation mode (in other words, whether the quadtree segmentation of the current FU should be stopped) can be determined.
[0158] In some examples, the maximum quadtree segmentation level or depth can be limited to a predefined number. For example, the maximum quadtree segmentation level or depth can be 2, and therefore the maximum number of FUs can be 16 (or a power of 4 for the maximum depth number). During the quadtree segmentation decision, the correlation values for the Wiener coefficients of the 16 FUs (minimum FUs) at the bottom quadtree level can be reused. The remaining FUs can derive the Wiener filters of the remaining FUs based on the correlation of the 16 FUs at the bottom quadtree level. Therefore, in the example, there is only one frame buffer access for deriving the filter coefficients of all FUs.
[0159] After determining the quadtree partitioning mode, in order to further reduce the filtering distortion, CU synchronous ALF on / off control can be performed. By comparing the filtering distortion and non-filtering distortion, the leaf CU can explicitly turn on / off the ALF in the corresponding local area. The coding efficiency can be further improved by redesigning the filter coefficients according to the ALF on / off results. In the example, the redesign process requires additional frame buffer access. Therefore, in some examples, such as the Coding Unit Synchronous Picture Quadtree-BasedAdaptive Loop Filter (CS-PQALF) encoder design, no redesign process is required after the CU synchronous ALF on / off decision to minimize the number of frame buffer accesses.
[0160] The cross-component filtering process may apply a cross-component filter, such as a cross-component adaptive loop filter (CC-ALF). The cross-component filter may refine a chroma component (e.g., a chroma CB corresponding to the luma CB) using a luma sample value of a luma component (e.g., a luma CB). In an example, the luma CB and the chroma CB are included in a CU.
[0161] Fig.15 A cross component filter (e.g., CC-ALF) for generating chrominance components according to an example implementation of the present disclosure is shown. Fig.15 Filtering processes for a first chroma component (e.g., a first chroma CB), a second chroma component (e.g., a second chroma CB), and a luma component (e.g., a luma CB) are shown. 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 become a filtered luma CB (1561) (e.g., "Y").
[0162] The first chroma component may be filtered by the SAO filter (1512) and the ALF chroma filter (1518) to generate a first intermediate component (1552). In addition, 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). Subsequently, 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 an 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). An example cross component adaptive loop filtering process for the first chroma component may therefore include steps performed by the CC-ALF (1521) and steps performed by, for example, the adder (1522).
[0163] The above description may be applicable to the second chroma component. The second chroma component may be filtered by an SAO filter (1514) and an ALF chroma filter (1518) to generate a third intermediate component (1553). In addition, the SAO filtered luminance component (1541) may be filtered by a cross component filter (e.g., CC-ALF) (1531) for the second chroma component to generate a fourth intermediate component (1543). Subsequently, a filtered second chroma component (1563) (e.g., 'Cr') may be generated based on at least one of the fourth intermediate component (1543) and the third intermediate component (1553). In an example, a filtered second chroma component (1563) (e.g., 'Cr') may be generated by combining the fourth intermediate component (1543) and the third intermediate component (1553) using an adder (1532). In an example, the cross component adaptive loop filtering process for the second chroma component may therefore include filtering by a CC-ALF filter. (1531) and steps performed by, for example, an adder (1532).
[0164] The cross component filter (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). The CC-ALF exploits the correlation between color components to reduce coding distortion in one color component based on samples from another color component.
[0165] Fig.16An example of a CC-ALF filter (1600) according to an embodiment of the present disclosure is shown. The filter (1600) may include non-zero filter coefficients and zero filter coefficients. The filter (1600) has a diamond shape (1620) formed by filter coefficients (1610) (indicated by circles with black fill). In the 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. Therefore, 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 the example, the number of filter coefficients of the filter (1600) is equal to the number of filter coefficients (1610), which is Fig.16 In the example shown, this is 18.
[0166] CC-ALF may include any suitable filter coefficients (also referred to as CC-ALF filter coefficients). Return to reference Fig.15 , CC-ALF (1521) and CC-ALF (1531) may have the same filter shape such as Fig.16 The diamond shape (1620) and the same number of filter coefficients are shown. In the example, the values of the filter coefficients in CC-ALF (1521) are different from the values of the filter coefficients in CC-ALF (1531).
[0167] Typically, the filter coefficients in CC-ALF (eg, non-zero filter coefficients as derived by the encoder) may be transmitted, for example, in the APS. In an example, the filter coefficients may be multiplied by a factor (eg, 2 10 ) and may be rounded for fixed point representation. The application of CC-ALF may be controlled over variable block sizes and signaled by a context coding flag (e.g., a CC-ALF enable flag) received for each sample block. Context coding flags such as a CC-ALF enable flag may be signaled at any suitable level, such as a block level. For each chroma component, the block size and the CC-ALF enable flag may be received at the slice level. In some examples, block sizes (in chroma samples) of 16×16, 32×32, and 64×64 may be supported.
[0168] In an example, the syntax changes of CC-ALF are described in Table 3 as follows. Table 3: Syntax changes of CC-ALF
[0169] The semantics of the CC-ALF related syntax in the above example can be described as follows:
[0170] alf_ctb_cross_component_cb_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] equal to 0 may indicate that the cross-component Cb filter is not applied to the Cb color component sample block at luma position (xCtb, yCtb).
[0171] 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 cross-component Cb filter is applied to the Cb color component sample block at luma position (xCtb, yCtb).
[0172] 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).
[0173] alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY] not equal to 0 may indicate that the alf_ctb_cross_component_cr_idc[xCtb>>CtbLog2SizeY][yCtb>>CtbLog2SizeY]th cross-component Cr filter is applied to the Cr color component sample block at luma position (xCtb, yCtb).
[0174] Examples of chroma sampling formats are described below. In general, a luma block may correspond to one or more chroma blocks, e.g., two chroma blocks. The number of samples in each of the (one or more) chroma blocks may be less than the number of samples in the luma block. The chroma subsampling format (also referred to as the chroma subsampling format, e.g., as specified by chroma_format_idc) may indicate a chroma horizontal subsampling factor (e.g., SubWidthC) and a chroma vertical subsampling factor (e.g., SubHeightC) between each of the (one or more) chroma blocks and the corresponding luma block. For a nominal 4 (horizontal) by 4 (vertical) blocks, the chroma subsampling scheme may be specified in a 4:x:y format, where 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 an example, the chroma subsampling format may be 4:2:0, indicating that the chroma horizontal subsampling factor (e.g., SubWidthC) and the chroma vertical subsampling factor (e.g., SubHeightC) are both 2, e.g., FIG. 17A to FIG. 17B In another example, the chroma subsampling format may be 4:2:2, indicating that the chroma horizontal subsampling factor (e.g., SubWidthC) is 2, and the chroma vertical subsampling factor (e.g., SubHeightC) is 1. In yet another example, the chroma subsampling format may be 4:4:4, indicating 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 chroma sample position) may indicate the relative position of the chroma samples in the chroma block relative to at least one corresponding luma sample in the luma block.
[0175] FIG. 17A to FIG. 17B illustratively shows exemplary positions of chroma samples relative to luma samples according to an embodiment of the present disclosure. Fig.17A , the brightness samples (1701) are located in rows (1711) to (1718). Fig.17A The luma sample (1701) shown may represent a portion of a picture. In an example, a luma block (e.g., luma CB) includes a luma sample (1701). The luma block may correspond to two chroma blocks having a 4:2:0 chroma subsampling format. In an example, each chroma block includes a chroma sample (1703). Each chroma sample (e.g., chroma sample (1703(1)) corresponds to four luma samples (e.g., luma samples (1701(1)) to (1701(4)). In the example, the four luma samples are an upper left sample (1701(1)), an upper right sample (1701(2)), a lower left sample (1701(3)), and a lower right sample (1701(4)). The chroma samples (e.g., (1703(1)) to (1701(4)) are shown in FIG. (1))) is located at the left center position between the upper left sample (1701(1)) and the lower left sample (1701(3)), and the chroma sample type of the chroma block having the chroma sample (1703) may be referred to as chroma sample type 0. The chroma sample type 0 indicates a relative position 0 corresponding to the left center position between the upper left sample (1701(1)) and the lower left sample (1701(3)). These four luma samples (e.g., (1701(1)) to (1701(4))) may be referred to as neighboring luma samples of the chroma sample (1703)(1).
[0176] In an example, each chroma block may include a chroma sample (1704). The above description with reference to the chroma sample (1703) may be applicable to the chroma sample (1704), and thus a detailed description may be omitted for the sake of brevity. Each of the chroma samples (1704) may be located at a center position of four corresponding luma samples, and a chroma sample type of a chroma block having the chroma sample (1704) may be referred to as a chroma sample type 1. The chroma sample type 1 indicates a relative position 1 corresponding to a center position of four luma samples (e.g., (1701(1)) to (1701(4))). For example, one of the chroma samples (1704) may be located at a center portion of the luma samples (1701(1)) to (1701(4)).
[0177] In an example, each chroma block includes a chroma sample (1705). Each of the chroma samples (1705) may be located at an upper left position co-located with an upper left sample of four corresponding luma samples (1701), and a chroma sample type of a chroma block having the chroma sample (1705) may be referred to as a chroma sample type 2. Thus, each of the chroma samples (1705) is co-located with an upper left sample of four luma samples (1701) corresponding to the corresponding chroma sample. The chroma sample type 2 indicates a relative position 2 corresponding to an upper left position of the four luma samples (1701). For example, one of the chroma samples (1705) may be located at an upper left position of luma samples (1701(1)) to (1701(4)).
[0178] In an example, each chroma block includes a chroma sample (1706). Each of the chroma samples (1706) may be located at a top center position between a corresponding top left sample and a corresponding top right sample, and a chroma sample type of a chroma block having the chroma sample (1706) may be referred to as a chroma sample type 3. The chroma sample type 3 indicates a relative position 3 corresponding to a top center position between the top left sample and the top right sample. For example, one of the chroma samples (1706) may be located at a top center position of luma samples (1701(1)) to (1701(4)).
[0179] In an example, each chroma block includes a chroma sample (1707). Each of the chroma samples (1707) may be located at a lower left position co-located with a lower left sample of four corresponding luma samples (1701), and a chroma sample type of a chroma block having the chroma sample (1707) may be referred to as a chroma sample type 4. Thus, each of the chroma samples (1707) is co-located with a lower left sample of four luma samples (1701) corresponding to the corresponding chroma sample. The chroma sample type 4 indicates a relative position 4 corresponding to a lower left position of the four luma samples (1701). For example, one of the chroma samples (1707) may be located at a lower left position of luma samples (1701(1)) to (1701(4)).
[0180] In the example, each chroma block includes a chroma sample (1708). Each of the chroma samples (1708) is located at a bottom center position between a bottom left sample and a bottom right sample, and a chroma sample type of a chroma block having the chroma sample (1708) may be referred to as a chroma sample type 5. The chroma sample type 5 indicates a relative position 5 corresponding to a bottom center position between a bottom left sample and a bottom right sample among four luma samples (1701). For example, one of the chroma samples (1708) may be located between a bottom left sample and a bottom right sample among luma samples (1701(1)) to (1701(4)).
[0181] In general, any suitable chroma sample type may be used for a chroma subsampling format. Chroma sample types 0 through 5 provide exemplary chroma sample types described using the chroma subsampling format 4:2:0. Additional chroma sample types may be used for the chroma subsampling format 4:2:0. Furthermore, other chroma sample types and / or variants of chroma sample types 0 through 5 may be used for other chroma subsampling formats, such as 4:2:2, 4:4:4, etc. In an example, a chroma sample type combining chroma samples (1705) and (1707) may be used for the chroma subsampling format 4:2:2.
[0182] In another example, a luma block is considered to have alternating rows, such as rows including the top two samples (e.g., (1701(1)) to (1701(4))) of four luma samples, respectively. (1)) to (1701)(2))) and four brightness samples (e.g., (1701(1) to (1701 The bottom two samples in (4))) (e.g., rows (1711) to (1712) of (1701(3)) to (1701(4))) are referred to as the current rows (also referred to as the top field), and rows (1712), (1714), (1716), and (1718) are referred to as the next rows (also referred to as the bottom field). The four luma samples (e.g., (1701(1)) to (1701(4))) are referred to as the bottom two samples in (1701(3)) to (1701(4))). Therefore, rows (1711), (1713), (1715), and (1717) can be referred to as the current rows (also referred to as the top field), and rows (1712), (1714), (1716), and (1718) can be referred to as the next rows (also referred to as the bottom field). (4))) is located at the current row (e.g., (1711)) and the next row (e.g., (1712)). The upper relative chromaticity positions 2 to 3 are located in the current row, the upper relative chromaticity positions 0 to 1 are located between the current row and the corresponding next row, and the upper relative chromaticity positions 4 to 5 are located in the next row.
[0183] Chroma samples (1703), (1704), (1705), (1706), (1707), or (1708) are located in rows (1751) to (1754) in each chroma block. The specific positions of rows (1751) to (1754) may depend on the chroma sample type of the chroma samples. For example, for chroma samples (1703) to (1704) having corresponding chroma sample types 0 to 1, row (1751) is located between rows (1711) to (1712). For chroma samples (1705) to (1706) having corresponding chroma sample types 2 to 3, row (1751) is located at the same position as the current row (1711). For chroma samples (1707) to (1708) having corresponding chroma sample types 4 to 5, row (1751) is located at the same position as the next row (1712). The above description can be appropriately applied to rows (1752) to (1754), and the detailed description is omitted for the sake of brevity.
[0184] Any suitable scanning method may be used to display, store and / or transmit the above Fig.17A The luminance blocks and (one or more) corresponding chrominance blocks described in . In some example implementations, a line-by-line scan may be used.
[0185] Alternatively, interlaced scanning may be used, such as Fig. 17BAs shown. As described above, the chroma subsampling format may be 4:2:0 (e.g., chroma_format_idc is equal to 1). In an example, a variable chroma location type (e.g., ChromaLocType) may indicate a current row (e.g., ChromaLocType is chroma_sample_loc_type_top_field) or a 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 (1718) may be scanned separately. For example, the current rows (1711), (1713), (1715), and (1717) may be scanned first, and then the next rows (1712), (1714), (1716), and (1718) may be scanned. The current row may include luma samples (1701) and the next row may include luma samples (1702).
[0186] Similarly, the corresponding chroma blocks can be scanned in an interlaced manner. Rows (1751) and (1753) including chroma samples (1703), (1704), (1705), (1706), (1707), or (1708) without filling can be referred to as the current row (or current chroma row), and rows (1752) and (1754) including chroma samples (1703), (1704), (1705), (1706), (1707), or (1708) with gray filling can be referred to as the next row (or next chroma row). In the example, during interlaced scanning, rows (1751) and (1753) can be scanned first, and then rows (1752) and (1754) can be scanned.
[0187] In addition to the above-mentioned ALF, a constrained directional enhancement filter (CDEF) can also be used for loop filtering in video coding. The in-loop CDEF can be used to filter out coding artifacts such as quantization ringing artifacts while retaining image details. In some coding techniques, a sample adaptive offset (SAO) algorithm can be used to achieve similar goals by defining signal offsets for different categories of pixels. Unlike SAO, CDEF is a nonlinear spatial filter. In some examples, the design of the CDEF filter is restricted to be easy to vectorize (ie, it can be implemented by single instruction multiple data (SIMD) operations), which is not the case for other nonlinear filters such as median filters and bilateral filters.
[0188] The CDEF design is derived from the following observations. In some cases, the amount of ringing artifacts in the encoded image may be roughly proportional to the quantization step size. The smallest detail retained in the quantized image is also proportional to the quantization step size. Therefore, retaining image details will require a smaller quantization step size, which will produce a higher level of undesirable quantization ringing artifacts. Fortunately, for a given quantization step size, the amplitude of the ringing artifact can be smaller than the amplitude of the details, providing an opportunity to design the CDEF to achieve a balance by filtering out the ringing artifacts while retaining sufficient details.
[0189] CDEF can first identify the direction of each block. CDEF can then adaptively filter along the identified direction and filter to a lesser extent along the direction rotated 45° from the identified direction. The filter strength can be explicitly signaled, which allows a high degree of control over detail blur. An effective encoder search can be designed for filter strength. CDEF can be based on two in-loop filters, and the combined filter can be used for video encoding. In some example implementations, (one or more) CDEF filters can be followed by (one or more) deblocking filters for in-loop filtering.
[0190] The directional search can be performed, for example, on reconstructed pixels (or samples) after a deblocking filter, as Fig.18 As shown. Since the reconstructed pixels are available to the decoder, the direction may not need to be signaled. The direction search can operate on blocks of suitable size (e.g., 8×8 blocks), which are small enough to adequately handle non-straight edges (so that the edges appear straight enough in the filtered block) and large enough to reliably estimate the direction when applied to the quantized image. Having a constant direction over an 8×8 area can make vectorization of the filter easier. For each block, the direction that best matches the pattern in the block can be determined by minimizing the difference metric between the quantized block and each of the fully oriented blocks, such as the Sum of Squared Differences (SSD), Root Mean Square (RMS) error, etc. In the example, the fully oriented block (e.g., Fig.18 One of (1820) refers to a block in which all pixels along a line in one direction have the same value. Fig.18 An example of a directional search for an 8×8 block (1810) is shown according to an example implementation of the present disclosure. Fig.18 In the example shown, the 45 degree direction (1823) is selected from the set of directions (1820) 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 error in the range of 12 to 87 indicated by the row (1840).
[0191] An example nonlinear low-pass directional filter is described in more detail below. Identifying a direction can help align filter taps along the identified direction to reduce ringing artifacts while preserving directional edges or patterns. However, in some examples, directional filtering alone may not sufficiently reduce ringing artifacts. It is desirable to use additional filter taps on pixels that are not along a primary direction (e.g., the identified direction). To reduce the risk of blurring, additional filter taps may be handled more conservatively. Therefore, CDEF may define primary taps and secondary taps. In some example implementations, a complete two-dimensional (2-D) CDEF filter may be represented as:
[0192] In formula (14), D represents the damping parameter, S (p) and S (s) denote the strength of the primary tap and the secondary tap, respectively, and the function round(·) can round the relationship from zero to the nearest integer. and Denotes the filter weight, and f(d, S, D) denotes a constraint function that operates 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)). When the difference is small, f(d, S, D) can be equal to the difference d (e.g., f(d, S, D) = d), and thus the filter can behave as a linear filter. When the difference is large, f(d, S, D) can be equal to 0 (e.g., f(d, S, D) = 0), which effectively ignores the filter taps.
[0193] As another in-loop processing component, in addition to the deblocking operation, a set of in-loop recovery schemes can be used in video encoding post-deblocking to generally denoise and improve the quality of edges. The set of in-loop recovery schemes can be switchable within each frame (or picture) of a suitable size tile. Some examples of in-loop recovery schemes based on separable symmetric Wiener filters and dual self-guided filters with subspace projection are described below. Since content statistics can vary significantly within a frame, the filters can be integrated in a switchable framework, where different filters can be triggered in different areas of the frame.
[0194] An example separable symmetric Wiener filter is described below. The Wiener filter can be used as one of the switchable filters. Each pixel (or sample) in the degraded frame can be reconstructed as a non-causal filtered version of the pixels within a w×w window around the pixel, where w=2r+1 and is an odd number for integer r. The 2-dimensional filter taps can be composed of a number with w 2×1 elements in column vectorized form, and direct linear minimum mean square error (LMMSE) optimization may result in F = H -1 M gives the filter parameters, where H is equal to E[XX T ] and is the autocovariance of x, the w in the w×w window around the pixel 2 A column vectorized version of the sample, and where M equals E[YX T ], representing the cross-correlation of x with the scalar source sample y to be estimated. The encoder can be configured to estimate H and M based on the implementation in the deblocked frame and the source, and send the resulting filter F to the decoder. However, in some example implementations, before transmitting w 2 A large bit rate cost may be incurred when there are multiple taps. In addition, non-separable filtering may make decoding unduly complicated. Therefore, multiple additional constraints can be imposed on the properties of F. For example, F can be constrained to be separable, so that filtering can be implemented as separable horizontal and vertical w-tap convolutions. In the example, each of the horizontal filter and the vertical filter is constrained to be symmetric. In addition, in some example implementations, it can be assumed that the sum of the horizontal filter coefficients and the vertical filter coefficients is 1.
[0195] Double self-guided filtering with subspace projection can also be used as one of the switchable filters for in-loop recovery and is described below. In some example implementations, guided filtering can be used for 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 y=Fx+G Formula (15) Wherein, F and G can be determined based on the statistics of the degraded image and the guidance image (also referred to as the guide image) near the filtered pixel. If the guidance image is the same as the degraded image, the resulting self-guided filtering can have the effect of edge-preserving smoothing. According to some aspects of the present disclosure, the specific form of the self-guided filtering can depend on two parameters: the radius r and the noise parameter e, and are listed as follows:
[0196] 1. Get the mean μ and variance σ of the pixels in the (2r+1)×(2r+1) window around each pixel 2 For example, to obtain the mean μ and variance σ of the pixels 2 It can be effectively implemented by box filtering based on panoramic imaging.
[0197] 2. For each pixel, calculate the parameters f and g based on equation (16) f=σ 2 / (σ 2+e); g = (1-f)μ Formula (16)
[0198] 3. Calculate F and G for each pixel as the average of the values of parameters f and g in a 3×3 window around the pixel for use.
[0199] The dual self-guided filtering can be controlled by the radius r and the noise parameter e, where a larger radius r may imply a higher spatial variance, while a higher noise parameter e may imply a higher range variance.
[0200] Fig.19 An example of subspace projection according to an example implementation of the present disclosure is shown. Fig.19 In the example shown, subspace projection can be used to recover X cheaply 1 and X 2 To produce a final recovery X closer to the source Y f . Even the cheap recovery X 1 and X 2 Not near source Y, if cheap to recover X 1 and X 2 Moving in the right direction, the appropriate multipliers {α,β} can make it cheap to recover X 1 and X 2 Closer to source Y. For example, eventually recovering X f It can be obtained based on the following formula (17). X f =X+α(X 1 -X)+β(X 2 -X) Formula (17)
[0201] In addition to the above-mentioned deblocking filter, ALF, CDEF and loop recovery, a loop filtering method called a cross component sample offset (CCSO) filter or CCSO can be implemented in the loop filtering process to reduce the distortion of the reconstructed samples (also called reconstruction samples). The CCSO filter can be placed at any position in the loop filtering stage. In the CCSO filtering process, a nonlinear mapping can be used to determine the output offset based on the processed input reconstruction samples of the first color component. In the filtering process of CCSO, the output offset can be added to the reconstruction samples of the second color component.
[0202] The input reconstruction samples can be from the first color component located in the filter support region, such as Fig. 20 shown. Specifically, Fig. 20 An example of a filter support region in a CCSO filter according to an embodiment of the present disclosure is shown. The filter support region may include four reconstruction samples: p0, p1, p2, and p3. Fig. 20 The four input reconstruction samples in the example are in a cross shape in the vertical and horizontal directions. In the example, the center sample in the first color component (denoted by c) and the sample to be filtered in the second color component (denoted by f) are located at the same position. When processing the input reconstruction samples, the following steps can be applied:
[0203] Step 1: Calculate the delta values (eg, differences) between the four reconstructed samples: p0, p1, p2, and p3 and the center sample c, and denote them as m0, m1, m2, and m3, respectively. For example, the delta value between p0 and c is m0.
[0204] Step 2: The incremental values m0 to m3 may be further quantized into multiple (e.g., 4) discrete values. For example, for m0, m1, m2, and m3, the quantized values may be represented as d0, d1, d2, and d3, respectively. In the example, the quantized value of each of d0, d1, d2, and d3 may be -1, 0, or 1 based on the following quantization process: di=-1, if mi<-N; Formula (18) di=0,if -N<=mi<=N; Formula (19) di=1, if mi>N. Formula (20) Wherein, N is the quantization step size, example values of N are 4, 8, 12, 16, etc., di and mi refer to the respective quantization value and increment value, where i is 0, 1, 2 or 3.
[0205] The quantized values d0 to d3 can be used to identify combinations of nonlinear mappings. Fig. 20 In the example shown, the CCSO filter has four filter inputs d0 to d3, and each filter input can have one of three quantized values (e.g., -1, 0, and 1), and thus the total number of combinations is 81 (e.g., 3 4 ). FIG. 21A to FIG. 21C An example of 81 combinations according to an embodiment of the present disclosure is shown. The last column may 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 of these combinations assigned to quantized d0, d1, d2, and d3. The middle column represents all possible combinations of quantized d0, d1, d2, and d3.
[0206] The final filtering process of the CCSO filter can be applied as follows: f′=clip(f+s), Formula (21) where f is the reconstructed sample to be filtered and s is the sample from FIG. 21A to FIG. 21CThe output offset value retrieved. In the example shown in equation (21), the filtered sample value f' of the reconstructed sample f to be filtered may be further clipped to a range associated with the bit depth.
[0207] A local sample offset (LSO) method or LSO filtering process may be used in video coding. In LSO, a similar filtering method as used in CCSO may be applied. However, the output offset value may be applied to the same color component as the color component where the input reconstructed samples used in the filtering process are located. Thus, in LSO, the input reconstructed samples used in the filtering process (e.g., p0 to p3 and c) are in the same component as the reconstructed sample to be filtered (e.g., f), such as a luminance component, a chrominance component, or any suitable component. LSO may have a filter shape similar to or the same as the filter shape of CCSO (e.g., Fig. 20 shown).
[0208] like Fig. 20 As shown, the example CCSO filtering of the reconstructed sample f in the second color component to be filtered corresponding to the sample c of the first color component and p0, p1, p2 and p3 of the first color component can be called a 5-tap CCSO filter design. Alternatively, other CCSO designs with different numbers of filter taps can be used. For example, a three-tap CCSO design with lower complexity can be used in video coding. Fig. 22 An example implementation of CCSO according to an embodiment of the present disclosure is shown. Any of eight different example filter shapes may be defined for a 3-tap CCSO implementation. Each of the filter shapes may define the positions of three reconstruction samples (also referred to as three taps) in the first component (also referred to as the first color component). The three reconstruction samples may include a center sample (denoted as c) and two symmetrically positioned samples, such as Fig. 22 In the example, the reconstructed sample in the second color component to be filtered is located at the same position as the center sample c. For the purpose of clarity, Fig. 22 The reconstructed samples in the second color component to be filtered are not shown.
[0209] A sample adaptive offset (SAO) filter may be used in video encoding. In some example implementations, the SAO filter or SAO filtering process may be applied to the reconstructed signal after the deblocking filter by using, for example, an offset value in a slice header. For luma samples, the encoder may determine whether the SAO filter is applied to the current slice. If the SAO filter is enabled, the current picture may be recursively partitioned into four sub-regions, and one of six SAO types (e.g., SAO types 1 to 6) may be selected for each sub-region, as shown in Table 4. The SAO filter may classify the reconstructed pixels into multiple categories and reduce distortion by adding an offset to the pixels of each category in the current sub-region. Pixel classification in SAO types 1 to 4 may be performed using edge attributes, and pixel classification in SAO types 5 to 6 may be performed using pixel intensity. Table 4 Specifications of SAO types SAO Type The type of SAO to use Number of categories 0 No 0 1 1D 0 degree pattern edge offset 4 2 1D 90 degree pattern edge offset 4 3 1D 135 degree pattern edge offset 4 4 1D 45 degree pattern edge offset 4 5 Center belt offset 16 6 Side belt offset 16
[0210] Band Offset (BO) can be used to classify pixels (e.g., all pixels) of a sub-region into multiple bands, where each band can include pixels of the same intensity interval. The intensity range can be equally divided into multiple intervals (e.g., 32 intervals) from a minimum intensity value (e.g., 0) to a maximum intensity value (e.g., 255 for 8-bit pixels), and each interval can have an offset. Subsequently, multiple intervals or bands (e.g., 32 bands) can be divided into two groups. One group can include 16 center bands, and the other group can include the remaining 16 bands. In the example, only the offset in one group is transmitted. Regarding the pixel classification operation in BO, the highest five bits of each pixel can be used directly as a band index.
[0211] Taking into account the edge orientation information, the edge offset (EO) can be used to classify pixels using four 1-dimensional 3-pixel patterns, such as Fig.23 shown. Fig.23 An example of four 1-dimensional 3-pixel patterns for pixel classification in EO is shown. From left to right, the four 1-dimensional 3-pixel patterns correspond to a 1-dimensional 0 degree pattern (2310), a 1-dimensional 90 degree pattern (2320), a 1-dimensional 135 degree pattern (2330), and a 1-dimensional 45 degree pattern (2340). For each sub-region of a picture (e.g., a current picture), one of the four patterns can be selected by comparing each pixel with two neighboring pixels of the pixel to classify the pixel into multiple categories. The selection can be sent as side information in the code stream. Table 5 shows the pixel classification rules for EO. Table 5 EO pixel classification rules
[0212] In the example, it is expected that the SAO on the decoder side is operated independently of the LCU, so that the line buffer can be saved. In order to operate the SAO independently of the LCU, in the example, when the 90 degree, 135 degree and 45 degree classification modes are selected, the pixels of the top and bottom rows in each LCU are not SAO processed, and when the 0 degree, 135 degree and 45 degree modes are selected, the pixels of the leftmost column and the rightmost column in each LCU are not SAO processed.
[0213] Table 6 below describes the syntax that may be signaled for a CTU if the parameters are not merged from neighboring CTUs. Table 6 – Example of SAO syntax
[0214] In some implementations of the CCSO loop filtering process, such as FIG. 21A to FIG. 21C The correspondence between the combination of quantized delta values (or their indices) and cross-component sample offset values exemplarily shown in FIG for 5-tap CCSO filtering can be referred to as a CCSO lookup table (LUT). During video encoding or decoding, one or more LUTs may potentially be used in CCSO filtering processing. When multiple LUTs are provided for CCSO filtering, the encoder or decoder can dynamically and adaptively select from multiple LUTs during loop filtering processing at various levels (e.g., picture level, slice level, CTB level, CB level, FU level, etc.).
[0215] 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 incremental quantization levels (e.g., 3-level incremental quantization as described above, or any other number of incremental quantization levels). Thus, the LUTs can be of different sizes (e.g., as described above, for 5 taps and 3 quantization levels CCSO, (5-1) 3 = 81 quantization increment combinations and offset correspondences; or for 3 taps and 3 quantization levels CCSO, (3-1) 3 =8 quantization increment combinations and offset correspondences).
[0216] As described above, some of these LUTs may be predefined. For example, these predefined CCSO LUTs may be pretrained offline using training image data for conventional use in CCSO filtering processing. Such predefined LUTs may be fixed constants (fixed constant offsets for various predefined quantization delta value combinations), and thus the contents of these predefined LUTs may not need to be signaled from the encoder to the decoder in the video bitstream. Instead, these LUTs may be pre-stored, or may be hardwired or hard-coded for use in CCSO filtering processing in a video encoder or video decoder.
[0217] As further described above, some CCSO LUTs other than the predefined / pretrained LUTs used during the CCSO filtering process may be derived by the encoder during the encoding process rather than being trained offline. These CCSO LUTs are not predefined, and therefore their contents need to be explicitly signaled in the bitstream. Signaling these encoder-derived LUTs is typically expensive because it involves a large amount of overhead per frame, particularly for large LUTs, which may result in significant and undesirable overall bit rate loss. Therefore, it may be desirable to design an efficient scheme for organizing, encoding, and signaling these LUTs in the bitstream.
[0218] In some example implementations, only predefined LUTs may be used in the CCSO filtering process when encoding or decoding a video. In some other example implementations, only encoder-derived LUTs may be used in the CCSO filtering process when encoding or decoding a video. In still other example implementations, both predefined LUTs and encoder-derived LUTs may be used in the CCSO filtering process when encoding or decoding a video, and CCSO filtering of a particular FU may use any LUT selected from the predefined LUTs and the encoder-derived LUTs.
[0219] As described in detail above, CCSO processing refers to a filtering process that uses a reconstructed sample of a first color component as an input (e.g., Y or Cb or Cr, in other words, including a luminance component and not limited to a chrominance component), and applies the output to a second color component that is a different color component from the first color component according to a specific CCSOLUT. Fig. 20 An example 5-tap filter shape for a CCSO filter is shown in FIG. 21A to FIG. 21C A corresponding example LUT is shown in .
[0220] Although the filtering process in which the first color component and the second color component are different is referred to as CCSO, an intra-frame color offset process referred to as local sample offset (LSO) as described above may also be implemented. The LSO filter process may use the reconstructed samples of the first color component as input (e.g., Y or Cb or Cr) and apply the output to the same first color component according to a specific LSO LUT. The specific LSO LUT may be selected from one or more LUTs of the LSO and used to determine the local sample offset, similar to the determination of the cross-component sample offset in the CCSO process. Like the CCSO LUT, such an LSO LUT may be predefined (offline trained) as a fixed constant LUT, or may be derived by the encoder during the encoding process. The LSO LUT derived by the encoder needs to be signaled in the bitstream, while the predefined / fixed / constant / offline trained LSO LUT may be pre-stored or hardwired or hard-coded in the encoder or decoder and may not need to be signaled, similar to the predefined CCSO LUT described above.
[0221] The following disclosure also describes various example implementations of dynamic and adaptive selection of sample offset LUTs during in-loop filtering of reconstructed samples in a coding block in a decoder and an encoder. These implementations and their underlying principles are applicable not only to CCSO filtering, but also to LSO filtering. For ease of description, CCSO may be specifically referred to in some cases. However, the following disclosure is not limited to CCSO and is also applicable to LSO.
[0222] 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 that are added to the reconstructed sample values of a particular color component to calculate CCSO or LSO filtered sample values according to, for example, equation (21). These predefined CCSO and / or LSO LUTs are shared between encoders and decoders and published in advance. Therefore, these LUTs may be stored, hardwired, or hardcoded in any encoder or decoder device.
[0223] Each LUT represents a specific non-linear mapping between a specific delta value and a sample offset value. When multiple LUTs are available, the LUTs can be selected at various filter levels (FU or any other level) for each color component in the encoder and signaled to the decoder. In some implementations described below, the selection of the LUT (or various non-linear mappings between various delta values and sample offset values) can be implemented with various local adaptivities.
[0224] In some implementations, local adaptivity can be based on certain statistics derived from the encoded information of the block region to which the CCSO or LSO filtering is applied. These statistical characteristics of the filtered block region can represent image characteristics in the reconstructed samples that are related to potential distortions that may be adaptively addressed 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.
[0225] I. The edge direction derived in the above CDEF, or the edge direction derived using other edge detection methods such as Canny Edge detector or Sobel Edge detector.
[0226] II. A measure of the smoothness of the reconstructed samples within the sample region at various filtering levels where CDEF is applied. In one embodiment, the smoothness can be calculated by the range of sample values within the sample area. The range of sample values can be defined as the absolute difference between the maximum sample value and the minimum sample value. - In another embodiment, the smoothness can be calculated by the interquartile range of the sample values of the pixels located within the sample area. The interquartile range of the sample values is defined as the Ath percentile minus the Bth percentile sample values. An example value of A can be 75% and an example value of B can be 25%. In another embodiment, the variance of the sample values within the sample area can be used to Calculate the smoothness. The variance can be calculated as follows: Among them, S 2 is the variance, x i refers to the i-th sample in the current sample area covering samples 1 to n, represents the sample mean, and n represents the total number of samples in the sample area to which CCSO and / or LSO are applied. In yet another embodiment, the standard deviation of the sample values within the sample area can be used. The standard deviation can be calculated as follows: In another embodiment, the smoothness can be calculated by the range of gradient values within the sample area. The range of gradient values can be defined as the absolute difference between the maximum gradient value and the minimum gradient value. The gradient value for each sample position can be calculated as the difference between the sample value at the current position and the sample value at its neighboring position.
[0227] III. Encoded / encoded information, including but not limited to the prediction mode signaled for blocks to which CCSO or LSO is applied (e.g., whether intra DC mode, intra planar mode, intra PAETH mode, intra smoothing mode, intra recursive filtering mode, inter skip mode are applied), coefficient encoding associated with the current block (such as a coded block flag), block size, quantization parameter, and information related to motion vector (amplitude).
[0228] IV. Information that can be used by both the encoder and decoder when applying CCSO or LSO, such as sample classification information derived during the loop filtering process (e.g., ALF), filter strength derived during the deblocking process, CDEF, and loop recovery.
[0229] In some general example implementations, a nonlinear mapping in CCSO or LSO filtering (or CCSO or LSO LUT) for a block may be selected based on statistics of the block. The statistics may include, but are not limited to, I, II, III, and IV above.
[0230] In one embodiment, the color components as input to CCSO may be used to derive statistics.
[0231] In another embodiment, the color components filtered by the output of the CCSO may be used to derive statistics.
[0232] In another embodiment, if the statistics defined in I above (edge direction statistics) are used, the LUT for the current block in CCSO may be selected based on the edge information of the current block.
[0233] In an example where the edge directions derived in CDEF are used as statistics, there may be a predefined number (e.g., eight) of LUTs in total for CCSO and / or LSO. Each of the LUTs may correspond to, for example, one of eight edge directions as an output of the example CDEF edge derivation process. One of the LUTs may be selected for the current block based on the edge direction according to the correspondence. The example eight LUTs may be signaled (if not predefined) at various levels, such as at the frame level in HLS (HighLevel Syntax) (APS, slice header, frame header, PPS (Picture Parameter Set)).
[0234] In another more general example of statistics where the edge directions obtained in CDEF are used, there may be a total of N LUTs, each corresponding to more than one of the eight edge directions that are outputs of the example CDEF edge derivation process. One of the LUTs can be selected for the current block based on the edge direction according to this correspondence. Example values of N are integers, and 1 < N < 8. The N LUTs can be signaled (if not predefined) at the frame level in HLS (APS, slice header, frame header, PPS).
[0235] In some example implementations, if the statistics defined in II above (smoothness statistics) are used, then the selection of the LUT for the current block in CCSO and / or LSO can be based on whether the metric smoothness value is less than (or greater than) one or more given thresholds.
[0236] In one example, the standard deviation (S) of the current block can be compared with a predetermined number of thresholds for LUT selection. For example, there may be many LUTs to choose from, e.g., there are 4 LUTs to choose from. Accordingly, there may be three thresholds (S1, S2, S3). Thus, the selection of the LUT from the four LUTs can be based on the following criteria: LUT1 can be selected if S < S1, LUT2 can be selected if S1 ≤ S < S2, LUT3 can be selected if S2 ≤ S < S3, and LUT4 can be selected if S ≥ S3.
[0237] In one implementation, if the statistics defined in III above (coding / encoded information statistics) are used, then the selection of the LUT for the current block in CCSO and / or LSO can be based on the coding / encoded information.
[0238] In one example, the LUT for the current block can be selected based on the prediction mode of the current block. Various prediction modes can correspond to various LUTs. For the prediction mode used in the current block, the corresponding LUT can be selected. Example prediction modes include but are not limited to intra DC mode, intra planar mode, intra PAETH mode, intra smooth mode, intra recursive filtering mode, inter skip mode, etc.
[0239] In some example implementations, the various statistical information above can be used to determine the filter used in CCSO, including but not limited to filter coefficients, filter tap positions, and filter tap numbers. When such filtering parameters are embodied in different lookup tables, such determination can be equivalent to the selection of the LUT as described above. Alternatively, if these composite LUTs are constructed to include variations of these parameters in a specific composite LUT, the selection may involve selecting an entry in the LUT rather than selecting the LUT.
[0240] In any of the above implementations, the statistics used to select the LUT can be based on the statistics of any color component. It can be based on a single color component or a combination of multiple color components. It can be based on the same color component as the color component to be filtered or on another color component different from the color component to be filtered. The (one or more) color components on which statistics are performed can be referred to as "at least the first color component". The input color component to the selected sample offset filter and to be filtered can be referred to as the "second color component". The incremental value used to find the sample offset value in the selected sample offset filter can be taken from the sample located at the same position as the sample being filtered in any color component (referred to as the "third color component"). The first color component, the second color component, and the third color component can be the same or different. For example, the second color component and the third color component can be different (so "cross-component sample offset" filtering) or the same (so "local sample offset" filtering).
[0241] In some example implementations, for color components to which CCSO or LSO is applied, multiple (e.g., M) LUTs are signaled, 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 from 1 to 1024.
[0242] In some example implementations, the number of LUTs (e.g., M) and the actual LUTs (if not predefined) may be signaled at various levels, including but not limited to the sequence level in HLS (APS, slice header, frame header, PPS, SPS (Sequence Parameter Set), VPS (Video Parameter Set)), or the picture level, or the CTU / SB level. The index of the LUT selected for the current block may be signaled at various levels, including but not limited to the CTU / SB level in HLS (APS, slice header, frame header, PPS, SPS, VPS), or the coded block level, or the filter unit level.
[0243] When used in the present disclosure, the term "loop filter parameters" with respect to a CCSO or LSO filter 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 LUT type (e.g., predefined or encoder derived), an index into the LUT, the number of incremental levels in the LUT, the incremental quantization step size, the number of taps per filter, the tap positions relative to the filtered sample positions of each filter, and the like.
[0244] Fig.24A flowchart 2400 of an example method for in-loop cross sample offset filtering or local sample offset filtering that follows the basic principles of the above implementation is shown. The example method flow starts at S2401. In S2410, at least one statistical property associated with a reconstructed sample of at least a first color component in a current reconstructed data block of a video stream is obtained. In S2420, a target sample offset filter is selected from a plurality of sample offset filters based on the at least one statistical property, the target sample offset filter comprising a nonlinear mapping between a sample delta metric and a sample offset value. In S2430, a current sample of a second color component of the current reconstructed data block is filtered using the target sample offset filter and a reference sample of a third color component of the current reconstructed data block to generate a filtered reconstructed sample of the current sample. The example method flow ends at S2499.
[0245] The embodiments of the present disclosure may be used alone or in any order. In addition, each of the method (or embodiment), encoder, and decoder may be implemented by a processing circuit system (e.g., one or more processors or one or more integrated circuits). In one example, one or more processors execute a program stored in a non-transitory computer-readable medium. The embodiments of the present disclosure may be applied to luminance blocks or chrominance blocks.
[0246] The above techniques may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Fig.25 A computer system (2500) suitable for implementing certain embodiments of the disclosed subject matter is shown.
[0247] Computer software may be encoded using any suitable machine code or computer language, which may be subjected to mechanisms such as assembly, compilation, and linking to create code comprising instructions that may be executed directly by one or more computer central processing units (CPU), graphics processing units (GPU), etc., or through interpretation, microcode execution, etc.
[0248] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, Internet of Things devices, etc.
[0249] Fig.25The components for the computer system (2500) shown in the example are exemplary in nature and are not intended to suggest any limitation on the scope of use or functionality of computer software implementing embodiments of the present disclosure. Nor should the configuration of components be interpreted as having any dependency or requirement relating to any one or combination of components shown in the exemplary embodiment of the computer system (2500).
[0250] The computer system (2500) may include certain human-machine interface input devices. Such human-machine interface input devices may be responsive to input by one or more human users through, for example, tactile input (such as keystrokes, swipes, data glove movements), audio input (such as voice, tapping), visual input (such as gestures), olfactory input (not depicted). The human-machine interface devices may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (such as voice, music, ambient sounds), images (such as scanned images, photographic images obtained from a still image camera), video (such as two-dimensional video, three-dimensional video including stereoscopic video).
[0251] The input human-machine interface device may include one or more of the following (only one of each item is drawn): keyboard (2501), mouse (2502), touch pad (2503), touch screen (2510), data gloves (not shown), joystick (2505), microphone (2506), scanner (2507), camera (2508).
[0252] The computer system (2500) may also include certain human-machine interface output devices. Such human-machine interface output devices may stimulate one or more senses of a human user through, for example, tactile output, sound, light, and smell / taste. Such human-machine interface output devices may include: tactile output devices (for example, tactile feedback through a touch screen (2510), a data glove (not shown), or a joystick (2505), but there may also be tactile feedback devices that do not serve as input devices); audio output devices (such as: speakers (2509), headphones (not depicted)); visual output devices (such as screens (2510), including cathode ray tube (CRT) screens, liquid crystal display (LCD) screens, plasma screens, organic light-emitting diode (OLED) screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities - some of which may be able to output two-dimensional visual outputs or more than three-dimensional outputs through methods such as stereoscopic image output; virtual reality glasses (not depicted); holographic displays and cigarette cans (not depicted)); and printers (not depicted).
[0253] The computer system (2500) may also include human-accessible storage devices and their associated media, such as optical media including CD / DVD read-only memory (ROM) / read-write (RW) (2520) including CD / DVD and other media (2521), thumb drives (2522), removable hard drives or solid-state drives (2523), legacy magnetic media such as tapes and floppy disks (not depicted), dedicated ROM / application specific integrated circuit (ASIC) / programmable logic device (PLD) based devices such as security dongles (not depicted), etc.
[0254] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the presently disclosed subject matter does not include transmission media, carrier waves, or other transitory signals.
[0255] The computer system (2500) may also include an interface (2554) to one or more communication networks (2555). The network may be, for example, wireless, wired, optical. The network may also be a local area network, a wide area network, a metropolitan area network, an in-vehicle and industrial network, real-time, delay-tolerant, etc. Examples of networks include: a local area network such as Ethernet; a wireless LAN; a cellular network including GSM (Global System for Mobile Communication), 3G (Third Generation), 4G (Fourth Generation), 5G (Fifth Generation), LTE (Long Term Evolution), etc.; a television wired or wireless wide area digital network including cable television, satellite television, and terrestrial broadcast television; an in-vehicle network and an industrial network including a CAN bus, etc. Some networks typically require an external network interface adapter that is attached to some universal data port or peripheral bus (2549) (such as, for example, a USB (Universal Serial Bus, USB) port of the computer system (2500)); other networks are typically integrated into the core of the computer system (2500) by attaching to a system bus as described below (e.g., an Ethernet interface to a PC computer system or a cellular network interface to a smart phone computer system). The computer system (2500) can communicate with other entities by using any of these networks. Such communications can be one-way receive-only (e.g., broadcast television), one-way send-only (e.g., a CAN bus to some CAN bus devices), or two-way, for example, using a local area digital network or a wide area digital network to other computer systems. Certain protocols and protocol stacks can be used on each of these networks and network interfaces as described above.
[0256] The above-mentioned human-machine interface device, human-accessible storage device, and network interface may be attached to the core ( 2540 ) of the computer system ( 2500 ).
[0257] The core (2540) may include one or more central processing units (CPUs) (2541), graphics processing units (GPUs) (2542), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (2543), hardware accelerators for certain tasks (2544), graphics adapters (2550), etc. These devices, along with read-only memory (ROM) (2545), random access memory (2546), internal mass storage devices such as internal non-user accessible hard drives, SSDs (Solid State Drives, SSDs), etc. (2547) may be connected via a system bus (2548). In some computer systems, the system bus (2548) may be accessed in the form of one or more physical plugs to enable expansion by additional CPUs, GPUs, etc. Peripheral devices may be attached to the core's system bus (2548) directly or via a peripheral bus (2549). In an example, a screen (2510) may be connected to a graphics adapter (2550). The architecture of the peripheral bus includes PCI (Peripheral Component Interconnect, PCI), USB, etc.
[0258] The CPU (2541), GPU (2542), FPGA (2543) and accelerator (2544) can execute certain instructions, which can be combined to form the computer code mentioned above. The computer code can be stored in ROM (2545) or RAM (2546). Transient data can also be stored in RAM (2546), while permanent data can be stored in, for example, an internal mass storage device (2547). Fast storage and retrieval of any storage device in the storage device can be achieved by using a cache memory, which can be used with one or more CPUs. (2541), GPU (2542), mass storage device (2547), ROM (2545), RAM (2546) and others are closely related.
[0259] The computer readable medium may 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 those of a type well known and available to those skilled in the art of computer software.
[0260] As a non-limiting example, a computer system (2500) having an architecture, and in particular a core (2540), can provide functionality due to a processor (including a CPU, GPU, FPGA, accelerator, etc.) executing software embodied in one or more tangible computer-readable media. Such a computer-readable medium can be a medium associated with a user-accessible mass storage device as described above and certain storage devices of the core (2540) having non-transitory properties, such as a core internal mass storage device (2547) or a ROM (2545). Software implementing various embodiments of the present disclosure can be stored in such a device and executed by the core (2540). Depending on specific needs, the computer-readable medium may include one or more memory devices or chips. The software can enable the core (2540) and in particular the processor therein (including a CPU, GPU, FPGA, etc.) to perform specific processing or specific parts of specific processing described herein, including defining data structures stored in RAM (2546) and modifying such data structures according to processing defined by the software. Additionally or alternatively, a computer system may provide functionality due to logic hardwired or otherwise embodied in circuits (e.g., accelerators (2544)) that may operate in place of or in conjunction with software to perform specific processing or specific portions of specific processing described herein. Where appropriate, references to software may include logic, and vice versa. Where appropriate, references to computer-readable media may include circuits storing software for execution (such as integrated circuits (ICs)), circuits implementing logic for execution, or both. The present disclosure includes any suitable combination of hardware and software.
[0261] Although the present disclosure has described several exemplary embodiments, there are changes, permutations, and various alternative equivalents that fall within the scope of the present disclosure. In the above implementations and embodiments, any operation of the processing can be combined or arranged in any number or order as needed. In addition, two or more operations of the above processing can be performed in parallel. It will therefore be appreciated that those skilled in the art can envision many systems and methods that embody the principles of the present disclosure and are therefore within its spirit and scope, although not explicitly shown or described herein. Appendix A: Acronyms JEM: Joint Development Model VVC: Versatile Video Coding BMS: Benchmark Set MV: Motion Vector HEVC: High Efficiency Video Coding SEI: Supplemental Enhancement Information VUI: Video Availability 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 to 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 Array 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-frame sub-partitioning SPS: Sequence Parameter Set PPS: Picture Parameter Set APS: Adaptive 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
1. A method for decoding a video, characterized in that: include: determining two or more sample offset filters, each sample offset filter comprising a plurality of sample offset values that non-linearly map to a plurality of possible combinations of available sample delta metrics relative to a plurality of reference tap positions of filter tap positions, the available sample delta metrics comprising quantizations of available sample differences between the plurality of sample tap positions and the filter tap positions; obtaining at least one statistical property associated with reconstructed samples of at least a first color component in a data block of the video; selecting a target sample offset filter among the two or more sample offset filters based on the at least one statistical property for loop filtering the reconstructed samples; as well as A signaling element is included in an encoded bitstream of the video to identify the target sample offset filter for the reconstructed sample among the two or more sample offset filters.
2. The method according to claim 1, characterized in that The method further comprises: filtering the reconstructed samples of the second color component of the data block using the target sample offset filter to generate filtered reconstructed samples of the second color component; and The filtered reconstructed samples of the second color component are stored in a current picture buffer or a reference picture buffer as reference samples for encoding other inter-frame prediction samples or intra-frame prediction samples of the video.
3. The method according to claim 2, characterized in that Filtering each of the reconstructed samples of the second color component of the data block using the target sample offset filter comprises: selecting a sample offset from the plurality of offset values based on a calculated combination of sample delta metrics for filter samples at a plurality of reference tap positions of the filter samples of a third color component of the reconstructed data block and corresponding reference samples; and The selected sample offset is applied to each of the reconstructed samples of the second color component to generate filtered reconstructed samples of the second color component.
4. The method according to claim 3, characterized in that The first color component is the same color component as the third color component.
5. The method according to claim 3, characterized in that: The first color component is the same color component as the second color component.
6. The method according to claim 3, characterized in that The second color component is a color component different from the third color component.
7. The method according to claim 3, characterized in that The second color component is the same color component as the third color component.
8. The method according to any one of claims 1 to 7, characterized in that The at least one statistical attribute includes edge information of the data block.
9. The method according to claim 8, characterized in that The edge information of the data block includes an edge direction obtained in a Constrained Directional Enhancement Filter (CDEF) process; and The two or more sample offset filters include N sample offset filters corresponding to N CDEF edge directions, where N is an integer between 1 and 8, inclusive.
10. The method according to any one of claims 1 to 7, characterized in that The two or more sample offset filters are signaled in the encoded codestream at a frame level in a high-level syntax HLS.
11. The method according to claim 3, characterized in that Filtering each of the reconstructed samples of the second color component using the target sample offset filter comprises: determining a first position of each of the reconstructed samples of the second color component; identifying a filter sample of a third color component at the first position and reference samples of the third component at a plurality of reference tap positions relative to the first position; determining the calculated combination of a sample delta metric between the reference samples and the filter samples of the third color component of the data block; extracting the sample offset from the plurality of offset values of the target sample offset filter based on the calculated combination of the sample delta metrics; and The sample offset is applied to each of the reconstructed samples to generate filtered reconstructed samples of the reconstructed samples of the second color component.
12. The method according to any one of claims 1 to 7, characterized in that The at least one statistical property comprises a smoothness measure of the block of data.
13. The method according to claim 12, characterized in that mapping the smoothness metric of the data block to one of M predefined smoothness levels characterized by M-1 smoothness level thresholds; The two or more sample offset filters include M sample offset filters corresponding to the M predefined smoothness levels; as well as The target sample offset filter is selected from the M sample offset filters according to one of the M predefined smoothness levels mapped to the smoothness metric.
14. The method according to any one of claims 1 to 7, characterized in that The at least one statistical property comprises encoding information of the data block.
15. The method according to claim 14, characterized in that The encoding information includes a current prediction mode of the data block; The two or more sample offset filters correspond to different prediction modes; as well as The target sample offset filter is selected from the two or more sample offset filters according to the current prediction mode of the data block.
16. The method according to claim 15, characterized in that The different prediction modes include at least one of an intra DC mode, an intra planar mode, an intra PAETH mode, an intra smoothing mode, an intra recursive filtering mode, and an inter skip mode.
17. The method according to any one of claims 1 to 7, characterized in that Each of the two or more sample offset filters is associated with a set of filter coefficients, a number of the plurality of reference tap positions, and the plurality of reference tap positions.
18. The method according to any one of claims 1 to 7, characterized in that The two or more sample offset filters are predetermined; and The two or more sample offset filters and an index of a target sample offset filter selected from among the two or more sample offset filters are signaled at a sequence level, a picture level, or a coding tree unit level in the encoded code stream.
19. A video decoder, characterized in that: The video decoder comprises processing circuitry configured to perform the method of any one of claims 1 to 7.
20. A non-transitory computer readable medium for storing computer instructions, characterized in that: The computer instructions, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 7.
