Asymmetric deblocking in a video encoder and / or video decoder

By introducing an asymmetric deblocking method in video encoding, using linear interpolation and sample number limit, the problem of insufficient asymmetric deblocking filters and long filter interaction in the prior art is solved, and the reduction of CTU boundary line buffers is achieved The parallel deblocking and sub-blocking motion compensate for the CU boundary, improving deblocking efficiency and flexibility.

CN113287318BActive Publication Date: 2024-11-26TELEFONAKTIEBOLAGET LM ERICSSON (PUBL)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980088483.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-11-08
Filing Date
2019-11-04
Publication Date
2024-11-26
Estimated Expiration
2039-11-04

AI Technical Summary

Technical Problem

There is a lack of effective asymmetric deblocking filters in the prior art to handle up to 6 CTU line buffers and fails to effectively handle the interaction problem of long filters and sub-blocking.

Method used

Asymmetric deblocking method is proposed. By performing linear interpolation on the boundary between P block and Q block, limiting the number of samples to be modified, and filtering on both sides using different number of sample filters to achieve the CTU The row buffer on the boundary reduces and deblocks in parallel with the CU boundary compensated for sub-block motion.

Benefits of technology

It realizes deblocking while reducing the CTU boundary line buffer, and can perform parallel deblocking on the CU boundary using sub-block motion compensation, improving the efficiency and flexibility of deblocking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113287318B_ABST
    Figure CN113287318B_ABST
Patent Text Reader

Abstract

An asymmetric deblocking method is provided for deblocking the boundary between blocks P and Q such that it modifies 5 samples within block P and 7 or 3 samples within block Q. The method includes: determining a value refP based at least on p5; determining a value refQ based at least on qx, where qx ​​is q3 or q7; determining a value refMiddle based at least on p0 and q0, where p0 is directly adjacent to the boundary and q0 is directly adjacent to the boundary; performing linear interpolation between refP and refMiddle; and performing linear interpolation between refQ and refMiddle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to video encoding and / or decoding. Background Art

[0002] The present disclosure relates to the encoding and / or decoding of a video sequence consisting of a series of images (aka pictures). Each image of the video sequence consists of one or more components. Each component can be described as a two-dimensional rectangular array of sample values. Typically, an image in a video sequence consists of three components: a luma component Y, where the sample values ​​are luma values; a first chroma component Cb, where the sample values ​​are chroma values; and a second chroma component Cr, where the sample values ​​are chroma values. Other examples include Y'Cb Cr, Yuv, and ICTCP. In ICTCP, I is the "intensity brightness" component. For the rest of this document, we will refer to any brightness component Y', Y, or I as Y or simply brightness.

[0003] Typically, the size of the chroma components is 1 / 2 of the luma components in each dimension. For example, the luma component of a high-definition (HD) image would be sized 1920x1080, and the chroma components would each have a size of 960x540. Components are sometimes referred to as color components.

[0004] In video coding, each component is split into blocks, and the encoded video bitstream is a series of blocks. A block is a two-dimensional array of samples. It is common in video coding to split an image into cells that cover a specific area of ​​the image. Each cell consists of all the blocks from all the components that make up that specific area, and each block belongs entirely to one cell. Macroblocks in H.264 and Coding Units (CUs) in HEVC are examples of cells.

[0005] In HEVC, each picture is divided into coding tree units (CTUs). A CTU consists of an NxN block of luminance samples and two MxM corresponding chrominance blocks. The CTU in HEVC is similar to macroblocks in H.264 and earlier standards, but the CTU size is configurable compared to macroblocks. However, most of the time, the CTU size in HEVC is set to 64x64 luminance samples. Quadtree splitting can be performed recursively on each CTU. The root of the quadtree is then associated with the CTU. The quadtree is split until a leaf is reached, which is called a coding unit (CU). A CU in HEVC always consists of luminance blocks of equal height and width. How to split each CTU is conveyed in the bitstream. The CU is further the root node of the following two other trees: a prediction tree that has prediction units (PUs) as nodes and a transform tree that has transform units (TUs) as nodes. Some decoding processes in HEVC are performed at the CU level, some at the PU level, and some at the TU level. The boundaries between PUs and TUs are filtered by a deblocking filter to reduce discontinuities between TUs and PUs. In HEVC, there are two types of prediction for PUs: intra prediction, which uses only predictions from previously decoded samples of the current picture for prediction; and inter prediction, which uses predictions from at least one previously decoded picture.

[0006] In HEVC, deblocking is first applied on vertical boundaries and then on horizontal boundaries. The boundaries are TU boundaries or PU boundaries. To enable parallel friendly deblocking (PDFD), deblocking is performed on an 8x8 sample grid.

[0007] Set the deblocking filter strength parameter (bs) for each boundary. If the value of bs is greater than 0, deblocking can be applied. The greater the boundary strength, the stronger the filtering applied. First, check that if any of the blocks in the blocks at the PU boundary between the blocks are intra-predicted blocks, then set bs to = 2, or if both blocks use inter-prediction but they use different reference frames or have significantly different motion vectors, then set bs to = 1. Also check that if the TU boundary between the blocks has non-zero transform coefficients (code block flag (CBF) equal to 1) in at least one of the blocks, then set bs to = 1. This first check sets the boundary strength (bs) greater than 0 to indicate that deblocking should be applied. The greater the boundary strength, the stronger the filtering applied. To reduce / avoid removing natural structures during deblocking, then a check is applied to the luminance that there are no natural knots on each side of the boundary. In HEVC, the following inequality is used on each side of the boundary for gradient calculation: abs(p0 - 2*p1 + p2) + abs(q0 - 2*q1 + q2) < beta, where beta is a parameter based on the block's quantization parameter, and p0, p1 to p2 are samples on one side of the block boundary, and q0, q1 to q2 are samples on the other side of the block boundary. This condition is checked at two positions along the boundary, and if both conditions are satisfied, then for this 4-sample portion of the boundary, deblocking is performed on the luminance samples. If any of the neighboring blocks are intra-coded, then the chrominance boundary can always be filtered.

[0008] In the current draft of the H.266 specification (VVC draft 3 JVET-L1001 (see reference [1]) (hereinafter simply referred to as "VVC")), the coding tree unit (CTU) is similar to the CTU in HEVC, with the difference being that the CTU in H.266 has a size of 128x128 luminance samples. In VVC, the CTU can be split more flexibly such that the resulting CUs can consist of rectangular luminance blocks. In VVC, there is no prediction tree as in HEVC. However, the CUs in VVC can be implicitly divided into multiple TUs. However, implicit TUs only occur when the CU size has a width or height greater than the maximum transform size. If this is not the case, then the CU has neither any prediction tree nor any transform tree.

[0009] In VVC, deblocking is first applied on vertical CU boundaries, vertical implicit TU boundaries, and vertical sub-block boundaries, and then on horizontal CU boundaries, horizontal implicit TU boundaries, and horizontal sub-block boundaries. Deblocking is based on HEVC deblocking.

[0010] In VVC, two sub-block prediction tools are included: AFFINE and ATMVP. For different parts of a block (e.g., sub-blocks), the sub-block prediction tool can be characterized as a prediction tool with more than one set of motion parameters. AFFINE operates on a sub-block size of 4x4, and ATMVP operates on a sub-block size of 8x8. Each sub-block is predicted by a specific motion parameter such as an indicator of a reference frame to be predicted from and at least one motion vector. When a CU uses sub-block motion compensation like ATMVP and AFFINE, sub-block boundaries may be created within the CU because different motion parameters are used in at least some of the sub-blocks. In VVC, in addition to deblocking CU and implicit TU boundaries on an 8x8 grid, sub-block boundaries are also deblocked on an 8x8 grid when the motion parameters on the corresponding sides of the sub-block boundary are different enough. Deblocking can be done in parallel for both CU, implicit TU and sub-block boundaries, because deblocking is based on HEVC luma deblocking that reads up to 4 samples and writes up to 3 samples on each side of the boundary, which is sufficient when deblocking on an 8x8 grid.

[0011] Figure 1 An example of a vertical sub-block boundary 102 from ATMVP is shown, which is 8 samples from a vertical implicit TU boundary 101 . Figure 2A Another example of a vertical sub-block boundary 202 is shown, which is 8 samples from a CU boundary 201. Figure 2A As shown in , a vertical block boundary 201 is located between a P block and a Q block, which together form a unit, and a Q block has a plurality of vertical sub-block boundaries therein, including a sub-block boundary 202 which is closest to the boundary 201 and does not coincide with the boundary 201 . Figure 3A Shown from Figure 2A An example column 303 of the cells shown in FIG. Figure 3A As shown in , a Q block includes a set of samples (aka pixel values) (samples Q1 to Q8 shown), and a P block includes a set of samples (samples P1 to P8 shown).

[0012] 1. Use long filter for deblocking

[0013] Deblocking (JVET-L1031-v2) that uses a longer filter in the current core experiment on deblocking is generally applied to large blocks when the length orthogonal to the block boundary of at least the blocks on both sides is equal to or greater than 32 or equal to or greater than 16. There is also a case where a longer filter is used on the side that is equal to or greater than 32, and if the other side is less than 32, a shorter filter is used on the other side.

[0014] 1.1. Example of 8x8 grid luminance deblocking using long filters from JVET-L1031-v3

[0015] CE11.1.6

[0016] Test CE11.1.6 modifications include: long filter deblocking for luminance, long filter deblocking for chrominance, and position-dependent clipping.

[0017] Long deblocking filter for luma

[0018] When samples on either side of the boundary belong to a large block, the proposal uses a bilinear filter. Samples belonging to a large block are defined as when the width >= 32 for vertical edges and when the height >= 32 for horizontal edges.

[0019] The bilinear filters are listed below.

[0020] Then, the block boundary samples p are replaced by linear interpolation as follows i and q i (i=0 to S-1):

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

[0022] q i ′=(g i *Middle s,t +(64-g i )*Q s +32)>>6), limit to q i ±tcPD i

[0023] where tcPD i The term is the position-dependent clipping described in Section 2.5 and is given by i 、Middle s,t , P s and q s :

[0024]

[0025] Luminance Deblocking Control

[0026] This subsection describes the deblocking decision process.

[0027] The long luminance filter is used only when Condition1, Condition2, and Condition3 are all true (TRUE).

[0028] Condition 1 is the "large block condition". This condition detects whether the samples on the P-side and Q-side belong to large blocks, which are represented by the variables bSidePisLargeBlk and bSideQisLargeBlk, respectively. bSidePisLargeBlk and bSideQisLargeBlk are defined as follows.

[0029]

[0030]

[0031] Based on bSidePisLargeBlk and bSideQisLargeBlk, Condition 1 is defined as follows: Condition1 = (bSidePisLargeBlk || bSidePisLargeBlk)? TRUE: FALSE.

[0032] Next, if Condition1 is true, Condition2 will be checked further. First, the following variables are derived:

[0033]

[0034] Then, condition 2 is defined as: Condition2 = (d<β)?TRUE:FALSE.

[0035] Finally, if both Condition1 and Condition2 are valid, the proposed deblocking method will check Condition3 (large block strong filter condition), which is defined as follows.

[0036]

[0037] Long deblocking filter for chroma

[0038] The following strong deblocking filter for chroma is defined:

[0039]

[0040] The proposed chroma filter performs deblocking on a 4x4 chroma sample grid.

[0041] Chroma Deblocking Control

[0042] 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 (chroma position), and the following decision with three conditions is met: the first one is in favor of (be for) the boundary strength and the decision of large blocks. The proposed filter can be applied when the block width or height orthogonally crossing the block edge is equal to or greater than 8 in the chroma sample domain. The second and third decisions are basically the same for HEVC luminance, which are an on / off decision and a strong filter decision, respectively. In the first decision, for chroma filtering, the boundary strength (bS) is modified as shown in Table 1. The conditions in Table 1 are checked in order. If one condition is met, the remaining conditions with lower priority are skipped.

[0043] Modified Boundary Strength

[0044]

[0045] When a large block boundary is detected, chroma deblocking is performed when bS is equal to 2 or when bS is equal to 1. The second and third conditions are essentially the same as the HEVC luma strong filter decision as described below. In the second condition, d is derived as in HEVC luma deblocking. The second condition will be true when d is less than β. The test may include subsampled chroma gradient calculations with threshold scaling, as described in JVET-L0572. In the third condition, the StrongFilterCondition is derived as follows:

[0046]

[0047] Position-dependent clipping

[0048] The proposal also introduces position-dependent clipping tcPD, which is applied to the output samples of the luminance filtering process, which involves modifying strong and long filters of 7 and 3 samples at the boundaries. Assuming a quantization error distribution, it is proposed to increase the clipping value for samples that are expected to have higher quantization noise, so that the reconstructed sample values ​​are expected to have higher deviations from the true sample values.

[0049] For each P or Q boundary, depending on the outcome of the decision process, a position-dependent threshold table is selected from the Tc7 and Tc3 tables provided to the decoder as side information:

[0050] tcPD=(SP==3)? Tc3:Tc7;

[0051] tcQD=(SQ==3)? Tc3:Tc7;

[0052] After that, the filtered p' is limited according to the tcP and tcQ values. i and q' i The sample values ​​are clipped:

[0053] p" i =clip3(p' i +tcP i ,p' i -tcP i ,p' i );and

[0054] q" j =clip3(q' j +tcQ j ,q' j -tcQ j ,q' j ),

[0055] Where p'i and q'i are filtered sample values, p"i and q"j are output sample values ​​after clipping, and tcPi, tcPi are clipping thresholds derived from VVC tc parameters and tcPD and tcQD. Function clip3(x,y,z) is the clipping function specified in VVC:

[0056]

[0057] CE11.1.7

[0058] This test utilizes the filtering and control process of CE11.1.6. However, in this test, the decoder will not access sample values ​​beyond 6 and 3 CTU line buffers for luma and chroma, respectively. The filtering and control process that utilizes samples at locations beyond the CTU line buffer will be appropriately modified, for example using padding / availability criteria / asymmetric filtering.

[0059] CE11.1.8

[0060] This test utilizes the filtering and control process of CE11.1.6. However, in this test, the decoder will not access sample values ​​beyond 4 and 2 CTU line buffers for luma and chroma, respectively. The filtering and control process that utilizes samples at locations beyond the CTU line buffer will be appropriately modified, for example using padding / availability criteria / asymmetric filtering.

[0061] 1.2 Another long filter example of long filter JVET-L0072

[0062] The block boundary samples p are replaced by linear interpolation as follows i and q i (i=0 to S-1):

[0063] -p i ′=(fi *Middle s +(64-f i )*P s )+32)>>6), limit to p i ±tc

[0064] -q i ′=(f i *Middle s +(64-f i )*Q s +32)>>6), limit to q i ±tc

[0065] Where f, Middle, P and Q are given below:

[0066]

[0067] Figure 2B Shows the horizontal boundary between two blocks.

[0068] Figure 3B An example row buffer is shown. Figure 3B As shown in , the line buffer consists of a set of lines from block P that are immediately adjacent to block Q (element 302 represents the horizontal block boundary between block P and block Q). Summary of the invention

[0069] There are some challenges currently. For example, there is no asymmetric deblocking filter defined for CE11.1.7 to handle up to 6 CTU line buffers. And, there is no asymmetric deblocking filter defined for CE11.1.6 to CE11.1.8 to handle the interaction with deblocking and sub-block deblocking using long filters. The present disclosure remedies these challenges.

[0070] In the case where it is desired to limit the number of samples to be modified on at least one side to 5, it may be useful to use the filter from JVET-L0072 on that side, a 5-sample filter, and a 7-sample filter on the other side. Here, the following are three examples where this may be desirable.

[0071] Example 1 (general case):

[0072] When the height of block P (Ph) is equal to 16 and the height of block Q (Qh) is equal to or greater than 32, the maximum number of samples to be modified on the P side is 5, and the maximum number of samples to be modified on the Q side is Qh / 2-1, but although the maximum number of samples may be as high as Qh / 2-1 (for example, 15 when Qh=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0073] Example 2 (6CTU line buffer):

[0074] In case the horizontal boundary is aligned with the CTU boundary, the number of samples to be modified on the P side is limited to 5. This reduces the number of line buffers to 6.

[0075] Example 3 (interacting with sub-blocks in a CU):

[0076] In the case where a horizontal boundary is aligned with a CU boundary (where at least one of the CUs on the P or Q side uses sub-block motion compensation), the number of samples to be modified on the CU boundary on this side using sub-block motion compensation is limited to 5. This enables filtering of at least two samples on the closest sub-block boundary. The same applies in the case of vertical boundaries.

[0077] Example 4 (special case due to restrictions in Alternative 2 or 3)

[0078] 5 samples are modified on the P side and 3 samples are modified on the Q side. For example, the P side can be limited by alternatives 2 or 3. The Q side can be limited by other conditions to use a long filter. For example, the Q side is shorter than 32.

[0079] The asymmetric filters described herein enable deblocking with reduced line buffers on CTU boundaries and / or enable parallel deblocking of CU boundaries shared with at least one CU using sub-block motion compensation.

[0080] In one particular aspect, there is provided an asymmetric deblocking method for deblocking a boundary between a P block of samples and a Q block of samples such that samples within the P block and samples within the Q block are modified. The method includes determining a value refP based at least on p5, where p5 is a sample within the P block and there are five other samples (p0, p1, p2, p3, and p4) within the P block that separate p5 from the boundary. The method also includes determining a value refQ based at least on qx, where qx ​​is a sample within the P block and either i) there are three other samples (q0, q1, and q2) within the Q block that separate qx from the boundary; or ii) there are seven other samples (q0, q1, q2, q3, q4, q5, and q6) within the Q block that separate qx from the boundary. The method further includes determining a value refMiddle based at least on p0 and q0, where p0 is directly adjacent to the boundary and q0 is directly adjacent to the boundary. The method further includes: performing linear interpolation between refP and refMiddle; and performing linear interpolation between refQ and refMiddle.

[0081] In one embodiment, the boundary is a vertical boundary, samples p0 to p5 are aligned in a row orthogonal to the vertical boundary, and samples q0 to q3 or samples q0 to q6 are aligned in the row.

[0082] In one embodiment, the boundary is a horizontal boundary, samples p0 to p5 are aligned in a column orthogonal to the horizontal boundary, and samples q0 to q3 or samples q0 to q6 are aligned in the column.

[0083] In one embodiment, there are seven other samples (q0, q1, q2, q3, q4, q5 and q6) within the Q block that separate qx from the boundary (i.e., qx=q7); refQ equals (q6+qx+1)>>1, and refMiddle equals (p5+p4+p3+p2+2*(p1+p0+q0+q1)+q2+q3+q4+q5+8)>>4).

[0084] In one embodiment, performing linear interpolation between refP and refMiddle includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

[0085] In one embodiment, performing linear interpolation between refQ and refMiddle includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 6, q'(x) is a filtered version of qx, and g={59,50,41,32,23,14,5}.

[0086] In one embodiment, there are three other samples (q0, q1, and q2) within the Q block that separate qx from the boundary (i.e., qx=q3); refQ equals (q2+qx+1)>>1, and refMiddle equals (p3+p2+p1+p0+q0+q1+q2+q3+4)>>3.

[0087] In one embodiment, performing linear interpolation between refP and refMiddle includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

[0088] In one embodiment, performing linear interpolation between refQ and refMiddle includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 2, q'(x) is a filtered version of q(x), and g={53,32,11}.

[0089] In one embodiment, refP is equal to: (p5+p4+1)>>1.

[0090] In one embodiment, the P block is above or to the left of the Q block, or the P block is below or to the right of the Q block.

[0091] In one embodiment, the P block has a size of 32 samples in a direction orthogonal to the boundary and the P block uses a prediction sub-block.

[0092] In one embodiment, the Q-block has a size of less than 32 samples in a direction orthogonal to the boundary.

[0093] In one embodiment, the Q-block has a size equal to or greater than 32 samples in a direction orthogonal to the boundary, and the Q-block does not use sub-blocks.

[0094] In one embodiment, the P-block has a size of 32 samples in a direction orthogonal to the boundary, and the boundary is a horizontal coding tree unit (CTU) boundary.

[0095] In one embodiment, the process further includes: for x from 0 to 4, determining p"(x)=clip3(p'(x)+tcP x ,p'(x)-tcP x ,p'(x)), where tcP x is the clipping threshold, and

[0096] In one embodiment, the clipping threshold tcP x is the quantization parameter (QP) related clipping threshold.

[0097] In one embodiment, the process further includes: for x from 0 to 2, determining q"(x)=clip3(q'(x)+tcQ x ,q'(x)-tcQ x ,q'(x)), where tcQ x is the clipping threshold, and

[0098] In one embodiment, the clipping threshold tcQ x is the quantization parameter (QP) related clipping threshold.

[0099] In another aspect, there is a computer program comprising instructions which, when executed by a processing circuit, cause the processing circuit to perform any of the methods disclosed herein. In one embodiment, there is a carrier embodying the computer program, wherein the carrier is one of an electronic signal, an optical signal, a radio signal, and a computer-readable storage medium.

[0100] In another aspect, there is an apparatus for deblocking a boundary between a P block of samples and a Q block of samples. The apparatus includes processing circuitry and a memory. The memory contains instructions executable by the processing circuit, whereby the device is operable to: determine a value refP based at least on p5, where p5 is a sample within the P block and there are five other samples (p0, p1, p2, p3 and p4) within the P block that separate p5 from a boundary; determine a value refQ based at least on qx, where qx ​​is a sample within the P block and either i) there are three other samples (q0, q1 and q2) within the Q block that separate qx from the boundary; or ii) there are seven other samples (q0, q1, q2, q3, q4, q5 and q6) within the Q block that separate qx from the boundary; determine a value refMiddle based at least on p0 and q0, where p0 is directly adjacent to the boundary and q0 is directly adjacent to the boundary; perform linear interpolation between refP and refMiddle; and perform linear interpolation between refQ and refMiddle. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] The accompanying drawings, which are incorporated herein and form a part of this specification, illustrate various embodiments.

[0102] Figure 1 Examples of vertical block boundaries and vertical sub-block boundaries are shown.

[0103] Figure 2A Another example of a vertical block boundary and a vertical sub-block boundary is shown.

[0104] Figure 2B Shows the horizontal boundary between two blocks.

[0105] Figure 3A A first set of samples on one side of a vertical block boundary and a corresponding second set of samples on the other side of the vertical block boundary are shown.

[0106] Figure 3B An example row buffer is shown.

[0107] Figure 4 A system including an encoder and a decoder is shown.

[0108] Figure 5 An example encoder is shown.

[0109] Figure 6 An example decoder is shown.

[0110] Figure 7 is a flow chart illustrating a process according to an embodiment.

[0111] Figure 8 is a flow chart illustrating a process according to an embodiment.

[0112] Fig. 9 is a flow chart illustrating a process according to an embodiment.

[0113] Fig.10 is a flow chart illustrating a process according to an embodiment.

[0114] Fig.11 is a flow chart illustrating a process according to an embodiment.

[0115] Fig.12 is a flow chart illustrating a process according to an embodiment.

[0116] Fig.13 is a block diagram of an apparatus according to one embodiment. DETAILED DESCRIPTION

[0117] Figure 4 A system 400 is shown according to an example embodiment. The system 400 includes an encoder 402 in communication with a decoder 404 via a network 110 (eg, the Internet or other network). Deblocking may be performed in both the encoder 402 and the decoder 404.

[0118] Figure 54 is a schematic block diagram of an encoder 402 for encoding a pixel block in a video frame of a video sequence according to an embodiment. The current pixel block is predicted by performing motion estimation from a pixel block already provided in the same frame or a previous frame by a motion estimator 50. In the case of inter-frame prediction, the result of the motion estimation is a motion or displacement vector associated with a reference block. The motion vector is used by a motion compensator 50 for inter-frame prediction of the output pixel block. An intra-frame predictor 49 calculates an intra-frame prediction of the current pixel block. The output from the motion estimator / compensator 50 and the intra-frame predictor 49 is input to a selector 51, which selects intra-frame prediction or inter-frame prediction for the current pixel block. The output from the selector 51 is input to an error calculator in the form of an adder 41, which also receives the pixel value of the current pixel block. The adder 41 calculates and outputs a residual as the difference in pixel value between the pixel block and its prediction. The error is transformed in the transformer 42, such as by a discrete cosine transform, and quantized by a quantizer 43, followed by encoding in the encoder 44, such as by an entropy decoder. In inter-frame coding, the estimated motion vector is also brought to the encoder 44 in order to generate an encoded representation of the current pixel block. The transformed and quantized residual of the current pixel block is also provided to the inverse quantizer 45 and the inverse transformer 46 in order to retrieve the original residual. The error is added by the adder 47 to the block prediction output from the motion compensator 50 or the intra-frame predictor 49 to create a reference pixel block that can be used in the prediction and encoding of the next pixel block. According to the embodiment, the new reference block is first processed by the deblocking filter unit 100 in order to perform deblocking filtering to combat any blocking artifacts. The processed new reference block is then temporarily stored in the frame buffer 48, where it can be used by the intra-frame predictor 49 and the motion estimator / compensator 50.

[0119] Figure 66 is a corresponding schematic block diagram of a decoder 402 according to some embodiments. The decoder 60 comprises a decoder 61, such as an entropy decoder, for decoding an encoded representation of a pixel block to obtain a set of quantized and transformed residuals. These residuals are dequantized in an inverse quantizer 62 and inversely transformed by an inverse transformer 63 to obtain a set of residuals. These residuals are added to the pixel values ​​of a reference pixel block in an adder 64. Depending on whether inter-frame prediction or intra-frame prediction is performed, the reference block is determined by a motion estimator / compensator 67 or an intra-frame predictor 66. Thus, a selector 68 is interconnected to the adder 64 and the motion estimator / compensator 67 and the intra-frame predictor 66. According to an embodiment, the resulting decoded pixel block output from the adder 64 is input to the deblocking filter unit 100 in order to deblock filter any blocking artifacts. The filtered block of pixels is output from the decoder 60 and is preferably further temporarily provided to a frame buffer 65 and can be used as a pixel reference block for a subsequent pixel block to be decoded. Thus, the frame buffer 65 is connected to the motion estimator / compensator 67 so that the stored pixel blocks are available to the motion estimator / compensator 67. Preferably, the output from the adder 64 is also input to the intra predictor 66 for use as an unfiltered reference pixel block.

[0120] Deblocking is performed at both the encoder and the decoder. This disclosure describes deblocking for horizontal boundaries where P blocks are above the boundary and Q blocks are below the boundary, but this is equally applicable to vertical boundaries where the P side is the left side of the boundary and the Q side is the right side of the boundary. Deblocking is described here primarily for the case of 8x8 grid deblocking, but a similar design can be used for 4x4 grid deblocking.

[0121] Deblocking is described above the deblocking decisions in CE11.1.6 / CE11.1.7, but those are merely examples and the embodiments disclosed herein may also be used in conjunction with other decisions for deblocking.

[0122] Example 1 (Filter 5+7)

[0123] Consider maxLengthP=5 to be the maximum number of samples per column to be modified on the P side, and maxLengthQ=7 to be the maximum number of samples per column to be modified on the Q side. Also assume that a column of samples on the P side contains the following samples: p5 p4 p3 p2 p1 p0; and a column of samples on the P side contains the following samples: q0 q1 q2 q3 q4q5 q6 q7, where samples p5 to p0 are in block P, and samples q0 to q7 are in block Q, where p0 is closest to block Q, and q0 is closest to block P.

[0124] The deblocking filter can then be defined as:

[0125]

[0126] The filtered version may then be clipped so that it does not move further in the horizontal direction from its value before filtering than by a value related to a QP-related threshold tc.

[0127] In an alternative embodiment, refMiddle is defined as: refMiddle=(p4+p3+2*(p2+p1+p0+q0)+q1+q2+q3+q4+q5+q6+8)>>4.

[0128] Example 2 (Filter 5+3)

[0129] Consider maxLengthP=5 as the maximum number of samples per column to be modified on the P side, and maxLengthQ=3 as the maximum number of samples per column to be modified on the Q side. Also assume that a column of samples on the P side contains the following samples: p5 p4 p3 p2 p1 p0; and a column of samples on the P side contains the following samples: q0 q1 q2 q3, where samples p5 to p0 are in block P, and samples q0 to q3 are in block Q, where p0 is closest to block Q, and q0 is closest to block P. Then, the deblocking filter can be defined as:

[0130]

[0131]

[0132] The filtered version may then be clipped so that it does not move further in the horizontal direction from its value before filtering than by a value related to a QP-related threshold tc.

[0133] In an alternative embodiment, refMiddle is defined as: refMiddle=(q0+q1+2*(p2+p1+p0+q0+q1+q2)+p3+p4+8)>>4.

[0134] Example 3

[0135] The filter in Example 1 can be used to reduce the number of line buffers to 6 for at least horizontal boundaries aligned with CTU boundaries. An example utilizing Example 1 is defined below on top of CE11.1.7 to reduce the number of CTU line buffers to 6:

[0136] Asymmetric filtering of horizontal CTU boundaries where both the p-side and the q-side are greater than or equal to 32.

[0137]

[0138] In one embodiment, where the filter length has been restricted to 3 for the size of the block QQ side, an alternative is then to use the filter in Example 2.

[0139]

[0140] In another embodiment, where the filter length is already limited to 3 for the size of the block QQ side, another alternative is to not use a long filter in this case.

[0141] Example 4

[0142] The filter in Example 1 is used to limit the number of samples to be modified on one side of a boundary between two large CUs or a boundary between two large TUs (eg, implicit TUs) to 5, where sub-block motion compensation is used on at least one side.

[0143] Example implementation on CE11.1.6:

[0144] When one side uses sub-block motion compensation, the long filter is limited to modifying a maximum of 5 samples on that side. This restriction may generate two new cases of asymmetric filtering: modifying 5 samples on one side and 7 samples on the other side; and also modifying 5 samples on one side and 3 samples on the other side.

[0145]

[0146]

[0147] Alternative example embodiment on top of CE11.1.6:

[0148] When one side uses sub-block motion compensation, the long filter is restricted to modifying a maximum of 5 samples on this side. In the case where the restriction results in a situation of 3 samples on one side and 5 samples on the other side, the long filter is not used.

[0149]

[0150] Example 5

[0151] In this embodiment, the decision on the side where the number of samples to be modified is limited to 5 (maxLengthP==5 or maxLengthQ==5) is also limited so that it uses at most one more sample further away from the block boundary than the modified sample.

[0152] An example embodiment of this case above CE11.1.6 or CE11.1.7, where the decision on the side where the number of samples to be modified is limited to 5 is also limited (condition 3 in deblocking control of luma in CE11.1.6 / CE11.1.7):

[0153]

[0154]

[0155] Example 6

[0156] In this embodiment, it is defined that a long filter is to be used if at least one side is equal to or greater than 32 and the other side is equal to or greater than 16. If one side is equal to or greater than 32, the number of samples to be filtered is limited to 7; otherwise, if one side is equal to or greater than 16, the number of samples to be filtered is limited to 5, otherwise, filtering with a long filter is not used.

[0157] An example embodiment of this case over CE11.1.6 replaces the asymmetric filtering of 3 samples on one side and 7 samples on the other side as in CE11.1.6 with filtering of 5 samples on one side and 7 samples on the other side. At the same time, a restriction on the size of both sides of the border is included.

[0158] Long deblocking filter for luma

[0159] When samples on either side of the boundary belong to a large block, the proposal uses a bilinear filter. Samples belonging to a large block are defined as when the width >= 32 for vertical edges and when the height >= 32 for horizontal edges, and the neighboring blocks need to be equal to or greater than 16. The bilinear filter is listed below.

[0160] The block boundary samples p are replaced by linear interpolation as follows i and q i (i=0 to S-1):

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

[0162] q i ′=(g i *Middle s,t +(64-g i )*Q s +32)>>6), limit to qi ±tcPD i ,

[0163] where tcPD i The term is position-dependent clipping, and given by f i 、Middle s,t , P s and Q s :

[0164]

[0165] Luminance Deblocking Control

[0166] The deblocking decision process is described in this subsection. The long luma filter is used only when Condition1, Condition2, and Condition3 are all true.

[0167] Condition1 is the "large block condition". This condition detects whether the samples on the P-side and Q-side belong to large blocks, which are represented by the variables bSidePisLargeBlk and bSideQisLargeBlk, respectively. bSidePisLargeBlk and bSideQisLargeBlk are defined as follows:

[0168]

[0169]

[0170] Based on bSidePisLargeBlk and bSideQisLargeBlk, Condition 1A is defined as follows: Condition 1A=(bSidePisLargeBlk||bSidePisLargeBlk)?TRUE:FALSE.

[0171] Next, if Condition1A is true, bSidePisNearLargeBlk and bSideQisNearLargeBlk will also be checked. bSidePisNearLargeBlk and bSideQisNearLargeBlk are defined as follows:

[0172]

[0173] Condition1=Condition1A&&((!bSidePisLargeBlk&&bSidePisNearLargeBlk)||(!bSideQisLargeBlk&&bSideQisNearLargeBlk))? TRUE:FALSE.

[0174] Next, if Condition1 is true, Condition2 will be checked further. First, the following variables are derived:

[0175]

[0176]

[0177] Then, condition 2 is defined as follows: Condition2 = (d<β)?TRUE:FALSE.

[0178] Finally, if both Condition1 and Condition2 are valid, the proposed deblocking method will check Condition3 (Large Block Strong Filter Condition), which is defined as follows. In Condition3 StrongFilterCondition, the following variables are derived:

[0179]

[0180] As derived in HEV, StrongFilterCondition = (dpq less than (β>>2), sp3+sq3 less than (β>>3), and Abs(p0-q0) less than (5*t C +1)>>1)? TRUE:FALSE.

[0181] If condition 3 is true, the number of samples to be modified on each side is derived as:

[0182]

[0183] Example 7

[0184] Example 7 is similar to Example 6, but in which for horizontal boundaries aligned with CTU boundaries, the number of samples to be modified on the P side is limited to 5. The example embodiments above CE11.1.7 also make the same restrictions on the decisions as in Example 5.

[0185] Example 8

[0186] Example 8 is similar to Example 6, but with an additional restriction to limit the number of samples to be modified on one side of a boundary between two large CUs or a boundary between two large TUs (e.g., implicit TUs) to 5, where sub-block motion compensation is used on at least one side.

[0187] For CU boundaries or implicit TU boundaries, if sub-block motion compensation is used in block P, maxLengthP is set to 5, otherwise it is set to 7; and if sub-block motion compensation is used in block Q, maxLengthQ is set to 5, otherwise it is set to 7. If sub-blocks are used on both sides, this requires an additional filter to cover this case.

[0188] Additional filter for the case maxLengthP=5 and maxLengthQ=5:

[0189]

[0190] In this embodiment, Condition 3 in Example 6 is modified so that:

[0191]

[0192] Figure 7 is a flow chart illustrating a deblocking process 700 for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") according to an embodiment. The process 700 may begin in step s702.

[0193] Step s702 includes determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, where Ph is the height of block P and Qh is the height of block Q. If the first condition is not true, process 700 proceeds to step s704, otherwise the process proceeds to step s706.

[0194] Step s704 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid. Although the maximum number of samples may be up to Qh / 2-1 (e.g., 15 when Qh=32) and Ph / 2-1 (e.g., 15 when Ph=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0195] Step s706 includes determining whether a second condition is true, wherein the second condition is true if Ph is equal to 16 and Qh is greater than or equal to 32. If the second condition is true, the process moves to step s708, otherwise the process moves to step s710.

[0196] Step s708 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 5; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qh / 2-1. Although the maximum number of samples can be up to Qh / 2-1 (e.g., 15 when Qh=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0197] Step s710 includes determining whether a third condition is true, wherein the third condition is true if Qh is equal to 16 and Ph is greater than or equal to 32. If the third condition is true, the process moves to step s712, otherwise the process moves to step s704.

[0198] Step s712 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the Q side modified by deblocking is 5; and ii) the maximum number of samples per column on the P side modified by deblocking is Ph / 2-1. Although the maximum number of samples can be up to Ph / 2-1 (e.g., 15 when Ph=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0199] Figure 8is a flow chart illustrating a deblocking process 800 for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") according to an embodiment. The process 800 may begin in step s802.

[0200] Step s802 includes determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, where Ph is the height of block P and Qh is the height of block Q. If the first condition is not true, process 800 proceeds to s804, otherwise the process proceeds to step s806.

[0201] Step s804 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid. Although the maximum number of samples Qmax1 may be up to Qh / 2-1 (e.g., 15 when Qh=32) and Pmax may be up to Ph / 2-1 (e.g., 15 when Ph=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0202] Step s806 includes determining whether a second condition is true, wherein the second condition is true if the horizontal block boundary is aligned with a coding tree unit (CTU) boundary and Ph is greater than or equal to 32. If the second condition is true, the process moves to step s808, otherwise the process moves to step s804.

[0203] Step s808 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 5; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid, and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid. Although the maximum number of samples Qmax1 can be up to Qh / 2-1 (e.g., 15 when Qh=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0204] Fig. 9is a flow chart illustrating a deblocking process 900 for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") according to an embodiment. The process 900 may begin in step s902.

[0205] Step s902 includes determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, where Ph is the height of block P and Qh is the height of block Q. If the first condition is not true, process 900 proceeds to step s904, otherwise the process proceeds to step s906.

[0206] Step s904 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid. Although the maximum number of samples Qmax1 may be up to Qh / 2-1 (e.g., 15 when Qh=32) and Pmax may be up to Ph / 2-1 (e.g., 15 when Ph=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0207] Step s906 includes determining whether a second condition is true, wherein the second condition is true if block P deblocks subblocks on an NxN grid, and block Q has no subblocks, and Ph is greater than or equal to 32. If the second condition is true, the process moves to step s908, otherwise the process moves to step s910.

[0208] Step s908 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is M; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid, and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid. Where M is equal to 1 when N is equal to 4; and M is equal to 5 when N is 8. Although the maximum number of samples Qmax1 can be up to Qh / 2-1 (e.g., 15 when Qh=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0209] Step s910 includes determining whether a third condition is true, wherein the third condition is true if block Q deblocks subblocks on an NxN grid, and block P has no subblocks, and Qh is greater than or equal to 32. If the third condition is true, the process moves to step s912, otherwise the process moves to step s904.

[0210] Step s912 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the Q side modified by deblocking is M; and ii) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid, and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid. Wherein, when N is equal to 4, M is equal to 1; and when N is 8, M is equal to 5. Although the maximum number of samples Pmax can be up to Ph / 2-1 (e.g., 15 when Ph=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0211] Fig.10 is a flow chart illustrating a deblocking process 1000 for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") according to an embodiment. The process 1000 may begin in step s1002.

[0212] Step s1002 includes determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, where Ph is the height of block P and Qh is the height of block Q. If the first condition is not true, process 1000 proceeds to step s1004, otherwise the process proceeds to step s1006.

[0213] Step s1004 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid. Although the maximum number of samples Qmax1 may be up to Qh / 2-1 (e.g., 15 when Qh=32) and Pmax may be up to Ph / 2-1 (e.g., 15 when Ph=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0214] Step s1006 includes determining whether a second condition is true, wherein the second condition is true if block P deblocks subblocks on an 8x8 grid, and block Q has no subblocks, and Ph is greater than or equal to 32. If the second condition is true, the process moves to step s1008, otherwise the process moves to step s1010.

[0215] Step s1008 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 5; and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid, and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid. Although the maximum number of samples Qmax1 can be up to Qh / 2-1 (e.g., 15 when Qh=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0216] Step s1010 includes determining whether a third condition is true, wherein the third condition is true if block Q deblocks subblocks on an 8x8 grid, and block P has no subblocks, and Qh is greater than or equal to 32. If the third condition is true, the process moves to step s1012, otherwise the process moves to step s1004.

[0217] Step s1012 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid and is equal to Ph / 2-1 for deblocking on a 4x4 grid; and ii) the maximum number of samples per column on the Q side modified by deblocking is 5. Although the maximum number of samples Pmax may be up to Ph / 2-1 (e.g., 15 when Ph=32), in some embodiments only 7 samples are modified because in many cases, modifying 7 samples is sufficient.

[0218] Fig.11 is a flow chart illustrating a deblocking process 1100 for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") according to an embodiment. The process 1100 may begin in step s1102.

[0219] Step s1102 includes determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, where Ph is the height of block P and Qh is the height of block Q. If the first condition is not true, process 1100 proceeds to step s1104, otherwise the process proceeds to step s1106.

[0220] Step s1104 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 3; and ii) the maximum number of samples per column on the Q side modified by deblocking is also 3. In some embodiments, if Qh is equal to 16, the maximum number of samples per column on the Q side modified by deblocking is 5, and if Ph is equal to 16, the maximum number of samples per column on the P side modified by deblocking is 5.

[0221] Step s1106 includes determining whether a second condition is true, wherein the second condition is true if Ph is greater than or equal to 32 and Qh is less than 32. If the second condition is true, the process moves to step s1107, otherwise the process moves to step s1110.

[0222] Step s1107 includes determining whether a third condition is true, wherein the third condition is true if block P deblocks subblocks on an 8x8 grid and block Q has no subblocks. If the third condition is true, the process moves to step s1108, otherwise the process moves to step s1109.

[0223] Step s1108 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 5; and ii) the maximum number of samples per column on the Q side modified by deblocking is 3. For example, in step s1208, the following may be used: Fig.14 The asymmetric filter shown in . In some embodiments, if Qh is equal to 16, the maximum number of samples per column on the Q side modified by deblocking is 5.

[0224] Step s1109 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 7; and ii) the maximum number of samples per column on the Q side modified by deblocking is 3. In some embodiments, if Qh is equal to 16, the maximum number of samples per column on the Q side modified by deblocking is 5.

[0225] Step s1110 includes determining whether a fourth condition is true, wherein the fourth condition is true if Qh is greater than or equal to 32 and Ph is less than 32. If the fourth condition is true, the process moves to step s1112, otherwise the process moves to step s1114.

[0226] Step s1112 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 3; and ii) the maximum number of samples per column on the Q side modified by deblocking is 7. In some embodiments, if Ph is equal to 16, the maximum number of samples per column on the P side modified by deblocking is 5.

[0227] Step s1114 includes determining whether a fifth condition is true, wherein the fifth condition is true if block Q deblocks subblocks on an 8x8 grid and block P has no subblocks. If the fifth condition is true, the process proceeds to step s1116, otherwise the process proceeds to step s1118.

[0228] Step s1116 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 5; and ii) the maximum number of samples per column on the Q side modified by deblocking is 7. For example, in step s1216, the following may be used: Fig.13 The asymmetric filter shown in .

[0229] Step s1118 comprises deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 7; and ii) the maximum number of samples per column on the Q side modified by deblocking is 7.

[0230] Fig.12is a flow chart illustrating a deblocking process 1200 for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") according to an embodiment. The process 1200 may begin in step s1202.

[0231] Step s1202 includes determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, where Ph is the height of block P and Qh is the height of block Q. If the first condition is not true, process 1200 proceeds to step s1204, otherwise the process proceeds to step s1206.

[0232] Step s1204 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 3; and ii) the maximum number of samples per column on the Q side modified by deblocking is also 3. In some embodiments, if Qh is equal to 16, the maximum number of samples per column on the Q side modified by deblocking is 5, and if Ph is equal to 16, the maximum number of samples per column on the P side modified by deblocking is 5.

[0233] Step s1206 includes determining whether a second condition is true, wherein the second condition is true if Ph is greater than or equal to 32 and Qh is less than 32. If the second condition is true, the process moves to step s1207, otherwise the process moves to step s1210.

[0234] Step s1207 includes determining whether a third condition is true, wherein the third condition is true if the horizontal block boundary is aligned with the CTU boundary. If the third condition is true, the process moves to step s1208, otherwise the process moves to step s1209.

[0235] Step s1208 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 5; and ii) the maximum number of samples per column on the Q side modified by deblocking is 3. For example, in step s1208, the following may be used: Fig.14 The asymmetric filter shown in . In some embodiments, if Qh is equal to 16, the maximum number of samples per column on the Q side modified by deblocking is 5.

[0236] Step s1209 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 7; and ii) the maximum number of samples per column on the Q side modified by deblocking is 3. In some embodiments, if Qh is equal to 16, the maximum number of samples per column on the Q side modified by deblocking is 5.

[0237] Step s1210 includes determining whether a fourth condition is true, wherein the fourth condition is true if Qh is greater than or equal to 32 and Ph is less than 32. If the fourth condition is true, the process moves to step s1212, otherwise the process moves to step s1214.

[0238] Step s1212 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 3; and ii) the maximum number of samples per column on the Q side modified by deblocking is 7. In some embodiments, if Ph is equal to 16, the maximum number of samples per column on the P side modified by deblocking is 5.

[0239] Step s1214 includes determining whether a fifth condition is true, wherein the fifth condition is true if the horizontal block boundary is aligned with the CTU boundary. If the fifth condition is true, the process moves to step s1216, otherwise the process moves to step s1218.

[0240] Step s1216 includes deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 5; and ii) the maximum number of samples per column on the Q side modified by deblocking is 7. For example, in step s1216, the following may be used: Fig.13 The asymmetric filter shown in .

[0241] Step s1218 comprises deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 7; and ii) the maximum number of samples per column on the Q side modified by deblocking is 7.

[0242] Fig.13 is a flowchart showing an asymmetric deblocking process 1300 according to Example 1 for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") such that the deblocking filter modifies 5 samples on the P side and 7 samples on the Q side. Fig.13 Also shown are a column of samples from the P block (i.e., samples p0, p1, p2, p3, p4, and p5) and a corresponding column of samples from the Q block (i.e., samples q0, q1, q2, q3, q4, q5, q6, and q7). The horizontal boundary is the boundary between p0 and q0. Process 1300 may begin in step s1304.

[0243] Step s1304 includes determining refP based on at least p5. For example, in one embodiment, determining refP includes calculating refP=(p5+p4+1)>>1.

[0244] Step s1306 includes determining refQ based on at least q7. For example, in one embodiment, determining refQ includes calculating refQ=(q6+q7+1)>>1.

[0245] Step s1308 includes determining refMiddle based on at least p0 and q0. For example, in one embodiment, refMiddle=(p5+p4+p3+p2+2*(p1+p0+q0+q1)+q2+q3+q4+q5+8)>>4. In some alternative embodiments, refMiddle=(p4+p3+2*(p2+p1+p0+q0)+q1+q2+q3+q4+q5+q6+8)>>4.

[0246] Step s1310 includes performing linear interpolation between refP and refMiddle. For example, in one embodiment, performing linear interpolation includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}, where f(0)=58, f(1)=45, etc.

[0247] Step s1312 includes performing linear interpolation between refQ and refMiddle. For example, in one embodiment, performing linear interpolation includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 6, q'(x) is a filtered version of qx, and g={59,50,41,32,23,14,5}, where g(0)=59, g(1)=50, etc.

[0248] Fig.14 is a flowchart showing an asymmetric deblocking process 1400 according to Example 2 for deblocking a horizontal boundary between a first block of samples (denoted as block “P”) and a second block of samples (denoted as block “Q”) such that the deblocking filter modifies 5 samples on the P side and 3 samples on the Q side. Fig.14 Also shown are a column of samples from the P block (i.e., samples p0, p1, p2, p3, p4, and p5) and a corresponding column of samples from the Q block (i.e., samples q0, q1, q2, q3, q4, q5, q6, and q7). The horizontal boundary is the boundary between p0 and q0. Process 1400 may begin in step s1404.

[0249] Step s1404 includes determining refP based on at least p5. For example, in one embodiment, determining refP includes calculating refP=(p5+p4+1)>>1.

[0250] Step s1406 includes determining refQ based at least on q3. For example, in one embodiment, determining refQ includes calculating refQ=(q2+q3+1)>>1.

[0251] Step s1408 includes determining refMiddle based on at least p0 and q0. For example, in one embodiment, determining refMiddle includes calculating refMiddle=(p3+p2+p1+p0+q0+q1+q2+q3+4)>>3. In some alternative embodiments, refMiddle=(q0+q1+2*(p2+p1+p0+q0+q1+q2)+p3+p4+8)>>4.

[0252] Step s1410 includes performing linear interpolation between refP and refMiddle. For example, in one embodiment, performing linear interpolation includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}, where f(0)=58, f(1)=45, etc.

[0253] Step s1412 includes performing linear interpolation between refQ and refMiddle. For example, in one embodiment, performing linear interpolation includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 2, q'(x) is a filtered version of qx, and g={53,32,11}, where g(0)=53, g(1)=32, etc.

[0254] Fig.15 1 is a block diagram of a device 1501 for implementing the encoder 402 or the decoder 404 according to some embodiments. That is, the device 1501 may be configured to perform the methods disclosed herein. In embodiments where the device 1501 implements the video encoder 102, the device 1501 may be referred to as an "encoding device 1501," and in embodiments where the device 1501 implements the video decoder 104, the device 1501 may be referred to as a "decoding device 1501." Fig.15As shown in , the network device 1501 may include: a processing circuit (PC) 1502, which may include one or more processors (P) 1555 (e.g., one or more general-purpose microprocessors and / or one or more other processors, such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), etc.), which may be co-located in a single housing or a single data center, or may be geographically distributed; a network interface 1548, which includes a transmitter (Tx) 1545 and a receiver (Rx) 1547 for enabling the device 1501 to transmit data to and receive data from other network nodes connected to a network 150 (e.g., an Internet Protocol (IP) network) connected to the network node 1548; and a local storage unit (also known as a "data storage system") 1508, which may include one or more non-volatile storage devices and / or one or more volatile storage devices. In embodiments where the PC 1502 includes a programmable processor, a computer program product (CPP) 1541 may be provided. The CPP 1541 includes a computer readable medium (CRM) 1542 storing a computer program (CP) 1543, which includes computer readable instructions (CRI) 1544. The CRM 1542 can be a non-transitory computer readable medium, such as a magnetic medium (e.g., a hard disk), an optical medium, a memory device (e.g., a random access memory, a flash memory), etc. In some embodiments, the CRI 1544 of the computer program 1543 is configured so that when executed by the PC 1502, the CRI causes the device 1501 to perform the steps described herein (e.g., the steps described herein with reference to the flowcharts). In other embodiments, the device 1501 can be configured to perform the steps described herein without the need for code. That is, for example, the PC 1502 can be composed of only one or more ASICs. Therefore, the features of the embodiments described herein can be implemented in hardware and / or software.

[0255] Summary of various embodiments

[0256] A1. A method (700) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q"), the method comprising: determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, wherein Ph is the height of block P and Qh is the height of block Q; if the first condition is not true, deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, wherein for deblocking on an 8x8 grid, Pmax1 is equal to m ax(3,Ph / 2-1), and for deblocking on a 4x4 grid, Pmax1 is equal to Ph / 2-1, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where for deblocking on an 8x8 grid, Qmax1 is equal to max(3,Qh / 2-1), and for deblocking on a 4x4 grid, Qmax1 is equal to Qh / 2-1; if the first condition is true, determine whether the second condition is true, where the second condition is true if Ph is equal to 16 and Qh is greater than or equal to 32; if the second condition is true, then the horizontal block boundaries are subject to the following restrictions deblocking is performed if: i) the maximum number of samples per column on the P side modified by deblocking is 5, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qh / 2-1; if the second condition is not true, determining whether a third condition is true, wherein the third condition is true if Qh is equal to 16 and Ph is greater than or equal to 32; if the third condition is true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the Q side modified by deblocking is 5, and ii) the maximum number of samples per column on the P side modified by deblocking is Ph / 2-1; and if the third condition is true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the Q side modified by deblocking is 5, and ii) the maximum number of samples per column on the P side modified by deblocking is Ph / 2-1; and If the first condition is not true, the horizontal block boundary is deblocked under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3,Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3,Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid.

[0257] B1. A method (800) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q"), the method comprising: determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, wherein Ph is the height of block P and Qh is the height of block Q; if the first condition is not true, deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, wherein for 8x 8-grid deblocking, Pmax1 is equal to max(3,Ph / 2-1), and for deblocking on a 4x4 grid, Pmax1 is equal to Ph / 2-1, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3,Qh / 2-1) for deblocking on an 8x8 grid, and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid; If the first condition is true, determine whether the second condition is true, where if a horizontal block boundary is adjacent to a coding tree unit (CTU) boundary, if the horizontal block boundary is aligned, and Ph is greater than or equal to 32, then the second condition is true; if the second condition is true, then deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 5, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3,Qh / 2-1) for deblocking on an 8x8 grid and is equal to Qh / 2-1 for deblocking on a 4x4 grid; and if the second condition is not true, then deblocking is performed on the horizontal block boundary under the following restrictions: Deblocking is performed on flat block boundaries: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3,Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3,Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid.

[0258] C1. A method (900) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q"), the method comprising: determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, wherein Ph is the height of block P and Qh is the height of block Q; if the first condition is not true, deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, wherein for deblocking on an 8x8 grid, Pmax1 is equal to m ax(3,Ph / 2-1), and for deblocking on a 4x4 grid, Pmax1 is equal to Ph / 2-1, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where for deblocking on an 8x8 grid, Qmax1 is equal to max(3,Qh / 2-1), and for deblocking on a 4x4 grid, Qmax1 is equal to Qh / 2-1; if the first condition is true, determine whether the second condition is true, where the second condition is true if block P deblocks subblocks on an NxN grid and block Q has no subblocks and Ph is greater than or equal to 32; if The second condition is true, then deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is M, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where for deblocking on an 8x8 grid, Qmax1 is equal to max(3,Qh / 2-1), and for deblocking on a 4x4 grid, Qmax1 is equal to Qh / 2-1, where when N is equal to 4, M is equal to 1, and when N is 8, M is equal to 5; If the second condition is not true, determine whether the third condition is true, where if block Q has no effect on the sub-blocks on the NxN grid, if the block is deblocked, and the block P has no sub-blocks, and Qh is greater than or equal to 32, then the third condition is true; if the third condition is true, then deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the Q side modified by deblocking is M, and ii) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3,Ph / 2-1) for deblocking on an 8x8 grid, and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid, where M is equal to 1 when N is equal to 4, and M is equal to 5 when N is 8;and if the third condition is not true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid.;

[0259] D1. A method (1000) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q"), the method comprising: determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32, wherein Ph is the height of block P and Qh is the height of block Q; if the first condition is not true, deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, wherein for an 8x8 grid ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3,Qh / 2-1) for deblocking on the 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on the 4x4 grid; if the first condition is true, determine whether the second condition is true, where if block P deblocks subblocks on the 8x8 grid and block Q does not have If there are sub-blocks and Ph is greater than or equal to 32, the second condition is true; if the second condition is true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 5, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3,Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid; if the second condition is not true, determine whether the third condition is true, which in which if block Q deblocks subblocks on an 8x8 grid and block P has no subblocks and Qh is greater than or equal to 32, then the third condition is true; if the third condition is true, then deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3,Ph / 2-1) for deblocking on an 8x8 grid and is equal to Ph / 2-1 for deblocking on a 4x4 grid, and ii) the maximum number of samples per column on the Q side modified by deblocking is 5;and if the third condition is not true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is Pmax1, where Pmax1 is equal to max(3, Ph / 2-1) for deblocking on an 8x8 grid and Pmax1 is equal to Ph / 2-1 for deblocking on a 4x4 grid, and ii) the maximum number of samples per column on the Q side modified by deblocking is Qmax1, where Qmax1 is equal to max(3, Qh / 2-1) for deblocking on an 8x8 grid and Qmax1 is equal to Qh / 2-1 for deblocking on a 4x4 grid.;

[0260] E1. A method (1100) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q"), the method comprising: determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32 (where Ph is the height of block P and Qh is the height of block Q); if the first condition is not true, deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 3, and ii) the maximum number of samples per column on the Q side modified by deblocking is also 3; if the first condition is true, determining whether a second condition is true, wherein if If Ph is greater than or equal to 32 and Qh is less than 32, the second condition is true; if the second condition is true, determine whether the third condition is true, wherein the third condition is true if block P deblocks subblocks on an 8x8 grid and block Q has no subblocks; if the second condition is not true, determine whether the fourth condition is true, wherein the fourth condition is true if Qh is greater than or equal to 32 and Ph is less than 32; if the third condition is true, deblock the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 5, and ii) the maximum number of samples per column on the Q side modified by deblocking is 3. For example, in step s1208, the following can be used Fig.14asymmetric filter as shown; if the third condition is not true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 7, and ii) the maximum number of samples per column on the Q side modified by deblocking is 3; if the fourth condition is true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 3, and ii) the maximum number of samples per column on the Q side modified by deblocking is 7; if the fourth condition is not true, determining whether the fifth condition is true, wherein if block Q deblocks sub-blocks on an 8x8 grid and block P does not have sub-blocks, the fifth condition is true; if the fifth condition is true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 5, and ii) the maximum number of samples per column on the Q side modified by deblocking is 7, for example, in step s1216, the following can be used Fig.13 an asymmetric filter as shown; and if the fifth condition is not true, deblocking is performed on horizontal block boundaries under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 7, and ii) the maximum number of samples per column on the Q side modified by deblocking is 7.

[0261] F1. A method (1200) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q"), the method comprising: determining whether a first condition is true, wherein the first condition is true if Ph is greater than or equal to 32 or Qh is greater than or equal to 32 (where Ph is the height of block P and Qh is the height of block Q); if the first condition is not true, deblocking the horizontal block boundary under the following constraints: i) the maximum number of samples per column on the P side modified by deblocking is 3, and ii) the maximum number of samples per column on the Q side modified by deblocking is also 3; if the first condition is true, determining whether a second condition is true is true, wherein the second condition is true if Ph is greater than or equal to 32 and Qh is less than 32; if the second condition is true, determine whether the third condition is true, wherein the third condition is true if the horizontal block boundary is aligned with the CTU boundary; if the second condition is not true, determine whether the fourth condition is true, wherein the fourth condition is true if Qh is greater than or equal to 32 and Ph is less than 32; if the third condition is true, deblock the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 5, and ii) the maximum number of samples per column on the Q side modified by deblocking is 3. For example, in step s1208, the following can be used Fig.14asymmetric filter as shown; if the third condition is not true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 7, and ii) the maximum number of samples per column on the Q side modified by deblocking is 3; if the fourth condition is true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 3, and ii) the maximum number of samples per column on the Q side modified by deblocking is 7; if the fourth condition is not true, determining whether the fifth condition is true, wherein the fifth condition is true if the horizontal block boundary is aligned with the CTU boundary; if the fifth condition is true, deblocking is performed on the horizontal block boundary under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 5, and ii) the maximum number of samples per column on the Q side modified by deblocking is 7, for example, in step s1216, the following can be used Fig.13 an asymmetric filter as shown; and if the fifth condition is not true, deblocking is performed on horizontal block boundaries under the following restrictions: i) the maximum number of samples per column on the P side modified by deblocking is 7, and ii) the maximum number of samples per column on the Q side modified by deblocking is 7.

[0262] G1. An asymmetric deblocking method (1300) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") such that 5 samples are modified on the P side and 7 samples are modified on the Q side, the method comprising: determining refP based on at least p5 (e.g., refP = (p5 + p4 + 1) >> 1), where p5 is the sixth sample in a column of samples from the P block; determining refQ based on at least q7 (e.g., refQ = (q6 + q7 + 1) >> 1), where q7 is the sixth sample in a column of samples from the P block; the eighth sample in a column of samples from the Q block; determining refMiddle based at least on p0 and q0 (e.g., refMiddle = (p5+p4+p3+p2+2*(p1+p0+q0+q1)+q2+q3+q4+q5+8)>>4), where p0 is the first sample in a column of samples from the P block, and q0 is the first sample in a column of samples from the Q block; performing linear interpolation between refP and refMiddle; and performing linear interpolation between refQ and refMiddle.

[0263] G2. The method of embodiment G1, wherein performing linear interpolation between refP and refMiddle includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

[0264] G3. The method of embodiment G1 or G2, wherein performing linear interpolation between refQ and refMiddle includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 6, q'(x) is a filtered version of qx, and g={59,50,41,32,23,14,5}.

[0265] H1. An asymmetric deblocking method (1400) for deblocking a horizontal boundary between a first block of samples (denoted as block "P") and a second block of samples (denoted as block "Q") such that 5 samples are modified on the P side and 3 samples are modified on the Q side, the method comprising: determining refP based on at least p5 (e.g., refP = (p5 + p4 + 1) >> 1); determining refQ based on at least q3 (e.g., refQ = (q2 + q3 + 1) >> 1); determining refMiddle based on at least p0 and q0 (e.g., refMiddle = (p3 + p2 + p2 + p0 + q0 + q1 + q2 + q3 + 4) >> 3); performing linear interpolation between refP and refMiddle; and performing linear interpolation between refQ and refMiddle.

[0266] H2. The method of embodiment H1, wherein performing linear interpolation between refP and refMiddle includes calculating p'(x)=(f(x)*refMiddle(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

[0267] H3. The method of embodiment H1 or H2, wherein performing linear interpolation between refQ and refMiddle includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 2, q'(x) is a filtered version of qx, and g={53,32,11}.

[0268] J. An asymmetric deblocking method (1300, 1400) for deblocking a boundary between a P block of samples and a Q block of samples such that samples within the P block and samples within the Q block are modified. The method includes determining (1304, 1404) a value refP based on at least p5, where p5 is a sample within the P block and there are five other samples (p0, p1, p2, p3, and p4) within the P block that separate p5 from the boundary. The method also includes determining (1306, 1406) a value refQ based on at least qx, where qx ​​is a sample within the Q block and either i) there are three other samples (q0, q1, and q2) within the Q block that separate qx from the boundary; or ii) there are seven other samples (q0, q1, q2, q3, q4, q5, and q6) within the Q block that separate qx from the boundary. The method further includes determining (1308, 1408) a value refMiddle based at least on p0 and q0, wherein p0 is directly adjacent to the boundary and q0 is directly adjacent to the boundary. The method further includes performing (1310, 1410) linear interpolation between refP and refMiddle. And, the method further includes performing (1312, 1412) linear interpolation between refQ and refMiddle.

[0269] In one embodiment, the boundary is a vertical boundary, samples p0 to p5 are aligned in a row orthogonal to the vertical boundary, and samples q0 to q3 or samples q0 to q6 are aligned in the row.

[0270] In one embodiment, the boundary is a horizontal boundary, samples p0 to p5 are aligned in a column orthogonal to the horizontal boundary, and samples q0 to q3 or samples q0 to q6 are aligned in the column.

[0271] In one embodiment, there are seven other samples (q0, q1, q2, q3, q4, q5 and q6) within the Q block that separate qx from the boundary (i.e., qx=q7); refQ equals (q6+qx+1)>>1, and refMiddle equals (p5+p4+p3+p2+2*(p1+p0+q0+q1)+q2+q3+q4+q5+8)>>4).

[0272] In one embodiment, performing linear interpolation between refP and refMiddle includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

[0273] In one embodiment, performing linear interpolation between refQ and refMiddle includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 6, q'(x) is a filtered version of qx, and g={59,50,41,32,23,14,5}.

[0274] In one embodiment, there are three other samples (q0, q1, and q2) within the Q block that separate qx from the boundary (i.e., qx=q3); refQ equals (q2+qx+1)>>1, and refMiddle equals (p3+p2+p1+p0+q0+q1+q2+q3+4)>>3.

[0275] In one embodiment, performing linear interpolation between refP and refMiddle includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

[0276] In one embodiment, performing linear interpolation between refQ and refMiddle includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 2, q'(x) is a filtered version of q(x), and g={53,32,11}.

[0277] In one embodiment, refP is equal to: (p5+p4+1)>>1.

[0278] In one embodiment, the P block is above or to the left of the Q block, or the P block is below or to the right of the Q block.

[0279] In one embodiment, the P block has a size of 32 samples in a direction orthogonal to the boundary and the P block uses a prediction sub-block.

[0280] In one embodiment, the Q-block has a size of less than 32 samples in a direction orthogonal to the boundary.

[0281] In one embodiment, the Q-block has a size equal to or greater than 32 samples in a direction orthogonal to the boundary, and the Q-block does not use sub-blocks.

[0282] In one embodiment, the P-block has a size of 32 samples in a direction orthogonal to the boundary, and the boundary is a horizontal coding tree unit (CTU) boundary.

[0283] In one embodiment, the process further includes: for x from 0 to 4, determining p"(x)=clip3(p'(x)+tcP x ,p'(x)–tcP x ,p'(x)), where tcP x is the clipping threshold, and

[0284] In one embodiment, the clipping threshold tcP x is the quantization parameter (QP) related clipping threshold.

[0285] In one embodiment, the process further includes: for x from 0 to 2, determining q"(x)=clip3(q'(x)+tcQ x ,q'(x)–tcQ x ,q'(x)), where tcQ x is the clipping threshold, and

[0286] In one embodiment, the clipping threshold tcQ x is the quantization parameter (QP) related clipping threshold.

[0287] Although various embodiments are described herein, it should be understood that they have been presented only as examples and not as limitations. Therefore, the breadth and scope of the present disclosure should not be limited by any of the above exemplary embodiments. In addition, unless otherwise indicated herein or otherwise clearly contradicted with the context, the present disclosure encompasses any combination of the above elements in all possible variations thereof.

[0288] In addition, although the processes described above and shown in the accompanying drawings are shown as a series of steps, this is done for illustration purposes only. It is therefore contemplated that some steps may be added, some steps may be omitted, the order of the steps may be rearranged, and some steps may be performed in parallel.

[0289] References:

[0290] [1] JVET-L1001, “Versatile Video Coding (Draft 3),” October 2018, available at phenix.it-sudparis.eu / jvet / doc_end_user / documents / 12_Macao / wg11 / JVET-L1001-v13.zip

[0291] [2] JVET-L1031, “Description of Core Experiment 11 (CE11): Deblocking,” October 2018, available at phenix.it-sudparis.eu / jvet / doc_end_user / documents / 12_Macao / wg11 / JVET-L1031-v3.zip

[0292] [3] JVET-L0072, “CE11: Long deblocking filters for luma (CE11.1.1) and for both luma and chroma (CE11.1.9)”, October 2018, available at phenix.it-sudparis.eu / jvet / doc_end_user / documents / 12_Macao / wg11 / JVET-L0072-v1.zip

Claims

1. An asymmetric deblocking method for deblocking a boundary between a P block of samples and a Q block of samples so as to modify samples within the P block and samples within the Q block, the method comprising: determining a value refP based at least on p5, where p5 is a sample within the P block, and within the P block there are five other samples separating p5 from the boundary: p0, p1, p2, p3, and p4; determining a value refQ based at least on qx, where qx ​​is a sample within said Q-block, and either i) qx=q3, and there are three other samples within the Q-block that separate qx from the boundary: q0, q1, and q2, in which case refQ equals (q2+qx+1)>>1, or ii) qx=q7, and there are seven other samples within the Q block that separate qx from the boundary: q0, q1, q2, q3, q4, q5, and q6, in which case refQ equals (q6+qx+1)>>1; A value refMiddle is determined based on at least p0 and q0, where p0 is directly adjacent to the boundary and q0 is directly adjacent to the boundary, where either i) In the case of qx=q3, refMiddle is equal to (p3+p2+p1+p0+q0+q1+q2+q3+4)>>3, or ii) In the case of qx=q7, refMiddle is equal to (p5+p4+p3+p2+2*(p1+p0+q0+q1)+q2+q3+q4+q5+8)>>4; performing linear interpolation between refP and refMiddle; and Perform linear interpolation between refQ and refMiddle.

2. The method of claim 1, wherein: The boundary is a vertical boundary, Samples p0 to p5 are aligned in rows orthogonal to the vertical boundary, and The samples q0 to q3 or the samples q0 to q6 are aligned in the row.

3. The method of claim 1, wherein: The border is a horizontal border, Samples p0 to p5 are aligned in columns orthogonal to the horizontal boundary, and Samples q0 to q3 or samples q0 to q6 are aligned in the column.

4. The method of claim 1, when qx=q7, and when there are seven other samples: q0, q1, q2, q3, q4, q5, and q6, wherein performing the linear interpolation between refP and refMiddle includes calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

5. The method of any one of claims 1-4, when qx=q7, and when there are seven other samples: q0, q1, q2, q3, q4, q5 and q6, wherein performing the linear interpolation between refQ and refMiddle includes calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 6, q'(x) is a filtered version of qx, and g={59,50,41,32,23,14,5}.

6. The method of any one of claims 1-3, when qx=q3, and when there are three other samples: q0, q1 and q2, wherein performing the linear interpolation between refP and refMiddle comprises calculating p'(x)=(f(x)*refMiddle+(64-f(x))*refP+32)>>6, where x is 0 to 4, p'(x) is a filtered version of px, and f={58,45,32,19,6}.

7. The method of any one of claims 1-3, wherein performing the linear interpolation between refQ and refMiddle comprises calculating q'(x)=(g(x)*refMiddle+(64-g(x))*refQ+32)>>6, where x is 0 to 2, q'(x) is a filtered version of qx, and g={53,32,11}.

8. The method of any one of claims 1-4, wherein refP is equal to: (p5+p4+1)>>1.

9. The method according to any one of claims 1 to 4, wherein: The P block is above or to the left of the Q block, or The P block is below or to the right of the Q block.

10. The method according to any one of claims 1 to 4, wherein: The P block has a size of 32 samples along a direction orthogonal to the boundary, and The P block uses a prediction sub-block.

11. The method of claim 10, wherein: The Q-block has a size of less than 32 samples in a direction orthogonal to the boundary.

12. The method of claim 10, wherein: The Q-block has a size equal to or greater than 32 samples in a direction orthogonal to the boundary, and The Q block does not use sub-blocks.

13. The method according to any one of claims 1 to 4, wherein: The P block has a size of 32 samples along a direction orthogonal to the boundary, and The boundary is a horizontal coding tree unit (CTU) boundary.

14. The method of claim 4, further comprising: For x from 0 to 4, determine p”(x)=clip3(p'(x)+tcP x ,p'(x)-tcP x ,p'(x)), where tcP x is the clipping threshold, and 15. The method of claim 5, further comprising: For x from 0 to 2, determine q”(x)=clip3(q'(x)+tcQ x ,q'(x)-tcQ x ,q'(x)), where tcQ x is the clipping threshold, and 16. The method of claim 14, wherein the clipping threshold is a quantization parameter (QP) related clipping threshold.

17. The method of claim 15, wherein the clipping threshold is a quantization parameter (QP) related clipping threshold.

18. A computer-readable storage medium storing a computer program comprising instructions which, when executed by a processing circuit, cause the processing circuit to perform the method of any one of claims 1 to 17.

19. An apparatus for deblocking a boundary between a P block of samples and a Q block of samples so as to modify samples within the P block and samples within the Q block, comprising: Processing circuit; and A data storage system storing computer program instructions which, when executed by the processing circuit, cause the apparatus to be adapted to perform the method of any one of claims 1 to 17.