Encoding / decoding methods, bitstreams, encoders, decoders, and storage media

By determining the target filtering mode and reference region for intra-prediction based on block size, the method improves encoding/decoding performance and reduces complexity in video encoding standards.

JP2026523171APending Publication Date: 2026-07-13GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025574238
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2026-07-13

AI Technical Summary

Technical Problem

Existing video encoding standards face inefficiencies in encoding/decoding performance and temporal complexity due to interpolation-based intra-prediction techniques.

Method used

Determine the target filtering mode and reference region of a current block based on its size parameters, calculate filter coefficients, and perform intra-prediction to improve encoding/decoding performance and reduce complexity.

Benefits of technology

Reduces computational complexity and shortens encoding time while maintaining accuracy, thereby enhancing the cost-effectiveness of video encoding/decoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026523171000001_ABST
    Figure 2026523171000001_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium. The decoding method applied to the decoder includes the steps of: decoding a bitstream and determining a target filtering mode for the current block; determining a reference region for the current block based on the size parameter and target filtering mode of the current block; determining filter coefficients for the current block based on the reference region of the current block; and performing an intra-prediction on the current block based on the filter coefficients to determine a predicted value for the current block. This reduces temporal complexity while ensuring encoding / decoding performance.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The embodiments of this application relate to the field of video encoding and decoding technology, and more particularly to encoding and decoding methods, bitstreams, encoders, decoders, and storage media. [Background technology]

[0002] As people's demands for higher video display quality increased, high-resolution video, such as high-definition and ultra-high-definition, emerged. However, high-resolution video typically contains more information and therefore requires more bandwidth. To reduce bandwidth requirements, video encoding standards related to video compression have been introduced.

[0003] Currently, video encoding standards propose an interpolation-based intra-prediction technique. Specifically, this technique obtains interpolation filter coefficients from the reconstructed pixel values ​​surrounding the current block and uses them for intra-prediction of the current block. However, existing technical proposals still have several shortcomings, resulting in poor cost-effectiveness in terms of encoding / decoding performance and temporal complexity. [Overview of the project]

[0004] The embodiments of this application provide an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium that can reduce temporal complexity while guaranteeing encoding / decoding performance.

[0005] The technical solution of the embodiment of the present application can be realized as follows.

[0006] In a first aspect, an embodiment of the present application provides a decoding method applicable to a decoder, the method being: The steps include: decrypting the bitstream and determining the target filtering mode for the current block, The steps include determining the reference region of the current block based on the current block's size parameters and target filtering mode, Determining a filter coefficient of a current block based on a reference region of the current block, and performing intra prediction on the current block based on the filter coefficient to determine a predicted value of the current block.

[0007] As a second aspect, an embodiment of the present application provides an encoding method applied to an encoder, the method including: determining a target filtering mode of a current block; determining a reference region of the current block based on a size parameter and the target filtering mode of the current block; determining a filter coefficient of the current block based on the reference region of the current block; performing intra prediction on the current block based on the filter coefficient to determine a predicted value of the current block.

[0008] As a third aspect, an embodiment of the present application provides a bitstream generated by bit encoding based on encoding target information, where the encoding target information includes at least one of a target filtering mode of a current block, a residual value of the current block, and a transform kernel index value of the current block.

[0009] As a fourth aspect, an embodiment of the present application provides an encoder including a first determination unit and a first prediction unit, where the first determination unit is configured to determine a target filtering mode of a current block and determine a reference region of the current block based on a size parameter and the target filtering mode of the current block, and the first prediction unit is configured to determine a filter coefficient of the current block based on the reference region of the current block, perform intra prediction on the current block based on the filter coefficient, and determine a predicted value of the current block.

[0010] In a fifth aspect, an embodiment of the present application provides an encoder comprising a first memory and a first processor, The first memory is used to store computer programs that can be executed on the first processor. The first processor is used to perform the method described in the second embodiment when executing a computer program.

[0011] In a sixth aspect, an embodiment of the present application provides a decoder comprising a decoding unit, a second determination unit, and a second prediction unit. The decoding unit is configured to decode the bitstream and determine the target filtering mode for the current block. The second decision unit is configured to determine the reference region of the current block based on the size parameters and target filtering mode of the current block. The second prediction unit is configured to determine the filter coefficients for the current block based on the reference region of the current block, perform an intra-prediction on the current block based on the filter coefficients, and determine the predicted value for the current block.

[0012] In a seventh aspect, an embodiment of the present application provides a decoder comprising a second memory and a second processor, The second memory is used to store computer programs that can be executed on the second processor. The second processor is used to perform the method described in the first embodiment when executing a computer program.

[0013] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium that stores a computer program, and when the computer program is executed, the method according to the first aspect or the method according to the second aspect is realized.

[0014] Embodiments of the present invention provide an encoding / decoding method, a bitstream, an encoder, a decoder, and a storage medium. In both the encoding and decoding sides, after determining the target filtering mode of the current block, the reference region of the current block is determined based on the size parameter and target filtering mode of the current block. Next, the filter coefficients of the current block are determined based on the reference region of the current block. Furthermore, intra-prediction is performed on the current block based on the filter coefficients to determine the predicted value of the current block. Thus, in the intra-prediction technique based on interpolation filtering, when determining the reference region for calculating the filter coefficients, it is related not only to the target filtering mode but also to the size parameter of the current block. For example, a large reference region can be used when the size of the current block is large, and a small reference region can be used when the size of the current block is small. This reduces the complexity of the calculation and shortens the encoding time. At the same time, the accuracy of the intra-prediction can be improved, thereby improving the encoding / decoding performance. [Brief explanation of the drawing]

[0015] [Figure 1A] This is a schematic diagram 1 showing an example of a calculation method for obtaining the numerical value m. [Figure 1B] This is a schematic diagram 2 showing an example of a calculation method for obtaining the numerical value m. [Figure 1C] Schematic Figure 3 shows an example of a calculation method for obtaining the numerical value m. [Figure 2A] This is a schematic diagram 1 showing an example of the positional relationship between the current block and the reconstruction area. [Figure 2B] This is a schematic diagram 2 showing an example of the positional relationship between the current block and the reconstruction area. [Figure 2C] Schematic diagram 3 shows an example of the positional relationship between the current block and the reconstruction area. [Figure 3A] Schematic Figure 1 shows an example of the shape of an interpolation filter. [Figure 3B] Schematic Figure 2 shows an example of the shape of an interpolation filter. [Figure 3C]Schematic Figure 3 shows an example of the shape of an interpolation filter. [Figure 4] This is a schematic diagram showing the structure for obtaining inputs and outputs at possible positions of the interpolation filter. [Figure 5] This is a schematic diagram showing the prediction direction based on interpolation filtering. [Figure 6] This is a schematic diagram showing the angular mode of intra-prediction. [Figure 7] This is a schematic diagram showing a 3x3 window that slides within the prediction block. [Figure 8] This is a schematic diagram showing the cumulative gradient variation in different angular directions. [Figure 9A] This is a block diagram of the encoder configuration provided in the embodiment of the present application. [Figure 9B] This is a block diagram of the decoder configuration provided in the embodiment of the present application. [Figure 10] This is a schematic diagram showing the network architecture of the encoding / decoding system provided by the embodiment of the present invention. [Figure 11] This is flowchart 1 of the decoding method provided in the embodiment of the present application. [Figure 12A] This is schematic diagram 1, showing an example of the reference region of the present block provided by the embodiment of the present application. [Figure 12B] This is schematic diagram 2, showing an example of the reference region of the present block provided by the embodiment of the present application. [Figure 12C] Schematic Figure 3 shows an example of the reference region of the present block provided by the embodiment of the present application. [Figure 13] This is flowchart 2 of the decoding method provided in the embodiment of the present invention. [Figure 14A] Figure 1 is a schematic diagram showing the distribution of the linear and nonlinear terms of the target filter provided in the embodiment of the present invention. [Figure 14B] Figure 2 is a schematic diagram showing the distribution of linear and nonlinear terms of the interpolation filter provided in the embodiment of the present invention. [Figure 14C] Figure 3 is a schematic diagram showing the distribution of linear and nonlinear terms of the interpolation filter provided in the embodiment of the present invention. [Figure 15A]Figure 1 is a schematic diagram showing the distribution of linear and nonlinear terms of another target filter provided by the embodiment of the present invention. [Figure 15B] Figure 2 is a schematic diagram showing the distribution of linear and nonlinear terms of another interpolation filter provided in the embodiment of the present invention. [Figure 15C] Figure 3 is a schematic diagram showing the distribution of linear and nonlinear terms of another interpolation filter provided in the embodiment of the present invention. [Figure 16A] Figure 1 is a schematic diagram showing the distribution of linear and nonlinear terms of yet another target filter provided by the embodiment of the present invention. [Figure 16B] Figure 2 is a schematic diagram showing the distribution of linear and nonlinear terms of yet another interpolation filter provided by the embodiment of the present invention. [Figure 16C] Figure 3 is a schematic diagram showing the distribution of linear and nonlinear terms of yet another interpolation filter provided in the embodiment of the present invention. [Figure 17] This is flowchart 1 of the encoding method provided in the embodiment of the present application. [Figure 18A] Figure 1 is a schematic diagram showing an example of the division of the reference region provided by the embodiment of the present application. [Figure 18B] This is schematic diagram 2, showing an example of the division of the reference region provided by the embodiment of the present application. [Figure 18C] Schematic Figure 3 shows an example of the division of the reference region provided by the embodiment of the present application. [Figure 19] This is flowchart 2 of the encoding method provided in the embodiment of the present application. [Figure 20] This is a schematic diagram showing the configuration of the encoder provided in the embodiment of the present invention. [Figure 21] This is a schematic diagram showing the specific hardware configuration of the encoder provided in the embodiment of the present invention. [Figure 22] This is a schematic diagram showing the configuration of the decoder provided in the embodiment of the present invention. [Figure 23] This is a schematic diagram showing the specific hardware configuration of the decoder provided in the embodiment of the present invention. [Figure 24] This is a schematic diagram showing the configuration of the encoding / decoding system provided by the embodiment of the present invention. [Modes for carrying out the invention]

[0016] To gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of these embodiments will be described in detail below with reference to the attached drawings. The attached drawings are for illustrative purposes only and do not limit the embodiments of this application.

[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art. The terms used herein are for illustrative purposes only and are not intended to limit the application.

[0018] In the following description, "several embodiments" refers to a subset of all possible embodiments. However, it should be understood that "several embodiments" may be the same or different subsets of all possible embodiments and can be combined with each other as long as they do not contradict each other.

[0019] Furthermore, the terms "First," "Second," and "Third" relating to the embodiments of this application are used solely to distinguish similar objects and do not represent a specific order of objects. It should be understood that "First," "Second," and "Third" may, under permissible circumstances, be used to swap a specific order or sequence, allowing the embodiments of this application described herein to be carried out in an order other than that illustrated or described herein.

[0020] Before describing the embodiments of this application in more detail, we will first explain the nouns and terms used in the embodiments of this application. The nouns and terms used in the embodiments of this application will be used in the following interpretations.

[0021] Joint Video Experts Team (JVET).

[0022] H.266 / Versatile Video Coding (VVC).

[0023] The VVC reference software test platform (VVC Test Model, VTM).

[0024] Enhanced Compression Mode (ECM).

[0025] Interpolation Intra Prediction (EIP).

[0026] Multiple Transform Selection (MTS).

[0027] Discrete Cosine Transform (DCT).

[0028] Discrete Sine Transform (DST).

[0029] Non-Separable Primary Transform (NSPT).

[0030] Low Frequency Non-separable Secondary Transform (LFNST).

[0031] Direct Current (DC) mode.

[0032] Planar mode.

[0033] Direct Mode (DM).

[0034] Intra-block copy (IBC).

[0035] Wide-angle intra-prediction (WAIP).

[0036] Sum of Squares for Error (SSE).

[0037] Mean Squared Error (MSE).

[0038] Sum of Absolute Difference (SAD).

[0039] Understandably, an interpolation-based intra-prediction technique refers to a technique that obtains interpolation filter coefficients from the reconstructed pixel values ​​surrounding the current block and uses them for intra-prediction of the current block. Specifically, an interpolation-based intra-prediction technique may include one or more of the following features:

[0040] (a) The number of taps in the interpolation filter should be 2 or more, and the interpolation filter may have various shapes, and the shape of the selected interpolation filter is controlled using syntax elements.

[0041] (b) The reconstructed pixels used to obtain the interpolation filter coefficients should be located within one or more regions surrounding the current block, and the region to be used to obtain the interpolation filter coefficients should be selected using the syntax element.

[0042] (c) Interpolation filter prediction can be used for intrablock prediction of luminance or chrominance.

[0043] (d) When using interpolation filter prediction on a block, predictions should be made in a specific order from the top left corner to the bottom right corner of the block.

[0044] (e) The input to the interpolation filter is the reconstructed pixel value and / or the predicted pixel value, which may be the reconstructed value and / or predicted value obtained by subtracting a certain numerical value.

[0045] (f) In accordance with (e) above, if a certain value is subtracted from the input of the interpolation filter, the interpolation result should have that value added back.

[0046] (g) The maximum and minimum values ​​can be obtained from the reconstructed pixel values ​​around the current block and used to limit the output range of the interpolation filter.

[0047] Furthermore, the specific intra-prediction technique based on interpolation filtering can be explained in detail from the following aspects.

[0048] (1) Obtaining the mean, minimum, and maximum values.

[0049] In one embodiment, the maximum and minimum values ​​of the reconstructed pixels are found within a 13x13 reconstruction region surrounding the current block. These maximum and minimum values ​​can then be used to limit the range of the prediction results.

[0050] In one embodiment, a numerical value m is obtained that needs to be subtracted at the input of the interpolation filter and added at the output, based on the following method. m is a value used during DC mode prediction, and m is a positive integer.

[0051] For example, in Figures 1A, 1B, and 1C, the calculation methods for obtaining the numerical value m can be divided into three cases.

[0052] (i) If the width of the current block is equal to its height, then m is equal to the average value of the reconstructed pixels in the top row and leftmost column of the current block. See Figure 1A for details.

[0053] (ii) If the width of the current block is greater than the height, m ​​is equal to the average value of the reconstructed pixels in the top row of the current block. See Figure 1B for details.

[0054] (iii) If the height of the current block is greater than its width, m is equal to the average value of the reconstructed pixels in the leftmost column of the current block. See Figure 1C for details.

[0055] In implementation, the calculation method used here can be summarized as shown in Table 1.

[0056] [Table 1]

[0057] (ii) Obtaining interpolation filter coefficients.

[0058] In one embodiment, three types of 15-tap interpolation filters and three types of reconstruction regions are defined.

[0059] Figure 2A is a schematic diagram showing the positional relationship between the current block and the reconstruction area. As shown in Figure 2A, the reconstruction area may include an upper adjacent area adjacent to the top of the current block and a left adjacent area adjacent to the left of the current block. Here, the length of the upper adjacent area is 2 × Width + 13 and the width is 13, and the length of the left adjacent area is 2 × Height + 13 and the width is 13. Figure 2B is a schematic diagram showing the positional relationship between another current block and the reconstruction area. As shown in Figure 2B, the reconstruction area may include an upper adjacent area adjacent to the top of the current block. Here, the length of the upper adjacent area is 2 × Width + 13 and the width is 13. Figure 2C is a schematic diagram showing yet another positional relationship between the current block and the reconstruction area. As shown in Figure 2C, the reconstruction area may include a left adjacent area adjacent to the left of the current block. Here, the length of the left adjacent area is 2 × Height + 13 and the width is 13. In Figures 2A, 2B, and 2C, Height and Width represent the current height and width, respectively. It should be noted that the reconstruction region in Figures 2A, 2B, and 2C, i.e., the 13 rows and / or 13 columns of reconstructed pixels surrounding the current block, can be used to obtain the interpolation filter coefficients.

[0060] Figure 3A is a schematic diagram showing the shape of an interpolation filter. As shown in Figure 3A, the shape of the interpolation filter is a 4x4 square. Figure 3B is a schematic diagram showing the shape of another interpolation filter. As shown in Figure 3B, the shape of the interpolation filter is a 2x8 rectangle. Figure 3C is a schematic diagram showing yet another interpolation filter. As shown in Figure 3C, the shape of the interpolation filter is an 8x2 rectangle. In Figures 3A, 3B, and 3C, the grid-like filled areas represent the input positions of the interpolation filter, and the black filled areas represent the output positions of the interpolation filter.

[0061] Thus, by combining three types of reconstruction regions and three types of interpolation filter shapes in different ways, 3 × 3 different filtering modes can be derived (each combination of filter shape and reconstruction region can derive one filtering mode). The encoder determines the combination of filter shape and reconstruction region based on the rate-distortion cost. In this way, when predicting the current block, the encoder and decoder first determine the coefficients of the interpolation filter based on the determined filter shape and reconstruction region.

[0062] In one embodiment, the input to the interpolation filter is the pixel value after mean removal (i.e., the reconstructed pixel value minus the mean). In this case, when acquiring the parameters, the selected interpolation filter is slid over the selected region, with horizontal and vertical sliding steps of 1 pixel distance. See Figure 4 for details. Here, a schematic diagram is shown of a structure in which a 4x4 interpolation filter acquires input and output at possible positions of the interpolation filter within the selected reconstruction region. Here, the acquired input and output are used to construct an autocorrelation matrix and a cross-correlation vector. If the selected reconstruction region contains pixel values ​​that have not been reconstructed, those pixel values ​​are not included in the samples for acquiring the interpolation filter parameters.

[0063] In this case, the linear system of equations for constructing the Wiener-Hoff equations, specifically the autocorrelation matrix and cross-correlation vector, is as shown in Equation 1.

[0064]

number

[0065] (3) Prediction of the current block.

[0066] In one embodiment, the prediction process currently starts from the upper left corner of the block and makes predictions in a fixed order toward the lower left corner. The prediction formula is as shown in Equation 2.

[0067]

number

[0068] As an example, Figure 5 shows how the interpolation filter makes predictions along the diagonal. Here, the filled-in grid represents the input position of the interpolation filter, and the filled-in black area represents the output position of the interpolation filter. Furthermore, in practice, prediction targets located on the same diagonal can be predicted in parallel.

[0069] (iv) Classification of prediction blocks and selection of transformation kernels.

[0070] After predicting the current block, a predicted block of the current block can be obtained. The predicted block contains the predicted value of at least one pixel in the current block. Different angular modes are suitable for the use of different transformations, including the primary transformation MTS, NSPT, and the secondary transformation LFNST, for the predicted block.

[0071] Here, MTS includes several conventional transformations such as DCT transformation and DST transformation. NSPT and LFNST obtain a set of transformation coefficients using a general-purpose training set based on optimal transformations. The difference between NSPT and LFNST is that NSPT is used directly to transform residual coefficients, while LFNST further transforms the transformation coefficients after DCT2 transformation.

[0072] In contrast to conventional prediction modes (PLANAR mode, DC mode, and angle mode), unseparated linear transformation (NSPT) or unseparated quadratic transformation (LFNST) can perform transformations by mapping different conventional prediction modes to different groups of transformation kernels using a lookup table-like mapping.

[0073] In the reference software ECM, as shown in Figure 6, the conventional intra-prediction mode is: Intra Prediction Mode Index is 0 in PLANAR mode, DC mode where the intra-predictive mode index is 1, The intra-predictive mode index may include angular modes ranging from 2 to 66.

[0074] Also, it should be noted that, as shown in FIG. 6, the intra prediction mode may include angular modes from 2 to 66, and wide-angle modes from -1 to 14 and from 67 to 80. Here, the directions of the arrows in FIG. 6 are the directions of angular mode prediction existing in VVC, and they use intra prediction mode indexes from 2 to 66 during encoding and decoding. When the current block is a non-square block, some of the angular directions are replaced with wide-angle modes (-1 to -14 and 67 to 80 shown in FIG. 6).

[0075] In the reference software ECM, NSPT and LFNST respectively divide the conversion kernels of the conventional prediction modes into 35 groups, and each group has three selectable conversion kernels. Table 2 shows the correspondence between the conventional prediction modes and the conversion kernel groups.

[0076] <O000414>

Table 2

[0077] In one embodiment, a method of mapping a prediction block based on interpolation filtering to a conventional prediction mode is proposed here, and then, according to the mapped conventional prediction mode, the prediction block based on interpolation filtering is corresponded to different conversion kernels of a predetermined primary conversion (separable or non-separable) or secondary conversion (separable or non-separable). Specifically, the prediction block based on interpolation filtering is mapped to the PLANAR mode or the mode with an angular direction from 2 to 66 according to the predicted values within the prediction block. Specifically, it may include the following steps.

[0078] As the first step, a sliding 3×3 window is used to calculate the gradient values G x ]>[in the horizontal and vertical directions of each 3×3 window within the prediction block based on interpolation filtering. and G y Here, G x and G y are respectively the 3×3 horizontal gradient operator M x and the vertical gradient operator M yIt is obtained by the point-raising product of the predicted value within the window position.

[0079]

number

number

[0080] Figure 7 is a schematic diagram of a 3x3 window sliding within a prediction block, which can slide horizontally and vertically. Assuming that the prediction block based on interpolation filtering is a block of size w and h, the sliding 3x3 window represents G at (w-2) × (h-2) positions around the center of the prediction block. x and G y It is possible to calculate this.

[0081] As the second step, G at each position x and G y Based on this, the conventional angular direction O corresponding to each position is calculated according to equations 5 and 6, and the value G of the gradient variation range of the angle corresponding to each position is also calculated. Specifically, it is as follows.

[0082]

number

number

[0083] In some embodiments, the calculation process for atan() can be simplified and performed using lookup tables or some modifications.

[0084] In the third step, the gradient variation value G at each position is accumulated over the derived conventional angular modes to obtain a histogram of gradient variation values ​​as shown in Figure 8. Finally, the conventional angular mode with the largest cumulative gradient variation is selected from the histogram as the prediction mode corresponding to the current block. In particular, if all the gradient variation values ​​derived from all conventional angular modes are zero, the current block is mapped to the prediction mode corresponding to the conventional PLANAR mode.

[0085] To further explain, in the embodiments of this invention, the conventional prediction mode derived from the interpolation filter prediction is used to select the NSPT and LFNST conversion kernel groups.

[0086] However, since the intra-predictive interpolation filtering technique was proposed at the JVET conference, feedback received indicates that the cost-effectiveness of the encoding / decoding performance and encoder complexity needs to be improved. In the latest ECM-8.0 reference software, the encoding time and complexity of the related technical proposals described here are between 108% and 109%.

[0087] Based on this, the embodiment of the present application proposes an encoding method that determines the target filtering mode of the current block, determines the reference region of the current block based on the size parameter and target filtering mode of the current block, determines the filter coefficients of the current block based on the reference region of the current block, performs intra-prediction on the current block based on the filter coefficients, and determines the predicted value of the current block.

[0088] The embodiment of the present invention proposes a decoding method that decodes a bitstream, determines the target filtering mode of the current block, determines the reference region of the current block based on the size parameter and target filtering mode of the current block, determines the filter coefficients of the current block based on the reference region of the current block, performs intra-prediction on the current block based on the filter coefficients, and determines the predicted value of the current block.

[0089] This means that in intra-prediction techniques based on interpolation filtering, determining the reference region for calculating filter coefficients is related not only to the target filtering mode but also to the current block size parameter. For example, a large reference region can be used when the current block size is large, and a small reference region can be used when the current block size is small. In this way, computational complexity can be reduced, coding time can be shortened, and the cost-effectiveness of coding / decoding performance and coding complexity can be improved while guaranteeing coding / decoding performance. At the same time, the accuracy of intra-prediction can be improved, thereby improving coding / decoding efficiency.

[0090] The embodiments of this application will be described in detail below with reference to the drawings.

[0091] Referring to Figure 9A, a block diagram of the encoder provided by the embodiment of the present application is shown. As shown in Figure 9A, the encoder (specifically, the "video encoder") 100 may include a transformation / quantization unit 101, an intra-estimation unit 102, an intra-prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transformation / inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, an encoding unit 109, and a decoded image buffer unit 110, etc. Here, the filtering unit 108 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC). For the input original video signal, video encoding blocks are obtained by dividing the coding tree unit (CTU). Subsequently, the encoding blocks of the video are transformed by the transformation / quantization unit 101 using residual pixel information obtained through intra or inter-prediction. This involves transforming the residual information from the pixel region to the transformation region and quantizing the resulting transformation coefficients to further reduce the bitrate. The intra-estimation unit 102 and the intra-prediction unit 103 are used to perform intra-prediction of the encoding blocks of the video. More precisely, the intra-estimation unit 102 and the intra-prediction unit 103 are used to determine the intra-prediction mode to be used to encode the encoding blocks of the video. The motion compensation unit 104 and the motion estimation unit 105 are used to provide temporal prediction information by performing inter-prediction coding relative to one or more blocks in one or more reference frames of the encoding blocks of the received video. The motion estimation performed by the motion estimation unit 105 is a process that generates motion vectors, which can be used to estimate the motion of the encoding blocks of the video.Subsequently, the motion compensation unit 104 performs motion compensation based on the motion vector determined by the motion estimation unit 105. After determining the intra-prediction mode, the intra-prediction unit 103 is also used to provide the selected intra-prediction data to the encoding unit 109, and the motion estimation unit 105 also transmits the calculated and determined motion vector data to the encoding unit 109. Furthermore, the inverse transform / inverse quantization unit 106 is used to reconstruct the encoded blocks of the video and to reconstruct residual blocks in the pixel region. After block noise artifacts are removed from the reconstructed residual blocks by the filter control analysis unit 107 and the filtering unit 108, they are added to a prediction block in the frame of the decoded image buffer unit 110 to generate the encoded blocks of the reconstructed video. The encoding unit 109 is used to encode various encoding parameters and quantized transformation coefficients. In the CABAC-based encoding algorithm, the context content can be used to encode information indicating the determined intra-prediction mode based on adjacent encoded blocks, and the bitstream of the video signal is output. The decoded image buffer unit 110 stores the encoded blocks of the reconstructed video and is used for predictive referencing. As video image coding progresses, new encoded blocks of the reconstructed video are continuously generated, and all of these encoded blocks of the reconstructed video are stored in the decoded image buffer unit 110.

[0092] Referring to Figure 9B, a block diagram of the decoder configuration provided by the embodiment of the present application is shown. As shown in Figure 9B, the decoder (specifically, the "video decoder") 200 includes a decoding unit 201, an inverse transform / inverse quantization unit 202, an intra-prediction unit 203, a motion compensation unit 204, a filtering unit 205, and a decoded image buffer unit 206, etc. Here, the decoding unit 201 can perform header information decoding and CABAC decoding, and the filtering unit 205 can perform deblocking filtering and SAO filtering. The input video signal undergoes the encoding process shown in Figure 9A and then outputs a bitstream of the video signal. This bitstream is input to the decoder 200, first passing through the decoding unit 201 to obtain decoded conversion coefficients. These conversion coefficients are processed by the inverse transform / inverse quantization unit 202 to generate residual blocks in the pixel region. The intra-prediction unit 203 can be used to generate prediction data for the current video decoded block based on the determined intra-prediction mode and data from previously decoded blocks of the current frame or picture. The motion compensation unit 204 determines prediction information for the video decoding block by analyzing the motion vector and other relevant syntax elements, and uses this prediction information to generate a prediction block for the video decoding block being decoded. The decoded video block is formed by summing the residual block from the inverse transform / inverse quantization unit 202 with the corresponding prediction block generated by the intra-prediction unit 203 or the motion compensation unit 204. The decoded video signal can be improved by passing it through the filtering unit 205 to remove block noise artifacts. The decoded video block is then stored in the decoded image buffer unit 206. The decoded image buffer unit 206 stores a reference image for subsequent intra-prediction or motion compensation and is also used to output the video signal, i.e., to obtain the restored original video signal.

[0093] Furthermore, embodiments of the present application also provide a network architecture for an encoding / decoding system including an encoder and a decoder. Here, Figure 10 shows a schematic diagram of the network architecture for an encoding / decoding system provided by embodiments of the present application. As shown in Figure 10, the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, where the electronic devices 13 to 1N can perform video interaction via the communication network 01. The electronic devices may be various types of devices having video encoding / decoding capabilities in the course of implementation, for example, smartphones, tablet computers, personal computers, personal digital assistants, navigation devices, digital telephones, video phones, televisions, sensing devices, servers, etc., but embodiments of the present application are not limited thereto. Here, the decoder or encoder described in embodiments of the present application may be the above-mentioned electronic devices.

[0094] It should be noted that the method of the embodiment of this application is mainly applied to the intra-prediction unit 103 shown in Figure 9A and the intra-prediction unit 203 shown in Figure 9B. That is, the embodiment of this application can be applied to an encoder, to a decoder, or to both an encoder and a decoder simultaneously, but the embodiment of this application is not limited to these.

[0095] To further explain, when applied to the intra-prediction unit 103, "current block" specifically refers to the coding block currently performing the intra-prediction, and when applied to the intra-prediction unit 203, "current block" specifically refers to the decoding block currently performing the intra-prediction.

[0096] In one embodiment of the present application, referring to Figure 11, a flowchart of the decoding method provided by the embodiment of the present application is shown. As shown in Figure 11, the method is In S1101, the bitstream is decoded and the target filtering mode for the current block is determined.

[0097] It may include.

[0098] It should be explained that the decoding method of the embodiment of the present application may be an intra-prediction method, and more specifically, it refers to an improvement of an intra-prediction mode based on interpolation filtering to improve the cost-effectiveness of performance and complexity.

[0099] Furthermore, in the embodiments of this application, the current block includes at least a first color component and a second color component. The block containing the first color component of the current block can be abbreviated as the first color component block. When the first color component is the luminance component, the first color component block is also called the luminance block. Similarly, the block containing the second color component of the current block can be abbreviated as the second color component block. When the second color component is the color difference component, the second color component block is also called the color difference block.

[0100] Furthermore, in the embodiments of this application, the target filtering mode may refer to a mode in which an intra-prediction is performed on the current block using a target filter. Here, the target filter may refer to an interpolation filter.

[0101] Furthermore, in embodiments of the present invention, the target filtering mode can be realized using first syntax element flag information. That is, in some embodiments, the bitstream is decoded and the value of the first syntax element flag information is determined. If the value of the first syntax element flag information is a first value, the prediction mode of the current block is determined to be the target filtering mode. If the value of the first syntax element flag information is a second value, the prediction mode of the current block is determined to be the non-target filtering mode.

[0102] In the embodiments of this application, the first value and the second value are different, and the first value and the second value may be in parameter form or numerical form. Specifically, the first syntax element flag information may be a parameter written in the profile or a flag value, and is not limited to these.

[0103] For example, regarding the first and second values, the first value can be set to 1 and the second value to 0. Alternatively, the first value can be set to 0 and the second value to 1. Alternatively, the first value can be set to true and the second value to false. Alternatively, the first value can be set to false and the second value to true. Here, in the embodiment of the present application, the first value is set to 1 and the second value to 0, but it is not limited to this.

[0104] Furthermore, in the embodiments of the present application, the target filtering mode may include the reference region type of the current block and the shape of the target filter.

[0105] In some embodiments, the reference region types of the current block may include a first type, a second type, and a third type. Here, the method further includes If the current block's reference region type is type 1, the step is to determine that the current block's reference region includes the upper adjacent region and the left adjacent region. If the current block's reference region type is type 2, the step is to determine that the current block's reference region includes the upper adjacent region, If the current block's reference region type is type 3, the step is to determine that the current block's reference region includes the left adjacent region, It may include.

[0106] In the embodiments of the present application, the reference region of the current block refers to the reconfigured region surrounding the current block. Here, the upper adjacent region may refer to the reconfigured region adjacent to the upper side of the current block, and the left adjacent region may refer to the reconfigured region adjacent to the left side of the current block.

[0107] For example, the type of reference region shown in Figure 2A is type 1, the type of reference region shown in Figure 2B is type 2, and the type of reference region shown in Figure 2C is type 3.

[0108] In some embodiments, the shape of the target filter may include a first shape, a second shape, and a third shape, where the first shape may be a 4x4 square, the second shape may be a 2x8 rectangle, and the third shape may be an 8x2 rectangle, but is not limited thereto.

[0109] For example, the target filter shown in Figure 3A is the first shape, the target filter shown in Figure 3B is the second shape, and the target filter shown in Figure 3C is the third shape.

[0110] Thus, the candidate filtering modes for the current block can be obtained by combining three reference region types and three target filter shapes. For example, a total of nine candidate filtering modes can be combined here, and the target filtering mode is one of these nine candidate filtering modes.

[0111] In S1102, the reference region of the current block is determined based on the current block's size parameter and target filtering mode.

[0112] It should be explained that in the embodiment of the present application, after decoding and obtaining the target filtering mode of the current block, the reference region of the current block can be determined by combining it with the size parameters of the current block. Here, the size parameters of the current block may include the height and width of the current block.

[0113] In some embodiments, the size parameters of the current block include the height and width of the current block, and the step of determining the reference area of ​​the current block based on the size parameters of the current block and the target filtering mode may include the step of determining a minimum parameter from the height and width of the current block, and the step of determining the reference area of ​​the current block based on the minimum parameter and the target filtering mode.

[0114] In the embodiments of this application, the size of the reference region of the current block is related to the shape and minimum parameters of the target filter. Simply put, a larger current block size allows for a larger reference region, while a smaller current block size allows for a smaller reference region. Here, the number of rows and columns of the reference region can be derived based on the size of the current block.

[0115] For example, Figure 12A is a schematic diagram of one reference region of the current block, Figure 12B is a schematic diagram of another reference region of the current block, and Figure 12C is a schematic diagram of yet another reference region of the current block. As shown in Figures 12A, 12B, and 12C, the area within the dashed frame is the reference region of the current block, and it depends on the shape of the target filter used for the current block and the size of the variable tplSize. Here, the size of the variable tplSize is equal to the smaller of the width and height of the current block. For example, for a 4x8 current block, the value of the variable tplSize is 4, and for a 16x16 current block, the value of the variable tplSize is 16.

[0116] To make it clearer, in the embodiments of the present application, the activation of the filtering mode can also be limited based on the size parameter of the current block. Specifically, taking Figure 12C as an example, for a current block with a width of 16 and a height of 4, the value of the variable tplSize is 4, which means that there are a total of 4 × 16 = 64 pixels to be predicted within the current block. On the other hand, the total number of samples used to obtain the filter coefficients is tplSize × (tplSize + 4 × 2) = 48. That is, when obtaining the filter coefficients using the left adjacent region, there are many pixels to be predicted, but there are few samples in the reference region to obtain the filter coefficients. If there are too few samples, the resulting filter coefficients usually have poor prediction effectiveness.

[0117] In some embodiments, the method further, If the product of the current block width and the first factor is less than the current block height, the step is to determine that the reference region type in the target prediction mode is any one other than the second type. The steps may include determining that if the product of the current block height and the first factor is less than the current block width, the reference region type in the target prediction mode is any one other than the third type.

[0118] In the embodiments of this application, the value of the first factor may be a first predetermined constant. For example, the value of the first factor may be set to 2, but is not limited thereto.

[0119] In the embodiments of the present invention, it is possible to determine whether to disable a particular filtering mode based on the ratio of the width to the height of the current block. Specifically, if the ratio of the width to the height of the current block is less than the reciprocal of the first factor, that is, if the product of the width of the current block and the first factor is less than the height of the current block, the second type of reference region for the current block can be disabled, that is, the calculation of the filter coefficient using the upper adjacent region of the current block is prohibited, and in this case, the reference region type in the target prediction mode can be only the first or third type. If the ratio of the width to the height of the current block is greater than the first factor, that is, if the product of the height of the current block and the first factor is less than the width of the current block, the third type of reference region for the current block can be disabled, that is, the calculation of the filter coefficient using the left adjacent region of the current block is prohibited, and in this case, the reference region type in the target prediction mode can be only the first or second type.

[0120] Thus, assuming that there are still three types of target filter shapes, some reference region types are disabled, and the number of candidate filtering modes decreases accordingly. For example, if we disable the use of the second type of reference region for the current block (i.e., prohibit the calculation of filter coefficients using the upper adjacent region of the current block), the number of candidate filtering modes decreases to six. That is, because some interpolation filtering modes are restricted based on the ratio of the width to height of the current block (abbreviated as "aspect ratio"), the number of allowed candidate filtering modes differs under different aspect ratios. Therefore, when analyzing the target filtering mode, decoding can be performed based on the context model.

[0121] In some embodiments, the step of decoding the bitstream and determining the target filtering mode of the current block may include the step of determining the context model of the current block, and the step of decoding the bitstream based on the context model and determining the target filtering mode of the current block.

[0122] In the embodiments of this application, the determination of the context model is: Currently, block shape, Currently, the ratio of the block's width to its height is associated with at least one of these parameters.

[0123] In other words, in the embodiments of this application, the selection of a context model may be related to factors such as the shape and aspect ratio of the current block. Specifically, there are multiple context models on the decoding side, and which context model to use for decoding can be determined based on factors such as the shape and aspect ratio of the current block. This is because, for elongated current blocks, there are fewer selectable interpolation filtering modes, and therefore the codeword length required to represent the selected interpolation filtering mode is shorter. On the other hand, for current blocks of other shapes, the number of selectable interpolation filtering modes differs, and the codeword length required to represent a particular interpolation filtering mode is also longer, so the probability of selecting an interpolation filtering mode under different shapes differs. Thus, when the probabilities differ, it is necessary to select a different context model, and here, different context model indices can be used to determine which specific context model to use.

[0124] Furthermore, in the embodiments of this application, after selecting a corresponding context model, the value of the first syntax element flag information can be decoded based on the context model, thereby determining the target filtering mode of the current block. This not only improves prediction accuracy but also reduces computational complexity.

[0125] In S1103, the filter coefficients of the current block are determined based on the reference region of the current block.

[0126] It should be explained that in the embodiments of this application, the filter coefficients of the current block are determined primarily based on the reference region of the current block and the shape of the target filter. In some embodiments, the step of determining the filter coefficients of the current block based on the reference region of the current block is: The process may include: determining input and output values ​​of a target filter corresponding to at least one reference pixel in the reference region based on the reference region of the current block and the shape of the target filter; determining an autocorrelation matrix based on the input values ​​of the target filter corresponding to at least one reference pixel; determining a cross-correlation vector based on the input and output values ​​of the target filter corresponding to at least one reference pixel; determining the coefficients of the target filter based on the autocorrelation matrix and the cross-correlation vector; and determining the coefficients of the target filter as the filter coefficients of the current block.

[0127] For example, in an intra-prediction technique based on interpolation filtering, during decoding, the filter shape and reference region type corresponding to the current block are determined by analyzing the relevant syntax elements. Then, the autocorrelation matrix and cross-correlation vector are constructed by scanning each position on the reference region, and the filter coefficients are obtained by solving the system of equations.

[0128] Here, the autocorrelation matrix is ​​represented by A, and the cross-correlation vector is represented by Y, specifically as follows.

[0129]

number

number

[0130]

number

[0131] In S1104, an intra-prediction is performed on the current block based on the filter coefficients, and the predicted value for the current block is determined.

[0132] It should be explained that in the embodiment of the present application, the step of performing an intra-prediction for a pixel point in the current block based on a filter coefficient and determining the predicted value of the pixel point in the current block may include the step of determining a reference sample value corresponding to the pixel to be predicted in the current block, and the step of determining the predicted value of the pixel to be predicted in the current block based on the reference sample value corresponding to the pixel to be predicted in the current block and the filter coefficient.

[0133] In some embodiments, determining a reference sample value corresponding to a pixel to be predicted within the current block may include determining the reconstructed value of the corresponding position within the reference region as the reference sample value if the reference sample value is located within the reference region of the current block, based on the shape of the target filter, and determining the predicted value of the corresponding position within the current block as the reference sample value if the reference sample value is located inside the current block.

[0134] Furthermore, in the embodiment of this application, for the input to the target filter, i.e., the reference sample value corresponding to the pixel to be predicted in the current block, if the corresponding position is within the reference region, the reconstructed value is used as the input to the target filter. Alternatively, if the corresponding position is within the current block, the already predicted value is used as the input to the target filter.

[0135] Furthermore, in the embodiment of this application, for the target filter, interpolation filtering is predicted along the diagonal direction, and the pixels to be predicted on the same diagonal can be predicted in parallel. For details, please refer to Figure 5.

[0136] Referring to Figure 13, the method for determining the predicted value of the target pixel in the current block includes steps S1301 to S1303.

[0137] In S1301, the first input value of the target filter is determined based on the reference sample value corresponding to the pixel to be predicted within the current block.

[0138] It should be explained that in the embodiments of this application, the input to the target filter is obtained by subtracting a certain numerical value from the reference sample value, then multiplying this value by the filter coefficients and calculating the sum. Therefore, in some embodiments, the step of determining the first input value of the target filter based on the reference sample value corresponding to the pixel to be predicted in the current block may include the steps of determining the second factor and performing a subtraction operation between the reference sample value and the second factor to obtain the first input value of the target filter.

[0139] In S1302, the first output value of the target filter is determined based on the first input value and the filter coefficients.

[0140] What needs to be explained is that in the embodiment of the present application, the step of determining the first output value of the target filter based on the first input value and the filter coefficient is: The process may include the steps of determining a second output value of the target filter based on a first input value and filter coefficients, and performing a first process on the second output value to determine a first output value of the target filter.

[0141] In some embodiments, the step of determining the second output value of a target filter based on a first input value and filter coefficients may include the steps of calculating the product of the first input value and the corresponding filter coefficients, and setting the second output value of the target filter to be equal to the sum of n products, where n is the number of input terms corresponding to the target filter, and n is a positive integer.

[0142] For example, the reference sample value corresponding to the target pixel r in the current block is t. r+pi Let be represented by , the second factor be represented by m, and c i Let be the i-th filter coefficient. i = 0, 1, 2, ..., n-1. In this case, the second output value of the target filter is P out1 In concrete terms, it can be expressed as shown in equation 10.

[0143]

number

[0144] It should be explained that in the embodiment of this application, if the input to the target filter subtracts a certain number, the output of the target filter must add that number. Therefore, the first output value of the target filter is P out2 It can be expressed as, and here,

number

[0145] In some embodiments, the value of the second factor may be a second predetermined constant. Alternatively, in some embodiments, the method may further include the steps of: determining the reconstruction value of at least one reference pixel within the reference region; performing an average calculation on the reconstruction value of at least one reference pixel to obtain a first mean value; and setting the value of the second factor to be equal to the first mean value.

[0146] In other words, the second factor may be obtained by calculating the mean based on the reconstructed values ​​within the reference region, it may be a predetermined constant, or it may be a specific numerical value, such as the reconstructed value of the upper left corner of the current block, and is not particularly limited here. For example, if the second factor is the mean of the reference region, the input to the target filter needs to be subtracted by that mean, and accordingly, the output of the target filter needs to be added by that mean to obtain the final prediction result.

[0147] In another specific implementation, the step of performing a first process on the second output value to determine the first output value of the target filter may include the steps of determining the third output value of the target filter, determining the fourth output value of the target filter based on the second and third output values, and performing an addition operation on the fourth output value and the second factor to obtain the first output value of the target filter.

[0148] It should be explained that in the embodiments of the present invention, when calculating the output of the target filter, the number of input terms may include not only linear terms but also nonlinear terms and / or bias terms. Here, the third output value may be calculated based on the number of nonlinear terms and / or bias terms, and the second output value may be calculated based on the number of linear terms. In this case, the second output value of the target filter may be specifically calculated by calculating the product of the first input value and the corresponding filter coefficients, and setting the second output value of the target filter to be equal to the sum of n products. Here, n represents the number of input terms of the first type corresponding to the target filter, and n is a positive integer.

[0149] In one specific embodiment, the third output value is calculated based on the number of nonlinear terms. In some embodiments, the step of determining the third output value of the target filter may include: determining the number of first type input terms corresponding to the target filter based on the shape of the target filter; determining p+q filter coefficients of the target filter, where p and q are both positive integers, if the number of first type input terms corresponding to the target filter is p; and determining the third output value of the target filter based on q filter coefficients and q second type input terms.

[0150] In another specific implementation, the third output value is calculated based on the number of bias terms. In some embodiments, the step of determining the third output value of the target filter may include: determining the number of first type input terms corresponding to the target filter based on the shape of the target filter; determining p+m filter coefficients of the target filter, where p and m are both positive integers, if the number of first type input terms corresponding to the target filter is p; and determining the third output value of the target filter based on m filter coefficients and m third type input terms.

[0151] In yet another specific implementation, the third output value is calculated jointly based on the number of nonlinear terms and the number of bias terms. In some embodiments, the step of determining the third output value of the target filter includes the steps of determining the number of first-type input terms corresponding to the target filter based on the shape of the target filter, determining p+k filter coefficients of the target filter when the number of first-type input terms corresponding to the target filter is p, where p and k are both positive integers, and determining the third output value of the target filter based on i filter coefficients and i second-type input terms from the p+k filter coefficients, and j filter coefficients and j third-type input terms from the p+k filter coefficients, where i and j are both positive integers and k = i + j.

[0152] In the embodiment of the present application, there is a linear relationship between the number of input terms of type 1 and the reference sample value, a nonlinear relationship between the number of input terms of type 2 and the reference sample value, and the number of input terms of type 3 is predetermined bias information. Simply put, the number of input terms of type 1 is a linear number, the number of input terms of type 2 is a nonlinear number, and the number of input terms of type 3 is a bias number.

[0153] As an example, the linear terms of the 15 taps of the target filter are shown in Figures 3A, 3B, and 3C. Here, the blacked-out positions represent the current target position. Based on this, three more nonlinear terms can be added, and the positions of the reconstructed pixels used by the nonlinear terms are shown in Figures 14A, 14B, and 14C, specifically the three positions filled with dots.

[0154] Here, the interpolation input for the 15 linear terms is p i =t i -m is the value of i, and the range of i is 0 to 14, corresponding to 14 grid-filled positions around the current prediction target position. i is the reconstructed or predicted value of a grid-filled position (depending on whether the input required for the current prediction position is within the current block or within the reference region), and m is a number to be subtracted, which may be, but is not limited to, the reconstructed value of the upper-left corner of the current block or the average value of the reference region.

[0155] Here, the interpolation input for the three nonlinear terms is p i =(( t i -m) × (t i -m)+midVal)>>bitDepth, where i is the three positions filled with dots, and p i is the value of the nonlinear term, and if midVal and bitDepth are 10 bits, they are equal to 512 and 10. In this way, when the nonlinear term is added, the formula for calculating the first output value of the current position for the current predicted position is as follows:

[0156]

number

[0157] To further understand this, taking the 15-tap linear term of the target filter shown in Figures 3A, 3B, and 3C as an example, the three-tap nonlinear term added here can also be as shown in Figures 15A, 15B, and 15C. The nonlinear term is specifically the three positions filled with dots, and the position filled in black represents the current target position. Here, Figures 15A, 15B, and 15C all have three additional nonlinear terms compared to Figures 14A, 14B, and 14C, but because different filter shapes all use the same nonlinear term, the calculation becomes simpler and the complexity is further reduced.

[0158] To further understand the number of nonlinear terms, in addition to using three nonlinear terms, more nonlinear terms can be used in the embodiments of this application. For example, five nonlinear terms are used in Figures 16A, 16B, and 16C, and the positions of the five nonlinear terms are specifically the five positions filled with dots.

[0159] Thus, in the embodiments of the present invention, the number of nonlinear terms should be a positive integer, the specific number is not limited, and different designs can be made depending on the performance and complexity requirements.

[0160] In S1303, the predicted value of the target pixel in the current block is determined based on the first output value.

[0161] It should be explained that in the embodiments of the present application, determining the predicted value of the target pixel in the current block based on the first output value may include performing a second process on the first output value to obtain the predicted value of the target pixel in the current block.

[0162] In one specific embodiment, the second process may be to set the predicted value of the target pixel in the current block to be equal to the first output value.

[0163] In another specific embodiment, the second process may be to restrict the first output value to a predetermined numerical range, or, here also, a "clamping (clip) operation." Here, the lower limit of the predetermined numerical range is the minimum reconstruction value (min) within the reference domain, and the upper limit of the predetermined numerical range is the maximum reconstruction value (max) within the reference domain.

[0164] In other words, in the embodiment of the present application, the predetermined numerical range is between min and max. If the first output value is within the predetermined numerical range, the first output value can be used as the predicted value of the target pixel in the current block. If the first output value is greater than max, max can be used as the predicted value of the target pixel in the current block. If the first output value is less than min, min can be used as the predicted value of the target pixel in the current block. Specifically, this can be expressed by the following formula.

[0165] [Formula 12] pred=Clip(min,max,P out2 ) In this way, after performing a correction operation on the first output value, it is possible to guarantee that the predicted values ​​of all pixels in the current block are between min and max.

[0166] Furthermore, in some embodiments, the method further... When using intra-prediction based on filter coefficients for the luminance component of the current block, the steps include determining the intra-prediction mode for deriving the luminance component of the current block, When using direct mode intra-prediction for the color difference components of a block, the steps may include setting the direct mode to derived intra-prediction mode and thereby determining the predicted values ​​of the color difference components of the block.

[0167] It should be explained that in the embodiment of the present invention, the derived intra-prediction mode may be the conventional PLANAR mode, DC mode, or angle mode, and can be specifically determined by the method of constructing the gradient histogram described above.

[0168] Here, DM mode (also known as "direct mode" or "derivative mode") is an efficient intra-color difference prediction mode that is applied in many standards when performing intra-prediction. When the use of DM mode is selected for a color difference block, the intra-prediction is performed for the color difference block by obtaining the mode selected for the luminance block at the corresponding position.

[0169] Specifically, the interpolation filtering technique described in the aforementioned embodiment only works on intra-block prediction of luminance. A direct method would be to extend this mode to color difference, however, this would necessitate the derivation of filter coefficients for color difference as well, resulting in high computational complexity. In related technologies, there is no intra-prediction mode based on interpolation filtering for color difference; if a color difference block selects DM mode, the DM mode is set to PLANAR mode for prediction.

[0170] However, in the embodiments of the present invention, the conventional prediction mode can be derived by constructing a gradient histogram for luminance blocks using the interpolation filtering mode. This conventional mode can be used when the DM mode is selected as the color difference mode and the interpolation filtering mode is selected for the luminance blocks at the corresponding positions.

[0171] Furthermore, in some embodiments, the method further... If the current block satisfies predetermined conditions, the step is to determine the reference block of the current block, When using intra-prediction based on filter coefficients in a reference block, the steps include determining the derived intra-prediction mode of the reference block, This may include the step of adding the derived intra-prediction mode to the current block's intra-prediction mode candidate list.

[0172] In the embodiments of this application, the current block satisfying the predetermined conditions is at least: Currently, the block is an interpretation block. This includes one of the blocks that is currently an IBC block.

[0173] It should be explained that in the embodiments of this application, IBC blocks and interblocks do not have intra-prediction modes because they are not intra-encoded blocks, but the first reference blocks of IBC blocks and interblocks are all intra-prediction blocks. In related art, when acquiring a reference block is completed by an interblock or IBC block, the intra-prediction mode of the reference block is simultaneously transmitted to the current block. These intra-prediction modes are conventional intra-prediction modes (PLANAR, DC, angle modes). These transmitted conventional intra-prediction modes are used when constructing a list of intra-prediction mode candidates for the current block, if the surrounding blocks are IBC blocks or interblocks.

[0174] Thus, when the location referenced by an IBC block or interblock is in interpolation filtering mode, the transmission is performed using the conventional intra-prediction mode corresponding to the interpolation filtering mode.

[0175] Furthermore, in some embodiments, the method further... The steps include: decrypting the bitstream and determining the residual value of the current block; This may include the step of determining the reconstructed value of the current block based on the predicted value of the current block and the residual value of the current block.

[0176] In the embodiment of the present application, the step of decoding a bitstream and determining the residual value of the current block may include the steps of decoding a bitstream and determining the quantization coefficients of the current block, performing an inverse quantization operation on the quantization coefficients to obtain the transformation coefficients of the current block, and performing an inverse transformation operation on the transformation coefficients to obtain the residual value of the current block.

[0177] It should be explained that in the embodiment of this application, after completing the prediction of the current block, the encoding side calculates the residual value based on the original value and the predicted value. The residual value undergoes further transformation and quantization to obtain quantization coefficients, which are then transmitted to the decoding side via a bitstream. In this way, the decoding side obtains the quantization coefficients of the current block through decoding, and then obtains the residual value of the current block through inverse quantization and inverse transformation. Furthermore, by performing an addition operation between the residual value of the current block and the predicted value of the current block, the reconstructed value of the current block can be obtained.

[0178] Furthermore, in some embodiments, the step of performing an inverse transformation on the transformation coefficients to obtain the residual value of the current block may include, when a multiple transformation selection mode is used for the current block and the target filtering mode is interpolation filtering mode, the step of determining the target transformation kernel of the current block, and the step of performing an inverse transformation on the transformation coefficients based on the target transformation kernel to obtain the residual value of the current block.

[0179] In the embodiment of this application, the determination of the target transformation kernel is as follows: Current block target filtering mode, The current block size parameter, The current block shape may have a relationship with at least one parameter.

[0180] Furthermore, in the embodiments of this application, there is a method of deriving a gradient histogram from the prediction results of the interpolation filter prediction, mapping it to the conventional prediction mode, and then selecting an inseparable transform kernel. On the other hand, for other basic transform kernels other than the inseparable transform kernel, the selection of the transform kernel is the same as the selection method for the PLANAR mode. However, since the characteristics of the interpolation filtering mode and the PLANAR mode are different, the selection of the basic transform kernel should be further optimized.

[0181] In the reference software ECM, basic transformations can be divided into horizontal and vertical directions, and the permitted transformation schemes in each direction include seven types: {'DCT2', 'DCT8', 'DST7', 'DCT5', 'DST4', 'DST1', 'IDTR'}.

[0182] Here, DCT2, DCT8, and DCT5 are several subclasses of the discrete cosine transform, DST7, DST4, and DST1 are several subclasses of the discrete sine transform, and IDTR is the Identity transform, which represents no transformation.

[0183] Furthermore, in the reference software ECM, the most commonly used basic transformation mode is one in which both the horizontal and vertical directions are DCT2, which is denoted here as DCT2-DCT2. This is used as a primary transformation before the unseparated secondary transformation LFNST, and also as a transformation when the multiple transformation selection MTS technology is turned off. On the other hand, when the MTS mode is selected, the transformation process is not an unseparated transformation, but a combination of basic transformations in the horizontal and vertical directions.

[0184] In some embodiments, the method may further include the steps of decoding a bitstream and determining non-zero coefficient information of the current block, and determining at least one candidate transform kernel based on the non-zero coefficient information of the current block.

[0185] In the embodiments of this application, the number of candidate transformation kernels is six or less. That is, in the reference software ECM, the current block can select up to six non-DCT2-DCT2 transformation kernels based on the characteristics of the non-zero coefficients in the analyzed current block.

[0186] Thus, in the embodiments of the present invention, the MTS basic transformation kernel of the residual of a prediction block in an interpolation filtering mode should relate to whether an interpolation filtering mode was selected for the current block. More specifically, it may relate to which type of interpolation filtering mode was selected and / or the size and shape of the current block.

[0187] In one specific embodiment, the step of determining the target translation kernel for the current block may include the steps of decoding the bitstream and determining the translation kernel index value for the current block, and determining the target translation kernel for the current block from at least one candidate translation kernel based on the translation kernel index value.

[0188] It should be explained that, regarding the candidates for the basic transformation kernel used in the current MTS mode of the ECM, the basic transformation kernels selectable in MTS are related to whether the interpolation filter prediction mode is selected for the current block. When the interpolation filter prediction mode is used for the current block, there are six selectable MTS transformation kernels as follows (the transformation kernel is horizontal transformation - vertical transformation). Specifically, these are shown in Table 3.

[0189] [Table 3]

[0190] If MTS is selected and the prediction mode of the current block is interpolation prediction mode, the corresponding target transformation kernel is selected from the six types of transformation kernels based on the analyzed MTS transformation kernel index value and the inverse transformation is performed.

[0191] In another specific embodiment, the step of determining the target translation kernel for the current block may include: decoding the bitstream and determining the translation kernel index value for the current block; and determining the target translation kernel for the current block from at least one candidate translation kernel based on the translation kernel index value and the size parameter of the current block.

[0192] Furthermore, regarding the candidates for the basic transformation kernel used in the current MTS mode of the ECM, the basic transformation kernels selectable in MTS are related to whether an interpolation filter mode has been selected for the current block, and to the size and shape of the current block. Here, the shape and size of the current block are height × width. In one embodiment, this may be as shown in Table 4.

[0193] [Table 4]

[0194] Here, if MTS is selected and the prediction mode of the current block is interpolation prediction mode, the corresponding target transformation kernel is selected and the inverse transformation is performed based on the analyzed MTS transformation kernel index value and the shape size of the current block. In this embodiment, the interpolation filter prediction mode is applicable to luminance blocks from 4×4 to 32×32.

[0195] To further explain, the method for obtaining the above candidate MTS conversion kernels includes the following steps.

[0196] In step 1, an image set or video set is encoded using an encoder that includes an interpolation filter prediction mode.

[0197] In step 2, the residual values ​​of the blocks for which the interpolation filter mode has been selected are used to select possible horizontal-to-vertical transformation kernels for each type, according to the classification (e.g., block shape and size, interpolation filter mode, etc.). The selection criteria for the transformation kernels may be the size of the SAD, the size of the SSE, or other evaluation criteria, such as transform coding gain, and are not particularly limited here. Here, the definition of transform coding gain is the arithmetic mean variance of the transformation coefficients divided by the geometric mean variance of the transformation coefficients.

[0198] This embodiment provides a decoding method that decodes a bitstream, determines the target filtering mode of the current block, determines the reference region of the current block based on the current block's size parameter and target filtering mode, then determines the filter coefficients of the current block based on the reference region, and further performs intra-prediction on the current block based on the filter coefficients to determine the predicted value of the current block. This means that in the intra-prediction technique based on interpolation filtering, when determining the reference region for calculating the filter coefficients, it is related not only to the target filtering mode but also to the current block's size parameter. For example, a large reference region can be used when the current block is large, and a small reference region can be used when the current block is small. This reduces the complexity of the calculation and shortens the encoding time. At the same time, it is possible to improve the accuracy of the intra-prediction and thereby improve the encoding and decoding performance.

[0199] In another embodiment of the present application, referring to Figure 17, a flowchart of the encoding method provided by the embodiment of the present application is shown. As shown in Figure 17, the method includes S1801 to S1804.

[0200] In S1801, the target filtering mode for the current block is determined.

[0201] It should be explained that the encoding method of the embodiment of the present application may be an intra-prediction method, and more specifically, it refers to an improvement of an intra-prediction mode based on interpolation filtering to improve the cost-effectiveness of performance and complexity.

[0202] Furthermore, in the embodiments of this application, the current block includes at least a first color component and a second color component. The block containing the first color component of the current block can be abbreviated as the first color component block. When the first color component is the luminance component, the first color component block is also called the luminance block. Similarly, the block containing the second color component of the current block can be abbreviated as the second color component block. When the second color component is the color difference component, the second color component block is also called the color difference block.

[0203] Furthermore, in the embodiments of this application, the target filtering mode may refer to a mode in which an intra-prediction is performed on the current block using a target filter. Here, the target filter may refer to an interpolation filter.

[0204] In some embodiments, the step of determining the target filtering mode of the current block may include the steps of determining at least one candidate filtering mode, performing cost calculations for at least one candidate filtering mode and determining the cost result for at least one candidate filtering mode, and determining the minimum cost result from the cost results for at least one candidate filtering mode and determining the candidate filtering mode corresponding to the minimum cost result as the target filtering mode of the current block.

[0205] In the embodiments of the present invention, the number of at least one candidate filtering mode may be determined based on the number of reference region types in the current block and the number of target filter shapes.

[0206] In the embodiments of the present application, the cost result can be determined using the distortion value. Specifically, the cost result can be determined by the rate distortion cost, and the magnitude of SAD, the magnitude of MSE, the magnitude of SSE, or other cost judgment criteria may be used, and it is not particularly limited herein.

[0207] In some embodiments, the reference region types of the current block may include a first type, a second type, and a third type. Here, the method further includes When the reference region type of the current block is the first type, determining that the reference region of the current block includes the upper adjacent region and the left adjacent region; When the reference region type of the current block is the second type, determining that the reference region of the current block includes the upper adjacent region; When the reference region type of the current block is the third type, determining that the reference region of the current block includes the left adjacent region, and may include.

[0208] It should be noted that in the embodiments of the present application, the reference region of the current block refers to the reconstructed region around the current block. Here, the upper adjacent region may refer to the reconstructed region adjacent to the upper side of the current block, and the left adjacent region may refer to the reconstructed region adjacent to the left side of the current block.

[0209] As an example, the type of the reference region shown in FIG. 2A is the first type, the type of the reference region shown in FIG. 2B is the second type, and the type of the reference region shown in FIG. 2C is the third type.

[0210] In some embodiments, the shape of the target filter may include a first shape, a second shape, and a third shape. Here, the first shape may be a 4×4 square, the second shape may be a 2×8 rectangle, and the third shape may be an 8×2 rectangle, but it is not limited thereto herein.

[0211] As an example, the target filter shown in FIG. 3A is of the first shape, the target filter shown in FIG. 3B is of the second shape, and the target filter shown in FIG. 3C is of the third shape.

[0212] Thus, currently the candidate filtering mode of a block can be obtained by combining three reference region types and three target filter shapes. For example, here a total of nine candidate filtering modes can be combined, and the target filtering mode is one of the nine candidate filtering modes.

[0213] In S1802, based on the size parameter of the current block and the target filtering mode, determine the reference region of the current block.

[0214] It should be noted that in the embodiments of the present application, after determining the target filtering mode of the current block, the reference region of the current block can be determined by combining the size parameter of the current block. Here, the size parameter of the current block may include the height and width of the current block.

[0215] In some embodiments, the size parameter of the current block includes the height and width of the current block, and the step of determining the reference region of the current block based on the size parameter of the current block and the target filtering mode may include: determining the minimum parameter from the height and width of the current block; and determining the reference region of the current block based on the minimum parameter and the target filtering mode.

[0216] In the embodiments of this application, the size of the reference region of the current block is related to the shape and minimum parameters of the target filter. Simply put, a larger current block size allows for a larger reference region, while a smaller current block size allows for a smaller reference region. Here, the number of rows and columns of the reference region can be derived based on the size of the current block. For example, as shown in Figures 12A, 12B, and 12C, the area within the dashed frame is the reference region of the current block, which depends on the shape of the target filter used for the current block and the size of the variable tplSize. Here, the size of the variable tplSize is equal to the smaller of the width and height of the current block. For example, for a 4x8 current block, the value of the variable tplSize is 4, and for a 16x16 current block, the value of the variable tplSize is 16.

[0217] To make it clearer, in the embodiments of this application, the activation of the filtering mode can also be limited based on the size parameter of the current block. Specifically, taking Figure 12C as an example, in the case of a current block with a width of 16 and a height of 4, the value of the variable tplSize is 4, which means that there are a total of 4 × 16 = 64 pixels to be predicted within the current block. On the other hand, the total number of samples used to obtain the filter coefficients is tplSize × (tplSize + 4 × 2) = 48. That is, when obtaining the filter coefficients using the left adjacent region, there are many pixels to be predicted, but few samples in the reference region for obtaining the filter coefficients. If there are too few samples, the resulting filter coefficients usually have poor prediction effectiveness. Therefore, in some embodiments, the method further... If the product of the current block's width and the first factor is less than the current block's height, the step of prohibiting the current block's reference region type from being type 2, wherein the number of reference region types for the current block is determined based on reference region types other than type 2. The step of prohibiting the current block from having a third type of reference region if the product of the current block's height and the first factor is less than the current block's width, and the number of reference region types for the current block is determined based on reference region types other than the third type.

[0218] In the embodiments of this application, the value of the first factor may be a first predetermined constant. For example, the value of the first factor may be set to 2, but is not limited thereto.

[0219] In the embodiments of this application, it is possible to determine whether to disable a particular filtering mode based on the ratio of the width to the height of the current block. Specifically, if the ratio of the width to the height of the current block is less than the reciprocal of the first factor, that is, if the product of the width of the current block and the first factor is less than the height of the current block, the second type of reference region for the current block can be disabled. In other words, the calculation of filter coefficients using the upper adjacent region of the current block is prohibited. In this case, the reference region type in the target prediction mode can only be the first or third type. If the ratio of the width to the height of the current block is greater than the first factor, that is, if the product of the height of the current block and the first factor is less than the width of the current block, the third type of reference region for the current block can be disabled. In other words, the calculation of filter coefficients using the left adjacent region of the current block is prohibited. In this case, the reference region type in the target prediction mode can only be the first or second type.

[0220] Thus, assuming that there are still three types of target filter shapes, some reference region types are disabled, and the number of candidate filtering modes decreases accordingly. For example, if we disable the use of the second type of reference region for the current block (i.e., prohibit the calculation of filter coefficients using the upper adjacent region of the current block), the number of candidate filtering modes decreases to six. That is, because some interpolation filtering modes are restricted based on the ratio of the width and height of the current block (abbreviated as "aspect ratio"), the number of candidate filtering modes allowed differs under different aspect ratios. Therefore, when encoding target filtering modes, encoding can be performed based on the context model.

[0221] In some embodiments, after determining the target filtering mode of the current block, the method may further include the step of encoding the target filtering mode of the current block and writing the resulting encoded bits to a bitstream.

[0222] In one specific embodiment, the step of encoding the target filtering mode of the current block and writing the resulting encoded bits to a bitstream may include the step of determining the context model of the current block, and the step of encoding the target filtering mode of the current block based on the context model and writing the resulting encoded bits to a bitstream.

[0223] In the embodiments of this application, the determination of the context model is: Currently, block shape, Currently, the ratio of the block's width to its height is associated with at least one of these parameters.

[0224] In other words, in the embodiments of this application, the selection of a context model may be related to factors such as the shape and aspect ratio of the current block. Specifically, there are multiple context models on the decoding side, and which context model to use for decoding can be determined based on factors such as the shape and aspect ratio of the current block. This is because, for elongated current blocks, there are fewer selectable interpolation filtering modes, and therefore the codeword length required to represent the selected interpolation filtering mode is shorter. On the other hand, for current blocks of other shapes, the number of selectable interpolation filtering modes differs, and the codeword length required to represent a particular interpolation filtering mode is also longer, so the probability of selecting an interpolation filtering mode under different shapes differs. Thus, when the probabilities differ, it is necessary to select a different context model, and here, different context model indices can be used to determine which specific context model to use.

[0225] To further explain, in the embodiments of this application, after selecting a corresponding context model, the target prediction mode can be encoded based on the context model. This allows the subsequent decoding side to obtain the target prediction mode of the current block by decoding the bitstream using the context model selected based on the shape of the current block.

[0226] Furthermore, in embodiments of the present application, the target filtering mode may include the reference region type of the current block and the shape of the target filter. Here, the target filtering mode can be written to the bitstream by first syntax element flag information. That is, in some embodiments, the value of the first syntax element flag information is determined, the value of the first syntax element flag information is encoded based on the context model, and the resulting encoded bits are written to the bitstream.

[0227] In some embodiments, the step of determining the value of the first syntax element flag information may include the step of determining the value of the first syntax element flag information as a first value when predictive coding is performed on the current block using a target filtering mode, and the step of determining the value of the first syntax element flag information as a second value when predictive coding is performed on the current block using a non-target filtering mode.

[0228] In the embodiments of this application, the first value and the second value are different, and the first value and the second value may be in parameter form or numerical form. Specifically, the first syntax element flag information may be a parameter written in the profile or a flag value, and is not limited to these.

[0229] For example, regarding the first and second values, the first value can be set to 1 and the second value to 0. Alternatively, the first value can be set to 0 and the second value to 1. Alternatively, the first value can be set to true and the second value to false. Alternatively, the first value can be set to false and the second value to true. Here, in the embodiment of the present application, the first value is set to 1 and the second value to 0, but it is not limited to this.

[0230] In this way, after writing the value of the first syntax element flag information to the bitstream, the subsequent decoding side can analyze the value of the first syntax element flag information to determine whether the prediction mode of the current block is the target prediction mode. For example, if the value of the first syntax element flag information obtained by the analysis is 1, it can be determined that the prediction mode of the current block is the target prediction mode. This not only improves prediction accuracy but also reduces computational complexity.

[0231] In S1803, the filter coefficients of the current block are determined based on the reference region of the current block.

[0232] It should be noted that in the embodiments of the present application, by classifying and dividing the reference area of the current block, an autocorrelation coefficient matrix and a cross-correlation coefficient vector without overlapping areas are constructed, so that the encoding side can derive the filter coefficients in each combination method. In some embodiments, the method further includes steps of determining a plurality of candidate sub-reference areas of the current block, where the plurality of candidate sub-reference areas do not overlap with each other, determining an autocorrelation coefficient matrix and a cross-correlation coefficient vector for each of the plurality of candidate sub-reference areas based on the plurality of candidate sub-reference areas and the shape of the target filter, and storing the autocorrelation coefficient matrix and the cross-correlation coefficient vector for each of the plurality of candidate sub-reference areas in a predetermined buffer.

[0233] In a specific embodiment, the first candidate sub-reference area is any one of the plurality of candidate sub-reference areas. Taking the first candidate sub-reference area as an example here, for determining the autocorrelation coefficient matrix and the cross-correlation coefficient vector of the first candidate sub-reference area, specifically, based on the first candidate sub-reference area and the shape of the target filter, it includes steps of determining the input value and the output value of the target filter corresponding to at least one reference pixel in the first candidate sub-reference area, determining the autocorrelation coefficient matrix of the first candidate sub-reference area based on the input value of the target filter corresponding to at least one reference pixel, and determining the cross-correlation coefficient vector of the first candidate sub-reference area based on the input value and the output value of the target filter corresponding to at least one reference pixel. In this way, the autocorrelation coefficient matrix and the cross-correlation coefficient vector for each of the plurality of candidate sub-reference areas can be determined.

[0234] Furthermore, in the embodiment of this application, the encoding side needs to select from a total of nine combinations of three types of reference regions and three types of filter shapes, and if a combination is selected, the corresponding syntax element flag information is written to the bitstream. Subsequently, if the decoding side analyzes that a combination has been selected, the derivation of the filter coefficients only needs to be done once. As a result, the complexity on the encoding side of this technique is much higher than that on the decoding side.

[0235] However, the three reference regions in Figures 2A, 2B, and 2C are all composed of the three parts R0, R1, and R2 in Figures 18A, 18B, and 18C. Here, as shown in Figure 18A, the reference region of the current block can consist of R0, R1, and R2. As shown in Figure 18B, the reference region of the current block can consist of R0 and R1. As shown in Figure 18C, the reference region of the current block can consist of R0 and R2.

[0236] Furthermore, f0, f1, and f2 represent three types of filter shapes, and R all ,R top ,R left This represents three types of reference domains. The autocorrelation matrix and cross-correlation vector for the nine combinations can be written as shown in Equation 13.

[0237]

number

[0238] Furthermore, R all ,R top ,R left Since all of them can be constructed using R0, R1, and R2, we can see that the above nine combinations can be further decomposed as follows.

[0239]

number

[0240]

number

number

number

[0241]

number

[0242] In other words, in the embodiment of the present invention, when the encoding side derives filter coefficients based on the currently performed combination and performs rate distortion optimization, it needs to buffer each unconstructed autocorrelation matrix and cross-correlation vector so that they can be used in subsequent combinations. This reduces the computational complexity of the encoding side.

[0243] In S1804, an intra-prediction is performed on the current block based on the filter coefficients, and the predicted value for the current block is determined.

[0244] It should be explained that in the embodiment of the present application, the step of performing an intra-prediction for a pixel point in the current block based on a filter coefficient and determining the predicted value of the pixel point in the current block may include the step of determining a reference sample value corresponding to the pixel to be predicted in the current block, and the step of determining the predicted value of the pixel to be predicted in the current block based on the reference sample value corresponding to the pixel to be predicted in the current block and the filter coefficient.

[0245] In some embodiments, determining a reference sample value corresponding to a pixel to be predicted within the current block may include determining the reconstructed value of the corresponding position within the reference region as the reference sample value if the reference sample value is located within the reference region of the current block, based on the shape of the target filter, and determining the predicted value of the corresponding position within the current block as the reference sample value if the reference sample value is located inside the current block.

[0246] Furthermore, in the embodiment of this application, for the input to the target filter, i.e., the reference sample value corresponding to the pixel to be predicted in the current block, if the corresponding position is within the reference region, the reconstructed value is used as the input to the target filter. Alternatively, if the corresponding position is within the current block, the already predicted value is used as the input to the target filter.

[0247] Furthermore, in the embodiment of this application, for the target filter, interpolation filtering is predicted along the diagonal direction, and the pixels to be predicted on the same diagonal can be predicted in parallel. For details, please refer to Figure 5.

[0248] In some embodiments, the step of determining the predicted value of the target pixel in the current block based on the reference sample value and filter coefficient corresponding to the target pixel in the current block is: The steps include determining the first input value of the target filter based on the reference sample value corresponding to the pixel to be predicted within the current block, The steps include determining the first output value of the target filter based on the first input value and the filter coefficients, The process may include the step of determining the predicted value of the target pixel in the current block based on the first output value.

[0249] It should be explained that in the embodiments of this application, the input to the target filter is obtained by subtracting a certain numerical value from the reference sample value, then multiplying this value by the filter coefficients and calculating the sum. Therefore, in some embodiments, the step of determining the first input value of the target filter based on the reference sample value corresponding to the pixel to be predicted in the current block may include the steps of determining the second factor and performing a subtraction operation between the reference sample value and the second factor to obtain the first input value of the target filter.

[0250] Furthermore, in the embodiments of the present application, the step of determining a first output value of the target filter based on a first input value and filter coefficients may include the steps of determining a second output value of the target filter based on a first input value and filter coefficients, and performing a first process on the second output value to determine the first output value of the target filter.

[0251] In some embodiments, the step of determining the second output value of a target filter based on a first input value and filter coefficients may include the steps of calculating the product of the first input value and the corresponding filter coefficients, and setting the second output value of the target filter to be equal to the sum of n products, where n is the number of input terms corresponding to the target filter, and n is a positive integer.

[0252] For example, the reference sample value corresponding to the target pixel r in the current block is t. r+pi Let be represented by , the second factor be represented by m, and c i Let be the i-th filter coefficient. i = 0, 1, 2, ..., n-1. In this case, the second output value of the target filter is P out1 In concrete terms, it can be expressed as shown in equation 19.

[0253]

number

[0254] It should be explained that in the embodiment of this application, if the input to the target filter subtracts a certain number, the output of the target filter must add that number. Therefore, the first output value of the target filter is P out2 It can be expressed as, and here,

number

[0255] In some embodiments, the value of the second factor may be a second predetermined constant. Or, in some embodiments, the method may further be The steps may include determining the reconstructed value of at least one reference pixel within the reference region, calculating the mean value for the reconstructed value of at least one reference pixel to obtain a first mean value, and setting the value of the second factor to be equal to the first mean value.

[0256] In other words, the second factor may be obtained by calculating the mean based on the reconstructed values ​​within the reference region, it may be a predetermined constant, or it may be a specific numerical value, such as the reconstructed value of the upper left corner of the current block, and is not particularly limited here. For example, if the second factor is the mean of the reference region, the input to the target filter needs to be subtracted by that mean, and accordingly, the output of the target filter needs to be added by that mean to obtain the final prediction result.

[0257] In another specific implementation, the step of performing a first process on the second output value to determine the first output value of the target filter may include the steps of determining the third output value of the target filter, determining the fourth output value of the target filter based on the second and third output values, and performing an addition operation on the fourth output value and the second factor to obtain the first output value of the target filter.

[0258] It should be explained that in the embodiments of the present invention, when calculating the output of the target filter, the number of input terms may include not only linear terms but also nonlinear terms and / or bias terms. Here, the third output value may be calculated based on the number of nonlinear terms and / or bias terms, and the second output value may be calculated based on the number of linear terms. In this case, the second output value of the target filter may be specifically calculated by calculating the product of the first input value and the corresponding filter coefficients, and setting the second output value of the target filter to be equal to the sum of n products. Here, n represents the number of input terms of the first type corresponding to the target filter, and n is a positive integer.

[0259] In one specific embodiment, the third output value is calculated based on the number of nonlinear terms. In some embodiments, the step of determining the third output value of the target filter may include: determining the number of first type input terms corresponding to the target filter based on the shape of the target filter; determining p+q filter coefficients of the target filter, where p and q are both positive integers, if the number of first type input terms corresponding to the target filter is p; and determining the third output value of the target filter based on q filter coefficients and q second type input terms.

[0260] In another specific implementation, the third output value is calculated based on the number of bias terms. In some embodiments, the step of determining the third output value of the target filter may include: determining the number of first type input terms corresponding to the target filter based on the shape of the target filter; determining p+m filter coefficients of the target filter, where p and m are both positive integers, if the number of first type input terms corresponding to the target filter is p; and determining the third output value of the target filter based on m filter coefficients and m third type input terms.

[0261] In yet another specific implementation, the third output value is calculated jointly based on the number of nonlinear terms and the number of bias terms. In some embodiments, the step of determining the third output value of the target filter includes the steps of determining the number of first-type input terms corresponding to the target filter based on the shape of the target filter, determining p+k filter coefficients of the target filter when the number of first-type input terms corresponding to the target filter is p, where p and k are both positive integers, and determining the third output value of the target filter based on i filter coefficients and i second-type input terms from the p+k filter coefficients, and j filter coefficients and j third-type input terms from the p+k filter coefficients, where i and j are both positive integers and k = i + j.

[0262] In the embodiment of the present application, there is a linear relationship between the number of input terms of type 1 and the reference sample value, a nonlinear relationship between the number of input terms of type 2 and the reference sample value, and the number of input terms of type 3 is predetermined bias information. In other words, the number of input terms of type 1 is a linear number, the number of input terms of type 2 is a nonlinear number, and the number of input terms of type 3 is a bias number.

[0263] As an example, in Figures 14A, 14B, and 14C, we assume that the linear term with 15 taps is represented by a grid of filled positions, and the nonlinear term with 3 taps is represented by dots. The black-filled positions represent the current target position for prediction.

[0264] Here, the interpolation input for the 15 linear terms is p i =t i -m is the value of i, and the range of i is 0 to 14, corresponding to 14 grid-filled positions around the current prediction target position. i is the reconstructed or predicted value of a grid-filled position (depending on whether the input required for the current prediction position is within the current block or within the reference region), and m is a number to be subtracted, which may be, but is not limited to, the reconstructed value of the upper-left corner of the current block or the average value of the reference region.

[0265] Here, the interpolation input for the three nonlinear terms is p i =(( t i -m) × (t i -m)+midVal)>>bitDepth, where i is the three positions filled with dots, and p i is the value of the nonlinear term, and if midVal and bitDepth are 10 bits, they are equal to 512 and 10. In this way, when the nonlinear term is added, the formula for calculating the first output value of the current position for the current predicted position is as follows:

[0266]

number

[0267] To further understand this, the three-tap nonlinear term added here can also be as shown in Figures 15A, 15B, and 15C. Here, Figures 15A, 15B, and 15C all have three additional nonlinear terms compared to Figures 14A, 14B, and 14C, but since the different filter shapes all use the same nonlinear term, the calculation becomes simpler and the complexity is further reduced.

[0268] To further understand the number of nonlinear terms, in addition to using three nonlinear terms, more nonlinear terms can be used in the embodiments of this application. For example, in Figures 16A, 16B, and 16C, five nonlinear terms are used, and the positions of the five nonlinear terms are specifically the five positions filled with dots. Thus, in the embodiments of this application, the number of nonlinear terms should be a positive integer, the specific number is not limited, and different designs can be made depending on the performance and complexity requirements.

[0269] Furthermore, in the embodiment of the present application, the predicted value of the target pixel in the current block can be determined based on the first output value, and specifically, this may include performing a second process on the first output value to obtain the predicted value of the target pixel in the current block.

[0270] In one specific embodiment, the second process may be to set the predicted value of the target pixel in the current block to be equal to the first output value.

[0271] In another specific embodiment, the second process may be to restrict the first output value to a predetermined numerical range, or, here also, a "clamping (clip) operation." Here, the lower limit of the predetermined numerical range is the minimum reconstruction value (min) within the reference domain, and the upper limit of the predetermined numerical range is the maximum reconstruction value (max) within the reference domain.

[0272] In other words, in the embodiment of the present application, the predetermined numerical range is between min and max. If the first output value is within the predetermined numerical range, the first output value can be used as the predicted value of the target pixel in the current block. If the first output value is greater than max, max can be used as the predicted value of the target pixel in the current block. If the first output value is less than min, min can be used as the predicted value of the target pixel in the current block. Specifically, this can be expressed by the following formula.

[0273] [Formula 21] pred=Clip(min,max,P out2 ) In this way, after performing a correction operation on the first output value, it is possible to guarantee that the predicted values ​​of all pixels in the current block are between min and max.

[0274] Furthermore, in some embodiments, the method further... When using intra-prediction based on filter coefficients for the luminance component of the current block, the steps include determining the intra-prediction mode for deriving the luminance component of the current block, When using direct mode intra-prediction for the color difference components of a block, the steps may include setting the direct mode to derived intra-prediction mode and thereby determining the predicted values ​​of the color difference components of the block.

[0275] It should be explained that in the embodiment of the present invention, the derived intra-prediction mode may be the conventional PLANAR mode, DC mode, or angle mode, and can be specifically determined by the method of constructing the gradient histogram described above.

[0276] In this context, DM mode (also known as "direct mode" or "derivation mode") is an efficient intra-color difference prediction mode that is applied in many standards when performing intra-prediction. When DM mode is selected for a color difference block, the intra-prediction is performed on the color difference block by obtaining the mode selected for the luminance block at the corresponding position.

[0277] Specifically, the interpolation filtering technique described in the aforementioned embodiment only works on intra-block prediction of luminance. A direct method would be to extend this mode to color difference, however, this would necessitate the derivation of filter coefficients for color difference as well, resulting in high computational complexity. In related technologies, there is no intra-prediction mode based on interpolation filtering for color difference; if a color difference block selects DM mode, the DM mode is set to PLANAR mode for prediction.

[0278] However, in the embodiments of the present invention, the conventional prediction mode can be derived by constructing a gradient histogram for luminance blocks using the interpolation filtering mode. This conventional mode can be used when the DM mode is selected as the color difference mode and the interpolation filtering mode is selected for the luminance blocks at the corresponding positions.

[0279] Furthermore, in some embodiments, the method further... If the current block satisfies predetermined conditions, the step is to determine the reference block of the current block, When using intra-prediction based on filter coefficients in a reference block, the steps include determining the derived intra-prediction mode of the reference block, This may include the step of adding the derived intra-prediction mode to the current block's intra-prediction mode candidate list.

[0280] In the embodiments of this application, the current block satisfying the predetermined conditions is at least: Currently, the block is an interpretation block. This includes one of the blocks that is currently an IBC block.

[0281] In the embodiments of this application, IBC blocks and interblocks do not have intra-prediction modes because they are not intra-encoded blocks; however, the first reference blocks of IBC blocks and interblocks are all intra-prediction blocks. In related technologies, when acquiring a reference block is completed by an interblock or IBC block, the intra-prediction mode of the reference block is simultaneously transmitted to the current block. These intra-prediction modes are conventional intra-prediction modes (PLANAR, DC, angle modes). These transmitted conventional intra-prediction modes are used when constructing a list of intra-prediction mode candidates for the current block, if the surrounding blocks are IBC blocks or interblocks. Thus, if the location referenced by an IBC block or interblock is an interpolation filtering mode, the transmission is performed using a conventional intra-prediction mode corresponding to the interpolation filtering mode.

[0282] Furthermore, referring to Figure 19, in some embodiments, the method further... In S2001, the residual value of the current block is determined.

[0283] In S2002, a transformation process is performed on the residual values ​​to obtain the transformation coefficient for the current block.

[0284] In S2003, quantization is performed on the transformation coefficients to obtain the quantization coefficients of the current block.

[0285] In S2004, the quantization coefficients of the current block are encoded, and the resulting encoded bits are written to the bitstream.

[0286] It may include.

[0287] It should be explained that in the embodiment of the present application, the step of determining the residual value of the current block may include the step of determining the original value of the current block, and the step of determining the residual value of the current block based on the original value of the current block and the predicted value of the current block. Subsequently, the residual value of the current block is encoded, and the resulting encoded bits are written to a bitstream.

[0288] Furthermore, in the embodiment of this application, the residual value of the current block can be determined by performing a subtraction operation between the original value of the current block and the predicted value of the current block. When encoding the residual value of the current block, first a transformation and quantization process is performed on the residual value, the obtained quantization coefficients are written to a bitstream, and then transmitted to the decoding side by the bitstream.

[0289] Furthermore, regarding step S2002, in some embodiments, the step of performing a transformation process on the residual values ​​to obtain the transformation coefficients of the current block may include, when a multiple transformation selection mode is used for the current block and the target filtering mode is interpolation filtering mode, the steps of determining the target transformation kernel of the current block and performing a transformation process on the residual values ​​based on the target transformation kernel to obtain the transformation coefficients of the current block.

[0290] In the embodiment of this application, the determination of the target transformation kernel is as follows: Current block target filtering mode, The current block size parameter, The current block shape may have a relationship with at least one parameter.

[0291] Furthermore, in the embodiments of this application, there is a method of deriving a gradient histogram from the prediction results of the interpolation filter prediction, mapping it to the conventional prediction mode, and then selecting an inseparable transform kernel. On the other hand, for other basic transform kernels other than the inseparable transform kernel, the selection of the transform kernel is the same as the selection method for the PLANAR mode. However, since the characteristics of the interpolation filtering mode and the PLANAR mode are different, the selection of the basic transform kernel should be further optimized.

[0292] In the reference software ECM, basic transformations can be divided into horizontal and vertical directions, and the permitted transformation schemes in each direction include seven types: {'DCT2', 'DCT8', 'DST7', 'DCT5', 'DST4', 'DST1', 'IDTR'}.

[0293] Here, DCT2, DCT8, and DCT5 are several subclasses of the discrete cosine transform, DST7, DST4, and DST1 are several subclasses of the discrete sine transform, and IDTR is the Identity transform, which represents no transformation.

[0294] Furthermore, in the reference software ECM, the most commonly used basic transformation mode is one in which both the horizontal and vertical directions are DCT2, which is denoted here as DCT2-DCT2. This is used as a primary transformation before the unseparated secondary transformation LFNST, and also as a transformation when the multiple transformation selection MTS technology is turned off. On the other hand, when the MTS mode is selected, the transformation process is not an unseparated transformation, but a combination of basic transformations in the horizontal and vertical directions.

[0295] In some embodiments, the method may further include the steps of determining non-zero coefficient information of the current block and determining at least one candidate transformation kernel based on the non-zero coefficient information of the current block.

[0296] In the embodiments of the present application, the number of candidate transformation kernels is six or less. That is, in the reference software ECM, the current block can select up to six non-DCT2-DCT2 transformation kernels based on the non-zero coefficient characteristics within the current block determined after transformation and quantization.

[0297] Thus, in the embodiments of the present invention, the MTS basic transformation kernel of the residual of a prediction block in an interpolation filtering mode should relate to whether an interpolation filtering mode was selected for the current block. More specifically, it may relate to which type of interpolation filtering mode was selected and / or the size and shape of the current block.

[0298] In one specific embodiment, the step of determining the target transformation kernel for the current block may include: determining at least one candidate transformation kernel; performing cost calculations for at least one candidate transformation kernel and determining the cost result for at least one candidate transformation kernel; and determining the minimum cost result from the cost results for at least one candidate transformation kernel and determining the candidate transformation kernel corresponding to the minimum cost result as the target transformation kernel for the current block.

[0299] It should be explained that in the embodiments of this application, the cost result can be determined using strain values, specifically by rate strain cost, and the magnitude of SAD, the magnitude of MSE, the magnitude of SSE, or other cost criteria may be used, and are not particularly limited thereto.

[0300] In some embodiments, the method may further include the steps of determining a translation kernel index value for the current block, wherein the translation kernel index value is used to indicate the index number of the target translation kernel in at least one candidate translation kernel, and encoding the translation kernel index value for the current block and writing the resulting encoded bits to a bitstream.

[0301] It should be explained that, in the embodiment of this application, the candidate basic transformation kernels used in the current MTS mode of the ECM are related to whether or not the interpolation filter prediction mode is selected for the current block. When the interpolation filter prediction mode is used for the current block, there are six selectable MTS transformation kernels as follows (the transformation kernel is horizontal transformation - vertical transformation). Specifically, these are shown in Table 3.

[0302] Here, if MTS is selected and the prediction mode of the current block is interpolation prediction mode, the MTS transform kernel index value can be determined and written to the bitstream. This allows the subsequent decoding side to select the corresponding target transform kernel from six types of transform kernels based on the analyzed MTS transform kernel index value and perform the inverse transform.

[0303] In some other embodiments, the method may further include the steps of determining a transform kernel index value for the current block, the transform kernel index value being used to indicate the index number of a target transform kernel in at least one candidate transform kernel, the at least one candidate transform kernel relating to the size parameter of the current block, and encoding the transform kernel index value for the current block and writing the resulting encoded bits to a bitstream.

[0304] Furthermore, in the embodiments of this application, the candidates for the basic transformation kernel used in the current MTS mode of the ECM are related to whether an interpolation filter mode has been selected for the current block, and to the size and shape of the current block. Specifically, this is shown in Table 4. Here, the shape and size of the current block are height × width.

[0305] Here, if MTS is selected and the prediction mode of the current block is interpolation prediction mode, the MTS transformation kernel index value can be determined by combining the size parameters of the current block and written to the bitstream. This allows the subsequent decoding side to select the corresponding target transformation kernel and perform the inverse transformation based on the analyzed MTS transformation kernel index value and the shape size of the current block. In this embodiment, the interpolation filter prediction mode is applicable to luminance blocks of 4×4 to 32×32.

[0306] To further explain, the method for obtaining the above candidate MTS conversion kernels includes the following steps.

[0307] In step 1, an image set or video set is encoded using an encoder that includes an interpolation filter prediction mode.

[0308] In step 2, the residual values ​​of the blocks for which the interpolation filter mode has been selected are used to select possible horizontal-to-vertical transformation kernels for each type, according to the classification (e.g., block shape and size, interpolation filter mode, etc.). The selection criteria for the transformation kernels may be the size of the SAD, the size of the SSE, or other evaluation criteria, such as transform coding gain, and are not particularly limited here. Here, the definition of transform coding gain is the arithmetic mean variance of the transformation coefficients divided by the geometric mean variance of the transformation coefficients.

[0309] Furthermore, embodiments of the present application provide a bitstream, which is generated by bit encoding based on information to be encoded, where the information to be encoded is: The current block includes at least one of the target filtering mode, the current block's residual value, and the current block's transformed kernel index value.

[0310] It should be explained that, in the embodiment of this application, when writing to the bitstream, the target filtering mode of the current block can also be written to the bitstream by the value of the first syntax element flag information. Furthermore, for the residual value of the current block, after transforming and quantizing the residual value, the resulting quantization coefficients can also be written to the bitstream. The encoding side also needs to write the transform kernel index value of the current block to the bitstream so that the decoding side can quickly determine the target transform kernel to be used. This improves the encoding and decoding efficiency.

[0311] This embodiment provides an encoding method that determines the target filtering mode of the current block, determines the reference region of the current block based on the current block's size parameter and target filtering mode, then determines the filter coefficients of the current block based on the current block's reference region, and further performs intra-prediction on the current block based on the filter coefficients to determine the predicted value of the current block. This means that in the intra-prediction technique based on interpolation filtering, when determining the reference region for calculating the filter coefficients, it is related not only to the target filtering mode but also to the current block's size parameter. For example, a large reference region can be used when the current block is large, and a small reference region can be used when the current block is small. This reduces the complexity of the calculation and shortens the encoding time. At the same time, it is possible to improve the accuracy of the intra-prediction and thereby improve the encoding and decoding performance.

[0312] In yet another embodiment of the present invention, improvements to the intra-prediction mode based on interpolation filtering, based on the encoding and decoding method described in the above embodiment, will be described in detail below from several aspects.

[0313] (i) The reference area of ​​the current block.

[0314] In the embodiments of the present application, since the reference region always uses a reconstruction region composed of reconstructed pixel values of 13 rows and / or 13 columns, the computational complexity in small blocks is much higher than that in large blocks. On the other hand, on the encoding side, the encoder needs to determine the block division, and increasing the computational amount of small blocks promotes an increase in the encoding time. Based on this, the embodiments of the present application propose that large blocks use large reference regions, small blocks use small reference regions, and the number of rows and columns of the reference region can be derived based on the block size. Specifically, please refer to FIGS. 12A, 12B, and 12C described above.

[0315] (2) Limit the activation of the interpolation filtering mode based on the shape of the block.

[0316] For the current block with a width of 16 and a height of 4, when obtaining the coefficients of the interpolation filter using the reconstruction region on the left side, there are many pixels to be predicted, and there are few pixels in the region used to obtain the interpolation filter parameters. Specifically, it is shown in FIG. 12C. Here, for the current block with a width of 16 and a height of 4, tplSize is 4, which means that there are a total of 4×16 = 64 pixels to be predicted, and the total number of samples used to obtain the filter coefficients is tplSize×(tplSize + 4×2) = 48. If the number of samples is too small, the obtained interpolation filter coefficients usually have a poor prediction effect.

[0317] [[ID=ll]] In the embodiments of the present application, here, further, for the ratio of the width and height of the current block, it is proposed to prohibit the derivation of the interpolation filter coefficients using the upper reconstruction region when width×N < height, and to prohibit the derivation of the interpolation filter coefficients using the left reconstruction region when height×N < width. For example, N = 2.

[0318] Thus, when encoding and decoding interpolation filtering modes, some interpolation filter submodes are restricted based on the aspect ratio, resulting in a different number of allowed interpolation filter submodes under different aspect ratios. Therefore, when analyzing the syntax element flags of interpolation filtering, the selection of its context model should be related to the block shape and aspect ratio factors. It should be noted that, assuming that nine types of interpolation filtering modes can be constructed from three types of reference regions and three types of filter shapes, each of these interpolation filtering modes can be considered an interpolation filter submode. In other words, an interpolation filtering mode can contain nine types of interpolation filter submodes.

[0319] (3) Optimize the process for obtaining the autocorrelation matrix on the coding side.

[0320] In the embodiment of this application, the encoding side constructs an autocorrelation matrix and a cross-correlation vector that do not contain overlapping regions by classifying and dividing the reference region in order to derive the filter coefficients for each combination.

[0321] As in the embodiment described above, in the interpolation filter prediction technique, the decoding side determines the shape of the interpolation filter selected for the current block and the type of reference region by analyzing the relevant syntax elements, scans each position on the reference region to construct the autocorrelation coefficient matrix and cross-correlation coefficient vector, and solves the system of equations to obtain the filter coefficients.

[0322] Here, the linear equations for the constructed autocorrelation matrix and cross-correlation vector are as follows:

[0323]

number

[0324] In the embodiment of the present invention, the encoding side needs to select from a total of nine combinations of three types of reference regions and three types of filter shapes. When a certain combination is selected, the corresponding syntax elements are encoded into the bitstream, and when the decoding side analyzes that a certain combination has been selected, the derivation of the filter coefficients only needs to be done once. As a result, the complexity of the encoding side is much higher than that of the decoding side in this technique.

[0325] However, regarding the three reference regions in Figures 2A, 2B, and 2C, they are all composed of the three parts R0, R1, and R2 in Figures 18A, 18B, and 18C. Here, we represent three types of filter shapes using f0, f1, and f2, and R all , R top , R left represents three types of reference domains. The autocorrelation matrix and cross-correlation vector for nine different combinations can be written as follows:

[0326]

number

[0327] Here, A represents the autocorrelation matrix, and Y represents the cross-correlation vector.

[0328] Furthermore, R all , R top , R left Since each of these can be composed of R0, R1, and R2, the above nine combinations can be further decomposed as follows.

[0329]

number

[0330] By decomposing matrices and vectors using addition, it can be expressed as follows:

[0331]

number

[0332] Therefore, to simplify things, when constructing the autocorrelation coefficient matrix and cross-correlation coefficient vector, only the following nine groups are needed to construct the matrix and vector necessary to obtain all the filter coefficients. Specifically, they are as follows:

[0333]

number

[0334] Furthermore, when the encoder derives filter coefficients for the currently used combination and performs rate distortion optimization, it needs to buffer any unconstructed autocorrelation matrix and cross-correlation vectors it encounters so that they can be used for subsequent combinations. This reduces the computational complexity on the encoding side.

[0335] (iv) Expansion of the color difference intra prediction mode.

[0336] DM mode is an efficient intra-color difference prediction mode applied in many standards when making predictions. When DM mode is selected for a color difference block, the intra-prediction is performed on the color difference block by obtaining the mode selected for the corresponding luminance block. The interpolation filtering technique described in the above embodiment only works on the prediction of luminance intra-blocks. A direct method would be to extend this mode to color difference, but this would necessitate the derivation of filter coefficients for color difference as well, resulting in high computational complexity. In related techniques, there is no interpolation filter prediction mode for color difference, and if DM mode is selected for a color difference intra-block, the DM mode is set to PLANAR mode.

[0337] However, the conventional prediction mode can be derived by constructing a gradient histogram for luminance blocks using the interpolation filtering mode. This conventional mode can be used when the DM mode is selected as the color difference mode and the interpolation filtering mode is selected for the luminance blocks at the corresponding positions.

[0338] (5) Transmission of conventional prediction modes corresponding to interpolation filtering.

[0339] IBC blocks and interblocks do not have intra-prediction modes because they are not intra-encoded blocks; however, the first reference block of an IBC block or interblock is always an intra-prediction block. In related techniques, when acquiring a reference block by an interblock or IBC block, the intra-prediction mode of the reference block is simultaneously transmitted to the current block. These intra-prediction modes are conventional intra-prediction modes (PLANAR, DC, and angle modes). These transmitted conventional intra-prediction modes are used when constructing a list of intra-prediction mode candidates for the current block, if the surrounding blocks are IBC blocks or interblocks.

[0340] In one embodiment, the technology that requires building an intra-prediction candidate list may include the following:

[0341] (i) Intra-encoded blocks: These blocks can utilize a range of intra-prediction techniques, including spatial geometric partitioning mode (SGPM), template-based multiple reference line intra-prediction (TMRL), most probable mode (MPM), and template-based intra-frame mode derivation (TIMD).

[0342] (ii) Interblocks: These blocks can use GPM (geometric partitioning mode).

[0343] (iii) Intra-block copy (IBC): These blocks can be used to obtain prediction results using both the intra-prediction mode and the blocks obtained through replication.

[0344] In other words, in the embodiment of the present invention, if the position referenced by the IBC block or interblock is in interpolation filtering mode, the transmission is performed using a conventional mode corresponding to the interpolation filtering mode.

[0345] (6) Selection of the basic transformation kernel for the interpolation filtering mode prediction block.

[0346] Currently, after completing the prediction of a block, the encoding side calculates residual values ​​from the predicted values ​​and original values, and these residual values ​​undergo further transformation and quantization. On the decoding side, the quantization coefficients analyzed from the bitstream undergo inverse quantization and inverse transformation to become reconstructed residual values, and the reconstructed value is obtained by adding these reconstructed residual values ​​to the predicted values.

[0347] In the aforementioned example, we demonstrated a method for deriving a gradient histogram from the prediction results of interpolation filter prediction, mapping it to the conventional prediction mode, and then selecting an inseparable transform kernel. For other basic transform kernels besides the inseparable transform kernel, the selection of the transform kernel is the same as the selection method for the PLANAR mode. However, since the characteristics of the interpolation filtering mode and the PLANAR mode are different, the selection of the basic transform kernel should be further optimized.

[0348] In the reference software ECM, basic transformations can be divided into horizontal and vertical directions, and the permitted transformation schemes in each direction include seven types: {'DCT2','DCT8','DST7','DCT5','DST4','DST1','IDTR'}. Here, DCT2, DCT8, and DCT5 are several subclasses of the discrete cosine transform, DST7, DST4, and DST1 are several subclasses of the discrete sine transform, and IDTR is the Identity transform, which represents no transformation.

[0349] In the reference software ECM, the most commonly used basic transformation modes are horizontal and vertical, both of which are DCT2, and are denoted as DCT2-DCT2. This is used as a primary transformation before the unseparated secondary transformation LFNST, and also as a transformation when the Multiple Transformation Selection (MTS) technique is turned off. On the other hand, when MTS mode is selected, the transformation process is not an unseparated transformation, but a combination of basic transformations in the horizontal and vertical directions. In ECM, based on the non-zero coefficient characteristics within the analyzed current block, the current block can select up to six non-DCT2-DCT2 transformation kernels.

[0350] In the embodiments of the present invention, for a prediction block of an interpolation filtering mode, the MTS basic transformation kernel of the residual should relate to whether an interpolation filtering mode was selected for the current block, and more specifically, to which type of submode of the interpolation filtering mode was selected, and / or to the size and shape of the current block.

[0351] As an example, the embodiment of the present application shows implementation methods for two basic transformation kernel candidates that can be used in the ECM under the current MTS design.

[0352] In one embodiment, the basic transformation kernels selectable in MTS are related to whether the interpolation filter prediction mode is selected for the current block. When the interpolation filter prediction mode is used for the current block, there are six types of MTS transformation kernels (the transformation kernels are horizontal transformation - vertical transformation). See Table 3 for details. If MTS is selected and the prediction mode for the current block is interpolation prediction mode, the corresponding target transformation kernel is selected from the six types of transformation kernels based on the analyzed MTS transformation kernel index value and the inverse transformation is performed.

[0353] In another embodiment, the basic transformation kernel selectable in MTS is related to whether an interpolation filter mode has been selected for the current block, and to the size and shape of the current block. The block shape and size are height × width. See Table 4 for details. If MTS is selected and the prediction mode for the current block is interpolation prediction mode, the corresponding target transformation kernel is selected and the inverse transformation is performed based on the analyzed MTS transformation kernel index value and the block shape and size. In this embodiment, the interpolation filter prediction mode is applicable to luminance blocks of 4 × 4 to 32 × 32.

[0354] To further explain, the method for obtaining the above candidate MTS conversion kernels includes the following steps.

[0355] In step 1, an image set or video set is encoded using an encoder that includes an interpolation filter prediction mode.

[0356] In step 2, the residuals of the blocks for which the interpolation filter mode has been selected are sorted according to classification (e.g., block shape and size, interpolation filter mode) to select possible horizontal-to-vertical transformation kernels for each type. The selection criteria for the transformation kernels may be the size of the SAD, the size of the SSE, or other evaluation criteria, such as transform coding gain, and are not particularly limited here. Here, the definition of transform coding gain is the arithmetic mean variance of the transformation coefficients divided by the geometric mean variance of the transformation coefficients.

[0357] (7) Nonlinear terms in interpolation filtering.

[0358] In the interpolation filtering described in the above embodiment, the interpolation filter prediction does not include a nonlinear term or a bias term. However, in order to improve the coding performance by adding a nonlinear term or a bias term, a nonlinear term or a bias term can be added to the interpolation filtering here. Here, the 15 linear terms used in this implementation process are the three situations shown in Figures 3A, 3B, and 3C, where the 15 taps of the interpolation filter's linear terms are the grid-filled positions, and the black-filled positions are the current prediction target positions. Based on this, three more taps of nonlinear terms can be added, and the positions of the reconstructed pixels used by the nonlinear terms are specifically the three positions filled with dots, as shown in Figures 14A, 14B, and 14C.

[0359] Here, the interpolation input for the 15 linear terms is p i =t i -m is the value of i, and the range of i is 0 to 14, corresponding to 14 grid-filled positions around the current prediction target position. iis the reconstructed or predicted value of a grid-filled position (depending on whether the input required for the current prediction position is within the current block or within the reference region), and m is a number to be subtracted, which may be, but is not limited to, the reconstructed value of the upper-left corner of the current block or the average value of the reference region.

[0360] Here, the interpolation input for the three nonlinear terms is p i =(( t i -m) × (t i -m)+midVal)>>bitDepth, where i is the three positions filled with dots, and p i is the value of the nonlinear term, and if midVal and bitDepth are 10 bits, they are equal to 512 and 10. In this way, when a nonlinear term is added, the formula for calculating the predicted value for the current predicted position is as follows:

[0361]

number

[0362] In addition to the above embodiment, adding a 3-tap nonlinear term to the 15-tap linear term of the target filter can also be done as shown in Figures 15A, 15B, and 15C. Specifically, the nonlinear term consists of three positions filled with dots, and the position filled in black represents the current target position. Here, Figures 15A, 15B, and 15C all have three additional nonlinear terms compared to Figures 14A, 14B, and 14C, but since different filter shapes all use the same nonlinear term, the calculation becomes simpler and the complexity is further reduced.

[0363] Furthermore, regarding the number of nonlinear terms, in addition to using three nonlinear terms, more nonlinear terms can be used in the embodiments of this application. For example, five nonlinear terms are used in Figures 16A, 16B, and 16C. As shown in Figures 16A, 16B, and 16C, five nonlinear terms (specifically, the positions filled with dots) are added to the 15-tap linear term of the interpolation filter. In other words, in the embodiments of this application, the number of nonlinear terms should be a positive integer, the specific number is not limited, and different designs can be made depending on the performance and complexity requirements.

[0364] In the embodiments of this application, the specific implementation of the above-described embodiments has been explained in detail. As can be seen therefrom, according to the technical proposal of the above-described embodiments, it is possible to reduce computational complexity, shorten coding time, and improve the cost-effectiveness of coding / decoding performance and coding complexity while guaranteeing coding / decoding performance. At the same time, it is possible to improve the accuracy of intra prediction, thereby improving coding / decoding efficiency.

[0365] In yet another embodiment of the present application, based on the same inventive concept as the previously described embodiment, a schematic diagram showing the configuration of the encoder provided by the embodiment of the present application is shown in Figure 20. As shown in Figure 20, the encoder 220 may include a first determination unit 2201 and a first prediction unit 2202, where, The first decision unit 2201 is configured to determine the target filtering mode of the current block and to determine the reference region of the current block based on the size parameters and target filtering mode of the current block. The first prediction unit 2202 is configured to determine the filter coefficients for the current block based on the reference region of the current block, perform an intra-prediction on the current block based on the filter coefficients, and determine the predicted value of the current block.

[0366] In some embodiments, the first decision unit 2201 is further configured to determine at least one candidate filtering mode, perform cost calculations for at least one candidate filtering mode, determine the cost result for at least one candidate filtering mode, determine the minimum cost result from the cost results for at least one candidate filtering mode, and determine the candidate filtering mode corresponding to the minimum cost result as the target filtering mode for the current block.

[0367] In some embodiments, the number of at least one candidate filtering mode is determined based on the number of reference region types in the current block and the number of target filter shapes.

[0368] In some embodiments, the target filtering mode includes the reference region type of the current block and the shape of the target filter.

[0369] In some embodiments, the first determination unit 2201 is further configured to determine that if the reference region type of the current block is type 1, the reference region of the current block includes the upper adjacent region and the left adjacent region; if the reference region type of the current block is type 2, the reference region of the current block includes the upper adjacent region; and if the reference region type of the current block is type 3, the reference region of the current block includes the left adjacent region, where the upper adjacent region refers to a reconfigured region adjacent to the upper side of the current block, and the left adjacent region refers to a reconfigured region adjacent to the left side of the current block.

[0370] In some embodiments, the current block size parameters include the height and width of the current block, and the first determination unit 2201 is configured to further determine minimum parameters from the height and width of the current block, and to determine the reference area of ​​the current block based on the minimum parameters and the target filtering mode.

[0371] In some embodiments, the size of the reference region of the current block is related to the shape and minimum parameters of the target filter.

[0372] In some embodiments, the first determination unit 2201 is further configured to perform the following steps: prohibit the current block from being of type 2 if the product of the current block's width and the first factor is less than the current block's height, and the number of reference region types for the current block is determined based on reference region types other than type 2; and prohibit the current block from being of type 3 if the product of the current block's height and the first factor is less than the current block's width, and the number of reference region types for the current block is determined based on reference region types other than type 3.

[0373] In some embodiments, the value of the first factor is a first predetermined constant.

[0374] In some embodiments, referring to Figure 20, the encoder 220 may further include an encoding unit 2203 configured to encode the target filtering mode of the current block and write the resulting encoded bits to the bitstream.

[0375] In some embodiments, the first decision unit 2201 is further configured to determine the context model of the current block.

[0376] The encoding unit 2203 is further configured to encode the target filtering mode of the current block based on the context model and to write the resulting encoded bits to the bitstream.

[0377] In some embodiments, the determination of the context model is Currently, block shape, Currently, the ratio of the block's width to its height is associated with at least one of these parameters.

[0378] In some embodiments, the first decision unit 2201 is configured to further determine multiple candidate subreference regions of the current block, where the multiple candidate subreference regions do not overlap, and to determine the autocorrelation coefficient matrix and cross-correlation coefficient vector for each of the multiple candidate subreference regions based on the shapes of the multiple candidate subreference regions and the target filter, and to store the autocorrelation coefficient matrix and cross-correlation coefficient vector for each of the multiple candidate subreference regions in a predetermined buffer.

[0379] In some embodiments, the first decision unit 2201 is further configured to determine the input and output values ​​of the target filter corresponding to at least one reference pixel in the first candidate subreference region based on the shape of the first candidate subreference region and the target filter, to determine the autocorrelation coefficient matrix of the first candidate subreference region based on the input values ​​of the target filter corresponding to at least one reference pixel, and to determine the cross-correlation coefficient vector of the first candidate subreference region based on the input and output values ​​of the target filter corresponding to at least one reference pixel, where the first candidate subreference region is any one of a plurality of candidate subreference regions.

[0380] In some embodiments, the first decision unit 2201 is further configured to divide the reference region of the current block, determine at least one subreference region, obtain the autocorrelation coefficient matrix and cross-correlation coefficient vector for each of the at least one subreference region from a predetermined buffer, determine the coefficients of the target filter based on the autocorrelation coefficient matrix and cross-correlation coefficient vector for each of the at least one subreference region, and determine the coefficients of the target filter as the filter coefficients of the current block.

[0381] In some embodiments, the first decision unit 2201 is further configured to determine a reference sample value corresponding to the pixel to be predicted in the current block.

[0382] The first prediction unit 2202 is further configured to determine the predicted value of the target pixel in the current block based on the reference sample value and filter coefficient corresponding to the target pixel in the current block.

[0383] In some embodiments, the first determination unit 2201 is further configured to determine the reconstructed value of the corresponding position within the reference region as the reference sample value if the reference sample value is located within the reference region of the current block, based on the shape of the target filter, and to determine the predicted value of the corresponding position within the current block as the reference sample value if the reference sample value is located inside the current block.

[0384] In some embodiments, the first prediction unit 2202 is further configured to determine a first input value of a target filter based on a reference sample value corresponding to the pixel to be predicted in the current block, to determine a first output value of the target filter based on the first input value and filter coefficients, and to determine a predicted value for the pixel to be predicted in the current block based on the first output value.

[0385] In some embodiments, the first decision unit 2201 is further configured to determine a second factor, perform a subtraction operation between the reference sample value and the second factor, and obtain the first input value of the target filter.

[0386] In some embodiments, the first determination unit 2201 is further configured to determine a second output value of the target filter based on a first input value and filter coefficients, perform a first process on the second output value, and determine a first output value of the target filter.

[0387] In some embodiments, the first decision unit 2201 is further configured to calculate the product of the first input value and the corresponding filter coefficients and to set the second output value of the target filter to be equal to the sum of n products, where n is the number of input terms corresponding to the target filter and n is a positive integer.

[0388] In some embodiments, the first decision unit 2201 is further configured to perform an addition operation on the second output value and the second factor to obtain the first output value of the target filter.

[0389] In some embodiments, the first determination unit 2201 is configured to further determine a third output value of the target filter, determine a fourth output value of the target filter based on the second and third output values, and perform an addition operation on the fourth output value and the second factor to obtain a first output value of the target filter.

[0390] In some embodiments, the first determination unit 2201 is further configured to determine the number of first type input terms corresponding to the target filter based on the shape of the target filter, and if the number of first type input terms corresponding to the target filter is p, to determine the p+q filter coefficients of the target filter, where p and q are both positive integers, and to determine the third output value of the target filter based on q filter coefficients out of the p+q filter coefficients and q second type input terms.

[0391] In some embodiments, the first determination unit 2201 is configured to further determine the number of first type input terms corresponding to the target filter based on the shape of the target filter, and if the number of first type input terms corresponding to the target filter is p, to determine the p+m filter coefficients of the target filter, where p and m are both positive integers, and to determine the third output value of the target filter based on m filter coefficients out of the p+m filter coefficients and m third type input terms.

[0392] In some embodiments, the first decision unit 2201 is configured to further determine the number of first type input terms corresponding to the target filter based on the shape of the target filter, and if the number of first type input terms corresponding to the target filter is p, to determine the p+k filter coefficients of the target filter, where p and k are both positive integers, and to determine the third output value of the target filter based on i filter coefficients and i second type input terms from the p+k filter coefficients, and j filter coefficients and j third type input terms from the p+k filter coefficients, where i and j are both positive integers and k = i + j.

[0393] In some embodiments, there is a linear relationship between the number of first type input terms and the reference sample value, a nonlinear relationship between the number of second type input terms and the reference sample value, and the number of third type input terms is predetermined bias information.

[0394] In some embodiments, the value of the second factor is a second predetermined constant.

[0395] In some embodiments, the first determination unit 2201 is further configured to determine the reconstruction value of at least one reference pixel within the reference region, perform an average calculation on the reconstruction value of at least one reference pixel to obtain a first average value, and set the value of the second factor equal to the first average value.

[0396] In some embodiments, the first prediction unit 2202 is further configured to perform a second process on the first output value to obtain a predicted value for the target pixel in the current block.

[0397] In some embodiments, the first prediction unit 2202 is further configured such that the second process is to set the predicted value of the pixel to be predicted in the current block to be equal to the first output value.

[0398] In some embodiments, the first prediction unit 2202 is further configured such that the second process is to limit the first output value to a predetermined numerical range. Here, the lower limit of the predetermined numerical range is the minimum reconstructed value within the reference region, and the upper limit of the predetermined numerical range is the maximum reconstructed value within the reference region.

[0399] In some embodiments, the first determination unit 2201 is further configured to determine the derived intra-prediction mode for the luminance component of the current block when using an intra-prediction based on filter coefficients for the luminance component of the current block, and to set the direct mode to the derived intra-prediction mode when using a direct mode intra-prediction for the chrominance component of the current block, thereby determining the predicted value of the chrominance component of the current block.

[0400] In some embodiments, the first decision unit 2201 is further configured to determine a reference block of the current block if the current block satisfies predetermined conditions, to determine a derived intra-prediction mode for the reference block if an intra-prediction based on filter coefficients is used for the reference block, and to add the derived intra-prediction mode to the intra-prediction mode candidate list of the current block.

[0401] In some embodiments, the current block satisfies the predetermined conditions, at least Currently, the block is an interpretation block. This includes one of the blocks that is currently an IBC block.

[0402] In some embodiments, the first determination unit 2201 is further configured to determine the original value of the current block and to determine the residual value of the current block based on the original value of the current block and the predicted value of the current block. The encoding unit 2203 is further configured to encode the residual value of the current block and write the resulting encoded bits to the bitstream.

[0403] In some embodiments, the encoding unit 2203 is configured to further perform a transformation on the residual value to obtain the transformation coefficient of the current block, perform a quantization on the transformation coefficient to obtain the quantization coefficient of the current block, encode the quantization coefficient of the current block, and write the resulting encoded bits to the bitstream.

[0404] In some embodiments, the encoding unit 2203 is further configured to determine the target transformation kernel for the current block when a multiple transformation selection mode is used for the current block and the target filtering mode is interpolation filtering mode, and to perform a transformation process on the residual values ​​based on the target transformation kernel to obtain the transformation coefficients for the current block.

[0405] In some embodiments, the determination of the target transformation kernel is related to at least one of the following parameters.

[0406] Current block target filtering mode.

[0407] Current block size parameter.

[0408] Currently in block form.

[0409] In some embodiments, the first decision unit 2201 is further configured to determine at least one candidate transformation kernel, perform cost calculations for at least one candidate transformation kernel, determine the cost result for at least one candidate transformation kernel, determine the minimum cost result from the cost results for at least one candidate transformation kernel, and determine the candidate transformation kernel corresponding to the minimum cost result as the target transformation kernel for the current block.

[0410] In some embodiments, the first decision unit 2201 is further configured to determine non-zero coefficient information of the current block and to determine at least one candidate transformation kernel based on the non-zero coefficient information of the current block.

[0411] In some embodiments, the number of candidate transformation kernels is six or less.

[0412] In some embodiments, the first decision unit 2201 is further configured to determine the translation kernel index value of the current block, where the translation kernel index value is used to indicate the index number of the target translation kernel in at least one candidate translation kernel. The encoding unit 2203 is further configured to encode the transform kernel index value of the current block and write the resulting encoded bits to the bitstream.

[0413] In some embodiments, the first decision unit 2201 is further configured to determine the transformation kernel index value of the current block, where the transformation kernel index value is used to indicate the index number of the target transformation kernel in at least one candidate transformation kernel, and at least one candidate transformation kernel is related to the size parameter of the current block. The encoding unit 2203 is further configured to encode the transform kernel index value of the current block and write the resulting encoded bits to the bitstream.

[0414] To ensure understanding, in the embodiments of this application, a "unit" may be a partial circuit, a partial processor, a partial program or software, and may be a module or non-modular. Furthermore, each component in this embodiment may be integrated into a single processing unit, each unit may exist individually in physical form, or two or more units may be integrated into a single unit. The integrated unit may be implemented in hardware form or in the form of a software function module.

[0415] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored on a computer-readable storage medium. Based on this understanding, essential parts of the proposed technology of this embodiment, parts that contribute to the prior art, or all or part of the proposed technology can be embodied in the form of a software product. The computer software product is stored on a storage medium and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) or processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB memory, removable hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0416] Accordingly, the embodiments of the present application provide a computer-readable storage medium applicable to an encoder 220, the computer-readable storage medium storing a computer program, and when the computer program is executed by a first processor, the method described in any one of the above embodiments is realized.

[0417] Referring to Figure 21, based on the configuration of the encoder 220 and the computer-readable storage medium, a schematic diagram showing the specific hardware configuration of the encoder 220 provided by the embodiment of the present application is shown. As shown in Figure 21, the encoder 220 may include a first communication interface 2301, a first memory 2302, and a first processor 2303. Each component is coupled to one another by a first bus system 2304. To understand this, the first bus system 2304 is used to provide connection communication between these components. In addition to the data bus, the first bus system 2304 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all the various buses are shown as the first bus system 2304 in Figure 21. Here, The first communication interface 2301 is used for receiving and transmitting signals in the process of sending and receiving information with other external network elements. The first memory 2302 is used to store computer programs that can be executed on the first processor 2303. When the first processor 2303 executes the computer program, The current step is to determine the target filtering mode for the block, The steps include determining the reference region of the current block based on the current block's size parameter and target filtering mode, The steps include determining the filter coefficients of the current block based on the reference region of the current block, The steps include: performing an intra-prediction for the current block based on the filter coefficients and determining the predicted value for the current block; It is used to perform [this action].

[0418] To ensure clarity, the first memory 2302 in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Here, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), or flash memory. Volatile memory may be random access memory (RAM) and may be used as an external cache. Many forms of RAM are available, including, but are not limited to, static random access memory (Static RAM, SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchlink dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus random access memory (Direct Rambus RAM, DRRAM). The first memory 2302 of the systems and methods described herein is intended to include, but is not limited to, any other suitable type of memory.

[0419] The first processor 2303 may be an integrated circuit chip and have signal processing capabilities. In the implementation process, each step of the above method can be completed by hardware integrated logic circuits or software-based instructions within the first processor 2303. The first processor 2303 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Each method, step, and logic block diagram disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor may be a microprocessor, and the processor may be any conventional processor, etc. In combination with the steps of the method disclosed in the embodiments of this application, it can be executed directly by a hardware decoder processor or by a combination of hardware and software modules within the decoder processor. The software module can be located in a storage medium that is well-established in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, or registers. The storage medium is located in the first memory 2302, and the first processor 2303 reads the information in the first memory 2302 and, in combination with its hardware, completes the steps of the method described above.

[0420] To ensure understanding, these embodiments described herein can be implemented by hardware, software, firmware, middleware, microcode, or a combination thereof. In hardware implementations, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSP devices, DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof. In software implementations, the technologies described herein can be implemented by modules (e.g., processes, functions, etc.) that perform the functions described herein. The software code is stored in memory and executed by the processor. The memory can be implemented within or outside the processor.

[0421] Optionally, in another embodiment, the first processor 2303 is further configured to perform the method described in any one of the above embodiments when executing the computer program.

[0422] This embodiment provides an encoder in which, in an intra-prediction technique based on interpolation filtering, the reference region for calculating filter coefficients is related not only to the target filtering mode but also to the current block size parameter. For example, a large reference region can be used when the current block size is large, and a small reference region can be used when the current block size is small. This reduces computational complexity and shortens coding time. At the same time, it improves the accuracy of intra-prediction, thereby improving coding and decoding performance.

[0423] In yet another embodiment of the present application, based on the same inventive concept as the previously described embodiment, a schematic diagram showing the configuration of the decoder provided by the embodiment of the present application is shown in Figure 22. As shown in Figure 22, the decoder 240 may include a decoding unit 2401, a second determination unit 2402, and a second prediction unit 2403, where, The decoding unit 2401 is configured to decode the bitstream and determine the target filtering mode for the current block. The second decision unit 2402 is configured to determine the reference region of the current block based on the size parameters and target filtering mode of the current block. The second prediction unit 2403 is configured to determine the filter coefficients for the current block based on the reference region of the current block, perform an intra-prediction on the current block based on the filter coefficients, and determine the predicted value of the current block.

[0424] In some embodiments, the target filtering mode includes the reference region type of the current block and the shape of the target filter.

[0425] In some embodiments, the second determination unit 2402 is further configured to determine that if the reference region type of the current block is type 1, the reference region of the current block includes the upper adjacent region and the left adjacent region; if the reference region type of the current block is type 2, the reference region of the current block includes the upper adjacent region; and if the reference region type of the current block is type 3, the reference region of the current block includes the left adjacent region, where the upper adjacent region refers to a reconfigured region adjacent to the upper side of the current block, and the left adjacent region refers to a reconfigured region adjacent to the left side of the current block.

[0426] In some embodiments, the current block size parameters include the height and width of the current block, and the second determination unit 2402 is configured to further determine minimum parameters from the height and width of the current block, and to determine the reference area of ​​the current block based on the minimum parameters and the target filtering mode.

[0427] In some embodiments, the size of the reference region of the current block is related to the shape and minimum parameters of the target filter.

[0428] In some embodiments, the second decision unit 2402 is further configured to determine that the reference region type in the target prediction mode is any one other than the second type if the product of the current block width and the first factor is less than the current block height, and to determine that the reference region type in the target prediction mode is any one other than the third type if the product of the current block height and the first factor is less than the current block width.

[0429] In some embodiments, the value of the first factor is a first predetermined constant.

[0430] In some embodiments, the second decision unit 2402 is further configured to determine the context model of the current block. The decoding unit 2401 is further configured to decode the bitstream based on the context model and determine the target filtering mode for the current block.

[0431] In some embodiments, the determination of the context model is Currently, block shape, Currently, the ratio of the block's width to its height is associated with at least one of these parameters.

[0432] In some embodiments, the second decision unit 2402 is configured to further determine the input and output values ​​of the target filter corresponding to at least one reference pixel in the reference region based on the reference region and shape of the current block, determine the autocorrelation matrix based on the input values ​​of the target filter corresponding to at least one reference pixel, determine the cross-correlation vector based on the input and output values ​​of the target filter corresponding to at least one reference pixel, determine the coefficients of the target filter based on the autocorrelation matrix and the cross-correlation vector, and determine the coefficients of the target filter as the filter coefficients of the current block.

[0433] In some embodiments, the second prediction unit 2403 is further configured to determine a reference sample value corresponding to the pixel to be predicted in the current block, and to determine a predicted value for the pixel to be predicted in the current block based on the reference sample value and filter coefficients corresponding to the pixel to be predicted in the current block.

[0434] In some embodiments, the second determination unit 2402 is further configured to determine the reconstructed value of the corresponding position within the reference region as the reference sample value if the reference sample value is located within the reference region of the current block, based on the shape of the target filter, and to determine the predicted value of the corresponding position within the current block as the reference sample value if the reference sample value is located inside the current block.

[0435] In some embodiments, the second prediction unit 2403 is further configured to determine a first input value of a target filter based on a reference sample value corresponding to the pixel to be predicted in the current block, determine a first output value of the target filter based on the first input value and filter coefficients, and determine the predicted value of the pixel to be predicted in the current block based on the first output value.

[0436] In some embodiments, the second decision unit 2402 is further configured to determine a second factor, perform a subtraction operation between the reference sample value and the second factor, and obtain the first input value of the target filter.

[0437] In some embodiments, the second determination unit 2402 is further configured to determine a second output value of the target filter based on the first input value and filter coefficients, perform a first process on the second output value, and determine a first output value of the target filter.

[0438] In some embodiments, the second decision unit 2402 is further configured to calculate the product of the first input value and the corresponding filter coefficients, and to set the second output value of the target filter to be equal to the sum of n products, where n is the number of input terms corresponding to the target filter, and n is a positive integer.

[0439] In some embodiments, the second decision unit 2402 is further configured to perform an addition operation on the second output value and the second factor to obtain the first output value of the target filter.

[0440] In some embodiments, the second determination unit 2402 is configured to further determine a third output value of the target filter, determine a fourth output value of the target filter based on the second and third output values, and perform an addition operation on the fourth output value and the second factor to obtain a first output value of the target filter.

[0441] In some embodiments, the second determination unit 2402 is further configured to determine the number of first-type input terms corresponding to the target filter based on the shape of the target filter, and if the number of first-type input terms corresponding to the target filter is p, to determine the p+q filter coefficients of the target filter, where p and q are both positive integers, and to determine the third output value of the target filter based on q filter coefficients out of the p+q filter coefficients and q second-type input terms.

[0442] In some embodiments, the second determination unit 2402 is further configured to determine the number of first-type input terms corresponding to the target filter based on the shape of the target filter, and if the number of first-type input terms corresponding to the target filter is p, to determine the p+m filter coefficients of the target filter, where p and m are both positive integers, and to determine the third output value of the target filter based on m filter coefficients out of the p+m filter coefficients and m third-type input terms.

[0443] In some embodiments, the second decision unit 2402 is configured to further determine the number of first-type input terms corresponding to the target filter based on the shape of the target filter, and if the number of first-type input terms corresponding to the target filter is p, to determine the p+k filter coefficients of the target filter, where p and k are both positive integers, and to determine the third output value of the target filter based on i filter coefficients and i second-type input terms from the p+k filter coefficients, and j filter coefficients and j third-type input terms from the p+k filter coefficients, where i and j are both positive integers and k = i + j.

[0444] In some embodiments, there is a linear relationship between the number of first type input terms and the reference sample value, a nonlinear relationship between the number of second type input terms and the reference sample value, and the number of third type input terms is predetermined bias information.

[0445] In some embodiments, the value of the second factor is a second predetermined constant.

[0446] In some embodiments, the second determination unit 2402 is further configured to determine the reconstruction value of at least one reference pixel within the reference region, perform an average calculation on the reconstruction value of at least one reference pixel to obtain a first average value, and set the value of the second factor equal to the first average value.

[0447] In some embodiments, the second prediction unit 2403 is configured to perform a second process on the first output value to obtain a predicted value for the target pixel in the current block.

[0448] In some embodiments, the second prediction unit 2403 is further configured such that the second process is to set the predicted value of the pixel to be predicted in the current block to be equal to the first output value.

[0449] In some embodiments, the second prediction unit 2403 is further configured such that the second process is to limit the first output value to a predetermined numerical range. Here, the lower limit of the predetermined numerical range is the minimum reconstructed value within the reference region, and the upper limit of the predetermined numerical range is the maximum reconstructed value within the reference region.

[0450] In some embodiments, the second determination unit 2402 is further configured to determine the derived intra-prediction mode for the luminance component of the current block when using an intra-prediction based on filter coefficients for the luminance component of the current block, and to set the direct mode to the derived intra-prediction mode when using a direct mode intra-prediction for the chrominance component of the current block, thereby determining the predicted value of the chrominance component of the current block.

[0451] In some embodiments, the second decision unit 2402 is further configured to determine a reference block for the current block if the current block satisfies predetermined conditions, to determine a derived intra-prediction mode for the reference block if an intra-prediction based on filter coefficients is used for the reference block, and to add the derived intra-prediction mode to the intra-prediction mode candidate list for the current block.

[0452] In some embodiments, the current block satisfies the predetermined conditions, at least Currently, the block is an interpretation block. This includes one of the following: the block is currently an intrablock replicated IBC block.

[0453] In some embodiments, the decoding unit 2401 is further configured to decode the bitstream and determine the residual value of the current block. The second decision unit 2402 is further configured to determine the reconstruction value of the current block based on the predicted value of the current block and the residual value of the current block.

[0454] In some embodiments, the decoding unit 2401 is further configured to decode the bitstream, determine the quantization coefficients of the current block, perform inverse quantization on the quantization coefficients to obtain the transformation coefficients of the current block, perform inverse transformation on the transformation coefficients to obtain the residual value of the current block.

[0455] In some embodiments, the decoding unit 2401 is further configured to determine the target transformation kernel of the current block when a multiple transformation selection mode is used for the current block and the target filtering mode is interpolation filtering mode, and to perform an inverse transformation on the transformation coefficients based on the target transformation kernel to obtain the residual value of the current block.

[0456] In some embodiments, the determination of the target translation kernel is as follows: Current block target filtering mode, The current block size parameter, The current block shape has a relationship with at least one parameter.

[0457] In some embodiments, the decoding unit 2401 is further configured to decode the bitstream and determine the transformed kernel index value of the current block.

[0458] The second decision unit 2402 is further configured to determine the target translation kernel for the current block from at least one candidate translation kernel based on the translation kernel index value.

[0459] In some embodiments, the decoding unit 2401 is further configured to decode the bitstream and determine the transformed kernel index value of the current block. The second decision unit 2402 is further configured to determine the target translation kernel for the current block from at least one candidate translation kernel, based on the translation kernel index value and the size parameter of the current block.

[0460] In some embodiments, the second decision unit 2402 is further configured to decode the bitstream and determine the non-zero coefficient information of the current block. The second decision unit 2402 is further configured to determine at least one candidate transformation kernel based on the non-zero coefficient information of the current block.

[0461] In some embodiments, the number of candidate transformation kernels is six or less.

[0462] To make it clear, in this embodiment, a "unit" can be a partial circuit, a partial processor, a partial program or software, and may be a module or non-modular. Furthermore, each component in this embodiment may be integrated into a single processing unit, each unit may exist individually in physical form, or two or more units may be integrated into a single unit. The integrated unit may be implemented in hardware form or in the form of a software function module.

[0463] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this embodiment provides a computer-readable storage medium applicable to a decoder 240, the computer-readable storage medium storing a computer program, and when the computer program is executed by a second processor, the method described in any one of the above embodiments is implemented.

[0464] Referring to Figure 23, based on the configuration of the decoder 240 and the computer-readable storage medium, a schematic diagram showing the specific hardware configuration of the decoder 240 provided by the embodiment of the present application is shown. As shown in Figure 23, the decoder 240 may include a second communication interface 2501, a second memory 2502, and a second processor 2503. Each component is coupled to one another by a second bus system 2504. To make it clear, the second bus system 2504 is used to enable connection communication between these components. In addition to the data bus, the second bus system 2504 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all the various buses are shown as the second bus system 2504 in Figure 23. Here, The second communication interface 2501 is used for receiving and transmitting signals in the process of sending and receiving information with other external network elements. The second memory 2502 is used to store computer programs that can be executed on the second processor 2503. The second processor 2503, when executing the computer program, The steps include: decrypting the bitstream and determining the target filtering mode for the current block, The steps include determining the reference region of the current block based on the current block's size parameter and target filtering mode, The steps include determining the filter coefficients of the current block based on the reference region of the current block, This is used to perform the steps of performing an intra-prediction on the current block based on the filter coefficients and determining the predicted value of the current block.

[0465] Optionally, in another embodiment, the second processor 2503 is further configured to perform the method described in any one of the above embodiments when executing the computer program.

[0466] To make it easier to understand, the second memory 2502 has hardware functionality similar to the first memory 2302, and the second processor 2503 has hardware functionality similar to the first processor 2303. A detailed explanation is omitted here.

[0467] This embodiment provides a decoder in which, when determining the reference region for calculating filter coefficients in an intra-prediction technique based on interpolation filtering, the reference region is related not only to the target filtering mode but also to the current block size parameter. For example, a large reference region can be used when the current block size is large, and a small reference region can be used when the current block size is small. This reduces computational complexity while simultaneously improving the accuracy of intra-prediction, thereby improving encoding and decoding performance.

[0468] In yet another embodiment of the present application, with reference to Figure 24, a schematic diagram is shown illustrating the configuration of an encoding / decoding system provided by an embodiment of the present application. As shown in Figure 24, the encoding / decoding system 260 may include an encoder 2601 and a decoder 2602.

[0469] In the embodiments of the present application, encoder 2601 may be the encoder described in any one of the embodiments described above, and decoder 2602 may be the decoder described in any one of the embodiments described above.

[0470] It should be explained that in this application, the terms “include,” “incorporate,” or any other variation thereof are intended to mean non-exclusive inclusion, thereby meaning that a process, method, article, or apparatus containing a set of elements includes not only those elements but also other elements not expressly enumerated, or elements specific to such process, method, article, or apparatus. An element limited by the phrase “including one…” does not preclude the existence of another identical element in a process, method, article, or apparatus containing that element, unless further constraints are imposed.

[0471] The above-mentioned embodiment numbers are for illustrative purposes only and do not indicate any ranking of the embodiments.

[0472] The methods disclosed in some of the method embodiments provided in this application can be combined in any way, as long as they do not contradict each other, to obtain new method embodiments.

[0473] The features disclosed in some of the product embodiments provided in this application can be combined in any way, as long as they do not contradict each other, to obtain new product embodiments.

[0474] The features disclosed in some embodiments of the methods or apparatus provided in this application can be combined in any way, as long as they do not contradict each other, to obtain new embodiments of methods or apparatus.

[0475] The above are merely specific embodiments of the present application, but the scope of protection is not limited thereto. Any modifications or substitutions that a person skilled in the art could easily conceive of within the scope of the art disclosed herein should be included within the scope of protection. Therefore, the scope of protection should be based on the claims.

[0476] Industrial applicability In the embodiment of this application, whether on the encoding or decoding side, after determining the target filtering mode of the current block, the reference region of the current block is determined based on the size parameter and target filtering mode of the current block. Next, the filter coefficients of the current block are determined based on the reference region of the current block. Furthermore, intra-prediction is performed on the current block based on the filter coefficients to determine the predicted value of the current block. This means that in the intra-prediction technique based on interpolation filtering, when determining the reference region for calculating the filter coefficients, it is related not only to the target filtering mode but also to the size parameter of the current block. For example, a large reference region can be used when the size of the current block is large, and a small reference region can be used when the size of the current block is small. This makes it possible to reduce computational complexity, shorten encoding time, and improve the cost-effectiveness of encoding / decoding performance and encoding complexity while guaranteeing encoding / decoding performance. At the same time, the accuracy of intra-prediction can be improved, thereby improving encoding / decoding efficiency.

Claims

1. A decoding method applied to a decoder, wherein the decoding method is The steps include: decrypting the bitstream and determining the target filtering mode for the current block, The steps include determining the reference region of the current block based on the size parameter of the current block and the target filtering mode, The steps include determining the filter coefficients of the current block based on the reference region of the current block, The steps include: performing an intra-prediction for the current block based on the filter coefficients and determining the predicted value of the current block; A decryption method characterized by including the following.

2. The target filtering mode includes the reference region type of the current block and the shape of the target filter, The decoding method according to claim 1.

3. The decoding method further, If the reference region type of the current block is of type 1, the step of determining that the reference region of the current block includes the upper adjacent region and the left adjacent region, If the reference region type of the current block is of type 2, the step of determining that the reference region of the current block includes the upper adjacent region, If the reference region type of the current block is of type 3, the step of determining that the reference region of the current block includes the left adjacent region, The aforementioned upper adjacent region refers to the reconfigured region adjacent to the upper side of the current block, and the aforementioned left adjacent region refers to the reconfigured region adjacent to the left side of the current block. The decoding method according to claim 2.

4. The size parameter of the current block includes the height and width of the current block, and the step of determining the reference region of the current block based on the size parameter of the current block and the target filtering mode is: The steps include determining the minimum parameter from the height and width of the current block, The steps include determining the reference region of the current block based on the minimum parameter and the target filtering mode, The decoding method according to claim 3.

5. The size of the reference region of the current block is related to the shape of the target filter and the minimum parameter. The decoding method according to claim 4.

6. The decoding method further, If the product of the width of the current block and the first factor is less than the height of the current block, the step of determining that the reference region type in the target prediction mode is any one other than the second type, If the product of the height of the current block and the first factor is less than the width of the current block, the step of determining that the reference region type in the target prediction mode is any one other than the three types is included, The decoding method according to claim 3.

7. The value of the first factor is a first predetermined constant. The decoding method according to claim 6.

8. The step of decoding the bitstream and determining the target filtering mode of the current block is: The steps include determining the context model of the current block, The steps include decoding the bitstream based on the context model and determining the target filtering mode of the current block, The decoding method according to claim 1.

9. The determination of the aforementioned context model is The current shape of the block, The ratio of the width and height of the current block, having a relationship with at least one of the parameters, The decoding method according to claim 8.

10. The step of determining the filter coefficients of the current block based on the reference region of the current block is: The steps include determining the input value and output value of the target filter corresponding to at least one reference pixel in the reference region, based on the reference region of the current block and the shape of the target filter, The steps include determining the autocorrelation matrix based on the input value of the target filter corresponding to the at least one reference pixel, The steps include determining a cross-correlation coefficient vector based on the input value of the target filter corresponding to at least one reference pixel and the output value of the target filter, The steps include determining the coefficients of the target filter based on the autocorrelation matrix and the cross-correlation vector, The steps include determining the coefficients of the target filter as the filter coefficients of the current block, The decoding method according to claim 2.

11. The step of performing an intra-prediction for the pixel points in the current block based on the filter coefficients and determining the predicted values ​​of the pixel points in the current block is: The steps include determining a reference sample value corresponding to the pixel to be predicted within the current block, The steps include determining the predicted value of the target pixel in the current block based on the reference sample value and filter coefficient corresponding to the target pixel in the current block, The decoding method according to any one of claims 2 to 10.

12. The step of determining the reference sample value corresponding to the pixel to be predicted in the current block is: Based on the shape of the target filter, if the reference sample value is located in the reference region of the current block, the step of determining the reconstructed value of the corresponding position in the reference region as the reference sample value, If the reference sample value is located inside the current block, the step of determining the predicted value of the corresponding position within the current block as the reference sample value includes: The decoding method according to claim 11.

13. The step of determining the predicted value of the target pixel in the current block based on the reference sample value and filter coefficient corresponding to the target pixel in the current block is: The steps include determining the first input value of the target filter based on the reference sample value corresponding to the target pixel in the current block, A step of determining the first output value of the target filter based on the first input value and the filter coefficients, The steps include determining the predicted value of the target pixel in the current block based on the first output value, The decoding method according to claim 11.

14. The step of determining the first input value of the target filter based on the reference sample value corresponding to the target pixel in the current block is: The step of determining the second factor, The steps include performing a subtraction operation between the reference sample value and the second factor to obtain the first input value of the target filter, The decoding method according to claim 13.

15. The step of determining the first output value of the target filter based on the first input value and the filter coefficient is: The steps include determining the second output value of the target filter based on the first input value and the filter coefficients, The steps include: performing a first process on the second output value to determine the first output value of the target filter; The decoding method according to claim 14.

16. The step of determining the second output value of the target filter based on the first input value and the filter coefficients is as follows: The steps include: calculating the product of the first input value and the corresponding filter coefficient; The step of setting the second output value of the target filter to be equal to the sum of n of the aforementioned products, where n represents the number of input terms corresponding to the target filter, and n is a positive integer. The decoding method according to claim 15.

17. The step of performing a first process on the second output value to determine the first output value of the target filter is: The step includes performing an addition operation on the second output value and the second factor to obtain the first output value of the target filter, The decoding method according to claim 15.

18. The step of performing a first process on the second output value to determine the first output value of the target filter is: The steps include determining the third output value of the target filter, The steps include determining a fourth output value of the target filter based on the second output value and the third output value, The steps include: performing an addition operation on the fourth output value and the second factor to obtain the first output value of the target filter; The decoding method according to claim 15.

19. The step of determining the third output value of the target filter is as follows: A step of determining the number of first type input terms corresponding to the target filter based on the shape of the target filter, If the number of input terms of the first type corresponding to the target filter is p, the step of determining p+q filter coefficients of the target filter, wherein p and q are both positive integers, The steps include determining a third output value of the target filter based on q filter coefficients out of the p+q filter coefficients and q second-type input terms, The decoding method according to claim 18.

20. The step of determining the third output value of the target filter is as follows: A step of determining the number of first type input terms corresponding to the target filter based on the shape of the target filter, If the number of input terms of the first type corresponding to the target filter is p, the step of determining p+m filter coefficients of the target filter, wherein p and m are both positive integers, The steps include determining the third output value of the target filter based on m filter coefficients out of the p+m filter coefficients and m third-type input terms, The decoding method according to claim 18.

21. The step of determining the third output value of the target filter is as follows: A step of determining the number of first type input terms corresponding to the target filter based on the shape of the target filter, If the number of input terms of the first type corresponding to the target filter is p, the step of determining the p+k filter coefficients of the target filter, wherein p and k are both positive integers, The process includes a step of determining a third output value of the target filter based on i filter coefficients and i second-type input terms from the p+k filter coefficients, and j filter coefficients and j third-type input terms from the p+k filter coefficients, wherein i and j are both positive integers and k = i + j. The decoding method according to claim 18.

22. There is a linear relationship between the number of input terms of the first type and the reference sample value, a nonlinear relationship between the number of input terms of the second type and the reference sample value, and the number of input terms of the third type is predetermined bias information. The decoding method according to claim 21.

23. The value of the second factor is a second predetermined constant. The decoding method according to claim 14, 17, or 18.

24. The step of determining the aforementioned second factor is: The steps include determining the reconstruction value of at least one reference pixel within the reference region, The steps include: calculating the average value for the reconstruction value of at least one reference pixel to obtain a first average value; The steps include setting the value of the second factor to be equal to the first mean value, The decoding method according to claim 14, 17, or 18.

25. The step of determining the predicted value of the target pixel in the current block based on the first output value is: The process includes the step of performing a second process on the first output value to obtain a predicted value for the target pixel in the current block, The decoding method according to claim 13.

26. The decoding method further, The second process includes setting the predicted value of the target pixel in the current block to be predicted equal to the first output value. The decoding method according to claim 25.

27. The decoding method further, The second process includes limiting the first output value to a predetermined numerical range, The lower limit of the predetermined numerical range is the minimum reconstruction value within the reference region, and the upper limit of the predetermined numerical range is the maximum reconstruction value within the reference region. The decoding method according to claim 25.

28. The decoding method further, When using an intra-prediction based on filter coefficients for the luminance component of the current block, the steps include determining the derivation intra-prediction mode for the luminance component of the current block, When using direct mode intra prediction for the color difference component of the current block, the steps include setting the direct mode to the derived intra prediction mode and thereby determining the predicted value of the color difference component of the current block, The decoding method according to any one of claims 1 to 27.

29. The decoding method further, If the current block satisfies predetermined conditions, the step of determining the reference block of the current block, When using intra prediction based on filter coefficients for the reference block, the steps include determining the derived intra prediction mode for the reference block, The steps include adding the derived intra-prediction mode to the intra-prediction mode candidate list of the current block, The decoding method according to any one of claims 1 to 27.

30. The current block satisfies the predetermined conditions, at least, The current block is an interpretation block. The current block includes one of the following: The decoding method according to claim 29.

31. The decoding method further, The steps include: decoding the bitstream and determining the residual value of the current block; The steps include determining the reconstructed value of the current block based on the predicted value of the current block and the residual value of the current block, The decoding method according to any one of claims 1 to 30.

32. The step of decoding the bitstream and determining the residual value of the current block is: The steps include decoding the bitstream and determining the quantization coefficient of the current block, The steps include performing an inverse quantization process on the quantization coefficients to obtain the transformation coefficients of the current block, The steps include performing an inverse transformation on the transformation coefficient to obtain the residual value of the current block, The decoding method according to claim 31.

33. The step of performing an inverse transformation on the transformation coefficient to obtain the residual value of the current block is: When a multiple transformation selection mode is used for the current block and the target filtering mode is interpolation filtering mode, the steps include determining the target transformation kernel for the current block, The steps include: performing an inverse transformation on the transformation coefficients based on the target transformation kernel to obtain the residual value of the current block; The decoding method according to claim 32.

34. The determination of the target translation kernel is as follows: The target filtering mode of the current block, The size parameter of the current block, The current shape of the block has a relationship with at least one parameter among them, The decoding method according to claim 33.

35. The step of determining the target translation kernel of the current block is: The steps include: decoding the bitstream and determining the transformation kernel index value of the current block; The steps include determining the target transformation kernel for the current block from at least one candidate transformation kernel based on the transformation kernel index value, The decoding method according to claim 33.

36. The step of determining the target translation kernel of the current block is: The steps include: decoding the bitstream and determining the transformation kernel index value of the current block; The steps include determining a target transformation kernel for the current block from at least one candidate transformation kernel based on the transformation kernel index value and the size parameter of the current block, The decoding method according to claim 33.

37. The decoding method further, The steps include: decoding the bitstream and determining the non-zero coefficient information of the current block; The steps include determining the at least one candidate transformation kernel based on the non-zero coefficient information of the current block, The decoding method according to claim 35 or 36.

38. The number of at least one candidate transformation kernels is six or less. The decoding method according to claim 37.

39. An encoding method applied to an encoder, wherein the encoding method is The current step is to determine the target filtering mode for the block, The steps include determining the reference region of the current block based on the size parameter of the current block and the target filtering mode, The steps include determining the filter coefficients of the current block based on the reference region of the current block, The steps include: performing an intra-prediction for the current block based on the filter coefficients and determining the predicted value of the current block; An encoding method characterized by including

40. The step of determining the target filtering mode of the current block is: The steps include determining at least one candidate filtering mode, A step of calculating the cost for the at least one candidate filtering mode and determining the cost result for the at least one candidate filtering mode, The steps include determining a minimum cost result from the cost results of at least one candidate filtering mode, and determining the candidate filtering mode corresponding to the minimum cost result as the target filtering mode for the current block, The encoding method according to claim 39.

41. The number of at least one candidate filtering modes is determined based on the number of reference region types in the current block and the number of target filter shapes. The encoding method according to claim 40.

42. The target filtering mode includes the reference region type of the current block and the shape of the target filter, The encoding method according to claim 40.

43. The aforementioned encoding method further, If the reference region type of the current block is of type 1, the step of determining that the reference region of the current block includes the upper adjacent region and the left adjacent region, If the reference region type of the current block is of type 2, the step of determining that the reference region of the current block includes the upper adjacent region, If the reference region type of the current block is of type 3, the step of determining that the reference region of the current block includes the left adjacent region, The aforementioned upper adjacent region refers to the reconfigured region adjacent to the upper side of the current block, and the aforementioned left adjacent region refers to the reconfigured region adjacent to the left side of the current block. The encoding method according to claim 42.

44. The size parameter of the current block includes the height and width of the current block, and the step of determining the reference region of the current block based on the size parameter of the current block and the target filtering mode is: The steps include determining the minimum parameter from the height and width of the current block, The steps include determining the reference region of the current block based on the minimum parameter and the target filtering mode, The encoding method according to claim 43.

45. The size of the reference region of the current block is related to the shape of the target filter and the minimum parameter. The encoding method according to claim 44.

46. The aforementioned encoding method further, If the product of the width of the current block and the first factor is less than the height of the current block, the step of prohibiting the current block from being of the second type of reference region, wherein the number of reference region types of the current block is determined based on reference region types other than the second type. If the product of the height of the current block and the first factor is less than the width of the current block, the step of prohibiting the current block from being of the third type of reference region is the step of determining the number of reference region types of the current block based on other reference region types other than the third type, including: The encoding method according to claim 43.

47. The value of the first factor is a first predetermined constant. The encoding method according to claim 46.

48. The aforementioned encoding method further, The process includes the steps of encoding the target filtering mode of the current block and writing the resulting encoded bits to a bitstream. The encoding method according to claim 39.

49. The step of encoding the target filtering mode of the current block and writing the resulting encoded bits to the bitstream is: The steps include determining the context model of the current block, The steps include encoding the target filtering mode of the current block based on the context model and writing the resulting encoded bits to a bitstream, The encoding method according to claim 48.

50. The determination of the aforementioned context model is The current shape of the block, The ratio of the width and height of the current block, having a relationship with at least one of the parameters, The encoding method according to claim 49.

51. The aforementioned encoding method further, A step of determining a plurality of candidate subreference regions of the current block, wherein the plurality of candidate subreference regions do not overlap with each other. The steps include determining the autocorrelation coefficient matrix and cross-correlation coefficient vector for each of the multiple candidate subreference regions based on the shape of the target filter, The steps include storing the autocorrelation coefficient matrix and cross-correlation coefficient vector of each of the plurality of candidate subreference regions in a predetermined buffer, The encoding method according to claim 42.

52. The step of determining the autocorrelation coefficient matrix and cross-correlation coefficient vector for each of the multiple candidate subreference regions based on the shape of the target filter is as follows: A step of determining the input value and output value of the target filter corresponding to at least one reference pixel in the first candidate subreference region, based on the first candidate subreference region and the shape of the target filter. The steps include determining the autocorrelation coefficient matrix of the first candidate subreference region based on the input value of the target filter corresponding to the at least one reference pixel, The step of determining the cross-correlation coefficient vector of the first candidate sub-reference region based on the input value of the target filter corresponding to the at least one reference pixel and the output value of the target filter, The first candidate subreference region is any one of the plurality of candidate subreference regions. The encoding method according to claim 51.

53. The step of determining the filter coefficients of the current block based on the reference region of the current block is: The steps include dividing the reference region of the current block and determining at least one subreference region, The steps include obtaining the autocorrelation coefficient matrix and cross-correlation coefficient vector for each of the at least one subreference region from the predetermined buffer, The steps include determining the coefficients of the target filter based on the autocorrelation coefficient matrix and cross-correlation coefficient vector of each of the at least one sub-reference region, The steps include determining the coefficients of the target filter as the filter coefficients of the current block, The encoding method according to claim 51.

54. The step of performing an intra-prediction for the pixel points in the current block based on the filter coefficients and determining the predicted values ​​of the pixel points in the current block is: The steps include determining a reference sample value corresponding to the pixel to be predicted within the current block, The steps include determining the predicted value of the target pixel in the current block based on the reference sample value and filter coefficient corresponding to the target pixel in the current block, The encoding method according to any one of claims 42 to 53.

55. The step of determining the reference sample value corresponding to the pixel to be predicted in the current block is: Based on the shape of the target filter, if the reference sample value is located in the reference region of the current block, the step of determining the reconstructed value of the corresponding position in the reference region as the reference sample value, If the reference sample value is located inside the current block, the step of determining the predicted value of the corresponding position within the current block as the reference sample value includes: The encoding method according to claim 54.

56. The step of determining the predicted value of the target pixel in the current block based on the reference sample value and filter coefficient corresponding to the target pixel in the current block is: The steps include determining the first input value of the target filter based on the reference sample value corresponding to the target pixel in the current block, A step of determining the first output value of the target filter based on the first input value and the filter coefficients, The steps include determining the predicted value of the target pixel in the current block based on the first output value, The encoding method according to claim 54.

57. The step of determining the first input value of the target filter based on the reference sample value corresponding to the target pixel in the current block is: The step of determining the second factor, The steps include performing a subtraction operation between the reference sample value and the second factor to obtain the first input value of the target filter, The encoding method according to claim 56.

58. The step of determining the first output value of the target filter based on the first input value and the filter coefficient is: The steps include determining the second output value of the target filter based on the first input value and the filter coefficients, The steps include: performing a first process on the second output value to determine the first output value of the target filter; The encoding method according to claim 57.

59. The step of determining the second output value of the target filter based on the first input value and the filter coefficients is as follows: The steps include: calculating the product of the first input value and the corresponding filter coefficient; The step of setting the second output value of the target filter to be equal to the sum of n of the aforementioned products, where n represents the number of input terms corresponding to the target filter, and n is a positive integer. The encoding method according to claim 58.

60. The step of performing a first process on the second output value to determine the first output value of the target filter is: The step includes performing an addition operation on the second output value and the second factor to obtain the first output value of the target filter, The encoding method according to claim 58.

61. The step of performing a first process on the second output value to determine the first output value of the target filter is: The steps include determining the third output value of the target filter, The steps include determining a fourth output value of the target filter based on the second output value and the third output value, The steps include: performing an addition operation on the fourth output value and the second factor to obtain the first output value of the target filter; The encoding method according to claim 58.

62. The step of determining the third output value of the target filter is as follows: A step of determining the number of first type input terms corresponding to the target filter based on the shape of the target filter, If the number of input terms of the first type corresponding to the target filter is p, the step of determining p+q filter coefficients of the target filter, wherein p and q are both positive integers, The steps include determining a third output value of the target filter based on q filter coefficients out of the p+q filter coefficients and q second-type input terms, The encoding method according to claim 61.

63. The step of determining the third output value of the target filter is as follows: A step of determining the number of first type input terms corresponding to the target filter based on the shape of the target filter, If the number of input terms of the first type corresponding to the target filter is p, the step of determining p+m filter coefficients of the target filter, wherein p and m are both positive integers, The steps include determining the third output value of the target filter based on m filter coefficients out of the p+m filter coefficients and m third-type input terms, The encoding method according to claim 61.

64. The step of determining the third output value of the target filter is as follows: A step of determining the number of first type input terms corresponding to the target filter based on the shape of the target filter, If the number of input terms of the first type corresponding to the target filter is p, the step of determining the p+k filter coefficients of the target filter, wherein p and k are both positive integers, The process includes a step of determining a third output value of the target filter based on i filter coefficients and i second-type input terms from the p+k filter coefficients, and j filter coefficients and j third-type input terms from the p+k filter coefficients, wherein i and j are both positive integers and k = i + j. The encoding method according to claim 61.

65. There is a linear relationship between the number of input terms of the first type and the reference sample value, a nonlinear relationship between the number of input terms of the second type and the reference sample value, and the number of input terms of the third type is predetermined bias information. The encoding method according to claim 64.

66. The value of the second factor is a second predetermined constant. The encoding method according to claim 57, 60, or 61.

67. The step of determining the aforementioned second factor is: The steps include determining the reconstruction value of at least one reference pixel within the reference region, The steps include: calculating the average value for the reconstruction value of at least one reference pixel to obtain a first average value; The steps include setting the value of the second factor to be equal to the first mean value, The encoding method according to claim 57, 60, or 61.

68. The step of determining the predicted value of the target pixel in the current block based on the first output value is: The process includes the step of performing a second process on the first output value to obtain a predicted value for the target pixel in the current block, The encoding method according to claim 56.

69. The aforementioned encoding method further, The second process includes setting the predicted value of the target pixel in the current block to be predicted equal to the first output value. The encoding method according to claim 68.

70. The aforementioned encoding method further, The second process includes limiting the first output value to a predetermined numerical range, The lower limit of the predetermined numerical range is the minimum reconstruction value within the reference region, and the upper limit of the predetermined numerical range is the maximum reconstruction value within the reference region. The encoding method according to claim 68.

71. The aforementioned encoding method further, When using an intra-prediction based on filter coefficients for the luminance component of the current block, the steps include determining the derivation intra-prediction mode for the luminance component of the current block, When using direct mode intra prediction for the color difference component of the current block, the steps include setting the direct mode to the derived intra prediction mode and thereby determining the predicted value of the color difference component of the current block, The encoding method according to any one of claims 39 to 70.

72. The aforementioned encoding method further, If the current block satisfies predetermined conditions, the step of determining the reference block of the current block, When using intra prediction based on filter coefficients for the reference block, the steps include determining the derived intra prediction mode for the reference block, The steps include adding the derived intra-prediction mode to the intra-prediction mode candidate list of the current block, The encoding method according to any one of claims 39 to 70.

73. The current block satisfies the predetermined conditions, at least, The current block is an interpretation block. The current block includes one of the following: The encoding method according to claim 72.

74. The aforementioned encoding method further, The steps include determining the original value of the current block, The steps include determining the residual value of the current block based on the original value of the current block and the predicted value of the current block, The steps include encoding the residual value of the current block and writing the resulting encoded bits to a bitstream, The encoding method according to any one of claims 39 to 73.

75. The step of encoding the residual value of the current block and writing the resulting encoded bits to the bitstream is: The steps include performing a conversion process on the residual value to obtain the conversion coefficient of the current block, The steps include: performing a quantization process on the conversion coefficients to obtain the quantization coefficients of the current block; The steps include encoding the quantization coefficients of the current block and writing the resulting encoded bits to a bitstream, The encoding method according to claim 74.

76. The step of performing a transformation process on the residual value to obtain the transformation coefficient of the current block is: When a multiple transformation selection mode is used for the current block and the target filtering mode is interpolation filtering mode, the steps include determining the target transformation kernel for the current block, The steps include: performing a transformation process on the residual value based on the target transformation kernel to obtain the transformation coefficient of the current block; The encoding method according to claim 75.

77. The determination of the target translation kernel is as follows: The target filtering mode of the current block, The size parameter of the current block, The current shape of the block has a relationship with at least one parameter among them, The encoding method according to claim 76.

78. The step of determining the target translation kernel of the current block is: The steps include determining at least one candidate transformation kernel, A step of calculating the cost for the at least one candidate transformation kernel and determining the cost result for the at least one candidate transformation kernel, The steps include determining a minimum cost result from the cost results of at least one candidate transformation kernel, and determining the candidate transformation kernel corresponding to the minimum cost result as the target transformation kernel for the current block, The encoding method according to claim 76.

79. The aforementioned encoding method further, The steps include determining the non-zero coefficient information of the current block, The steps include determining the at least one candidate transformation kernel based on the non-zero coefficient information of the current block, The encoding method according to claim 78.

80. The number of at least one candidate transformation kernels is six or less. The encoding method according to claim 79.

81. The aforementioned encoding method further, A step of determining the transformation kernel index value of the current block, wherein the transformation kernel index value is used to indicate the index number of the target transformation kernel in the at least one candidate transformation kernel, The steps include encoding the conversion kernel index value of the current block and writing the resulting encoded bits to a bitstream, The encoding method according to claim 78.

82. The aforementioned encoding method further, A step of determining the transformation kernel index value of the current block, wherein the transformation kernel index value is used to indicate the index number of the target transformation kernel in the at least one candidate transformation kernel, and the at least one candidate transformation kernel is related to the size parameter of the current block, The steps include encoding the conversion kernel index value of the current block and writing the resulting encoded bits to a bitstream, The encoding method according to claim 78.

83. A bitstream, wherein the bitstream is generated by bit encoding based on information to be encoded, and the information to be encoded is A bitstream characterized by including at least one of the target filtering mode of the current block, the residual value of the current block, and the transformation kernel index value of the current block.

84. An encoder comprising a first determination unit and a first prediction unit, The first decision unit is configured to determine the target filtering mode of the current block and to determine the reference region of the current block based on the size parameter of the current block and the target filtering mode. The encoder is characterized in that the first prediction unit is configured to determine the filter coefficients of the current block based on the reference region of the current block, perform an intra-prediction on the current block based on the filter coefficients, and determine the predicted value of the current block.

85. An encoder comprising a first memory and a first processor, The first memory is used to store computer programs that can be executed on the first processor. The encoder is characterized in that the first processor executes the encoding method described in any one of claims 39 to 82 when executing the computer program.

86. A decoder comprising a decoding unit, a second decision unit, and a second prediction unit, The decoding unit is configured to decode the bitstream and determine the target filtering mode for the current block. The second decision unit is configured to determine the reference region of the current block based on the size parameter of the current block and the target filtering mode. The decoder is characterized in that the second prediction unit is configured to determine the filter coefficients of the current block based on the reference region of the current block, perform an intra-prediction on the current block based on the filter coefficients, and determine the predicted value of the current block.

87. A decoder comprising a second memory and a second processor, The second memory is used to store computer programs that can be executed on the second processor. The decoder is characterized in that the second processor executes the decoding method described in any one of claims 1 to 38 when executing the computer program.

88. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the decoding method described in any one of claims 1 to 38 or the encoding method described in any one of claims 39 to 82 is realized.