Accessing samples across video unit boundaries in adaptive loop filtering

By managing sample point spanning and adaptive loop filtering of video unit boundaries during the video encoding and decoding process, the problem of low video encoding and decoding efficiency in the prior art is solved, and more efficient video compression and simplified encoding tools are realized, and video processing performance is improved.

CN114128296BActive Publication Date: 2025-08-08DOUYIN VISION CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202080051539.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-07-15
Filing Date
2020-07-15
Publication Date
2025-08-08
Estimated Expiration
2040-07-15

AI Technical Summary

Technical Problem

The existing video encoding and decoding standards are difficult to achieve more efficient compression and simplify the implementation of encoding or decoding tools when processing video unit boundaries.

Method used

During the conversion process between the video picture and the bitstream, syntax elements are used to indicate whether samples can cross the boundaries of the video unit, and the management and filtering of virtual samples are carried out in combination with logical grouping of the codec tree block and an adaptive loop filter.

Benefits of technology

It improves the compression efficiency of video encoding, simplifies the implementation of encoding and decoding tools, and improves the performance of video processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114128296B_ABST
    Figure CN114128296B_ABST
Patent Text Reader

Abstract

A video processing method comprises: performing conversion between a video including a video picture containing a video unit and a bitstream of the video, wherein a first set of syntax elements is included in the bitstream to indicate whether samples crossing a boundary of the video unit can be accessed in a filtering process applied to the boundary of the video unit, and the first set of syntax elements is included at different levels.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to and the benefit of International Patent Application No. PCT / CN2019 / 096059, filed on July 15, 2019, in accordance with applicable patent law and / or the rules applicable to the Paris Convention. The entire disclosure of the above application is incorporated by reference into this disclosure for all legal purposes. Technical Field

[0003] This patent document is generally directed to video encoding and decoding techniques. Background Art

[0004] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T produced H.261 and H.263, ISO / IEC produced MPEG-1 and MPEG-4 Video, and the two organizations jointly produced the H.262 / MPEG-2 Video, H.264 / MPEG-4 Advanced Video Codec (AVC), and H.265 / High Efficiency Video Codec (HEVC) standards. Since H.262, video codec standards have been based on a hybrid video codec architecture that uses temporal prediction plus transform coding. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new methods and incorporated them into reference software called the Joint Exploration Model (JEM). In April 2018, JVET between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) was created to develop the next-generation Versatile Video Codec (VVC) standard, which reduces the bit rate by 50% compared to HEVC. Summary of the Invention

[0005] Utilizing the disclosed video encoding, transcoding, or decoding techniques, embodiments of a video encoder or decoder may handle virtual boundaries of codec treeblocks to provide better compression efficiency and simpler implementation of encoding or decoding tools.

[0006] In one exemplary aspect, a video processing method is disclosed. The method includes converting between a video including a video picture containing a video unit and a bitstream of the video. A first set of syntax elements is included in the bitstream to indicate whether samples crossing a boundary of the video unit can be accessed in filtering applied to the boundary of the video unit, and the first set of syntax elements is included at different levels.

[0007] In another exemplary aspect, a video processing method is disclosed. The method includes performing conversion between video blocks of a video picture and a bitstream thereof, wherein the video blocks are processed using logical groupings of codec treeblocks, and the codec treeblocks are processed based on whether a lower boundary of a bottom codec treeblock is outside a lower boundary of the video picture.

[0008] In another exemplary aspect, a video processing method is disclosed, comprising: determining a usage status of virtual samples during loop filtering based on a condition of a codec tree block of a current video block; and performing conversion between the video block and a bitstream of the video block based on the usage status of the virtual samples.

[0009] In yet another exemplary aspect, a video processing method is disclosed that includes, during conversion between a video picture logically grouped into one or more video slices or video bricks and a bitstream of the video picture, determining to disable use of samples in another slice or brick in adaptive loop filtering processing; and performing the conversion based on the determination.

[0010] In another exemplary aspect, a video processing method is disclosed. The method includes: during conversion between a current video block of a video picture and a bitstream of the current video block, determining that the current video block includes samples located at a boundary of a video unit of the video picture; and performing conversion based on the determination, wherein performing the conversion includes generating virtual samples for loop filtering using a unified method that is the same for all boundary types in the video picture.

[0011] In another exemplary aspect, a video processing method is disclosed. The method includes: during conversion between a current video block of a video picture and its bitstream, determining to apply one of a plurality of adaptive loop filter (ALF) sample selection methods available for the video picture during the conversion; and performing the conversion by applying the one of the plurality of ALF sample selection methods.

[0012] In another exemplary aspect, a video processing method is disclosed, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block, wherein the boundary rule prohibits use of samples of a virtual pipe data unit (VPDU) that spans the video picture; and performing the conversion using a result of the loop filtering operation.

[0013] In another exemplary aspect, a video processing method is disclosed, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block; wherein the boundary rule specifies that for positions of the current video block that cross a video unit boundary, samples generated without using padding are used; and performing the conversion using a result of the loop filtering operation.

[0014] In another exemplary aspect, a video processing method is disclosed, comprising: performing, during conversion between a current video block and a bitstream of the current video block, a loop filtering operation on samples of the current video block of a video picture based on a boundary rule, wherein the boundary rule specifies selecting a filter for the loop filtering operation, the filter having dimensions such that the samples of the current video block used during the loop filtering do not cross a boundary of a video unit of the video picture; and performing the conversion using a result of the loop filtering operation.

[0015] In yet another exemplary aspect, a video processing method is disclosed, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block, wherein the boundary rule specifies selecting a cropping parameter or filter coefficient for the loop filtering operation based on whether the loop filtering requires padded samples; and performing the conversion using a result of the loop filtering operation.

[0016] In yet another exemplary aspect, a video processing method is disclosed, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block, wherein the boundary rule depends on a color component identity of the current video block; and performing the conversion using a result of the loop filtering operation.

[0017] In yet another exemplary aspect, a video encoder configured to perform the above method is disclosed.

[0018] In yet another exemplary aspect, a video decoder configured to perform the above method is disclosed.

[0019] In yet another exemplary aspect, a machine-readable medium is disclosed, wherein the medium stores code that, when executed, causes a processor to implement one or more of the above methods.

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

[0021] Figure 1An example of a picture with 18×12 luminance codec tree units (CTUs) is shown, and the picture is divided into 12 slices and 3 raster scan stripes.

[0022] Figure 2 An example of a picture with 18×12 luminance codec tree units (CTUs) is shown, and the picture is divided into 24 slices and 9 rectangular stripes.

[0023] Figure 3 An example of a picture divided into 4 slices, 11 bricks, and 4 rectangular stripes is shown.

[0024] Figure 4A An example of a codec tree block (CTB) spanning a picture boundary when K = M and L < N is shown.

[0025] Figure 4B An example of a codec tree block (CTB) spanning a picture boundary when K < M and L = N is shown.

[0026] Figure 4C An example of a codec tree block (CTB) spanning a picture boundary when K < M and L < N is shown.

[0027] Figure 5 An example of an encoder block diagram is shown.

[0028] Figure 6 It is a diagram of picture samples on an 8×8 grid, horizontal and vertical block boundaries, and non - overlapping blocks of 8×8 samples that can be de - blocked in parallel.

[0029] Figure 7 An example of pixels involving filter on / off decision and strong / weak filter selection is shown.

[0030] Figure 8 Four one - dimensional direction patterns are shown.

[0031] Figure 9 An example of the shape of a geometric adaptive loop filter (GALF) filter is shown (left: 5×5 rhombus, middle: 7×7 rhombus, right: 9×9 rhombus).

[0032] Figure 10 The relative coordinates supported by a 5×5 rhombus filter are shown.

[0033] Figure 11 An example of the relative coordinates supported by a 5×5 rhombus filter is shown.

[0034] Figure 12A An exemplary arrangement for subsampled Laplacian calculation is shown.

[0035] Figure 12BAnother exemplary arrangement for subsampled Laplacian calculation is shown.

[0036] Figure 12C Another exemplary arrangement for subsampled Laplacian calculation is shown.

[0037] Figure 12D Another exemplary arrangement for subsampled Laplacian calculation is shown.

[0038] Figure 13 An example of the loop filter line buffer requirement for the luma component in VTM-4.0 is shown.

[0039] Figure 14 An example of loop filter line buffer requirements for chroma components in VTM-4.0 is shown.

[0040] Figure 15A An example of ALF block classification at a virtual boundary when N=4 is shown.

[0041] Figure 15B Another example of ALF block classification at a virtual boundary when N=4 is shown.

[0042] Figure 16A An example of luma ALF filtering modified at a virtual boundary is shown.

[0043] Figure 16B Another example of luma ALF filtering modified at a virtual boundary is shown.

[0044] Figure 16C Yet another example of luma ALF filtering modified at a virtual boundary is shown.

[0045] Figure 17A An example of chroma ALF filtering modified at a virtual boundary is shown.

[0046] Figure 17B Another example of chroma ALF filtering modified at a virtual boundary is shown.

[0047] Figure 18A An example of horizontal surround motion compensation is shown.

[0048] Figure 18B Another example of horizontal surround motion compensation is shown.

[0049] Figure 19 An example of a modified adaptive loop filter is shown.

[0050] Figure 20 An example of processing CTUs in a video picture is shown.

[0051] Figure 21An example of a modified adaptive loop filter boundary is shown.

[0052] Figure 22 is a block diagram of an example of a video processing device.

[0053] Figure 23 is a flow chart of an example method of video processing.

[0054] Figure 24 An example of an image of a HEC of a 3x2 layout is shown.

[0055] Figure 25 Examples of the number of filled rows of samples for two types of boundaries are shown.

[0056] Figure 26 An example of processing of CTUs in a picture is shown.

[0057] Figure 27 Another example of processing of CTUs in a picture is shown.

[0058] Figure 28 Another example of the current sample point and the sample points that need to be accessed is shown.

[0059] Figure 29 Another example of filling in "unavailable" neighboring samples is shown.

[0060] Figure 30 An example of samples required for the ALF classification process is shown.

[0061] Figure 31 is a block diagram of an exemplary video processing system in which the disclosed technology may be implemented.

[0062] Figure 32 is a flowchart representation of a method for video processing according to the present technology. DETAILED DESCRIPTION

[0063] The use of section headings in this document is for ease of understanding and does not limit the embodiments disclosed in a section to only that section. In addition, although certain embodiments are described with reference to a multifunctional video codec or other specific video codecs, the disclosed techniques are also applicable to other video codec technologies. In addition, although some embodiments describe the video encoding and decoding steps in detail, it should be understood that the corresponding decoding steps of the undo encoding will be implemented by the decoder. In addition, the term "video processing" includes video encoding or compression, video decoding or decompression, and video transcoding, in which video pixels are represented from one compression format to another compression format or at a different compression bit rate.

[0064] 1. Overview

[0065] This paper relates to video coding and decoding technology. Specifically, it addresses picture / slice / tile / brick boundary and virtual boundary coding and decoding, with particular attention to nonlinear adaptive loop filters. It can be applied to existing video codec standards, such as HEVC, as well as to a pending standard (Multi-Function Video Codec). It is also applicable to future video codec standards or codecs.

[0066] 2. Preliminary Discussion

[0067] Video codec standards have primarily evolved through the development of the well-known ITU-T and ISO / IEC standards. ITU-T produced H.261 and H.263, ISO / IEC produced MPEG-1 and MPEG-4 video, and the two organizations jointly produced H.262 / MPEG-2 video, H.264 / MPEG-4 Advanced Video Codec (AVC), and H.265 / HEVC. Since H.262, video codec standards have been based on a hybrid video codec architecture that uses temporal prediction plus transform coding. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new approaches and incorporated them into reference software called JEM. In April 2018, a Joint Video Exploration Team (JVT) between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) was established to develop the VVC standard, which offers a 50% bitrate reduction compared to HEVC.

[0068] 2.1 Color Space and Chroma Subsampling

[0069] A color space, also called a color model (or color system), is an abstract mathematical model that simply describes the range of colors as a tuple of numbers, typically 3 or 4 values or color components (e.g., RGB). Fundamentally, a color space is a refinement of coordinate systems and subspaces.

[0070] For video compression, the most commonly used color spaces are YCbCr and RGB.

[0071] YCbCr, Y'CbCr, or Y-Pb / Cb Pr / Cr, also written as YCbCr or Y'CbCr, is a family of color spaces used as part of the color imaging pipeline in video and digital photography systems. Y' is the luma component, and CB and CR are the blue-difference and red-difference chroma components. Y' (with primaries) differs from Y (which is luma) in that light intensity is nonlinearly encoded and decoded based on the gamma-corrected RGB primaries.

[0072] Chroma subsampling is the practice of encoding and decoding images at a lower resolution for chroma information than for luminance information, taking advantage of the fact that the human visual system is less sensitive to color differences than to luminance.

[0073] 2.1.1 Color Format 4:4:4

[0074] Each of the three Y'CbCr components has the same sampling rate, so there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and film post-production.

[0075] 2.1.2 Color Format 4:2:2

[0076] The two chroma components are sampled at half the luma sampling rate: the horizontal chroma resolution is halved. This reduces the bandwidth of the uncompressed video signal by one-third with almost no visual difference.

[0077] 2.1.3 Color Format 4:2:0

[0078] In 4:2:0, horizontal sampling is doubled compared to 4:1:1, but because the Cb and Cr channels are only sampled on alternate lines in this scheme, the vertical resolution is halved. Therefore, the data rate remains the same. Cb and Cr are subsampled by a factor of 2 in both the horizontal and vertical directions. There are three different variations of the 4:2:0 scheme, with different horizontal and vertical positions.

[0079] In MPEG-2, Cb and Cr are horizontally co-located and located between pixels in the vertical direction (interleaved positioning).

[0080] In JPEG / JFIF, H.261, and MPEG-1, Cb and Cr are located midway between alternate luminance samples.

[0081] In 4:2:0 DV, Cb and Cr are co-located horizontally and vertically on alternate lines.

[0082] 2.2 Various video units

[0083] A picture is divided into one or more slice rows and one or more slice columns. A slice is a series of CTUs covering a rectangular area of the picture.

[0084] A slice is divided into one or more bricks, each of which consists of several CTU rows within the slice.

[0085] A slice that is not split into multiple bricks is also called a brick. However, a brick that is a true subset of a slice is not called a slice.

[0086] A strip contains multiple slices of an image or multiple tiles of a slice.

[0087] Two striping modes are supported: raster scan striping and rectangular striping. In raster scan striping, a strip consists of a series of slices in the image's slice raster scan order. In rectangular striping, a strip consists of multiple bricks of the image, which together form a rectangular region of the image. Bricks within a rectangular strip are arranged in the strip's brick raster scan order.

[0088] Figure 1 An example of raster scan striping of a picture is shown, where the picture is divided into 12 blocks and 3 raster scan strips.

[0089] Figure 2 An example of rectangular strip partitioning of a picture is shown, where the picture is divided into 24 slices (6 slice columns and 4 slice rows) and 9 rectangular strips.

[0090] Figure 3 An example of a picture partitioned into slices, bricks, and rectangular strips is shown, where the picture is divided into 4 slices (2 slice columns and 2 slice rows), 11 bricks (the upper left slice contains 1 brick, the upper right slice contains 5 bricks, the lower left slice contains 2 bricks, and the lower right slice contains 3 bricks), and 4 rectangular strips.

[0091] 2.2.1 CTU / CTB Size

[0092] In VVC, the CTU size signaled in SPS by the syntax element log2_ctu_size_minus2 can be as small as 4x4.

[0093] 7.3.2.3 Sequence Parameter Set RBSP Syntax

[0094]

[0095]

[0096] log2_ctu_size_minus2 plus 2 specifies the size of the luma codec tree block for each CTU.

[0097] log2_min_luma_coding_block_size_minus2 plus 2 specifies the minimum luma coding block size.

[0098] The variables CtbLog2SizeY, CtbSizeY, MinCbLog2SizeY, MinCbSizeY, MinTbLog2SizeY, MaxTbLog2SizeY, MinTbSizeY, MaxTbSizeY, PicWidthInCtbsY, PicHeightInCtbsY, PicSizeInCtbsY, PicWidthInMinCbsY, PicHeightInMinCbsY, PicSizeInMinCbsY, PicSizeInSamplesY, PicWidthInSamplesC, and PicHeightInSamplesC are derived as follows:

[0099] CtbLog2SizeY = log2_ctu_size_minus2 + 2 (7-9)

[0100] CtbSizeY = 1 << CtbLog2SizeY (7-10)

[0101] MinCbLog2SizeY = log2_min_luma_coding_block_size_minus2 + 2 (7-11)

[0102] MinCbSizeY = 1 << MinCbLog2SizeY (7-12)

[0103] MinTbLog2SizeY = 2 (7-13)

[0104] MaxTbLog2SizeY = 6 (7-14)

[0105] MinTbSizeY = 1 << MinTbLog2SizeY (7-15)

[0106] MaxTbSizeY = 1 << MaxTbLog2SizeY (7-16)

[0107] PicWidthInCtbsY = Ceil(pic_width_in_luma_samples ÷ CtbSizeY) (7-17)

[0108] PicHeightInCtbsY = Ceil(pic_height_in_luma_samples ÷ CtbSizeY) (7-18)

[0109] PicSizeInCtbsY = PicWidthInCtbsY * PicHeightInCtbsY (7-19)

[0110] PicWidthInMinCbsY = pic_width_in_luma_samples / MinCbSizeY (7-20)

[0111] PicHeightInMinCbsY = pic_height_in_luma_samples / MinCbSizeY (7-21)

[0112] PicSizeInMinCbsY = PicWidthInMinCbsY * PicHeightInMinCbsY (7-22)[[ID=!0]]

[0113] PicSizeInSamplesY = pic_width_in_luma_samples * pic_height_in_luma_samples (7-23)

[0114] PicWidthInSamplesC = pic_width_in_luma_samples / SubWidthC (7-24)

[0115] PicHeightInSamplesC = pic_height_in_luma_samples / SubHeightC (7-25)

[0116] 2.2.2 CTUs in the Picture

[0117] Assume that the CTB / LCU size is indicated by MxN (usually M equals N, as defined in HEVC / VVC), and for a CTB located at the boundary of a picture (or slice, or strip, or other types, taking the picture boundary as an example), KxL samples are within the picture boundary, where K < M or L < N. For Figures 4A-4C those CTBs shown in

[0118] ]>, the CTB size is still equal to MxN. However, the lower / right boundary of the CTB is outside the picture. Figure 4A Shows a CTB spanning the bottom picture boundary. Figure 4B Shows a CTB spanning the right picture boundary. Figure 4C Shows a CTB spanning the lower-right picture boundary.

[0119] Figures 4A-4CShows an example of a CTB that crosses a picture boundary, (a) K=M, L <N;(b)K<M,L=N;(c)K<M,L<N。

[0120] 2.3 Encoding Process of Typical Video Codecs

[0121] Figure 5 An example of a VVC encoder block diagram is shown, which contains three loop filtering blocks: deblocking filter (DF), sample adaptive offset (SAO), and ALF. Unlike DF, which uses a predefined filter, SAO and ALF use the original samples of the current picture to reduce the mean square error between the original and reconstructed samples by adding an offset and applying a finite impulse response (FIR) filter, respectively. The offset and filter coefficients are signaled by the encoded side information. ALF is located at the last processing stage of each picture and can be seen as a tool that attempts to capture and repair artifacts introduced by the previous stage.

[0122] 2.4 Deblocking Filter (DB)

[0123] The input of DB is the reconstructed samples before the loop filter.

[0124] First, vertical edges in the image are filtered. Then, horizontal edges in the image are filtered using the samples modified by the vertical edge filtering process as input. Both vertical and horizontal edges in the CTBs of each CTU are processed on a per-codec-unit basis. Vertical edges of codec blocks in a codec unit are filtered starting from the edge on the left side of the codec block, in their geometric order, moving through the edges toward the right side of the codec block. Horizontal edges of codec blocks in a codec unit are filtered starting from the edge at the top of the codec block, in their geometric order, moving through the edges toward the bottom of the codec block.

[0125] Figure 6 is an illustration of picture samples on an 8x8 grid and horizontal and vertical block boundaries, as well as non-overlapping blocks of 8x8 samples that can be deblocked in parallel.

[0126] 2.4.1 Boundary Decision

[0127] The filter is applied on 8x8 block boundaries. Additionally, it must be a transform block boundary or a codec subblock boundary (e.g. due to the use of affine motion prediction, ATMVP). For those without such boundaries, the filter will be disabled.

[0128] 2.4.1 Boundary strength calculation

[0129] For transform block boundaries / codec sub-block boundaries, if they are located in an 8x8 grid, they can be filtered and the bS[xD] values for the edges are given in Tables 1 and 2, respectively. i ][yDj ] settings (where [xD i ][yD j ] indicates coordinates) are defined.

[0130] Table 1 Boundary strength (when SPS IBC is disabled)

[0131]

[0132] Table 2 Boundary Strength (When SPS IBC is disabled)

[0133]

[0134]

[0135] 2.4.3 Deblocking Decision for Luminance Component

[0136] The deblocking decision process is described in this subsection.

[0137] Figure 7 Examples of pixels involved in filter on / off decisions and strong / weak filter selection are shown.

[0138] The wider, stronger luminance filter is a filter that is used only when Condition 1, Condition 2, and Condition 3 are all true.

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

[0140] bSidePisLargeBlk = ((edge type is vertical, and p0 belongs to a CU with width >= 32) || (edge type is horizontal, and p0 belongs to a CU with height >= 32))? True: False

[0141] bSideQisLargeBlk = ((edge type is vertical, and q0 belongs to a CU with width >= 32) || (edge type is horizontal, and q0 belongs to a CU with height >= 32))? True: False

[0142] Based on bSidePisLargeBlk and bSideQisLargeBlk, Condition 1 is defined as follows.

[0143] Condition1 = (bSidePisLargeBlk || bSidePisLargeBlk)? True: False

[0144] Next, if Condition 1 is true, Condition 2 will be checked. First, export the following variables:

[0145] – First derive dp0, dp3, dq0, dq3 as in HEVC;

[0146] – If (p-side is greater than or equal to 32), then

[0147] dp0=(dp0+Abs(p50-2*p40+p30)+1)>>1

[0148] dp3=(dp3+Abs(p53-2*p43+p33)+1)>>1

[0149] – If (q side is greater than or equal to 32), then

[0150] dq0=(dq0+Abs(q50-2*q40+q30)+1)>>1

[0151] dq3=(dq3+Abs(q53-2*q43+q33)+1)>>1

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

[0153] Where d=dp0+dq0+dp3+dq3.

[0154] If conditions 1 and 2 are valid, it further checks whether any block uses sub-blocks:

[0155]

[0156] Finally, if both conditions 1 and 2 are valid, the proposed deblocking method will check condition 3 (large block strong filter condition), which is defined as follows.

[0157] In condition 3 (StrongFilterCondition), export the following variables:

[0158] dpq is derived as in HEVC.

[0159] As derived in HEVC sp3 = Abs(p3 - p0)

[0160] if (p side is greater than or equal to 32)

[0161] If (Sp == 5)

[0162] sp3=(sp3+Abs(p5-p3)+1)>>1

[0163] otherwise

[0164] sp3=(sp3+Abs(p7-p3)+1)>>1

[0165] As derived in HEVC, sq3 = Abs(q0 - q3)

[0166] if (q side is greater than or equal to 32)

[0167] If (Sq == 5)

[0168] sq3=(sq3+Abs(q5-q3)+1)>>1

[0169] otherwise

[0170] sq3=(sq3+Abs(q7-q3)+1)>>1

[0171] As in HEVC, StrongFilterCondition = (dpq is less than (β>>2), sp3+sq3 is less than (3*β>>5), and Abs(p0-q0) is less than (5*tC+1)>>1)? True: False.

[0172] 2.4.4 Stronger Deblocking Filter for Luma (Designed for Larger Blocks)

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

[0174] Bilinear filters are listed below.

[0175] Then, the block boundary samples pi for i = 0 to Sp-1 and the block boundary samples qi for j = 0 to Sq-1 (pi and qi are the i-th samples in the row for filtering vertical edges or the i-th samples in the column for filtering horizontal edges described in the above HEVC deblocking) are replaced by linear interpolation as shown below:

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

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

[0178] tcPD i and tcPD j is the position-dependent shear described in Section 2.4.7, and g j 、f i 、Middle s,t 、P s and Q s As shown below:

[0179] 2.4.5 Chroma Deblocking Control

[0180] A strong chroma 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 three conditions are met: The first condition is for decision boundary strength and large blocks. The proposed filter can be applied when the block width or height orthogonal to the block edge in the chroma sample domain is equal to or greater than 8. The second and third are essentially the same as the HEVC luma deblocking decisions, namely the on / off decision and the strong filter decision, respectively.

[0181] In the first decision, the boundary strength (bS) of the chroma filter is modified and the conditions are checked in sequence. If a condition is met, the remaining conditions with lower priority are skipped.

[0182] When bS is equal to 2, or bS is equal to 1 when a large block boundary is detected, chroma deblocking is performed.

[0183] The second and third conditions are essentially the same as the HEVC luma strong filter decision as follows.

[0184] Under the second condition:

[0185] d is then derived as in HEVC luma deblocking. The second condition is true when d is less than β.

[0186] In the third condition, StrongFilterCondition is derived as follows:

[0187] As in HEVC, dpq is derived.

[0188] As in HEVC, sp3=Abs(p3-p0) is derived

[0189] As in HEVC, sq3=Abs(q0-q3) is derived

[0190] As in the HEVC design, StrongFilterCondition=(dpq is less than (β>>2), sp3+sq3 is less than (β>>3), and Abs(p0-q0) is less than (5*tC+1)>>1).

[0191] 2.4.6 Strong Deblocking Filter for Chroma

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

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

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

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

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

[0197] 2.4.7 Position-dependent shearing

[0198] Position-dependent clipping (tcPD) is applied to the output samples of a luminance filtering process involving strong and long filters, which modify 7, 5, and 3 samples at the boundaries. Assuming a quantization error distribution, it is proposed to increase the clipping value for samples expected to have higher quantization noise, and thus the reconstructed sample values are expected to deviate more from the true sample values.

[0199] For each P or Q boundary filtered with an asymmetric filter, depending on the result of the decision process in Section 2.4.2, a position-dependent threshold table is selected as side information from the two tables provided to the decoder (e.g., Tc7 and Tc3 listed in the following table):

[0200] Tc7={6,5,4,3,2,1,1}; Tc3={6,4,2};

[0201] tcPD=(Sp==3)? Tc3:Tc7;

[0202] tcQD=(Sq==3)? Tc3:Tc7;

[0203] For P or Q boundaries filtered with a short symmetric filter, a position-dependent threshold of lower magnitude is applied:

[0204] Tc3={3,2,1};

[0205] After defining the threshold, the filtered p'i and q'i sample values are clipped according to the tcP and tcQ clipping values:

[0206] p” i =Clip3(p' i +tcP i ,p' i –tcP i ,p' i );

[0207] q” j =Clip3(q' j +tcQ j ,q' j –tcQ j ,q' j );

[0208] Where p'i and q'i are the sample values after filtering, p"i and q"j are the output sample values after clipping, and tcPi and tcQi are the clipping thresholds derived from the VVC tc parameters and tcPD and tcQD. Function Clip3 is the clipping function specified in VVC.

[0209] 2.4.8 Sub-block Deblocking Adjustment

[0210] To achieve parallel-friendly deblocking using both long filters and sub-block deblocking, as shown in the luma control of the long filter, the long filter is restricted to modifying at most 5 samples on one side where sub-block deblocking (AFFINE or ATMVP or DMVR) is used. Additionally, sub-block deblocking is adjusted so that sub-block boundaries close to CU or implicit TU boundaries on the 8x8 grid are restricted to modifying at most two samples on each side.

[0211] The following applies to sub-block boundaries that are not aligned with CU boundaries.

[0212]

[0213] Where edges equal to 0 correspond to CU boundaries, edges equal to 2 or equal to orthogonalLength-2 correspond to 8 samples from a sub-block boundary, etc. Implicit TU is true if implicit partitioning of TUs is used.

[0214] 2.5 SAO

[0215] The input of SAO is the reconstructed samples after DB. The concept of SAO is to reduce the average sample distortion of the region by first using a selected classifier to classify the region samples into multiple categories, obtaining an offset for each category, and then adding the offset to each sample of the category, where the classifier index and region offset are encoded and decoded in the bitstream. In HEVC and VVC, the region (the unit used for SAO parameter signaling) is defined as a CTU.

[0216] HEVC uses two SAO types to meet low-complexity requirements. These types are edge-offset (EO) and band-offset (BO), which are discussed in further detail below. The index of the SAO type is encoded (in the range [0, 2]). For EO, sample classification is based on comparing the current sample with neighboring samples based on a one-dimensional directional pattern (horizontal, vertical, 135° diagonal, and 45° diagonal).

[0217] Figure 8 Four one-dimensional directional patterns of EO point classification are shown: horizontal (EO category = 0), vertical (EO category = 1), 135° diagonal (EO category = 2), and 45° diagonal (EO category = 3).

[0218] For a given EO category, each sample point within the CTB is classified into one of five categories. The current sample point value, labeled "c," is compared to two adjacent values along the selected one-dimensional pattern. Table I summarizes the classification rules for each sample point. Category 1 and Category 4 are associated with local valleys and local peaks, respectively, along the selected one-dimensional pattern. Category 2 and Category 3 are associated with concave corners and convex corners, respectively, along the selected one-dimensional pattern. If the current sample point does not belong to EO categories 1-4, it is classified as category 0 and SAO is not applied.

[0219] Table 3: Sample point classification rules for edge offset

[0220] category condition 1 c < a and c < b 2 (c<a&&c==b)||(c==a&&c<b) 3 (c>a&&c==b)||(c==a&&c>b) 4 c>a&&c>b 5 None of the above

[0221] 2.6 Geometric Transformation-Based Adaptive Loop Filter

[0222] The input of DB is the reconstructed samples after DB and SAO. Sample classification and filtering are based on the reconstructed samples after DB and SAO.

[0223] In some embodiments, a geometric transform-based adaptive loop filter (GALF) with block-based filter adaptation is applied.For the luma component, one of 25 filters is selected for each 2x2 block based on the direction and activity of the local gradient.

[0224] 2.6.1 Filter Shape

[0225] In some embodiments, up to three diamond filter shapes (e.g., Figure 9 As shown in Figure 2.1 ...

[0226] 2.6.1.1 Block Classification

[0227] Each 2x2 block is classified into one of 25 categories according to its directionality D and the quantized value of activity Derive the classification index C as follows:

[0228]

[0229] To calculate D and First, use the one-dimensional Laplacian equation to calculate the gradients in the horizontal, vertical, and two diagonal directions:

[0230]

[0231]

[0232]

[0233]

[0234] The indices i and j refer to the coordinates of the top left corner sample in the 2x2 block, and R(i,j) indicates the reconstructed sample at coordinates (i,j).

[0235] Then set the maximum and minimum values of the horizontal and vertical gradients to:

[0236]

[0237] And set the maximum and minimum values of the gradients in the two diagonal directions to:

[0238]

[0239] To derive the value of the directionality D, these values are compared with each other and with two thresholds t1 and t2:

[0240] Step 1, if and If both are true, D is set to 0.

[0241] Step 2, if Then continue with step 3; otherwise, continue with step 4.

[0242] Step 3, if Then set D to 2; otherwise, set D to 1.

[0243] Step 4, if Then set D to 4; otherwise, set D to 3.

[0244] The activity value A is calculated as follows:

[0245]

[0246] A is further quantized to the range of 0 to 4 (inclusive), and the quantized value is expressed as

[0247] For the two chroma components in a picture, no classification method is applied, eg, a separate set of ALF coefficients is applied for each chroma component.

[0248] 2.6.1.2 Geometric Transformation of Filter Coefficients

[0249] Figure 10 Shown are the related coordinators supported by a 5×5 diamond filter: left: diagonal, middle: vertical flip, right: rotation.

[0250] Before filtering each 2×2 block, geometric transformations such as rotation, diagonal and vertical flipping are applied to the filter coefficients f(k,l) (associated with the coordinates (k,l)), depending on the gradient values calculated for that block. This is equivalent to applying these transformations to the samples in the filter support region. The idea is to make different blocks to which the ALF is applied become more similar by adjusting their directionality.

[0251] Three geometric transformations including diagonal, vertical flip and rotation are introduced:

[0252]

[0253] Where K is the size of the filter, and 0≤k,l≤K-1 are the coefficient coordinates, such that position (0,0) is in the upper left corner and position (K-1,K-1) is in the lower right corner. Depending on the gradient value calculated for that block, a transform is applied to the filter coefficients f(k,l). Table 4 summarizes the relationship between the transform and the four gradients in the four directions. Figure 9 The transform coefficients for each position based on a 5x5 diamond are shown.

[0254] Table 4: Mapping of gradients and transformations computed for a block

[0255] Gradient value Transform <![CDATA[g d2 <g d1 And g h <g v ]]> No transformation <![CDATA[g d2 <g d1 And g v <g h ]]> diagonal <![CDATA[g d1 <g d2 And g h <g v ]]> Flip vertically <![CDATA[g d1 <g d2 And g v <g h ]]> Rotation

[0256] 2.6.1.3 Filter Parameter Signaling

[0257] In some embodiments, GALF filter parameters are signaled for the first CTU, for example, after its slice header and before the SAO parameters. Up to 25 groups of luma filter coefficients can be signaled. To reduce bit overhead, filter coefficients from different classes can be merged. Additionally, the GALF coefficients of reference pictures are stored and allowed to be reused as the GALF coefficients for the current picture. The current picture can choose to use the GALF coefficients stored for the reference picture and bypass GALF coefficient signaling. In this case, only the index of one of the reference pictures is signaled, and the stored GALF coefficients of the indicated reference picture are inherited for the current picture.

[0258] To support GALF temporal prediction, a candidate list of GALF filter banks is maintained. When decoding a new sequence begins, the candidate list is empty. After decoding a picture, the corresponding filter bank can be added to the candidate list. Once the candidate list reaches the maximum allowable size (e.g., 6), a new filter bank overwrites the oldest bank in decoding order, applying a first-in-first-out (FIFO) rule to updating the candidate list. To avoid duplication, a bank is added to the list only if the corresponding picture does not use GALF temporal prediction. To support temporal scalability, multiple candidate lists of filter banks exist, each associated with a temporal layer. More specifically, each array assigned by a temporal layer index (TempIdx) can be composed of filter banks from a previously decoded picture with a lower TempIdx. For example, the kth array is assigned to be associated with a TempIdx equal to k and contains only filter banks from pictures with a TempIdx less than or equal to k. After encoding a picture, the filter bank associated with the picture will be used to update those arrays associated with equal or higher TempIdx.

[0259] Temporal prediction of the GALF coefficients is used for inter-coded frames to minimize signaling overhead. For intra frames, temporal prediction is not available, and a set of 16 fixed filters is assigned to each class. To indicate the use of fixed filters, a flag for each class is signaled, along with the index of the selected fixed filter if necessary. Even if a fixed filter is selected for a given class, the coefficients f(k,l) of the adaptive filter may still be sent for that class; in this case, the filter coefficients applied to the reconstructed image are the sum of the two sets of coefficients.

[0260] The filtering of the luma component can be controlled at the CU level. A signaling flag is used to indicate whether GALF is applied to the luma component of the CU. For chroma components, whether GALF is applied is indicated only at the picture level.

[0261] 2.6.1.4 Filtering

[0262] At the decoder side, when GALF is enabled for a block, each sample point R(i, j) in the block is filtered to obtain the sample value R'(i, j) as shown below, where L represents the filter length and f m,n represents the filter coefficient, and f(k,l) represents the decoded filter coefficient.

[0263]

[0264] Figure 11 An example of relative coordinates for a 5x5 diamond filter support is shown assuming that the coordinates (i, j) of the current sample point are (0, 0). Samples in different coordinates filled with the same color are multiplied by the same filter coefficient.

[0265] 2.7 Geometric Transformation-Based Adaptive Loop Filter (GALF)

[0266] 2.7.1GALF Example

[0267] In some embodiments, the filtering process of the adaptive loop filter is performed as follows:

[0268] O(x,y)=∑ (i,j) w(i,j).I(x+i,y+j) (11)

[0269] Where the sample I(x+i,y+j) is the input sample, O(x,y) is the output sample after filtering (e.g., the filtering result), and w(i,j) represents the filter coefficient. In practice, in VTM 4.0, it is implemented using integer arithmetic for fixed-point precision calculations:

[0270]

[0271] where L represents the filter length, and where w(i,j) are the filter coefficients in fixed-point precision.

[0272] The current design of GALF in VVC has the following major changes:

[0273] (1) Adaptive filter shapes are removed. Only 7x7 filter shapes are allowed for the luminance component and 5x5 filter shapes are allowed for the chrominance component.

[0274] (2) The signaling of ALF parameters is moved from the slice / picture level to the CTU level.

[0275] (3) The class index calculation is performed at the 4x4 level instead of the 2x2 level. In addition, in some embodiments, a subsampled Laplacian calculation method for ALF classification is utilized. More specifically, the horizontal / vertical / 45 degree diagonal / 135 degree gradient does not need to be calculated for every sample point within a block. Instead, 1:2 subsampling is used.

[0276] Figures 12A-12D The subsampled Laplace calculation of CE2.6.2 is shown. Figure 12A shows the subsampling positions for the vertical gradient, Figure 12B shows the subsampling positions for the horizontal gradient, Figure 12C shows the subsampling positions for diagonal gradients, and Figure 12D The subsampling positions for diagonal gradients are shown.

[0277] 2.8 Nonlinear ALF Example

[0278] 2.8.1 Filter Reformulation

[0279] Equation (11) can be reorganized in the following expression without affecting the encoding and decoding efficiency:

[0280] O(x,y)=I(x,y)+∑ (i,j)≠(0,0) w(i,j)×(I(x+i,y+j)-I(x,y)) (13)

[0281] Here, w(i,j) is the same filter coefficient as in formula (11) [it is expected that w(0,0) is equal to 1 in formula (13) and is equal to 1-∑ (i,j)≠(0,0) w(i,j)].

[0282] Using the filter formula of (13) above, VVC introduces nonlinearity to make the ALF more efficient by using a simple clipping function to reduce the influence of neighboring sample values (I(x+i,y+j)) when the neighboring sample values are significantly different from the sample value currently being filtered (I(x,y)).

[0283] More specifically, the ALF filter is modified as follows:

[0284] O′(x,y)=I(x,y)+∑ (i,j)≠(0,0) w(i,j)×K(I(x+i,y+j)-I(x,y),k(i,j))(14)

[0285] Here, K(d,b)=min(b,max(-b,d)) is the shearing function, and k(i,j) is the shearing parameter that depends on the (i,j) filter coefficients. The codec performs an optimization to find the optimal k(i,j).

[0286] In some embodiments, a clipping parameter k(i,j) is specified for each ALF filter, and one clipping value is signaled for each filter coefficient. This means that up to 12 clipping values can be signaled in the bitstream for each luma filter and up to 6 clipping values can be signaled in the bitstream for each chroma filter.

[0287] In order to limit the signaling cost and codec complexity, only 4 fixed values are used which are the same for both INTER and INTRA slices.

[0288] Since the variance of local differences for luma is typically higher than for chroma, two different sets of filters are applied for luma and chroma. A maximum sample value (here 1024 for 10-bit depth) can also be introduced in each set so that clipping can be disabled when not necessary.

[0289] The set of clipping values used in some embodiments is provided in Table 5. The four values were chosen by dividing the full range of sample values for luma (encoded at 10 bits) and the range of chroma from 4 to 1024 approximately equally in the logarithmic domain.

[0290] More precisely, the brightness table of the clipped values has been obtained by the following formula:

[0291] Where M = 2 10 And N = 4. (15)

[0292] Similarly, the chromaticity table of the clipping value is obtained according to the following formula:

[0293] Where M = 2 10 , N = 4 and A = 4. (16)

[0294] Table 5: Approved shear values

[0295]

[0296] The selected clipping value is encoded in the "alf_data" syntax element by using the Golomb coding scheme corresponding to the index of the clipping value in the above Table 2. This coding scheme is the same as that of the filter index.

[0297] 2.9 Virtual Boundary

[0298] In both hardware and embedded software, image-based processing is practically unacceptable due to its high requirements for image buffers. Using an on-chip image buffer is very expensive, while using an off-chip one significantly increases external memory accesses, power consumption, and data access latency. Therefore, in actual products, DF, SAO, and ALF will transition from image-based decoding to LCU-based decoding. When LCU-based processing is used for DF, SAO, and ALF, the entire decoding process can be performed by the LCU in a raster scan, using an LCU pipeline to process multiple LCUs in parallel. In this case, DF, SAO, and ALF require a line buffer because processing one LCU row requires pixels from the upper LCU row. Using an off-chip line buffer (such as DRAM) increases external memory bandwidth and power consumption; using an on-chip line buffer (such as SRAM) increases chip area. Therefore, although the line buffer is already much smaller than the picture buffer, it is still necessary to reduce the line buffer size.

[0299] In some embodiments, as Figure 13 As shown, the total number of line buffers required for the luma component is 11.25 lines. The line buffer requirement is explained as follows: Since the decision and filtering require lines K, L, M, M from the first CTU and lines O, P from the bottom CTU, horizontal edges overlapping the CTU edges cannot be deblocked. Therefore, deblocking of horizontal edges overlapping the CTU edges is postponed until the CTU below appears. Therefore, for lines K, L, M, N, the reconstructed luma samples must be stored in the line buffer (4 lines). Then SAO filtering is performed on lines A to J. Since deblocking does not change the samples of line K, line J can be SAO filtered. For SAO filtering of line K, the edge offset classification decision is only stored in the line buffer (i.e. 0.25 luma lines). ALF filtering can only be performed on line AF. As shown Figure 13 As shown, ALF classification is performed on each 4x4 block. Each 4x4 block classification requires an activity window of size 8x8, which in turn requires a 9x9 window to calculate the one-dimensional Laplacian to determine the gradient.

[0300] Therefore, for block classification of 4x4 blocks overlapping with lines G, H, I, and J, the SAO filtered samples below the virtual boundary are required. In addition, ALF classification requires the SAO filtered samples of lines D, E, and F. Furthermore, ALF filtering of line G requires the three SAO filtered lines D, E, and F from the lines above. Therefore, the total line buffer requirements are as follows:

[0301] - Rows KN (horizontal DF pixels): 4 rows

[0302] - Row DJ (SAO filtered pixels): 7 rows

[0303] - SAO edge offset classifier value between row J and row K: 0.25

[0304] Therefore, the total number of luma rows required is 7+4+0.25=11.25.

[0305] Similarly, in Figure 14 The line buffer requirement for the chroma components is shown in . The line buffer requirement for the chroma components is estimated to be 6.25 lines.

[0306] In order to alleviate the requirements of SAO and ALF on the line buffer, the concept of virtual boundary (VB) is introduced in the latest VVC. Figure 13 As shown, VB is the horizontal LCU boundary moved up by N pixels. For each LCU, SAO and ALF can process pixels above VB before the lower LCU appears, but cannot process pixels below VB before the lower LCU appears, which is caused by DF. Considering the hardware implementation cost, the space between VB and the horizontal LCU boundary is recommended to be set to four pixels of luminance (e.g., Figure 13 N=4 in ) and two pixels of chrominance (e.g., Figure 9 N=2 in this example).

[0307] 2.9.1 Modified ALF block classification when VB size N is 4

[0308] Figures 15A-15B Describes the modified block classification when the virtual boundary is 4 lines above the CTU boundary (N=4). Figure 15A As shown, for a 4x4 block starting from row G, block classification uses only rows E to J. However, for samples belonging to row J, the Laplacian gradient calculation requires another row below (row K). Therefore, row K is padded with row J.

[0309] Similarly, if Figure 15B As shown, for a 4x4 block starting from row K, block classification only uses rows K to P. However, for samples belonging to row K, the Laplacian gradient calculation requires another row above (row J). Therefore, row J is padded with row K.

[0310] 2.9.2 Filling on both sides of virtual boundary points

[0311] like Figures 16A-16C As shown in , a truncated version of the filter is used to filter the luma samples belonging to rows close to the virtual boundary. Figure 16A For example, when filtering Figure 13When at the shown line M, for example, the central sample point of the 7x7 diamond support is in line M. It needs to access a line above VB (represented by the bold line). In this case, the sample points above VB are copied from the lower right sample points below VB. For example, the solid-line P0 sample point is copied to the upper dotted-line position. Symmetrically, the solid-line P3 sample point is also copied to the lower right dotted-line position, even if the sample point at that position is available. The copied sample points are only used for luminance filtering processing.

[0312] The filling method for the ALF virtual boundary can be expressed as "filling on both sides", where, if filling a sample point at (i, j) (for example, Figure 16B P0A in the dotted line in ), the corresponding sample point sharing the same filtering coefficient at (m, n) (for example, Figure 16B P3B in the dotted line) is also filled, even if the sample point is available, as Figures 16A-16C and Figures 17A-17B shown. In Figures 16A-16C for the 7x7 diamond filter support, the center is the current sample point to be filtered. Figure 16A shows a line above / below VB that needs to be filled. Figure 16B shows 2 lines above / below VB that need to be filled. Figure 16C shows 3 lines above / below VB that need to be filled.

[0313] Similarly, as Figures 17A-17B shown, the filling-on-both-sides method is also used for chrominance ALF filtering. Figures 17A-17B shows the modified chrominance ALF filtering at the virtual boundary (5x5 diamond filter support, the center is the current sample point to be filtered). Figure 17A shows 1 line above / below VB that needs to be filled. Figure 17B shows 2 lines above / below VB that need to be filled.

[0314] 2.9.3 Alternative method for implementing filling on both sides when non-linear ALF is disabled

[0315] When CTB disables non-linear ALF, for example, when the clipping parameter k(i, j) in equation (14) is equal to (1<<Bitdepth), the filling process can be replaced by modifying the filter coefficients (i.e., ALF based on modified coefficients, MALF). For example, when filtering a sample point in line L / I, the filter coefficient c5 is modified to c5'. In this case, there is no need to copy the luminance sample points from the solid-line P0A to the dotted-line P0A, and from the solid-line P3B to the dotted-line P3B, as [[ID=​​​c5.K(I(x-1,y-1)-I(x,y),k(-1,-1))+c1.K(I(x-1,y-2)-I(x,y),k(-1,-2))=(c5+c1).K(I(x-1,y-1)-I(x,y),k(-1,-1)) (17)

[0317] Because due to padding, K(d,b)=d and I(x-1,y-1)=I(x-1,y-2).

[0318] However, when nonlinear ALF is enabled, MALF and two-sided padding may produce different filtering results because nonlinear parameters are associated with each coefficient, e.g., the clipping parameters are different for filter coefficients c5 and c1.

[0319] c5.K(I(x-1,y-1)-I(x,y),k(-1,-1))+c1.K(I(x-1,y-2)-I(x,y),k(-1,-2))! =(c5+c1).K(I(x-1,y-1)-I(x,y),k(-1,-1)) (18)

[0320] Because due to padding, even though I(x-1, y-1) = I(x-1, y-2), K(d, b) != d.

[0321] 2.10 ALF Filtering Specifications

[0322] Newly added parts are indicated by bold, italic, and underlined text. Deleted parts are indicated by [[ ]].

[0323] 7.3.2.4 Picture Parameter Set RBSP Syntax

[0324]

[0325]

[0326]

[0327] loop_filter_across_bricks_enabled_flag equal to 1 specifies that loop filtering operations may be performed across brick boundaries in pictures that reference the PPS. loop_filter_across_bricks_enabled_flag equal to 0 specifies that loop filtering operations may not be performed across brick boundaries in pictures that reference the PPS. Loop filtering operations include deblocking filtering, sample adaptive offset filtering, and adaptive loop filtering operations. When not present, the value of loop_filter_across_bricks_enabled_flag is inferred to be 1.

[0328] loop_filter_across_slices_enabled_flag equal to 1 specifies that loop filtering operations can be performed across slice boundaries in pictures that reference the PPS. loop_filter_across_slices_enabled_flag equal to 0 specifies that loop filtering operations are not performed across slice boundaries in pictures that reference the PPS. Loop filtering operations include deblocking filtering, sample adaptive offset filtering, and adaptive loop filtering operations. If not present, the value of loop_filter_across_slices_enabled_flag is inferred to be 0.

[0329] pps_loop_filter_across_virtual_boundaries_disabled_flag equal to 1 specifies that loop filtering operations across virtual boundaries are disabled in pictures that reference the PPS. pps_loop_filter_across_virtual_boundaries_disabled_flag equal to 0 specifies that such loop filtering operations across virtual boundaries are not disabled in pictures that reference the PPS. Loop filtering operations include deblocking filtering, sample adaptive offset filtering, and adaptive loop filtering operations. If not present, pps_loop_filter_across_virtual_boundaries_disabled_flag is inferred to be 0.

[0330] pps_num_ver_virtual_boundaries specifies the number of pps_virtual_boundaries_pos_x[i] syntax elements present in the PPS. If pps_num_ver_virtual_boundaries is not present, it is inferred to be equal to 0.

[0331] 8.8.5.2 Codec Tree Block Filtering for Luma Samples

[0332] The inputs to this process are:

[0333] – the reconstructed luminance picture sample array recPictureL before adaptive loop filtering processing,

[0334] – The filtered reconstructed luminance picture sample array alfPictureL,

[0335] - Luma position (xCTB, yCTB), which specifies the top left corner sample of the current luma codec treeblock relative to the top left corner sample of the current picture.

[0336] The output of this process is the modified filtered reconstructed luminance picture sample array alfPictureL.

[0337] Call the filter index derivation process in Section 8.8.5.3 with the position (xCtb, yCtb) and the reconstructed luma picture sample array recPictureL as input, and output filtIdx[x][y] and transposeIdx[x][y] (x, y = 0..CtbSizeY-1).

[0338] For the derivation of the filtered reconstructed luma sample alfPictureL[x][y], each reconstructed luma sample recPictureL[x][y] (x, y = 0..CtbSizeY–1) in the current luma codec tree block is filtered as follows:

[0339] – The array f[j] of luma filter coefficients and the array c[j] of luma clipping values corresponding to the filter specified by filtIdx[x][y] are derived as follows, where j = 0..11:

[0340] – If AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] is less than 16, the following applies:

[0341] i=AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] (8-1172)

[0342] f[j]=AlfFixFiltCoeff[AlfClassToFiltMap[i][filtidx]][j] (8-1173)

[0343] c[j]=2 BitdepthY (8-1174)

[0344] – Otherwise (AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] is greater than or equal to 16, then the following applies:

[0345] i=slice_alf_aps_id_luma[AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]-16] (8-1175)

[0346] f[j]=AlfCoeff L[i][filtIdx[x][y]][j] (8-1176)

[0347] c[j]=AlfClip L [i][filtIdx[x][y]][j] (8-1177)

[0348] – Luma filter coefficients and shear value index idx depend on transposeIdx[x][y] and are derived as follows:

[0349] – If transposeIndex[x][y] is equal to 1, then the following applies:

[0350] idx[]={9,4,10,8,1,5,11,7,3,0,2,6} (8-1178)

[0351] – Otherwise, if [x][y] is equal to 2, then the following applies:

[0352] idx[]={0,3,2,1,8,7,6,5,4,9,10,11} (8-1179)

[0353] – Otherwise, if transposeIndex[x][y] is equal to 3, then the following applies:

[0354] idx[]={9,8,10,4,3,7,11,5,1,0,2,6} (8-1180)

[0355] – Otherwise, the following applies:

[0356] idx[]={0,1,2,3,4,5,6,7,8,9,10,11} (8-1181)

[0357] – The position (h) of each corresponding luminance sample (x, y) in the array recPicture of given luminance samples x+i ,v y+j )(i,j=-3..3) is derived as follows:

[0358] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtb+x-PpsVirtualBoundariesPosX[n] is greater than or equal to 0 and less than 3, the following applies:

[0359] h x+i=Clip3(PpsVirtualBoundariesPosX[n],pic_width_in_luma_samples-1,xCtb+x+i) (8-1182)

[0360] – Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n]-xCtb-x is greater than 0 and less than 4, the following applies:

[0361] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n]-1,xCtb+x+i) (8-1183)

[0362] – Otherwise, the following applies:

[0363] h x+i =Clip3(0,pic_width_in_luma_samples-1,xCtb+x+i) (8-1184)

[0364] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtb+y−PpsVirtualBoundariesPosY[n] is greater than or equal to 0 and less than 3, the following applies:

[0365] v y+j =Clip3(PpsVirtualBoundariesPosY[n],pic_height_in_luma_samples-1,yCtb+y+j) (8-1185)

[0366] Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n]-yCtb-y is greater than 0 and less than 4, the following applies:

[0367] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n]-1,yCtb+y+j) (8-1186)

[0368] – Otherwise, the following applies:

[0369] v y+j =Clip3(0,pic_height_in_luma_samples-1,yCtb+y+j) (8-1187)

[0370]

[0371] – Based on the horizontal luma sample position y and applyVirtualBoundary, the reconstructed sample offsets r1, r2 and r3 are specified in Table 8-22.

[0372] –The variable curr is exported as follows:

[0373] curr=recPicture L [h x ,v y ] (8-1188)

[0374] –The variable sum is exported as follows:

[0375]

[0376] –sum=curr+((sum+64)>>7) (8-1190)

[0377] – The modified filtered reconstructed luminance samples alfPictureL[xCtb+x][yCtb+y] are derived as follows:

[0378] – If pcm_loop_filter_disabled_flag and pcm_flag[xCtb+x][yCtb+y] are both equal to 1, the following applies:

[0379] alfPictureL[xCtb+x][yCtb+y]=recPictureL[hx,vy] (8-1191)

[0380] – Otherwise (pcm_loop_filter_disabled_flag is equal to 0 or pcm_flag[x][y] is equal to 0), the following applies:

[0381] alfPictureL[xCtb+x][yCtb+y]=Clip3(0,(1< <BitDepthY)-1,sum) (8-1192)

[0382] Table 8-22 Specifications of r1, r2, and r3 based on horizontal luminance sample position y and applyVirtualBoundary

[0383]

[0384] 8.8.5.4 Codec Tree Block Filtering for Chroma Samples

[0385] The inputs to this process are:

[0386] – the reconstructed chroma picture sample array recPicture before adaptive loop filtering processing,

[0387] – The filtered reconstructed chroma picture sample array alfPicture,

[0388] – Chroma position (xCtbC, yCtbC), which specifies the top left corner sample of the current chroma codec treeblock relative to the top left corner sample of the current picture.

[0389] The output of this process is the modified filtered reconstructed chrominance picture sample array alfPicture.

[0390] The width and height ctbWidthC and ctbHeightC of the current chroma codec tree block are derived as follows:

[0391] ctbWidthC=CtbSizeY / SubWidthC (8-1230)

[0392] ctbHeightC=CtbSizeY / SubHeightC (8-1231)

[0393] To derive the filtered reconstructed chroma samples alfPicture[x][y], each reconstructed chroma sample recPicture[x][y] in the current chroma codec treeblock is filtered as follows, where x = 0..CTBWidthC-1 and y = 0..CTBHeightC-1:

[0394] – The position (h) of each corresponding chroma sample (x, y) in the given chroma sample array recPicture x+i ,v y+j ) is derived as follows, where i,j = -2..2:

[0395] – For any n = 0..pps_num_ver_virtual_boundaries-1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtbC+x-PpsVirtualBoundariesPosX[n] / SubWidthC is greater than or equal to 0 and less than 2, the following applies:

[0396] h x+i =Clip3(PpsVirtualBoundariesPosX[n] / SubWidthC, (8-1232)

[0397] pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i)

[0398] Otherwise, for any n = 0..pps_num_ver_virtual_boundaries-1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n] / SubWidthC-xCtbC-x is greater than 0 and less than 3, the following applies:

[0399] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n] / SubWidthC-1,xCtbC+x+i)

[0400] (8-1233)

[0401] – Otherwise, the following applies:

[0402] h x+i =Clip3(0,pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i)(8-1234)

[0403] – For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtbC+y−PpsVirtualBoundariesPosY[n] / SubHeightC is greater than or equal to 0 and less than 2, the following applies:

[0404] v y+j =Clip3(PpsVirtualBoundariesPosY[n] / SubHeightC, (8-1235)

[0405] pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)

[0406] Otherwise, for any n = 0..pps_num_hor_virtual_boundaries-1 if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n] / SubHeightC-yCtbC-y is greater than 0 and less than:

[0407] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n] / SubHeightC-1,yCtbC+y+j)

[0408] (8-1236)

[0409] – Otherwise, the following applies:

[0410] v y+j =Clip3(0,pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)

[0411] (8-1237)

[0412] –The variable applyVirtualBoundary is derived as follows:

[0413] – Based on the horizontal luma sample position y and applyVirtualBoundary, the reconstructed sample offsets r1 and r2 are specified in Table 8-22.

[0414] –The variable curr is exported as follows:

[0415] curr=recPicture[h x ,v y ] (8-1238)

[0416] – The array f[j] of chroma filter coefficients and the array c[j] of chroma clipping values are derived as follows, where j = 0..5:

[0417] f[j]=AlfCoeff C [slice_alf_aps_id_chroma][j] (8-1239)

[0418] c[j]=AlfClip C [slice_alf_aps_id_chroma][j] (8-1240)

[0419] –The variable um is derived as follows:

[0420]

[0421] sum=curr+(sum+64)>>7) (8-1242)

[0422] – The modified filtered reconstructed chrominance picture samples alfPicture[xCtbC+x][yCtbC+y] are derived as follows:

[0423] – If pcm_loop_filter_disabled_flag and pcm_flag[(xCtbC+x)*SubWidthC][(yCtbC+y)*SubHeightC] are both equal to 1, the following applies:

[0424] alfPicture[xCtbC+x][yCtbC+y]=recPicture L [h x ,v y ] (8-1243)

[0425] – Otherwise (pcm_loop_filter_disabled_flag is equal to 0 or pcm_flag[x][y] is equal to 0), the following applies alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepth C )-1,sum)(8-1244)

[0426] 2.11 Example of CTU Processing

[0427] According to the current VVC design, if the lower boundary of a CTB is the lower boundary of a stripe / brick, the ALF virtual boundary processing method is disabled. Figure 19 As shown, a picture is divided into multiple CTUs and 2 slices.

[0428] Assuming a CTU size of MxM (e.g., M=64), the last 4 rows within a CTB are considered to be below the virtual boundary according to the virtual boundary definition. In hardware implementation, the following applies:

[0429] - If the lower boundary of the CTB is the lower boundary of the picture (e.g. CTU-D), it processes an (M+4)×M block, including the 4 rows above the CTU row and all rows in the current CTU.

[0430] Otherwise, if the lower boundary of the CTB is the lower boundary of a slice (or brick) (e.g., CTU-C), and loop_filter_across_slice_enabled_flag (or loop_filter_across_bricks_enabled_flag) is equal to 0, then process (M+4)×M blocks, including the 4 rows from the CTU row above and all rows in the current CTU.

[0431] Otherwise, if the CTU / CTB is located in the first CTU in the slice / brick / slice (e.g., CTU-A), then process the M×(M-4) block, excluding the last 4 rows.

[0432] Otherwise, if the CTU / CTB is not in the first CTU row of the slice / brick / slice (e.g., CTU-B) nor in the last CTU of the slice / brick / slice, process the M×M block including the 4 rows above the CTU row but excluding the last 4 rows in the current CTU.

[0433] Figure 19 An example of processing of CTUs in a picture is shown.

[0434] 2.12 360-degree video encoding and decoding

[0435] Horizontal surround motion compensation in VTM5 is a 360-degree-specific codec tool designed to improve the visual quality of reconstructed 360-degree video represented in the equirectangular (ERP) projection format. In traditional motion compensation, when a motion vector points to a sample outside the picture boundaries of a reference image, padding is applied by copying the nearest neighboring point on the corresponding picture boundary to derive the value of the sample outside the boundary. This padding approach is inappropriate for 360-degree video and can produce visual artifacts known as "seam artifacts" in the reconstructed viewport video. Because 360-degree video is captured on a sphere and inherently has no "boundaries," reference samples beyond the reference picture boundaries in the projection domain can always be obtained from neighboring samples in the spherical domain. For general projection formats, deriving corresponding neighboring samples in the spherical domain can be difficult because it involves 2D-to-3D and 3D-to-2D coordinate conversions, as well as sample interpolation at fractional sample positions. This problem is much simpler for the left and right boundaries of the ERP projection format, because the spherical neighbors outside the left image boundary can be obtained from the samples inside the right image boundary, and vice versa.

[0436] Figure 20 An example of horizontal surround motion compensation in VVC is shown.

[0437] Horizontal surround motion compensation processing such as Figure 20 When a portion of the reference block is outside the left (or right) border of the reference picture in the projection domain, instead of repeat padding, the "outside border" portion is taken from the corresponding spherical neighbor of the reference, which is the corresponding spherical neighbor of the reference picture towards the right (or left) border of the projection domain. Repeat padding is only used for top and bottom picture boundaries. Figure 20 As shown, horizontal surround motion compensation can be combined with non-canonical padding methods commonly used in 360-degree video codecs. In VVC, this is achieved by signaling a high-level syntax element to indicate a surround offset, which should be set to the ERP picture width before padding; the syntax is used to adjust the position of the horizontal surround accordingly. This syntax is not affected by the specific amount of padding on the left and right picture boundaries, so it naturally supports asymmetric padding of ERP pictures, for example, when the left and right padding are different. Horizontal surround motion compensation provides more meaningful information for motion compensation when the reference samples are outside the left and right boundaries of the reference picture.

[0438] For projection formats consisting of multiple planes, no matter what compact frame packing arrangement is used, there will be discontinuities between two or more adjacent planes in the frame-compressed picture. For example, considering Figure 24In the 3×2 frame packing configuration shown, the three faces in the upper half are continuous in 3D geometry, and the three faces in the lower half are continuous in 3D geometry, but the upper and lower halves of the frame-packed picture are discontinuous in 3D geometry. If a loop filtering operation is performed on this discontinuity, face seam artifacts can be seen in the reconstructed video.

[0439] To mitigate face seam artifacts, in-loop filtering can be disabled across discontinuities in frame-packed pictures. A syntax is proposed to signal vertical and / or horizontal virtual boundaries at which in-loop filtering is disabled. Compared to using two slices (one for each set of contiguous faces) and disabling in-loop filtering on a slice, the proposed signaling method is more flexible because it does not require the face size to be a multiple of the CTU size.

[0440] 2.13 Example of motion-constrained independent regions based on sub-images

[0441] In some embodiments, the following features are included:

[0442] 1) Pictures can be divided into sub-pictures.

[0443] 2) An indication in the SPS indicating the presence of a sub-picture, along with other sequence-level information about the sub-picture.

[0444] 3) In the decoding process (excluding loop filtering operations), whether a sub-picture is regarded as a picture can be controlled by the bitstream.

[0445] 4) Whether to disable loop filtering across sub-picture boundaries can be controlled by the bitstream of each sub-picture. DBF, SAO and ALF processing are updated to control loop filtering operations across sub-picture boundaries.

[0446] 5) For simplicity, as a starting point, the width, height, horizontal offset and vertical offset of the sub-picture are signaled in units of luma samples in the SPS. The sub-picture boundaries are constrained to be slice boundaries.

[0447] 6) Specify that sub-pictures are treated as pictures in the decoding process (excluding loop filtering operations) by slightly updating the codec tree unit () syntax and updating to the following decoding process:

[0448] o (Advanced) Derivation of temporal luminance motion vector prediction

[0449] ο Bilinear interpolation of luminance samples

[0450] ο Luminance sample point 8-tap interpolation filtering processing

[0451] ο Chroma sample interpolation processing

[0452] 7) Explicitly specify the sub-picture ID in the SPS and include it in the slice group header to allow extraction of the sub-picture sequence without changing the VCL NAL unit.

[0453] Output Subpicture Set (OSPS) is proposed to specify the standard extraction and consistency points of subpictures and their sets.

[0454] 3. Technical issues solved by the solutions provided in this article

[0455] The current VVC design has the following problems:

[0456] 1. Enable the current setting of ALF virtual boundary depends on whether the lower boundary of CTB is the lower boundary of the picture. If true, ALF virtual boundary is disabled, such as Figure 19 However, the bottom boundary of the CTB may be outside the lower boundary of the picture, for example, a 256x240 picture is divided into 4 128x128 CTUs. In this case, the ALF virtual boundary will be incorrectly set to true for the last 2 CTUs with samples outside the lower boundary of the picture.

[0457] 2. For the bottom picture boundary and the slice / slice / brick boundary, the way to handle ALF virtual boundaries is disabled. Disabling VB along the slice / brick boundary may cause pipeline bubbles or require processing 68 lines for each virtual pipe data unit (VPDU, 64x64 in VVC) (assuming LCU size is 64x64). For example:

[0458] a. For decoders that do not know the slice / brick / slice boundaries in advance (such as low-latency applications), it is necessary to recover the ALF line buffer. Whether the contents of the line buffer are used for ALF filtering depends on whether the current CTU is also a slice / brick / slice boundary CTU. However, this information is unknown before decoding the next slice / brick / slice.

[0459] b. For decoders with pre-known stripe / brick / slice boundaries, either the decoder needs to coexist with pipeline bubbles (very unlikely) or always run the ALF at 68 lines per 64x64 VDPU (over-provisioning) to avoid using the ALF line buffer.

[0460] 3. There are different methods for handling virtual boundaries and video unit boundaries, for example, different filling methods. At the same time, when a line is at multiple boundaries, multiple filling methods can be performed on it.

[0461] a. In one example, if the lower boundary of a block is a 360-degree virtual boundary and the ALF virtual boundary is also applied to the block, in this case, the filling method of the 360-degree virtual boundary can be first applied to generate virtual samples below the 360-degree virtual boundary. Then, these virtual samples below the 360-degree virtual boundary are considered to be available. And according to Figure 16A -C can further apply the ALF double-sided padding method. Figure 25 An example is depicted in .

[0462] 4. The method for handling virtual boundaries may be suboptimal because padding samples are used, which may be less efficient.

[0463] 5. When nonlinear ALF is disabled, MALF and both-side padding methods will produce the same results for filtering samples that need to access samples that cross virtual boundaries. However, when nonlinear ALF is enabled, the two methods produce different results. It is beneficial to unify these two cases.

[0464] 6. The strips can be rectangular or non-rectangular, e.g. Figure 28 As shown. In this case, for a CTU, it may not conform to any boundary (e.g., picture / slice / slice / brick). However, it may need to access samples outside the current slice. If filtering across slice boundaries is disabled (e.g., loop_filter_across_slices_enabled_flag is false), it is unknown how ALF classification and filtering are performed.

[0465] 7. A sub-picture is a rectangular region of one or more strips within a picture. A sub-picture contains one or more strips that together cover a rectangular region of the picture. The syntax table has been modified as follows to include the concept of a sub-picture (bold, italic, and underlined).

[0466] 7.3.2.3 Sequence Parameter Set RBSP Syntax

[0467]

[0468]

[0469] It should be noted that enabling filtering across sub-pictures is controlled per sub-picture. However, enabling filtering across slices / slices / bricks is controlled at the picture level and is signaled once to control all slices / slices / bricks within a picture.

[0470] 8.ALF classification is performed in 4x4 units, that is, all samples within a 4x4 unit share the same classification result. However, to be more precise, the gradients of the samples in the 8x8 window containing the current 4x4 block need to be calculated. In this case, 10x10 samples need to be accessed, such as Figure 30 If some samples are located in different video units (e.g., different strips / slices / tiles / sub-pictures above or to the left or right or below the "360 virtual boundary" / above or below the "ALF virtual boundary"), it is necessary to define how to calculate the classification.

[0471] 4. Examples of Techniques and Embodiments

[0472] The following items should be considered examples to explain general concepts. The listed techniques should not be interpreted narrowly. Furthermore, these techniques can be combined in any way.

[0473] The padding method for the ALF virtual boundary can be expressed as "pad on both sides", where if a sample at (i, j) is filled, then the corresponding sample at (m, n) sharing the same filter coefficient is also filled even if the sample is available, as shown in Figure 12A-13 shown.

[0474] The padding method for picture boundaries / 360-degree video virtual boundaries, normal boundaries (e.g., top and bottom boundaries) can be expressed as "one-side padding", where if a sample to be used is outside the boundary, it is copied from an available sample inside the picture.

[0475] The padding method used for the left and right boundaries of a 360-degree video can be expressed as "surround reference padding," where if a sample to be used is outside the boundary, the sample is copied using the motion compensation result.

[0476] In the following discussion, a sample being "at the boundary of a video unit" may mean that the distance between the sample and the boundary of the video unit is less than or not greater than a threshold. A "row" may refer to samples at the same horizontal position or samples at the same vertical position. (For example, samples in the same row and / or samples in the same column). The function Abs(x) is defined as follows:

[0477]

[0478] In the following discussion, "virtual samples" refer to generated samples that may be different from the reconstructed samples (which may have been processed by deblocking and / or SAO). Virtual samples can be used to perform ALF on another sample. Virtual samples can be generated by padding.

[0479] "Enable ALF virtual boundary processing method for a block" may indicate that applyVirtualBoundary in the specification is set to true. "Enable virtual boundary" may indicate that the current block is divided into at least two parts by a virtual boundary, and samples in one part are not allowed to use samples in the other part during filtering (e.g., ALF). The virtual boundary can be K rows above the lower boundary of a block.

[0480] In the following description, adjacent samples may be samples required for filter classification and / or filtering processing.

[0481] In this disclosure, a neighboring sample is “unavailable” if it is outside the current picture, or current sub-picture, or current slice, or current slice, or current tile, or current CTU, or current processing unit (e.g., ALF processing unit or narrow ALF processing unit), or any other current video unit.

[0482] 1. Replace the determination of “the lower boundary of the current codec tree block is the lower boundary of the picture” with “the lower boundary of the current codec tree block is the lower boundary of the picture or is outside the picture”.

[0483] a. Optionally, furthermore, in this case the ALF virtual boundary handling method may be disabled.

[0484] 2. Whether to enable the use of virtual samples in the loop filtering process (eg, whether to enable virtual boundaries (eg, setting applyVirtualBoundary to true or false)) may depend on the CTB size. Apply Virtual Boundary

[0485] a. In one example, for a given CTU / CTB size, eg, for a CTU / CTB size equal to KxL (eg, K=L=4), applyVirtualBoundary is always set to false.

[0486] b. In one example, for certain CTU / CTB sizes not greater than or less than KxL (eg, K=L=8), applyVirtualBoundary is always set to false.

[0487] c. Optionally, ALF is disabled for certain CTU / CTB sizes (such as 4x4, 8x8).

[0488] 3. Whether to enable the use of virtual samples (e.g., filling from reconstructed samples) in the loop filtering process (e.g., ALF) may depend on whether the lower boundary of the block is the lower boundary of a video unit with finer granularity than a picture (e.g., a slice / tile / brick) or a virtual boundary.

[0489] a. In one example, if the lower boundary of a codec tree block (CTB) is a boundary of a video unit or a virtual boundary, an ALF virtual boundary handling method may be enabled for the codec tree block (CTB) (eg, set applyVirtualBoundary to true).

[0490] i. Additionally, optionally, if the lower border is not the bottom picture border or if the lower border is outside the picture, the above method is invoked.

[0491] b. When the lower boundary of the current codec tree block is one of the bottom virtual boundaries of the picture and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1, the ALF virtual boundary handling method can still be enabled (eg, set applyVirtualBoundary to true).

[0492] c. In one example, whether the ALF virtual boundary processing method is enabled for a CTB (eg, the value of applyVirtualBoundary) may depend solely on the relationship between the lower boundary of the CTB and the lower boundary of the picture.

[0493] i. In one example, applyVirtualBoundary is set to false only if the lower boundary of the CTB is the lower boundary of the picture containing the CTB or if the lower boundary is outside the picture.

[0494] ii. In one example, when the lower boundary of the CTB is not the lower boundary of the picture containing the CTB, applyVirtualBoundary is set to true.

[0495] d. In one example, when decoding Figures 18A-18B When the CTU-C in the CTU is used, the M×M samples can be filtered with the K rows above the CTU and the K rows below the virtual boundary are excluded.

[0496] 4. It is recommended to disable the use of samples across brick / slice boundaries in the filtering process (e.g., ALF), even if the loop filter signaling control use flag across brick / slice boundaries (e.g., loop_filter_across_bricks_enabled_flag / loop_filter_across_slices_enabled_flag) is true.

[0497] a. Optionally, in addition, the signaled loop_filter_across_bricks_enabled_flag / loop_filter_across_slices_enabled_flag may control only the filtering process of the deblocking filter and SAO in addition to the ALF.

[0498] b. In one example, a virtual sample point may be used to replace the reconstructed sample point at the corresponding position to perform ALF on another sample point.

[0499] 5. When a block (e.g., CTB) contains samples located at a video unit boundary (e.g., a slice / brick / tile / 360-degree video virtual or normal boundary / picture boundary), how to generate virtual samples inside or outside the video unit (e.g., padding method) for loop filtering such as ALF can be unified for different boundary types.

[0500] a. Optionally, furthermore, a virtual boundary method (eg, a two-side padding method) may be applied to the block to process samples at the boundary for loop filtering.

[0501] b. Optionally, furthermore, when the block contains samples located at the lower boundary of the video unit, the above method can be applied.

[0502] c. In one example, when decoding K lines of a block, if K lines are below a virtual boundary of the block (e.g., Figures 17A-17B If the last K rows in the CTU-B are used and the lower boundary of the block is the lower boundary of the video unit, virtual samples can be generated in the ALF classification / filtering process to avoid using other samples outside these K rows, for example, a two-side padding method can be applied.

[0503] i. Optionally, ALF may be disabled for the last K rows.

[0504] d. In one example, when a block is located on multiple boundaries, the pixels / samples used for ALF classification can be restricted to not cross any of these multiple boundaries.

[0505] i. In one example, for example, if one of its neighboring sample points is "unavailable" (eg, straddling any of a number of boundaries), it may not be possible to compute individual or all types of gradients / directivities for that sample point.

[0506] 1. In one example, the gradient of a sample point can be considered to be zero.

[0507] 2. In one example, the gradient of a sample point may be considered “unavailable” and cannot be added to the activity derived in the ALF classification process (eg, as defined in equation (8) of Section 2.6.1.1).

[0508] ii. In one example, when only a portion of the samples used in the ALF classification process are "available" (eg, do not cross any of these boundaries), the activity / directivity derived in the ALF classification process may be scaled by a factor.

[0509] iii. In one example, for a boundary block, assuming that the gradient / directivity of N sample points needs to be calculated in the ALF classification process, and the gradient of only M sample points can be calculated (for example, if a neighboring sample point of a certain sample point is not "available", the gradient of the sample point cannot be calculated), then the activity can be multiplied by N / M.

[0510] 1. Optionally, it can be multiplied by a factor that depends on N / M. For example, the number could be M N (N is an integer), for example, M=2.

[0511] e. In one example, the gradients of some samples in an MxN (eg, M=N=8, M columns and N rows in the current design) window can be used for classification.

[0512] i. For example, for the current N1*N2 (N1=N2=4 in the current design) block, M*N is located at the center of the N1*N2 block.

[0513] ii. In one example, a gradient of samples may be used that does not require visiting samples across any boundaries.

[0514] 1. Optionally, furthermore, when calculating the gradient of a sample point located at one or more boundaries, if some neighboring samples of the current sample point are “unavailable”, padding (eg, one-sided padding) may be performed.

[0515] 2. Optionally, if the current sample is located at the upper boundary of a video unit (eg, a slice / brick / tile / 360-degree video virtual boundary or an ALF virtual boundary), K (eg, K=1, 2) unavailable rows above may be filled.

[0516] 3. Optionally, if the current sample point is located at the left boundary of the video unit, K (eg, K=1, 2) unavailable columns on the left may be filled.

[0517] 4. Optionally, if the current sample point is located at the right boundary of the video unit, K (eg, K=1, 2) unavailable columns on the right may be filled.

[0518] 5. Optionally, if the current sample is located at the lower boundary of the video unit, the bottom K (eg, K=1, 2) unavailable rows may be filled.

[0519] 6. Optionally, in addition, if the current sample point is located at the upper boundary and the left boundary of the video unit, the upper K1 (for example, K1=1, 2) unavailable rows can be filled first to generate an M*(N+K1) window, and then the left K2 (for example, K2=1, 2) unavailable columns can be filled to generate an (M+K2)*(N+K1) window.

[0520] a. Optionally, you can first fill K2 (for example, K2=1, 2) unavailable columns on the left to generate a (M+K2)*N window, and then fill K1 (for example, K1=1, 2) unavailable rows on the top to generate a (M+K2)*(N+K1) window.

[0521] 7. Optionally, in addition, if the current sample point is located at the upper boundary and the right boundary of the video unit, the upper K1 (for example, K1=1, 2) unavailable rows can be filled first to generate an M*(N+K1) window, and then the right K2 (for example, K2=1, 2) unavailable columns can be filled to generate a (M+K2)*(N+K1) window.

[0522] a. Optionally, K2 (e.g., K2=1, 2) unavailable columns on the right can be filled first to generate an (M+K2)*N window, and then K1 (e.g., K1=1, 2) unavailable rows above can be filled to generate an (M+K2)*(N+K1) window.

[0523] 8. Optionally, in addition, if the current sample point is located at the lower boundary and the right boundary of the video unit, the bottom K1 (for example, K1=1, 2) unavailable rows can be filled first to generate an M*(N+K1) window, and then the right K2 (for example, K2=1, 2) unavailable columns can be filled to generate a (M+K2)*(N+K1) window.

[0524] a. Optionally, you can first fill K2 (e.g., K2=1,2) unavailable columns on the right to generate (M+K2)*N windows, and then fill K1 (e.g., K1=1,2) unavailable rows at the bottom to generate (M+K2)*(N+K1) windows.

[0525] 9. In addition, if the current sample point is located at the lower boundary and the left boundary of the video unit, the bottom K1 (for example, K1=1, 2) unavailable rows can be filled first to generate an M*(N+K1) window, and then the left K2 (for example, K2=1, 2) unavailable columns can be filled to generate a (M+K2)*(N+K1) window.

[0526] a. Optionally, the left K2 (e.g., K2 = 1, 2) unavailable columns can be padded to generate (M + K2) * N windows, and then the bottom K1 (e.g., K1 = 1, 2) unavailable rows can be padded to generate (M + K2) * (N + K1) windows. 10. Optionally, the padded points can also be used to calculate the gradient.

[0527] iii. In one example, for blocks at the top / bottom boundary of a video unit (eg, a stripe / brick / slice / 360-degree video virtual boundary or an ALF virtual boundary), the blocks may be classified using samples in an M*(N–C1) window.

[0528] 1. Optionally, additionally, the gradients of the top / bottom C1 rows of the M×N window are not used in the classification.

[0529] iv. In one example, for blocks at the left / right boundary of a video unit, the gradient of samples in a (M–C1)*N window may be used to classify the blocks.

[0530] 1. Additionally, optionally, the gradients of the left / right C1 columns of the M×N window are not used in the classification.

[0531] v. In one example, for blocks at the upper and lower boundaries of a video unit, the gradient of samples in an M*(N–C1–C2) window may be used to classify the blocks.

[0532] 1. Optionally, in addition, the gradients of the top C1 row and the bottom C2 row of the M×N window are not used in the classification.

[0533] vi. In one example, for blocks at the upper and left boundaries of a video unit, the gradient of samples in a (M–C1)*(N–C2) window may be used to classify the blocks.

[0534] 1. Optionally, additionally, the gradients of the top C1 rows and left C2 columns of the M×N window are not used in the classification.

[0535] vii. In one example, for blocks at the upper and right boundaries of a video unit, the gradient of samples in a (M-C1)*(N-C2) window may be used to classify the blocks.

[0536] 1. Optionally, additionally, the gradients of the top C1 rows and right C2 columns of the M×N window are not used in the classification.

[0537] viii. In one example, for blocks located at the lower and left boundaries of a video unit, the gradient of samples in a (M-C1)*(N-C2) window may be used to classify the blocks.

[0538] 1. Optionally, additionally, the gradients of the bottom C1 rows and left C2 columns of the M×N window are not used in the classification.

[0539] ix. In one example, for blocks located at the lower and right boundaries of a video unit, the gradient of samples in a (M–C1)*(N–C2) window may be used to classify the blocks.

[0540] 1. Optionally, additionally, the gradients of the bottom C1 rows and right C2 columns of the M×N window are not used in the classification.

[0541] x. In one example, for blocks at the left and right boundaries of a video unit, the gradient of samples in a (M–C1–C2)*N window may be used to classify the blocks.

[0542] 1. Optionally, in addition, the gradients of the left C1 column and the right C2 column of the M×N window are not used in the classification.

[0543] xi. In one example, for blocks located at the upper boundary, lower boundary, and left boundary of a video unit, the gradient of samples in a (M–C3)*(N–C1–C2) window may be used to classify the blocks.

[0544] 1. Optionally, in addition, the gradients of the top C1 rows, bottom C2 rows, and left C3 columns of the M×N window are not used in classification.

[0545] xii. In one example, for blocks located at the upper boundary, lower boundary, and right boundary of a video unit, the gradient of samples in a (M–C3)*(N–C1–C2) window may be used to classify the blocks.

[0546] 1. Optionally, in addition, the gradients of the top C1 rows, bottom C2 rows, and right C3 columns of the M×N window are not used in the classification.

[0547] xiii. In one example, for blocks located at the left, right, and top boundaries of a video unit, the gradient of samples in a (M–C1–C2)*(N–C3) window may be used to classify the blocks.

[0548] 1. Additionally, optionally, the gradients of the left C1 column, right C2 column, and top C3 row of the M×N window are not used in the classification.

[0549] xiv. In one example, for blocks located at the left, right, and bottom boundaries of a video unit, the gradient of samples in a (M–C1–C2)*(N–C3) window may be used to classify the blocks.

[0550] 1. Optionally, in addition, the gradients of the left C1 column, the right C2 column, and the bottom C3 rows of the M×N window are not used in the classification.

[0551] xv. In one example, for blocks located at the left boundary, right boundary, top boundary, and bottom boundary of a video unit, the blocks may be classified using the gradient of samples in a (M–C1–C2)*(N–C3–C4) window.

[0552] 1. Optionally, in addition, the gradients of the left C1 column and right C2 column, top C3 row and bottom C4 row of the M×N window are not used in classification.

[0553] xvi. In one example, C1, C2, C3, and C4 are equal to 2.

[0554] xvii. In one example, gradients for samples that do not have any "unavailable" neighboring samples required in the gradient calculation may be used.

[0555] f. In one example, when a line is located at multiple boundaries (eg, the distance between the line and the boundaries is less than a threshold), the filling process is performed only once, regardless of how many boundaries it may belong to.

[0556] i. Optionally, furthermore, how many adjacent rows should be filled may depend on the position of the current row relative to all boundaries.

[0557] ii. For example, how much adjacent rows need to be filled can be determined by the distance between the current row and two boundaries, such as when the current row is within two boundaries (two boundaries above and below).

[0558] iii. For example, how many adjacent rows need to be filled can be determined by the distance between the current row and the nearest boundary, such as when the current row is within two boundaries (the two boundaries are above and below).

[0559] iv. For example, the number of adjacent rows that need to be filled can be calculated separately for each boundary, and the largest one can be selected as the final number of rows to be filled.

[0560] v. In one example, it may be determined for each side of the row (eg, top and bottom) how many adjacent rows should be filled.

[0561] vi. In one example, for the two-side filling method, the two sides can jointly decide how many adjacent rows need to be filled.

[0562] vii. Optionally, in addition, the two-side padding method used by ALF is applied.

[0563] g. In one example, when a row is located at multiple boundaries and there is at least one boundary on each side of the row (eg, top and bottom), ALF may be disabled for it.

[0564] h. In one example, when the number of padding rows required for the current row is greater than a threshold, ALF may be disabled for the current row.

[0565] i. In one example, when the number of padded lines on either side is greater than a threshold, ALF may be disabled for the current line.

[0566] ii. In one example, when the total number of padding lines on both sides is greater than a threshold, ALF may be disabled for the current line.

[0567] i. Optionally, furthermore, when a block contains samples located at the lower boundary of a video unit and loop filtering such as ALF is enabled for the block, the above method can be applied.

[0568] j. Optionally, in addition, the above method can also be applied under certain conditions, such as when the block contains samples located at the lower boundary of the video unit and filtering across the boundary is not allowed (for example, pps_loop_filter_across_virtual_boundaries_disabled_flag / loop_filter_across_slices_enabled_flag / loop_filter_across_slices_enabled_flag is true).

[0569] k. The proposed method is also applicable to samples / blocks on vertical boundaries.

[0570] 6. When a sample point is a sample point on at least two boundaries of a block (for example, at least one of the boundaries above the current line is an ALF virtual boundary, and the other boundary below it is another boundary), the number of lines to be filled is not determined purely by the distance between the current line and the ALF virtual boundary. Instead, it is determined by the distance between the current line and the two boundaries.

[0571] a. In one example, the number of rows padded on each side is set to (M – min(D0, D1)).

[0572] b. In one example, the number of rows padded on each side is set to (M – max(D0, D1)).

[0573] c. In the above example, D0, D1 represent the distance between the current row and the upper / lower boundaries.

[0574] d. In the above example, M represents the number of rows where the ALF virtual boundary starts from the bottom of a CTU.

[0575] 7. In ALF classification and / or ALF linear or nonlinear filtering processing, at least two methods for selecting samples may be defined, one of which is to select samples before applying any loop filtering method; and the other is to select samples after applying one or more loop filtering methods but before applying ALF.

[0576] a. In one example, the selection of different methods may depend on the location of the samples to be filtered.

[0577] b. In one example, when ALF is used for another sample, the first method can be used to select a sample at the lower boundary of a video unit (eg, CTB). Otherwise (not at the boundary), the second method is selected.

[0578] 8. It is proposed to disable the use of samples that cross VPDU boundaries (e.g., 64x64 regions) in the filtering process.

[0579] a. In one example, when a sample required for ALF classification processing is outside the VPDU boundary or below the virtual boundary, it can be replaced by a virtual sample, or the classification result of the sample can be copied from samples associated with other samples, such as filling from available samples.

[0580] b. In one example, when a sample required for filtering is outside the VPDU boundary or below the virtual boundary, it can be replaced by a virtual sample, such as filling from available samples.

[0581] c. In one example, if a block contains samples located at a VPDU boundary, then the ALF virtual boundary handling method may be enabled for the block (eg, set applyVirtualBoundary to true).

[0582] d. Optionally, the use of samples that cross horizontal VPDU boundaries can be disabled in the filtering process.

[0583] i. In one example, when samples required for filtering processing are below a horizontal VPDU boundary or below a virtual boundary, they can be replaced by virtual samples, such as by filling in from available samples.

[0584] e. Optionally, the use of samples that cross vertical VPDU boundaries can be disabled in the filtering process.

[0585] i. In one example, when samples required for filtering are outside a vertical VPDU boundary or below a virtual boundary, they can be replaced by virtual samples, such as by filling in available samples.

[0586] 9. In the ALF classification / filtering process, instead of using padding samples (e.g., unavailable, above / below the virtual boundary, above / below the video unit boundary), it is proposed to use the reconstructed samples before all loop filters.

[0587] a. Optionally, in addition, the concept of bilateral padding is applied by padding samples from the reconstructed samples before all loop filters.

[0588] i. In one example, if the samples in the filter support are from the reconstructed samples before all loop filters, the symmetric (e.g., symmetric about the origin (e.g., the current sample)) samples in the filter support should also use the reconstructed samples before all loop filters.

[0589] 1. Assume that the coordinates of the current sample to be filtered are (0, 0), and the sample at (i, j) is the reconstructed sample before all loop filters, then the sample at (-i, -j) is the reconstructed sample before all loop filters.

[0590] 2. Assume that the coordinates of the current sample to be filtered are (x, y), and the sample at (x + i, y + j) is the reconstructed sample before all loop filters, then the sample at (x - i, y - j) is the reconstructed sample before all loop filters.

[0591] b. Optionally, in addition, when loop shaping (also known as LMCS) is enabled, the reconstructed samples before all loop filters are the samples in the original domain converted from the shaping domain.

[0592] 10. In the ALF filtering process, instead of using padding samples (e.g., unavailable, above / below the virtual boundary, above / below the video unit boundary), it is proposed to use different ALF filter supports.

[0593] a. In one example, assume that a sample needs to be padded in the above method. Instead of performing padding, the filter coefficient associated with the sample is set to zero.

[0594] i. In this case, the filter support is modified by excluding the sample that needs to be padded.

[0595] ii. Optionally, in addition, the filter coefficients applied to other samples except the current sample remain unchanged. However, the filter coefficient applied to the current sample can be modified, e.g., ((1 << C_BD) - the sum of all filter coefficients applied to the samples that do not need to be padded), where C_BD represents the bit depth of the filter coefficient.

[0596] 1. Take Figures 18A-18BFor example, when filtering rows L and I, the filter coefficient c12 applied to the current sample is modified to ((1< <C_BD)–2*(c4+c5+c6+c7+c8+c9+c10+c11))。

[0597] b. In one example, assuming that the sample point (x1, y1) is padded from (x2, y2) in the above method, instead of performing the padding, the filter coefficients associated with (x1, y1) are added to the coefficients at the position (x2, y2), regardless of whether the nonlinear filter is enabled or disabled.

[0598] i. In addition, the shearing parameters of (x2, y2) can be derived dynamically.

[0599] 1. In one example, it can be set equal to the decoded clipping parameter of (x2, y2).

[0600] 2. Optionally, it can be set to the return value of a function that takes the decoded clipping parameters of (x1, y1) and (x2, y2) as input, e.g. the larger value or the smaller value.

[0601] 11. The selection of cropping parameters / filter coefficients / filter support may depend on whether the filtered samples need to access padding samples (eg, unavailable, above / below virtual boundary, above / below video unit boundary).

[0602] a. In one example, different cropping parameters / filter coefficients / filter supports may be used for samples with the same class index, but for some of these samples access to padding samples is required while for others not.

[0603] b. In one example, the cropping parameters / filter coefficients / filter support for filtering samples that require access to padding samples may be signaled at the CTU / region / slice / slice level.

[0604] c. In one example, the cropping parameters / filter coefficients / filter support for filtering samples that require access to padding samples may be derived from the cropping parameters / filter coefficients / filter support for filtering samples that do not require access to padding samples.

[0605] i. In one example, item 9a or 9b may be applied.

[0606] 12. How samples are processed at boundaries for loop filtering (eg, ALF) may depend on the color components and / or color format.

[0607] a. For example, the definition of "at the boundary" may differ for different color components. In one example, a luma sample is at the lower boundary if its distance from the lower boundary is less than T1; a chroma sample is at the lower boundary if its distance from the lower boundary is less than T2. T1 and T2 can be different.

[0608] i. In one example, when the color format is not 4:4:4, T1 and T2 may be different.

[0609] 13. When the lower / upper / left / right boundary of a CTU / VPDU is also the boundary of a slice / tile / brick / sub-region using independent codecs, multiple padding processes are applied in a fixed order.

[0610] a. In one example, in a first step, a padding method for stripes / slices / bricks is first applied (e.g., one-sided padding). Then, in a second step, a padding method for handling ALF virtual boundaries is further applied (e.g., two-sided padding). In this case, the padding samples after the first step are marked as available and can be used to decide how many rows to pad in the ALF virtual boundary handling. The same rules are used to handle CTUs that are not at these boundaries (e.g., Figure 16A -C).

[0611] 14. The proposed method can be applied to one or more boundaries between two sub-images.

[0612] a. The boundary to which the proposed method is applied can be a horizontal boundary.

[0613] b. The boundary to which the proposed method is applied can be a vertical boundary.

[0614] 15. The above method can be applied to samples / blocks at vertical boundaries.

[0615] 16. Whether and / or how to apply the proposed method at the “360 virtual boundary” may depend on the location of the “360 virtual boundary”.

[0616] a. In one example, when the “360° virtual boundary” coincides with the CTU boundary, the proposed method can be applied. For example, for samples at the “360° virtual boundary”, only two-side padding can be applied in the ALF.

[0617] b. In one example, when the “360° virtual boundary” does not coincide with the CTU boundary, the proposed method may not be applied. For example, for the samples at the “360° virtual boundary”, only one-side padding can be used in the ALF.

[0618] c. In one example, for samples at the “360° virtual boundary”, the same padding method can be applied in the ALF regardless of the location of the “360° virtual boundary”.

[0619] i. For example, for samples at the “360 virtual boundary”, one-sided padding can be applied in the ALF.

[0620] ii. For example, for samples at the “360 virtual boundary”, padding on both sides can be applied in the ALF.

[0621] d. In one example, for samples located at multiple boundaries (where at least one boundary is a “360° virtual boundary” and at least one of the “360° virtual boundaries” does not coincide with a CTU boundary), the proposed method may not be applied.

[0622] i. For example, points that cross any of these multiple boundaries can be filled using one-sided fill.

[0623] 1. Additionally, optionally, if there is a "virtual border", two-side padding can be applied after the one-side padding in the ALF.

[0624] e. In one example, for a sample point located between two boundaries, if one is a "360 virtual boundary" and the other is not, padding is only called once in the ALF process.

[0625] i. In one example, a fill method (eg, a two-side fill method) for processing an ALF virtual boundary may be called.

[0626] 1. Optionally, a padding method (e.g., one-sided padding) may be called to handle picture (or strip / slice / brick / sub-picture) boundaries.

[0627] ii. Optionally, two or more filling processes may be applied sequentially.

[0628] 1. In one example, a padding method for processing a picture (or strip / slice / brick / sub-picture) boundary (e.g., one-sided padding) may be applied first, and then a padding method for processing an ALF virtual boundary (e.g., two-sided padding method) may be further called.

[0629] a. Optionally, in addition, filling points after the first filling are considered available in the second filling process.

[0630] iii. In one example, for a sample located between two or more boundaries (e.g., stripe boundary / slice boundary / brick boundary / "360 virtual boundary" / "ALF virtual boundary" / "sub-picture boundary"), if only one of the boundaries is a "360 virtual boundary" (e.g., Figure 24 As shown in the figure, the first boundary is the "360 virtual boundary" and the second boundary is the "ALF virtual boundary" or stripe / brick / slice boundary / sub-picture boundary; or vice versa), then the proposed method can be applied. For example, for these samples, only two-side padding can be used in ALF.

[0631] 1. Alternatively, if these various boundaries are “360 virtual boundaries” or picture boundaries, the proposed method may not be applied. For example, for these samples, only one-side padding can be used in ALF.

[0632] f. In one example, for samples located between two or more boundaries, and if at least one of the boundaries is a “360° virtual boundary” and it does not coincide with a CTU boundary, the proposed method may not be applied.

[0633] i. In this case, it can be considered as a prior art that processes samples only at the "360 virtual boundary" and not at other boundary types.

[0634] ii. In one example, for these samples, only one-side padding can be applied in ALF.

[0635] g. In one example, for a sample point located between two or more boundaries, and if at least one of the boundaries is a “360° virtual boundary”, the proposed method may not be applied.

[0636] i. In this case, it can be considered as a prior art that processes samples only at the "360 virtual boundary" and not at other boundary types.

[0637] ii. In one example, for these samples, only one-side padding can be applied in ALF.

[0638] 17. When the reference samples required for ALF filtering (e.g. Figure 16C In the embodiment, when filtering the current sample P0, i is P0i for A / B / C / D or / and the reference sample required in the ALF classification process is "unavailable", for example, because the sample is located in a different video unit (for example, slice / brick / slice / sub-picture) from the current sample, and filtering using samples across video units (for example, slice / brick / slice / sub-picture boundaries) is not allowed, the "unavailable" sample can be filled with "available" samples (for example, samples located in the same slice / brick / slice / sub-picture as the current sample).

[0639] a. In one example, the “unusable” reference sample may first be cropped to its nearest “usable” horizontal position, and then, if necessary, the “unusable” reference sample may be cropped to its nearest “usable” vertical position.

[0640] b. In one example, the “unusable” reference sample may first be cropped to its nearest “usable” vertical position, and then, if necessary, the “unusable” sample may be cropped to its nearest “usable” horizontal position.

[0641] c. In one example, the coordinates of an “unusable” reference sample are clipped to the coordinates of its nearest “usable” sample in the horizontal direction (eg, the minimum distance).

[0642] i. In one example, for two points with coordinates (x1, y1) and (x2, y2), the horizontal distance between them can be calculated as Abs(x1–x2).

[0643] d. In one example, the coordinates of an “unusable” reference point are clipped to the coordinates of its nearest “usable” point in the vertical direction (eg, the minimum distance).

[0644] i. In one example, for two points with coordinates (x1, y1) and (x2, y2), the vertical distance between them can be calculated as Abs(y1–y2).

[0645] e. In one example, "unusable" points are clipped to their nearest "usable" points (eg, minimum distance).

[0646] i. In one example, for two points with coordinates (x1, y1) and (x2, y2), the distance between them can be calculated as (x1–x2)*(x1–x2)+(y1–y2)*(y1–y2).

[0647] ii. Alternatively, the distance between two pixels can be calculated as Abs(x1–x2)+Abs(y1–y2).

[0648] f. Optionally, disable filtering for the current sample.

[0649] g. Optionally, the classification process in the ALF (eg, the gradient calculation of the current sample) may not allow the use of unavailable reference samples.

[0650] 18. How to derive filler samples for unavailable reference samples may depend on whether the CTU coincides with any boundary.

[0651] a. In one example, when the current CTU does not coincide with any boundary type, but filtering processing of the current sample (e.g., ALF classification / ALF filtering processing) requires access to reference samples in different video units (e.g., slices), the method described in item 16 can be applied.

[0652] i. Optionally, in addition, when the current CTU does not coincide with any boundary type, but the filtering processing of the current sample (e.g., ALF classification / ALF filtering processing) requires access to reference samples in different video units (e.g., slices) and filtering across slice boundaries is not allowed, the method described in item 16 can be applied.

[0653] ii. Optionally, in addition, when the current CTU does not coincide with any boundary type, but the filtering processing of the current sample (e.g., ALF classification / ALF filtering processing) requires access to reference samples in different video units (e.g., slices), and reference samples in the same video unit and filtering across slice boundaries are not allowed, the method described in item 16 can be applied.

[0654] b. In one example, when the current CTU coincides with at least one boundary, a uniform padding method (eg, two-side padding or one-side padding) may be applied.

[0655] i. Optionally, when the current CTU coincides with various boundaries and filtering across these boundaries is not allowed, a unified padding method (eg, two-sided padding or one-sided padding) may be applied.

[0656] c. In one example, “unusable” sample points that cannot be filled with double-sided filling or / and single-sided filling can only be filled using the method described in item 16.

[0657] 19. Whether filtering processes (e.g., deblocking, SAO, ALF, bilateral filtering, Hadamard transform filtering, etc.) can access samples that cross video unit boundaries (e.g., slice / brick / tile / sub-picture boundaries) can be controlled at different levels, such as by itself rather than for all video units in a sequence / picture.

[0658] a. Optionally, for a slice in the PPS / slice header, a syntax element can be signaled to indicate whether filtering can cross the slice boundary of the slice.

[0659] b. Optionally, for a tile / slice in the PPS / slice header, a syntax element can be signaled to indicate whether filtering can cross the tile / slice boundary of the tile / slice.

[0660] c. In one example, a syntax element may be signaled in the SPS / PPS to indicate whether the filtering process may cross tile boundaries or / and slice boundaries or / and strip boundaries or / and “360-degree virtual boundaries” of the video / picture.

[0661] i. In one example, separate syntax elements may be signaled for different boundary types.

[0662] ii. In one example, one syntax element may be signaled for all different boundary types.

[0663] iii. In one example, one syntax element may be signaled for several different boundary types.

[0664] 1. For example, one syntax element may be used to signal tile boundaries and slice boundaries.

[0665] d. In one example, a syntax element may be signaled in the SPS to indicate whether there is a PPS / slice level indication on the filtering process.

[0666] i. In one example, separate syntax elements may be signaled for different boundary types.

[0667] ii. In one example, one syntax element may be signaled for all different boundary types.

[0668] iii. In one example, one syntax element may be signaled for several different boundary types.

[0669] 1. For example, one syntax element may be used to signal tile boundaries and slice boundaries.

[0670] iv. An indication of whether filtering can cross slice / tile / slice / sub-picture boundaries can be signaled in the PPS / slice header only if the corresponding syntax element in the SPS is equal to a certain value.

[0671] 1. Optionally, the indication of whether the filtering process can cross slice / tile / slice / sub-picture boundaries may not be signaled in the PPS / slice header when the corresponding syntax element in the SPS is equal to certain values.

[0672] a. In this case, if the indication in the SPS is equal to a certain value, the filtering process may not be allowed to cross the slice / brick / slice / sub-picture boundary.

[0673] b. In this case, if the indication in the SPS is equal to a certain value, the filtering process can cross the slice / brick / slice / sub-picture boundary.

[0674] 5. Examples

[0675] In the following sections, some examples of how the current version of the VVC standard can be modified to accommodate some embodiments of the disclosed technology are described. New additions are indicated by bold, italic, underlined text. Deleted sections are indicated by [[ ]].

[0676] 5.1 Example 1

[0677] loop_filter_across_bricks_enabled_flag equal to 1 specifies that loop filtering operations may be performed across brick boundaries in pictures that reference the PPS. loop_filter_across_bricks_enabled_flag equal to 0 specifies that loop filtering operations are not performed across brick boundaries in pictures that reference the PPS. Loop filtering operations include deblocking filtering, sample adaptive offset filtering, and adaptive loop filtering. When not present, the value of loop_filter_across_bricks_enabled_flag is inferred to be 1.

[0678] loop_filter_across_slices_enabled_flag equal to 1 specifies that loop filtering operations may be performed across slice boundaries in pictures that reference the PPS. loop_filter_across_slices_enabled_flag equal to 0 specifies that loop filtering operations are not performed across slice boundaries in pictures that reference the PPS. Loop filtering operations include deblocking filtering, sample adaptive offset filtering, and adaptive loop filtering operations. If not present, the value of loop_filter_across_slices_enabled_flag is inferred to be 0.

[0679] 5.2 Example 2

[0680] Figure 21 The processing of the CTU in the picture is shown. Figure 19 The differences compared are highlighted with dashed lines.

[0681] 5.3 Example 3

[0682] 8.8.5.2 Luma Sample Codec Tree Block Filtering

[0683] The inputs to this process are:

[0684] – Reconstructed luminance picture sample array recPicture before adaptive loop filtering processing L ,

[0685] –Filtered reconstructed brightness picture sample array alfPicture L ,

[0686] - Luma position (xCTB, yCTB), which specifies the top left corner sample of the current luma codec treeblock relative to the top left corner sample of the current picture.

[0687] The output of this process is the modified filtered reconstructed luminance picture sample array alfPicture L.

[0688] Reconstruct the brightness picture sample array recPicture with position (xCtb, yCtb) L As input, the derivation process of the filter indices in Section 8.8.5.3 is called, and filtIdx[x][y] and transposeIdx[x][y] (x, y = 0..CtbSizeY-1) are output.

[0689] For the filtered reconstructed luminance sample alfPicture L Derivation of [x][y], for each reconstructed luminance sample recPicture in the current luminance codec tree block L [x][y](x,y=0..CtbSizeY–1) is filtered as follows:

[0690] – The array f[j] of luma filter coefficients and the array c[j] of luma clipping values corresponding to the filter specified by filtIdx[x][y] are derived as follows, where j = 0..11:

[0691] –…

[0692] – Luma filter coefficients and shear value index idx depend on transposeIdx[x][y] and are derived as follows:

[0693] –…

[0694] – The position (h) of each corresponding luminance sample (x, y) in the array recPicture of given luminance samples x+i ,v y+j )(i,j=-3..3) is derived as follows:

[0695] –…

[0696] –The variable applyVirtualBoundary is exported as follows:

[0697] – If [[one or more of]] the following conditions are true, then set applyVirtualBoundary to

[0698] Equal to 0:

[0699] – The lower boundary of the current codec tree block is the lower boundary of the picture.

[0700] –[[The lower boundary of the current codec tree block is the lower boundary of the brick and loop_filter_across_bricks_enabled_flag is equal to 0.

[0701] – The lower boundary of the current codec tree block is the lower boundary of the slice and loop_filter_across_slices_enabled_flag is equal to 0.

[0702] – the lower boundary of the current codec treeblock is one of the bottom virtual boundaries of the picture and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1]].

[0703] – Otherwise, set applyVirtualBoundary equal to 1.

[0704] – Based on the horizontal luma sample position y and applyVirtualBoundary, the reconstructed sample offsets r1, r2 and r3 are specified in Table 8-22.

[0705] -…

[0706] 8.8.5.4 Codec Tree Block Filtering for Chroma Samples

[0707] The inputs to this process are:

[0708] – the reconstructed chroma picture sample array recPicture before adaptive loop filtering processing,

[0709] – The filtered reconstructed chroma picture sample array alfPicture,

[0710] – Chroma position (xCtbC, yCtbC), which specifies the top left corner sample of the current chroma codec treeblock relative to the top left corner sample of the current picture.

[0711] The output of this process is the modified filtered reconstructed chrominance picture sample array alfPicture.

[0712] The width and height ctbWidthC and ctbHeightC of the current chroma codec tree block are derived as follows:

[0713] ctbWidthC=CtbSizeY / SubWidthC (8-1230)

[0714] ctbHeightC=CtbSizeY / SubHeightC (8-1231)

[0715] To derive the filtered reconstructed chroma samples alfPicture[x][y], each reconstructed chroma sample recPicture[x][y] in the current chroma codec treeblock is filtered as follows, where x = 0..CTBWidthC-1 and y = 0..CTBHeightC-1:

[0716] – The position (h) of each corresponding chroma sample (x, y) in the given chroma sample array recPicture x+i ,v y+j ) is derived as follows, where i,j = -2..2:

[0717] – For any n = 0..pps_num_ver_virtual_boundaries-1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtbC+x-PpsVirtualBoundariesPosX[n] / SubWidthC is greater than or equal to 0 and less than 2, the following applies:

[0718] h x+i =Clip3(PpsVirtualBoundariesPosX[n] / SubWidthC, (8-1232)

[0719] pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i)

[0720] Otherwise, for any n = 0..pps_num_ver_virtual_boundaries-1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n] / SubWidthC-xCtbC-x is greater than 0 and less than 3, the following applies:

[0721] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n] / SubWidthC-1,xCtbC+x+i)

[0722] (8-1233)

[0723] – Otherwise, the following applies:

[0724] h x+i=Clip3(0,pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i) (8-1234)

[0725] – For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtbC+y−PpsVirtualBoundariesPosY[n] / SubHeightC is greater than or equal to 0 and less than 2, the following applies:

[0726] v y+j =Clip3(PpsVirtualBoundariesPosY[n] / SubHeightC, (8-1235)

[0727] pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)

[0728] Otherwise, for any n = 0..pps_num_hor_virtual_boundaries-1 if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n] / SubHeightC-yCtbC-y is greater than 0 and less than:

[0729] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n] / SubHeightC-1,yCtbC+y+j)

[0730] (8-1236)

[0731] – Otherwise, the following applies:

[0732] v y+j =Clip3(0,pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)

[0733] (8-1237)

[0734] –The variable applyVirtualBoundary is derived as follows:

[0735] – Set applyVirtualBoundary equal to 0 if [[one or more of]] the following conditions are true:

[0736] – The lower boundary of the current codec tree block is the lower boundary of the picture.

[0737] –[[The lower boundary of the current codec tree block is the lower boundary of the brick and loop_filter_across_bricks_enabled_flag is equal to 0.

[0738] – The lower boundary of the current codec tree block is the lower boundary of the slice and loop_filter_across_slices_enabled_flag is equal to 0.

[0739] – the lower boundary of the current codec treeblock is one of the bottom virtual boundaries of the picture and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1]].

[0740] – Otherwise, set applyVirtualBoundary equal to 1.

[0741] – Based on the horizontal luma sample position y and applyVirtualBoundary, the reconstructed sample offsets r1 and r2 are specified in Table 8-22.

[0742] –…

[0743] Optionally, the condition “the lower boundary of the current codec tree block is the lower boundary of the picture” may be replaced with “the lower boundary of the current codec tree block is the lower boundary of the picture or is outside the picture”.

[0744] 5.4 Example 4

[0745] This embodiment shows an example in which samples below the VPDU area are not allowed to be used in the ALF classification process (corresponding to item 7 in Section 4).

[0746] 8.8.5.3 Luma Sample ALF Transposition and Filter Index Derivation

[0747] The inputs to this process are:

[0748] – Luma position (xCtb, yCtb), specifies the upper left sample point of the current luma codec tree block relative to the upper left sample point of the current picture,

[0749] – Reconstructed luminance picture sample array recPicture before adaptive loop filtering processing L .

[0750] The output of this processing is:

[0751] – Classification filter index array filtIdx[x][y], where x, y = 0..CtbSizeY-1,

[0752] – Transpose index array transposeIdx[x][y], where x,y = 0..CtbSizeY-1.

[0753] – The position (h) of each corresponding luminance sample (x, y) in the array recPicture of given luminance samples x+i ,v y+j )(i,j=-2..5) is derived as follows:

[0754] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtb+x-PpsVirtualBoundariesPosX[n] is greater than or equal to 0 and less than 2, the following applies:

[0755] h x+i =Clip3(PpsVirtualBoundariesPosX[n],pic_width_in_luma_samples-1,xCtb+x+i) (8-1193)

[0756] Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n]-xCtb-x is greater than 0 and less than 6, the following applies:

[0757] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n]-1,xCtb+x+i) (8-1194)

[0758] – Otherwise, the following applies:

[0759] h x+i =Clip3(0,pic_width_in_luma_samples-1,xCtb+x+i) (8-1195)

[0760] – For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtb+y−PpsVirtualBoundariesPosY[n] is greater than or equal to 0 and less than 2, the following applies:

[0761] v y+j =Clip3(PpsVirtualBoundariesPosY[n],pic_height_in_luma_samples-1,yCtb+y+j) (8-1196)

[0762] Otherwise, for any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n]-yCtb-y is greater than 0 and less than 6, the following applies:

[0763] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n]-1,yCtb+y+j) (8-1197)

[0764] – Otherwise, the following applies:

[0765] – If yCtb+CtbSizeY is greater than or equal to pic_height_in_luma_samples, the following applies:

[0766] v y+j =Clip3(0,pic_height_in_luma_samples-1,yCtb+y+j) (8-1198)

[0767] – Otherwise, if y is less than CtbSizeY–4, the following applies:

[0768] v y+j =Clip3(0,yCtb+CtbSizeY-5,yCtb+y+j) (8-1199)

[0769] – Otherwise, the following applies:

[0770] vy+j =Clip3(yCtb+CtbSizeY-4,pic_height_in_luma_samples-1,yCtb+y+j)

[0771] (8-1200)

[0772] Use the following sequence of steps to derive the classification filter index array filtIdx and the transpose index array transposeIdx:

[0773] 1. The variables filtH[x][y], filtV[x][y], filtD0[x][y] and filtD1[x][y] (x, y = -2..CtbSizeY+1) are derived as follows:

[0774] – If both x and y are even or both x and y are uneven, then the following applies:

[0775] filtH[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x-1 ,v y ]-recPicture[h x+1 ,v y ]) (8-1201)

[0776] filtV[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x ,v y-1 ]-recPicture[h x ,v y+1 ]) (8-1202)

[0777] filtD0[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x-1 ,v y-1 ]-recPicture[h x+1 ,v y+1 ]) (8-1203)

[0778] filtD1[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x+1 ,vy-1 ]-recPicture[h x-1 ,v y+1 ]) (8-1204)

[0779] – Otherwise, filtH[x][y], filtV[x][y], filtD0[x][y] and filtD1[x][y] are set equal to 0.

[0780] 2. The variables minY, maxY and ac are derived as follows:

[0781] – If (y<<2) is equal to [[(CtbSizeY-8)]] and (yCtb+CtbSizeY) is less than pic_height_in_luma_samples–1, minY is set equal to -2, maxY is set equal to 3 and ac is set equal to 96.

[0782] – Otherwise, if (y<<2) is equal to [[(CtbSizeY-4)]] and (yCtb+CtbSizeY) is less than pic_height_in_luma_samples–1, minY is set equal to 0, maxY is set equal to 5, and ac is set equal to 96.

[0783] – Otherwise, minY is set equal to -2, maxY is set equal to 5, and ac is set equal to 64.

[0784] 3. The variables varTempH1[x][y], varTempV1[x][y], varTempD01[x][y], varTempD11[x][y] and varTemp[x][y] (x, y = 0..(CtbSizeY-1)>>2) are derived as follows:

[0785] sumH[x][y]=∑ i ∑ j filtH[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1205)

[0786] sumV[x][y]=∑ i ∑ j filtV[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1206)

[0787] sumD0[x][y]=∑ i ∑ j filtD0[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1207)

[0788] sumD1[x][y]=∑ i ∑ j filtD1[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1208)

[0789] sumOfHV[x][y]=sumH[x][y]+sumV[x][y] (8-1209)

[0790] 4. The variables dir1[x][y], dir2[x][y] and dirS[x][y] where x, y = 0..CtbSizeY-1 are derived as follows:

[0791] – The variables hv1, hv0 and dirHV are exported as follows:

[0792]

[0793] – The variables d1, d0 and dirD are exported as follows:

[0794]

[0795] 5. The variable avgVar[x][y] (x, y = 0..CtbSizeY–1) is derived as follows:

[0796] varTab[]={0,1,2,2,2,2,2,3,3,3,3,3,3,3,3,4} (8-1227)

[0797] avgVar[x][y]=varTab[Clip3(0,15,(sumOfHV[x>>2][y>>2]*ac)>>(3+BitDepth Y ))] (8-1228)

[0798] 6. The classification filter index array filtIdx[x][y] and the transpose index array transposeIdx[x][y] (x=y=0..CtbSizeY-1) are derived as follows:

[0799] transposeTable[]={0,1,0,2,2,3,1,3}

[0800] transposeIdx[x][y]=transposeTable[dir1[x][y]*2+(dir2[x][y]>>1)]

[0801] filtIdx[x][y]=avgVar[x][y]

[0802] When dirS[x][y] is not equal to 0, filtIdx[x][y] is modified as follows:

[0803] filtIdx[x][y]+=(((dir1[x][y]&0x1)<<1)+dirS[x][y])*5(8-1229)

[0804] 5.5 Example 5

[0805] For samples located at various boundaries (such as strip / brick boundaries, 360-degree virtual boundaries), the fill process is called only once, and the number of rows filled on each side depends on the position of the current sample relative to the boundary.

[0806] In one example, the ALF two-sided filling method is applied. Optionally, in addition, in the symmetrical two-sided filling method, when the sample points are located at two boundaries (for example, one boundary on the upper side and one boundary on the lower side), the number of sample points filled is Figure 27 Also, when deriving classification information, only Figure 27 4 rows between the two boundaries.

[0807] Figure 26 An example of a filling method is shown if 4 rows of sample points are sample points of two boundaries. In one example, Figure 26 The first boundary in may be an ALF virtual boundary; Figure 25 The second boundary in can be a strip / slice / brick boundary or a 360-degree virtual boundary.

[0808] 5.6 Example 6

[0809] 8.8.5.2 Codec Tree Block Filtering for Luma Samples

[0810] The inputs to this process are:

[0811] – Reconstructed luminance picture sample array recPicture before adaptive loop filtering processing L ,

[0812] –Filtered reconstructed brightness picture sample array alfPictureL ,

[0813] - Luma position (xCTB, yCTB), which specifies the top left corner sample of the current luma codec treeblock relative to the top left corner sample of the current picture.

[0814] The output of this process is the modified filtered reconstructed luminance picture sample array alfPicture L .

[0815] Reconstruct the brightness picture sample array recPicture with position (xCtb, yCtb) L As input, the derivation process of the filter indices in Section 8.8.5.3 is called, and filtIdx[x][y] and transposeIdx[x][y] (x, y = 0..CtbSizeY-1) are output.

[0816] – The position (h) of each corresponding luminance sample (x, y) in the array recPicture of given luminance samples x+i ,v y+j )(i,j=-3..3) is derived as follows:

[0817] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtb+x-PpsVirtualBoundariesPosX[n] is greater than or equal to 0 and less than 3, the following applies:

[0818] h x+i =Clip3(PpsVirtualBoundariesPosX[n],pic_width_in_luma_samples-1,xCtb+x+i)(8-1197)

[0819] – Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n]-xCtb-x is greater than 0 and less than 4, the following applies:

[0820] h x+i=Clip3(0,PpsVirtualBoundariesPosX[n]-1,xCtb+x+i) (8-1198)

[0821] – Otherwise, the following applies:

[0822] h x+i =Clip3(0,pic_width_in_luma_samples-1,xCtb+x+i) (8-1199)

[0823] –[[For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtb+y−PpsVirtualBoundariesPosY[n] is greater than or equal to 0 and less than 3, the following applies:

[0824] v y+j =Clip3(PpsVirtualBoundariesPosY[n],pic_height_in_luma_samples-1,yCtb+y+j)(8-1200)

[0825] Otherwise, for any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n]-yCtb-y is greater than 0 and less than 4, the following applies:

[0826] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n]-1,yCtb+y+j) (8-1201)]]

[0827] -[[otherwise,]]

[0828] v y+j =Clip3(0,pic_height_in_luma_samples-1,yCtb+y+j) (8-1202)

[0829] –[[The variable applyVirtualBoundary is exported as follows:

[0830] – Set applyVirtualBoundary equal to 0 if one or more of the following conditions are true:

[0831] – The lower boundary of the current codec tree block is the lower boundary of the picture.

[0832] – the lower boundary of the current codec tree block is the lower boundary of the brick, and

[0833] loop_filter_across_bricks_enabled_flag is equal to 0.

[0834] – The lower boundary of the current codec tree block is the lower boundary of the slice, and

[0835] loop_filter_across_slices_enabled_flag is equal to 0.

[0836] – the lower boundary of the current codec treeblock is one of the bottom virtual boundaries of the picture, and

[0837] pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1.

[0838] – Otherwise, set applyVirtualBoundary equal to 1. ]]

[0839]

[0840] Table 8-24 – Based on the horizontal luminance sample position y and [[applyVirtualBoundary]] Specifications for r1, r2, and r3

[0841]

[0842]

[0843] 8.8.5.3 Luma Sample ALF Transposition and Filter Index Derivation

[0844] The inputs to this process are:

[0845] – Luma position (xCtb, yCtb), specifies the upper left sample point of the current luma codec tree block relative to the upper left sample point of the current picture,

[0846] – The reconstructed luminance picture sample array recPictureL before adaptive loop filtering processing.

[0847] The output of this processing is:

[0848] – Classification filter index array filtIdx[x][y], where x, y = 0..CtbSizeY-1,

[0849] – Transpose index array transposeIdx[x][y], where x,y = 0..CtbSizeY-1.

[0850] Given the array of luminance samples recPicture, the position (h) of each corresponding luminance sample (x, y) is x+i ,v y+j )(i,j=-2..5)

[0851] The export is as follows:

[0852] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtb+x-PpsVirtualBoundariesPosX[n] is greater than or equal to 0 and less than 2, the following applies:

[0853] h x+i =Clip3(PpsVirtualBoundariesPosX[n],pic_width_in_luma_samples-1,xCtb+x+i) (8-1208)

[0854] Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n]-xCtb-x is greater than 0 and less than 6, the following applies:

[0855] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n]-1,xCtb+x+i) (8-1209)

[0856] – Otherwise, the following applies:

[0857] h x+i=Clip3(0,pic_width_in_luma_samples-1,xCtb+x+i) (8-1210)

[0858] –[[If pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtb+y-PpsVirtualBoundariesPosY[n] is greater than or equal to 0 and less than 2 for any n=0..pps_num_hor_virtual_boundaries-1, the following applies:

[0859] v y+j =Clip3(PpsVirtualBoundariesPosY[n],pic_height_in_luma_samples-1,yCtb+y+j)(8-1211)

[0860] Otherwise, for any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n]-yCtb-y is greater than 0 and less than 6, the following applies:

[0861] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n]-1,yCtb+y+j) (8-1212)

[0862] – Otherwise, the following applies:

[0863] – If yCtb+CtbSizeY is greater than or equal to pic_height_in_luma_samples, the following applies:

[0864] v y+j =Clip3(0,pic_height_in_luma_samples-1,yCtb+y+j) (8-1213)

[0865] – Otherwise, if y is less than CtbSizeY-4, the following applies:

[0866] v y+j =Clip3(0,yCtb+CtbSizeY-5,yCtb+y+j) (8-1214)

[0867] – Otherwise, the following applies:

[0868] v y+j =Clip3(yCtb+CtbSizeY-4,pic_height_in_luma_samples-1,yCtb+y+j)(8-1215)]]

[0869]

[0870] Use the following sequence of steps to derive the classification filter index array filtIdx and the transpose index array transposeIdx:

[0871] 1. Variables filtH[x][y], filtV[x][y], filtD0[x][y] and filtD1[x][y](x,y=-2..CtbSizeY+1)

[0872] The export is as follows:

[0873] – If both x and y are even or both x and y are uneven, then the following applies:

[0874] filtH[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x-1 ,v y ]- (8-1216)recPicture[h x+1 ,v y ])

[0875] filtV[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x ,v y -1]- (8-1217)recPicture[h x ,v y+1 ])

[0876] filtD0[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x -1,v y -1]- (8-1218)recPicture[h x+1 ,v y+1 ])

[0877] filtD1[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x+1 ,v y -1]- (8-1219)recPicture[h x-1 ,v y+1 ])

[0878] – Otherwise, filtH[x][y], filtV[x][y], filtD0[x][y] and filtD1[x][y] are set equal to 0.

[0879] 2. The variables minY, maxY and ac are derived as follows:

[0880] – If (y<<2) is equal to (CtbSizeY-8) and (yCtb+CtbSizeY) is less than pic_height_in_luma_samples-1, set minY equal to -2, maxY equal to 3 and ac equal to 96.

[0881] – Otherwise, if (y<<2) is equal to (CtbSizeY-4) and (yCtb+CtbSizeY) is less than pic_height_in_luma_samples-1, set minY equal to 0, set maxY equal to 5 and set ac equal to 96.

[0882]

[0883]

[0884] –[[Otherwise, set minY equal to -2 and maxY equal to 5 and ac equal to 64.]]

[0885] 3. The variables sumH[x][y], sumV[x][y], sumD0[x][y], sumD1[x][y] and sumOfHV[x][y] (x, y = 0..(CtbSizeY-1)>>2) are derived as follows:

[0886] sumH[x][y]=∑ i ∑ j filtH[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1220)

[0887] sumV[x][y]=∑ i ∑ j filtV[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1221)

[0888] sumD0[x][y]=∑ i ∑ j filtD0[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1222)

[0889] sumD1[x][y]=∑ i ∑ j filtD1[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = -2..5, j = minY..maxY (8-1223)

[0890] sumOfHV[x][y]=sumH[x][y]+sumV[x][y] (8-1224)

[0891]

[0892] 8.8.5.4 Codec Tree Block Filtering for Chroma Samples

[0893] The inputs to this process are:

[0894] – the reconstructed chroma picture sample array recPicture before adaptive loop filtering processing,

[0895] – The filtered reconstructed chroma picture sample array alfPicture,

[0896] – Chroma position (xCtbC,

[0897] yCtbC), which specifies the upper left corner sample of the current chroma codec tree block relative to the upper left corner sample of the current picture.

[0898] The output of this process is the modified filtered reconstructed chrominance picture sample array alfPicture.

[0899] The width and height ctbWidthC and ctbHeightC of the current chroma codec tree block are derived as follows:

[0900] ctbWidthC=CtbSizeY / SubWidthC (8-1245)

[0901] ctbHeightC=CtbSizeY / SubHeightC (8-1246)

[0902] To derive the filtered reconstructed chroma samples alfPicture[x][y], each reconstructed chroma sample recPicture[x][y] in the current chroma codec treeblock is filtered as follows, where x = 0..CTBWidthC-1 and y = 0..CTBHeightC-1:

[0903] – The position (h) of each corresponding chroma sample (x, y) in the given chroma sample array recPicture x+i ,v y+j ) is derived as follows, where i,j = -2..2:

[0904] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtbC + x-PpsVirtualBoundariesPosX[n] / SubWidthC is greater than or equal to 0 and less than 2, the following applies:

[0905] h x+i =Clip3(PpsVirtualBoundariesPosX[n] / SubWidthC, (8-1247)

[0906] pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i)

[0907] – Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n] / SubWidthC-xCtbC-x is greater than 0 and less than 3, the following applies:

[0908] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n] / SubWidthC-1,xCtbC+x+i)(8-1248)

[0909] – Otherwise, the following applies:

[0910] h x+i =Clip3(0,pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i)(8-1249)

[0911] –[[For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtbC+y−PpsVirtualBoundariesPosY[n] / SubHeightC is greater than or equal to 0 and less than 2, the following applies:

[0912] v y+j =Clip3(PpsVirtualBoundariesPosY[n] / SubHeightC, (8-1250)

[0913] pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)

[0914] Otherwise, for any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n] / SubHeightC-yCtbC-y is greater than 0 and less than 3, the following applies:

[0915] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n] / SubHeightC-1,yCtbC+y+j)(8-1251)

[0916] -otherwise,]]

[0917] v y+j =Clip3(0,pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)(8-1252)

[0918] –[[The variable applyVirtualBoundary is exported as follows:

[0919] – Set applyVirtualBoundary equal to 0 if one or more of the following conditions are true:

[0920] – The lower boundary of the current codec tree block is the lower boundary of the picture.

[0921] – The lower boundary of the current codec tree block is the lower boundary of the brick, and loop_filter_across_bricks_enabled_flag is equal to 0.

[0922] – The lower boundary of the current codec tree block is the lower boundary of the slice, and loop_filter_across_slices_enabled_flag is equal to 0.

[0923] – The lower boundary of the current codec treeblock is one of the bottom virtual boundaries of the picture, and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1.

[0924] – Otherwise, set applyVirtualBoundary equal to 1. ]]

[0925] – The variables boundaryPos1 and boundaryPos2 are derived by invoking the vertical boundary position derivation process specified in 8.8.5.5 (yCtb equals yCtb, and y equals y).

[0926] – Set the variable boundaryPos1 equal to boundaryPos1 / SubWidthC.

[0927] – Set the variable boundaryPos2 equal to boundaryPos2 / SubWidthC.

[0928] – Specify the reconstructed sample offsets r1, r2 and r3 according to the horizontal luma sample position y and applyVirtualBoundary in Table 8-24.

[0929] –The variable curr is exported as follows:

[0930] curr=recPicture[h x ,v y ] (8-1253)

[0931] – The array f[j] of chroma filter coefficients and the array c[j] of chroma clipping values are derived as follows, where j = 0..5:

[0932] f[j]=AlfCoeff C [slice_alf_aps_id_chroma][j] (8-1254)

[0933] c[j]=AlfClip C [slice_alf_aps_id_chroma][j] (8-1255)

[0934] –The variable sum is exported as follows:

[0935]

[0936]

[0937] sum=curr+(sum+64)>>7) (8-1257)–The modified filtered reconstructed chrominance picture samples alfPicture[xCtbC+x][yCtbC+y] are derived as follows:

[0938] – If pcm_loop_filter_disabled_flag and pcm_flag[(xCtbC+x)*SubWidthC][(yCtbC+y)*SubHeightC] are both equal to 1, the following applies:

[0939] alfPicture[xCtbC+x][yCtbC+y]=recPictureL[hx,vy] (8-1258)

[0940] – Otherwise (pcm_loop_filter_disabled_flag is equal to 0 or pcm_flag[x][y] is equal to 0), the following applies:

[0941] alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepthC)-1,sum) (8-1259)

[0942] [[Table 8-25 – Specification of r1 and r2 according to horizontal luma sample position y and applyVirtualBoundary]]

[0943]

[0944] – According to the horizontal brightness sample position y and Specifications of r1 and r2

[0945]

[0946] 8.8.5.5 Derivation of the vertical position of luminance samples

[0947]

[0948]

[0949] 5.7 Example 7

[0950] For a CTU, it may not coincide with any boundary (e.g., picture / slice / slice / brick / sub-picture boundary). However, it may need to access samples outside the current unit (e.g., picture / slice / slice / brick / sub-picture). If filtering across slice boundaries is disabled (e.g., loop_filter_across_slices_enabled_flag is false), samples need to be filled outside the current unit.

[0951] For example, for Figure 28 The sample point 2801 in (taking the brightness sample point as an example) can be Figure 29 That fills the samples used in the ALF filtering process.

[0952] 5.8 Example 8

[0953] In this embodiment, the following main ideas are applied:

[0954] About enabling ALF virtual boundaries:

[0955] - For CTUs that are not in the last CTU row of the picture (for example, the lower boundary of the CTU is not the lower boundary of the picture or exceeds the lower boundary of the picture), ALF virtual boundaries are enabled, that is, a CTU can be divided into two or more parts, and samples in one part are not allowed to use samples in another part.

[0956] - For the CTU located in the last CTU row of the picture (for example, the lower boundary of the CTU is the lower boundary of the picture or exceeds the lower boundary of the picture), the ALF virtual boundary is enabled, that is, a CTU can be divided into two or more parts, and the samples in one part are not allowed to use the samples in another part.

[0957] Regarding border padding in classification processing (including ALF virtual border, strip / slice / brick / sub-picture border, and "360 virtual border"):

[0958] For samples at one (or more) boundaries, when adjacent samples crossing the boundary are not allowed to be used, one-sided filling is performed to fill these adjacent samples.

[0959] Regarding the filling of boundaries in the ALF filtering process (including ALF virtual boundaries, strip / slice / brick / sub-picture boundaries, and "360 virtual boundaries"):

[0960] For samples at one (or more) boundaries (slice / tile / brick / sub-picture boundaries or "360 virtual boundaries" coinciding with CTU boundaries), when adjacent samples crossing the boundaries are not allowed, perform two-side padding to fill these adjacent samples.

[0961] For samples at one (or more) boundaries (picture boundaries or "360 virtual boundaries" that do not coincide with CTU boundaries), when adjacent samples crossing the boundaries are not allowed, one-sided padding is performed to fill these adjacent samples.

[0962] 8.8.5.2 Codec Tree Block Filtering for Luma Samples

[0963] The inputs to this process are:

[0964] – Reconstructed luminance picture sample array recPicture before adaptive loop filtering processing L ,

[0965] –Filtered reconstructed brightness picture sample array alfPicture L ,

[0966] - Luma position (xCTB, yCTB), which specifies the top left corner sample of the current luma codec treeblock relative to the top left corner sample of the current picture.

[0967] The output of this process is the modified filtered reconstructed luminance picture sample array alfPicture L .

[0968] Reconstruct the brightness picture sample array recPicture with position (xCtb, yCtb) L As input, the derivation process of the filter indices in Section 8.8.5.3 is called, and filtIdx[x][y] and transposeIdx[x][y] (x, y = 0..CtbSizeY-1) are output.

[0969] For the filtered reconstructed luminance sample alfPicture L Derivation of [x][y], for each reconstructed luminance sample recPicture in the current luminance codec tree block L [x][y](x,y=0..CtbSizeY–1) is filtered as follows:

[0970] – The array f[j] of luma filter coefficients and the array c[j] of luma clipping values corresponding to the filter specified by filtIdx[x][y] are derived as follows, where j = 0..11:

[0971] – If AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] is less than 16, the following applies:

[0972] i=AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] (8-1187)

[0973] f[j]=AlfFixFiltCoeff[AlfClassToFiltMap[i][filtIdx[x][y]]][j] (8-1188)

[0974] c[j]=2 BitdepthY (8-1189)

[0975] – Otherwise (AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize] is greater than or equal to 16, then the following applies:

[0976] i=slice_alf_aps_id_luma[AlfCtbFiltSetIdxY[xCtb>>Log2CtbSize][yCtb>>Log2CtbSize]-16] (8-1190)

[0977] f[j]=AlfCoeff L [i][filtIdx[x][y]][j] (8-1191)

[0978] c[j]=AlfClip L [i][filtIdx[x][y]][j] (8-1192)

[0979] – Luma filter coefficients and shear value index idx depend on transposeIdx[x][y] and are derived as follows:

[0980] – If transposeIndex[x][y] is equal to 1, then the following applies:

[0981] idx[]={9,4,10,8,1,5,11,7,3,0,2,6} (8-1193)

[0982] – Otherwise, if transposeIndex[x][y] is equal to 2, then the following applies:

[0983] idx[]={0,3,2,1,8,7,6,5,4,9,10,11} (8-1194)

[0984] – Otherwise, if transposeIndex[x][y] is equal to 3, then the following applies:

[0985] idx[]={9,8,10,4,3,7,11,5,1,0,2,6} (8-1195)

[0986] – Otherwise, the following applies:

[0987] idx[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} (8-1196) - the position of each of the corresponding luma samples within the array recPicture of a given luma sample (h x+i ,v y+j )(i,j=-3..3) is derived as follows:

[0988] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and xCtb+x-PpsVirtualBoundariesPosX[n] is greater than or equal to 0 and less than 3, then the following applies:

[0989] h x+i =Clip3(PpsVirtualBoundariesPosX[n],pic_width_in_luma_samples-1,xCtb+x+i)(8-1197)

[0990] – Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n]-xCtb-x is greater than 0 and less than 4, then the following applies:

[0991] hx+i =Clip3(0,PpsVirtualBoundariesPosX[n]-1,xCtb+x+i) (8-1198)

[0992] – Otherwise, the following applies:

[0993] h x+i =Clip3(0,pic_width_in_luma_samples-1,xCtb+x+i) (8-1199)

[0994] –[[If the included x ,v y ) is equal to 0 for the sub-picture of the luma sample at position , then the following applies:

[0995] h x+i =Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,h x+i ) (8-1184)]]

[0996] – For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtb+y-PpsVirtualBoundariesPosY[n] is greater than or equal to 0 and less than 3, then the following applies:

[0997] v y+j =Clip3(PpsVirtualBoundariesPosY[n],pic_height_in_luma_samples-1,yCtb+y+j)

[0998] (8-1200)

[0999] – Otherwise, for any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n]-yCtb-y is greater than 0 and less than 4, then the following applies:

[1000] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n]-1,yCtb+y+j) (8-1201)

[1001] – Otherwise, the following applies:

[1002] v y+j =Clip3(0,pic_height_in_luma_samples-1,yCtb+y+j) (8-1202)

[1003] –[[If the included x ,v y ) is equal to 0 for the sub-picture of the luma sample at position , then the following applies:

[1004] v y+j =Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,v y+j ) (8-1184)

[1005] –The variable applyVirtualBoundary is exported as follows:

[1006] – Set applyVirtualBoundary equal to 0 if one or more of the following conditions are true:

[1007] – The lower boundary of the current codec tree block is the lower boundary of the picture.

[1008] – The lower boundary of the current codec tree block is the lower boundary of the brick, and loop_filter_across_bricks_enabled_flag is equal to 0.

[1009] – The lower boundary of the current codec tree block is the lower boundary of the slice, and loop_filter_across_slices_enabled_flag is equal to 0.

[1010] – The lower boundary of the current codec tree block is the lower boundary of the sub-picture and contains the sub-picture at position (h x ,v y) of the sub-picture of the luma sample at position ) is equal to 0.

[1011] – The lower boundary of the current codec treeblock is one of the bottom virtual boundaries of the picture, and pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1.

[1012] – Otherwise, set applyVirtualBoundary equal to 1. ]]

[1013]

[1014] - In Table 8-24, according to the horizontal luminance sample position y and [[applyVirtualBoundary]] specifies the reconstructed sample point offsets r1, r2, and r3.

[1015]

[1016] –The variable curr is exported as follows:

[1017] curr=recPicture L [h x ,v y ] (8-1203)

[1018] –The variable sum is exported as follows:

[1019]

[1020] sum=curr+((sum+64)>>7) (8-1205)

[1021] – The modified filtered reconstructed luminance picture samples alfPictureL[xCtb+x][yCtb+y] are derived as follows:

[1022] – If pcm_loop_filter_disabled_flag and pcm_flag[xCtb+x][yCtb+y] are both equal to 1, the following applies:

[1023] alfPictureL[xCtb+x][yCtb+y]=recPictureL[hx,vy] (8-1206)

[1024] – Otherwise (pcm_loop_filter_disabled_flag is equal to 0 or pcm_flag[x][y] is equal to 0), the following applies:

[1025] alfPictureL[xCtb+x][yCtb+y]=Clip3(0,(1< <BitDepthY)-1,sum) (8-1207)

[1026] Table 8-24 – Horizontal luminance sample position y , Specifications of r1, r2, and r3 for [[and applyVirtualBoundary]]

[1027]

[1028]

[1029]

[1030]

[1031] 8.8.5.3 Luma Sample ALF Transposition and Filter Index Derivation

[1032] The inputs to this process are:

[1033] – Luma position (xCtb, yCtb), specifies the upper left sample point of the current luma codec tree block relative to the upper left sample point of the current picture,

[1034] – Reconstructed luminance picture sample array recPicture before adaptive loop filtering processing L .

[1035] The output of this processing is:

[1036] – Classification filter index array filtIdx[x][y], where x, y = 0..CtbSizeY-1,

[1037] – Transpose index array transposeIdx[x][y], where x,y = 0..CtbSizeY-1.

[1038] Given the array of luminance samples recPicture, the position (h) of each corresponding luminance sample (x, y) is x+i ,v y+j )(i,j=-2..5)

[1039] The export is as follows:

[1040] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1

[1041] and xCtb+x-PpsVirtualBoundariesPosX[n] is greater than or equal to 0 and less than 2, then the following applies:

[1042] h x+i =Clip3(PpsVirtualBoundariesPosX[n],pic_width_in_luma_samples-1,xCtb+x+i) (8-1208)

[1043] – Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosX[n]-xCtb-x is greater than 0 and less than 6, then the following applies:

[1044] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n]-1,xCtb+x+i) (8-1209)

[1045] – Otherwise, the following applies:

[1046] h x+i =Clip3(0,pic_width_in_luma_samples-1,xCtb+x+i) (8-1210)

[1047] –[[If the included x ,v y ) is equal to 0 for the sub-picture of the luma sample at position , then the following applies:

[1048] h x+i =Clip3(SubPicLeftBoundaryPos,SubPicRightBoundaryPos,hx+i ) (8-1184)]]

[1049] – For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and yCtb+y-PpsVirtualBoundariesPosY[n] is greater than or equal to 0 and less than 2, then the following applies:

[1050] v y+j =Clip3(PpsVirtualBoundariesPosY[n],pic_height_in_luma_samples-1,yCtb+y+j)(8-1211)

[1051] – Otherwise, for any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 and PpsVirtualBoundariesPosY[n]-yCtb-y is greater than 0 and less than 6, then the following applies:

[1052] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n]-1,yCtb+y+j) (8-1212)

[1053] – Otherwise, the following applies:

[1054] – If yCtb+CtbSizeY is greater than or equal to pic_height_in_luma_samples, the following applies:

[1055] v y+j =Clip3(0,pic_height_in_luma_samples-1,yCtb+y+j) (8-1213)

[1056] –[[Otherwise, if y is less than CtbSizeY-4, the following applies:

[1057] v y+j=Clip3(0,yCtb+CtbSizeY-5,yCtb+y+j) (8-1214)

[1058] – Otherwise, the following applies:

[1059] v y+j =Clip3(yCtb+CtbSizeY-4,pic_height_in_luma_samples-1,yCtb+y+j)(8-1215)

[1060] – If the included x ,v y ) is equal to 0 for the sub-picture of the luma sample at position , then the following applies:

[1061] v y+j =Clip3(SubPicTopBoundaryPos,SubPicBotBoundaryPos,v y+j ) (8-1184)]]

[1062]

[1063] Use the following sequence of steps to derive the classification filter index array filtIdx and the transpose index array transposeIdx:

[1064] 1. Variables filtH[x][y], filtV[x][y], filtD0[x][y] and filtD1[x][y](x,y=-2..CtbSizeY+1)

[1065] The export is as follows:

[1066] – If both x and y are even or both x and y are uneven, then the following applies:

[1067] filtH[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x-1 ,v y ]- (8-1216)recPicture[h x+1 ,v y ])

[1068] filtV[x][y]=Abs((recPicture[h x ,v y]<<1)-recPicture[h x ,v y-1 ]- (8-1217)recPicture[h x ,v y+1 ])

[1069] filtD0[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x-1 ,v y-1 ]- (8-1218)recPicture[h x+1 ,v y+1 ])

[1070] filtD1[x][y]=Abs((recPicture[h x ,v y ]<<1)-recPicture[h x+1 ,v y-1 ]- (8-1219)recPicture[h x-1 ,v y+1 ])

[1071] – Otherwise, filtH[x][y], filtV[x][y], filtD0[x][y] and filtD1[x][y] are set equal to 0.

[1072] 2.[[The variables minY, maxY and ac are derived as follows:

[1073] – If (y<<2) is equal to (CtbSizeY-8) and (yCtb+CtbSizeY) is less than pic_height_in_luma_samples-1, then set minY equal to -2, maxY equal to 3 and ac equal to 96.

[1074] – Otherwise, if (y<<2) is equal to (CtbSizeY-4) and (yCtb+CtbSizeY) is less than pic_height_in_luma_samples-1, set minY equal to 0, maxY equal to 5 and ac equal to 96. ]]

[1075] 3. The variables sumH[x][y], sumV[x][y], sumD0[x][y], sumD1[x][y] and sumOfHV[x][y] (x, y = 0..(CtbSizeY-1)>>2) are derived as follows:

[1076]

[1077]

[1078]

[1079]

[1080] sumH[x][y]=S i ∑ j filtH[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = [[-2..5]],j=minY..maxY (8-1220)

[1081] sumV[x][y]=∑ i ∑ j filtV[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = [[-2..5]],j=minY..maxY (8-1221)

[1082] sumD0[x][y]=∑ i ∑ j filtD0[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = [[-2..5]],j=minY..maxY (8-1222)

[1083] sumD1[x][y]=∑ i ∑ j filtD1[h (x<<2)+i -xCtb][v (y<<2)+j -yCtb] where i = [[-2..5]],j=minY..maxY (8-1223)

[1084] sumOfHV[x][y]=sumH[x][y]+sumV[x][y] (8-1224)

[1085] 4. The variables dir1[x][y], dir2[x][y] and dirS[x][y] (x, y = 0..CtbSizeY-1) are derived as follows:

[1086] – The variables hv1, hv0 and dirHV are exported as follows:

[1087] – If sumV[x>>2][y>>2] is greater than sumH[x>>2][y>>2], then the following applies:

[1088] hv1=sumV[x>>2][y>>2] (8-1225)

[1089] hv0=sumH[x>>2][y>>2] (8-1226)

[1090] dirHV=1(8-1227)

[1091] – Otherwise, the following applies:

[1092] hv1=sumH[x>>2][y>>2] (8-1228)

[1093] hv0=sumV[x>>2][y>>2] (8-1229)

[1094] dirHV=3 (8-1230)

[1095] – The variables d1, d0 and dirD are exported as follows:

[1096] – If sumD0[x>>2][y>>2] is greater than sumD1[x>>2][y>>2], then the following applies:

[1097] d1=sumD0[x>>2][y>>2] (8-1231)

[1098] d0=sumD1[x>>2][y>>2] (8-1232)

[1099] dirD=0 (8-1233)

[1100] – Otherwise, the following applies:

[1101] d1=sumD1[x>>2][y>>2] (8-1234)

[1102] d0=sumD0[x>>2][y>>2] (8-1235)

[1103] dirD=2 (8-1236)

[1104] –Variables hvd1 and hvd0 are exported as follows:

[1105] hvd1=(d1*hv0>hv1*d0)? d1:hv1 (8-1237)

[1106] hvd0=(d1*hv0>hv1*d0)? d0:hv0 (8-1238)

[1107] – The variables dirS[x][y], dir1[x][y] and dir2[x][y] are derived as follows:

[1108] dir1[x][y]=(d1*hv0>hv1*d0)? dirD:dirHV (8-1239)

[1109] dir2[x][y]=(d1*hv0>hv1*d0)? dirHV:dirD (8-1240)

[1110] dirS[x][y]=(hvd1>2*hvd0)? 1:((hvd1*2>9*hvd0)?2:0) (8-1241)

[1111] 5. The variable avgVar[x][y] (x, y = 0..CtbSizeY–1) is derived as follows:

[1112] varTab[]={0,1,2,2,2,2,2,3,3,3,3,3,3,3,3,4} (8-1242)

[1113] avgVar[x][y]=varTab[Clip3(0,15,(sumOfHV[x>>2][y>>2]*ac)>>(3+BitDepth Y ))] (8-1243)

[1114] 6. The classification filter index array filtIdx[x][y] and the transpose index array transposeIdx[x][y] (x=y=0..CtbSizeY-1) are derived as follows:

[1115] transposeTable[]={0,1,0,2,2,3,1,3}

[1116] transposeIdx[x][y]=transposeTable[dir1[x][y]*2+(dir2[x][y]>>1)]

[1117] filtIdx[x][y]=avgVar[x][y]

[1118] When dirS[x][y] is not equal to 0, filtIdx[x][y] is modified as follows:

[1119] filtIdx[x][y]+=(((dir1[x][y]&0x1)<<1)+dirS[x][y])*5 (8-1244)

[1120] 8.8.5.4 Codec Tree Block Filtering for Chroma Samples

[1121] The inputs to this process are:

[1122] – the reconstructed chroma picture sample array recPicture before adaptive loop filtering processing,

[1123] – The filtered reconstructed chroma picture sample array alfPicture,

[1124] – Chroma position (xCtbC,

[1125] yCtbC), which specifies the upper left corner sample of the current chroma codec tree block relative to the upper left corner sample of the current picture.

[1126] The output of this process is the modified filtered reconstructed chrominance picture sample array alfPicture.

[1127] The width and height ctbWidthC and ctbHeightC of the current chroma codec tree block are derived as follows:

[1128] ctbWidthC=CtbSizeY / SubWidthC (8-1245)

[1129] ctbHeightC=CtbSizeY / SubHeightC (8-1246)

[1130] To derive the filtered reconstructed chroma samples alfPicture[x][y], each reconstructed chroma sample recPicture[x][y] in the current chroma codec treeblock is filtered as follows, where x = 0..CTBWidthC-1 and y = 0..CTBHeightC-1:

[1131] – The position (h) of each corresponding chroma sample (x, y) in the given chroma sample array recPicture x+i ,v y+j ) is derived as follows, where i,j = -2..2:

[1132] – For any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1, and xCtbC+x-PpsVirtualBoundariesPosX[n] / SubWidthC is greater than or equal to 0 and less than 2, then the following applies:

[1133] h x+i =Clip3(PpsVirtualBoundariesPosX[n] / SubWidthC, (8-1247)

[1134] pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i)

[1135] – Otherwise, for any n = 0..pps_num_ver_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 , and PpsVirtualBoundariesPosX[n] / SubWidthC-xCtbC-x is greater than 0 and less than 3, then the following applies:

[1136] h x+i =Clip3(0,PpsVirtualBoundariesPosX[n] / SubWidthC-1,xCtbC+x+i) (8-1248)

[1137] – Otherwise, the following applies:

[1138] h x+i =Clip3(0,pic_width_in_luma_samples / SubWidthC-1,xCtbC+x+i) (8-1249)

[1139] –[[If the included x ,v y ) is equal to 0 for the sub-picture of the luma sample at position , then the following applies:

[1140] h x+i =Clip3(SubPicLeftBoundaryPos / SubWidthC,SubPicRightBoundaryPos / SubWidthC,h x+i) (8-1184)]]

[1141] – For any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 , and yCtbC+y-PpsVirtualBoundariesPosY[n] / SubHeightC is greater than or equal to 0 and less than 2, then the following applies:

[1142] v y+j =Clip3(PpsVirtualBoundariesPosY[n] / SubHeightC, (8-1250)

[1143] pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)

[1144] – Otherwise, for any n = 0..pps_num_hor_virtual_boundaries–1, if pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1 , and PpsVirtualBoundariesPosY[n] / SubHeightC-yCtbC-y is greater than 0 and less than 3, then the following applies:

[1145] v y+j =Clip3(0,PpsVirtualBoundariesPosY[n] / SubHeightC-1,yCtbC+y+j)(8-1251)

[1146] – Otherwise, the following applies:

[1147] v y+j =Clip3(0,pic_height_in_luma_samples / SubHeightC-1,yCtbC+y+j)(8-1252)

[1148] –[[If the included x ,v y) is equal to 0 for the sub-picture of the luma sample at position , then the following applies:

[1149] v y+j =Clip3(SubPicTopBoundaryPos / SubWidthC,SubPicBotBoundaryPos / SubWidthC,v y+j ) (8-1184)

[1150] –The variable applyVirtualBoundary is exported as follows:

[1151] – Set applyVirtualBoundary equal to 0 if one or more of the following conditions are true:

[1152] – The lower boundary of the current codec tree block is the lower boundary of the picture.

[1153] – The lower boundary of the current codec tree block is the lower boundary of the brick, and loop_filter_across_bricks_enabled_flag is equal to 0.

[1154] – The lower boundary of the current codec tree block is the lower boundary of the slice, and loop_filter_across_slices_enabled_flag is equal to 0.

[1155] – The lower boundary of the current codec tree block is the lower boundary of the sub-picture and contains the sub-picture at position (h x ,v y ) of the sub-picture of the luma sample at position ) is equal to 0.

[1156] – the lower boundary of the current codec treeblock is one of the bottom virtual boundaries of the picture, and

[1157] pps_loop_filter_across_virtual_boundaries_disabled_flag is equal to 1.

[1158] – Otherwise, set applyVirtualBoundary equal to 1. ]]

[1159]

[1160] – In Table 8-27, according to the horizontal luminance sample position y, [[and applyVirtualBoundary]] specifies the reconstructed sample point offset r1 and r2.

[1161]

[1162] –The variable curr is exported as follows:

[1163] curr=recPicture[h x ,v y ] (8-1253)

[1164] – The array f[j] of chroma filter coefficients and the array c[j] of chroma clipping values are derived as follows, where j = 0..5:

[1165] f[j]=AlfCoeff C [slice_alf_aps_id_chroma][j] (8-1254)

[1166] c[j]=AlfClip C [slice_alf_aps_id_chroma][j] (8-1255)

[1167] –The variable sum is exported as follows:

[1168]

[1169]

[1170] sum=curr+(sum+64)>>7) (8-1257)

[1171] – The modified filtered reconstructed chrominance picture samples alfPicture[xCtbC+x][yCtbC+y] are derived as follows:

[1172] – If pcm_loop_filter_disabled_flag and pcm_flag[(xCtbC+x)*SubWidthC][(yCtbC+y)*SubHeightC] are both equal to 1, the following applies:

[1173] alfPicture[xCtbC+x][yCtbC+y]=recPicture L [h x ,v y ] (8-1258)

[1174] – Otherwise (pcm_loop_filter_disabled_flag is equal to 0 or pcm_flag[x][y] is equal to 0), the following applies:

[1175] alfPicture[xCtbC+x][yCtbC+y]=Clip3(0,(1< <BitDepth C )-1,sum) (8-1259)

[1176] Table 8-27 According to the horizontal brightness sample point position y , Specification of r1 and r2 for [[and applyVirtualBoundary]]

[1177]

[1178]

[1179]

[1180]

[1181] 8.8.5.5 Derivation of ALF boundary position of sample points

[1182]

[1183]

[1184]

[1185] The specific value -128 used in the above embodiment may be replaced by other values, such as -K, where K is greater than or not less than the number of rows moved from the lower boundary of the CTU (eg, K=-5).

[1186] Optionally, based on PpsVirtualBoundariesPosY[n] being in the range of 1 to Ceil(pic_height_in_luma_samples÷8)-1 (including 1 and Ceil(pic_height_in_luma_samples÷8)-1), the conditional check of “PpsVirtualBoundariesPosY[n] is not equal to pic_height_in_luma_samples–1 or 0” may be further removed.

[1187] Optionally, a flag can be used to mark whether each sample needs to be processed differently if it is at a video unit boundary.

[1188] Figure 22is a block diagram of a video processing device 2200. Device 2200 can be used to implement one or more methods described herein. Device 2200 can be embodied in a smartphone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. Device 2200 may include one or more processors 2202, one or more memories 2204, and video processing hardware 2206. Processor 2202 can be configured to implement one or more methods described in this document. Memory(s) 2204 can be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 2206 can be used to implement some of the techniques described in this document in hardware circuits. In some embodiments, video processing hardware 2206 can be internal to or partially internal to processor 2202 (e.g., a graphics processor unit).

[1189] In some embodiments, the Figure 22 The device implemented on the hardware platform implements the video encoding and decoding method.

[1190] Figure 23 23 is a flow chart of an example method 2300 for video processing. The method includes determining (2302) one or more interpolation filters to use during conversion between a current video block of a video and a bitstream of the current video block, wherein the one or more interpolation filters are from a plurality of interpolation filters of the video; and performing (2304) the conversion using the one or more interpolation filters.

[1191] The various solutions and embodiments described herein are further described using solution lists.

[1192] Section 4, Item 1 provides additional examples of the following solutions.

[1193] 1. A video processing method, comprising: performing conversion between video blocks of a video picture and a bitstream thereof, wherein the video blocks are processed using logical groupings of codec tree blocks, wherein the codec tree blocks are processed based on whether a lower boundary of a bottom codec tree block is outside a lower boundary of the video picture.

[1194] 2. The method according to solution 1, wherein processing the codec treeblock comprises: performing adaptive loop filtering on sample values of the codec treeblock by using samples within the codec treeblock.

[1195] 3. The method according to solution 1, wherein processing the codec treeblock includes performing adaptive loop filtering on sample values of the codec treeblock by disabling partitioning of the codec treeblock into two parts according to a virtual boundary.

[1196] Section 4, Item 2 provides additional examples of the following solutions.

[1197] 4. A video processing method, comprising: determining a usage status of virtual samples during loop filtering based on a condition of a codec tree block of a current video block; and performing conversion between the video block and a bitstream of the video block according to the usage status of the virtual samples.

[1198] 5. The method according to solution 4, wherein the logical true value of the usage status indicates that the current video block is divided into at least two parts by a virtual boundary, and filtering samples in one part are not allowed to use information from the other part.

[1199] 6. The method of solution 4, wherein a logical true value of the usage state indicates use of virtual samples during loop filtering, and wherein loop filtering is performed using modified values of reconstructed samples of the current video block.

[1200] 7. The method of solution 4, wherein a logical false value of the usage state indicates that filtered samples in a block are allowed to use information in the same block.

[1201] 8. The method of solution 4, wherein a logical true value of the usage state indicates that loop filtering is performed on the reconstructed samples of the current video block without further modifying the reconstructed samples.

[1202] 9. The method according to any of solutions 4-8, wherein the condition specifies that the used state is set to a logical false value due to the codec tree block having a specific size.

[1203] 10. The method according to any one of solutions 4-8, wherein the condition specifies that the usage state is set to a logical false value due to a size of the codec tree block being larger than a specific size.

[1204] 11. According to any one of the methods described in solutions 4 to 8, the size of the tree block is smaller than a specific size.

[1205] Section 4, Item 3 provides additional examples of the following solutions.

[1206] 12. The method according to solution 5, wherein the condition depends on whether the lower boundary of the current video block is a lower boundary of a video unit smaller than the video picture, or whether the lower boundary of the current video block is a virtual boundary.

[1207] 13. The method of solution 12, wherein the condition depends on whether the lower boundary of the current video block is a lower boundary of a slice, or a tile boundary.

[1208] 14. The method of solution 12, wherein the condition specifies that the usage state is set to a logical true value when a lower boundary of the current video block is a lower boundary of a slice, or a tile boundary.

[1209] 15. The method of solution 4-12, wherein the condition specifies that the usage state is set to a logical false value when the lower boundary of the current video block is at or outside the lower boundary of the picture boundary.

[1210] Section 4, Item 4 provides additional examples of the following solutions.

[1211] 16. A video processing method comprising: during conversion between a video picture logically grouped into one or more video slices or video bricks and a bitstream of the video picture, determining to disable use of samples in another slice or brick in adaptive loop filtering processing; and performing the conversion based on the determination.

[1212] Section 4, Item 5 provides additional examples of the following solutions.

[1213] 17. A video processing method, comprising: during conversion between a current video block of a video picture and a bitstream of the current video block, determining that the current video block includes samples located at a boundary of a video unit of the video picture; and performing conversion based on the determination, wherein performing the conversion comprises: generating virtual samples for loop filtering processing using a unified method that is the same for all boundary types in the video picture.

[1214] 18. The method of solution 17, wherein the video unit is a strip, a slice, or a 360-degree video.

[1215] 19. The method of solution 17, wherein the loop filtering comprises adaptive loop filtering.

[1216] 20. The method according to any one of solutions 17-19, wherein the unified method is a two-side filling method.

[1217] 21. A method according to any one of solutions 17 to 20, wherein the unified method is: when access to samples below the first row is not allowed and padding is used to generate virtual samples for the samples below the first row, access to samples above the second row is also set to be not allowed, and padding is used to generate virtual samples for the samples above the second row.

[1218] 22. A method according to any one of solutions 17 to 20, wherein the unified method is: when access to samples above the first row is not allowed and padding is used to generate virtual samples for the samples above the first row, access to samples below the second row is also set to be not allowed, and padding is used to generate virtual samples for the samples below the second row.

[1219] 23. The method according to any one of solutions 21-22, wherein the distance between the first row and the current row where the sample to be filtered is located is equal to the distance between the second row and the first row.

[1220] Section 4, Item 6 provides additional examples of the following solutions.

[1221] 24. A video processing method, comprising: during conversion between a current video block of a video picture and its bitstream, determining to apply one of a plurality of adaptive loop filter (ALF) sample selection methods available for the video picture during conversion; and performing the conversion by applying the one of the plurality of ALF sample selection methods.

[1222] 25. The method of solution 24, wherein the plurality of ALF sample selection methods include a first method in which samples selected before a loop filter are applied to a current video block during conversion; and a first method in which samples selected after a loop filter are applied to a current video block during conversion.

[1223] Section 4, Item 7 provides additional examples of the following solutions.

[1224] 26. A video processing method, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block, wherein the boundary rule prohibits use of samples of a virtual pipe data unit (VPDU) that spans the video picture; and performing the conversion using a result of the loop filtering operation.

[1225] 27. The method of solution 26, wherein the VPDU corresponds to a region of a video picture having a fixed size.

[1226] 28. The method according to any of solutions 26-27, wherein the boundary rule further stipulates that virtual samples are used instead of forbidden samples for loop filtering.

[1227] 29. The method according to solution 28, wherein the virtual sample points are generated by filling.

[1228] Section 4, Item 8 provides additional examples of the following solutions.

[1229] 30. A video processing method, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block; wherein the boundary rule stipulates that for positions of the current video block that cross a video unit boundary, samples generated without using padding are used; and performing the conversion using a result of the loop filtering operation.

[1230] 31. The method according to solution 30, wherein the sample points are generated using a two-side filling technique.

[1231] 32. The method of solution 30, wherein the loop filtering operation includes using the same virtual sample generation technique for symmetrically positioned samples during the loop filtering operation.

[1232] 33. The method according to any one of solutions 30-32, wherein the loop filtering operation performed on the samples of the current video block includes: shaping the samples of the current video block before applying the loop filtering.

[1233] Section 4, Item 9 provides additional examples of the following solutions.

[1234] 34. A video processing method, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block, wherein the boundary rule stipulates selecting a filter for the loop filtering operation, the dimension of the filter being such that the samples of the current video block used during the loop filtering do not cross a boundary of a video unit of the video picture; and using a result of the loop filtering operation to perform the conversion.

[1235] Section 4, Item 10 provides additional examples of the following solutions.

[1236] 35. A video processing method, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block, wherein the boundary rule specifies selecting a cropping parameter or filter coefficient for the loop filtering operation based on whether the loop filtering requires padded samples; and using the result of the loop filtering operation to perform the conversion.

[1237] 36. The method of solution 35, wherein the cropping parameters or filter coefficients are included in the bitstream.

[1238] Section 4, Item 11 provides additional examples of the following solutions.

[1239] 37. A video processing method, comprising: performing a loop filtering operation on samples of the current video block of a video picture based on a boundary rule during conversion between a current video block and a bitstream of the current video block, wherein the boundary rule depends on a color component identity of the current video block; and performing the conversion using a result of the loop filtering operation.

[1240] 38. The method of solution 37, wherein the boundary rules are different for brightness and / or different color components.

[1241] 39. The method of any of solutions 1-38, wherein converting comprises encoding the current video block into a bitstream.

[1242] 40. The method according to any of solutions 1-38, wherein converting comprises decoding a bitstream to generate sample values of the current video block.

[1243] 41. A video encoding device comprising a processor configured to implement the method described in any one or more of solutions 1-38.

[1244] 42. A video decoding device comprising a processor configured to implement the method described in any one or more of solutions 1-38.

[1245] 43. A computer-readable medium having codes stored thereon, which, when executed by a processor, cause the processor to implement the method described in any one or more of solutions 1-38.

[1246] Figure 31 is a block diagram illustrating an exemplary video processing system 3100 in which the various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of system 3100. System 3100 may include an input 3102 for receiving video content. The video content may be received in a raw or uncompressed format (e.g., 8-bit or 10-bit multi-component pixel values), or may be received in a compressed or codec format. Input 3102 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces (e.g., Ethernet, passive optical networks (PONs)) and wireless interfaces (e.g., Wi-Fi or cellular interfaces).

[1247] System 3100 may include an encoding component 3104 that can implement the various encoding or encoding methods described in this document. The encoding component 3104 can reduce the average bit rate of the video from the input 3102 to the output of the encoding component 3104 to generate an encoded representation of the video. Therefore, encoding technology is sometimes referred to as video compression or video transcoding technology. The output of the encoding component 3104 can be stored or sent via a communication connected by a component 3106. Component 3108 can use the storage or communication bit stream (or encoding) representation of the video received at the input 3102 to generate pixel values or displayable video sent to the display interface 3110. The process of generating user-visible video from the bit stream is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "encoding" operations or tools, it should be understood that the encoding tools or operations are used at the encoder, and the corresponding decoding tools or operations opposite to the encoding results will be performed by the decoder.

[1248] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), or DisplayPort, etc. Examples of memory interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology described in this document may be embodied in various electronic devices, such as mobile phones, laptop computers, smartphones, or other devices capable of performing digital data processing and / or video display.

[1249] Figure 32 32 is a flowchart representation of a method 3200 for video processing according to the present technology. The method 3200 includes, at operation 3210, performing conversion between a video including a video picture including a video unit and a bitstream of the video. A first set of syntax elements is included in the bitstream to indicate whether samples across a video unit boundary can be accessed in filtering processes applicable to the video unit boundary, and the first set of syntax elements are included at different levels.

[1250] In some embodiments, the filtering process includes a deblocking filter process, a sample adaptive offset filter process, an adaptive loop filter process, a bilateral filter process, or a Hadamard transform filter process. In some embodiments, the video unit includes a slice, a tile, a slice, or a sub-picture.

[1251] In some embodiments, the first set of syntax elements is included in at least one of a slice level or a sub-picture level. In some embodiments, the first set of syntax elements includes a flag indicating use of loop filters across slices, or a flag indicating use of loop filters across sub-pictures.

[1252] In some embodiments, the boundary of the video unit comprises a slice boundary, a tile boundary, a slice boundary, or a 360-degree virtual boundary. In some embodiments, the first set of syntax elements is in a slice parameter set or a picture parameter set in the bitstream. In some embodiments, the first set of syntax elements includes different syntax elements for signaling different boundary types.

[1253] In some embodiments, the video unit is a slice, and a first syntax of the first set of syntax elements is included in a picture parameter set or a slice header in the bitstream to indicate whether samples across slice boundaries can be accessed in the filtering process. In some embodiments, the video unit is a tile or a slice, and a second syntax of the first set of syntax elements is included in a picture parameter set in the bitstream to indicate whether samples across tile or slice boundaries can be accessed in the filtering process.

[1254] In some embodiments, the first set of syntax elements includes a single syntax element for signaling all boundary types. In some embodiments, the first set of syntax elements includes syntax elements for signaling multiple boundary types. In some embodiments, syntax elements are signaled for tile boundaries and slice boundaries.

[1255] In some embodiments, the bitstream includes a second set of syntax elements in a sequence parameter set that indicates information for filtering at the picture parameter set level or slice level. In some embodiments, the second set of syntax elements includes different syntax elements for signaling different boundary types. In some embodiments, the second set of syntax elements includes a single syntax element for signaling all boundary types. In some embodiments, the second set of syntax elements includes syntax elements for signaling multiple boundary types. In some embodiments, syntax elements are signaled for tile boundaries and slice boundaries.

[1256] In some embodiments, whether the first set of syntax elements is present in a picture parameter set or slice header of the bitstream is conditional on the value of a syntax element in a second set of syntax elements in a sequence parameter set for the bitstream. In some embodiments, the first set of syntax elements is present in the picture parameter set or slice header if the value of the syntax element is equal to a predetermined value. In some embodiments, the first set of syntax elements is omitted from the picture parameter set or slice header if the value of the syntax element is equal to a predetermined value. In some embodiments, if the value of the syntax element is equal to a first predetermined value, the sample is accessible in the filtering process. In some embodiments, if the value of the syntax element is equal to a second predetermined value, the sample is not accessible in the filtering process.

[1257] In some embodiments, the converting comprises encoding the video into a bitstream. In some embodiments, the converting comprises decoding the bitstream into the video.

[1258] It will be appreciated that, while specific embodiments of the disclosed technology have been described herein for illustrative purposes, various modifications may be made without departing from the scope of the invention. Accordingly, the disclosed technology is not to be restricted except as set forth in the appended claims.

[1259] Some embodiments of the disclosed technology include making a decision or determining to enable a video processing tool or mode. In an example, when a video processing tool or mode is enabled, the codec will use or implement the tool or mode in the processing of the video block, but will not necessarily modify the resulting bitstream based on the use of the tool or mode. In other words, the conversion from the video block to the video bitstream will use the video processing tool or mode when the video processing tool or mode is enabled based on the decision or determination. In another example, when the video processing tool or mode is enabled, the decoder will process the bitstream based on the video processing tool or mode knowing that the bitstream has been modified. In other words, the conversion from the video bitstream to the video block will be performed using the video processing tool or mode enabled based on the decision or determination.

[1260] Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In one example, when a video processing tool or mode is disabled, the codec will not use the tool or mode in converting video blocks to a video bitstream. In another example, when a video processing tool or mode is disabled, the decoder will process the bitstream knowing that the bitstream has not been modified using a video processing tool or mode enabled based on the decision or determination.

[1261] The subject matter and functional operations described in this patent document may be implemented in various systems, digital electronic circuits, or computer software, firmware, or hardware, including the structures disclosed in this specification and their equivalents, or a combination of one or more thereof. The subject matter described in this specification may be implemented as one or more computer program products, such as one or more modules of computer program instructions encoded on a tangible and non-transitory computer-readable medium, for execution by a data processing device or to control its operation. A computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a storage device, a composition of matter that effects a machine-readable propagated signal, or a combination of any one or more thereof. The term "data processing unit" or "data processing apparatus" includes all devices, equipment, and machines for processing data, including, for example, a programmable processor, a computer, or a plurality of processors or computers. In addition to hardware, the apparatus may also include code that creates an execution environment for a computer program, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of any one or more thereof.

[1262] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language (including compiled or interpreted languages) and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed for execution on one or more computers, located at one site or distributed across multiple sites and interconnected by a communications network.

[1263] The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can be implemented as, special-purpose logic circuitry, such as an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

[1264] For example, processors suitable for executing computer programs include general-purpose and special-purpose microprocessors, as well as any one or more of any type of digital computer. Typically, a processor will receive instructions and data from a read-only memory or a random access memory, or both. The essential elements of a computer are a processor that executes instructions and one or more memory devices that store instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as magnetic, magneto-optical, or optical disks, or be operatively coupled to one or more mass storage devices to receive data from them or transfer data to one or more mass storage devices, or both. However, a computer need not necessarily have such devices. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and storage devices, including, for example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices. The processor and memory may be supplemented by, or incorporated into, dedicated logic circuitry.

[1265] Intended to combine the instructions with the appendix Figure 1 The foregoing descriptions are to be considered as exemplary only, where exemplary means example. As used herein, the use of "or" is intended to include "and / or" unless the context clearly dictates otherwise.

[1266] While this patent document includes many specifics, they should not be construed as limitations on the scope of any invention or the claims, but rather as descriptions of features for particular embodiments of particular inventions. Certain features described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various functions described in the context of a single embodiment can also be implemented separately in multiple embodiments or in any suitable subcombination. Furthermore, while the features described above may be described as functioning in certain combinations, or even initially claimed to be so, in some cases one or more features in a claim combination may be removed from the combination, and a claim combination may be directed to a subcombination or variations of a subcombination.

[1267] Likewise, while operations are depicted in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, in order to achieve desired results. Furthermore, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[1268] Only a few implementations and examples are described, and other implementations, enhancements, and variations can be made based on what is described and illustrated in this patent document.

Claims

1. A video processing method, comprising: performing conversion between a video comprising video pictures comprising a video unit and a bitstream of said video, wherein a first set of syntax elements is included in the bitstream to indicate whether samples crossing the boundary of the video unit can be accessed in a filtering process applicable to the boundary of the video unit, and wherein the first set of syntax elements is included at different levels to perform control at different levels; The bitstream includes a second group of syntax elements in a sequence parameter set, which indicates information at a picture parameter set level or a slice level for the filtering process; Whether the first set of syntax elements is present in a picture parameter set or a slice header of the bitstream is conditional on values of syntax elements in the second set of syntax elements in a sequence parameter set of the bitstream.

2. The method according to claim 1, wherein The filtering process includes deblocking filtering, sample adaptive offset filtering, adaptive loop filtering, bilateral filtering or Hadamard transform filtering.

3. The method according to claim 1 or 2, wherein: The video unit includes a slice, a tile, a slice, or a sub-picture.

4. The method according to claim 1 or 2, wherein: The first set of syntax elements is included in at least one of a slice level or a sub-picture level.

5. The method according to claim 4, wherein The first set of syntax elements includes a flag indicating that a loop filter is used across slices, or a flag indicating that a loop filter is used across sub-pictures.

6. The method according to claim 1 or 2, wherein: The boundary of the video unit includes a slice boundary, a tile boundary, a tile boundary, or a 360-degree virtual boundary.

7. The method according to claim 6, wherein: The first set of syntax elements is in a slice parameter set or a picture parameter set in the bitstream.

8. The method according to claim 6, wherein: The first set of syntax elements includes different syntax elements for signaling different boundary types.

9. The method according to claim 7, wherein: The video unit is a slice, and wherein a first syntax of the first set of syntax elements is included in a picture parameter set or a slice header in the bitstream to indicate whether samples across the slice boundary can be accessed in the filtering process.

10. The method according to claim 7, wherein: The video unit is a tile or a slice, and wherein a second syntax of the first set of syntax elements is included in a picture parameter set of the bitstream to indicate whether samples crossing the tile boundary or the slice boundary can be accessed in the filtering process.

11. The method according to claim 6, wherein: The first set of syntax elements includes a single syntax element for all boundary type signaling.

12. The method according to claim 6, wherein: The first set of syntax elements includes syntax elements for signaling of multiple boundary types.

13. The method according to claim 12, wherein: The syntax elements are signaled for tile boundaries and slice boundaries.

14. The method according to claim 1, wherein The second set of syntax elements includes different syntax elements for signaling different boundary types.

15. The method according to claim 1, wherein The second set of syntax elements includes a single syntax element for all boundary type signaling.

16. The method according to claim 1, wherein The second set of syntax elements includes syntax elements for signaling of multiple boundary types.

17. The method according to claim 1, wherein The syntax elements are signaled for tile boundaries and slice boundaries.

18. The method according to claim 1, wherein If the value of the syntax element is equal to a predetermined value, the first set of syntax elements is present in the picture parameter set or the slice header.

19. The method according to claim 18, wherein If the value of the syntax element is equal to a predetermined value, the first set of syntax elements is omitted in the picture parameter set or the slice header.

20. The method according to claim 19, wherein In a case where the value of the syntax element is equal to a first predetermined value, the sample point may be accessed in the filtering process.

21. The method according to claim 19, wherein In a case where the value of the syntax element is equal to a second predetermined value, the sample is inaccessible in the filtering process.

22. The method according to claim 1 or 2, wherein: The converting includes encoding the video into the bitstream.

23. The method according to claim 1 or 2, wherein The converting includes decoding the bitstream into the video.

24. A video processing device, comprising a processor, wherein the processor is configured to implement the method according to any one of claims 1 to 23.

25. A computer-readable medium having codes stored thereon, which, when executed by a processor, cause the processor to implement the method according to any one of claims 1 to 23.

Citation Information

Patent Citations

  • Signaling of deblocking filter parameters in video coding

    CN104054339A

  • Method and apparatus for the signaling of lossless video coding

    CN106105227A

  • Video image encoding and decoding method and apparatus

    CN109996069A

  • Bitstream restrictions on picture partitions across layers

    US20150016543A1