Encoder, decoder and corresponding methods for performing chroma deblocking for blocks using joint chroma coding
The deblocking method and device address the challenge of accurately filtering chroma block edges by using luma quantization parameters and chroma QP mapping tables, resulting in improved visual quality of coded video by effectively removing block artifacts.
Patent Information
- Application Number
- JP2025170094
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-10-07
- Filing Date
- 2025-10-08
- Publication Date
- 2026-02-03
AI Technical Summary
Conventional deblocking filters face challenges in accurately filtering chroma block edges due to information loss during derivation from luma blocks, particularly with new types of chroma blocks like joint Cb-Cr residual coding, leading to visible artifacts.
A deblocking method and device that utilize luma quantization parameters and chroma QP mapping tables to determine accurate chroma quantization parameters, enabling precise filtering of chroma block edges, especially for joint Cb-Cr residual blocks.
The method improves the deblocking process, effectively removing block artifacts and enhancing the visual quality of coded video by accurately determining chroma QPs for different chroma components.
Smart Images

Figure 2026016441000001_ABST
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This patent application claims the benefit of priority to International Application No. PCT / EP2019 / 072643, filed August 23, 2019, International Application No. PCT / RU2019 / 000639, filed September 16, 2019, and International Application No. PCT / EP2019 / 077057, filed October 7, 2019. The foregoing patent applications are incorporated herein by reference in their entireties.
[0002] Technical Field FIELD OF THE DISCLOSURE Embodiments of the present disclosure relate generally to the field of image processing, e.g., still picture and / or video picture coding. In particular, the present invention deals with improvements to deblocking filters. [Background technology]
[0003] Image coding (encoding and decoding) is used in a wide range of digital imaging applications, such as broadcast digital TV, video transmission over the Internet and mobile networks, real-time conversation applications such as video chat and video conferencing, DVDs and Blu-ray discs, video content collection and editing systems, and video cameras for security applications. Since the development of the block-based hybrid video coding approach in the H.261 standard in 1990, new video coding techniques and tools have been developed and form the basis of new video coding standards. One of the goals of most video coding standards has been to achieve a bitrate reduction compared to its predecessor without sacrificing picture quality. Additional video coding standards include MPEG-1 video, MPEG-2 video, ITU-T H.262 / MPEG-2, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10: Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), and ITU-T H.266 / Versatile video coding (VVC), as well as extensions to these standards, such as scalability and / or three-dimensional (3D) extensions. Block-based image coding methods share the commonality that edge artifacts can appear along block edges. These artifacts result from the independent coding of various coding blocks. These edge artifacts are often easily visible to the user. The goal in block-based image coding is to reduce edge artifacts below the visibility threshold. This is done, for example, by performing loop filtering, such as deblocking filtering, which is performed on the decoding side to remove visible edge artifacts, but also on the encoding side to prevent edge artifacts from being encoded into the image in the first place.The deblocking filter process generally includes a decision and filtering process for luma block edges and a decision and filtering process for chroma block edges.
[0004] However, deblocking chroma block edges between two adjacent chroma blocks can be challenging. For example, the information used to deblock chroma block edges is derived from the corresponding luma blocks and can be lost during the derivation process, leading to an inaccurate deblocking process. In another example, new types of chroma blocks, such as chroma blocks coded using joint Cb-Cr residual (JCCR) coding tools (or joint coding of chrominance residuals, JCCR) tools, can present new challenges for deblocking filtering. Summary of the Invention
[0005] In view of the above-mentioned problems, the present invention aims to improve conventional deblocking filtering. The present invention has the object of providing a deblocking filter device, an encoder, a decoder and corresponding methods that are able to perform deblocking filtering in an accurate manner, so that deblocking should be more efficient. Embodiments of the present invention are defined by the features of the independent claims and further advantageous implementations of the embodiments according to the features of the dependent claims. Particular embodiments are outlined in the accompanying independent claims, further embodiments are in the dependent claims.
[0006] According to a first aspect, the present invention relates to a deblocking method for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block in image encoding and / or image decoding. The unblocking method includes: performing a decision process for the chroma block edges, the decision process including: A first luma quantization parameter (Qp) of a first luma block (801) of the first image block YP ) and a chroma quantization parameter (QP) mapping table for the first chroma block, and Cp ) to determine; the second luma quantization parameter (Qp YQ ) and a chroma QP mapping table for the second chroma block, and Cq ) to determine; The first chroma quantization parameter (Qp Cp ) and the second chroma quantization parameter (Qp Cq ), a third chroma quantization parameter (e.g., an averaged and rounded chroma quantization parameter) (Qp C ) to determine; the third chroma quantization parameter (e.g., averaged and rounded chroma quantization parameter) (Qp C ) based on the threshold parameter (t C ) to determine; Performing a filtering process of the chroma block edges based on at least the threshold parameter.
[0007] Third Chroma QP (Qp CIt will be appreciated that the threshold parameter (t) may be used directly or indirectly to determine whether a chroma block edge should be filtered and / or whether strong or normal deblocking should be applied (e.g., whether long or weak filtering should be performed). In one example, the threshold parameter (t C ) is the third chroma quantization parameter (e.g., the averaged and rounded chroma quantization parameter) (Qp C ) or may be derived from a look-up table. C ) may be used to determine whether chroma block edges should be filtered and / or whether strong or normal deblocking should be applied (e.g., whether long or weak filtering should be performed). C It is noted that ∇ ...
[0008] It can be understood that for the filtering process for a chroma block edge, correspondingly, in the second chroma block, for each line of input chroma samples that are perpendicular to and adjacent to the chroma block edge, at most MA number of chroma samples are modified to generate output filtered chroma samples; and in the first chroma block, for each line of input chroma samples that are perpendicular to and adjacent to the chroma block edge, at most MB number of chroma samples are modified to generate output filtered chroma samples. It can be understood that the value of MA or MB depends on the block size (width and height) of either the first or second chroma block.
[0009] The threshold parameter (t C It is noted that the details of how the ) are used can be found in documents such as the VVC specification, which will not be repeated here.
[0010] It is noted that the terms "block," "coding block," or "image block" are used in this disclosure, which can apply to transform units (TUs), prediction units (PUs), coding units (CUs), etc. In VVC, generally, transform units and coding units are mostly aligned, except for a few scenarios where TU tiling or sub-block transform (SBT) is used. It is understood that the terms "block / image block / coding block / transform block" and "block size / transform block size" may be interchanged in this disclosure. The terms "sample / pixel" may be interchanged in this disclosure.
[0011] The present invention works for both vertical and horizontal chroma block edges.
[0012] This allows for the chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block to be correctly deblocked. In the techniques presented herein, information contained in the luma QPs for two adjacent blocks is preserved and used to determine the respective chroma QPs. This prevents information loss incurred by existing techniques in which the chroma QP is determined based on the average value of the luma QPs of the two adjacent luma blocks. Furthermore, by using the respective chroma QP mapping tables presented herein, the chroma QPs can be more accurately determined for different chroma components. As a result, the deblocking process is more effective at removing block artifacts, thereby improving the visual quality of the coded video.
[0013] In one possible implementation, at least one of the first chroma and second chroma blocks is a Joint Cb-Cr Residual (JCCR) coded block.
[0014] With the techniques presented herein, the final chroma QP value for a joint Cb-Cr coded block can be correctly derived (or mapped) based on its corresponding luma QP value to achieve correct deblocking decisions and thereby achieve better visual quality of the coded video. Thus, the results of deblocking filtering are significantly improved.
[0015] In one possible implementation, the first chroma block is a Joint Cb-Cr Residual (JCCR) coded block of the first image block and the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block of the second image block; or The first chroma block is a Joint Cb-Cr Residual (JCCR) coded block of the first image block, and the second chroma block is a first chroma component of the second image block; or The first chroma block is a Joint Cb-Cr Residual (JCCR) coded block of the first image block, and the second chroma block is a second chroma component of the second image block; or The first chroma block is a first chroma component of the first image block, and the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block of the second image block (602, 602'); or The first chroma block is a second chroma component of the first image block, and the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block of the second image block; or The first chroma block is a first chroma component of the first image block and the second chroma block is a first chroma component of the second image block; or The first chroma block is the second chroma component of the first image block, and the second chroma block is the second chroma component of the second image block.
[0016] In the techniques presented herein, when the first chroma block and the second chroma block are of different types, the order of steps in the method according to the embodiments of the present disclosure is rational without loss of information. Furthermore, the final derived chroma QP value for the chroma block containing the joint Cb-Cr coded block is more accurate, thus resulting in better deblocking decisions and, thereby, better visual quality.
[0017] In one possible implementation, the chroma quantization parameter (QP) mapping table for the first chroma block or the second chroma block includes at least one of the following: The first chroma QP mapping table for joint Cb-Cr coded blocks. A second chroma QP mapping table for the first chroma component (e.g., the Cb component), or The third chroma QP mapping table for the second chroma component (e.g., Cr component).
[0018] In one example, each chroma QP mapping table has the same number of entries. It is noted that in the present specification, claims, and accompanying drawings, the terms "first," "second," "third," etc. are intended to distinguish between similar objects (if any) and do not necessarily indicate a particular order or hierarchy.
[0019] The techniques presented herein enable more accurate determination of chroma QPs for different chroma components using the respective chroma QP mapping tables presented herein. As a result, the deblocking process is more effective at removing block artifacts, thereby improving the visual quality of the coded video.
[0020] In one possible implementation, the first chroma QP mapping table, the second chroma QP mapping table, and the third chroma QP mapping table are indicated or indexed by a first index value, a second index value, and a third index value, respectively. In one example, if the second index value is equal to 0, ChromaQpTable[0] is the second chroma QP mapping table for a first chroma component. If the third index value is equal to 1, ChromaQpTable[1] is the third chroma QP mapping table for a second chroma component. If the first index value is equal to 2, ChromaQpTable[2] is the first chroma QP mapping table for a joint Cb-Cr residual (JCCR) coded block. In one example, chroma QP mapping table ChromaQpTable[i] may be derived based on parameters or information obtained from bitstream i=0, 1, or 2. In another example, ChromaQpTable[i] may be a predefined chroma QP mapping table.
[0021] In one possible implementation, the first index value is 3, the second index value is 1, and the third index is 2; or the first index value is 2, the second index value is 0, and the third index is 1.
[0022] In one possible implementation, if the first chroma block is a Joint Residual Cb-Cr (JCCR) coded block of the first image block (601, 601′), the first chroma quantization parameter (Qp Cp ) is the first luma quantization parameter (Qp YP ) based on the chroma QP values corresponding to the clipped values of If the first chroma block is the first chroma component (e.g., Cb component) of the first image block, the first chroma quantization parameter (Qp Cp ) is the first luma quantization parameter (Qp YP ) based on the chroma QP values corresponding to the clipped values of If the first chroma block is the second chroma component (such as the Cr component) of the first image block, the first chroma quantization parameter (Qp Cp ) is the first luma quantization parameter (Qp YP ) is derived based on the chroma QP values corresponding to the clipped values of
[0023] The first luma quantization parameter (Qp YP ) is the first chroma quantization parameter (Qp Cp It is noted that the first luma QP is not directly used to derive the second luma QP. An intermediate step such as clipping may be used for the first luma QP.
[0024] The techniques presented herein enable more accurate determination of chroma QPs for different chroma components using the respective chroma QP mapping tables presented herein. As a result, the deblocking process is more effective at removing block artifacts, thereby improving the visual quality of the coded video.
[0025] In one possible implementation, if the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block of the second image block (602, 602′), the second chroma quantization parameter (Qp Cq ) is the second luma quantization parameter (Qp YQ ) based on the chroma QP values corresponding to the clipped values of If the second chroma block is the first chroma component (e.g., Cb component) of the second image block, the second chroma quantization parameter (Qp Cq ) is the second luma quantization parameter (Qp YQ ) based on the chroma QP values corresponding to the clipped values of If the second chroma block is the second chroma component (e.g., Cr component) of the second image block, the second chroma quantization parameter (Qp Cq ) is the second luma quantization parameter (Qp YQ ) is derived based on the chroma QP values corresponding to the clipped values of
[0026] The second luma quantization parameter (Qp YQ ) is the second chroma quantization parameter (Qp Cq It is noted that the second luma QP is not directly used to derive the second luma QP. An intermediate step such as clipping can be used for the second luma QP.
[0027] The techniques presented herein enable more accurate determination of chroma QPs for different chroma components using the respective chroma QP mapping tables presented herein. As a result, the deblocking process is more effective at removing block artifacts, thereby improving the visual quality of the coded video.
[0028] In one possible implementation, the first luma quantization parameter (Qp YP ) and a chroma quantization parameter (QP) mapping table for the first chroma block, and Cp ) includes: The first luma quantization parameter (Qp YP ) based on the clipped QP value (qPi Chroma ) for example, qPi Chroma =Clip3(-QpBdOffset,63,Qp YP ); The chroma QP mapping table for the first chroma block is used to determine the clipped QP value (qPi Chroma ) based on the chroma QP value (qPi Cb , qPi Cr , qPi CbCr ) to determine; Chroma QP value (qPi Cb , qPi Cr , qPi CbCr ) for the first chroma block based on the clipped value of Cp ) to determine
[0029] In one example, the first chroma quantization parameter (Qp Cp ) is the chroma QP value (qPi Cb , qPi Cr , qPi CbCr ) to the clipped value of the first chroma quantization parameter (QpBdOffset), which is obtained based on the bit depth of the encoded sequences. Cp ) are allowed to have non-zero values.
[0030] In one possible implementation, the second luma quantization parameter (Qp YQ ) and the chroma QP mapping table for the second chroma block, a second chroma quantization parameter (Qp Cq ) includes: The second luma quantization parameter (Qp YQ) based on the clipped QP value (qPi Chroma ) ; for example, qPi Chroma =Clip3(-QpBdOffset,63,Qp YQ ); The chroma QP mapping table for the second chroma block is used to find the clipped QP value (qPi Chroma ) based on the chroma QP value (qPi Cb , qPi Cr , qPi CbCr ) to determine; The second chroma quantization parameter (Qp Cq ) to the chroma QP value (qPi Cb , qPi Cr , qPi CbCr ) based on the clipped value of
[0031] In one example, the second chroma quantization parameter (Qp Cq ) is the chroma QP value (qPi Cb , qPi Cr , qPi CbCr ) to a clipped value of QpBdOffset, where the predefined value is obtained based on the bit depth of the encoded sequences. The techniques presented herein allow for non-zero values of the second chroma quantization parameter (QpCq).
[0032] In one possible implementation, a first chroma quantization parameter (Qp Cp ) and the second chroma quantization parameter (Qp Cq ) based on the third chroma quantization parameter (Qp C ) includes: A third chroma quantization parameter (e.g., an averaged and rounded chroma quantization parameter Qp C )(Qp C ) into the following equation Qp C=(Qp Q +Qp P +1)>>1 Determined in accordance with where Qp P is the first chroma quantization parameter (Qp Cp ) and Qp Q is the second chroma quantization parameter (Qp Cq ) is based on
[0033] It can be seen that the motivation for averaging with right shifts is to avoid using division, which is an expensive operation in hardware. In practice, averaging is usually implemented in this way: (a+b+1)>>1. The addition of 1 before the right shift is a rounding approximation, ensuring that the average result is rounded. For example, (a+b+2 bits-1 )>>bits is (a+b+2 bits-1 ) / 2 bits (e.g. bits=1).
[0034] In one possible implementation, Qp P is the first chroma quantization parameter (Qp Cp ) by subtracting the offset value (QpBdOffset), and Qp Q is the second chroma quantization parameter (Qp Cq ) by subtracting an offset value (QpBdOffset).
[0035] In one possible implementation, the joint Cb-Cr coded block is coded using a JCCR mode, which is the second mode in a set of available JCCR modes, e.g., the variable TuCRESMode is set to 2.
[0036] According to a second aspect, the present invention relates to a deblocking filter device for use in an image encoder and / or an image decoder for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block. The deblocking filter device is configured to: performing a decision process for the chroma block edges, the decision process including: the first luma quantization parameter (Qp YP ) and a chroma quantization parameter (QP) mapping table for the first chroma block, and Cp ) to determine; the second luma quantization parameter (Qp YQ ) and a chroma QP mapping table for the second chroma block, and Cq ) to determine; The first chroma quantization parameter (Qp Cp ) and the second chroma quantization parameter (Qp Cq ) based on the third chroma quantization parameter (Qp C ) to determine; The third chroma quantization parameter (Qp C ) based on the threshold parameter (t C ) to determine; Performing a filtering process of the chroma block edges (903, 913, 923) based on at least the threshold parameters.
[0037] The apparatus according to the second aspect can be extended to implementations corresponding to the implementations of the method according to the first aspect. Thus, the implementations of the apparatus include one or more features of the corresponding implementations of the method according to the first aspect. The advantages of the apparatus according to the second aspect are the same as the advantages of the corresponding implementations of the method according to the first aspect. The method according to the first aspect of the present invention can be performed by the apparatus according to the second aspect of the present invention. Further features and implementations of the method according to the first aspect of the present invention correspond to the features and implementations of the apparatus according to the second aspect of the present invention.
[0038] According to a third aspect of the present invention, there is provided a video encoding apparatus for encoding pictures of a video stream, the video encoding apparatus comprising a deblocking filter apparatus according to any preceding implementation of any preceding aspect or any preceding aspect itself, which allows highly efficient and accurate encoding of images.
[0039] According to a fourth aspect of the present invention, there is provided a video decoding apparatus for decoding pictures of an encoded video stream, the video decoding apparatus comprising a deblocking filter apparatus according to any preceding implementation of any preceding aspect or any preceding aspect itself, which allows particularly accurate and efficient decoding of pictures.
[0040] According to a fifth aspect of the present invention, an apparatus for decoding a video stream includes a processor and a memory, the memory storing instructions for causing the processor to perform an unblocking method according to any preceding implementation of any preceding aspect or any preceding aspect itself.
[0041] According to a sixth aspect of the present invention, an apparatus for encoding a video stream includes a processor and a memory, the memory storing instructions for causing the processor to perform a deblocking method according to any preceding implementation of any preceding aspect or any preceding aspect itself.
[0042] According to another aspect, a computer-readable storage medium is provided having stored thereon instructions that, when executed, cause one or more processors to encode video data, the instructions causing the one or more processors to perform any preceding implementation of any preceding aspect or a deblocking method according to any preceding aspect itself.
[0043] According to another aspect, there is provided a computer program product comprising program code for performing an unblocking method according to any preceding implementation of any preceding aspect or any preceding aspect itself, when the computer program is run on a computer.
[0044] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. [Brief explanation of the drawings]
[0045] In the following, embodiments of the invention will be described in more detail with reference to the accompanying drawings and figures: [Figure 1A] 1 is a block diagram illustrating an example of a video encoding system configured to implement embodiments of the present invention. [Figure 1B] FIG. 2 is a block diagram illustrating another example of a video encoding system configured to implement embodiments of the present invention. [Figure 2] FIG. 1 is a block diagram illustrating an example of a video encoder configured to implement embodiments of the present invention. [Figure 3] FIG. 2 is a block diagram illustrating an exemplary structure of a video decoder configured to implement embodiments of the present invention. [Figure 4] FIG. 1 is a block diagram illustrating an example of an encoding device or a decoding device. [Figure 5] FIG. 10 is a block diagram illustrating another example of an encoding device or a decoding device. [Figure 6A] Two exemplary image blocks (such as transform or coding blocks) are shown. [Figure 6B] Two exemplary image blocks (such as transform or coding blocks) are shown. [Figure 7A] A conceptual diagram showing the nominal relative vertical and horizontal positions of luma and chroma samples. [Figure 7B] FIG. 1 is a schematic diagram showing co-located luma and chroma blocks. [Figure 8] Two exemplary luma blocks (e.g., luma components of a transform block or coding block) are shown. [Figure 9] 9A-9H are schematic diagrams illustrating an exemplary mechanism for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block. [Figure 10] 1 illustrates an embodiment of a deblocking filter apparatus according to an embodiment of the present invention; [Figure 11] 1 illustrates an embodiment of a flowchart illustrating a deblocking method for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block. [Figure 12] 12A and 12B show two exemplary chroma QP mapping tables. [Figure 13] An exemplary separate chroma Qp mapping table for each component is shown. [Figure 14] 31 is a block diagram illustrating an exemplary structure of a content supply system 3100 for implementing a content delivery service. [Figure 15] FIG. 2 is a block diagram showing the structure of an example of a terminal device. [Figure 16] 1 is a flowchart of an unblocking method according to some aspects of the present disclosure. [Figure 17] 1 is a flowchart of a decision process according to some aspects of the present disclosure.
[0046] In the following, the same reference signs refer to identical or at least functionally equivalent features, unless expressly specified otherwise. DETAILED DESCRIPTION OF THE INVENTION
[0047] The following definitions are used for reference: Coding Block : M × N blocks of samples for some values of M and N, such that the division of the CTB into coding blocks is a partitioning. Coding Tree Block (CTB) : An N × N block of samples for some value of N, such that the division of a component into CTBs is a partitioning. Coding Tree Unit (CTU) : A CTB of luma samples, two corresponding CTBs of chroma samples for pictures with three sample arrays, or a CTB of samples for monochrome pictures or pictures coded using a syntax structure used to code three separate color planes and samples. Coding Unit (CU) : A coded block of luma samples, two corresponding coded blocks of chroma samples for a picture with three sample arrays, or a coded block of samples for a monochrome picture or a picture coded using a syntax structure used to code three separate color planes and samples. component An array or a single sample from one of the three arrays (luma and two chroma) that make up a picture in 4:2:0, 4:2:2, or 4:4:4 color format, or an array or a single sample from an array that makes up a picture in monochrome format.
[0048] In the following description, reference is made to the accompanying drawings, which form a part of this disclosure, and which illustrate specific aspects of embodiments of the present invention or in which embodiments of the present invention may be used. It is understood that embodiments of the present invention may be used in other aspects and include structural or logical changes not shown in the drawings. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.
[0049] For example, it is understood that disclosure related to a described method also applies to a corresponding apparatus or system configured to perform that method, and vice versa. For example, when one or more specific method steps are described, a corresponding apparatus may include one or more units, e.g., functional units, for performing the described one or more method steps (e.g., one unit that performs the one or more steps, or multiple units that perform one or more of the steps, respectively), even if such one or more units are not explicitly described or illustrated. On the other hand, for example, when a specific apparatus is described based on one or more units, e.g., functional units, a corresponding method may include a step for performing the functionality of the one or more units (e.g., one step that performs the functionality of the one or more units, or multiple steps that each perform the functionality of one or more of the units), even if such one or more steps are not explicitly described or illustrated. Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless otherwise noted.
[0050] Video coding typically refers to the processing of a sequence of pictures to form a video or video sequence. Instead of the term "picture," the terms "frame" or "image" are sometimes used synonymously in the field of video coding. Video coding (or coding in general) has two parts: video encoding and video decoding. Video encoding is performed at the source side and typically involves processing the original video picture (e.g., by compression) to reduce the amount of data required to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and typically involves the reverse process compared to the encoder to reconstruct the video picture. Embodiments referring to "encoding" a video picture (or pictures in general) are understood to relate to "encoding" or "decoding" the video picture or respective video sequence. The combination of the encoding and decoding parts is also called a codec (coding and decoding).
[0051] In the case of lossless video coding, the original video picture can be reconstructed, i.e., the reconstructed video picture has the same quality as the original video picture (assuming there are no transmission or other data losses during storage or transmission). In the case of lossy video coding, further compression, e.g., by quantization, is performed to reduce the amount of data representing the video picture, which cannot be perfectly reconstructed at the decoder, i.e., the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.
[0052] Some video coding standards belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain with 2D transform coding to apply quantization in the transform domain). Each picture in a video sequence is typically partitioned into a set of non-overlapping blocks, and coding is typically performed at the block level. In other words, in an encoder, video is typically processed, i.e., encoded, at the block (video block) level. This is done, for example, by generating a predictive block using spatial (intra-picture) and / or temporal (inter-picture) prediction, subtracting the predictive block from the current block (the block currently being / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compression). In a decoder, the reverse process is applied to the encoded or compressed block to reconstruct the current block for representation. Additionally, the encoder replicates the decoder processing loop, so that both generate the same predictions (eg, intra- and inter-predictions) and / or reconstructions for subsequent processing, i.e., encoding, of blocks.
[0053] In the following embodiment of a video encoding system 10, a video encoder 20 and a video decoder 30 are described based on FIGS.
[0054] 1A is a schematic block diagram illustrating an example encoding system 10, e.g., video encoding system 10 (or encoding system 10 for short), that can utilize the techniques of the present application. A video encoder 20 (or encoder 20 for short) and a video decoder 30 (or decoder 30 for short) of video encoding system 10 represent example devices that can be configured to perform the techniques according to various examples described herein.
[0055] As shown in FIG. 1A, encoding system 10 includes a source device 12 configured to provide encoded picture data 21 to a destination device 14, for example, that decodes the encoded picture data 21.
[0056] The source device 12 comprises an encoder 20 and may additionally or optionally comprise a picture source 16 , a preprocessor (or pre-processing unit) 18 , for example a picture preprocessor 18 , and a communication interface or unit 22 .
[0057] Picture source 16 may comprise or be any kind of picture capture device, e.g., a camera for capturing real-world pictures, and / or any kind of picture generation device, e.g., a computer graphics processor for generating computer-animated pictures, or any kind of other device for obtaining and / or providing real-world pictures, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). Picture source may also be any kind of memory or storage for storing any of the above pictures.
[0058] To distinguish between the preprocessor 18 and the processing performed by the preprocessing unit 18, the picture or picture data 17 may be referred to as a raw picture or raw picture data 17.
[0059] The preprocessor 18 is configured to receive (raw) picture data 17 and perform preprocessing on the picture data 17 to obtain a preprocessed picture 19 or preprocessed picture data 19. The preprocessing performed by the preprocessor 18 may include, for example, cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise removal. It will be understood that the preprocessing unit 18 may be an optional component.
[0060] A video encoder 20 is configured to receive pre-processed picture data 19 and provide encoded picture data 21 (as described in further detail below, e.g., with reference to FIG. 2).
[0061] The communications interface 22 of the source device 12 may be configured to receive the encoded picture data 21 and transmit the encoded picture data 21 (or any further processed version thereof) over the communications channel 13 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0062] The destination device 14 has a decoder 30 (e.g., a video decoder 30) and may additionally or optionally have a communications interface or communications unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0063] The communications interface 28 of the destination device 14 is configured to receive the encoded picture data 21 (or a further processed version thereof), e.g., directly from the source device 12 or from any other source, e.g., a storage device, e.g., an encoded picture data storage device, and to provide the encoded picture data 21 to a decoder 30.
[0064] The communication interface 22 and the communication interface 28 may be configured to transmit or receive the encoded picture data 21 or the encoded data 21 via a direct communication link between the source device 12 and the destination device 14, e.g., a direct wired or wireless connection, or via any type of network, e.g., a wired or wireless network or any combination thereof, or any type of private and public network, or any type of combination thereof.
[0065] The communications interface 22 may be configured, for example, to package the encoded picture data 21 into a suitable format, e.g., packets, and / or process the encoded picture data using any type of transmission encoding or processing for transmission over a communications link or network.
[0066] The counterpart communication interface 28 of the communication interface 22 may be configured, for example, to receive the transmitted data and process the transmitted data using any type of corresponding transmission decoding or processing and / or unpackaging to obtain encoded picture data 21.
[0067] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrow for communication channel 13 pointing from source device 12 to destination device 14 in FIG. 1A, or as bidirectional communication interfaces, and may be configured to send and receive messages, e.g., to set up a connection, receive, acknowledge, and exchange messages, e.g., to set up a communication link and / or any other information related to data transmission, e.g., encoded picture data transmission.
[0068] The decoder 30 is configured to receive the encoded picture data 21 and provide decoded picture data 31 or decoded pictures 31 (further details are described below, e.g., with reference to Figure 3 or Figure 5).
[0069] The post-processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also called reconstructed picture data), e.g., the decoded picture 31, to obtain post-processed picture data 33, e.g., the post-processed picture 33. The post-processing performed by the post-processing unit 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color correction, cropping, or resampling, or any other processing to prepare the decoded picture data 31 for display, e.g., by a display device 34.
[0070] The display device 34 of the destination device 14 is configured to receive the post-processed picture data 33 for displaying the picture, e.g., to a user or viewer. The display device 34 may be or include any type of display for presenting the reconstructed picture, e.g., an integrated or external display or monitor. The display may include, for example, a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.
[0071] 1A depicts source device 12 and destination device 14 as separate devices, an embodiment of the devices may include both or both functionality: source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such an embodiment, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software, or by separate hardware and / or software, or any combination thereof.
[0072] As will be apparent to those skilled in the art based on the above description, the functionality of different units or the presence and (exact) division of functions within source device 12 and / or destination device 14 as shown in FIG. 1A may vary depending on the actual device and application.
[0073] Encoder 20 (e.g., video encoder 20), or decoder 30 (e.g., video decoder 30), or both encoder 20 and decoder 30 may be implemented via processing circuitry such as that shown in FIG. 1B, e.g., one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, hardware, dedicated video coding, or any combination thereof. Encoder 20 may be implemented via processing circuitry 46 to embody various modules discussed with respect to encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. Decoder 30 may be implemented via processing circuitry 46 to embody various modules discussed with respect to decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations, as described below, as shown in FIG. 5. If the techniques are implemented partially in software, a device may store instructions for the software on a suitable non-transitory computer-readable storage medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Either video encoder 20 or video decoder 30 may be integrated into a single device as part of a combined encoder / decoder (codec), for example, as shown in FIG. 1B.
[0074] Source device 12 and destination device 14 may comprise any of a wide range of devices, including any type of handheld or fixed device, such as a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or content delivery server), a broadcast receiver device, a broadcast transmitter device, etc., and may use no operating system or any type of operating system. In some cases, source device 12 and destination device 14 may be equipped for wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.
[0075] In some cases, the video encoding system 10 shown in FIG. 1A is merely an example, and the present technology may be applied to video encoding scenarios (e.g., video encoding or video decoding) that do not necessarily involve data communication between an encoding device and a decoding device. In other examples, data may be retrieved from local memory, streamed over a network, etc. A video encoding device may encode data and store it in memory, and / or a video decoding device may retrieve data from memory and decode it. In some examples, encoding and decoding are performed by devices that do not communicate with each other but simply encode data to memory and / or retrieve data from memory and decode it.
[0076] For ease of description, embodiments of the present invention are described herein with reference to, for example, High Efficiency Video Coding (HEVC) or Versatile Video Coding (VVC) reference software, the next-generation video coding standards developed by the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Moving Picture Experts Group (MPEG) Joint Collaboration Team on Video Coding (JCT-VC). Those skilled in the art will understand that embodiments of the present invention are not limited to HEVC or VVC.
[0077] Encoders and encoding methods FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the techniques of the present application. In the example of FIG. 2, the video encoder 20 includes an input 201 (or input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy encoding unit 270, and an output 272 (or output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a partitioning unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 shown in FIG. 2 may also be referred to as a hybrid video encoder or a video encoder based on a hybrid video codec.
[0078] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be referred to as forming a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may be referred to as forming a backward signal path of the video encoder 20. The backward signal path of the video encoder 20 corresponds to the signal path of a decoder (see video decoder 30 in FIG. 3). The inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may also be referred to as forming an “embedded decoder” of the video encoder 20.
[0079] Picture and Picture Partitioning (Picture and Block) Encoder 20 may be configured to receive, for example, via input 201, a picture 17 (or picture data 17), e.g., a picture of a video or a sequence of pictures forming a video sequence. The received picture or picture data may be a preprocessed picture 19 (or preprocessed picture data 19). For simplicity, the following description refers to picture 17. Picture 17 may also be referred to as a current picture or a picture to be coded (particularly in video coding, to distinguish the current picture from other pictures, e.g., previously encoded and / or decoded pictures of the same video sequence, i.e., a video sequence that also includes the current picture).
[0080] A (digital) picture is, or can be considered as, a two-dimensional array or matrix of intensity-valued samples. The samples in the array may be called pixels (short for picture element) or picture elements. The number of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. For color representation, three color components are typically used; that is, a picture is represented by or can contain three sample arrays. In an RGB format or color space, a picture contains corresponding red, green, and blue sample arrays. However, in video coding, each pixel is typically represented in a luminance and chrominance format or color space, such as YCbCr, which contains a luminance component denoted Y (sometimes L is used instead) and two chrominance components denoted Cb and Cr. The luminance (or luma for short) component Y represents brightness or gray-level intensity (e.g., as in a grayscale picture), while the two chrominance (or chroma for short) components Cb and Cr represent chromaticity or color information components. Thus, a picture in YCbCr format contains a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). A picture in RGB format can be converted or translated to YCbCr format, and vice versa. This process is also known as color conversion or translation. If a picture is monochrome, it may contain only a luminance sample array. Thus, a picture can be, for example, an array of luma samples in monochrome format, or two corresponding arrays of luma samples and chroma samples in 4:2:0, 4:2:2, and 4:4:4 color formats.
[0081] Embodiments of video encoder 20 may include a picture partitioning unit (not shown in FIG. 2) configured to partition picture 17 into multiple (typically non-overlapping) picture blocks 203. These blocks may also be referred to as root blocks, macroblocks (H.264 / AVC) or coding tree blocks (CTBs) or coding tree units (CTUs) (H.265 / HEVC and VVC). The picture partitioning unit may be configured to use the same block size and a corresponding grid defining the block size for all pictures of a video sequence, or to vary the block size between pictures or between subsets or groups of pictures, and to divide each picture into corresponding blocks.
[0082] In further embodiments, the video encoder may be configured to directly receive blocks 203 of picture 17, e.g., one, some, or all of the blocks forming picture 17. Picture blocks 203 may also be referred to as current picture blocks or picture blocks to be encoded.
[0083] Similar to picture 17, picture block 203 can also be considered to be, or be a two-dimensional array or matrix of samples having intensity values (sample values), albeit with smaller dimensions than picture 17. In other words, block 203 can include, for example, one sample array (e.g., a luma array in the case of a monochrome picture 17 or a luma or chroma array in the case of a color picture), or three sample arrays (e.g., a luma array and two chroma arrays in the case of a color picture 17), or any other number and / or type of arrays depending on the applied color format. The number of samples in the horizontal and vertical directions (or axes) of block 203 defines the size of block 203. Thus, a block can be, for example, an M×N (M columns by N rows) array of samples or an M×N array of transform coefficients.
[0084] An embodiment of video encoder 20 such as that shown in FIG. 2 may be configured to encode picture 17 block by block, eg, encoding and prediction is performed block by block 203.
[0085] 2 may be further configured to partition and / or encode pictures using slices (also referred to as video slices), where a picture may be divided into one or more (typically non-overlapping) slices and encoded using such one or more slices, each of which may contain one or more blocks (e.g., CTUs) and one or more groups of blocks (e.g., tiles (H.265 / HEVC and VVC) or bricks (VVC)).
[0086] 2 may be further configured to partition and / or encode a picture using slices / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be divided into one or more slices / tile groups (typically non-overlapping) and encoded using such one or more slices / tile groups, each of which may include, for example, one or more blocks (e.g., CTUs) or one or more tiles, and each tile may be, for example, rectangular in shape and may include one or more blocks (e.g., CTUs), e.g., full or partial blocks.
[0087] Residual calculation The residual calculation unit 204 may be configured to calculate a residual block 205 (also referred to as residual 205) based on the picture block 203 and the prediction block 265 (further details about the prediction block 265 will be described below), for example by subtracting sample values of the prediction block 265 from sample values of the picture block 203 sample by sample (pixel by pixel) to obtain the residual block 205 in the sample domain.
[0088] conversion The transform processing unit 206 may be configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and represent the residual block 205 in the transform domain.
[0089] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified for H.265 / HEVC. Compared to an orthogonal DCT transform, such an integer approximation is typically scaled by a factor. To preserve the norm of the residual blocks processed by the forward and inverse transforms, an additional scaling factor is applied as part of the transform process. The scaling factor is typically selected based on certain constraints, such as the scaling factor being a power of two due to shift operations, the bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. A specific scaling factor may be specified, for example, for the inverse transform, e.g., by the inverse transform processing unit 212 (and the corresponding inverse transform, e.g., by the inverse transform processing unit 312 in the video decoder 30), and a corresponding scaling factor for the forward transform, e.g., by the transform processing unit 206 in the encoder 20, may be specified accordingly.
[0090] An embodiment of video encoder 20 (and, in particular, transform processing unit 206) may be configured to output transform parameters, e.g., one or more transform types, e.g., directly or encoded or compressed via entropy encoding unit 270, so that, for example, video decoder 30 may receive and use the transform parameters for decoding.
[0091] Quantization The quantization unit 208 may be configured to quantize the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized coefficients 209. The quantized coefficients 209 may also be referred to as quantized transform coefficients 209 or quantized residual coefficients 209.
[0092] The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting the quantization parameter (QP). For example, for scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The applicable quantization step size may be indicated by the quantization parameter (QP). The quantization parameter may, for example, be an index into a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to finer quantization (small quantization step size) and a large quantization parameter may correspond to coarser quantization (large quantization step size), or vice versa. Quantization may involve division by a quantization step size, and corresponding inverse quantization, e.g., by the inverse quantization unit 210, may involve multiplication by the quantization step size. Some standards, e.g., HEVC, implementations may be configured to use a quantization parameter to determine the quantization step size. Generally, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of a formula involving division. Additional scaling factors may be introduced for quantization and dequantization to restore the norm of the residual block, which may be modified due to the scaling used in the fixed-point approximation of the formula for the quantization parameter and the quantization step size. In one example implementation, the scaling of the inverse transform and dequantization may be combined. Alternatively, customized quantization tables may be used and signaled, e.g., in the bitstream, from the encoder to the decoder. Quantization is a lossy operation, and the loss increases with increasing quantization step size.
[0093] Embodiments of video encoder 20 (and, in particular, quantization unit 208) may be configured to output a quantization parameter (QP), e.g., directly or encoded via entropy encoding unit 270, so that, for example, video decoder 30 can receive and apply the quantization parameter for decoding.
[0094] inverse quantization Inverse quantization unit 210 is configured to apply the inverse quantization of quantization unit 208 to the quantized coefficients, e.g., by applying the inverse of the quantization scheme applied by quantization unit 208, based on or using the same quantization step size as quantization unit 208, to obtain dequantized coefficients 211. The dequantized coefficients 211 may also be referred to as dequantized residual coefficients 211 and correspond to transform coefficients 207, although they are typically not identical to the transform coefficients due to loss due to quantization.
[0095] Inverse transformation The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) or other inverse transform, to obtain a reconstructed residual block 213 (or corresponding dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.
[0096] Reconstruction The reconstruction unit 214 (e.g., adder or summer 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, for example, by adding the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265 sample by sample.
[0097] filtering The loop filter unit 220 (or “loop filter” 220 for short) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or in general, to filter the reconstructed samples to obtain filtered samples. The loop filter unit is configured, for example, to smooth pixel transitions or otherwise improve video quality. The loop filter unit 220 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, such as an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In one example, the loop filter unit 220 may include a deblocking filter, an SAO filter, and an ALF filter. The order of the filtering processes may be deblocking filter, SAO, and ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., an adaptive in-loop shaper) is added. This process is performed before deblocking. In another example, the deblocking filter process may also be applied to internal sub-block edges, such as affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra sub-partition (ISP) edges.
[0098] To effectively remove blocking artifacts that occur for large "blocks," Versatile Video Coding (VVC) uses a longer tap deblocking filter. The term "block" is used here in a very general manner and may refer to a "transform block (TB), a prediction block (PB), or a coding unit (CU)." The longer tap filter for the luma component modifies up to seven samples for each adjacent sample line perpendicular to the edge and is applied to blocks whose size in the deblocking direction is 32 samples or greater. That is, for vertical edges, the block width should be 32 samples or greater, and for horizontal edges, the block height should be 32 samples or greater.
[0099] The longer tap filter for the chroma components is applied for chroma blocks when both chroma blocks adjacent to a given edge have a size of 8 samples or more, modifying up to 3 samples on each side of the edge. Thus, for a vertical edge, the block width of both chroma blocks adjacent to the edge should be 8 samples or more, and for a horizontal edge, the block height of both blocks adjacent to the edge should be 8 samples or more.
[0100] The text of the VVC6.0 unblocking specification is attached below.
[0101] Unblocking Filter Process 8.8.3.1 General The input to this process is the reconstructed picture before deblocking, i.e., the array recPicture L and the array recPicture if ChromaArrayType is not equal to 0 Cb and recPicture Cr is.
[0102] The output of this process is the modified reconstructed picture after deblocking, i.e., the array recPicture L and the array recPicture if ChromaArrayType is not equal to 0 Cb and recPicture Cr is.
[0103] The vertical edges in the picture are filtered first. Then, the horizontal edges in the picture are filtered using the samples modified by the vertical edge filtering process as input. The vertical and horizontal edges in the CTBs of each CTU are processed separately for each coding unit. The vertical edges of the coding blocks in a coding unit are filtered starting from the left edge of the coding block and proceeding in geometric order to the right edge of the coding block. The horizontal edges of the coding blocks in a coding unit are filtered starting from the top edge of the coding block and proceeding in geometric order to the bottom edge of the coding block. NOTE - Although the filtering process is specified per picture in this specification, the filtering process can be implemented per coding unit with equivalent results, provided the decoder takes into account the ordering of processing dependencies to produce the same output values.
[0104] The deblocking filter process is applied to all coded sub-block edges and transform block edges of the picture, except for the following types of edges: edges on the picture borders, edges that coincide with the boundaries of subpictures with loop_filter_across_subpic_enabled_flag[SubPicIdx] equal to 0, edges that coincide with the virtual boundaries of the picture when pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1, edges that coincide with brick boundaries when loop_filter_across_bricks_enabled_flag is equal to 0, Edges that coincide with slice boundaries when loop_filter_across_slices_enabled_flag is equal to 0, edges that coincide with the top or left boundary of a slice with slice_deblocking_filter_disabled_flag equal to 1, edges in slices with slice_deblocking_filter_disabled_flag equal to 1, Edges that do not correspond to 4x4 sample grid boundaries of the luma component, Edges that do not correspond to 8x8 sample grid boundaries for chrominance components, Edges in the luma component with intra_bdpcm_flag equal to 1 on both sides of the edge, The edges of a chroma sub-block that are not edges of the associated transform unit.
[0105] The edge type, vertical or horizontal, is represented by the variable edgeType, specified in Table 8-17. [Table 1]
[0106] If slice_deblocking_filter_disabled_flag for the current slice is equal to 0, the following applies: · The variable treeType is set equal to DUAL_TREE_LUMA. Vertical edges are filtered by invoking the deblocking filter process in one direction as specified in section 8.8.3.2. The variable treeType and the reconstructed picture before deblocking, i.e., the array recPicture Land the variable edgeType set equal to EDGE_VER are inputs, and the modified reconstructed picture after deblocking, i.e., the array recPicture L is the output. Horizontal edges are filtered by invoking the deblocking filter process in one direction as specified in section 8.8.3.2. The variable treeType and the modified reconstructed picture after deblocking, i.e., the array recPicture L and the variable edgeType set equal to EDGE_HOR are inputs, and the modified reconstructed picture after deblocking, i.e., the array recPicture L is the output. If ChromaArrayType is not equal to 0, the following applies: The variable treeType is set equal to DUAL_TREE_CHROMA Vertical edges are filtered by invoking the deblocking filter process in one direction as specified in section 8.8.3.2. The variable treeType and the reconstructed picture before deblocking, i.e., the array recPicture Cb and recPicture Cr and the variable edgeType set equal to EDGE_VER are inputs, and the modified reconstructed picture after deblocking, i.e., the array recPicture Cb and recPicture Cr is the output. Horizontal edges are filtered by invoking the deblocking filter process in one direction as specified in section 8.8.3.2. The variable treeType and the modified reconstructed picture before deblocking, i.e., the array recPicture Cb and recPicture Crand the variable edgeType set equal to EDGE_HOR are inputs, and the modified reconstructed picture after deblocking, i.e., the array recPicture Cb and recPicture Cr is the output.
[0107] 8.8.3.2 Unidirectional Unblocking Filter Process The inputs to this process are: The variable treeType, which specifies whether the luma (DUAL_TREE_LUMA) or chroma components (DUAL_TREE_CHROMA) are currently being processed, If treeType is equal to DUAL_TREE_LUMA, the reconstructed image before deblocking, i.e., the array recPicture L , If ChromaArrayType is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA, the array recPicture Cb and recPicture Cr , · The variable edgeType specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered.
[0108] The output of this process is the corrected reconstructed image after deblocking, i.e.: If treeType is equal to DUAL_TREE_LUMA, the array recPicture L , If ChromaArrayType is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA, the array recPicture Cb and recPicture Cr .
[0109] The variables firstCompIdx and lastCompIdx are derived as follows: firstCompIdx=(treeType==DUAL_TREE_CHROMA) ? 1:0 (8-1022) lastCompIdx=(treeType==DUAL_TREE_LUMA || ChromaArrayType==0) ? 0:2 (8-1023)
[0110] For each coding unit and each coding block per color component of the coding unit indicated by color component index cIdx in the range from firstCompIdx to lastCompIdx (inclusive), using the coding block width nCbW, coding block height nCbH and the position (xCb, yCb) of the top-left sample of the coding block, if cIdx is equal to 0, or if cIdx is not equal to 0 and edgeType is equal to EDGE_VER and xCb%8 is equal to 0, or if cIdx is not equal to 0 and edgeType is equal to EDGE_HOR and yCb%8 is equal to 0, edges are filtered by the following ordered steps:
[0111] 1. The variable filterEdgeFlag is derived as follows: If edgeType is equal to EDGE_VER and one or more of the following conditions are true, filterEdgeFlag is set equal to 0: The left boundary of the current coding block is the left boundary of the picture. The left boundary of the current coding block is the left or right boundary of a subpicture and loop_filter_across_subpic_enabled_flag[SubPicIdx] is equal to 0. The left boundary of the current coding block is the left boundary of a brick and loop_filter_across_bricks_enabled_flag is equal to 0. The left boundary of the current coding block is the left boundary of the slice and loop_filter_across_slices_enabled_flag is equal to 0. The left boundary of the current coding block is one of the vertical virtual boundaries of the picture and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1. Otherwise, if edgeType is equal to EDGE_HOR and one or more of the following conditions are true, the variable filterEdgeFlag is set equal to 0: The top boundary of the current luma coding block is the top boundary of the picture. · The upper boundary of the current coding block is the upper or lower boundary of a subpicture and loop_filter_across_subpic_enabled_flag[SubPicIdx] is equal to 0. The upper boundary of the current coding block is the upper boundary of a brick and loop_filter_across_bricks_enabled_flag is equal to 0. The upper boundary of the current coding block is the upper boundary of the slice and loop_filter_across_slices_enabled_flag is equal to 0. The upper boundary of the current coding block is one of the horizontal virtual boundaries of the picture and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1. Otherwise, filterEdgeFlag is set equal to 1.
[0112] 2. All elements of the two-dimensional (nCbW) by (nCbH) arrays edgeFlags, maxFilterLengthQs, and maxFilterlengthPs are initialized to be equal to zero.
[0113] The transform block boundary derivation process specified in Section 3.8.8.3.3 is invoked on the inputs: the position (xCb, yCb), coding block width nCbW, coding block height nCbH, variable cIdx, variable FilterEdgeFlag, array edgeFlags, maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs, and variable edgeType; and the outputs: the modified array edgeFlags, and the modified maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs.
[0114] 4. If cIdx is equal to 0, the coding sub-block boundary derivation process specified in Section 8.8.3.4 is invoked. The inputs are the position (xCb, yCb), coding block width nCbW, coding block height nCbH, array edgeFlags, maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs, and variable edgeType, and the outputs are the modified array edgeFlags and modified maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs.
[0115] 5. The picture sample array recPicture is derived as follows: If cIdx is equal to 0, recPicture is the reconstructed luma picture sample array before deblocking. L is set equal to Otherwise, if cIdx is equal to 1, recPicture is the reconstructed chroma picture sample array before deblocking. Cb is set equal to Otherwise (cIdx is equal to 2), recPicture is the reconstructed chroma picture sample array before deblocking. Cr is set equal to
[0116] The boundary filtering strength derivation process specified in Section 6.8.8.3.5 is invoked on the picture sample array recPicture, the luma position (xCb, yCb), the coding block width nCbW, the coding block height nCbH, the variable edgeType, the variable cIdx, and the array edgeFlags, and the (nCbW) by (nCbH) array bS is the output.
[0117] The edge filtering process in one direction is invoked for the coding block as specified in section 7.8.8.3.6, taking as input the variable edgeType, the variable cIdx, the reconstructed picture before deblocking recPicture, the position (xCb, yCb), the coding block width nCbW, the coding block height nCbH, the array bS, maxFilterLengthPs, and maxFilterLengthQs, and outputting the modified reconstructed picture recPicture.
[0118] 8.8.3.3 Transformation Block Boundary Derivation Process The inputs to this process are: Position (xCb, yCb) that specifies the top-left sample of the current coding block relative to the top-left sample of the current picture The variable nCbW, which specifies the width of the current coding block, The variable nCbH specifies the height of the current coding block, The variable cIdx, which specifies the color component of the current coding block, · variable filterEdgeFlag, A two-dimensional (nCbW) x (nCbH) array edgeFlags, · Two-dimensional (nCbW) × (nCbH) arrays maxFilterLengthQs and maxFilterLengthPs, · The variable edgeType specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered.
[0119] The output of this process is: A modified two-dimensional (nCbW) x (nCbH) array edgeFlags, · Modified two-dimensional (nCbW) x (nCbH) arrays maxFilterLengthQs and maxFilterLengthPs.
[0120] Depending on the edgeType, the arrays edgeFlags, maxFilterLengthPs and maxFilterLengthQs are derived as follows: The variable gridSize is set as follows: gridSize=cIdx==0 ? 4:8 (8-1024) If edgeType is equal to EDGE_VER, the following applies: The variable numEdges is set equal to Max(1,nCbW / gridSize). For xEdge=0…numEdges-1 and y=0…nCbH-1, the following applies: The horizontal position x within the current coding block is set equal to xEdge*gridSize. The value of edgeFlags[x][y] is derived as follows: · If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and (xCb+x) is equal to PpsVirtualBoundariesPox[n] for any n=0...pps_num_ver_virtual_boundaries-1, then edgeFlags[x][y] is set equal to 0. Otherwise, if x is equal to 0, edgeFlags[x][y] is set equal to filterEdgeFlag. Otherwise, if the position (xCb+x, yCb+y) is on a transform block edge, edgeFlags[x][y] is set equal to 1. If edgeFlags[x][y] is equal to 1, the following applies: If cIdx is equal to 0, the following applies: The value of maxFilterLengthQs[x][y] is derived as follows: If the width in luma samples of the transform block at luma position (xCb+x, yCb+y) is less than or equal to 4, or the width in luma samples of the transform block at luma position (xCb+x-1, yCb+y) is less than or equal to 4, then maxFilterLengthQs[x][y] is set equal to 1. Otherwise, if the luma sample width of the transform block at luma position (xCb+x, yCb+y) is 32 or greater, then maxFilterLengthQs[x][y] is set equal to 7. Otherwise, maxFilterLengthQs[x][y] is set equal to 3. The value of maxFilterLengthPs[x][y] is derived as follows: If the width in luma samples of the transform block at luma position (xCb+x, yCb+y) is less than or equal to 4, or if the width in luma samples of the transform block at luma position (xCb+x-1, yCb+y) is less than or equal to 4, then maxFilterLengthPs[x][y] is set equal to 1. Otherwise, if the width in luma samples of the transform block at luma position (xCb+x-1, yCb+y) is 32 or greater, then maxFilterLengthPs[x][y] is set equal to 7. Otherwise, maxFilterLengthPs[x][y] is set equal to 3. Otherwise (cIdx is not equal to 0), the values of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are derived as follows: If the widths in chroma samples of the transform blocks at chroma position (xCb+x, yCb+y) and chroma position (xCb+x-1, yCb+y) are both 8 or more, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set to 3. Otherwise, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set to 1. Otherwise (edgeType equals EDGE_HOR), the following applies: The variable numEdges is set equal to Max(1,nCbH / gridSize). For yEdge=0…numEdges-1 and x=0…nCbW-1, the following applies: The vertical position y within the current coding block is set equal to yEdge*gridSize. The value of edgeFlags[x][y] is derived as follows: · If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and (yCb+y) is equal to PpsVirtualBoundariesPosY[n] for any n=0...pps_num_hor_virtual_boundaries-1, then edgeFlags[x][y] is set equal to 0. Otherwise, if y is equal to 0, edgeFlags[x][y] is set equal to filterEdgeFlag. Otherwise, if the position (xCb+x, yCb+y) is on a transform block edge, edgeFlags[x][y] is set equal to 1. If edgeFlags[x][y] is equal to 1, the following applies: If cIdx is equal to 0, the following applies: The value of maxFilterLengthQs[x][y] is derived as follows: If the height in luma samples of the transform block at luma position (xCb+x, yCb+y) is less than or equal to 4, or the height in luma samples of the transform block at luma position (xCb+x, yCb+y-1) is less than or equal to 4, then maxFilterLengthQs[x][y] is set equal to 1. Otherwise, if the luma sample height of the transform block at luma position (xCb+x, yCb+y) is greater than or equal to 32, then maxFilterLengthQs[x][y] is set equal to 7. Otherwise, maxFilterLengthQs[x][y] is set equal to 3. The value of maxFilterLengthPs[x][y] is derived as follows: If the height in luma samples of the transform block at luma position (xCb+x, yCb+y) is less than or equal to 4, or the height in luma samples of the transform block at luma position (xCb+x, yCb+y-1) is less than or equal to 4, then maxFilterLengthPs[x][y] is set equal to 1. Otherwise, if the height in luma samples of the transform block at luma position (xCb+x, yCb+y-1) is 32 or more, maxFilterLengthPs[x][y] is set to 7. Otherwise, maxFilterLengthPs[x][y] is set equal to 3. Otherwise (cIdx is not equal to 0), the values of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are derived as follows: maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set equal to 3 if all of the following conditions are met: The height in chroma samples of the transform blocks at chroma position (xCb+x, yCb+y) and chroma position (xCb+x, yCb+y-1) are both 8 or more. (yCb+y)%CtbHeightC is greater than 0, i.e., no horizontal edge overlaps the upper chroma CTB border. Otherwise, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set equal to 1.
[0121] 8.8.3.4 Coding Sub-Block Boundary Derivation Process The inputs to this process are: A position (xCb, yCb) specifying the top left sample of the current coding block relative to the top left sample of the current picture, The variable nCbW, which specifies the width of the current coding block, The variable nCbH specifies the height of the current coding block, A two-dimensional (nCbW) x (nCbH) array edgeFlags, Two-dimensional (nCbW) × (nCbH) arrays maxFilterLengthQs and maxFilterLengthPs, · The variable edgeType specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered.
[0122] The output of this process is: A modified two-dimensional (nCbW) x (nCbH) array edgeFlags, · Modified two-dimensional (nCbW) x (nCbH) arrays maxFilterLengthQs and maxFilterLengthPs.
[0123] The number of coding sub-blocks in the horizontal direction numSbX and vertical direction numSbY is derived as follows: If inter_affine_flag[xCb][yCb] is equal to 1 or merge_subblock_flag[xCb][yCb] is equal to 1, then numSbX and numSbY are set equal to NumSbX[xCb][yCb] and NumSbY[xCb][yCb], respectively. Otherwise, numSbX and numSbY are both set equal to 1. Depending on the value of edgeType, the following applies: If edgeType is equal to EDGE_VER, the following applies: · The variable sbW is set equal to Max(8,nCbW / numSbX). The array edgeTbFlags is set equal to edgeFlags. For xEdge=0...min((nCbW / 8)-1,numSbX-1), y=0...nCbH-1: The horizontal position x within the current coding block is set equal to xEdge*sbW. The value of edgeFlags[x][y] is derived as follows: If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and x is equal to PpsVirtualBoundariesPoxX[n] for any n = 0…pps_num_ver_virtual_boundaries-1, the following applies: edgeFlags[x][y]=0 edgeFlags[x][y]=0 (8-1025) Otherwise, the following applies: edgeFlags[x][y]=1 (8-1026) If edgeFlags[x][y] is equal to 1, the values of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows: If x is equal to 0, the following applies: If numSbX is greater than 1, the following applies: maxFilterLengthQs[x][y]=Min(5,maxFilterLengthQs[x][y]) (8-1027) If inter_affine_flag[xCb-1][yCb] is equal to 1 or merge_subblock_flag[xCb-1][yCb] is equal to 1, the following applies: maxFilterLengthPs[x][y]=Min(5,maxFilterLengthPs[x][y]) (8-1028) Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies: maxFilterLengthPs[x][y]=Min(5,maxFilterLengthPs[x][y]) (8-1029) maxFilterLengthQs[x][y]=Min(5,maxFilterLengthQs[x][y]) (8-1030) Otherwise, the following conditions: (x+4) is greater than or equal to nCbW, edgeTbFlags[x-4][y] is equal to 1, edgeTbFlags[x+4][y] is equal to 1, If one or more of the following is true, then the following applies: maxFilterLengthPs[x][y]=1 (8-1031) maxFilterLengthQs[x][y]=1 (8-1032) Otherwise, the following conditions: xEdge is equal to 1, xEdge is equal to (nCbW / 8)-1, edgeTbFlags[x-sbW][y] is equal to 1, edgeTbFlags[x+sbW][y] is equal to 1, If one or more of the following is true, then the following applies: maxFilterLengthPs[x][y]=2 (8-1033) maxFilterLengthQs[x][y]=2 (8-1034) Otherwise, the following applies: maxFilterLengthPs[x][y]=3 (8-1035) maxFilterLengthQs[x][y]=3 (8-1036) Otherwise, if edgeType is equal to EDGE_HOR, the following applies: · The variable sbH is set equal to Max(8,nCbH / numSbY). The array edgeTbFlags is set equal to edgeFlags. For yEdge=0...min((nCbH / 8)-1,numSbY-1), x=0...nCbW-1: The vertical position y within the current coding block is set equal to yEdge*sbH. The value of edgeFlags[x][y] is derived as follows: If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and y is equal to PpsVirtualBoundariesPosY[n] for any n=0…pps_num_hor_virtual_boundaries-1, the following applies: edgeFlags[x][y]=0 (8-1037) Otherwise, the following applies: edgeFlags[x][y]=1 (8-1038) If edgeFlags[x][y] is equal to 1, the values of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows: If y is equal to 0 and edgeFlags[x][y] is equal to 1, the following applies: If numSbY is greater than 1, the following applies: maxFilterLengthQs[x][y]=Min(5,maxFilterLengthQs[x][y]) (8-1039) If inter_affine_flag[xCb][yCb-1] is equal to 1 or merge_subblock_flag[xCb][yCb-1] is equal to 1, the following applies: maxFilterLengthPs[x][y]=Min(5,maxFilterLengthPs[x][y]) (8-1040) Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies: maxFilterLengthPs[x][y]=Min(5,maxFilterLengthPs[x][y]) (8-1041) maxFilterLengthQs[x][y]=Min(5,maxFilterLengthQs[x][y]) (8-1042) Otherwise, the following conditions: ·(y+4) is equal to or greater than nCbH, edgeTbFlags[x][y-4] is equal to 1, edgeTbFlags[x][y+4] is equal to 1, If one or more of the following is true, then the following applies: maxFilterLengthPs[x][y]=1 (8-1045) maxFilterLengthQs[x][y]=1 (8-1046) Otherwise, the following conditions: yEdge is equal to 1, yEdge is equal to (nCbH / 8)-1, edgeTbFlags[x][y-sbH] is equal to 1, edgeTbFlags[x][y+sbH] is equal to 1, If one or more of the following is true, then the following applies: maxFilterLengthPs[x][y]=2 (8-1043) maxFilterLengthQs[x][y]=2 (8-1044) Otherwise, the following applies: maxFilterLengthPs[x][y]=3 (8-1047) maxFilterLengthQs[x][y]=3 (8-1048)
[0124] 8.8.3.5 Boundary Filtering Strength Derivation Process The inputs to this process are: Picture sample array recPicture, Position (xCb, yCb) that specifies the top-left sample of the current coding block relative to the top-left sample of the current picture The variable nCbW, which specifies the width of the current coding block, The variable nCbH specifies the height of the current coding block, The variable edgeType, which specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered, The variable cIdx, which specifies the color component of the current coding block, · edgeFlags for a two-dimensional (nCbW) x (nCbH) array.
[0125] The output of this process is a two-dimensional (nCbW) x (nCbH) array bS that specifies the boundary filtering strength.
[0126] Variables xD i , yD j , xN, yN are derived as follows: The variable gridSize is set as follows: gridSize=cIdx==0 ? 4:8 (8-1049) If edgeType is equal to EDGE_VER, xD i =(i*gridSize) (8-1050) yD j =cIdx==0 ? (j<<2):(j<<1) (8-1051) xN is set equal to Max(0,(nCbW / gridSize)-1) (8-1052) yN=cIdx==0 ? (nCbH / 4)-1:(nCbH / 2)-1 (8-1053) Otherwise (edgeType equals EDGE_HOR), xD i =cIdx==0 ? (i<<2):(i<<1) (8-1054) yD j =(j*gridSize) (8-1055) xN=cIdx==0 ? (nCbW / 4)-1:(nCbW / 2)-1 (8-1056) yN=Max(0,(nCbH / gridSize)-1) (8-1057)
[0127] xD for i=0...xN i and yD for j=0...yN j The following applies: edgeFlags[xD i ][yD j ] is equal to 0, the variable bS[xD i ][yD j ] is set equal to 0. Otherwise, the following applies: The sample values p0 and q0 are derived as follows: If edgeType is equal to EDGE_VER, p0 is recPicture[xCb+xD i -1][yCb+yD j ] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ]. Otherwise (edgeType is equal to EDGE_HOR), p0 is recPicture[xCb+xD i ][yCb+yD j -1], and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ]. Variable bS[xD i ][yD j ] is derived as follows: If cIdx is equal to 0 and both samples p0 and q0 are within a coding block with intra_bdpcm_flag equal to 1, then bS[xD i ][yD j ] is set equal to 0. Otherwise, if sample p0 or q0 is within a coding block of a coding unit coded in intra prediction mode, then bS[xD i ][yD j ] is set to 2. Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is within a coding block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set equal to 2. Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is within a transform block containing one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set equal to 1. Otherwise, if the block edge is also a transform block edge, cIdx is greater than 0, and sample p0 or q0 is within a transform unit with tu_joint_cbcr_residual_flag equal to 1, then bS[xD i ][yD j ] is set equal to 1. Otherwise, if the prediction mode of the coding sub-block containing sample p0 is different from the prediction mode of the coding sub-block containing sample q0 (i.e., one of the coding sub-blocks is coded in IBC prediction mode and the other is coded in inter prediction mode), then bS[xD i ][yD j ] is set equal to 1. Otherwise, if cIdx is equal to 0 and one or more of the following conditions are true, then bS[xD i ][yD j ] is set equal to 1: The coded sub-block containing sample p0 and the coded sub-block containing sample q0 are both coded with IBC prediction mode, and the absolute difference between the horizontal or vertical components of the block vectors used in the prediction of the two coded sub-blocks is greater than or equal to 8 in units of 1 / 16 luma samples. For the prediction of the coding sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the coding sub-block containing sample q0. NOTE 1 - The decision as to whether the reference pictures used for two coding sub-blocks are the same or different is based solely on which pictures are referenced, regardless of whether the prediction is formed using an index into reference picture list 0 or an index into reference picture list 1, and regardless of whether the index positions within the reference picture lists are different. NOTE 2 - The number of motion vectors used to predict the coding sub-block whose top-left sample covers (xSb, ySb) is equal to PredFlagL0[xSb][ySb]+PredFlagL1[xSb][ySb]. One motion vector is used to predict the coding sub-block containing sample p0, and one motion vector is used to predict the coding sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the used motion vectors is greater than or equal to 8 in units of 1 / 16 luma samples. Two motion vectors and two different reference pictures are used to predict the coding sub-block containing sample p0, two motion vectors for the same two reference pictures are used to predict the coding sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used in predicting the two coding sub-blocks for the same reference picture is greater than or equal to 8 in units of 1 / 16 luma samples. Two motion vectors with respect to the same reference picture are used to predict the coding sub-block containing sample p0, and two motion vectors with respect to the same reference picture are used to predict the coding sub-block containing sample q0, and both of the following conditions are true: The absolute difference between the horizontal or vertical components of list 0 motion vectors used in the prediction of two coded sub-blocks is greater than or equal to 8 in units of 1 / 16 luma samples, or the absolute difference between the horizontal or vertical components of list 1 motion vectors used in the prediction of two coded sub-blocks is greater than or equal to 8 in units of 1 / 16 luma samples. The absolute difference between the horizontal or vertical component of the list 0 motion vector used in predicting the coded sub-block containing sample p0 and the list 1 motion vector used in predicting the coded sub-block containing sample q0 is greater than or equal to 8 in units of 1 / 16 luma samples, or the absolute difference between the horizontal or vertical component of the list 1 motion vector used in predicting the coded sub-block containing sample p0 and the list 0 motion vector used in predicting the coded sub-block containing sample q0 is greater than or equal to 8 in units of 1 / 16 luma samples. Otherwise, the variable bS[xD i ][yD j ] is set to 0.
[0128] 8.8.3.6 Edge filtering in one direction The inputs to this process are: The variable edgeType, which specifies whether a vertical edge (EDGE_VER) or a horizontal edge (EDGE_HOR) is currently being processed, The variable cIdx that specifies the current color component, Reconstructed picture before deblocking, recPicture, A position (xCb, yCb) specifying the top left sample of the current coding block relative to the top left sample of the current picture, The variable nCbW, which specifies the width of the current coding block, The variable nCbH specifies the height of the current coding block, An array bS specifying the boundary strengths, · Arrays maxFilterLengthPs and maxFilterLengthQs.
[0129] The output of this process is the modified reconstructed picture recPicture after deblocking.
[0130] For the edge filtering process, the following is applied: The variable gridSize is set as follows: gridSize=cIdx==0 ? 4:8 (8-1058) The variables subW, subH, xN, and yN are derived as follows: subW=cIdx==0 ? 1:SubWidthC (8-1059) xN=edgeType==EDGE_VER ? Max(0,(nCbW / gridSize)-1):(nCbW / 4 / subW)-1 yN=edgeType==EDGE_VER ? (nCbH / 4 / subH)-1:Max(0,(nCbH / gridSize)-1) (8-1062) Variables xD k (k=0…xN) and variable yD m (m=0…yN) is derived as follows: xD k =edgeType==EDGE_VER ? (k*gridSize):(k<<(2 / subW)) (8-1063) yD m =edgeType==EDGE_VER ? (m<<(2 / subH)):(m*gridSize) (8-1064) ·k=0…xN xD k and yD for m=0...yN m The following applies: ·bS[xD k ][yD m] is greater than 0, the following ordered steps are applied: If cIdx is equal to 0, the filtering process for edges in the luma coding block of the current coding unit consists of the following ordered steps: The luma block edge decision process specified in Section 1.8.8.3.6.1 is invoked. The luma picture sample array recPicture, the luma coding block position (xCb, yCb), (xD k ,yD m ) the luma position of block (xBl,yBl), the edge direction edgeType, and the boundary filtering strength bS[xD k ][yD m ], maxFilterLengthPs[xD k ][yD m maxFilterLengthP and maxFilterLengthQs[xD k ][yD m The maximum filter length, maxFilterLengthQ, is set equal to the input, dE, dEp, dEq, the modified maximum filter lengths, maxFilterLengthP and maxFilterLengthQ, and the variable t C is the output. The block edge filtering process specified in Section 2.8.8.3.6.2 is invoked. Given the luma picture sample array recPicture, the luma coding block location (xCb, yCb), (xD k ,yD m ), the luma position of the block (xBl, yBl) set equal to edge direction edgeType, the decisions dE, dEp, dEq, the maximum filter lengths maxFilterLengthP and maxFilterLengthQ, and the variable t C is the input and the corrected luma picture sample array recPicture is the output. Otherwise (cIdx is not equal to 0), the filtering process for edges in the chroma coding block of the current coding unit specified by cIdx consists of the following ordered steps: 1. The variable cQpPicOffset is derived as follows: cQpPicOffset=cIdx==1 ? pps_cb_qp_offset:pps_cr_qp_offset (8-1065) The chroma block edge decision process specified in section 2.8.8.3.6.3 is invoked. The chroma picture sample array recPicture, the chroma coding block position (xCb, yCb), (xD k ,yD m ) the position of the chroma block (xBl, yBl), the edge direction edgeType, the variable cIdx, the variable cQpPicOffset, and the boundary filtering strength bS[xD k ][yD m ], and maxFilterLengthPs[xD k ][yD m ] is the input, and the modified variables maxFilterLengthCbCr and t C is the output. 3. If maxFilterLengthCbCr is greater than 0, the filtering process for chroma block edges specified in section 8.8.3.6.4 is invoked. The chroma picture sample array recPicture, the chroma coding block position (xCb, yCb), (xD k ,yD m ), the edge direction edgeType, the variable maxFilterLengthCbCr, and the variable t C is the input and the modified chroma picture sample array recPicture is the output.
[0131] 8.8.3.6.1 Luma Block Edge Decision Process The inputs to this process are: Picture sample array recPicture, A position (xCb, yCb) specifying the top left sample of the current coding block relative to the top left sample of the current picture, Position (xBl, yBl) specifying the top left sample of the current block relative to the top left sample of the current coding block, The variable edgeType, which specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered, · Variable bS, which specifies the boundary filtering strength, · The variable maxFilterLengthP, which specifies the maximum filter length, · The variable maxFilterLengthQ specifies the maximum filter length.
[0132] The output of this process is: Decision variables dE, dEp, dEq, Modified filter length variables maxFilterLengthP and maxFilterLengthQ, variable t C .
[0133] Sample value p at i=0...maxFilterLengthP, j=0...maxFilterLengthQ, and k=0 and 3 i,k and q j,k is derived as follows: If edgeType is equal to EDGE_VER, the following applies: q j,k =recPictureL[xCb+xBl+j][yCb+yBl+k] (8-1066) p i,k =recPictureL[xCb+xBl-i-1][yCb+yBl+k] (8-1067) Otherwise (edgeType equals EDGE_HOR), the following applies: q j,k=recPicture[xCb+xBl+k][yCb+yBl+j] (8-1068) p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1069)
[0134] The variable qpOffset is derived as follows: If sps_ladf_enabled_flag is equal to 1, the following applies: The reconstructed luma level variable lumaLevel is derived as follows: lumaLevel=((p 0,0 +p 0,3 +q 0,0 +q 0,3 )>>2) (8-1070) The variable qpOffset is set equal to sps_ladf_lowest_interval_qp_offset and is modified as follows: for (i=0; i <sps_num_ladf_intervals_minus2+1; i++) { if (lumaLevel>SpsLadfIntervalLowerBound[i+1]) qpOffset=sps_ladf_qp_offset[i] (8-1071) else break } Otherwise, qpOffset is set equal to 0.
[0135] Variable Qp Q and Qp P are sample q 0,0 and p 0,0 Qp of the coding unit containing the coding block containing Y / / where Qp Q and Qp P represent luma QP values, and in order to distinguish between the two luma QP values, the claims refer to them as Qp YQ and Qp YP / /
[0136] The variable qP is derived as follows: qP=((Qp Q +Qp P +1)>>1)+qpOffset (8-1072)
[0137] The value of the variable β' is determined as specified in Table 8-18 based on the quantization parameter Q, which is derived as follows: Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (8-1073) where slice_beta_offset_div2 is the offset of the sample q 0,0 is the value of the syntax element slice_beta_offset_div2 for the slice containing
[0138] The variable β is derived as follows: β=β'*(1<<(BitDepthY-8)) (8-1074)
[0139] variable t C The value of ' is determined as specified in Table 8-18 based on the quantization parameter Q, which is derived as follows: Q=Clip3(0,65,qP+2*(bS-1)+(slice_tc_offset_div2<<1)) (8-1075) where slice_tc_offset_div2 is the offset of the sample q 0,0 The value of the syntax element slice_tc_offset_div2 for the slice containing
[0140] The variable tC is derived as follows: t C =BitDepth Y <10 ? (tC'+2)>>(10-BitDepth Y ) : tC'*(1<<(BitDepthY-10)) (8-1076)
[0141] The following ordered steps are applied: 1. The variables dp0, dp3, dq0 and dq3 are derived as follows: dp0=Abs(p 2,0 -2*p 1,0 +p 0,0 ) (8-1077) dp3=Abs(p 2,3 -2*p 1,3 +p 0,3 ) (8-1078) dq0=Abs(q 2,0 -2*q 1,0 +q 0,0 ) (8-1079) dq3=Abs(q 2,3 -2*q 1,3 +q 0,3 ) (8-1080) 2. If both maxFilterLengthP and maxFilterLengthQ are greater than or equal to 3, the variables sp0, sq0, spq0, sp3, sq3, and spq3 are derived as follows: sp0=Abs(p 3,0 -p 0,0 ) (8-1081) sq0=Abs(q 0,0 -q 3,0 ) (8-1082) spq0=Abs(p 0,0 -q 0,0 ) (8-1083) sp3=Abs(p 3,3 -p 0,3 ) (8-1084) sq3=Abs(q 0,3 -q 3,3 ) (8-1085) spq3=Abs(p 0,3 -q 0,3 ) (8-1086) 3. The variables sidePisLargeBlk and sideQisLargeBlk are set to 0. 4. If maxFilterLengthP is greater than 3, sidePisLargeBlk is set to 1: 5. If maxFilterLengthQ is greater than 3, sideQisLargeBlk is set to 1: 6. If edgeType is equal to EDGE_HOR and (yCb+yBl)%CtbSizeY is equal to 0, then sidePisLargeBlk is set equal to 0. 7. The variables dSam0 and dSam3 are initialized to 0. 8. If sidePisLargeBlk or sideQisLargeBlk is greater than 0, the following applies: a. The variables dp0L, dp3L are derived and maxFilterLengthP is modified as follows: If sidePisLargeBlk is equal to 1, the following applies: dp0L=(dp0+Abs(p 5,0 -2*p 4,0 +p 3,0 )+1)>>1 (8-1087) dp3L=(dp3+Abs(p 5,3 -2*p 4,3 +p 3,3 )+1)>>1 (8-1088) Otherwise, the following applies: dp0L=dp0 (8-1089) dp3L=dp3 (8-1090) maxFilterLengthP=3 (8-1091) b. The variables dq0L and dq3L are derived as follows: If sideQisLargeBlk is equal to 1, the following applies: dq0L=(dq0+Abs(q 5,0 -2*q 4,0 +q 3,0 )+1)>>1 (8-1092) dq3L=(dq3+Abs(q 5,3 -2*q 4,3 +q 3,3 )+1)>>1 (8-1093) Otherwise, the following applies: dq0L=dq0 (8-1094) dq3L=dq3 (8-1095) c. The variables dpq0L, dpq3L, and dL are derived as follows: dpq0L=dp0L+dq0L (8-1096) dpq3L=dp3L+dq3L (8-1097) dL=dpq0L+dpq3L (8-1098) If d.dL is less than β, the following ordered steps are applied: i. The variable dpq is set to 2*dpq0L. ii. The variable sp is set equal to sp0, the variable sq is set equal to sq0, and the variable spq is set equal to spq0. iii. Variable p0p3q o and q3 are first initialized to 0 and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows: If sidePisLargeBlk is equal to 1, the following applies: p3=p 3,0 (8-1099) p0=p maxFilterLengthP,0 (8-1100) If sideQisLargeBlk is equal to 1, the following applies: q3=q 3,0 (8-1101) q0=q maxFilterLengthQ,0 (8-1102) iv. For sample location (xCb+xBl, yCb+yBl), the decision process for the luma sample specified in Section 8.8.3.6.5 is called. Sample values p0, p3, q0, and q3 are called. Variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t are called. C is the input, and the output is assigned to decision dSam0. v. The variable dpq is set to 2*dpq3L. vi. The variable sp is set equal to sp3, the variable sq is set equal to sq3, and the variable spq is set equal to spq3. vii. The variables p0, p3, q0, and q3 are first initialized to 0 and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows: If sidePisLargeBlk is equal to 1, the following applies: p3=p 3,3 (8-1103) p0=p maxFilterLengthP,3 (8-1104) If sideQisLargeBlk is equal to 1, the following applies: q3=q 3,3 (8-1105) q0=q maxFilterLengthQ,3 (8-1106) viii. If edgeType is equal to EDGE_VER for sample location (xCb+xBl, yCb+yBl+3), or edgeType is equal to EDGE_HOR for sample location (xCb+xBl+3, yCb+yBl), the decision process for luma samples specified in Section 8.8.3.6.5 is invoked. Sample values p0, p3, q0, q3, variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, t C is the input and the output is assigned to decision dSa3. 9. The variables dE, dEp, and dEq are derived as follows: If dSam0 and dSam3 are both equal to 1, then the variable dE is set equal to 3, dEp is set equal to 1, and dEq is set equal to 1. Otherwise, the following ordered steps apply: a. The variables dpq0, dpq3, dp, dq and d are derived as follows: dpq0=dp0+dq0 (8-1107) dpq3=dp3+dq3 (8-1108) dp=dp0+dp3 (8-1109) dq=dq0+dq3 (8-1110) d=dpq0+dpq3 (8-1111) b. The variables dE, dEp, dEq, sidePisLargeBlk, and sideQisLargeBlk are set to 0. If cd is less than β and both maxFilterLengthP and maxFilterLengthQ are greater than 2, the following ordered steps are applied: i. The variable dpq is set equal to 2*dpq0. ii. The variable sp is set equal to sp0, the variable sq is set equal to sq0, and the variable spq is set equal to spq0. iii. For sample location (xCb+xBl, yCb+yBl), the decision process for the luma sample specified in Section 8.8.3.6.5 is invoked with variables p0, p3, q0, q3, variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, t all set equal to 0. C is the input and the output is assigned to decision dSam0. iv. The variable dpq is set equal to 2*dpq3. v. The variable sp is set equal to sp3, the variable sq is set equal to sq3, and the variable spq is set equal to spq3. vi. If edgeType is equal to EDGE_VER for sample location (xCb+xBl, yCb+yBl+3), or if edgeType is equal to EDGE_HOR for sample location (xCb+xBl+3, yCb+yBl), the decision process for the sample specified in Section 8.8.3.6.5 is invoked with variables p0, p3, q0, q3, variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, t all set equal to 0. C is the input and the output is assigned to decision dSam3. If dd is less than β, the following ordered steps are applied: i. The variable dE is set equal to 1. ii. If dSam0 is equal to 1 and dSam3 is equal to 1, then the variable dE is set to 2. iii. If maxFilterLengthP is greater than 1, maxFilterLengthQ is greater than 1, and dp is less than (β+(β>>1))>>3, then the variable dEp is set equal to 1. iv. If maxFilterLengthP is greater than 1, maxFilterLengthQ is greater than 1, and dq is less than (β+(β>>1))>>3, then the variable dEq is set equal to 1.
[0142] [Table 2]
[0143] 8.8.3.6.2 Luma Block Edge Filtering Process The inputs to this process are: Picture sample array recPicture, A position (xCb, yCb) specifying the top left sample of the current coding block relative to the top left sample of the current picture, Position (xBl, yBl) specifying the top left sample of the current block relative to the top left sample of the current coding block, The variable edgeType, which specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered, Decision variables dE, dEp, dEq, The variables maxFilterLengthP and maxFilterLengthQ contain the maximum filter lengths, Variable t C .
[0144] The output of this process is the corrected picture sample array recPicture.
[0145] Depending on the value of edgeType, the following applies: If edgeType is equal to EDGE_VER, the following ordered steps are applied: 1. Sample value p for i=0…maxFilterLengthP, j=0…maxFilterLengthQ and k=0…3 i,k and q j,k is derived as follows: q j,k =recPictureL[xCb+xBl+j][yCb+yBl+k] (8-1112) p i,k =recPictureL[xCb+xBl-i-1][yCb+yBl+k] (8-1113) 2. If dE is not equal to 0 and dE is not equal to 3, then for each sample position (xCb+xBl, yCb+yBl+k), k=0…3, the following ordered steps are applied: The filtering process for the luma samples using the short filter specified in clause a.8.8.3.6.6 is performed at sample value p i,k , q j,k (i=0…maxFilterLengthP), with position (xP) set equal to (xCb+xBl-i-1, yCb+yBl+k). i ,yP i ) and (xQ i ,yQ i ) (j=0…maxFilterLengthQ), decision dE, variables dEp, dEq, variable t C is the input, the number of filtered samples from each side of the block boundary, nDp, nDq, and the filtered sample value p i ' and q j ' is the output. b. If nDp is greater than 0, the filtered sample value p i '(i=0…nDp-1) replaces the corresponding sample in the sample array recPicture as follows: recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i' (8-1114) c. If nDq is greater than 0, the filtered sample value q j '(j=0…nDq-1) replaces the corresponding sample in the sample array recPicture as follows: recPicture[xCb+xBl+j][yCb+yBl+k]=q j ' (8-1115) 3. If dE is equal to 3, then for each sample position (xCb+xBl, yCb+yBl+k), k=0...3, the following ordered steps are applied: a. The filtering process is invoked on the luma samples using the long filter specified in Section 8.8.3.6.7. i,k , q j,k (j=0…maxFilterLengthP and j=0…maxFilterLengthQ), with position (xP set equal to (xCb+xBl-i-1, yCb+yBl+k) i ,yP i ) (i=0…maxFilterLengthP-1) and (xQ j ,yQ j )(j=0…maxFilterLengthQ-1), variables maxFilterLengthP, maxFilterLengthQ and t C is the input and the filtered sample values p i ' and q j ' is the output. bi=0…maxFilterLengthP-1 filtered sample values p i ' replaces the corresponding sample in the sample array recPicture with the following: recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i ' (8-1116) cj=0...maxFilterLengthQ-1 filtered sample values q j' replaces the corresponding sample in the sample array recPicture with the following: recPicture[xCb+xBl+j][yCb+yBl+k]=q j ' (8-1117) Otherwise (edgeType equals EDGE_HOR), the following ordered steps are applied: 1. Sample value p for i=0…maxFilterLengthP, j=0…maxFilterLengthQ, and k=0…3 i,k , q j,k is derived as follows: q j,k =recPictureL[xCb+xBl+k][yCb+yBl+j] (8-1118) p i,k =recPictureL[xCb+xBl+k][yCb+yBl-i-1] (8-1119) 2. If dE is not equal to 0 and dE is not equal to 3, then for each sample position (xCb+xBl+k, yCb+yBl), k=0…3, the following ordered steps are applied: The filtering process is invoked on the luma samples using the short filter specified in Section a.8.8.3.6.6. i,k , q j,k (i=0…maxFilterLengthP), with position (xP) set equal to (xCb+xBl+k, yCb+yBl-i-1). i ,yP i ) and (xQ j ,yQ j )(j=0…maxFilterLengthQ), decision dE, variables dEp and dEq, variable t C is the input, the number of filtered samples from each side of the block boundary, nDp, nDq, and the filtered sample value p i ' and q j ' is the output. b. If nDp is greater than 0, the filtered sample value p for i=0…nDp-1 i ' replaces the corresponding sample in the sample array recPicture with the following: recPicture[xCb+xBl+k][yCb+yBl-i-1]=p i ' (8-1120) c. If nDq is greater than 0, the filtered sample value q for j=0…nDq-1 j ' replaces the corresponding sample in the sample array recPicture with the following: recPicture[xCb+xBl+k][yCb+yBl+j]=q j ' (8-1121) 3. If dE is equal to 3, then for each sample position (xCb+xBl+k, yCb+yBl), k=0...3, the following ordered steps are applied: The filtering process is invoked on the luma samples using the long filter specified in Section a.8.8.3.6.7. i,k , q j,k (i=0…maxFilterLengthP, j=0…maxFilterLengthQ), with the position (xP) set equal to (xCb+xBl+k, yCb+yBl-i-1). i ,yP i ) (i=0..maxFilterLengthP-1) and (xQ j ,yQ j )(j=0..maxFilterLengthQ-1), variables maxFilterLengthP, maxFilterLengthQ and variable t C is the input and the filtered sample values p i ' and q j ' is the output. bi=0…maxFilterLengthP-1 filtered sample values p i ' replaces the corresponding sample in the sample array recPicture with the following: recPicture[xCb+xBl+k][yCb+yBl-i-1]=p i ' (8-1122) cj=0...maxFilterLengthQ-1 filtered sample values q j ' replaces the corresponding sample in the sample array recPicture with the following: recPicture[xCb+xBl+k][yCb+yBl+j]=q j ' (8-1123)
[0146] 8.8.3.6.3 Chroma Block Edge Decision Making This process is only invoked if ChromaArrayType is not equal to 0.
[0147] The inputs to this process are: Chroma picture sample array recPicture, Chroma position (xCb, yCb) that specifies the top left sample of the current chroma coding block relative to the top left chroma sample of the current picture, Chroma position (xBl, yBl) specifying the top left sample of the current chroma block relative to the top left sample of the current chroma coding block, The variable edgeType, which specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered, · Variable cIdx that specifies the color component index, The variable cQpPicOffset, which specifies the picture-level chroma quantization parameter offset, · Variable bS, which specifies the boundary filtering strength, ·Variable maxFilterLengthCbCr.
[0148] The output of this process is: - modified variable maxFilterLengthCbCr, Variable t C .
[0149] The variable maxK is derived as follows: If edgeType is equal to EDGE_VER, the following applies: maxK=(SubHeightC==1) ? 3:1 (8-1124) Otherwise (edgeType equals EDGE_HOR), the following applies: maxK=(SubWidthC==1) ? 3:1 (8-1125)
[0150] Value p for i=0…maxFilterLengthCbCr and k=0…maxK i and q i is derived as follows: If edgeType is equal to EDGE_VER, the following applies: q i,k =recPicture[xCb+xBl+i][yCb+yBl+k] (8-1126) p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (8-1127) subSampleC=SubHeightC (8-1128) Otherwise (edgeType equals EDGE_HOR), the following applies: q i,k =recPicture[xCb+xBl+k][yCb+yBl+i] (8-1129) p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1130) subSampleC=SubWidthC (8-1131)
[0151] Variable Qp Q and Qp P are sample q 0,0 and p 0,0 Qp of the coding unit containing the coding block containing Y is set equal to the value.
[0152] Variable Qp C is derived as follows: qP i =Clip3(0,63,((Qp Q +Qp P +1)>>1)+cQpPicOffset) (8-1132) Qp C =ChromaQpTable[cIdx-1][qPi] (8-1133) NOTE - The variable cQpPicOffset provides an adjustment for the value of pps_cb_qp_offset or pps_cr_qp_offset, depending on whether the chroma component being filtered is the Cb or Cr component. However, to avoid the need to vary the amount of adjustment within a picture, the filtering process does not include an adjustment for the value of slice_cb_qp_offset or slice_cr_qp_offset, nor for the values of CuQpOffsetCb, CuQpOffsetCr, or CuQpOffsetCbCr (if cu_chroma_qp_offset_enabled_flag is equal to 1).
[0153] The value of the variable β' is determined as specified in Table 8-18 based on the quantization parameter Q, which is derived as follows: Q=Clip3(0,63,Qp C +(slice_beta_offset_div2<<1)) (8-1134) where slice_beta_offset_div2 is the offset of the sample q 0,0 is the value of the syntax element slice_beta_offset_div2 for the slice containing
[0154] The variable β is derived as follows: β=β'*(1<<(BitDepth C -8)) (8-1135)
[0155] variable t CThe value of ' is determined as specified in Table 8-18 based on the chroma quantization parameter Q, which is derived as follows: Q=Clip3(0,65,Qp C +2*(bS-1)+(slice_tc_offset_div2<<1)) (8-1136) where slice_tc_offset_div2 is the offset of the sample q 0,0 The value of the syntax element slice_tc_offset_div2 for the slice containing
[0156] variable t C is derived as follows: t C =(BitDepth C <10) ? (t C '+2)>>(10-BitDepth C ) : t C '*(1<<(BitDepth C -8)) (8-1137)
[0157] If maxFilterLengthCbCr is equal to 1 and bS is not equal to 2, then maxFilterLengthCbCr is set equal to 0.
[0158] If maxFilterLengthCbCr is equal to 3, the following ordered steps are applied: 1. The variables n1, dpq0, dpq1, dp, dq, and dd are derived as follows: n1=(subSampleC==2) ? 1:3 (8-1138) dp0=Abs(p 2,0 -2*p 1,0 +p 0,0 ) (8-1139) dp1=Abs(p 2,n1 -2*p 1,n1 +p 0,n1 ) (8-1140) dq0=Abs(q 2,0 -2*q 1,0 +q 0,0 ) (8-1141) dq1=Abs(q 2,n1 -2*q 1,n1 +q 0,n1 ) (8-1142) dpq0=dp0+dq0 (8-1143) dpq1=dp1+dq1 (8-1144) dp=dp0+dp1 (8-1145) dq=dq0+dq1 (8-1146) d=dpq0+dpq1 (8-1147) 2. The variables dSam0 and dSam1 are both set equal to 0. 3. If d is less than β, the following ordered steps are applied: a. The variable dpq is set equal to 2*dpq0. b. The variable dSam0 is derived by invoking the decision process for the chroma sample specified in Section 8.8.3.6.8 for sample location (xCb+xBl, yCb+yBl). 0,0 , p 3,0 , q 0,0 , q 3,0 , variables dpq, β, t C is the input and the output is assigned to decision dSam0. c. The variable dpq is set equal to 2*dpq1. d. The variable dSam1 is modified as follows: If edgeType is equal to EDGE_VER, then for sample position (xCb+xBl, yCb+yBl+n1), the decision process for chroma samples specified in section 8.8.3.6.8 is invoked. 0,n1 , p 3,n1 , q 0,n1 , q 3,n1 , variables dpq, β, t C is the input and the output is assigned to decision dSam1. Otherwise (edgeType equals EDGE_HOR), the decision process for the chroma samples specified in section 8.8.3.6.8 is called for sample position (xCb+xBl+n1, yCb+yBl). 0,n1 , p 3,n1 , q 0,n1 , q 3,n1 , variables dpq, β, t C is the input and the output is assigned to decision dSam1. 4. The variable maxFilterLengthCbCr is modified as follows: If dSam0 is equal to 1 and dSam1 is equal to 1, maxFilterLengthCbCr is set equal to 3. Otherwise, maxFilterLengthCbCr is set equal to 1.
[0159] As shown in Sections 8-1132 and 8-1133 of Section 8.8.3.6.3, in the conventional approach, the luma QP (e.g., qPi) is calculated by multiplying the luma QPs of two adjacent blocks (e.g., Qp Q and Qp P ) and then the chroma QP (e.g., Qp C It is noted that qPi is derived (using one LUT) from the luma QP (e.g., qPi). The embodiments of the present disclosure are improvements over conventional approaches, and details of how the decision process for chroma block edges is performed are described below.
[0160] 8.8.3.6.4 Filtering Process for Chroma Block Edges This process is only invoked if ChromaArrayType is not equal to 0.
[0161] The inputs to this process are: Chroma picture sample array recPicture, Chroma position (xCb, yCb) that specifies the top left sample of the current chroma coding block relative to the top left chroma sample of the current picture, Chroma position (xBl, yBl) specifying the top left sample of the current chroma block relative to the top left sample of the current chroma coding block, The variable edgeType, which specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered, A variable maxFilterLengthCbCr containing the maximum chroma filter length, Variable t C .
[0162] The output of this process is the corrected chroma picture sample array recPicture.
[0163] The variable maxK is derived as follows: If edgeType is equal to EDGE_VER, the following applies: maxK=(SubHeightC==1) ? 3:1 (8-1148) Otherwise (edgeType equals EDGE_HOR), the following applies: maxK=(SubWidthC==1) ? 3:1 (8-1149)
[0164] Value p for i=0…maxFilterLengthCbCr and k=0…maxK i and q i is derived as follows: If edgeType is equal to EDGE_VER, the following applies: q i,k =recPicture[xCb+xBl+i][yCb+yBl+k] (8-1150) p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (8-1151) Otherwise (edgeType equals EDGE_HOR), the following applies: q i,k=recPicture[xCb+xBl+k][yCb+yBl+i] (8-1152) p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1153)
[0165] Depending on the value of edgeType, the following applies: If edgeType is equal to EDGE_VER, then for each sample position (xCb+xBl, yCb+yBl+k), k=0…maxK, the following ordered steps are applied: The filtering process is invoked for the chroma samples specified in section 1.8.8.3.6.9. The variable maxFilterLengthCbCr and the sample value p i,k , q i,k (i=0…maxFilterLengthCbCr), position (xCb+xBl-i-1,yCb+yBl+k) and (xCb+xBl+i,yCb+yBl+k) (i=0…maxFilterLengthCbCr-1) and t C is the input, and the filtered sample values p for i=0…maxFilterLengthCbCr-1 i ' and q i 'It is said that. 2. Filtered sample value p for i=0…maxFilterLengthCbCr-1 i ' and q i ' replaces the corresponding sample in the sample array recPicture with the following: recPicture[xCb+xBl+i][yCb+yBl+k]=q i ' (8-1154) recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i ' (8-1155) Otherwise (edgeType equals EDGE_HOR), for each sample position (xCb+xBl+k, yCb+yBl), k=0…maxK, the following ordered steps are applied: The filtering process is invoked for the chroma samples specified in section 1.8.8.3.6.9. The variable maxFilterLengthCbCr and the sample value p i,k , q i,k (i=0…maxFilterLengthCbCr), position (xCb+xBl+k,yCb+yBl-i-1) and (xCb+xBl+k,yCb+yBl+i), variable t C is the input and the filtered sample values p i ' and q i ' is the output. 2. The filtered sample values pi' and qi' replace the corresponding samples in the sample array recPicture as follows: recPicture[xCb+xBl+k][yCb+yBl+i]=q i ' (8-1156) recPicture[xCb+xBl+k][yCb+yBl-i-1]=p i ' (8-1157)
[0166] The threshold parameter (e.g., the variable t C It is noted that the filtering process for chroma block edges based on ) can be found in documents such as the above mentioned section 8.8.3.6.4 of the VVC specification and will not be repeated below.
[0167] 8.8.3.6.5 Luma Sample Decision Process The inputs to this process are: Sample values p0, p3, q0, q3, Variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, t C .
[0168] The output of this process is the variable dSam, which contains the decision.
[0169] The variables sp and sq are modified as follows: If sidePisLargeBlk is equal to 1, the following applies: sp=(sp+Abs(p3-p0)+1)>>1 (8-1158) If sideQisLargeBlk is equal to 1, the following applies: sq=(sq+Abs(q3-q0)+1)>>1 (8-1159)
[0170] The variable sThr is derived as follows: If sidePisLargeBlk is equal to 1 or if sideQisLargeBlk is equal to 1, the following applies: sThr=3×β>>5 (8-1160) Otherwise, the following applies: sThr=β>>3 (8-1161)
[0171] The variable dSam is specified as follows: dSam is set to 1 if all of the following conditions are true: dpq is less than (β>>2), sp+sq is smaller than sThr, ·spq is (5*t C +1)>>Less than 1. Otherwise, dSam is set equal to 0.
[0172] 8.8.3.6.6 Filtering process for luma samples using short filters The inputs to this process are: Sample value p at i=0…3 i and q i , p for i=0…2 i and q i Position (xP i ,yP i ) and (xQ i ,yQ i ), Variable dE, Variables dEp and dEq, which contain the decisions to filter samples p1 and q1, respectively Variable tC .
[0173] The output of this process is: the number of filtered samples nDp and nDq, filtered sample value p i ' and q j '(i=0…nDp-1, j=0…nDq-1).
[0174] Depending on the value of dE, the following applies: If the variable dE is equal to 2, then nDp and nDq are both set equal to 3 and the following strong filtering is applied: p0'=Clip3(p0-3*t C ,p0+3*t C ,(p2+2*p1+2*p0+2*q0+q1+4)>>3) (8-1162) p1'=Clip3(p1-2*t C ,p1+2*t C ,(p2+p1+p0+q0+2)>>2) (8-1163) p2'=Clip3(p2-1*t C ,p2+1*t C ,(2*p3+3*p2+p1+p0+q0+4)>>3) (8-1164) q0'=Clip3(q0-3*t C ,q0+3*t C ,(p1+2*p0+2*q0+2*q1+q2+4)>>3) (8-1165) q1'=Clip3(q1-2*t C ,q1+2*t C ,(p0+q0+q1+q2+2)>>2) (8-1166) q2'=Clip3(q2-1*t C ,q2+1*t C ,(p0+q0+q1+3*q2+2*q3+4)>>3) (8-1167) Otherwise, nDp and nDq are both set to 0 and the following weak filtering is applied: The following applies: Δ=(9*(q0-p0)-3*(q1-p1)+8)>>4 (8-1168) Abs(Δ) is t C *If it is less than 10, the following ordered steps apply: The filtered sample values p0' and q0' are specified as follows: Δ=Clip3(-t C , t C , Δ) (8-1169) p0'=Clip1 Y (p0+Δ) (8-1170) q0'=Clip1 Y (q0-Δ) (8-1171) If dEp is equal to 1, the filtered sample value p1' is specified as follows: Δp=Clip3(-(t C >>1),t C >>1,(((p2+p0+1)>>1)-p1+Δ)>>1) (8-1172) p1'=Clip1 Y (p1+Δp) (8-1173) If dEq is equal to 1, the filtered sample value q1' is specified as: △q=Clip3(-(t C >>1),t C >>1,(((q2+q0+1)>>1)-q1-Δ)>>1) (8-1174) q1'=Clip1 Y (q1+Δq) (8-1175) ·nDp is set equal to dEp+1 and nDq is set equal to dEq+1.
[0175] If nDp is greater than 0 and one or more of the following conditions are true, nDp is set to 0: · cu_transquant_bypass_flag is equal to 1 for the coding unit containing the coding block containing sample p0. · pre_mode_plt_flag of the coding unit containing the coding block containing sample p0 is equal to 1.
[0176] If nDq is greater than 0 and one or more of the following conditions are true, then nDq is set to 0: · cu_transquant_bypass_flag is equal to 1 for the coding unit containing the coding block that contains sample q0. · pre_mode_plt_flag of the coding unit containing the coding block containing sample q0 is equal to 1.
[0177] 8.8.3.6.7 Filtering process for luma samples using long filters The inputs to this process are: · The variables maxFilterLengthP and maxFilterLengthQ, Sample value p at i=0…maxFilterLengthP and j=0…maxFilterLengthQ i and q j , p for i=0…maxFilterLengthP-1 and j=0…maxFilterLengthQ-1 i and q j Position (xP i ,yP i ) and (xQ j ,yQ j ), Variable t C .
[0178] The output of this process is: Filtered sample values p, for i=0...maxFilterLengthP-1, j=0...maxFilterLengthQ-1 i ' and q j '.
[0179] The variable refMiddle is derived as follows: If maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is equal to 5, then the following applies: refMiddle=(p4+p3+2*(p2+p1+p0+q0+q1+q2)+q3+q4+8)>>4 (8-1176) Otherwise, if maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is not equal to 5, then the following applies: refMiddle=(p6+p5+p4+p3+p2+p1+2*(p0+q0)+q1+q2+q3+q4+q5+q6+8)>>4 (8-1177) Otherwise, the following conditions: maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 5, maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 7, If any of the following is true, then the following applies: refMiddle=(p4+p3+2*(p2+p1+p0+q0+q1+q2)+q3+q4+8)>>4 (8-1178) Otherwise, the following conditions: maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 3, maxFilterLengthQ is equal to 3 and maxFilterLengthP is equal to 5, If any of the following is true, then the following applies: refMiddle=(p3+p2+p1+p0+q0+q1+q2+q3+4)>>3 (8-1179) Otherwise, if maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 3, the following applies: refMiddle=(2*(p2+p1+p0+q0)+p0+p1+q1+q2+q3+q4+q5+q6+8)>>4 (8-1180) Otherwise, the following applies: refMiddle=(p6+p5+p4+p3+p2+p1+2*(q2+q1+q0+p0)+q0+q1+8)>>4 (8-1181)
[0180] The variables refP and refQ are derived as follows: refP=(p maxFilterLengtP +p maxFilterLengthP-1 +1)>>1 (8-1182) refQ=(q maxFilterLengtQ +q maxFilterLengthQ-1 +1)>>1 (8-1183)
[0181] variable f i and t C PD i is defined as follows: If maxFilterLengthP is equal to 7, the following applies: f 0..6 ={59,50,41,32,23,14,5} (8-1184) t C PD 0..6 ={6,5,4,3,2,1,1} (8-1185) Otherwise, if maxFilterLengthP is equal to 5, the following applies: f 0..4 ={58,45,32,19,6} (8-1186) t C PD 0..4 ={6,5,4,3,2} (8-1187) Otherwise, the following applies: f 0..2 ={53,32,11} (8-1188) t C PD 0..2 ={6,4,2} (8-1189)
[0182] Variable g j and t C QD j is defined as follows: If maxFilterLengthQ is equal to 7, the following applies: g0..6 ={59,50,41,32,23,14,5} (8-1190) t C QD 0..6 ={6,5,4,3,2,1,1} (8-1191) Otherwise, if maxFilterLengthQ is equal to 5, the following applies: g 0..4 ={58,45,32,19,6} (8-1192) t C QD 0..4 ={6,5,4,3,2} (8-1193) Otherwise, the following applies: g 0..2 ={53,32,11} (8-1194) t C QD 0..2 ={6,4,2} (8-1195)
[0183] filtered sample value p i ' and q j '(i=0...maxFilterLengthP-1 and j=0...maxFilterLengthQ-1) are derived as follows: p i '=Clip3(p i -(t C *t C PD i )>>1,p i +(t C *t C PD i )>>1,(refMiddle*f i +refP*(64-f i )+32)>>6) (8-1196) q j '=Clip3(q j -(t C *t C QD j )>>1,q j +(t C *t C QD j )>>1,(refMiddle*g j +refQ*(64-gj )+32)>>6) (8-1197)
[0184] Filtered sample value p, for i=0…maxFilterLengthP-1, if one or more of the following conditions are true: i ' is the corresponding input sample value p i is replaced by: Sample p i The cu_transquant_bypass_flag of the coding unit containing the coding block containing Sample p i The pred_mode_plt_flag of the coding unit containing the coding block containing
[0185] The filtered sample value q, for j=0…maxFilterLengthQ-1, if one or more of the following conditions are true: i ' is the corresponding input sample value q j is replaced by: Sample Q j The cu_transquant_bypass_flag of the coding unit containing the coding block containing Sample Q j The pre_mode_plt_flag of the coding unit containing the coding block containing
[0186] 8.8.3.6.8 Chroma Sample Decision Process The inputs to this process are: Sample values p0, p3, q0, q3, Variables dpq, β, t C .
[0187] The output of this process is the variable dSam, which contains the decision.
[0188] The variable dSam is specified as follows: · dSam is set equal to 1 if all of the following conditions are true: dpq is less than (β>>2), Abs(p3-p0)+Abs(q0-q3) is smaller than (β>>3), Abs(p0-q0) is (5*t C +1)>>Less than 1. Otherwise, dSam is set equal to 0.
[0189] / / As shown in FIG. 11, it is noted that the variable dSam includes decision 1107, which means that if dSam is set equal to 1, the result of decision 1107 is YES, and then, in one example, step 1109 may be executed; if dSam is set equal to 0, the result of decision 1107 is NO, and then, in one example, step 1105 may be executed. / /
[0190] 8.8.3.6.9 Filtering process for chroma samples This process is only invoked if ChromaArrayType is not equal to 0.
[0191] The inputs to this process are: · variable maxFilterLength, Chroma Sample Value p i and q i (i=0…maxFilterLengthCbCr), ·p i and q i Chroma position (xP i ,yP i ) and (xQ i ,yQ i ) chroma position (i=0...maxFilterLengthCbCr-1), Variable t C .
[0192] The output of this process is the filtered sample values p i ' and q i '(i=0...maxFilterLengthCbCr-1).
[0193] Filtered sample values p for i=0...maxFilterLengthCbCr-1 i ' and q i ' is derived as follows: If maxFilterLengthCbCr is equal to 3, the following strong filtering is applied: p0'=Clip3(p0-t C ,p0+t C ,(p3+p2+p1+2*p0+q0+q1+q2+4)>>3) (8-1198) p1'=Clip3(p1-t C ,p1+t C ,(2*p3+p2+2*p1+p0+q0+q1+4)>>3) (8-1199) p2'=Clip3(p2-t C ,p2+t C ,(3*p3+2*p2+p1+p0+q0+4)>>3) (8-1200) q0'=Clip3(q0-t C ,q0+t C ,(p2+p1+p0+2*q0+q1+q2+q3+4)>>3) (8-1201) q1'=Clip3(q1-t C ,q1+t C ,(p1+p0+q0+2*q1+q2+2*q3+4)>>3) (8-1202) q2'=Clip3(q2-t C ,q2+t C ,(p0+q0+q1+2*q2+3*q3+4)>>3) (8-1203) Otherwise, the following weak filtering is applied: Δ=Clip3(-t C ,t C ,((((q0-p0)<<2)+p1-q1+4)>>3)) (8-1204) p0'=Clip1 C (p0+Δ) (8-1205) q0'=Clip1 C (q0-Δ) (8-1206)
[0194] The filtered sample value p, for i=0…maxFilterLengthCbCr-1, if one or more of the following conditions are true: i ' is the corresponding input sample value p i is replaced by: Sample p i The cu_transquant_bypass_flag of the coding unit containing the coding block containing Sample p i The pred_mode_plt_flag of the coding unit containing the coding block containing
[0195] The filtered sample value q, for i=0…maxFilterLengthCbCr-1, if one or more of the following conditions are true: i ' is the corresponding input sample value q i is replaced by: Sample Q i The cu_transquant_bypass_flag of the coding unit containing the coding block containing Sample Q i The pre_mode_plt_flag of the coding unit containing the coding block containing
[0196] 2 as an in-loop filter, in other configurations, loop filter unit 220 may be implemented as a post-loop filter. Filtered block 221 may also be referred to as filtered reconstruction block 221.
[0197] VVC (Versatile Video Coding) uses a tool called JCCR (Joint Chroma Residual Coding), which is signaled in the bitstream using the flag "tu_joint_cbcr_residual_flag." This tool specifies whether residual samples for both Cb and Cr chroma components are coded as a single transform block. The flag "tu_joint_cbcr_residual_flag" equal to 1 specifies that the transform unit syntax includes transform coefficient levels for a single transform block from which residual samples for both Cb and Cr are derived. The JCCR tool exploits the fact that both Cb residual and Cr residual appear to be largely inversely correlated with each other.
[0198] Depending on tu_joint_cbcr_residual_flag, tu_cbf_cb, and tu_cbf_cr, the variable TuCResMode is derived as follows: where tu_cbf_cb specifies the coded block flag for the Cb component, tu_cbf_cr is the coded block flag for the Cr component, and TuCResMode indicates the JCCR mode. ·If tu_joint_cbcr_residual_flag is equal to 0, the variable TuCResMode is set equal to 0; · Otherwise, if tu_cbf_cb is equal to 1 and tu_cbf_cr is equal to 0, the variable TuCResMode is set equal to 1; · Otherwise, if tu_cbf_cb is equal to 1, the variable TuCResMode is set equal to 2; Otherwise, the variable TuCResMode is set equal to 3.
[0199] The relationship between "Reconstruct Cb and Cr residuals" based on the variables tu_cbf_cb and tu_cbf_cr and the variable tuCResMode is shown in the table below. [Table 3] The variable CSgin is a signed value (+1 or -1), which is signaled in the slice header. resJointC[x][y] is the actual transmitted residual in the bitstream. resCb[x][y] denotes the derived residual sample for chroma component Cb; resCr[x][y] denotes the derived residual sample for the chroma component Cr.
[0200] The present disclosure may use separate chroma QP mapping tables for each of the chroma components Cb and Cr and the joint Cb-Cr residual. When the syntax element "same_qp_table_for_chroma" is equal to 1, it specifies that the same chroma QP tables are used and that these same tables apply to the Cb, Cr, and joint Cb-Cr residual. When "same_qp_table_for_chroma" is equal to 0, it indicates that different chroma QP mapping tables are used for the Cb, Cr, or joint Cb-Cr residual. The three chroma mapping tables may be represented in different formats.
[0201] As shown in Figures 12A and 12B, there are three sub-tables (i.e., rows with index values equal to 0, 1, and 2). The syntax element same_qp_table_for_chroma should be equal to 0, since the content of row 2 differs from row 0 and / or row 1. Otherwise, if the syntax element same_qp_table_for_chroma is equal to 1, the content of rows 1 and 2 must be the same as the content of row 0.
[0202] As shown in Figure 13, there are three separate tables designed respectively for Cb, Cr, and joint Cb-Cr residual. Because the contents of the tables for Cb, Cr, and joint Cb-Cr residual are different from each other, the syntax element same_qp_table_for_chroma should be equal to 0. Otherwise, if the syntax element same_qp_table_for_chroma is equal to 1, the contents of the tables for Cb, Cr, and joint Cb-Cr residual should be identical.
[0203] The syntax elements num_points_in_qp_table_minus1[i], delta_qp_in_val_minus1[i][j], and delta_qp_out_val[i][j] are further used to derive the chroma QP mapping table. The semantics of these syntax elements and the procedure for deriving the chroma QP mapping table are as follows: num_points_in_qp_table_minus1[i] plus 1 specifies the number of points used to describe the ith chroma QP mapping table. The value of num_points_in_qp_table_minus1[i] ranges from 0 to 63 + QpBdOffset C If num_points_in_qp_table_minus1[0] is not present in the bitstream, the value of num_points_in_qp_table_minus1[0] is inferred to be equal to 0. delta_qp_in_val_minus1[i][j] specifies the delta value used to derive the input coordinate of the jth pivot point of the ith chroma QP mapping table. If delta_qp_in_val_minus1[0][j] is not present in the bitstream, the value of delta_qp_in_val_minus1[0][j] is inferred to be equal to 0. delta_qp_out_val[i][j] specifies the delta value used to derive the output coordinate of the jth pivot point of the ith chroma QP mapping table. If delta_qp_out_val[0][j] is not present in the bitstream, the value of delta_qp_out_val[0][j] is inferred to be equal to 0.
[0204] It is noted that in this disclosure, details regarding examples of how to derive the first chroma QP mapping table, the second chroma QP mapping table, and the third chroma QP mapping table are described below.
[0205] For i=0…same_qp_table_for_chroma ? 0:2, the ith chroma QP mapping table ChromaQpTable[i] is derived as follows: [Table 4]
[0206] If same_qp_table_for_chroma is equal to 1, ChromaQpTable[1][k] and ChromaQpTable[2][k] are set to k=-QpBdOffset C …63, set equal to ChromaQpTable[0][k].
[0207] The values of qpInVal[i][j] and qpOutVal[i][j] are -QpBdOffset for i=0...same_qp_table_for_chroma ? 0:2 and j=0...num_points_in_qp_table_minus1[i] C The range from 0 to 63 (inclusive) is a bitstream conformance requirement.
[0208] The chroma QP mapping table maps the luma QP value (QP i ) and color component value (cIdx) as input, and the corresponding chroma Qp value (QPc ) as output. The formula may depict a linear relationship between the luma QP and chroma QP. For example, the formula may be: QP c =QP i -x where x is a constant that depends on the color component value (cIdx), and x can take different values for different color component indices, including the joint Cb-Cr components.
[0209] Embodiments of video encoder 20 (and particularly loop filter unit 220) may be configured to output loop filter parameters (such as SAO filter parameters or ALF filter parameters or LMCS parameters), e.g., directly or encoded via entropy encoding unit 270, so that, for example, decoder 30 can receive and apply the same loop filter parameters or the respective loop filter for decoding.
[0210] Decoded Picture Buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures, or generally reference picture data, for encoding video data by the video encoder 20. The DPB 230 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may further be configured to store other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221, of the same current picture or of a different picture, e.g., a previously reconstructed picture, and may provide a complete previously reconstructed, i.e., decoded, picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples), e.g., for inter-prediction. The decoded picture buffer (DPB) 230 may be configured to store one or more unfiltered reconstructed blocks 215, for example if the reconstructed blocks 215 are not filtered by the loop filter unit 220, or unfiltered reconstructed samples in general, or any other further processed version of the reconstructed blocks or samples.
[0211] Mode Selection (Segmentation and Prediction) The mode selection unit 260 includes a partitioning unit 262, an inter-prediction unit 244, and an intra-prediction unit 254, and is configured to receive or obtain original picture data, e.g., original block 203 (current block 203 of current picture 17), and reconstructed picture data, e.g., filtered and / or unfiltered reconstructed samples or blocks, of the same (current) picture and / or from one or more previously decoded pictures, e.g., from a decoded picture buffer 230 or other buffer (e.g., a line buffer, not shown). The reconstructed picture data is used as reference picture data for prediction, e.g., inter-prediction or intra-prediction, to obtain a prediction block 265 or predictor 265.
[0212] The mode selection unit 260 may be configured to determine or select a partitioning (including no partitioning) and prediction mode (e.g., intra or inter prediction mode) for the current block prediction mode and generate a corresponding prediction block 265 used to calculate the residual block 205 and reconstruct the reconstruction block 215.
[0213] Embodiments of mode selection unit 260 may be configured to select a partitioning and prediction mode (e.g., from those supported by or available to mode selection unit 260) that provides the best match, i.e., the smallest residual (smallest residual means better compression for transmission or storage) or the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or that considers or balances both. Mode selection unit 260 may also be configured to determine the partitioning and prediction mode based on rate-distortion optimization (RDO), i.e., select the prediction mode that provides the smallest rate-distortion. Terms such as “best,” “minimum,” “optimum,” etc. in this context do not necessarily refer to overall “best,” “minimum,” “optimum,” etc., but may also refer to termination, or the fulfillment of selection criteria such as values above or below a threshold, or other constraints that potentially lead to a “non-optimal selection” but reduce complexity and processing time.
[0214] In other words, the partitioning unit 262 may partition a picture from a video sequence into a sequence of coding tree units (CTUs), which may be further partitioned into smaller block partitions or sub-blocks (which also form blocks), for example, using quadtree partitioning (QT), binary partitioning (BT), or ternary tree partitioning (TT), or any combination thereof, in an iterative manner. For example, prediction may be configured to be performed on each of the block partitions or sub-blocks, where mode selection includes selecting a tree structure for the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.
[0215] The partitioning (eg, by partitioning unit 260) and prediction processes (eg, by inter-prediction unit 244 and intra-prediction unit 254) performed by exemplary video encoder 20 are described in more detail below.
[0216] Partitioning The division unit 262 may be configured to partition a picture from a video sequence into a sequence of coding tree units (CTUs), and the division unit 262 may partition (or divide) the coding tree units (CTUs) 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. For a picture with three sample arrays, a CTU consists of an N×N block of luma samples and two corresponding blocks of chroma samples. The maximum allowable size of a luma block in a CTU is specified as 128×128 in the currently developing Versatile Video Coding (VVC) standard, but may be specified as a value other than 128×128, e.g., 256×256, in the future. The CTUs of a picture may be clustered / grouped as slices / tile groups, tiles, or bricks. A tile covers a rectangular area of the picture, and a tile can be divided into one or more bricks. A brick consists of several CTU rows within the tile. A tile that is not divided into multiple bricks can be referred to as a brick. However, a brick is a proper subset of a tile and is not referred to as a tile. There are two modes of tile groups supported by VVC: raster scan slice / tile group mode and rectangular slice mode. In raster scan tile group mode, a slice / tile group contains a sequence of tiles in the tile raster scan of a picture. In rectangular slice mode, a slice contains several bricks of a picture that together form a rectangular region of the picture. The bricks within a rectangular slice are in the brick raster scan order of that slice. These smaller blocks (also called sub-blocks) may be further divided into even smaller partitions.This is also called tree or hierarchical tree partitioning; for example, a root block at root tree level 0 (hierarchical level 0, depth 0) may be recursively partitioned into two or more blocks at the next, lower tree level, say a node at tree level 1 (hierarchical level 1, depth 1); these blocks may then be partitioned again into two or more blocks at the next, lower level, say tree level 2 (hierarchical level 2, depth 2), and so on, until the partitioning is terminated because a termination criterion is met, such as reaching a maximum tree depth or a minimum block size. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree that uses a partition into two partitions is called a binary tree (BT), a tree that uses a partition into three partitions is called a ternary tree (TT), and a tree that uses a partition into four partitions is called a quad tree (QT).
[0217] For example, a coding tree unit (CTU) may be or include a CTB of luma samples for a picture having three sample arrays, two corresponding CTBs of chroma samples, or a CTB of samples for a picture coded using three distinct color planes and syntax structures used to code a monochrome picture or sample. Correspondingly, a coding tree block (CTB) may be an N x N block of samples for some value of N, such that the division of a component into CTBs is a partition. A coding unit (CU) may be or include a coded block of luma samples for a picture having three sample arrays, two corresponding coded blocks of chroma samples, or a coded block of samples for a picture coded using three distinct color planes and syntax structures used to code a monochrome picture or sample. Correspondingly, a coding block (CB) may be an M x N block of samples for some values of M and N, such that the division of a CTB into coded blocks is a partition.
[0218] In an embodiment, for example, according to HEVC, coding tree units (CTUs) may be divided into CUs by using a quadtree structure referred to as a coding tree. The decision of whether to code a picture region using inter-picture (temporal) or intra-picture (spatial) prediction is made at the leaf CU level. Each leaf CU can be further divided into one, two, or four PUs according to a PU partition type. Within one PU, the same prediction process is applied, and related information is transmitted to the decoder for each PU. After obtaining a residual block by applying a prediction process based on the PU partition type, the leaf CU can be divided into transform units (TUs) according to another quadtree structure similar to the coding tree for the CU.
[0219] In an embodiment, according to the latest video coding standard currently under development, for example, referred to as Versatile Video Coding (VVC), a composite quadtree-nested multitype tree using bisection and trisection segmentation structures is used to partition coding tree units. Within a coding tree unit, a CU can have either a square or rectangular shape. For example, a coding tree unit (CTU) is first split by a quadtree. The quadtree leaf nodes can then be further split by a multitype tree structure. The multitype tree structure has four split types: vertical bisection (SPLIT_BT_VER), horizontal bisection (SPLIT_BT_HOR), vertical trisection (SPLIT_TT_VER), and horizontal trisection (SPLIT_TT_HOR). The multitype tree leaf nodes are called coding units (CUs), and this segmentation is used for prediction and transform processing without further splitting, unless the CU is too large for the maximum transform length. This means that in most cases, CUs, PUs, and TUs have the same block size in a quadtree with a nested multitype-tree coding block structure. An exception occurs when the maximum supported transform length is smaller than the width or height of a CU's color components. VVC develops a unique signaling mechanism for partitioning information in a quadtree with a nested multitype-tree coding tree structure. In the signaling mechanism, a coding tree unit (CTU) is treated as the root of a quadtree and is first partitioned by a quadtree structure. Each quadtree leaf node (if large enough to allow it) is then further partitioned by a multitype-tree structure.In a multitype tree structure, the first flag (mtt_split_cu_flag) signals whether the node is further partitioned. If the node is further partitioned, the second flag (mtt_split_cu_vertical_flag) signals the split direction. The third flag (mtt_split_cu_binary_flag) signals whether the split is bipartite or tripartite. Based on the values of mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, the multitype tree split mode (MttSplitMode) of the CU can be derived by the decoder based on a predefined rule or table. For certain designs, e.g., 64x64 luma block and 32x32 chroma pipeline design in a VVC hardware decoder, TT splitting is prohibited if either the width or height of the luma coding block exceeds 64, as shown in Figure 6. TT partitioning is also prohibited if either the width or height of a chroma coding block is greater than 32. The pipeline design divides a picture into virtual pipeline data units (VPDUs), which are defined as non-overlapping units within a picture. In a hardware decoder, a series of VPDUs are processed simultaneously by multiple pipeline stages. It is important to keep the VPDU size small because the VPDU size is roughly proportional to the buffer size in most pipeline stages. In most hardware decoders, the VPDU size can be set to the maximum transform block (TB) size. However, in VVC, ternary tree (TT) and binary tree (BT) partitioning can result in an increase in the VPDU size.
[0220] Furthermore, it should be noted that if any part of a tree node block exceeds the bottom or right picture boundary, the tree node block is forced to be split until all samples of all coded CUs are located within the picture boundary.
[0221] As an example, the Intra Subpartition (ISP) tool can divide a luma intra prediction block into two or four subpartitions vertically or horizontally, depending on the block size.
[0222] In one example, mode select unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0223] As described above, video encoder 20 is configured to determine or select a best or optimal prediction mode from a (e.g., predetermined) set of prediction modes, which may include, for example, intra-prediction modes and / or inter-prediction modes.
[0224] Intra prediction The set of intra-prediction modes may include 35 different intra-prediction modes, e.g., non-directional or directional modes such as DC (or average) mode and planar mode, as defined in, for example, HEVC, or 67 different intra-prediction modes, e.g., non-directional or directional modes such as DC (or average) mode and planar mode, as defined in, for example, VVC. As an example, some conventional angular intra-prediction modes are adaptively replaced with wide-angle intra-prediction modes for non-square blocks, as defined in, for example, VVC. As another example, to avoid division operations for DC prediction, only the longer side is used to calculate the average for non-square blocks. The results of planar mode intra-prediction may be further modified by a position-dependent intra-prediction combination (PDPC) method.
[0225] The intra prediction unit 254 is configured to use reconstructed samples of neighboring blocks of the same current picture to generate an intra prediction block 265 according to an intra prediction mode from a set of intra prediction modes.
[0226] Intra prediction unit 254 (or, generally, mode select unit 260) is further configured to output the intra prediction parameters (or, generally, information indicating the selected intra prediction mode for the block) in the form of syntax element 266 to entropy encoding unit 270 for inclusion in encoded picture data 21, so that, for example, video decoder 30 can receive the prediction parameters and use them for decoding.
[0227] Inter Prediction The set of inter-prediction modes (or possible inter-prediction modes) depends on available reference pictures (i.e., previous, at least partially decoded pictures, e.g., stored in DPB 230) and other inter-prediction parameters, such as whether the entire reference picture is used to find the best-matching reference block or only a portion of the reference picture, e.g., a search window area around that region of the current block, is used, and / or whether pixel interpolation, e.g., half / semi-pixel and / or 1 / 4- and / or 1 / 16-pixel interpolation, is applied.
[0228] In addition to the above prediction modes, skip mode and / or inter prediction mode may be applied.
[0229] For example, in the case of enhanced merge prediction, the merge candidate list for such a mode is constructed by sequentially including five types of candidates: spatial MVP from spatially neighboring CUs, temporal MVP from co-located CUs, history-based MVP from a FIFO table, pairwise average MVP, and zero MV. To improve the accuracy of the MV in the merge mode, bilateral matching-based decoder-side motion vector refinement (DMVR) may be applied. Merge mode with MVD (MMVD) is derived from the merge mode using motion vector differences. An MMVD flag is signaled immediately after sending the skip and merge flags to specify whether the MMVD mode is used for the CU. Then, a CU-level adaptive motion vector resolution (AMVR) scheme may be applied. AMVR allows the MVD of a CU to be coded with different precision. The MVD of the current CU can be adaptively selected depending on the prediction mode for the current CU. When a CU is coded in merge mode, the combined inter / intra prediction (CIIP) mode may be applied to the current CU. To obtain the CIIP prediction, a weighted average of the inter and intra prediction signals is performed. Affine motion compensated prediction. The affine motion field of a block is described by motion information of two control points (4 parameters) or three control point motion vectors (6 parameters). Subblock-based temporal motion vector prediction (SbTMVP). This is similar to temporal motion vector prediction (TMVP) in HEVC, but predicts the motion vectors of sub-CUs within the current CU.Bi-directional optical flow (BDOF), formerly called BIO, is a simpler version that requires much less computation, especially in terms of the number of multiplications and the size of the multipliers. In triangular partitioning mode, the CU is divided evenly into two triangular partitions using either diagonal or anti-diagonal partitioning. Additionally, bi-prediction mode has been extended beyond simple averaging to allow a weighted average of the two prediction signals.
[0230] The inter prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (neither of which are shown in FIG. 2). The motion estimation unit may be configured to receive or obtain a picture block 203 (such as the current picture block 203 of the current picture 17) and a decoded picture 231, or at least one or more previously reconstructed blocks, e.g., reconstructed blocks of one or more other / different previously decoded pictures 231, for motion estimation. For example, a video sequence may include the current picture and the previously decoded picture 231, or in other words, the current picture and the previously decoded picture 231 may be part of or form a sequence of pictures that form a video sequence.
[0231] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same or different ones of multiple other pictures, and provide the reference picture (or reference picture index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block as an inter-prediction parameter to the motion estimation unit, which offset is also called a motion vector (MV).
[0232] The motion compensation unit is configured to, for example, obtain, e.g., receive, inter prediction parameters and perform inter prediction based on or using the inter prediction parameters to obtain an inter prediction block 265. The motion compensation performed by the motion compensation unit may include performing interpolation, possibly to sub-pixel accuracy, to fetch or generate a prediction block based on motion / block vectors determined by motion estimation. Interpolation filtering may generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate prediction blocks that can be used to encode the picture block. Upon receiving a motion vector for the PU of the current picture block, the motion compensation unit may locate the prediction block to which the motion vector points in one of the reference picture lists.
[0233] The motion compensation unit may also generate syntax elements associated with the blocks and video slices for use by video decoder 30 in decoding picture blocks of the video slices. In addition to, or instead of, slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.
[0234] Entropy Coding The entropy encoding unit 270 is configured to apply, for example, an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CAVLC), an arithmetic coding scheme, binarization, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy encoding method or technique) or bypass (uncompressed) to the quantized coefficients 209, inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements to obtain encoded picture data 21. The encoded picture data 21, for example, in the form of an encoded bitstream 21, can be output via output 272, so that, for example, video decoder 30 can receive and use those parameters for decoding. The encoded bitstream 21 can be transmitted to video decoder 30 or stored in memory for later transmission or retrieval by video decoder 30.
[0235] Other structural variations of the video encoder 20 can be used to encode the video stream. For example, a non-transform-based encoder 20 can quantize the residual signal directly for certain blocks or frames without the transform processing unit 206. In another implementation, the encoder 20 can have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit.
[0236] Decoder and decoding method 3 shows an example of a video decoder 30 configured to implement the techniques of the present application. The video decoder 30 is configured to receive encoded picture data 21 (e.g., encoded bitstream 21), for example, encoded by encoder 20, to obtain a decoded picture 331. The encoded picture data or bitstream includes information for decoding the encoded picture data, for example, data representing picture blocks (and / or tile groups or tiles) of an encoded video slice and associated syntax elements.
[0237] 3, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., adder 314), a loop filter unit 320, a decoded picture buffer (DPB) 330, a mode application unit 360, an inter prediction unit 344, and an intra prediction unit 354. Inter prediction unit 344 may be or may include a motion compensation unit. Video decoder 30, in some examples, may perform a decoding path that is generally the reverse of the encoding path described with respect to video encoder 100 from FIG. 2.
[0238] As described with respect to encoder 20, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, loop filter unit 220, decoded picture buffer (DPB) 230, inter prediction unit 344, and intra prediction unit 354 are also referred to as forming an “embedded decoder” of video encoder 20. Thus, inverse quantization unit 310 may be functionally identical to inverse quantization unit 110, inverse transform processing unit 312 may be functionally identical to inverse transform processing unit 212, reconstruction unit 314 may be functionally identical to reconstruction unit 214, loop filter unit 320 may be functionally identical to loop filter 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230. Accordingly, the descriptions provided for the respective units and functions of video encoder 20 correspondingly apply to the respective units and functions of video decoder 30.
[0239] Entropy Decoding The entropy decoding unit 304 is configured to parse the bitstream 21 (or generally, the encoded picture data 21) and, e.g., perform entropy decoding on the encoded picture data 21 to obtain, e.g., quantized coefficients 309 and / or decoded coding parameters (not shown in FIG. 3 ), such as inter-prediction parameters (e.g., reference picture indices and motion vectors), intra-prediction parameters (e.g., intra-prediction modes or indices), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to the encoding schemes described with respect to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 may be further configured to provide the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the mode application unit 360 and other parameters to other units of the decoder 30. Video decoder 30 may receive syntax elements at the video slice level and / or the video block level. In addition to or instead of slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may also be received or used.
[0240] inverse quantization Inverse quantization unit 310 may be configured to receive a quantization parameter (QP) (or generally, information regarding inverse quantization) and quantized coefficients from encoded picture data 21 (e.g., by parsing and / or decoding by entropy decoding unit 304), and apply inverse quantization to decoded quantized coefficients 309 based on the quantization parameter to obtain dequantized coefficients 311. Dequantized coefficients 311 are sometimes referred to as transform coefficients 311. The inverse quantization process may use the quantization parameter determined by video encoder 20 for each video block in a video slice (or tile or tile group) to determine the degree of quantization, and similarly, the degree of dequantization to be applied.
[0241] Inverse transformation The inverse transform processing unit 312 may be configured to receive the dequantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the dequantized coefficients 311 to obtain reconstructed residual blocks 213 in the sample domain. The reconstructed residual blocks 213 may also be referred to as transform blocks 313. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may further be configured to receive transform parameters or corresponding information from the encoded picture data 21 (e.g., by parsing and / or decoding by the entropy decoding unit 304) to determine the transform to apply to the dequantized coefficients 311.
[0242] Reconstruction The reconstruction unit 314 (e.g., an adder or summer 314) may be configured to add the reconstructed residual block 313 to the prediction block 365 to obtain a reconstructed block 315 in the sample domain, e.g., by adding sample values of the reconstructed residual block 313 and the prediction block 365.
[0243] filtering A loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstructed block 315 to obtain a filtered block 321, e.g., to smooth pixel transitions or otherwise improve video quality. The loop filter unit 320 may include one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, e.g., an adaptive loop filter (ALF), a noise suppression filter (NSF), or any combination thereof. In one example, the loop filter unit 320 may include a deblocking filter, an SAO filter, and an ALF filter. The order of the filtering processes may be deblocking filter, SAO, and ALF. In another example, a process called luma mapping with chroma scaling (LMCS) (i.e., an adaptive in-loop shaper) is added. This process is performed before deblocking. In another example, the deblocking filter process may also be applied to internal sub-block edges, e.g., affine sub-block edges, ATMVP sub-block edges, sub-block transform (SBT) edges, and intra sub-partition (ISP) edges. Although loop filter unit 320 is shown as an in-loop filter in FIG. 3, in other configurations, loop filter unit 320 may be implemented as a post-loop filter.
[0244] Decoded Picture Buffer The decoded video blocks 321 of the picture are then stored in a decoded picture buffer 330. The decoded picture buffer 330 stores the decoded picture 331 as a reference picture for subsequent motion compensation for other pictures and / or for output or display.
[0245] Decoder 30 is configured to output decoded pictures 311 for presentation or viewing to a user, for example via output 312.
[0246] prediction The inter prediction unit 344 may be identical to the inter prediction unit 244 (in particular, the motion compensation unit), and the intra prediction unit 354 may be identical in function to the intra prediction unit 254, and performs the division or partitioning decision and prediction based on the division and / or prediction parameters or respective information received from the encoded picture data 21 (e.g., by parsing and / or decoding, e.g., by the entropy decoding unit 304). The mode application unit 360 may be configured to perform block-wise prediction (intra prediction or inter prediction) based on the reconstructed picture, block, or respective sample (filtered or unfiltered) to obtain a prediction block 365.
[0247] When a video slice is coded as an intra-coded (I) slice, intra prediction unit 354 of mode application unit 360 is configured to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra prediction mode and data from previously decoded blocks of the current picture. When a video picture is coded as an inter-coded (i.e., B or P) slice, inter prediction unit 344 (e.g., a motion compensation unit) of mode application unit 360 is configured to generate a prediction block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from entropy decode unit 304. For inter prediction, the prediction block may be generated from one of the reference pictures in one of the reference picture lists. Video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference pictures stored in DPB 330. The same or similar may be used for or by other embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices). For example, video may be encoded using I, P, or B tile groups and / or tiles.
[0248] Mode application unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing motion vectors or related information and other syntax elements, and use the prediction information to generate a prediction block for the current video block to be decoded. For example, mode application unit 360 uses some of the received syntax elements to determine the prediction mode (e.g., intra-prediction or inter-prediction) used to encode the video blocks of the video slice, the inter-prediction slice type (e.g., B slice, P slice, or GPB slice), construction information for one or more of the reference picture lists for the slice, motion vectors for each inter-encoded video block of the slice, inter-prediction status for each inter-encoded video block of the slice, and other information for decoding video blocks in the current video slice. The same or similar may be used for or by other embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices). For example, video may be encoded using I, P, or B tile groups and / or tiles.
[0249] The embodiment of video decoder 30 shown in FIG. 3 may be configured to partition and / or decode pictures by using slices (also called video slices), where a picture can be divided into or decoded using one or more slices (typically non-overlapping), each of which may contain one or more blocks (e.g., CTUs) or one or more groups of blocks (e.g., tiles (H.265 / HEVC and VVC) or bricks (VC)).
[0250] The embodiment of video decoder 30 shown in FIG. 3 may be configured to divide and / or decode a picture using slices / tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be divided into one or more slices / tile groups (typically non-overlapping) and decoded using one or more slice / tile groups, where each slice / tile group may, for example, contain one or more blocks (e.g., CTUs) or one or more tiles, where each tile may, for example, be rectangular in shape and contain one or more blocks (e.g., CTUs), e.g., full blocks or partial blocks.
[0251] Other variations of the video decoder 30 may be used to decode the encoded picture data 21. For example, the decoder 30 may generate an output video stream without the loop filter unit 320. For example, a non-transform-based decoder 30 may inverse quantize the residual signal directly for certain blocks or frames without the inverse transform processing unit 312. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.
[0252] It should be understood that in the encoder 20 and the decoder 30, the processing result of the current step may be further processed and then output to the next step. For example, after interpolation filtering, motion vector derivation, or loop filtering, further operations such as clipping or shifting may be performed on the processing result of the interpolation filtering, motion vector derivation, or loop filtering.
[0253] It should be noted that further operations may be applied to the derived motion vector of the current block (including, but not limited to, control point motion vectors in affine mode, sub-block motion vectors in affine, planar, and ATMVP modes, temporal motion vectors, etc.). For example, the value of a motion vector is constrained to a predefined range according to its representation bits. If the representation bits of a motion vector are bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponentiation. For example, if bitDepth is set to 16, the range is -32768 to 32767, and if bitDepth is set to 18, the range is -131072 to 131071. For example, the values of derived motion vectors (e.g., MVs of four 4x4 sub-blocks in one 8x8 block) are constrained so that the maximum difference between the integer parts of the MVs of the four 4x4 sub-blocks is N pixels or less, e.g., 1 pixel or less. Here we provide two methods for constraining motion vectors according to bitDepth.
[0254] 4 is a schematic diagram of a video encoding device 400 according to an embodiment of the present disclosure. The video encoding device 400 is suitable for implementing the disclosed embodiments described herein. In an embodiment, the video encoding device 400 may be a decoder, such as the video decoder 30 of FIG. 1A, or an encoder, such as the video encoder 20 of FIG. 1A.
[0255] The video encoding device 400 includes an ingress port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data; a processor, logic unit, or central processing unit (CPU) 430 for processing the data; a transmitter unit (Tx) 440 and an egress port 450 (or output port 450) for transmitting the data; and a memory 460 for storing the data. The video encoding device 400 may also have optical-to-electrical (OE) and electrical-to-optical (EO) components coupled to the ingress port 410, receiver unit 420, transmitter unit 440, and egress port 450 for the entry and exit of optical or electrical signals.
[0256] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 communicates with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 includes an encoding module 470. The encoding module 470 implements the above-disclosed embodiments. For example, the encoding module 470 implements, processes, prepares, or provides various encoding operations. Thus, the inclusion of the encoding module 470 substantially improves the functionality of the video encoding device 400 and enables transformation of the video encoding device 400 into different states. Alternatively, the encoding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0257] Memory 460 may include one or more disks, tape drives, and solid-state drives, may be used as overflow data storage, may store programs when the programs are selected for execution, and may store instructions and data read during program execution. Memory 460 may be, for example, volatile and / or nonvolatile, and may be read-only memory (ROM), random access memory (RAM), ternary content addressable memory (TCAM), and / or static random access memory (SRAM).
[0258] FIG. 5 is a simplified block diagram of a device 500 that may be used as either or both of source device 12 and destination device 14 from FIG. 1A, according to an example embodiment.
[0259] Processor 502 in device 500 may be a central processing unit. Alternatively, processor 502 may be any other type of device or devices now existing or later developed that are capable of manipulating or processing information. While the disclosed implementations can be practiced using a single processor as shown, such as processor 502, advantages in speed and efficiency can be achieved using multiple processors.
[0260] The memory 504 in the device 500 may, in some implementations, be a read-only memory (ROM) device or a random-access memory (RAM) device. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 that is accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510, which include at least one program that allows the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1-N, which further include a video encoding application that performs the methods described herein.
[0261] The device 500 may also include one or more output devices, such as a display 518. The display 518, in one example, may be a touch-sensitive display that combines a display with touch-sensitive elements operable to sense touch input. The display 518 may be coupled to the processor 502 via the bus 512.
[0262] Although shown here as a single bus, bus 512 of device 500 may be comprised of multiple buses. Additionally, secondary storage 514 may be directly coupled to other components of device 500 or may be accessed over a network, and may include a single integrated unit such as a memory card or multiple units such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of configurations.
[0263] The following describes embodiments of the present invention with reference to the accompanying drawings in the specification. It should be understood that the embodiments described herein are merely used to describe and explain the present invention, and are not intended to limit the present invention.
[0264] An exemplary scenario for applying a deblocking filter is shown in Figures 6A and 6B. As shown in Figure 6A, blocks 601 and 602 (also referred to as P and Q) are two coding or transform blocks, and the size of the CU is 16x4 samples. As shown in Figures 6A and 6B, the techniques presented herein are applied to both vertical and horizontal edges.
[0265] Video coding may be performed based on color spaces and color formats. For example, color video plays an important role in multimedia systems. Various color spaces are used to efficiently represent color. A color space specifies a color numerically using multiple components. A common color space is the RGB color space, where a color is represented as a combination of three primary color component values (i.e., red, green, and blue). For color video compression, the YCbCr color space has been widely used, as described in A. Ford and A. Roberts, "Color space conversions," University of Westminster, London, Tech. Rep., August 1998.
[0266] YCbCr can be easily converted from the RGB color space via a linear transformation, and in the YCbCr color space, redundancy between different components, i.e., inter-component redundancy, is significantly reduced. One advantage of YCbCr is that it is backward compatible with black-and-white television because the Y signal carries luminance information. Furthermore, subsampling the Cb and Cr components in a 4:2:0 chroma sampling format reduces chroma bandwidth with significantly less subjective impact than subsampling in an RGB color space. Because of these advantages, YCbCr remains the dominant color space in video compression. Other color spaces, such as YCoCg, are also used in video compression. In this disclosure, luma (or L or Y) and two chromas (Cb and Cr) are used to represent the three color components in video compression schemes, regardless of the actual color space used. For example, if the sampling structure of a chroma format is 4:2:0 sampling, each of the two chroma arrays has half the height and half the width of the luma array. An example of the nominal vertical and horizontal relative positions of luma and chroma samples in a picture is shown in Figure 7A. Figure 7B shows an example of 4:2:0 sampling. Figure 7B shows an example of co-located luma and chroma blocks. If the video format is YUV4:2:0, there is one 16x16 luma block and two 8x8 chroma blocks.
[0267] Specifically, a coding block or transform block includes a luma block and two chroma blocks. As shown, the luma block includes four times as many samples as the chroma block. Specifically, the chroma block includes N samples by N samples, while the luma block includes 2N samples by 2N samples. Thus, the luma block is four times the resolution of the chroma blocks. For example, if a YUV4:2:0 format is used, the luma samples may be downsampled by four times (e.g., twice as wide and twice as high). YUV is a color encoding system that uses a color space with a luma component Y and two chroma components U and V.
[0268] An example scenario for applying a deblocking filter to two luma blocks is shown in Figure 8. There is a luma block edge 803 between a first luma block 801 of a first image block (601, 601') and a second luma block 802 of a second image block (602, 602').
[0269] Scenarios for applying deblocking filters to two chroma blocks are illustrated in Figures 9A-9H. Figure 9A illustrates a chroma block P 901 of a first image block (601, 601'), a chroma block Q 902 of a second image block (602, 602'), and a chroma block edge 903 to which a deblocking filter is applied. As illustrated in Figure 9A, the vertical chroma block edge 903 between chroma blocks 901 and 902 is filtered in accordance with an embodiment of the present invention. Figures 9B-9H each illustrate an example of a chroma block for chroma block P and chroma block Q. For example, in Figure 9B, a vertical Cb component edge 913 between Cb components 911 and 912 is filtered in accordance with an embodiment of the present invention. In Figure 9C, a vertical Cr component edge 923 between Cr components 921 and 922 is filtered in accordance with an embodiment of the present invention.
[0270] In previous VVC deblocking designs, whenever a given chroma block (Cb or Cr) uses the Joint Cb-Cr Residual (JCCR) coding tool, the corresponding QP used in chroma deblocking is derived from the chroma QP mapping table designed for the individual Cb and Cr components. For joint Cb-Cr coded blocks or joint Cb-Cr components, using the ChromaQPTable designed for the Cb and Cr components can lead to an incorrect chroma QP derivation, thereby affecting the deblocking decision and / or deblocking process (which depends on the chroma QP value). This can result in inaccurate deblocking decisions and / or deblocking processes, and thus, potentially leading to blocking artifacts remaining in the image. This affects the overall visual quality of the coded image.
[0271] In previous Versatile Video Coding (VVC) deblocking designs, the chroma QP is derived as follows: Variable Qp Q and Qp P is the sample q 0,0 and p 0,0 Qp of coding units containing coding blocks each containing Y The variable Qp is set equal to the value Q is the Qp of the corresponding luma block Q. Y represents the value, and the variable Qp P is the Qp of the corresponding luma block P Y It is understood that it represents a value.
[0272] Variable Qp C is derived as follows: qPi=Clip3(0,63,((Qp Q +Qp P +1)>>1)+cQpPicOffset) (8-1132) Qp C =ChromaQpTable[cIdx-1][qPi] (8-1133) So the chroma QP values used in chroma deblocking are essentially derived by averaging the luma QP values, and then the ChromaQPtable is used to map the averaged luma QP to a chroma QP.
[0273] A problem with previous deblocking schemes is that for joint residual Cb-Cr (JCCR) coded blocks or joint Cb-Cr components, chroma QP mapping is also performed using a ChromaQPtable specially designed for the Cb and Cr components.
[0274] Embodiments of the present invention aim to improve conventional deblocking filtering.
[0275] The disclosure presented herein relates to a deblocking filter device, encoder, decoder, and corresponding method capable of accurately deblocking chroma block edges (903, 913, 923, 933, 943, 953, 963, 973) between first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) of a first image block (601, 601') and second chroma blocks (902, 912, 922, 932, 942, 952, 962, 972) of a second image block (602, 602'). Furthermore, the deblocking should be efficient and accurate.
[0276] Embodiments of the technical implementation of the present application According to an embodiment of the present invention, whenever a given chroma block (Cb or Cr) uses the Joint Chroma Coding (JCCR) tool, the chroma quantization parameter Qpc is determined based on the averaged luma quantization parameter by using a different transformation rule compared to the Cb and Cr color components.
[0277] According to an embodiment of the present invention, whenever a given chroma block (Cb or Cr) uses the Joint Chroma Coding (JCCR) tool, the corresponding QP used in chroma deblocking should be derived using a ChromaQPTable designed for the Joint Cb-Cr coded block or Joint Cb-Cr components (short for JCCR block).
[0278] The chroma QP mapping table is specially designed for JCCR blocks, where the index is represented by an integer value, which is not the same as the Cb and Cr index values and can be values 3, 4, 5, etc.
[0279] In one example, every chroma component (Cb, Cr, or joint Cb-Cr) has its own chroma QP mapping table, as shown in Figure 13. In another example, a single table with three different entries for Cb, Cr, and joint Cb-Cr, as shown in Figures 12A and 12B.
[0280] In one aspect, the present invention provides a method for correctly deriving a chroma QP to be used when at least one of the adjacent chroma blocks is a joint residual Cb-Cr (JCCR) coded block or when the at least one of the chroma blocks is coded using a joint residual Cb-Cr (JCCR) mode.
[0281] In another aspect, the present invention performs deblocking decisions and / or deblocking filtering processes that indirectly depend on correctly derived chroma QP values, so that blocking artifacts can be reduced, thus improving the overall subjective quality. [Example]
[0282] First embodiment of the present application According to a first aspect, the present invention relates to a deblocking method for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block in image encoding and / or image decoding. The unblocking method includes: performing a decision process for the chroma block edges, the decision process including: If at least one of the first chroma block and the second chroma block is a joint Cb-Cr (JCCR) coded block (or at least one of the first chroma block and the second chroma block uses a joint Cb-Cr residual (JCCR) tool, or at least one of the first chroma block and the second chroma block is coded using a joint Cb-Cr residual (JCCR) mode), The first luma QP (Qp YP ) and the second luma QP (Qp YQ , etc.), determining the averaged luma quantization parameter qPi; Based on the averaged luma quantization parameter qPi, by using a chroma Qp mapping table (e.g., ChromaQPTable) whose index is a first index value, or by using a chroma Qp mapping table including an information entry whose index is a first index value, a chroma quantization parameter Qp c wherein the first index value indicates that the at least one of the first chroma block and the second chroma block is a JCCR (Joint Residual Cb-Cr) coded block, or the first index value corresponds to a case where the at least one of the first chroma block and the second chroma block uses a JCCR tool; Based on the determination result of the determination process, a filtering process is performed on the chroma block edges. The decision result indicates whether the block edge (403, 504, 903) is filtered and / or whether long filtering is performed.
[0283] In one possible implementation of the method according to the first aspect itself, the first index value corresponds to a chroma Qp mapping table; or The first index value corresponds to an information entry in a chroma Qp mapping table.
[0284] In one possible implementation of any of the above implementations of the first aspect or of the method according to the first aspect itself, the first index value is different from the value of the component (Cb, Cr) index (cIdx), or the first index value is different from the value of the component (Cb, Cr) index (cIdx) minus one.
[0285] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, the first index value is a component (joint Cb-Cr component) index (cIdx) value that is 2, or the first index value is 3.
[0286] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, the chroma quantization parameter Qp c is used in the decision process for the chroma block edges, or the chroma quantization parameter Qp c is used directly or indirectly to determine whether the chroma block edges are filtered and / or whether long filtering is performed.
[0287] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, The value of the first threshold variable (e.g., β′) is c or the first clipped Qp c is determined using a mapping table based on; a value of a first variable (e.g., β) is derived based on the value of the first threshold variable (e.g., β′); Here, the value of the first variable (e.g., β) is used for the decision process regarding the chroma block edge, or the value of the first variable (e.g., β) is used to determine whether the chroma block edge is filtered and / or whether long filtering is performed.
[0288] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, A second threshold variable (e.g., t C ') is the value of the chroma quantization parameter Qp c or the second clipped Qp c is determined using a mapping table based on; A second variable (e.g., t C ) is greater than the second threshold variable (e.g., t C ') is derived based on the value of Here, the second variable (e.g., t C ) is used for the decision process about the chroma block edge (or the second variable (e.g., t C ) is used for the filtering process for the chroma block edges, which is used to determine whether the chroma block edges are filtered and / or whether long filtering is performed.
[0289] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, The mapping table includes mappings between a plurality of the first threshold variables, a plurality of the second threshold variables, and a plurality of quantization parameters.
[0290] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, the first chroma block is a first chroma component (e.g., a Cb component) of the first image block and the second chroma block is a first chroma component (e.g., a Cb component) of the second image block; and / or The first chroma block is a second chroma component (e.g., a Cr component) of the first image block, and the second chroma block is a second chroma component (e.g., a Cr component) of the second image block.
[0291] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, at least one of the first chroma component (e.g., Cb component) of the first image block and the first chroma component (e.g., Cb component) of the second image block is the joint Cb-Cr component or is coded using a joint Cb-Cr residual (JCCR) mode; and / or At least one of the second chroma component (e.g., Cr component) of the first image block and the second chroma component (e.g., Cr component) of the second image block is the joint Cb-Cr component or is coded using a joint Cb-Cr residual (JCCR) mode; or At least one of the first and second chroma blocks is a Joint Cb-Cr Residual (JCCR) coded block.
[0292] In one possible implementation of any of the above implementations of the first aspect or a method according to the first aspect itself, the first image block and the second image block are transform blocks; or The first image block and the second image block are coding blocks.
[0293] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, Whether at least one of the first chroma block and the second chroma block uses the Joint Coding of Chrominance Residual (JCCR) tool is determined based on a flag at the transform unit TU level (e.g., tu_joint_cbcr_residual_flag).
[0294] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, if the TU-level flag (e.g., tu_joint_cbcr_residual_flag) for the first image block is true, then the first chroma block uses a Joint Coding of Chrominance Residual (JCCR) tool (or the first chroma block is coded using a Joint Cb-Cr Residual (JCCR) mode, or the first chroma block is a Joint Cb-Cr Residual (JCCR) coded block or joint Cb-Cr component); or If the TU-level flag (e.g., tu_joint_cbcr_residual_flag) of the second image block is true, then the second chroma block uses the Joint Coding of Chrominance Residual (JCCR) tool (or the second chroma block is coded using the Joint Cb-Cr Residual (JCCR) mode, or the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block or a Joint Cb-Cr component).
[0295] In one possible implementation of any of the above implementations of the first aspect or a method according to the first aspect itself, the chroma Qp mapping table is specifically designed for joint Cb-Cr residual (JCCR) coded blocks, or the chroma Qp mapping table is designed for the first chroma component (e.g., Cb component), the second chroma component (e.g., Cr component) and the joint Cb-Cr component.
[0296] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, The chroma Qp mapping table (e.g., ChromaQPTable) can be used to map multiple chroma quantization parameters Qp c and a plurality of the luma quantization parameters qPi, c is associated with said first index value; or The chroma Qp mapping table (e.g., ChromaQPTable) includes: The first set of chroma quantization parameters Qp JCCR , the second set of chroma quantization parameters Qp cb , and a third set of chroma quantization parameters Qp cr wherein each of the first set, the second set, and the third set corresponds to a plurality of the luma quantization parameters qPi, and the first set of chroma quantization parameters Qp JCCR is associated with the first index value and the second set of chroma quantization parameters Qp cb is associated with a second index value and the third set of chroma quantization parameters Qp cr is associated with the third index value.
[0297] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, The first index value (e.g., 3) indicates that at least one of the first chroma block and the second chroma block (402, 502) is a joint Cb-Cr residual (JCCR) coded block.
[0298] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, the first index value or the joint Cb-Cr component index (cIdx) is an integer value such as 3, 4, 5, ...
[0299] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, If the first chroma block is a first chroma component (e.g., a Cb component) of the first image block and the second chroma block is a first chroma component (e.g., a Cb component) of the second image block, the color component index (cIdx) has a second value that is 1; or If the first chroma block is a second chroma component (e.g., a Cr component) of the first image block and the second chroma block is a second chroma component (e.g., a Cr component) of the second image block, the color component index (cIdx) has a third value that is 2; or If the first chroma block is a first chroma component (e.g., a Cb component) of the first image block, the second chroma block is a first chroma component (e.g., a Cb component) of the second image block, and at least one of the first chroma components is a Joint Cb-Cr Residual (JCCR) component, the color component index (cIdx) has the first value being 3; or the color component index (cIdx) has the first value of 3 when the first chroma block is a second chroma component (e.g., a Cr component) of the first image block, the second chroma block is a second chroma component (e.g., a Cr component) of the second image block, and at least one of the second chroma components is a Joint Cb-Cr Residual (JCCR) component; or If at least one of the first and second chroma blocks is a joint Cb-Cr residual (JCCR) coded block, the color component index (cIdx) has the first value, which is 3.
[0300] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, the chroma Qp mapping table (e.g., ChromaQPTable) includes: The first set of chroma quantization parameters Qp JCCR , the second set of chroma quantization parameters Qp cb , and a third set of chroma quantization parameters Qp cr wherein each of the first set, the second set, and the third set corresponds to a fourth set of the luma quantization parameters qPi and the first set of chroma quantization parameters Qp JCCR is associated with the color component index (cIdx) having the first value, and the second set of chroma quantization parameters Qp cb is associated with the color component index (cIdx) having the second value, and the third set of chroma quantization parameters Qp cr is associated with the color component index (cIdx) having the third value.
[0301] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, The chroma Qp mapping table (e.g., ChromaQPTable) may be configured to map a plurality of the chroma quantization parameters Qp c and a plurality of the luma quantization parameters qPi, c is associated with the first value of the component (joint Cb-Cr component) index (cIdx).
[0302] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, the first chroma block (401, 501) has a block size that is M*N or N*M, where M and N represent the width and height of the first chroma block, respectively, or N and M represent the width and height of the first chroma block, respectively; the second chroma block (402, 502) has a block size that is L*T or T*L, where L and T represent the width and height of the second chroma block, respectively, or T and L represent the width and height of the second chroma block, respectively; where N or T is an even integer greater than or equal to the threshold. n (e.g., 4, 8, 16, 32...), where n is a positive integer.
[0303] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, If the chroma block edge (903) is a horizontal chroma block edge (903), the direction along the height N of the first chroma block is perpendicular to the chroma block edge (903), and the direction along the height T of the second chroma block is perpendicular to the chroma block edge (903), then either or both of the heights of the first and second chroma blocks are an even integer greater than 4 (or equal to or greater than 8), 2 n is; or If the chroma block edge (903) is a vertical chroma block edge (403, 504), the direction along the width N of the first chroma block is perpendicular to the block edge (903), and the direction along the width T of the second chroma block is perpendicular to the block edge (903), then either or both of the widths of the first and second chroma blocks are an even integer greater than 4 (or equal to or greater than 8), 2 n is.
[0304] In one possible implementation of any of the above implementations of the first aspect or the method according to the first aspect itself, the second image block is a current block and the first image block is a neighboring block of the current block.
[0305] Solution 1A check is performed to see if either block P or block Q, or both block P and block Q, use the Joint Cb-Cr Residual (JCCR) tool. If neither block P nor Q uses the JCCR tool, chroma QP mapping is performed in the same manner as currently done for Cb and Cr blocks (see Equations 8-1132 and 8-1133). However, if one of those blocks uses the JCCR tool, the average luma QP value of the two blocks P and Q is derived in the same manner as currently designed in VVC 6.0 (see Equation 8-1132). Furthermore, when mapping luma Qp to chroma QP, one exemplary manner uses a chroma QP mapping table designed for joint Cb-Cr residual (JCCR) coded blocks or joint Cb-Cr components; alternatively, a chroma QP mapping table designed for joint Cb-Cr components and chroma components (Cb, Cr) may be used. This is shown in Equation 8-1133'.
[0306] Thus, equation 8-1132 remains the same, but equation 8-1133', which differs from equation 8-1133, is shown below: qPi=Clip3(0,63,((Qp Q +Qp P +1)>>1)+cQpPicOffset) (8-1132) Qp C =ChromaQpTable[2][qPi] (8-1133')
[0307] The specification text changes for Solution 1 are given below with respect to section 8.8.3.6.3 of document JVET-O2001(version-vE):
[0308] 8.8.3.6.3 Chroma Block Edge Decision Process Variable Qp Q and Qp P are sample q 0,0 and p 0,0 Qp of the coding unit containing the coding block containing Yis set equal to the value. Variable Qp C is derived as follows: qPi=Clip3(0,63,((Qp Q +Qp P +1)>>1)+cQpPicOffset) (8-1132) Sample p 0,0 or q 0,0 is in translation units with tu_joint_cbcr_residual_flag equal to 1, Qp C =ChromaQpTable[2][qPi] (8-1133 If not, Qp C =ChromaQpTable[cIdx-1][qPi] (8-1133) ……
[0309] Sample Q 0,0 and p 0,0 If the blocks containing are luma blocks or luma components, then cIdx=0, Sample Q 0,0 and p 0,0 is the first chroma component (Cb), then cIdx=1; Sample Q 0,0 and p 0,0 If the blocks containing Sample Q 0,0 and p 0,0 It can be noted that if either or both of the blocks containing cIdx are joint Cb-Cr residual (JCCR) coded blocks or joint Cb-Cr components, then cIdx=3.
[0310] Determining whether either block P or block Q, or both blocks P and Q, use a Joint Cb-Cr Residual (JCCR) tool may include: Sample p 0,0If is in transform units with tu_joint_cbcr_residual_flag equal to 1, then block P is determined to use the Joint Cb-Cr Residual (JCCR) tool; and / or Sample Q 0,0 If Q is in transform units with tu_joint_cbcr_residual_flag equal to 1, then block Q is determined to use the Joint Cb-Cr Residual (JCCR) tool.
[0311] The beneficial effects and advantages of Solution 1 according to an embodiment of the present invention include that the indexing of the ChromaQPTable mapping table is modified based on checking whether the current block uses JCCR or not, without major changes to the transformation mapping. [Example]
[0312] Second embodiment of the present application According to a second aspect, the present invention relates to a deblocking method for deblocking a chroma block edge 903, 913, 923 between a first chroma block 901, 911, 921 of a first image block 601, 601' and a second chroma block 902, 912, 922 of a second image block 602, 602' in image encoding and / or decoding, the deblocking method comprising: performing a decision process for the chroma block edges, the decision process including: Chroma quantization parameter Qp for the first chroma block 901, 911, 921 by using a chroma Qp mapping table (e.g., ChromaQpTable[0], ChromaQpTable[1], ChromaQpTable[2] in tables 1200, 1200', 1301, 1302, 1303) or an information entry in the chroma Qp mapping table indicated by an index (e.g., component index cIdx or row index). Cpthe first luma QP (e.g., Qp YP ) where the index has a first index value (e.g., 3) if the first chroma block is a Joint Cb-Cr Residual (JCCR) coded block, or the index (cIdx) has a second index value (e.g., 1 or 2) if the first chroma block is the chroma component of the first image block; Chroma quantization parameter Qp for the second chroma block 902, 912, 922 by using a chroma Qp mapping table (e.g., ChromaQpTable) or an information entry in the chroma Qp mapping table indicated by an index (e.g., component index cIdx). Cq the second luma QP (say Qp YQ ) where the index (cIdx) has a first value (e.g., 3) if the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block, or the index (cIdx) has a second value (e.g., 1 or 2) if the second chroma block is the chroma component of the second image block; The chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter Qp C Determine; Based on the determination result of the determination process, a filtering process is performed on the chroma block edges.
[0313] It can be seen that the decision result indicates whether the block edges are filtered or not and / or whether long filtering is performed or not.
[0314] In one possible implementation of the method according to the second aspect itself, Different index values correspond to different information entries in the chroma QP mapping table, or different index values correspond to different chroma QP mapping tables.
[0315] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, the chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter Qp C The step of determining: The averaged first chroma component (e.g., Cb component) quantization parameter QpCb is a first chroma component (e.g., Cb component) quantization parameter QpCbp for the first chroma component (e.g., Cb component) of the first image block; and based on the first chrominance component (e.g., Cb component) quantization parameter QpCbq for the first chrominance component (e.g., Cb component) of the second image block This includes deciding.
[0316] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, the chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter Qp C The step of determining: The averaged second chroma component (e.g., Cr component) quantization parameter QpCr is a second chroma component (e.g., Cr component) quantization parameter QpCrp for the second chroma component (e.g., Cr component) of the first image block; and based on the second chroma component (e.g., Cr component) quantization parameter QpCrq for the second chroma component (e.g., Cr component) of the second image block This includes deciding.
[0317] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, the averaged and rounded chroma quantization parameter Qp c is used in the decision process for the chroma block edges, or the averaged and rounded chroma quantization parameter Qp c is used directly or indirectly to determine whether the chroma block edges are filtered and / or whether long filtering is performed.
[0318] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, a value of a first threshold variable (e.g., β') is determined based on the averaged rounded chroma quantization parameter Qpc or the first clipped Qpc using a mapping table; a value of a first variable (e.g., β) is derived based on the value of the first threshold variable (e.g., β′); The value of the first variable (e.g., β) is used for the decision process about the chroma block edge, or whether the block edge is filtered and / or whether long filtering is performed.
[0319] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, A second threshold variable (e.g., t C ') is determined using a mapping table based on the averaged rounded chroma quantization parameter Qpc or the second clipped Qpc; A second variable (e.g., t C) is greater than the second threshold variable (e.g., t C ') is derived based on the value of The value of the second variable (e.g., t C ) is used for the decision process for the chroma block edges (or for determining whether the block edges are filtered and / or whether long filtering is performed) and for the filtering process for the chroma block edges.
[0320] In one possible implementation of any of the above implementations of the second aspect or a method according to the second aspect itself, the mapping table includes mappings between a plurality of the first threshold variables, a plurality of the second threshold variables, and a plurality of quantization parameters.
[0321] In one possible implementation of any of the above implementations of the second aspect or a method according to the second aspect itself, the first chroma block is a first chroma component (e.g., a Cb component) of the first image block and the second chroma block is a first chroma component (e.g., a Cb component) of the second image block; or The first chroma block is a second chroma component (e.g., a Cr component) of the first image block, and the second chroma block is a second chroma component (e.g., a Cr component) of the second image block.
[0322] In one possible implementation of any of the above implementations of the second aspect or a method according to the second aspect itself, the first image block and the second image block are transform units or transform blocks.
[0323] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, whether the at least one of the first chroma block and the second chroma block (402, 502) is coded using a joint Cb-Cr residual (JCCR) mode or whether the at least one of the first chroma block and the second chroma block (402, 502) is a joint Cb-Cr residual (JCCR) coded block is determined based on a flag at the transform unit TU level (e.g., tu_joint_cbcr_residual_flag).
[0324] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, if the TU-level flag (e.g., tu_joint_cbcr_residual_flag) for the first image block is true, then the first chroma block uses a Joint Coding of Chrominance Residual (JCCR) tool, or the first chroma block is coded using a Joint Cb-Cr Residual (JCCR) mode; or If the TU-level flag (e.g., tu_joint_cbcr_residual_flag) for the second image block is true, the second chroma block uses the Joint Coding of Chrominance Residual (JCCR) tool, or the second chroma block is coded using the Joint Cb-Cr Residual (JCCR) mode.
[0325] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, the chroma Qp mapping table (e.g., ChromaQPTable) may be configured to map a plurality of the chroma quantization parameters Qp c and a plurality of said luma quantization parameters Qp luma and the plurality of chroma quantization parameters Qp c is associated with the first index value or the second index value.
[0326] In one possible implementation of any of the above implementations of the second aspect or a method according to the second aspect itself, the first chroma block has a block size that is M*N or N*M, where M and N represent the width and height of the first chroma block, respectively, or N and M represent the width and height of the first chroma block, respectively; the second chroma block has a block size that is L*T or T*L, where L and T represent the width and height of the second chroma block, respectively, or where T and L represent the width and height of the second chroma block, respectively; where N or T is an even integer greater than or equal to the threshold. n (e.g., 4, 8, 16, 32...), where n is a positive integer.
[0327] In one possible implementation of any of the above implementations of the second aspect or the method according to the second aspect itself, If the chroma block edge is a horizontal chroma block edge, the direction along the height N of the first chroma block is perpendicular to the chroma block edge, and the direction along the height T of the second chroma block is perpendicular to the chroma block edge, then either or both of the heights of the first and second chroma blocks is an even integer greater than 4 (or equal to or greater than 8), 2 n is; or The chroma block edge is a vertical chroma block edge, the direction along the width N of the first chroma block is perpendicular to the block edge, the direction along the width T of the second chroma block is perpendicular to the block edge, and one or both of the first and second chroma block widths is an even integer 2 greater than 4 (or 8 or greater). n is.
[0328] In one possible implementation of any of the above implementations of the second aspect or a method according to the second aspect itself, the second image block is a current block and the first image block is a neighboring block of the current block.
[0329] Solution 2 : Based on the JCCR flags, the luma QP is mapped to a chroma QP separately for each of blocks P and Q by using the respective chroma QP mapping tables, and then the average of those chroma QP values is set as the final QP value used for deblocking.
[0330] If block Q uses the Joint Cb-Cr Residual (JCCR) tool, then Qpc Q =ChromaQpTable[2][Qp Q +cQpPicOffset], otherwise Qpc Q =ChromaQpTable[cIdx-1][Qp Q +cQpPicOffset].
[0331] If block P uses JCCR, Qpc p =ChromaQpTable[2][Qp p +cQpPicOffset], otherwise Qpc p =ChromaQpTable[cIdx-1][Qp p +cQpPicOffset].
[0332] Qp C =Clip3(0,63,((Qpc Q +Qpc P +1)>>1)) (8-1132') It can be seen that ChromaQpTable[2] represents the chroma QP mapping table for Joint Cb-Cr Residual (JCCR) coded blocks.
[0333] The step of determining whether either block P or block Q, or both blocks P and Q, use a JCCR tool may include: Sample p 0,0Block P is determined to use the JCCR tool if it is in a translation unit with tu_joint_cbcr_residual_flag equal to 1; and / or sample q0,0 If is in a translation unit where tu_joint_cbcr_residual_flag is equal to 1, then block Q is determined to use the JCCR tool.
[0334] The specification text changes for Solution 2 are given below with respect to section 8.8.3.6.3 of document JVET-O2001(version-vE):
[0335] 8.8.3.6.3 Chroma Block Edge Decision Process Variable Qp Q and Qp P are sample q 0,0 and p 0,0 Qp of the coding unit containing the coding block containing Y is set equal to the value. Variable Qp C is derived as follows: Sample p 0,0 or q 0,0 is in translation units with tu_joint_cbcr_residual_flag equal to 1, ○Sample p 0,0 is in translation units with tu_joint_cbcr_residual_flag equal to 1, Qp Cp =ChromaQpTable[2][Qp P +cQpPicOffset] ○If not Qp Cp =ChromaQpTable[cIdx-1][Qp P +cQpPicOffset] ○ Sample q 0,0 is in translation units with tu_joint_cbcr_residual_flag equal to 1, Qp Cq =ChromaQpTable[2][Qpq +cQpPicOffset] ○If not Qp Cq =ChromaQpTable[cIdx-1][Qp q +cQpPicOffset] Qp C =Clip3(0,63,((Qp Cp +Qp Cq +1)>>1)) (8-1132) If not, qPi=Clip3(0,63,((Qp Q +Qp P +1)>>1)+cQpPicOffset) (8-1132) Qp C =ChromaQpTable[cIdx-1][qPi] (8-1133)
[0336] Variable Qp Q is the Qp for the corresponding luma block Q. Y represents the value, and the variable Qp P is the Qp for the corresponding luma block P Y It is understood that it represents a value.
[0337] The beneficial effect and advantage of Solution 2 according to an embodiment of the present invention is that the final derived QP for the JCCR block is more accurate compared to Solution 1, thus resulting in better subjective quality and thereby better deblocking decisions therein. [Example]
[0338] Third embodiment of the present application According to a third aspect, the present invention relates to a deblocking method for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block in image encoding and / or image decoding. The unblocking method includes: performing a decision process for the chroma block edges, the decision process including: Calculating the chroma quantization parameter Qp for the first chroma block by using a chroma Qp mapping table (e.g., ChromaQPTable) or an information entry in the chroma Qp mapping table indicated by an index (e.g., a component index cIdx or a row index). Cp the first luma QP (e.g., Qp YP ) where the index (cIdx) has a first index value (e.g., 3) if the first chroma block is a Joint Cb-Cr Residual (JCCR) coded block, or the index (cIdx) has a second index value (e.g., 1 or 2) if the first chroma block is the chroma component of the first image block; quantizing the chroma quantization parameter Qp for the second chroma block by using a chroma Qp mapping table (e.g., ChromaQPTable) or an information entry in the chroma Qp mapping table indicated by an index (e.g., component index cIdx); Cq the second luma QP (e.g., Qp YP ) where the index (cIdx) has a first value (e.g., 3) if the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block, or the index (cIdx) has a second value (e.g., 1 or 2) if the second chroma block is the chroma component of the second image block; The chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter QpC Determine; Based on the determination result of the determination process, a filtering process is performed on the chroma block edges.
[0339] the determination result being whether the block edge is filtered, and / or It can be seen to indicate whether long filtering is performed or not.
[0340] In one possible implementation of the method according to the third aspect itself, Different index values correspond to different information entries in the chroma QP mapping table, or different index values correspond to different chroma QP mapping tables.
[0341] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, if the first chroma block is coded using a JCCR mode, and the JCCR mode is a first JCCR mode (e.g., 1), a first chroma component (e.g., Cb component) quantization parameter QpCbp for the first chroma component (e.g., Cb component) of the first image block by using a chroma Qp mapping table whose index (e.g., component index cIdx) is the first index value, or by using a chroma Qp mapping table including an information entry whose index (e.g., component index cIdx) is the first index value, YP ) based on the decision; A second chroma component (e.g., Cr component) quantization parameter QpCrp for the second chroma component (e.g., Cr component) of the first image block is calculated by multiplying the first chroma component (e.g., Cb component) quantization parameter Qp Cbp The decision is based on the following:
[0342] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, if the second chroma block is coded using a JCCR mode, and the JCCR mode is a first JCCR mode (e.g., 1), a first chroma component (e.g., Cb component) quantization parameter QpCbq for the first chroma component (e.g., Cb component) of the second image block to a second luma QP (e.g., QpCbq) of a second luma block of the second image block by using a chroma Qp mapping table whose index (e.g., component index cIdx) is the first index value, or by using a chroma Qp mapping table including an information entry whose index (e.g., component index cIdx) is the first index value; YQ ) based on the decision; A second chroma component (eg, Cr component) quantization parameter QpCrq for the second chroma component (eg, Cr component) of the second image block is determined based on the first chroma component (eg, Cb component) quantization parameter QpCbq.
[0343] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, if the first chroma block is coded using a JCCR mode and the JCCR mode is a second JCCR mode (e.g., 2), a first chroma component (e.g., Cb component) quantization parameter QpCbp for the first chroma component (e.g., Cb component) of the first image block by using a chroma Qp mapping table whose index (e.g., component index cIdx) is the first index value, or by using a chroma Qp mapping table including an information entry whose index (e.g., component index cIdx) is the first index value, YP ) based on the decision; A second chroma component (eg, Cr component) quantization parameter QpCrp for the second chroma component (eg, Cr component) of the first image block is set as the first chroma component (eg, Cb component) quantization parameter QpCbp.
[0344] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, if the second chroma block is coded using a JCCR mode and the JCCR mode is a second JCCR mode (e.g., 2), a first chroma component (e.g., Cb component) quantization parameter QpCbq for the first chroma component (e.g., Cb component) of the second image block to a second luma QP (e.g., QpCbq) of a second luma block of the second image block by using a chroma Qp mapping table whose index (e.g., component index cIdx) is the first index value, or by using a chroma Qp mapping table including an information entry whose index (e.g., component index cIdx) is the first index value; YQ ) based on the decision; A second chroma component (eg, Cr component) quantization parameter QpCrq for the second chroma component (eg, Cr component) of the second image block is set as the first chroma component (eg, Cb component) quantization parameter QpCbq.
[0345] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, if the first chroma block is coded using a JCCR mode and the JCCR mode is a third JCCR mode (e.g., 3), a second chroma component (e.g., Cr component) quantization parameter QpCrp for the second chroma component (e.g., Cr component) of the first image block by using a chroma Qp mapping table whose index (e.g., component index cIdx) is the first index value, or by using a chroma Qp mapping table including an information entry whose index (e.g., component index cIdx) is the first index value, YP ) based on the decision; A first chroma component (eg, Cb component) quantization parameter QpCbp for the first chroma component (eg, Cb component) of the first image block is determined based on the second chroma component (eg, Cr component) quantization parameter QpCrp.
[0346] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, if the second chroma block is coded using a JCCR mode and the JCCR mode is a third JCCR mode (e.g., 3), a second chroma component (e.g., Cr component) quantization parameter QpCrq for the second chroma component (e.g., Cr component) of the second image block by using a chroma Qp mapping table whose index (e.g., component index cIdx) is the first index value, or by using a chroma Qp mapping table including an information entry whose index (e.g., component index cIdx) is the first index value, YQ ) based on the decision; A first chroma component (eg, Cb component) quantization parameter QpCbq for the first chroma component (eg, Cb component) of the second image block is determined based on the second chroma component (eg, Cr component) quantization parameter QpCrq.
[0347] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, the chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter Qp C The step of determining: The averaged first chroma component (e.g., Cb component) quantization parameter QpCb is a first chroma component (e.g., Cb component) quantization parameter QpCbp for the first chroma component (e.g., Cb component) of the first image block; and based on the first chrominance component (e.g., Cb component) quantization parameter QpCbq for the first chrominance component (e.g., Cb component) of the second image block This includes deciding.
[0348] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, the chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter Qp C The step of determining: The averaged second chroma component (e.g., Cr component) quantization parameter QpCr is a second chroma component (e.g., Cr component) quantization parameter QpCrp for the second chroma component (e.g., Cr component) of the first image block; and based on the second chroma component (e.g., Cr component) quantization parameter QpCrq for the second chroma component (e.g., Cr component) of the second image block This includes deciding.
[0349] In one possible implementation of any of the above implementations of the third aspect or the method according to the third aspect itself, the averaged rounded chroma quantization parameter Qp c is used for the decision process for the chroma block edge, or the averaged and rounded chroma quantization parameter is used directly or indirectly to determine whether the chroma block edge is filtered and / or whether long filtering is performed.
[0350] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, The value of the first threshold variable (e.g., β') is calculated based on the averaged and rounded chroma quantization parameter Qp c or the first clipped Qp c is determined using a mapping table based on; a value of a first variable (e.g., β) is derived based on the value of the first threshold variable (e.g., β′); The value of the first variable (e.g., β) is used for the decision process about the chroma block edge, or whether the block edge is filtered and / or whether long filtering is performed.
[0351] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, A second threshold variable (e.g., t C ') is calculated by the averaged and rounded chroma quantization parameter Qp c or the second clipped Qp c is determined using a mapping table based on; A second variable (e.g., t C ') is greater than the second threshold variable (e.g., t C ') is derived based on the value of The value of the second variable (e.g., t C) is used for the decision process for the chroma block edges (or for determining whether the block edges are filtered and / or whether long filtering is performed) and for the filtering process for the chroma block edges.
[0352] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, the mapping table includes mappings between a plurality of the first threshold variables, a plurality of the second threshold variables, and a plurality of quantization parameters.
[0353] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, the first chroma block is a first chroma component (e.g., a Cb component) of the first image block and the second chroma block is a first chroma component (e.g., a Cb component) of the second image block; or The first chroma block is a second chroma component (e.g., a Cr component) of the first image block, and the second chroma block is a second chroma component (e.g., a Cr component) of the second image block.
[0354] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, the first image block and the second image block are transform units or transform blocks.
[0355] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, whether the at least one of the first chroma block and the second chroma block (402, 502) is coded using a joint Cb-Cr residual (JCCR) mode or whether the at least one of the first chroma block and the second chroma block (402, 502) is a joint Cb-Cr residual (JCCR) coded block is determined based on a flag at the transform unit TU level (e.g., tu_joint_cbcr_residual_flag).
[0356] In one possible implementation of any of the above implementations of the third aspect or the method according to the third aspect itself, if the TU-level flag (e.g., tu_joint_cbcr_residual_flag) for the first image block is true, then the first chroma block uses a Joint Coding of Chrominance Residual (JCCR) tool, or the first chroma block is coded using a Joint Cb-Cr Residual (JCCR) mode; or If the TU-level flag (e.g., tu_joint_cbcr_residual_flag) for the second image block is true, the second chroma block uses the Joint Coding of Chrominance Residual (JCCR) tool, or the second chroma block is coded using the Joint Cb-Cr Residual (JCCR) mode.
[0357] In one possible implementation of any of the above implementations of the third aspect or the method according to the third aspect itself, the chroma Qp mapping table (e.g., ChromaQPTable) may include a plurality of the chroma quantization parameters Qp c and a plurality of said luma quantization parameters Qp luma and the plurality of chroma quantization parameters Qp c is associated with the first index value or the second index value.
[0358] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, the first chroma block has a block size that is M*N or N*M, where M and N represent the width and height of the first chroma block, respectively, or N and M represent the width and height of the first chroma block, respectively; the second chroma block has a block size that is L*T or T*L, where L and T represent the width and height of the second chroma block, respectively, or where T and L represent the width and height of the second chroma block, respectively; where N or T is an even integer greater than or equal to the threshold. n (e.g., 4, 8, 16, 32...), where n is a positive integer.
[0359] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, If the chroma block edge is a horizontal chroma block edge, the direction along the height N of the first chroma block is perpendicular to the chroma block edge, and the direction along the height T of the second chroma block is perpendicular to the chroma block edge, then either or both of the heights of the first and second chroma blocks is an even integer greater than 4 (or equal to or greater than 8), 2 n is; or The chroma block edge is a vertical chroma block edge, the direction along the width N of the first chroma block is perpendicular to the block edge, the direction along the width T of the second chroma block is perpendicular to the block edge, and one or both of the first and second chroma block widths is an even integer 2 greater than 4 (or 8 or greater). n is.
[0360] In one possible implementation of any of the above implementations of the third aspect or a method according to the third aspect itself, the second image block is a current block and the first image block is a neighboring block of the current block.
[0361] Solution 3 : The input chroma QP value depends on the JCCR mode. Based on the mode of the JCCR, the input chroma QP value is determined. ⇒If JCCR mode == 1, QpCb = ChromaQpTable[2][Qpx] And QpCr=(QpCb+1)>>1 ⇒If JCCR mode == 2, QpCb = ChromaQpTable[2][Qpx] and QpCr = QpCb ⇒If JCCR mode == 3, QpCr = ChromaQpTable[2][Qpx] And QpCb=(QpCr+1)>>1 *The x in Qpx can be the QP value of either a P block or a Q block. Qp Cr =Clip3(0,63,((Qpcr Q +Qpcr P +1)>>1)) (8-1132a) Qp Cb =Clip3(0,63,((Qpcb Q +Qpcb P +1)>>1) (8-1132b)
[0362] Based on TuCResMode, the derivation of the input chroma QP values for each of blocks P and Q is determined. If TuCResMode==1, the variable QPcb is derived as QPcb=ChromaQpTable[2][QPx], and the value QPCr is derived as QPCr=(QpCb+1)>>1. Otherwise, if TuCResMode==2, then the variable QPcb is derived as QPcb=ChromaQpTable[2][QPx] and the value QPCr is derived as QPCr=QpCb. Otherwise, if TuCResMode==3, then the variable QPcr is derived as QPcr=ChromaQpTable[2][QPx] and the value QPCr is derived as QPCb=(QpCr+1)>>1. Note that the x in QPx can be replaced by P or Q for each block. The values of QPcr and QPcb are then further derived as follows: Qp Cr =Clip3(0,63,((Qpcr Q +Qpcr P +1)>>1)) (8-1132a) Qp Cb =Clip3(0,63,((Qpcb Q +Qpcb P +1)>>1)) (8-1132b)
[0363] A beneficial effect and advantage of Solution 3 according to an embodiment of the present invention is that the QP value used by a chroma block (Cb or Cr) is also adjusted based on the JCCR mode (TuCResMode), so that a more accurate QP can be derived for each of the Cb and Cr components when JCCR is used to jointly signal the Cb-Cr components. [Example]
[0364] Fourth embodiment of the present application According to a fourth aspect, the present invention relates to a deblocking method for deblocking chroma block edges (903, 913, 923) between first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) of a first image block (601, 601') and second chroma blocks (902, 912, 922, 932, 942, 952, 962, 972) of a second image block (602, 602') in image encoding and / or image decoding. The unblocking method includes: performing a decision process for the chroma block edges, the decision process including: A first luma QP (e.g., Qp YP ) and the transformation rule, the chroma quantization parameter Qp Cp where the transformation rule is a first transformation rule if the first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) are Joint Cb-Cr Residual (JCCR) coded blocks, or the transformation rule is a second transformation rule if the first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) are the chroma components of the first image blocks (601, 601′); A second luma QP (e.g., Qp YQ ) and the transformation rule, the chroma quantization parameter Qp Cq where the transformation rule is a first transformation rule if the second chroma block is a Joint Cb-Cr Residual (JCCR) coded block, or the transformation rule is a second transformation rule if the second chroma block is the chroma component of the second image block (602, 602′); Chroma quantization parameter Qp for the first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) Cp and the chroma quantization parameter Qp for the second chroma block (902, 912, 922, 932, 942, 952, 962, 972). Cq Based on the averaged and rounded chroma quantization parameter Qp C Determine; Based on the decision result of the decision process, a filtering process is performed on the chroma block edges (903, 913, 923).
[0365] In one possible implementation of the method according to the fourth aspect itself, the first transformation rule is designed for a Joint Cb-Cr Residual (JCCR) coded block.
[0366] In one possible implementation of any of the above implementations of the fourth aspect or of a method according to the fourth aspect itself, the second transformation rules include a second transformation rule R21 and / or a second transformation rule R22; The second transformation rule R21 and the second transformation rule R22 are designed for a first chroma component (eg, a Cb component) and a second chroma component (eg, a Cr component), respectively. In one possible implementation form, the first transformation rule is different from the second transformation rule R21 and the second transformation rule R22.
[0367] In one possible implementation of any of the above implementations of the fourth aspect or the method according to the fourth aspect itself, the transformation rule is a second transformation rule R21 if the first chroma block is a first chroma component (911) of the first image block (601, 601′), and / or the transformation rule is a second transformation rule R22 if the first chroma block is a second chroma component (921) of the first image block (601, 601′); or The transformation rule is a second transformation rule R21 when the second chroma block is the first chroma component (912) of the second image block (602, 602'), and / or the transformation rule is a second transformation rule R22 when the second chroma block is the second chroma component (922) of the second image block (602, 602').
[0368] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first transformation rule R21, the second transformation rule R22 and the second transformation rule R23 correspond to (or are represented by) respective information entries in a chroma Qp mapping table (e.g., ChromaQPTable); or The first transformation rule R21, the second transformation rule R22, and the second transformation rule R23 correspond to (or are represented by) a first chroma Qp mapping table (e.g., ChromaQPTable), a second chroma Qp mapping table, and a third chroma Qp mapping table, respectively.
[0369] In one possible implementation of any of the above implementations of the fourth aspect or of the method according to the fourth aspect itself, the first transformation rule, the second transformation rule R21 and the second transformation rule R22 correspond to a first formula, a second formula and a third formula, respectively; or The first transformation rule, the second transformation rule R21, and the second transformation rule R22 are a first formula, a second formula, and a third formula, respectively.
[0370] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first transformation rule is expressed using a chroma Qp mapping table (e.g., ChromaQPTable) and a first formula; The second transformation rule R21 is expressed using a chroma Qp mapping table (e.g., ChromaQPTable) and a second formula; The second transformation rule R22 is expressed using a chroma Qp mapping table (eg, ChromaQPTable) and a third formula.
[0371] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first transformation rule is expressed using a chroma Qp mapping table (e.g., ChromaQPTable) and a first set of formulas; The second transformation rule R21 is expressed using a chroma Qp mapping table (e.g., ChromaQPTable) and a second set of formulas; The second transformation rule R22 is expressed using a chroma Qp mapping table (eg, ChromaQPTable) and a third set of formulas.
[0372] In one possible implementation of any of the above implementations of the fourth aspect or of the method according to the fourth aspect itself, the first transformation rule R21 and the second transformation rule R22 are indicated by a first index value, a second index value and a third index value, respectively; or The first conversion rule R21, the second conversion rule R22 correspond to a first index value, a second index value, and a third index value, respectively.
[0373] In one possible implementation, the first index value, the second index value, and the third index value are different from each other.
[0374] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first index value, the second index value, and the third index value are different integer values.
[0375] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first index value, the second index value, and the third index value are component indices (e.g., cIdx) having different values that specify a joint Cb-Cr coding block, a Cb component, and a Cr component, respectively.
[0376] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first index value is 3 or 4 or 5, the second index value is 1, and the third index value is 2.
[0377] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the averaged and rounded chroma quantization parameter Qp c is used for the determination process regarding the chroma block edges, or The averaged and rounded chroma quantization parameter Qp c is used directly or indirectly to determine whether the chroma block edges (903, 913, 923) are filtered and / or whether long filtering is performed.
[0378] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, The value of the first threshold variable (e.g., β') is calculated based on the averaged and rounded chroma quantization parameter Qp c or the first clipped Qp c is determined using a lookup table based on; a value of a first variable (e.g., β) is derived based on the value of the first threshold variable (e.g., β′); The value of the first variable (e.g., β) is used for the decision process about the chroma block edge, or the value of the first variable (e.g., β) is used to determine whether the chroma block edge (903, 913, 923) is filtered and / or whether long filtering is performed.
[0379] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, A second threshold variable (e.g., t C') is calculated by the averaged and rounded chroma quantization parameter Qp c or the second clipped Qp c is determined using a lookup table based on; A second variable (e.g., t C ') is greater than the second threshold variable (e.g., t C ') is derived based on the value of The value of the second variable (e.g., t C ) is used in the decision process for the chroma block edge (or the value of the second variable (e.g., t C ) is used for determining whether the chroma block edges (903, 913, 923) are filtered and / or whether long filtering is performed) and for the filtering process for the chroma block edges.
[0380] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the lookup table includes a mapping between a plurality of the first threshold variables, a plurality of the second threshold variables, and a plurality of quantization parameters.
[0381] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first chroma block is a first chroma component (e.g., a Cb component) of the first image block and the second chroma block is a first chroma component (e.g., a Cb component) of the second image block; and / or The first chroma block is a second chroma component (e.g., a Cr component) of the first image block, and the second chroma block is a second chroma component (e.g., a Cr component) of the second image block.
[0382] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, at least one of a first chroma component (e.g., a Cb component) of the first image block and a first chroma component (e.g., a Cb component) of the second image block is coded using a Joint Cb-Cr Residual (JCCR) mode; or At least one of a second chroma component (eg, a Cr component) of the first image block and a second chroma component (eg, a Cr component) of the second image block is coded using a joint Cb-Cr residual (JCCR) mode.
[0383] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the first image block and the second image block are transform blocks; or the first image block and the second image block are coding blocks.
[0384] In one possible implementation of any of the above implementations of the fourth aspect or the method according to the fourth aspect itself, the at least one of the first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) and the second chroma blocks (902, 912, 922, 932, 942, 952, 962, 972) is coded using a Joint Cb-Cr Residual (JCCR) mode, or the first chroma blocks (902, 912, 922, 932, 942, 952, 962, 972) are coded using a Joint Cb-Cr Residual (JCCR) mode. Whether at least one of the chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) and the second chroma blocks (902, 912, 922, 932, 942, 952, 962, 972) is a block to be joint Cb-Cr residual (JCCR) coded is determined based on a flag at the transform unit TU level (e.g., tu_joint_cbcr_residual_flag).
[0385] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if the TU-level flag (e.g., tu_joint_cbcr_residual_flag) for the first image block is true, then the first chroma block is a joint Cb-Cr residual (JCCR) coded block or is coded using a joint Cb-Cr residual (JCCR) mode; or If the TU-level flag (e.g., tu_joint_cbcr_residual_flag) for the second image block is true, the second chroma block is a joint Cb-Cr residual (JCCR) coded block, or the second chroma block is coded using a joint Cb-Cr residual (JCCR) mode.
[0386] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, The first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) have a block size that is M*N or N*M, where M and N represent the width and height of the first chroma blocks, respectively, or N and M represent the width and height of the first chroma blocks, respectively; the second chroma blocks (902, 912, 922, 932, 942, 952, 962, 972) have a block size that is L*T or T*L, where L and T represent the width and height of the second chroma blocks, respectively, or T and L represent the width and height of the second chroma blocks, respectively; where N or T is an even integer. n (e.g., 4 or 8 or 16 or 32), where n is a positive integer.
[0387] In one possible implementation, If the chroma block edge (903, 913, 923) is a horizontal chroma block edge, the direction along the height N of the first chroma block is perpendicular to the chroma block edge, and the direction along the height T of the second chroma block is perpendicular to the chroma block edge; or If the chroma block edge (903, 913, 923) is a vertical chroma block edge, the direction along the width N of the first chroma block is perpendicular to the block edge (903, 913, 923), and the direction along the width T of the second chroma block is perpendicular to the block edge (903, 913, 923).
[0388] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the second image block is a current block and the first image block is a neighboring block of the current block.
[0389] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if the first chroma block is coded using a JCCR mode, and the JCCR mode is a first JCCR mode (e.g., 1), A first chroma component (e.g., Cb component) quantization parameter QpCbp for the first chroma component (e.g., Cb component) of the first image block is calculated by multiplying a first luma QP (e.g., Qp YP ) and the first conversion rule; A second chroma component (e.g., Cr component) quantization parameter QpCrp for the second chroma component (e.g., Cr component) of the first image block is calculated by multiplying the first chroma component (e.g., Cb component) quantization parameter Qp Cbp The decision is based on the following:
[0390] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if the second chroma block is coded using a JCCR mode and the JCCR mode is a first JCCR mode (e.g., 1), A first chroma component (e.g., Cb component) quantization parameter QpCbq for the first chroma component (e.g., Cb component) of the second image block is calculated by multiplying a second luma QP (e.g., Qp YQ ) and the first transformation rule; A second chroma component (eg, Cr component) quantization parameter QpCrq for the second chroma component (eg, Cr component) of the second image block is determined based on the first chroma component (eg, Cb component) quantization parameter QpCbq.
[0391] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if JCCR mode == 1 then QpCb = ChromaQpTable[2][Qpx], or if JCCR mode == 1 then QpCb = ChromaQpTable[cIdx-1][Qpx], cIdx = 3; QpCr=(QpCb+1)>>1, where Qpx is the first luma QP (e.g., Qp YP ) or the second luma QP (e.g., Qp YQ ) represents; ChromaQpTable represents the chroma QP mapping table whose index is 2 or the chroma QP mapping table containing the information entry whose index is 2; or ChromaQpTable represents the chroma QP mapping table whose index is 3 or the chroma QP mapping table containing the information entry whose index is 3.
[0392] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if the first chroma block is coded using a JCCR mode and the JCCR mode is a second JCCR mode (e.g., 2), A first chroma component (e.g., Cb component) quantization parameter QpCbp for the first chroma component (e.g., Cb component) of the first image block is calculated by multiplying a first luma QP (e.g., Qp YP ) and the first transformation rule; A second chroma component (eg, Cr component) quantization parameter QpCrp for the second chroma component (eg, Cr component) of the first image block is set as the first chroma component (eg, Cb component) quantization parameter QpCbp.
[0393] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if the second chroma block is coded using a JCCR mode and the JCCR mode is a second JCCR mode (e.g., 2), determining a first chroma component (e.g., Cb component) quantization parameter QpCbq for the first chroma component (e.g., Cb component) of the second image block based on a second luma QP of a second luma block (802) of the second image and the first transformation rule; A second chroma component (eg, Cr component) quantization parameter QpCrq for the second chroma component (eg, Cr component) of the second image block is set as the first chroma component (eg, Cb component) quantization parameter QpCbq.
[0394] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if JCCR mode==2 then QpCb=ChromaQpTable[2][Qpx], or if JCCR mode==2 then QpCb=ChromaQpTable[cIdx-1][Qpx], cIdx=3; QpCr=QpCb, where Qpx represents the first luma QP of the first luma block of the first image block or the second luma QP of the second luma block of the second image block; ChromaQpTable represents the chroma QP mapping table whose index is 2 or the chroma QP mapping table containing the information entry whose index is 2; or ChromaQpTable represents the chroma QP mapping table whose index is 3 or the chroma QP mapping table containing the information entry whose index is 3.
[0395] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if the first chroma block is coded using a JCCR mode and the JCCR mode is a third JCCR mode (e.g., 3), determining a second chroma component (e.g., Cr component) quantization parameter QpCrp for the second chroma component (e.g., Cr component) of the first image block based on a first luma QP of a first luma block (801) of the first image block and the first transformation rule; A first chroma component (eg, Cb component) quantization parameter QpCbp for the first chroma component (eg, Cb component) of the first image block is determined based on the second chroma component (eg, Cr component) quantization parameter QpCrp.
[0396] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if the second chroma block is coded using a JCCR mode and the JCCR mode is a third JCCR mode (e.g., 3), determining a second chroma component (e.g., Cr component) quantization parameter QpCrq for the second chroma component (e.g., Cr component) of the second image block based on a second luma QP of a second luma block (802) of the second image block and the first transformation rule; A first chroma component (eg, Cb component) quantization parameter QpCbq for the first chroma component (eg, Cb component) of the second image block is determined based on the second chroma component (eg, Cr component) quantization parameter QpCrq.
[0397] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, if JCCR mode == 3, then QpCr = ChromaQpTable[2][Qpx], or if JCCR mode == 3, then QpCr = ChromaQpTable[cIdx-1][Qpx], cIdx = 3; QpCb=QpCr, where Qpx represents the first luma QP of the first luma block of the first image block or the second luma QP of the second luma block of the second image block; ChromaQpTable represents the chroma QP mapping table whose index is 2 or the chroma QP mapping table containing the information entry whose index is 2; or ChromaQpTable represents the chroma QP mapping table whose index is 3 or the chroma QP mapping table containing the information entry whose index is 3.
[0398] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter Qp C The step of determining: The averaged and rounded first chroma component (e.g., Cb component) quantization parameter QpCb is a first chroma component (e.g., Cb component) quantization parameter QpCbp for the first chroma component (e.g., Cb component) of the first image block; and based on the first chrominance component (e.g., Cb component) quantization parameter QpCbq for the first chrominance component (e.g., Cb component) of the second image block This includes deciding.
[0399] In one possible implementation of any of the above implementations of the fourth aspect or a method according to the fourth aspect itself, the chroma quantization parameter Qp for the first chroma block Cp and the chroma quantization parameter Qp for the second chroma block Cq Based on the averaged and rounded chroma quantization parameter Qp C The step of determining: The averaged and rounded second chroma component (e.g., Cr component) quantization parameter QpCr is a second chroma component (e.g., Cr component) quantization parameter QpCrp for the second chroma component (e.g., Cr component) of the first image block; and based on the second chroma component (e.g., Cr component) quantization parameter QpCrq for the second chroma component (e.g., Cr component) of the second image block This includes deciding.
[0400] Solution 4 : Based on the chroma block type, i.e., Cb, Cr, or Cb-Cr (Cb component, Cr component, or joint Cb-Cr coded block), if the joint Cb-Cr mode for the Cb-Cr block type is equal to 2, i.e., TuCResMode[xCb][yCb] of a given block is equal to 2, then the luma QP is mapped to a chroma QP for each of blocks P and Q separately using the respective conversion rules (e.g., a combination of the chroma QP mapping table and the respective formula), as shown in Equation 8-952 below, and then the average of the chroma QP values of blocks P and Q is set as the final QP value, which is then used for further operations of deblocking.
[0401] An example of a conversion rule is: The transformation rule for the Cb component is given below using formulas 8-935, 8-936, and 8-939 in Section 8.7.1. That is, formulas 8-935, 8-936, and 8-939 are examples of the second transformation rule R21 designed for the first chroma component (e.g., the Cb component). Formula 8-936 is expressed using the chroma QP mapping table.
[0402] The transformation rule for the Cr component is given below using formulas 8-935, 8-937, and 8-940 in Section 8.7.1. That is, formulas 8-935, 8-937, and 8-940 are examples of the second transformation rule R22 designed for the second chroma component (e.g., the Cr component). Formula 8-937 is expressed using the chroma QP mapping table.
[0403] The transformation rules for the CbCr components (i.e., joint Cb-Cr components) are given below using equations 8-935, 8-938, and 8-941 in Section 8.7.1. That is, equations 8-935, 8-938, and 8-941 are examples of the first transformation rules designed for joint Cb-Cr components. Equation 8-938 is expressed using a chroma QP mapping table.
[0404] It should be noted that this disclosure proposes using different transformation rules for different chroma components, but is not limited to the specific rules or specific formulas mentioned in Section 8.7.1.
[0405] The exact specification text changes for Solution 4 are given below.
[0406] 8.8.3.6.3 Chroma Block Edge Decision Making This process is only invoked if ChromaArrayType is not equal to 0.
[0407] The inputs to this process are: Chroma picture sample array recPicture, Chroma position (xCb, yCb) that specifies the top-left sample of the current chroma coding block relative to the top-left chroma sample of the current picture, Chroma position (xBl, yBl) specifying the top left sample of the current chroma block relative to the top left sample of the current chroma coding block, The variable edgeType, which specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered, · Variable cIdx that specifies the color component index, The variable cQpPicOffset, which specifies the picture-level chroma quantization parameter offset, · Variable bS, which specifies the boundary filtering strength, ·Variable maxFilterLengthCbCr.
[0408] The output of this process is: - modified variable maxFilterLengthCbCr, Variable t C .
[0409] The variable maxK is derived as follows: If edgeType is equal to EDGE_VER, the following applies: maxK=(SubHeightC==1) ? 3:1 (8-1124) Otherwise (edgeType equals EDGE_HOR), the following applies: maxK=(SubWidthC==1) ? 3:1 (8-1125)
[0410] Value p for i=0…maxFilterLengthCbCr and k=0…maxK i and q i is derived as follows: If edgeType is equal to EDGE_VER, the following applies: q i,k =recPicture[xCb+xBl+i][yCb+yBl+k] (8-1126) p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (8-1127) subSampleC=SubHeightC (8-1128) Variable Qp Q is derived by invoking the chroma QP derivation process specified in Section 8.8.3.6.10 with the chroma position (xCb+xB1+i, yCb+yB1+k) and cIdx as input. / / where Qp Q is the chroma QP value. To distinguish between luma QP value and chroma QP value, the claims use Qp CQ / / Variable Qp P is derived by invoking the chroma QP derivation process specified in Section 8.8.3.6.10 with the chroma position (xCb+xB1-i-1, yCb+yB1+k]) and cIdx as input. / / where Qp P is the chroma QP value. To distinguish between luma QP value and chroma QP value, the claims use Qp CP / /
[0411] Otherwise (edgeType equals EDGE_HOR), the following applies: q i,k =recPicture[xCb+xBl+k][yCb+yBl+i] (8-1129) p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1130) subSampleC=SubWidthC (8-1131) Variable Qp Q is derived by invoking the chroma QP derivation process specified in Section 8.8.3.6.10 with the chroma position (xCb+xB1+k, yCb+yB1+i) and cIdx as input. Q is the chroma QP value. In the claim section, Qp Cq / / Variable Qp P is derived by invoking the chroma QP derivation process specified in Section 8.8.3.6.10 with the chroma position (xCb+xB1+k, yCb+yB1-i-1) and cIdx as input. P is the chroma QP value. In the claim section, Qp Cp / / [Outside 1] TIFF2026016441000006.tif17169
[0412] [Outside 2] TIFF2026016441000007.tif54169
[0413] The value of the variable β' is determined as specified in Table 8-18 based on the quantization parameter Q, which is derived as follows: Q=Clip3(0,63,Qp C +(slice_beta_offset_div2<<1)) (8-1134) where slice_beta_offset_div2 is the offset of the sample q 0,0is the value of the syntax element slice_beta_offset_div2 for the slice containing
[0414] The variable β is derived as follows: β=β'*(1<<(BitDepth C -8)) (8-1135)
[0415] variable t C The value of ' is determined as specified in Table 8-18 based on the chroma quantization parameter Q, which is derived as follows: Q=Clip3(0,65,Qp C +2*(bS-1)+(slice_tc_offset_div2<<1)) (8-1136) where slice_tc_offset_div2 is the offset of the sample q 0,0 The value of the syntax element slice_tc_offset_div2 for the slice containing
[0416] variable t C is derived as follows: t C =(BitDepth C <10) ? (t C '+2)>>(10-BitDepth C ) : t C '*(1<<(BitDepth C -8)) (8-1137) ……
[0417] 8.8.3.6.10 Quantization parameter derivation process for chroma coded blocks This process is only invoked if ChromaArrayType is not equal to 0.
[0418] The inputs to this process are: A chroma coding block containing a given chroma sample position (xCb, yCb), A variable cIdx that specifies the color component index of said given chroma-coded block.
[0419] The output of this process is the quantization parameter qP for the coding block containing the samples (xCb, yCb). If TuCResMode[xCb][yCb] is equal to 2, the following applies: qP=Qp' CbCr- QpBdOffset C (8-952) Otherwise, if cIdx is equal to 1, the following applies: qP=Qp' Cb- QpBdOffset C (8-953) Otherwise (cIdx equals 2), the following applies: qP=Qp' Cr- QpBdOffset C (8-954) Variable Qp' CbCr , Qp' Cb , Qp' Cr Note that is derived in section "8.7.1 Quantization Parameter Derivation Process."
[0420] In one example implementation, QPBdoffset is subtracted from the chroma QP values (as shown in 8-952, 8-953, and 8-954), and averaging is applied (as shown in revised section 8.8.3.6.3 presented below). In an alternative design, QPBdoffset may be subtracted from the chroma QP values during the averaging step. The effect of these two alternative designs is identical.
[0421] Details of the derivation process for the quantization parameters according to some embodiments of the present disclosure (shown in S1611 or S1621 of FIG. 17) are described in Section 8.7.1 below.
[0422] 8.7.1 Derivation process for quantization parameters The inputs to this process are: The luma position (xCb, yCb) that specifies the top-left luma sample of the current coding block relative to the top-left luma sample of the current picture, The variable cbWidth, which specifies the width of the current coding block in luma samples, The variable cbHeight, which specifies the height of the current coding block in luma samples, · The variable treeType, which specifies whether a single tree (SINGLE_TREE) or a dual tree is used to partition the CTUs, and if a dual tree is used, whether the luma (DUAL_TREE_LUMA) or chroma component (DUAL_TREE_CHROMA) is currently being processed.
[0423] In this process, the luma quantization parameter Qp' Y and the chroma quantization parameter Qp' Cb and Qp' Cr is derived.
[0424] The luma position (xQg, yQg) specifies the top-left luma sample of the current quantization group relative to the top-left luma sample of the current picture. The horizontal position xQg and vertical position yQg are set equal to CuQgTopLeftX and CuQgTopLeftY, respectively.
[0425] Note: The current quantization group must be the same qP Y_PRED Its width and height are equal to the width and height of the coding tree node whose top-left luma sample position is assigned to the variables CuQgTopLeftX and CuQgTopLeftY.
[0426] If treeType is equal to SINGLE_TREE or DUAL_TREE_LUMA, the predicted luma quantization parameter qP Y_PRED is derived by the following ordered steps: 1. Variable qP Y_PREV is derived as follows: ·qP if one or more of the following conditions are true: Y_PREV SliceQpY is set equal to: The current quantization group is the first quantization group in the slice. The current quantization group is the first quantization group in the brick. · The current quantization group is the first quantization group in the CTB row of the brick, and entropy_coding_sync_enabled_flag is equal to 1. Otherwise, qP Y_PREV is the luma quantization parameter Qp of the last luma coding unit in the previous quantization group in decoding order. Y is set equal to The derivation process for neighboring block availability specified in Section 2.6.4.4 is invoked with inputs location (xCurr,yCurr) set equal to (xCb,yCb), neighbor location (xNbY,yNbY) set equal to (xQg-1,yQg), checkPredModeY set equal to FALSE, and cIdx set equal to 0, and the output is assigned to availableA. Variable qP Y_A is derived as follows: ·qP if one or more of the following conditions are true: Y_A is qP Y_PREV is set equal to: · availableA is equal to FALSE. The CTB containing the luma coding block covering luma position (xQg-1,yQg) is not equal to the CTB containing the current luma coding block at (xCb,yCb), i.e., all of the following conditions are true: (xQg-1)>>CtbLog2SizeY is not equal to (xCb)>>CtbLog2SizeY (yQg)>>CtbLog2SizeY is not equal to (yCb)>>CtbLog2SizeY Otherwise, qP Y_A is the luma quantization parameter Qp of the coding unit that contains the luma coding block covering (xQg-1, yQg). Y is set equal to The derivation process for neighborhood block availability specified in Section 3.6.4.4 is invoked with inputs location (xCurr,yCurr) set equal to (xCb,yCb), neighborhood location (xNbY,yNbY) set equal to (xQg,yQg-1), checkPredModeY set equal to FALSE, and cIdx set equal to 0, and the output is assigned to availableB. Variable qP Y_B is derived as follows: ·qP if one or more of the following conditions are true: Y_B is qP Y_PREV is set equal to: · availableB is equal to FALSE. The CTB containing the luma coding block covering luma position (xQg, yQg-1) is not equal to the CTB containing the current luma coding block at (xCb, yCb), i.e., all of the following conditions are true: (xQg)>>CtbLog2SizeY is not equal to (xCb)>>CtbLog2SizeY (yQg-1)>>CtbLog2SizeY is not equal to (yCb)>>CtbLog2SizeY Otherwise, qP Y_B is the luma quantization parameter Qp of the coding unit that contains the luma coding block covering (xQg, yQg-1). Y is set equal to 4. Predicted luma quantization parameter qP Y_PRED is derived as follows: ·If all of the following conditions are true, then qP Y_PRED is the luma quantization parameter Qp of the coding unit that contains the luma coding block covering (xQg, yQg-1). Y is set equal to: · availableB is equal to TRUE. The current quantization group is the first quantization group in the CTB row within the brick. Otherwise, qP Y_PRED is derived as follows: qP Y_PRED =(qP Y_A +qP Y_B +1)>>1 (8-932)
[0427] Variable Qp Y is derived as follows: Qp Y =((qP Y_PRED +CuQpDeltaVal+64+2*QpBdOffset Y )%(64+QpBdOffset Y ))-QpBdOffset Y (8-933)
[0428] Luma quantization parameter Qp' Y is derived as follows: Qp' Y =Qp Y +QpBdOffset Y (8-934)
[0429] If ChromaArrayType is not equal to 0 and treeType is equal to SINGLE_TREE or DUAL_TREE_CHROMA, the following applies: If treeType is equal to DUAL_TREE_CHROMA, the variable Qp Y is the luma quantization parameter Qp of the luma coding unit covering the luma position (xCb+cbWidth / 2, yCb+cbHeight / 2). Y is set equal to Variable qP Cb , qP Cr and qP CbCr is derived as follows: qPi Chroma =Clip3(-QpBdOffset C ,63,Qp Y ) (8-935) qPi Cb =ChromaQpTable[0][qPi Chroma ] (8-936) qPi Cr =ChromaQpTable[1][qPiChroma ] (8-937) qPi CbCr =ChromaQpTable[2][qPi Chroma ] (8-938) Chroma quantization parameter Qp' for Cb and Cr components Cb and Qp' Cr and joint Cb-Cr coding Qp' CbCr is derived as follows: Qp' Cb =Clip3(-QpBdOffset C ,63,qP Cb +pps_cb_qp_offset+slice_cb_qp_offset+CuQpOffset Cb )+QpBdOffset C (8-939) Qp' Cr =Clip3(-QpBdOffset C ,63,qP Cr +pps_cr_qp_offset+slice_cr_qp_offset+CuQpOffset Cr )+QpBdOffset C (8-940) Qp' CbCr =Clip3(-QpBdOffset C ,63,qP CbCr +pps_cbcr_qp_offset+slice_cbcr_qp_offset+CuQpOffset CbCr )+QpBdOffset C (8-941)
[0430] As explained in [8-935], the luma QP (e.g., Qp Y ) is the chroma QP (e.g. qPi Cb , qPi Cr or qPi CbCr It is noted that the QP is not directly used to derive the luma QP (QP Y ) can be applied.
[0431] The decision process for chroma block edges according to Solution 4 of the present disclosure (shown in S1601 of Figure 16) is described in revised section 8.8.3.6.3 as follows:
[0432] 8.8.3.6.3 Chroma Block Edge Decision Process … Each sample q 0,0 and p 0,0 For a coding unit that contains a coding block containing Q and Qp P is Qp' if TuCResMode[xCb][yCb] is equal to 2 CbCr -QpBdOffset C and if cIdx is equal to 1, then Qp' Cb -QpBdOffset C and if cIdx is equal to 2, then Qp' Cr -QpBdOffset C is set equal to Variable Qp C is derived as follows: Qp C =(Qp Q +Qp P +1)>>1
[0433] See section 8.8.3.6.3. In one example implementation, QPBdoffset is subtracted from the chroma QP value (as shown in 8-952, 8-953, 8-954), and then averaging is applied directly (as shown in section 8.8.3.6.3). It can be seen that this is substantially the same as how QPBdoffset is subtracted during the averaging step. Exemplary details of step 1631 (shown in Figure 17) are described above in section 8.8.3.6.3 of the VVC specification and will not be repeated below.
[0434] Solution 5 : Solution 5 is essentially the same as Solution 4, except that the conversion rules are slightly different.
[0435] The specification text is attached below.
[0436] 8.8.3.6.3 Chroma Block Edge Decision Making This process is only invoked if ChromaArrayType is not equal to 0.
[0437] The inputs to this process are: Chroma picture sample array recPicture, Chroma position (xCb, yCb) that specifies the top left sample of the current chroma coding block relative to the top left chroma sample of the current picture, Chroma position (xBl, yBl) specifying the top left sample of the current chroma block relative to the top left sample of the current chroma coding block, The variable edgeType, which specifies whether vertical edges (EDGE_VER) or horizontal edges (EDGE_HOR) are filtered, · Variable cIdx that specifies the color component index, The variable cQpPicOffset, which specifies the picture-level chroma quantization parameter offset, · Variable bS, which specifies the boundary filtering strength, ·Variable maxFilterLengthCbCr.
[0438] The output of this process is: - modified variable maxFilterLengthCbCr, Variable t C .
[0439] The variable maxK is derived as follows: If edgeType is equal to EDGE_VER, the following applies: maxK=(SubHeightC==1) ? 3:1 (8-1124) Otherwise (edgeType equals EDGE_HOR), the following applies: maxK=(SubWidthC==1) ? 3:1 (8-1125)
[0440] Value p for i=0…maxFilterLengthCbCr and k=0…maxK i and q i is derived as follows: If edgeType is equal to EDGE_VER, the following applies: q i,k =recPicture[xCb+xBl+i][yCb+yBl+k] (8-1126) p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (8-1127) subSampleC=SubHeightC (8-1128) Variable Qp Q is derived by invoking the chroma QP derivation process specified in section 8.8.3.6.10 with the chroma position (xCb+xB1+i, yCb+yB1+k) and cIdx as input. Variable Qp P is derived by invoking the chroma QP derivation process specified in section 8.8.3.6.10 with the chroma position (xCb+xB1-i-1, yCb+yB1+k) and cIdx as input. Otherwise (edgeType equals EDGE_HOR), the following applies: q i,k =recPicture[xCb+xBl+k][yCb+yBl+i] (8-1129) p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1130) subSampleC=SubWidthC (8-1131)
[0441] Variable Qp Qis derived by invoking the chroma QP derivation process specified in section 8.8.3.6.10 with the chroma position (xCb+xB1+k, yCb+yB1+i) and cIdx as input. Variable Qp P is derived by invoking the chroma QP derivation process specified in section 8.8.3.6.10 with the chroma position (xCb+xB1+k, yCb+yB1-i-1) and cIdx as input. [Outside 3] TIFF2026016441000008.tif17169[Outside 4] TIFF2026016441000009.tif63169
[0442] 8.8.3.6.10 Quantization parameter derivation process for chroma coded blocks This process is only invoked if ChromaArrayType is not equal to 0.
[0443] The inputs to this process are: A chroma coding block containing a given chroma sample position (xCb, yCb), A variable cIdx that specifies the color component index of said given chroma-coded block.
[0444] The output of this process is the quantization parameter qP for the coding block containing the samples (xCb, yCb). If TuCResMode[xCb][yCb] is equal to 2, the following applies: qP=Qp CbCr (8-952) cQpPicOffset is set equal to pps_joint_cbcr_qp_offset. Otherwise, if cIdx is equal to 1, the following applies: qP=Qp Cb (8-953) Otherwise (cIdx equals 2), the following applies: qP=QpCr (8-954) qP=Clip3(0,63,qP+cQpPicOffset)
[0445] NOTE - The variable cQpPicOffset provides an adjustment for the value of pps_cb_qp_offset or pps_cr_qp_offset, depending on whether the chroma component being filtered is the Cb or Cr component. However, to avoid the need to vary the amount of adjustment within a picture, the filtering process also adjusts for the value of slice_cb_qp_offset or slice_cr_qp_offset (if cu_chroma_qp_offset_enabled_flag is equal to 1) and CuQpOffset Cb , CuQpOffset Cr , or CuQpOffset CbCr It does not include adjustments for the value of
[0446] Note − Variable Qp CbCr , Qp Cb , Qp Cr is derived as in Section 8.7.1 (Derivation Process for Quantization Parameters).
[0447] In Equation 8-935, Qp Y is the first luma QP (e.g., Qp YP ) or the second luma QP (e.g., Qp YQ )
[0448] In Equations 8-936, 8-937, and 8-938, ChromaQpTable represents the chroma Qp mapping table (eg, ChromaQPTable).
[0449] QpBdOffset C represents the value of the chroma quantization parameter range offset. CThe value of QpBdOffset is derived as follows: C =6*bit_depth_chroma_minus8, where "bit_depth_chroma_minus8" is a parameter signaled in the Sequence Parameter Set (SPS).
[0450] pps_cb_qp_offset and pps_cr_qp_offset are the offsets of Qp' Cb and Qp' Cr The luma quantization parameter Qp' used to derive Y The values of pps_cb_qp_offset and pps_cr_qp_offset shall range from -12 to +12 (inclusive). If ChromaArrayType is equal to 0, pps_cb_qp_offset and pps_cr_qp_offset are not used in the decoding process and the decoder ignores their values.
[0451] pps_joint_cbcr_qp_offset is Qp' CbCr The luma quantization parameter Qp' used to derive Y Specifies the offset to the pps_joint_cbcr_qp_offset. The value of pps_joint_cbcr_qp_offset shall be in the range of -12 to +12 (inclusive). If ChromaArrayType is equal to 0 or sps_joint_cbcr_enabled_flag is equal to 0, pps_joint_cbcr_qp_offset is not used in the decoding process and the decoder shall ignore its value.
[0452] slice_cb_qp_offset is Qp' CbSpecifies the difference to be added to the value of pps_cb_qp_offset when determining the value of the quantization parameter. The value of slice_cb_qp_offset shall be in the range of -12 to +12, inclusive. If slice_cb_qp_offset is not present, it is inferred to be equal to 0. The value of pps_cb_qp_offset+slice_cb_qp_offset shall be in the range of -12 to +12, inclusive.
[0453] slice_cr_qp_offset is Qp' Cr Specifies the difference to be added to the value of pps_cr_qp_offset when determining the value of the quantization parameter. The value of slice_cr_qp_offset shall range from -12 to +12, inclusive. If slice_cr_qp_offset is not present, it is inferred to be equal to 0. The value of pps_cr_qp_offset+slice_cr_qp_offset shall range from -12 to +12, inclusive.
[0454] slice_joint_cbcr_qp_offset is Qp' CbCr Specifies the delta that is added to the value of pps_joint_cbcr_qp_offset when determining the value of slice_joint_cbcr_qp_offset. The value of slice_joint_cbcr_qp_offset shall be in the range of -12 to +12, inclusive. If slice_joint_cbcr_qp_offset is not present, it is inferred to be equal to 0. The value of pps_joint_cbcr_qp_offset+slice_joint_cbcr_qp_offset shall be in the range of -12 to +12, inclusive.
[0455] If cu_chroma_qp_offset_flag is present and equal to 1, it indicates that the entry in cb_qp_offset_list[] is CuQpOffset Cb is used to determine the value of CuQpOffset and the corresponding entry in cr_qp_offset_list[] is used to determine the value of CuQpOffset Cris used to determine the value of CuQpOffset and the corresponding entry in joint_cbcr_qp_offfset_list[] is used to determine the value of CuQpOffset CbCr cu_chroma_qp_offset_flag equal to 0 specifies that the value of CuQpOffset Cb , CuQpOffset Cr , and CuQpOffset CbCr Specifies that these lists are not used to determine the value of
[0456] If cu_chroma_qp_offset_idx exists, it is CuQpOffset Cb , CuQpOffset Cr , CuQpOffset CbCr Specifies an index into cb_qp_offset_list[], cr_qp_offset_list[], and joint_cbcr_qp_offset_list[] that is used to determine the value of cu_chroma_qp_offset_idx. If present, the value of cu_chroma_qp_offset_idx shall range from 0 to chroma_qp_offset_list_len_minus1, inclusive. If absent, the value of cu_chroma_qp_offset_idx is inferred to be equal to 0.
[0457] If cu_chroma_qp_offset_flag is present, the following applies: The variable IsCuChromaQpOffsetCoded is set to 1. CuQpOffset variable Cb , CuQpOffset Cr , and CuQpOffset CbCr is derived as follows: If cu_chroma_qp_offset_flag is equal to 1, the following applies: CuQpOffset Cb =cb_qp_offset_list[cu_chroma_qp_offset_idx] (7-166) CuQpOffset Cr =cr_qp_offset_list[cu_chroma_qp_offset_idx] (7-167) CuQpOffset CbCr =joint_cbcr_qp_offset_list[cu_chroma_qp_offset_idx] (7-168) Otherwise (cu_chroma_qp_offset_flag is equal to 0), CuQpOffset Cb , CuQpOffset Cr , and CuQpOffset CbCr are all set equal to 0.
[0458] cb_qp_offset_list[i], cr_qp_offset_list[i], and joint_cbcr_qp_offset_list[i] are Qp' Cb , Qp' Cr , and Qp' CbCr The values of cb_qp_offset_list[i], cr_qp_offset_list[i], and joint_cbcr_qp_offset_list[i] shall be in the range of -12 to +12, inclusive.
[0459] In particular, the device embodiment is basically similar to the method embodiment, and therefore will be briefly described. For the execution process of the specific functions of each unit, reference may be made to the partial description in the method embodiment.
[0460] FIG. 10 is a block diagram illustrating an exemplary deblocking filter apparatus 1000 according to the techniques described in this disclosure (e.g., further details are described below based on FIGS. 9A-9H, 11-13, or 16-17). The deblocking filter apparatus 1000 may be configured to perform deblocking techniques according to various examples described in this disclosure. In general, either or both of the loop filter unit 220 of FIG. 2 and the loop filter unit 320 of FIG. 3 may include components substantially similar to those of the deblocking filter apparatus 1000. Other video encoding devices, such as a video encoder, a video decoder, a video encoder / decoder (codec), etc., may also include components substantially similar to the deblocking filter 1000. The deblocking filter apparatus 1000 may be implemented in hardware, software, or firmware, or any combination thereof. When implemented in software or firmware, corresponding hardware (e.g., one or more processors or processing units and memory for storing instructions for the software or firmware) may also be provided.
[0461] In the example of FIG. 10 , the deblocking filter apparatus 1000 includes a deblocking determination unit 1004, a support definition 1002 stored in memory, a deblocking filtering unit 1006, deblocking filter parameters 1008 stored in memory, an edge location unit 1003, and an edge location data structure 1005. Any or all of the components of the deblocking filter 1000 may be functionally integrated. The components of the deblocking filter 1000 are shown separately for illustrative purposes only. Generally, the deblocking filter 1000 receives data about a decoded block from, for example, a summing component 114, 214, which combines prediction data with residual data for the block. The data may further include an indication of how the block was predicted. In the example described below, the deblocking filter device 1000 is configured to receive data including a decoded video block associated with a CTB (or CTU) and a CU quadtree for the CTB, where the CU quadtree describes how the CTB is divided into CUs or CBs and TUs or TBs.
[0462] The deblocking filter device 1000 may maintain an edge location data structure 1005 in its memory or in an external memory provided by a corresponding video encoding device. In some examples, the edge location unit 1003 may receive a quadtree corresponding to the CTB, which indicates how the CTB is divided into CUs or CBs and TUs or TBs. The edge location unit 1003 may then analyze the CU quadtree to determine edges between decoded video blocks associated with TUs or CUs in the CTB that are candidates for deblocking.
[0463] The edge location data structure 1005 may include an array having a horizontal dimension, a vertical dimension, and dimensions representing horizontal and vertical edges. In general, an edge between video blocks may occur between two video blocks associated with a minimum-sized CU, TU, or CU of the CTB. Assuming the CTB has a size of NxN and the minimum-sized CU of the CTB is a size of MxM, the array may have a size of [N / M]x[N / M]x2, where "2" represents the two possible directions (horizontal and vertical) of an edge between CUs. For example, assuming the CTB has 64x64 pixels and assuming a minimum-sized CU or TU of 8x8, the array may contain [8]x[8]x[2] entries.
[0464] Each entry may generally correspond to a possible edge between two video blocks. An edge may not actually exist at each of the locations in an LCU corresponding to each entry in the edge location data structure 1005. Thus, the value of the data structure may be initialized to false. In general, the edge location unit 1003 may analyze the CU quadtree to determine the location of an edge between two video blocks associated with a TU or CU of the CTB and set the corresponding value in the edge location data structure 1005 to true.
[0465] In general, an entry in the array may describe whether a corresponding edge exists in the CTB as a candidate for deblocking. That is, if the edge location unit 1003 determines that an edge exists between two adjacent video blocks associated with a TU or CU of the CTB, the edge location unit 1003 may set the value of the corresponding entry in the edge location data structure 1005 (e.g., to a value of “true”) to indicate that the edge exists.
[0466] The deblocking determination unit 1004 generally determines, for two adjacent blocks, whether an edge between the two blocks should be deblocked. The deblocking determination unit 1004 may determine the location of the edge using an edge location data structure 1005. If the values of the edge location data structure 1005 have Boolean values, the deblocking determination unit 1004 may, in some instances, determine that a "true" value indicates the presence of an edge and a "false" value indicates the absence of an edge.
[0467] In general, the deblocking determination unit 1004 is configured to have one or more deblocking decision functions. The functions may include multiple coefficients that are applied to a line of pixels that cross an edge between blocks. For example, the functions may be applied to a line of pixels perpendicular to the edge, where some pixels are in one of two blocks and some pixels are in the other of the two blocks. The support definition 1002 defines the support for the functions. In general, the "support" corresponds to the pixels to which the function is applied.
[0468] The deblocking determination unit 1004 may be configured to apply one or more deblocking decision functions to one or more sets of supports as defined by the support definition 1002 to determine whether a particular edge between two blocks of video data should be deblocked. The dashed lines exiting the deblocking determination unit 1004 represent the data of the block being output without filtering. If the deblocking determination unit 1004 determines that the edge between the two blocks should not be filtered, the deblocking filter 1000 may output the data of the block without modifying the data; that is, the data may bypass the deblocking filtering unit 1006. On the other hand, if the deblocking determination unit 1004 determines that the edge should be deblocked, the deblocking determination unit 1004 may cause the deblocking filtering unit 1006 to filter values for pixels near the edge to deblock the edge.
[0469] The deblocking filtering unit 1006 obtains a deblocking filter definition from the deblocking filter parameters 1008 for the edge to be deblocked, as indicated by the deblocking decision unit 1004. In general, edge filtering uses pixel values from the neighborhood of the current edge to be deblocked. Thus, both the deblocking decision function and the deblocking filter can have a region of support on both sides of the edge. By applying a deblocking filter to pixels near the edge, the deblocking filtering unit 1006 can smooth the pixel values so that high-frequency transitions near the edge are attenuated. In this way, applying a deblocking filter to pixels near the edge can reduce blocky artifacts near the edge.
[0470] FIG. 16 is a block diagram illustrating another exemplary unblocking method according to the techniques described in this disclosure (further details are described below, e.g., based on FIGS. 9A-9H, 10, 12, 13, and 17). The deblocking method 1600 is for deblocking chroma block edges (903, 913, 923, 933, 943, 953, 963, 973) between first chroma blocks (901, 911, 921, 931, 941, 951, 961, 971) of a first image block (601, 601′) and second chroma blocks (902, 912, 922, 932, 942, 952, 962, 972) of a second image block (602, 602′) in image encoding and / or image decoding, the deblocking method 1600 including: 16. Perform 1601 a decision process for chroma block edges. As shown in Figure 17, the decision process includes: A first luma QP (e.g., Qp YP ) and one or more chroma quantization parameter (QP) mapping tables, and Cp to decide 1611; A second luma QP (e.g., Qp YQ ) and a chroma quantization parameter Qp for the second chroma block (902, 912, 922, 932, 942, 952, 962, 972) based on the one or more chroma QP mapping tables. Cq to decide 1621; Chroma quantization parameter Qp for the first chroma block (901, 911, 921, 931, 941, 951, 961, 971) Cpand the chroma quantization parameter Qp for the second chroma block (902, 912, 922, 932, 942, 952, 962, 972). Cq Based on the averaged and rounded chroma quantization parameter Qp C to decide 1631; Averaged and rounded chroma quantization parameter (Qp C ) based on the threshold parameter (t C ) to determine 1641; At least the threshold parameter (t C ) a filtering process is performed 1603 on the chroma block edges (903, 913, 923).
[0471] FIG. 11 is a block diagram illustrating another example unblocking method in accordance with the techniques described in this disclosure (further details are described below, eg, based on FIGS. 9, 10, 12, and 13).
[0472] As shown in FIG. 11, in step 1101, it is determined whether the size of both blocks perpendicular to and adjacent to a given edge in the deblocking direction is 8 samples or more. If yes, a decision process for chroma block edges is performed. The decision process may include steps 1103 and 1107. Details of step 1103 are provided later. In step 1107, it is determined whether a long filter (e.g., a longer tap filter) should be applied, and the chroma longer tap filter may be applied based on a further chroma longer tap filter decision. If the block size is 8 samples or less for at least one of the blocks, a normal weak filter modifying up to (1 + 1) samples is invoked based on the boundary strength value of each edge (step 1105). That is, if the boundary strength (bS) of the edge is 1 or more, a (1 + 1) weak filter is applied. If the bS value is 0, no deblocking filter is applied for the given edge.
[0473] If the block size for both blocks P and Q is 8 samples or more, t C and the average QP is calculated, which is used to determine or derive the beta value. C and Beta are two thresholds derived from the respective tables and indexed by the average QP values of both blocks P and Q.
[0474] t C The and beta values are further used in the deblocking decisions described above in JVET-O2001 section 8.8.3.6.3 and also in section 8.8.3.6.9. If all decisions evaluate to true, the chroma longer tap filter (3+3) is invoked. C is further used in the filtering process for chroma samples described above in JVET-O2001 section 8.8.3.6.9.
[0475] The unblocking decision is made based on the threshold t C and beta values, the filtering process for chroma samples is performed using a threshold t C Since it depends on , by using this method, the chroma QP values used for blocks coded using Joint Cb-Cr Residual (JCCR) mode can be correctly mapped from their corresponding luma QP values, and correct deblocking decisions are achieved, thereby achieving better visual quality.
[0476] Those skilled in the art will appreciate that the "blocks" ("units") of the various figures (method and apparatus) represent or describe functions of embodiments of the present invention (not necessarily individual "units" in hardware or software), and thus equally describe functions or features of method embodiments (units = steps) as well as apparatus embodiments.
[0477] The following is a description of the application of the encoding and decoding methods shown in the above embodiments and a system using them.
[0478] 14 is a block diagram showing a content delivery system 3100 for implementing a content delivery service. The content delivery system 3100 includes a capture device 3102, a terminal device 3106, and optionally a display 3126. The capture device 3102 communicates with the terminal device 3106 through a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 may include, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any combination thereof.
[0479] The capture device 3102 may generate data and encode it using the encoding method described in the above embodiments. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 may include, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include the source device 12 described above. If the data includes video, a video encoder 20 included in the capture device 3102 may actually perform the video encoding process. If the data includes audio (i.e., voice), an audio encoder included in the capture device 3102 may actually perform the audio encoding process. For some practical scenarios, the capture device 3102 delivers the encoded video and audio data by multiplexing them together. In other practical scenarios, for example in a videoconferencing system, the encoded audio data and the encoded video data are not multiplexed: the capture device 3102 delivers the encoded audio data and the encoded video data separately to the terminal device 3106.
[0480] In the content delivery system 3100, the terminal device 3106 receives and plays the encoded data. The terminal device 3106 may be a device capable of receiving and restoring data, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, a vehicle-mounted device 3124, or any combination thereof, capable of decoding the encoded data described above. For example, the terminal device 3106 may include the destination device 14 described above. If the encoded data includes video, the video decoder 30 included in the terminal device is prioritized to perform video decoding. If the encoded data includes audio, the audio decoder included in the terminal device is prioritized to perform audio decoding.
[0481] For terminal devices with a display, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or a vehicle mounted device 3124, the terminal device can provide the decoded data to its display. For terminal devices without a display, such as an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is contacted thereto to receive and display the decoded data.
[0482] When each device in this system performs encoding or decoding, the picture encoding device or picture decoding device shown in the above-mentioned embodiment can be used.
[0483] 15 is a diagram illustrating the structure of an example of the terminal device 3106. After the terminal device 3106 receives the stream from the capture device 3102, a protocol progression unit 3202 analyzes the transmission protocol of the stream. This protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), Hypertext Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof.
[0484] After the protocol progression unit 3202 processes the stream, a stream file is generated. The file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As mentioned above, in some practical scenarios, for example, in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.
[0485] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optionally subtitles are generated. A video decoder 3206, which includes the video decoder 30 as described in the above embodiments, decodes the video ES using the decoding method as shown in the above embodiments to generate video frames and provides this data to a synchronization unit 3212. An audio decoder 3208 decodes the audio ES to generate audio frames and provides this data to a synchronization unit 3212. Alternatively, the video frames may be stored in a buffer (not shown in Figure Y) before being provided to the synchronization unit 3212. Similarly, the audio frames may be stored in a buffer (not shown in Figure Y) before being provided to the synchronization unit 3212.
[0486] The synchronization unit 3212 synchronizes the video and audio frames and provides the video / audio to the video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information. Information may be encoded in the syntax using timestamps for the presentation of the encoded audio and visual data and for the delivery of the data stream itself.
[0487] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes them with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216.
[0488] The present invention is not limited to the above-described systems, and any of the picture encoding devices or picture decoding devices in the above-described embodiments may be incorporated into other systems, for example, vehicle systems.
[0489] Mathematical Operators The mathematical operators used in this application are similar to those used in the C programming language. However, the results of integer division and arithmetic shift operations are more precisely defined, and additional operations such as exponentiation and real division are defined. Numbering and counting conventions generally start from 0. For example, "first" is equivalent to 0th, "second" is equivalent to 1st, etc.
[0490] Arithmetic operators The following operators are defined as follows: + Addition - subtraction (as a two-argument operator) or negation (as a unary prefix operator) * Multiplication, including matrix multiplication x y Exponentiation. Specifies x to the power y. In other contexts, such notation is used for superscripts where interpretation as a power is not intended. / Integer division. The result is truncated towards zero. For example, 7 / 4 and -7 / -4 round down to 1, and -7 / 4 and 7 / -4 round down to -1. ÷ Used to indicate division in mathematical expressions where truncation or rounding is not intended.
number
number
[0491] Logical operators The following logical operators are defined as follows: x && y Boolean logic "and" of x and y x||y Boolean logic "or" of x and y ! Boolean logic "not" x?y:z Evaluates to the value of y if x is true or not equal to 0, otherwise evaluates to the value of z.
[0492] Relational operators The following relational operators are defined as follows: > Greater than >= Greater than or equal to < Less than <= Less than or equal to == Equal to != Not equal to When a relational operator is applied to a syntax element or variable that has been assigned the value "na" (not applicable), the value "na" is treated as the unique value for that syntax element or variable. The value "na" is not considered equal to any other value.
[0493] Bitwise Operators The following bitwise operators are defined as follows: & Bitwise "and". When operating on an integer argument, it operates on the two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding additional significant bits equal to 0. Bitwise "or". When operating on an integer argument, it operates on the two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding additional significant bits equal to 0. ^ Bitwise "exclusive or". When operating on integer arguments, operates on the two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than the other argument, the shorter argument is extended by adding additional significant bits equal to 0. x >> y The arithmetic right shift of y binary digits of the two's complement integer representation of x. This function is defined only for non-negative integer values of y. The bits shifted into the most significant bits (MSBs) as a result of the right shift have the same value as the MSB of x before the shift operation. x << y The arithmetic left shift of y binary digits of the two's complement integer representation of x. This function is defined only for non-negative integer values of y. The bits shifted into the least significant bits (LSBs) as a result of the left shift have a value equal to 0.
[0494] Assignment operator The following arithmetic operators are defined as follows: = Assignment operator ++ Increment, i.e., x++ is equivalent to x = x + 1; when used in an array index, it is evaluated to the value of the variable before the increment operation. -- Decrement, i.e., x-- is equivalent to x = x - 1; when used in an array index, it is evaluated to the value of the variable before the decrement operation. += Increment by the specified amount. I.e., x += 3 is equivalent to x = x + 3, and x += (-3) is equivalent to x = x + (-3). -= Decrement by the specified amount. I.e., x -= 3 is equivalent to x = x - 3, and x -= (-3) is equivalent to x = x - (-3).
[0495] Range notation The following notation is used to specify a range of values: x = y…z x takes integer values starting from y and up to z (both inclusive). Here, x, y, z are integers and z is greater than y.
[0496] Mathematical functions The following mathematical functions are defined:
Number
Claims
1. 1. A deblocking method for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block in image encoding or decoding, the method comprising: performing a decision process for the chroma block edge to obtain a decision result of the decision process; performing a filtering process for the chroma block edges based on the decision result of the decision process, wherein the decision process involves use of a third chroma quantization parameter (Qpc); The decision process: a first chroma quantization parameter (Qp Cp ), wherein the first chroma quantization parameter (Qp Cp ) is the first luma quantization parameter (Qp YP ) and a chroma quantization parameter (QP) mapping table for the first chroma block, wherein the chroma QP mapping table for the first chroma block is a first chroma QP mapping table for the joint Cb-Cr residual (JCCR) coded block if the first chroma block is a joint Cb-Cr residual (JCCR) coded block of the first image block, or the chroma QP mapping table for the first chroma block is a second chroma QP mapping table for the first chroma component (Cb) if the first chroma block is a first chroma component (Cb) of the first image block, or the chroma QP mapping table for the first chroma block is a third chroma QP mapping table for the second chroma component (Cr) if the first chroma block is a second chroma component (Cr) of the first image block; a second chroma quantization parameter (Qp Cq ), wherein the second chroma quantization parameter (Qp Cq ) is the second luma quantization parameter (Qp YQ ) and a chroma QP mapping table for the second chroma block, wherein the chroma QP mapping table for the second chroma block is a first chroma QP mapping table for the joint Cb-Cr residual (JCCR) coded block if the second chroma block is a joint Cb-Cr residual (JCCR) coded block of the second image block, or the chroma QP mapping table for the second chroma block is a second chroma QP mapping table for the first chroma component (Cb) if the second chroma block is a first chroma component (Cb) of the second image block, or the chroma QP mapping table for the second chroma block is a third chroma QP mapping table for the second chroma component (Cr) if the second chroma block is a second chroma component (Cr) of the second image block; The first chroma quantization parameter (Qp Cp ) and the second chroma quantization parameter (Qp Cq ) based on averaging the third chroma quantization parameter (Qp C ) and determining the third chroma quantization parameter Qp C is used for the decision process for the chroma block edges, at least one of the first chroma block and the second chroma block is a joint Cb-Cr residual JCCR coded block; Deblocking methods.
2. 2. The deblocking method of claim 1, wherein the first chroma block is a joint Cb-Cr residual JCCR coded block of the first image block and the second chroma block is a joint Cb-Cr residual (JCCR) coded block of the second image block.
3. 2. The deblocking method of claim 1, wherein the first chroma block is a joint Cb-Cr residual JCCR coded block of the first image block, and the second chroma block is a first chroma component of the second image block.
4. 2. The deblocking method of claim 1, wherein the first chroma block is a joint Cb-Cr residual JCCR coded block of the first image block, and the second chroma block is a second chroma component of the second image block.
5. 2. The deblocking method of claim 1, wherein the first chroma block is a first chroma component of the first image block and the second chroma block is a joint Cb-Cr residual JCCR coded block of the second image block.
6. 2. The deblocking method of claim 1, wherein the first chroma block is a second chroma component of the first image block, and the second chroma block is a joint Cb-Cr residual JCCR coded block of the second image block.
7. 2. The deblocking method of claim 1, wherein the first chroma QP mapping table, the second chroma QP mapping table, and the third chroma QP mapping table are indicated or indexed by a first index value, a second index value, and a third index value, respectively.
8. 8. The deblocking method of claim 7, wherein the first index value is 3, the second index value is 1, and the third index value is 2.
9. 2. The deblocking method of claim 1, wherein the joint Cb-Cr coded block is coded using a JCCR mode, the JCCR mode being a second mode in a set of available JCCR modes.
10. the first image block and the second image block are transform blocks; or the first image block and the second image block are coding blocks; The deblocking method of claim 1 .
11. 11. A deblocking filter apparatus for use in an image encoder or decoder for deblocking a chroma block edge between a first chroma block of a first image block and a second chroma block of a second image block, the deblocking filter apparatus being configured to perform the deblocking method of any one of claims 1 to 10.
12. 11. A computer program having program instructions for carrying out a method according to any one of claims 1 to 10 when the program instructions are run on a computer.