Method and device for video processing and medium

By using regression model and offset removal operation encoding and decoding tools in video encoding and decoding, the problem of insufficient encoding and decoding efficiency and effectiveness in the prior art is solved, and a more efficient video processing effect is achieved.

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

Patent Information

Application Number
CN202480007655.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-01-13
Filing Date
2024-01-11
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing video encoding and decoding technology has room for improvement in encoding and decoding efficiency and effectiveness, especially in video compression technology, which requires more efficient encoding and decoding tools and methods.

Method used

Using a codec tool based on regression model and offset removal operations, the codec tool is determined by converting the current video block and the bit stream, and corresponding conversion operations are performed, including division operations and coefficient determination operations, to improve the codec efficiency and effectiveness.

Benefits of technology

Improve the efficiency and effectiveness of video encoding and codec, and improve the quality and performance of video processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120513632A_ABST
    Figure CN120513632A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a solution for video processing. A method for video processing is presented. In the method, for a conversion between a current video block of a video and a bitstream of the video, a codec tool for the current video block is determined based on a regression model. The conversion is performed based on the codec tool. The regression model is associated with at least one of: a division-free operation, or a coefficient determination operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate generally to video processing techniques, and more particularly, to regression models and offset removal for video encoding and decoding. Background Art

[0002] Digital video capabilities are now being used in all aspects of our lives. Various video compression technologies have been proposed for video encoding and decoding, such as MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Codec (AVC), ITU-T H.265 High Efficiency Video Codec (HEVC), and Versatile Video Codec (VVC). However, further improvements in the encoding and decoding efficiency of video encoding and decoding technologies are often desired. Summary of the Invention

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

[0004] In a first aspect, a method for video processing is provided. The method includes: determining a codec tool for a current video block of a video based on a regression model for conversion between the current video block and the video bitstream; and performing the conversion based on the codec tool, wherein the regression model is associated with at least one of the following: no division operation or coefficient determination operation. The method according to the first aspect of the present disclosure determines the codec tool based on the regression model and uses the codec tool for the conversion. This improves codec efficiency and effectiveness.

[0005] In a second aspect, another method for video processing is provided. The method includes: determining a codec for a current video block based on an offset removal operation for conversion between the current video block and the video bitstream; and performing the conversion based on the codec. The method according to the second aspect of the present disclosure determines the codec based on the offset removal operation and uses the codec for the conversion. This improves codec efficiency and effectiveness.

[0006] In a third aspect, a video processing apparatus is provided, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method according to the first aspect or the second aspect of the present disclosure.

[0007] In a fourth aspect, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores instructions for causing a processor to execute the method according to the first aspect or the second aspect of the present disclosure.

[0008] In a fifth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining a codec tool for a current video block of the video based on a regression model; and generating a bitstream based on the codec tool, wherein the regression model is associated with at least one of the following: no division operation or coefficient determination operation.

[0009] In a sixth aspect, a method for storing a bitstream of a video is provided. The method includes: determining a codec tool for a current video block of the video based on a regression model; generating a bitstream based on the codec tool; and storing the bitstream in a non-transitory computer-readable recording medium, wherein the regression model is associated with at least one of: no division operation or no coefficient determination operation.

[0010] In a seventh aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining a codec for a current video block of the video based on an offset removal operation; and generating a bitstream based on the codec.

[0011] In an eighth aspect, a method for storing a bitstream of a video is provided, comprising: determining a codec tool for a current video block of the video based on an offset removal operation; generating a bitstream based on the codec tool; and storing the bitstream in a non-transitory computer-readable recording medium.

[0012] This summary is intended 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

[0013] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become more apparent through the following detailed description with reference to the accompanying drawings.In the exemplary embodiments of the present disclosure, the same reference numerals generally refer to the same components.

[0014] Figure 1 A block diagram illustrating an example video encoding and decoding system is shown according to some embodiments of the present disclosure;

[0015] Figure 2 shows a block diagram illustrating a first example video encoder according to some embodiments of the present disclosure;

[0016] Figure 3 shows a block diagram illustrating an example video decoder according to some embodiments of the present disclosure;

[0017] Figure 4A and Figure 4B shows the effect of the slope adjustment parameter "u", where Figure 4A corresponds to a model created using the current CCLM, and Figure 4B corresponds to the updated model as proposed;

[0018] Figure 5 shows the neighboring blocks (L, A, BL, AR, AL) used in the derivation of the general MPM list;

[0019] Figure 6 shows adjacent reconstructed samples used for DIMD chroma mode;

[0020] Figure 7 The intra-frame template matching search area used is shown;

[0021] Figure 8A and Figure 8B The division methods for angle modes are shown respectively;

[0022] Figure 9 The expanded MRL candidate list is shown;

[0023] Figure 10 The spatial portion of the convolution filter is shown;

[0024] Figure 11 shows the reference region (and its filling) used to derive the filter coefficients;

[0025] Figure 12 Four Sobel-based gradient modes for GLM are shown;

[0026] Figure 13 The template area is shown;

[0027] Figure 14 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown;

[0028] Figure 15 A flowchart showing a method for video processing according to an embodiment of the present disclosure is shown; and

[0029] Figure 16 A block diagram is shown of a computing device in which various embodiments of the present disclosure may be implemented.

[0030] Throughout the drawings, the same or similar reference numbers generally refer to the same or similar elements. DETAILED DESCRIPTION

[0031] The principles of the present disclosure will now be described with reference to some embodiments. It should be understood that these embodiments are described only for the purpose of illustrating and helping those skilled in the art to understand and implement the present disclosure, and do not imply any limitation on the scope of the present disclosure. In addition to the methods described below, the disclosure described herein can also be implemented in various ways.

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

[0033] References in this disclosure to "one embodiment," "an embodiment," "an example embodiment," and the like indicate that the described embodiment may include a particular feature, structure, or characteristic, but not every embodiment is required to include the particular feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an example embodiment, whether or not explicitly described, it is considered within the knowledge of those skilled in the art to affect such feature, structure, or characteristic in relation to other embodiments.

[0034] It should be understood that although the terms "first" and "second" and the like can be used to describe various elements, these elements should not be limited to these terms. These terms are only used to distinguish one element from another. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element without departing from the scope of the example embodiments. As used herein, the term "and / or" includes any and all combinations of one or more of the listed terms.

[0035] The terms used herein are for the purpose of describing particular embodiments only and are not intended to limit the 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 should also be understood that the terms "comprises," "includes," and / or "having," when used herein, indicate the presence of the described features, elements, and / or components, but do not preclude the presence or addition of one or more other features, elements, components, and / or combinations thereof. Sample Environment

[0036] Figure 1is a block diagram illustrating an example video codec system 100 that can utilize the techniques of the present disclosure. As shown, the video codec system 100 may include a source device 110 and a destination device 120. The source device 110 may also be referred to as a video encoding device, and the destination device 120 may also be referred to as a video decoding device. In operation, the source device 110 may be configured to generate encoded video data, and the destination device 120 may 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.

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

[0038] The video data may include 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 pictures are coded representations of the pictures. 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 coded video data may be transmitted directly to the destination device 120 via the network 130A via the I / O interface 116. The coded video data may also be stored on a storage medium / server 130B for access by the destination device 120.

[0039] 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 obtain encoded video data from source device 110 or 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, the destination device 120 being configured to interface with an external display device.

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

[0041] Figure 2is a block diagram illustrating an example of a video encoder 200 according to some embodiments of the present disclosure, which may be Figure 1 An example of the video encoder 114 in the system 100 is shown.

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

[0043] In some embodiments, the video encoder 200 may include a segmentation unit 201, a prediction unit 202, a residual generation unit 207, a transformation unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transformation unit 211, a reconstruction unit 212, a cache 213 and an entropy coding unit 214, and the prediction unit 202 may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-frame prediction unit 206.

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

[0045] Furthermore, although some components (such as the motion estimation unit 204 and the motion compensation unit 205) may be integrated, for the purpose of explanation, these components are described in detail in the following sections. Figure 2 are shown separately in the example.

[0046] The partitioning 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.

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

[0048] To perform inter-frame prediction on the current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing the current video block with one or more reference frames from the cache 213. 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 cache 213 other than the picture associated with the current video block.

[0049] The motion estimation unit 204 and the motion compensation unit 205 may perform different operations on the 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 consisting of macroblocks, all of which are based on macroblocks within the same picture. Furthermore, as used herein, in some aspects, "P slices" and "B slices" may refer to portions of a picture consisting of macroblocks that are independent of macroblocks in the same picture.

[0050] In some examples, motion estimation unit 204 may perform unidirectional prediction on the current video block, and motion estimation unit 204 may search the reference pictures in list 0 or list 1 to find a reference video block for the current video block. Motion estimation unit 204 may then generate a reference index indicating the reference picture in list 0 or list 1 that contains the reference video block and a motion vector indicating the spatial displacement between the current video block and the reference video block. Motion estimation unit 204 may output the reference index, prediction direction indicator, and motion vector as motion information for the current video block. Motion compensation unit 205 may generate a predicted video block for the current video block based on the reference video block indicated by the motion information for the current video block.

[0051] Alternatively, in other examples, the motion estimation unit 204 may perform bidirectional prediction on 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 indicating multiple reference pictures in list 0 and list 1 containing multiple reference video blocks, and motion vectors indicating multiple spatial displacements between the multiple reference video blocks and the current video block. The motion estimation unit 204 may output the multiple reference indexes and multiple motion vectors for the current video block as motion information for the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the multiple reference video blocks indicated by the motion information of the current video block.

[0052] In some examples, motion estimation unit 204 may output a complete set of motion information for use in the decoding process of a decoder. Alternatively, in some embodiments, 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, motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of an adjacent video block.

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

[0054] In another example, the motion estimation unit 204 may identify another video block and a motion vector difference (MVD) in a syntax structure associated with the current video block. The motion vector difference indicates the 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.

[0055] As discussed above, the video encoder 200 may signal motion vectors in a predictive manner.Two examples of prediction signaling techniques that may be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and Merge mode signaling.

[0056] The intra-frame prediction unit 206 can perform intra-frame prediction on the current video block. When the intra-frame prediction unit 206 performs intra-frame prediction on the current video block, the intra-frame prediction unit 206 can 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 can include a predicted video block and various syntax elements.

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

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

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

[0060] After transform processing unit 208 generates a transform coefficient video block associated with the current video block, 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.

[0061] The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transform, respectively, to the transform coefficient video block 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 prediction video blocks generated by the prediction unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.

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

[0063] The entropy coding unit 214 may receive data from other functional components of the video encoder 200. When the entropy coding unit 214 receives data, the entropy coding unit 214 may perform one or more entropy coding operations to generate entropy-coded data and output a bitstream including the entropy-coded data.

[0064] Figure 3 is a block diagram illustrating an example of a video decoder 300 according to some embodiments of the present disclosure. The video decoder 300 may be Figure 1 An example of the video decoder 124 in the system 100 is shown.

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

[0066] exist Figure 3 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 transform unit 305, a reconstruction unit 306, and a buffer 307. In some examples, the video decoder 300 can perform a decoding process that is generally opposite to the encoding process described with respect to the video encoder 200.

[0067] The entropy decoding unit 301 can retrieve an encoded bitstream. The encoded bitstream may include entropy-encoded video data (e.g., encoded blocks of video data). The entropy decoding unit 301 can decode the entropy-encoded video data, and the motion compensation unit 302 can determine motion information from the entropy-decoded video data, which includes motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 can determine such information, for example, by performing AMVP and Merge mode. AMVP is used, which includes deriving several most likely candidates based on data from adjacent PBs and reference pictures. The motion information typically includes horizontal and vertical motion vector displacement values, one or two reference picture indexes, 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, "Merge mode" may refer to deriving motion information from adjacent blocks in the spatial or temporal domain.

[0068] The motion compensation unit 302 may generate a motion compensated block, possibly performing interpolation based on an interpolation filter. An identifier for the used interpolation filter with sub-pixel precision may be included in the syntax element.

[0069] Motion compensation unit 302 may calculate interpolated values for sub-integer pixels of a reference block using interpolation filters used by video encoder 200 during encoding of the video block. Motion compensation unit 302 may determine the interpolation filters used by video encoder 200 based on received syntax information, and motion compensation unit 302 may use the interpolation filters to generate a prediction block.

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

[0071] The intra prediction unit 303 can form a prediction block from spatially adjacent blocks using, for example, an intra prediction mode received in the bitstream. The inverse quantization unit 304 inversely quantizes, i.e., dequantizes, the quantized video block coefficients provided in the bitstream and decoded by the entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.

[0072] The reconstruction unit 306 can obtain the decoded block, for example, by adding the residual block to the corresponding prediction block generated by the motion compensation unit 302 or the intra-frame prediction unit 303. If necessary, a deblocking filter can also be used to filter the decoded block to remove blocking artifacts. The decoded video block is then stored in the buffer 307, which provides reference blocks for subsequent motion compensation / intra-frame prediction and also produces the decoded video for presentation on a display device.

[0073] Some exemplary embodiments of the present disclosure are described in detail below. It should be understood that the section titles used in this document are for ease of understanding and do not limit the embodiments disclosed in the section to only that section. In addition, although certain embodiments are described with reference to a multifunctional video codec or other specific video codecs, the disclosed technology is also applicable to other video coding and decoding technologies. In addition, although some embodiments describe the video encoding steps in detail, it should be understood that the corresponding decoding steps corresponding to the de-encoding will be implemented by the decoder. In addition, the term "video processing" includes video encoding or compression, video decoding or decompression, and video transcoding, in which video pixels are represented from one compression format to another compression format or at different compression bit rates. 1. Brief Overview This disclosure relates to video coding technology. Specifically, it relates to linear / nonlinear / polynomial regression model prediction and related offset removal algorithms in image / video coding. It can be applied to existing video coding standards such as HEVC and VVC. It is also applicable to future video coding standards or video codecs. 2. Introduction Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed the H.261 and H.263 standards, while ISO / IEC developed MPEG-1 and MPEG-4 Vision. The two organizations jointly developed the H.262 / MPEG-2 Video standard, the H.264 / MPEG-4 Advanced Video Codec (AVC) standard, and the H.265 / HEVC standard. Starting with H.262, video codec standards have been based on a hybrid video codec architecture that utilizes temporal prediction plus transform coding. To explore future video codec technologies beyond HEVC, the Joint Video Exploration Team (JVET) was established in 2015 by VCEG and MPEG. JVET meetings are held quarterly, and the new video codec standard was officially named the Versatile Video Codec (VVC) at the April 2018 JVET meeting. The first version of the VVC Test Model (VTM) was also released at that time. The VVC working draft and test model (VTM) have been updated after each meeting. The VVC project achieved technical completion (FDIS) at the July 2020 meeting. 2.1 Intra-frame Prediction In intra prediction, the minimum chroma intra prediction unit (SCIPU) constraint in VVC is removed. In addition, the VPDU constraint used to reduce CCLM prediction delay is also removed. 2.1.1 Multi-Model LM (MMLM) The CCLM included in VVC is extended by adding three multi-model LM (MMLM) modes. In each MMLM mode, the reconstructed neighboring samples are classified into two categories using a threshold that is the average of the reconstructed neighboring samples of luminance. The linear / nonlinear / polynomial regression model for each category is derived using the least mean square (LMS) method. For the CCLM mode, the linear / nonlinear / polynomial regression model is also derived using the LMS method. Slope adjustment is applied to the cross-component linear / nonlinear / polynomial regression model (CCLM) and multi-model LM prediction. The adjustment tilts the linear function that maps luminance values to chrominance values relative to the center point determined by the average luminance value of the reference samples. 2.1.1.1 CCLM Slope Adjustment CCLM uses a 2-parameter model to map luma values to chroma values. The slope parameter "a" and the bias parameter "b" define the mapping as follows: chromaVal=a*lumaVal+b. The adjustment to the slope parameter “u” is signaled to update the model to the following form: chromaVal=a'*lumaVal+b' in a'=a+u, b'=bu*y r . With this choice, the mapping function is centered around the illuminance value y r The average of the reference brightness samples used in model creation is used as y r , in order to provide meaningful modifications to the model. The following figure illustrates this process. Figure 4A and Figure 4B shows the effect of the slope adjustment parameter "u", where Figure 4A corresponds to a model created using the current CCLM, and Figure 4B corresponds to the updated model as proposed. Implementation The slope adjustment parameter is provided as an integer between -4 and 4 (inclusive) and is signaled in the bitstream. The unit of the slope adjustment parameter is 1 / 8 of the chroma sample value per luma sample value. th (For 10-bit content). Adjustments are applied to CCLM models that use reference samples both above and to the left of the block ("LM_CHROMA_IDX" and "MMLM_CHROMA_IDX"), but not to "one-sided" mode. This choice is based on a trade-off between codec efficiency and complexity. When slope adjustment is applied for a multi-mode CCLM model, both models may be adjusted so that a maximum of two slope updates are signaled for a single chroma block. Encoder Method The proposed encoder method performs a SATD-based search for the optimal value of the slope update for Cr and a similar SATD-based search for Cb. If either term results in a non-zero slope adjustment parameter, the combined slope adjustment pair (SATD-based update for Cr, SATD-based update for Cb) is included in the list of RD checks for the TU. 2.1.2 Gradient PDPC In VVC, for some scenes, PDPC may not be applied due to the unavailability of secondary reference samples. In these cases, a gradient-based PDPC extended from the horizontal / vertical mode is applied. The PDPC weights (wT / wL) and nScale parameters used to determine the attenuation of the PDPC weight relative to the distance from the left / top boundary are set equal to the corresponding parameters in the horizontal / vertical mode, respectively. When the secondary reference samples are located at fractional sample positions, bilinear interpolation is applied. 2.1.3 Auxiliary MPM A secondary MPM list is introduced. The existing primary MPM (PMPM) list consists of 6 entries, and the secondary MPM (SMPM) list includes 16 entries. First, a general MPM list with 22 entries is constructed, and then the first 6 entries in the general MPM list are included in the PMPM list, and the remaining entries form the SMPM list. The first entry in the general MPM list is the plane mode. The remaining entries are as follows: Figure 5 The shown consists of intra modes for the left (L), above (A), below left (BL), above right (AR), and above left (AL) neighboring blocks, a directional mode with an offset added from the first two available directional modes of the neighboring blocks, and a default mode. If the CU block is vertically oriented, the order of neighboring blocks is A, L, BL, AR, AL; otherwise, it is L, A, BL, AR, AL. Figure 5 Neighboring blocks (L, A, BL, AR, AL) used in the derivation of the general MPM list are shown. First parse the PMPM flag, if it is equal to 1, parse the PMPM index to determine which entry of the PMPM list is selected, otherwise parse the SPMPM flag to determine whether to parse the SMPM index or the remaining mode. 2.1.4 Reference Sample Interpolation and Smoothing for Intra-frame Prediction The 4-tap cubic interpolation is replaced by a 6-tap cubic interpolation filter for the derivation of predicted samples from the reference samples. For reference sample filtering, a 6-tap Gaussian filter is applied to larger blocks (W>=32 and H>=32), otherwise the existing VVC 4-tap Gaussian interpolation filter is applied. The extended intra reference samples are derived using a 4-tap interpolation filter instead of nearest neighbor rounding. 2.1.5 Decoder-side Intra Mode Derivation (DIMD) When DIMD is applied, two intra modes are derived from the reconstructed neighboring samples and these two predictions are combined with the planar mode prediction, where the weights are derived from the gradients. The division operation in the weight derivation is performed using the same lookup table (LUT) based integerization scheme used by CCLM. For example, the division operation in the direction calculation Orient=G y / G x Calculated via the following LUT-based scheme: x=Floor(Log2(Gx)) normDiff=((Gx<<4)>>x)&15 x+=(3+(normDiff!=0)?1:0) Orient=(Gy*(DivSigTable[normDiff]|8)+(1<<(x-1)))>>x in DivSigTable

[16] ={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}. The derived intra modes are included into the main list of intra most probable modes (MPMs), so the DIMD process is performed before the MPM list is built. The main derived intra modes of a DIMD block are stored with the block and are used for MPM list construction of neighboring blocks. 2.1.5.1 DIMD Chroma Mode The DIMD colorimetric mode uses the DIMD derivation method based on Figure 6 The chroma intra prediction mode of the current block is derived from the adjacent reconstructed Y, Cb, and Cr samples in the second adjacent row and column shown. Specifically, the horizontal gradient and vertical gradient are calculated for each co-located reconstructed luma sample and reconstructed Cb and Cr samples of the current chroma block to construct the HoG. The intra prediction mode with the largest histogram amplitude value is then used to perform chroma intra prediction for the current chroma block. Figure 6 Neighboring reconstructed samples used for DIMD chroma mode are shown. When the intra prediction mode derived from the DIMD chroma mode is the same as the intra prediction mode derived from the DM mode, the intra prediction mode with the second largest histogram magnitude value is used as the DIMD chroma mode. A CU level flag is signaled to indicate whether the proposed DIMD chroma mode is applied. 2.1.6 Fusion of Chroma Intra Prediction Modes The DM mode and the four default modes can be merged with the MMLM_LT mode as follows: pred=(w0*pred0+w1*pred1+(1<<(displacement-1)))>>displacement Where pred0 is the prediction value obtained by applying the non-LM mode, pred1 is the prediction value obtained by applying the MMLM_LT mode, and pred is the final prediction value of the current chroma block. The two weights w0 and w1 are determined by the intra prediction mode of the adjacent chroma blocks, and the displacement is set to be equal to 2. Specifically, when both the upper and left adjacent blocks are encoded and decoded using the LM mode, {w0, w1} = {1, 3}; when both the upper and left adjacent blocks are encoded and decoded using the non-LM mode, {w0, w1} = {3, 1}; otherwise, {w0, w1} = {2, 2}. For syntax design, if non-LM mode is selected, a flag is signaled to indicate whether fusion is applied. This method is only applicable to I slices. 2.1.7 Intra-frame Template Matching Intra Template Matching Prediction (Intra TMP) is a special intra prediction mode that copies the best prediction block from the reconstructed portion of the current frame, whose L-shaped template matches the current template. The encoder searches for the template most similar to the current template in the reconstructed portion of the current frame for a predefined search range and uses the corresponding block as the prediction block. The encoder then signals the use of this mode, and the same prediction operation is performed on the decoder side. The prediction signal is obtained by combining the L-shaped causal neighbors of the current block with Figure 7 generated by matching another block in a predefined search area in the , the predefined search area including: R1: current CTU, R2: Upper left CTU, R3: Upper CTU, R4: left CTU. The sum of absolute differences (SAD) is used as the cost function. In each region, the decoder searches for the template with the smallest SAD relative to the current template and uses its corresponding block as the prediction block. The dimensions of all regions (SearchRange_w, SearchRange_h) are set to be proportional to the block dimensions (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel. That is: SearchRange_w=a*BlkW, SearchRange_h=a*BlkH. Where "a" is a constant that controls the gain / complexity tradeoff. In practice, "a" is equal to 5. Figure 7 The intra template matching search area used is shown. The intra template matching tool is enabled for CUs with width and height dimensions less than or equal to 64. This maximum CU size for intra template matching is configurable. When DIMD is not used for the current CU, the intra template matching prediction mode is signaled at the CU level through a dedicated flag. 2.1.8 Fusion for Template-Based Intra Mode Derivation (TIMD) For each intra prediction mode in the MPM, the SATD between the template's prediction and the reconstructed samples is calculated. The first two intra prediction modes with the smallest SATD are selected as TIMD modes. These two TIMD modes are fused using weights after applying the PDPC process, and such weighted intra prediction is used to encode and decode the current CU. Position-dependent intra prediction combining (PDPC) is included in the derivation of TIMD modes. The costs of the two selected modes are compared with the threshold. In the test, a cost factor of 2 is applied as follows: costMode2<2*costMode1. If this condition is true, then the blend is applied, otherwise only mode1 is used. The weight of a pattern is calculated from its SATD cost as follows: weight1=costMode2 / (costMode1+costMode2), weight2=1-weight1. The division operation is performed using the same lookup table (LUT) based integerization scheme used by CCLM. 2.1.9 Combination of CIIP with TIMD and TM Merge In CIIP mode, prediction samples are generated by weighting the inter prediction signal predicted using CIIP-TM Merge candidates and the intra prediction signal predicted using TIMD-derived intra prediction modes. This method is only applied to codec blocks with an area less than or equal to 1024. The TIMD derivation method is used to derive intra prediction modes in CIIP. Specifically, the intra prediction mode with the smallest SATD value in the TIMD mode list is selected and mapped to one of the 67 conventional intra prediction modes. Figure 8A and Figure 8B The division methods for the angle modes are shown respectively. Furthermore, it is proposed to modify the weights (wIntra, wInter) for both tests if the derived intra prediction mode is an angular mode. For near-horizontal modes (2 <= angular mode index < 34), the current block is split vertically, as Figure 8A As shown; for the near vertical mode (34 <= angle mode index <= 66), the current block is divided horizontally, as Figure 8B shown. (wIntra, wInter) for different sub-blocks are shown in Table 1. Table 1. Modified weights used for angle mode Using CIIP-TM, a CIIP-TM Merge candidate list is constructed for the CIIP-TM mode. Merge candidates are refined by template matching. CIIP-TM Merge candidates are also reordered as regular Merge candidates by the ARMC method. The maximum number of CIIP-TM Merge candidates is equal to 2. 2.1.10 Extended Multiple Reference Line (MRL) List The MRL list in VVC is extended to include more reference lines for intra prediction. The extended reference line list consists of Figure 9 The row indices shown are {1,3,5,7,12}. Figure 9 The extended MRL candidate list is shown.For template-based intra mode derivation (TIMD), only the first two reference row candidates (ie, {1, 3}) are used instead of the complete MRL candidate list. 2.1.11 Convolutional Cross-Component Intra Prediction Model In this method, a convolutional cross-component model (CCCM) is applied to predict chroma samples from reconstructed luma samples, in a similar way to what is done in the current CCLM mode. As with CCLM, when chroma downsampling is used, the reconstructed luma samples are downsampled to match the lower resolution chroma grid. And, similar to CCLM, there is an option to use a single model or a multi-model variant of CCCM. The multi-model variant uses two models, one model is derived for samples above the average luminance reference value, and the other model is for the remaining samples (following the spirit of CCLM design). Multi-model CCCM mode can be selected for PUs with at least 128 available reference samples. 2.1.11.1 Convolutional Filters The convolutional 7-tap filter consists of a 5-tap plus-shaped spatial component, a nonlinear term, and a bias term. The input to the spatial 5-tap component of the filter consists of the center (C) luma sample co-located with the chroma sample to be predicted and its neighbors above / north (N), below / south (S), left / west (W), and right / east (E), as shown below. Figure 10 The spatial portion of the convolution filter is shown. The nonlinear term P is expressed as the square of the center luminance sample C and is scaled to the sample value range of the content: P=(C*C+midVal)>>bitDepth. That is, for 10-bit content, it is calculated as: P=(C*C+512)>>10. The bias term B represents a scalar offset between the input and output (similar to the offset term in CCLM) and is set to the intermediate chrominance value (512 for 10-bit content). The output of the filter is calculated as the filter coefficient c i Convolution with the input value and clipped to the range of valid chroma samples: predChromaVal=c0C+c1N+c2S+c3E+c4W+c5P+c6B. 2.1.11.2 Calculation of filter coefficients Filter coefficient c i is calculated by minimizing the MSE between the predicted chroma samples and the reconstructed chroma samples in the reference region. Figure 11 A reference region consisting of 6 rows of chroma samples above and to the left of the PU is shown. Figure 11 The reference region (and its padding) used to derive the filter coefficients is shown. The reference region extends one PU width to the right of the PU boundary and one PU height below the PU boundary. The region is adjusted to include only available samples. The extension of the region shown in blue is needed to support the "side samples" of the plus-shaped spatial filter and is padded when not in the available region. MSE minimization is performed by calculating the autocorrelation matrix for the luma input and the cross-correlation vector between the luma input and the chroma output. The autocorrelation matrix is LDL decomposed, and the final filter coefficients are calculated using inverse substitution. This process roughly follows the calculation of the ALF filter coefficients in ECM, however, LDL decomposition is chosen instead of Cholesky decomposition to avoid the use of square root operations. 2.1.11.3 Gradient Linear Model Compared to CCLM, GLM uses the gradient of luma samples to derive the linear model instead of the downsampled luma values. Specifically, when GLM is applied, the input of the CCLM process (i.e., the downsampled luma samples L) is replaced by the luma sample gradient G. The other parts of CCLM (e.g., parameter derivation, linear transformation of prediction samples) remain unchanged. C=α·G+β. For signaling, when CCLM mode is enabled for the current CU, two flags are separately transmitted through signals for the Cb component and the Cr component to indicate whether GLM is enabled for each component; if GLM is enabled for a component, a syntax element is further transmitted through signals to select one of the four gradient filters for gradient calculation. Enable four gradient filters for GLM, such as Figure 12 As shown, Figure 12 Four Sobel-based gradient modes for the GLM are shown. 2.1.11.4 Gradient Linear Model with Luminance Values In ECM-6.0, GLM uses the gradient of luma samples to predict chroma samples as follows: pred C (i,j)=α·G(i,j)+β, where pred C (i, j) represents the predicted value of the chrominance sample, G(i, j) represents the gradient of the corresponding reconstructed luminance sample, and the linear model parameters α and β are derived from the adjacent reconstructed samples based on the CCLM linear minimum mean square error (LMMSE) method. In the test, a new GLM mode is evaluated, in which the chrominance samples are based on the gradient G(i,j) of the luma samples and the reconstructed value rec′ of the downsampled luma samples. L (i,j) is predicted using different parameters: pred C (i,j)=α0·G(i,j)+α1·rec′ L (i,j)+α2·midValue, The model parameters α0, α1, and α2 are derived from the six rows and columns of adjacent sample points based on the LDL decomposition method of the CCCM model in ECM-6.0. For signaling, a flag is signaled to indicate whether GLM is enabled for both Cb and Cr components, and a syntax element indicating that the gradient mode is encoded by truncated unary code. The original GLM mode is retained and the new GLM mode is signaled as an additional mode by signaling an extra flag in the bitstream. 2.1.11.5 Bitstream Signaling The use of this mode is signaled via a PU-level flag via the CABAC codec. A new CABAC context is included to support this. When it comes to signaling, CCCM is considered a submode of CCLM. That is, the CCCM flag is only signaled if the intra prediction mode is LM_CHROMA. 2.1.12 Template-based Multi-reference Intra Prediction In template-based multi-reference row intra prediction, instead of directly signaling the reference row and intra mode, an index into a candidate list is encoded to indicate which combination of reference row and prediction mode is used to encode the current block, and the combination selected from the combination list is encoded using a truncated Golomb-Rice codec with a divisor of 4. A list of 20 candidates is constructed by combining the MPM with the reference rows {1, 3, 5, 7, 12}. Compared to regular intra-MPM, the MPM list construction is modified as follows: PLANAR mode is not included in the intra prediction mode candidate list, DC mode is added after 5 adjacent modes and DIMD mode. Incremental angles from ±1 to ±4 are added to the angle modes already included in the list. There are 5x10=50, which are Figure 13 The template regions are sorted in ascending order of SAD cost. Since the extended reference rows start from reference row 1, the region covered by reference row 0 is used for template cost calculation. The 20 combinations with the smallest SAD cost form a candidate list. 2.1.13 Intra-frame prediction fusion In this test, the intra prediction is formed by fusion intra prediction derived from different reference lines as follows: For the angular intra prediction mode including the single mode case of TIMD and DIMD, the proposed method is implemented by transforming the angular intra prediction mode from the angular intra prediction mode represented as p fusion =w0p line +w1p line+1 The intra prediction is derived by weighting the intra prediction obtained from multiple reference rows, where p line is intra prediction from the default reference line, and p line+1 is the prediction from the row above the default reference row. The weights are set to w0=3 / 4 and w1=1 / 4. For TIMD mode with mixing, p line is used in the first mode (w0=1, w1=0), and p line+1 Used in the second mode (w0=0, w1=1). • For DIMD mode with hybrid, the number of prediction values selected for weighted averaging is increased from 3 to 6. When angular intra mode has non-integer slope (requires reference sample interpolation) and the block size is greater than 16, intra prediction fusion is applied to luma blocks, which is used together with MRL, but not applied to ISP-encoded blocks. For intra prediction modes, PDPC is applied using the reference row closest to the current block. 2.1.14 IntraTMP Adaptation for Camera-Captured Content In the test, IntraTMP was enabled for the camera captured content and an acceleration method was applied, where the search area was downsampled by a factor of 2 and the template matching search was reduced by a factor of 4. After the best match was found, a second refinement pass was performed, where another template matching search was performed around the best match, with a reduced search range defined as min(width, height) / 2 of the current block. 2.2 About LIC, AMVP-MERGE, and Adaptive DMVR Mode The following detailed embodiments should be considered as examples to explain the general concept. These embodiments should not be interpreted in a narrow sense. In addition, these embodiments can be combined in any way. The term “video unit” or “codec unit” or “block” may refer to a codec tree block (CTB), a codec tree unit (CTU), a codec block (CB), a CU, a PU, a TU, a PB, a TB. In this disclosure, regarding “blocks encoded and decoded in mode N”, “mode N” here can be a prediction mode (e.g., MODE_INTRA, MODE_INTER, MODE_PLT, MODE_IBC, etc.) or a coding and decoding technology (e.g., AMVP, Merge, SMVD, BDOF, PROF, DMVR, AMVR, TM, Affine, CIIP, GPM, GEO, TPM, MMVD, BCW, HMVP, SbTMVP, etc.). In this disclosure, "bidirectional DMVR" may refer to conventional DMVR that refines both L0 and L1 motion vectors, as described in Section 2.1.14. In addition, "unidirectional DMVR" may refer to a DMVR process that refines only L0 or L1 motion vectors, such as the adaptive DMVR described in Section 2.1.23. In the following discussion, LIC parameters may refer to two parameters (such as a slope parameter "a" and a bias parameter "b") derived based on a linear / nonlinear / polynomial regression model, where the linear model is used to map neighboring samples of a current block to neighboring samples of a temporally co-located block (e.g., the temporally co-located block may be pointed to by a motion vector or a rounded motion vector of the current block). Furthermore, the LIC parameters may be used to estimate prediction values for samples within the current video unit. In the following discussion, the AMVP mode may be a conventional AMVP mode, an affine AMVP mode, and / or an SMVD mode, and / or an AMVP-MERGE mode. It should be noted that the following terms are not limited to the specific terms defined in existing standards, and any variants of codecs are also applicable. 2.2.1 In order to solve the first problem, the following method is proposed: a. Propose support for multiple MVD / MV accuracies for the AMVP-MERGE mode. i. In one example, the supported precision candidates can be the same as the precision candidates used for the conventional AMVP mode, for example, for the non-affine case, half pixel, 1 / 4 pixel, 1 pixel, 4 pixels are applied; for the affine case, 1 / 16 pixel, 1 / 8 pixel, 1 / 4 pixel are applied. ii. In another example, at least one of the supported precision candidates may be different from the precision candidates used for the regular AMVP mode. b. For example, the motion vector difference (eg, MVD) on the AMVP side of the AMVP-MERGE mode may be encoded with other precisions besides 1 / 4 pixel resolution. i. For example, the MVD value can be 4-pixel accurate. ii. For example, the MVD value can be 1 pixel accurate. iii. For example, the MVD value can be half-pixel accurate. iv. For example, the MVD value can be 1 / 8 pixel accurate. v. For example, the MVD value can be 1 / 16 pixel accurate. c. For example, a second interpolation filter (eg, a Y-tap filter, such as Y=6) in addition to the first interpolation filter (eg, an X-tap filter, such as X=8 or 12) may also be used for motion compensation. i. For example, when to use the second interpolation filter for an AMVP-MERGE coded block may depend on MVD prediction and / or final MV accuracy. ii. For example, when the MVD transmitted by the signal is 1 / 2 pixel precision and the final MV is also 1 / 2 pixel precision, the second interpolation filter can be used. Otherwise, the first interpolation filter can be used. iii. In one example, the second interpolation filter used in the AMVP-MERGE mode may be the same as the second interpolation filter used for the regular AMVP mode (eg, a second interpolation filter for 1 / 2 pixel precision). iv. Alternatively, the second interpolation filter used in the AMVP-MERGE mode may be different from the second interpolation filter used for the regular AMVP mode (eg, a second interpolation filter for 1 / 2 pixel precision). d. Alternatively, half-pixel MVD precision may not be allowed for AMVP-MERGE mode. e. For example, at least one syntax element (e.g., a flag and / or parameter index) may be signaled at the block level. To indicate which motion vector precision is used to encode / signal the MVD value and / or MV of a video unit coded in AMVP-MERGE mode. i. In addition, the MVD transmitted by the signal at any resolution can be converted to the internal precision (e.g., 1 / 16 pixel resolution) for subsequent processes such as motion compensation. 2.2.2 To solve the second problem, the following method is proposed: a. In one example, the prediction unit generated based on the AMVP-MERGE mode can be used as the MHP hypothesis. i. For example, the AMVP-MERGE mode prediction block can be used as the basic hypothesis of the MHP block. ii. For example, syntax elements / structures related to MHP hypothesis data (e.g., whether there are additional hypotheses associated with the video unit coded in AMVP-MERGE mode) may be signaled in the bitstream immediately after the video unit is identified as a video unit coded in AMVP-MERGE mode; If so, additional assumptions based on AMVP or MERGE's MHP are used, etc.). iii. For example, the AMVP-MERGE prediction block can be used as an additional hypothesis for the MHP block. iv. For example, additional hypotheses for MHP blocks can be generated based on AMVP-MERGE motion candidates. 1) For example, in this case, syntax elements related to the AMVP-MERGE motion candidate (e.g., which side is AMVP / MERGE encoded, the reference index of the AMVP side, the MVD value for the AMVP side and / or the MVP index of the AMVP side) can be transmitted by signal in the multi-hypothesis data structure. v. For example, the additional assumption of whether LIC is used for AMVP-MERGE encoding or not can be inherited from the usage of LIC of the base assumption. 1) For example, if the base hypothesis is LIC coded, then the additional hypothesis coded by AMVP-MERGE is LIC coded without signaling the use of LIC for such additional hypothesis. 2) Alternatively, if the base hypothesis is not LIC coded, then the additional hypothesis coded by AMVP-MERGE is not LIC coded, without signaling the use of LIC for such additional hypothesis. vi. For example, whether LIC is used for the hypothesis (basic hypothesis and / or additional hypothesis) encoded and decoded via AMVP-MERGE may depend on the use of LIC on the Merge side of the AMVP-MERGE candidate. 1) For example, suppose an AMVP-MERGE candidate consists of a unidirectional merge candidate on one side (L0 or L1) and a unidirectional AMVP candidate on the other side (L1 or L0). a. For example, the use of LIC for such an AMVP-MERGE candidate can be obtained from its Merge Candidates are inherited. b. For example, if the Merge candidate uses LIC, then LIC can be used for AMVP- Prediction block for MERGE codec. vii. Alternatively, the use of the hypothetical LIC for AMVP-MERGE codecs may be signaled in the bitstream. 2.2.3 To solve the third problem, the following method is proposed: a. For example, an AMVP-MERGE candidate may be used in one or more of the following codec modes. i. CIIP mode (and / or its variants, e.g., conventional CIIP, CIIP-PDPC, CIIP-TM, etc.). ii. MMVD mode (and / or its variants, eg, conventional MMVD, affine MMVD, etc.). iii. MHP model (and / or its variants, such as MHP basic assumptions and / or MHP additional assumptions, etc.). iv. GPM mode (and / or its variants, e.g., conventional GPM, GPM-TM, GPM-MMVD, GPM inter-frame-intraframe, etc.). b. For example, AMVP-MERGE candidates may first be refined by a decoder-side motion vector refinement process (eg, TM- or DMVR-based motion vector refinement) and then used for the second encoding mode (eg, as listed in the above sub-item). c. For example, an AMVP-MERGE candidate may be inserted into another candidate list. i. For example, AMVP-MERGE candidates can be inserted into the regular Merge candidate list. 1) For example, an AMVP-MERGE candidate can be used in the regular Merge mode and / or its variants. 2) For example, AMVP-MERGE candidates may be used in MMVD mode and / or its variants. 3) For example, the AMVP-MERGE candidate can be used in CIIP mode and / or its variants. 4) For example, the AMVP-MERGE candidate may be used in the MHP mode and / or its variants. 5) For example, the AMVP-MERGE candidate may be used in GPM mode and / or its variants. ii. For example, AMVP-MERGE candidates can be inserted into the regular TM Merge candidate list. 1) For example, the AMVP-MERGE candidate can be used in the conventional TM Merge mode and / or its variants. iii. Additionally, furthermore, an AMVP-MERGE candidate may be inserted into another prediction list after the original candidate of that prediction list. d. For example, AMVP-MERGE candidates can be reordered based on a decoder-derived method (through TM or DMVR-based cost evaluation), and then M of the AMVP-MERGE candidates will be selected to be added to the second candidate list (such as a regular Merge candidate list, a regular TM Merge candidate list). i. Additionally, more than one AMVP-MERGE candidate may be reordered together. ii. Alternatively, the first candidate from the first AMVP-MERGE prediction list and the second candidate from the second prediction list may be reordered together. e. For example, once an AMVP-MERGE candidate is used for a codec block, additional syntax elements may be signaled that specify the prediction direction (L0 or L1) of the AMVP portion and / or the reference picture index of the selected AMVP candidate and / or the motion vector predictor index of the selected AMVP candidate and / or the motion vector difference associated with the AMVP motion vector predictor. i. Alternatively, the motion vector predictor index on the AMVP side of the AMVP-MERGE candidate may not be transmitted through a signal (eg, the motion vector predictor index may be selected by a decoder-side method through a TM or DMVR-based cost evaluation). f. Alternatively, once an AMVP-MERGE candidate is used, additional syntax element(s) may be signaled that specify the predictor index of the Merge candidate. i. Alternatively, the motion vector predictor index on the Merge side of the AMVP-MERGE candidate may not be transmitted through a signal (eg, the motion vector predictor index may be selected by a decoder-side method through a TM or DMVR-based cost evaluation). g. In one example, the Merge part of the AMVP-MERGE mode may be first refined by a decoder-side motion vector refinement process (such as TM or DMVR) before generating AMVP-MERGE candidates. h. In one example, the AMVP portion of the AMVP-MERGE mode may be first refined by a decoder-side motion vector refinement process (such as TM or DMVR) before generating AMVP-MERGE candidates. 2.2.4 To solve the fourth problem, the following method is proposed: a. For example, the adaptive DMVR motion candidate can be used in one or more of the following codec modes. i. CIIP mode (and / or its variants, e.g., conventional CIIP, CIIP-PDPC, CIIP-TM, etc.). ii. MMVD mode (and / or its variants, eg, conventional MMVD, affine MMVD, etc.). iii. MHP model (and / or its variants, such as MHP basic assumptions and / or MHP additional assumptions, etc.). iv. GPM mode (and / or its variants, e.g., conventional GPM, GPM-TM, GPM-MMVD, GPM inter-frame-intraframe, etc.). v. AMVP mode (and / or its variants, e.g., regular AMVP, SMVD, AMVP-MERGE, affine AMVP, etc.). b. For example, adaptive DMVR motion candidates may first be refined by a decoder-side motion vector refinement process (eg, TM- or DMVR-based motion vector refinement) and then used in the second encoding mode (eg, as listed in the above sub-item). c. For example, when adaptive DMVR motion candidates are used in AMVP mode, i.DMVR motion candidates can refer to motion vector pairs containing both L0 motion vectors and L1 motion vectors, and / or, both the L0 reference picture index and the L1 reference picture index. ii. It can be used as an MVP candidate. iii. The candidate index of the DMVR motion candidate (instead of the L0 and L1 motion vector predictor indices and the L0 and L1 reference picture indices) may be signaled in the bitstream for the AMVP mode. iv. The reference picture index for one prediction direction (L0 or L1) may be signaled for AMVP mode, and the reference picture index for the other prediction direction (L1 or L0) may be inferred (eg, according to DMVR conditions). d. For example, the adaptive DMVR motion candidate can be inserted into another candidate list. i. For example, adaptive DMVR motion candidates can be inserted into the regular Merge candidate list. 1) For example, adaptive DMVR motion candidates can be used in the conventional Merge mode and / or its variants. 2) For example, adaptive DMVR motion candidates can be used in MMVD mode and / or its variants. 3) For example, adaptive DMVR motion candidates can be used in CIIP mode and / or its variants. 4) For example, adaptive DMVR motion candidates can be used in MHP mode and / or its variants. 5) For example, adaptive DMVR motion candidates can be used in GPM mode and / or its variants. ii. For example, the adaptive DMVR motion candidate can be inserted into the regular TM Merge candidate list. 1) For example, adaptive DMVR motion candidates can be used in conventional TM Merge mode and / or its variants. iii. Additionally, furthermore, the adaptive DMVR motion candidate may be inserted into another prediction list after the original candidate of that prediction list. e. For example, the adaptive DMVR motion candidates can be reordered based on a decoder-derived method (through TM- or DMVR-based cost evaluation), and then M of the adaptive DMVR motion candidates will be selected to be added to the second candidate list (such as the regular Merge candidate list, the regular TM Merge candidate list). i. Additionally, more than one adaptive DMVR motion candidate can be reordered together. ii. Alternatively, the first candidate from the first adaptive DMVR Merge list and the second candidate from the second prediction list may be reordered together. 2.2.5 To solve the fifth problem, the following method is proposed: a. For example, the enabling / disabling of a first codec tool may be controlled by a second syntax element signaled at a syntax level higher than the codec block level. i. For example, the syntax level higher than the codec block level can indicate the sequence level / picture group level / picture level / slice level / slice group level, such as in the sequence header / picture header / SPS / VPS / DPS / DCI / In PPS / APS / strip header / slice group header. ii. For example, a single codec may be controlled by the second syntax element. iii. For example, more than one codec may be controlled by the second syntax element. iv. For example, the first codec tool may be a prediction mode using a decoder-side motion inference method (Such as AMVP-MERGE mode, etc.). v. For example, the second syntax element may be a parameter that specifies whether a decoder-side motion derivation method (such as DMVR and TM, etc.) vi. For example, the second syntax element may be a parameter that specifies whether decoder-side motion vector refinement is allowed (such as DMVR, etc.) with SPS / PPS / PH / SH marks. vii. For example, the second syntax element may be a parameter that specifies whether decoder-side template matching (such as TM and / or inter-frame TM, etc.) is allowed. 2.2.6 Regarding LIC parameter derivation (e.g., as shown in the sixth question), assuming that the linear / nonlinear / polynomial regression model used for the LIC-encoded block is based on at least two parameters: a slope parameter "a" and a bias parameter "b", and the relationship between the neighboring samples of the current block and the neighboring samples of the time-domain co-located block can be expressed by "reconTempNeigh=a*reconCurNeigh+b", where "reconTempNeigh" represents the reconstructed / predicted value of the neighboring samples of the time-domain co-located block, and "reconCurNeigh" represents the reconstructed / predicted value of the neighboring samples of the current block, the following method is proposed: a. For example, at least one adjustment factor may be applied to adjust at least one LIC parameter derived for the LIC model. a. For example, the adjustment factor may be signaled / present in the bitstream. b. For example, the adjustment factors can be derived at both the encoder and the decoder. b. For example, at least one syntax element (eg, syntax parameter, index, variable, offset value, or integer) may be transmitted by signal at the video unit level for use in calculating at least one LIC parameter of at least one LIC model. a. For example, the video unit level may be PU / CU / block level. i. For example, in addition, the video unit level can be sequence / group of pictures / picture / slice / slice group / PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU row / slice / slice / sub-picture level. b. For example, syntax element(s) may be used to adjust the value of at least one LIC parameter of at least one LIC model. i. For example, syntax element(s) may be used as indicator(s) of adjustment factor(s). ii. Alternatively, syntax element(s) may be used to represent / indicate the value of at least one LIC parameter. iii. For example, an indicator can be transmitted by signaling to adjust the parameters of a LIC model. c. For example, the derivation of LIC parameters can be based on both decoder-derived methods and signaled syntax elements. d. For example, a syntax element may be an indicator of an integer. i. For example, the value of the syntax element may be in the range of [-N, +N], for example, N=4. ii. For example, LIC parameters can be directly derived based on integers. e. For example, a syntax element may be an indicator of an index. i. For example, based on the first value of the index, the second value may be derived from a (predefined) lookup table for LIC parameter derivation. f. For example, how many syntax elements are signaled may depend on how many linear / LIC models are used for a video unit (eg, codec block). i. For example, if M LIC models are used for a video unit, M syntax elements may be signaled to be associated with the video unit. c. For example, the prediction sample value derivation of the LIC-coded video unit can be performed based on the updated model: ValueAfter=a'*ValueBefore+b', where a'=a+Delta, b'=b-Delta*funcD. a. For example, the updated model can be used to estimate / derive prediction samples within the current block. i. Alternatively, the updated model can be used to modulate the relationship between the neighboring samples of the current block and the neighboring samples of the time-domain co-located block. b. For example, "Delta" can be the slope adjustment / offset value of the LIC model. i. For example, at least one indicator of "Delta" may be signaled in the bitstream. ii. Alternatively, the value of "Delta" can be derived based on decoded information (eg, decoded sample values, decoded prediction modes of neighboring / reference blocks). iii. For example, "Delta" can be an integer. iv. For example, “Delta” may be an integer in the range of [-N, +N], for example, N=4. v. For example, "Delta" can be a number / value / integer / constant / variable derived from an index on a lookup table. c. For example, “funcD” can be calculated by averaging the reconstructed / predicted values of all available / appropriate / possible neighboring samples of the current block (or all available / appropriate / possible neighboring samples of the time-domain co-located block). i. For example, "funcD" may be calculated by averaging neighboring / reference samples from both intra-coded blocks and inter-coded blocks. 1. Alternatively, "funcD" can be calculated by averaging only neighboring / reference samples from inter-coded blocks. ii. For example, “funcD” may be calculated by averaging all available neighboring / reference samples located to the left and / or above the current block and / or the temporally co-located block. 1. Alternatively, only some of the samples (eg, adjacent to the first upper left M×M Units such as M = 16 or 8 or 4 or 32) may be considered. iii. For example, the (neighboring samples of) the temporal co-located block can be retrieved by the block motion vector (or its variant) Point. 1. Alternatively, the (neighboring samples of) the temporal co-located block can be determined by the rounded block motion vector (e.g., rounded to integer pixel precision) Retrieves / points to. iv. For example, the averaging process can be processed with (or without) a rounding factor. v. Alternatively, the averaging process can be replaced by other functions (such as summation, etc.). d. For example, the updated model (eg, with adjustments) may be used / allowed for all LIC-encoded blocks. i. Alternatively, the updated model may be used / allowed to be used for a certain class of LIC-coded blocks. 1. For example, "a certain category" can be determined based on available / appropriate / possible neighboring samples (such as both left neighboring samples and top neighboring samples are available, or only left neighboring samples are available, or only top neighboring samples are available, etc.). 2. For example, “a certain type” may be determined based on a prediction mode (such as AMVP coded or Merge coded, unidirectional prediction or bidirectional prediction, etc.). ii. Alternatively, the updated model may be used / allowed only if both left and above reference samples are available / appropriate for the video unit. iii. Alternatively, the updated model can be used / allowed only if the video unit is unidirectionally predicted. d. The adjusted information for LIC or CCLM or MM-CCLM can be coded in a predictive manner. e. The adjusted information for LIC or CCLM or MM-CCLM may be encoded and decoded using at least one context model. a. The context model may depend on codec information. b. Alternatively, it can be encoded and decoded in a bypass mode. f. For example, the neighboring / reference samples used to derive the LIC model parameters may not come from all available / appropriate / possible neighboring / reference samples on the left and above the coded block and the time-domain co-located block. a. For example, it may refer to neighboring / reference samples from both intra-coded blocks and inter-coded blocks. i. Alternatively, it may refer to neighboring / reference samples only from inter-coded blocks. b. For example, it may refer to a neighboring / reference sample located to the left (or above) of the current block and / or the time-domain co-located block. i. Alternatively, only some of the samples (e.g., adjacent to the first upper left M×M unit, Such as M = 16 or 8 or 4 or 32) can be considered. c. For example, (neighboring samples of) a temporally co-located block can be retrieved / pointed to by a block motion vector (or its variant). i. Alternatively, (the neighboring samples of) the temporal co-located block can be determined by rounding the block motion vector (e.g., Rounded to integer pixel precision) retrieved / pointed to. g. For example, whether to apply / allow adjustments to a video unit (eg, an updated model) may depend on the encoded information. a. For example, both the original model (without adjustments) and the updated model (with adjustments) may be used / allowed. i. Alternatively, only newer models will be used / allowed. b. For example, whether adjustment-based LIC model update is allowed (or applied) can be signaled in the bitstream. i. For example, it can be at (at least) a video unit level (such as sequence / group of pictures / picture / Slice / slice group / PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU line / slice / slice / sub-picture level) are transmitted through the signal. c. For example, whether to allow (or apply) the adjustment-based LIC model update can be derived at both the encoder and decoder sides. 2.2.7 Whether and / or how to apply adjustments for CCLM, MM-CCLM or LIC may depend on codec information such as block dimension, codec mode, (transformed) residual, transform, etc. a. For example, if the width and / or height and / or size of the block is less than a threshold, then the adjustment may not be applied. 2.2.8 Regarding the signaling and determination of LIC (e.g., as shown in the seventh question), the following method is proposed: a. For example, the LIC flag at the video unit level (eg, CU / PU level LIC flag) may not be transmitted through a signal, but derived at both the encoder side and the decoder side. a. For example, the CU / PU level LIC flag for AMVP coded blocks may not be signaled. b. For example, the CU / PU level LIC flag for affine AMVP coded blocks may not be signaled. c. For example, the CU / PU level LIC flag for AMVP-MERGE coded blocks may not be signaled. b. For example, whether to use LIC for a video unit may depend on coded information (eg, a decoder-derived method). a. For example, the LIC flag at the video unit level can be derived implicitly at both the encoder side and the decoder side. i. For example, the CU / PU level LIC flag for a block decoded via non-Merge (such as AMVP and / or Affine AMVP) codec can be derived implicitly. ii. For example, for Merge (and / or its variants, such as TM, BM, MHP, ADMVR, The CU / PU level LIC flag of the block encoded by CIIP, GPM, sbTMVP, Affine Merge, etc. can be derived implicitly. iii. For example, implicit derivation can be based on the decoder derivation method. iv. For example, implicit deduction can be based on template matching. v. For example, implicit deduction can be based on two-sided matching. b. For example, the decoder-derived cost / error / distortion may be calculated for both the non-LIC case and the LIC case, and the one with the smaller cost / error / distortion is determined to be the coding method to be used for the video unit. i. For example, template (and / or bilateral) matching costs may be calculated separately for LIC-coded video units and non-LIC-coded video units. ii. For example, the cost / error / distortion is obtained by comparing the temporal (co-located) neighboring samples in the reference picture and / or Or reference samples are derived. iii. For example, the cost / error / distortion is not derived from the current block samples in the current picture. c. For example, the coded information used for LIC mode may be neighboring / reference samples from both intra-coded blocks and inter-coded blocks. i. Alternatively, the coded information may be neighboring / reference samples only from inter-coded blocks. d. For example, the coded information used for the LIC mode may be all available neighboring / reference samples located to the left and / or above the current block and / or the time-domain co-located block. i. Alternatively, only a portion of such samples (eg, adjacent to the first upper left MxM unit, such as M=16 or 8 or 4 or 32) may be considered. e. For example, the temporally co-located block can be retrieved / pointed to by a block motion vector (or its variant). i. Alternatively, the temporally co-located block can be retrieved / pointed to by a rounded block motion vector (eg, rounded to integer pixel precision). c. For example, the Merge index of the Merge block encoded and decoded by LIC may not be transmitted through a signal (eg, derived at both the encoder and the decoder). a. For example, the motion (eg, motion vector, reference index, prediction direction, etc.) of the LIC-encoded Merge block can be derived at both the encoder side and the decoder side. b. For example, for all (or multiple, or a predefined portion) available / possible / appropriate merge candidates, multiple template (and / or bilateral) matching costs / errors / distortions can be calculated separately. The one with the smallest cost / error / distortion is determined to be the motion used for the video unit. i. For example, the template is constructed from temporally (co-located) neighboring samples and / or reference samples in a reference picture. ii. For example, the template is not constructed from the current block samples in the current picture. iii. For example, the template is constructed using a spot without LIC. iv. For example, the template is constructed using a spot with LIC. d. For example, an optimal set of LIC parameters (such as a and b calculated by a least squares fitting method) can be determined from more than one set of LIC parameters. a. For example, more than one set of LIC parameters may be applicable to a LIC-encoded video unit. b. For example, which set of LIC parameters is used for a video unit can be derived at both the encoder side and the decoder side. i. Alternatively, a syntax element (eg, an index) may be signaled that specifies the LIC parameter set to be used for the video unit. c. For example, for all appropriate LIC parameter sets, multiple template (and / or bilateral) matching costs / errors / The distortion can be calculated separately. The one with the smallest cost / error / distortion is determined as the LIC parameter set to be used for the video unit. i. For example, the template is constructed from temporally (co-located) neighboring samples and / or reference samples in a reference picture. ii. For example, the template is not constructed from the current block samples in the current picture. generally 2.2.9 Whether to apply the method disclosed above and / or how to apply the method disclosed above can be transmitted through a signal at the sequence level / picture group level / picture level / slice level / slice group level, such as in the sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / slice group header. 2.2.10 Whether to apply the above-disclosed method and / or how to apply the above-disclosed method can be transmitted by signal at PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU row / slice / slice / sub-picture / other types of areas containing more than one sample or pixel. 2.2.11 Whether to apply the above disclosed method and / or how to apply the above disclosed method may depend on the coded information, such as block size, color format, single / dual tree partitioning, color component, slice / picture type. 3 questions There are several problems in the existing video coding and decoding technology, which need to be further improved in order to obtain higher coding and decoding gain. 1. In ECM-7.0, the CCLM prediction model is applied using the slope adjustment method. However, this method uses a division operation, which may be unfriendly to the implementation. 2. In ECM-7.0, mean removal is used in LIC and DMVR related tools. However, mean removal may be undesirable because it introduces an extra pipeline stage. 3. In ECM-7.0, LDL decomposition is used for CCCM and GLM, while least squares-based methods are used for CCLM, MMLM, and LIC. This design can be improved. 4 Detailed solutions The following detailed embodiments should be considered as examples to explain the general concept. These embodiments should not be interpreted in a narrow sense. In addition, these embodiments can be combined in any way. The term “video unit” or “codec unit” may refer to a picture, a slice, a slice, a codec tree block (CTB), a codec tree unit (CTU), a codec block (CB), a CU, a PU, a TU, a PB, or a TB. The term "block" may refer to a codec tree block (CTB), a codec tree unit (CTU), a codec block (CB), a CU, a PU, a TU, a PB, or a TB. It is important to note that the terms mentioned below are not limited to the specific terms defined in existing standards. Any changes in codec tools also apply. 4.1 Regarding the division-free operation and related problems (e.g., the first problem) of slope adjustment for linear / nonlinear / polynomial regression models, the following method is proposed: a. For example, at least one of the following methods can be designed based on a linear / nonlinear / polynomial regression model: a. A cross-component method for constructing the relationship between luminance block samples and chrominance block samples. b. An inter-frame prediction method that constructs a relationship between the current block / template / region sample and the reference block / template / region sample. c. Intra-frame prediction method that builds the relationship between the current block / template / region sample and the reference block / template / region sample. d. Intra-frame / inter-frame prediction method that builds the relationship between the predicted value and the reconstructed value of the reference / template / neighboring sample point. e. An SCC prediction method that constructs a relationship between the current block / template / region sample points and the reference block / template / region sample points. f. Methods based on template matching (and / or its variants). g. Methods based on template cost (and / or its variants). h. Template (and / or variants thereof) based methods. i. Fusion / mixing based methods (such as TIMD / DIMD / CIIP / GPM / SGPM / MHP / BCW / mixing weight derivation of chroma fusion / luminance fusion, etc.). j.CCLM and / or its variants. k.MMLM and / or its variants. l.CCCM and / or its variants. m.GLM and / or its variants. n. LIC and / or its variants. o. intraTMP and / or its variants. b. Linear / non-linear / polynomial regression models can be updated based on slope adjustment parameter(s), where the slope adjustment parameters are derived from a divide-free operation. a. For example, slope adjustment(s) may be applied to update prediction models based on linear / non-linear / polynomial models. b. For example, the slope adjustment parameter(s) may be derived based on an average of the sample values. i. For example, neighboring luma sample values and / or neighboring chroma sample values of the current block may be used. ii. For example, neighboring luma sample values and / or neighboring chroma sample values of a reference block may be used. c. For example, the slope adjustment factors for CCLM and MMLM models can be calculated based on no division operations. c. For example, a non-divide operation may be based on a multiplication with a scaling factor and a shift operation. a. For example, the division of "divisor = sum / num" can be expressed as "divisor = (sum * scale) >> shift". b. For example, the scaling factor and / or shift value may be calculated based on the denominator. c. For example, the shift value can be calculated based on the log2 of the denominator. d. For example, the denominator can be normalized to the range of T1 and T2 (such as T1 = 1.0 and T2 = 2.0) by applying a shift operation. e. For example, the scaling factor may be calculated based on the fractional part of the normalized denominator (with K bits of precision), where K is a predefined integer, such as K=14. d. For example, a non-division operation can be based on a piecewise polynomial function. a. For example, the scaling factor may be calculated based on an M-segment polynomial model, where M is a predefined integer equal to a power of 2. b. For example, at least one parameter of the polynomial model in different segments may be pre-calculated and stored in a lookup table. c. For example, the coefficient of the 1st power term can be realized by a shift operation, and there is no storage for the value. e. For example, the non-division operation can be based on an integer lookup table (LUT). 4.2 Regarding the offset removal-based approach and related issues (e.g., the second issue), the following approach is proposed: a. For example, at least one of the following methods can be designed based on offset removal: a. A cross-component method for constructing the relationship between luminance block samples and chrominance block samples. b. An inter-frame prediction method that constructs a relationship between the current block / template / region sample and the reference block / template / region sample. c. Intra-frame prediction method that builds the relationship between the current block / template / region sample and the reference block / template / region sample. d. Intra-frame / inter-frame prediction method that builds the relationship between the predicted value and the reconstructed value of the reference / template / neighboring sample point. e. An SCC prediction method that constructs a relationship between the current block / template / region sample points and the reference block / template / region sample points. f. Methods based on template matching (and / or its variants). g. Methods based on template cost (and / or its variants). h. Template (and / or variants thereof) based methods. i. Fusion / mixing based methods (such as TIMD / DIMD / CIIP / GPM / SGPM / MHP / BCW / mixing weight derivation of chroma fusion / luminance fusion, etc.). j.CCLM and / or its variants. k.MMLM and / or its variants. l.CCCM and / or its variants. m.GLM and / or its variants. n. LIC and / or its variants. o. intraTMP and / or its variants. b. For example, the cost / error / SAD / SATD / MSE / SSE / difference calculation between the samples in the first block / template / region and the samples in the second block / template / region may be applied based on the offset removal method. a. For example, the offset can be removed first for each pair of samples, and then the cost / error / SAD / SATD / MSE / SSE / Difference is calculated based on the difference with the offset removed. c. For example, the predicted / reconstructed values for the samples in the block / template / region can be subtracted from the offset and then used for model (or cost) calculation. d. For example, the offset can be calculated based on one of the following: a. Sample value of a specific sample point (or a pair of sample points) at a predefined position. i. For example, predicted / reconstructed sample values at predefined positions within / near the template. ii. For example, predicted / reconstructed sample values at predefined locations within / nearby reference blocks. iii. For example, the difference between a first predicted / reconstructed sample value at a predefined position within / adjacent to the first template and a second predicted / reconstructed sample value at a predefined position within / adjacent to the second template. iv. For example, the difference between a first predicted / reconstructed sample value at a predefined position within / adjacent to the first reference block and a second predicted / reconstructed sample value at a predefined position within / adjacent to the second reference block. v. For example, the predefined position may be the upper left, upper right, lower left, lower right, or center of the template (or reference block). b. Values calculated by a function based on more than one sample point in a block / template / region (or a pair of blocks / templates). i. For example, the function may be based on the difference between at least two predicted / reconstructed samples in the first template and the predicted / reconstructed samples in the second template. ii. For example, the function may be based on the difference between at least two predicted / reconstructed samples in a first reference block and a predicted / reconstructed sample in a second reference block. iii. For example, the function can be based on all the samples in the template (or reference block). iv. For example, the function may be based on at least two sample points at predefined positions in the template (or reference block). v. For example, the function can be based on the mean / median / average / maximum / minimum of the qualified values. 4.3 Regarding solving linear / nonlinear / polynomial regression models and related problems (e.g., the third problem), the following methods are proposed: a. For example, at least one of the following methods can be designed to solve linear / nonlinear / polynomial regression models: a. A cross-component method for constructing the relationship between luminance block samples and chrominance block samples. b. An inter-frame prediction method that constructs a relationship between the current block / template / region sample and the reference block / template / region sample. c. Intra-frame prediction method that builds the relationship between the current block / template / region sample and the reference block / template / region sample. d. Intra-frame / inter-frame prediction method that builds the relationship between the predicted value and the reconstructed value of the reference / template / neighboring sample point. e. An SCC prediction method that constructs a relationship between the current block / template / region sample points and the reference block / template / region sample points. f. Methods based on template matching (and / or its variants). g. Methods based on template cost (and / or its variants). h. Template (and / or variants thereof) based methods. i. Fusion / mixing based methods (such as TIMD / DIMD / CIIP / GPM / SGPM / MHP / BCW / mixing weight derivation of chroma fusion / luminance fusion, etc.). j.CCLM and / or its variants. k.MMLM and / or its variants. l.CCCM and / or its variants. m.GLM and / or its variants. n. LIC and / or its variants. o. intraTMP and / or its variants. b. For example, a linear / nonlinear / polynomial regression model can be expressed as sampVal=a0Y0+a1Y1+a2Y2+a3Y3+…+a i Y i +a i+1 B, where Y0…Y i represents the value of the reconstructed / predicted sample based on the input region (e.g., reference block / template, etc.), B represents the bias term, a0…a i+1 represents the filter coefficient, and sampVal represents the prediction value in the output region (e.g., current block / template, etc.). c. For example, the coefficients of a linear / nonlinear / polynomial regression model can be solved / calculated based on regression-based MSE minimization. a. For example, it can be based on minimizing the MSE / SSE / SAD / SATD / difference between the predicted and reconstructed samples in the reference region (or template). b. For example, it may be based on minimizing the MSE / SSE / SAD / SATD / difference between the reconstructed samples in the reference template and the reconstructed samples in the current template. d. For example, a linear / non-linear / polynomial regression model with already solved / calculated filter coefficients can be applied to calculate the predicted sample values in the current block / template / region. e. For example, the coefficients of the linear / nonlinear / polynomial regression model can be solved based on at least one of the following methods: a. Breakdown of LDL and / or its variants. b. LU decomposition and / or its variants. c. Cholesky decomposition and / or its variants. d. Gaussian elimination and / or its variants. e. Least squares method and / or its variants. 4.4 Whether and / or how to apply the methods disclosed above may be signaled at the sequence level / picture group level / picture level / slice level / slice group level, such as in a sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / slice group header. 4.5 Whether and / or how to apply the methods disclosed above can be signaled at PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU row / slice / slice / sub-picture / other kinds of regions containing more than one sample or pixel. 4.6 Whether and / or how to apply the method disclosed above may depend on coded information such as block size, color format, single-tree partitioning / dual-tree partitioning, color component, slice / picture type.

[0074] More details will be discussed further below. Figure 14 FIG14 is a flow chart of a method 1400 for video processing according to an embodiment of the present disclosure. The method 1400 is implemented for conversion between a current video block of a video and a bitstream of the video.

[0075] At block 1410, a codec tool is determined for the current video block based on a regression model. The regression model is associated with at least one of a no-divide operation or a coefficient determination operation. For example, the codec tool may use a regression model.

[0076] At block 1420, a conversion is performed based on a codec. For example, the codec may be applied to the current video block. In some embodiments, the conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, the conversion may include decoding the current video block from the bitstream.

[0077] Method 1400 enables applying a regression model-based coding tool to a current video block.For example, the regression model may be determined based on no division operation or coefficient determination operation.

[0078] In some embodiments, the regression model includes at least one of the following: a linear regression model, a nonlinear regression model, or a polynomial regression model. As used herein, the term "regression model" may refer to a "linear regression model," a "nonlinear regression model," or a "polynomial regression model."

[0079] In some embodiments, the coding tool includes at least one of the following: a cross-component coding tool for constructing a relationship between luminance block samples and chrominance block samples, an inter-frame prediction coding tool for constructing a relationship between a current video block or a current template or a current region sample and a reference block or a reference template or a reference region sample, an intra-frame prediction coding tool for constructing a relationship between a current video block or a current template or a current region sample and a reference block or a reference template or a reference region sample, an inter-frame or intra-frame prediction coding tool for constructing a relationship between a predicted value and a reconstructed value of a reference or template or a neighboring sample of the current video block, and a relationship between a current video block or a current template or a current region sample and a reference block or a reference template or a reference region sample. Screen content codec (SCC) prediction based on the relationship between reference blocks or reference templates or reference region samples, template matching based codecs, template cost based codecs, fusion or hybrid based codecs, cross-component linear model (CCLM) or CCLM variants, multi-model linear model (MMLM) or MMLM variants, convolutional cross-component model (CCCM) or CCCM variants, gradient linear model (GLM) or GLM variants, local illumination compensation (LIC) or LIC variants, or intra-frame template matching prediction (intraTMP) codecs or intraTMP variants.

[0080] In some embodiments, the fusion-based or hybrid codec tool includes hybrid weight determination of at least one of the following: template-based intra mode derivation (TIMD), decoder-side intra mode derivation (DIMD), inter-frame intra joint prediction (CIIP), geometric partitioning mode (GPM), spatial GPM (SGPM), multiple hypothesis prediction (MHP), bidirectional prediction (BCW) with codec unit (CU) level weights, chroma fusion, or luma fusion.

[0081] In some embodiments, the regression model is updated based on slope adjustment parameters determined from the no-divide operation. For example, a linear / nonlinear / polynomial regression model can be updated based on (multiple) slope adjustment parameters, where the slope adjustment parameters are derived from the no-divide operation.

[0082] In some embodiments, slope adjustment parameters are applied to update a prediction model based on a regression model. For example, slope adjustment(s) may be applied to update a prediction model based on a linear / non-linear / polynomial model.

[0083] In some embodiments, method 1400 further includes determining a slope adjustment parameter based on an average of a plurality of sample values associated with the current video block.

[0084] In some embodiments, the plurality of sample values includes at least one of the following: at least one neighboring luma sample value of the current video block, or at least one neighboring chroma sample value of the current video block.

[0085] In some embodiments, the plurality of sample values comprises at least one of the following: at least one neighboring luma sample value of a reference block of the current video block, or at least one neighboring chroma sample value of a reference block.

[0086] In some embodiments, the slope adjustment parameter is determined based on a non-division operation, and the slope adjustment parameter is used for at least one of a cross-component linear model (CCLM) or a multi-model linear model (MMLM). For example, the slope adjustment factor for the CCLM and MMLM models can be calculated based on a non-division operation.

[0087] In some embodiments, the non-divide operation is based on a multiplication and shift operation with a scaling factor.

[0088] In some embodiments, the division operation is replaced by a non-division operation including a multiplication operation with a scaling factor and a shift operation. For example, the division of "divisor=sum / num" can be expressed as "divisor=(sum*scale)>>shift".

[0089] In some embodiments, at least one of the scaling factor or the shift value of the shift operation is determined based on a denominator of the division operation.

[0090] In some embodiments, the shift value is determined based on the logarithm of the denominator. For example, the shift value can be calculated based on the log2 of the denominator.

[0091] In some embodiments, the denominator is normalized to a predetermined range by applying a shift operation. In some embodiments, the predetermined range is 1.0 to 2.0.

[0092] In some embodiments, the scaling factor is determined based on a fractional portion of the normalized denominator, the fractional portion having a predefined precision.

[0093] In some embodiments, the predefined precision includes a precision corresponding to a predefined number of bits. For example, the predefined number may be 14.

[0094] In some embodiments, the divide-free operation is based on a piecewise polynomial metric.

[0095] In some embodiments, the scaling factor without a division operation is determined based on an M-segment polynomial model, where M is a predefined integer equal to a power of 2. For example, the scaling factor can be calculated based on an M-segment polynomial model, where M is a predefined integer equal to a power of 2.

[0096] In some embodiments, at least one parameter of the polynomial model in the plurality of segments of the polynomial model is predetermined and stored in a lookup table.

[0097] In some embodiments, the coefficient of the 1st power term is implemented through a shift operation, and there is no storage for the value of the coefficient.For example, the coefficient of the 1st power term can be implemented through a shift operation, and there is no storage for the value.

[0098] In some embodiments, the divide-less operation is based on an integer lookup table (LUT).

[0099] In some embodiments, the regression model includes the following operation: sampVal = a0Y0+a1Y1+a2Y2+a3Y3+…+ai Yi+ai+1B, where Y0, Y1, Y2, Y3, …Yi represent values based on reconstructed samples or predicted samples in the input region, B represents a bias term, a0, a1, a2, a3, …ai+1 represent filter coefficients, and sampVal represents a predicted value in the output region. For example, the input region can be a template or a reference block of the current video block, and the output region can be a template or a current video block. That is, the linear / nonlinear / polynomial regression model can be expressed as sampVal = a0Y0+a1Y1+a2Y2+a3Y3+…+a i Y i +a i+1 B, where Y0…Y i represents the value of the reconstructed sample / prediction sample based on the input region (e.g., reference block / template, etc.), B represents the bias term, a0…a i+1 represents the filter coefficient, and sampVal represents the prediction value in the output region (e.g., current block / template, etc.).

[0100] In some embodiments, the coefficient determination operation includes determining at least one coefficient of the regression model based on regression-based mean squared error (MSE) minimization.

[0101] In some embodiments, the regression-based MSE minimization is based on at least one of minimizing a metric between predicted samples and reconstructed samples in a reference region or template of the current video block, or minimizing a metric between reconstructed samples in a reference template of the current video block and reconstructed samples in a current template of the current video block.

[0102] In some embodiments, the metric comprises at least one of: mean square error (MSE), sum of squared errors (SSE), sum of absolute differences (SAD), sum of absolute transformed differences (SATD), or difference.

[0103] In some embodiments, a regression model having filter coefficients determined based on the coefficient determination operation is applied to determine predicted sample values for at least one of: a current video block, a template of the current video block, or a region.

[0104] In some embodiments, the coefficient determination operation is based on at least one of: LDL decomposition or a variant of LDL decomposition, LU decomposition or a variant of LU decomposition, Cholesky decomposition or a variant of Cholesky decomposition, Gaussian elimination or a variant of Gaussian elimination, or a least squares tool or a variant of a least squares tool.

[0105] According to another embodiment 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 generated by a method performed by an apparatus for video processing. In the method, a codec tool for a current video block of the video is determined based on a regression model. A bitstream is generated based on the codec tool. The regression model is associated with at least one of a non-division operation and a coefficient determination operation.

[0106] According to further embodiments of the present disclosure, a method for storing a video bitstream is provided. In this method, a codec tool for a current video block of the video is determined based on a regression model. A bitstream is generated based on the codec tool. The bitstream is stored in a non-transitory computer-readable recording medium. The regression model is associated with at least one of a non-division operation and a coefficient determination operation.

[0107] Figure 15 FIG. 1 is a flow chart of a method 1500 for video processing according to an embodiment of the present disclosure. The method 1500 is implemented for conversion between a current video block of a video and a bitstream of the video.

[0108] At block 1510 , a codec tool for the current video block is determined based on the offset removal operation.

[0109] At block 1520, a conversion is performed based on a codec. For example, the codec may be applied to the current video block. In some embodiments, the conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, the conversion may include decoding the current video block from the bitstream.

[0110] Method 1500 enables applying a codec tool based on an offset removal operation to a current video block. In this way, codec efficiency and codec effectiveness can be improved.

[0111] In some embodiments, the coding tool includes at least one of the following: a cross-component coding tool for constructing a relationship between luminance block samples and chrominance block samples, an inter-frame prediction coding tool for constructing a relationship between a current video block or a current template or a current region sample and a reference block or a reference template or a reference region sample, an intra-frame prediction coding tool for constructing a relationship between a current video block or a current template or a current region sample and a reference block or a reference template or a reference region sample, an inter-frame or intra-frame prediction coding tool for constructing a relationship between a predicted value and a reconstructed value of a reference or template or a neighboring sample of the current video block, and a relationship between a current video block or a current template or a current region sample and a reference block or a reference template or a reference region sample. Screen content codec (SCC) prediction based on the relationship between reference blocks or reference templates or reference region samples, template matching based codecs, template cost based codecs, fusion or hybrid based codecs, cross-component linear model (CCLM) or CCLM variants, multi-model linear model (MMLM) or MMLM variants, convolutional cross-component model (CCCM) or CCCM variants, gradient linear model (GLM) or GLM variants, local illumination compensation (LIC) or LIC variants, or intra-frame template matching prediction (intraTMP) codecs or intraTMP variants.

[0112] In some embodiments, the fusion-based or hybrid codec tool includes hybrid weight determination of at least one of the following: template-based intra mode derivation (TIMD), decoder-side intra mode derivation (DIMD), inter-frame intra joint prediction (CIIP), geometric partitioning mode (GPM), spatial GPM (SGPM), multiple hypothesis prediction (MHP), bidirectional prediction (BCW) with codec unit (CU) level weights, chroma fusion, or luma fusion.

[0113] In some embodiments, in the codec tool, a metric value between samples in the first region and samples in the second region is determined based on an offset removal operation.

[0114] In some embodiments, the metric comprises at least one of: cost, error, sum of absolute differences (SAD), sum of absolute transformed differences (SATD), mean square error (MSE), sum of squared errors (SSE), or difference.

[0115] In some embodiments, the first region or the second region includes at least one of the following: a block, a template, or a region.

[0116] In some embodiments, determining the metric value includes: removing an offset for each pair of samples in the first region and the second region; and determining the metric value based on the offset-removed samples.

[0117] In some embodiments, the offset removal operation includes: determining a predicted value or a reconstructed value for samples in the region; and updating the predicted value or the reconstructed value by subtracting the offset from the predicted value or the reconstructed value.

[0118] In some embodiments, the updated predicted value or the updated reconstructed value is used for at least one of: model determination or cost determination.

[0119] In some embodiments, a region comprises at least one of: a block, a template, or a region.

[0120] In some embodiments, the offset for the offset removal operation is determined based on at least one of: a sample value of a sample at a predefined location, sample values of a pair of sample points at a pair of predefined locations, or a metric value based on a plurality of sample points in a region.

[0121] In some embodiments, the sample value of the sample at the predefined position includes a predicted sample value or a reconstructed sample value at a predefined position within a template of the current video block or a neighboring template.

[0122] In some embodiments, the sample values of the samples at the predefined positions include predicted sample values or reconstructed sample values at predefined positions within a reference block of the current video block or a neighboring reference block.

[0123] In some embodiments, the offset is determined based on a difference between sample values of a pair of samples at a pair of predefined positions, the pair of samples including a first predicted sample value or a reconstructed sample value at a first predefined position within or adjacent to a first template of the current video block, and a second predicted sample value or a reconstructed sample value at a second predefined position within or adjacent to a second template of the current video block, the first predefined position corresponding to the second predefined position.

[0124] In some embodiments, the offset is determined based on a difference between sample values of a pair of samples at a pair of predefined positions, the pair of samples including a first predicted sample value or a reconstructed sample value at a first predefined position within or adjacent to a first reference block of the current video block, and a second predicted sample value or a reconstructed sample value at a second predefined position within or adjacent to a second reference block of the current video block, the first predefined position corresponding to the second predefined position.

[0125] In some embodiments, the predefined position or a pair of predefined positions includes at least one of the following: the upper left position of the template or reference block of the current video block, the upper right position of the template or reference block of the current video block, the lower left position of the template or reference block of the current video block, the lower right position of the template or reference block of the current video block, or the center position of the template or reference block of the current video block.

[0126] In some embodiments, the metric value is determined based on a difference between at least two predicted samples or reconstructed samples in a first template for the current video block and at least two predicted samples or reconstructed samples in a second template for the current video block.

[0127] In some embodiments, the metric value is determined based on a difference between at least two predicted samples or reconstructed samples in a first reference block of the current video block and at least two predicted samples or reconstructed samples in a second reference block of the current video block.

[0128] In some embodiments, the metric value is determined based on samples in a template or reference block of the current video block.

[0129] In some embodiments, the metric value is determined based on at least two samples at predefined locations in a template or reference block of the current video block.

[0130] In some embodiments, the metric value is determined based on at least one of: an average of the qualified values, a median of the qualified values, a mean of the qualified values, a maximum of the qualified values, or a minimum of the qualified values.

[0131] According to another embodiment 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 generated by a method performed by an apparatus for video processing. In the method, a codec tool for a current video block of the video is determined based on an offset removal operation. The bitstream is generated based on the codec tool.

[0132] According to further embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In this method, a codec tool for a current video block of the video is determined based on an offset removal operation. A bitstream is generated based on the codec tool. The bitstream is stored in a non-transitory computer-readable recording medium.

[0133] In some embodiments, information about whether and / or how to apply method 1400 and / or method 1500 is included in the bitstream.

[0134] In some embodiments, the information is indicated at one of: sequence level, group of pictures level, picture level, slice level, or slice group level.

[0135] In some embodiments, the information is indicated in a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a decoding parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or a slice group header.

[0136] In some embodiments, information is indicated in an area comprising more than one sample or pixel.

[0137] In some embodiments, the region includes one of the following: a prediction block (PB), a transform block (TB), a codec block (CB), a prediction unit (PU), a transform unit (TU), a codec unit (CU), a virtual pipeline data unit (VPDU), a codec tree unit (CTU), a CTU row, a slice, a slice, or a sub-picture.

[0138] In some embodiments, method 1400 and / or method 1500 further includes: determining information based on the encoded and decoded information.

[0139] In some embodiments, the encoded information includes at least one of the following: block size, color format, single-tree partitioning or dual-tree partitioning, color component, slice type, or picture type.

[0140] It should be understood that the methods 1400 and 1500 can be applied individually or in any combination. By using the methods 1400 and / or 1500 individually or in combination, codec effectiveness and / or codec efficiency can be improved.

[0141] The embodiments of the present disclosure may be described according to the following items, the features of which may be combined in any reasonable way.

[0142] Item 1. A method for video processing, comprising: determining a codec tool for a conversion between a current video block of a video and a bitstream of the video based on a regression model; and performing the conversion based on the codec tool, wherein the regression model is associated with at least one of the following: no division operation or coefficient determination operation.

[0143] Item 2. The method of Item 1, wherein the regression model comprises at least one of: a linear regression model, a nonlinear regression model, or a polynomial regression model.

[0144] Item 3. A method according to Item 1 or 2, wherein the coding tool comprises at least one of the following: a cross-component coding tool for constructing a relationship between luminance block samples and chrominance block samples, an inter-frame prediction coding tool for constructing a relationship between the current video block or current template or current region samples and a reference block or reference template or reference region samples, an intra-frame prediction coding tool for constructing a relationship between the current video block or current template or current region samples and a reference block or reference template or reference region samples, an inter-frame or intra-frame prediction coding tool for constructing a relationship between a predicted value and a reconstructed value of a reference or template or neighboring sample of the current video block, a coding tool for constructing a relationship between the current video block or current template or current region samples and a reference block or reference template or reference region samples, Screen content codec (SCC) prediction of the relationship between a previous template or current region sample and a reference block or reference template or reference region sample, template matching based codec, template cost based codec, fusion or hybrid based codec, cross component linear model (CCLM) or CCLM variants, multi-model linear model (MMLM) or MMLM variants, convolutional cross component model (CCCM) or CCCM variants, gradient linear model (GLM) or GLM variants, local illumination compensation (LIC) or LIC variants, or intra template matching prediction (intraTMP) codec or intraTMP variants.

[0145] Item 4. A method according to Item 3, wherein the fusion-based or hybrid codec tool includes hybrid weight determination of at least one of the following: template-based intra mode derivation (TIMD), decoder-side intra mode derivation (DIMD), inter-frame intra joint prediction (CIIP), geometric partitioning mode (GPM), spatial GPM (SGPM), multiple hypothesis prediction (MHP), bidirectional prediction (BCW) with codec unit (CU) level weights, chroma fusion, or luma fusion.

[0146] Clause 5. The method of any one of Clauses 1 to 4, wherein the regression model is updated based on a slope adjustment parameter determined from the division-free operation.

[0147] Clause 6. The method of clause 5, wherein the slope adjustment parameter is applied to update a prediction model based on the regression model.

[0148] Item 7. The method of Item 5 or 6, further comprising: determining the slope adjustment parameter based on an average of a plurality of sample values associated with the current video block.

[0149] Item 8. The method of Item 7, wherein the plurality of sample values comprises at least one of: at least one neighboring luma sample value of the current video block, or at least one neighboring chroma sample value of the current video block.

[0150] Item 9. The method of Item 7, wherein the plurality of sample values comprises at least one of: at least one neighboring luma sample value of a reference block of the current video block, or at least one neighboring chroma sample value of the reference block.

[0151] Item 10. The method of Item 5 or 6, wherein the slope adjustment parameter is determined based on the division-free operation, and the slope adjustment parameter is used for at least one of: a cross-component linear model (CCLM) or a multiple model linear model (MMLM).

[0152] Item 11. The method of any one of Items 5 to 10, wherein the division-free operation is based on a multiplication with a scaling factor and a shift operation.

[0153] Item 12. The method of any one of Items 5 to 10, wherein a division operation is replaced by the non-division operation comprising a multiplication operation with a scaling factor and a shift operation.

[0154] Clause 13. The method of clause 12, wherein at least one of the scaling factor or the shift value of the shift operation is determined based on a denominator of the division operation.

[0155] Clause 14. The method of clause 13, wherein the shift value is determined based on a logarithmic value of the denominator.

[0156] Clause 15. The method of clause 13 or 14, wherein the denominator is normalized to a predetermined range by applying the shift operation.

[0157] Item 16. The method of Item 15, wherein the predetermined range is 1.0 to 2.0.

[0158] Clause 17. The method of clause 15 or 16, wherein the scaling factor is determined based on a normalized fractional part of the denominator, the fractional part having a predefined precision.

[0159] Clause 18. The method of clause 17, wherein the predefined precision comprises a precision corresponding to a predefined number of bits.

[0160] Clause 19. The method of clause 18, wherein the predefined number is 14.

[0161] Item 20. The method of any one of Items 11 to 19, wherein the division-free operation is based on a piecewise polynomial metric.

[0162] Item 21. The method of Item 20, wherein the scaling factor without the division operation is determined based on an M-segment polynomial model, M being a predefined integer equal to a power of 2.

[0163] Clause 22. The method of clause 21, wherein at least one parameter of the polynomial model in a plurality of segments of the polynomial model is predetermined and stored in a lookup table.

[0164] Item 23. A method according to any one of Items 20 to 22, wherein the coefficients of the 1st power terms are implemented by the shift operation and there is no storage of the values of the coefficients.

[0165] Item 24. The method of any one of Items 11 to 23, wherein the division-free operation is based on an integer lookup table (LUT).

[0166] Item 25. A method according to any one of Items 1 to 24, wherein the regression model includes the following operation: sampVal = a0Y0+a1Y1+a2Y2+a3Y3+…+ai Yi+ai+1B, where Y0, Y1, Y2, Y3,…Yi represent values based on reconstructed samples or predicted samples in the input area, B represents a bias term, a0, a1, a2, a3,…ai+1 represent filter coefficients, and sampVal represents the predicted value in the output area.

[0167] Item 26. The method of Item 25, wherein the input region comprises a template or a reference block of the current video block, and the output region comprises the template or the current video block.

[0168] Item 27. A method according to any one of Items 1 to 26, wherein the coefficient determination operation includes: determining at least one coefficient of the regression model based on minimization of a regression-based mean squared error (MSE).

[0169] Item 28. A method according to Item 27, wherein the regression-based MSE minimization is based on at least one of the following: minimizing a metric between predicted samples and reconstructed samples in a reference area or template of the current video block, or minimizing a metric between reconstructed samples in a reference template of the current video block and reconstructed samples in a current template of the current video block.

[0170] Item 29. The method of Item 28, wherein the metric comprises at least one of: mean square error (MSE), sum of squared errors (SSE), sum of absolute differences (SAD), sum of absolute transformed differences (SATD), or difference.

[0171] Item 30. A method according to any one of Items 1 to 29, wherein the regression model having filter coefficients determined based on the coefficient determination operation is applied to determine predicted sample point values in at least one of the following items: the current video block, a template of the current video block, or a region.

[0172] Item 31. A method according to any one of Items 1 to 30, wherein the coefficient determination operation is based on at least one of: LDL decomposition or a variant of LDL decomposition, LU decomposition or a variant of LU decomposition, Cholesky decomposition or a variant of Cholesky decomposition, Gaussian elimination or a variant of Gaussian elimination, or a least squares tool or a variant of a least squares tool.

[0173] Item 32. A method for video processing, comprising: determining, for conversion between a current video block of a video and a bitstream of the video, a codec tool for the current video block based on an offset removal operation; and performing the conversion based on the codec tool.

[0174] Item 33. A method according to Item 32, wherein the coding tool comprises at least one of the following: a cross-component coding tool for constructing a relationship between luminance block samples and chrominance block samples, an inter-frame prediction coding tool for constructing a relationship between the current video block or current template or current region samples and a reference block or reference template or reference region samples, an intra-frame prediction coding tool for constructing a relationship between the current video block or current template or current region samples and a reference block or reference template or reference region samples, an inter-frame or intra-frame prediction coding tool for constructing a relationship between a predicted value and a reconstructed value of a reference or template or neighboring sample of the current video block, a coding tool for constructing a relationship between the current video block or current template or current region samples and a reference block or reference template or reference region samples, Screen content codec (SCC) prediction of the relationship between a previous template or current region sample and a reference block or reference template or reference region sample, template matching based codec, template cost based codec, fusion or hybrid based codec, cross component linear model (CCLM) or CCLM variants, multi-model linear model (MMLM) or MMLM variants, convolutional cross component model (CCCM) or CCCM variants, gradient linear model (GLM) or GLM variants, local illumination compensation (LIC) or LIC variants, or intra template matching prediction (intraTMP) codec or intraTMP variants.

[0175] Item 34. A method according to Item 33, wherein the fusion or hybrid based codec tool includes hybrid weight determination of at least one of the following: template-based intra mode derivation (TIMD), decoder-side intra mode derivation (DIMD), inter-frame intra joint prediction (CIIP), geometric partitioning mode (GPM), spatial GPM (SGPM), multiple hypothesis prediction (MHP), bidirectional prediction (BCW) with codec unit (CU) level weights, chroma fusion, or luma fusion.

[0176] Item 35. The method of any one of Items 32 to 34, wherein in the codec tool, a metric value between samples in the first region and samples in the second region is determined based on the offset removal operation.

[0177] Item 36. The method of Item 35, wherein the metric comprises at least one of: cost, error, sum of absolute differences (SAD), sum of absolute transformed differences (SATD), mean squared error (MSE), sum of squared errors (SSE), or difference.

[0178] Item 37. The method of Item 35 or 36, wherein the first region or the second region comprises at least one of: a block, a template, or a region.

[0179] Item 38. A method according to any one of Items 35 to 37, wherein determining the metric value comprises: removing an offset for each pair of samples in the first region and the second region; and determining the metric value based on the samples with the offset removed.

[0180] Item 39. A method according to any one of Items 32 to 38, wherein the offset removal operation comprises: determining a predicted value or a reconstructed value for a sample point in a region; and updating the predicted value or the reconstructed value by subtracting an offset from the predicted value or the reconstructed value.

[0181] Item 40. The method of Item 39, wherein the updated predicted value or the updated reconstructed value is used for at least one of: model determination, or cost determination.

[0182] Item 41. The method of Item 39 or 40, wherein the region comprises at least one of: a block, a template, or a region.

[0183] Item 42. A method according to any one of Items 32 to 41, wherein the offset for the offset removal operation is determined based on at least one of: a sample value of a sample at a predefined position, a sample value of a pair of sample points at a pair of predefined positions, or a measurement value based on multiple sample points in an area.

[0184] Item 43. The method of Item 42, wherein the sample value of the sample at the predefined position comprises: a predicted sample value or a reconstructed sample value at the predefined position within a template of the current video block or adjacent to the template.

[0185] Item 44. The method of Item 42, wherein the sample value of the sample at the predefined position comprises: a predicted sample value or a reconstructed sample value at the predefined position within a reference block of the current video block or adjacent to the reference block.

[0186] Item 45. A method according to Item 42, wherein the offset is determined based on a difference between the sample values of the pair of samples at the pair of predefined positions, the pair of samples comprising: a first predicted sample value or a first reconstructed sample value at a first predefined position within or adjacent to a first template of the current video block, and a second predicted sample value or a second reconstructed sample value at a second predefined position within or adjacent to a second template of the current video block, the first predefined position corresponding to the second predefined position.

[0187] Item 46. A method according to Item 42, wherein the offset is determined based on a difference between the sample values of the pair of samples at the pair of predefined positions, the pair of samples including a first predicted sample value or a first reconstructed sample value at a first predefined position within a first reference block of the current video block or adjacent to the first reference block, and a second predicted sample value or a second reconstructed sample value at a second predefined position within a second reference block of the current video block or adjacent to the second reference block, the first predefined position corresponding to the second predefined position.

[0188] Item 47. A method according to any one of Items 42 to 46, wherein the predefined position or the pair of predefined positions includes at least one of the following: the upper left position of the template or reference block of the current video block, the upper right position of the template or reference block of the current video block, the lower left position of the template or reference block of the current video block, the lower right position of the template or reference block of the current video block, or the center position of the template or reference block of the current video block.

[0189] Item 48. The method of Item 42, wherein the metric value is determined based on a difference between at least two predicted samples or reconstructed samples in a first template of the current video block and at least two predicted samples or reconstructed samples in a second template of the current video block.

[0190] Item 49. The method of Item 42, wherein the metric value is determined based on a difference between at least two predicted samples or reconstructed samples in a first reference block of the current video block and at least two predicted samples or reconstructed samples in a second reference block of the current video block.

[0191] Item 50. The method of Item 42, wherein the metric value is determined based on samples in a template or reference block of the current video block.

[0192] Item 51. The method of Item 42, wherein the metric value is determined based on at least two samples at predefined positions in a template or reference block of the current video block.

[0193] Item 52. The method of Item 42, wherein the metric value is determined based on at least one of: an average of the qualified values, a median of the qualified values, a mean of the qualified values, a maximum of the qualified values, or a minimum of the qualified values.

[0194] Item 53. A method according to any one of items 1 to 52, wherein information about whether and / or how to apply the method is included in the bitstream.

[0195] Item 54. The method of Item 53, wherein the information is indicated at one of: sequence level, group of pictures level, picture level, slice level, or slice group level.

[0196] Item 55. A method according to item 53 or 54, wherein the information is indicated in a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a decoding parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header or a slice group header.

[0197] Item 56. A method according to any one of Items 53 to 55, wherein the information is indicated in an area comprising more than one sample or pixel.

[0198] Item 57. A method according to item 56, wherein the region comprises one of the following: a prediction block (PB), a transform block (TB), a codec block (CB), a prediction unit (PU), a transform unit (TU), a codec unit (CU), a virtual pipeline data unit (VPDU), a codec tree unit (CTU), a CTU row, a slice, a slice or a sub-picture.

[0199] Item 58. The method according to any one of Items 53 to 37, further comprising: determining the information based on the encoded and decoded information.

[0200] Item 59. The method of Item 58, wherein the encoded information comprises at least one of: block size, color format, single-tree partitioning or dual-tree partitioning, color component, slice type, or picture type.

[0201] Item 60. The method of any one of Items 1 to 59, wherein the converting comprises encoding the current video block into the bitstream.

[0202] Item 61. The method of any one of Items 1 to 59, wherein the converting comprises decoding the current video block from the bitstream.

[0203] Item 62. An apparatus for processing video data, comprising a processor and non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method according to any one of items 1 to 61.

[0204] Item 63. A non-transitory computer-readable storage medium storing instructions for causing a processor to perform the method according to any one of Items 1 to 61.

[0205] Item 64. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a video processing device, wherein the method includes: determining a codec tool for a current video block of the video based on a regression model; and generating the bitstream based on the codec tool, wherein the regression model is associated with at least one of: no division operation, or a coefficient determination operation.

[0206] Item 65. A method for storing a bitstream of a video, comprising: determining a codec tool for a current video block of the video based on a regression model; generating the bitstream based on the codec tool; and storing the bitstream in a non-transitory computer-readable recording medium, wherein the regression model is associated with at least one of: no division operation, or a coefficient determination operation.

[0207] Item 66. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a video processing device, wherein the method includes: determining a codec tool for a current video block of the video based on an offset removal operation; and generating the bitstream based on the codec tool.

[0208] Item 67. A method for storing a bitstream of a video, comprising: determining a codec tool for a current video block of the video based on an offset removal operation; generating the bitstream based on the codec tool; and storing the bitstream in a non-transitory computer-readable recording medium. Example device

[0209] Figure 16 A block diagram of a computing device 1600 in which various embodiments of the present disclosure may be implemented is shown. The computing device 1600 may be implemented as a source device 110 (or video encoder 114 or 200) or a destination device 120 (or video decoder 124 or 300), or may be included in a source device 110 (or video encoder 114 or 200) or a destination device 120 (or video decoder 124 or 300).

[0210] It should be understood that Figure 16 The computing device 1600 shown in FIG. 1 is for illustrative purposes only and is not intended to in any way imply any limitation on the functionality and scope of the disclosed embodiments.

[0211] like Figure 16 As shown, computing device 1600 comprises a general computing device 1600. Computing device 1600 may include at least one or more processors or processing units 1610, memory 1620, storage unit 1630, one or more communication units 1640, one or more input devices 1650, and one or more output devices 1660.

[0212] In some embodiments, computing device 1600 can be implemented as any user terminal or server terminal with computing capability. A server terminal can be a server, a large computing device, etc. provided by a service provider. A user terminal can be, for example, any type of mobile terminal, fixed terminal, or portable terminal, including a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet computer, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device, or any combination thereof, and includes accessories and peripherals of these devices, or any combination thereof. It is conceivable that computing device 1600 can support any type of interface to a user (such as a "wearable" circuit device, etc.).

[0213] Processing unit 1610 may be a physical processor or a virtual processor and may implement various processes based on a program stored in memory 1620. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capabilities of computing device 1600. Processing unit 1610 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.

[0214] The computing device 1600 typically includes various computer storage media. Such media can be any media accessible by the computing device 1600, including but not limited to volatile media and non-volatile media, or removable media and non-removable media. The memory 1620 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (such as read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM) or flash memory), or any combination thereof. The storage unit 1630 can be any removable or non-removable medium and can include machine-readable media, such as memory, a flash drive, a disk, or other media that can be used to store information and / or data and can be accessed in the computing device 1600.

[0215] The computing device 1600 may also include additional removable / non-removable storage media, volatile / non-volatile storage media. Figure 16 Although not shown, a magnetic disk drive for reading from and / or writing to a removable nonvolatile magnetic disk, and an optical disk drive for reading from and / or writing to a removable nonvolatile optical disk may be provided. In this case, each drive may be connected to a bus (not shown) via one or more data medium interfaces.

[0216] The communication unit 1640 communicates with another computing device via a communication medium. In addition, the functions of the components in the computing device 1600 can be implemented by a single computing cluster or multiple computing machines communicating via a communication connection. Thus, the computing device 1600 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general-purpose network nodes.

[0217] Input device 1650 may be one or more of various input devices, such as a mouse, keyboard, trackball, voice input device, etc. Output device 1660 may be one or more of various output devices, such as a display, speaker, printer, etc. Computing device 1600 may also communicate with one or more external devices (not shown) via communication unit 1640, such as storage devices and display devices, and / or with one or more devices that enable a user to interact with computing device 1600, or any device that enables computing device 1600 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.), if desired. Such communication may occur via an input / output (I / O) interface (not shown).

[0218] In some embodiments, some or all components of computing device 1600 may not be integrated into a single device, but may instead be arranged in a cloud computing architecture. In a cloud computing architecture, components may be provided remotely and may work together to implement the functionality described herein. In some embodiments, cloud computing provides computing, software, data access, and storage services without requiring the end user to be aware of the physical location or configuration of the systems or hardware providing these services. In various embodiments, cloud computing provides services via a wide area network (such as the Internet) using appropriate protocols. For example, a cloud computing provider provides applications over a wide area network that can be accessed via a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on servers at a remote location. Computing resources in a cloud computing environment may be consolidated or distributed across locations in remote data centers. Cloud computing infrastructure may provide services through shared data centers, although they appear to be a single access point for users. Therefore, cloud computing architecture can be used to provide the components and functionality 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.

[0219] In embodiments of the present disclosure, computing device 1600 may be used to implement video encoding / decoding. Memory 1620 may include one or more video encoding / decoding modules 1625 having one or more program instructions. These modules can be accessed and executed by processing unit 1610 to perform the functions of various embodiments described herein.

[0220] In an example embodiment performing video encoding, input device 1650 may receive video data as input 1670 to be encoded. The video data may be processed, for example, by video codec module 1625 to generate an encoded bitstream. The encoded bitstream may be provided as output 1680 via output device 1660.

[0221] In an example embodiment performing video decoding, input device 1650 may receive an encoded bitstream as input 1670. The encoded bitstream may be processed, for example, by video codec module 1625 to generate decoded video data. The decoded video data may be provided as output 1680 via output device 1660.

[0222] Although the present disclosure has been specifically shown and described with reference to the preferred embodiments of the present disclosure, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the spirit and scope of the present application as defined by the appended claims. Such changes are intended to be encompassed by the scope of the present application. Therefore, the foregoing description of the embodiments of the present application is not intended to be limiting.

Claims

1. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining a codec tool for the current video block based on a regression model; as well as Performing the conversion based on the codec tool, Wherein the regression model is associated with at least one of: no division operation or coefficient determination operation.

2. The method of claim 1, wherein the regression model comprises at least one of the following: Linear regression model, nonlinear regression models, or Polynomial regression model.

3. The method according to claim 1 or 2, wherein the encoding and decoding tools include at least one of the following: Cross-component codec tools that build relationships between luminance block samples and chrominance block samples, An inter-frame prediction codec tool for constructing a relationship between the current video block, current template, or current region sample and a reference block, reference template, or reference region sample, An intra-frame prediction codec tool for constructing a relationship between the current video block or current template or current region sample and a reference block or reference template or reference region sample, An inter-frame or intra-frame prediction codec tool that constructs a relationship between the predicted value and the reconstructed value of a reference or template or neighboring sample of the current video block, Constructing a screen content coding (SCC) prediction of the relationship between the current video block or current template or current region sample and the reference block or reference template or reference region sample, Template matching based encoding and decoding tools, Template cost-based encoding and decoding tools, Based on fusion or hybrid codec tools, Cross-Component Linear Model (CCLM) or CCLM variants, Multi-model linear model (MMLM) or variants of MMLM, Convolutional Cross-Component Model (CCCM) or its variants, Gradient linear model (GLM) or GLM variants, Local Illumination Compensation (LIC) or a variant of LIC, or Intra Template Matching Prediction (intraTMP) codec or a variant of intraTMP.

4. The method of claim 3, wherein the fusion or hybrid based codec tool comprises hybrid weight determination of at least one of the following: Template-based intra mode derivation (TIMD), Decoder-side intra mode derivation (DIMD), Inter-frame and intra-frame joint prediction (CIIP), Geometric Partitioning Mode (GPM), Airspace GPM (SGPM), Multiple Hypothesis Prediction (MHP), Bidirectional prediction (BCW) with codec unit (CU) level weights, Chroma fusion, or Brightness fusion. 5 . The method of claim 1 , wherein the regression model is updated based on a slope adjustment parameter determined from the division-free operation. The method of claim 5 , wherein the slope adjustment parameter is applied to update a prediction model based on the regression model.

7. The method according to claim 5 or 6, further comprising: The slope adjustment parameter is determined based on an average of a plurality of sample values associated with the current video block.

8. The method according to claim 7, wherein the plurality of sample values comprises at least one of the following: at least one adjacent luma sample value of the current video block, or At least one neighboring chroma sample value of the current video block.

9. The method according to claim 7, wherein the plurality of sample values comprises at least one of the following: At least one adjacent luma sample value of a reference block of the current video block, or At least one neighboring chroma sample value of the reference block.

10. The method of claim 5 or 6, wherein the slope adjustment parameter is determined based on the division-free operation, and the slope adjustment parameter is used for at least one of: a cross-component linear model (CCLM) or a multiple model linear model (MMLM).

11. The method according to any one of claims 5 to 10, wherein the division-free operation is based on a multiplication and shift operation with a scaling factor.

12. The method according to any one of claims 5 to 10, wherein a division operation is replaced by the non-division operation comprising a multiplication operation with a scaling factor and a shift operation.

13. The method of claim 12, wherein at least one of the scaling factor or the shift value of the shift operation is determined based on a denominator of the division operation. The method of claim 13 , wherein the shift value is determined based on a logarithmic value of the denominator.

15. The method according to claim 13 or 14, wherein the denominator is normalized to a predetermined range by applying the shift operation. The method of claim 15 , wherein the predetermined range is 1.0 to 2.

0.

17. The method according to claim 15 or 16, wherein the scaling factor is determined based on a fractional part of the normalized denominator, the fractional part having a predefined precision. The method of claim 17 , wherein the predefined precision comprises a precision corresponding to a predefined number of bits. The method of claim 18 , wherein the predefined number is 14.

20. The method of any one of claims 11 to 19, wherein the division-free operation is based on a piecewise polynomial metric.

21. The method of claim 20, wherein the scaling factor without the division operation is determined based on an M-segment polynomial model, M being a predefined integer equal to a power of 2.

22. The method of claim 21, wherein at least one parameter of the polynomial model in a plurality of segments of the polynomial model is predetermined and stored in a lookup table.

23. A method according to any one of claims 20 to 22, wherein coefficients of 1st power terms are realised by the shift operation and without storage of values for the coefficients.

24. The method of any one of claims 11 to 23, wherein the divide-free operation is based on an integer lookup table (LUT).

25. The method of any one of claims 1 to 24, wherein the regression model comprises the following operations: <h2 style=";text-align:left;direction:ltr">sampVal = a0Y0+a1Y1+a2Y2+a3Y3+…+a<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> Y<h2 style=";text-align:left;direction:ltr"> i <h2 style=";text-align:left;direction:ltr"> +a<h2 style=";text-align:left;direction:ltr"> i+1 <h2 style=";text-align:left;direction:ltr"> B, Among them, Y0, Y1, Y2, Y3, ...Y i Represents the value of the reconstructed sample or predicted sample based on the input area, B represents the bias term, a0, a1, a2, a3, ...a i+1 represents the filter coefficient, and sampVal represents the predicted value in the output region.

26. The method of claim 25, wherein the input region comprises a template or a reference block of the current video block, and the output region comprises the template or the current video block.

27. The method according to any one of claims 1 to 26, wherein the coefficient determination operation comprises: At least one coefficient of the regression model is determined based on regression-based mean squared error (MSE) minimization.

28. The method of claim 27, wherein the regression-based MSE minimization is based on at least one of: Minimize the metric between the predicted samples and the reconstructed samples in the reference area or template of the current video block, or A metric value between reconstructed samples in a reference template for the current video block and reconstructed samples in a current template for the current video block is minimized.

29. The method of claim 28, wherein the metric value comprises at least one of the following: Mean squared error (MSE), Sum of Squared Error (SSE), Sum of Absolute Differences (SAD), Sum of Absolute Transformation Differences (SATD), or Difference.

30. The method of any one of claims 1 to 29, wherein the regression model having filter coefficients determined based on the coefficient determination operation is applied to determine predicted sample values for at least one of: the current video block, a template of the current video block, or a region.

31. The method according to any one of claims 1 to 30, wherein the coefficient determination operation is based on at least one of the following: LDL breakdown or variants of LDL breakdown, LU decomposition or a variant of LU decomposition, Cholesky decomposition or a variant of Cholesky decomposition, Gaussian elimination or a variant of Gaussian elimination, or The Least Squares tool or a variation of the Least Squares tool.

32. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining a codec for the current video block based on an offset removal operation; as well as The conversion is performed based on the codec tool.

33. The method of claim 32, wherein the codec tool comprises at least one of: Cross-component codec tools that build relationships between luminance block samples and chrominance block samples, An inter-frame prediction codec tool for constructing a relationship between the current video block, current template, or current region sample and a reference block, reference template, or reference region sample, An intra-frame prediction codec tool for constructing a relationship between the current video block or current template or current region sample and a reference block or reference template or reference region sample, An inter-frame or intra-frame prediction codec tool that constructs a relationship between the predicted value and the reconstructed value of a reference or template or neighboring sample point of the current video block, Constructing a screen content coding (SCC) prediction of the relationship between the current video block or current template or current region sample and the reference block or reference template or reference region sample, Template matching based encoding and decoding tools, Template cost-based encoding and decoding tools, Based on fusion or hybrid codec tools, Cross-Component Linear Model (CCLM) or CCLM variants, Multi-model linear model (MMLM) or variants of MMLM, Convolutional Cross-Component Model (CCCM) or its variants, Gradient linear model (GLM) or GLM variants, Local Illumination Compensation (LIC) or a variant of LIC, or Intra Template Matching Prediction (intraTMP) codec or a variant of intraTMP.

34. The method of claim 33, wherein the fusion or hybrid based codec tool comprises hybrid weight determination of at least one of: Template-based intra mode derivation (TIMD), Decoder-side intra mode derivation (DIMD), Inter-frame and intra-frame joint prediction (CIIP), Geometric Partitioning Mode (GPM), Airspace GPM (SGPM), Multiple Hypothesis Prediction (MHP), Bidirectional prediction (BCW) with codec unit (CU) level weights, Chroma fusion, or Brightness fusion.

35. The method according to any one of claims 32 to 34, wherein in the codec tool, a metric value between samples in a first region and samples in a second region is determined based on the offset removal operation.

36. The method of claim 35, wherein the metric value comprises at least one of the following: cost, error, Sum of Absolute Differences (SAD), Sum of Absolute Transformation Differences (SATD), Mean squared error (MSE), The sum of squared errors (SSE), or Difference.

37. The method of claim 35 or 36, wherein the first region or the second region comprises at least one of: a block, a template, or a region.

38. The method of any one of claims 35 to 37, wherein determining the metric value comprises: removing an offset for each pair of sample points in the first area and the second area; as well as The metric value is determined based on the debiased samples.

39. The method according to any one of claims 32 to 38, wherein the offset removal operation comprises: determining predicted or reconstructed values for sample points in the region; and The predicted value or the reconstructed value is updated by subtracting an offset from the predicted value or the reconstructed value.

40. The method of claim 39, wherein the updated predicted value or the updated reconstructed value is used for at least one of: model determination or cost determination.

41. The method of claim 39 or 40, wherein the region comprises at least one of: a block, a template, or a region.

42. The method of any one of claims 32 to 41, wherein an offset for the offset removal operation is determined based on at least one of: Sample values of sample points at predefined positions, the sample values of a pair of samples at a pair of predefined positions, or A metric value based on multiple sample points in an area.

43. The method of claim 42, wherein the sample point value of the sample point at the predefined position comprises: The predicted sample value or the reconstructed sample value at the predefined position within the template of the current video block or adjacent to the template.

44. The method of claim 42, wherein the sample point values of the sample points at the predefined positions comprise: The predicted sample value or the reconstructed sample value at the predefined position within the reference block of the current video block or adjacent to the reference block.

45. The method of claim 42, wherein the offset is determined based on a difference between the sample point values of the pair of sample points at the pair of predefined locations, the pair of sample points comprising: a first predicted sample value or a first reconstructed sample value at a first predefined position within a first template of the current video block or adjacent to the first template, and a second predicted sample value or a second reconstructed sample value at a second predefined position within a second template of the current video block or adjacent to the second template, wherein the first predefined position corresponds to the second predefined position.

46. The method of claim 42 , wherein the offset is determined based on a difference between the sample values of the pair of samples at the pair of predefined positions, the pair of samples comprising a first predicted sample value or a first reconstructed sample value at a first predefined position within a first reference block of the current video block or adjacent to the first reference block, and a second predicted sample value or a second reconstructed sample value at a second predefined position within a second reference block of the current video block or adjacent to the second reference block, the first predefined position corresponding to the second predefined position.

47. The method according to any one of claims 42 to 46, wherein the predefined position or the pair of predefined positions comprises at least one of: The upper left position of the template or reference block of the current video block, the upper right position of the template or reference block of the current video block, the lower left position of the template or reference block of the current video block, The lower right position of the template or reference block of the current video block, or The center position of the template or reference block of the current video block.

48. The method of claim 42, wherein the metric value is determined based on a difference between at least two predicted samples or reconstructed samples in a first template of the current video block and at least two predicted samples or reconstructed samples in a second template of the current video block.

49. The method of claim 42, wherein the metric value is determined based on a difference between at least two predicted samples or reconstructed samples in a first reference block of the current video block and at least two predicted samples or reconstructed samples in a second reference block of the current video block.

50. The method of claim 42, wherein the metric value is determined based on samples in a template or reference block of the current video block.

51. The method of claim 42, wherein the metric value is determined based on at least two samples at predefined locations in a template or reference block of the current video block.

52. The method of claim 42, wherein the metric value is determined based on at least one of: The average value of qualified values, The median of the qualified values, The mean of qualified values, the maximum of the qualified values, or The minimum qualified value.

53. The method according to any one of claims 1 to 52, wherein information on whether and / or how to apply the method is included in the bitstream.

54. The method of claim 53, wherein the information is indicated at one of: sequence level, group of pictures level, picture level, slice level, or slice group level.

55. The method of claim 53 or 54, wherein the information is indicated in a sequence header, a picture header, a sequence parameter set (SPS), a video parameter set (VPS), a decoding parameter set (DPS), decoding capability information (DCI), a picture parameter set (PPS), an adaptation parameter set (APS), a slice header, or a slice group header.

56. A method according to any one of claims 53 to 55, wherein the information is indicated in an area comprising more than one sample or pixel.

57. The method of claim 56, wherein the region comprises one of a prediction block (PB), a transform block (TB), a codec block (CB), a prediction unit (PU), a transform unit (TU), a codec unit (CU), a virtual pipeline data unit (VPDU), a codec tree unit (CTU), a CTU row, a slice, a slice, or a sub-picture.

58. The method of any one of claims 53 to 37, further comprising: The information is determined based on the encoded and decoded information.

59. The method of claim 58, wherein the coded information comprises at least one of: block size, color format, single-tree partitioning or dual-tree partitioning, color component, slice type, or picture type.

60. The method of any one of claims 1 to 59, wherein the converting comprises encoding the current video block into the bitstream.

61. The method of any one of claims 1 to 59, wherein the converting comprises decoding the current video block from the bitstream.

62. An apparatus for processing video data, comprising a processor and non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of claims 1 to 61.

63. A non-transitory computer-readable storage medium storing instructions for causing a processor to execute the method according to any one of claims 1 to 61.

64. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a video processing apparatus, wherein the method comprises: determining a codec for a current video block of the video based on the regression model; as well as generating the bitstream based on the codec tool, The regression model is associated with at least one of: no division operation, or a coefficient determination operation.

65. A method for storing a bitstream of a video, comprising: determining a codec for a current video block of the video based on the regression model; generating the bitstream based on the codec tool; as well as storing the bitstream in a non-transitory computer-readable recording medium, The regression model is associated with at least one of: no division operation, or a coefficient determination operation.

66. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method performed by a video processing apparatus, wherein the method comprises: determining a codec tool for a current video block of the video based on the offset removal operation; as well as The bitstream is generated based on the codec tool.

67. A method for storing a bitstream of a video, comprising: determining a codec tool for a current video block of the video based on the offset removal operation; generating the bitstream based on the codec tool; as well as The bitstream is stored in a non-transitory computer-readable recording medium.