Using edge strength in deblocking filtering

By introducing rules in video encoding and decoding to determine the boundaries and parameters of the deblocking filter, the problem of low efficiency in the use of video encoding and decoding bandwidth in the prior art is solved, and more efficient video compression and processing is achieved.

CN114270848BActive Publication Date: 2025-04-29DOUYIN VISION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080059654.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-08-23
Filing Date
2020-08-24
Publication Date
2025-04-29
Estimated Expiration
2040-08-24

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies still have the problem of low bandwidth usage efficiency when processing digital videos, especially when using loop filters such as de-blocking filters, it is difficult to effectively determine the boundaries and parameters of the filter, which affects the encoding and decoding performance.

Method used

The subblock boundaries and parameters of the deblocking filter are determined by introducing rules in video encoding and decoding, including determining the filter length based on the relationship between subblock position, width and height, and dynamically adjusting the filter strength and parameters during the encoding and decoding process.

Benefits of technology

It improves the compression performance of video encoding and decoding, reduces the bandwidth requirements of digital video in the Internet and digital communication networks, and improves the efficiency of video processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114270848B_ABST
    Figure CN114270848B_ABST
Patent Text Reader

Abstract

A video processing method is described. The method comprises: for a conversion between a current video block of a video and a codec representation of the video, determining a boundary strength to be applied to a subblock boundary of the current video block using a deblocking filter based on a rule; and performing the conversion based on the determination, wherein the rule provides that the boundary strength is set equal to 2 regardless of whether the subblock boundary is a transform block boundary.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application timely claims priority and the benefit of International Patent Application No. PCT / CN2019 / 102217 filed on August 23, 2019, in accordance with applicable patent law and / or the rules applicable to the Paris Convention. For all legal purposes, the entire disclosure of the above application is incorporated by reference as part of the disclosure of this application. Technical Field

[0003] This patent document relates to video encoding and decoding. Background Art

[0004] Despite advances in video compression, digital video remains the largest bandwidth consumer on the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, bandwidth requirements for digital video usage are expected to continue to grow. Summary of the invention

[0005] Apparatus, systems and methods related to digital video processing, particularly video and image encoding and decoding using loop filtering (eg, deblocking filters).

[0006] In one example aspect, a video processing method is disclosed. The method includes: for a subblock of a current video block of a video, determining a subblock boundary to which a deblocking filter is to be applied according to a rule; and performing a conversion between the video and a codec representation of the video using the deblocking filter, wherein the rule provides that a deblocking filter length is determined without checking a relationship between i) a sum of a position of the subblock of the current video block and a predefined value and ii) a width or height of the current video block.

[0007] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a current video block and a codec representation of a video, making a determination based on a rule as to whether to apply a deblocking filter to a boundary between sub-blocks of the current video block and / or a deblocking parameter to be used when applying the deblocking filter; and performing the conversion based on the determination, wherein the rule is based on whether the boundary falls on an NxM sample grid of a sub-block and / or whether the boundary is a natural boundary of the current video block, where N and M are integers.

[0008] In another example aspect, another video processing method is disclosed. The method includes: making a determination to apply a deblocking filter to an NxN sample grid of a current video block encoded using a geometric prediction mode, wherein the current video block is divided into a plurality of sub-partitions for prediction, wherein N is equal to 4 or 8; and performing a conversion between a video including the current video block and a coded representation of the video based on the determination.

[0009] In another example aspect, another video processing method is disclosed. The method includes: for a subblock of a current video block of a video, determining a subblock boundary to which a deblocking filter is to be applied according to a rule; and performing conversion between the video and a coded representation of the video using the deblocking filter.

[0010] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a current video block of a video and a codec representation of the video, determining a boundary strength to be applied to a subblock boundary of the current video block using a deblocking filter based on a rule; and performing the conversion based on the determination, wherein the rule provides that the boundary strength is set equal to 2 regardless of whether the subblock boundary is a transform block boundary.

[0011] In another example aspect, another video processing method is disclosed. The method includes: performing a conversion between a current video block of a video and a codec representation of the video according to a rule, wherein the conversion uses a sub-block transform (SBT) tool, and the conversion includes: during encoding, splitting the current video block into transform blocks (TBs) and applying a TB-level transform to the TBs, or during decoding, applying a TB-level inverse transform to codec samples in the codec representation of the video, wherein the rule specifies that an adaptive filter is enabled across at least three TB boundaries in a horizontal direction and / or a vertical direction.

[0012] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a current video block of a video and a codec representation of the video, making a determination that two adjacent samples located on either side of an edge of the current video block belong to two transform blocks that do not have non-zero transform coefficient levels; based on the first determination, making a second determination to set a deblocking filter strength of the current block edge to zero; and performing the conversion using the first determination and the second determination.

[0013] In another example aspect, another video processing method is disclosed. The method includes: performing a conversion between a current video block of a video and a codec representation of the video using a decoder-side motion vector refinement (DMVR) tool; and applying a deblocking filter to a reconstructed video block generated during the conversion; wherein the DMVR tool includes: generating the reconstructed video block by motion compensation using a refined motion vector generated by refining a motion vector of a codec in the codec representation; wherein parameters of the deblocking filter are based on the refined motion vector.

[0014] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a current video block of a video and a codec representation of the video, determining a deblocking filter strength for a deblocking filter process based on a rule; and performing the conversion based on the determination, and wherein the rule stipulates that the deblocking filter strength does not depend on a prediction mode of a neighboring block of the current video block.

[0015] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a current video block of a video and a codec representation of the video, determining whether to apply a deblocking filter to the boundary of the current video block and / or a deblocking parameter to be used if the deblocking filter is applied based on a rule that depends on or is independent of the type of the boundary; and performing the conversion based on the above determination.

[0016] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a video region of a video and a codec representation of the video, determining that a deblocking filter in one direction is not applied on a virtual boundary N samples away from a horizontal boundary, where N is an integer greater than 0; and performing the conversion based on the determination.

[0017] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a video region of a video and a codec representation of the video, determining whether and how to use a deblocking filter to clip sample values ​​during deblocking based on a rule, the rule depending on whether a boundary to be filtered by the deblocking filter coincides with a virtual boundary that is N samples away from a horizontal boundary of the video region, where N is an integer greater than 0; and performing the conversion based on the determination.

[0018] In another example aspect, another video processing method is disclosed. The method includes: determining a codec tool for conversion between a current video block of a video and a codec representation of the video according to a rule; and performing the conversion according to the codec tool, wherein the rule stipulates that a sub-block transform (SBT) tool is used exclusively with a sub-block based codec mode.

[0019] In another example aspect, another video processing method is disclosed. The method includes: for a current video block that is divided into sub-partitions according to the use of an intra sub-block partitioning (ISP) mode, determining to apply a deblocking filter to a boundary between two sub-partitions of the current video block; and based on the determination, performing a conversion between the current video block of a video and a codec representation of the video.

[0020] In another example aspect, another video processing method is disclosed. The method includes: for a current video block coded using a geometric prediction mode, determining a boundary between two MxN regions of the current video block to which a deblocking filter is applied, wherein the current video block is divided into sub-partitions, where M and N are integers; and performing a conversion between the current video block of a video and a coded representation of the video based on the determination.

[0021] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a video including video blocks and a codec representation of the video, determining that a deblocking filter is applied to a boundary between two adjacent video blocks because at least one of the two adjacent video blocks is coded using a geometric prediction mode, wherein at least one of the two adjacent video blocks is divided into sub-partitions; and performing the conversion based on the determination.

[0022] In another example aspect, another video processing method is disclosed. The method includes: for a conversion between a current video block of a video and a codec representation of the video, determining a filter parameter used in a filtering process based on the rule; and performing the conversion based on the determination, wherein the rule specifies that the filter parameter depends on i) motion information used in a motion compensation process, ii) motion information stored in a motion memory, or iii) motion information used in a motion vector prediction process.

[0023] In another example aspect, another video processing method is disclosed. The method includes: performing conversion between a video and a codec representation of the video, and wherein the codec representation conforms to a format rule, wherein the format rule specifies whether to include a chroma syntax element indicating a chroma component in the codec representation based on a chroma format, a codec mode associated with the chroma component, or a chroma information syntax element.

[0024] In yet another representative aspect, the above method is implemented in the form of processor executable code and stored in a computer readable program medium.

[0025] In yet another representative aspect, a device is disclosed, which is configured or operable to perform the above method. The device may include a processor programmed to implement the method.

[0026] In yet another representative aspect, a video decoder device can implement the method as described herein.

[0027] The above-described aspects, as well as other aspects and features of the disclosed technology are described in more detail in the drawings, the description and the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 An example of sample point location is shown. i,k and q i,k .

[0029] Figure 2 An example of de-squaring on an 8x8 grid is shown.

[0030] Figure 3 An example of a weak filter with one sample modification for 4xN, Nx4 and 8xN, Nx8 blocks is shown.

[0031] Figure 4 An example of modified block classification at a virtual boundary is shown.

[0032] Figure 5 An example of modified ALF filtering of the luma component at a virtual boundary is shown.

[0033] Fig. 6A and 6B is a block diagram of an example implementation of a hardware platform for video processing.

[0034] Figure 7 is a flow chart of an example method of video processing.

[0035] Figures 8A-8D A flow chart illustrating an example method of video processing is shown.

[0036] Figures 9A-9I A flow chart illustrating an example method of video processing is shown.

[0037] Figures 10A-10C A flow chart illustrating an example method of video processing is shown. DETAILED DESCRIPTION

[0038] Embodiments of the disclosed technology can be applied to existing video codec standards (e.g., HEVC, H.265) and future standards to improve compression performance. In this document, section headings are used to improve the readability of the description and do not in any way limit the discussion or embodiments (and / or implementations) to the corresponding section.

[0039] 1. Introduction

[0040] This article relates to video codec technology. Specifically, it relates to deblocking filtering and related technologies in video codecs. It can be applied to existing video codec standards such as HEVC, and can also be applied to a pending standard (Multi-function Video Codec). It is also applicable to future video codec standards or video codecs.

[0041] 2. Preliminary Discussion

[0042] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T produced H.261 and H.263, ISO / IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations worked together to produce the H.262 / MPEG-2 Video and H.264 / MPEG-4 Enhanced Video Codec (AVC) and H.265 / HEVC standards. Starting with H.262, video codec standards are based on a hybrid video codec structure that utilizes temporal prediction and transform codecs. In order to explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new methods and introduced them into a reference software called the "Joint Exploration Model" (JEM). JVET meetings are held simultaneously every quarter, and the goal of the new codec standard is to reduce the bit rate by 50% compared to HEVC. The new video codec standard was officially named Versatile Video Codec (VVC) at the JVET meeting in April 2018, and the first version of the VVC Test Model (VTM) was released at that time. With the continuous efforts to standardize VVC, the VVC standard adopts new codec technologies at each JVET meeting. The VVC working draft and test model VTM are updated after each meeting. Currently, the VVC project aims to achieve technical completion (FDIS) at the July 2020 meeting.

[0043] 2.1 Deblocking Filter in VVC

[0044] VTM6 has a total of three loop filters. VTM5 uses an adaptive loop filter (ALF) in addition to the deblocking filter and SAO (the two loop filters in HEVC). The order of filtering processing in VTM6 is deblocking filter, SAO and ALF. In VTM6, the deblocking filter processing is basically the same as in HEVC. However, the following modifications are added.

[0045] a) The filtering strength of the deblocking filter depends on the average brightness level of the reconstructed samples.

[0046] b) Unblock tC table expansion.

[0047] c) Luma deblocking on a 4x4 sample grid and chroma deblocking on an 8x8 sample grid.

[0048] d) Stronger luminance deblocking filter.

[0049] e) Stronger chroma deblocking filter.

[0050] 2.1.1 Filter strength depends on the reconstructed average brightness level

[0051] In HEVC, the filter strength of the deblocking filter is determined by the average quantization parameter qP L Derived variables β and t C In VTM5, the deblocking filter controls the brightness level of the reconstructed samples by L An offset is added to control the strength of the deblocking filter. The reconstructed luminance level LL is derived as follows:

[0052] LL=((p 0,0 +p 0,3 +q 0,0 +q 0,3 )>>2) / (1< <bitDepth)

[0053] Among them, Figure 1 The sample values ​​p for i=0..3 and k=0 and 3 are derived as shown i,k and q i,k .

[0054] Variable qP L The derivation is as follows:

[0055] Q L =((Qp Q +Qp P +1)>>1)+qpOffset

[0056] where Qp Q and Qp P Respectively represent the sample points q 0,0 and p0,0 The quantization parameter of the codec unit. The offset qpOffset depends on the transform function and the value is signaled in the SPS.

[0057] 2.1.2 Block removal tC table expansion

[0058] In VVC, the maximum QP changes from 51 to 63, and the corresponding change needs to be reflected in the deblocking table, which derives the value of the deblocking parameter tC based on the block QP. Table 1 is the updated t C ' table to adapt to the expansion of the QP range. C The derivation is as follows:

[0059] t C =BitDepth Y <10? (t C ′+2)>>(10-BitDepth Y ): t C ′*(1<<(BitDepth Y -10))

[0060] Table 1 - Derivation of threshold variables β′ and t from input Q C '

[0061] Q 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 β′ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 <![CDATA[t C ′]]> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Q 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 β′ 7 8 9 10 11 12 13 14 15 16 17 18 20 22 24 26 28 <![CDATA[t C ′]]> 0 3 4 4 4 4 5 5 5 5 7 7 8 9 10 10 11 Q 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 β′ 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 <![CDATA[t C ′]]> 13 14 15 17 19 21 24 25 29 33 36 41 45 51 57 64 71 Q 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 β′ 64 66 68 70 72 74 76 78 80 82 84 86 88 - - <![CDATA[t C ′]]> 80 89 100 112 125 141 157 177 198 222 250 280 314 352 395

[0062] 2.1.3 Stronger Luminance Deblocking Filter

[0063] When samples on either side of the boundary belong to a large block, a bilinear filter (stronger deblocking filter) is used. Samples belonging to a large block are defined as: for vertical edges, when the width is greater than or equal to 32; for horizontal edges, when the height is greater than or equal to 32. Then linear interpolation is used to replace the block boundary samples p from i = 0 to Sp-1 i and q from j = 0 to Sq-1 i , as shown below:

[0064] p i ′=(f i *Middle s,t +(64-f i )*P s +32)>>6), clipped to p i ±tcPD i

[0065] q j ′=(g j *Middle s,t +(64-g j )*Q s +32)>>6), clipped to qj ±tcPD j

[0066] The term tcPD i and tcPD j is position-dependent shear, and g j ,f i ,Middle s,t ,P s and Q s As shown below:

[0067] Table 2 – Derivation of stronger luma deblocking filter parameters

[0068]

[0069]

[0070] The stronger luminance filter is used only when conditions 1, 2, and 3 are all true. Condition 1 is the "large block condition". This condition detects whether the samples on the P and Q sides belong to large blocks. Conditions 2 and 3 are determined by:

[0071] Condition2=(d<β)? TRUE:FALSE

[0072] Condition3=StrongFilterCondition=(dpq is less than (β>>2),sp3+sq3

[0073] is less than (3*β>>5), and Abs(p0-q0) is less than (5*t C +1)>>1)?

[0074] TRUE:FALSE

[0075] 2.1.4 Strong deblocking filter for chroma

[0076] The following chroma strong deblocking filters are defined:

[0077] p2′=(3*p3+2*p2+p1+p0+q0+4)>>3

[0078] p1′=(2*p3+p2+2*p1+p0+q0+q1+4)>>3

[0079] p0′=(p3+p2+p1+2*p0+q0+q1+q2+4)>>3

[0080] The above chroma filter performs deblocking on an 8x8 chroma sample grid. A chroma strong filter is used on both sides of the block boundary. Here, the chroma filter is selected when both sides of the chroma edge are greater than or equal to 8 (in units of chroma samples), and the following decision with three conditions is met. The first is to determine the boundary strength and large blocks. The second and third are basically the same as the luma decision of HEVC, which is an on / off decision and a strong filtering decision, respectively. In the first decision, the boundary strength (bS) used for chroma filtering is modified, as shown in Table 2. The conditions in Table 3 are checked in order. If the conditions are met, the remaining conditions with lower priority are skipped.

[0081] Table 3 - Modified border strength (note that P and Q are the two adjacent blocks to the left / right or above / bottom of the edge of the deblock)

[0082]

[0083]

[0084] Chroma deblocking is performed when bS is equal to 2, or bS is equal to 1 when a large block boundary is detected. The second and third conditions are basically the same as the luma strong filtering decision of HEVC.

[0085] 2.1.5 Luma Deblocking on a 4x4 Sample Grid and Chroma Deblocking on an 8x8 Sample Grid

[0086] VTM5.0 performs deblocking on an 8x8 sample grid. Therefore, deblocking is performed only on all block edges that overlap the 8x8 sample grid. Due to the VTM5.0 partitioning scheme (binary tree (BT), ternary tree (TT), intra sub-partitioning, sub-block transform), some long CU edges may not overlap the 8x8 sample grid, but still have sufficient blocking artifacts. Figure 2 This scene is depicted in . The edge shown in grey belongs to the 4x16 block and VTM5.0 deblocking will not perform deblocking on this edge because it does not overlap the 8x8 sample grid.

[0087] In VTM6.0, luma deblocking is applied on a 4x4 sample grid and chroma deblocking is applied on an 8x8 sample grid. When the size of any block sharing an edge is 4 samples (i.e. width = 4 samples for vertical edge, height = 4 samples for horizontal edge), it implements luma weak filtering by modifying one sample or not modifying the sample.

[0088] The different steps performed for vertical edges are as follows:

[0089] Check whether the filter on / off condition for each edge (i.e., d < Beta, where d = dpq0 + dpq3 and dpq0 = dp0 + dq0 and dpq3 = dp3 + dq3) is true. If true, then:

[0090] - Check whether the block width of one of the blocks is 4 samples. If true, then

[0091] - Modify and enforce the weak filter using at most one sample. Thus, check the following condition, |δ| < 10(t C ) where δ = (9*(q0 - p0) - (3*(q1 - p1) + 8) >> 4, and if the evaluation condition is true, then modify samples p0 and q0, otherwise no filtering is applied.

[0092] Figure 3 Examples of weak filters with one-sample modification for 4xN, Nx4, 8xN, and Nx8 blocks are shown.

[0093] 2.1.6 Boundary Decision (Edges That Can Be Filtered)

[0094] For luminance, filtering is applied to a 4x4 grid, and for chrominance, filtering is applied to an 8x8 grid. Additionally, it must be a transform block boundary or a codec sub-block boundary (e.g., due to the use of affine motion prediction, ATMVP). For those boundaries that are not like this, the filter is disabled. maxFilterLengthPs and maxFilterLengthQs represent the number of samples to be filtered on the P and Q sides, respectively.

[0095] 2.1.6.1 TU Boundary

[0096] For every 4 columns (or 4 rows for horizontal edges) of the horizontal edge, check the following to determine the filter lengths of the P and Q blocks respectively. Taking the horizontal edge as an example:

[0097] – If the row is a transform block edge (i.e., the position (xCb + x, yCb + y) is on the transform block edge), then edgeFlags[x][y] is set to 1.

[0098] – If edgeFlags[x][y] is set to 1, then the following applies:

[0099] – Set maxFilterLengthQs[x][y]:

[0100] - If the transform block height of P or Q is less than or equal to 4,

[0101] then set maxFilterLengthQs[x][y] to 1;

[0102] - If the transform block height of Q is equal to or greater than 32,

[0103] Then set maxFilterLengthQs[x][y] to 7;

[0104] Otherwise, set maxFilterLengthQs[x][y] to 3.

[0105] – Set maxFilterLengthPs[x][y]:

[0106] - if the transform block width of P or Q is less than or equal to 4,

[0107] Then set maxFilterLengthPs[x][y] to 1;

[0108] - if the transform block width of P is equal to or greater than 32,

[0109] Then set maxFilterLengthPs[x][y] to 7;

[0110] Otherwise, set maxFilterLengthPs[x][y] to 3.

[0111] 2.1.6.2 Sub-block boundaries

[0112] The sub-block height used in the deblocking filter process for sub-block boundary detection is set to Max(8, nCbH / numSbY).

[0113] – The array edgeTbFlags is set equal to edgeFlags.

[0114] – For yEdge = 0..min((nCbH / 8)-1,numSbY-1), x = 0..nCbW-1:

[0115] – The vertical position y within the current codec block is set equal to yEdge*sbH.

[0116] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[0117] – If y is equal to 0 (the first subblock) and edgeFlags[x][y] is equal to 1, the following applies:

[0118] – When numSbY is greater than 1 (Q is a coded subblock), the following applies: maxFilterLengthQs[x][y] = Min(5, maxFilterLengthQs[x][y]) (8-1039)

[0119] – When inter_affine_flag[xCb][yCb-1] is equal to 1 or merge_subblock_flag[xCb][yCb-1] is equal to 1 (P is a coded subblock), the following applies:

[0120] maxFilterLengthPs[x][y]=Min(5,maxFilterLengthPs[x][y]) (8-1040)

[0121] – Otherwise, if edgeTbFlags[x][y] is equal to 1 (not the first sub-block and TB boundary), the following applies:

[0122] maxFilterLengthPs[x][y]=Min(5,maxFilterLengthPs[x][y]) (8-1041)

[0123] maxFilterLengthQs[x][y]=Min(5,maxFilterLengthQs[x][y]) (8-1042)

[0124] – Otherwise, if one or more of the following conditions are true:

[0125] –(y+4) is greater than or equal to nCbH, (the last sub-block)

[0126] –edgeTbFlags[x][y-4] is equal to 1, (the upper 4 sample array is the TU boundary)

[0127] –edgeTbFlags[x][y+4] is equal to 1, (the 4 sample point array below is the TU boundary)

[0128] Then the following applies:

[0129] maxFilterLengthPs[x][y]=maxFilterLengthQs[x][y]=1

[0130] – Otherwise, if one or more of the following conditions are true:

[0131] –yEdge is equal to 1, (second sub-block)

[0132] –yEdge is equal to (nCbH / 8)-1, (the last sub-block)

[0133] –edgeTbFlags[x][y-sbH] is equal to 1, (the sbH sample array above is the TU boundary)

[0134] –edgeTbFlags[x][y+sbH]

[0135] When it is equal to 1, then (the sbH sample array above is the TU boundary)

[0136] Then the following applies:

[0137] maxFilterLengthPs[x][y]=maxFilterLengthQs[x][y]=2

[0138] – Otherwise, the following applies:

[0139] maxFilterLengthPs[x][y]=maxFilterLengthQs[x][y]=3

[0140] It can be seen that the deblocking filter is enabled on the 4x4 luma grid at the transform edge, but it is enabled on the 8x8 luma grid at the sub-block boundary. The sub-block boundary includes the prediction unit boundary introduced by STMVP and affine mode. For SbTMVP and affine sub-blocks on the 8x8 grid, the logic in the PU in the HEVC deblocking filter is the same. For PU boundaries, the deblocking filter is applied on the 8x8 grid taking into account the difference between the motion vectors of the neighboring sub-blocks and the reference picture.

[0141] 2.2 Deblocking Filtering in VVC Standard WD6

[0142] The following deblocking filter specification is extracted from the latest VVC working draft JVET-O2001-vE.

[0143] 2.2.1 Deblocking Filtering

[0144] 2.2.1.1 Overview

[0145] The input to this process is the reconstructed image before deblocking, i.e. the array recPicture L , and the array recPicture when ChromaArrayType is not equal to 0 Cb and recPicture Cr .

[0146] The output of this process is the modified reconstructed picture after deblocking, i.e. the array recPictureL , and the array recPicture when ChromaArrayType is not equal to 0 Cb and recPicture Cr .

[0147] First, filter the vertical edges in the image. Then filter the horizontal edges in the image using the modified samples processed by the vertical edge filter as input. The vertical and horizontal edges in the CTB of each CTU are processed separately on a codec unit basis. Filter the vertical edges of the codec blocks in the codec unit starting from the edge on the left side of the codec block, passing through these edges in their geometric order towards the right side of the codec block. Filter the horizontal edges of the codec blocks in the codec unit starting from the edge above the codec block, passing through these edges in their geometric order to the bottom of the codec block.

[0148] NOTE - Although filtering is specified on a picture basis in this specification, filtering may be implemented on a codec unit basis and achieve equivalent results as long as the decoder correctly interprets the processing dependencies to produce the same output values.

[0149] The deblocking filter is applied to all codec sub-block edges and transform block edges of the picture, except for the following types of edges:

[0150] – edges at the borders of the picture,

[0151] – edges that coincide with sub-picture boundaries, where loop_filter_across_subpic_enabled_flag[SubPicIdx] is equal to 0,

[0152] – When pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1, the edges that coincide with the virtual boundaries of the picture,

[0153] – When loop_filter_across_bricks_enabled_flag is equal to 0, the edges that coincide with the brick borders,

[0154] – When loop_filter_across_slices_enabled_flag is equal to 0, the edges that coincide with the slice boundaries,

[0155] – an edge that coincides with the upper or left border of a slice, where slice_deblocking_filter_disabled_flag is equal to 1,

[0156] – edges within a slice where slice_deblocking_filter_disabled_flag is equal to 1,

[0157] – edges that do not correspond to the boundaries of the 4x4 sample grid of the luma component,

[0158] – edges that do not correspond to the boundaries of the 8x8 sample grid of the chroma components,

[0159] – an edge within the luma component, where intra_bdpcm_flag is equal to 1 on both sides of the edge,

[0160] – Edges of chroma sub-blocks that are not edges of the associated transform unit.

[0161] The edge type (vertical or horizontal) is represented by the variable edgeType as specified in Table 8-17.

[0162] Table 8-17 – Names associated with edgeType

[0163]

[0164] When slice_deblocking_filter_disabled_flag for the current slice is equal to 0, the following applies:

[0165] – The variable treeType is set to DUAL_TREE_LUMA.

[0166] – Using the variable treeType, the reconstructed picture before removing the block (i.e. the array recPicture L ), and the variable edgeType set to EDGE_VER as input, filter the vertical edges by calling the one-directional deblocking filtering process specified in Section 8.8.3.2, and pass the modified reconstructed picture after deblocking (i.e., the array recPicture L ) as output.

[0167] – Using the variable treeType, the reconstructed picture before removing the block (i.e. the array recPicture L ), and the variable edgeType set to EDGE_HOR as input, filter the horizontal edges by calling the one-directional deblocking filtering process specified in Section 8.8.3.2, and pass the modified reconstructed picture after deblocking (i.e., the array recPicture L ) as output.

[0168] – When ChromaArrayType is not equal to 0, the following applies:

[0169] – The variable treeType is set to DUAL_TREE_CHROMA

[0170] – Using the variable treeType, the reconstructed picture before removing the block (i.e. the array recPicture Cb and recPicture Cr ), and the variable edgeType set to EDGE_VER as input, filter the vertical edges by calling the one-directional deblocking filtering process specified in Section 8.8.3.2, and pass the modified reconstructed picture after deblocking (i.e., the array recPicture Cb and recPicture Cr ) as output.

[0171] – Using the variable treeType, the reconstructed picture before removing the block (i.e. the array recPicture Cb and recPicture Cr ), and the variable edgeType set to EDGE_HOR as input, filter the horizontal edges by calling the one-directional deblocking filtering process specified in Section 8.8.3.2, and pass the modified reconstructed picture after deblocking (i.e., the array recPicture Cb and recPicture Cr ) as output.

[0172] 2.2.1.2 Deblocking Filtering in One Direction

[0173] The input to this process is:

[0174] – The variable treeType specifies whether the current processing is luma (DUAL_TREE_LUMA) or chroma (DUAL_TREE_CHROMA),

[0175] – When treeType is equal to DUAL_TREE_LUMA, the reconstructed picture before deblocking (i.e. the array recPicture L ),

[0176] – Array recPicture when ChromaArrayType is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA Cb and recPicture Cr ,

[0177] – The variable edgeType, which specifies whether the filtering is vertical (EDGE_VER) or horizontal (EDGE_HOR).

[0178] The output of this process is the modified reconstructed image after deblocking, namely:

[0179] – Array recPicture when treeType equals DUAL_TREE_LUMA L ,

[0180] – array recPicture when ChromaArrayType is not equal to 0 and treeType is equal to DUAL_TREE_CHROMA Cb and recPicture Cr .

[0181] The variables firstCompIdx and lastCompIdx are derived as follows:

[0182] firstCompIdx=(treeType==DUAL_TREE_CHROMA)? 1:0 (8-1022)

[0183] lastCompIdx=(treeType==DUAL_TREE_LUMA||ChromaArrayType==0)? 0:2 (8-1023)

[0184] For each codec unit and each codec block, for each color component of the codec unit indicated by the color component index cIdx (from firstCompIdx to lastCompIdx, including firstCompIdx and lastCompIdx), the codec block width nCbW, the codec block height nCbH, and the position of the upper left sample point of the codec block (xCb, yCb), when cIdx is equal to 0, or when cIdx is not equal to 0 and edgeType is equal to EDGE_VER and xCb%8 is equal to 0, or when cIdx is not equal to 0 and edgeType is equal to EDGE_HOR and yCb%8 is equal to 0, filter the edges in the following order of steps:

[0185] 1. The variable filterEdgeFlag is exported as follows:

[0186] – If edgeType is equal to EDGE_VER, and one or more of the following conditions are met, filterEdgeFlag is set to 0:

[0187] – The left edge of the current codec block is the left edge of the picture.

[0188] – The left boundary of the current codec block is the left boundary or right boundary of the sub-picture, and loop_filter_across_subpic_enabled_flag[SubPicIdx] is equal to 0.

[0189] – The left boundary of the current codec block is the left boundary of the brick and loop_filter_across_bricks_enabled_flag is equal to 0.

[0190] – The left boundary of the current codec block is the left boundary of the slice, and loop_filter_across_slices_enabled_flag is equal to 0.

[0191] – The left boundary of the current codec block is one of the vertical virtual boundaries of the picture and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1.

[0192] – Otherwise, if edgeType is equal to EDGE_HOR and one or more of the following conditions are met, the variable filterEdgeFlag is set to 0:

[0193] – The upper boundary of the current luma codec block is the upper boundary of the picture.

[0194] – The upper boundary of the current codec block is the upper boundary or the lower boundary of the sub-picture, and loop_filter_across_subpic_enabled_flag[SubPicIdx] is equal to 0.

[0195] – The upper boundary of the current codec block is the upper boundary of the bricks, and loop_filter_across_bricks_enabled_flag is equal to 0.

[0196] – The upper boundary of the current codec block is the upper boundary of the slice, and loop_filter_across_slices_enabled_flag is equal to 0.

[0197] – The upper boundary of the current codec block is one of the horizontal virtual boundaries of the picture, and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1.

[0198] – Otherwise, filterEdgeFlag is set to 1.

[0199] 2. All elements of the two-dimensional (nCbW) x (nCbH) arrays edgeFlags, maxFilterLengthQs, and maxFilterlengthPs are initialized to zero.

[0200] 3. With position (xCb, yCb), codec block width nCbW, codec block height nCbH, variable cIdx, variable filterEdgeFlag, array edgeFlags, maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs, and variable edgeType as input, call the derivation process of transform block boundaries specified in clause 8.8.3.3, with the modified array edgeFlags, the modified maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs as output.

[0201] 4. When cIdx is equal to 0, the derivation of the codec sub-block boundaries specified in clause 8.8.3.4 is called with position (xCb, yCb), codec block width nCbW, codec block height nCbH, array edgeFlags, maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs, and variable edgeType as input, with the modified array edgeFlags, the modified maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs as output.

[0202] 5. The image sample array recPicture is exported as follows:

[0203] – If cIdx is equal to 0, set recPicture to the reconstructed luminance sample array recPicture before deblocking L .

[0204] – Otherwise, if cIdx is equal to 1, recPicture is set to the reconstructed chroma picture sample array recPicture before deblocking Cb .

[0205] – Otherwise (cIdx is equal to 2), set recPicture to the reconstructed chroma picture sample array recPicture before deblocking Cr .

[0206] 6. With the picture sample array recPicture, the luma positions (xCb, yCb), the codec block width nCbW, the codec block height nCbH, the variable edgeType, the variable cIdx and the array edgeFlags as input, call the derivation process of the boundary filter strength specified in clause 8.8.3.5, with the (nCbW)x(nCbH) array bS as output.

[0207] 7. With the variable edgeType, the variable cIdx, the reconstructed picture recPicture before deblocking, the position (xCb, yCb), the codec block width nCbW, the codec block height nCbH and the arrays bS, maxFilterLengthPs and maxFilterLengthQs as input, call the edge filtering process of one direction of the codec block specified in Section 8.8.3.6, and use the modified reconstructed picture recPicture as output.

[0208] 2.2.1.3 Derivation of transform block boundaries

[0209] The input to this process is:

[0210] – Position (xCb, yCb), specifies the upper left sample point of the current codec block relative to the upper left sample point of the current picture,

[0211] –Variable nCbW, specifies the current codec block width,

[0212] –Variable nCbH, specifies the current codec block height,

[0213] – Variable cIdx specifies the color component of the current codec block.

[0214] – variable filterEdgeFlag,

[0215] – 2D (nCbW) x (nCbH) array edgeFlags,

[0216] – 2D (nCbW) x (nCbH) arrays of maxFilterLengthQs and maxFilterLengthPs,

[0217] – The variable edgeType specifies whether the filtering is vertical (EDGE_VER) or horizontal (EDGE_HOR).

[0218] The output of this processing is:

[0219] – Modified 2D (nCbW) x (nCbH) array edgeFlags,

[0220] – Modified 2D (nCbW)x(nCbH) array maxFilterLengthQs, maxFilterLengthPs.

[0221] Depending on edgeType, the arrays edgeFlags, maxFilterLengthPs and maxFilterLengthQs are derived as follows:

[0222] – The variable gridSize is set as follows:

[0223] gridSize=cIdx==0?4:8 (8-1024)

[0224] – If edgeType equals EDGE_VER, the following applies

[0225] – The variable numEdges is set equal to Max(1, nCbW / gridSize).

[0226] – For xEdge = 0..numEdges-1 and y = 0..nCbH-1, the following applies:

[0227] – The horizontal position x within the current codec block is set equal to xEdge*gridSize.

[0228] –The value of edgeFlags[x][y] is derived as follows:

[0229] - If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and (xCb+x) is equal to PpsVirtualBoundariesPosX[n] (for any of n=0..pps_num_ver_virtual_boundaries−1), edgeFlags[x][y] is set equal to 0.

[0230] Otherwise, if x is equal to 0, edgeFlags[x][y] is set equal to filterEdgeFlag.

[0231] Otherwise, if the position (xCb+x, yCb+y) is located at the transform block edge, edgeFlags[x][y] is set equal to 1.

[0232] – When edgeFlags[x][y] is equal to 1, the following applies:

[0233] - If cIdx is equal to 0, the following applies:

[0234] The value of -maxFilterLengthQs[x][y] is derived as follows:

[0235] - If the width of the transform block at the luma position (xCb+x, yCb+y) in units of luma samples is equal to or less than 4, or the width of the transform block at the luma position (xCb+x-1, yCb+y) in units of luma samples is equal to or less than 4, then maxFilterLengthQs[x][y] is set equal to 1.

[0236] Otherwise, if the width in units of luma samples of the transform block at luma position (xCb+x, yCb+y) is equal to or greater than 32, then maxFilterLengthQs[x][y] is set equal to 7.

[0237] Otherwise, maxFilterLengthQs[x][y] is set equal to 3.

[0238] The value of -maxFilterLengthPs[x][y] is derived as follows:

[0239] - If the width of the transform block at the luma position (xCb+x, yCb+y) in units of luma samples is equal to or less than 4, or the width of the transform block at the luma position (xCb+x-1, yCb+y) in units of luma samples is equal to or less than 4, then maxFilterLengthPs[x][y] is set equal to 1.

[0240] Otherwise, if the width in units of luma samples of the transform block at luma position (xCb+x-1, yCb+y) is equal to or greater than 32, maxFilterLengthPs[x][y] is set equal to 7.

[0241] Otherwise, maxFilterLengthPs[x][y] is set equal to 3.

[0242] Otherwise (cIdx is not equal to 0), the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are derived as follows:

[0243] - If the width in chroma samples of the transform block at chroma position (xCb+x, yCb+y) and the width in chroma samples of the transform block at chroma position (xCb+x-1, yCb+y) are both equal to or greater than 8, then maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set equal to 3.

[0244] Otherwise, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set equal to 1.

[0245] – Otherwise (edgeType equals EDGE_HOR), the following applies:

[0246] –The variable numEdges is set equal to Max(1, nCbH / gridSize).

[0247] – For yEdge = 0..numEdges-1 and x = 0..nCbW-1, the following applies:

[0248] – The vertical position y within the current codec block is set equal to yEdge*gridSize.

[0249] –The value of edgeFlags[x][y] is derived as follows:

[0250] - If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and (yCb+y) is equal to PpsVirtualBoundariesPosY[n] (for any of n=0..pps_num_ver_virtual_boundaries−1), edgeFlags[x][y] is set equal to 0.

[0251] Otherwise, if y is equal to 0, edgeFlags[x][y] is set equal to filterEdgeFlag.

[0252] Otherwise, if the position (xCb+x, yCb+y) is on the edge of the transform block, edgeFlags[x][y]

[0253] Set equal to 1.

[0254] – When edgeFlags[x][y] is equal to 1, the following applies:

[0255] - If cIdx is equal to 0, the following applies:

[0256] The value of -maxFilterLengthQs[x][y] is derived as follows:

[0257] - If the height of the transform block at the luma position (xCb+x, yCb+y) in units of luma samples is equal to or less than 4, or the height of the transform block at the luma position (xCb+x, yCb+y-1) in units of luma samples is equal to or less than 4, then maxFilterLengthQs[x][y] is set equal to 1.

[0258] Otherwise, if the height in luma samples of the transform block at luma position (xCb+x, yCb+y) is equal to or greater than 32, then maxFilterLengthQs[x][y] is set equal to 7.

[0259] Otherwise, maxFilterLengthQs[x][y] is set equal to 3.

[0260] The value of -maxFilterLengthPs[x][y] is derived as follows:

[0261] - If the height of the transform block at the luma position (xCb+x, yCb+y) in units of luma samples is equal to or less than 4, or the height of the transform block at the luma position (xCb+x, yCb+y-1) in units of luma samples is equal to or less than 4, then maxFilterLengthPs[x][y] is set equal to 1.

[0262] Otherwise, if the height in units of luma samples of the transform block at luma position (xCb+x, yCb+y-1) is equal to or greater than 32, maxFilterLengthPs[x][y] is set equal to 7.

[0263] Otherwise, maxFilterLengthPs[x][y] is set equal to 3.

[0264] Otherwise (cIdx is not equal to 0), the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are derived as follows:

[0265] - maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set equal to 3 if all of the following conditions are true:

[0266] - The width in chroma samples of the transform block at the chroma position (xCb+x, yCb+y) and the width in chroma samples of the transform block at the chroma position (xCb+x, yCb+y-1) are both equal to or greater than 8.

[0267] -(yCb+y)%CtbHeightC is greater than 0, that is, the horizontal edge does not coincide with the upper chroma CTB boundary.

[0268] Otherwise, maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are set equal to 1.

[0269] 2.2.1.4 Derivation of Codec Sub-block Boundaries

[0270] The input to this process is:

[0271] – Position (xCb, yCb), which specifies the top left sample point of the current codec block relative to the top left sample point of the current picture,

[0272] – variable nCbW, which specifies the width of the current codec block,

[0273] – variable nCbH, which specifies the height of the current codec block,

[0274] – 2D (nCbW) x (nCbH) array edgeFlags,

[0275] – 2D (nCbW) x (nCbH) arrays of maxFilterLengthQs and maxFilterLengthPs,

[0276] – The variable edgeType specifies whether vertical (EDGE_VER) or horizontal (EDGE_HOR) edges are filtered.

[0277] The output of this processing is:

[0278] – The modified 2D (nCbW) x (nCbH) array edgeFlags,

[0279] – The modified 2D (nCbW) x (nCbH) arrays maxFilterLengthQs and maxFilterLengthPs.

[0280] The number of codec sub-blocks numSbX in the horizontal direction and the number of codec sub-blocks numSbY in the vertical direction are derived as follows:

[0281] – If inter_affine_flag[xCb][yCb] is equal to 1 or merge_subblock_flag[xCb][yCb] is equal to 1, numSbX and numSbY are set equal to NumSbX[xCb][yCb] and NumSbY[xCb][yCb], respectively.

[0282] – Otherwise, numSbX and numSbY are both set equal to 1.

[0283] Depending on the value of edgeType, the following applies:

[0284] – If edgeType is equal to EDGE_VER, the following applies:

[0285] –The variable sbW is set equal to Max(8,nCbW / numSbX).

[0286] – The array edgeTbFlags is set equal to edgeFlags.

[0287] – For xEdge = 0..min((nCbW / 8)-1, numSbX-1), y = 0..nCbH-1:

[0288] – The horizontal position x within the current codec block is set equal to xEdge*sbW.

[0289] – The value of edgeFlags[x][y] is derived as follows:

[0290] – If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and x is equal to PpsVirtualBoundariesPosX[n] (for any n=0..pps_num_ver_virtual_boundaries−1), the following applies:

[0291] edgeFlags[x][y]=0 (8-1025)

[0292] – Otherwise, the following applies:

[0293] edgeFlags[x][y]=1 (8-1026)

[0294] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[0295] – If x is equal to 0, then the following applies:

[0296] – When numSbX is greater than 1, the following applies:

[0297] maxFilterLengthQs[x][y]=Min(5, maxFilterLengthQs[x][y]) (8-1027)

[0298] – When inter_affine_flag[xCb-1][yCb] is equal to 1 or merge_subblock_flag[xCb-1][yCb] is equal to 1, the following applies:

[0299] maxFilterLengthPs[x][y]=Min(5, maxFilterLengthPs[x][y]) (8-1028)

[0300] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[0301] maxFilterLengthPs[x][y]=Min(5, maxFilterLengthPs[x][y]) (8-1029)

[0302] maxFilterLengthQs[x][y]=Min(5, maxFilterLengthQs[x][y]) (8-1030)

[0303] – Otherwise, if one or more of the following conditions are true:

[0304] –(x+4) is greater than or equal to nCbW,

[0305] –edgeTbFlags[x-4][y] is equal to 1,

[0306] –edgeTbFlags[x+4][y] is equal to 1,

[0307] Then the following applies:

[0308] maxFilterLengthPs[x][y]=1 (8-1031)

[0309] maxFilterLengthQs[x][y]=1 (8-1032)

[0310] – Otherwise, if one or more of the following conditions are true:

[0311] –xEdge is equal to 1,

[0312] –xEdge is equal to (nCbW / 8)-1,

[0313] –edgeTbFlags[x-sbW][y] is equal to 1,

[0314] –edgeTbFlags[x+sbW][y] is equal to 1,

[0315] Then the following applies:

[0316] maxFilterLengthPs[x][y]=2 (8-1033)

[0317] maxFilterLengthQs[x][y]=2 (8-1034)

[0318] – Otherwise, the following applies:

[0319] maxFilterLengthPs[x][y]=3 (8-1035)

[0320] maxFilterLengthQs[x][y]=3 (8-1036)

[0321] – Otherwise, if edgeType is equal to EDGE_HOR, the following applies:

[0322] –The variable sbH is set equal to Max(8,nCbH / numSbY).

[0323] – The array edgeTbFlags is set equal to edgeFlags.

[0324] – For yEdge = 0..min((nCbH / 8)-1, numSbY-1), x = 0..nCbW-1:

[0325] – The vertical position y within the current codec block is set equal to yEdge*sbH.

[0326] – The value of edgeFlags[x][y] is derived as follows:

[0327] – 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:

[0328] edgeFlags[x][y]=0 (8-1037)

[0329] – Otherwise, the following applies:

[0330] edgeFlags[x][y]=1 (8-1038)

[0331] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[0332] – If y is equal to 0 and edgeFlags[x][y] is equal to 1, then the following applies:

[0333] – When numSbY is greater than 1, the following applies:

[0334] maxFilterLengthQs[x][y]=Min(5, maxFilterLengthQs[x][y]) (8-1039)

[0335] – When inter_affine_flag[xCb][yCb-1] is equal to 1 or merge_subblock_flag[xCb][yCb-1] is equal to 1, the following applies:

[0336] maxFilterLengthPs[x][y]=Min(5, maxFilterLengthPs[x][y]) (8-1040)

[0337] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[0338] maxFilterLengthPs[x][y]=Min(5, maxFilterLengthPs[x][y]) (8-1041)

[0339] maxFilterLengthQs[x][y]=Min(5, maxFilterLengthQs[x][y]) (8-1042)

[0340] – Otherwise, if one or more of the following conditions are true:

[0341] –(y+4) is greater than or equal to nCbH,

[0342] –edgeTbFlags[x][y-4] is equal to 1,

[0343] –edgeTbFlags[x][y+4] is equal to 1,

[0344] Then the following applies:

[0345] maxFilterLengthPs[x][y]=1 (8-1045)

[0346] maxFilterLengthQs[x][y]=1 (8-1046)

[0347] – Otherwise, if one or more of the following conditions are true:

[0348] –yEdge is equal to 1,

[0349] –yEdge is equal to (nCbH / 8)-1,

[0350] –edgeTbFlags[x][y-sbH] is equal to 1,

[0351] –edgeTbFlags[x][y+sbH] is equal to 1,

[0352] Then the following applies:

[0353] maxFilterLengthPs[x][y]=2 (8-1043)

[0354] maxFilterLengthQs[x][y]=2 (8-1044)

[0355] – Otherwise, the following applies:

[0356] maxFilterLengthPs[x][y]=3 (8-1047)

[0357] maxFilterLengthQs[x][y]=3 (8-1048)

[0358] 2.2.1.5 Derivation of boundary filter strength

[0359] The input to this process is:

[0360] – Picture sample array recPicture,

[0361] – Position (xCb, yCb), which specifies the top left sample point of the current codec block relative to the top left sample point of the current picture,

[0362] – variable nCbW, which specifies the width of the current codec block,

[0363] – variable nCbH, which specifies the height of the current codec block,

[0364] – The variable edgeType specifies whether vertical (EDGE_VER) or horizontal (EDGE_HOR) edges are filtered.

[0365] – variable cIdx, which specifies the color component of the current codec block,

[0366] – 2D (nCbW) x (nCbH) array of edgeFlags.

[0367] The output of this process is a two-dimensional (nCbW) x (nCbH) array BS that specifies the boundary filter strength. i ,yD j , xN and yN are derived as follows:

[0368] – The variable gridSize is set as follows:

[0369] gridSize=cIdx==0?4:8 (8-1049)

[0370] – If edgeType is equal to EDGE_VER, then

[0371] xD i =(i*gridSize) (8-1050)

[0372] yD j =cIdx==0? (j<<2): (j<<1) (8-1051)

[0373] xN is set equal to Max(0, (nCbW / gridSize)-1) (8-1052)

[0374] yN=cIdx==0? (nCbH / 4)-1: (nCbH / 2)-1 (8-1053)

[0375] – Otherwise (edgeType equals EDGE_HOR),

[0376] xD i =cIdx==0? (i<<2): (i<<1) (8-1054)

[0377] yD j =(j*gridSize) (8-1055)

[0378] xN=cIdx==0? (nCbW / 4)-1: (nCbW / 2)-1 (8-1056)

[0379] yN=Max(0,(nCbH / gridSize)-1) (8-1057)

[0380] For xD i and yD j , where i = 0..xN, where j = 0..yN, the following apply:

[0381] – If edgeFlags[xD i][yD j ] is equal to 0, then the variable bS[xD i ][yD j ] is set to equal 0.

[0382] – Otherwise, the following applies:

[0383] – The sample point values ​​p0 and q0 are derived as follows:

[0384] – If edgeType equals EDGE_VER, p0 is set equal to recPicture[xCb+xD i -1][yCb+yD j ] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[0385] – Otherwise (edgeType equals EDGE_HOR), p0 is set equal to recPicture[xCb+xD i ][yCb+yD j -1] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[0386] –Variable bS[xD i ][yD j ] is exported as follows:

[0387] – If cIdx is equal to 0 and both samples p0 and q0 are in the codec block with intra_bdpcm_flag equal to 1, then bS[xD i ][yD j ] is set to equal 0.

[0388] – Otherwise, if the sample p0 or q0 is in the codec block of a codec unit coded in intra prediction mode, then bS[xD i ][yD j ] is set to equal 2.

[0389] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal 2.

[0390] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a transform block containing one or more non-zero transform coefficient levels, then bS[xD i ][yDj ] is set to be equal to 1.

[0391] – Otherwise, if the block edge is also a transform block edge, cIdx is greater than 0, and sample p0 or q0 is in a transform unit with tu_joint_cbcr_residual_flag equal to 1, then bS[xD i ][yD j ] is set to be equal to 1.

[0392] – Otherwise, if the prediction mode of the coded subblock containing sample p0 is different from the prediction mode of the coded subblock containing sample q0 (i.e., one of the coded subblocks is coded and decoded with IBC prediction mode and the other is coded and decoded with inter prediction mode), then bS[xD i ][yD j ] is set to be equal to 1.

[0393] – 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 to 1:

[0394] –The codec sub-block containing sample p0 and the codec sub-block containing sample q0 are both coded and decoded in IBC prediction mode

[0395] And the absolute difference between the horizontal and vertical components of the block vectors used in the prediction of the two codec sub-blocks is greater than or equal to 8 (in units of 1 / 16 luma samples).

[0396] – For the prediction of the codec sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the codec sub-block containing sample q0.

[0397] NOTE 1 - Whether the reference pictures used for two codec sub-blocks are the same or different is determined only based on the pictures they reference, regardless of whether an index pointing to reference picture list 0 or an index pointing to reference picture list 1 is used, or whether the index positions in the reference picture lists are different.

[0398] NOTE 2 - The number of motion vectors for the prediction of the coded sub-block for the top left sample coverage (xSb, ySb) is equal to PredFlagL0[xSb][ySb]+PredFlagL1[xSb][ySb].

[0399] – one vector is used to predict the codec subblock containing sample p0, and one vector is used to predict the codec subblock containing sample q0,

[0400] And the absolute difference between the horizontal or vertical components of the vectors used is greater than or equal to 8 (in units of 1 / 16 luma samples).

[0401] – Two motion vectors and two different reference pictures are used to predict the codec sub-block containing sample p0, two motion vectors of the same two reference pictures are used to predict the codec sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used for the prediction of the two codec sub-blocks of the same reference picture is greater than or equal to 8 (in units of 1 / 16 luma samples).

[0402] – Two motion vectors from the same reference picture are used to predict the codec subblock containing sample p0, and two motion vectors from the same reference picture are used to predict the codec subblock containing sample q0 and both of the following conditions are true:

[0403] – The absolute difference between the horizontal or vertical components of the predicted list 0 motion vectors for the two codec 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 the predicted list 1 motion vectors for the two codec sub-blocks is greater than or equal to 8 (in units of 1 / 16 luma samples).

[0404] – The absolute difference between the horizontal or vertical component of the predicted list 0 motion vector for the codec sub-block containing sample p0 and the predicted list 1 motion vector for the codec 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 predicted list 1 motion vector for the codec sub-block containing sample p0 and the predicted list 0 motion vector for the codec sub-block containing sample q0 is greater than or equal to 8 (in units of 1 / 16 luma samples).

[0405] – Otherwise, the variable bS[xD i ][yD j ] is set to equal 0.

[0406] 2.2.1.6 Edge filtering in one direction

[0407] The input to this process is:

[0408] – the variable edgeType, which specifies whether the current edge being processed is a vertical edge (EDGE_VER) or a horizontal edge (EDGE_HOR),

[0409] – The variable cIdx, which specifies the current color component,

[0410] – The reconstructed image before removing the blocks recPicture,

[0411] – Position (xCb, yCb), which specifies the top left sample point of the current codec block relative to the top left sample point of the current picture,

[0412] – variable nCbW, which specifies the width of the current codec block,

[0413] – variable nCbH, which specifies the height of the current codec block,

[0414] – array bS, which specifies the boundary strength,

[0415] – Arrays maxFilterLengthPs and maxFilterLengthQs.

[0416] The output of this process is the modified reconstructed picture recPicture after deblocking.

[0417] For edge filtering, the following applies:

[0418] – The variable gridSize is set as follows:

[0419] gridSize=cIdx==0?4:8 (8-1058)

[0420] – The variables subW, subH, xN, yN are derived as follows:

[0421] subW=cIdx==0?1:SubWidthC (8-1059)

[0422] subH=cIdx==0?1:SubHeightC (8-1060)

[0423] xN=edgeType==EDGE_VER? Max(0, (nCbW / gridSize)-1): (nCbW / 4 / subW)-1 (8-1061)

[0424] yN=edgeType==EDGE_VER? (nCbH / 4 / subH)-1: Max(0, (nCbH / gridSize)-1) (8-1062)

[0425] – Variable xD k and yD m (where k = 0..xN and m = 0..yN) is derived as follows:

[0426] xD k =edgeType==EDGE_VER? (k*gridSize): (k<<(2 / subW)) (8-1063)

[0427] yD m =edgeType==EDGE_VER? (m<<(2 / subH)): (m*gridSize) (8-1064)

[0428] – for xD k and yD m (where k = 0..xN, where m = 0..yN), the following applies:

[0429] –When bS[xD k ][yD m ] is greater than 0, the following sequence of steps applies:

[0430] – If cIdx is equal to 0, the filtering process for edges in the luma codec block of the current codec unit comprises the following sequential steps:

[0431] 1. With the luminance picture sample array recPicture, the position of the luminance codec block (xCb, yCb), the luminance position of the block (xBl, yBl) is set equal to (xD k ,yD m ), edge direction edgeType, boundary filter strength bS[xD k ][yD m ], the maximum filter length maxFilterLengthP is set equal to maxFilterLengthPs[xD k ][yD m ] and maxFilterLengthQ is set equal to maxFilterLengthQs[xD k ][yD m ] as input, invokes the decision process for the luma block edge specified in clause 8.8.3.6.1, and passes the decisions dE, dEp, and dEq, the modified maximum filter lengths maxFilterLengthP and maxFilterLengthQ, and the variable t C as output.

[0432] 2. Set the luminance picture sample array recPicture, the luminance codec block position (xCb, yCb), and the block luminance position (xBl, yBl) to be equal to (xD k ,yD m ), edge direction edgeType, decisions dE, dEp and dEq, maximum filter lengths maxFilterLengthP and maxFilterLengthQ, and variable t CAs input, the block edge filtering process specified in clause 8.8.3.6.2 is invoked, and the modified luma picture sample array recPicture is given as output.

[0433] – Otherwise (cIdx is not equal to 0), the filtering process of the edge in the chroma codec block of the current codec unit specified by cIdx comprises the following sequential steps:

[0434] 1. The variable cQpPicOffset is derived as follows:

[0435] cQpPicOffset=cIdx==1? pps_cb_qp_offset: pps_cr_qp_offset (8-1065)

[0436] 2. Set the chroma picture sample array recPicture, the position of the chroma codec block (xCb, yCb), and the position of the chroma block (xBl, yBl) to be equal to (xD k ,yD m ), edge direction edgeType, variable cIdx, variable cQpPicOffset, boundary filter strength bS[xD k ][yD m ], and the variable maxFilterLengthCbCr is set equal to maxFilterLengthPs[xD k ][yD m ] as input, invoke the chroma block edge decision process specified in 8.8.3.6.3, and pass the modified variable maxFilterLengthCbCr, and the variable t C as output.

[0437] 3. When maxFilterLengthCbCr is greater than 0, the chroma picture sample array recPicture, the position of the chroma codec block (xCb, yCb), and the chroma position of the block (xBl, yBl) are set to be equal to (xD k ,yD m ), edge direction edgeType, variable maxFilterLengthCbCr, and variable t C As input, the chroma block edge filtering process specified in 8.8.3.6.4 is invoked and the modified chroma picture sample array recPicture is output.

[0438] 2.2.1.6.1 Decision-making Processing of Luminance Block Edges

[0439] The input to this process is:

[0440] – Picture sample array recPicture,

[0441] – Position (xCb, yCb), which specifies the top left sample point of the current codec block relative to the top left sample point of the current picture,

[0442] -Location

[0443] (xBl, yBl), which specifies the upper left sample point of the current block relative to the upper left sample point of the current codec block,

[0444] – The variable edgeType specifies whether vertical (EDGE_VER) or horizontal (EDGE_HOR) edges are filtered.

[0445] – variable bS, which specifies the boundary filter strength,

[0446] – the variable maxFilterLengthP, which specifies the maximum filter length,

[0447] – The variable maxFilterLengthQ which specifies the maximum filter length.

[0448] The output of this processing is:

[0449] – variables dE, dEp and dEq, which contain the decision,

[0450] – Modified filter length variables maxFilterLengthP and maxFilterLengthQ,

[0451] – Variable t C .

[0452] Sample value p i,k and q j,k (where i = 0..maxFilterLengthP, j = 0..maxFilterLengthQ and k = 0 and 3) is derived as follows:

[0453] – If edgeType is equal to EDGE_VER, the following applies:

[0454] q j,k =recPicture L [xCb+xBl+j][yCb+yBl+k] (8-1066)

[0455] p i,k =recPicture L [xCb+xBl-i-1][yCb+yBl+k] (8-1067)

[0456] – Otherwise (edgeType equals EDGE_HOR), the following applies:

[0457] q j,k =recPicture[xCb+xBl+k][yCb+yBl+j] (8-1068)

[0458] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1069)

[0459] The variable qpOffset is derived as follows:

[0460] – If sps_ladf_enabled_flag is equal to 1, the following applies:

[0461] –The variable lumaLevel of the reconstructed brightness sample point is exported as follows:

[0462] lumaLevel=((p 0,0 +p 0,3 +q 0,0 +q 0,3 )>>2), (8-1070)

[0463] – The variable qpOffset is set equal to sps_ladf_lowest_interval_qp_offset and modified as follows:

[0464]

[0465] – Otherwise, qpOffset is set equal to 0.

[0466] Variable Qp Q and Qp P are set to be equal to and include sample point q 0,0 and p 0,0 Qp of the codec unit of the codec block Y value.

[0467] The variable qP is derived as follows:

[0468] qP=((Qp Q +Qp P +1)>>1)+qpOffset (8-1072)

[0469] The value of the variable β′ is determined as specified in Table 8-18 based on the quantization parameter Q derived as follows:

[0470] Q=Clip3(0,63,qP+(slice_beta_offset_div2<<1)) (8-1073)

[0471] Where slice_beta_offset_div2 contains the sample point q 0,0 The value of the syntax element slice_beta_offset_div2 for the slice.

[0472] The variable β is derived as follows:

[0473] β=β′*(1<<(BitDepth Y -8)) (8-1074)

[0474] Based on the quantization parameter Q derived as follows, the variable t is determined as specified in Table 8-18 C ′ value:

[0475] Q=Clip3(0, 65, qP+2*(bS-1)+(slice_tc_offset_div2<<1)) (8-1075)

[0476] Where slice_tc_offset_div2 contains sample point q 0,0 The value of the syntax element slice_tc_offset_div2 of the slice.

[0477] Variable t C The export is as follows:

[0478] t C =BitDepth Y <10? (t C ′+2)>>(10-BitDepth Y ): t C ′*(1<<(BitDepth Y -10)) (8-1076)

[0479] The following sequence of steps applies:

[0480] 1. The variables dp0, dp3, dq0 and dq3 are derived as follows:

[0481] dp0=Abs(p 2,0 -2*p 1,0 +p 0,0 ) (8-1077)

[0482] dp3=Abs(p 2,3 -2*p 1,3 +p 0,3 ) (8-1078)

[0483] dq0=Abs(q 2,0 -2*q 1,0 +q 0,0 ) (8-1079)

[0484] dq3=Abs(q 2,3 -2*q 1,3 +q 0,3 ) (8-1080)

[0485] 2. When maxFilterLengthP and maxFilterLengthQ are both equal to or greater than 3, the variables sp0, sq0, spq0, sp3, sq3, and spq3 are derived as follows:

[0486] sp0=Abs(p 3,0 -p 0,0 ) (8-1081)

[0487] sq0=Abs(q 0,0 -q 3,0 ) (8-1082)

[0488] spq0=Abs(p 0,0 -q 0,0 ) (8-1083)

[0489] sp3=Abs(p 3,3 -p 0,3 ) (8-1084)

[0490] sq3=Abs(q 0,3 -q 3,3 ) (8-1085)

[0491] spq3=Abs(p 0,3 -q 0,3 ) (8-1086)

[0492] 3. The variables sidePisLargeBlk and sideQisLargeBlk are set equal to 0.

[0493] 4. When maxFilterLengthP is greater than 3, sidePisLargeBlk is set equal to 1.

[0494] 5. When maxFilterLengthQ is greater than 3, sideQisLargeBlk is set equal to 1.

[0495] 6. When edgeType is equal to EDGE_HOR and (yCb+yBl)%CtbSizeY is equal to 0, sidePisLargeBlk is set equal to 0.

[0496] 7. Variables dSam0 and dSam3 are initialized to 0.

[0497] 8. When sidePisLargeBlk or sideQisLargeBlk is greater than 0, the following applies:

[0498] a. Export variables dp0L, dp3L and maxFilterLengthP and modify them as follows:

[0499] – If sidePisLargeBlk is equal to 1, the following applies:

[0500] dp0L=(dp0+Abs(p 5,0 -2*p 4,0 +p 3,0 )+1)>>1 (8-1087)

[0501] dp3L=dp3+Abs(p5,3-2*p4,3+p3,3)+1)>>1 (8-1088)

[0502] – Otherwise, the following applies:

[0503] dp0L=dp0 (8-1089)

[0504] dp3L=dp3 (8-1090)

[0505] maxFilterLengthP = 3 (8-1091)

[0506] b. The variables dq0L and dq3L are derived as follows:

[0507] – If sideQisLargeBlk is equal to 1, the following applies:

[0508] dq0L=(dq0+Abs(q 5,0 -2*q 4,0 +q 3,0 )+1)>>1 (8-1092)

[0509] dq3L=(dq3+Abs(q 5,3 -2*q 4,3 +q 3,3 )+1)>>1 (8-1093)

[0510] – Otherwise, the following applies:

[0511] dq0L=dq0 (8-1094)

[0512] dq3L=dq3 (8-1095)

[0513] c. The variables dpq0L, dpq3L, and dL are derived as follows:

[0514] dpq0L=dp0L+dq0L (8-1096)

[0515] dpq3L=dp3L+dq3L (8-1097)

[0516] dL=dpq0L+dpq3L (8-1098)

[0517] d. When dL is less than β, the following sequential steps apply:

[0518] i. The variable dpq is set equal to 2*dpq0L.

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

[0520] iii. Variable p 0, p 3, q o and q3 are first initialized to 0 and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows:

[0521] – When sidePisLargeBlk is equal to 1, the following applies:

[0522] p3=p 3,0 (8-1099)

[0523] p0=p maxFilterLengthP,0 (8-1100)

[0524] – When sideQisLargeBlk is equal to 1, the following applies:

[0525] q3=q 3,0 (8-1101)

[0526] q0=q maxFilterLengthQ,0 (8-1102)

[0527] iv. For the sample point position (xCb+xBl, yCb+yBl), with sample point values ​​p0, p3, q0, q3, variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and tC As input, the decision process specified in clause 8.8.3.6.5 is called for the luma samples and the output is assigned to decision dSam0.

[0528] v. The variable dpq is set equal to 2*dpq3L.

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

[0530] vii. The variables p0, p3, q0, and q3 are first initialized to 0 and then modified according to sidePisLargeBlk and sideQisLargeBlk as follows:

[0531] – When sidePisLargeBlk is equal to 1, the following applies:

[0532] p3=p 3,3 (8-1103)

[0533] p0=p maxFilterLengthP,3 (8-1104)

[0534] – When sideQisLargeBlk is equal to 1, the following applies:

[0535] q3=q 3,3 (8-1105)

[0536] q0=q maxFilterLengthQ,3 (8-1106)

[0537] viii. When edgeType is equal to EDGE_VER

[0538] For sample location (xCb+xBl, yCb+yBl+3), or when edgeType is equal to EDGE_HOR

[0539] For the sample point position (xCb+xBl+3, yCb+yBl), the sample point values ​​p0, p3, q0, q3, variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and t C As input, the decision process specified in clause 8.8.3.6.5 is called for the luma samples and the output is assigned to decision dSam3.

[0540] 9. The variables dE, dEp and dEq are derived as follows:

[0541] – 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.

[0542] – Otherwise, the following sequential steps apply:

[0543] a. The variables dpq0, dpq3, dp, dq and d are derived as follows:

[0544] dpq0=dp0+dq0 (8-1107)

[0545] dpq3=dp3+dq3 (8-1108)

[0546] dp=dp0+dp3 (8-1109)

[0547] dq=dq0+dq3 (8-1110)

[0548] d=dpq0+dpq3 (8-1111)

[0549] b. Variables dE, dEp, dEq, sidePisLargeBlk, and sideQisLargeBlk are set equal to 0.

[0550] c. When d is less than β and both maxFilterLengthP and maxFilterLengthQ are greater than 2, the following sequential steps apply:

[0551] i. The variable dpq is set equal to 2*dpq0.

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

[0553] iii. For the sample point position (xCb+xBl, yCb+yBl), the variables p0, p3, q0, q3 are all set to 0, and the variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β and t C As input, the decision process specified in clause 8.8.3.6.5 is called for the luma samples and the output is assigned to decision dSam0.

[0554] iv. The variable dpq is set equal to 2*dpq3.

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

[0556] vi. When edgeType is equal to EDGE_VER for the sample location (xCb+xBl, yCb+yBl+3), or when edgeType is equal to EDGE_HOR for the sample location (xCb+xBl+3, yCb+yBl), the variables p0, p3, q0, q3 are all set to 0, the variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t C As input, the decision processing of the sample point specified in clause 8.8.3.6.5 is called and the output is assigned to the decision dSam3.

[0557] d. When d is less than β, the following sequential steps apply:

[0558] i. The variable dE is set equal to 1.

[0559] ii. When dSam0 is equal to 1 and dSam3 is equal to 1, the variable dE is set equal to 2.

[0560] iii. When maxFilterLengthP is greater than 1 and maxFilterLengthQ is greater than 1, and dp is less than (β+(β>>1))>>3, the variable dEp is set equal to 1.

[0561] iv. When maxFilterLengthP is greater than 1 and maxFilterLengthQ is greater than 1, and dq is less than (β+(β>>1))>>3, the variable dEq is set equal to 1.

[0562] Table 8-18 – From input Q to threshold variables β′ and t C Derivation of ′

[0563] Q 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 β′ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 <![CDATA[t C ′]]> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Q 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 β′ 7 8 9 10 11 12 13 14 15 16 17 18 20 22 24 26 28 <![CDATA[t C ′]]> 0 3 4 4 4 4 5 5 5 5 7 7 8 9 10 10 11 Q 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 β′ 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 <![CDATA[t C ′]]> 13 14 15 17 19 21 24 25 29 33 36 41 45 51 57 64 71 Q 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 β′ 64 66 68 70 72 74 76 78 80 82 84 86 88 - - <![CDATA[t C ′]]> 80 89 100 112 125 141 157 177 198 222 250 280 314 352 395

[0564] 2.2.1.6.2 Filtering of Luminance Block Edges

[0565] The input to this process is:

[0566] – Picture sample array recPicture,

[0567] – Position (xCb, yCb), which specifies the top left sample point of the current codec block relative to the top left sample point of the current picture,

[0568] -Location

[0569] (xBl, yBl), which specifies the upper left sample point of the current block relative to the upper left sample point of the current codec block,

[0570] – The variable edgeType specifies whether vertical (EDGE_VER) or horizontal (EDGE_HOR) edges are filtered.

[0571] – variables dE, dEp and dEq, which contain the decision,

[0572] – variables maxFilterLengthP and maxFilterLengthQ, which contain the maximum filter lengths,

[0573] – Variable t C .

[0574] The output of this process is the modified picture sample array recPicture.

[0575] Depending on the value of edgeType, the following applies:

[0576] – If edgeType is equal to EDGE_VER, the following sequential steps apply:

[0577] 1. Sample value p i,k and q i,k (where i=0..maxFilterLengthP, j=0..maxFilterLengthQ and k=0..3) is derived as follows:

[0578] q j,k =recPicture L [xCb+xBl+j][yCb+yBl+k] (8-1112)

[0579] p i,k =recPicture L [xCb+xBl-i-1][yCb+yBl+k] (8-1113)

[0580] 2. When dE is not equal to 0 and dE is not equal to 3, for each sample point position (xCb+xBl, yCb+yBl+k), k=0..3, the following sequential steps apply:

[0581] a. With sample value p i,k ,q i,k (where i = 0..3), position (xP i ,yP i ) is set equal to (xCb+xBl-i-1, yCb+yBl+k) and (xQ i , yQ i ) is set equal to (xCb+xBl+i, yCb+yBl+k) (where i=0..2), decision dE, variables dEp and dEq, and variable tC As input, invoke the filtering process of the luma samples using the short filter specified in clause 8.8.3.6.6 and pass the number of filtered samples nDp and nDq on each side of the block and the filtered sample value p i ′ and q j ’ as output.

[0582] b. When nDp is greater than 0, the sample value p after filtering i '(where i = 0..nDp-1)

[0583] Replace the corresponding sample points in the sample array recPicture as follows:

[0584] recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i ' (8-1114)

[0585] c. When nDq is greater than 0, the sample value q after filtering j ′(where j=0..nDq-1)

[0586] Replace the corresponding sample points in the sample array recPicture as follows:

[0587] recPicture[xCb+xBl+j][yCb+yBl+k]=q j ' (8-1115)

[0588] 3. When dE equals 3, for each sample point location (xCb+xBl, yCb+yBl+k), k=0..3, the following sequential steps apply:

[0589] a. With sample value p i,k ,q j,k (where i=0..maxFilterLengthP and j=0..maxFilterLengthQ), position (xP i ,yP i ) is set equal to (xCb+xBl-i-1, yCb+yBl+k)

[0590] (where i = 0..maxFilterLengthP–1) and (xQ j , yQ j ) is set equal to (xCb+xBl+j, yCb+yBl+k)

[0591] (where j = 0..maxFilterLengthQ–1), variables maxFilterLengthP, maxFilterLengthQ, and tC As input, invoke the filtering process of the luma samples using the long filter specified in clause 8.8.3.6.7 and pass the filtered sample values ​​p i ′ and q j ’ as output.

[0592] b. Sample value p after filtering i '(where i = 0..maxFilterLengthP-1)

[0593] Replace the corresponding sample points in the sample array recPicture as follows:

[0594] recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i ' (8-1116)

[0595] c. Sample value q after filtering j ′(where j = 0..maxFilterLengthQ–1)

[0596] Replace the corresponding sample points in the sample array recPicture as follows:

[0597] recPicture[xCb+xBl+j][yCb+yBl+k]=q j ' (8-1117)

[0598] – Otherwise (edgeType equals EDGE_HOR), the following sequential steps apply:

[0599] 1. Sample value p i,k and q i,k (where i=0..maxFilterLengthP, j=0..maxFilterLengthQ and k=0..3) is derived as follows:

[0600] q j,k =recPicture L [xCb+xBl+k][yCb+yBl+j] (8-1118)

[0601] p i,k =recPicture L [xCb+xBl+k][yCb+yBl-i-1] (8-1119)

[0602] 2. When dE is not equal to 0 and dE is not equal to 3, for each sample point position (xCb+xBl+k, yCb+yBl), k=0..3, the following sequential steps apply:

[0603] a. With sample value p i,k ,q i,k (where i = 0..3), position (xP i ,yP i ) is set equal to (xCb+xBl+k, yCb+yBl-i-1) and (xQ i , yQ i ) is set equal to (xCb+xBl+k, yCb+yBl+i) (where i=0..2), decision dE, variables dEp and dEq, and variable t C As input, invoke the filtering process of the luma samples using the short filter specified in clause 8.8.3.6.6 and pass the number of filtered samples nDp and nDq on each side of the block and the filtered sample value p i ′ and q j ’ as output.

[0604] b. When nDp is greater than 0, the sample value p after filtering i '(where i = 0..nDp-1)

[0605] Replace the corresponding sample points in the sample array recPicture as follows:

[0606] recPicture[xCb+xBl+k][yCb+yBl-i-1]=p i '(8-1120)

[0607] c. When nDq is greater than 0, the sample value q after filtering j ′(where j = 0..nDq–1)

[0608] Replace the corresponding sample points in the sample array recPicture as follows:

[0609] recPicture[xCb+xBl+k][yCb+yBl+j]=q j ′ (8-1121)

[0610] 3. When dE equals 3, for each sample point location (xCb+xBl+k, yCb+yBl), k=0..3, the following sequential steps apply:

[0611] a. With sample value p i,k ,q j,k (where i = 0..maxFilterLengthP and j = 0..maxFilterLengthQ), position (xP i ,yP i) is set equal to (xCb+xBl+k, yCb+yBl-i-1) (where i=0..maxFilterLengthP-1) and (xQ j , yQ j ) is set equal to (xCb+xBl+k, yCb+yBl+j) (where j=0..maxFilterLengthQ–1), the variables maxFilterLengthP, maxFilterLengthQ, and the variable t C As input, invoke the filtering process of the luma samples using the long filter specified in clause 8.8.3.6.7 and pass the filtered sample values ​​p i ′ and q j ’ as output.

[0612] b. Sample value p after filtering i '(where i = 0..maxFilterLengthP-1)

[0613] Replace the corresponding sample points in the sample array recPicture as follows:

[0614] recPicture[xCb+xBl+k][yCb+yBl-i-1]=p i ′ (8-1122)

[0615] c. Sample value q after filtering j ′(where j=0..maxFilterLengthQ-1)

[0616] Replace the corresponding sample points in the sample array recPicture as follows:

[0617] recPicture[xCb+xBl+k][yCb+yBl+j]=q j ′ (8-1123)

[0618] 2.2.1.6.3 Chroma block edge decision processing

[0619] This handler is called only when ChromaArrayType is not equal to 0.

[0620] The input to this process is:

[0621] – Chroma picture sample array recPicture,

[0622] – Chroma position (xCb, yCb), specifies the upper left sample of the current chroma codec block relative to the upper left chroma sample of the current picture,

[0623] – Chroma position (xBl, yBl), specifies the upper left sample point of the current chroma block relative to the upper left sample point of the current chroma codec block,

[0624] – The variable edgeType specifies whether the filter is vertical (EDGE_VER) or horizontal (EDGE_HOR),

[0625] – variable cIdx, which specifies the color component index,

[0626] – variable cQpPicOffset, which specifies the picture-level chroma quantization parameter offset,

[0627] – variable bS, which specifies the boundary filter strength,

[0628] –Variable maxFilterLengthCbCr.

[0629] The output of this processing is:

[0630] – The modified variable maxFilterLengthCbCr,

[0631] – Variable t C .

[0632] The variable maxK is derived as follows:

[0633] – If edgeType is equal to EDGE_VER, the following applies:

[0634] maxK=(SubHeightC==1)? 3:1 (8-1124)

[0635] – Otherwise (edgeType equals EDGE_HOR), the following applies:

[0636] maxK=(SubWidthC==1)? 3:1 (8-1125)

[0637] p i and q i The value of (where i=0..maxFilterLengthCbCr and k=0..maxK) is derived as follows: – If edgeType is equal to EDGE_VER, the following applies::

[0638] q i,k =recPicture[xCb+xBl+i][yCb+yBl+k] (8-1126)

[0639] p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (8-1127)

[0640] subSampleC=SubHeightC (8-1128)

[0641] – Otherwise (edgeType equals EDGE_HOR), the following applies:

[0642] q i,k =recPicture[xCb+xBl+k][yCb+yBl+i] (8-1129)

[0643] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1130)

[0644] subSampleC=SubWidthC (8-1131)

[0645] Variable Qp Q and Qp P are set to be equal to and include sample point q 0,0 and p 0,0 Qp of the codec unit of the codec block Y value.

[0646] Variable Qp C The export is as follows:

[0647] qPi=Clip3(0,63,((Qp Q +Qp P +1)>>1)+cQpPicOffset) (8-1132)

[0648] Q C =ChromaQpTable[cIdx-1][qPi] (8-1133)

[0649] Note – The variable cQpPicOffset provides an adjustment to the value of pps_cb_qp_offset or pps_cr_qp_offset depending on whether the chroma component being filtered is a cb or cr component. However, to avoid the need to change the amount of adjustment within the picture, the filtering process does not include adjustments to the values ​​of slice_cb_qp_offset or slice_cr_qp_offset, nor does it include adjustments to CuQpOffset Cb ,CuQpOffset Cr , or CuQpOffset CbCr Adjustment of the value of (when cu_chroma_qp_offset_enabled_flag is equal to 1).

[0650] Based on the quantization parameter Q derived as follows, the value of the variable β′ is determined as specified in Table 8-18:

[0651] Q = Clip3 (0, 63, Qp C +(slice_beta_offset_div2<<1)) (8-1134)

[0652] Where slice_beta_offset_div2 is the value of the syntax element slice_beta_offset_div2 of the slice containing the sample q0,0.

[0653] The variable β is derived as follows:

[0654] β=β′*(1<<(BitDepth C -8)) (8-1135)

[0655] Based on the chromaticity quantization parameter Q derived as follows, the variable t is determined according to the provisions of Table 8-18 C ′ value:

[0656] Q = Clip3 (0, 65, Qp C +2*(bS-1)+(slice_tc_offset_div2<<1)) (8-1136)

[0657] Where slice_tc_offset_div2 is the value of the syntax element slice_tc_offset_div2 of the slice containing the sample q0,0.

[0658] Variable t C The export is as follows:

[0659] t C =(BitDepth C <10)? (t C ′+2)>>(10-BitDepth C ): t C ′*(1<<(BitDepth C -8)) (8-1137)

[0660] When maxFilterLengthCbCr is equal to 1 and bS is not equal to 2, maxFilterLengthCbCr is set equal to 0.

[0661] When maxFilterLengthCbCr is equal to 3, the following sequential steps apply:

[0662] 1. The variables n1, dpq0, dpq1, dp, dq and d are derived as follows:

[0663] n1=(subSampleC==2)? 1:3 (8-1138)

[0664] dp0=Abs(p 2,0 -2*p 1,0 +p 0,0 ) (8-1139)

[0665] dp1=bs(p 2,n1 -2*p 1,n1 +p 0,n1 ) (8-1140)

[0666] dq0=Abs(q 2,0 -2*q 1,0 +q 0,0 ) (8-1141)

[0667] dq1=bs(q 2,n1 -2*q 1,n1 +q 0,n1 ) (8-1142)

[0668] dpq0=dp0+dq0 (8-1143)

[0669] dpq1=dp1+dq1 (8-1144)

[0670] dp=dp0+dp1 (8-1145)

[0671] dq=dq0+dq1 (8-1146)

[0672] d=dpq0+dpq1 (8-1147)

[0673] 2. The variables dSam0 and dSam1 are both set equal to 0.

[0674] 3. When d is less than β, the following sequential steps apply:

[0675] a. The variable dpq is set equal to 2*dpq0.

[0676] b. For the sample point position (xCb+xBl, yCb+yBl), take the sample point value p 0,0 , p 3,0 ,q 0,0 , and q 3,0 , variables dpq, β and t CAs input, the variable dSam0 is derived by calling the decision process for the chroma samples specified in clause 8.8.3.6.8 and the output is assigned to the decision dSam0.

[0677] c. The variable dpq is set equal to 2*dpq1.

[0678] d. The variable dSam1 is modified as follows:

[0679] – If edgeType is equal to EDGE_VER, then for the sample position (xCb+xBl, yCb+yBl+n1), the sample value p 0,n1 , p 3,n1 ,q 0,n1 , and q 3,n1 , variables dpq, β and t C As input, the decision process specified in clause 8.8.3.6.8 is called for the chroma samples and the output is assigned to decision dSam1.

[0680] – Otherwise (edgeType is equal to EDGE_HOR), for the sample position (xCb+xBl+n1, yCb+yBl), take the sample value p 0,n1 , p 3,n1 ,q 0,n1 and q 3,n1 , variables dpq, β and t C As input, the decision process specified in clause 8.8.3.6.8 is called for the chroma samples and the output is assigned to decision dSam1.

[0681] 4. The variable maxFilterLengthCbCr is modified as follows:

[0682] – If dSam0 is equal to 1 and dSam1 is equal to 1, then maxFilterLengthCbCr is set equal to 3.

[0683] – Otherwise, maxFilterLengthCbCr is set equal to 1.

[0684] 2.2.1.6.4 Chroma block edge filtering

[0685] This process is called only if ChromaArrayType is not equal to 0.

[0686] The input to this process is:

[0687] – Chroma picture sample array recPicture,

[0688] – Chroma position (xCb, yCb), which specifies the top left sample of the current chroma codec block relative to the top left chroma sample of the current picture,

[0689] – Chroma position (xBl, yBl), which specifies the top left sample point of the current chroma block relative to the top left sample point of the current chroma codec block,

[0690] – the variable edgeType, which specifies whether the filtering is vertical (EDGE_VER) or horizontal (EDGE_HOR),

[0691] – the variable maxFilterLengthCbCr, which contains the maximum chroma filter length,

[0692] –Variable tC.

[0693] The output of this process is the modified chrominance picture sample array recPicture.

[0694] The variable maxK is derived as follows:

[0695] – If edgeType is equal to EDGE_VER, the following applies:

[0696] maxK=(SubHeightC==1)? 3:1 (8-1148)

[0697] – Otherwise (edgeType equals EDGE_HOR), the following applies:

[0698] maxK=(SubWidthC==1)? 3:1 (8-1149)

[0699] p i and q i (where i=0..maxFilterLengthCbCr and k=0..maxK) are derived as follows:

[0700] – If edgeType is equal to EDGE_VER, the following applies:

[0701] q i,k =recPicture[xCb+xBl+i][yCb+yBl+k] (8-1150)

[0702] p i,k =recPicture[xCb+xBl-i-1][yCb+yBl+k] (8-1151)

[0703] – Otherwise (edgeType equals EDGE_HOR), the following applies:

[0704] q i,k=recPicture[xCb+xBl+k][yCb+yBl+i] (8-1152)

[0705] p i,k =recPicture[xCb+xBl+k][yCb+yBl-i-1] (8-1153)

[0706] Depending on the value of edgeType, the following applies:

[0707] – If edgeType is equal to EDGE_VER, then for each sample position (xCb+xBl, yCb+yBl+k), k=0..maxK, the following sequential steps apply:

[0708] 1. With the variable maxFilterLengthCbCr and the sample value p i,k ,q i,k (where i = 0..maxFilterLengthCbCr), the position (xCb+xBl-i-1, yCb+yBl+k) and (xCb+xBl+i, yCb+yBl+k) (where i = 0..maxFilterLengthCbCr-1), and the variable t C As input, invoke the filtering process specified in clause 8.8.3.6.9 on the chroma samples and pass the filtered sample values ​​p i ′ and q i ′ (where i=0..maxFilterLengthCbCr-1) as output.

[0709] 2. Sample value p after filtering i ′ and q i '(where i = 0..maxFilterLengthCbCr-1)

[0710] Replace the corresponding sample points in the sample array recPicture as follows:

[0711] recPicture[xCb+xBl+i][yCb+yBl+k]=q i ' (8-1154)

[0712] recPicture[xCb+xBl-i-1][yCb+yBl+k]=p i ' (8-1155)

[0713] – Otherwise (edgeType equals EDGE_HOR), for each sample position (xCb+xBl+k, yCb+yBl), k=0..maxK, the following sequential steps apply:

[0714] 1. With the variable maxFilterLengthCbCr and the sample value p i,k ,q i,k (where i = 0..maxFilterLengthCbCr), the positions (xCb+xBl+k, yCb+yBl-i-1) and (xCb+xBl+k, yCb+yBl+i), and the variable t C As input, invoke the filtering process specified in clause 8.8.3.6.9 on the chroma samples and pass the filtered sample values ​​p i ′ and q i ’ as output.

[0715] 2. Sample value p after filtering i ′ and q i 'Replace the corresponding sample points in the sample array recPicture as follows:

[0716] recPicture[xCb+xBl+k][yCb+yBl+i]=q i ' (8-1156)

[0717] recPicture[xCb+xBl+k][yCb+yBl-i-1]=p i ' (8-1157)

[0718] 2.2.1.6.5 Decision-making process of brightness samples

[0719] The input to this process is:

[0720] – sample point values ​​p0, p3, q0 and q3,

[0721] – Variables dpq, sp, sq, spq, sidePisLargeBlk, sideQisLargeBlk, β, and t C .

[0722] The output of this process is the variable dSam containing the decision.

[0723] The variables sp and sq are modified as follows:

[0724] – When sidePisLargeBlk is equal to 1, the following applies:

[0725] sp=(sp+Abs(p3-p0)+1)>>1 (8-1158)

[0726] – When sideQisLargeBlk is equal to 1, the following applies:

[0727] sq=(sq+Abs(q3-q0)+1)>>1 (8-1159)

[0728] The variable sThr is derived as follows:

[0729] – If sidePisLargeBlk is equal to 1 or sideQisLargeBlk is equal to 1, then the following applies:

[0730] sThr=3*β>>5 (8-1160)

[0731] Otherwise, the following applies:

[0732] sThr=β>>3 (8-1161)

[0733] The variable dSam is specified as follows:

[0734] – dSam is set equal to 1 if all of the following conditions are met:

[0735] –dpq is less than (β>>2),

[0736] –sp+sq is less than sTr,

[0737] –spq is less than (5*t C +1)>>1.

[0738] – Otherwise, dSam is set equal to 0.

[0739] 2.2.1.6.6 Filtering of Luma Samples Using Short Filters

[0740] The input to this process is:

[0741] – Sample value p i and q i , i = 0..3,

[0742] –p i and q i The position of (xP i ,yP i ) and (xQ i , yQ i )(where i = 0..2),

[0743] – variable dE,

[0744] – variables dEp and dEq, containing the decisions of the filter samples p1 and q1, respectively,

[0745] – Variable t C .

[0746] The output of this processing is:

[0747] –Number of filtering samples nDp and nDq,

[0748] – Filtered sample values ​​pi′ and qj′, i=0..nDp-1, j=0..nDq-1.

[0749] Depending on the value of dE, the following applies:

[0750] – If the variable dE is equal to 2, then both nDp and nDq are set equal to 3 and the following strong filtering is applied:

[0751] p0′=Clip3(p0-3*t C ,p0+3*t C ,(p2+2*p1+2*p0+2*q0+q1+4)>>3) (8-1162)

[0752] p1′=Clip3(p1-2*t C ,p1+2*t C ,(p2+p1+p0+q0+2)>>2) (8-1163)

[0753] p2′=Clip3(p2-1*t C ,p2+1*t C ,(2*p3+3*p2+p1+p0+q0+4)>>3) (8-1164)

[0754] q0′=Clip3(q0-3*t C ,q0+3*t C ,(p1+2*p0+2*q0+2*q1+q2+4)>>3) (8-1165)

[0755] q1′=Clip3(q1-2*t C ,q1+2*t C ,(p0+q0+q1+q2+2)>>2) (8-1166)

[0756] q2′=Clip3(q2-1*t C ,q2+1*t C ,(p0+q0+q1+3*q2+2*q3+4)>>3) (8-1167)

[0757] – Otherwise, both nDp and nDq are set equal to 0 and the following weak filtering is applied:

[0758] – The following apply:

[0759] Δ=(9*(q0-p0)-3*(q1-p1)+8)>>4 (8-1168)

[0760] –When Abs(Δ) is less than t C *10, the following sequence of steps applies:

[0761] – The sample values ​​p0′ and q0′ after filtering are defined as follows:

[0762] Δ=Clip3(-t C ,t C ,Δ) (8-1169)

[0763] p0′=Clip1 Y (p0+Δ) (8-1170)

[0764] q0′=Clip1 Y (q0-Δ) (8-1171)

[0765] – When dEp is equal to 1, the filtered sample value p1′ is defined as follows:

[0766] Δp=Clip3(-(t C >>1),t C >>1,(((p2+p0+1)>>1)-p1+Δ)>>1) (8-1172)

[0767] p1′=Clip1 Y (p1+Δp) (8-1173)

[0768] – When dEq is equal to 1, the filtered sample value q1′ is defined as follows:

[0769] Δq=Clip3(-(t C >>1),t C >>1,(((q2+q0+1)>>1)-q1-Δ)>>1) (8-1174)

[0770] q1′=Clip1 Y (q1+Δq) (8-1175)

[0771] –nDp is set equal to dEp+1, and nDq is set equal to dEq+1.

[0772] When nDp is greater than 0 and one or more of the following conditions are met, nDp is set equal to 0:

[0773] – The cu_transquant_bypass_flag of the codec unit containing the codec block containing sample p0 is equal to 1.

[0774] – pred_mode_plt_flag is equal to 1 for the codec unit that includes the codec block containing sample p0.

[0775] When nDq is greater than 0 and one or more of the following conditions are met, nDq is set equal to 0:

[0776] – cu_transquant_bypass_flag is equal to 1 for the codec unit containing the codec block containing sample q0.

[0777] – pred_mode_plt_flag is equal to 1 for the codec unit that includes the codec block containing sample q0.

[0778] 2.2.1.6.7 Filtering of Luma Samples Using Long Filters

[0779] The input to this process is:

[0780] – variables maxFilterLengthP and maxFilterLengthQ,

[0781] – Sample value p i and q j (where i=0..maxFilterLengthP and j=0..maxFilterLengthQ),

[0782] –p i and q j Position (xP i ,yP i ) and (xQ j , yQ j )(where i=0..maxFilterLengthP-1 and j=0..maxFilterLengthQ-1),

[0783] – Variable t C .

[0784] The output of this processing is:

[0785] – The sample value p after filtering i ′ and q j '(where i=0..maxFilterLengthP-1, j=0..maxFilterLenghtQ-1).

[0786] The variable refMiddle is exported as follows:

[0787] – If maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is equal to 5, then the following applies:

[0788] refMiddle=(p4+p3+2*(p2+p1+p0+q0+q1+q2)+q3+q4+8)>>4 (8-1176)

[0789] – Otherwise, if maxFilterLengthP is equal to maxFilterLengthQ and maxFilterLengthP is not equal to 5, then the following applies:

[0790] refMiddle=(p6+p5+p4+p3+p2+p1+2*(p0+q0)+q1+q2+q3+q4+q5+q6+8)>>4 (8-1177)

[0791] – Otherwise, if one of the following conditions is true,

[0792] – maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 5,

[0793] – maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 7,

[0794] Then the following applies:

[0795] refMiddle=(p4+p3+2*(p2+p1+p0+q0+q1+q2)+q3+q4+8)>>4 (8-1178)

[0796] – Otherwise, if one of the following conditions is true,

[0797] – maxFilterLengthQ is equal to 5 and maxFilterLengthP is equal to 3,

[0798] – maxFilterLengthQ is equal to 3 and maxFilterLengthP is equal to 5,

[0799] Then the following applies:

[0800] refMiddle=(p3+p2+p1+p0+q0+q1+q2+q3+4)>>3 (8-1179)

[0801] – Otherwise, if maxFilterLengthQ is equal to 7 and maxFilterLengthP is equal to 3,

[0802] Then the following applies:

[0803] refMiddle=(2*(p2+p1+p0+q0)+p0+p1+q1+q2+q3+q4+q5+q6+8)>>4 (8-1180)

[0804] – Otherwise, the following applies:

[0805] refMiddle=(p6+p5+p4+p3+p2+p1+2*(q2+q1+q0+p0)+q0+q1+8)>>4 (8-1181)

[0806] The variables refP and refQ are derived as follows:

[0807] refP=(p maxFilterLengtP +p maxFilterLengthP-1 +1)>>1 (8-1182)

[0808] refQ=(q maxFilterLengtQ +q maxFilterLengthQ-1 +1)>>1 (8-1183)

[0809] Variable f i and t C PD i The definition is as follows:

[0810] – If maxFilterLengthP is equal to 7, the following applies:

[0811] f 0..6 ={59, 50, 41, 32, 23, 14, 5} (8-1184)

[0812] t C PD 0..6 ={6, 5, 4, 3, 2, 1, 1} (8-1185)

[0813] – Otherwise, if maxFilterLengthP is equal to 5, the following applies:

[0814] f 0..4 ={58, 45, 32, 19, 6} (8-1186)

[0815] t C PD 0..4 ={6,5,4,3,2} (8-1187)

[0816] – Otherwise, the following applies:

[0817] f 0..2={53,32,11} (8-1188)

[0818] t C PD 0..2 ={6, 4, 2} (8-1189)

[0819] Variable g j and t C QD j The definition is as follows:

[0820] – If maxFilterLengthQ is equal to 7, the following applies:

[0821] g 0..6 ={59, 50, 41, 32, 23, 14, 5} (8-1190)

[0822] t C QD 0..6 ={6,5,4,3,2,1,1} (8-1191)

[0823] – Otherwise, if maxFilterLengthQ is equal to 5, the following applies:

[0824] g 0..4 ={58, 45, 32, 19, 6} (8-1192)

[0825] t C QD 0..4 ={6,5,4,3,2} (8-1193)

[0826] – Otherwise, the following applies:

[0827] g 0..2 ={53,32,11} (8-1194)

[0828] t C QD 0..2 ={6, 4, 2} (8-1195)

[0829] The sample value p after filtering i ′ and q j ′ (where i=0..maxFilterLengthP-1 and j=0..maxFilterLengthQ-1) is derived as follows:

[0830] p i ′=

[0831] Clip3(p i -(t C *t C PD i )>>1,pi +(t C *t C PD i )>>1,(refMiddle*f i +refP*(64-f i )+32)>>6) (8-1196)

[0832] 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-g j )+32)>>6) (8-1197)

[0833] When one or more of the following conditions are true, the filtered sample value p i ′ is composed of the corresponding input sample value p i Instead, where i = 0..maxFilterLengthP-1:

[0834] – including sample point p i The cu_transquant_bypass_flag of the codec unit of the codec block is equal to 1.

[0835] – including sample point p i pred_mode_plt_flag of the codec unit of the codec block is equal to 1.

[0836] When one or more of the following conditions are true, the filtered sample value q i ′ is composed of the corresponding input sample value q j Instead, j = 0..maxFilterLengthQ-1:

[0837] – Includes sample point q i The cu_transquant_bypass_flag of the codec unit of the codec block is equal to 1.

[0838] – Includes sample point q i pred_mode_plt_flag of the codec unit of the codec block is equal to 1.

[0839] 2.2.1.6.8 Decision-making process for chromaticity samples

[0840] The input to this process is:

[0841] – Sample values ​​p0, p3, q0 and q3,

[0842] – Variables dpq, β and t C .

[0843] The output of this process is the variable dSam containing the decision.

[0844] The variable dSam is defined as follows:

[0845] – dSam is set equal to 1 if all of the following conditions are met:

[0846] –dpq is less than (β>>2),

[0847] –Abs(p3-p0)+Abs(q0-q3) is less than (β>>3),

[0848] –Abs(p0-q0) is less than (5*t C +1)>>1.

[0849] – Otherwise, dSam is set equal to 0.

[0850] 2.2.1.6.9 Filtering of Chroma Samples

[0851] This process is called only if ChromaArrayType is not equal to 0.

[0852] The input to this process is:

[0853] – variable maxFilterLength,

[0854] – Chroma sample value p i and q i , i=0..maxFilterLengthCbCr,

[0855] – Chromaticity position of pi and qi, (xP i ,yP i ) and (xQ i , yQ i ), i=0..maxFilterLengthCbCr-1,

[0856] – Variable t C .

[0857] The output of this process is the filtered sample values ​​pi' and qi', i = 0..maxFilterLengthCbCr-1.

[0858] The derivation of the filtered sample values ​​pi′ and qi′ (i=0..maxFilterLengthCbCr-1) is as follows:

[0859] – If maxFilterLengthCbCr is equal to 3, the following strong filtering is applied:

[0860] p0′=Clip3(p0-t C ,p0+t C ,(p3+p2+p1+2*p0+q0+q1+q2+4)>>3) (8-1198)

[0861] p1′=Clip3(p1-t C ,p1+t C ,(2*p3+p2+2*p1+p0+q0+q1+4)>>3) (8-1199)

[0862] p2′=Clip3(p2-t C ,p2+t C ,(3*p3+2*p2+p1+p0+q0+4)>>3) (8-1200)

[0863] q0′=Clip3(q0-t C ,q0+t C ,(p2+p1+p0+2*q0+q1+q2+q3+4)>>3) (8-1201)

[0864] q1′=Clip3(q1-t C ,q1+t C ,(p1+p0+q0+2*q1+q2+2*q3+4)>>3) (8-1202)

[0865] q2′=Clip3(q2-t C ,q2+t C ,(p0+q0+q1+2*q2+3*q3+4)>>3) (8-1203)

[0866] – Otherwise, the following weak filtering applies:

[0867] Δ=Clip3(-t C ,t C ,((((q0-p0)<<2)+p1-q1+4)>>3)) (8-1204)

[0868] p0′=Clip1 C (p0+Δ) (8-1205)

[0869] q0′=Clip1 C (q0-Δ) (8-1206)

[0870] When one or more of the following conditions are true, the filtered sample value p i ′ is replaced by the corresponding input sample value p i Replace, i=0..maxFilterLengthCbCr-1:

[0871] – including sample point p i The cu_transquant_bypass_flag of the codec unit of the codec block is equal to 1.

[0872] – including sample point p i pred_mode_plt_flag of the codec unit of the codec block is equal to 1.

[0873] When one or more of the following conditions are true, the filtered sample value q i ′ is composed of the corresponding input sample value q i Replace, i=0..maxFilterLengthCbCr-1:

[0874] – Includes sample point q i The cu_transquant_bypass_flag of the codec unit of the codec block is equal to 1.

[0875] – Includes sample point q i pred_mode_plt_flag of the codec unit of the codec block is equal to 1.

[0876] 2.4 Virtual Boundary Filtering for Reducing Line Buffer

[0877] In VTM6, in order to reduce the buffer requirements of the ALF, a modified block classification and filtering method is used for samples close to horizontal CTU boundaries. To do this, Figure 4 The "N" samples shown are shifted horizontally across the CTU boundary, with a virtual boundary defined as a line where N equals 4 for the luma component and 2 for the chroma components.

[0878] Figure 4 An example of block classification modified at a virtual boundary is shown.

[0879] like Figure 5As shown, a modified block classification is applied to the luma component. For the one-dimensional Laplace gradient calculation of the 4x4 block above the virtual boundary, only the samples above the virtual boundary are used. Similarly, for the one-dimensional Laplace gradient calculation of the 4x4 block below the virtual boundary, only the samples below the virtual boundary are used. By taking into account the reduced number of samples used in the one-dimensional Laplace gradient calculation, the quantization of the activity value A is scaled accordingly.

[0880] For filtering, symmetric padding operations at virtual boundaries are used for both luminance and chrominance components. Figure 5 As shown in FIG. 1 , when the filtered sample point is below the virtual boundary, the adjacent sample points above the virtual boundary are filled in. At the same time, the corresponding sample points on the other side are also filled in symmetrically.

[0881] Figure 5 An example of modified ALF filtering for luma components at virtual boundaries is shown.

[0882] 3. Exemplary technical problems solved by the disclosed embodiments and technologies

[0883] There are several issues in the latest VVC working draft JVET-O2001-v14, as described below.

[0884] (1) Applying 4x4 sample grid luminance deblocking filtering to virtual boundaries increases the line buffer required for actual CTU-based loop filtering. An improved method can be used to reduce the additional line buffer.

[0885] (2) In WD6, luma deblocking is applied to 4x4 grid transform block boundaries, but for subblock boundaries, luma deblocking is applied to 8x8 grid. However, subblock-based affine prediction is based on 4x4, which may lead to large motion vector differences between two adjacent 4x4 blocks. Therefore, blocking artifacts may occur at 4x4 subblock boundaries, which requires extending the luma deblocking filter to 4x4 grid subblock boundaries.

[0886] (3) In WD6, the deblocking filter is not applied to the internal sub-block edges of the Merge Triangular Prediction Mode (TPM) codec block. However, the motion vectors of the TPM block are stored in 4x4 block granularity, which may result in a large motion vector difference between two adjacent 4x4 blocks. Therefore, it may be necessary to apply a deblocking filter to the internal edges of the TPM block.

[0887] (4) In WD6, not all chroma flags are signaled depending on the chroma format, which may be undesirable.

[0888] (5) In WD6, the PPS syntax element log2_transform_skip_max_size_minus2 is signaled conditionally on the SPS syntax element, which may lead to a parsing dependency between SPS and PPS.

[0889] (6) In WD6, the setting of maxFilterLengthPs depends on whether the current codec block contains multiple 8x8 blocks. For example, for 8x8 affine or sbTMVP coded blocks, maxFilterLengthPs remains unchanged, which is derived from the transform block boundary. However, for other sub-block boundaries, maxFilterLengthQs is reset to Min(5, maxFilterLengthQs).

[0890] (7) In WD6, the setting of maxFilterLengthQs depends on whether the edge is located at the first sub-block boundary (the leftmost or the topmost). For the following two cases:

[0891] a) If the block to the left of the vertical edge is not sub-block coded.

[0892] b) If the block above the horizontal edge is not sub-block coded.

[0893] For the above case, maxFilterLengthPs remains unchanged, which is derived from the transform block boundary. However, for other sub-block boundaries, maxFilterLengthPs is reset to Min(5, maxFilterLengthPs).

[0894] (8) In WD6, the setting of maxFilterLengthPs and maxFilterLengthQs for sub-block edges depends on whether the position of the edge plus 4 is greater than or equal to the current codec block width, which may be unnecessary.

[0895] (9) In WD6, for internal sub-block edges that are 4 samples away from the transform block edge, maxFilterLengthPs and maxFilterLengthQs are set to 1; otherwise, for the internal first / last sub-block edge and the sub-block edge that is 8 samples away from the TU edge, maxFilterLengthPs and maxFilterLengthQs are set to 2; otherwise, for other internal sub-block edges, maxFilterLengthPs and maxFilterLengthQs are set to 3. These conditions can be further refined.

[0896] (10) In WD6, the setting of the deblocking filter strength bS depends on the prediction mode of the neighboring blocks (for example, if the prediction mode of the codec subblock containing sample p0 is different from the prediction mode of the codec subblock containing sample q0), then bS is set equal to 1.

[0897] (11) In WD6, when it is a transform block edge and a neighboring block on either side of the edge is coded using CIIP mode, the deblocking filter strength bS of the edge is set to 2.

[0898] 4. List of Examples and Techniques

[0899] The following detailed inventions should be considered as examples to explain the general concept. These inventions should not be interpreted narrowly. In addition, these inventions can be combined in any way.

[0900] In the following disclosure, the term “natural boundary” may refer to a boundary between two coding blocks (eg, two CUs), or two prediction blocks (eg, two PUs), or two transform blocks (two TUs), or two subblocks.

[0901] The deblocking process derives some "boundaries" that are considered for deblocking from natural boundaries (eg, sub-block boundaries or transform block boundaries). In the following disclosure, these boundaries are also referred to as "deblocking boundaries".

[0902] In one example, a deblocking boundary must be a natural boundary, but a natural boundary may not be a deblocking boundary. If the boundary is not a deblocking boundary, it may not be considered in the deblocking process.

[0903] In the following disclosure, the term "edge" is equivalent to "border".

[0904] Deblocking filter at codec block and subblock boundaries

[0905] 1. Luma deblocking filtering can be applied to a 4x4 grid on natural sub-block boundaries.

[0906] a. In one example, the decision of whether the natural boundary of the current sub-block requires luma deblocking filtering (eg, the value of edgeFlags) can be performed on a 4x4 grid.

[0907] i. In one example, the decision of whether the natural boundary of the current sub-block needs to be subjected to luma deblocking filtering (eg, the value of edgeFlags) may not be performed on the 8x8 grid.

[0908] b. In one example, the luma deblocking filter length decisions (eg, maxFilterLengthPs and maxFilterLengthQs) may be applied to a 4x4 grid.

[0909] i. In one example, the luma deblocking filter length decisions (eg, maxFilterLengthPs and maxFilterLengthQs) may not apply to the 8x8 grid.

[0910] c. In one example, the grid unit (eg, 4x4 or 8x8) used for sub-block boundary / filter length / filter strength determination in a sub-block coding block may depend on the sub-block coding method.

[0911] i. In one example, the grid unit (eg, 4x4 or 8x8) used for sub-block boundary / filter length / filter strength determination in a sub-block codec block may be consistent with the sub-block size used in motion compensation / motion derivation.

[0912] ii. In one example, if the current block is affine coded, a luma deblocking filter may be applied at a 4x4 grid on affine sub-block boundaries.

[0913] 1) For example, for sub-block boundaries of affine coded blocks, items 1.a and 2.a above may be applied.

[0914] iii. In one example, if the current block is SbTMVP coded, a deblocking filter may be applied at an 8x8 grid on the SbTMVP sub-block boundary.

[0915] 2. Chroma deblocking filtering can be applied to natural sub-block boundaries.

[0916] a. In one example, a chroma deblocking filter may be applied at NxM (eg, 8x8 or 4x4 or 4x8 or 8x4) grid sub-block boundaries.

[0917] b. In one example, the decision (eg, the value of edgeFlags) whether the current chroma deblocking edge is a sub-block boundary may be performed at an NxN (N=8 or 4) grid.

[0918] c. In one example, the decision of chroma deblocking filter length (eg, maxFilterLengthPs and maxFilterLengthQs) may be applied to NxM (eg, 8x8 or 4x4 or 4x8 or 8x4).

[0919] d. In one example, the value of the chroma deblocking filter length (eg, maxFilterLengthPs and maxFilterLengthQs) may be less than or equal to L (eg, L=3 or 2 or 1).

[0920] e. In one example, the value of the boundary filter strength (eg, bS) for a chroma subblock boundary may depend on the number of motion vectors, the reference picture, and the absolute BV / MV difference between two neighboring pixels on either side of the current boundary.

[0921] f. Whether to apply the above method may depend on whether the current block is encoded or decoded using a sub-block based technique (eg, SbTMVP, affine, DMVR, chroma IBC mode in dual-tree case).

[0922] g. Whether to apply the above method may depend on the color subsampling format (eg, whether it is equal to 4:4:4).

[0923] h. The deblocking grid NxM may depend on the color format.

[0924] 3. For blocks encoded using triangular prediction mode (TPM) (also called geometric prediction mode), an NxN (N=4 or 8) grid deblocking filter may be applied.

[0925] a. In one example, the internal edge derivation of a TPM codec block can be processed the same as the sub-block boundary derivation of a SbTMVP and / or affine codec block.

[0926] b. In one example, a TPM codec block may be considered as a sub-block codec block, and the determination of sub-block boundaries / filter lengths / filter strengths may be determined at a 4x4 or 8x8 grid.

[0927] 4. For all sub-block deblocking boundaries, whether it is the first sub-block deblocking boundary or not (eg, the leftmost vertical boundary or the topmost horizontal boundary), the setting of the deblocking filter length may be processed in the same way.

[0928] a. For the leftmost vertical boundary (and / or the topmost horizontal boundary) of the current codec block, the value of the deblocking filter length may depend on whether it coincides with a transform block edge (eg edgeTbFlags).

[0929] i. In one example, for the leftmost vertical boundary (or the topmost horizontal boundary) of the current codec block, if the edgeTbFlags of the boundary is equal to 1, then regardless of whether the adjacent codec block to the left (or above) of the boundary is SbTMVP codec or affine codec, the deblocking filter length maxFilterLengthPs of the current block can be set equal to Min(5, maxFilterLengthPs).

[0930] ii. In one example, for the leftmost vertical boundary (or the topmost horizontal boundary) of the current codec block, if the edgeTbFlags of the boundary is equal to 1, the deblocking filter length maxFilterLengthPs of the current block is set equal to Min(5, maxFilterLengthPs) regardless of the number of sub-blocks in the current codec block.

[0931] 5. When deriving sub-block deblocking boundaries, the decision of the deblocking filter length may depend on the sub-block edge position (e.g., the sub-block edge index (e.g., xEdge) of the current codec block). Assume that the range of xEdge is [0, M], where M is an integer not less than 0.

[0932] a. In one example, for an xEdge in the range [a, b], maxFilterLengthPs and / maxFilterLengthQs may be set equal to a fixed integer value L (eg, L=1, 2, 3).

[0933] i. In one example, a=0 or 1.

[0934] ii. In one example, b=M or M−1.

[0935] iii. In one example, a=b=0 or 1 or M or M-1.

[0936] 6. Assuming x represents the horizontal / vertical sub-block position within the current codec block, the decision of the deblocking filter length depends on the relationship between x+delta (for example, delta can be equal to 4 or 8) and the codec block width / height.

[0937] a. In one example, when deriving SbTMVP and affine sub-block boundaries, the deblocking filter length (eg, maxFilterLengthPs and / or maxFilterLengthQs) may be determined without checking whether x+delta is greater than or equal to the block width / height.

[0938] b. In one example, when smearing out SbTMVP and affine sub-block boundaries, the deblocking filter length (eg, maxFilterLengthPs and / or maxFilterLengthQs) may be determined by checking whether x+delta is greater than or equal to the block width / height.

[0939] 7. When deriving sub-block deblocking boundaries, the decision of the deblocking filter length for the vertical boundary at column x or the horizontal boundary at row y in the block may depend on whether the vertical boundary at column x+dx or the horizontal boundary at row y+dy is a transform block boundary. dx and dy are integers, such as 4 or 8.

[0940] a. In one example, when deriving sub-block deblocking boundaries of a block (e.g., decoded with SbTMVP and / or affine codec), the decision of the deblocking filter length (e.g., maxFilterLengthPs and maxFilterLengthQs) for the vertical boundary at the xth column or the horizontal boundary at the yth row in the block may depend on one of the following:

[0941] i. Whether the vertical boundary at the x+dx column or the horizontal boundary at the y+dy row is a transform block boundary, without checking whether x+dx>=block width and / or y+dy>=block height.

[0942] ii. Whether the vertical boundary at the x+dx column or the horizontal boundary at the y+dy row is a transform block boundary, and whether x+dx>=block width and / or y+dy>=block height are satisfied.

[0943] b. Alternatively, when deriving sub-block deblocking boundaries for a block (e.g., decoded with SbTMVP and / or affine codec), the determination of the deblocking filter length (e.g., maxFilterLengthPs and maxFilterLengthQs) for a vertical boundary at column x or a horizontal boundary at row y in the block may not depend on whether the vertical boundary at column x+dx or the horizontal boundary at row y+dy is a transform block boundary.

[0944] General Problems with Deblocking Filters

[0945] 8. For SBT coded blocks, instead of marking two deblocking boundaries between transform blocks (smaller than blocks), it is proposed to mark three transform block boundaries in one direction (horizontal or vertical).

[0946] a. In one example, for one direction (horizontal or vertical), both transform block boundaries plus the codec block boundary are considered as deblocking boundaries that can be filtered in the deblocking filtering process.

[0947] b. Optionally, in addition, whether to filter the codec block boundary may further depend on whether it is a sub-block boundary, etc.

[0948] 9. If two neighboring samples on either side of the current block edge belong to two transforms that have no non-zero transform coefficient levels, the deblocking filter strength (eg, bS) of the edge may be set equal to zero.

[0949] a. In one example, if two neighboring samples located on both sides of the edge of the current transform block belong to two transform blocks without non-zero transform coefficient levels, and one of the neighboring samples is encoded and decoded as Merge triangle prediction mode (TPM), bS can be set equal to 0.

[0950] b. In one example, if two adjacent samples located on both sides of the edge of the current transform block belong to two transform blocks without non-zero transform coefficient levels, and the motion vector difference between the two adjacent samples is greater than a threshold T (e.g., T=8, in units of 1 / 16 luma samples), then bS may be set equal to 0.

[0951] c. In one example, the decision of the deblocking filter strength at transform block boundaries can be decoupled from the motion vector related criteria.

[0952] 10. The MVD exported from DMVR can be used for deblocking.

[0953] a. In one example, for a CU processed by DMVR, deblocking may be performed at sub-block boundaries within a CU using the derived MVDs of the sub-blocks instead of the signaled MVs.

[0954] b. In one example, for a CU processed by DMVR, deblocking may be performed at the CU boundary using the signaled MV of the CU.

[0955] c. Alternatively, for a CU processed by DMVR, deblocking may be performed at the CU boundary using the signaled MV and the derived MVD of the sub-blocks at the CU boundary.

[0956] i. For example, for blocks at CU boundaries, an MV can be generated by adding the derived MVD of the associated sub-block to the signaled MV, which can then be used for deblocking.

[0957] 11. The setting of the deblocking filter strength bS may not depend on the prediction mode of the neighboring blocks.

[0958] a. In one example, the setting of the deblocking filter strength bS may depend on whether one of the neighboring blocks is coded as MODE_INTRA, rather than MODE_IBC and / or MODE_INTER.

[0959] 12. Whether and / or how to filter edges may depend on the edge type (eg, transform block boundary or sub-block boundary).

[0960] a. In one example, the deblocking filter strength at the transform block boundary and the deblocking filter strength at the codec subblock boundary may be determined separately.

[0961] i. In one example, transform block boundary flags may be stored in an (nCbW)x(nCbH) array A, while codec sub-block boundaries may be stored in an (nCbW)x(nCbH) array B, where A and B are different array buffers.

[0962] ii. In one example, the deblocking filter strength (eg, bS) of the transform block boundary may be set according to the transform coefficients (eg, non-zero coefficients).

[0963] 1) In one example, if two neighboring samples located on both sides of the edge of the current transform block have zero transform coefficient levels, bS may be set equal to 0.

[0964] iii. In one example, the deblocking filter strength (eg, bS) of the coding sub-block boundary may be set according to the motion vector and / or reference picture between two adjacent pixels on both sides of the current boundary.

[0965] iv. In one example, if a block edge is also (transform block edge rather than subblock boundary) and at least one of the two neighboring samples along the edge is in a CIIP mode coded block, then the boundary strength (BS) is set equal to X (X=1 or 2).

[0966] b. Alternatively, the decisions of filter strength / filter length / boundary strength can be the same for different edge types.

[0967] i. In one example, if a block edge is also (transform block edge or subblock boundary) and at least one of the two neighboring samples along the edge is in a CIIP mode coded block, then the boundary strength (BS) is set equal to X (X=1 or 2).

[0968] Interaction with virtual boundaries

[0969] 13. At a virtual boundary of N samples (eg, N=4 for luma, N=2 for chroma) above a horizontal CTU boundary, the deblocking filter may not be applied.

[0970] a. In one example, for TU / CU / PU / sub-block edges that coincide with virtual boundaries, horizontal edge deblocking filtering may not be applied.

[0971] b. Alternatively, and in addition, for TU / CU / PU / sub-block edges that coincide with virtual boundaries, vertical edge deblocking filtering may still be applied.

[0972] 14. In one example, whether and / or how to clip values ​​in the deblocking process may depend on whether the boundary to be filtered by the deblocking filter coincides with a virtual boundary.

[0973] a. In one example, a sample with value p is modified to value p' after deblocking, p is derived as p'=p+d', and d'=Clip3(t1, t2, d), where d is derived in the deblocking process, and [t1, t2] is the clipping range. t1 and / or t2 may depend on whether the boundary to be filtered by the deblocking filter coincides with the virtual boundary.

[0974] i. In one example, t1 = -2 N And t2=2 N -1, where N is an integer.

[0975] 1) For example, N may depend on the color components.

[0976] 2) For example, N can be sent from the encoder to the decoder.

[0977] 3) For example, N may depend on the sample bit depth.

[0978] Interaction with other codecs

[0979] 15. SBT and sub-block based coding and decoding methods (e.g., SbTMVP and / or Affine) can be used exclusively.

[0980] a. SBT may not be allowed for sub-block based coding blocks, such as SbTMVP and affine prediction blocks.

[0981] b. In one example, if the codec block is encoded and decoded with SbTMVP, SBT may not be applied.

[0982] c. In one example, if the codec block is encoded and decoded using affine prediction, SBT may not be applied

[0983] d. In one example, if the codec block is encoded using SbTMVP or affine prediction, SBT may not be applied.

[0984] i. For example, when inter_affine_flag is equal to 1 or merge_subblock_flag is equal to 1, cu_sbt_flag may not be signaled and may be inferred to be 0.

[0985] 16. For the above example, when the use of a codec tool is not allowed, signaling of the use indication of the tool is skipped.

[0986] a. Alternatively, if the first tool is not allowed when the second tool is applied, the signaling of the use of the first tool may be conditional on the second tool not being applied.

[0987] 17. The deblocking filter can be applied to the boundary between two sub - partitions of a block encoded and decoded in the Intra Sub - Partitioning (ISP) mode.

[0988] a. In one example, if x satisfies x = M * P+offset and / or x < W, where offset, M, and P are positive integers, then the vertical boundary at column x between two sub - partitions of the block is filtered by deblocking. In one example, M = 1, 2, 3…, P = 1. In another example, M = 1, 2, 3…, P = 2. W is the width of the block. For example, offset = 0.

[0989] b. In one example, if y satisfies y = M * P+offset and / or y < H, where offset, M, and P are positive integers, then the horizontal boundary at row y between two sub - partitions of the block is filtered by deblocking. In one example, M = 1, 2, 3…, P = 1. In another example, M = 1, 2, 3…, P = 2. H is the height of the block. For example, offset = 0.

[0990] c. Optionally, the deblocking filter is not applied to the boundary between two sub - partitions of a block encoded and decoded in the Intra Sub - Partitioning (ISP) mode.

[0991] 18. The deblocking filter can be applied to the boundary between two MxN (e.g., 4x4 or 8x8) regions of a block encoded and decoded with TPM.

[0992] a. For example, if one of two adjacent encoded and decoded blocks is encoded and decoded with TPM, then the boundary between the two blocks can be deblocked.

[0993] 19. Filtering processes (e.g., deblocking filter, SAO, ALF) can depend on the motion information of TPM - encoded blocks used in motion compensation processing, rather than the motion information used in motion storage / motion vector prediction for subsequent encoded blocks.

[0994] a. In one example, during the deblocking filter strength (e.g., bS) derivation process, the motion vector of a TPM - encoded block can be the vector used in motion compensation processing.

[0995] b. In one example, the stored HxH (e.g., 4x4) motion vector of a TPM - encoded block may not be used for deblocking boundary filter strength setting.

[0996] c. In one example, the motion vector used for TPM motion compensation can be used for deblocking boundary filter strength setting.

[0997] d. Alternatively, whether to use motion information in a motion compensation process, motion storage, or motion vector prediction process may be adaptively changed.

[0998] e. Alternatively, whether to use motion information in a motion compensation process or a motion storage or motion vector prediction process may be determined based on decoded information and / or block dimensions, etc.

[0999] Chroma Marker Signal

[1000] 20. Chroma syntax element signaling may depend on the chroma format sampling structure (eg, chroma_format_idc) and / or the coding method (eg, separate_colour_plane_flag, and / or ChromaArrayType, etc.).

[1001] a. In one example, the PPS Cb / Cr flag may be signaled according to the chroma format sampling structure.

[1002] i. In one example, if ChromaArrayType is equal to true, syntax element X may be signaled. Otherwise, syntax element X may not be signaled.

[1003] ii. In one example, if the chroma format is monochrome (eg, 4:0:0), then syntax element X may be signaled. Otherwise, syntax element X may not be signaled.

[1004] iii. In one example, if the chroma format is 4:4:4 and separate_colour_plane_flag is equal to 1, syntax element X may be signaled. Otherwise, syntax element X may not be signaled.

[1005] iv. For example, X can be pps_cb_qp_offset and pps_cr_qp_offset in the above items.

[1006] v. For example, X can be pps_joint_cbcr_qp_offset in the above item.

[1007] vi. For example, X can be cu_chroma_qp_offset_enabled_flag in the above item.

[1008] vii. For example, X may be pps_slice_chroma_qp_offsets_present_flag in the above item.

[1009] SPS-PPS Syntax Correlation

[1010] 21. The PPS syntax element may not depend on the SPS syntax element.

[1011] a. In one example, the PPS syntax element log2_transform_skip_max_size_minus may not be signaled conditional on an SPS syntax element (eg, sps_transform_skip_enabled_flag).

[1012] 5. Examples

[1013] The following is an example embodiment applicable to the VVC specification. The modifications are based on the latest VVC working draft (JVET-O2001-v14). New additions are highlighted in bold and italics, and portions deleted from the VVC working draft are marked with double brackets (e.g., [[a]] means deleting the character "a").

[1014] Embodiment 1 is about applying luma deblocking filtering at 4x4 grid at sub-block boundaries

[1015] 8.8.3.4 Derivation of Codec Sub-block Boundaries

[1016] …

[1017] – If edgeType is equal to EDGE_VER, the following applies:

[1018] –The variable sbW is set equal to Max([[8]]4, nCbW / numSbX).

[1019] – The array edgeTbFlags is set equal to edgeFlags.

[1020] – For xEdge = 0..min((nCbW / [[8]]4)-1, numSbX-1), y = 0..nCbH-1:

[1021] – The horizontal position x within the current codec block is set equal to xEdge*sbW.

[1022] – The values ​​of edgeFlags[x][y] are derived as follows:

[1023] …

[1024] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1025] – If x is equal to 0, then the following applies:

[1026] …

[1027] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1028] …

[1029] – Otherwise, if one or more of the following conditions are true:

[1030] – Note: You can add one or more conditions: xEdge

[1031] is equal to 1, or added as: (x-4) is equal to 0

[1032] –(x+4) is greater than or equal to nCbW,

[1033] –edgeTbFlags[x-4][y] is equal to 1, then

[1034] –edgeTbFlags[x+4][y] is equal to 1, then

[1035] The following applies:

[1036] maxFilterLengthPs[x][y]=1 (8-1031)

[1037] maxFilterLengthQs[x][y]=1 (8-1032)

[1038] –[[Otherwise, if one or more of the following conditions are true:

[1039] –xEdge is equal to 1,

[1040] –xEdge is equal to (nCbW / 8)-1,

[1041] –edgeTbFlags[x-sbW][y] is equal to 1,

[1042] –edgeTbFlags[x+sbW][y] is equal to 1,

[1043] Then the following applies:

[1044] maxFilterLengthPs[x][y]=2 (8-1033)

[1045] maxFilterLengthQs[x][y]=2 (8-1034)]]

[1046] – Otherwise, the following applies:

[1047] maxFilterLengthPs[x][y]=3 (8-1035)

[1048] maxFilterLengthQs[x][y]=3 (8-1036)

[1049] – Otherwise, if edgeType is equal to EDGE_HOR, the following applies:

[1050] –The variable sbH is set equal to Max([[8]]4, nCbH / numSbY).

[1051] – The array edgeTbFlags is set equal to edgeFlags.

[1052] – For yEdge = 0..min((nCbH / [[8]]4)-1, numSbY-1), x = 0..nCbW-1:

[1053] – The vertical position y within the current codec block is set equal to yEdge*sbH.

[1054] – The values ​​of edgeFlags[x][y] are derived as follows:

[1055] …

[1056] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1057] – If y is equal to 0 and edgeFlags[x][y] is equal to 1, then the following applies:

[1058] …

[1059] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1060] …

[1061] – Otherwise, if one or more of the following conditions are true:

[1062] – Note: You can add one or more conditions: yEdge is equal to 1, or add:

[1063] (y-4) is equal to 0

[1064] –(y+4) is greater than or equal to nCbH,

[1065] –edgeTbFlags[x][y-4] is equal to 1,

[1066] –edgeTbFlags[x][y+4] is equal to 1,

[1067] The following applies:

[1068] maxFilterLengthPs[x][y]=1 (8-1045)

[1069] maxFilterLengthQs[x][y]=1 (8-1046)

[1070] –[[Otherwise, if one or more of the following conditions are true:

[1071] –yEdge is equal to 1,

[1072] –yEdge is equal to (nCbH / 8)-1,

[1073] –edgeTbFlags[x][y-sbH] is equal to 1,

[1074] –edgeTbFlags[x][y+sbH] is equal to 1,

[1075] Then the following applies:

[1076] maxFilterLengthPs[x][y]=2 (8-1043)

[1077] maxFilterLengthQs[x][y]=2 (8-1044)]]

[1078] – Otherwise, the following applies:

[1079] maxFilterLengthPs[x][y]=3 (8-1047)

[1080] maxFilterLengthQs[x][y]=3 (8-1048)

[1081] 5.1 Example 2: Applying a luma deblocking filter at a 4x4 grid affine codec sub-block boundary and an 8x8 grid sbTMVP codec sub-block boundary, and applying a chroma deblocking filter at an 8x8 grid sub-block boundary

[1082] 8.8.3.2 Deblocking Filtering in One Direction

[1083] …

[1084] 1. The variable filterEdgeFlag is exported as follows:

[1085] –…

[1086] 2. All elements of the two-dimensional (nCbW) x (nCbH) arrays edgeFlags, maxFilterLengthQs, and maxFilterlengthPs are initialized to zero.

[1087] 3. With position (xCb, yCb), codec block width nCbW, codec block height nCbH, variable cIdx, variable filterEdgeFlag, array edgeFlags, maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs, and variable edgeType as input, call the derivation process of transform block boundaries specified in clause 8.8.3.3, and output the modified array edgeFlags, the modified maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs.

[1088] 4. [[When cIdx is equal to 0,]] invokes the derivation process for codec sub-block boundaries specified in Section 8.8.3.4 with position (xCb, yCb), codec block width nCbW, codec block height nCbH, array edgeFlags, maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs, and variable edgeType as input, and outputs the modified array edgeFlags, modified maximum filter length arrays maxFilterLengthPs and maxFilterLengthQs.

[1089] 5. …

[1090] 6. …

[1091] 7. …

[1092] (Note: If the chroma deblocking filter at sub-block boundaries is applied only to the luma component, then the above modification to clause 8.8.3.2 is not required.)

[1093] 8.8.3.4 Derivation of Codec Sub-block Boundaries

[1094] …

[1095] – The variable gridSize is set as follows:

[1096] gridSize=(cIdx==0||inter_affine_flag[xCb][yCb])? 4:8

[1098] (Note: If the chroma deblocking filtering at the sub-block boundary is only applied to the luma component, the above gridSize should be set equal to: gridSize = (inter_affine_flag [xCb] [yCb])? 4:8)

[1099] – If edgeType is equal to EDGE_VER, the following applies:

[1100] – The variable sbW is set equal to Max([[8]]gridSize, nCbW / numSbX).

[1101] – The array edgeTbFlags is set equal to edgeFlags.

[1102] – For xEdge=0..min((nCbW / [[8]]gridSize)-1, numSbX-1), y=0..nCbH-1:

[1103] – The horizontal position x within the current codec block is set equal to xEdge*sbW.

[1104] – The value of edgeFlags[x][y] is derived as follows:

[1105] …

[1106] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1107] – If x is equal to 0, then the following applies:

[1108] …

[1109] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1110] …

[1111] – Otherwise, if one or more of the following conditions are true:

[1112] – Note: You can add one or more conditions: xEdge is equal to 1,

[1113] Or increase: (x-gridSize) equal to 0

[1114] –(x+4gridSize) is greater than or equal to nCbW,

[1115] –edgeTbFlags[x-4gridSize][y] is equal to 1,

[1116] –edgeTbFlags[x+4gridSize][y] is equal to 1,

[1117] The following applies:

[1118] maxFilterLengthPs[x][y]=1(Note: 1 can be changed to 2) (8-1031)

[1119] maxFilterLengthQs[x][y]=1 ( Note: 1 can be modified to 2) (8-1032)

[1120] –[[Otherwise, if one or more of the following conditions are true:

[1121] –xEdge is equal to 1,

[1122] –xEdge is equal to (nCbW / 8)-1,

[1123] –edgeTbFlags[x-sbW][y] is equal to 1,

[1124] –edgeTbFlags[x+sbW][y] is equal to 1,

[1125] Then the following applies:

[1126] maxFilterLengthPs[x][y]=2 (8-1033)

[1127] maxFilterLengthQs[x][y]=2 (8-1034)]]

[1128] – Otherwise, the following applies:

[1129] …

[1130] – Otherwise, if edgeType is equal to EDGE_HOR, the following applies:

[1131] – The variable sbH is set equal to Max([[8]]gridSize, nCbH / numSbY).

[1132] – The array edgeTbFlags is set equal to edgeFlags.

[1133] – For yEdge = 0..min((nCbH / [[8]]gridSize)-1, numSbY-1), x = 0..nCbW-1:

[1134] – The vertical position y within the current codec block is set equal to yEdge*sbH.

[1135] – The values ​​of edgeFlags[x][y] are derived as follows:

[1136] …

[1137] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1138] – If y is equal to 0 and edgeFlags[x][y] is equal to 1, then the following applies:

[1139] …

[1140] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1141] …

[1142] – Otherwise, if one or more of the following conditions are true:

[1143] – Note: You can add one or more conditions: yEdge is equal to 1,

[1144] Or increase: (y-gridSize) equal to 0

[1145] –(y+4gridSize) is greater than or equal to nCbH,

[1146] –edgeTbFlags[x][y-4gridSize] is equal to 1,

[1147] –edgeTbFlags[x][y+4gridSize] is equal to 1,

[1148] Then the following applies:

[1149] maxFilterLengthPs[x][y]=1 (8-1045)

[1150] maxFilterLengthQs[x][y]=1 (8-1046)

[1151] –[[Otherwise, if one or more of the following conditions are true:

[1152] –yEdge is equal to 1,

[1153] –yEdge is equal to (nCbH / 8)-1,

[1154] –edgeTbFlags[x][y-sbH] is equal to 1,

[1155] –edgeTbFlags[x][y+sbH] is equal to 1,

[1156] Then the following applies:

[1157] maxFilterLengthPs[x][y]=2 (8-1043)

[1158] maxFilterLengthQs[x][y]=2 (8-1044)]]

[1159] – Otherwise, the following applies:

[1160] …

[1161] 8.8.3.5 Derivation of Boundary Filter Strength

[1162] …

[1163] For xD with i = 0..xN i and yD with j = 0..yN j , the following apply:

[1164] – If edgeFlags[xD i ][yD j ] is equal to 0, then the variable bS[xD i ][yD j ] is set to equal 0.

[1165] – Otherwise, the following applies:

[1166] -…

[1167] - 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 to 1:

[1168] –K=(cIdx==0)? 8:16

[1169] –L=(cIdx==0)? 1 / 16:1 / 32

[1170] – The coded subblock containing sample p0 and the coded subblock containing sample q0 are both coded in IBC prediction mode and the absolute difference between the horizontal and vertical components of the block vectors used in the prediction of the two coded subblocks is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1171] – For the prediction of the codec sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the codec sub-block containing sample q0.

[1172] – One vector is used to predict the codec subblock containing sample p0, and one vector is used to predict the codec subblock containing sample q0, and the absolute difference between the horizontal or vertical components of the vectors used is greater than or equal to [[8]]K (in units of [[1 / 16]]L luma samples).

[1173] – Two motion vectors and two different reference pictures are used to predict the codec sub-block containing sample p0, two motion vectors of the same two reference pictures are used to predict the codec sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used for the prediction of the two codec sub-blocks of the same reference picture is greater than or equal to [[8]]K (in units of [[1 / 16]]L luminance samples).

[1174] – Two motion vectors from the same reference picture are used to predict the codec subblock containing sample p0, and two motion vectors from the same reference picture are used to predict the codec subblock containing sample q0 and both of the following conditions are true:

[1175] – The absolute difference between the horizontal or vertical components of the predicted list 0 motion vectors for two codec sub-blocks is greater than or equal to [[8]]K (in units of [[1 / 16]]L luma samples). Or the absolute difference between the horizontal or vertical components of the predicted list 1 motion vectors for two codec sub-blocks is greater than or equal to [[8]]K (in units of [[1 / 16]]L luma samples).

[1176] - The absolute difference between the horizontal or vertical component of the predicted List 0 motion vector for the codec sub-block containing sample p0 and the predicted List 1 motion vector for the codec 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 predicted List 1 motion vector for the codec sub-block containing sample p0 and the predicted List 0 motion vector for the codec sub-block containing sample q0 is greater than or equal to [[8]]K (in units of [[1 / 16]]L luma samples).

[1177] - Otherwise, the variable bS[xD i ][yD j ] is set to equal 0.

[1178] (Note: If the chroma deblocking filter at sub-block boundaries is applied only to the luma component, then the above modification to clause 8.8.3.5 is not required.)

[1179] 5.2 Example 3 Deblocking filter strength setting for decoupling transform block edges from motion vectors

[1180] 8.8.3.5 Derivation of Boundary Filter Strength

[1181] …

[1182] For xD i (where i = 0..xN) and yD j (where j = 0..yN), the following applies:

[1183] – If edgeFlags[xD i ][yD j ] is equal to 0, then the variable bS[xD i ][yD j ] is set to equal 0.

[1184] – Otherwise, the following applies:

[1185] – The sample point values ​​p0 and q0 are derived as follows:

[1186] – If edgeType is equal to EDGE_VER, set p0 equal to recPicture[xCb+xD i -1][yCb+yD j ] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[1187] – Otherwise (edgeType equals EDGE_HOR), p0 is set equal to recPicture[xCb+xD i ][yCb+yD j -1] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[1188] –Variable bS[xD i ][yD j ] is exported as follows:

[1189] – If cIdx is equal to 0 and both samples p0 and q0 are in the codec block with intra_bdpcm_flag equal to 1, then bS[xD i ][yD j ] is set to equal 0.

[1190] – Otherwise, if the sample p0 or q0 is in the codec block of a codec unit coded in intra prediction mode, then bS[xD i ][yD j ] is set to equal 2.

[1191] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal 2.

[1192] –[[Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a transform block containing one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set equal to 1. ]]

[1193] – Otherwise, if the block edge is also a transform block edge, cIdx is greater than 0, and sample p0 or q0 is in a transform unit with tu_joint_cbcr_residual_flag equal to 1, then bS[xD i ][yD j ] is set to be equal to 1.

[1194] – Otherwise, if the prediction mode of the coded subblock containing sample p0 is different from the prediction mode of the coded subblock containing sample q0 (i.e., one of the coded subblocks is coded and decoded with IBC prediction mode and the other with inter prediction mode), then bS[xD i ][yD j ] is set to be equal to 1.

[1195] – 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 to 1:

[1196] – The coded subblock containing sample p0 and the coded subblock containing sample q0 are both coded in IBC prediction mode and the absolute difference between the horizontal and vertical components of the block vectors used in the prediction of the two coded subblocks is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1197] – For the prediction of the codec sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the codec sub-block containing sample q0.

[1198] NOTE 1 - Whether the reference pictures used for two codec sub-blocks are the same or different is determined only based on the pictures they reference, regardless of whether an index pointing to reference picture list 0 or an index pointing to reference picture list 1 is used, or whether the index positions in the reference picture lists are different.

[1199] NOTE 2 - The number of motion vectors for the prediction of the coded sub-block for the top left sample coverage (xSb, ySb) is equal to PredFlagL0[xSb][ySb]+PredFlagL1[xSb][ySb].

[1200] – One vector is used to predict the codec subblock containing sample p0, and one vector is used to predict the codec subblock containing sample q0, and the absolute difference between the horizontal or vertical components of the used vectors is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1201] – Two motion vectors and two different reference pictures are used to predict the codec sub-block containing sample p0, two motion vectors of the same two reference pictures are used to predict the codec sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used for the prediction of the two codec sub-blocks of the same reference picture is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1202] – Two motion vectors from the same reference picture are used to predict the codec subblock containing sample p0, and two motion vectors from the same reference picture are used to predict the codec subblock containing sample q0 and both of the following conditions are true:

[1203] – The absolute difference between the horizontal or vertical components of the predicted list 0 motion vectors for the two codec 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 the predicted list 1 motion vectors for the two codec sub-blocks is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1204] – The absolute difference between the horizontal or vertical component of the predicted list 0 motion vector for the codec sub-block containing sample p0 and the predicted list 1 motion vector for the codec 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 predicted list 1 motion vector for the codec sub-block containing sample p0 and the predicted list 0 motion vector for the codec sub-block containing sample q0 is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1205] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a transform block containing one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set to be equal to 1.

[1206] – Otherwise, the variable bS[xD i ][yD j ] is set to equal 0.

[1207] 5.3 Example 4 Determining the Deblocking Filter Length of the First Sub-block Boundary

[1208] 8.8.3.4 Derivation of Codec Sub-block Boundaries

[1209] …

[1210] – If edgeType is equal to EDGE_VER, the following applies:

[1211] –The variable sbW is set equal to Max(8,nCbW / numSbX).

[1212] – The array edgeTbFlags is set equal to edgeFlags.

[1213] – For xEdge = 0..min((nCbW / 8)-1, numSbX-1),

[1214] y=0..nCbH-1:

[1215] – The horizontal position x within the current codec block is set equal to xEdge*sbW.

[1216] – The value of edgeFlags[x][y] is derived as follows:

[1217] – If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and x is equal to PpsVirtualBoundariesPosX[n], for any n=0..pps_num_ver_virtual_boundaries-1, the following applies:

[1218] edgeFlags[x][y]=0 (8-1025)

[1219] – Otherwise, the following applies:

[1220] edgeFlags[x][y]=1 (8-1026)

[1221] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1222] –[[If x equals 0, then the following applies:

[1223] – When numSbX is greater than 1, the following applies:

[1224] maxFilterLengthQs[x][y]=Min(5, maxFilterLengthQs[x][y]) (8-1027)

[1225] – When inter_affine_flag[xCb-1][yCb] is equal to 1 or merge_subblock_flag[xCb-1][yCb] is equal to 1, the following applies:

[1226] maxFilterLengthPs[x][y]=Min(5, maxFilterLengthPs[x][y]) (8-1028)

[1227] – Otherwise, ]]If edgeTbFlags[x][y] is equal to 1, the following applies:

[1228] maxFilterLengthPs[x][y]=Min(5, maxFilterLengthPs[x][y]) (8-1029)

[1229] maxFilterLengthQs[x][y]=Min(5, maxFilterLengthQs[x][y]) (8-1030)

[1230] Note: If chroma deblocking filtering is applied to sub-block edges, the above two lines can be modified as follows:

[1231] maxFilterLengthPs[x][y]=Min(L, maxFilterLengthPs[x][y]),

[1232] maxFilterLengthQs[x][y]=Min(L, maxFilterLengthQs[x][y]),

[1233] Where L=(cIdx==0)?5:X, and X can be equal to 1 or 2 or 3.

[1234] – Otherwise, if one or more of the following conditions are true:

[1235] …

[1236] 5.4 Example 5 Determining the deblocking filter length without checking the codec block dimension

[1237] 8.8.3.4 Derivation of Codec Sub-block Boundaries

[1238] …

[1239] – If edgeType is equal to EDGE_VER, the following applies:

[1240] –The variable sbW is set equal to Max(8,nCbW / numSbX).

[1241] – The array edgeTbFlags is set equal to edgeFlags.

[1242] – For xEdge = 0..min((nCbW / 8)-1, numSbX-1), y = 0..nCbH-1:

[1243] – The horizontal position x within the current codec block is set equal to xEdge*sbW.

[1244] – The value of edgeFlags[x][y] is derived as follows:

[1245] …

[1246] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1247] – If x is equal to 0, then the following applies:

[1248] …

[1249] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1250] …

[1251] – Otherwise, if one or more of the following conditions are true:

[1252] –[[(x+4) is greater than or equal to nCbW,]]

[1253] –edgeTbFlags[x-4][y] is equal to 1,

[1254] –edgeTbFlags[x+4][y] is equal to 1,

[1255] Then the following applies:

[1256] maxFilterLengthPs[x][y]=1 (8-1031)

[1257] maxFilterLengthQs[x][y]=1 (8-1032)

[1258] – Otherwise, if one or more of the following conditions are true: ..

[1260] – Otherwise, the following applies: ..

[1262] – Otherwise, if edgeType is equal to EDGE_HOR, the following applies:

[1263] –The variable sbH is set equal to Max(8,nCbH / numSbY).

[1264] – The array edgeTbFlags is set equal to edgeFlags.

[1265] – For yEdge = 0..min((nCbH / 8)-1, numSbY-1), x = 0..nCbW-1:

[1266] – The vertical position y within the current codec block is set equal to yEdge*sbH.

[1267] – The value of edgeFlags[x][y] is derived as follows:

[1268] …

[1269] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1270] – If y is equal to 0 and edgeFlags[x][y] is equal to 1, then the following applies:

[1271] …

[1272] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1273] …

[1274] – Otherwise, if one or more of the following conditions are true:

[1275] –[[(y+4) is greater than or equal to nCbH,]]

[1276] –edgeTbFlags[x][y-4] is equal to 1,

[1277] –edgeTbFlags[x][y+4] is equal to 1,

[1278] The following applies:

[1279] maxFilterLengthPs[x][y]=1 (8-1045)

[1280] maxFilterLengthQs[x][y]=1 (8-1046)

[1281] – Otherwise, if one or more of the following conditions are true: ..

[1283] – Otherwise, the following applies: ..

[1285] 5.5 Example 6 Determining the Deblocking Filter Length by Sub-block Boundary Index

[1286] 8.8.3.4 Derivation of Codec Sub-block Boundaries

[1287] …

[1288] – If edgeType is equal to EDGE_VER, the following applies:

[1289] –The variable sbW is set equal to Max(8,nCbW / numSbX).

[1290] – The array edgeTbFlags is set equal to edgeFlags.

[1291] – For xEdge = 0..min((nCbW / 8)-1, numSbX-1),

[1292] y=0..nCbH-1:

[1293] – The horizontal position x within the current codec block is set equal to xEdge*sbW.

[1294] – The value of edgeFlags[x][y] is derived as follows:

[1295] …

[1296] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1297] – If x equals 0, the following applies:

[1298] …

[1299] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1300] …

[1301] – Otherwise, if one or more of the following conditions are true:

[1302] – Note: You can add one or more conditions: xEdge equals 1, or add: (x-4) equals 0

[1303] –(x+4) is greater than or equal to nCbW,

[1304] –edgeTbFlags[x-4][y] is equal to 1,

[1305] –edgeTbFlags[x+4][y] is equal to 1,

[1306] The following applies:

[1307] maxFilterLengthPs[x][y]=1 (8-1031)

[1308] maxFilterLengthQs[x][y]=1 (8-1032)

[1309] – Otherwise, if one or more of the following conditions are true:

[1310] –[[xEdge is equal to 1,]]

[1311] –xEdge is equal to (nCbW / 8)-1,

[1312] –edgeTbFlags[x-sbW][y] is equal to 1,

[1313] –edgeTbFlags[x+sbW][y] is equal to 1,

[1314] The following applies:

[1315] maxFilterLengthPs[x][y]=2 (8-1033)

[1316] maxFilterLengthQs[x][y]=2 (8-1034)

[1317] – Otherwise, the following applies:

[1318] …

[1319] – Otherwise, if edgeType is equal to EDGE_HOR, the following applies:

[1320] –The variable sbH is set equal to Max(8,nCbH / numSbY).

[1321] – The array edgeTbFlags is set equal to edgeFlags.

[1322] – For yEdge = 0..min((nCbH / 8)-1, numSbY-1), x = 0..nCbW-1:

[1323] – The vertical position y within the current codec block is set equal to yEdge*sbH.

[1324] – The value of edgeFlags[x][y] is derived as follows:

[1325] …

[1326] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1327] – If y is equal to 0 and edgeFlags[x][y] is equal to 1, then the following applies:

[1328] …

[1329] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1330] …

[1331] – Otherwise, if one or more of the following conditions are true:

[1332] – Note: You can add one or more conditions: yEdge is equal to 1, or

[1333] Add: (y-4) equals 0

[1334] –(y+4) is greater than or equal to nCbH,

[1335] –edgeTbFlags[x][y-4] is equal to 1,

[1336] –edgeTbFlags[x][y+4] is equal to 1,

[1337] The following applies:

[1338] …

[1339] – Otherwise, if one or more of the following conditions are true:

[1340] –[[yEdge is equal to 1,]]

[1341] –yEdge is equal to (nCbH / 8)-1,

[1342] –edgeTbFlags[x][y-sbH] is equal to 1,

[1343] –edgeTbFlags[x][y+sbH] is equal to 1,

[1344] The following applies:

[1345] maxFilterLengthPs[x][y]=2 (8-1043)

[1346] maxFilterLengthQs[x][y]=2 (8-1044)

[1347] – Otherwise, the following applies:

[1348] …

[1349] 5.6 Example 7 Determining the Deblocking Filter Length Using Adjacent TU Edges

[1350] 8.8.3.4 Derivation of Codec Sub-block Boundaries

[1351] …

[1352] – If edgeType is equal to EDGE_VER, the following applies:

[1353] –The variable sbW is set equal to Max(8,nCbW / numSbX).

[1354] – The array edgeTbFlags is set equal to edgeFlags.

[1355] – For xEdge = 0..min((nCbW / 8)-1, numSbX-1), y = 0..nCbH-1:

[1356] – The horizontal position x within the current codec block is set equal to xEdge*sbW.

[1357] – The values ​​of edgeFlags[x][y] are derived as follows:

[1358] …

[1359] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1360] – If x is equal to 0, then the following applies:

[1361] …

[1362] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1363] …

[1364] –[[Otherwise, if one or more of the following conditions are true:

[1365] –(x+4) is greater than or equal to nCbW,

[1366] –edgeTbFlags[x-4][y] is equal to 1,

[1367] –edgeTbFlags[x+4][y] is equal to 1,

[1368] The following applies:

[1369] maxFilterLengthPs[x][y]=1 (8-1031)

[1370] maxFilterLengthQs[x][y]=1 (8-1032)]]

[1371] – Otherwise, if one or more of the following conditions are true:

[1372] –xEdge is equal to 1,

[1373] –xEdge is equal to (nCbW / 8)-1,

[1374] –edgeTbFlags[x-sbW][y] is equal to 1,

[1375] –edgeTbFlags[x+sbW][y] is equal to 1,

[1376] The following applies:

[1377] maxFilterLengthPs[x][y]=2 (8-1033)

[1378] maxFilterLengthQs[x][y]=2 (8-1034)

[1379] – Otherwise, the following applies:

[1380] maxFilterLengthPs[x][y]=3 (8-1035)

[1381] maxFilterLengthQs[x][y]=3 (8-1036)

[1382] – Otherwise, if edgeType is equal to EDGE_HOR, the following applies:

[1383] –The variable sbH is set equal to Max(8,nCbH / numSbY).

[1384] – The array edgeTbFlags is set equal to edgeFlags.

[1385] – For yEdge = 0..min((nCbH / 8)-1, numSbY-1), x = 0..nCbW-1:

[1386] – The vertical position y within the current codec block is set equal to yEdge*sbH.

[1387] – The value of edgeFlags[x][y] is derived as follows:

[1388] …

[1389] – When edgeFlags[x][y] is equal to 1, the values ​​of maxFilterLengthPs[x][y] and maxFilterLengthQs[x][y] are modified as follows:

[1390] – If y is equal to 0 and edgeFlags[x][y] is equal to 1, then the following applies:

[1391] …

[1392] – Otherwise, if edgeTbFlags[x][y] is equal to 1, the following applies:

[1393] …

[1394] –[[Otherwise, if one or more of the following conditions are true:

[1395] –(y+4) is greater than or equal to nCbH,

[1396] –edgeTbFlags[x][y-4] is equal to 1,

[1397] –edgeTbFlags[x][y+4] is equal to 1,

[1398] The following applies:

[1399] maxFilterLengthPs[x][y]=1 (8-1045)

[1400] maxFilterLengthQs[x][y]=1 (8-1046)]]

[1401] – Otherwise, if one or more of the following conditions are true:

[1402] …

[1403] – Otherwise, the following applies:

[1404] …

[1405] 5.7 Example 8 Regarding not allowing SBT for SbTMVP / affine prediction blocks

[1406] 7.3.8.5 Codec unit syntax

[1407]

[1408] 5.8 Example 9: Disallowing Horizontal Edge Deblocking at ALF Virtual Boundaries

[1409] 8.8.3.6.1 Decision-making process for luminance block edges

[1410] …

[1411] The following sequence of steps applies:

[1412] 1. The variables dp0, dp3, dq0 and dq3 are derived as follows:

[1413] …

[1414] 2. When maxFilterLengthP and maxFilterLengthQ are both equal to or greater than 3, the variables sp0, sq0, spq0, sp3, sq3, and spq3 are derived as follows:

[1415] …

[1416] 3. The variables sidePisLargeBlk and sideQisLargeBlk are set equal to 0.

[1417] 4. When maxFilterLengthP is greater than 3, sidePisLargeBlk is set equal to 1:

[1418] 5. When maxFilterLengthQ is greater than 3, sideQisLargeBlk is set equal to 1:

[1419] 6. When edgeType is equal to EDGE_HOR and (yCb+yBl)%CtbSizeY is equal to 0, sidePisLargeBlk is set equal to 0.

[1420] 7. When edgeType is equal to EDGE_HOR and (yCb+yBl)%CtbSizeY is equal to (CtbSizeY-N), sidePisLargeBlk is set equal to 0. (Note: N is a fixed integer, for example, N=4)

[1421] 8. Variables dSam0 and dSam3 are initialized to 0.

[1422] 9. When sidePisLargeBlk or sideQisLargeBlk is greater than 0, the following applies:

[1423] …

[1424] 10. The variables dE, dEp and dEq are derived as follows:

[1425] …

[1426] 5.9 Example 10 Chroma Flag Signaling

[1427] 7.3.2.4 Picture parameter set RBSP syntax

[1428]

[1429] 5.10 Example 11 About BS Setting

[1430] 8.8.3.5 Boundary Filter Strength Derivation Process

[1431] The input to this process is:

[1432] -Picture sample array recPicture,

[1433] - position (xCb, yCb), which specifies the top left sample point of the current codec block relative to the top left sample point of the current picture,

[1434] - variable nCbW, which specifies the width of the current codec block,

[1435] - variable nCbH, which specifies the height of the current codec block,

[1436] - The variable edgeType specifies whether to filter vertically (EDGE_VER) or horizontally

[1437] (EDGE_HOR) Edge.

[1438] - the variable cIdx, which specifies the color component of the current codec block,

[1439] - 2D (nCbW)x(nCbH) array of edgeFlags.

[1440] The output of this process is a two-dimensional (nCbW) x (nCbH) array bS that specifies the boundary filter strengths.

[1441] Variable xD i ,yD j , xN and yN are derived as follows:

[1442] – The variable gridSize is set as follows:

[1443] gridSize=cIdx==0?4:8 (8-1049)

[1444] – If edgeType is equal to EDGE_VER, then

[1445] xD i =(i*gridSize) (8-1050)

[1446] yD j =cIdx==0? (j<<2): (j<<1) (8-1051)

[1447] xN is set equal to Max(0, (nCbW / gridSize)-1) (8-1052)

[1448] yN=cIdx==0? (nCbH / 4)-1: (nCbH / 2)-1 (8-1053)

[1449] – Otherwise (edgeType equals EDGE_HOR),

[1450] xDi=cIdx==0? (i<<2): (i<<1) (8-1054)

[1451] yDj=(j*gridSize) (8-1055)

[1452] xN=cIdx==0? (nCbW / 4)-1: (nCbW / 2)-1 (8-1056)

[1453] yN=Max(0,(nCbH / gridSize)-1) (8-1057)

[1454] For xD i (where i = 0..xN) and yD j (where j = 0..yN), the following applies:

[1455] – If edgeFlags[xD i ][yD j ] is equal to 0, the variable bS[xD i ][yD j ] is set to equal 0.

[1456] – Otherwise, the following applies:

[1457] – The sample point values ​​p0 and q0 are derived as follows:

[1458] – If edgeType equals EDGE_VER, p0 is set equal to recPicture[xCb+xDi -1][yCb+yD j ] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[1459] – Otherwise (edgeType equals EDGE_HOR), p0 is set equal to recPicture[xCb+xD i ][yCb+yD j -1] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[1460] –Variable bS[xD i ][yD j ] is exported as follows:

[1461] – If cIdx is equal to 0 and both samples p0 and q0 are in the codec block with intra_bdpcm_flag equal to 1, then bS[xD i ][yD j ] is set to equal 0.

[1462] – Otherwise, if the sample p0 or q0 is in the codec block of a codec unit coded in intra prediction mode, then bS[xD i ][yD j ] is set to equal 2.

[1463] – Otherwise, if the block edge is also (transform block edge or subblock boundary) and sample p0 or q0 is in the codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal 2.

[1464] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a transform block containing one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set to be equal to 1.

[1465] – Otherwise, if the block edge is also a transform block edge, cIdx is greater than 0, and sample p0 or q0 is in a transform unit with tu_joint_cbcr_residual_flag equal to 1, then bS[xD i ][yD j ] is set to be equal to 1.

[1466] – Otherwise, if the prediction mode of the coded subblock containing sample p0 is different from the prediction mode of the coded subblock containing sample q0 (i.e., one of the coded subblocks is coded and decoded with IBC prediction mode and the other with inter prediction mode), then bS[xD i ][yD j ] is set to be equal to 1.

[1467] – 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 to 1:

[1468] – The coded subblock containing sample p0 and the coded subblock containing sample q0 are both coded in IBC prediction mode and the absolute difference between the horizontal and vertical components of the block vectors used in the prediction of the two coded subblocks is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1469] – For the prediction of the codec sub-block containing sample p0, a different reference picture or a different number of motion vectors is used than for the prediction of the codec sub-block containing sample q0.

[1470] NOTE 1 - Whether the reference pictures used for two codec sub-blocks are the same or different is determined only based on the pictures they reference, regardless of whether an index pointing to reference picture list 0 or an index pointing to reference picture list 1 is used, or whether the index positions in the reference picture lists are different.

[1471] NOTE 2 - The number of motion vectors for the prediction of the coded sub-block for the top left sample coverage (xSb, ySb) is equal to PredFlagL0[xSb][ySb]+PredFlagL1[xSb][ySb].

[1472] – One vector is used to predict the codec subblock containing sample p0, and one vector is used to predict the codec subblock containing sample q0, and the absolute difference between the horizontal or vertical components of the used vectors is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1473] – Two motion vectors and two different reference pictures are used to predict the codec sub-block containing sample p0, two motion vectors of the same two reference pictures are used to predict the codec sub-block containing sample q0, and the absolute difference between the horizontal or vertical components of the two motion vectors used for the prediction of the two codec sub-blocks of the same reference picture is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1474] – Two motion vectors from the same reference picture are used to predict the codec subblock containing sample p0, and two motion vectors from the same reference picture are used to predict the codec subblock containing sample q0 and both of the following conditions are true:

[1475] – The absolute difference between the horizontal or vertical components of the predicted list 0 motion vectors for the two codec 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 the predicted list 1 motion vectors for the two codec sub-blocks is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1476] – The absolute difference between the horizontal or vertical component of the predicted list 0 motion vector for the codec sub-block containing sample p0 and the predicted list 1 motion vector for the codec 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 predicted list 1 motion vector for the codec sub-block containing sample p0 and the predicted list 0 motion vector for the codec sub-block containing sample q0 is greater than or equal to 8 (in units of 1 / 16 luma samples).

[1477] – Otherwise, the variable bS[xD i ][yD j ] is set to equal 0.

[1478] Or, the above sentence

[1479] – Otherwise, if the block edge is also (transform block edge or subblock boundary) and sample p0 or q0 is in the codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal 2.

[1480] Can be replaced by:

[1481] – Otherwise, if the block edge is also (transform block edge but not subblock boundary) and sample p0 or q0 is in a codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal 2.

[1482] 5.11 Example 12 About BS Setting

[1483] 8.8.3.5 Boundary Filter Strength Derivation Process

[1484] …

[1485] For xD i (where i = 0..xN) and yD j (where j = 0..yN), the following applies:

[1486] – If edgeFlags[xD i ][yD j ] is equal to 0, then the variable bS[xD i ][yD j ] is set to equal 0.

[1487] – Otherwise, the following applies:

[1488] – The sample point values ​​p0 and q0 are derived as follows:

[1489] – If edgeType equals EDGE_VER, p0 is set equal to recPicture[xCb+xD i -1][yCb+yD j ] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[1490] – Otherwise (edgeType equals EDGE_HOR), p0 is set equal to recPicture[xCb+xD i ][yCb+yD j -1] and q0 is set equal to recPicture[xCb+xD i ][yCb+yD j ].

[1491] –Variable bS[xD i ][yD j ] is exported as follows:

[1492] – If cIdx is equal to 0 and both samples p0 and q0 are in the codec block with intra_bdpcm_flag equal to 1, then bS[xD i ][yD j ] is set to equal 0.

[1493] – Otherwise, if the sample p0 or q0 is in the codec block of a codec unit coded in intra prediction mode, then bS[xD i ][yD j ] is set to equal 2.

[1494] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a codec block with ciip_flag equal to 1, then bS[xD i ][yD j ] is set to equal 2.

[1495] – Otherwise, if the block edge is also a transform block edge and sample p0 or q0 is in a transform block containing one or more non-zero transform coefficient levels, then bS[xD i ][yD j ] is set to be equal to 1.

[1496] – Otherwise, if the block edge is also a transform block edge, cIdx is greater than 0, and sample p0 or q0 is in a transform unit with tu_joint_cbcr_residual_flag equal to 1, then bS[xD i ][yD j ] is set to be equal to 1.

[1497] –[[Otherwise, if the prediction mode of the coded subblock containing sample p0 is different from the prediction mode of the coded subblock containing sample q0 (i.e., one of the coded subblocks is coded and decoded with IBC prediction mode and the other with inter prediction mode), then bS[xD i ][yD j ] is set equal to 1. ]]

[1498] – 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 to 1:

[1499] -…

[1500] – Otherwise, the variable bS[xD i ][yD j ] is set to equal 0.

[1501] Fig. 6A 6 is a block diagram of a video processing device 600. Device 600 may be used to implement one or more methods described herein. Device 600 may be embodied in a smartphone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. Device 600 may include one or more processors 602, one or more memories 604, and video processing hardware 606. Processor 602 may be configured to implement one or more methods described herein. Memory (memories) 604 may be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 606 may be used to implement some of the techniques described in this document in hardware circuits.

[1502] Figure 6B is another example of a block diagram of a video processing system in which the disclosed technology may be implemented. Figure 6B610 is a block diagram illustrating an exemplary video processing system 610 in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of system 610. System 610 may include an input 612 for receiving video content. The video content may be received in a raw or uncompressed format (e.g., 8-bit or 10-bit multi-component pixel values), or may be received in a compressed or codec format. Input 612 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces (e.g., Ethernet, passive optical networks (PONs)) and wireless interfaces (e.g., Wi-Fi or cellular interfaces).

[1503] System 610 may include a codec component 614, which may implement various decoding or encoding methods described herein. Codec component 614 may reduce the average bit rate of the input from input 612 to codec component 614. Therefore, codec technology is sometimes referred to as video compression or video transcoding technology. The output of codec component 614 may be stored or sent by a communication connected by component 616. Component 618 may use a bitstream (or codec) representation of the storage or communication of the video received at input 612 to generate pixel values ​​or displayable video sent to display interface 620. The process of generating user-visible video from a bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "codec" operations or tools, it should be understood that codec tools or operations are used at the encoder, and corresponding decoding tools or operations opposite to the encoding result will be performed by the decoder.

[1504] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB) or High Definition Multimedia Interface (HDMI) or Display Port, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology described herein may be embodied in various electronic devices, such as mobile phones, laptops, smart phones, or other devices capable of performing digital data processing and / or video display.

[1505] Some embodiments of the disclosed technology include making a decision or determining to enable a video processing tool or mode. In one example, when a video processing tool or mode is enabled, the encoder will use or implement the tool or mode in the processing of a video block, but will not necessarily modify the resulting bitstream based on the use of the tool or mode. That is, when it is enabled based on the decision or determination, the conversion from the video block to the bitstream representation of the video will use the video processing tool or mode. In another example, when the video processing tool or mode is enabled, the decoder will process the bitstream knowing that the bitstream has been modified based on the video processing tool or mode. That is, the conversion from the bitstream representation of the video to the video block will be performed using the video processing tool or mode enabled based on the decision or determination.

[1506] Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In an example, when a video processing tool or mode is disabled, the encoder will not use the tool or mode when converting video blocks to a bitstream representation of the video. In another example, when a video processing tool or mode is disabled, the decoder will process the bitstream knowing that the bitstream has not been modified using the video processing tool or mode that was disabled based on the decision or determination.

[1507] In this document, the term "video processing" may refer to video encoding, video decoding, video compression, or video decompression. For example, a video compression algorithm may be applied during conversion from a pixel representation of a video to a corresponding bitstream representation, or vice versa. For example, a bitstream representation of a current video block may correspond to bits propagated at a common location or at different locations within the bitstream, as defined by a syntax. For example, a macroblock may be encoded based on a transformed and encoded residual, and bits in headers and other fields in the bitstream may also be used.

[1508] In some embodiments, the following first set of clauses may be implemented as preferred clauses.

[1509] The following provisions may be implemented in conjunction with the additional technologies described in the items listed in the previous section (such as item 1).

[1510] 1. A video processing method (eg, Figure 7 The method 700 shown in FIG. 7 comprises: for conversion between a video and a bitstream representation of the video, making a determination (702) on whether or how to apply a deblocking filter to a natural boundary of a current subblock based on a size rule and / or a position rule and / or a codec mode rule depending on the size of the current subblock; and performing (704) the conversion according to the determination; wherein the size rule stipulates that the deblocking filter is applied to a 4×4 subblock.

[1511] 2. A method according to clause 1, wherein making a determination as to how to apply a deblocking filter comprises determining a filter length.

[1512] 3. A method as described in clause 1, wherein the size rule further specifies that a deblocking filter is not applied to 8x8 blocks, or the size rule further specifies that no determination as to how to apply a deblocking filter is performed for 8x8 sub-blocks.

[1513] 4. A method according to any of clauses 1-3, wherein the codec mode rule provides that the deblocking filter is enabled at a natural boundary aligned with a motion compensated or motion derived edge of the current sub-block.

[1514] The following provisions may be implemented in conjunction with the additional technologies described in the items listed in the previous section (such as item 4).

[1515] 5. A method according to any of clauses 1-4, wherein the position rule provides that the same filter length is used for the current sub-block as for other sub-blocks in the video region.

[1516] 6. A method according to clause 5, wherein the video region is a current block including the current sub-block.

[1517] The following provisions may be implemented in conjunction with the additional technologies described in the items listed in the previous section (such as item 4).

[1518] 7. A method of video processing, comprising: for conversion between a video and a bitstream representation of the video, making a determination to use a deblocking filter on a video region of the video; performing the conversion based on the determination, wherein the deblocking filter is selectively applied to samples of the video region based on a rule that depends on the location of a virtual boundary associated with the video region.

[1519] 8. A method as described in clause 7, wherein the video region corresponds to a codec tree unit, and wherein the virtual boundary is N samples above a horizontal codec tree unit boundary, and wherein the rule provides that the deblocking filter is disabled at the virtual boundary.

[1520] 9. The method of clause 7, wherein the video region is a transform unit, and wherein the rule provides that the deblocking filter is disabled at horizontal edges of the video region that coincide with the virtual boundary.

[1521] 10. The method of clause 7, wherein the video region is a prediction unit, and wherein the rule provides that the deblocking filter is disabled at horizontal edges of the video region that coincide with the virtual boundary.

[1522] 11. A method according to any of clauses 7 or 9-10, wherein the rule provides for disabling the deblocking filter at vertical edges of the video area coinciding with the virtual border.

[1523] The following provisions may be implemented in conjunction with the additional techniques described in the items listed in the previous section (such as item 14).

[1524] 12. A method of video processing, comprising: for conversion between a video and a bitstream representation of the video, making a determination to use a deblocking filter on a video region of the video; and performing conversion based on the determination such that calculation of the deblocking filter is performed based on a rule that depends on the location of a virtual boundary associated with the video region.

[1525] 13. A method according to clause 12, wherein the rule provides that sample p is modified to sample p' by using a deblocking filter, where p'=p+d' and d'=Clip3(t1, t2, d), where d is derived in the transformation and where [t1, t2] is the clipping range, where t1 and t2 are integers.

[1526] 14. The method of clause 13, wherein t1 or t2 depends on whether a deblocking filter is applied to the virtual boundary.

[1527] 15. The method according to any of clauses 13-14, wherein t1 = -2N and t2 = 2N-1, wherein N is an integer.

[1528] The following provisions may be implemented in conjunction with the additional techniques described in the items listed in the previous section (such as item 15).

[1529] 16. A video processing method, comprising: performing conversion between a video comprising a plurality of video blocks (at least some of which comprise a plurality of sub-blocks) and a codec representation of the video based on an exclusion rule, wherein the exclusion rule stipulates that a sub-block transform mode and a sub-block codec mode are used mutually exclusively during the conversion.

[1530] 17. The method of clause 16, wherein the sub-block coding mode corresponds to an affine coding mode.

[1531] 18. A method according to clause 16 or 17, wherein the sub-block coding mode comprises a SbTMVP (Sub-Block Temporal Motion Vector Predictor) mode.

[1532] The following provisions may be implemented in conjunction with the additional techniques described in the items listed in the previous section (e.g., item 16).

[1533] 19. A method according to any of clauses 16-18, wherein the codec representation does not include syntax elements of a codec mode that is excluded due to an exclusion rule.

[1534] The following items may be implemented in conjunction with the additional techniques described in the items listed in the previous section (e.g., item 20).

[1535] 20. A video processing method, comprising: based on a chroma format or a coding method associated with a chroma component of a video, determining whether to signal a syntax element in the codec representation for conversion between a video and a codec representation of the video; and performing conversion based on the determination.

[1536] 21. The method of clause 20, wherein the chroma format comprises a chroma format sampling structure.

[1537] 22. A method according to any of clauses 20-21, wherein the syntax element is a Cb / Cr flag, which is conditionally signalled in a picture parameter set according to a chroma format sampling structure.

[1538] 23. A method according to clause 20, wherein the syntax element referred to as X is signalled for chroma format signalling only for monochrome formats.

[1539] 24. A method according to clause 20, wherein a syntax element called X is signalled only when the chroma format is 4:4:4, wherein an individual colour flag is set equal to 1.

[1540] 25. A method according to clause 23 or 24, wherein X is pps_cb_qp_offset or pps_cr_qp_offset or pps_joint_cbcr_qp_offset or cu_chroma_qp_offset_enabled_flag or pps_slice_chroma_qp_offsets_present_flag.

[1541] The following provisions may be implemented in conjunction with the additional techniques described in the items listed in the previous section (e.g., item 21).

[1542] 26. A video processing method, comprising: parsing a first syntax element in a codec representation of a video, the video comprising a sequence of multiple pictures, wherein the first syntax element is included in the codec representation at a picture parameter set level, and wherein the parsing is performed in the absence of an implicit rule that excludes the use of the first syntax element depending on the presence of a second syntax element at a sequence parameter set level; and generating a video based on the parsing.

[1543] 27. A video processing method, comprising: including a first syntax element at a picture parameter set level in a codec representation of a video, the video comprising a sequence of multiple pictures, wherein the inclusion is performed in the absence of an implicit rule that excludes the inclusion of the first syntax element depending on the presence of a second syntax element at a sequence parameter set level; and generating a codec representation based on the inclusion.

[1544] 28. A method according to any of clauses 26-27, wherein the first syntax element is log2_transform_skip_max_size_minus2, and wherein the second syntax element is sps_transform_skip_enabled_flag.

[1545] 29. A method according to any of clauses 1-28, wherein converting comprises encoding the video into a codec representation.

[1546] 30. A method according to any of clauses 1-28, wherein converting comprises decoding the codec representation to generate pixel values ​​of the video.

[1547] 31. A video decoding device comprising a processor configured to implement the method of one or more of clauses 1-30.

[1548] 32. A video encoding apparatus comprising a processor configured to implement the method of one or more of clauses 1-30.

[1549] 33. A computer program product storing computer code which, when executed by a processor, causes the processor to implement the method of any one of clauses 1-30.

[1550] 34. A method, apparatus or system as herein described.

[1551] The following clauses describe some embodiments and techniques. The second set of clauses describes certain features and aspects of the techniques disclosed in the previous section (eg, items 1 to 7).

[1552] 1. A video processing method (eg, Fig. 8A The method 810 shown includes: for a sub-block of a current video block of a video, determining (812) a sub-block boundary to which a deblocking filter is to be applied according to a rule; and performing (814) a conversion between the video and a codec representation of the video using the deblocking filter, wherein the rule provides that the deblocking filter length is determined without checking a relationship between i) a sum of a position of the sub-block of the current video block and a predefined value and ii) a width or a height of the current video block.

[1553] 2. The method of clause 1, wherein the rule provides that the deblocking filter length in the vertical direction is determined without checking whether the value of x+dx is greater than or equal to the width of the current video block.

[1554] 3. The method of clause 1, wherein x is the horizontal position of the sub-block in the current video block.

[1555] 4. The method according to clause 3, wherein dx is set to 4.

[1556] 5. The method of clause 1, wherein the rule provides for determining the deblocking filter length in the horizontal direction without checking whether the value of y+dy is greater than or equal to the height of the current video block.

[1557] 6. The method of clause 5, wherein y is the vertical position of the sub-block in the current video block.

[1558] 7. The method according to clause 6, wherein dy is set to 4.

[1559] 8. A video processing method (eg, Figure 8B The method 820 shown in the figure comprises: for a conversion between a current video block and a codec representation of a video, making a determination (822) based on a rule as to whether to apply a deblocking filter to a boundary between sub-blocks of the current video block and / or a deblocking parameter to be used when applying the deblocking filter; and performing (824) the conversion based on the determination, wherein the rule is based on whether the boundary falls on an NxM sample grid of a sub-block and / or whether the boundary is a natural boundary of the current video block, where N and M are integers.

[1560] 9. A method according to clause 8, wherein the deblocking parameters comprise a deblocking filter length and / or a deblocking filter strength.

[1561] 10. A method according to clause 8 or 9, wherein the deblocking filter corresponds to a luma deblocking filter, the luma deblocking filter deblocking video information including luma information of the video, and wherein the determination is made based on a rule to apply the luma deblocking filter, the rule providing that the luma deblocking filter is applied to a 4x4 sample grid.

[1562] 11. The method of clause 10, wherein the rule further provides that the luma deblocking filter is not applied to the boundary that is the natural boundary if the boundary falls on an 8x8 sample grid.

[1563] 12. The method of clause 8, wherein making the determination comprises determining a filter length.

[1564] 13. A method according to clause 12, wherein, when the deblocking filter corresponds to the luma deblocking filter that deblocks video information including luma information of the video, the determination of the filter length is applied to a 4x4 sample grid and not to an 8x8 sample grid.

[1565] 14. The method of clause 8, wherein the NxM sample grid is determined based on a coding mode of the sub-block.

[1566] 15. A method according to clause 14, wherein the NxM sample grid is aligned with motion compensated or motion derivative edges of the sub-block.

[1567] 16. The method of clause 8, wherein the deblocking filter corresponds to a chroma deblocking filter that deblocks video information including chroma information of the video.

[1568] 17. A method according to clause 16, wherein the rule further provides that the chroma deblocking filter is applied to the NxM sample grid, each of N and M being 4 or 8.

[1569] 18. The method of clause 16, wherein making the determination comprises determining whether a current chroma deblocking edge is a boundary of the sub-block, and wherein the determination is performed for an NxN sample grid, N being 4 or 8.

[1570] 19. A method according to clause 12, wherein, in the case where the deblocking filter corresponds to a chroma deblocking filter that deblocks video information including chroma information of the video, the determination of the filter length is applied to the NxM sample point grid, each of N and M being 4 or 8.

[1571] 20. The method of clause 12, wherein the filter length determined for the chroma deblocking filter is less than or equal to L.

[1572] 21. A method according to clause 16, wherein the strength of the chroma deblocking filter depends on at least one of: i) the number of motion vectors, ii) a reference picture, or iii) the absolute block vector (BV) or motion vector (MV) difference between two adjacent pixels located on both sides of the boundary.

[1573] 22. The method of clause 8, wherein making the determination is performed further dependent on whether the sub-block is encoded or decoded using a method based on the sub-block.

[1574] 23. A method according to clause 22, wherein the current sub-block is encoded and decoded using an affine encoding and decoding mode, an SbTMVP (sub-block temporal motion vector predictor) mode, a DMVR (decoder-side motion vector refinement) mode, or a chroma IBC (intra-frame block copy) mode.

[1575] 24. The method of clause 8, wherein making the determination depends on a color subsampling format of the video.

[1576] 25. A method according to any of clauses 8-24, wherein N and M depend on the color format of the video.

[1577] 26. A video processing method (e.g., Figure 8C), comprising: making a determination (832) to apply a deblocking filter to an NxN grid of samples of a current video block encoded using a geometric prediction mode, wherein the current video block is divided into a plurality of sub-partitions for prediction, wherein N is equal to 4 or 8; and performing (834) conversion between a video including the current video block and a coded representation of the video based on the determination.

[1578] 27. A method according to clause 26, wherein the internal edge derivation of the current video block is performed based on rules, and the rules are applied to the sub-block boundary derivation processing of video blocks encoded and decoded using SbTMVP (Sub-Block Temporal Motion Vector Predictor) mode and / or affine mode.

[1579] 28. A method according to clause 26, wherein the boundaries, filter length and / or filter strength of the deblocking filter are determined based on a 4x4 sample grid or an 8x8 sample grid.

[1580] 29. A video processing method (e.g., Fig.8D ), comprising: for a sub-block of a current video block of a video, determining (842) a sub-block boundary to which a deblocking filter is to be applied according to a rule; and performing (844) a conversion between the video and a coded representation of the video using the deblocking filter.

[1581] 30. A method according to clause 29, wherein the rule provides that the deblocking filter length for the leftmost vertical boundary or the topmost horizontal boundary is the same as the deblocking filter length for other sub-blocks.

[1582] 31. A method according to clause 30, wherein the rule further provides that the deblocking filter length is determined based on whether the leftmost vertical boundary or the topmost horizontal boundary coincides with a transform block edge.

[1583] 32. A method according to clause 30, wherein, for the leftmost vertical boundary or the topmost horizontal boundary, the deblocking filter length (maxFilterLengthPs) is set to Min(5, maxFilterLengthPs), regardless of 1) whether the adjacent block to the left of the leftmost vertical boundary or above the topmost horizontal boundary is SbTMVP coded or affine coded, and / or 2) the number of sub-blocks in the current video block.

[1584] 33. The method of clause 29, wherein the rule provides that the deblocking filter length is determined based on a sub-block edge position of a corresponding sub-block.

[1585] 34. A method according to clause 33, wherein the sub-block edge position has a corresponding sub-block edge index (xEdge) in the range [0, M], M being an integer not less than 0.

[1586] 35. A method according to clause 34, wherein for xEdge in the range [a, b], the deblocking filter length is set to a fixed integer value (L), and wherein a and b are integers not less than 0.

[1587] 36. The method according to clause 35, wherein a=0 or 1, or b=M or M-1, or a=b=0, 1, M or M-1.

[1588] 37. A method according to clause 26, wherein the rule provides that the deblocking filter length is determined based on the relationship between the size of the current video block and an x+delta value, where x represents a horizontal or vertical sub-block position within the current video block and delta is an integer.

[1589] 38. The method of clause 37, wherein the deblocking filter length is determined by checking whether the value of x+delta is greater than or equal to a width or height of the current video block.

[1590] 39. A method according to clause 29, wherein the rule provides that the deblocking filter length of the vertical boundary at x column or the horizontal boundary at y row in the current video block is determined based on whether the vertical boundary at x+dx column or the horizontal boundary at y+dy row is a transform block boundary, and wherein dx and dx are integers.

[1591] 40. The method of clause 39, wherein the current video block is encoded using SbTMVP (Sub-Block Temporal Motion Vector Predictor) mode and / or affine mode.

[1592] 41. A method according to clause 39, wherein the deblocking filter length is determined without checking whether a first condition of x+dx being equal to or greater than a width of the current video block and / or a second condition of y+dy being equal to or greater than a height of the current video block is satisfied.

[1593] 42. A method according to clause 39, wherein the deblocking filter length is determined also based on whether a first condition of x+dx being equal to or greater than a width of the current video block and / or a second condition of y+dy being equal to or greater than a height of the current video block is satisfied.

[1594] 43. A method according to any of clauses 1-42, wherein the performance of the conversion comprises generating the codec representation from the current video block.

[1595] 44. A method according to any of clauses 1-42, wherein the performance of the conversion comprises generating the current video block from the codec representation.

[1596] 45. A video processing device comprising a processor configured to implement the method of any one or more of clauses 1-44.

[1597] 46. ​​A computer readable medium storing program code which, when executed, causes a processor to implement the method of any one or more of clauses 1-44.

[1598] The third group of items describes certain features and aspects of the technology disclosed in the previous section (e.g., items 8 to 20).

[1599] 1. A video processing method (eg, Fig. 9A The method 910 shown includes: for a conversion between a current video block of a video and a codec representation of the video, determining (912) a boundary strength for a sub-block boundary of the current video block applied using a deblocking filter based on a rule; and performing (914) the conversion based on the determination, wherein the rule stipulates that the boundary strength is set equal to 2 regardless of whether the sub-block boundary is a transform block boundary.

[1600] 2. A method according to clause 1, wherein the rule provides that for the sub-block boundaries that are not the transform block boundaries, the boundary strength is set equal to 2.

[1601] 3. A method according to clause 1 or 2, wherein the rule provides that at least one of two adjacent samples along the boundary is encoded and decoded using a combined inter-intra prediction (CIIP) mode.

[1602] 4. A method according to clause 3, wherein the CIIP mode is used to derive prediction samples based on a weighted sum of inter prediction samples and intra prediction samples.

[1603] 5. A video processing method (eg, Fig. 9B The method 920 shown comprises: performing (922) a conversion between a current video block of a video and a codec representation of the video according to a rule, wherein the conversion uses a sub-block transform (SBT) tool, and the conversion comprises: during encoding, splitting the current video block into transform blocks (TBs) and applying a TB-level transform to the TBs, or during decoding, applying a TB-level inverse transform to codec samples in the codec representation of the video, wherein the rule stipulates that an adaptive filter is enabled across at least three TB boundaries in a horizontal direction and / or a vertical direction.

[1604] 6. The method of clause 5, wherein the at least three TB boundaries include two TB boundaries between codec block boundaries of the transform block and the current video block.

[1605] 7. The method of clause 6, wherein a size of a transform block is smaller than a size of the current video block.

[1606] 8. The method of clause 6, wherein whether to filter the codec block boundary depends on whether the codec block boundary is a sub-block boundary between sub-blocks of the current video block.

[1607] 9. A video processing method (eg, Fig. 9C The method 930 shown in the figure includes: for a conversion between a current video block of a video and a coded representation of the video, making a determination (932) that two adjacent samples located on both sides of an edge of the current video block belong to two transform blocks that do not have non-zero transform coefficient levels; based on the first determination, making a second determination (934) to set the deblocking filter strength of the edge of the current block to zero; and performing (936) the conversion using the first determination and the second determination.

[1608] 10. The method of clause 9, wherein one of the two neighboring samples is encoded in a geometric prediction mode in which the current video block is divided into sub-partitions.

[1609] 11. The method of clause 9, wherein a motion vector difference between the two adjacent samples is greater than a threshold T, where T is an integer.

[1610] 12. A method according to clause 9, wherein the second determination regarding the filter strength at transform block boundaries is made independently of rules related to motion vectors.

[1611] 13. A video processing method, comprising: performing a conversion between a current video block of a video and a codec representation of the video using a decoder-side motion vector refinement (DMVR) tool; and applying a deblocking filter to a reconstructed video block generated during the conversion; wherein the DMVR tool comprises: generating the reconstructed video block by motion compensation using a refined motion vector generated by refining a codec's motion vector in the codec representation; wherein parameters of the deblocking filter are based on the refined motion vector.

[1612] 14. A method according to clause 13, wherein the current video block corresponds to a codec unit (CU) processed by the DMVR, and the deblocking is performed at sub-block boundaries within the codec unit using the refined motion vectors of the sub-blocks of the current video block.

[1613] 15. The method of clause 13, wherein the current video block corresponds to a codec unit (CU) processed by the DMVR, and the deblocking is performed at a CU boundary using a signaled motion vector of the CU.

[1614] 16. A method according to clause 13, wherein the current video block corresponds to a codec unit (CU) processed by the DMVR, and the deblocking is performed at a CU boundary using the signaled motion vector of the CU and the refined motion vector of the sub-block of the current video block.

[1615] 17. A video processing method (eg, Fig.9D The method 940 shown in FIG. 9 comprises: for a conversion between a current video block of a video and a codec representation of the video, determining (942) a deblocking filter strength for a deblocking filter process based on a rule; and performing (944) the conversion based on the determination, and wherein the rule stipulates that the deblocking filter strength does not depend on a prediction mode of a neighboring block of the current video block.

[1616] 18. A method according to clause 17, wherein the specific coding mode is an intra block copy (IBC) mode or an inter coding mode, the IBC mode uses at least one block vector pointing to a video frame containing the current video block to generate a prediction block, and the inter coding mode includes using time domain correlation to represent or reconstruct the video.

[1617] 19. A method according to clause 17 or 18, wherein the rule further provides that the deblocking filter strength depends on whether one of the neighboring blocks is encoded using intra-frame mode, the intra-frame mode comprising representing or reconstructing the video based on previously processed video blocks.

[1618] 20. A video processing method (eg, Fig.9E The method 950 shown comprises: for a conversion between a current video block of a video and a codec representation of the video, determining (952) whether to apply a deblocking filter to the boundary of the current video block and / or deblocking parameters to be used if the deblocking filter is applied, based on a rule that depends on or is independent of the type of boundary; and performing (954) the conversion based on the determination.

[1619] 21. A method according to clause 20, wherein the type of the boundary is related to whether the boundary is a transform block boundary or a sub-block boundary.

[1620] 22. A method according to clause 20 or 21, wherein the rule provides that the deblocking filter strength is determined to be a different value for the transform block boundary and the sub-block boundary.

[1621] 23. A method according to clause 22, wherein transform block boundary markers are stored in a first array buffer and sub-block boundary markers are stored in a second array buffer different from the first array buffer.

[1622] 24. A method according to clause 22, wherein the deblocking filter strength for the transform block boundaries is determined based on transform coefficients.

[1623] 25. A method according to clause 22, wherein the deblocking filter strength of the sub-block boundary is determined based on a motion vector, and / or a reference picture between two adjacent pixels located on both sides of the boundary.

[1624] 26. A method according to clause 22, wherein the rule provides that the boundary strength is set equal to 1 or 2 in the following cases: 1) the boundary is a transform block boundary but not the sub-block boundary; 2) at least one of the two adjacent samples along the boundary is encoded using the combined inter-frame intra-frame prediction (CIIP) mode, where X is 1 or 2.

[1625] 27. A method according to clause 20, wherein the deblocking parameters include at least one of filter strength, filter length or boundary strength, and wherein the rules provide that the same parameters are used for different types of the boundaries.

[1626] 28. A video processing method (e.g., Fig.9F The method 960 shown in FIG. 1 comprises: for a conversion between a video region of a video and a coded representation of the video, determining (962) not to apply a deblocking filter in one direction on a virtual boundary that is N samples away from a horizontal boundary, where N is an integer greater than 0; and performing (964) the conversion based on the determination.

[1627] 29. The method of clause 28, wherein for the video region corresponding to luma components, N is 4, and for the video region corresponding to chroma components, N is 2.

[1628] 30. A method according to clause 28 or 29, wherein the determining determines not to apply the deblocking filter in the horizontal direction to a boundary of a transform unit, a coding unit, a prediction unit or a sub-block of the current video block, and a boundary coinciding with the virtual boundary.

[1629] 31. A method according to clause 28 or 29, wherein the determination determines to apply the deblocking filter in a vertical direction to a boundary of a transform unit, a coding unit, a prediction unit or a sub-block of the current video block, and a boundary coinciding with the virtual boundary.

[1630] 32. A video processing method (e.g., Figure 9G The method 970 shown in FIG. 1 comprises: for a conversion between a video region of a video and a codec representation of the video, determining (972) whether and how to use a deblocking filter to clip sample values ​​during deblocking processing based on a rule, the rule depending on whether a boundary to be filtered by the deblocking filter coincides with a virtual boundary that is N samples away from a horizontal boundary of the video region, where N is an integer greater than 0; and performing (974) the conversion based on the determination.

[1631] 33. A method according to clause 32, wherein the rule provides that the sample point with value (p) is modified to a different value (p') by using the deblocking filter, where p'=p+d', and d'=Clip3(t1, t2, d), where d is derived during the conversion, and where [t1, t2] is the clipping range, where t1 and t2 are integers.

[1632] 34. The method of clause 33, wherein t1 or t2 depends on whether the deblocking filter is applied to the virtual boundary.

[1633] 35. A method according to clause 33 or 34, wherein t1 = -2 N And t2=2 N -1, where N is an integer.

[1634] 36. A method according to clause 35, wherein N depends on the colour components and / or the sample bit depth.

[1635] 37. A video processing method (e.g., Figure 9H The method 980 depicted in the claims comprises: determining (982) a codec tool for conversion between a current video block of a video and a codec representation of the video according to a rule; and performing (984) the conversion according to the codec tool, wherein the rule stipulates that a sub-block transform (SBT) tool is used exclusively with a sub-block based codec mode.

[1636] 38. A method according to clause 37, wherein the sub-block based codec mode comprises an affine codec mode or a SbTMVP (Sub-Block Temporal Motion Vector Predictor) mode.

[1637] 39. The method according to clause 37 or 38, wherein the coded representation does not include the syntax elements of the sub-block based coding mode excluded due to the rules.

[1638] 40. A video processing method (e.g., Fig.9I the method 990 shown), comprising: for a current video block divided into sub-partitions according to the use of an intra sub-block partitioning (ISP) mode, determining (992) to apply a deblocking filter to a boundary between two sub-partitions of the current video block; and based on the determination, performing (994) a conversion between the current video block of the video and the coded representation of the video.

[1639] 41. The method according to clause 40, wherein when x satisfies x = M*P + offset and / or x < W, filtering a vertical boundary at column x between the two sub-partitions of the current video block with the deblocking filter, where offset, M, and P are positive integers, and W is the width of the current video block.

[1640] 42. The method according to clause 40, wherein when y satisfies y = M*P + offset and / or y < H, filtering a horizontal boundary at row y between the two sub-partitions of the current video block with the deblocking filter, where offset, M, and P are positive integers, and H is the height of the current video block.

[1641] 43. A video processing method (e.g., Fig. 10A the method 1010 shown), comprising: for a current video block coded using a geometric prediction mode, determining (1012) to apply a deblocking filter to a boundary between two MxN regions of the current video block, wherein the current video block is divided into sub-partitions, where M and N are integers; and based on the determination, performing (1014) a conversion between the current video block of the video and the coded representation of the video.

[1642] 44. The method according to clause 43, wherein MxN is equal to 4x4 or 8x8.

[1643] 45. A video processing method (e.g., Fig. 10B the method 1020 shown), comprising: for a conversion between a video including a video block and the coded representation of the video, determining (1022) to apply a deblocking filter to a boundary between two adjacent video blocks due to at least one of the two adjacent video blocks being coded using a geometric prediction mode, wherein at least one of the two adjacent video blocks is divided into sub-partitions; and based on the determination, performing (1024) the conversion.

[1644] 46. ​​A video processing method (e.g., Fig. 10C The method 1030 shown includes: for a conversion between a current video block of a video and a codec representation of the video, determining (1032) filtering parameters used in a filtering process based on the rule; and performing (1034) the conversion based on the determination, wherein the rule stipulates that the filtering parameters depend on i) motion information used in a motion compensation process, ii) motion information stored in a motion memory, or iii) motion information used in a motion vector prediction process.

[1645] 47. A method according to clause 46, wherein the rule provides that the filtering process is based on the motion information used in the motion compensation process of the current video block encoded in a geometric prediction mode, wherein at least one of the two adjacent video blocks is divided into sub-partitions.

[1646] 48. A method according to clause 47, wherein the rules further provide for using a motion vector used in the motion compensation process during a deblocking filter strength derivation process and / or a deblocking boundary filter strength setting.

[1647] 49. The method of clause 47, wherein the rule further provides that a stored HxH motion vector for the current video block is not used for a deblocking boundary filter strength setting, where H is an integer greater than 0.

[1648] 50. The method of clause 47, wherein the rule depends on decoding information and / or block dimensions.

[1649] 51. A video processing method, comprising: performing conversion between a video and a codec representation of the video, and wherein the codec representation complies with a format rule, wherein the format rule specifies whether to include a chroma syntax element indicating a chroma component in the codec representation based on a chroma format, a codec mode associated with a chroma component, or a chroma information syntax element.

[1650] 52. A method according to clause 51, wherein the chroma syntax element is a Cb / Cr flag signaled conditionally in a picture parameter set according to a chroma format sampling structure or a chroma information syntax element.

[1651] 53. A method according to clause 51, wherein if ChromaArrayType is equal to true, the chroma syntax element referred to as X is signalled.

[1652] 54. A method according to clause 51 or 52, wherein the chroma syntax element called X is signalled for the chroma format only for monochrome formats.

[1653] 55. A method according to clause 51 or 52, wherein the chroma syntax element called X is signalled only for the chroma format of 4:4:4 and when an individual colour flag is set to 1.

[1654] 56. A method according to clause 51 or 52, wherein the chroma syntax element called X is signalled only for the chroma information syntax element set to 1.

[1655] 57. A method according to any of clauses 52-56, wherein X is i) pps_cb_qp_offset or ii) pps_cr_qp_offset or iii) pps_joint_cbcr_qp_offset or iv) cu_chroma_qp_offset_enabled_flag or v) pps_slice_chroma_qp_offsets_present_flag.

[1656] 58. A method according to any of clauses 1-57, wherein the performance of the conversion comprises generating the codec representation from the current video block.

[1657] 59. A method according to any of clauses 1-57, wherein the performance of the conversion comprises generating the current video block from the codec representation.

[1658] 60. A video processing device comprising a processor configured to implement the method of any one or more of clauses 1-59.

[1659] 61. A computer-readable medium storing program code which, when executed, causes a processor to implement the method of any one or more of clauses 1 to 59. In some embodiments, a computer-readable medium stores a codec representation or bitstream generated according to the techniques described herein.

[1660] The disclosed and other solutions, examples, embodiments, modules and functional operations described in this document can be implemented in digital electronic circuits, or computer software, firmware or hardware, including the structures disclosed in this document and their structural equivalents, or a combination of one or more thereof. The implementation of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible and non-volatile computer-readable medium for execution by a data processing device or to control the operation of the data processing device. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a storage device, a material composition that affects a machine-readable propagation signal, or a combination of one or more thereof. The term "data processing unit" or "data processing device" includes all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer or a multiprocessor or a computer group. In addition to hardware, the device may also include code that creates an execution environment for a computer program, for example, code constituting a processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more thereof. A propagated signal is an artificially generated signal, for example, a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device.

[1661] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language (including compiled or interpreted languages) and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple coordinated files (e.g., files that store one or more modules, subroutines, or portions of code). A computer program may be deployed for execution on one or more computers that are located at one site or distributed across multiple sites and interconnected by a communications network.

[1662] The processes and logic flows described in this specification may be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by special purpose logic circuits, and the apparatus may also be implemented as special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits).

[1663] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more of any type of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor that executes instructions and one or more storage devices that store instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or be operatively coupled to one or more mass storage devices to receive data from them or transfer data to one or more mass storage devices, or both. However, a computer does not necessarily have such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks, such as internal hard disks or removable hard disks; magneto-optical disks; and CD ROM and DVD ROM disks. The processor and memory may be supplemented by, or incorporated into, dedicated logic circuits.

[1664] Although this patent document contains many details, they should not be interpreted as limitations on any subject matter or the scope of the claims, but rather as descriptions of features of specific embodiments of specific technologies. Certain features described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various functions described in the context of a single embodiment can also be implemented separately in multiple embodiments, or in any suitable subcombination. In addition, although the above-mentioned features may be described as working in certain combinations, or even initially required to be so, in some cases, one or more features in the claim combination can be removed from the combination, and the combination of claims can be directed to subcombinations or variations of subcombinations.

[1665] Likewise, although operations are described in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order or order shown, or that all illustrated operations be performed, in order to achieve the desired results. In addition, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[1666] Only a few implementations and examples are described, and other implementations, enhancements, and variations can be made based on what is described and illustrated in this patent document.

Claims

1. A video processing method, comprising: performing a conversion between a current video block of a video and a codec representation of the video using a decoder-side motion vector refinement (DMVR) tool; as well as applying a deblocking filter to the reconstructed video blocks generated during said conversion; wherein the DMVR tool comprises: generating the reconstructed video block by motion compensation using a refined motion vector generated by refining a coded motion vector in the coded representation; wherein the parameters of the deblocking filter are based on the refined motion vector; The current video block corresponds to a codec unit CU processed by the DMVR, and the deblocking process is performed at a CU boundary using a signaled motion vector of the CU and the refined motion vector of a sub-block of the current video block.

2. The method according to claim 1, wherein: The current video block corresponds to a codec unit CU processed by the DMVR, and the deblocking process is performed at a sub-block boundary within the codec unit using the refined motion vectors of the sub-blocks of the current video block.

3. The method according to claim 1, wherein: The current video block corresponds to a codec unit CU processed by the DMVR, and the deblocking process is performed at a CU boundary using a motion vector signaled by the CU.

4. The method according to claim 1, further comprising: For a transition between a current video block of a video and a codec representation of the video, determining a deblocking filter strength for a deblocking filtering process based on a rule; as well as performing the converting based on the determining, and The rule stipulates that the deblocking filter strength does not depend on the prediction mode of the neighboring blocks of the current video block.

5. The method according to claim 4, wherein the prediction mode is an intra block copy (IBC) mode or an inter coding mode, wherein the IBC mode generates a prediction block using at least one block vector pointing to a video frame containing the current video block, and the inter coding mode includes using time domain correlation to represent or reconstruct the video.

6. The method of claim 4 or 5, wherein the rule further provides that the deblocking filter strength depends on whether one of the neighboring blocks uses intra-mode coding, the intra-mode comprising representing or reconstructing the video based on previously processed video blocks.

7. The method according to claim 1, further comprising: for a conversion between a current video block of a video and a codec representation of the video, determining whether to apply a deblocking filter to the boundary of the current video block and / or a deblocking parameter to be used if the deblocking filter is applied, based on a rule that is dependent on or independent of the type of the boundary; as well as The converting is performed based on the determination.

8. The method of claim 7, wherein the type of the boundary is related to whether the boundary is a transform block boundary or a sub-block boundary.

9. The method of claim 8, wherein the rule provides that the deblocking filter strength is determined to be different values ​​for the transform block boundary and the sub-block boundary.

10. The method of claim 9, wherein the transform block boundary marker is stored in a first array buffer and the sub-block boundary marker is stored in a second array buffer different from the first array buffer.

11. The method of claim 9, wherein the deblocking filter strength for the transform block boundary is determined based on transform coefficients.

12. The method of claim 9, wherein the deblocking filter strength of the sub-block boundary is determined based on a motion vector and / or a reference picture between two adjacent pixels on both sides of the boundary.

13. The method according to claim 9, wherein the rule stipulates that the boundary strength is set equal to 1 or 2 in the following cases: 1) the boundary is a transform block boundary but not the sub-block boundary; 2) at least one of the two adjacent samples along the boundary is encoded using the combined inter-frame intra-frame prediction CIIP mode, where X is 1 or 2.

14. The method of claim 7, wherein the deblocking parameter comprises at least one of a filter strength, a filter length, or a boundary strength, and wherein: The rule states that the same parameters are used for different types of the boundaries.

15. The method according to claim 1, further comprising: For a conversion between a video region of a video and a codec representation of the video, determining not to apply a deblocking filter in one direction at a virtual boundary N samples away from a horizontal boundary, where N is an integer greater than 0; as well as The converting is performed based on the determination.

16. The method of claim 15, wherein N is 4 for the video region corresponding to luma components and N is 2 for the video region corresponding to chroma components.

17. The method according to claim 15 or 16, wherein: The determining determines not to apply the deblocking filter in a horizontal direction to a boundary of a transform unit, a coding unit, a prediction unit or a sub-block of the current video block, and a boundary coincident with the virtual boundary.

18. The method according to claim 15 or 16, wherein: The determining determines to apply the deblocking filter in a vertical direction to a boundary of a transform unit, a coding unit, a prediction unit or a sub-block of the current video block, and a boundary coincident with the virtual boundary.

19. The method of claim 1, further comprising: For conversion between a video region of a video and a codec representation of the video, determining whether and how to use a deblocking filter to clip sample values ​​during a deblocking process based on a rule that depends on whether a boundary to be filtered by the deblocking filter coincides with a virtual boundary that is N samples away from a horizontal boundary of the video region, where N is an integer greater than 0; and The converting is performed based on the determination.

20. The method of claim 19, wherein the rule provides that the sample having a value of p is modified to a different value p' by using the deblocking filter, where p'=p+d', and d'=Clip3(t1, t2, d), where is d derived during the conversion, and where [t1, t2] is a clipping range, where t1 and t2 are integers.

21. The method of claim 20, wherein t1 or t2 depends on whether the deblocking filter is applied to the virtual boundary.

22. The method according to claim 20 or 21, wherein t1 = -2 N And t2=2 N -1, where N is an integer.

23. The method according to claim 22, wherein N depends on a color component and / or a sample bit depth.

24. The method according to claim 1, further comprising: determining, according to a rule, a codec tool for conversion between a current video block of a video and a codec representation of the video; and performing the conversion according to the codec tool, wherein the rule stipulates that a sub-block transform (SBT) tool is used mutually exclusively with a sub-block based codec mode.

25. The method according to claim 24, wherein: The sub-block based codec mode includes an affine codec mode or a sub-block temporal motion vector predictor (SbTMVP) mode.

26. The method according to claim 24 or 25, wherein: The codec representation does not include syntax elements of the sub-block based codec mode excluded due to the rule.

27. The method according to claim 1, further comprising: for a current video block divided into sub-divisions according to the use of an intra sub-block partition (ISP) mode, determining to apply a deblocking filter to a boundary between two sub-divisions of the current video block; and performing, based on the determination, a conversion between the current video block of the video and a codec representation of the video.

28. The method according to claim 27, wherein in a case where x satisfies x = M * P + offset and / or x < W, filtering a vertical boundary at column x between the two sub-divisions of the current video block with the deblocking filter, where offset, M, and P are positive integers, and W is a width of the current video block.

29. The method according to claim 27, wherein in a case where y satisfies y = M * P + offset and / or y < H, filtering a horizontal boundary at row y between the two sub-divisions of the current video block with the deblocking filter, where offset, M, and P are positive integers, and H is a height of the current video block.

30. The method according to claim 1, further comprising: for a current video block coded using a geometric prediction mode, determining to apply a deblocking filter to a boundary between two MxN regions of the current video block, wherein the current video block is divided into sub-divisions, and M and N are integers; and performing, based on the determination, a conversion between the current video block of the video and a codec representation of the video.

31. The method according to claim 30, wherein MxN is equal to 4x4 or 8x8.

32. The method according to claim 1, further comprising: for a conversion between a video including a video block and a codec representation of the video, determining to apply a deblocking filter to a boundary between two adjacent video blocks due to at least one of the two adjacent video blocks being coded using a geometric prediction mode, wherein at least one of the two adjacent video blocks is divided into sub-divisions; and performing the conversion based on the determination.

33. The method according to claim 1, further comprising: for a conversion between a current video block of a video and a codec representation of the video, determining filtering parameters used in a filtering process based on a rule; and performing the conversion based on the determination, Therein, the rule stipulates that the filter parameters depend on i) motion information used in a motion compensation process, ii) motion information stored in a motion memory, or iii) motion information used in a motion vector prediction process.

34. The method of claim 33, wherein: The rule provides that the filtering process is based on the motion information used in the motion compensation process of the current video block coded in a geometric prediction mode, wherein at least one of two neighboring video blocks is divided into sub-partitions.

35. The method of claim 34, wherein: The rules also provide for using the motion vector used in the motion compensation process during the deblocking filter strength derivation process and / or the deblocking boundary filter strength setting.

36. The method of claim 34, wherein the rules further provide that a stored HxH motion vector for the current video block is not used for a deblocking boundary filter strength setting, where H is an integer greater than 0.

37. The method of claim 34, wherein the rule depends on decoding information and / or block dimensions.

38. The method of claim 1, further comprising: performing conversion between a video and a codec representation of said video, and Wherein, the encoding and decoding indicates compliance with the format rules, The format rule specifies whether to include a chroma syntax element indicating a chroma component in the codec representation based on a chroma format, a codec mode associated with the chroma component, or a chroma information syntax element.

39. The method of claim 38, wherein the chroma syntax element is a Cb / Cr flag conditionally signaled in a picture parameter set according to a chroma format sampling structure or a chroma information syntax element.

40. The method of claim 38, wherein: If ChromaArrayType is equal to true, then the chroma syntax element called X is signaled.

41. The method according to claim 38 or 39, wherein: The chroma syntax element called X is signaled for the chroma format only for monochrome formats.

42. The method of claim 38 or 39, wherein: The chroma syntax element called X is signaled only for the chroma format of 4:4:4 and when the individual color flags are set to 1.

43. The method according to claim 38 or 39, wherein: The chroma syntax element called X is signaled only for the chroma information syntax element set to 1.

44. The method of claim 39, wherein X is i) pps_cb_qp_offset or ii) pps_cr_qp_offset or iii) pps_joint_cbcr_qp_offset or iv) cu_chroma_qp_offset_enabled_flag or v) pps_slice_chroma_qp_offsets_present_flag.

45. The method of claim 1, further comprising: For a conversion between a current video block of a video and a codec representation of the video, determining based on a rule a boundary strength to be applied to a sub-block boundary of the current video block using a deblocking filter; and performing said converting based on said determining, The rule states that the boundary strength is set equal to 2 regardless of whether the sub-block boundary is a transform block boundary or not.

46. ​​The method of claim 45, wherein the rule provides that for the sub-block boundaries that are not the transform block boundaries, the boundary strength is set equal to 2.

47. The method of claim 45 or 46, wherein the rule provides that at least one of two adjacent samples along the boundary is encoded and decoded using a combined inter-frame intra-frame prediction (CIIP) mode.

48. The method of claim 47, wherein the CIIP mode is used to derive prediction samples based on a weighted sum of inter prediction samples and intra prediction samples.

49. The method of claim 1, further comprising: performing a conversion between a current video block of a video and a codec representation of said video according to a rule, The conversion uses a sub-block transformation SBT tool, and the conversion includes: During encoding, the current video block is partitioned into transform blocks TB and a TB-level transform is applied to the TB, or During decoding, applying an inverse terabyte transform to coded samples in said coded representation of said video, The rule stipulates that the adaptive filter is enabled across at least three TB boundaries in the horizontal direction and / or the vertical direction.

50. The method of claim 49, wherein the at least three TB boundaries include two TB boundaries between codec block boundaries of the transform block and the current video block.

51. The method of claim 50, wherein a size of a transform block is smaller than a size of the current video block.

52. The method of claim 50, wherein whether to filter the codec block boundary depends on whether the codec block boundary is a sub-block boundary between sub-blocks of the current video block.

53. The method of claim 1, further comprising: For a conversion between a current video block of a video and a coded representation of the video, making a first determination that two adjacent samples located on either side of an edge of the current video block belong to two transform blocks that do not have non-zero transform coefficient levels; Based on the first determination, making a second determination to set a deblocking filter strength for an edge of the current video block to zero; and The converting is performed using the first determination and the second determination.

54. The method of claim 53, wherein one of the two neighboring samples is encoded in a geometric prediction mode in which the current video block is divided into sub-partitions.

55. The method of claim 53, wherein a motion vector difference between the two adjacent samples is greater than a threshold T, where T is an integer.

56. The method of claim 53, wherein the second determination regarding the filter strength at transform block boundaries is made independent of rules related to motion vectors.

57. The method of claim 1, wherein performance of the converting comprises generating the codec representation from the current video block.

58. The method of claim 1, wherein performance of the converting comprises generating the current video block from the codec representation.

59. A video processing device, comprising a processor, wherein the processor is configured to implement the method according to any one of claims 1-58.

60. A computer readable medium storing program code which, when executed, causes a processor to implement the method of any one of claims 1-58.