Method, apparatus, and medium for video processing

By applying a bilateral filter to prediction samples, the method enhances coding efficiency and performance in video processing, addressing the limitations of existing video coding technologies.

WO2025077795A9PCT designated stage expired Publication Date: 2026-05-21DOUYIN VISION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
DOUYIN VISION CO LTD
Filing Date
2024-10-10
Publication Date
2026-05-21

AI Technical Summary

Technical Problem

Existing video coding technologies, such as MPEG-2, MPEG-4, AVC, HEVC, and VVC, require further improvements in coding efficiency and performance.

Method used

A bilateral filter is applied to prediction samples in video processing to enhance coding efficiency by filtering prediction samples before conversion to a bitstream.

Benefits of technology

The proposed method improves coding efficiency and performance by applying a filtering approach to prediction samples, leading to enhanced video processing outcomes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024124033_21052026_PF_FP_ABST
    Figure CN2024124033_21052026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a solution for video processing. A method for video processing is proposed. The method comprises: applying, for a conversion between a video unit of a video and a bitstream of the video, a filtering approach to a prediction sample associated with the video unit;and performing the conversion based on the filtered prediction sample.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD, APPARATUS, AND MEDIUM FOR VIDEO PROCESSING

[0001] FIELDS

[0002] Embodiments of the present disclosure relates generally to video processing techniques, and more particularly, to a bilateral filter for prediction samples in video coding.BACKGROUND

[0003] In nowadays, digital video capabilities are being applied in various aspects of peoples’ lives. Multiple types of video compression technologies, such as MPEG-2, MPEG-4, ITU-TH. 263, ITU-TH. 264 / MPEG-4 Part 10 Advanced Video Coding (AVC) , ITU-TH. 265 high efficiency video coding (HEVC) standard, versatile video coding (VVC) standard, have been proposed for video encoding / decoding. However, coding efficiency of video coding techniques is generally expected to be further improved.SUMMARY

[0004] Embodiments of the present disclosure provide a solution for video processing.

[0005] In a first aspect, a method for video processing is proposed. The method comprises: applying, for a conversion between a video unit of a video and a bitstream of the video, a filtering approach to a prediction sample associated with the video unit; and performing the conversion based on the filtered prediction sample. Compared with the conventional solution, the method in accordance with the first aspect of the present disclosure advantageously improves the coding efficiency and performance by applying the filtering approach.

[0006] In a second aspect, an apparatus for video processing is proposed. The apparatus comprises a processor and a non-transitory memory with instructions thereon. The instructions upon execution by the processor, cause the processor to perform a method in accordance with the first aspect of the present disclosure.

[0007] In a third aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium stores instructions that cause a processor to perform a method in accordance with the first aspect of the present disclosure.

[0008] In a fourth aspect, another non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: applying a filtering approach to a prediction sample associated with a video unit of the video; and generating the bitstream based on the filtered prediction sample.

[0009] In a fifth aspect, a method for storing a bitstream of a video is proposed. The method comprises: applying a filtering approach to a prediction sample associated with a video unit of the video; generating the bitstream based on the filtered prediction sample; and storing the bitstream in a non-transitory  computer-readable recording medium.

[0010] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Through the following detailed description with reference to the accompanying drawings, the above and other objectives, features, and advantages of example embodiments of the present disclosure will become more apparent. In the example embodiments of the present disclosure, the same reference numerals usually refer to the same components.

[0012] Fig. 1 illustrates a block diagram that illustrates an example video coding system, in accordance with some embodiments of the present disclosure;

[0013] Fig. 2 illustrates a block diagram that illustrates a first example video encoder, in accordance with some embodiments of the present disclosure;

[0014] Fig. 3 illustrates a block diagram that illustrates an example video decoder, in accordance with some embodiments of the present disclosure;

[0015] Fig. 4 illustrates nominal vertical and horizontal locations of 4: 2: 2 luma and chroma samples in a picture;

[0016] Fig. 5 illustrates an example of encoder block diagram;

[0017] Fig. 6 illustrates a picture with 18 by 12 luma coding tree units (CTUs) that is partitioned into 12 tiles and 3 raster-scan slices;

[0018] Fig. 7 illustrates a picture with 18 by 12 luma CTUs that is partitioned into 24 tiles and 9 rectangular slices;

[0019] Fig. 8 illustrates a picture is partitioned int o4 tiles, 11 bricks, and 4 rectangular slices;

[0020] Fig. 9A illustrates CTSs crossing the bottom picture border;

[0021] Fig. 9B illustrates CTSs crossing the right picture border;

[0022] Fig. 9C illustrates CTBs crossing the right bottom picture border;

[0023] Fig. 10 illustrates 67 intra prediction modes;

[0024] Fig. 11 illustrates an illustration of picture samples and horizontal and vertical block boundaries on the 8×8 grid, and the nonoverlapping blocks of the 8×8 samples;

[0025] Fig. 12 illustrates pixels involved in filter on / off decision and strong / weak filter switch;

[0026] Fig. 13A-Fig. 13C illustrate filter shapes for an adaptive loop filter (ALF) , respectively;

[0027] Fig. 14A-Fig. 14C illustrate relative coordinator for the 5×5 diamond filter support, respectively;

[0028] Fig. 15 illustrates examples of relative coordinates for the 5×5 diamond filter support;

[0029] Fig. 16 illustrates a flowchart of a method for video processing in accordance with embodiments of the present disclosure;

[0030] Fig. 17 illustrates a block diagram of a computing device in which various embodiments of the present disclosure can be implemented.

[0031] Throughout the drawings, the same or similar reference numerals usually refer to the same or similar elements.DETAILED DESCRIPTION

[0032] Principle of the present disclosure will now be described with reference to some embodiments. It is to be understood that these embodiments are described only for the purpose of illustration and help those skilled in the art to understand and implement the present disclosure, without suggesting any limitation as to the scope of the disclosure. The disclosure described herein can be implemented in various manners other than the ones described below.

[0033] In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skills in the art to which this disclosure belongs.

[0034] References in the present disclosure to “one embodiment, ” “an embodiment, ” “an example embodiment, ” and the like indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an example embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.

[0035] It shall be understood that although the terms “first” and “second” etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and similarly, a second element could be termed a first element, without departing from the scope of example embodiments. As used herein, the term “and / or” includes any and all combinations of one or more of the listed terms.

[0036] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a” , “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” , “comprising” , “has” , “having” , “includes” and / or “including” , when used herein, specify the presence of stated features, elements, and / or components etc., but do not preclude the presence or addition of one or more other features, elements, components and / or  combinations thereof.

[0037] Example Environment

[0038] Fig. 1 is a block diagram that illustrates an example video coding system 100 that may utilize the techniques of this disclosure. As shown, the video coding system 100 may include a source device 110 and a destination device 120. The source device 110 can be also referred to as a video encoding device, and the destination device 120 can be also referred to as a video decoding device. In operation, the source device 110 can be configured to generate encoded video data and the destination device 120 can be configured to decode the encoded video data generated by the source device 110. The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface 116.

[0039] The video source 112 may include a source such as a video capture device. Examples of the video capture device include, but are not limited to, an interface to receive video data from a video content provider, a computer graphics system for generating video data, and / or a combination thereof.

[0040] The video data may comprise one or more pictures. The video encoder 114 encodes the video data from the video source 112 to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. The I / O interface 116 may include a modulator / demodulator and / or a transmitter. The encoded video data may be transmitted directly to destination device 120 via the I / O interface 116 through the network 130A. The encoded video data may also be stored onto a storage medium / server 130B for access by destination device 120.

[0041] The destination device 120 may include an I / O interface 126, a video decoder 124, and a display device 122. The I / O interface 126 may include a receiver and / or a modem. The I / O interface 126 may acquire encoded video data from the source device 110 or the storage medium / server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to a user. The display device 122 may be integrated with the destination device 120, or may be external to the destination device 120 which is configured to interface with an external display device.

[0042] The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (VVC) standard and other current and / or further standards.

[0043] Fig. 2 is a block diagram illustrating an example of a video encoder 200, which may be an example of the video encoder 114 in the system 100 illustrated in Fig. 1, in accordance with some embodiments of the present disclosure.

[0044] The video encoder 200 may be configured to implement any or all of the techniques of this disclosure. In the example of Fig. 2, the video encoder 200 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video encoder 200. In some examples, a processor may be configured to perform any or all of the techniques  described in this disclosure.

[0045] In some embodiments, the video encoder 200 may include a partition unit 201, a predication unit 202 which may include a mode select unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-prediction unit 206, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213, and an entropy encoding unit 214.

[0046] In other examples, the video encoder 200 may include more, fewer, or different functional components. In an example, the predication unit 202 may include an intra block copy (IBC) unit. The IBC unit may perform predication in an IBC mode in which at least one reference picture is a picture where the current video block is located.

[0047] Furthermore, although some components, such as the motion estimation unit 204 and the motion compensation unit 205, may be integrated, but are represented in the example of Fig. 2 separately for purposes of explanation.

[0048] The partition unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.

[0049] The mode select unit 203 may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra-coded or inter-coded block to a residual generation unit 207 to generate residual block data and to a reconstruction unit 212 to reconstruct the encoded block for use as a reference picture. In some examples, the mode select unit 203 may select a combination of intra and inter predication (CIIP) mode in which the predication is based on an inter predication signal and an intra predication signal. The mode select unit 203 may also select a resolution for a motion vector (e.g., a sub-pixel or integer pixel precision) for the block in the case of inter-predication.

[0050] To perform inter prediction on a current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing one or more reference frames from buffer 213 to the current video block. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.

[0051] The motion estimation unit 204 and the motion compensation unit 205 may perform different operations for a current video block, for example, depending on whether the current video block is in an I-slice, a P-slice, or a B-slice. As used herein, an “I-slice” may refer to a portion of a picture composed of macroblocks, all of which are based upon macroblocks within the same picture. Further, as used herein, in some aspects, “P-slices” and “B-slices” may refer to portions of a picture composed of macroblocks that are not dependent on macroblocks in the same picture.

[0052] In some examples, the motion estimation unit 204 may perform uni-directional prediction for the current video block, and the motion estimation unit 204 may search reference pictures of list 0 or list 1 for a reference video block for the current video block. The motion estimation unit 204 may then generate a reference index that indicates the reference picture in list 0 or list 1 that contains the reference video  block and a motion vector that indicates a spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, a prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video block indicated by the motion information of the current video block.

[0053] Alternatively, in other examples, the motion estimation unit 204 may perform bi-directional prediction for the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate reference indexes that indicate the reference pictures in list 0 and list 1 containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. The motion estimation unit 204 may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video blocks indicated by the motion information of the current video block.

[0054] In some examples, the motion estimation unit 204 may output a full set of motion information for decoding processing of a decoder. Alternatively, in some embodiments, the motion estimation unit 204 may signal the motion information of the current video block with reference to the motion information of another video block. For example, the motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

[0055] In one example, the motion estimation unit 204 may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder 300 that the current video block has the same motion information as the another video block.

[0056] In another example, the motion estimation unit 204 may identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD) . The motion vector difference indicates a difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder 300 may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

[0057] As discussed above, video encoder 200 may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder 200 include advanced motion vector predication (AMVP) and merge mode signaling.

[0058] The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video  block and various syntax elements.

[0059] The residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by the minus sign) the predicted video block (s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks that correspond to different sample components of the samples in the current video block.

[0060] In other examples, there may be no residual data for the current video block for the current video block, for example in a skip mode, and the residual generation unit 207 may not perform the subtracting operation.

[0061] The transform processing unit 208 may generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to a residual video block associated with the current video block.

[0062] After the transform processing unit 208 generates a transform coefficient video block associated with the current video block, the quantization unit 209 may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.

[0063] The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the predication unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.

[0064] After the reconstruction unit 212 reconstructs the video block, loop filtering operation may be performed to reduce video blocking artifacts in the video block.

[0065] The entropy encoding unit 214 may receive data from other functional components of the video encoder 200. When the entropy encoding unit 214 receives the data, the entropy encoding unit 214 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.

[0066] Fig. 3 is a block diagram illustrating an example of a video decoder 300, which may be an example of the video decoder 124 in the system 100 illustrated in Fig. 1, in accordance with some embodiments of the present disclosure.

[0067] The video decoder 300 may be configured to perform any or all of the techniques of this disclosure. In the example of Fig. 3, the video decoder 300 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video decoder 300. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

[0068] In the example of Fig. 3, the video decoder 300 includes an entropy decoding unit 301, a motion  compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transformation unit 305, and a reconstruction unit 306 and a buffer 307. The video decoder 300 may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder 200.

[0069] The entropy decoding unit 301 may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data) . The entropy decoding unit 301 may decode the entropy coded video data, and from the entropy decoded video data, the motion compensation unit 302 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 may, for example, determine such information by performing the AMVP and merge mode. AMVP is used, including derivation of several most probable candidates based on data from adjacent PBs and the reference picture. Motion information typically includes the horizontal and vertical motion vector displacement values, one or two reference picture indices, and, in the case of prediction regions in B slices, an identification of which reference picture list is associated with each index. As used herein, in some aspects, a “merge mode” may refer to deriving the motion information from spatially or temporally neighboring blocks.

[0070] The motion compensation unit 302 may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used with sub-pixel precision may be included in the syntax elements.

[0071] The motion compensation unit 302 may use the interpolation filters as used by the video encoder 200 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. The motion compensation unit 302 may determine the interpolation filters used by the video encoder 200 according to the received syntax information and use the interpolation filters to produce predictive blocks.

[0072] The motion compensation unit 302 may use at least part of the syntax information to determine sizes of blocks used to encode frame (s) and / or slice (s) of the encoded video sequence, partition information that describes how each macroblock of a picture of the encoded video sequence is partitioned, modes indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-encoded block, and other information to decode the encoded video sequence. As used herein, in some aspects, a “slice” may refer to a data structure that can be decoded independently from other slices of the same picture, in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice can either be an entire picture or a region of a picture.

[0073] The intra prediction unit 303 may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. The inverse quantization unit 304 inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.

[0074] The reconstruction unit 306 may obtain the decoded blocks, e.g., by summing the residual blocks  with the corresponding prediction blocks generated by the motion compensation unit 302 or intra-prediction unit 303. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in the buffer 307, which provides reference blocks for subsequent motion compensation / intra predication and also produces decoded video for presentation on a display device.

[0075] Some exemplary embodiments of the present disclosure will be described in detailed hereinafter. It should be understood that section headings are used in the present document to facilitate ease of understanding and do not limit the embodiments disclosed in a section to only that section. Furthermore, while certain embodiments are described with reference to Versatile Video Coding or other specific video codecs, the disclosed techniques are applicable to other video coding technologies also. Furthermore, while some embodiments describe video coding steps in detail, it will be understood that corresponding steps decoding that undo the coding will be implemented by a decoder. Furthermore, the term video processing encompasses video coding or compression, video decoding or decompression and video transcoding in which video pixels are represented from one compressed format into another compressed format or at a different compressed bitrate.

[0076] 1. Brief Summary

[0077] This disclosure is related to video coding technologies. Specifically, it is related to in-loop filter and other coding tools in image / video coding. The ideas may be applied individually or in various combination, to any existing video coding standard or non-standard video codec like High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC) . The proposed ideas may be also applicable to future video coding standards or video codec.

[0078] 2. Abbreviations

[0079] AVC   Advanced Video Coding

[0080] CPB   Coded Picture Buffer

[0081] CRA   Clean Random Access

[0082] CTU   Coding Tree Unit

[0083] CVS   Coded Video Sequence

[0084] DPB   Decoded Picture Buffer

[0085] DPS   Decoding Parameter Set

[0086] GCI   General Constraints Information

[0087] HEVC  High Efficiency Video Coding

[0088] JEM   Joint Exploration Model

[0089] MCTS  Motion-Constrained Tile Sets

[0090] NAL   Network Abstraction Layer

[0091] OLS   Output Layer Set

[0092] PH    Picture Header

[0093] PPS   Picture Parameter Set

[0094] PTL   Profile, Tier and Level

[0095] PU    Picture Unit

[0096] RRP   Reference Picture Resampling

[0097] RBSP  Raw Byte Sequence Payload

[0098] SEI   Supplemental Enhancement Information

[0099] SH    Slice Header

[0100] SPS   Sequence Parameter Set

[0101] VCL   Video Coding Layer

[0102] VPS   Video Parameter Set

[0103] VTM   VVC Test Model

[0104] VUI   Video Usability Information

[0105] VVC   Versatile Video Coding

[0106] TU    Transform Unit

[0107] CU    Coding Unit

[0108] DF    Deblocking Filter

[0109] SAO   Sample Adaptive Offset

[0110] ALF   Adaptive Loop Filter

[0111] CBF   Coding Block Flag

[0112] QP   Quantization Parameter

[0113] RDO   Rate Distortion Optimization

[0114] BF    Bilateral Filter

[0115] GDR   Gradual Decoding Refresh

[0116] 3. Introduction

[0117] Video coding standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. The ITU-T produced H. 261 and H. 263, ISO / IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H. 262 / MPEG-2 Video and H. 264 / MPEG-4 Advanced Video Coding (AVC) and H. 265 / HEVC standards. Since H. 262, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore the future video coding technologies beyond HEVC, the Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM) . The JVET meeting is concurrently held once every quarter, and the new coding standard  is targeting at 50%bitrate reduction as compared to HEVC. The new video coding standard was officially named as Versatile Video Coding (VVC) in the April 2018 JVET meeting, and the first version of VVC test model (VTM) was released at that time. As there are continuous effort contributing to VVC standardization, new coding techniques are being adopted to the VVC standard in every JVET meeting. The VVC working draft and test model VTM are then updated after every meeting.

[0118] The latest version of VVC draft, i.e., Versatile Video Coding (Draft 10) may be found at: https:  / / jvet-experts. org / doc_end_user / documents / 19_Teleconference / wg11 / JVET-S2001-v17. zip.

[0119] The latest reference software of VVC, named as VTM, could be found at: https:  / / vcgit. hhi. fraunhofer. de / jvet-u-ee2 / VVCSoftware_VTM / - / tree / VTM-11.2.

[0120] ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC 29 / WG 11) are studying the potential need for standardization of future video coding technology with a compression capability that significantly exceeds that of the current VVC standard. Such future standardization action could either take the form of extended extension (s) of VVC or an entirely new standard. The groups are working together on this exploration activity in a joint-collaboration effort known as the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by their experts in this area. The first Exploration Experiments (EE) were established in JVET meeting during 6–15 January 2021 and the reference software named as Enhanced Compression Model (ECM) . The test model ECM is updated after every JVET meeting.

[0121] 3.1. Color space and chroma subsampling

[0122] Color space, also known as the color model (or color system) , is an abstract mathematical model which simply describes the range of colors as tuples of numbers, typically as 3 or 4 values or color components (e.g. RGB) . Basically speaking, color space is an elaboration of the coordinate system and sub-space.

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

[0124] YCbCr, Y′CbCr, or Y Pb / Cb Pr / Cr, also written as YCBCR or Y'CBCR, is a family of color spaces used as a part of the color image 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 prime) is distinguished from Y, which is luminance, meaning that light intensity is nonlinearly encoded based on gamma corrected RGB primaries.

[0125] Chroma subsampling is the practice of encoding images by implementing less resolution for chroma information than for luma information, taking advantage of the human visual system's lower acuity for color differences than for luminance.

[0126] 3.1.1. 4: 4: 4

[0127] Each of the three Y'CbCr components have the same sample rate, thus there is no chroma subsampling. This scheme is sometimes used in high-end film scanners and cinematic postproduction.

[0128] 3.1.2. 4: 2: 2

[0129] The two chroma components are sampled at half the sample rate of luma: the horizontal chroma resolution is halved while the vertical chroma resolution is unchanged. This reduces the bandwidth of an uncompressed video signal by one-third with little to no visual difference. An example of nominal vertical and horizontal locations of 4: 2: 2 color format is depicted in Fig. 4 in VVC working draft. Fig. 4 illustrates nominal vertical and horizontal locations of 4: 2: 2 luma and chroma samples in a picture.

[0130] 3.1.3. 4: 2: 0

[0131] In 4: 2: 0, the horizontal sampling is doubled compared to 4: 1: 1, but as the Cb and Cr channels are only sampled on each alternate line in this scheme, the vertical resolution is halved. The data rate is thus the same. Cb and Cr are each subsampled at a factor of 2 both horizontally and vertically. There are three variants of 4: 2: 0 schemes, having different horizontal and vertical siting.

[0132] · In MPEG-2, Cb and Cr are cosited horizontally. Cb and Cr are sited between pixels in the vertical direction (sited interstitially) .

[0133] · In JPEG / JFIF, H. 261, and MPEG-1, Cb and Cr are sited interstitially, halfway between alternate luma sam-ples.

[0134] · In 4: 2: 0 DV, Cb and Cr are co-sited in the horizontal direction. In the vertical direction, they are co-sited on alternating lines.

[0135] Table 1 SubWidthC and SubHeightC values derived from chroma_format_idc and separate_colour_plane_flag

[0136] 3.2. Coding Flow of a Typical Video Codec

[0137] Fig. 5 shows an example of encoder block diagram of VVC, which contains three in-loop filtering blocks: deblocking filter (DF) , sample adaptive offset (SAO) and ALF. Unlike DF, which uses predefined filters, SAO and ALF utilize the original samples of the current picture to reduce the mean square errors between the original samples and the reconstructed samples by adding an offset and by applying a finite impulse response (FIR) filter, respectively, with coded side information signalling the offsets and filter coefficients. ALF is located at the last processing stage of each picture and can be regarded as a tool trying to catch and fix artifacts created by the previous stages.

[0138] 3.3. Definitions of Video / Coding Units

[0139] A picture is divided into one or more tile rows and one or more tile columns. A tile is a sequence  of CTUs that covers a rectangular region of a picture.

[0140] A tile is divided into one or more bricks, each of which consisting of a number of CTU rows within the tile.

[0141] A tile that is not partitioned into multiple bricks is also referred to as a brick. However, a brick that is a true subset of a tile is not referred to as a tile.

[0142] A slice either contains several tiles of a picture or several bricks of a tile.

[0143] Two modes of slices are supported, namely the raster-scan slice mode and the rectangular slice mode. In the raster-scan slice mode, a slice contains a sequence of tiles in a tile raster scan of a picture. In the rectangular slice mode, a slice contains a number of bricks of a picture that collectively form a rectangular region of the picture. The bricks within a rectangular slice are in the order of brick raster scan of the slice.

[0144] Fig. 6 shows an example of raster-scan slice partitioning of a picture, where the picture is divided into 12 tiles and 3 raster-scan slices. Fig. 6 illustrates a picture with 18 by 12 luma CTUs that is partitioned into 12 tiles and 3 raster-scan slices.

[0145] Fig. 7 in the VVC specification shows an example of rectangular slice partitioning of a picture, where the picture is divided into 24 tiles (6 tile columns and 4 tile rows) and 9 rectangular slices. Fig. 7 illustrates a picture with 18 by 12 luma CTUs that is partitioned into 24 tiles and 9 rectangular slices.

[0146] Fig. 8 in the VVC specification shows an example of a picture partitioned into tiles, bricks, and rectangular slices, where the picture is divided into 4 tiles (2 tile columns and 2 tile rows) , 11 bricks (the top-left tile contains 1 brick, the top-right tile contains 5 bricks, the bottom-left tile contains 2 bricks, and the bottom-right tile contain 3 bricks) , and 4 rectangular slices. Fig. 8 illustrates a picture is partitioned int o4 tiles, 11 bricks, and 4 rectangular slices.

[0147] 3.3.1. CTU / CTB Sizes

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

[0149] 7.3.2.3 Sequence parameter set RBSP syntax

[0150] log2_ctu_size_minus2 plus 2 specifies the luma coding tree block size of each CTU.

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

[0152] The variables CtbLog2SizeY, CtbSizeY, MinCbLog2SizeY, MinCbSizeY, MinTbLog2SizeY, MaxTbLog2SizeY, MinTbSizeY, MaxTbSizeY, PicWidthInCtbsY, PicHeightInCtbsY, PicSizeInCtbsY, PicWidthInMinCbsY, PicHeightInMinCbsY, PicSizeInMinCbsY, PicSizeInSamplesY, PicWidthInSamplesC and PicHeightInSamplesC are derived as follows: CtbLog2SizeY = log2_ctu_size_minus2 + 2            (7-9) CtbSizeY = 1 << CtbLog2SizeY                              (7-10) MinCbLog2SizeY = log2_min_luma_coding_block_size_minus2 + 2       (7-11) MinCbSizeY = 1 << MinCbLog2SizeY                    (7-12) MinTbLog2SizeY = 2                   (7-13) MaxTbLog2SizeY = 6                            (7-14) MinTbSizeY = 1 << MinTbLog2SizeY                             (7-15) MaxTbSizeY = 1 << MaxTbLog2SizeY                         (7-16) PicWidthInCtbsY = Ceil (pic_width_in_luma_samples ÷ CtbSizeY)            (7-17) PicHeightInCtbsY = Ceil (pic_height_in_luma_samples ÷ CtbSizeY)         (7-18) PicSizeInCtbsY = PicWidthInCtbsY *PicHeightInCtbsY              (7-19) PicWidthInMinCbsY = pic_width_in_luma_samples  / MinCbSizeY        (7-20) PicHeightInMinCbsY = pic_height_in_luma_samples  / MinCbSizeY        (7-21) PicSizeInMinCbsY = PicWidthInMinCbsY *PicHeightInMinCbsY       (7-22) PicSizeInSamplesY = pic_width_in_luma_samples *pic_height_in_luma_samples    (7-23) PicWidthInSamplesC = pic_width_in_luma_samples  / SubWidthC      (7-24) PicHeightInSamplesC = pic_height_in_luma_samples  / SubHeightC          (7-25)

[0153] 3.3.2. CTUs in One Picture

[0154] Suppose the CTB / LCU size indicated by M x N (typically M is equal to N, as defined in HEVC / VVC) , and for a CTB located at picture (or tile or slice or other kinds of types, picture border is taken as an example) border, K x L samples are within picture border wherein either K<M or L<N. For those CTBs as depicted in Fig. 9A to Fig. 9C, the CTB size is still equal to MxN, however, the bottom boundary / right boundary of the CTB is outside the picture. Fig. 9A-Fig. 9C illustrate examples of CTBs crossing picture borders, where Fig. 9A illustrates CTSs crossing the bottom picture border, Fig. 9B illustrates CTSs crossing the right picture border, and Fig. 9C illustrates CTBs crossing the right bottom picture border.

[0155] 3.4. Intra Prediction

[0156] To capture the arbitrary edge directions presented in natural video, the number of directional intra modes is extended from 33, as used in HEVC, to 65. The extended directional modes are depicted as dotted arrows, and the planar and DC modes remain the same. These denser directional intra prediction modes apply for all block sizes and for both luma and chroma intra predictions.

[0157] Conventional angular intra prediction directions are defined from 45 degrees to -135 degrees in clockwise direction as shown in Fig. 10. Fig. 10 illustrates 67 intra prediction modes. In VTM, several conventional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes for the non-square blocks. The replaced modes are signalled using the original method and remapped to the indexes of wide angular modes after parsing. The total number of intra prediction modes is unchanged, i.e., 67, and the intra mode coding is unchanged.

[0158] In the HEVC, every intra-coded block has a square shape and the length of each of its side is a power of 2. Thus, no division operations are required to generate an intra-predictor using DC mode. In VVC, blocks can have a rectangular shape that necessitates the use of a division operation per block in the general case. To avoid division operations for DC prediction, only the longer side is used to compute the average for non-square blocks.

[0159] 3.5. Inter Prediction

[0160] For each inter-predicted CU, motion parameters consisting of motion vectors, reference picture indices and reference picture list usage index, and extended information needed for the new coding feature of VVC to be used for inter-predicted sample generation. The motion parameter can be signalled in an explicit or implicit manner. When a CU is coded with skip mode, the CU is associated with one PU and has no significant residual coefficients, no coded motion vector delta or reference picture index. A merge mode is specified whereby the motion parameters for the current CU are obtained from neighbouring CUs, including spatial and temporal candidates, and extended schedules introduced in VVC. The merge mode can be applied to any inter-predicted CU, not only for skip mode. The alternative to merge mode is the explicit transmission of motion parameters, where motion vector, corresponding reference picture index for each reference picture list and reference picture list usage flag and other needed information are signalled explicitly per each CU.

[0161] 3.6. Deblocking Filter

[0162] Deblocking filtering typical in-loop filter in video codec. In VVC, the deblocking filtering process is applied on CU boundaries, transform subblock boundaries and prediction subblock boundaries. The prediction subblock boundaries include the prediction unit boundaries introduced by the SbTMVP (Subblock based Temporal Motion Vector prediction) and affine modes, and the transform subblock boundaries include the transform unit boundaries introduced by SBT (Subblock transform) and ISP (Intra Sub-Partitions) modes and transforms due to implicit split of large CUs. As done in HEVC, the processing order of the deblocking filter is defined as horizontal filtering for vertical edges for the entire picture first, followed by vertical filtering for horizontal edges. This specific order enables either multiple horizontal filtering or vertical filtering processes to be applied in parallel threads or can still be  implemented on a CTB-by-CTB basis with only a small processing latency.

[0163] The vertical edges in a picture are filtered first. Then the horizontal edges in a picture are filtered with samples modified by the vertical edge filtering process as input. The vertical and horizontal edges in the CTBs of each CTU are processed separately on a coding unit basis. The vertical edges of the coding blocks in a coding unit are filtered starting with the edge on the left-hand side of the coding blocks proceeding through the edges towards the right-hand side of the coding blocks in their geometrical order. The horizontal edges of the coding blocks in a coding unit are filtered starting with the edge on the top of the coding blocks proceeding through the edges towards the bottom of the coding blocks in their geometrical order.

[0164] Fig. 11 illustrates an illustration of picture samples and horizontal and vertical block boundaries on the 8×8 grid, and the nonoverlapping blocks of the 8×8 samples, which can be deblocked in parallel.

[0165] 3.6.1. Boundary Decision

[0166] Filtering is applied to 8x8 block boundaries. In addition, it must be a transform block boundary or a coding subblock boundary (e.g., due to usage of Affine motion prediction, ATMVP) . For those which are not such boundaries, filter is disabled.

[0167] 3.6.2. Boundary Strength Calculation

[0168] For a transform block boundary / coding subblock boundary, if it is located in the 8x8 grid, it may be filterd and the setting of bS [xDi] [yDj] (wherein [xDi] [yDj] denotes the coordinate) for this edge is defined as below.

[0169] Table 2 Boundary strength (when SPS IBC is disabled)

[0170] Table 3 Boundary strength (when SPS IBC is enabled)

[0171] 3.6.3. Deblocking Decision for Luma Component

[0172] Fig. 12 illustrates pixels involved in filter on / off decision and strong / weak filter switch.

[0173] Wider-stronger luma filter is filters are used only if all the Condition1, Condition2 and Condition 3 are TRUE.

[0174] The condition 1 is the “large block condition” . This condition detects whether the samples at P-side and Q-side belong to large blocks, which are represented by the variable bSidePisLargeBlk and bSideQisLargeBlk respectively. The bSidePisLargeBlk and bSideQisLargeBlk are defined as follows.

[0175] bSidePisLargeBlk = ( (edge type is vertical and p0 belongs to CU with width >= 32) | | (edge type is horizontal and p0 belongs to CU with height >= 32) ) ? TRUE: FALSE

[0176] bSideQisLargeBlk = ( (edge type is vertical and q0 belongs to CU with width >= 32) | | (edge type is hori-zontal and q0 belongs to CU with height >= 32) ) ? TRUE: FALSE

[0177] Based on bSidePisLargeBlk and bSideQisLargeBlk, the condition 1 is defined as follows.

[0178] Condition1 = (bSidePisLargeBlk || bSidePisLargeBlk) ? TRUE: FALSE

[0179] Next, if Condition 1 is true, the condition 2 will be further checked. First, the following variables are derived:

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

[0181] where d= dp0 + dq0 + dp3 + dq3.

[0182] If Condition1 and Condition2 are valid, whether any of the blocks uses sub-blocks is further checked:

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

[0184] In the Condition3 StrongFilterCondition, the following variables are derived:

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

[0186] 3.6.4. Stronger Deblocking Filter for Luma

[0187] Bilinear filter is used when samples at either one side of a boundary belong to a large block. A sample belonging to a large block is defined as when the width >= 32 for a vertical edge, and when height >= 32 for a horizontal edge.

[0188] The bilinear filter is listed below.

[0189] Block boundary samples pi for i=0 to Sp-1 and qi for j=0 to Sq-1 (pi and qi are the i-th sample within a row for filtering vertical edge, or the i-th sample within a column for filtering horizontal edge) in HEVC deblocking described above) are then replaced by linear interpolation as follows:

[0190] -pi′= (fi*Middles, t+ (64-fi) *Ps+32) >>6) , clipped to pi±tcPDi

[0191] -qj′= (gj*Middles, t+ (64-gj) *Qs+32) >>6) , clipped to qj±tcPDj

[0192] where tcPDi and tcPDj term is a position dependent clipping described in Section 3.6.2 and gj, fi, Middles, t, Ps and Qs are given below.

[0193] 3.6.5. Deblocking Decision for Chroma

[0194] The chroma strong filters are used on both sides of the block boundary. Here, the chroma filter is selected when both sides of the chroma edge are greater than or equal to 8 (chroma position) , and the following decision with three conditions are satisfied: the first one is for decision of boundary strength as well as large block. The proposed filter can be applied when the block width or height which orthogonally crosses the block edge is equal to or larger than 8 in chroma sample domain. The second and third one is basically the same as for HEVC luma deblocking decision, which are on / off decision and strong filter decision, respectively.

[0195] In the first decision, boundary strength (bS) is modified for chroma filtering and the conditions are checked sequentially. If a condition is satisfied, then the remaining conditions with lower priorities are skipped.

[0196] Chroma deblocking is performed when bS is equal to 2, or bS is equal to 1 when a large block boundary is detected.

[0197] The second and third condition is basically the same as HEVC luma strong filter decision as follows.

[0198] In the second condition:

[0199] d is then derived as in HEVC luma deblocking.

[0200] The second condition will be TRUE when d is less than β.

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

[0202] dpq is derived as in HEVC.

[0203] sp3 = Abs (p3 -p0) , derived as in HEVC

[0204] sq3 = Abs (q0 -q3) , derived as in HEVC

[0205] As in 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) .

[0206] 3.6.6. Strong Deblocking Filter for Chroma

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

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

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

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

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

[0212] 3.6.7. Position Dependent Clipping

[0213] The position dependent clipping tcPD is applied to the output samples of the luma filtering process involving strong and long filters that are modifying 7, 5 and 3 samples at the boundary. Assuming quantization error distribution, it is proposed to increase clipping value for samples which are expected to have higher quantization noise, thus expected to have higher deviation of the reconstructed sample value from the true sample value.

[0214] For each P or Q boundary filtered with asymmetrical filter, depending on the result of decision-making, position dependent threshold table is selected from two tables (i.e., Tc7 and Tc3 tabulated below) that are provided to decoder as a side information:

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

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

[0217] tcQD = (Sq == 3) ? Tc3 : Tc7.

[0218] For the P or Q boundaries being filtered with a short symmetrical filter, position dependent threshold of lower magnitude is applied:

[0219] Tc3 = {3, 2, 1} .

[0220] Following defining the threshold, filtered p’i and q’i sample values are clipped according to tcP and tcQ clipping values:

[0221] p”i = Clip3 (p’i + tcPi, p’i –tcPi, p’i) ;

[0222] q”j = Clip3 (q’j + tcQj, q’j –tcQ j, q’j) ;

[0223] where p’i and q’i are filtered sample values, p”i and q”j are output sample value after the clipping and tcPi tcPi are clipping thresholds that are derived from the VVC tc parameter and tcPD and tcQD. The function Clip3 is a  clipping function as it is specified in VVC.

[0224] 3.6.8. Sub-block Deblocking Adjustment

[0225] To enable parallel friendly deblocking using both long filters and sub-block deblocking the long filters is restricted to modify at most 5 samples on a side that uses sub-block deblocking (AFFINE or ATMVP or DMVR) as shown in the luma control for long filters. Extendedly, the sub-block deblocking is adjusted such that that sub-block boundaries on an 8x8 grid that are close to a CU or an implicit TU boundary is restricted to modify at most two samples on each side.

[0226] Following applies to sub-block boundaries that are not aligned with the CU boundary.

[0227] Where edge equal to 0 corresponds to CU boundary, edge equal to 2 or equal to orthogonalLength-2 corresponds to sub-block boundary 8 samples from a CU boundary etc. Where implicit TU is true if implicit split of TU is used.

[0228] 3.7. Sample Adaptive Offset

[0229] Sample adaptive offset (SAO) is applied to the reconstructed signal after the deblocking filter by using offsets specified for each CTB by the encoder. The video encoder first makes the decision on whether or not the SAO process is to be applied for current slice. If SAO is applied for the slice, each CTB is classified as one of five SAO types as shown in Table 1. The concept of SAO is to classify pixels into categories and reduces the distortion by adding an offset to pixels of each category. SAO operation includes edge offset (EO) which uses edge properties for pixel classification in SAO type 1 to 4 and band offset (BO) which uses pixel intensity for pixel classification in SAO type 5. Each applicable CTB has SAO parameters including sao_merge_left_flag, sao_merge_up_flag, SAO type and four offsets. If sao_merge_left_flag is equal to 1, the current CTB will reuse the SAO type and offsets of the CTB to the left. If sao_merge_up_flag is equal to 1, the current CTB will reuse SAO type and offsets of the CTB above.

[0230] Table 4 Specification of SAO type

[0231] 3.8. Adaptive Loop Filter

[0232] Adaptive loop filtering for video coding is to minimize the mean square error between original samples and decoded samples by using Wiener-based adaptive filter. The ALF is located at the last processing stage for each picture and can be regarded as a tool to catch and fix artifacts from previous stages. The suitable filter coefficients are determined by the encoder and explicitly signalled to the decoder. To achieve better coding efficiency, especially for high resolution videos, local adaptation is used for luma signals by applying different filters to different regions or blocks in a picture. In addition to filter adaptation, filter on / off control at coding tree unit (CTU) level is also helpful for improving coding efficiency. Syntax-wise, filter coefficients are sent in a picture level header called adaptation parameter set, and filter on / off flags of CTUs are interleaved at CTU level in the slice data. This syntax design not only supports picture level optimization but also achieves a low encoding latency.

[0233] 3.8.1. Signaling of Parameters

[0234] According to ALF design in VTM, filter coefficients and clipping indices are carried in ALF APSs. An ALF APS can include up to 8 chroma filters and one luma filter set with up to 25 filters. An index is also included for each of the 25 luma classes. Classes having the same index share the same filter. By merging different classes, the num of bits required to represent the filter coefficients is reduced. The absolute value of a filter coefficient is represented using a 0th order Exp-Golomb code followed by a sign bit for a non-zero coefficient. When clipping is enabled, a clipping index is also signalled for each filter coefficient using a two-bit fixed-length code. Up to 8 ALF APSs can be used by the decoder at the same time.

[0235] Filter control syntax elements of ALF in VTM include two types of information. First, ALF on / off flags are signalled at sequence, picture, slice and CTB levels. Chroma ALF can be enabled at picture and slice level only if luma ALF is enabled at the corresponding level. Second, filter usage information is signalled at picture, slice and CTB level, if ALF is enabled at that level. Referenced ALF APSs IDs are coded at a slice level or at a picture level if all the slices within the picture use the same APSs. Luma component can reference up to 7 ALF APSs and chroma components can reference 1 ALF APS. For a luma CTB, an index is signalled indicating which ALF APS or offline trained luma filter set is used. For a chroma CTB, the index indicates which filter in the referenced APS is used.

[0236] The data syntax elements of ALF associated to LUMA component in VTM are listed as follows:

[0237] alf_luma_filter_signal_flag equal to 1 specifies that a luma filter set is signalled. alf_luma_filter_signal_flag equal to 0 specifies that a luma filter set is not signalled.

[0238] alf_luma_clip_flag equal to 0 specifies that linear adaptive loop filtering is applied to the luma component. alf_luma_clip_flag equal to 1 specifies that non-linear adaptive loop filtering could be applied to the luma component.

[0239] alf_luma_num_filters_signalled_minus1 plus 1 specifies the number of adpative loop filter classes for which luma coefficients can be signalled. The value of alf_luma_num_filters_signalled_minus1 shall be in the range of 0 to NumAlfFilters -1, inclusive.

[0240] alf_luma_coeff_delta_idx [filtIdx] specifies the indices of the signalled adaptive loop filter luma coefficient deltas for the filter class indicated by filtIdx ranging from 0 to NumAlfFilters -1. When alf_luma_coeff_delta_idx [filtIdx] is not present, it is inferred to be equal to 0. The length of alf_luma_coeff_delta_idx [filtIdx] is Ceil (Log2 (alf_luma_num_filters_signalled_minus1 + 1) ) bits. The value of alf_luma_coeff_delta_idx [filtIdx] shall be in the range of 0 to alf_luma_num_filters_signalled_minus1, inclusive.

[0241] alf_luma_coeff_abs [sfIdx] [j] specifies the absolute value of the j-th coefficient of the signalled luma filter indicated by sfIdx. When alf_luma_coeff_abs [sfIdx] [j] is not present, it is inferred to be equal 0. The value of alf_luma_coeff_abs [sfIdx] [j] shall be in the range of 0 to 128, inclusive.

[0242] alf_luma_coeff_sign [sfIdx] [j] specifies the sign of the j-th luma coefficient of the filter indicated by sfIdx as follows:

[0243] – If alf_luma_coeff_sign [sfIdx] [j] is equal to 0, the corresponding luma filter coefficient has a positive value.

[0244] – Otherwise (alf_luma_coeff_sign [sfIdx] [j] is equal to 1) , the corresponding luma filter coefficient has a negative value.

[0245] When alf_luma_coeff_sign [sfIdx] [j] is not present, it is inferred to be equal to 0.

[0246] alf_luma_clip_idx [sfIdx] [j] specifies the clipping index of the clipping value to use before multiplying by the j-th coefficient of the signalled luma filter indicated by sfIdx. When alf_luma_clip_idx [sfIdx] [j] is not present, it is inferred to be equal to 0.

[0247] The coding tree unit syntax elements of ALF associated to LUMA component in VTM are listed as follows:

[0248] alf_ctb_flag [cIdx] [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] equal to 1 specifies that the adaptive loop filter is applied to the coding tree block of the colour component indicated by cIdx of the coding tree unit at luma location (xCtb, yCtb) . alf_ctb_flag [cIdx] [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] equal to 0 specifies that the adaptive loop filter is not applied to the coding tree block of the colour component indicated by cIdx of  the coding tree unit at luma location (xCtb, yCtb) .

[0249] When alf_ctb_flag [cIdx] [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] is not present, it is inferred to be equal to 0.

[0250] alf_use_aps_flag equal to 0 specifies that one of the fixed filter sets is applied to the luma CTB. alf_use_aps_flag equal to 1 specifies that a filter set from an APS is applied to the luma CTB. When alf_use_aps_flag is not present, it is inferred to be equal to 0.

[0251] alf_luma_prev_filter_idx specifies the previous filter that is applied to the luma CTB. The value of alf_luma_prev_filter_idx shall be in a range of 0 to sh_num_alf_aps_ids_luma -1, inclusive. When alf_luma_prev_filter_idx is not present, it is inferred to be equal to 0.

[0252] The variable AlfCtbFiltSetIdxY [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] specifying the filter set index for the luma CTB at location (xCtb, yCtb) is derived as follows:

[0253] – If alf_use_aps_flag is equal to 0, AlfCtbFiltSetIdxY [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] is set equal to alf_luma_fixed_filter_idx.

[0254] – Otherwise, AlfCtbFiltSetIdxY [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] is set equal to 16 + alf_luma_prev_filter_idx.

[0255] alf_luma_fixed_filter_idx specifies the fixed filter that is applied to the luma CTB. The value of alf_luma_fixed_filter_idx shall be in a range of 0 to 15, inclusive.

[0256] Based on the ALF design of VTM, the ALF design of ECM further introduces the concept of alternative filter sets into luma filters. The luma filters are be trained multiple alternatives / rounds based on the updated luma CTU ALF on / off decisions of each alternative / rounds. In such way, there will be multiple filter sets that associated to each training alternative and the class merging results of each filter set may be different. Each CTU could select the best filter set by RDO and the related alternative information will be signaled.

[0257] The data syntax elements of ALF associated to LUMA component in ECM are listed as follows:

[0258] alf_luma_num_alts_minus1 plus 1 specifies the number of alternative filter sets for luma component. The value of alf_luma_num_alts_minus1 shall be in the range of 0 to 3, inclusive.

[0259] alf_luma_clip_flag [altIdx] equal to 0 specifies that linear adaptive loop filtering is applied to the alternative luma filter set with index altIdx alf_luma_clip_flag [altIdx] equal to 1 specifies that non-linear adaptive loop filtering could be applied to the alternative luma filter set with index altIdx

[0260] alf_luma_num_filters_signalled_minus1 [altIdx] plus 1 specifies the number of adpative loop filter classes for which luma coefficients can be signalled of the alternative luma filter set with index altIdx. The value of alf_luma_num_filters_signalled_minus1 [altIdx] shall be in the range of 0 to NumAlfFilters -1, inclusive.

[0261] alf_luma_coeff_delta_idx [altIdx] [filtIdx] specifies the indices of the signalled adaptive loop filter luma coefficient deltas for the filter class indicated by filtIdx ranging from 0 to NumAlfFilters –1 for the alternative luma filter set with index altIdx. When alf_luma_coeff_delta_idx [filtIdx] [altIdx] is not present, it is inferred to be equal to 0. The length of alf_luma_coeff_delta_idx [altIdx] [filtIdx] is Ceil (Log2 (alf_luma_num_filters_signalled_minus1 [altIdx] + 1) ) bits. The value of alf_luma_coeff_delta_idx [altIdx] [filtIdx] shall be in the range of 0 to alf_luma_num_filters_signalled_minus1 [altIdx] , inclusive.

[0262] alf_luma_coeff_abs [altIdx] [sfIdx] [j] specifies the absolute value of the j-th coefficient of the signalled luma filter indicated by sfIdx of the alternative luma filter set with index altIdx. When alf_luma_coeff_abs [altIdx] [sfIdx] [j] is not present, it is inferred to be equal 0. The value of  alf_luma_coeff_abs [altIdx] [sfIdx] [j] shall be in the range of 0 to 128, inclusive.

[0263] alf_luma_coeff_sign [altIdx] [sfIdx] [j] specifies the sign of the j-th luma coefficient of the filter indicated by sfIdx of the alternative luma filter set with index altIdx as follows:

[0264] – If alf_luma_coeff_sign [altIdx] [sfIdx] [j] is equal to 0, the corresponding luma filter coefficient has a positive value.

[0265] – Otherwise (alf_luma_coeff_sign [altIdx] [sfIdx] [j] is equal to 1) , the corresponding luma filter coefficient has a negative value.

[0266] When alf_luma_coeff_sign [altIdx] [sfIdx] [j] is not present, it is inferred to be equal to 0.

[0267] alf_luma_clip_idx [altIdx] [sfIdx] [j] specifies the clipping index of the clipping value to use before multiplying by the j-th coefficient of the signalled luma filter indicated by sfIdx of the alternative luma filter set with index altIdx. When alf_luma_clip_idx [altIdx] [sfIdx] [j] is not present, it is inferred to be equal to 0.

[0268] The coding tree unit syntax elements of ALF associated to LUMA component in ECM are listed as follows:

[0269] alf_ctb_luma_filter_alt_idx [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] specifies the index of the alternative luma filters applied to the coding tree block of the luma component, of the coding tree unit at luma location (xCtb, yCtb) . When  alf_ctb_luma_filter_alt_idx [xCtb >> CtbLog2SizeY] [yCtb >> CtbLog2SizeY] is not present, it is inferred to be equal to zero.

[0270] 3.8.2. Filter Shapes

[0271] Fig. 13A-Fig. 13C illustrate filter shapes for ALF, respectively. In the JEM, up to three diamond filter shapes (as shown in Fig. 13A to Fig. 13C) can be selected for the luma component. An index is signalled at the picture level to indicate the filter shape used for the luma component. Each square represents a sample, and Ci (i being 0~6 (left) , 0~12 (middle) , 0~20 (right) ) denotes the coefficient to be applied to the sample. For chroma components in a picture, the 5×5 diamond shape is always used. In VVC, the 7×7 diamond shape is always used for Luma while the 5×5 diamond shape is always used for Chroma.

[0272] 3.8.3. Classification for ALF

[0273] Each 2×2 (or 4×4) block is categorized into one out of 25 classes. The classification index C is derived based on its directionality D and a quantized value of activity as follows:

[0274] To calculate D and gradients of the horizontal, vertical and two diagonal direction are first calculated using 1-D Laplacian:

[0275] Indices i and j refer to the coordinates of the upper left sample in the 2×2 block and R (i, j) indicates a recon-structed sample at coordinate (i, j) .

[0276] Then D maximum and minimum values of the gradients of horizontal and vertical directions are set as:

[0277] and the maximum and minimum values of the gradient of two diagonal directions are set as:

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

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

[0280] Step 2. If continue from Step 3; otherwise continue from Step 4.

[0281] Step 3. If D is set to 2; otherwise D is set to 1.

[0282] Step 4. If D is set to 4; otherwise D is set to 3.

[0283] The activity value A is calculated as:

[0284] A is further quantized to the range of 0 to 4, inclusively, and the quantized value is denoted as

[0285] For both chroma components in a picture, no classification method is applied, i.e. a single set of ALF coefficients is applied for each chroma component.

[0286] 3.8.4. Geometric Transformations of Filter Coefficients

[0287] Fig. 14A-Fig. 14C illustrate relative coordinator for the 5×5 diamond filter support, respectively.

[0288] Before filtering each 2×2 block, geometric transformations such as rotation or diagonal and vertical flipping are applied to the filter coefficients f (k, l) , which is associated with the coordinate (k, l), depending on 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 ALF is applied more similar by aligning their directionality.

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

[0290] Diagonal: fD (k, l) =f (l, k) ,

[0291] Vertical flip: fV (k, l) =f (k, K-l-1) ,

[0292] Rotation: fR (k, l) =f (K-l-1, k) .

[0293] where K is the size of the filter and 0≤k, l≤K-1 are coefficients coordinates, such that location (0, 0) is at the upper left corner and location (K-1, K-1) is at the lower right corner. The transformations are applied to the filter coefficients f (k, l) depending on gradient values calculated for that block. The relationship between the transformation and the four gradients of the four directions are summarized in Table 5. Fig. 14A to Fig. 14C show the transformed coefficients for each position based on the 5x5 diamond.

[0294] Table 5 Mapping of the gradient calculated for one block and the transformations.

[0295] 3.8.5. Filtering Process

[0296] At decoder side, when ALF is enabled for a block, each sample R (i, j) within the block is filtered, resulting in sample value R′ (i, j) as shown below, where L denotes filter length, fm, n represents filter coefficient, and f (k, l) denotes the decoded filter coefficients.

[0297] Fig. 15 shows an example of relative coordinates used for 5x5 diamond filter support supposing the current sample’s coordinate (i, j) to be (0, 0) . Samples in different coordinates filled with the same color are multiplied with the same filter coefficients.

[0298] 3.8.6. Non-Linear Filtering Reformulation

[0299] Linear filtering can be reformulated, without coding efficiency impact, in the following expression:

[0300] where w (i, j) are the same filter coefficients.

[0301] VVC introduces the non-linearity to make ALF more efficient by using a simple clipping function to reduce the impact of neighbor sample values (I (x+i, y+j) ) when they are too different with the current sample value (I (x, y) ) being filtered.

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

[0303] where K (d, b) =min (b, max (-b, d) ) is the clipping function, and k (i, j) are clipping parameters, which de-pends on the (i, j) filter coefficient. The encoder performs the optimization to find the best k (i, j) .

[0304] The clipping parameters k (i, j) are specified for each ALF filter, one clipping value is signaled per filter coefficient. It means that up to 12 clipping values can be signalled in the bitstream per Luma filter and up to 6 clipping values for the Chroma filter.

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

[0306] Because the variance of the local differences is often higher for Luma than for Chroma, two  different sets for the Luma and Chroma filters are applied. The maximum sample value (here 1024 for 10 bits bit-depth) in each set is also introduced, so that clipping can be disabled if it is not necessary.

[0307] The 4 values have been selected by roughly equally splitting, in the logarithmic domain, the full range of the sample values (coded on 10 bits) for Luma, and the range from 4 to 1024 for Chroma.

[0308] More precisely, the Luma table of clipping values have been obtained by the following formula:

[0309] with M=210 and N=4

[0310] Similarly, the Chroma tables of clipping values is obtained according to the following formula:

[0311] with M=210, N=4 and A=4

[0312] 3.9. Bilateral In-loop Filter

[0313] 3.9.1. Bilateral Image Filter

[0314] Bilateral image filter is a nonlinear filter that smooths the noise while preserving edge structures. The bilateral filtering is a technique to make the filter weights decrease not only with the distance between the samples but also with increasing difference in intensity. This way, over-smoothing of edges can be ameliorated. A weight is defined as

[0315] where Δxand Δy is the distance in the vertical and horizontal andΔIis the difference in intensity between the samples.

[0316] The edge-preserving de-noising bilateral filter adopts a low-pass Gaussian filter for both the domain filter and the range filter. The domain low-pass Gaussian filter gives higher weight to pixels that are spatially close to the center pixel. The range low-pass Gaussian filter gives higher weight to pixels that are similar to the center pixel. Combining the range filter and the domain filter, a bilateral filter at an edge pixel becomes an elongated Gaussian filter that is oriented along the edge and is greatly reduced in gradient direction. This is the reason why the bilateral filter can smooth the noise while preserving edge structures.

[0317] 3.9.2. Bilateral Filter in Video Coding

[0318] The bilateral filter in video coding is proposed as a coding tool for the VVC. The filter acts as a loop filter in parallel with the sample adaptive offset (SAO) filter. Both the bilateral filter and SAO act on the same input samples, each filter produces an offset, and these offsets are then added to the input sample to produce an output sample that, after clipping, goes to the next stage. The spatial filtering strength σdis determined by the block size, with smaller blocks filtered more strongly, and the intensity filtering strength σris determined by the quantization parameter, with stronger filtering being used for higher QPs. Only the four closest samples are used, so the filtered sample intensity IFcan be calculated  as

[0319] where ICdenotes the intensity of the center sample, ΔIA=IA-ICthe intensity difference between the center sample and the sample above. ΔIB, ΔIL and ΔIRdenote the intensity difference between the center sample and that of the sample below, to the left and to the right respectively.

[0320] 4. Problems

[0321] The existing designs of prediction sample derivation in video coding have the following problems:

[0322] 1. In current prediction sample derivation, the compression noise inside prediction sample is not well con-sidered, which may be suboptimal for video compression.

[0323] 2. In current prediction sample derivation, no filter is used to denoise, which may be suboptimal for video compression.

[0324] 5. Detailed solutions

[0325] To solve the above problems and some other problems not mentioned, methods as summarized below are disclosed. The embodiments should be considered as examples to explain the general concepts and should not be interpreted in a narrow way. Furthermore, these embodiments can be applied individually or combined in any manner.

[0326] In this disclosure, a video unit may refer to a sequence, a picture, a sub-picture, a slice, a CTU, a TU, a block, or a region. The video unit may comprise one color component or it may comprise multiple color components.

[0327] 1) In one example, a filtering method may be applied to prediction samples in video coding.

[0328] a. In one example, the filtering method may be bilateral filtering (BF) .

[0329] b. In one example, the filtering method may be deblocking filtering.

[0330] c. In one example, at least one parameter may be signaled to determine the filtering method.

[0331] a) In one example, the filtering method may be SAO.

[0332] b) In one example, the filtering method may be CCSAO.

[0333] c) In one example, the filtering method may be ALF.

[0334] d) In one example, the filtering method may be CCALF.

[0335] d. In one example, the prediction samples may belong to a video unit.

[0336] e. In one example, the prediction samples may belong to a CU / PU / TU.

[0337] f. In one example, the prediction samples may belong to a picture / slice / tile.

[0338] g. In one example, the prediction samples may belong to a block / region.

[0339] h. In one example, a prediction sample / pixel may be filtered / modified by the proposed BF with utili-zation of coded / statistical information.

[0340] a) In one example, the filtering result of the proposed BF may be generated by following formulation:

[0341] where lfiltered stands for the updated / modified luma or chroma sample / pixel and IC stands for the unmodified luma or chroma sample / pixel that locates at cen-tral of the filtering shape. The Δ (delta) denotes the difference between corre-sponding reference sample and unmodified central sample and the Ω (omega) de-notes the sum of vertical and horizontal distance between reference sample and central sample. The n stands for the total number of samples inside the filtering shape and e stands for the strength factor. The μ (Δ, Ω) is a function for computing the filtering weight of each position in the filtering shape.

[0342] 1. In one example, the function μ (Δ, Ω) may be formulated as:

[0343] where σd and σr are two parameters for filtering.

[0344] 2. In one example, the function μ (Δ, Ω) may be baked into the look-up-table.

[0345] 3. In one example, different samples or different positions inside intra reference sam-ples may use uniform parameters or look-up-table.

[0346] 4. Alternatively, different samples or different positions inside intra reference sam-ples may use different parameters or look-up-tables.

[0347] 5. In one example, the parameter such as σd and σr may be pre-defined, searched, determined on-the-fly or signalled in the bitstream.

[0348] a. In one example, the parameters mentioned above may be set based on coding mode, size or other coded information of current video unit.

[0349] b. In one example, the parameters mentioned above may be signaled from the encoder to the decoder.

[0350] 6. In one example, the parameter e may be pre-defined, searched, determined on-the-fly or signalled in the bitstream.

[0351] a. In one example, the parameter e may be set based on coding mode, size or other coded information of current video unit.

[0352] a) In one example, the parameter e may be set based on the luma size of current video unit.

[0353] 1. In one example, the parameter e may be set based on the max (widthluma, heightluma) or min (widthluma, heightluma) .

[0354] 2. In one example, the parameter e may be set based on the widthluma×heightluma.

[0355] b) Alternatively, the parameter e may be set based on the chroma size of current video unit.

[0356] 1. In one example, the parameter e may be set based on the max (widthchroma, heightchroma) or min (widthchroma, heightchroma) .

[0357] 2. In one example, the parameter e may be set based on the widthchroma×heightchroma

[0358] b. In one example, the parameter e may be signaled from the encoder to the decoder.

[0359] b) In one example, the filtering process as described in above bullets may be implemented by operations on integers.

[0360] 1. For example, variables may be left-shifted and / or right-shifted before / in / after the process in keep a suitable calculation precision.

[0361] 2) It is proposed to apply the filtering method to the intra prediction samples before they are used to generate intra reconstruction.

[0362] a. It is proposed to apply bilateral filter to prediction samples of regular intra modes.

[0363] a) In one example, the proposed method may be applied to an angular based Luma intra mode.

[0364] b) In one example, the proposed method may be applied to a wide-angle based Luma intra mode.

[0365] c) In one example, the proposed method may be applied to any other regular Luma intra mode.

[0366] d) In one example, the proposed method may be applied to an angular based Chroma intra mode.

[0367] e) In one example, the proposed method may be applied to a wide-angle based Chroma intra mode.

[0368] f) In one example, the proposed method may be applied to any other regular Chroma intra mode.

[0369] b. It is proposed to apply bilateral filter to prediction samples of non-regular intra modes.

[0370] a) In one example, the proposed method may be applied to a Luma DIMD mode.

[0371] b) In one example, the proposed method may be applied to a Luma TIMD mode.

[0372] c) In one example, the proposed method may be applied to a Luma SGPM mode.

[0373] d) In one example, the proposed method may be applied to a Luma MRL / TMRL mode.

[0374] e) In one example, the proposed method may be applied to a Luma ISP mode.

[0375] f) In one example, the proposed method may be applied to a Luma fusion based mode.

[0376] g) In one example, the proposed method may be applied to a Luma template matching based mode.

[0377] h) In one example, the proposed method may be applied to any other Luma non-regular mode.

[0378] i) In one example, the proposed method may be applied to a Chroma DIMD mode.

[0379] j) In one example, the proposed method may be applied to a Chroma TIMD mode.

[0380] k) In one example, the proposed method may be applied to a Chroma SGPM mode.

[0381] l) In one example, the proposed method may be applied to a Chroma MRL / TMRL mode.

[0382] m) In one example, the proposed method may be applied to a Chroma ISP mode.

[0383] n) In one example, the proposed method may be applied to a Chroma fusion based mode.

[0384] o) In one example, the proposed method may be applied to a Chroma template matching based mode.

[0385] p) In one example, the proposed method may be applied to Intra-CCCM mode.

[0386] q) In one example, the proposed method may be applied to any other Chroma non-regular mode.

[0387] 3) It is proposed to apply the filtering method to the IBC prediction samples before they are used to generate IBC reconstruction.

[0388] a. In one example, the proposed method may be applied to Luma related IBC mode.

[0389] b. In one example, the proposed method may be applied to Chroma related IBC mode.

[0390] c. In one example, the proposed method may be applied to RR-IBC mode.

[0391] d. In one example, the proposed method may be applied to IBC-Merge mode.

[0392] e. In one example, the proposed method may be applied to IBC-AMVP mode.

[0393] f. In one example, the proposed method may be applied to IBC-TM mode.

[0394] g. In one example, the proposed method may be applied to IBC-CIIP mode.

[0395] h. In one example, the proposed method may be applied to IBC-GPM mode.

[0396] i. In one example, the proposed method may be applied to IBC-LIC mode.

[0397] j. In one example, the proposed method may be applied to Bi-Predictive IBC-GPM mode.

[0398] k. In one example, the proposed method may be applied to Bi-Predictive IBC mode.

[0399] l. In one example, the proposed method may be applied to DBV mode.

[0400] m. In one example, the proposed method may be applied to any other IBC related mode.

[0401] 4) It is proposed to apply the filtering method to the Intra-TMP prediction samples before they are used to generate Intra-TMP reconstruction.

[0402] a. In one example, the proposed method may be applied to Luma related Intra-TMP mode.

[0403] b. In one example, the proposed method may be applied to Chroma related Intra-TMP mode.

[0404] 5) It is proposed to apply the filtering method to the inter prediction samples before they are used to generate inter reconstruction.

[0405] a. In one example, the proposed method may be applied to Luma related inter mode.

[0406] b. In one example, the proposed method may be applied to Chroma related inter mode.

[0407] c. In one example, the proposed method may be applied to uni-predictive inter mode.

[0408] d. In one example, the proposed method may be applied to bi-predictive inter mode.

[0409] e. In one example, the proposed method may be applied to inter MERGE mode.

[0410] f. In one example, the proposed method may be applied to inter AMVP mode.

[0411] g. In one example, the proposed method may be applied to AMVP-MERGE mode.

[0412] h. In one example, the proposed method may be applied to CIIP mode.

[0413] i. In one example, the proposed method may be applied to LIC mode.

[0414] j. In one example, the proposed method may be applied to BDOF mode.

[0415] k. In one example, the proposed method may be applied to AFFINE mode.

[0416] l. In one example, the proposed method may be applied to DMVR mode.

[0417] m. In one example, the proposed method may be applied to MHP mode.

[0418] n. In one example, the proposed method may be applied to OBMC mode.

[0419] o. In one example, the proposed method may be applied to GPM mode.

[0420] p. In one example, the proposed method may be applied to Inter-CCCM mode.

[0421] q. In one example, the proposed method may be applied to BCW mode.

[0422] r. In one example, the proposed method may be applied to template matching based inter mode.

[0423] s. In one example, the proposed method may be applied to any other inter related mode.

[0424] 6) It is proposed to apply a filtering method to different color components of prediction samples, in different ways or in the same way.

[0425] a. The same filtering methods may be applied to different color components.

[0426] b. Different filtering methods may be applied to different color components.

[0427] c. In one example, the proposed method may be applied to a Luma related intra mode.

[0428] d. In one example, the proposed method may be applied to a Chroma related intra mode.

[0429] e. In one example, the proposed method may be applied to a Cross-Component related intra mode.

[0430] f. In one example, the proposed method may be jointly applied to Luma and Chroma related intra mode.

[0431] g. In one example, the proposed method may be applied to a fusion based intra mode.

[0432] h. In one example, the proposed method may be applied to a RGB related intra mode.

[0433] 7) It is proposed to apply the filtering method to different coding areas of prediction.

[0434] a. In one example, the proposed method may be applied to a CU.

[0435] b. In one example, the proposed method may be applied to a PU.

[0436] c. In one example, the proposed method may be applied to a TU.

[0437] d. In one example, the proposed method may be applied to a CTU.

[0438] e. In one example, the proposed method may be applied to a CTU row.

[0439] f. In one example, the proposed method may be applied to a slice.

[0440] g. In one example, the proposed method may be applied to a tile.

[0441] h. In one example, the proposed method may be applied to a picture.

[0442] i. In one example, the proposed method may be applied to any other coding unit / area / block.

[0443] 8) It is proposed to conditional apply the filtering method to prediction samples.

[0444] a. In one example, the condition may be block size.

[0445] a) In one example, the proposed method may be applied when width / height of current block is greater than a threshold.

[0446] b) In one example, the proposed method may be applied when width / height of current block is less than a threshold.

[0447] c) In one example, the proposed method may be applied when total sample number of current block is greater than a threshold.

[0448] d) In one example, the proposed method may be applied when total sample number of current block is less than a threshold.

[0449] b. In one example, the condition may be prediction sample number of current block.

[0450] a) In one example, the proposed method may be applied when prediction sample number of current block is greater than a threshold.

[0451] b) In one example, the proposed method may be applied when prediction sample number of current block is less than a threshold.

[0452] c. In one example, the condition may be picture / slice / tile size.

[0453] a) In one example, the proposed method may be applied when width / height of current pic-ture / slice / tile is greater than a threshold.

[0454] b) In one example, the proposed method may be applied when width / height of current pic-ture / slice / tile is less than a threshold.

[0455] c) In one example, the proposed method may be applied when total sample number of current picture / slice / tile is greater than a threshold.

[0456] d) In one example, the proposed method may be applied when total sample number of current picture / slice / tile is less than a threshold.

[0457] d. In one example, the condition may be texture strength related info.

[0458] a) In one example, the proposed method may be applied when variance of prediction samples is greater than a threshold.

[0459] b) In one example, the proposed method may be applied when variance of prediction samples is less than a threshold.

[0460] c) In one example, the proposed method may be applied when gradient of prediction samples is greater than a threshold.

[0461] d) In one example, the proposed method may be applied when gradient of prediction samples is less than a threshold.

[0462] e) In one example, the proposed method may be applied when valid band number of predic-tion samples is greater than a threshold.

[0463] f) In one example, the proposed method may be applied when valid band number of predic-tion samples is less than a threshold.

[0464] g) In one example, the proposed method may be applied when other texture related info of prediction samples is greater than a threshold.

[0465] h) In one example, the proposed method may be applied when other texture related info of prediction samples is less than a threshold.

[0466] e. In one example, the condition may be template info.

[0467] a) In one example, the proposed method may be applied when template cost of current block is greater than a threshold.

[0468] b) In one example, the proposed method may be applied when template cost of current block is less than a threshold.

[0469] f. In one example, the condition may be coding mode info of neighbor blocks.

[0470] a) In one example, the proposed method may be applied when coding mode of neighbor block is intra related mode.

[0471] b) In one example, the proposed method may be applied when coding mode of neighbor block is inter / IBC / IntraTMP related mode.

[0472] g. In one example, the above mentioned conditions may be used independently.

[0473] h. In one example, the above mentioned conditions may be used jointly.

[0474] 9) It is proposed that the padding method may be applied to prediction samples before doing filtering.

[0475] a. In one example, the mirrored padding may be applied.

[0476] b. In one example, the duplicated padding may be applied.

[0477] c. In one example, the reconstructed sample from neighbor blocks may be used for filtering boundary prediction samples of current block.

[0478] d. In one example, the reconstructed sample from neighbor blocks may be used for padding.

[0479] e. In one example, the prediction sample from current block may be used for padding.

[0480] 10) In one example, a first syntax element (SE) may be signaled to indicate whether the proposed method is applied or not.

[0481] a. For example, the SE may be a flag.

[0482] b. For example, the SE may be coded with at least one context model.

[0483] c. For example, the SE may be bypass coded.

[0484] d. For example, the SE is coded only if the current block is coded with a specific mode, such as angular based intra mode.

[0485] 11) In one example, the disclosed methods may be used in post-processing and / or pre-processing.

[0486] 12) In one example, the above-mentioned methods may be used jointly.

[0487] 13) Alternatively, the above-mentioned methods may be used individually.

[0488] 14) In one example, the proposed / described model parameter inheritance method may be applied to any in-loop filtering tools, prediction tools, pre-processing, or post-processing filtering method in video coding.

[0489] 15) In above examples, the video unit may refer to sequence / picture / sub-picture / slice / tile / coding tree unit (CTU)  / CTU row / groups of CTU / coding unit (CU)  / prediction unit (PU)  / transform unit (TU)  / coding tree block (CTB)  / coding block (CB)  / prediction block (PB)  / transform block (TB)  / any other region that con-tains more than one luma or chroma sample / pixel.

[0490] 16) Whether to and / or how to apply the disclosed methods above may be signalled in a bitstream.

[0491] a. In one example, they may be signalled at sequence level / group of pictures level / picture level / slice level / tile group level, such as in sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header.

[0492] b. In one example, they may be signalled at PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU row / slice / tile / sub-picture / other kinds of region contain more than one sample or pixel.

[0493] 17) Whether to and / or how to apply the disclosed methods above may be dependent on coded information, such as block size, colour format, single / dual tree partitioning, colour component, slice / picture type.

[0494] Fig. 16 illustrates a flowchart of a method 1600 for video processing in accordance with embodiments of the present disclosure. The method 1600 is implemented during a conversion between a video unit of a video and a bitstream of the video.

[0495] At block 1610, for a conversion between a video unit of a video and a bitstream of the video, a filtering approach is applied to a prediction sample associated with the video unit.

[0496] At block 1620, the conversion is performed based on the filtered prediction sample. In some embodiments, the conversion may include encoding the video unit into the bitstream. Alternatively, the conversion may include decoding the video unit from the bitstream.

[0497] The method 1600 enables the filtering approach to be applied to the prediction sample associated with the video unit. Compared with the conventional solution, the method 1600 advantageously improves the coding efficiency and performance.

[0498] In some embodiments, the filtering approach may include at least one of: a bilateral filtering (BF) approach or a deblocking filtering approach. In some embodiments, the prediction sample may be included in one of: the video unit, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a block, a region, a picture, a slice, or a tile. In some other embodiments, at least one of: the prediction sample or a pixel may be filtered or modified by the BF approach with coded information and / or with statistical information.

[0499] In some embodiments, a filtering result of the BF approach may be determined by the following formulation (1) :

[0500] where Ifiltered represents one of: an updated or modified luma sample, an updated or modified luma pixel, an updated or modified chroma sample, or an updated or modified chroma pixel; IC represents one of the followings that locates at central of a filtering shape: an unmodified luma sample, an unmodified luma pixel, an unmodified chroma sample, or an unmodified chroma pixel; Δ represents a difference between a corresponding reference sample and an unmodified central sample; Ω represents a sum of vertical distance between a reference sample and a central sample and horizontal distance between the reference sample and the central sample; n represents a total number of samples inside the filtering shape; erepresents a strength factor; and μ (Δi, Ωi) represents a function for determining a filtering weight of each position in the filtering shape. In some embodiments, the function μ (Δi, Ωi) may be included in a look-up-table. In some other embodiments, the function μ (Δi, Ωi) may represent the following formulation (2) :

[0501] where σd represents a parameter for filtering, and σr represents another parameter for filtering.

[0502] In some embodiments, one of: a uniform parameter or a uniform look-up-table may be used by  different samples or different positions inside intra reference samples. Alternatively, one of: different parameters or look-up-tables may be used by different samples or different positions inside intra reference samples. In some embodiments, a parameter for filtering may be a predetermined parameter. In some other embodiments, the parameter for filtering may be a parameter being searched. In some embodiments, the parameter for filtering may be determined in real-time. Alternatively, the parameter for filtering may be signalled in the bitstream.

[0503] In some embodiments, the parameter for filtering may include σd and / or σr. For example, the parameter may be determined based on at least one of: a coding mode of the video unit, a size of the video unit, or other coded information of the video unit. Alternatively, the parameter may be signaled from an encoder to a decoder.

[0504] In some embodiments, the strength factor (i.e., e) may be a predetermined parameter. In some embodiments, the strength factor may be a parameter being searched. In some other embodiments, the strength factor may be determined in real-time. Alternatively, the strength factor may be signalled in the bitstream. In some embodiments, the strength factor may be determined based on at least one of: a coding mode of the video unit, a size of the video unit, or other coded information of the video unit.

[0505] In some embodiments, the strength factor may be determined based on a luma size of the video unit. For example, the strength factor may be determined based on max (widthluma, heightluma) or min (widthluma, heightluma) , where widthluma represents a luma width of the video unit, and heightluma represents a luma height of the video unit. Alternatively, the strength factor may be determined based on widthluma multiplying heightluma, where widthluma represents a luma width of the video unit, and heightluma represents a luma height of the video unit. In some other embodiments, the strength factor may be determined based on a chroma size of the video unit. For example, the strength factor may be determined based on max (widthchroma, heightchroma) or min (widthluma, heightchroma) , where widthchroma represents a chroma width of the video unit, and heightchroma represents a chroma height of the video unit. Alternatively, the strength factor may be determined based on widthchroma multiplying heightchroma, where widthchroma represents a chroma width of the video unit, and heightchroma represents a chroma height of the video unit. In some embodiments, the strength factor may be signaled from an encoder to a decoder.

[0506] In some embodiments, the filtering may be processed by operations on integers. In some embodiments, a variable in the filtering process may be left-shifted and / or right-shifted before the filtering process to keep a suitable calculation precision. In some other embodiments, a variable in the filtering process may be left-shifted and / or right-shifted in the filtering process to keep a suitable calculation precision. Alternatively, a variable in the filtering process may be left-shifted and / or right-shifted after the filtering process to keep a suitable calculation precision.

[0507] In some embodiments, at least one parameter may be signaled to determine the filtering approach. In some embodiments, the filtering approach may include at least one of: a sample adaptive offset (SAO) , a cross-component sample adaptive offset (CCSAO) , an adaptive loop filter (ALF) , or a cross-component adaptive loop filter (CCALF) .

[0508] In some embodiments, the filtering approach may be applied to an intra prediction sample, before the intra prediction sample is used to generate an intra reconstruction. In some embodiments, a bilateral filter may be applied to a prediction sample of a regular intra mode. For example, the regular intra mode may include at least one of the followings: an angular based luma intra mode, a wide-angle based luma intra mode, a regular luma intra mode, an angular based chroma intra mode, a wide-angle based chroma intra mode, or a regular chroma intra mode.

[0509] In some embodiments, a bilateral filter may be applied to a prediction sample of a non-regular intra mode. For example, the non-regular intra mode may include at least one of the followings: a luma decoder side intra mode derivation (DIMD) mode, a luma template-based intra mode derivation (TIMD) mode, a luma fusion based mode, a luma template matching based mode, a luma spatial geometric partitioning mode (SGPM) mode, a luma extended multiple reference line (MRL) mode, a luma template-based multiple reference line (TMRL) mode, a luma intra sub-partition (ISP) mode, a luma non-regular mode, a chroma DIMD mode, a chroma TIMD mode, a chroma SGPM mode, a chroma MRL mode, a chroma TMRL mode, a chroma ISP mode, a chroma fusion based mode, a chroma template matching based mode, an intra-convolutional cross-component model (CCCM) mode, or a chroma non-regular mode.

[0510] In some embodiments, the filtering approach may be applied to an intra block copy (IBC) prediction sample before the IBC prediction sample is used to generate IBC reconstruction. For example, the filtering approach may be applied to an IBC prediction sample of a mode. In some examples, the mode may include at least one of the followings: a luma related IBC mode, an IBC-merge mode, an IBC-advanced motion vector prediction (AMVP) mode, a chroma related IBC mode, a reconstruction reordered (RR) -IBC mode, an IBC-template matching (TM) mode, an IBC-combination of intra and inter predication (CIIP) mode, an IBC-geometric partitioning mode (GPM) mode, an IBC-local illumination compensation (LIC) mode, a bi-predictive IBC-GPM mode, a bi-predictive IBC mode, a direct block vector (DBV) mode, or an IBC related mode.

[0511] In some embodiments, the filtering approach may be applied to an intra template matching prediction (intra-TMP) sample before the intra-TMP sample is used to generate intra-TMP reconstruction. For example, the filtering approach may be applied to an intra-TMP sample of a mode. In some examples, the mode may include at least one of: a luma related intra-TMP mode or a chroma related intra-TMP mode.

[0512] In some embodiments, the filtering approach may be applied to an inter prediction sample before the inter prediction sample is used to generate inter reconstruction. For example, the filtering approach may be applied to an inter prediction sample of a mode. In some examples, the mode may include at least one of the followings: a luma related inter mode, a uni-predictive inter mode, a bi-predictive inter mode, an inter merge mode, an inter AMVP mode, a template matching based inter mode, a chroma related inter mode, an AMVP-merge mode, a CIIP mode, a LIC mode, a bi-directional optical flow (BDOF) mode, an affine mode, a decoder side motion vector refinement (DMVR) mode, a multi-hypothesis prediction (MHP) mode, a overlapped block motion compensation (OBMC) mode, a GPM mode, an inter-CCCM  mode, a bi-prediction with CU-level weight (BCW) mode, an inter related mode.

[0513] In some embodiments, the filtering approach may be applied to a color component of a prediction sample. For example, a same filtering approach may be applied to different color components of prediction samples. Alternatively, different filtering approaches may be applied to different color components of prediction samples. In some embodiments, the filtering approach may be applied to at least one of the following modes: a luma related intra mode, a chroma related intra mode, a cross-component related intra mode, a luma and chroma related intra mode, a fusion based intra mode, or a RGB related intra mode.

[0514] In some embodiments, the filtering approach may be applied to a coding area of prediction. For example, the coding area of prediction may include at least one of the following: a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a picture, a coding unit, an area, or a block.

[0515] In some embodiments, if a condition is satisfied, the filtering approach may be applied to a prediction sample. In some embodiments, the condition may include a block size. In some embodiments, if at least one of: a width of a current block, or a height of a current block is less than a threshold, the condition may be satisfied. In some embodiments, if a sample number of a current block is less than a threshold, the condition may be satisfied. In some other embodiments, if at least one of: a width of a current block, or a height of a current block is greater than a threshold, the condition may be satisfied. Alternatively, if a sample number of a current block is greater than a threshold, the condition may be satisfied.

[0516] In some other embodiments, the condition may include a prediction sample number of a current block. In some embodiments, if the prediction sample number of the current block is less than a threshold, the condition may be satisfied. Alternatively, if the prediction sample number of the current block is greater than a threshold, the condition may be satisfied.

[0517] In some embodiments, the condition may include texture strength related information. In some embodiments, if a variance of prediction samples is less than a threshold, the condition may be satisfied. In some embodiments, if a gradient of prediction samples is less than a threshold, the condition may be satisfied. In some other embodiments, if a variance of prediction samples is greater than a threshold, the condition may be satisfied. Alternatively, if a gradient of prediction samples is greater than a threshold, the condition may be satisfied. In some embodiments, if a valid band number of prediction samples is greater than a threshold, the condition may be satisfied. In some other embodiments, if a valid band number of prediction samples is less than a threshold, the condition may be satisfied. In some embodiments, if texture related information of prediction samples is greater than a threshold, the condition may be satisfied. Alternatively, if texture related information of prediction samples is less than a threshold, the condition may be satisfied.

[0518] In some embodiments, the condition may include at least one of: a picture size, a slice size, or a tile size. In some embodiments, if a width and / or a height of at least one of: a current picture, a current  slice, or a current tile is greater than a threshold, the condition may be satisfied. In some embodiments, if a width and / or a height of at least one of: a current picture, a current slice, or a current tile is less than a threshold, the condition may be satisfied. In some other embodiments, if a total sample number of at least one of: a current picture, a current slice, or a current tile is greater than a threshold, the condition may be satisfied. Alternatively, if a total sample number of at least one of: a current picture, a current slice, or a current tile is less than a threshold, the condition may be satisfied.

[0519] In some embodiments, the condition may include template information. In some embodiments, if a template cost of a current block is greater than a threshold, the condition may be satisfied. In some other embodiments, if a template cost of a current block is less than a threshold, the condition may be satisfied.

[0520] In some embodiments, the condition may include coding mode information of a neighbor block. In some embodiments, if a coding mode of the neighbor block is an intra related mode, the condition may be satisfied. Alternatively, if a coding mode of the neighbor block includes at least one of: an inter related mode, an IBC related mode, or an intra-TMP related mode, the condition may be satisfied.

[0521] In some embodiments, the foregoing conditions may be used jointly. Alternatively, the foregoing condition may be used independently.

[0522] In some embodiments, a padding approach may be applied to the prediction sample before applying the filtering approach to the prediction sample. In some embodiments, the padding approach may include at least one of: a mirrored padding approach, or a duplicated padding approach. In some other embodiments, a reconstructed sample from a neighbor block may be used for filtering boundary prediction samples of a current block. Alternatively, at least one of: a reconstructed sample from a neighbor block or a prediction sample from a current block may be used for the padding approach.

[0523] In some embodiments, a first syntax element (SE) may be signaled to indicate whether the filtering approach is applied or not. In some embodiments, the first SE may include a flag. In some embodiments, the first SE may be bypass coded. In some other embodiments, the first SE may be coded if a current block is coded with a mode. For example, the mode may include an angular based intra mode. Alternatively, the first SE may be coded with at least one context model.

[0524] In some embodiments, the foregoing filtering approach is applied in post-processing and / or pre-processing. In some embodiments, the foregoing filtering approach may be applied jointly. Alternatively, the filtering approach may be applied individually. In some embodiments, a model parameter inheritance approach may be applied to at least one of the followings in video coding: an in-loop filtering tool, a prediction tool, a pre-processing filtering approach, or a post-processing filtering approach.

[0525] In some embodiments, the video unit may include at least one of: a sequence, a picture, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, groups of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a prediction block (PB) , a transform block (TB) , or a region containing more than one sample or pixel.

[0526] In some embodiments, an indication of whether to and / or how to apply the filtering approach to  the prediction sample may be indicated at one of the followings: sequence level, group of pictures level, picture level, slice level, or tile group level. In some other embodiments, an indication of whether to and / or how to apply the filtering approach to the prediction sample may be indicated in one of the followings: a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a dependency parameter set (DPS) , a decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter sets (APS) , a slice header, or a tile group header.

[0527] In some embodiments, an indication of whether to and / or how to apply the filtering approach to the prediction sample may be included in one of the followings: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a sub-picture, or a region containing more than one sample or pixel.

[0528] In some embodiments, the method 1600 may further include: determining, based on coded information of the video unit of the video, whether to and / or how to apply the filtering approach to the prediction sample. The coded information may include at least one of: a block size, a colour format, a single and / or dual tree partitioning, a colour component, a slice type, or a picture type.

[0529] According to further embodiments of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: applying a filtering approach to a prediction sample associated with a video unit of the video; and generating the bitstream based on the filtered prediction sample.

[0530] According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: applying a filtering approach to a prediction sample associated with a video unit of the video; generating the bitstream based on the filtered prediction sample; and storing the bitstream in a non-transitory computer-readable recording medium.

[0531] Implementations of the present disclosure can be described in view of the following clauses, the features of which can be combined in any reasonable manner.

[0532] Clause 1. A method for video processing, comprising: applying, for a conversion between a video unit of a video and a bitstream of the video, a filtering approach to a prediction sample associated with the video unit; and performing the conversion based on the filtered prediction sample.

[0533] Clause 2. The method of clause 1, wherein the filtering approach comprises at least one of: a bilateral filtering (BF) approach or a deblocking filtering approach.

[0534] Clause 3. The method of clause 1, wherein the prediction sample is comprised in one of: the video unit, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a block, a region, a picture, a slice, or a tile.

[0535] Clause 4. The method of clause 1 or 2, wherein at least one of: the prediction sample or a pixel is filtered or modified by the BF approach with coded information and / or with statistical information.

[0536] Clause 5. The method of clause 4, wherein a filtering result of the BF approach is determined by the following formulation:

[0537] wherein Ifiltered represents one of: an updated or modified luma sample, an updated or modified luma pixel, an updated or modified chroma sample, or an updated or modified chroma pixel; IC represents one of the followings that locates at central of a filtering shape: an unmodified luma sample, an unmodified luma pixel, an unmodified chroma sample, or an unmodified chroma pixel; Δ represents a difference between a corresponding reference sample and an unmodified central sample; Ω represents a sum of vertical distance between a reference sample and a central sample and horizontal distance between the reference sample and the central sample; n represents a total number of samples inside the filtering shape; e represents a strength factor; and μ (Δi, Ωi) represents a function for determining a filtering weight of each position in the filtering shape.

[0538] Clause 6. The method of clause 5, wherein the function μ (Δi, Ωi) is comprised in a look-up-table.

[0539] Clause 7. The method of clause 5, wherein the function μ (Δi, Ωi) represents the following formulation:

[0540] wherein σd represents a parameter for filtering, and σr represents another parameter for filtering.

[0541] Clause 8. The method of clause 5, wherein one of: a uniform parameter or a uniform look-up-table is used by different samples or different positions inside intra reference samples.

[0542] Clause 9. The method of clause 5, wherein one of: different parameters or look-up-tables are used by different samples or different positions inside intra reference samples.

[0543] Clause 10. The method of clause 5, wherein a parameter for filtering is a predetermined parameter, or wherein the parameter for filtering is a parameter being searched, or wherein the parameter for filtering is determined in real-time, or wherein the parameter for filtering is signalled in the bitstream.

[0544] Clause 11. The method of clause 7 or 10, wherein the parameter for filtering comprises σd and / or σr.

[0545] Clause 12. The method of clause 11, wherein the parameter is determined based on at least one of: a coding mode of the video unit, a size of the video unit, or other coded information of the video unit.

[0546] Clause 13. The method of clause 11, wherein the parameter is signaled from an encoder to a decoder.

[0547] Clause 14. The method of clause 5, wherein the strength factor is a predetermined parameter, or wherein the strength factor is a parameter being searched, or wherein the strength factor is determined in  real-time, or wherein the strength factor is signalled in the bitstream.

[0548] Clause 15. The method of clause 14, wherein the strength factor is determined based on at least one of: a coding mode of the video unit, a size of the video unit, or other coded information of the video unit.

[0549] Clause 16. The method of clause 15, wherein the strength factor is determined based on a luma size of the video unit.

[0550] Clause 17. The method of clause 16, wherein the strength factor is determined based on max (widthluma, heightluma) or min (widthluma, heightluma) , wherein widthluma represents a luma width of the video unit, and heightluma represents a luma height of the video unit.

[0551] Clause 18. The method of clause 16, wherein the strength factor is determined based on widthlumamultiplying heightluma, wherein widthchluma represents a luma width of the video unit, and heightlumarepresents a luma height of the video unit.

[0552] Clause 19. The method of clause 15, wherein the strength factor is determined based on a chroma size of the video unit.

[0553] Clause 20. The method of clause 19, wherein the strength factor is determined based on max (widthchroma, heightchroma) or min (widthchroma, heightchroma) , wherein widthchroma represents a chroma width of the video unit, and heightchroma represents a chroma height of the video unit.

[0554] Clause 21. The method of clause 19, wherein the strength factor is determined based on widthchroma multiplying heightchroma, wherein widthchroma represents a chroma width of the video unit, and heightchroma represents a chroma height of the video unit.

[0555] Clause 22. The method of clause 14, wherein the strength factor is signaled from an encoder to a decoder.

[0556] Clause 23. The method of any of clauses 4-22, wherein the filtering is processed by operations on integers.

[0557] Clause 24. The method of clause 23, wherein a variable in the filtering process is left-shifted and / or right-shifted before the filtering process to keep a suitable calculation precision, or wherein a variable in the filtering process is left-shifted and / or right-shifted in the filtering process to keep a suitable calculation precision, or wherein a variable in the filtering process is left-shifted and / or right-shifted after the filtering process to keep a suitable calculation precision.

[0558] Clause 25. The method of clause 1, wherein at least one parameter is signaled to determine the filtering approach.

[0559] Clause 26. The method of clause 25, wherein the filtering approach comprises at least one of: a sample adaptive offset (SAO) , a cross-component sample adaptive offset (CCSAO) , an adaptive loop filter (ALF) , or a cross-component adaptive loop filter (CCALF) .

[0560] Clause 27. The method of clause 1, wherein the filtering approach is applied to an intra prediction sample, wherein the intra prediction sample is used to generate an intra reconstruction.

[0561] Clause 28. The method of clause 27, wherein a bilateral filter is applied to a prediction sample of a regular intra mode.

[0562] Clause 29. The method of clause 27, wherein the regular intra mode comprises at least one of the followings: an angular based luma intra mode, a wide-angle based luma intra mode, a regular luma intra mode, an angular based chroma intra mode, a wide-angle based chroma intra mode, or a regular chroma intra mode.

[0563] Clause 30. The method of clause 27, wherein a bilateral filter is applied to a prediction sample of a non-regular intra mode.

[0564] Clause 31. The method of clause 30, wherein the non-regular intra mode comprises at least one of the followings: a luma decoder side intra mode derivation (DIMD) mode, a luma template-based intra mode derivation (TIMD) mode, a luma fusion based mode, a luma template matching based mode, a luma spatial geometric partitioning mode (SGPM) mode, a luma extended multiple reference line (MRL) mode, a luma template-based multiple reference line (TMRL) mode, a luma intra sub-partition (ISP) mode, a luma non-regular mode, a chroma DIMD mode, a chroma TIMD mode, a chroma SGPM mode, a chroma MRL mode, a chroma TMRL mode, a chroma ISP mode, a chroma fusion based mode, a chroma template matching based mode, an intra-convolutional cross-component model (CCCM) mode, or a chroma non-regular mode.

[0565] Clause 32. The method of clause 1, wherein the filtering approach is applied to an intra block copy (IBC) prediction sample before the IBC prediction sample is used to generate IBC reconstruction.

[0566] Clause 33. The method of clause 32, wherein the filtering approach is applied to an IBC prediction sample of a mode, wherein the mode comprises at least one of the followings: a luma related IBC mode, an IBC-merge mode, an IBC-advanced motion vector prediction (AMVP) mode, a chroma related IBC mode, a reconstruction reordered (RR) -IBC mode, an IBC-template matching (TM) mode, an IBC-combination of intra and inter predication (CIIP) mode, an IBC-geometric partitioning mode (GPM) mode, an IBC-local illumination compensation (LIC) mode, a bi-predictive IBC-GPM mode, a bi-predictive IBC mode, a direct block vector (DBV) mode, or an IBC related mode.

[0567] Clause 34. The method of clause 1, wherein the filtering approach is applied to an intra template matching prediction (intra-TMP) sample before the intra-TMP sample is used to generate intra-TMP reconstruction.

[0568] Clause 35. The method of clause 34, wherein the filtering approach is applied to an intra-TMP sample of a mode, wherein the mode comprises at least one of: a luma related intra-TMP mode or a chroma related intra-TMP mode.

[0569] Clause 36. The method of clause 1, wherein the filtering approach is applied to an inter prediction sample, wherein the inter prediction sample is used to generate inter reconstruction.

[0570] Clause 37. The method of clause 36, wherein the filtering approach is applied to an inter prediction sample of a mode, wherein the mode comprises at least one of the followings: a luma related inter mode, a uni-predictive inter mode, a bi-predictive inter mode, an inter merge mode, an inter AMVP mode, a template matching based inter mode, a chroma related inter mode, an AMVP-merge mode, a CIIP mode, a LIC mode, a bi-directional optical flow (BDOF) mode, an affine mode, a decoder side motion vector refinement (DMVR) mode, a multi-hypothesis prediction (MHP) mode, a overlapped block motion compensation (OBMC) mode, a GPM mode, an inter-CCCM mode, a bi-prediction with CU-level weight (BCW) mode, an inter related mode.

[0571] Clause 38. The method of clause 1, wherein the filtering approach is applied to a color component of a prediction sample.

[0572] Clause 39. The method of clause 38, wherein a same filtering approach is applied to different color components of prediction samples.

[0573] Clause 40. The method of clause 38, wherein different filtering approaches are applied to different color components of prediction samples.

[0574] Clause 41. The method of any of clauses 38-40, wherein the filtering approach is applied to at least one of the following modes: a luma related intra mode, a chroma related intra mode, a cross-component related intra mode, a luma and chroma related intra mode, a fusion based intra mode, or a RGB related intra mode.

[0575] Clause 42. The method of clause 1, wherein the filtering approach is applied to a coding area of prediction.

[0576] Clause 43. The method of clause 42, wherein the coding area of prediction comprises at least one of the following: a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a picture, a coding unit, an area, or a block.

[0577] Clause 44. The method of clause 1, wherein if a condition is satisfied, the filtering approach is applied to a prediction sample.

[0578] Clause 45. The method of clause 44, wherein the condition comprises a block size.

[0579] Clause 46. The method of clause 45, wherein if at least one of: a width of a current block, or a height of a current block is less than a threshold, the condition is satisfied.

[0580] Clause 47. The method of clause 45, wherein if a sample number of a current block is less than a threshold, the condition is satisfied.

[0581] Clause 48. The method of clause 45, wherein if at least one of: a width of a current block, or a height of a current block is greater than a threshold, the condition is satisfied.

[0582] Clause 49. The method of clause 45, wherein if a sample number of a current block is greater than a threshold, the condition is satisfied.

[0583] Clause 50. The method of clause 44, wherein the condition comprises a prediction sample number of a current block.

[0584] Clause 51. The method of clause 50, wherein if the prediction sample number of the current block is less than a threshold, the condition is satisfied.

[0585] Clause 52. The method of clause 50, wherein if the prediction sample number of the current block is greater than a threshold, the condition is satisfied.

[0586] Clause 53. The method of clause 44, wherein the condition comprises texture strength related information.

[0587] Clause 54. The method of clause 53, wherein if a variance of prediction samples is less than a threshold, the condition is satisfied.

[0588] Clause 55. The method of clause 53, wherein if a gradient of prediction samples is less than a threshold, the condition is satisfied.

[0589] Clause 56. The method of clause 53, wherein if a variance of prediction samples is greater than a threshold, the condition is satisfied.

[0590] Clause 57. The method of clause 53, wherein if a gradient of prediction samples is greater than a threshold, the condition is satisfied.

[0591] Clause 58. The method of clause 53, wherein if a valid band number of prediction samples is greater than a threshold, the condition is satisfied.

[0592] Clause 59. The method of clause 53, wherein if a valid band number of prediction samples is less than a threshold, the condition is satisfied.

[0593] Clause 60. The method of clause 53, wherein if texture related information of prediction samples is greater than a threshold, the condition is satisfied.

[0594] Clause 61. The method of clause 53, wherein if texture related information of prediction samples is less than a threshold, the condition is satisfied.

[0595] Clause 62. The method of clause 44, wherein the condition comprises at least one of: a picture size, a slice size, or a tile size.

[0596] Clause 63. The method of clause 62, wherein if a width and / or a height of at least one of: a current picture, a current slice, or a current tile is greater than a threshold, the condition is satisfied.

[0597] Clause 64. The method of clause 62, wherein if a width and / or a height of at least one of: a current picture, a current slice, or a current tile is less than a threshold, the condition is satisfied.

[0598] Clause 65. The method of clause 62, wherein if a total sample number of at least one of: a current picture, a current slice, or a current tile is greater than a threshold, the condition is satisfied.

[0599] Clause 66. The method of clause 62, wherein if a total sample number of at least one of: a current  picture, a current slice, or a current tile is less than a threshold, the condition is satisfied.

[0600] Clause 67. The method of clause 44, wherein the condition comprises template information.

[0601] Clause 68. The method of clause 67, wherein if a template cost of a current block is greater than a threshold, the condition is satisfied.

[0602] Clause 69. The method of clause 67, wherein if a template cost of a current block is less than a threshold, the condition is satisfied.

[0603] Clause 70. The method of clause 44, wherein the condition comprises coding mode information of a neighbor block.

[0604] Clause 71. The method of clause 70, wherein if a coding mode of the neighbor block is an intra related mode, the condition is satisfied.

[0605] Clause 72. The method of clause 70, wherein if a coding mode of the neighbor block comprises at least one of: an inter related mode, an IBC related mode, or an intra-TMP related mode, the condition is satisfied.

[0606] Clause 73. The method of any of clauses 44-72, wherein the condition is used jointly.

[0607] Clause 74. The method of any of clauses 44-72, wherein the condition is used independently.

[0608] Clause 75. The method of clause 1, wherein a padding approach is applied to the prediction sample before applying the filtering approach to the prediction sample.

[0609] Clause 76. The method of clause 75, wherein the padding approach comprises at least one of: a mirrored padding approach, or a duplicated padding approach.

[0610] Clause 77. The method of clause 75, wherein a reconstructed sample from a neighbor block is used for filtering boundary prediction samples of a current block.

[0611] Clause 78. The method of clause 75, wherein at least one of: a reconstructed sample from a neighbor block or a prediction sample from a current block is used for the padding approach.

[0612] Clause 79. The method of clause 1, wherein a first syntax element (SE) is signaled to indicate whether the filtering approach is applied or not.

[0613] Clause 80. The method of clause 79, wherein the first SE comprises a flag.

[0614] Clause 81. The method of clause 79, wherein the first SE is bypass coded.

[0615] Clause 82. The method of clause 79, wherein the first SE is coded if a current block is coded with a mode.

[0616] Clause 83. The method of clause 82, wherein the mode comprises an angular based intra mode.

[0617] Clause 84. The method of clause 79, wherein the first SE is coded with at least one context model.

[0618] Clause 85. The method of any of clauses 1-84, wherein the filtering approach is applied in post- processing and / or pre-processing.

[0619] Clause 86. The method of any of clauses 1-85, wherein the filtering approach is applied jointly.

[0620] Clause 87. The method of any of clauses 1-85, wherein the filtering approach is applied individually.

[0621] Clause 88. The method of any of clauses 1-87, wherein a model parameter inheritance approach is applied to at least one of the followings in video coding: an in-loop filtering tool, a prediction tool, a pre-processing filtering approach, or a post-processing filtering approach.

[0622] Clause 89. The method of any of clauses 1-88, wherein the video unit comprises at least one of: a sequence, a picture, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, groups of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a prediction block (PB) , a transform block (TB) , or a region containing more than one sample or pixel.

[0623] Clause 90. The method of any of clauses 1-89, wherein an indication of whether to and / or how to apply the filtering approach to the prediction sample is indicated at one of the followings: sequence level, group of pictures level, picture level, slice level, or tile group level.

[0624] Clause 91. The method of any of clauses 1-89, wherein an indication of whether to and / or how to apply the filtering approach to the prediction sample is indicated in one of the followings: a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a dependency parameter set (DPS) , a decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter sets (APS) , a slice header, or a tile group header.

[0625] Clause 92. The method of any of clauses 1-89, wherein an indication of whether to and / or how to apply the filtering approach to the prediction sample is included in one of the followings: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a sub-picture, or a region containing more than one sample or pixel.

[0626] Clause 93. The method of any of clauses 1-89, further comprising: determining, based on coded information of the video unit of the video, whether to and / or how to apply the filtering approach to the prediction sample, the coded information including at least one of: a block size, a colour format, a single and / or dual tree partitioning, a colour component, a slice type, or a picture type.

[0627] Clause 94. The method of any of clauses 1-93, wherein the conversion includes encoding the video unit into the bitstream.

[0628] Clause 95. The method of any of clauses 1-93, wherein the conversion includes decoding the video unit from the bitstream.

[0629] Clause 96. An apparatus for video processing comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor  to perform a method in accordance with any of clauses 1-95.

[0630] Clause 97. A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of clauses 1-95.

[0631] Clause 98. A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises: applying a filtering approach to a prediction sample associated with a video unit of the video; and generating the bitstream based on the filtered prediction sample.

[0632] Clause 99. A method for storing a bitstream of a video, comprising: applying a filtering approach to a prediction sample associated with a video unit of the video; generating the bitstream based on the filtered prediction sample; and storing the bitstream in a non-transitory computer-readable recording medium.

[0633] Example Device

[0634] Fig. 17 illustrates a block diagram of a computing device 1700 in which various embodiments of the present disclosure can be implemented. The computing device 1700 may be implemented as or included in the source device 110 (or the video encoder 114 or 200) or the destination device 120 (or the video decoder 124 or 300) .

[0635] It would be appreciated that the computing device 1700 shown in Fig. 17 is merely for purpose of illustration, without suggesting any limitation to the functions and scopes of the embodiments of the present disclosure in any manner.

[0636] As shown in Fig. 17, the computing device 1700 includes a general-purpose computing device 1700. The computing device 1700 may at least comprise one or more processors or processing units 1710, a memory 1720, a storage unit 1730, one or more communication units 1740, one or more input devices 1750, and one or more output devices 1760.

[0637] In some embodiments, the computing device 1700 may be implemented as any user terminal or server terminal having the computing capability. The server terminal may be a server, a large-scale computing device or the like that is provided by a service provider. The user terminal may for example be any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, station, unit, device, multimedia computer, multimedia tablet, Internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, personal communication system (PCS) device, personal navigation device, personal digital assistant (PDA) , audio / video player, digital camera / video camera, positioning device, television receiver, radio broadcast receiver, E-book device, gaming device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof. It would be contemplated that the computing device 1700 can support any type of interface to a user (such as “wearable” circuitry and the like) .

[0638] The processing unit 1710 may be a physical or virtual processor and can implement various  processes based on programs stored in the memory 1720. In a multi-processor system, multiple processing units execute computer executable instructions in parallel so as to improve the parallel processing capability of the computing device 1700. The processing unit 1710 may also be referred to as a central processing unit (CPU) , a microprocessor, a controller or a microcontroller.

[0639] The computing device 1700 typically includes various computer storage medium. Such medium can be any medium accessible by the computing device 1700, including, but not limited to, volatile and non-volatile medium, or detachable and non-detachable medium. The memory 1720 can be a volatile memory (for example, a register, cache, Random Access Memory (RAM) ) , a non-volatile memory (such as a Read-Only Memory (ROM) , Electrically Erasable Programmable Read-Only Memory (EEPROM) , or a flash memory) , or any combination thereof. The storage unit 1730 may be any detachable or non-detachable medium and may include a machine-readable medium such as a memory, flash memory drive, magnetic disk or another other media, which can be used for storing information and / or data and can be accessed in the computing device 1700.

[0640] The computing device 1700 may further include additional detachable / non-detachable, volatile / non-volatile memory medium. Although not shown in Fig. 17, it is possible to provide a magnetic disk drive for reading from and / or writing into a detachable and non-volatile magnetic disk and an optical disk drive for reading from and / or writing into a detachable non-volatile optical disk. In such cases, each drive may be connected to a bus (not shown) via one or more data medium interfaces.

[0641] The communication unit 1740 communicates with a further computing device via the communication medium. In addition, the functions of the components in the computing device 1700 can be implemented by a single computing cluster or multiple computing machines that can communicate via communication connections. Therefore, the computing device 1700 can operate in a networked environment using a logical connection with one or more other servers, networked personal computers (PCs) or further general network nodes.

[0642] The input device 1750 may be one or more of a variety of input devices, such as a mouse, keyboard, tracking ball, voice-input device, and the like. The output device 1760 may be one or more of a variety of output devices, such as a display, loudspeaker, printer, and the like. By means of the communication unit 1740, the computing device 1700 can further communicate with one or more external devices (not shown) such as the storage devices and display device, with one or more devices enabling the user to interact with the computing device 1700, or any devices (such as a network card, a modem and the like) enabling the computing device 1700 to communicate with one or more other computing devices, if required. Such communication can be performed via input / output (I / O) interfaces (not shown) .

[0643] In some embodiments, instead of being integrated in a single device, some or all components of the computing device 1700 may also be arranged in cloud computing architecture. In the cloud computing architecture, the components may be provided remotely and work together to implement the functionalities described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage service, which will not require end users to be aware of the physical locations or configurations of the systems or hardware providing these services. In various  embodiments, the cloud computing provides the services via a wide area network (such as Internet) using suitable protocols. For example, a cloud computing provider provides applications over the wide area network, which can be accessed through a web browser or any other computing components. The software or components of the cloud computing architecture and corresponding data may be stored on a server at a remote position. The computing resources in the cloud computing environment may be merged or distributed at locations in a remote data center. Cloud computing infrastructures may provide the services through a shared data center, though they behave as a single access point for the users. Therefore, the cloud computing architectures may be used to provide the components and functionalities described herein from a service provider at a remote location. Alternatively, they may be provided from a conventional server or installed directly or otherwise on a client device.

[0644] The computing device 1700 may be used to implement video encoding / decoding in embodiments of the present disclosure. The memory 1720 may include one or more video coding modules 1725 having one or more program instructions. These modules are accessible and executable by the processing unit 1710 to perform the functionalities of the various embodiments described herein.

[0645] In the example embodiments of performing video encoding, the input device 1750 may receive video data as an input 1770 to be encoded. The video data may be processed, for example, by the video coding module 1725, to generate an encoded bitstream. The encoded bitstream may be provided via the output device 1760 as an output 1780.

[0646] In the example embodiments of performing video decoding, the input device 1750 may receive an encoded bitstream as the input 1770. The encoded bitstream may be processed, for example, by the video coding module 1725, to generate decoded video data. The decoded video data may be provided via the output device 1760 as the output 1780.

[0647] While this disclosure has been particularly shown and described with references to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application as defined by the appended claims. Such variations are intended to be covered by the scope of this present application. As such, the foregoing description of embodiments of the present application is not intended to be limiting.

Claims

A method for video processing, comprising:applying, for a conversion between a video unit of a video and a bitstream of the video, a filtering approach to a prediction sample associated with the video unit; andperforming the conversion based on the filtered prediction sample.The method of claim 1, wherein the filtering approach comprises at least one of: a bilateral filtering (BF) approach or a deblocking filtering approach.The method of claim 1, wherein the prediction sample is comprised in one of: the video unit, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a block, a region, a picture, a slice, or a tile.The method of claim 1 or 2, wherein at least one of: the prediction sample or a pixel is filtered or modified by the BF approach with coded information and / or with statistical information.The method of claim 4, wherein a filtering result of the BF approach is determined by the following formulation:wherein Ifiltered represents one of: an updated or modified luma sample, an updated or modified luma pixel, an updated or modified chroma sample, or an updated or modified chroma pixel; IC represents one of the followings that locates at central of a filtering shape: an unmodified luma sample, an unmodified luma pixel, an unmodified chroma sample, or an unmodified chroma pixel; Δ represents a difference between a corresponding reference sample and an unmodified central sample; Ω represents a sum of vertical distance between a reference sample and a central sample and horizontal distance between the reference sample and the central sample; n represents a total number of samples inside the filtering shape; e represents a strength factor; and μ (Δi, Ωi) represents a function for determining a filtering weight of each position in the filtering shape.The method of claim 5, wherein the function μ (Δi, Ωi) is comprised in a look-up-table.The method of claim 5, wherein the function μ (Δi, Ωi) represents the following formulation:wherein σd represents a parameter for filtering, and σr represents another parameter for filtering.The method of claim 5, wherein one of: a uniform parameter or a uniform look-up-table is used by different samples or different positions inside intra reference samples.The method of claim 5, wherein one of: different parameters or look-up-tables are used by different samples or different positions inside intra reference samples.The method of claim 5, wherein a parameter for filtering is a predetermined parameter, orwherein the parameter for filtering is a parameter being searched, orwherein the parameter for filtering is determined in real-time, orwherein the parameter for filtering is signalled in the bitstream.The method of claim 7 or 10, wherein the parameter for filtering comprises σd and / or σr.The method of claim 11, wherein the parameter is determined based on at least one of: a coding mode of the video unit, a size of the video unit, or other coded information of the video unit.The method of claim 11, wherein the parameter is signaled from an encoder to a decoder.The method of claim 5, wherein the strength factor is a predetermined parameter, orwherein the strength factor is a parameter being searched, orwherein the strength factor is determined in real-time, orwherein the strength factor is signalled in the bitstream.The method of claim 14, wherein the strength factor is determined based on at least one of: a coding mode of the video unit, a size of the video unit, or other coded information of the video unit.The method of claim 15, wherein the strength factor is determined based on a luma size of the video unit.The method of claim 16, wherein the strength factor is determined based on max (widthluma, heightluma) or min (widthluma, heightluma) , wherein widthluma represents a luma width of the video unit, and heightluma represents a luma height of the video unit.The method of claim 16, wherein the strength factor is determined based on widthluma multiplying heightluma, wherein widthluma represents a luma width of the video unit, and heightluma represents a luma height of the video unit.The method of claim 15, wherein the strength factor is determined based on a chroma size of the video unit.The method of claim 19, wherein the strength factor is determined based on max (widthchroma, heightchroma) or min (widthchroma, heightchroma) , wherein widthchroma represents a chroma width of the video unit, and heightchroma represents a chroma height of the video unit.The method of claim 19, wherein the strength factor is determined based on widthchroma multiplying heightchroma, wherein widthchroma represents a chroma width of the video unit, and heightchroma represents a chroma height of the video unit.The method of claim 14, wherein the strength factor is signaled from an encoder to a decoder.The method of any of claims 4-22, wherein the filtering is processed by operations on integers.The method of claim 23, wherein a variable in the filtering process is left-shifted and / or right-shifted before the filtering process to keep a suitable calculation precision, orwherein a variable in the filtering process is left-shifted and / or right-shifted in the filtering process to keep a suitable calculation precision, orwherein a variable in the filtering process is left-shifted and / or right-shifted after the filtering process to keep a suitable calculation precision.The method of claim 1, wherein at least one parameter is signaled to determine the filtering approach.The method of claim 25, wherein the filtering approach comprises at least one of: a sample adaptive offset (SAO) , a cross-component sample adaptive offset (CCSAO) , an adaptive loop filter (ALF) , or a cross-component adaptive loop filter (CCALF) .The method of claim 1, wherein the filtering approach is applied to an intra prediction sample, wherein the intra prediction sample is used to generate an intra reconstruction.The method of claim 27, wherein a bilateral filter is applied to a prediction sample of a regular intra mode.The method of claim 27, wherein the regular intra mode comprises at least one of the followings:an angular based luma intra mode,a wide-angle based luma intra mode,a regular luma intra mode,an angular based chroma intra mode,a wide-angle based chroma intra mode, ora regular chroma intra mode.The method of claim 27, wherein a bilateral filter is applied to a prediction sample of a non-regular intra mode.The method of claim 30, wherein the non-regular intra mode comprises at least one of the followings:a luma decoder side intra mode derivation (DIMD) mode,a luma template-based intra mode derivation (TIMD) mode,a luma fusion based mode,a luma template matching based mode,a luma spatial geometric partitioning mode (SGPM) mode,a luma extended multiple reference line (MRL) mode,a luma template-based multiple reference line (TMRL) mode,a luma intra sub-partition (ISP) mode,a luma non-regular mode,a chroma DIMD mode,a chroma TIMD mode,a chroma SGPM mode,a chroma MRL mode,a chroma TMRL mode,a chroma ISP mode,a chroma fusion based mode,a chroma template matching based mode,an intra-convolutional cross-component model (CCCM) mode, ora chroma non-regular mode.The method of claim 1, wherein the filtering approach is applied to an intra block copy (IBC) prediction sample before the IBC prediction sample is used to generate IBC reconstruction.The method of claim 32, wherein the filtering approach is applied to an IBC prediction sample of a mode, wherein the mode comprises at least one of the followings:a luma related IBC mode,an IBC-merge mode,an IBC-advanced motion vector prediction (AMVP) mode,a chroma related IBC mode,a reconstruction reordered (RR) -IBC mode,an IBC-template matching (TM) mode,an IBC-combination of intra and inter predication (CIIP) mode,an IBC-geometric partitioning mode (GPM) mode,an IBC-local illumination compensation (LIC) mode,a bi-predictive IBC-GPM mode,a bi-predictive IBC mode,a direct block vector (DBV) mode, oran IBC related mode.The method of claim 1, wherein the filtering approach is applied to an intra template matching prediction (intra-TMP) sample before the intra-TMP sample is used to generate intra-TMP reconstruction.The method of claim 34, wherein the filtering approach is applied to an intra-TMP sample of a mode, wherein the mode comprises at least one of: a luma related intra-TMP mode or a chroma related intra-TMP mode.The method of claim 1, wherein the filtering approach is applied to an inter prediction sample, wherein the inter prediction sample is used to generate inter reconstruction.The method of claim 36, wherein the filtering approach is applied to an inter prediction sample of a mode, wherein the mode comprises at least one of the followings:a luma related inter mode,a uni-predictive inter mode,a bi-predictive inter mode,an inter merge mode,an inter AMVP mode,a template matching based inter mode,a chroma related inter mode,an AMVP-merge mode,a CIIP mode,a LIC mode,a bi-directional optical flow (BDOF) mode,an affine mode,a decoder side motion vector refinement (DMVR) mode,a multi-hypothesis prediction (MHP) mode,a overlapped block motion compensation (OBMC) mode,a GPM mode,an inter-CCCM mode,a bi-prediction with CU-level weight (BCW) mode,an inter related mode.The method of claim 1, wherein the filtering approach is applied to a color component of a prediction sample.The method of claim 38, wherein a same filtering approach is applied to different color components of prediction samples.The method of claim 38, wherein different filtering approaches are applied to different color components of prediction samples.The method of any of claims 38-40, wherein the filtering approach is applied to at least one of the following modes:a luma related intra mode,a chroma related intra mode,a cross-component related intra mode,a luma and chroma related intra mode,a fusion based intra mode, ora RGB related intra mode.The method of claim 1, wherein the filtering approach is applied to a coding area of prediction.The method of claim 42, wherein the coding area of prediction comprises at least one of the following:a coding unit (CU) ,a prediction unit (PU) ,a transform unit (TU) ,a coding tree unit (CTU) ,a CTU row,a slice,a tile,a picture,a coding unit,an area, ora block.The method of claim 1, wherein if a condition is satisfied, the filtering approach is applied to a prediction sample.The method of claim 44, wherein the condition comprises a block size.The method of claim 45, wherein if at least one of: a width of a current block, or a height of a current block is less than a threshold, the condition is satisfied.The method of claim 45, wherein if a sample number of a current block is less than a threshold, the condition is satisfied.The method of claim 45, wherein if at least one of: a width of a current block, or a height of a current block is greater than a threshold, the condition is satisfied.The method of claim 45, wherein if a sample number of a current block is greater than a threshold, the condition is satisfied.The method of claim 44, wherein the condition comprises a prediction sample number of a current block.The method of claim 50, wherein if the prediction sample number of the current block is less than a threshold, the condition is satisfied.The method of claim 50, wherein if the prediction sample number of the current block is greater than a threshold, the condition is satisfied.The method of claim 44, wherein the condition comprises texture strength related information.The method of claim 53, wherein if a variance of prediction samples is less than a threshold, the condition is satisfied.The method of claim 53, wherein if a gradient of prediction samples is less than a threshold, the condition is satisfied.The method of claim 53, wherein if a variance of prediction samples is greater than a threshold, the condition is satisfied.The method of claim 53, wherein if a gradient of prediction samples is greater than a threshold, the condition is satisfied.The method of claim 53, wherein if a valid band number of prediction samples is greater than a threshold, the condition is satisfied.The method of claim 53, wherein if a valid band number of prediction samples is less than a threshold, the condition is satisfied.The method of claim 53, wherein if texture related information of prediction samples is greater than a threshold, the condition is satisfied.The method of claim 53, wherein if texture related information of prediction samples is less than a threshold, the condition is satisfied.The method of claim 44, wherein the condition comprises at least one of: a picture size, a slice size, or a tile size.The method of claim 62, wherein if a width and / or a height of at least one of: a current picture, a current slice, or a current tile is greater than a threshold, the condition is satisfied.The method of claim 62, wherein if a width and / or a height of at least one of: a current picture, a current slice, or a current tile is less than a threshold, the condition is satisfied.The method of claim 62, wherein if a total sample number of at least one of: a current picture, a current slice, or a current tile is greater than a threshold, the condition is satisfied.The method of claim 62, wherein if a total sample number of at least one of: a current picture, a current slice, or a current tile is less than a threshold, the condition is satisfied.The method of claim 44, wherein the condition comprises template information.The method of claim 67, wherein if a template cost of a current block is greater than a threshold, the condition is satisfied.The method of claim 67, wherein if a template cost of a current block is less than a threshold, the condition is satisfied.The method of claim 44, wherein the condition comprises coding mode information of a neighbor block.The method of claim 70, wherein if a coding mode of the neighbor block is an intra related mode, the condition is satisfied.The method of claim 70, wherein if a coding mode of the neighbor block comprises at least one of: an inter related mode, an IBC related mode, or an intra-TMP related mode, the condition is satisfied.The method of any of claims 44-72, wherein the condition is used jointly.The method of any of claims 44-72, wherein the condition is used independently.The method of claim 1, wherein a padding approach is applied to the prediction sample before applying the filtering approach to the prediction sample.The method of claim 75, wherein the padding approach comprises at least one of: a mirrored padding approach, or a duplicated padding approach.The method of claim 75, wherein a reconstructed sample from a neighbor block is used for filtering boundary prediction samples of a current block.The method of claim 75, wherein at least one of: a reconstructed sample from a neighbor block or a prediction sample from a current block is used for the padding approach.The method of claim 1, wherein a first syntax element (SE) is signaled to indicate whether the filtering approach is applied or not.The method of claim 79, wherein the first SE comprises a flag.The method of claim 79, wherein the first SE is bypass coded.The method of claim 79, wherein the first SE is coded if a current block is coded with a mode.The method of claim 82, wherein the mode comprises an angular based intra mode.The method of claim 79, wherein the first SE is coded with at least one context model.The method of any of claims 1-84, wherein the filtering approach is applied in post-processing and / or pre-processing.The method of any of claims 1-85, wherein the filtering approach is applied jointly.The method of any of claims 1-85, wherein the filtering approach is applied individually.The method of any of claims 1-87, wherein a model parameter inheritance approach is applied to at least one of the followings in video coding:an in-loop filtering tool,a prediction tool,a pre-processing filtering approach, ora post-processing filtering approach.The method of any of claims 1-88, wherein the video unit comprises at least one of:a sequence,a picture,a sub-picture,a slice,a tile,a coding tree unit (CTU) ,a CTU row,groups of CTU,a coding unit (CU) ,a prediction unit (PU) ,a transform unit (TU) ,a coding tree block (CTB) ,a coding block (CB) ,a prediction block (PB) ,a transform block (TB) , ora region containing more than one sample or pixel.The method of any of claims 1-89, wherein an indication of whether to and / or how to apply the filtering approach to the prediction sample is indicated at one of the followings:sequence level,group of pictures level,picture level,slice level, ortile group level.The method of any of claims 1-89, wherein an indication of whether to and / or how to apply the filtering approach to the prediction sample is indicated in one of the followings:a sequence header,a picture header,a sequence parameter set (SPS) ,a video parameter set (VPS) ,a dependency parameter set (DPS) ,a decoding capability information (DCI) ,a picture parameter set (PPS) ,an adaptation parameter sets (APS) ,a slice header, ora tile group header.The method of any of claims 1-89, wherein an indication of whether to and / or how to apply the filtering approach to the prediction sample is included in one of the followings:a prediction block (PB) ,a transform block (TB) ,a coding block (CB) ,a prediction unit (PU) ,a transform unit (TU) ,a coding unit (CU) ,a virtual pipeline data unit (VPDU) ,a coding tree unit (CTU) ,a CTU row,a slice,a tile,a sub-picture, ora region containing more than one sample or pixel.The method of any of claims 1-89, further comprising:determining, based on coded information of the video unit of the video, whether to and / or how to apply the filtering approach to the prediction sample, the coded information including at least one of:a block size,a colour format,a single and / or dual tree partitioning,a colour component,a slice type, ora picture type.The method of any of claims 1-93, wherein the conversion includes encoding the video unit into the bitstream.The method of any of claims 1-93, wherein the conversion includes decoding the video unit from the bitstream.An apparatus for video processing comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform a method in accordance with any of claims 1-95.A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of claims 1-95.A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises:applying a filtering approach to a prediction sample associated with a video unit of the video; andgenerating the bitstream based on the filtered prediction sample.A method for storing a bitstream of a video, comprising:applying a filtering approach to a prediction sample associated with a video unit of the video;generating the bitstream based on the filtered prediction sample; andstoring the bitstream in a non-transitory computer-readable recording medium.